:root {
  /* sidebar (kept dark — persistent wayfinding anchor; brand navy, not neon) */
  --sidebar-bg: #0f2d52;
  --sidebar-border: rgba(255, 255, 255, 0.08);
  --sidebar-hover: rgba(255, 255, 255, 0.06);
  --sidebar-active: rgba(255, 122, 0, 0.14);
  --sidebar-text: #94a3b8;
  --sidebar-text-active: #ffffff;
  --sidebar-brand: #ff7a00;

  /* main content surfaces (sleek dark mode - default) */
  --surface-0: #030712;
  --surface-1: #090d1a;
  --surface-2: rgba(15, 23, 42, 0.65);
  --surface-3: #1e293b;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);

  /* RGB triplets of the surface tones above, for rgba(var(--x-rgb), alpha)
     usage where layout.css needs a surface color at a custom opacity —
     keeps those spots theme-aware instead of hardcoding a fixed dark literal */
  --surface-0-rgb: 3, 7, 18;
  --surface-1-rgb: 9, 13, 26;
  --surface-2-rgb: 15, 23, 42;
  --surface-3-rgb: 30, 41, 59;

  /* ink */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #7c8ca3;

  /* accent (brand blue, brightened for dark background & brand purple secondary) */
  --accent: #3b82f6;
  --accent-hover: #2563eb;
  --accent-soft: rgba(59, 130, 246, 0.1);
  --accent-violet: #985cf6;
  --accent-violet-soft: rgba(152, 92, 246, 0.1);

  /* status triad (brand success/warning/danger) */
  --status-good: #22c55e;
  --status-good-soft: rgba(34, 197, 94, 0.1);
  --status-warning: #f59e0b;
  --status-warning-soft: rgba(245, 158, 11, 0.1);
  --status-warning-rgb: 245, 158, 11;
  --status-critical: #ef4444;
  --status-critical-soft: rgba(239, 68, 68, 0.1);
  --status-critical-rgb: 239, 68, 68;
  --status-muted: #64748b;
  --status-muted-soft: rgba(100, 116, 139, 0.12);

  /* elevation (layered soft depth — no color glow) */
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  --shadow-card-hover: 0 2px 4px rgba(0, 0, 0, 0.35), 0 16px 40px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --shadow-modal: 0 8px 16px rgba(0, 0, 0, 0.4), 0 32px 72px rgba(0, 0, 0, 0.55);

  /* type */
  --font-ui: "Inter", "Plex Sans Thai", "Segoe UI", sans-serif;
  --font-mono: "Plex Mono", "Plex Sans Thai", monospace;

  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 16px;
  --text-lg: 20px;
  --text-xl: 28px;

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

  /* radius */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;

  --sidebar-width: 224px;
  --topbar-height: 56px;

  /* custom buttons text color and theme parameters */
  --btn-primary-text: #030712;
  --btn-primary-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  --btn-primary-shadow-hover: 0 4px 12px rgba(0, 0, 0, 0.4);
  --backdrop-blur: 20px;
  --grid-line-opacity: 0.003;
}

html[data-theme="light"] {
  /* main content surfaces (custom brand palette) */
  --surface-0: #f6f8fb;
  --surface-1: #ffffff;
  --surface-2: rgba(255, 255, 255, 0.75);
  --surface-3: #e5e7eb;
  --border: #e5e7eb;
  --border-strong: #d1d5db;

  --surface-0-rgb: 246, 248, 251;
  --surface-1-rgb: 255, 255, 255;
  --surface-2-rgb: 255, 255, 255;
  --surface-3-rgb: 229, 231, 235;

  /* ink */
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;

  /* accent (brand secondary blue — primary actions, active nav, links, chart hue) */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: rgba(37, 99, 235, 0.08);
  --accent-violet: #985cf6;
  --accent-violet-soft: rgba(152, 92, 246, 0.08);

  /* status triad (brand success/warning/danger) */
  --status-good: #22c55e;
  --status-good-soft: rgba(34, 197, 94, 0.08);
  --status-warning: #f59e0b;
  --status-warning-soft: rgba(245, 158, 11, 0.08);
  --status-warning-rgb: 245, 158, 11;
  --status-critical: #ef4444;
  --status-critical-soft: rgba(239, 68, 68, 0.08);
  --status-critical-rgb: 239, 68, 68;
  --status-muted: #6b7280;
  --status-muted-soft: rgba(107, 114, 128, 0.12);

  /* elevation (softer layered shadows for light theme) */
  --shadow-card: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 16px rgba(15, 23, 42, 0.06), inset 0 1px 0 rgba(255, 255, 255, 0.8);
  --shadow-card-hover: 0 2px 4px rgba(15, 23, 42, 0.05), 0 12px 28px rgba(15, 23, 42, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --shadow-modal: 0 8px 16px rgba(15, 23, 42, 0.08), 0 32px 72px rgba(15, 23, 42, 0.18);

  /* custom buttons text color and theme parameters */
  --btn-primary-text: #ffffff;
  --btn-primary-shadow: 0 2px 6px rgba(15, 23, 42, 0.15);
  --btn-primary-shadow-hover: 0 4px 12px rgba(15, 23, 42, 0.2);
  --backdrop-blur: 12px;
  --grid-line-opacity: 0.015;
}
