/* Custom button styles for resultados page and others */
.btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 120px;
  height: 38px; /* match typical bootstrap btn height */
  padding: 0 14px;
  border-radius: 6px; /* consistent rounding */
  white-space: nowrap;
}
.btn-action i[class^="ri-"] {
  font-size: 1rem;
  line-height: 1;
}

/* Active visual for date preset buttons */
.btnPreset.active {
  color: #fff !important;
  background-color: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
}

/* Ensure size consistency when using btn-sm or other variants accidentally */
.btn-action.btn-sm {
  height: 38px;
  padding: 0 14px;
  font-size: 1rem;
}

/* Small spacing utility for inline forms next to button groups */
.inline-form {
  display: inline;
}

/* Historial admin: toolbar de acciones (eliminar) */
.hist-actions-toolbar { gap: .5rem; flex-wrap: nowrap; white-space: nowrap; }
.hist-actions-toolbar .input-group { width: auto; flex: 0 0 auto; }
.hist-actions-toolbar .input-group-text,
.hist-actions-toolbar .form-control,
.hist-actions-toolbar .btn {
  height: 42px;
  line-height: 1.25;
}
.hist-actions-toolbar .form-control {
  padding-top: .375rem;
  padding-bottom: .375rem;
}
@media (max-width: 575.98px) {
  .hist-actions-toolbar { flex-direction: column; align-items: stretch; }
  .hist-actions-toolbar .input-group { width: 100%; }
  .hist-actions-toolbar .btn { width: 100%; }
}

