/* ==============================================
   CHEFFIN RESTAURANT - SISTEMA DE CORES
   Temas: Light (Branco) e Dark (Preto)
   ============================================== */

/* ==========================================
   TEMA LIGHT (Padrão)
   ========================================== */
:root {
  /* === Cores de Background === */
  --bg-primary: #f8f9fa;
  --bg-secondary: #ffffff;
  --card-bg: #ffffff;
  --main-content-bg: #f3f4f6;
  --bg-loading: #161618;

  /* === Cores de Texto === */
  --text-primary: #333333;
  --text-secondary: #444444;
  --text-muted: #6c757d;
  --text-dark: #000000;
  --text-light: #ffffff;

  /* === Bordas e Divisores === */
  --border-color: #dee2e6;
  --border-light: rgba(0, 0, 0, 0.1);
  --border-medium: rgba(0, 0, 0, 0.2);

  /* === Sidebar === */
  --sidebar-bg: #ffffff;
  --sidebar-text: #000000;
  --sidebar-hover: rgba(0, 0, 0, 0.1);
  --sidebar-active: rgba(0, 0, 0, 0.15);
  --sidebar-border: rgba(0, 0, 0, 0.2);

  /* === Topbar === */
  --topbar-bg: #ffffff;
  --topbar-text: #000000;
  --topbar-border: rgba(0, 0, 0, 0.1);
  --topbar-shadow: transparent;

  /* === Tables === */
  --table-bg: #ffffff;
  --table-header-bg: #f1f1f1;
  --table-header-text: #444444;
  --table-border: #dee2e6;

  /* === Status Colors (Light Mode) === */
  --color-success: #28a745;
  --color-success-light: #d4edda;
  --color-success-text: #155724;
  --color-success-alt: #10b981;

  --color-danger: #dc3545;
  --color-danger-light: #f8d7da;
  --color-danger-text: #721c24;

  --color-warning: #ffc107;
  --color-warning-light: #fff3cd;
  --color-warning-text: #856404;
  --color-warning-alt: #f59e0b;

  --color-info: #17a2b8;
  --color-info-light: #d1ecf1;
  --color-info-text: #0c5460;
  --color-info-alt: #06b6d4;
  --chart-avg-line: rgba(0, 0, 0, 0.9);
  --chart-avg-line-previous: rgba(0, 0, 0, 0.6);

  --color-primary: #007bff;
  --color-primary-alt: #3b82f6;

  --color-teal: #14b8a6;
  --cheffin-blue: #4a79ff;
  --cheffin-blue-secondary: #60a5fa;
  --cheffin-blue-secondary-rgb: 96, 165, 250;
  --cheffin-color: var(--cheffin-blue);
  --cheffin-color-rgb: 74, 121, 255;

  /* === UI Específico === */
  --dropdown-item-text: #374151;
  --dropdown-item-hover: #f3f4f6;
  --google-review-bg: var(--cheffin-blue-secondary);
  --google-review-text: #ffffff;
  --google-review-button-bg: #ffffff;
  --google-review-button-text: var(--cheffin-blue-secondary);
  --google-review-button-hover: #f8f9fa;
  --logout-hover: #ef4444;
  --logout-hover-bg: rgba(239, 68, 68, 0.1);

  /* === Switch/Toggle === */
  --switch-bg: #e6e6e6;
  --switch-bg-gradient-1: #e6e6e6;
  --switch-bg-gradient-2: #ffffff;
  --switch-checked-bg-gradient-1: #2c3e50;
  --switch-checked-bg-gradient-2: #34495e;
  --switch-handle-bg: #ffffff;
  --switch-handle-gradient-1: #ffffff;
  --switch-handle-gradient-2: #f5f5f5;
  --switch-handle-checked-gradient-1: #f5f5f5;
  --switch-handle-checked-gradient-2: #e0e0e0;
  --switch-sun-color: #FFA500;
  --switch-moon-color: #FFD700;
  --switch-shadow: transparent;
  --switch-shadow-hover: transparent;
  --switch-shadow-checked: transparent;
  --switch-focus: transparent;

  /* === Shadows === */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-dropdown: none;
  --shadow-card: none;
  --shadow-tab: none;

  /* === Focus States === */
  --focus-ring: none;

  /* === Overlays and Backdrops === */
  --overlay-gradient: linear-gradient(135deg, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.1));
  --modal-backdrop: rgba(0,0,0,0.4);

  /* === Links === */
  --link-color: #007bff;
  --link-hover: #0056b3;

  /* === Badge === */
  --badge-secondary-bg: #6c757d;
  --badge-text: #ffffff;

  /* === Hover/Active States === */
  --hover-light: rgba(0, 0, 0, 0.05);
  --active-light: rgba(0, 0, 0, 0.1);

  /* === Placeholder === */
  --placeholder-color: #6c757d;
  --logo-placeholder-bg: rgba(255, 255, 255, 0.1);
  --restaurant-logo-placeholder: rgba(0, 0, 0, 0.1);

  /* === Input States === */
  --input-disabled-bg: #e9ecef;
  --input-disabled-text: #6c757d;
}

/* ==========================================
   TEMA DARK (Dark Mode)
   ========================================== */
