/**
 * Dark theme variables for the bakery management application
 * Generated from centralized color configuration
 */

.dark,
[data-theme="dark"] {
  /* === SEMANTIC COLORS === */
  
  /* Primary Colors - Warm Orange (Bakery Brand) - Adjusted for dark theme */
  --color-primary-50: #fffbeb;
  --color-primary-100: #fef3c7;
  --color-primary-200: #fde68a;
  --color-primary-300: #fcd34d;
  --color-primary-400: #fbbf24;
  --color-primary-500: #f59e0b;
  --color-primary-600: #d97706;
  --color-primary-700: #b45309;
  --color-primary-800: #92400e;
  --color-primary-900: #78350f;
  --color-primary: #f59e0b; /* Brighter for dark theme */
  --color-primary-light: #fbbf24;
  --color-primary-dark: #d97706;

  /* Secondary Colors - Professional Sage Green - Adjusted for dark theme */
  --color-secondary-50: #f0fdf4;
  --color-secondary-100: #dcfce7;
  --color-secondary-200: #bbf7d0;
  --color-secondary-300: #86efac;
  --color-secondary-400: #4ade80;
  --color-secondary-500: #22c55e;
  --color-secondary-600: #16a34a;
  --color-secondary-700: #15803d;
  --color-secondary-800: #166534;
  --color-secondary-900: #14532d;
  --color-secondary: #22c55e; /* Brighter for dark theme */
  --color-secondary-light: #4ade80;
  --color-secondary-dark: #16a34a;

  /* Success Colors - Inverted scale for dark mode */
  --color-success-50: #064e3b;
  --color-success-100: #065f46;
  --color-success-200: #047857;
  --color-success-300: #059669;
  --color-success-400: #10b981;
  --color-success-500: #10b981;
  --color-success-600: #34d399;
  --color-success-700: #6ee7b7;
  --color-success-800: #a7f3d0;
  --color-success-900: #d1fae5;
  --color-success: #22c55e; /* Brighter for dark theme */
  --color-success-light: #4ade80;
  --color-success-dark: #16a34a;

  /* Warning Colors - Inverted scale for dark mode */
  --color-warning-50: #78350f;
  --color-warning-100: #92400e;
  --color-warning-200: #b45309;
  --color-warning-300: #d97706;
  --color-warning-400: #f59e0b;
  --color-warning-500: #fbbf24;
  --color-warning-600: #fcd34d;
  --color-warning-700: #fde68a;
  --color-warning-800: #fef3c7;
  --color-warning-900: #fffbeb;
  --color-warning: #fbbf24; /* Brighter for dark theme */
  --color-warning-light: #fcd34d;
  --color-warning-dark: #f59e0b;

  /* Error Colors - Inverted scale for dark mode */
  --color-error-50: #450a0a;
  --color-error-100: #7f1d1d;
  --color-error-200: #991b1b;
  --color-error-300: #b91c1c;
  --color-error-400: #dc2626;
  --color-error-500: #ef4444;
  --color-error-600: #f87171;
  --color-error-700: #fca5a5;
  --color-error-800: #fecaca;
  --color-error-900: #fee2e2;
  --color-error: #ef4444; /* Brighter for dark theme */
  --color-error-light: #f87171;
  --color-error-dark: #dc2626;

  /* Info Colors - Adjusted for dark mode */
  --color-info-50: #172554;
  --color-info-100: #1e3a8a;
  --color-info-200: #1e40af;
  --color-info-300: #1d4ed8;
  --color-info-400: #2563eb;
  --color-info-500: #3b82f6;
  --color-info-600: #60a5fa;
  --color-info-700: #93c5fd;
  --color-info-800: #bfdbfe;
  --color-info-900: #dbeafe;
  --color-info: #60a5fa; /* Brighter blue for dark theme */
  --color-info-light: #93c5fd;
  --color-info-dark: #3b82f6;

  /* === THEME-SPECIFIC COLORS === */
  
  /* Background Colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-quaternary: #475569;
  --bg-overlay: rgba(0, 0, 0, 0.8);
  --bg-modal-backdrop: rgba(0, 0, 0, 0.75);

  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-tertiary: #94a3b8;
  --text-quaternary: #64748b;
  --text-inverse: #0f172a;
  --text-muted: #64748b;
  --text-disabled: #475569;

  /* Border Colors - Enhanced visibility for dark mode */
  --border-primary: #475569;
  --border-secondary: #64748b;
  --border-tertiary: #94a3b8;
  --border-focus: #f59e0b;
  --border-error: #ef4444;
  --border-success: #22c55e;

  /* Surface Colors */
  --surface-primary: #1e293b;
  --surface-secondary: #334155;
  --surface-tertiary: #475569;
  --surface-raised: #1e293b;
  --surface-overlay: rgba(15, 23, 42, 0.95);

  /* Input Colors */
  --input-bg: #1e293b;
  --input-border: #475569;
  --input-border-focus: #f59e0b;
  --input-border-error: #ef4444;
  --input-placeholder: #64748b;

  /* Navigation Colors */
  --nav-bg: #1e293b;
  --nav-border: #334155;
  --nav-item-hover: #334155;
  --nav-item-active: rgba(245, 158, 11, 0.2);

  /* Card Colors */
  --card-bg: #1e293b;
  --card-border: #334155;
  --card-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);

  /* === BAKERY COLORS - Adjusted for dark theme === */
  --color-sourdough: #d4a574;
  --color-wholeWheat: #a67c52;
  --color-brioche: #f4e4bc;
  --color-rye: #8b6f47;
  --color-croissant: #f5d76e;
  --color-danish: #e8b4cb;
  --color-espresso: #8b7355; /* Lighter for dark mode */
  --color-latte: #c8a882;
  --color-bread: #a0845c; /* Adjusted for dark backgrounds */
  --color-wheat: #c4a876;
  --color-flour: #d4c4b0;
  --color-butter: #e6d8a3;
  --color-chocolate: #6b3410;
  --color-vanilla: #d4c8a6;
  --color-strawberry: #d1477a;
  --color-mint: #7bc97b;
  --color-caramel: #a85a1a;
  --color-cream: #ede6a3;

  /* === CHART COLORS - Dark Mode Optimized === */
  --chart-primary: #fbbf24; /* Lighter orange for dark backgrounds */
  --chart-secondary: #0ea5e9; /* Bright blue */
  --chart-tertiary: #4ade80; /* Success green */
  --chart-quaternary: #f87171; /* Error red */
  --chart-quinary: #a78bfa; /* Purple accent */
  --chart-senary: #22d3ee; /* Cyan accent */
  --chart-septenary: #fb923c; /* Warning orange */
  --chart-octonary: #34d399; /* Deep emerald */

  /* === SHADOWS - Enhanced for dark theme === */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -2px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -4px rgba(0, 0, 0, 0.5);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 8px 10px -6px rgba(0, 0, 0, 0.6);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.3);

  /* === INTERACTIVE STATES === */
  --hover-opacity: 0.8;
  --active-opacity: 0.9;
  --disabled-opacity: 0.5;
}

