/* CARRERA 25N — normalización de superficies y contraste — 09NOV2026
   Una única capa final de diseño para inicio, login, dashboard y 404.
   No modifica JS de inscripción, credenciales, reglas ni datos. */
:root{
  --c25-bg:#fcfafc;
  --c25-card:#ffffff;
  --c25-card-alt:#f7f1f8;
  --c25-field:#ffffff;
  --c25-line:#e5dce9;
  --c25-ink:#291a34;
  --c25-sub:#62556e;
  --c25-soft:#ebe1ef;
  --c25-accent:#a33268;
  --c25-accent-on:#fff;
  --c25-purple:#5f267a;
  --c25-orange:#c74013;
  --c25-shadow:0 10px 35px rgba(44,20,61,.07);
}
:root[data-theme="dark"]{
  /* Gris berenjena, sin bandas negro/púrpura inconsistentes */
  --c25-bg:#17151c;
  --c25-card:#24212b;
  --c25-card-alt:#2e2935;
  --c25-field:#302b38;
  --c25-line:#554b5d;
  --c25-ink:#faf7fb;
  --c25-sub:#d1c8d8;
  --c25-soft:#393341;
  --c25-accent:#f8b9dc;
  --c25-accent-on:#20131d;
  --c25-purple:#e2b7f3;
  --c25-orange:#ff9863;
  --c25-shadow:0 15px 40px rgba(4,3,7,.15);
  --theme-bg:var(--c25-bg);
  --theme-surface:var(--c25-card);
  --theme-soft:var(--c25-card-alt);
  --theme-line:var(--c25-line);
  --theme-text:var(--c25-ink);
  --theme-muted:var(--c25-sub);
  --theme-brand:var(--c25-purple);
  --theme-clock:var(--c25-card-alt);
  --unified-bg:var(--c25-bg);
  --unified-surface:var(--c25-card);
  --unified-ink:var(--c25-ink);
  --unified-muted:var(--c25-sub);
  --unified-line:var(--c25-line);
  --unified-soft:var(--c25-card-alt);
  --unified-link:var(--c25-purple);
  --ink:var(--c25-ink);
  --muted:var(--c25-sub);
  --ivory:var(--c25-bg);
  --border:var(--c25-line);
  --violet:var(--c25-purple);
  --orange:var(--c25-orange);
  color-scheme:dark;
}
html[data-theme="dark"] body,
html[data-theme="dark"] body.page-dashboard,
html[data-theme="dark"] .page-login,
html[data-theme="dark"] .page-404{
  background:var(--c25-bg)!important;color:var(--c25-ink)!important;
}
html[data-theme="dark"] body main{background:var(--c25-bg);color:var(--c25-ink)}
/* Mantener el hero con su banner como excepción a la superficie neutra. */
html[data-theme="dark"] body main>.hero{background:#211624!important;color:#fff}
html[data-theme="dark"] .hero-cover{opacity:.81}
html[data-theme="dark"] .hero-description,
html[data-theme="dark"] .hero-location,
html[data-theme="dark"] .hero-detail{color:#f5e8f5}
html[data-theme="dark"] .hero-detail strong{color:#fff}

/* Fondo homogéneo en todas las secciones: se acaba el ajedrezado de bloques. */
html[data-theme="dark"] main>.section,
html[data-theme="dark"] #acerca,
html[data-theme="dark"] #convocatoria,
html[data-theme="dark"] #recorrido,
html[data-theme="dark"] #paquetes,
html[data-theme="dark"] #registro,
html[data-theme="dark"] #preguntas,
html[data-theme="dark"] .overview,
html[data-theme="dark"] .details-section,
html[data-theme="dark"] .kit-section,
html[data-theme="dark"] .form-section-outer,
html[data-theme="dark"] .faq-section,
html[data-theme="dark"] .faq-section.shell{
  background:transparent!important;color:var(--c25-ink);
}
/* Textos y acentos, legibles en condiciones reales de brillo bajo. */
html[data-theme="dark"] :is(.overview-top,.section-head,.split-section,.registration-intro,.subpage-copy,.tab-panel,.kit-card,.support-card,.notice,.notice-amber,.faq-list,.form-card) :is(p,li,small){color:var(--c25-sub)}
html[data-theme="dark"] :is(.section-head,.overview-top,.split-section,.registration-intro,.subpage-copy,.tab-panel,.kit-card,.support-card,.faq-section) :is(h1,h2,h3,h4){color:var(--c25-ink)}
html[data-theme="dark"] :is(.overview-top,.registration-intro,.subpage-copy) h2 span,
html[data-theme="dark"] :is(.split-section,.section-head,.faq-section) h2 span{color:var(--c25-purple)}
html[data-theme="dark"] .section-kicker,
html[data-theme="dark"] .map-mini{color:var(--c25-orange)}
html[data-theme="dark"] .download-link,
html[data-theme="dark"] :is(.kit-card,.support-card,.checkbox-line) a{color:var(--c25-purple)}
html[data-theme="dark"] a:hover{color:#ffd1ac}

/* Las superficies blancas, marrones y moradas se normalizan a un único nivel. */
html[data-theme="dark"] :is(.metrics,.support-card,.tab-content,.kit-card,.date-badge,.form-card,.faq-list details,.registration-hint,.preview-alert,.route-map-card,.admin-login-form,.subpage-art,.route-art,.route-map-footer,.route-map-top,.award-grid>div){
  background:var(--c25-card)!important;color:var(--c25-ink);border-color:var(--c25-line)!important;
  box-shadow:var(--c25-shadow);
}
html[data-theme="dark"] .metrics>div{border-color:var(--c25-line)}
html[data-theme="dark"] .support-card{border-top:4px solid var(--c25-orange)!important}
html[data-theme="dark"] .support-card>span{color:var(--c25-orange)}
html[data-theme="dark"] .support-card>strong{color:var(--c25-orange)}
html[data-theme="dark"] .support-card p{color:var(--c25-sub)}
html[data-theme="dark"] :is(.metrics,.info-list) span,
html[data-theme="dark"] .metrics small{color:var(--c25-sub)}
html[data-theme="dark"] :is(.metrics,.info-list) strong{color:var(--c25-ink)}
html[data-theme="dark"] .tab-button:not(.active){background:var(--c25-card-alt)!important;color:var(--c25-sub)!important;border-color:var(--c25-line)!important}
html[data-theme="dark"] .tab-button:not(.active) strong{color:var(--c25-ink)!important}
html[data-theme="dark"] .tab-button.active{background:#5d2c70!important;border-color:#9465a7!important;color:#fff!important}
html[data-theme="dark"] .tab-button.active strong{color:#fff}
html[data-theme="dark"] .notice-amber{border-left:4px solid var(--c25-orange)!important;background:var(--c25-card-alt)!important;color:var(--c25-ink)!important}
html[data-theme="dark"] .notice-amber :is(p,small){color:var(--c25-sub)!important}
html[data-theme="dark"] .kit-ribbon,
html[data-theme="dark"] .route-art{background:var(--c25-card)!important;color:var(--c25-ink)!important;border:1px solid var(--c25-line)!important}
html[data-theme="dark"] .kit-ribbon :is(strong,p),
html[data-theme="dark"] .route-art :is(strong,small){color:var(--c25-ink)!important}

/* FAQ: títulos con aire, sin grandes bandas oscuras contiguas. */
html[data-theme="dark"] .faq-list{background:transparent!important;border:0}
html[data-theme="dark"] .faq-list details{margin:0 0 10px;border:1px solid var(--c25-line)!important;border-radius:14px;overflow:hidden}
html[data-theme="dark"] .faq-list summary{background:var(--c25-card)!important;color:var(--c25-ink)!important;min-height:66px;display:flex;justify-content:space-between;align-items:center;gap:12px;padding:18px 22px;font-weight:750;cursor:pointer}
html[data-theme="dark"] .faq-list details[open] summary{background:var(--c25-card-alt)!important}
html[data-theme="dark"] .faq-list details>p{padding:3px 22px 20px;margin:0;color:var(--c25-sub)!important}
html[data-theme="dark"] .faq-list summary span{color:var(--c25-orange)}

/* Contador y paneles con contraste nítido. */
html[data-theme="dark"] .countdown-wrap{
  background:var(--c25-card)!important;border:1px solid var(--c25-line)!important;
  box-shadow:0 15px 38px rgba(0,0,0,.23);color:var(--c25-ink)!important;
}
html[data-theme="dark"] .countdown-label strong{color:var(--c25-ink)!important}
html[data-theme="dark"] .countdown-label small{color:var(--c25-sub)!important}
html[data-theme="dark"] .countdown div{background:var(--c25-card-alt)!important;border:1px solid var(--c25-line)!important}
html[data-theme="dark"] .countdown strong{color:var(--c25-purple)!important}
html[data-theme="dark"] .countdown small{color:var(--c25-sub)!important}
html[data-theme="dark"] .countdown-link{color:var(--c25-purple)!important}
html[data-theme="dark"] .button-purple{background:#6d347e!important;color:#fff!important}
html[data-theme="dark"] .button-outline{border:1px solid #b79cbd;color:#fff;background:rgba(34,18,41,.55)}
html[data-theme="dark"] .button-outline:hover{background:#3a2c42}

/* Formularios: misma capa de superficie y contraste en los dos accesos. */
html[data-theme="dark"] :is(.field,.admin-login-form) label{color:var(--c25-ink)!important}
html[data-theme="dark"] :is(.field,.admin-login-form) :is(input,select,textarea),
html[data-theme="dark"] .page-dashboard :is(input,select,textarea){background:var(--c25-field)!important;color:var(--c25-ink)!important;border:1px solid #85738e!important;color-scheme:dark}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:#cbbdd1!important;opacity:1}
html[data-theme="dark"] :is(.field,.admin-login-form) :is(input,select,textarea):focus{border-color:var(--c25-purple)!important;box-shadow:0 0 0 3px rgba(224,180,245,.18)}
html[data-theme="dark"] .checkbox-line{color:var(--c25-sub)!important}
html[data-theme="dark"] .form-card .form-section{border-color:var(--c25-line)}
html[data-theme="dark"] .step-no{color:var(--c25-orange)!important;background:var(--c25-card-alt)!important}
html[data-theme="dark"] .form-header,
html[data-theme="dark"] .form-lead,
html[data-theme="dark"] .progress-heading,
html[data-theme="dark"] .form-overline,
html[data-theme="dark"] .registration-note{color:var(--c25-sub)!important}
html[data-theme="dark"] .form-status{background:var(--c25-card-alt);color:var(--c25-purple)!important;border:1px solid var(--c25-line)}
html[data-theme="dark"] .progress-track{background:var(--c25-card-alt)}
html[data-theme="dark"] .registration-steps>div{border-color:var(--c25-line)}
html[data-theme="dark"] .registration-hint b{color:var(--c25-ink)}
html[data-theme="dark"] .pw-toggle{color:var(--c25-ink)!important;background:var(--c25-card-alt)!important;border-color:var(--c25-line)!important}

/* Google Maps: panel neutro y rótulos claros, no una gran tarjeta púrpura. */
.route-map-card{overflow:hidden}
.route-map-iframe{width:100%;height:clamp(330px,37vw,480px);border:0;background:#eceaf0}
.route-map-stoplist{list-style:none;display:flex;flex-wrap:wrap;gap:8px;margin:0!important;padding:0!important}
.route-map-stoplist li{padding:9px 12px;border:1px solid var(--c25-line);border-radius:12px;background:var(--c25-card-alt);color:var(--c25-ink);font-size:12px;font-weight:800;line-height:1.45}
.route-map-stoplist li:not(:last-child)::after{content:' →';color:var(--c25-orange);font-weight:900}
.route-map-top,.route-map-footer{background:var(--c25-card)}
.route-map-top strong{color:var(--c25-ink)!important}
.route-map-footer p{color:var(--c25-ink)!important}
.route-map-note{color:var(--c25-sub)!important}
.route-map-live{color:#156e3c}
html[data-theme="dark"] .route-map-live{color:#a5eec6!important}
html[data-theme="dark"] .route-map-live>span{background:#6ce1aa}
html[data-theme="dark"] .route-google-link{background:#6d347e!important;color:#fff!important;border-color:#9264a2!important}
html[data-theme="dark"] .route-map-stoplist li{background:var(--c25-card-alt);color:var(--c25-ink);border-color:var(--c25-line)}
html[data-theme="dark"] .route-map-note{color:var(--c25-sub)!important}

/* Dashboard: todos los estados, especialmente botones desactivados. */
html[data-theme="dark"] body.page-dashboard .layout{background:var(--c25-bg)!important;color:var(--c25-ink)!important}
html[data-theme="dark"] body.page-dashboard :is(.stat,.panel,.local-data-panel,.notice){background:var(--c25-card)!important;color:var(--c25-ink)!important;border-color:var(--c25-line)!important;box-shadow:var(--c25-shadow)}
html[data-theme="dark"] body.page-dashboard :is(.stat small,.bar-head,.notice,.local-status,.local-count,.bottom-note){color:var(--c25-sub)!important}
html[data-theme="dark"] body.page-dashboard :is(.panel h2,.local-heading h2,.stat strong){color:var(--c25-ink)!important}
html[data-theme="dark"] body.page-dashboard .stat strong{color:var(--c25-purple)!important}
html[data-theme="dark"] body.page-dashboard .local-heading .eyebrow{color:var(--c25-orange)!important}
html[data-theme="dark"] body.page-dashboard :is(.filters select,.filters button,.local-actions button,.local-actions label.details-button,.details-button,#clear-filters){
  color:var(--c25-ink)!important;background:var(--c25-card-alt)!important;border:1px solid var(--c25-line)!important;
}
html[data-theme="dark"] body.page-dashboard :is(.filters button,.local-actions button,.details-button):hover:not(:disabled){background:#46364d!important;border-color:#a889b5!important}
html[data-theme="dark"] body.page-dashboard :is(.local-actions button,.filters button,.details-button):disabled{
  background:#33303a!important;color:#c0b7c9!important;border-color:#5c5264!important;opacity:1!important;cursor:not-allowed;
}
html[data-theme="dark"] body.page-dashboard :is(.local-data-panel,.local-results,.table-scroll){background:var(--c25-card)!important}
html[data-theme="dark"] body.page-dashboard #local-table{background:var(--c25-card);color:var(--c25-ink)}
html[data-theme="dark"] body.page-dashboard #local-table th{background:#342d3d!important;color:var(--c25-ink)!important;border-color:var(--c25-line)}
html[data-theme="dark"] body.page-dashboard #local-table td{background:var(--c25-card)!important;color:var(--c25-ink)!important;border-color:var(--c25-line)}
html[data-theme="dark"] body.page-dashboard #details-dialog{background:var(--c25-card)!important;color:var(--c25-ink)!important;border-color:var(--c25-line)}
html[data-theme="dark"] body.page-dashboard #details-dialog :is(dt,dd){color:var(--c25-ink)}
html[data-theme="dark"] body.page-dashboard #connection{color:#fff!important;background:rgba(255,255,255,.12)!important}
html[data-theme="dark"] body.page-dashboard .intro{background:linear-gradient(130deg,#312039,#4b2c56)!important}
html[data-theme="dark"] body.page-dashboard .intro :is(h1,p){color:#fff!important}
html[data-theme="dark"] body.page-dashboard .intro .eyebrow{color:#ffb992!important}
html[data-theme="dark"] .session-box{background:var(--c25-card-alt);border-color:var(--c25-line);color:var(--c25-ink)}
html[data-theme="dark"] .session-box button{background:var(--c25-soft);color:var(--c25-ink);border-color:var(--c25-line)}
html[data-theme="dark"] .session-box #session-timer{color:var(--c25-purple)}

/* Footer común — una sola superficie distinta del cuerpo, sin logo sobre recuadro. */
html[data-theme="dark"] footer.footer{background:#1d1724!important;border-top:1px solid #403447}
html[data-theme="dark"] footer.footer :is(p,small,a,.footer-bottom){color:#e2d9e7!important}
html[data-theme="dark"] footer.footer strong{color:#ffb58f!important}
footer.footer img[data-footer-logo]{background:transparent!important;box-shadow:none!important;object-fit:contain}

/* Uniformidad y respiración entre secciones: no tocar reflow de escritorio. */
#preguntas{margin-top:0!important}
#preguntas .faq-list{margin-top:24px}
#recorrido{position:relative}
#recorrido .split-section{align-items:start}
#recorrido .split-section>div{min-width:0}
@media (max-width:980px){#recorrido .split-section{grid-template-columns:1fr!important}}
@media (max-width:640px){
 .route-map-iframe{height:340px}
 .route-map-stoplist li{width:100%}
 html[data-theme="dark"] .faq-list summary{padding:16px 18px}
 #preguntas{padding-top:46px}
}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto}}
/* Texto de FAQ con familia real de respaldo; evita serif al fallar carga de fuentes remotas. */
html[data-theme="dark"] .faq-list summary,
html[data-theme="light"] .faq-list summary{font:800 clamp(15px,1.25vw,17px)/1.4 Outfit,'DM Sans',system-ui,Arial,sans-serif}
html[data-theme="dark"] .faq-list details{padding:0!important}
html[data-theme="dark"] .faq-list summary{margin:0}
html[data-theme="dark"] .faq-list details>p{font-family:'DM Sans',system-ui,Arial,sans-serif}
html[data-theme="dark"] .faq-list{max-width:100%;width:min(100%,950px)}
/* Estados del dashboard: el ID del botón tiene más especificidad que las reglas antiguas. */
html[data-theme="dark"] body.page-dashboard #export-pdf:disabled,
html[data-theme="dark"] body.page-dashboard #export-local:disabled{
  background:#34303b!important;color:#d4c9da!important;border:1px solid #655970!important;
  opacity:1!important;box-shadow:none!important;cursor:not-allowed;
}
