/* CSS Variables for Light and Dark Themes - Shared across entire platform */

:root {
  /* Light theme variables - Modern Neutral Palette */
  --bg-primary: #fff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-accent: #e2e8f0;
  --bg-card: #f8fafc;
  --bg-modal: #fff;
  --bg-sidebar: #1e293b;
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #3730a3;
  --text-inverse: #fff;
  --text-muted: #64748b;
  --border-color: #e2e8f0;
  --border-light: #cbd5e1;
  --border-accent: #94a3b8;
  --primary-color: #3730a3;
  --primary-hover: #312e81;
  --primary-light: rgb(55 48 163 / 10%);
  --secondary-color: #6366f1;
  /* Focus indicators - STANDARD: Use border-color change for clean focus */
  --focus-border: var(--primary-color);
  --focus-bg: var(--bg-primary);
  --success-color: #059669;
  --success-hover: #047857;
  --success-bg: #d1fae5;
  --success-indicator: #22c55e;
  --warning-color: #92400e;
  --warning-bg: #fef3c7;
  --warning-border: #f59e0b;
  --warning-text: #92400e;
  --info-color: #2563eb;
  --info-bg: #dbeafe;
  --error-color: #dc2626;
  --error-bg: #fef2f2;
  --error-border: #fecaca;
  --error-hover: #c82333;
  --error-text: #991b1b;
  --gray-bg: #f1f5f9;
  --gray-text: #475569;
  --gray-hover: #e2e8f0;

  /* Status colors */
  --status-not-started: #6b7280;
  --status-not-started-bg: #f3f4f6;
  --status-planning: #3b82f6;
  --status-planning-bg: #dbeafe;
  --status-in-progress: #f59e0b;
  --status-in-progress-bg: #fef3c7;
  --status-paused: #ef4444;
  --status-paused-bg: #fee2e2;
  --status-completed: #10b981;
  --status-completed-bg: #d1fae5;
  --status-cancelled: #6b7280;
  --status-cancelled-bg: #f3f4f6;
  --status-launched: #8b5cf6;
  --status-launched-bg: #ede9fe;
  --hover-bg: rgb(55 48 163 / 10%);
  --shadow: rgb(15 23 42 / 10%);
  --shadow-hover: rgb(15 23 42 / 15%);
  --shadow-dropdown: 0 20px 25px -5px rgb(0 0 0 / 10%), 0 10px 10px -5px rgb(0 0 0 / 4%);
  --modal-overlay: rgb(0 0 0 / 50%);

  --overlay-highlight: rgb(255 255 255 / 10%);
  --overlay-highlight-dark: rgb(255 255 255 / 3%);

  /* Info banner colors */
  --info-bg: #dbeafe;
  --info-border: #60a5fa;
  --info-text: #1e3a8a;
  
  /* Avatar styles */
  --border-avatar: rgb(255 255 255 / 20%);
  --border-avatar-hover: rgb(255 255 255 / 40%);
  --gradient-avatar: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --text-avatar: #fff;
  --focus-ring-avatar: 0 0 0 3px rgb(255 255 255 / 30%);
  
  /* Chip styles */
  --text-chip-muted: rgb(255 255 255 / 80%);
  --bg-chip-hover: rgb(255 255 255 / 20%);
  
  /* Chip styles */
  --text-chip-muted: rgb(255 255 255 / 80%);
  --bg-chip-hover: rgb(255 255 255 / 20%);

  /* Legacy variable aliases for backward compatibility */
  --background-color: var(--bg-primary);
  --background-secondary: var(--bg-secondary);
  --text-color: var(--text-primary);
  --error-background: var(--error-bg);
  --surface-color: var(--bg-card);
  --surface-secondary: var(--bg-secondary);

  /* Spacing Scale
   * xs: 0.25rem (4px)
   * sm: 0.5rem (8px)
   * md: 1rem (16px)
   * lg: 1.5rem (24px)
   * xl: 2rem (32px)
   * 2xl: 3rem (48px)
   */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Border Radius Scale */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;

  /* Scrollbar */
  --scrollbar-width: 8px;
  --scrollbar-border-radius: var(--border-radius-sm);

  /* Typography Scale
   * 2xs: 0.625rem (10px)
   * xs: 0.75rem (12px)
   * sm: 0.875rem (14px)
   * md: 1rem (16px)
   * lg: 1.125rem (18px)
   * xl: 1.25rem (20px)
   * 2xl: 1.5rem (24px)
   * 3xl: 2rem (32px)
   * 4xl: 2.5rem (40px)
   */
  --font-size-2xs: 0.625rem;
  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-md: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 2rem;
  --font-size-4xl: 2.5rem;

  /* Font Weights
   * normal: 400
   * medium: 500
   * semibold: 600
   * bold: 700
   */
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  /* Font Families */
  --font-family-sans: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-family-mono: ui-monospace, "SF Mono", "Cascadia Mono", "Segoe UI Mono", Menlo, Monaco, Consolas, "Courier New", monospace;
}

