/* ================================================================
   DARK MODE — sensei ecosystem
   Activado por: body.dark (setting.js + sessionStorage)
   Base: #0A2850 (navy profundo)
   Nivel 1: variables de superficie (automáticos)
   Nivel 2: overrides explícitos para valores hardcodeados
   ================================================================ */

/* --- NIVEL 1: Sobreescritura de tokens de superficie --- */
body.dark {
  --neutral-color100: #071A35;
  --neutral-color200: #0A2850;
  --neutral-color300: #143A6E;
  --neutral-color400: #0D3166;
  --neutral-color500: #6B7B9E;
  --neutral-color600: #8BA5CC;
  --neutral-color700: #C2D2E8;
  --neutral-color800: #D8E4F2;
  --neutral-color900: #EFF4FB;
  --shadow: 0 2px 4px rgba(0,0,0,0.5);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.7);
  --border-radius: 0.6rem;
  color-scheme: dark;
}

/* Body y contenedores principales */
body.dark {
  background-color: #071A35 !important;
  color: #C2D2E8 !important;
}

/* .page-wraper es el contenedor raíz de TODAS las vistas — background: #f8f9fa hardcoded */
body.dark .page-wraper,
body.dark div.page-wraper {
  background-color: #071A35 !important;
  color: #C2D2E8 !important;
}

body.dark main,
body.dark .main-content,
body.dark .content-inner,
body.dark .content-inner-cliente,
body.dark .iq-banner,
body.dark .position-relative.iq-banner {
  background-color: #071A35 !important;
  color: #C2D2E8 !important;
}

/* ── "Tu último ingreso" en dark ── */
body.dark .last-login {
  color: #EFF4FB !important;
  background-color: rgba(255,255,255,0.08) !important;
}
body.dark .last-login .dot {
  background-color: #4ade80 !important;
}

/* ── "Ocultar menú": quitar fondo blanco en dark ── */
body.dark .sidebar .sidebar-header .ocultar-menu-btn {
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  color: #C2D2E8 !important;
}
body.dark .ocultar-menu-btn .icon,
body.dark .ocultar-menu-btn .item-name {
  color: #C2D2E8 !important;
}
body.dark .sidebar-header {
  border-bottom: 1px solid #143A6E !important;
}
body.dark .sidebar-toggle,
body.dark .sidebar .sidebar-toggle {
  background: transparent !important;
  box-shadow: none !important;
}
/* Hamburger móvil en dark: mismo fondo #0A2850 — solo en responsive */
@media (max-width: 1024px) {
  body.dark .nav .sidebar-toggle,
  body.dark .navbar-inner .sidebar-toggle {
    background: #0A2850 !important;
    background-color: #0A2850 !important;
    color: #EFF4FB !important;
    box-shadow: none !important;
  }
  body.dark .nav .sidebar-toggle svg path,
  body.dark .navbar-inner .sidebar-toggle svg path {
    fill: #EFF4FB !important;
  }
}

/* ── Navbar: SIEMPRE BLANCO en light, SIEMPRE OSCURO en dark ──────────────
   Desvinculado del configurador: bg-primary-500 puede cambiar sin afectar
   el navbar porque esta regla carga DESPUÉS (dark_mode.css es el último CSS).
   Especificidad: nav.iq-navbar (0,1,1) > .bg-primary-500 (0,1,0) → gana.
───────────────────────────────────────────────────────────────────────── */
/* ── Navbar: siempre en modo CLARO — inmune al dark mode y al configurador ──
   El fondo se fija aquí. Los hijos heredan colores "light" explícitamente
   para que el dark mode general no los tiña.
─────────────────────────────────────────────────────────────────────────── */
nav.iq-navbar {
  background-color: #ffffff !important;
  border-bottom: 1px solid #e2e8f0 !important;
}

/* Media query de Hope UI en dark mode pisa el collapse con #222738 —
   lo neutralizamos para que el navbar colapsado también sea siempre blanco */
