/* AIGuard design tokens — Anthropic-flavoured.
 *
 * Single source of truth for the palette. Loaded BEFORE style.css so every
 * component rule only references var(--token); no raw colours in components.
 *
 *   Light : warm paper (#F7F4EE) + clay/coral accent (#CC785C).
 *   Dark  : warm near-black (#1A1916) + lighter clay (#E08E6D).
 *
 * Theme selection:
 *   - default (no data-theme)            → light tokens.
 *   - @media (prefers-color-scheme:dark) → dark tokens, unless the user forced
 *                                          light via the account picker.
 *   - <html data-theme="light|dark">     → explicit override, wins over the OS.
 *
 * Keep this file in sync with the local agent panel (agent/internal/backend/
 * static) so the console and the endpoint UI speak the same visual language.
 */
:root {
  color-scheme: light dark;
  --space: 8px;

  /* light (Anthropic paper) */
  --fg: #1F1E1C;
  --ink: #1F1E1C;
  --ink-soft: #46443D;
  --fg-muted: #6B675F;
  --muted: #6B675F;
  --bg: #F7F4EE;
  --bg-card: #FFFFFF;
  --surface: #FCFBF8;
  --surface-hover: #F3EEE4;
  --row: #FCFBF8;
  --line: #E7E1D5;
  --accent: #CC785C;
  --accent-fg: #FFFFFF;
  --accent-soft: rgba(204, 120, 92, 0.10);
  --danger: #B23A2E;
  --ok: #2F7D54;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fg: #ECE7DD;
    --ink: #ECE7DD;
    --ink-soft: #C9C3B6;
    --fg-muted: #9C958A;
    --muted: #9C958A;
    --bg: #1A1916;
    --bg-card: #232220;
    --surface: #2A2825;
    --surface-hover: #322F2B;
    --row: #232220;
    --line: #383530;
    --accent: #E08E6D;
    --accent-fg: #1A1916;
    --accent-soft: rgba(224, 142, 109, 0.14);
    --danger: #E0857B;
    --ok: #6FBE93;
  }
}

:root[data-theme="light"] {
  --fg: #1F1E1C;
  --ink: #1F1E1C;
  --ink-soft: #46443D;
  --fg-muted: #6B675F;
  --muted: #6B675F;
  --bg: #F7F4EE;
  --bg-card: #FFFFFF;
  --surface: #FCFBF8;
  --surface-hover: #F3EEE4;
  --row: #FCFBF8;
  --line: #E7E1D5;
  --accent: #CC785C;
  --accent-fg: #FFFFFF;
  --accent-soft: rgba(204, 120, 92, 0.10);
  --danger: #B23A2E;
  --ok: #2F7D54;
}

:root[data-theme="dark"] {
  --fg: #ECE7DD;
  --ink: #ECE7DD;
  --ink-soft: #C9C3B6;
  --fg-muted: #9C958A;
  --muted: #9C958A;
  --bg: #1A1916;
  --bg-card: #232220;
  --surface: #2A2825;
  --surface-hover: #322F2B;
  --row: #232220;
  --line: #383530;
  --accent: #E08E6D;
  --accent-fg: #1A1916;
  --accent-soft: rgba(224, 142, 109, 0.14);
  --danger: #E0857B;
  --ok: #6FBE93;
}
