/* 
 * SoundSystem OS - Theme Switcher
 * El diseño base es OSCURO. Esta clase activa un modo CLARO alternativo.
 */

/* Modo Claro - Solo variables CSS, sin sobrescribir estilos específicos */
body.dark-mode {
  --bg-dark: #f0f2f5;
  --bg-card: #ffffff;
  --bg-sidebar: #ffffff;
  --text-primary: #1a1a2e;
  --text-secondary: #4a4a68;
  --border-color: #e0e0e0;
}

/* Solo los elementos que REALMENTE necesitan cambio */
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode textarea.form-control,
body.dark-mode input.form-control,
body.dark-mode .form-control.bg-dark,
body.dark-mode .form-control.text-white,
body.dark-mode input.bg-dark,
body.dark-mode textarea.bg-dark {
  background-color: #ffffff !important;
  border-color: #ced4da !important;
  color: #212529 !important;
}

body.dark-mode .form-control:disabled,
body.dark-mode .form-control[readonly],
body.dark-mode .form-select:disabled {
  background-color: #e9ecef !important;
  color: #6c757d !important;
  border-color: #ced4da !important;
}

body.dark-mode .input-group-text {
  background-color: #f8f9fa !important;
  border-color: #ced4da !important;
  color: #495057 !important;
}

body.dark-mode .border-secondary-custom {
  border-color: #dee2e6 !important;
}

body.dark-mode label,
body.dark-mode .form-label {
  color: #1a1a2e !important;
}

/* Cards en modo claro */
body.dark-mode .card.bg-dark {
  background-color: #ffffff !important;
}

body.dark-mode .card .text-white {
  color: #1a1a2e !important;
}

body.dark-mode .border-secondary {
  border-color: #dee2e6 !important;
}

/* Opciones de dropdowns/selects */
body.dark-mode .form-select option {
  background-color: #ffffff;
  color: #212529;
}

/* Texto dentro de cards en modo claro */
body.dark-mode .card-header h5,
body.dark-mode .card-header h4 {
  color: #1a1a2e !important;
}

/* ============================================
   LIGHT MODE DASHBOARD CARD STYLING (GLASSMORPHIC LIGHT)
   ============================================ */
body.dark-mode {
  --glass-bg: rgba(255, 255, 255, 0.75) !important;
  --glass-border: rgba(0, 0, 0, 0.08) !important;
}

body.dark-mode .dashboard-card {
  box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.08) !important;
}

/* Override text colors inside dashboard-card in light mode */
body.dark-mode .dashboard-card .text-white,
body.dark-mode .dashboard-card .card-title,
body.dark-mode .dashboard-card .fw-bold.text-white,
body.dark-mode .dashboard-card h4.text-white,
body.dark-mode .dashboard-card .card-header.text-white span,
body.dark-mode .dashboard-card .card-header.text-white,
body.dark-mode .dashboard-card .fw-bold {
  color: var(--text-primary) !important;
}

body.dark-mode .dashboard-card .text-white-50,
body.dark-mode .dashboard-card .fw-semibold.text-white-50,
body.dark-mode .dashboard-card .text-muted,
body.dark-mode .dashboard-card small.text-muted {
  color: var(--text-secondary) !important;
}

/* Gradient Dashboard Title in Light Mode */
body.dark-mode .dashboard-title {
  background: linear-gradient(135deg, var(--text-primary) 30%, #0066ff 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

/* Outline light buttons in light mode */
body.dark-mode .btn-outline-light {
  border-color: #dee2e6 !important;
  color: var(--text-primary) !important;
}
body.dark-mode .btn-outline-light:hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
  color: var(--primary-accent) !important;
}

/* Custom list items inside dashboard cards in light mode */
body.dark-mode .premium-list-item {
  border-bottom-color: rgba(0, 0, 0, 0.06) !important;
}

/* Table styling overrides inside dashboard cards in light mode */
body.dark-mode .premium-table th {
  background: rgba(0, 0, 0, 0.02) !important;
  border-bottom-color: rgba(0, 0, 0, 0.08) !important;
}

body.dark-mode .premium-table td {
  border-bottom-color: rgba(0, 0, 0, 0.05) !important;
}

body.dark-mode .premium-table tbody tr:hover td {
  background: rgba(0, 0, 0, 0.02) !important;
}

/* ============================================
   GLOBAL TABLES STYLE (LIGHT MODE OVERRIDES)
   ============================================ */
body.dark-mode .table,
body.dark-mode .table td,
body.dark-mode .table th,
body.dark-mode .table tbody tr,
body.dark-mode .table tbody tr td,
body.dark-mode .table tbody tr td div,
body.dark-mode .table tbody tr td span,
body.dark-mode .table tbody tr td small {
  color: var(--text-primary) !important;
  background-color: transparent !important;
}

body.dark-mode .table thead th,
body.dark-mode .table thead tr th {
  color: var(--text-secondary) !important;
  background-color: rgba(0, 0, 0, 0.02) !important;
  border-bottom-color: var(--border-color) !important;
}

/* Table Hover in Light Mode */
body.dark-mode .table-hover tbody tr:hover,
body.dark-mode .table-hover tbody tr:hover td,
body.dark-mode .table-hover tbody tr:hover td div,
body.dark-mode .table-hover tbody tr:hover td span,
body.dark-mode .table-hover tbody tr:hover td small {
  background-color: rgba(0, 0, 0, 0.04) !important;
  color: var(--text-primary) !important;
}

body.dark-mode .table td a {
  color: var(--primary-accent) !important;
}

body.dark-mode .table td a:hover {
  color: var(--secondary-accent) !important;
}

/* Table Card Backgrounds in Light Mode */
body.dark-mode .card.shadow {
  background-color: var(--bg-card) !important;
  border: 1px solid var(--border-color) !important;
  box-shadow: var(--shadow-sm) !important;
}

body.dark-mode .card.shadow .card-body {
  background-color: transparent !important;
}
