/**
 * Modo oscuro. Se activa con html[data-banchy-theme="dark"].
 * Va después de view-comfort.css para ganar a los fondos claros con !important.
 */
html[data-banchy-theme='dark'] {
  color-scheme: dark;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;
  --primary-lighter: #1e3a8a;
  --primary-hover: #60a5fa;
  --info: #3b82f6;
  --info-light: #1e3a8a;
  --info-dark: #93c5fd;
  --success-light: #064e3b;
  --warning-light: #78350f;
  --error-light: #7f1d1d;
  --surface: #1f2937;
  --surface-50: #111827;
  --surface-100: #374151;
  --surface-200: #4b5563;
  --surface-300: #6b7280;
  --surface-glass: rgba(31, 41, 55, 0.94);
  --surface-glass-dark: rgba(17, 24, 39, 0.98);
  --bg-page: #111827;
  --bg-primary: #111827;
  --bg-secondary: #111827;
  --text-primary: #f9fafb;
  --text-secondary: #d1d5db;
  --text-tertiary: #9ca3af;
  --text-muted: #9ca3af;
  --text-white: #ffffff;
  --text-inverse: #111827;
  --border-color: #374151;
  --border-light: rgba(55, 65, 81, 0.8);
  --border-dark: #4b5563;
  --gradient-primary: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.35);
}

html[data-banchy-theme='dark'] body,
html[data-banchy-theme='dark'] body.has-presentation-bar,
html[data-banchy-theme='dark'] .page-wrapper,
html[data-banchy-theme='dark'] .main-content,
html[data-banchy-theme='dark'] .content-body-compact,
html[data-banchy-theme='dark'] .card-inner-layout,
html[data-banchy-theme='dark'] .card-content-area,
html[data-banchy-theme='dark'] .inv-page {
  background: #111827 !important;
  color: #f9fafb !important;
}

html[data-banchy-theme='dark'] .presentation-bar-bancolombia {
  background: #1f2937 !important;
  color: #f9fafb !important;
  border-bottom: 1px solid #374151 !important;
}

html[data-banchy-theme='dark'] .presentation-bar-icon-btn,
html[data-banchy-theme='dark'] .app-name,
html[data-banchy-theme='dark'] .app-subtitle,
html[data-banchy-theme='dark'] .center-name,
html[data-banchy-theme='dark'] .center-nit,
html[data-banchy-theme='dark'] .user-name,
html[data-banchy-theme='dark'] .hamburger-label {
  color: #f9fafb !important;
}

html[data-banchy-theme='dark'] .main-content-card,
html[data-banchy-theme='dark'] .card,
html[data-banchy-theme='dark'] .section-card,
html[data-banchy-theme='dark'] .response-card,
html[data-banchy-theme='dark'] .modal-content,
html[data-banchy-theme='dark'] .modal-body,
html[data-banchy-theme='dark'] .drawer,
html[data-banchy-theme='dark'] .unit-card {
  background: #1f2937 !important;
  color: #f9fafb !important;
  border-color: #374151 !important;
  box-shadow: none;
}

html[data-banchy-theme='dark'] .sidebar,
html[data-banchy-theme='dark'] .sidebar-in-card {
  background: #1f2937 !important;
  color: #f9fafb !important;
  border-color: #374151 !important;
}

html[data-banchy-theme='dark'] .sidebar-link,
html[data-banchy-theme='dark'] .sidebar-section-title {
  color: #d1d5db !important;
}

html[data-banchy-theme='dark'] input,
html[data-banchy-theme='dark'] select,
html[data-banchy-theme='dark'] textarea,
html[data-banchy-theme='dark'] .search-input {
  background: #111827 !important;
  color: #f9fafb !important;
  border: 1px solid #4b5563 !important;
}

html[data-banchy-theme='dark'] input::placeholder,
html[data-banchy-theme='dark'] textarea::placeholder {
  color: #9ca3af;
}

html[data-banchy-theme='dark'] .btn-primary {
  background: #2563eb !important;
  border-color: #2563eb !important;
  color: #ffffff !important;
}

html[data-banchy-theme='dark'] .btn-secondary,
html[data-banchy-theme='dark'] .btn-outline {
  background: #1f2937 !important;
  color: #f9fafb !important;
  border-color: #4b5563 !important;
}

html[data-banchy-theme='dark'] .table,
html[data-banchy-theme='dark'] .table th,
html[data-banchy-theme='dark'] .table td,
html[data-banchy-theme='dark'] .table tbody tr,
html[data-banchy-theme='dark'] .table-striped tbody tr:nth-child(odd) {
  background: #1f2937 !important;
  color: #f9fafb !important;
  border-color: #374151 !important;
}

html[data-banchy-theme='dark'] .tabs .tab,
html[data-banchy-theme='dark'] .tab-button,
html[data-banchy-theme='dark'] .inv-tab {
  color: #d1d5db !important;
  background: transparent !important;
  border-color: #374151 !important;
}

html[data-banchy-theme='dark'] .tabs .tab.active,
html[data-banchy-theme='dark'] .tab-button.active,
html[data-banchy-theme='dark'] .inv-tab.active {
  background: #1f2937 !important;
  color: #f9fafb !important;
}

html[data-banchy-theme='dark'] label,
html[data-banchy-theme='dark'] .form-label,
html[data-banchy-theme='dark'] .field-label,
html[data-banchy-theme='dark'] .section-head p,
html[data-banchy-theme='dark'] .empty-state-text {
  color: #d1d5db !important;
}

html[data-banchy-theme='dark'] [data-banchy-theme-toggle][aria-pressed='true'] {
  background: #2563eb !important;
  color: #ffffff !important;
  border-radius: 8px;
}
