/* ═══════════════════════════════════════════════════════════════════════════
   SysOps — theme tokens
   Dark, high-contrast "operations command center" palette with neon accents.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  color-scheme: dark;

  /* base surfaces — flat, near-black */
  --bg-0: #0a0a0b;
  --bg-1: #0f0f11;
  --bg-2: #17171a;
  --bg-3: #1e1e22;

  --panel: #17171a;
  --panel-solid: #17171a;
  --panel-raised: #1d1d21;
  --panel-sunken: #0f0f11;

  /* hairlines */
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.15);
  --glass-blur: 0px;

  /* text */
  --text: #e7e8ea;
  --text-dim: #b4b8bf;
  --text-mute: #8a8f98;
  --text-faint: #5f646d;

  /* accents (overridable at runtime by the theme API) */
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --accent-3: #93c5fd;
  --accent-rgb: 59, 130, 246;

  /* status */
  --ok: #2fb344;
  --ok-rgb: 47, 179, 68;
  --warn: #f59f00;
  --warn-rgb: 245, 159, 0;
  --crit: #d63939;
  --crit-rgb: 214, 57, 57;
  --info: #4299e1;
  --info-rgb: 66, 153, 225;
  --idle: #6c757d;

  /* glows — flat, not neon */
  --glow-accent: 0 0 0 1px rgba(var(--accent-rgb), 0.25);
  --glow-ok: none;
  --glow-warn: none;
  --glow-crit: none;

  /* geometry */
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --shadow-1: 0 1px 2px rgba(0, 0, 0, 0.5);
  --shadow-2: 0 1px 3px rgba(0, 0, 0, 0.4);
  --shadow-3: 0 12px 32px rgba(0, 0, 0, 0.55);

  /* typography */
  --font-sans: "Inter", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;

  /* layout */
  --topbar-h: 62px;
  --topnav-h: 50px;
  --drawer-w: 320px;
  --gutter: 20px;

  /* motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 120ms;
  --dur: 220ms;
  --dur-slow: 420ms;
}

/* Optional alternate accents selectable from Settings. */
:root[data-accent="blue"] {
  --accent: #3b82f6;
  --accent-2: #60a5fa;
  --accent-rgb: 59, 130, 246;
}
:root[data-accent="cyber"] {
  --accent: #22d3ee;
  --accent-2: #3b82f6;
  --accent-rgb: 34, 211, 238;
}
:root[data-accent="violet"] {
  --accent: #a855f7;
  --accent-2: #60a5fa;
  --accent-rgb: 168, 85, 247;
}
:root[data-accent="emerald"] {
  --accent: #34d399;
  --accent-2: #3b82f6;
  --accent-rgb: 52, 211, 153;
}
:root[data-accent="amber"] {
  --accent: #fbbf24;
  --accent-2: #f472b6;
  --accent-rgb: 251, 191, 36;
}
:root[data-accent="rose"] {
  --accent: #fb7185;
  --accent-2: #a855f7;
  --accent-rgb: 251, 113, 133;
}

/* Light mode: kept usable for bright control rooms, still glassy. */
:root[data-theme="light"] {
  color-scheme: light;
  --bg-0: #eef2f9;
  --bg-1: #e6ecf6;
  --bg-2: #ffffff;
  --bg-3: #f4f7fc;
  --panel: rgba(255, 255, 255, 0.82);
  --panel-solid: #ffffff;
  --panel-raised: rgba(255, 255, 255, 0.92);
  --panel-sunken: rgba(226, 232, 240, 0.6);
  --line: rgba(15, 23, 42, 0.1);
  --line-strong: rgba(15, 23, 42, 0.2);
  --text: #0d1526;
  --text-dim: #46566f;
  --text-mute: #6b7c96;
  --text-faint: #94a3b8;
  --shadow-2: 0 12px 32px rgba(15, 23, 42, 0.12);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms;
    --dur: 0ms;
    --dur-slow: 0ms;
  }
}
