/* ============================================================================
   AutoDirectMy design layer (loaded after home.css and page styles in <head>)

   Direction: the parts counter and the workshop floor. Quiet graphite surfaces,
   the logo's red used only for the primary action, the selection and the one
   figure that matters. Barlow for the interface (it was drawn after road signs
   and number plates), weights 400 and 600 only, sentence case.

   Signature: .plate — SKUs, car plates, order and job numbers set like a
   Malaysian number plate / stamped part tag. Used for those and nothing else.

   Redesign pass based on unslop by Damir Sokolovsky (@heydamir), CC BY 4.0.
   ========================================================================== */

:root,
:root[data-theme="dark"] {
    /* Graphite ramp */
    --bg-body:        #141415;
    --bg-sidebar:     #0f0f10;
    --bg-header:      rgba(20, 20, 21, 0.88);
    --bg-footer:      #0f0f10;
    --bg-card:        #19191b;
    --bg-input:       #232325;
    --bg-btn:         #232325;
    --bg-hover:       rgba(237, 237, 237, 0.05);
    --bg-active:      rgba(255, 69, 58, 0.12);
    --border:         rgba(237, 237, 237, 0.08);
    --border-input:   rgba(237, 237, 237, 0.13);

    --text-primary:   #ededed;
    --text-heading:   #ededed;
    --text-secondary: #a1a1a6;
    --text-muted:     #8b8b91;     /* 5.2 on the card, 4.6 on a raised input */
    --text-nav:       #a1a1a6;
    --text-nav-cat:   #8b8b91;

    /* No glows: focus keeps a visible ring, everything else is flat */
    --red-glow:           rgba(255, 69, 58, 0.30);
    --red-glow-lg:        transparent;
    --accent-amber-glow:  transparent;
    --accent-blue-glow:   transparent;
    --shadow:             0 0 0 1px var(--border);
    --showcase-shadow:    none;

    /* Full-colour blocks become tyre black, not brand red */
    --brand-block:    #1d1d1f;
    --sidebar-logo-bg: #0f0f10;
    --avatar-bg:      #2a2a2c;

    --font-sans: 'Barlow', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --font-mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
    --ease:      cubic-bezier(0.22, 1, 0.36, 1);
}

:root[data-theme="light"] {
    --bg-body:        #fafafa;
    --bg-sidebar:     #ffffff;
    --bg-header:      rgba(250, 250, 250, 0.88);
    --bg-footer:      #ffffff;
    --bg-card:        #ffffff;
    --bg-input:       #f4f4f5;
    --bg-btn:         #f4f4f5;
    --bg-hover:       rgba(23, 23, 23, 0.04);
    --bg-active:      rgba(215, 0, 21, 0.08);
    --border:         rgba(23, 23, 23, 0.08);
    --border-input:   rgba(23, 23, 23, 0.14);

    --text-primary:   #171717;
    --text-heading:   #171717;
    --text-secondary: #525252;
    --text-muted:     #6b6b6b;     /* 5.0 on the raised input */
    --text-nav:       #3f3f3f;
    --text-nav-cat:   #6b6b6b;

    --red-glow:           rgba(215, 0, 21, 0.22);
    --red-glow-lg:        transparent;
    --accent-amber-glow:  transparent;
    --accent-blue-glow:   transparent;
    --shadow:             0 1px 2px rgba(0, 0, 0, 0.05);
    --showcase-shadow:    0 1px 2px rgba(0, 0, 0, 0.05);

    --brand-block:    #1d1d1f;
    --sidebar-logo-bg: #ffffff;
    --avatar-bg:      #ececee;
}

/* ── Base type ─────────────────────────────────────────────────────────── */
body { font-family: var(--font-sans); letter-spacing: 0; font-size: 15px; }
button, input, select, textarea { font-family: inherit; letter-spacing: 0; }
h1, h2, h3, h4, h5 { font-weight: 600; letter-spacing: -0.01em; }
h1 { line-height: 1.15; }
b, strong { font-weight: 600; }
table, .num, [class*="price"], [class*="total"], [class*="amount"] { font-variant-numeric: tabular-nums; }

/* ── Signature: number-plate tag ──────────────────────────────────────── */
.plate {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 6px; border-radius: 4px;
    font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 600;
    letter-spacing: 0.04em; text-transform: uppercase; white-space: nowrap;
    font-variant-numeric: tabular-nums;
    color: #f4f4f5; background: #161617; border: 1px solid rgba(255, 255, 255, 0.14);
}
:root[data-theme="light"] .plate { border-color: #161617; }

/* ── Motion: one curve, short, colour/opacity/transform only ──────────── */
button, .btn, a, input, select, textarea, .card, [class*="card"] {
    transition: background-color 150ms var(--ease), border-color 150ms var(--ease),
                color 150ms var(--ease), opacity 150ms var(--ease), transform 150ms var(--ease);
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
