html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: linear-gradient(145deg, #0f172a 0%, #0b1220 60%, #111827 100%) !important;
  color: #e5e7eb;
}

html[data-theme="dark"] .content-section,
html[data-theme="dark"] .page-login .login-card,
html[data-theme="dark"] .page-index .server-card,
html[data-theme="dark"] .page-index .stat-card,
html[data-theme="dark"] .page-perfil .reserva-item,
html[data-theme="dark"] .page-server .table-responsive,
html[data-theme="dark"] .page-reservas #calendar {
  background: #111827 !important;
  color: #e5e7eb;
  border-color: #334155 !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

html[data-theme="dark"] .page-index .server-metric.bg-light {
  background: #1f2937 !important;
  color: #e5e7eb;
}

html[data-theme="dark"] .page-index .server-metric .progress {
  background-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .page-index .progress-bar.bg-success {
  background-color: #22c55e;
}

html[data-theme="dark"] .page-index .progress-bar.bg-warning {
  background-color: #f59e0b;
}

html[data-theme="dark"] .page-index .progress-bar.bg-danger {
  background-color: #ef4444;
}

html[data-theme="dark"] .page-index .usage-flair-free {
  color: #bbf7d0;
  background: rgba(22, 163, 84, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
}

html[data-theme="dark"] .page-index .usage-flair-busy {
  color: #fde047;
  background: rgba(245, 158, 11, 0.16);
  border-color: rgba(245, 158, 11, 0.42);
}

html[data-theme="dark"] .page-index .usage-flair-shared {
  color: #fef08a;
  background: rgba(250, 204, 21, 0.16);
  border-color: rgba(245, 158, 11, 0.35);
}

html[data-theme="dark"] .page-login .login-welcome {
  background: #0f172a;
  border-color: #334155;
}

html[data-theme="dark"] .text-muted,
html[data-theme="dark"] .form-text,
html[data-theme="dark"] .legend-note,
html[data-theme="dark"] .small.text-muted {
  color: #94a3b8 !important;
}

html[data-theme="dark"] .border-bottom,
html[data-theme="dark"] .table,
html[data-theme="dark"] .table th,
html[data-theme="dark"] .table td,
html[data-theme="dark"] hr {
  border-color: #334155 !important;
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select,
html[data-theme="dark"] textarea,
html[data-theme="dark"] input,
html[data-theme="dark"] select {
  background-color: #0f172a;
  color: #e2e8f0;
  border-color: #334155;
}

html[data-theme="dark"] .form-control::placeholder,
html[data-theme="dark"] textarea::placeholder,
html[data-theme="dark"] input::placeholder {
  color: #94a3b8;
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus,
html[data-theme="dark"] textarea:focus,
html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus {
  background-color: #0f172a;
  color: #e2e8f0;
  border-color: #5b8ec2;
  box-shadow: 0 0 0 0.15rem rgba(91, 142, 194, 0.25);
}

html[data-theme="dark"] .btn-outline-primary {
  color: #93c5fd;
  border-color: #60a5fa;
}

html[data-theme="dark"] .btn-outline-primary:hover {
  color: #0f172a;
  background: #60a5fa;
  border-color: #60a5fa;
}

html[data-theme="dark"] .btn-primary {
  background-color: #1150a1 !important;
  border-color: #1e40af !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .btn-primary:hover,
html[data-theme="dark"] .btn-primary:focus {
  background-color: #125cbe !important;
  border-color: #1e3a8a !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .btn-outline-danger {
  color: #fca5a5;
  border-color: #ef4444;
}

html[data-theme="dark"] .btn-outline-danger:hover {
  color: #111827;
  background: #ef4444;
  border-color: #ef4444;
}

html[data-theme="dark"] .alert-info {
  background: rgba(59, 130, 246, 0.14);
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.45);
}

html[data-theme="dark"] .alert-success {
  background: rgba(16, 185, 129, 0.15);
  color: #a7f3d0;
  border-color: rgba(16, 185, 129, 0.45);
}

html[data-theme="dark"] .alert-danger {
  background: rgba(239, 68, 68, 0.18);
  color: #fecaca;
  border-color: rgba(239, 68, 68, 0.45);
}

html[data-theme="dark"] .page-reservas .legend-shared {
  background-color: rgba(148, 163, 184, 0.2);
  color: #e5e7eb;
  border-color: #94a3b8;
}

html[data-theme="dark"] .page-reservas .calendar-group-filters {
  background: #0f172a;
  border-color: #334155;
}

html[data-theme="dark"] .page-reservas .calendar-group-filters .form-check-label {
  color: #cbd5e1;
}

html[data-theme="dark"] .page-reservas .form-label,
html[data-theme="dark"] .page-reservas legend,
html[data-theme="dark"] .page-reservas .fw-semibold {
  color: #dbeafe !important;
}

html[data-theme="dark"] .page-reservas .fc {
  --fc-border-color: #334155;
  --fc-page-bg-color: #111827;
  --fc-neutral-bg-color: #0f172a;
  --fc-list-event-hover-bg-color: #1f2937;
  color: #e5e7eb;
}

html[data-theme="dark"] .page-reservas .fc .fc-col-header-cell,
html[data-theme="dark"] .page-reservas .fc .fc-popover-header {
  background: #1f2937;
  color: #e5e7eb;
}

html[data-theme="dark"] .page-reservas .fc .fc-col-header-cell-cushion,
html[data-theme="dark"] .page-reservas .fc .fc-daygrid-day-number,
html[data-theme="dark"] .page-reservas .fc .fc-timegrid-slot-label-cushion,
html[data-theme="dark"] .page-reservas .fc .fc-timegrid-axis-cushion {
  color: #cbd5e1;
}

html[data-theme="dark"] .page-reservas .fc .fc-toolbar-title {
  color: #e5e7eb;
}

html[data-theme="dark"] .page-reservas .fc .fc-day-today {
  background: rgba(30, 64, 175, 0.35) !important;
  box-shadow: inset 0 0 0 2px rgba(96, 165, 250, 0.8);
}

html[data-theme="dark"] .page-reservas .fc .fc-button {
  /* background: linear-gradient(180deg, #3b82f6 0%, #1d4ed8 100%) !important; */
  background: #0b5ed7 !important;
  border-color: #1d4ed8 !important;
  color: #e5e7eb !important;
  box-shadow: none !important;
}

html[data-theme="dark"] .page-reservas .fc .fc-button:hover,
html[data-theme="dark"] .page-reservas .fc .fc-button:focus {
  /* background: linear-gradient(180deg, #2563eb 0%, #1e40af 100%) !important; */
  background: #0b5ed7 !important;
  border-color: #1e40af !important;
  color: #ffffff !important;
}

html[data-theme="dark"] .page-reservas .fc .fc-button-primary:not(:disabled).fc-button-active {
  background: #2a3c66 !important;
  border-color: #0f172a !important;
  color: #e5e7eb !important;
}

html[data-theme="dark"] .page-reservas .fc .event-exclusive {
  border-left-color: rgba(147, 197, 253, 0.95) !important;
}

html[data-theme="dark"] .page-reservas .event-badge.exclusive {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.42);
  color: #ffffff;
}

html[data-theme="dark"] .page-reservas .event-badge.shared {
  background: rgba(226, 232, 240, 0.12);
  border-color: rgba(148, 163, 184, 0.35);
  color: #e5e7eb;
}

html[data-theme="dark"] .page-reservas .fc .event-shared {
  color: #e5e7eb !important;
  border-style: dashed;
}

html[data-theme="dark"] .page-reservas .fc .server-color-0 {
  --event-solid: #115e59;
  --event-border: #0f4b45;
  --event-soft: #1e293b;
  --event-text: #e5e7eb;
}

html[data-theme="dark"] .page-reservas .fc .server-color-1 {
  --event-solid: #1d4ed8;
  --event-border: #1e40af;
  --event-soft: #1e293b;
  --event-text: #e5e7eb;
}

html[data-theme="dark"] .page-reservas .fc .server-color-2 {
  --event-solid: #7e22ce;
  --event-border: #6d28d9;
  --event-soft: #1e293b;
  --event-text: #e5e7eb;
}

html[data-theme="dark"] .page-reservas .fc .server-color-3 {
  --event-solid: #9f1239;
  --event-border: #881337;
  --event-soft: #1e293b;
  --event-text: #e5e7eb;
}

html[data-theme="dark"] .page-reservas .fc .server-color-4 {
  --event-solid: #075985;
  --event-border: #0c4a6e;
  --event-soft: #1e293b;
  --event-text: #e5e7eb;
}

html[data-theme="dark"] .page-reservas .fc .server-color-5 {
  --event-solid: #92400e;
  --event-border: #7c2d12;
  --event-soft: #1e293b;
  --event-text: #e5e7eb;
}

html[data-theme="dark"] .page-reservas .fc .server-color-6 {
  --event-solid: #3730a3;
  --event-border: #312e81;
  --event-soft: #1e293b;
  --event-text: #e5e7eb;
}

html[data-theme="dark"] .page-reservas .fc .server-color-7 {
  --event-solid: #0f4b61;
  --event-border: #0c4a6e;
  --event-soft: #1e293b;
  --event-text: #e5e7eb;
}