.dark-mode,
body.dark-mode {
  /* === Cores de Background === */
  --bg-primary: #161618;
  --bg-secondary: #1d1d20;
  --card-bg: #1d1d20;
  --main-content-bg: #161618;
  --bg-loading: #161618;

  /* === Cores de Texto === */
  --text-primary: #f5f5f5;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-dark: #ffffff;
  --text-light: #ffffff;

  /* === Bordas e Divisores === */
  --border-color: #404040;
  --border-light: rgba(255, 255, 255, 0.2);
  --border-medium: rgba(255, 255, 255, 0.3);

  /* === Sidebar === */
  --sidebar-bg: #1e1e1eff;
  --sidebar-text: #ffffff;
  --sidebar-hover: rgba(255, 255, 255, 0.15);
  --sidebar-active: rgba(255, 255, 255, 0.25);
  --sidebar-border: rgba(255, 255, 255, 0.3);

  /* === Topbar === */
  --topbar-bg: #1e1e1eff;
  --topbar-text: #ffffff;
  --topbar-border: rgba(255, 255, 255, 0.2);
  --topbar-shadow: transparent;

  /* === Tables === */
  --table-bg: #1d1d20;
  --table-header-bg: #404040;
  --table-header-text: #f5f5f5;
  --table-border: #404040;

  /* === Status Colors (Dark Mode) === */
  --color-success: #10b981;
  --color-success-light: #1d4920;
  --color-success-text: #a3d977;
  --color-success-alt: #10b981;

  --color-danger: #dc3545;
  --color-danger-light: #4a1e1e;
  --color-danger-text: #ff7b7b;

  --color-warning: #f59e0b;
  --color-warning-light: #3d3319;
  --color-warning-text: #ffd700;
  --color-warning-alt: #f59e0b;

  --color-info: #06b6d4;
  --color-info-light: #1a3338;
  --color-info-text: #7dd3fc;
  --color-info-alt: #06b6d4;
  --chart-avg-line: rgba(255, 255, 255, 0.85);
  --chart-avg-line-previous: rgba(255, 255, 255, 0.55);

  --color-primary: #3b82f6;
  --color-primary-alt: #3b82f6;

  --color-teal: #14b8a6;
  --cheffin-blue: #4a79ff;
  --cheffin-blue-secondary: #60a5fa;
  --cheffin-blue-secondary-rgb: 96, 165, 250;
  --cheffin-color: var(--cheffin-blue);
  --cheffin-color-rgb: 74, 121, 255;

  /* === UI Específico === */
  --dropdown-item-text: #f5f5f5;
  --dropdown-item-hover: #404040;
  --google-review-bg: var(--cheffin-blue-secondary);
  --google-review-text: #ffffff;
  --google-review-button-bg: #ffffff;
  --google-review-button-text: var(--cheffin-blue-secondary);
  --google-review-button-hover: #f8f9fa;
  --logout-hover: #ef4444;
  --logout-hover-bg: rgba(239, 68, 68, 0.1);

  /* === Switch/Toggle === */
  --switch-bg: #2c3e50;
  --switch-bg-gradient-1: #2c3e50;
  --switch-bg-gradient-2: #34495e;
  --switch-checked-bg-gradient-1: #2c3e50;
  --switch-checked-bg-gradient-2: #34495e;
  --switch-handle-bg: #000000;
  --switch-handle-gradient-1: #f5f5f5;
  --switch-handle-gradient-2: #e0e0e0;
  --switch-handle-checked-gradient-1: #f5f5f5;
  --switch-handle-checked-gradient-2: #e0e0e0;
  --switch-sun-color: #FFA500;
  --switch-moon-color: #FFD700;
  --switch-shadow: transparent;
  --switch-shadow-hover: transparent;
  --switch-shadow-checked: transparent;
  --switch-focus: transparent;

  /* === Shadows === */
  --shadow-sm: none;
  --shadow-md: none;
  --shadow-lg: none;
  --shadow-dropdown: none;
  --shadow-card: none;
  --shadow-tab: none;

  /* === Focus States === */
  --focus-ring: none;

  /* === Overlays and Backdrops === */
  --overlay-gradient: linear-gradient(135deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.3));
  --modal-backdrop: rgba(0,0,0,0.6);

  /* === Links === */
  --link-color: var(--cheffin-blue-secondary);
  --link-hover: #93c5fd;

  /* === Badge === */
  --badge-secondary-bg: #6c757d;
  --badge-text: #ffffff;

  /* === Hover/Active States === */
  --hover-light: rgba(255, 255, 255, 0.1);
  --active-light: rgba(255, 255, 255, 0.15);

  /* === Placeholder === */
  --placeholder-color: #9ca3af;
  --logo-placeholder-bg: rgba(255, 255, 255, 0.1);
  --restaurant-logo-placeholder: rgba(255, 255, 255, 0.15);

  /* === Input States === */
  --input-disabled-bg: #4a4a4a;
  --input-disabled-text: #9ca3af;
}

/* ==========================================
   APLICAÇÃO DE CORES NOS COMPONENTES
   ========================================== */

/* Anti-FOUC (Flash of Unstyled Content) */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

*,
*::before,
*::after {
  box-shadow: none !important;
}

.card,
.shadow,
.shadow-sm,
.shadow-lg {
  box-shadow: none !important;
  filter: none !important;
}
