/**
 * ═══════════════════════════════════════════════════════════════
 * ILLUMINATE AI - Unified Theme (Canonical Color System)
 * All pages should import this for consistent styling
 * ═══════════════════════════════════════════════════════════════
 */

:root {
  /* Primary Accent - Indigo Blue */
  --accent: #5c62fc;
  --accent-hover: #4f55e0;
  --accent-glow: rgba(92, 98, 252, 0.35);
  --accent-light: rgba(92, 98, 252, 0.15);
  
  /* Secondary Accent - Purple */
  --accent-2: #9d50ff;
  --accent-2-hover: #8a47e6;
  --accent-2-glow: rgba(157, 80, 255, 0.35);
  --secondary-light: rgba(157, 80, 255, 0.15);
  --secondary: var(--accent-2);
  --secondary-hover: var(--accent-2-hover);
  
  /* Gradient */
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --accent-gradient-hover: linear-gradient(135deg, #4f46e5 0%, #9333ea 100%);
  --gradient-primary: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.08) 100%);
  --gradient-card-hover: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
  --gradient-border: linear-gradient(135deg, #6366f1 0%, rgba(255, 255, 255, 0.1) 50%, #a855f7 100%);
  
  /* Dark Theme Backgrounds - Ultra Premium Slate */
  --bg: #05050A;
  --bg-secondary: #0A0A10;
  --surface: #12121A;
  --surface-2: #1A1A24;
  --surface-3: #222230;
  
  /* Text Colors */
  --text-main: #fcfcfc;
  --text-dim: #9ca3af;
  --text-muted: #4b5563;
  
  /* Status Colors */
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --success-light: rgba(16, 185, 129, 0.15);
  --warning: #f59e0b;
  --warning-glow: rgba(245, 158, 11, 0.2);
  --warning-light: rgba(245, 158, 11, 0.15);
  --error: #ef4444;
  --error-glow: rgba(239, 68, 68, 0.2);
  --error-light: rgba(239, 68, 68, 0.15);
  --info: #3b82f6;
  --info-glow: rgba(59, 130, 246, 0.2);
  --info-light: rgba(59, 130, 246, 0.15);
  
  /* Borders */
  --border: rgba(255, 255, 255, 0.07);
  --border-strong: rgba(255, 255, 255, 0.12);
  
  /* Typography */
  --font-display: 'Clash Display', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Satoshi', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'SF Mono', 'Consolas', monospace;
  
  /* Transitions */
  --transition: cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: 150ms var(--transition);
  --transition-normal: 300ms var(--transition);
  --transition-slow: 500ms var(--transition);
  
  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-2xl: 32px;
  --radius-full: 9999px;
  
  /* Shadows - Deeply Layered */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.4), 0 1px 2px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.5), 0 2px 4px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.6), 0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 24px 64px rgba(0, 0, 0, 0.8), 0 8px 24px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 40px var(--accent-glow), 0 0 20px var(--accent-light);
  
  /* Layout */
  --nav-height: 72px;
  --sidebar-width: 280px;
  --sidebar-collapsed: 80px;
  
  /* Z-Index */
  --z-dropdown: 50;
  --z-modal: 100;
  --z-toast: 150;
  --z-tooltip: 200;
  --z-overlay: 300;
  
  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  
  /* Glass Effect Variables - Premium Frosted */
  --glass: rgba(255, 255, 255, 0.02);
  --glass-bg: rgba(18, 18, 26, 0.7);
  --glass-bg-strong: rgba(26, 26, 36, 0.85);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(255, 255, 255, 0.15);
  --glass-blur: 24px;
  
  /* Backward Compatibility Aliases */
  --primary: var(--accent);
  --primary-glow: var(--accent-glow);
  --primary-light: var(--accent-light);
  --primary-hover: var(--accent-hover);
  --secondary: var(--accent-2);
  --secondary-glow: var(--accent-2-glow);
  --text-primary: var(--text-main);
  --text-secondary: var(--text-dim);
  --text-tertiary: var(--text-muted);
  --surface-variant: var(--surface-2);
  --bg-primary: var(--bg);
  --bg-card: var(--surface);
  --bg-card-solid: var(--surface);
  --border-light: #27272a;
  --sidebar-collapsed-width: 80px;
  
  /* Skeleton Colors - Dark (default) */
  --skeleton-base: #1a1a1a;
  --skeleton-highlight: #252525;
}

/* Light Theme */
[data-theme="light"] {
  --bg: #f5f7fa;
  --bg-secondary: #ffffff;
  --surface: #ffffff;
  --surface-2: #f0f2f5;
  --surface-3: #e4e7eb;
  
  --text-main: #0f172a;
  --text-dim: #475569;
  --text-muted: #94a3b8;
  
  --accent: #4f46e5;
  --accent-hover: #4338ca;
  --accent-glow: rgba(79, 70, 229, 0.2);
  --accent-2: #7c3aed;
  --secondary-light: rgba(124, 58, 237, 0.15);
  --secondary: var(--accent-2);
  
  /* Gradients - Light Theme */
  --gradient-primary: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  --gradient-subtle: linear-gradient(135deg, rgba(79, 70, 229, 0.06) 0%, rgba(124, 58, 237, 0.03) 100%);
  --gradient-card-hover: linear-gradient(135deg, rgba(79, 70, 229, 0.04) 0%, transparent 100%);
  --gradient-shimmer: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.15) 50%, transparent 100%);
  --gradient-border: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #4f46e5 100%);
  
  --border: rgba(0, 0, 0, 0.07);
  --border-strong: rgba(0, 0, 0, 0.12);
  --border-light: #F1F5F9;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.16);
  
  --success-light: rgba(16, 185, 129, 0.1);
  --error-light: rgba(239, 68, 68, 0.1);
  --info-light: rgba(59, 130, 246, 0.1);
  --warning-light: rgba(245, 158, 11, 0.1);
  
  /* Glass Effect Variables - Light */
  --glass: rgba(255, 255, 255, 0.5);
  --glass-bg: rgba(255, 255, 255, 0.95);
  --glass-bg-strong: rgba(255, 255, 255, 0.98);
  --glass-border: rgba(0, 0, 0, 0.08);
  --glass-border-hover: rgba(0, 0, 0, 0.12);
  --glass-blur: 16px;
  
  /* Skeleton Colors - Light */
  --skeleton-base: #e5e7eb;
  --skeleton-highlight: #f3f4f6;
}

/* Global Reset */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  background-color: var(--bg);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

/* Noise Overlay */
.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)"/%3E%3C/svg%3E');
}

.noise-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url('data:image/svg+xml;utf8,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23n)"/%3E%3C/svg%3E');
}