/* Selector de temas (DOCX): destacar etiquetas/grupos */
.select-topics optgroup { font-weight: 600; color: #495057; }
.select-topics option.group-header[disabled] {
  background: #eef4ff; /* suave azul */
  color: #0d6efd;      /* primary */
  font-weight: 700;
}

html {
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
body,
button,
input,
select,
textarea,
.btn,
.form-control,
.nav,
.navbar,
.dropdown-menu,
.card,
.table,
h1, h2, h3, h4, h5, h6,
p, a, li, label, small, span, strong, em {
  font-family: inherit !important;
}
pre, code, kbd, samp {
  font-family: monospace, monospace !important;
}

/* ============================================
   MODO OSCURO - Mejoras de legibilidad
   ============================================ */

/* Explicaciones de preguntas (fondo rojo/rosa) */
[data-theme="dark"] .alert-danger,
[data-theme="dark"] .bg-danger-100,
[data-theme="dark"] .explicacion-incorrecta,
[data-theme="dark"] .feedback-incorrecto,
[data-theme="dark"] [style*="background"][style*="rgba(255"],
[data-theme="dark"] .card-body[style*="background-color: rgba(255, 200, 200"],
[data-theme="dark"] .card-body[style*="background-color: #ffcccc"],
[data-theme="dark"] .card-body[style*="background: rgba(255"] {
  background-color: rgba(220, 53, 69, 0.25) !important;
  color: #f8d7da !important;
  border-color: rgba(220, 53, 69, 0.4) !important;
}

[data-theme="dark"] .alert-danger *,
[data-theme="dark"] .explicacion-incorrecta *,
[data-theme="dark"] .feedback-incorrecto * {
  color: #f8d7da !important;
}

/* Explicaciones correctas (fondo verde) */
[data-theme="dark"] .alert-success,
[data-theme="dark"] .bg-success-100,
[data-theme="dark"] .explicacion-correcta,
[data-theme="dark"] .feedback-correcto {
  background-color: rgba(25, 135, 84, 0.25) !important;
  color: #d1e7dd !important;
  border-color: rgba(25, 135, 84, 0.4) !important;
}

[data-theme="dark"] .alert-success *,
[data-theme="dark"] .explicacion-correcta *,
[data-theme="dark"] .feedback-correcto * {
  color: #d1e7dd !important;
}

/* Cards genéricas - fondo oscuro */
[data-theme="dark"] .card {
  background-color: var(--dark-2, #1e2746) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .card-header {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .card-body {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Cards del resumen de examen */
[data-theme="dark"] .resumen-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .summary-card {
  background-color: var(--dark-2, #1e2746) !important;
  color: #fff !important;
}

[data-theme="dark"] .resumen-card *,
[data-theme="dark"] .stat-card *,
[data-theme="dark"] .summary-card * {
  color: inherit !important;
}

/* Modales */
[data-theme="dark"] .modal-content {
  background-color: var(--dark-2, #1e2746) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

[data-theme="dark"] .modal-header {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

[data-theme="dark"] .modal-header .modal-title,
[data-theme="dark"] .modal-header .btn-close {
  color: #fff !important;
  filter: invert(1) grayscale(100%) brightness(200%);
}

[data-theme="dark"] .modal-body {
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .modal-body label,
[data-theme="dark"] .modal-body p,
[data-theme="dark"] .modal-body span,
[data-theme="dark"] .modal-body h1,
[data-theme="dark"] .modal-body h2,
[data-theme="dark"] .modal-body h3,
[data-theme="dark"] .modal-body h4,
[data-theme="dark"] .modal-body h5,
[data-theme="dark"] .modal-body h6 {
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .modal-footer {
  background-color: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Inputs en modo oscuro */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}

[data-theme="dark"] .form-control::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus {
  background-color: rgba(255, 255, 255, 0.12) !important;
  border-color: var(--bs-primary) !important;
  color: #fff !important;
}

/* Simulacro mensual - cards con fondo claro */
[data-theme="dark"] .simulacro-card,
[data-theme="dark"] .simulacro-mes-card,
[data-theme="dark"] .bg-light,
[data-theme="dark"] .bg-white {
  background-color: var(--dark-2, #1e2746) !important;
  color: #fff !important;
}

[data-theme="dark"] .simulacro-card *,
[data-theme="dark"] .simulacro-mes-card * {
  color: inherit !important;
}

/* Alertas informativas */
[data-theme="dark"] .alert-info {
  background-color: rgba(13, 202, 240, 0.15) !important;
  color: #9eeaf9 !important;
  border-color: rgba(13, 202, 240, 0.3) !important;
}

[data-theme="dark"] .alert-warning {
  background-color: rgba(255, 193, 7, 0.15) !important;
  color: #fff3cd !important;
  border-color: rgba(255, 193, 7, 0.3) !important;
}

/* Tablas */
[data-theme="dark"] .table {
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .table thead th {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .table tbody td {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

[data-theme="dark"] .table-hover > tbody > tr:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Badges */
[data-theme="dark"] .badge.bg-light {
  background-color: rgba(255, 255, 255, 0.15) !important;
  color: #fff !important;
}

/* Texto secundario */
[data-theme="dark"] .text-muted,
[data-theme="dark"] .text-secondary {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Dropdown menus */
[data-theme="dark"] .dropdown-menu {
  background-color: var(--dark-2, #1e2746) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .dropdown-item {
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .dropdown-item:focus {
  background-color: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

/* Opciones de respuesta en exámenes */
[data-theme="dark"] .opcion-respuesta,
[data-theme="dark"] .respuesta-item,
[data-theme="dark"] .answer-option {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .opcion-respuesta:hover,
[data-theme="dark"] .respuesta-item:hover,
[data-theme="dark"] .answer-option:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Respuesta correcta seleccionada */
[data-theme="dark"] .opcion-correcta,
[data-theme="dark"] .respuesta-correcta,
[data-theme="dark"] .answer-correct {
  background-color: rgba(25, 135, 84, 0.3) !important;
  border-color: rgba(25, 135, 84, 0.6) !important;
  color: #d1e7dd !important;
}

/* Respuesta incorrecta seleccionada */
[data-theme="dark"] .opcion-incorrecta,
[data-theme="dark"] .respuesta-incorrecta,
[data-theme="dark"] .answer-incorrect {
  background-color: rgba(220, 53, 69, 0.3) !important;
  border-color: rgba(220, 53, 69, 0.6) !important;
  color: #f8d7da !important;
}

/* Sección de respuesta del equipo en modal */
[data-theme="dark"] .respuesta-equipo,
[data-theme="dark"] .team-response {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Gradientes claros convertidos a oscuros */
[data-theme="dark"] .bg-gradient-light,
[data-theme="dark"] .bg-lilac-100,
[data-theme="dark"] [style*="background: linear-gradient"][style*="#F7E9FF"],
[data-theme="dark"] [style*="background-color: #f0e6ff"],
[data-theme="dark"] [style*="background-color: #e6f0ff"] {
  background: linear-gradient(135deg, rgba(100, 80, 150, 0.2) 0%, rgba(60, 80, 120, 0.15) 100%) !important;
}

/* Texto en fondos claros forzados */
[data-theme="dark"] .text-dark {
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .text-black {
  color: rgba(255, 255, 255, 0.95) !important;
}

/* Bordes */
[data-theme="dark"] .border {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .border-light {
  border-color: rgba(255, 255, 255, 0.1) !important;
}

/* Scrollbar en modo oscuro */
[data-theme="dark"] ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

[data-theme="dark"] ::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================
   MODO OSCURO - Página de Resumen de Examen
   ============================================ */

/* Cards de estadísticas del resumen */
[data-theme="dark"] .stat-card,
[data-theme="dark"] .calificacion-card,
[data-theme="dark"] .mini-stat,
[data-theme="dark"] .analytics-card,
[data-theme="dark"] .info-card {
  background-color: #1e2746 !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .stat-label,
[data-theme="dark"] .stat-percentage,
[data-theme="dark"] .stat-desglose,
[data-theme="dark"] .mini-label,
[data-theme="dark"] .mini-value,
[data-theme="dark"] .info-label,
[data-theme="dark"] .info-value,
[data-theme="dark"] .analytics-title,
[data-theme="dark"] .gauge-number,
[data-theme="dark"] .gauge-label {
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .stat-circle-inner {
  background-color: #1e2746 !important;
}

[data-theme="dark"] .analytics-sub {
  color: rgba(255, 255, 255, 0.6) !important;
}

[data-theme="dark"] .analytics-list li {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="dark"] .seccion-titulo {
  color: #fff !important;
}

/* Calificacion cards con colores */
[data-theme="dark"] .calificacion-card:not(.verde):not(.naranja):not(.azul) {
  background-color: #1e2746 !important;
}

/* Info card */
[data-theme="dark"] .info-card {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .info-label {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* ============================================
   MODO OSCURO - Simulacro del Mes
   ============================================ */

[data-theme="dark"] .simulacro-mes-hero,
[data-theme="dark"] .simulacro-hero,
[data-theme="dark"] [class*="bg-lilac"],
[data-theme="dark"] [class*="bg-gradient-light"] {
  background: linear-gradient(135deg, rgba(100, 80, 150, 0.25) 0%, rgba(60, 80, 120, 0.2) 100%) !important;
  color: #fff !important;
}

[data-theme="dark"] .simulacro-mes-hero *,
[data-theme="dark"] .simulacro-hero * {
  color: inherit !important;
}

/* ============================================
   MODO OSCURO - Preguntas y Respuestas
   ============================================ */

/* Contenedor de pregunta */
[data-theme="dark"] .pregunta-card,
[data-theme="dark"] .question-card,
[data-theme="dark"] #preguntaCard {
  background-color: #1e2746 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Opciones de respuesta */
[data-theme="dark"] .respuesta-item,
[data-theme="dark"] .opcion-item,
[data-theme="dark"] [class*="respuesta-"] {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .respuesta-item:hover,
[data-theme="dark"] .opcion-item:hover {
  background-color: rgba(255, 255, 255, 0.12) !important;
}

/* Respuesta seleccionada */
[data-theme="dark"] .respuesta-item.seleccionada,
[data-theme="dark"] .opcion-item.seleccionada {
  background-color: rgba(59, 130, 246, 0.3) !important;
  border-color: rgba(59, 130, 246, 0.6) !important;
}

/* Respuesta correcta */
[data-theme="dark"] .respuesta-item.correcta,
[data-theme="dark"] .opcion-item.correcta,
[data-theme="dark"] [style*="border-color: green"],
[data-theme="dark"] [style*="border-color: #28a745"],
[data-theme="dark"] [style*="border-color: #198754"] {
  background-color: rgba(25, 135, 84, 0.25) !important;
  border-color: rgba(25, 135, 84, 0.6) !important;
  color: #d1e7dd !important;
}

/* Respuesta incorrecta */
[data-theme="dark"] .respuesta-item.incorrecta,
[data-theme="dark"] .opcion-item.incorrecta,
[data-theme="dark"] [style*="border-color: red"],
[data-theme="dark"] [style*="border-color: #dc3545"] {
  background-color: rgba(220, 53, 69, 0.25) !important;
  border-color: rgba(220, 53, 69, 0.6) !important;
  color: #f8d7da !important;
}

/* Zona de feedback/explicación */
[data-theme="dark"] .zona-feedback,
[data-theme="dark"] #feedbackZona {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Retroalimentación/Explicación de pregunta */
[data-theme="dark"] .alert-info {
  background-color: rgba(13, 110, 253, 0.2) !important;
  border-color: rgba(13, 110, 253, 0.4) !important;
  color: #cfe2ff !important;
}

[data-theme="dark"] .alert-info * {
  color: #cfe2ff !important;
}

/* Explicación incorrecta (fondo rojo/rosa) - CRÍTICO */
[data-theme="dark"] .alert-danger {
  background-color: rgba(220, 53, 69, 0.2) !important;
  border-color: rgba(220, 53, 69, 0.4) !important;
  color: #f8d7da !important;
}

[data-theme="dark"] .alert-danger * {
  color: #f8d7da !important;
}

/* Explicación correcta */
[data-theme="dark"] .alert-success {
  background-color: rgba(25, 135, 84, 0.2) !important;
  border-color: rgba(25, 135, 84, 0.4) !important;
  color: #d1e7dd !important;
}

[data-theme="dark"] .alert-success * {
  color: #d1e7dd !important;
}

/* Alert secundario */
[data-theme="dark"] .alert-secondary {
  background-color: rgba(108, 117, 125, 0.2) !important;
  border-color: rgba(108, 117, 125, 0.4) !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

/* ============================================
   MODO OSCURO - Modal Detalle de Pregunta
   ============================================ */

[data-theme="dark"] .modal-content {
  background-color: #1e2746 !important;
  color: #fff !important;
}

[data-theme="dark"] .modal-header {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

[data-theme="dark"] .modal-body {
  background-color: #1e2746 !important;
}

[data-theme="dark"] .modal-body .form-control,
[data-theme="dark"] .modal-body input,
[data-theme="dark"] .modal-body textarea {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: #fff !important;
}

/* Sección de respuesta del equipo en modal */
[data-theme="dark"] .respuesta-equipo-section,
[data-theme="dark"] .team-response-section,
[data-theme="dark"] [class*="respuesta-equipo"] {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .modal-footer {
  background-color: rgba(255, 255, 255, 0.03) !important;
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   MODO OSCURO - Impugnaciones
   ============================================ */

[data-theme="dark"] .impugnacion-detalle,
[data-theme="dark"] .detalle-pregunta {
  background-color: #1e2746 !important;
  color: #fff !important;
}

[data-theme="dark"] .badge.bg-success {
  background-color: rgba(25, 135, 84, 0.8) !important;
}

[data-theme="dark"] .badge.bg-danger {
  background-color: rgba(220, 53, 69, 0.8) !important;
}

[data-theme="dark"] .badge.bg-warning {
  background-color: rgba(255, 193, 7, 0.8) !important;
  color: #000 !important;
}

[data-theme="dark"] .badge.bg-info {
  background-color: rgba(13, 202, 240, 0.8) !important;
}

[data-theme="dark"] .badge.bg-secondary {
  background-color: rgba(108, 117, 125, 0.8) !important;
}

/* ============================================
   MODO OSCURO - Dashboard
   ============================================ */

/* Card de nivel del perfil */
[data-theme="dark"] .profile-level-card {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-radius: 16px;
}

[data-theme="dark"] .profile-level-card .title {
  color: #fff !important;
}

[data-theme="dark"] .profile-level-card .sub,
[data-theme="dark"] .profile-level-card .prog-note {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .profile-level-card .prog-label {
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .profile-level-card .prog-track {
  background-color: rgba(255, 255, 255, 0.15) !important;
}

/* Banner del simulacro */
[data-theme="dark"] .jt-banner {
  background-color: #1e2746 !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

[data-theme="dark"] .jt-banner h4,
[data-theme="dark"] .jt-banner h5,
[data-theme="dark"] .jt-banner .title {
  color: #fff !important;
}

[data-theme="dark"] .jt-banner p,
[data-theme="dark"] .jt-banner .text-secondary,
[data-theme="dark"] .jt-banner .text-muted {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Card del Test Diario */
[data-theme="dark"] .daily-cta {
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.9) 0%, rgba(45, 75, 110, 0.85) 100%) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

[data-theme="dark"] .daily-cta h4,
[data-theme="dark"] .daily-cta .title {
  color: #fff !important;
}

[data-theme="dark"] .daily-cta p,
[data-theme="dark"] .daily-cta .text-secondary {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Cards de Ranking */
[data-theme="dark"] .card.jt-rank,
[data-theme="dark"] .jt-rank {
  background-color: #1e2746 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .rank-header {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

[data-theme="dark"] .rank-header .title {
  color: #fff !important;
}

[data-theme="dark"] .rank-header .subtitle {
  color: rgba(255, 255, 255, 0.6) !important;
}

[data-theme="dark"] .rank-item {
  border-bottom-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .rank-name {
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .rank-score {
  color: #60a5fa !important;
}

[data-theme="dark"] .rank-avatar {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Shield card (tarjeta con escudo) */
[data-theme="dark"] .jt-shield-card {
  background-color: #1e2746 !important;
}

[data-theme="dark"] .shield-meta {
  background-color: rgba(30, 39, 70, 0.95) !important;
}

[data-theme="dark"] .shield-meta .name {
  color: #fff !important;
}

[data-theme="dark"] .shield-meta .role,
[data-theme="dark"] .shield-meta .level {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Challenge card */
[data-theme="dark"] .challenge-card {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .challenge-card .ch-body {
  background-color: #1e2746 !important;
}

/* List group items en dashboard */
[data-theme="dark"] .list-group-item {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .list-group-item:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

/* Textos generales del dashboard */
[data-theme="dark"] .dashboard-main-body h1,
[data-theme="dark"] .dashboard-main-body h2,
[data-theme="dark"] .dashboard-main-body h3,
[data-theme="dark"] .dashboard-main-body h4,
[data-theme="dark"] .dashboard-main-body h5,
[data-theme="dark"] .dashboard-main-body h6 {
  color: #fff !important;
}

[data-theme="dark"] .dashboard-main-body p,
[data-theme="dark"] .dashboard-main-body span:not(.badge),
[data-theme="dark"] .dashboard-main-body label {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Incidencias y reportes cards */
[data-theme="dark"] .inc-card,
[data-theme="dark"] .report-card {
  background-color: #1e2746 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

/* Widget cards genéricas */
[data-theme="dark"] .widget-card,
[data-theme="dark"] .stat-widget {
  background-color: #1e2746 !important;
  color: #fff !important;
}

/* ============================================
   MODO OSCURO - Test Diario
   ============================================ */

/* Hero de racha */
[data-theme="dark"] .streak-hero-title {
  color: #fff !important;
}

[data-theme="dark"] .streak-hero-title .streak-number {
  color: #ff6b3d !important;
}

[data-theme="dark"] .streak-hero-sub {
  color: rgba(255, 255, 255, 0.8) !important;
}

[data-theme="dark"] .streak-hero-sub strong {
  color: #fff !important;
}

[data-theme="dark"] .streak-hero-record {
  color: rgba(255, 255, 255, 0.6) !important;
}

[data-theme="dark"] .streak-hero-record strong {
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Panel del examen (card verde claro) */
[data-theme="dark"] .exam-panel {
  background: linear-gradient(135deg, rgba(30, 80, 60, 0.7) 0%, rgba(30, 60, 90, 0.7) 100%) !important;
  border-color: rgba(74, 157, 111, 0.5) !important;
}

[data-theme="dark"] .exam-panel-badge {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .exam-panel-title {
  color: #fff !important;
}

[data-theme="dark"] .exam-panel-desc {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* ============================================
   MODO OSCURO - Página de Exámenes (index)
   ============================================ */

/* Paneles de Test Aleatorios y Simulacro */
[data-theme="dark"] .exam-panel {
  background-color: #1e2746 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .exam-panel .panel-head {
  border-bottom-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .exam-panel .panel-head h5 {
  color: #fff !important;
}

[data-theme="dark"] .exam-panel .panel-foot {
  border-top-color: rgba(255, 255, 255, 0.1) !important;
  background-color: rgba(255, 255, 255, 0.03) !important;
}

[data-theme="dark"] .exam-panel .options-title {
  color: rgba(255, 255, 255, 0.8) !important;
}

[data-theme="dark"] .exam-panel .form-label {
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Botones segmentados */
[data-theme="dark"] .segmented .btn.btn-light {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="dark"] .segmented .btn.btn-light:hover {
  background-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .segmented .btn.btn-light.active {
  background-color: #fff !important;
  color: #111827 !important;
}

[data-theme="dark"] .segmented .btn.btn-outline-dark {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-color: rgba(255, 255, 255, 0.35) !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="dark"] .segmented .btn.btn-outline-dark:hover {
  background-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .segmented .btn.btn-outline-dark.active,
[data-theme="dark"] .segmented .btn.btn-outline-dark:active {
  background-color: #fff !important;
  border-width: 1px !important;
  border-style: solid !important;
  border-color: #111827 !important;
  color: #111827 !important;
}

/* Items de tema */
[data-theme="dark"] .tema-item {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .tema-item:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] .tema-scroll {
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* Sticky bar */
[data-theme="dark"] .sticky-bar {
  background-color: #1e2746 !important;
  border-top-color: rgba(255, 255, 255, 0.1) !important;
}

/* ============================================
   MODO OSCURO - Favoritas (Mis preguntas guardadas)
   ============================================ */

[data-theme="dark"] .fav-header {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .fav-header h4 {
  color: #fff !important;
}

[data-theme="dark"] .fav-course,
[data-theme="dark"] .fav-block,
[data-theme="dark"] .fav-empty {
  background-color: #1e2746 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .fav-topic-bar {
  background-color: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .fav-item {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .fav-text {
  color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="dark"] .fav-icon-col,
[data-theme="dark"] .fav-icon-col.text-secondary,
[data-theme="dark"] .fav-header .text-secondary,
[data-theme="dark"] .fav-empty .text-secondary {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .fav-empty .fw-semibold {
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .fav-empty .bg-neutral-100 {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

/* Modal confirmación */
[data-theme="dark"] .fav-modal {
  background-color: #1e2746 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .fav-modal-header {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
}

[data-theme="dark"] .fav-modal-body {
  color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="dark"] .fav-modal-actions {
  background-color: rgba(255, 255, 255, 0.03) !important;
  border-top-color: rgba(255, 255, 255, 0.12) !important;
}

/* ============================================
   MODO OSCURO - Exámenes Oficiales
   ============================================ */

[data-theme="dark"] .ofc-title {
  color: #fff !important;
}

[data-theme="dark"] .ofc-sub {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .ofc-desc {
  color: rgba(255, 255, 255, 0.8) !important;
}

[data-theme="dark"] .ofc-sep {
  border-top-color: rgba(255, 255, 255, 0.12) !important;
}

/* Selects de la página */
[data-theme="dark"] #formOficial .form-select {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] #formOficial .form-select:disabled {
  background-color: rgba(255, 255, 255, 0.04) !important;
  color: rgba(255, 255, 255, 0.55) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

/* Botón principal */
[data-theme="dark"] #btnHacer.btn-dark {
  background-color: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] #btnHacer.btn-dark:hover {
  background-color: rgba(255, 255, 255, 0.18) !important;
}

[data-theme="dark"] #btnHacer.btn-dark:disabled,
[data-theme="dark"] #btnHacer.btn-dark.disabled {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.45) !important;
  opacity: 1 !important;
}

/* Quitar banda visual encima del botón (sticky-bar + separador) */
[data-theme="dark"] #formOficial .sticky-bar {
  background-color: transparent !important;
}

[data-theme="dark"] #formOficial .sticky-bar .ofc-sep {
  border-top-color: rgba(255, 255, 255, 0.12) !important;
  margin-top: 0 !important;
  margin-bottom: 12px !important;
}

/* ============================================
   MODO OSCURO - Resultados (Histórico)
   ============================================ */

/* Tabla */
[data-theme="dark"] .table {
  color: rgba(255, 255, 255, 0.88) !important;
}

[data-theme="dark"] .table thead th {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] .table tbody td,
[data-theme="dark"] .table tbody th {
  border-top-color: rgba(255, 255, 255, 0.08) !important;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: rgba(255, 255, 255, 0.04) !important;
  color: rgba(255, 255, 255, 0.88) !important;
}

[data-theme="dark"] .table-striped > tbody > tr:nth-of-type(even) > * {
  background-color: transparent !important;
  color: rgba(255, 255, 255, 0.88) !important;
}

/* Badge "Tipo" (bg-light text-dark border) */
[data-theme="dark"] .badge.bg-light.text-dark.border {
  background-color: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Mensajes vacíos */
[data-theme="dark"] .text-secondary-light {
  color: rgba(255, 255, 255, 0.65) !important;
}

/* Paginación */
[data-theme="dark"] .pagination .page-link {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="dark"] .pagination .page-item.active .page-link {
  background-color: rgba(255, 255, 255, 0.18) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: #fff !important;
}

[data-theme="dark"] .pagination .page-item.disabled .page-link {
  background-color: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.08) !important;
  color: rgba(255, 255, 255, 0.45) !important;
}

/* Filtros (inputs/selects) dentro de resultados */
[data-theme="dark"] form .form-control,
[data-theme="dark"] form .form-select {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] form .form-control::placeholder {
  color: rgba(255, 255, 255, 0.55) !important;
}

/* ============================================
   MODO OSCURO - Revisión del examen (resumen)
   ============================================ */

[data-theme="dark"] .review-card {
  background-color: rgba(255, 255, 255, 0.03) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] .review-option {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .review-option .opt-number {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .review-option.user-correct {
  background-color: rgba(25, 135, 84, 0.22) !important;
  border-color: rgba(25, 135, 84, 0.7) !important;
}

[data-theme="dark"] .review-option.user-incorrect {
  background-color: rgba(220, 53, 69, 0.22) !important;
  border-color: rgba(220, 53, 69, 0.7) !important;
}

[data-theme="dark"] .review-feedback {
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .review-feedback.correct {
  background-color: rgba(25, 135, 84, 0.18) !important;
  color: #d1e7dd !important;
  border-left-color: rgba(25, 135, 84, 0.85) !important;
}

[data-theme="dark"] .review-feedback.incorrect {
  background-color: rgba(220, 53, 69, 0.18) !important;
  color: #f8d7da !important;
  border-left-color: rgba(220, 53, 69, 0.85) !important;
}

[data-theme="dark"] .review-feedback.correct *,
[data-theme="dark"] .review-feedback.incorrect * {
  color: inherit !important;
}

[data-theme="dark"] .correct-answer-hint {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-left-color: rgba(255, 255, 255, 0.35) !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

/* Badge de puntuación (bg-light text-muted border) */
[data-theme="dark"] .badge.bg-light.text-muted.border {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  color: rgba(255, 255, 255, 0.75) !important;
}

/* Botón impugnar en revisión */
[data-theme="dark"] .btn.btn-outline-secondary.btn-reportar {
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="dark"] .btn.btn-outline-secondary.btn-reportar:hover {
  background-color: rgba(255, 255, 255, 0.08) !important;
}

/* ============================================
   MODO OSCURO - Exámenes: quitar "sombra" clara en respuestas
   ============================================ */

[data-theme="dark"] .list-group-item.respuesta-item,
[data-theme="dark"] .respuesta-item {
  box-shadow: none !important;
  background-color: transparent !important;
}

[data-theme="dark"] .respuesta-item:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
}

[data-theme="dark"] .respuesta-item.seleccionada {
  background-color: rgba(59, 130, 246, 0.18) !important;
}

/* ============================================
   MODO OSCURO - Simulacro del Mes
   ============================================ */

[data-theme="dark"] .sim-hero-wrapper .sim-hero-title {
  color: #fff !important;
}

[data-theme="dark"] .sim-hero-wrapper .sim-hero-sub {
  color: rgba(255, 255, 255, 0.75) !important;
}

[data-theme="dark"] .sim-hero-wrapper .sim-hero-sub strong {
  color: #fff !important;
}

[data-theme="dark"] .sim-hero-card,
[data-theme="dark"] .sim-ranking-card {
  background: #1e2746 !important;
  border-color: rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="dark"] .sim-hero-card h3,
[data-theme="dark"] .sim-ranking-card h5 {
  color: #fff !important;
}

[data-theme="dark"] .sim-hero-card p,
[data-theme="dark"] .sim-ranking-card p {
  color: rgba(255, 255, 255, 0.75) !important;
}

[data-theme="dark"] .sim-hero-kicker {
  color: rgba(255, 255, 255, 0.65) !important;
}

/* El CSS interno usa .sim-kicker, cubrimos ambos */
[data-theme="dark"] .sim-hero-card .sim-kicker,
[data-theme="dark"] .sim-hero-card .sim-hero-kicker {
  color: rgba(255, 255, 255, 0.65) !important;
}

[data-theme="dark"] .sim-ranking-header small.text-muted,
[data-theme="dark"] #rankingContainer .text-muted {
  color: rgba(255, 255, 255, 0.6) !important;
}

/* Selector curso */
[data-theme="dark"] #cursoSimulacro.form-select {
  background-color: rgba(255, 255, 255, 0.08) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Botón principal */
[data-theme="dark"] .sim-hero-btn.btn-dark {
  background-color: rgba(255, 255, 255, 0.12) !important;
  border-color: rgba(255, 255, 255, 0.22) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .sim-hero-btn.btn-dark:hover {
  background-color: rgba(255, 255, 255, 0.18) !important;
}

[data-theme="dark"] .sim-hero-btn.btn-dark:disabled {
  background-color: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.45) !important;
  opacity: 1 !important;
}

/* Alerta dentro del hero cuando no hay simulacro */
[data-theme="dark"] .sim-hero-card .alert.alert-warning {
  background-color: rgba(255, 193, 7, 0.12) !important;
  border-color: rgba(255, 193, 7, 0.25) !important;
  color: #ffe69c !important;
}

[data-theme="dark"] .sim-hero-card .alert.alert-warning * {
  color: #ffe69c !important;
}

/* ============================================
   MODO OSCURO - Desafíos
   ============================================ */

/* Cards principales */
[data-theme="dark"] .df-hero-card,
[data-theme="dark"] .df-card {
  background: #1e2746 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="dark"] .df-hero-title,
[data-theme="dark"] .df-card-title {
  color: #fff !important;
}

[data-theme="dark"] .df-hero-subtitle,
[data-theme="dark"] .df-record-ratio,
[data-theme="dark"] .df-activity-empty {
  color: rgba(255, 255, 255, 0.7) !important;
}

/* Imagen del héroe: quitar drop-shadow claro */
[data-theme="dark"] .df-hero-img {
  filter: none !important;
}

/* Barra récord */
[data-theme="dark"] .df-record-bar {
  background: rgba(255, 255, 255, 0.12) !important;
}

/* Tabs actividad */
[data-theme="dark"] .df-activity-tab {
  color: rgba(255, 255, 255, 0.65) !important;
}

[data-theme="dark"] .df-activity-tab.active {
  color: #fff !important;
  border-bottom-color: rgba(96, 165, 250, 0.9) !important;
}

/* Items de actividad */
[data-theme="dark"] .df-activity-item {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
}

[data-theme="dark"] .df-activity-item.df-activity-highlight {
  background: rgba(96, 165, 250, 0.12) !important;
  border-color: rgba(96, 165, 250, 0.45) !important;
  box-shadow: none !important;
}

[data-theme="dark"] .df-activity-user {
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .df-activity-meta {
  color: rgba(255, 255, 255, 0.65) !important;
}

/* Botones outline dentro de desafíos */
[data-theme="dark"] #btnBatallaAleatoria.btn-outline-primary {
  border-color: rgba(96, 165, 250, 0.8) !important;
  color: rgba(96, 165, 250, 0.95) !important;
}

[data-theme="dark"] #btnBatallaAleatoria.btn-outline-primary:hover {
  background-color: rgba(96, 165, 250, 0.12) !important;
}

/* ============================================
   MODO OSCURO - Resumen del desafío (comparación puntuaciones)
   ============================================ */

[data-theme="dark"] .alert.alert-light {
  background-color: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.14) !important;
  color: rgba(255, 255, 255, 0.85) !important;
}

[data-theme="dark"] .alert.alert-light .text-primary {
  color: #60a5fa !important;
}

[data-theme="dark"] .alert.alert-light .text-secondary {
  color: rgba(255, 255, 255, 0.75) !important;
}

[data-theme="dark"] .alert.alert-light .display-6,
[data-theme="dark"] .alert.alert-light .fw-bold {
  color: rgba(255, 255, 255, 0.92) !important;
}

/* ============================================
   MODO OSCURO - Estadísticas
   ============================================ */

/* Cards principales */
[data-theme="dark"] .stats-new-card {
  background: #1e2746 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25) !important;
}

[data-theme="dark"] .stats-new-card-title {
  color: #fff !important;
}

/* Nivel y rendimiento */
[data-theme="dark"] .nivel-circle {
  background: conic-gradient(#5b6cf5 0% 100%), rgba(255, 255, 255, 0.06) !important;
}

[data-theme="dark"] .nivel-circle-value,
[data-theme="dark"] .nivel-circle-label {
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .nivel-nombre-text {
  color: #fff !important;
}

[data-theme="dark"] .nivel-progreso-label {
  color: rgba(255, 255, 255, 0.7) !important;
}

[data-theme="dark"] .nivel-progreso-bar {
  background: rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] .nivel-progreso-text {
  color: rgba(255, 255, 255, 0.55) !important;
}

/* Ranking */
[data-theme="dark"] .ranking-metric-value {
  color: #60a5fa !important;
}

[data-theme="dark"] .ranking-metric-label {
  color: rgba(255, 255, 255, 0.75) !important;
}

[data-theme="dark"] .ranking-metric-sublabel {
  color: rgba(255, 255, 255, 0.55) !important;
}

/* Constancia */
[data-theme="dark"] .constancia-item {
  background: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .constancia-value {
  color: rgba(255, 255, 255, 0.92) !important;
}

[data-theme="dark"] .constancia-label {
  color: rgba(255, 255, 255, 0.65) !important;
}

/* Barras de test */
[data-theme="dark"] .test-bar-title {
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] .test-bar-total {
  color: rgba(255, 255, 255, 0.65) !important;
}

[data-theme="dark"] .test-bar-track {
  background: rgba(255, 255, 255, 0.08) !important;
}

/* Modal cambiar curso (tiene estilos inline claros) */
[data-theme="dark"] #modalCambiarCurso .modal-content {
  background: #1e2746 !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] #modalCambiarCurso .modal-header {
  border-bottom-color: rgba(255, 255, 255, 0.12) !important;
}

[data-theme="dark"] #modalCambiarCurso .modal-title {
  color: #fff !important;
}

[data-theme="dark"] #modalCambiarCurso .modal-body .text-muted {
  color: rgba(255, 255, 255, 0.65) !important;
}

[data-theme="dark"] #modalCambiarCurso .list-group-item {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

[data-theme="dark"] #modalCambiarCurso .list-group-item.active {
  background: rgba(91, 108, 245, 0.35) !important;
  border-color: rgba(91, 108, 245, 0.6) !important;
  color: #fff !important;
}

[data-theme="dark"] #modalCambiarCurso .modal-footer {
  border-top-color: rgba(255, 255, 255, 0.12) !important;
 }
 
 
 /* ============================================
    MODO OSCURO - Preguntas Impugnadas
    ============================================ */
 
 /* Contenedores (cards) y textos auxiliares */
 [data-theme="dark"] .dashboard-main-body .card {
   background: #1e2746 !important;
   border: 1px solid rgba(255, 255, 255, 0.15) !important;
 }
 
 [data-theme="dark"] .dashboard-main-body .card .text-muted,
 [data-theme="dark"] .dashboard-main-body .card .text-secondary,
 [data-theme="dark"] .dashboard-main-body .small.text-secondary {
   color: rgba(255, 255, 255, 0.65) !important;
 }
 
 /* Filtros: labels/inputs/selects/textarea */
 [data-theme="dark"] .dashboard-main-body .form-label {
   color: rgba(255, 255, 255, 0.85) !important;
 }
 
 [data-theme="dark"] .dashboard-main-body .form-control,
 [data-theme="dark"] .dashboard-main-body .form-select,
 [data-theme="dark"] .dashboard-main-body textarea.form-control {
   background: rgba(255, 255, 255, 0.06) !important;
   border-color: rgba(255, 255, 255, 0.18) !important;
   color: rgba(255, 255, 255, 0.92) !important;
 }
 
 [data-theme="dark"] .dashboard-main-body .form-control::placeholder {
   color: rgba(255, 255, 255, 0.45) !important;
 }
 
 [data-theme="dark"] .dashboard-main-body .form-text {
   color: rgba(255, 255, 255, 0.6) !important;
 }
 
 /* Tabla de reportes */
 [data-theme="dark"] #tablaReportesBody,
 [data-theme="dark"] .dashboard-main-body .table {
   color: rgba(255, 255, 255, 0.9) !important;
 }
 
 [data-theme="dark"] .dashboard-main-body .table thead th {
   background: rgba(255, 255, 255, 0.06) !important;
   color: rgba(255, 255, 255, 0.9) !important;
   border-color: rgba(255, 255, 255, 0.14) !important;
 }
 
 [data-theme="dark"] .dashboard-main-body .table td,
 [data-theme="dark"] .dashboard-main-body .table th {
   border-color: rgba(255, 255, 255, 0.12) !important;
 }
 
 [data-theme="dark"] .dashboard-main-body .table tbody tr:hover {
   background: rgba(255, 255, 255, 0.04) !important;
 }
 
 /* Badges claros que se usan en la tabla (#pregunta, dificultad, etc.) */
 [data-theme="dark"] .dashboard-main-body .badge.bg-light,
 [data-theme="dark"] #detallePreguntaModal .badge.bg-light {
   background: rgba(255, 255, 255, 0.08) !important;
   border-color: rgba(255, 255, 255, 0.14) !important;
 }
 
 [data-theme="dark"] .dashboard-main-body .badge.bg-light.text-dark,
 [data-theme="dark"] #detallePreguntaModal .badge.bg-light.text-dark {
   color: rgba(255, 255, 255, 0.92) !important;
 }
 
 [data-theme="dark"] .dashboard-main-body .badge.bg-info.text-dark,
 [data-theme="dark"] #detallePreguntaModal .badge.bg-info.text-dark {
   color: #0b1220 !important;
 }
 
 /* Botón de paginación "Página X/Y" que usa btn-outline-light */
 [data-theme="dark"] .dashboard-main-body .btn-outline-light.disabled,
 [data-theme="dark"] .dashboard-main-body .btn-outline-light:disabled {
   background: rgba(255, 255, 255, 0.06) !important;
   border-color: rgba(255, 255, 255, 0.18) !important;
   color: rgba(255, 255, 255, 0.85) !important;
 }
 
 /* Modal detalle: tiene bloques con bg-light/bg-white dentro del HTML generado */
 [data-theme="dark"] #detallePreguntaModal .modal-content,
 [data-theme="dark"] #marcarRevisadoModal .modal-content,
 [data-theme="dark"] #eliminarReporteModal .modal-content {
   background: #1e2746 !important;
   border: 1px solid rgba(255, 255, 255, 0.15) !important;
 }
 
 [data-theme="dark"] #detallePreguntaModal .modal-header,
 [data-theme="dark"] #marcarRevisadoModal .modal-header,
 [data-theme="dark"] #eliminarReporteModal .modal-header {
   border-bottom-color: rgba(255, 255, 255, 0.12) !important;
 }
 
 [data-theme="dark"] #detallePreguntaModal .modal-footer,
 [data-theme="dark"] #marcarRevisadoModal .modal-footer,
 [data-theme="dark"] #eliminarReporteModal .modal-footer {
   border-top-color: rgba(255, 255, 255, 0.12) !important;
 }
 
 [data-theme="dark"] #detallePreguntaModal .modal-title,
 [data-theme="dark"] #marcarRevisadoModal .modal-title,
 [data-theme="dark"] #eliminarReporteModal .modal-title {
   color: #fff !important;
 }
 
 [data-theme="dark"] #eliminarReporteModal .alert.alert-warning {
   background-color: rgba(255, 193, 7, 0.12) !important;
   border-color: rgba(255, 193, 7, 0.25) !important;
   color: #ffe69c !important;
 }
 
 [data-theme="dark"] #eliminarReporteModal .alert.alert-warning * {
   color: #ffe69c !important;
 }

 /* Botones del modal eliminar: icono y texto en la misma línea */
 #eliminarReporteModal .modal-footer .btn {
   display: inline-flex;
   align-items: center;
   gap: 0.35rem;
 }

 #eliminarReporteModal .modal-footer .btn iconify-icon {
   display: inline-block;
   line-height: 1;
 }
 
 [data-theme="dark"] #detallePreguntaModal .bg-light,
 [data-theme="dark"] #detallePreguntaModal .bg-white {
  background: rgba(255, 255, 255, 0.06) !important;
 }
 
 [data-theme="dark"] #eliminarReporteModal .bg-light,
 [data-theme="dark"] #eliminarReporteModal .bg-white {
   background: rgba(255, 255, 255, 0.06) !important;
 }
 
 [data-theme="dark"] #eliminarReporteModal .form-control,
 [data-theme="dark"] #eliminarReporteModal .form-select {
   background: rgba(255, 255, 255, 0.06) !important;
   border-color: rgba(255, 255, 255, 0.18) !important;
   color: rgba(255, 255, 255, 0.92) !important;
 }
 
 [data-theme="dark"] #detallePreguntaModal .form-control,
 [data-theme="dark"] #marcarRevisadoModal .form-control {
   background: rgba(255, 255, 255, 0.06) !important;
   border-color: rgba(255, 255, 255, 0.18) !important;
   color: rgba(255, 255, 255, 0.92) !important;
 }
 
 [data-theme="dark"] #detallePreguntaModal .list-group-item {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(255, 255, 255, 0.12) !important;
  color: rgba(255, 255, 255, 0.9) !important;
}

/* Mis reportes: botón eliminar con estilo moderno */
.btn-delete-report {
  border: 1px solid rgba(244, 67, 54, 0.35) !important;
  color: #f44336 !important;
  background: rgba(244, 67, 54, 0.08);
  font-weight: 600;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-delete-report:hover,
.btn-delete-report:focus {
  color: #ffffff !important;
  background: #f44336;
  border-color: #f44336 !important;
  box-shadow: 0 6px 14px rgba(244, 67, 54, 0.25);
  transform: translateY(-1px);
}
.btn-delete-report:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(244, 67, 54, 0.2);
}
.btn-delete-report:disabled {
  opacity: 0.6;
  color: rgba(244, 67, 54, 0.7) !important;
  background: rgba(244, 67, 54, 0.15);
  border-color: rgba(244, 67, 54, 0.25) !important;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

/* Modal de confirmación de eliminación */
#confirmarEliminarModal .modal-content {
  border: none;
  border-radius: 16px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15);
}
#confirmarEliminarModal .modal-body {
  padding: 2rem;
}
#confirmarEliminarModal h5 {
  color: #1a1a1a;
  font-size: 1.35rem;
}
#confirmarEliminarModal .btn-danger {
  background: #f44336;
  border-color: #f44336;
  font-weight: 600;
  padding: 0.5rem 1.5rem;
  box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
  transition: all 0.2s ease;
}
#confirmarEliminarModal .btn-danger:hover {
  background: #d32f2f;
  border-color: #d32f2f;
  box-shadow: 0 6px 16px rgba(244, 67, 54, 0.4);
  transform: translateY(-2px);
}

/* Dark mode para modal y botón */
[data-theme="dark"] #confirmarEliminarModal .modal-content {
  background: #1e2746;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}
[data-theme="dark"] #confirmarEliminarModal h5 {
  color: rgba(255, 255, 255, 0.95);
}
[data-theme="dark"] #confirmarEliminarModal .text-secondary {
  color: rgba(255, 255, 255, 0.7) !important;
}
[data-theme="dark"] .btn-delete-report {
  border-color: rgba(244, 67, 54, 0.45) !important;
  color: #ff6b6b !important;
  background: rgba(244, 67, 54, 0.12);
}
[data-theme="dark"] .btn-delete-report:hover {
  color: #ffffff !important;
  background: #f44336;
}

[data-theme="dark"] .dashboard-main-body .bg-light,
[data-theme="dark"] .dashboard-main-body .bg-white {
  background: rgba(255, 255, 255, 0.06) !important;
} 
[data-theme="dark"] .dashboard-main-body .border {
   border-color: rgba(255, 255, 255, 0.14) !important;
 }
 
 /* Panel azul inline del modal en mis_reportes.php (background:#e7f3ff) */
 [data-theme="dark"] #detallePreguntaModal [style*="background:#e7f3ff"],
 [data-theme="dark"] #detallePreguntaModal [style*="background: #e7f3ff"],
 [data-theme="dark"] #detallePreguntaModal [style*="background:#e7f3ff;"] {
   background: rgba(96, 165, 250, 0.10) !important;
 }
 
 /* Mis reportes: la tabla se está renderizando con fondo claro */
 [data-theme="dark"] .dashboard-main-body .table-responsive {
   background: #1e2746 !important;
 }
 
 [data-theme="dark"] .dashboard-main-body table.table {
   background-color: transparent !important;
 }
 
 [data-theme="dark"] .dashboard-main-body table.table {
   --bs-table-bg: transparent;
   --bs-table-color: rgba(255, 255, 255, 0.9);
   --bs-table-striped-bg: rgba(255, 255, 255, 0.03);
   --bs-table-striped-color: rgba(255, 255, 255, 0.9);
   --bs-table-hover-bg: rgba(255, 255, 255, 0.04);
   --bs-table-hover-color: rgba(255, 255, 255, 0.95);
   --bs-table-border-color: rgba(255, 255, 255, 0.12);
 }
 
 [data-theme="dark"] .dashboard-main-body table.table tbody,
 [data-theme="dark"] .dashboard-main-body table.table tr,
 [data-theme="dark"] .dashboard-main-body table.table td {
   background-color: transparent !important;
 }
 
 [data-theme="dark"] .dashboard-main-body table.table td,
 [data-theme="dark"] .dashboard-main-body table.table th {
   color: rgba(255, 255, 255, 0.9) !important;
 }
 
 /* Bloque "Respuesta del equipo" dentro de la celda Detalles */
 [data-theme="dark"] .dashboard-main-body td .mt-2.p-2.border.rounded.bg-light {
   color: rgba(255, 255, 255, 0.92) !important;
 }
 
 [data-theme="dark"] .dashboard-main-body td .mt-2.p-2.border.rounded.bg-light .small {
   color: rgba(255, 255, 255, 0.85) !important;
 }
 
 [data-theme="dark"] .dashboard-main-body td .mt-2.p-2.border.rounded.bg-light div {
   color: rgba(255, 255, 255, 0.88) !important;
 }
