/* ========================================================
   Design Tokens — CSS custom properties for the entire app.

   Usage: var(--c-bg), var(--c-accent), var(--radius), etc.
   ======================================================== */

:root {
  /* Colors — Surface */
  --c-bg: #f8f9fb;
  --c-surface: #ffffff;
  --c-surface-hover: #f3f4f6;
  --c-surface-active: #eef2ff;
  --c-border: #e8ebf0;
  --c-border-light: #f0f0f0;

  /* Colors — Text */
  --c-text: #1a1d23;
  --c-text-secondary: #6b7280;
  --c-text-tertiary: #9ca3af;
  --c-text-inverse: #ffffff;

  /* Colors — Accent */
  --c-accent: #4f46e5;
  --c-accent-hover: #4338ca;
  --c-accent-light: #eef2ff;
  --c-accent-border: #c7d2fe;

  /* Colors — Semantic */
  --c-success: #22c55e;
  --c-success-light: #dcfce7;
  --c-success-border: #bbf7d0;
  --c-warning: #f59e0b;
  --c-warning-light: #fef3c7;
  --c-warning-border: #fde68a;
  --c-error: #dc2626;
  --c-error-light: #fee2e2;
  --c-error-border: #fecaca;
  --c-info: #3b82f6;
  --c-info-light: #dbeafe;
  --c-info-border: #bfdbfe;

  /* Colors — Bubbles */
  --c-user-bubble: #4f46e5;
  --c-user-text: #ffffff;

  /* Colors — Code */
  --c-code-bg: rgba(0, 0, 0, 0.06);
  --c-code-user-bg: rgba(255, 255, 255, 0.15);
  --c-pre-bg: #f5f5f5;
  --c-pre-user-bg: rgba(0, 0, 0, 0.2);

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "Cascadia Code", Consolas, monospace;
  --font-size-xs: 11px;
  --font-size-sm: 12px;
  --font-size-base: 14px;
  --font-size-lg: 16px;
  --font-size-xl: 18px;
  --font-size-2xl: 20px;

  /* Spacing */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 12px;
  --spacing-lg: 16px;
  --spacing-xl: 20px;
  --spacing-2xl: 24px;

  /* Borders */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-full: 50%;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.15);

  /* Layout */
  --sidebar-w: 260px;
  --topbar-h: 56px;

  /* Transitions */
  --transition-fast: 0.15s;
  --transition-normal: 0.2s;

  /* Z-indices */
  --z-sidebar: 10;
  --z-topbar: 20;
  --z-modal: 1000;
  --z-toast: 1100;

  /* Scrollbar */
  --scrollbar-w: 5px;
  --scrollbar-thumb: #d1d5db;
}

/* Dark theme overrides */
[data-theme="dark"] {
  --c-bg: #0f1117;
  --c-surface: #1a1d27;
  --c-surface-hover: #242836;
  --c-surface-active: #2a2e3f;
  --c-border: #2a2e3f;
  --c-border-light: #1f2230;
  --c-text: #e5e7eb;
  --c-text-secondary: #9ca3af;
  --c-text-tertiary: #6b7280;
  --c-accent-light: #1e1b4b;
  --c-accent-border: #3730a3;
  --c-code-bg: rgba(255, 255, 255, 0.08);
  --c-pre-bg: #1a1d27;
  --c-user-bubble: #6366f1;
}
