/* Global Design Tokens - AI Advisory */

:root {
  /* Colors - Dark theme (default) */
  --bg: #0b0e12;
  --surface: #10151f;
  --elev: #0f1420;
  --border: #1c2432;
  --text: #e6edf6;
  --muted: #9bb0c7;
  
  /* Brand colors */
  --primary: #dc2626; /* Red primary for AI Advisory */
  --primary-hover: #ef4444;
  --primary-600: #b91c1c;
  --primary-rgb: 220, 38, 38;
  --accent: #7ee787;
  
  /* Status colors */
  --ok: #31c48d;
  --warn: #ffb86b;
  --error: #ff6b6b;
  
  /* Spacing */
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;
  --grid: 8px;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 4rem;
  
  /* Typography */
  --font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, Inter, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", "Ubuntu Mono", "Roboto Mono", Menlo, Monaco, Consolas, monospace;
  
  /* Font sizes */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.5rem;
  --text-5xl: 3rem;
  
  /* Font weights */
  --font-normal: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transitions */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Z-index scale */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;
}

/* Light theme */
:root[data-theme="light"] {
  --bg: #f6f8fb;
  --surface: #fff;
  --elev: #fff;
  --border: #dfe5ef;
  --text: #0f1724;
  --muted: #516076;
  --primary: #dc2626; /* Keep red primary */
  --primary-hover: #ef4444;
  --primary-600: #b91c1c;
  --accent: #0f9d58;
  --ok: #059669;
  --warn: #b45309;
  --error: #b91c1c;
  
  /* Light theme shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Media queries for responsive design */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f6f8fb;
    --surface: #fff;
    --elev: #fff;
    --border: #dfe5ef;
    --text: #0f1724;
    --muted: #516076;
    --primary: #dc2626;
    --primary-hover: #ef4444;
    --primary-600: #b91c1c;
    --accent: #0f9d58;
    --ok: #059669;
    --warn: #b45309;
    --error: #b91c1c;
  }
}

/* Utility classes for common use */
.text-primary { color: var(--primary); }
.text-muted { color: var(--muted); }
.text-error { color: var(--error); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }

.bg-primary { background-color: var(--primary); }
.bg-surface { background-color: var(--surface); }
.bg-elev { background-color: var(--elev); }

/* Focus visible utilities */
*:focus {
  outline: none;
}

*:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Selection colors */
::selection {
  background-color: rgba(var(--primary-rgb), 0.3);
  color: var(--text);
}