/* ===========================
   CSS Custom Properties (Theme System)
=========================== */
:root {
  /* Light Theme Colors */
  --bg-primary: #fff;
  --bg-secondary: #F6F8FD;
  --bg-tertiary: #f9fafb;
  --bg-quaternary: #f3f4f6;
  --bg-lighter: #f8fafc;
  --bg-light-gray: #f8f9fa;
  --bg-hover: #F9FAFB;
  --bg-overlay: rgba(161, 65, 65, 0.8);
  --chart-bg: var(--bg-primary);  /* Charts match primary backgrounds by default */
  
  /* Container-specific chart backgrounds for automatic inheritance */
  --chart-bg-primary: var(--bg-primary);    /* Charts in primary containers */
  --chart-bg-secondary: var(--bg-secondary); /* Charts in secondary containers */
  
  --text-primary: #333;
  --text-secondary: #222;
  --text-tertiary: #212124;
  --text-muted: #4A4A4A;
  --text-light: #b464ff;
  --text-dark: #1a202c;
  --text-semi-dark: #2d3748;
  --text-medium: #4a5568;
  --text-gray: #555555;
  --text-slate: #64748b;
  --text-ui-muted: #6c757d;
  
  --border-primary: #D3D3D3;
  --border-secondary: #ddd;
  --border-light: #A6A6A6;
  --border-ui: #e2e8f0;
  --border-dashed: #E5E7EB;
  
  --shadow-light: rgba(0,0,0,0.1);
  --shadow-medium: rgba(0,0,0,0.3);
  
  /* Brand Colors */
  --brand-purple: #b464ff;
  --brand-purple-dark: #be4afc;
  --brand-purple-hover: #a13ad8;
  --brand-purple-light: #ebd4ff;
  --brand-purple-active: rgb(180, 41, 255);
  --brand-green: #19c58c;
  --brand-green-hover: #68d2af;
  --brand-red: #fc4a4a;
  --brand-red-hover: rgb(255, 100, 100);
  --brand-yellow: #f6ce2a;
  --brand-purple-alt: hwb(279 29% 1%);
  --brand-purple-alt-hover: rgb(180, 100, 255);
  
  /* Additional Common Colors */
  --white: #fff;
  --success-green: #22C55E;
  --error-red: #EF4444;
  --warning-yellow: #F59E0B;
  --info-blue: #3B82F6;
  --gray-100: #f8f9fa;
  --gray-200: #E5E7EB;
  --gray-300: #D3D3D3;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-600: #4A4A4A;
  --gray-700: #374151;
  --gray-800: #1F2937;
  --gray-900: #111827;
  
  /* Specific Use Colors */
  --table-header: #f1d6ff;
  --gradient-primary: linear-gradient(135deg, #f5eeff 0%, #e6d4ff 100%);
  --gradient-secondary: linear-gradient(135deg, #c04bff 0%, #a429ff 100%);
  
  /* AG Grid Confidence Highlighting */
  --confidence-low-bg: #FFDDD6;  /* Pale red for low confidence */
  --confidence-medium-bg: #FFF1D6;  /* Pale yellow for medium confidence */
  
  /* Chart/Data Colors */
  --chart-purple: #6f42c1;
  --chart-orange: #ff6b35;
  --chart-blue: #007bff;
  --chart-amber: #f59e0b;
  --chart-violet: #8b5cf6;
  --chart-cyan: #06b6d4;
  --chart-indigo: #6366f1;
  --chart-pink: #ec4899;
  --chart-green: #10b981;
  --chart-red: #ef4444;
  --chart-lime: #84cc16;
  --chart-slate: #64748b;
  
  /* Hover/Tooltip Colors */
  --hover-bg: rgba(255, 255, 255, 0.95);
  --hover-border: #e2e8f0;
  
  /* ===========================
     Spacing Scale (8px base grid)
  ============================ */
  --spacing-xs: 0.25rem;    /* 4px - Tight spacing */
  --spacing-sm: 0.5rem;     /* 8px - Compact elements */
  --spacing-md: 0.75rem;    /* 12px - Default spacing */
  --spacing-lg: 1rem;       /* 16px - Cards, sections */
  --spacing-xl: 1.5rem;     /* 24px - Page sections */
  --spacing-2xl: 2rem;      /* 32px - Major sections */
  --spacing-3xl: 2.5rem;    /* 40px - Large sections */
  --spacing-4xl: 3.75rem;   /* 60px - Extra large sections */
  
  /* ===========================
     Font Family (single source of truth for app typography)
  ============================ */
  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  /* ===========================
     Typography Scale (rem-based)
  ============================ */
  --font-size-xs: 0.75rem;      /* 12px */
  --font-size-sm: 0.875rem;     /* 14px */
  --font-size-base: 1rem;       /* 16px */
  --font-size-lg: 1.125rem;     /* 18px */
  --font-size-xl: 1.25rem;      /* 20px */
  --font-size-2xl: 1.5rem;      /* 24px */
  --font-size-3xl: 2rem;        /* 32px */
  --font-size-4xl: 2.25rem;     /* 36px */
  
  /* ===========================
     Font Weights
  ============================ */
  --font-weight-normal: 400;
  --font-weight-medium: 600;
  --font-weight-bold: 700;
  
  /* ===========================
     Modal System Variables
  ============================ */
  --modal-border-radius: 12px;
  --modal-padding: 24px;
  --modal-header-padding: 20px 30px;
  --modal-body-padding: 24px;
  --modal-footer-padding: 20px 30px;
  --modal-backdrop-opacity: 0.5;
  --modal-animation-duration: 0.3s;
}

/* Dark Theme Colors */
[data-theme="dark"] {
  /* Dark backgrounds - Navy-based for warmth and reduced eye strain */
  --bg-primary: #1a1d2e;
  --bg-secondary: #13161f;
  --bg-tertiary: #252938;
  --bg-quaternary: #2d3142;
  --bg-lighter: #1e2238;
  --bg-light-gray: #252938;
  --bg-hover: #2a2d3e;
  --bg-overlay: rgba(0, 0, 0, 0.9);
  --chart-bg: #1a1d2e;  /* Charts match primary backgrounds */
  
  /* Container-specific chart backgrounds for automatic inheritance */
  --chart-bg-primary: #1a1d2e;    /* Charts in primary containers */
  --chart-bg-secondary: #13161f; /* Charts in secondary containers */
  
  /* Text colors - Light for readability on dark backgrounds */
  --text-primary: #e8eaed;
  --text-secondary: #bdc1c6;
  --text-tertiary: #9aa0a6;
  --text-muted: #80868b;
  --text-light: #c084fc;
  --text-dark: #e8eaed;
  --text-semi-dark: #d4d6da;
  --text-medium: #bdc1c6;
  --text-gray: #a8aab0;
  --text-slate: #9aa0a6;
  --text-ui-muted: #9095a0;
  
  /* Borders - Subtle but visible on dark backgrounds */
  --border-primary: #3d4153;
  --border-secondary: #484d5e;
  --border-light: #505565;
  --border-ui: #3d4153;
  --border-dashed: #3d4153;
  
  /* Shadows - Deeper for dark theme */
  --shadow-light: rgba(0, 0, 0, 0.3);
  --shadow-medium: rgba(0, 0, 0, 0.5);
  
  /* Brand Colors - Brighter and more saturated for dark theme */
  --brand-purple: #c084fc;
  --brand-purple-dark: #a855f7;
  --brand-purple-hover: #d8b4fe;
  --brand-purple-light: #2d1b45;
  --brand-purple-active: #c084fc;
  --brand-green: #34d399;
  --brand-green-hover: #6ee7b7;
  --brand-red: #f87171;
  --brand-red-hover: #fca5a5;
  --brand-yellow: #fbbf24;
  --brand-purple-alt: #9d4edd;
  --brand-purple-alt-hover: #b565f0;
  
  /* Additional Common Colors - Dark Theme */
  --white: #1a1d2e;
  --success-green: #34d399;
  --error-red: #f87171;
  --warning-yellow: #fbbf24;
  --info-blue: #60a5fa;
  --gray-100: #2a2d3e;
  --gray-200: #3d4153;
  --gray-300: #484d5e;
  --gray-400: #6b7280;
  --gray-500: #9ca3af;
  --gray-600: #d1d5db;
  --gray-700: #e5e7eb;
  --gray-800: #f3f4f6;
  --gray-900: #f9fafb;
  
  /* Specific Use Colors - Dark Theme */
  --table-header: #4c3d5c;  /* Purple for description column to match light mode */
  --gradient-primary: linear-gradient(135deg, #1a1d2e 0%, #252938 100%);
  --gradient-secondary: linear-gradient(135deg, #9d4edd 0%, #7c3aed 100%);
  
  /* AG Grid Confidence Highlighting - Dark Theme */
  --confidence-low-bg: #4A2C2C;  /* Dark red for low confidence */
  --confidence-medium-bg: #4A3F2C;  /* Dark yellow/amber for medium confidence */
  
  /* Chart/Data Colors - Dark Theme - Brighter to pop on dark backgrounds */
  --chart-purple: #a78bfa;
  --chart-orange: #fb923c;
  --chart-blue: #60a5fa;
  --chart-amber: #fbbf24;
  --chart-violet: #c084fc;
  --chart-cyan: #22d3ee;
  --chart-indigo: #818cf8;
  --chart-pink: #f472b6;
  --chart-green: #34d399;
  --chart-red: #f87171;
  --chart-lime: #a3e635;
  --chart-slate: #94a3b8;
  
  /* Hover/Tooltip Colors - Dark Theme */
  --hover-bg: rgba(26, 29, 46, 0.95);
  --hover-border: #3d4153;
  
  /* Spacing and Typography inherit from :root (same values for both themes) */
} 