/* SW-IT brand tokens (design/tokens.json) plus the UI values used in the
   signed-off SafeTrack mockups. Every colour in the app comes from here. */
:root {
  /* brand */
  --navy-950: #0a1440;
  --navy-900: #0d2b63;
  --blue-600: #0d47a1;
  --blue-500: #155ec9;
  --blue-50: #eaf1fb;
  --cyan-400: #29b6d8;
  --amber-500: #d6912a;
  --amber-600: #b4650f;
  --ink-900: #161a22;
  --ink-600: #4b5160;
  --grey-600: #5b5f66;
  --paper-0: #fafbfc;
  --line: #e3e7ee;
  --white: #ffffff;

  /* UI */
  --line-soft: #eef1f5;
  --border-input: #d3d9e3;
  --border-secondary: #c6d3ea;
  --border-dashed: #9fb3d6;
  --segment-bg: #eef2f8;
  --topbar-divider: #3a5a92;
  --topbar-link: #c9d5ec;
  --backdrop: rgba(10, 20, 64, 0.45);
  --watermark-text: rgba(255, 255, 255, 0.05);
  --watermark-accent: rgba(41, 182, 216, 0.07);

  /* status */
  --overdue-bg: #fdecea;
  --overdue-fg: #a31d12;
  --overdue-dot: #b42318;
  --overdue-row: #fffafa;
  --soon-bg: #fbf1e2;
  --soon-fg: #8a4d09;
  --ok-bg: #e6f4ec;
  --ok-fg: #1a6641;
  --ok-dot: #1f7a4d;
  --info-bg: var(--blue-50);
  --info-fg: var(--blue-600);
  --neutral-dot: #8a909b;

  /* type */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-sans: "IBM Plex Sans", system-ui, sans-serif;

  /* spacing & radius */
  --space-1: 4px;
  --space-2: 8px;
  --space-4: 16px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* semantic (light defaults; dark themes below override these) */
  --surface: #ffffff;
  --on-brand: #ffffff;
  --heading: var(--navy-900);
  --link: var(--blue-600);
  --tile-icon-bg: rgba(255, 255, 255, 0.65);
  --loading-veil: rgba(255, 255, 255, 0.6);
  --sk-shine: #f7f9fc;

  --topbar-h: 68px;
  --panel-w: 500px;
}

/* ---- Dark mode ("Midnight"): near-black with bright cyan highlights.
   On when <html data-theme="dark">, set from the person's choice (Light / Dark / Auto). ---- */
html[data-theme] { color-scheme: dark; }
html[data-theme] body.app::before { background: #ffffff; opacity: .025; }

html[data-theme="dark"] {
  --navy-900: #05080f;
  --blue-600: #1a8fb3;
  --blue-500: #29b6d8;
  --paper-0: #05080f;
  --surface: #0c1422;
  --line: #16304d;
  --line-soft: #10233a;
  --ink-900: #ffffff;
  --ink-600: #c3d3e6;
  --grey-600: #8fb0cc;
  --heading: #ffffff;
  --link: #5fd4f2;
  --blue-50: #0e2238;
  --border-input: #1d3d60;
  --border-secondary: #22496f;
  --border-dashed: #2c5a86;
  --segment-bg: #08111d;
  --topbar-divider: #16304d;
  --topbar-link: #8fdcf0;
  --overdue-bg: #2a0d12; --overdue-fg: #ff9c90; --overdue-row: #1c0a10; --overdue-dot: #ff6b5e;
  --soon-bg: #2a1f08; --soon-fg: #ffcf73;
  --ok-bg: #0b2419; --ok-fg: #6ee7a8; --ok-dot: #3fd98a;
  --info-bg: #0e2238; --info-fg: #5fd4f2;
  --tile-icon-bg: rgba(95, 212, 242, 0.08);
  --loading-veil: rgba(5, 8, 15, 0.6);
  --sk-shine: #17304d;
  --backdrop: rgba(0, 0, 0, 0.7);
  --shadow-card: 0 0 0 1px rgba(95, 212, 242, .05), 0 6px 20px rgba(0, 0, 0, .5);
  --shadow-lift: 0 0 0 1px rgba(95, 212, 242, .12), 0 12px 28px rgba(0, 0, 0, .6);
}
html[data-theme="dark"] .topbar { border-bottom: 1px solid var(--line); }
