/*
 * Design tokens. Light theme is the default.
 * The @media (prefers-color-scheme: dark) block re-declares the same token
 * names with dark values so the app automatically follows the user's OS
 * light/dark preference. No hardcoded theme, no manual toggle.
 */
:root {
  /* Colors — light */
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-surface-alt: #f2f4f7;
  --color-border: #e4e7ec;
  --color-border-strong: #d0d5dd;
  --color-text: #101828;
  --color-text-muted: #667085;
  --color-accent: #2563eb;
  --color-accent-hover: #1d4ed8;
  --color-accent-soft: #eff4ff;
  --color-accent-contrast: #ffffff;
  --color-danger: #b42318;
  --color-danger-soft: #fef3f2;
  --color-success: #027a48;

  /* Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 40px;
  --space-8: 48px;

  /* Typography */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Inter, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.5rem;
  --text-2xl: 2rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.06);
  --shadow-md: 0 4px 12px rgba(16, 24, 40, 0.08);
  --shadow-lg: 0 12px 32px rgba(16, 24, 40, 0.12);

  /* Layout */
  --sidebar-width: 240px;
  --header-height: 60px;
  --content-max-width: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #0b0f17;
    --color-surface: #111827;
    --color-surface-alt: #1a2332;
    --color-border: #1f2937;
    --color-border-strong: #374151;
    --color-text: #f3f4f6;
    --color-text-muted: #9ca3af;
    --color-accent: #3b82f6;
    --color-accent-hover: #60a5fa;
    --color-accent-soft: #1e293b;
    --color-accent-contrast: #ffffff;
    --color-danger: #f87171;
    --color-danger-soft: #2a1515;
    --color-success: #34d399;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.5);
  }
}
