/* ==========================================================================
   Design Tokens
   Light theme is the default (:root). Dark theme values live under
   [data-theme="dark"] — js/core/theme.js toggles the attribute.
   ========================================================================== */

:root {
  /* Colors */
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-subtle: rgba(37, 99, 235, 0.1);
  --color-success: #22c55e;
  --color-success-subtle: rgba(34, 197, 94, 0.12);
  --color-warning: #f59e0b;
  --color-warning-subtle: rgba(245, 158, 11, 0.12);
  --color-danger: #ef4444;
  --color-danger-subtle: rgba(239, 68, 68, 0.12);
  --color-info: #0ea5e9;
  --color-info-subtle: rgba(14, 165, 233, 0.12);

  --color-background: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-secondary: #f1f5f9;
  --color-border: #e5e7eb;
  --color-text-primary: #111827;
  --color-text-secondary: #6b7280;
  --color-text-muted: #94a3b8;

  /* Typography */
  --font-family-base: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  --font-size-h1: 2rem;
  --font-size-h2: 1.5rem;
  --font-size-h3: 1.125rem;
  --font-size-body: 0.9375rem;
  --font-size-small: 0.8125rem;
  --font-size-caption: 0.75rem;

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

  --line-height-base: 1.5;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-pill: 9999px;

  /* Shadows — deliberately subtle; elevation over decoration */
  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 10px rgba(15, 23, 42, 0.08);

  /* Spacing (8px grid) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
  --space-6: 40px;
  --space-7: 48px;
  --space-8: 64px;
  --space-9: 80px;
  --space-10: 96px;

  /* Transitions */
  --transition-fast: 150ms ease-in-out;
  --transition-base: 200ms ease-in-out;
  --transition-slow: 250ms ease-in-out;

  /* Layout */
  --sidebar-width-expanded: 256px;
  --sidebar-width-collapsed: 72px;
  --navbar-height: 64px;
  --container-max-width: 1600px;

  /* Grid */
  --grid-columns-desktop: 12;
  --grid-columns-tablet: 8;
  --grid-columns-mobile: 4;
  --grid-gutter: var(--space-4);
}

/* Dark theme — prepared, not yet activated */
[data-theme="dark"] {
  --color-background: #0f172a;
  --color-surface: #1e293b;
  --color-surface-secondary: #1e293b;
  --color-border: #334155;
  --color-text-primary: #f8fafc;
  --color-text-secondary: #cbd5e1;
  --color-text-muted: #94a3b8;

  --color-primary-subtle: rgba(37, 99, 235, 0.18);
  --color-success-subtle: rgba(34, 197, 94, 0.2);
  --color-warning-subtle: rgba(245, 158, 11, 0.2);
  --color-danger-subtle: rgba(239, 68, 68, 0.2);
  --color-info-subtle: rgba(14, 165, 233, 0.2);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.32);
}