@media (max-width: 991.98px) {
  body.dark .iq-navbar .navbar-collapse:not(.offcanvas-collapse) {
    background: #ffffff !important;
  }
  body.dark .iq-navbar .navbar-collapse .nav-link,
  body.dark .iq-navbar .navbar-collapse a { color: #1e293b !important; }
}

/* Hijos del navbar — restaurar colores light aunque body tenga .dark */
body.dark nav.iq-navbar .nav-link,
body.dark nav.iq-navbar a.nav-link { color: #1e293b !important; }

body.dark nav.iq-navbar .caption-title,
body.dark nav.iq-navbar .caption-sub-title { color: #1e293b !important; }

/* Search bar — el input (#global_search) tiene bg-transparent, fondo viene del padre */
body.dark nav.iq-navbar .search-input,
body.dark nav.iq-navbar .input-group {
  background-color: #f1f5f9 !important;
  border-color: #cbd5e1 !important;
  border-radius: 0.5rem !important;
}

/* ID selector para máxima especificidad — gana sobre cualquier regla de clase */
body.dark #global_search {
  background-color: transparent !important;
  color: #1e293b !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

body.dark nav.iq-navbar input::placeholder,
body.dark #global_search::placeholder { color: #94a3b8 !important; }

/* text-white SOLO en el input del search — NO en los sub-drops (h5 en card-headers) */
body.dark #global_search.text-white { color: #1e293b !important; }

body.dark nav.iq-navbar .input-group-text {
  background-color: transparent !important;
  border-color: transparent !important;
  color: #64748b !important;
}

body.dark nav.iq-navbar svg path,
body.dark nav.iq-navbar svg circle,
body.dark nav.iq-navbar svg line,
body.dark nav.iq-navbar svg polyline { stroke: #64748b00 !important; }

body.dark nav.iq-navbar .navbar-toggler { border-color: #cbd5e1 !important; }

/* Dropdown notificaciones / sub-drop — patrón común en todas las vistas */
body.dark .sub-drop,
body.dark .sub-drop.dropdown-menu,
body.dark .sub-drop .card,
body.dark .sub-drop .shadow-none { background-color: #0A2850 !important; color: #C2D2E8 !important; border-color: #143A6E !important; }
body.dark .sub-drop .py-3,
body.dark .sub-drop .card-header { background-color: #0D3166 !important; border-bottom-color: #143A6E !important; color: #EFF4FB !important; }
body.dark .sub-drop .iq-sub-card { background-color: #0A2850 !important; border-bottom-color: #143A6E !important; }
body.dark .sub-drop .list-group-item { background-color: #0A2850 !important; border-color: #143A6E !important; color: #C2D2E8 !important; }
body.dark .sub-drop .bg-light { background-color: #0D3166 !important; }

/* Profile menu panel */
body.dark .profile-menu-panel,
body.dark .profile-menu-panel .card,
body.dark .profile-menu-panel .list-group-item { background-color: #0A2850 !important; color: #C2D2E8 !important; border-color: #143A6E !important; }

/* Profile header — main.css usa background:linear-gradient, hay que resetear con shorthand */
body.dark .profile-menu-header {
  background: #0D3166 !important;           /* resetea gradient + color */
  background-image: none !important;         /* elimina el gradient explícitamente */
  border-bottom: 1px solid #143A6E !important;
}
body.dark .profile-menu-name,
body.dark .profile-menu-meta { color: #EFF4FB !important; }

/* Items del menú — .neutral-700 hardcoded */
body.dark .profile-menu-item,
body.dark .profile-menu-item.neutral-700,
body.dark .profile-menu-label { color: #C2D2E8 !important; }
body.dark .profile-menu-item:hover { background-color: rgba(255,255,255,0.06) !important; }

/* Cerrar sesión — rojo legible en dark */
body.dark .profile-menu-logout,
body.dark .profile-menu-logout .profile-menu-label { color: #FF8A8A !important; }

/* Roles sub-list */
body.dark .profile-menu-roles .profile-menu-role-link,
body.dark .profile-menu-roles .neutral-500 { color: #8BA5CC !important; }

/* Sección con divider */
body.dark .profile-menu-divider { border-top: 1px solid #143A6E !important; }

/* Notificaciones — texto p más legible */
body.dark .sub-drop .list-group-item p { color: #C2D2E8 !important; }
body.dark .sub-drop .list-group-item a { color: #C2D2E8 !important; }

/* Sidebar filtros modulos-transversales — mismo color que las cards */
body.dark .mt-sidebar,
body.dark .mt-sidebar .filter-card,
body.dark .mt-sidebar .s-filter {
  background-color: #0A2850 !important;
  border-color: #143A6E !important;
  color: #C2D2E8 !important;
}

/* Tabs de módulos transversales (.mt-pill) */
/* Cada botón ya tiene --pill-color definido inline por PHP */
body.dark .mt-pill {
  background-color: #0D3166 !important;
  color: #C2D2E8 !important;
  border-color: #143A6E !important;
  transition: all .18s ease !important;
}
/* Hover — borde + texto en el color propio del módulo */
body.dark .mt-pill:not(.active):hover {
  border-color: var(--pill-color) !important;
  color: var(--pill-color) !important;
  background-color: #0D3166 !important;
}
/* Activo — fondo sólido con el color del módulo */
body.dark .mt-pill.active {
  background-color: var(--pill-color) !important;
  border-color: var(--pill-color) !important;
  color: #ffffff !important;
  font-weight: 600 !important;
}
body.dark .mt-pills { background-color: transparent !important; }

/* Checkboxes en filtros dark — visibles con borde claro */
body.dark .form-check-input[type="checkbox"] {
  background-color: #0A2850 !important;
  border: 2px solid #8BA5CC !important;
  border-radius: 3px !important;
  width: 1.1rem !important;
  height: 1.1rem !important;
}
body.dark .form-check-input[type="checkbox"]:checked {
  background-color: var(--brand-principal-default) !important;
  border-color: var(--brand-principal-default) !important;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e") !important;
}
body.dark .form-check-input[type="checkbox"]:hover {
  border-color: #C2D2E8 !important;
}
body.dark .form-check-label {
  color: #C2D2E8 !important;
  cursor: pointer;
}

/* Hover sutil en cat-node-header */
body.dark .cat-node-header {
  transition: background-color 0.2s ease, color 0.2s ease !important;
}
body.dark .cat-node-header:hover {
  background-color: rgba(255, 255, 255, 0.06) !important;
  color: #EFF4FB !important;
  border-radius: 6px !important;
}

/* Categoría label con color (Cursos Indispensables etc.) */
body.dark .cat-label,
body.dark .categoria-color-label { filter: brightness(1.2) !important; }

/* Cards de cursos — patrón común */
body.dark .course-card,
body.dark .fav-card,
body.dark .mc-card { background-color: #0A2850 !important; color: #C2D2E8 !important; border-color: #143A6E !important; }
body.dark .back-btn-hero {
  background-color: #0DBBFF !important;
  color: #ffffff !important;
  border-color: #0DBBFF !important;
}
body.dark .back-btn-hero:hover {
  background-color: #00a3e0 !important;
  color: #ffffff !important;
  border-color: #00a3e0 !important;
}
body.dark .fav-card-image { background-color: #0D3166 !important; }
body.dark .descripcion-section { background-color: #0A2850 !important; color: #C2D2E8 !important; }
body.dark .home-card-inner { background-color: #0A2850 !important; color: #C2D2E8 !important; border-color: #143A6E !important; }

/* Home — card image wrapper */
body.dark .card-img-wrapper { background-color: #0D3166 !important; }
body.dark .home-track        { background-color: #0A2850 !important; color: #C2D2E8 !important; border-color: #143A6E !important; }
body.dark .fondo-cuadr-img   { background-color: #0D3166 !important; }
body.dark [class*="bg-primary-200"] { background-color: #0DBBFF !important; }
body.dark .card-clean        { background-color: #0A2850 !important; color: #C2D2E8 !important; border-color: #143A6E !important; }

/* Logros — gemas y sistema */
body.dark .gem-count-card,
body.dark .gem-position-card,
body.dark .gem-table-card,
body.dark .sistema-card,
body.dark .card-header-logros { background-color: #0A2850 !important; color: #C2D2E8 !important; border-color: #143A6E !important; }
body.dark .diam,
body.dark .rubi,
body.dark .esmer { opacity: 0.9 !important; }
body.dark .even { background-color: #071A35 !important; }

/* Hero / banner — transparente para que se vea la imagen de fondo */
body.dark .hero-banner-content,
body.dark .hero-banner-container,
body.dark .slider-full-width,
body.dark .banner-home,
body.dark .carousel,
body.dark .carousel-inner,
body.dark .carousel-item { background-color: transparent !important; }

/* Cards de módulos/categorías en home */
body.dark .modulos-card,
body.dark .categoria-card,
body.dark .card-modulo,
body.dark .card-categoria,
body.dark .home-card,
body.dark .curso-card-home { background-color: #0A2850 !important; border-color: #143A6E !important; color: #C2D2E8 !important; }

/* Secciones con fondo blanco explícito */
body.dark section,
body.dark .section,
body.dark .row-section { background-color: #071A35 !important; }

/* Títulos de sección */
body.dark .section-title,
body.dark .home-section-title { color: #EFF4FB !important; opacity: 1 !important; animation: none !important; }

/* --- NIVEL 2: Overrides para valores hardcodeados --- */

/* Cards genéricas */
body.dark .card,
body.dark .curso-card,
body.dark .curso-card-horizontal,
body.dark .filter-card,
body.dark .card_cursos,
body.dark .card_programas,
body.dark .search-modal,
body.dark .filters-modal,
body.dark .inv-card,
body.dark .card-custom {
  background: #0A2850 !important;
  color: #C2D2E8 !important;
  border-color: #143A6E !important;
}

body.dark .card-header { background-color: #0D3166 !important; border-bottom-color: #143A6E !important; color: #EFF4FB !important; }
body.dark .card-footer { background-color: #0D3166 !important; border-top-color: #143A6E !important; }

/* Sidebar */
body.dark .sidebar-default {
  background-color: #0A2850 !important;
  border-right-color: #143A6E !important;
}
body.dark .sidebar-list .nav-link        { color: #8BA5CC !important; }
body.dark .sidebar-list .nav-link:hover  { background-color: #0D3166 !important; color: #EFF4FB !important; }
body.dark .sidebar-list .nav-link.active { background-color: #0DBBFF !important; color: #EFF4FB !important; }
body.dark .sidebar-divider               { background-color: #143A6E !important; }
body.dark .sidebar-header                { background-color: #0A2850 !important; border-bottom-color: #143A6E !important; }

/* Ocultar menú: sin fondo ni borde (no debe verse "seleccionado") */
body.dark .sidebar .sidebar-header .ocultar-menu-btn {
  background-color: transparent !important;
  border: none !important;
  color: #C2D2E8 !important;
  box-shadow: none !important;
  outline: none !important;
}
body.dark .sidebar .sidebar-header .ocultar-menu-btn svg { stroke: #C2D2E8 !important; }
body.dark .sidebar .sidebar-header .ocultar-menu-btn .icon,
body.dark .sidebar .sidebar-header .ocultar-menu-btn .item-name { color: #C2D2E8 !important; }
body.dark .sidebar .sidebar-header .ocultar-menu-btn:hover { background-color: rgba(255,255,255,0.08) !important; }

/* Header front views (no son .iq-navbar) */
body.dark .header-front,
body.dark .header-front2,
body.dark .header-front-home {
  background-color: #0A2850 !important;
  border-bottom-color: #143A6E !important;
}
/* .header_search fuera del navbar sí va oscuro; dentro del navbar lo maneja #global_search */
body.dark .header_search:not(nav.iq-navbar *) { color: #C2D2E8 !important; background-color: #0D3166 !important; }

/* Tablas DataTables */
body.dark table.dataTable thead th {
  background-color: #0D3166 !important;
  color: #EFF4FB !important;
  border-color: #143A6E !important;
}
body.dark table.dataTable tbody tr        { background-color: #0A2850 !important; }
body.dark table.dataTable tbody tr.odd    { background-color: #071A35 !important; }
body.dark table.dataTable tbody tr:hover  { background-color: #0D3166 !important; }
body.dark table.dataTable tbody td        { color: #C2D2E8 !important; border-color: #143A6E !important; }
body.dark .dataTables_wrapper .dataTables_filter input { background-color: #0D3166 !important; color: #EFF4FB !important; border-color: #1A4A8C !important; }
body.dark .dataTables_wrapper .dataTables_length select { background-color: #0D3166 !important; color: #EFF4FB !important; }
body.dark .dataTables_wrapper .dataTables_info { color: #8BA5CC !important; }

/* Inputs y formularios */
body.dark input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
body.dark select,
body.dark textarea,
body.dark .form-control,
body.dark .form-select {
  background-color: #0D3166 !important;
  color: #EFF4FB !important;
  border-color: #1A4A8C !important;
}
body.dark .form-control:focus,
body.dark .form-select:focus {
  background-color: #143A6E !important;
  border-color: var(--brand-principal-default) !important;
  box-shadow: 0 0 0 0.2rem rgba(55,113,255,0.25) !important;
  color: #EFF4FB !important;
}
body.dark .form-control::placeholder,
body.dark input::placeholder { color: #6B7B9E !important; }
body.dark .input-group-text {
  background-color: #143A6E !important;
  border-color: #1A4A8C !important;
  color: #8BA5CC !important;
}

/* Modales */
body.dark .modal-content {
  background-color: #0A2850 !important;
  color: #C2D2E8 !important;
  border-color: #143A6E !important;
}
body.dark .modal-header {
  border-bottom-color: #143A6E !important;
  background-color: #0D3166 !important;
}
body.dark .modal-footer {
  border-top-color: #143A6E !important;
  background-color: #0D3166 !important;
}

/* Dropdowns */
body.dark .dropdown-menu {
  background-color: #0A2850 !important;
  border-color: #143A6E !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.6) !important;
}
body.dark .dropdown-item         { color: #C2D2E8 !important; }
body.dark .dropdown-item:hover,
body.dark .dropdown-item:focus   { background-color: #0D3166 !important; color: #EFF4FB !important; }
body.dark .dropdown-divider      { border-color: #143A6E !important; }
body.dark .dropdown-header       { color: #8BA5CC !important; }

/* Notificaciones */
body.dark #dropdown-notification          { background-color: #0A2850 !important; }
body.dark #dropdown-notification .p-3     { background-color: #0D3166 !important; }

/* Tabs / nav-pills */
body.dark .nav-tabs .nav-link             { color: #8BA5CC !important; border-color: transparent !important; }
body.dark .nav-tabs .nav-link.active      { background-color: #0D3166 !important; color: #EFF4FB !important; border-color: #143A6E !important; }
body.dark .nav-tabs                       { border-bottom-color: #143A6E !important; }
body.dark .nav-pills .nav-link            { color: #8BA5CC !important; }
body.dark .nav-pills .nav-link.active     { background-color: var(--brand-principal-default) !important; color: #fff !important; }

/* Progress bars */
body.dark .progress                       { background-color: #143A6E !important; }
body.dark .progress-bar                   { background-color: var(--brand-principal-default) !important; }
body.dark .curso-card-body .progress-container { background: #143A6E !important; }

/* Badges */
body.dark .badge-gris                     { background-color: #143A6E !important; color: #C2D2E8 !important; }
body.dark .badge.bg-light                 { background-color: #0D3166 !important; color: #C2D2E8 !important; }

/* Breadcrumb */
body.dark .breadcrumb                     { background-color: transparent !important; }
body.dark .breadcrumb-item               { color: #8BA5CC !important; }
body.dark .breadcrumb-item.active        { color: #C2D2E8 !important; }
body.dark .breadcrumb-item + .breadcrumb-item::before { color: #6B7B9E !important; }

/* Alertas */
body.dark .alert {
  border-color: #143A6E !important;
  background-color: #0D3166 !important;
  color: #C2D2E8 !important;
}

/* Listas */
body.dark .list-group-item {
  background-color: #0A2850 !important;
  border-color: #143A6E !important;
  color: #C2D2E8 !important;
}
body.dark .list-group-item:hover,
body.dark .list-group-item:focus         { background-color: #0D3166 !important; }
body.dark .list-group-item.active        { background-color: var(--brand-principal-default) !important; border-color: var(--brand-principal-default) !important; }

/* Separadores */
body.dark hr { border-color: #143A6E !important; opacity: 1; }

/* Texto auxiliar */
body.dark .text-muted                    { color: #6B7B9E !important; }
body.dark small, body.dark .small        { color: #8BA5CC !important; }
body.dark .text-dark                     { color: #EFF4FB !important; }

/* ── Clases de Colores_de_Texto.css — oscuras en light, deben ser claras en dark ── */
body.dark .neutral-900   { color: #EFF4FB !important; }
body.dark .neutral-700   { color: #C2D2E8 !important; }
body.dark .neutral-500   { color: #8BA5CC !important; }
body.dark .secondary-500 { color: #C2D2E8 !important; }
body.dark .secondary-600 { color: #8BA5CC !important; }
body.dark .secondary-700 { color: #8BA5CC !important; }
body.dark .text-body                     { color: #C2D2E8 !important; }
body.dark h1, body.dark h2, body.dark h3,
body.dark h4, body.dark h5, body.dark h6 { color: #EFF4FB; }

/* Fondos de utilidad */
body.dark .bg-white,
body.dark .bg-light                      { background-color: #0D3166 !important; }
body.dark .bg-body                       { background-color: #071A35 !important; }
body.dark [class*="bg-neutral"]          { background-color: #0A2850 !important; }

/* Scrollbar */
body.dark ::-webkit-scrollbar-track      { background: #071A35; }
body.dark ::-webkit-scrollbar-thumb      { background: #1A4A8C; border-radius: 4px; }
body.dark ::-webkit-scrollbar-thumb:hover{ background: #143A6E; }

/* Accordion */
body.dark .accordion-button              { background-color: #0D3166 !important; color: #EFF4FB !important; }
body.dark .accordion-button:not(.collapsed) { background-color: #143A6E !important; }
body.dark .accordion-body                { background-color: #0A2850 !important; color: #C2D2E8 !important; }
body.dark .accordion-item                { border-color: #143A6E !important; }

/* ── JERARQUÍA DE TEXTO EN DARK MODE ─────────────────────────
   Títulos:   #EFF4FB  (casi blanco)
   Subtítulos: #C2D2E8 (off-white)
   Texto normal: #A8BACC (un tono más bajo)
   Muted/helper: #8BA5CC
   ─────────────────────────────────────────────────────────── */

/* Títulos — blancos */
body.dark h1, body.dark h2, body.dark h3,
body.dark h4, body.dark h5, body.dark h6,
body.dark .fw-bold,
body.dark .titulo-modulo,
body.dark .sub-title2,
body.dark .malla-name,
body.dark .si-label,
body.dark .card-title,
body.dark [class*="title"]:not(.card-img-wrapper),
body.dark [class*="nombre"] { color: #EFF4FB !important; }

/* Sidebar item-name */
body.dark .item-name  { color: #ffffff !important; }
body.dark .caption-title,
body.dark .caption-sub-title { color: #EFF4FB !important; }

/* Texto normal en cards y contenido */
body.dark .descripcion-text,
body.dark .fav-desc,
body.dark .s-title,
body.dark .mc-title,
body.dark .spec-label,
body.dark .progreso-label,
body.dark .content-title,
body.dark .porcentaje-progreso,
body.dark .filtro-label,
body.dark p.lead,
body.dark p.fw-bold,
body.dark td, body.dark th { color: #C2D2E8 !important; }

/* Texto auxiliar / muted */
body.dark .fav-contador,
body.dark .fav-category,
body.dark .fav-cat-curso,
body.dark .fav-cat-academia,
body.dark .si-desc,
body.dark .rank-circle,
body.dark .form-check-label,
body.dark small,
body.dark .text-muted,
body.dark [class*="neutral-color"] { color: #8BA5CC !important; }

/* Footer texto */
body.dark .text-footer,
body.dark p.text-footer { color: #8BA5CC !important; }

/* Footer global en modo dark */
body.dark footer.bg-secondary-500 {
  background-color: #003b73 !important;
}

body.dark footer.bg-secondary-500 .text-footer,
body.dark footer.bg-secondary-500 .text-wrapper-7 {
  color: #d9e9ff !important;
}

body.dark footer.bg-secondary-500 .text-footer strong,
body.dark footer.bg-secondary-500 .text-footer b,
body.dark footer.bg-secondary-500 .text-wrapper-7 strong,
body.dark footer.bg-secondary-500 .text-wrapper-7 b {
  color: #ffffff !important;
}

body.dark footer.bg-secondary-500 .text-white {
  color: #ffffff !important;
}

body.dark footer.bg-secondary-500 .img_logo_footer {
  filter: brightness(0) invert(1);
}

/* Badges de estado — conservar color pero ajustar contraste */
body.dark .estado-badge,
body.dark .fav-status,
body.dark [class*="estado-"] { filter: brightness(1.4) !important; }

/* ─────────────────────────────────────────────────
   Cards de módulos en /home
   El background y color:#1e293b son inline (PHP),
   se necesita !important para ganarles.
───────────────────────────────────────────────── */
/* El gradiente de cada card lo aplica applyModuloCards() en footer.php via JS inline.
   El !important aquí bloquearía ese inline style, así que NO se usa !important en background.
   El border sí lleva !important porque viene del PHP inline y el JS no lo toca. */
body.dark .modulo-home-card {
  background: linear-gradient(135deg, #0A2850 0%, #071A35 100%);
}

body.dark .modulo-home-card__title {
  color: #EFF4FB !important;
}

/* rpill / filtros */
body.dark .rpill { color: #C2D2E8 !important; border-color: #143A6E !important; }

/* Estados de progreso — naranja oscuro → aclarar */
body.dark .fav-status,
body.dark span.fav-status,
body.dark .estado-badge,
body.dark span.estado-badge,
body.dark [class*="estado-en_progreso"],
body.dark [class*="estado-progreso"] {  filter: none !important; }

/* Labels genéricos dentro de formularios y filtros */
body.dark label { color: #C2D2E8 !important; }

/* Span numérico sin clase (rankings, contadores) */
body.dark .evaluaciones-card span,
body.dark .rank-card span,
body.dark span:not([class]) { color: #C2D2E8 !important; }

/* text-danger en dark → versión más clara del rojo */
body.dark .text-danger,
body.dark small.text-danger { color: #FF8A8A !important; }

/* p.mb-1 texto de estado vacío */
body.dark p.mb-1 { color: #8BA5CC !important; }

/* Recompensas logros */
body.dark .si-desc { color: #A8BACC !important; filter: brightness(1.5) !important; }

/* header usuario */
body.dark h6.mb-0 { color: #EFF4FB !important; }

/* Tooltips */
body.dark .tooltip-inner                 { background-color: #0D3166 !important; color: #EFF4FB !important; }

/* Paginación */
/* Paginación — #0DBBFF como color principal, sin hover blanco */
body.dark .page-item .page-link {
  background-color: transparent !important;
  border-color: transparent !important;
  color: #0DBBFF !important;
}
body.dark .page-item .page-link:hover,
body.dark .page-item .page-link:focus {
  background-color: #0DBBFF !important;
  border-color: #0DBBFF !important;
  color: #071A35 !important;
  box-shadow: none !important;
}
body.dark .page-item.active .page-link {
  background-color: #0DBBFF !important;
  border-color: #0DBBFF !important;
  color: #071A35 !important;
  font-weight: 700 !important;
}
body.dark .page-item.disabled .page-link {
  background-color: #071A35 !important;
  border-color: #143A6E !important;
  color: #6B7B9E !important;
}
/* DataTables paginate buttons */
/* DataTables paginate — anula el hover blanco del plugin */
body.dark .dataTables_wrapper .dataTables_paginate .paginate_button:hover,
body.dark .dataTables_wrapper .dataTables_paginate .paginate_button:focus,
body.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.dark .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  background: #0DBBFF !important;
  background-color: #0DBBFF !important;
  border-color: #0DBBFF !important;
  color: #071A35 !important;
  box-shadow: none !important;
  outline: none !important;
}
body.dark .dataTables_wrapper .dataTables_paginate .paginate_button:not(.current):not(.disabled) {
  background: transparent !important;
  background-color: transparent !important;
  border-color: transparent !important;
  color: #0DBBFF !important;
}
body.dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
body.dark .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
  background: transparent !important;
  border-color: #143A6E !important;
  color: #6B7B9E !important;
  cursor: default !important;
}
body.dark .paginate_button.page-item .page-link:hover {
  background-color: #0DBBFF !important;
  color: #071A35 !important;
}

/* ═══════════════════════════════════════════════════════════════
   CURSOS — info_curso / detalle_documento / ver_contenido
════════════════════════════════════════════════════════════════ */

/* info_curso — panel de especificaciones */
body.dark .curso-specs {
  background-color: #0A2850 !important;
  border-color: #143A6E !important;
  color: #C2D2E8 !important;
}
body.dark .curso-media {
  background-color: #0A2850 !important;
  border-color: #143A6E !important;
}
body.dark .spec-icon,
body.dark .spec-icon.bg-soft-blue,
body.dark .spec-icon.bg-soft-purple,
body.dark .spec-icon.bg-soft-amber,
body.dark .spec-icon.bg-soft-green,
body.dark .spec-icon.bg-soft-red { background-color: #0D3166 !important; }

body.dark .spec-value             { color: #C2D2E8 !important; }
body.dark .spec-label             { color: #8BA5CC !important; }
body.dark .curso-specs h3,
body.dark .curso-specs h4,
body.dark .curso-specs h5         { color: #EFF4FB !important; }

/* detalle_documento / ver_contenido — layout de zonas */
body.dark .zone_1_cursos,
body.dark #zone-menu {
  background-color: #0A2850 !important;
  border-color: #143A6E !important;
  color: #C2D2E8 !important;
}
body.dark .zone_1_cursos a,
body.dark #zone-menu a { color: #C2D2E8 !important; }

body.dark .zone_2_cursos .contenedor,
body.dark .contenedor {
  background-color: #0A2850 !important;
  color: #C2D2E8 !important;
  border-color: #143A6E !important;
}

/* Botón descargar certificado disabled */
body.dark .boton-certificado-curso.disabled {
  background-color: #0D3166 !important;
  color: #6B7B9E !important;
  border-color: #143A6E !important;
}
body.dark .zone_1_cursos a.boton-certificado-curso,
body.dark #zone-menu a.boton-certificado-curso {
  background-color: #0DBBFF !important;
  border-color: #0DBBFF !important;
  color: #ffffff !important;
}
body.dark .zone_1_cursos a.boton-certificado-curso i,
body.dark .zone_1_cursos a.boton-certificado-curso span,
body.dark #zone-menu a.boton-certificado-curso i,
body.dark #zone-menu a.boton-certificado-curso span {
  color: #ffffff !important;
}
body.dark .zone_1_cursos a.boton-certificado-curso:hover,
body.dark #zone-menu a.boton-certificado-curso:hover {
  background-color: #00a3e8 !important;
  border-color: #00a3e8 !important;
  color: #ffffff !important;
}

/* Ícono de documento completado */
body.dark .document-type-icon.completed {
  background-color: rgba(72,199,142,0.18) !important;
  border-color: rgba(72,199,142,0.35) !important;
}

/* Acordeón de documentos */
body.dark .accordion-cursos-body     { background-color: #071A35 !important; color: #C2D2E8 !important; }
body.dark .accordion-cursos-button   { background-color: #0A2850 !important; color: #C2D2E8 !important; border-color: #143A6E !important; }
body.dark .accordion-cursos-button:hover { background-color: rgba(255,255,255,0.06) !important; }
body.dark .accordion-cursos-item     { border-color: #143A6E !important; }
body.dark .accordion-cursos-button .content-title,
body.dark .accordion-cursos-button .content-right,
body.dark .accordion-cursos-button .content-right span { color: #EFF4FB !important; }
body.dark .accordion-cursos-button:hover .content-title,
body.dark .accordion-cursos-button:hover .content-right,
body.dark .accordion-cursos-button:hover .content-right span { color: #ffffff !important; }
body.dark .document-type-icon {
  background-color: #143A6E !important;
  color: #ffffff !important;
  border-color: #1A4A8C !important;
}
body.dark .document-type-icon i { color: #ffffff !important; }
body.dark .accordion-cursos-button:hover .document-type-icon,
body.dark .accordion-cursos-button:hover .document-type-icon i { color: #ffffff !important; }

/* Sidebar jerárquico (nodos) en detalle_documento */
body.dark .nodo-grupo {
  background-color: #0A2850 !important;
  border-color: #143A6E !important;
}
body.dark .nodo-grupo-header {
  background-color: #0D3166 !important;
  color: #EFF4FB !important;
}
body.dark .nodo-grupo-header:hover,
body.dark .nodo-grupo-header.activo {
  background-color: #143A6E !important;
  color: #ffffff !important;
}
body.dark .nodo-grupo-nombre,
body.dark .nodo-grupo-count,
body.dark .nodo-chevron { color: #EFF4FB !important; }
body.dark .nodo-grupo-body { background-color: #0A2850 !important; }
body.dark .nodo-doc-item {
  background-color: transparent !important;
  border-left-color: transparent !important;
}
body.dark .nodo-doc-item:hover,
body.dark .nodo-doc-item.is-playing {
  background-color: rgba(255,255,255,0.06) !important;
  border-left-color: #0DBBFF !important;
}
body.dark .nodo-doc-title { color: #C2D2E8 !important; }
body.dark .nodo-doc-item:hover .nodo-doc-title,
body.dark .nodo-doc-item.is-playing .nodo-doc-title { color: #ffffff !important; }
body.dark .nodo-doc-icon {
  background-color: #143A6E !important;
  color: #ffffff !important;
}
body.dark .nodo-doc-icon i,
body.dark .nodo-doc-item:hover .nodo-doc-icon,
body.dark .nodo-doc-item:hover .nodo-doc-icon i,
body.dark .nodo-doc-item.is-playing .nodo-doc-icon,
body.dark .nodo-doc-item.is-playing .nodo-doc-icon i { color: #ffffff !important; }

/* Botón Regresar — .retroceso a tiene background:#fff hardcoded en main.css */
body.dark .retroceso a,
body.dark #zone-menu .retroceso a {
  background: #0D3166 !important;
  border-color: #0DBBFF !important;
  color: #ffffff !important;
}
body.dark .retroceso a:hover,
body.dark #zone-menu .retroceso a:hover {
  background: #0DBBFF !important;
  color: #ffffff !important;
}
body.dark .retroceso a i,
body.dark .retroceso a svg { color: inherit !important; stroke: currentColor !important; }

/* ═══════════════════════════════════════════════════════════════
   LOGROS — dark mode fixes
   Todos los colores vienen de <style> inline en logros.php
════════════════════════════════════════════════════════════════ */

/* Cabeceras de las tablas de gemas — pasteles claros en light */
body.dark .gem-table-hdr.dh { background: rgba(21, 101, 192, 0.18) !important; color: #90CAF9 !important; border-bottom-color: #143A6E !important; }
body.dark .gem-table-hdr.rh { background: rgba(198,  40,  40, 0.15) !important; color: #EF9A9A !important; border-bottom-color: #143A6E !important; }
body.dark .gem-table-hdr.eh { background: rgba( 27,  94,  32, 0.18) !important; color: #A5D6A7 !important; border-bottom-color: #143A6E !important; }

/* Contador de gemas — verde oscuro #1b5e20 ilegible en dark */
body.dark .gem-count-num.dc { color: #90CAF9 !important; }
body.dark .gem-count-num.rc { color: #EF9A9A !important; }
body.dark .gem-count-num.ec { color: #A5D6A7 !important; }

/* Filas de la tabla de gemas */
body.dark .gem-table-card table tr    { background-color: #0A2850 !important; }
body.dark .gem-table-card table tr:hover { background-color: rgba(255,255,255,0.04) !important; }

/* Botones de paginación de las tablas de gemas */
body.dark button[id^="tbody-"],
body.dark .gem-table-card button,
body.dark .gem-position-card button {
  background-color: #0D3166 !important;
  border-color: #143A6E !important;
  color: #C2D2E8 !important;
}
body.dark button[id^="tbody-"]:hover,
body.dark .gem-table-card button:hover { background-color: #0DBBFF !important; color: #071A35 !important; }

/* Píldoras de filtro del ranking (.rpill) */
body.dark .rpill {
  background: #0D3166 !important;
  border-color: #143A6E !important;
  color: #C2D2E8 !important;
}
body.dark .rpill:hover  { border-color: #0DBBFF !important; color: #0DBBFF !important; }
body.dark .rpill.active { background: #0DBBFF !important; border-color: #0DBBFF !important; color: #071A35 !important; }

/* Círculo de posición en ranking */
body.dark .rank-circle.rcn { background: #143A6E !important; color: #C2D2E8 !important; }
body.dark .rank-circle.rc1,
body.dark .rank-circle.rc2,
body.dark .rank-circle.rc3 { color: #ffffff !important; }

/* ═══════════════════════════════════════════════════════════════
   ACADEMIA ABIERTA — dark mode fixes
════════════════════════════════════════════════════════════════ */

/* Badges de estado de curso — background:white hardcoded en main.css */
body.dark .badge-iniciado,
body.dark .badge-completado-sin-aprobar {
  background-color: #0A2850 !important;
}
body.dark .badge-completado,
body.dark .badge-success {
  background-color: #0A2850 !important;
}

/* Botón favorito — círculo blanco sobre imagen del curso */
body.dark .favorite-btn {
  background: #0D3166 !important;
  border-color: #143A6E !important;
  color: #C2D2E8 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4) !important;
}
body.dark .favorite-btn:hover {
  background: #143A6E !important;
}
/* .favorito = clase BASE (siempre presente), .active = estado "es favorito" */
/* Sin .active → no es favorito → fondo oscuro ya heredado de .favorite-btn */
/* Con .active → ES favorito → color primario */
body.dark .favorite-btn.active {
  background: var(--bs-primary) !important;
  border-color: var(--bs-primary) !important;
  color: #fff !important;
}
body.dark .favorite-btn.active i { color: #fff !important; }
body.dark .favorite-btn.active:hover {
  background: var(--bs-primary) !important;
  opacity: 0.85 !important;
}

/* Botón "Subir Certificado" — .btn-white tiene !important en main.css */
body.dark .btn-white,
body.dark .btn-white:hover,
body.dark .btn-white:focus,
body.dark .btn-subir-certificado {
  background-color: #0D3166 !important;
  color: #C2D2E8 !important;
  border-color: #143A6E !important;
}

/* Botón "Recomendar" — clase real: btn-recomendar-curso */
body.dark .btn-recomendar-curso {
  color: #C2D2E8 !important;
  border-color: #143A6E !important;
  --bs-btn-color: #C2D2E8 !important;
  --bs-btn-border-color: #143A6E !important;
}
body.dark .btn-recomendar-curso:hover {
  background-color: rgba(255,255,255,0.06) !important;
  color: #EFF4FB !important;
}

/* Badge de calificación — pasteles claros en main.css */
body.dark .badge-nota-excelente { background-color: rgba( 59,130,246,0.18) !important; color: #93C5FD !important; }
body.dark .badge-nota-bueno     { background-color: rgba(  4,120, 87,0.18) !important; color: #6EE7B7 !important; }
body.dark .badge-nota-regular   { background-color: rgba(180, 83,  9,0.18) !important; color: #FCD34D !important; }
body.dark .badge-nota-bajo,
body.dark .badge-nota-malo      { background-color: rgba(185, 28, 28,0.18) !important; color: #FCA5A5 !important; }

/* ═══════════════════════════════════════════════════════════════
   MÓDULOS — vista lista (mc-list-row) y badges de estado
════════════════════════════════════════════════════════════════ */

/* Botones toggle grid/lista */
body.dark .vt-btn {
  background: #0D3166 !important;
  border-color: #143A6E !important;
  color: #8BA5CC !important;
}
body.dark .vt-btn:hover   { background: #143A6E !important; color: #C2D2E8 !important; }
body.dark .vt-btn.active  { background: #6db33f !important; border-color: #6db33f !important; color: #fff !important; }

/* Fila horizontal (vista lista) */
body.dark .mc-list-row {
  background: #0A2850 !important;
  border-color: #143A6E !important;
}
body.dark .mc-list-row:hover { box-shadow: 0 4px 14px rgba(0,0,0,0.4) !important; }

/* Footer de card */
body.dark .mc-footer { border-top-color: #143A6E !important; }

/* Botón favorito flotante en card */
body.dark .mc-fav {
  background: rgba(13,49,102,0.9) !important;
  color: #8BA5CC !important;
}
body.dark .mc-fav:hover { background: #0D3166 !important; }
body.dark .mc-fav.fav-list {
  background: rgba(255,255,255,0.95) !important;
  color: #0DBBFF !important;
}
body.dark .mc-fav.fav-list:hover { background: #ffffff !important; }
body.dark .mc-list-media .estado-badge { background: rgba(255,255,255,0.92) !important; }
body.dark .mc-list-kicker { color: #8BA5CC !important; }

/* Badges de estado del curso — fondo oscuro semitransparente, borde visible */
body.dark .estado-badge {
  background: rgba(7, 26, 53, 0.85) !important;
  border-width: 1.5px !important;
  border-style: solid !important;
}
body.dark .estado-completado     { color: #4ade80 !important; border-color: #22c55e !important; }
body.dark .estado-en_progreso    { color: #fb923c !important; border-color: #f97316 !important; }
body.dark .estado-pendiente_eval { color: #fbbf24 !important; border-color: #f59e0b !important; }
body.dark .estado-iniciar        { color: #94a3b8 !important; border-color: #475569 !important; }

/* ═══════════════════════════════════════════════════════════════
   PERFIL — dark mode fixes (todos los colores en <style> inline)
════════════════════════════════════════════════════════════════ */
body.dark .perfil-card {
  background-color: #0A2850 !important;
  border-color: #143A6E !important;
  color: #C2D2E8 !important;
}
body.dark .perfil-card-foto {
  background-color: #0A2850 !important;
  border-color: #143A6E !important;
}
body.dark .perfil-section-title { color: #EFF4FB !important; }
body.dark .perfil-label          { color: #C2D2E8 !important; }
body.dark .perfil-icon           { color: #8BA5CC !important; }

body.dark .perfil-input,
body.dark .perfil-textarea,
body.dark .perfil-select {
  background-color: #0D3166 !important;
  color: #EFF4FB !important;
  border-color: #143A6E !important;
}
body.dark .perfil-input:focus,
body.dark .perfil-textarea:focus,
body.dark .perfil-select:focus {
  border-color: #0DBBFF !important;
  box-shadow: 0 0 0 3px rgba(13,187,255,0.15) !important;
}
body.dark .perfil-input:disabled {
  background-color: #071A35 !important;
  color: #6B7B9E !important;
}
body.dark .perfil-input::placeholder,
body.dark .perfil-textarea::placeholder { color: #6B7B9E !important; }

body.dark .btn-perfil-outline {
  color: #C2D2E8 !important;
  border-color: #143A6E !important;
  background-color: transparent !important;
}
body.dark .btn-perfil-outline:hover { background-color: rgba(255,255,255,0.06) !important; }

body.dark .link-item {
  background-color: #0D3166 !important;
  border-color: #143A6E !important;
  color: #C2D2E8 !important;
}

/* ═══════════════════════════════════════════════════════════════
   GUEST / CALENDARIO — FullCalendar + view-btn + inv-card
════════════════════════════════════════════════════════════════ */

/* Botones Mes/Semana/Día */
body.dark .view-btn {
  background-color: #0D3166 !important;
  color: #C2D2E8 !important;
  border-color: #143A6E !important;
}
body.dark .view-btn:hover  { background-color: #143A6E !important; }
body.dark .view-btn.view-btn-active {
  background-color: #0DBBFF !important;
  border-color: #0DBBFF !important;
  color: #071A35 !important;
}

/* CTA "Capacitaciones" en /guest */
body.dark .btn-dia-capacitaciones,
body.dark .btn-dia-capacitaciones i,
body.dark a.btn-dia-capacitaciones {
  color: #ffffff !important;
}
body.dark .filter-btn,
body.dark #filter-estudiante.filter-btn {
  color: #ffffff !important;
}

/* FullCalendar — contenedor principal */
body.dark .fc,
body.dark .fc-view,
body.dark .fc-scrollgrid,
body.dark .fc-daygrid-body { background-color: #0A2850 !important; color: #C2D2E8 !important; }

body.dark .fc .fc-scrollgrid { border-color: #143A6E !important; }
body.dark .fc td, body.dark .fc th { border-color: #143A6E !important; }

/* Cabecera de días (lun, mar, etc.) */
body.dark .fc .fc-col-header-cell { background-color: #0D3166 !important; }
body.dark .fc .fc-col-header-cell-cushion { color: #8BA5CC !important; }

/* Celdas de días */
body.dark .fc .fc-daygrid-day { background-color: #0A2850 !important; }
body.dark .fc .fc-daygrid-day-number { color: #C2D2E8 !important; }

/* Día actual — highlight sutil cyan en vez de azul claro */
body.dark .fc .fc-day-today { background-color: rgba(13,187,255,0.10) !important; }
body.dark .fc .fc-day-today .fc-daygrid-day-number { color: #0DBBFF !important; font-weight: 700 !important; }

/* Semanas en lateral */
body.dark .fc .fc-daygrid-week-number { background-color: #0D3166 !important; color: #8BA5CC !important; }

/* Barra superior del calendario */
body.dark .fc .fc-toolbar-title { color: #EFF4FB !important; }
body.dark .fc .fc-button { background-color: #0D3166 !important; border-color: #143A6E !important; color: #C2D2E8 !important; }
body.dark .fc .fc-button:hover { background-color: #143A6E !important; }
body.dark .fc .fc-button-primary:not(:disabled).fc-button-active { background-color: #0DBBFF !important; border-color: #0DBBFF !important; color: #071A35 !important; }

/* Eventos en el calendario */
body.dark .fc .fc-event { filter: brightness(0.9) !important; }

/* Tarjeta de invitaciones */
body.dark .inv-card-container { background: #0A2850 !important; border-color: #143A6E !important; }
body.dark .inv-card-header     { background: #0D3166 !important; border-bottom-color: #143A6E !important; }
body.dark .inv-card-title      { color: #EFF4FB !important; }
body.dark .inv-card-item       { background: #071A35 !important; border-color: #143A6E !important; }
body.dark .inv-card-item-title { color: #EFF4FB !important; }
body.dark .inv-card-item-desc  { color: #8BA5CC !important; }
body.dark .inv-card-label      { color: #8BA5CC !important; }
body.dark .inv-card-value      { color: #C2D2E8 !important; }

/* ═══════════════════════════════════════════════════════════════
   CAMBIAR CLAVE
════════════════════════════════════════════════════════════════ */
body.dark .password-card {
  background-color: rgba(3,169,244,0.12) !important;
  border-color: rgba(3,169,244,0.4) !important;
  color: #C2D2E8 !important;
}
body.dark .password-card-alert {
  background-color: rgba(255,152,0,0.12) !important;
  border-color: rgba(255,152,0,0.4) !important;
  color: #C2D2E8 !important;
}
/* Títulos con inline color:#212121 en el view */
body.dark .password-card   .font-medium,
body.dark .password-card-alert .font-medium { color: #EFF4FB !important; }

/* SweetAlert2 toast — fondo blanco hardcoded en swal2 */
body.dark .swal2-popup.swal2-toast {
  background-color: #0A2850 !important;
  color: #C2D2E8 !important;
  border: 1px solid #143A6E !important;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important;
}
body.dark .swal2-popup.swal2-toast .swal2-title { color: #EFF4FB !important; }
body.dark .swal2-popup.swal2-toast .swal2-html-container,
body.dark .swal2-popup.swal2-toast .swal2-content { color: #C2D2E8 !important; }
body.dark .swal2-popup.swal2-toast .swal2-timer-progress-bar { background: rgba(13,187,255,0.6) !important; }
body.dark .swal2-popup.swal2-toast .swal2-close { color: #8BA5CC !important; }

/* Círculos de posición en rankings (logros) */
body.dark .rank-circle.rc1,
body.dark .rank-circle.rc2,
body.dark .rank-circle.rc3,
body.dark .rank-badge-solid.rank-badge-1,
body.dark .rank-badge-solid.rank-badge-2,
body.dark .rank-badge-solid.rank-badge-3 {
  background-color: #ffffff !important;
  color: #0A2850 !important;
}
body.dark .rank-badge-solid.rank-badge-1 *,
body.dark .rank-badge-solid.rank-badge-2 *,
body.dark .rank-badge-solid.rank-badge-3 * {
  color: #ffffff !important;
}
body.dark .rank-badge-other { background-color: #143A6E !important; color: #C2D2E8 !important; }

/* Tabla de programas — filas blancas */
body.dark table tr { background-color: #0A2850 !important; }

/* Botones de switch de ranking (Cursos / Programas) */
body.dark .ranking-pill-switch .js-ranking-toggle {
  background: #0D3166 !important;
  border-color: #0DBBFF !important;
  color: #0DBBFF !important;
}
body.dark .ranking-pill-switch .js-ranking-toggle:hover  { background: rgba(13,187,255,0.12) !important; }
body.dark .ranking-pill-switch .js-ranking-toggle.active { background: #0DBBFF !important; color: #071A35 !important; border-color: #0DBBFF !important; }

/* Título de contenidos — hardcoded #111827 en inline CSS del view */
body.dark .titulo-contenidos-curso { color: #EFF4FB !important; }

/* Pill de dudas/FAQ */
body.dark .results-pill-2 {
  background-color: #0D3166 !important;
  color: #C2D2E8 !important;
  border-color: #143A6E !important;
}
body.dark .results-pill-2:hover { background-color: #143A6E !important; }
body.dark .results-pill-2 span,
body.dark .results-pill-2 i { color: #C2D2E8 !important; }

/* Botón Realizar */
body.dark .btn-action-realizar {
  background-color: #0DBBFF !important;
  border-color: #0DBBFF !important;
  color: #071A35 !important;
}
body.dark .btn-action-realizar:hover {
  background-color: #00a3e8 !important;
  border-color: #00a3e8 !important;
  color: #fff !important;
}

/* Botón Evaluación final (detalle_documento) */
body.dark .zone_1_cursos a.btn-evaluacion-final,
body.dark #zone-menu a.btn-evaluacion-final {
  background-color: #0DBBFF !important;
  border-color: #0DBBFF !important;
  color: #ffffff !important;
}
body.dark .zone_1_cursos a.btn-evaluacion-final:hover,
body.dark #zone-menu a.btn-evaluacion-final:hover {
  background-color: #00a3e8 !important;
  border-color: #00a3e8 !important;
  color: #fff !important;
}
body.dark .barra-progreso { background: #0DBBFF !important; }

/* Offcanvas */
body.dark .offcanvas                     { background-color: #0A2850 !important; color: #C2D2E8 !important; }
body.dark .offcanvas-header              { border-bottom-color: #143A6E !important; }

/* Tabs de sección — evaluaciones/carpetas */
body.dark .cert-tab {
  background: #0D3166 !important;
  color: #0DBBFF !important;
  border-color: #0DBBFF !important;
}
body.dark .cert-tab:hover  { background: rgba(13,187,255,0.12) !important; }
body.dark .cert-tab.active {
  background: #0DBBFF !important;
  color: #071A35 !important;
  border-color: #0DBBFF !important;
}

/* ═══════════════════════════════════════════════════════════════
   EVALUACIONES / CARPETAS — dark mode fixes
   Clases auditadas con Playwright en /evaluaciones/carpetas/9
════════════════════════════════════════════════════════════════ */

/* Contenedor principal de la tabla */
body.dark .contenedor-tabla {
  background-color: #0A2850 !important;
  border-color: #143A6E !important;
  color: #C2D2E8 !important;
}

/* Filas de DataTables — mismo tono para odd y even */
body.dark table.dataTable tbody tr.odd,
body.dark table.dataTable tbody tr.even,
body.dark .contenedor-tabla tbody tr.odd,
body.dark .contenedor-tabla tbody tr.even,
body.dark .contenedor-tabla tbody tr {
  background-color: #0A2850 !important;
}
body.dark table.dataTable tbody tr.odd > *,
body.dark table.dataTable tbody tr.even > *,
body.dark .contenedor-tabla tbody tr > td {
  background-color: #0A2850 !important;
  box-shadow: none !important;
}

/* Título dentro del contenedor */
body.dark .contenedor-tabla h2,
body.dark .contenedor-tabla h3,
body.dark .contenedor-tabla h4,
body.dark .contenedor-tabla .table-title { color: #EFF4FB !important; }

/* Selector de filas "Filas: 10" */
body.dark .rows-config {
  background-color: #0D3166 !important;
  border-color: #143A6E !important;
  color: #C2D2E8 !important;
}
body.dark .rows-config select,
body.dark .rows-config span { color: #C2D2E8 !important; background-color: #0D3166 !important; }

/* Status badges — fondo oscuro semitransparente con el color del estado */
body.dark .status-badge {
  background-color: #0D3166 !important;
  border-color: #143A6E !important;
}
body.dark .status-badge.status-pending  { background-color: rgba(244,67,54,0.12) !important; border-color: rgba(244,67,54,0.35) !important; color: #FF8A8A !important; }
body.dark .status-badge.status-completed { background-color: rgba(72,199,142,0.12) !important; border-color: rgba(72,199,142,0.35) !important; color: #74d7a4 !important; }
body.dark .status-badge.status-in-progress { background-color: rgba(251,169,76,0.12) !important; border-color: rgba(251,169,76,0.35) !important; color: #FBA94C !important; }

/* Grade pills */
body.dark .grade-pill {
  background-color: #0D3166 !important;
  border-color: #143A6E !important;
  color: #C2D2E8 !important;
}
body.dark .grade-pill.grade-low  { background-color: rgba(244,67,54,0.12) !important; border-color: rgba(244,67,54,0.35) !important; color: #FF8A8A !important; }
body.dark .grade-pill.grade-high,
body.dark .grade-pill.grade-pass { background-color: rgba(72,199,142,0.12) !important; border-color: rgba(72,199,142,0.35) !important; color: #74d7a4 !important; }
body.dark .grade-pill.grade-mid  { background-color: rgba(251,169,76,0.12) !important; border-color: rgba(251,169,76,0.35) !important; color: #FBA94C !important; }

/* Icono de malla */
body.dark .malla-icon-container {
  background-color: #0D3166 !important;
  border-color: #1a6ed8 !important;
  color: #6EB3F7 !important;
}

/* ── Vista de video (video.php) ── */
body.dark .video-card {
  background: #0A2850 !important;
  box-shadow: 0 2px 12px rgba(0,0,0,.3) !important;
}
body.dark .video-title-label { color: #64748b !important; }
body.dark .video-title        { color: #f1f5f9 !important; }