[data-theme="dark"] {
  /* Dark theme variables - Professional Dark Palette */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-accent: #475569;
  --bg-card: #1e293b;
  --bg-modal: #0f172a;
  --bg-sidebar: #0f172a;
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --text-tertiary: #818cf8;
  --text-inverse: #fff;
  --text-muted: #94a3b8;
  --border-color: #334155;
  --border-light: #475569;
  --border-accent: #64748b;
  --primary-color: #818cf8;
  --primary-hover: #6366f1;
  --primary-light: rgb(129 140 248 / 10%);
  --secondary-color: #4f46e5;
  /* Focus indicators - STANDARD: Use border-color change for clean focus */
  --focus-border: var(--primary-color);
  --focus-bg: var(--bg-primary);
  --success-color: #10b981;
  --success-hover: #059669;
  --success-bg: #1f2937;
  --success-indicator: #22c55e;
  --info-color: #60a5fa;
  --info-bg: #1e3a8a;
  --warning-color: #f59e0b;
  --warning-bg: #374151;
  --warning-border: #f59e0b;
  --warning-text: #fbbf24;
  --error-color: #f87171;
  --error-bg: #1f2937;
  --error-border: #374151;
  --error-hover: #ef4444;
  --error-text: #fca5a5;
  --gray-bg: #374151;
  --gray-text: #d1d5db;
  --gray-hover: #4b5563;

  /* Status colors */
  --status-not-started: #9ca3af;
  --status-not-started-bg: #374151;
  --status-planning: #60a5fa;
  --status-planning-bg: #1e3a8a;
  --status-in-progress: #fbbf24;
  --status-in-progress-bg: #78350f;
  --status-paused: #f87171;
  --status-paused-bg: #7f1d1d;
  --status-completed: #34d399;
  --status-completed-bg: #064e3b;
  --status-cancelled: #9ca3af;
  --status-cancelled-bg: #374151;
  --status-launched: #a78bfa;
  --status-launched-bg: #4c1d95;
  --hover-bg: rgb(129 140 248 / 10%);
  --shadow: rgb(0 0 0 / 25%);
  --shadow-hover: rgb(0 0 0 / 35%);
  --shadow-dropdown: 0 20px 25px -5px rgb(0 0 0 / 40%), 0 10px 10px -5px rgb(0 0 0 / 20%);
  --modal-overlay: rgb(0 0 0 / 75%);

  /* Background overlay effects */
  --overlay-highlight: rgb(255 255 255 / 3%);
  --overlay-highlight-dark: rgb(255 255 255 / 1%);

  /* Info banner colors */
  --info-bg: #1e3a8a;
  --info-border: #60a5fa;
  --info-text: #dbeafe;
  
  /* Avatar styles */
  --border-avatar: rgb(255 255 255 / 20%);
  --border-avatar-hover: rgb(255 255 255 / 40%);
  --gradient-avatar: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --text-avatar: #fff;
  --focus-ring-avatar: 0 0 0 3px rgb(255 255 255 / 30%);

  /* Legacy variable aliases for backward compatibility */
  --background-color: var(--bg-primary);
  --background-secondary: var(--bg-secondary);
  --text-color: var(--text-primary);
  --error-background: var(--error-bg);
  --surface-color: var(--bg-card);
  --surface-secondary: var(--bg-secondary);

  /* Spacing Scale (same as light theme) */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Border Radius Scale (same as light theme) */
  --border-radius-sm: 4px;
  --border-radius-md: 8px;
  --border-radius-lg: 12px;
  --border-radius-xl: 16px;
}

/* Enhanced flash prevention */
html {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Smooth transitions for theme changes - only when theme is loaded */
body.theme-loaded * {
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

/* Apply theme colors to body */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  margin: 0;
  font-family: var(--font-family-sans);
  line-height: 1.5;
  font-weight: 400;
  min-height: 100vh;
}

/* Ensure root div takes full height */
#root {
  min-height: 100vh;
  background-color: var(--bg-primary);
}

 