/* ==========================================================================
   German Motor Works — Base theme (dark, silver, hints of blue)
   Shared by the public site and the admin panel.
   ========================================================================== */

:root {
    --bg: #08090b;
    --bg-alt: #101216;
    --surface: #15171c;
    --surface-2: #1b1e24;
    --border: #272a31;
    --border-light: #34383f;
    --text: #ecedef;
    --text-dim: #a8adb6;
    --text-faint: #6f7580;
    --silver: #c9cdd4;
    --silver-bright: #e4e7eb;
    --blue: #4f9dea;
    --blue-bright: #6fb3f7;
    --blue-dim: rgba(79, 157, 234, 0.14);
    --blue-border: rgba(79, 157, 234, 0.35);
    --danger: #e2685f;
    --success: #4fbf87;
    --warning: #d9a84e;
    --radius: 6px;
    --radius-lg: 10px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --container: 1360px;
    --container-wide: 1560px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

/* Desktop scrollbars themed to match the site's color scheme (Firefox + WebKit/Blink browsers).
   Mobile browsers manage their own overlay scrollbars and ignore these rules, which is expected. */
html { scrollbar-color: var(--border-light) var(--bg-alt); scrollbar-width: thin; }
::-webkit-scrollbar { width: 14px; height: 14px; }
::-webkit-scrollbar-track { background: var(--bg-alt); }
::-webkit-scrollbar-thumb { background-color: var(--border-light); border-radius: 8px; border: 3px solid var(--bg-alt); }
::-webkit-scrollbar-thumb:hover { background-color: var(--blue); }
::-webkit-scrollbar-corner { background: var(--bg-alt); }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5 {
    font-family: var(--font-heading);
    font-weight: 500;
    color: var(--silver-bright);
    line-height: 1.2;
    margin: 0 0 0.5em;
    letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.1rem, 4vw, 3.4rem); font-weight: 600; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; color: var(--text-dim); }
a { color: var(--blue-bright); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--silver-bright); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 32px; }
.container-wide { max-width: var(--container-wide); margin: 0 auto; padding: 0 32px; }
.section { padding: 88px 0; }
.section--tight { padding: 56px 0; }
.section--alt { background: var(--bg-alt); }
.section-eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    color: var(--blue-bright);
    font-weight: 600;
    margin-bottom: 12px;
    display: block;
}
.section-head { max-width: 680px; margin: 0 0 48px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all .18s ease;
    text-align: center;
}
.btn-primary { background: linear-gradient(135deg, var(--blue), #3a7fc4); color: #fff; box-shadow: 0 4px 18px rgba(79,157,234,.25); }
.btn-primary:hover { filter: brightness(1.1); color: #fff; transform: translateY(-1px); }
.btn-outline { background: transparent; color: var(--silver-bright); border-color: var(--border-light); }
.btn-outline:hover { border-color: var(--blue-border); color: var(--blue-bright); }
.btn-ghost { background: transparent; color: var(--text-dim); }
.btn-ghost:hover { color: var(--silver-bright); }
.btn-sm { padding: 8px 16px; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn-danger { background: var(--danger); color: #fff; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color .18s ease, transform .18s ease;
}
.card:hover { border-color: var(--border-light); }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    border: 1px solid var(--border-light);
    color: var(--text-dim);
}
.badge-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-faint); }
.badge.open { color: var(--success); border-color: rgba(79,191,135,.35); }
.badge.open .badge-dot { background: var(--success); box-shadow: 0 0 6px var(--success); }
.badge.closed { color: var(--danger); border-color: rgba(226,104,95,.35); }
.badge.closed .badge-dot { background: var(--danger); }
.badge.appointment { color: var(--warning); border-color: rgba(217,168,78,.35); }
.badge.appointment .badge-dot { background: var(--warning); box-shadow: 0 0 6px var(--warning); }

/* Forms (shared public + admin) */
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--silver); margin-bottom: 6px; }
.field { margin-bottom: 20px; }
.field-hint { color: var(--text-faint); font-size: 0.78rem; margin-top: 6px; }
input[type=text], input[type=email], input[type=tel], input[type=password], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], input[type=url], input[type=search],
select, textarea {
    width: 100%;
    background: var(--bg-alt);
    border: 1px solid var(--border-light);
    color: var(--text);
    padding: 12px 14px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
textarea { resize: vertical; min-height: 120px; }
input:focus, select:focus, textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px var(--blue-dim);
}
input::placeholder, textarea::placeholder { color: var(--text-faint); }
.checkbox-row { display: flex; align-items: center; gap: 10px; }
.checkbox-row input { width: auto; }
.checkbox-row label { margin: 0; font-weight: 500; }

fieldset { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; margin: 0 0 24px; }
legend { padding: 0 8px; color: var(--blue-bright); font-weight: 600; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; }

.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.92rem; border: 1px solid; }
.alert-success { background: rgba(79,191,135,.08); border-color: rgba(79,191,135,.3); color: var(--success); }
.alert-error { background: rgba(226,104,95,.08); border-color: rgba(226,104,95,.3); color: var(--danger); }
.alert-info { background: var(--blue-dim); border-color: var(--blue-border); color: var(--blue-bright); }
.alert-warning { background: rgba(217,168,78,.08); border-color: rgba(217,168,78,.3); color: var(--warning); }

.tag { display: inline-block; padding: 3px 10px; border: 1px solid var(--border-light); border-radius: 999px; font-size: 0.72rem; color: var(--text-dim); margin: 0 6px 6px 0; }

hr.rule { border: none; border-top: 1px solid var(--border); margin: 40px 0; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.row-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row-actions form { margin: 0; display: inline-flex; align-items: center; }
.row-actions a, .row-actions button { line-height: 1; }
th { color: var(--text-faint); font-weight: 600; text-transform: uppercase; font-size: 0.72rem; letter-spacing: 0.06em; }
tr:hover td { background: rgba(255,255,255,0.015); }

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.grid { display: grid; gap: 28px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
