/* QLH-PMS design tokens — generated from web/design/tokens.json (design team, SW-014). Light theme is the default; set data-theme="night" on <html> for the night-audit theme.
   Fonts are self-hosted in /fonts (CSP default-src 'self'). Every text/background pair meets WCAG 2.1 AA in both themes. */

:root, [data-theme="light"] {
  color-scheme: light;
  --surface-0: #f3f4f1;
  --surface-1: #ffffff;
  --surface-2: #eceee9;
  --surface-3: #e1e4de;
  --line: #d8dbd4;
  --line-strong: #868d84;
  --ink: #1a1f26;
  --ink-muted: #4b535d;
  --ink-subtle: #636b75;
  --ink-inverse: #ffffff;
  --primary: #1e3a5c;
  --primary-hover: #16304d;
  --primary-tint: #e7edf5;
  --focus: #1f6fd1;
  --link: #1d5fb8;
  --success-fg: #1a5c33;
  --success-bg: #e3f4e8;
  --warning-fg: #7a4a00;
  --warning-bg: #fff4dc;
  --danger: #b42318;
  --danger-hover: #911c13;
  --danger-bg: #fde8e6;
  --info-fg: #17478c;
  --info-bg: #e6effc;
  --money-debit: var(--ink);
  --money-credit: #1a6b3c;
  --prop-1812: #8a2331;
  --prop-918: #2b4ea0;
  --prop-current: #0b6f66;
  --prop-watersky: #855c00;
  --prop-extra-1: #574f86;
  --prop-extra-2: #3f5b2a;
  --hk-dirty-fg: #6d4100;
  --hk-dirty-bg: #fbe8c2;
  --hk-clean-fg: #17478c;
  --hk-clean-bg: #dce8fa;
  --hk-inspected-fg: #1a5c33;
  --hk-inspected-bg: #d6efdd;
  --hk-ooo-fg: #94191c;
  --hk-ooo-bg: #f9dad7;
  --hk-oos-fg: #463f6d;
  --hk-oos-bg: #e5e2f0;
  --bar-ink: #ffffff;
  --bar-confirmed: #2f5687;
  --bar-inhouse: #1a6b3c;
  --bar-tentative: #dce8fa;
  --bar-departed: #c9cec6;
  --bar-block: #e5e2f0;
  --bar-ooo: #f9dad7;
  --scrim: rgba(14, 18, 23, 0.48);
  --shadow-1: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-2: 0 6px 16px rgba(16, 24, 40, 0.12);
  --shadow-3: 0 18px 48px rgba(16, 24, 40, 0.22);
}
[data-theme="night"] {
  color-scheme: dark;
  --surface-0: #0e1217;
  --surface-1: #161b22;
  --surface-2: #1e252e;
  --surface-3: #28303a;
  --line: #2b333d;
  --line-strong: #66717d;
  --ink: #e7eaee;
  --ink-muted: #b0b8c2;
  --ink-subtle: #8e98a3;
  --ink-inverse: #0e1217;
  --primary: #9cc3f2;
  --primary-hover: #b6d3f6;
  --primary-tint: #1b2a3d;
  --focus: #6aa8f5;
  --link: #8bbcf5;
  --success-fg: #9fdcb2;
  --success-bg: #11291c;
  --warning-fg: #f6c46c;
  --warning-bg: #2f2410;
  --danger: #f29b91;
  --danger-hover: #f6b5ad;
  --danger-bg: #3a1513;
  --info-fg: #a9c9f5;
  --info-bg: #14243b;
  --money-debit: var(--ink);
  --money-credit: #7fd4a0;
  --prop-1812: #9e2b3b;
  --prop-918: #3358b0;
  --prop-current: #0b6f66;
  --prop-watersky: #855c00;
  --prop-extra-1: #574f86;
  --prop-extra-2: #3f5b2a;
  --hk-dirty-fg: #f6c46c;
  --hk-dirty-bg: #3a2a0c;
  --hk-clean-fg: #a9c9f5;
  --hk-clean-bg: #172a45;
  --hk-inspected-fg: #9fdcb2;
  --hk-inspected-bg: #133222;
  --hk-ooo-fg: #f4a49c;
  --hk-ooo-bg: #451715;
  --hk-oos-fg: #c7c0ea;
  --hk-oos-bg: #2a2643;
  --bar-ink: #ffffff;
  --bar-confirmed: #3a6aa6;
  --bar-inhouse: #1f7a46;
  --bar-tentative: #172a45;
  --bar-departed: #3a424c;
  --bar-block: #2a2643;
  --bar-ooo: #451715;
  --scrim: rgba(0, 0, 0, 0.6);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-2: 0 6px 16px rgba(0, 0, 0, 0.5);
  --shadow-3: 0 18px 48px rgba(0, 0, 0, 0.6);
}
:root {
  --font-sans: "IBM Plex Sans", "Helvetica Neue", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 10px;
  --radius-pill: 999px;
  --control-sm: 28px;
  --control-md: 36px;
  --control-lg: 44px;
  --shell-band: 6px;
  --shell-bar: 52px;
  --nav-width: 224px;
  --grid-day: 44px;
  --grid-row: 32px;
  --z-sticky: 10;
  --z-shell: 20;
  --z-popover: 40;
  --z-dialog: 60;
  --z-toast: 80;
}
.t-display { font-family: var(--font-sans); font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -0.01em; }
.t-title { font-family: var(--font-sans); font-size: 20px; line-height: 26px; font-weight: 600; }
.t-section { font-family: var(--font-sans); font-size: 16px; line-height: 22px; font-weight: 600; }
.t-label { font-family: var(--font-sans); font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.t-body { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 400; }
.t-body-strong { font-family: var(--font-sans); font-size: 14px; line-height: 20px; font-weight: 600; }
.t-small { font-family: var(--font-sans); font-size: 13px; line-height: 18px; font-weight: 400; }
.t-caption { font-family: var(--font-sans); font-size: 12px; line-height: 16px; font-weight: 400; }
.t-money { font-family: var(--font-mono); font-size: 14px; line-height: 20px; font-weight: 500; font-variant-numeric: tabular-nums; }
.t-money-lg { font-family: var(--font-mono); font-size: 22px; line-height: 28px; font-weight: 500; font-variant-numeric: tabular-nums; }
.t-code { font-family: var(--font-mono); font-size: 13px; line-height: 18px; font-weight: 500; font-variant-numeric: tabular-nums; }

/* Engineering's starting variable names, kept as aliases so web/app.css and the functional screens keep working. */
:root {
  --text-xs: 0.75rem; --text-sm: 0.875rem; --text-md: 1rem; --text-lg: 1.25rem; --text-xl: 1.5rem;
  --radius: var(--radius-md);
}
:root, [data-theme="light"], [data-theme="night"] {
  --color-bg: var(--surface-1);
  --color-surface: var(--surface-2);
  --color-border: var(--line);
  --color-text: var(--ink);
  --color-muted: var(--ink-muted);
  --color-primary: var(--primary);
  --color-primary-text: var(--ink-inverse);
  --color-focus: var(--focus);
  --color-danger: var(--danger);
  --color-success: var(--success-fg);
  --color-warning-bg: var(--warning-bg);
  --color-warning-text: var(--warning-fg);
  --status-dirty: var(--hk-dirty-fg); --status-clean: var(--hk-clean-fg); --status-inspected: var(--hk-inspected-fg); --status-ooo: var(--hk-ooo-fg);
}
