/* Design tokens shared by every page. Components read only these variables.
   Theme: system preference by default; data-theme="light|dark" on <html> overrides it. */
:root{
  color-scheme:light;
  --font-sans:'DM Sans',ui-sans-serif,system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-display:Manrope,var(--font-sans);
  --font-mono:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  --fs-2xs:11px;--fs-xs:12px;--fs-sm:13px;--fs-md:14px;--fs-lg:16px;--fs-xl:20px;--fs-2xl:28px;
  --lh-tight:1.25;--lh:1.5;
  --space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:20px;--space-6:24px;--space-8:32px;
  --r-xs:4px;--r-sm:6px;--r-md:10px;--r-lg:14px;--r-xl:18px;--r-pill:999px;
  --control-h:40px;--control-h-sm:32px;--touch:44px;
  --ease-out:cubic-bezier(.2,.8,.2,1);--dur-fast:120ms;--dur:180ms;
  --z-map-ui:1000;--z-map-overlay:1050;--z-panel:1100;--z-shell:1200;

  --bg:#f2f5f7;--surface:#fff;--surface-2:#f7f9fa;--surface-3:#eef2f5;
  --surface-glass:rgb(255 255 255 / .93);
  --ink:#14212d;--ink-2:#3a4956;--muted:#5d6b78;--subtle:#8593a0;
  --line:#e0e6eb;--line-strong:#c8d2da;
  --accent:#0f7d72;--accent-hover:#0b665d;--accent-ink:#0b5f57;--accent-soft:#e3f2ef;--on-accent:#fff;
  --warn:#8a5a12;--warn-soft:#fff4df;--warn-line:#ecd5ab;
  --danger:#a33a30;--danger-soft:#fdeeeb;--danger-line:#efcdc7;
  --ok:#17845a;
  --focus:#1a8f84;
  --shell-bg:#12202e;--shell-ink:#cddae3;--shell-muted:#7e97a8;--shell-line:#22374b;--shell-accent:#73d9c8;
  --shadow-1:0 1px 2px rgb(18 34 48 / .06),0 1px 1px rgb(18 34 48 / .04);
  --shadow-2:0 4px 16px rgb(18 34 48 / .09),0 1px 3px rgb(18 34 48 / .06);
  --shadow-3:0 14px 40px rgb(18 34 48 / .16),0 2px 6px rgb(18 34 48 / .06);
  --tile-filter:none;

  /* Map evidence palette (AGENTS.md): GPS black, Wi-Fi blue, LBS yellow,
     spoofing hollow orange, estimates dashed grey. Identical in both themes:
     these colours are drawn over light map tiles. */
  --src-gps:#20272b;--src-wifi:#2876c7;--src-lbs:#d5a600;--src-lbs-fill:#ffe793;
  --src-spoof:#e77a21;--src-rejected:#7b858a;--src-estimated:#687780;
  --src-stationary:#686d75;--src-conflict:#24599a;--src-gap:#b28d53;
  --src-gps-ui:var(--src-gps); /* GPS as drawn on panels rather than on map tiles */

  /* Fleet vehicle state (monitoring list, chips, map dots). Reported motion/ignition
     or stale data only; identical in both themes because they also sit on map tiles. */
  --state-moving:#00b386;--state-on:#ff9f0a;--state-off:#ff3b4f;--state-stale:#8e9aa6;--state-none:#c8d2da;
  --r-panel:14px;--panel-gap:12px;
}
:root[data-theme=dark]{
  color-scheme:dark;
  --bg:#0d141b;--surface:#141d26;--surface-2:#19242f;--surface-3:#1f2c38;
  --surface-glass:rgb(20 29 38 / .92);
  --ink:#e3eaf0;--ink-2:#bac7d1;--muted:#8e9eac;--subtle:#6b7c8a;
  --line:#243240;--line-strong:#33465a;
  --accent:#3dbfad;--accent-hover:#5ed0c0;--accent-ink:#7fded0;--accent-soft:rgb(61 191 173 / .14);--on-accent:#06201c;
  --warn:#e5b663;--warn-soft:rgb(229 182 99 / .12);--warn-line:rgb(229 182 99 / .32);
  --danger:#f08f83;--danger-soft:rgb(240 143 131 / .12);--danger-line:rgb(240 143 131 / .32);
  --ok:#5fd39b;--focus:#5ed0c0;
  --shell-bg:#0a1118;--shell-line:#1c2a37;
  --shadow-1:0 1px 2px rgb(0 0 0 / .35);
  --shadow-2:0 6px 18px rgb(0 0 0 / .38),0 1px 3px rgb(0 0 0 / .3);
  --shadow-3:0 16px 44px rgb(0 0 0 / .5),0 2px 6px rgb(0 0 0 / .3);
  --tile-filter:brightness(.78) contrast(1.06) saturate(.85);
  --src-gps-ui:#d6dde2;
}
@media (prefers-color-scheme:dark){
  :root:not([data-theme=light]){
    color-scheme:dark;
    --bg:#0d141b;--surface:#141d26;--surface-2:#19242f;--surface-3:#1f2c38;
    --surface-glass:rgb(20 29 38 / .92);
    --ink:#e3eaf0;--ink-2:#bac7d1;--muted:#8e9eac;--subtle:#6b7c8a;
    --line:#243240;--line-strong:#33465a;
    --accent:#3dbfad;--accent-hover:#5ed0c0;--accent-ink:#7fded0;--accent-soft:rgb(61 191 173 / .14);--on-accent:#06201c;
    --warn:#e5b663;--warn-soft:rgb(229 182 99 / .12);--warn-line:rgb(229 182 99 / .32);
    --danger:#f08f83;--danger-soft:rgb(240 143 131 / .12);--danger-line:rgb(240 143 131 / .32);
    --ok:#5fd39b;--focus:#5ed0c0;
    --shell-bg:#0a1118;--shell-line:#1c2a37;
    --shadow-1:0 1px 2px rgb(0 0 0 / .35);
    --shadow-2:0 6px 18px rgb(0 0 0 / .38),0 1px 3px rgb(0 0 0 / .3);
    --shadow-3:0 16px 44px rgb(0 0 0 / .5),0 2px 6px rgb(0 0 0 / .3);
    --tile-filter:brightness(.78) contrast(1.06) saturate(.85);
    --src-gps-ui:#d6dde2;
  }
}
