/* Design tokens for the admin dashboard. Same brand palette as public/consent.css and
   src/renderer/tokens.ts (the PDF renderer) - three places, one set of values, kept in sync by
   hand since each runs in a different context (browser CSS, a function's inline <style>, PDF
   drawing code). */
:root {
  --bg: #F8FAFC;
  --card: #FFFFFF;
  --text: #26314A;
  --text2: #3E4453;
  --muted: #7C8392;
  --border: #E5E7EB;
  --border-strong: #D1D5DB;

  --amber: #F7AB2D;
  --teal: #7FC3C8;
  --slateblue: #8091B1;
  --mauve: #C48BB7;

  --high: #22A86E;
  --med: #F0A500;
  --low: #E04545;

  --accent: var(--amber);
  --accent-contrast: #26314A;
  --focus-ring: #26314A;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;

  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;

  --shadow-sm: 0 1px 2px rgba(38, 49, 74, 0.06);
  --shadow-md: 0 4px 12px rgba(38, 49, 74, 0.08);
  --shadow-lg: 0 12px 32px rgba(38, 49, 74, 0.14);

  --sidebar-w: 220px;
  --drawer-w: 480px;

  color-scheme: light;
}

/* System preference is the default signal; an explicit data-theme (set by the in-app toggle)
   always wins in either direction over the media query. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F172A;
    --card: #1A2332;
    --text: #F1F5F9;
    --text2: #CBD5E1;
    --muted: #8B95A5;
    --border: #2D3A4F;
    --border-strong: #3A4A63;
    --accent-contrast: #0F172A;
    --focus-ring: #F1F5F9;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0F172A;
  --card: #1A2332;
  --text: #F1F5F9;
  --text2: #CBD5E1;
  --muted: #8B95A5;
  --border: #2D3A4F;
  --border-strong: #3A4A63;
  --accent-contrast: #0F172A;
  --focus-ring: #F1F5F9;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