/* Dark theme specific overrides */
.dark {
  color-scheme: dark;
}

/* Component-specific dark theme styles */
.dark .bg-pattern {
  background-image: 
    radial-gradient(circle at 25% 25%, rgba(245, 158, 11, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 75% 75%, rgba(34, 197, 94, 0.05) 0%, transparent 50%);
}

.dark .glass-effect {
  background: rgba(30, 41, 59, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(51, 65, 85, 0.3);
}

.dark .focus-ring:focus {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

.dark .focus-ring:focus-visible {
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.4);
}

/* Form elements in dark theme */
.dark input[type="checkbox"]:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

.dark input[type="radio"]:checked {
  background-color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Scrollbar in dark theme */
.dark ::-webkit-scrollbar-track {
  background-color: #334155;
}

.dark ::-webkit-scrollbar-thumb {
  background-color: #64748b;
}

.dark ::-webkit-scrollbar-thumb:hover {
  background-color: #94a3b8;
}

/* Interactive states */
.dark .glow-effect {
  box-shadow: 0 0 20px rgba(245, 158, 11, 0.3);
}

.dark .border-glow {
  border: 1px solid rgba(245, 158, 11, 0.5);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.2);
}

/* Dark theme image adjustments */
.dark img {
  filter: brightness(0.9) contrast(1.1);
}

.dark .logo {
  filter: invert(1) brightness(0.9);
}