:root {
  color-scheme: dark;

  --bg-base: #0a0e1a;
  --bg-surface: #131826;
  --bg-elevated: #1c2333;
  --bg-overlay: rgba(10, 14, 26, 0.82);
  --bg-scrim: rgba(10, 14, 26, 0.72);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-emphasis: rgba(255, 255, 255, 0.16);

  --text-primary: #ffffff;
  --text-secondary: #b8c0d0;
  --text-muted: #6b7280;
  --text-disabled: #4b5563;

  --accent-primary: #818cf8;
  --accent-primary-hover: #a5b4fc;
  --accent-primary-muted: rgba(129, 140, 248, 0.12);

  --success: #34d399;
  --success-muted: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --warning-muted: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-muted: rgba(248, 113, 113, 0.12);
  --info: #60a5fa;
  --info-muted: rgba(96, 165, 250, 0.12);

  --severity-critical: #f87171;
  --severity-high: #fb923c;
  --severity-medium: #fbbf24;
  --severity-low: #34d399;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 96px;

  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 9999px;

  --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);
  --shadow-soft: 0 24px 64px -36px rgba(0, 0, 0, 0.65);
  --shadow-glow-accent: 0 0 24px rgba(129, 140, 248, 0.18);
  --shadow-strong: var(--shadow-soft);
  --focus-ring: 0 0 0 3px rgba(129, 140, 248, 0.35);

  --font-sans: Inter, "Segoe UI", system-ui, sans-serif;
  --font-display: "Inter Display", Inter, "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", "SF Mono", monospace;
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-base: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 24px;
  --font-size-2xl: 32px;
  --font-size-3xl: 48px;
  --font-size-hero: 64px;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --leading-none: 1;
  --leading-tight: 1.25;
  --leading-snug: 1.375;
  --leading-normal: 1.5;
  --leading-body: 1.6;
  --leading-relaxed: 1.625;
  --leading-loose: 2;

  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-decelerate: cubic-bezier(0, 0, 0.2, 1);
  --ease-accelerate: cubic-bezier(0.4, 0, 1, 1);
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --duration-fast: 150ms;
  --duration-base: 250ms;
  --duration-slow: 400ms;

  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);

  --z-base: 0;
  --z-raised: 10;
  --z-dropdown: 100;
  --z-sticky: 200;
  --z-overlay: 300;
  --z-modal: 400;
  --z-toast: 1200;

  --theme-gradient: radial-gradient(circle at top center, rgba(129, 140, 248, 0.18), transparent 26%);
  --theme-gradient-secondary: radial-gradient(circle at 82% 18%, rgba(129, 140, 248, 0.08), transparent 20%);

  --fg: var(--text-primary);
  --muted: var(--text-muted);
  --border: var(--border-default);
  --bg-1: var(--bg-base);
  --bg-2: color-mix(in srgb, var(--bg-base) 72%, black 28%);
  --card: var(--bg-surface);
  --card-hover: var(--bg-elevated);
  --accent: var(--accent-primary);
  --accent-dark: var(--accent-primary-hover);
  --link: var(--accent-primary);
  --indigo: var(--accent-primary);
  --color-bg: var(--bg-base);
  --color-surface: var(--bg-surface);
  --color-surface-high: var(--bg-elevated);
  --color-border: var(--border-default);
  --color-text: var(--text-primary);
  --color-text-secondary: var(--text-secondary);
  --color-text-muted: var(--text-muted);
  --color-accent: var(--accent-primary);
  --color-accent-hover: var(--accent-primary-hover);
  --color-accent-soft: var(--accent-primary-muted);
  --color-success: var(--severity-low);
  --color-warning: var(--severity-medium);
  --color-danger: var(--severity-critical);
  --color-info: var(--accent-primary);
}

[data-theme="light"] {
  color-scheme: light;
  --bg-base: #ffffff;
  --bg-surface: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-overlay: #f1f5f9;
  --bg-scrim: rgba(148, 163, 184, 0.3);
  --border-subtle: rgba(0, 0, 0, 0.06);
  --border-default: rgba(0, 0, 0, 0.1);
  --border-emphasis: rgba(0, 0, 0, 0.16);
  --text-primary: #0a0e1a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-disabled: #94a3b8;
  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
}

html,
body {
  background-color: var(--bg-base);
  color: var(--text-primary);
}

body {
  background-image:
    var(--theme-gradient),
    var(--theme-gradient-secondary),
    linear-gradient(180deg, var(--bg-base) 0%, color-mix(in srgb, var(--bg-base) 74%, black 26%) 100%);
  background-attachment: fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: transparent;
  z-index: -1;
}
