/* Tahona WMS design tokens.
   The ONLY place a color, font family, or radius is defined. Dark is the default (no attribute);
   html[data-theme="light"] switches the palette. Everything else in the app reads these through
   var(). Status colors are fixed and are never themed by a tenant; only --accent may be
   overridden (Phase 3, per-tenant branding), which is why every accent-derived value is computed
   from it with color-mix() rather than hard-coded. */

:root {
    color-scheme: dark;

    --font-ui: 'Manrope', 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-mono: 'IBM Plex Mono', Consolas, 'SF Mono', monospace;

    /* deep navy neutrals (2026-09-23, chosen on the palette board over slate/graphite/ink/midnight;
       the warm-stone set they replace read as brown across a whole screen). Every neutral
       shares the same blue hue so the page, sidebar, cards and hover ground stay one material; the accent and the status colours below are unchanged. */
    --bg: #0f1420;
    --bg-2: #131a28;
    --surface: #18202f;
    --surface-2: #202a3b;
    --border: #2a3547;
    --border-2: #3d4a60;
    --text: #e6eaf3;
    --text-2: #a2acbf;
    /* 4.96:1 against --surface-2 (the hover ground), the LIGHTEST surface it sits on.
       The muted tier carries 10.5-12px labels (nav group headings, the user's role, card
       subtitles), which WCAG counts as NORMAL text, so it has to clear 4.5:1 — an earlier
       muted value measured 3.89 on --bg and 4.46 on --surface. TokenContrastTests
       checks every tier against every surface, not just the one that reads worst by eye. */
    --text-3: #8d98ac;

    /* one accent; everything else derived */
    --accent: #2fb08a;
    --accent-fg: var(--accent);
    --accent-ink: #0b1f18;
    --accent-soft: color-mix(in oklab, var(--accent) 16%, transparent);

    /* status: fixed, always paired with an icon + label */
    --good: #5cc46a;
    --warn: #f0b429;
    --serious: #ee8a5f;
    --crit: #ec6763;
    --info: #74b4ea;

    --shadow-overlay: 0 12px 32px rgba(0, 0, 0, .5);
    --scrim: rgba(8, 11, 18, .55);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-full: 9999px;
}

html[data-theme="light"] {
    color-scheme: light;

    --bg: #f3f1ec;
    --bg-2: #faf9f6;
    --surface: #ffffff;
    --surface-2: #efece6;
    --border: #e2ded6;
    --border-2: #cbc5ba;
    --text: #1f1d1a;
    --text-2: #5f5a52;
    /* 4.55:1 against white, the lightest ground here; see the dark note above.
       #8a8479 measured 3.29 and failed. */
    --text-3: #6f6a62;

    /* White-on-accent measures 4.65:1 here; the lighter #158a68 this replaces measured 4.31 and
       missed AA for the primary button's label, which is normal-size text. */
    --accent: #148464;
    --accent-fg: color-mix(in oklab, var(--accent), #000 22%);
    --accent-ink: #ffffff;
    --accent-soft: color-mix(in oklab, var(--accent) 12%, transparent);

    /* Darker than the obvious mid-tone choices on purpose. Badges and alerts paint this colour
       as TEXT on a 10-20% tint OF ITSELF over a white card, and on that tint the lighter values
       (#1f8f3a, #b07414, #c2410c, #c92a2a, #1d6fc4) measured 3.1-4.0:1 for 12px text. These clear
       4.5:1 there and read better on plain white too. TokenContrastTests checks both grounds. */
    --good: #19742f;
    --warn: #8b5c10;
    --serious: #af3a0b;
    --crit: #b72626;
    --info: #1a64b0;

    --shadow-overlay: 0 12px 32px rgba(40, 30, 10, .14);
    --scrim: rgba(60, 50, 30, .35);
}
