/* Modo oscuro global — se activa con data-theme="dark" en <html>
 * Paleta: fondo #18191a · panel #242526 · hover #3a3b3c · texto #e4e6eb · secundario #b0b3b8
 */

:root[data-theme="dark"] .ecocfg-idioma-opt { border-color: #3a3b3c; background: #242526; }
:root[data-theme="dark"] .ecocfg-idioma-opt:has(input:checked) { background: #1f3a1f; }

:root[data-theme="dark"] .ecocfg-pwd-bar { background: #3a3b3c; }

/* Modo oscuro básico (data-theme="dark" en <html>) */
:root[data-theme="dark"] { color-scheme: dark; }
:root[data-theme="dark"] body { background: #18191a; color: #e4e6eb; }
:root[data-theme="dark"] .ecocfg-titulo { color: #e4e6eb; }
:root[data-theme="dark"] .ecocfg-sub,
:root[data-theme="dark"] .ecocfg-card-desc,
:root[data-theme="dark"] .ecocfg-bloq-info small,
:root[data-theme="dark"] .ecocfg-act-body small { color: #b0b3b8; }
:root[data-theme="dark"] .ecocfg-search,
:root[data-theme="dark"] .ecocfg-card { background: #242526; color: #e4e6eb; }
:root[data-theme="dark"] .ecocfg-card:hover { background: #3a3b3c; }
:root[data-theme="dark"] .ecocfg-card-title,
:root[data-theme="dark"] .ecocfg-section-titulo,
:root[data-theme="dark"] .ecocfg-accordion-titulo,
:root[data-theme="dark"] .ecocfg-bloq-nombre,
:root[data-theme="dark"] .ecocfg-act-linea { color: #e4e6eb; }
:root[data-theme="dark"] .ecocfg-search input { color: #e4e6eb; }
:root[data-theme="dark"] .ecocfg-accordion { background: #242526; border-color: #3a3b3c; }
:root[data-theme="dark"] .ecocfg-accordion-body { border-color: #3a3b3c; }
:root[data-theme="dark"] .ecocfg-bloq-item,
:root[data-theme="dark"] .ecocfg-act-item { border-color: #3a3b3c; }
:root[data-theme="dark"] .ecocfg-act-icon { background: #3a3b3c; }
:root[data-theme="dark"] .ecocfg-act-item:hover { background: #3a3b3c; }

/* Perfil (ecop-*) en dark */
:root[data-theme="dark"] .ecop-wrap,
:root[data-theme="dark"] .ecop-body,
:root[data-theme="dark"] .ecop-tab-content { background: #18191a; color: #e4e6eb; }
:root[data-theme="dark"] .ecop-header { background: #242526; border-color: #3a3b3c; }
:root[data-theme="dark"] .ecop-topinfo { background: #242526; }
:root[data-theme="dark"] .ecop-nombre,
:root[data-theme="dark"] .ecop-info-card h3,
:root[data-theme="dark"] .ecop-info-lista dt,
:root[data-theme="dark"] .ecop-amigo-nombre,
:root[data-theme="dark"] .ecop-form-group label { color: #e4e6eb; }
:root[data-theme="dark"] .ecop-bio-corta,
:root[data-theme="dark"] .ecop-info-lista dd,
:root[data-theme="dark"] .ecop-stat-label { color: #b0b3b8; }
:root[data-theme="dark"] .ecop-tabs { background: #242526; border-color: #3a3b3c; }
:root[data-theme="dark"] .ecop-tab { color: #b0b3b8; }
:root[data-theme="dark"] .ecop-tab:hover { background: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .ecop-tab.activa { color: var(--color-acento, #4CAF50); }
:root[data-theme="dark"] .ecop-tab-num { background: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .ecop-info-card { background: #242526; border-color: #3a3b3c; }
:root[data-theme="dark"] .ecop-form-group input,
:root[data-theme="dark"] .ecop-form-group textarea,
:root[data-theme="dark"] .ecop-form-group select,
:root[data-theme="dark"] .ecop-info-card input[type="text"],
:root[data-theme="dark"] .ecop-info-card input[type="password"],
:root[data-theme="dark"] .ecop-info-card textarea,
:root[data-theme="dark"] .ecop-info-card select { background: #3a3b3c; color: #e4e6eb; border-color: #4b4d51; }
:root[data-theme="dark"] .ecop-foto { background: #3a3b3c; }
:root[data-theme="dark"] .ecop-portada-btn,
:root[data-theme="dark"] .ecop-avatar-btn { background: rgba(30,30,30,.85); color: #e4e6eb; border-color: #3a3b3c; }

/* Feed / post-card en dark */
:root[data-theme="dark"] .eco-post { background: #242526; border-color: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .eco-post-autor,
:root[data-theme="dark"] .eco-post-contenido { color: #e4e6eb; }
:root[data-theme="dark"] .eco-post-tiempo,
:root[data-theme="dark"] .eco-post-contador,
:root[data-theme="dark"] .eco-post-contador-derecha,
:root[data-theme="dark"] .eco-accion-num { color: #b0b3b8; }
:root[data-theme="dark"] .eco-post-menu:hover { background: #3a3b3c; }
:root[data-theme="dark"] .eco-post-menu-panel { background: #242526; border-color: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .eco-post-menu-panel button { color: #e4e6eb; }
:root[data-theme="dark"] .eco-post-menu-panel button:hover { background: #3a3b3c; }
:root[data-theme="dark"] .eco-post-acciones { border-color: #3a3b3c; }
:root[data-theme="dark"] .eco-post-accion { color: #b0b3b8; }
:root[data-theme="dark"] .eco-post-accion:hover { background: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .eco-post-accion-reaccion.activa { background: #1f3a1f; color: #a5d6a7; }
:root[data-theme="dark"] .eco-post-contador { border-color: #3a3b3c; }
:root[data-theme="dark"] .eco-post-contador-btn { color: #b0b3b8; }
:root[data-theme="dark"] .eco-post-contador-btn:hover { background: #3a3b3c; }
:root[data-theme="dark"] .eco-post-cita { background: #18191a; border-color: #3a3b3c; }
:root[data-theme="dark"] .eco-post-cita:hover { background: #242526; }
:root[data-theme="dark"] .eco-post-cita-autor,
:root[data-theme="dark"] .eco-post-cita-contenido { color: #e4e6eb; }
:root[data-theme="dark"] .eco-post-cita-tiempo { color: #b0b3b8; }
:root[data-theme="dark"] .eco-post-cita-borrada { border-color: #3a3b3c; color: #b0b3b8; }
:root[data-theme="dark"] .eco-reaccion-picker { background: #242526; border-color: #3a3b3c; }

/* Comentarios en dark */
:root[data-theme="dark"] .eco-comentarios { background: #18191a; border-color: #3a3b3c; }
:root[data-theme="dark"] .eco-comentario-bubble { background: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .eco-comentario-autor { color: #e4e6eb; }
:root[data-theme="dark"] .eco-comentario-texto { color: #e4e6eb; }
:root[data-theme="dark"] .eco-comentario-acciones button,
:root[data-theme="dark"] .eco-comentario-tiempo { color: #b0b3b8; }
:root[data-theme="dark"] .eco-comment-input-wrap,
:root[data-theme="dark"] .eco-comment-input { background: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .eco-comment-input-wrap:focus-within { background: #4b4d51; }
:root[data-theme="dark"] .eco-comment-input::placeholder { color: #b0b3b8; }

/* Modales y compartir en dark */
:root[data-theme="dark"] .eco-modal { background: rgba(0,0,0,.75); }
:root[data-theme="dark"] .eco-modal-card { background: #242526; color: #e4e6eb; border-color: #3a3b3c; }
:root[data-theme="dark"] .eco-modal-card h3 { color: #e4e6eb; }
:root[data-theme="dark"] .eco-modal-card input[type="text"],
:root[data-theme="dark"] .eco-modal-card input[type="password"],
:root[data-theme="dark"] .eco-modal-card textarea,
:root[data-theme="dark"] .eco-modal-card select { background: #3a3b3c; color: #e4e6eb; border-color: #4b4d51; }
:root[data-theme="dark"] .eco-share-head { border-color: #3a3b3c; }
:root[data-theme="dark"] .eco-share-close { background: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .eco-share-close:hover { background: #4b4d51; }
:root[data-theme="dark"] .eco-share-user,
:root[data-theme="dark"] .eco-share-label { color: #e4e6eb; }
:root[data-theme="dark"] .eco-share-visib,
:root[data-theme="dark"] .eco-share-input-wrap,
:root[data-theme="dark"] .eco-share-input { background: #3a3b3c; color: #e4e6eb; border-color: #4b4d51; }
:root[data-theme="dark"] .eco-share-section { border-color: #3a3b3c; }
:root[data-theme="dark"] .eco-emoji-picker { background: #242526; border-color: #3a3b3c; }
:root[data-theme="dark"] .eco-emoji-picker button:hover { background: #3a3b3c; }

/* Modal Reacciones (verReacciones): lista .reac-item */
:root[data-theme="dark"] .reac-item { background: transparent; color: #e4e6eb; }
:root[data-theme="dark"] .reac-item:hover { background: #3a3b3c; }
:root[data-theme="dark"] .reac-item-info strong { color: #e4e6eb; }
:root[data-theme="dark"] .reac-item-info small { color: #b0b3b8; }

/* Perfil — Privacidad / Notificaciones / Cierre en dark */
:root[data-theme="dark"] .ecop-tip { background: #1f3a1f; border-left-color: #a5d6a7; }
:root[data-theme="dark"] .ecop-tip-titulo { color: #e4e6eb; }
:root[data-theme="dark"] .ecop-tip-desc { color: #b0b3b8; }
:root[data-theme="dark"] .ecop-notif-intro { color: #b0b3b8; }
:root[data-theme="dark"] .ecop-notif-toggle { background: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .ecop-notif-toggle-desc { color: #b0b3b8; }
:root[data-theme="dark"] .ecop-cierre-desc { color: #b0b3b8; }
:root[data-theme="dark"] .ecop-cierre-box { background: #242526; border-color: #3a3b3c; }
:root[data-theme="dark"] .ecop-cierre-titulo { color: #e4e6eb; }
:root[data-theme="dark"] .ecop-cierre-hint { color: #b0b3b8; }

/* Topbar / header / footer en dark */
:root[data-theme="dark"] .topbar { background: #0f0f0f; border-color: #3a3b3c; }
:root[data-theme="dark"] header.site-header,
:root[data-theme="dark"] .site-header { background: #242526; border-color: #3a3b3c; }
:root[data-theme="dark"] .nav a { color: #e4e6eb; }

/* Submenu (dropdown Investigación / Educación) en dark
   Tapa el `background:#fff` hardcoded de style.css:94 */
:root[data-theme="dark"] .has-sub .submenu { background: #242526; border: 1px solid #3a3b3c; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
:root[data-theme="dark"] .submenu a { color: #e4e6eb; }
:root[data-theme="dark"] .submenu a:hover { background: #3a3b3c; color: #a5d6a7; }

/* Botón login/Mi cuenta: los inline styles vienen del admin (modo claro),
   por eso en dark forzamos con !important */
:root[data-theme="dark"] .header-btn-login { background: #242526 !important; color: #e4e6eb !important; border-color: #4b4d51 !important; }
:root[data-theme="dark"] .header-btn-login:hover { background: #3a3b3c !important; }

:root[data-theme="dark"] .user-menu-panel { background: #242526; border-color: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .user-menu-item { color: #e4e6eb; }
:root[data-theme="dark"] .user-menu-item:hover { background: #3a3b3c; }
:root[data-theme="dark"] .user-menu-icon { background: #1f3a1f; color: #a5d6a7; }
:root[data-theme="dark"] .user-menu-logout .user-menu-icon { background: #3a1f1f; color: #ef9a9a; }
:root[data-theme="dark"] .user-menu-sep { background: #3a3b3c; }
:root[data-theme="dark"] .user-menu-perfil-nombre { color: #e4e6eb; }
:root[data-theme="dark"] .user-menu-perfil-sub { color: #b0b3b8; }
:root[data-theme="dark"] .site-footer,
:root[data-theme="dark"] footer.site-footer { background: #0f0f0f; color: #b0b3b8; border-color: #3a3b3c; }

/* Toasts en dark */
:root[data-theme="dark"] .toast { background: #242526; color: #e4e6eb; border-color: #3a3b3c; }

/* Selector de idioma en dark */
:root[data-theme="dark"] .lang-globo-btn { border-color: rgba(255,255,255,.2); color: #e4e6eb; }
:root[data-theme="dark"] .lang-globo-btn:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.4); }
:root[data-theme="dark"] .lang-globo-panel { background: #242526; border-color: #3a3b3c; box-shadow: 0 6px 20px rgba(0,0,0,.5); }
:root[data-theme="dark"] .lang-globo-opt { color: #e4e6eb !important; }
:root[data-theme="dark"] .lang-globo-opt:hover { background: #3a3b3c; }
:root[data-theme="dark"] .lang-globo-opt.active { background: #1f3a1f; color: #a5d6a7 !important; }

/* Botones outline en dark */
:root[data-theme="dark"] .btn-outline { background: transparent; color: #e4e6eb; border-color: #4b4d51; }
:root[data-theme="dark"] .btn-outline:hover { background: #3a3b3c; }

/* Alertas info/flash en dark */
:root[data-theme="dark"] .alert,
:root[data-theme="dark"] .alert-info { background: #242526; color: #e4e6eb; border-color: #3a3b3c; }
:root[data-theme="dark"] .flash-ok { background: #1f3a1f; color: #a5d6a7; }
:root[data-theme="dark"] .flash-err { background: #3a1f1f; color: #ef9a9a; }

/* Secciones genéricas del sitio público en dark
   (afecta transparencia, alianzas, y cualquier landing con .section) */
:root[data-theme="dark"] .section-alt { background: #122a1a; }
:root[data-theme="dark"] .section-title,
:root[data-theme="dark"] .section-lead { color: #e4e6eb; }

/* Contenido HTML libre (viene de admin/textos.php como HTML puro)
   y párrafos genéricos de secciones — subir contraste a casi blanco */
:root[data-theme="dark"] .section p,
:root[data-theme="dark"] .section li,
:root[data-theme="dark"] .section dd,
:root[data-theme="dark"] .container-narrow p,
:root[data-theme="dark"] .container-narrow li,
:root[data-theme="dark"] .container-narrow dd { color: #f2f3f5; }
:root[data-theme="dark"] .section h1,
:root[data-theme="dark"] .section h2,
:root[data-theme="dark"] .section h3,
:root[data-theme="dark"] .section h4,
:root[data-theme="dark"] .container-narrow h1,
:root[data-theme="dark"] .container-narrow h2,
:root[data-theme="dark"] .container-narrow h3,
:root[data-theme="dark"] .container-narrow h4 { color: #ffffff; }

/* Cards genéricas (usadas en /alianzas "Qué gana cada parte" y otros) */
:root[data-theme="dark"] .card { background: #242526; border-color: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .card h3 { color: #a5d6a7; }
:root[data-theme="dark"] .card p { color: #f2f3f5; }

/* Excepción: cards con imagen de fondo (vv-reglas-media) mantienen efecto glass */
:root[data-theme="dark"] .vv-reglas-media .card { background: rgba(255,255,255,.1) !important; border: 1px solid rgba(255,255,255,.2) !important; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
:root[data-theme="dark"] .vv-reglas-media .card h3 { color: #a5d6a7; }
:root[data-theme="dark"] .vv-reglas-media .card p { color: #ffffff; }

/* /ciencia-educacion — cards "Qué ofrecemos" (.ce-card) */
:root[data-theme="dark"] .ce-card { background: #242526; border-color: #3a3b3c; }
:root[data-theme="dark"] .ce-card h3 { color: #a5d6a7; }
:root[data-theme="dark"] .ce-card p { color: #f2f3f5; }
:root[data-theme="dark"] .ce-icon { background: linear-gradient(135deg, #1f3a1f, rgba(76,175,80,.15)); color: #a5d6a7; }
:root[data-theme="dark"] .ce-card:hover { border-color: #a5d6a7; box-shadow: 0 12px 32px rgba(0,0,0,.4); }

/* /educacion, /investigacion — cards de recursos (.inv-card) */
:root[data-theme="dark"] .inv-card { background: #242526; border-color: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .inv-card-body h3 { color: #a5d6a7; }
:root[data-theme="dark"] .inv-card-body p { color: #f2f3f5; }
:root[data-theme="dark"] .inv-card-cta { color: #a5d6a7; }
:root[data-theme="dark"] .inv-card:hover { box-shadow: 0 14px 40px rgba(0,0,0,.5); }

/* ============================================================
   PASE GENERAL DARK MODE — cubre secciones y clases restantes
   ============================================================ */

/* Secciones con bg color inline (box_bg_style) — solo si NO tienen imagen url()
   Verde oscuro on-brand en vez de negro plano — mantiene identidad ECOSYSTEMS */
:root[data-theme="dark"] section.section:not([style*="url"]):not(.section-dark),
:root[data-theme="dark"] section.section-alt:not([style*="url"]) {
  background-color: #0f2015 !important;
}

/* Formularios (contacto, soporte, registro, login, reset) */
:root[data-theme="dark"] .form-card { background: #242526; box-shadow: 0 8px 40px rgba(0,0,0,.4); }
:root[data-theme="dark"] .form-group label { color: #e4e6eb; }
:root[data-theme="dark"] .form-group input,
:root[data-theme="dark"] .form-group select,
:root[data-theme="dark"] .form-group textarea { background: #3a3b3c; color: #e4e6eb; border-color: #4b4d51; box-shadow: none; }
:root[data-theme="dark"] .form-group input:focus,
:root[data-theme="dark"] .form-group select:focus,
:root[data-theme="dark"] .form-group textarea:focus { border-color: #a5d6a7; box-shadow: 0 0 0 3px rgba(165,214,167,.15); }
:root[data-theme="dark"] .form-group input::placeholder,
:root[data-theme="dark"] .form-group textarea::placeholder { color: #8b8d92; }

/* Planes */
:root[data-theme="dark"] .plan-card { background: #242526; border-color: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .plan-card h3 { color: #a5d6a7; }

/* Sidebar del dashboard (perfil derecho: sugerencias, notif, etc.) */
:root[data-theme="dark"] .eco-side-card { background: #242526; border-color: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .eco-side-card h4 { color: #e4e6eb; }
:root[data-theme="dark"] .eco-side-card p { color: #f2f3f5; }
:root[data-theme="dark"] .eco-side-info p strong { color: #b0b3b8; }
:root[data-theme="dark"] .eco-side-item { color: #e4e6eb; }
:root[data-theme="dark"] .eco-side-item:hover { background: #3a3b3c; }

/* Sidebar derecho — Notificaciones recientes */
:root[data-theme="dark"] .eco-notif-item { border-color: #3a3b3c; }
:root[data-theme="dark"] .eco-notif-titulo { color: #ffffff; }
:root[data-theme="dark"] .eco-notif-mensaje { color: #f2f3f5; }
:root[data-theme="dark"] .eco-notif-tiempo { color: #b0b3b8; }

/* Sidebar derecho — Ecoamigos sugeridos */
:root[data-theme="dark"] .eco-sugerencia { color: #e4e6eb; }
:root[data-theme="dark"] .eco-sugerencia:hover { background: #3a3b3c; }
:root[data-theme="dark"] .eco-sugerencia-nombre { color: #e4e6eb; }

/* Composer (crear publicación) del dashboard */
:root[data-theme="dark"] .eco-composer { background: #242526; border-color: #3a3b3c; box-shadow: 0 2px 8px rgba(0,0,0,.3); }
:root[data-theme="dark"] .eco-composer-input { background: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .eco-composer-input:focus { background: #4b4d51; }
:root[data-theme="dark"] .eco-composer-input[data-empty="true"]::before { color: #b0b3b8; }
:root[data-theme="dark"] .eco-composer-preview { background: #3a3b3c; }
:root[data-theme="dark"] .eco-composer-toolbar { border-color: #3a3b3c; }
:root[data-theme="dark"] .eco-composer-btn { background: #3a3b3c; color: #e4e6eb; border-color: #4b4d51; }
:root[data-theme="dark"] .eco-composer-btn:hover { background: #4b4d51; }
:root[data-theme="dark"] .eco-composer-visib { background: #3a3b3c; color: #e4e6eb; border-color: #4b4d51; }
:root[data-theme="dark"] .eco-composer-msg.ok { color: #a5d6a7; }
:root[data-theme="dark"] .eco-composer-msg.err { color: #ef9a9a; }

/* Alerts (flash mensajes de formulario) */
:root[data-theme="dark"] .alert-warn { background: #3a2f1a; border-color: #f9a825; color: #ffd580; }
:root[data-theme="dark"] .alert-error { background: #3a1f1f; border-color: #dc2626; color: #ef9a9a; }
:root[data-theme="dark"] .alert-ok { background: #1f3a1f; border-color: #059669; color: #a5d6a7; }

/* Info de contacto (mapa, redes) */
:root[data-theme="dark"] .contacto-info { color: #e4e6eb; }
:root[data-theme="dark"] .contacto-ubicacion { color: #b0b3b8; }

/* Badges de estado en admin (usados también en modales admin/reportes/soporte) */
:root[data-theme="dark"] .badge-warn { background: #3a2f1a; color: #ffd580; }
:root[data-theme="dark"] .badge-ok   { background: #1f3a1f; color: #a5d6a7; }
:root[data-theme="dark"] .badge-info { background: #1f2a3a; color: #90caf9; }
:root[data-theme="dark"] .badge-off  { background: #3a3b3c; color: #b0b3b8; }
:root[data-theme="dark"] .badge-err  { background: #3a1f1f; color: #ef9a9a; }

/* Aviso banner (banner de aviso arriba de home) */
:root[data-theme="dark"] .aviso-banner { background: #242526 !important; border-color: #3a3b3c !important; }
:root[data-theme="dark"] .aviso-texto strong { color: #a5d6a7; }
:root[data-theme="dark"] .aviso-texto p { color: #f2f3f5; }

/* /ver-en-vivo — split narrativa */
:root[data-theme="dark"] .vv-split-text p { color: #f2f3f5; }

/* Presentación (index / como funciona) — cards con imagen + descripción */
:root[data-theme="dark"] .pres-card { background: #242526; border-color: #3a3b3c; }
:root[data-theme="dark"] .pres-body h3 { color: #a5d6a7; }
:root[data-theme="dark"] .pres-body p { color: #f2f3f5; }

/* /amigos — página lista */
:root[data-theme="dark"] .amigos-lead { color: #b0b3b8; }
:root[data-theme="dark"] .amigos-tab { color: #b0b3b8; }
:root[data-theme="dark"] .amigos-tab:hover { background: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .amigos-tab.active { background: #1f3a1f; color: #a5d6a7; }
:root[data-theme="dark"] .amigos-empty { background: #242526; border-color: #3a3b3c; }
:root[data-theme="dark"] .amigos-empty h3 { color: #e4e6eb; }
:root[data-theme="dark"] .amigos-empty p { color: #b0b3b8; }
:root[data-theme="dark"] .amigos-card { background: #242526; border-color: #3a3b3c; }
:root[data-theme="dark"] .amigos-card-nombre { color: #e4e6eb; }
:root[data-theme="dark"] .amigos-card-nombre:hover { color: #a5d6a7; }
:root[data-theme="dark"] .amigos-card-pais,
:root[data-theme="dark"] .amigos-card-fecha { color: #b0b3b8; }
:root[data-theme="dark"] .amigos-card-bio { color: #f2f3f5; }
:root[data-theme="dark"] .amigos-buscar-input { background: #3a3b3c; color: #e4e6eb; border-color: #4b4d51; }
:root[data-theme="dark"] .amigos-buscar-input::placeholder { color: #8b8d92; }

/* 404 */
:root[data-theme="dark"] .p404-section { background: #18191a !important; }
:root[data-theme="dark"] .p404-titulo { color: #ffffff; }
:root[data-theme="dark"] .p404-mensaje { color: #f2f3f5; }
:root[data-theme="dark"] .p404-sugerencias { border-color: #3a3b3c; }
:root[data-theme="dark"] .p404-sug-titulo { color: #b0b3b8; }
:root[data-theme="dark"] .p404-sug-lista a { background: #242526; color: #e4e6eb; border-color: #3a3b3c; }
:root[data-theme="dark"] .p404-sug-lista a:hover { background: #3a3b3c; }

/* Dropdown de notificaciones del header (campanita) */
:root[data-theme="dark"] .notif-panel { background: #242526; border-color: #3a3b3c; color: #e4e6eb; box-shadow: 0 16px 40px rgba(0,0,0,.5); }
:root[data-theme="dark"] .notif-panel-head { background: #242526; border-color: #3a3b3c; }
:root[data-theme="dark"] .notif-panel-head strong { color: #ffffff; }
:root[data-theme="dark"] .notif-item { border-color: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .notif-item:hover { background: #3a3b3c; }
:root[data-theme="dark"] .notif-item.no-leida { background: #1f3a1f; }
:root[data-theme="dark"] .notif-item-titulo { color: #ffffff; }
:root[data-theme="dark"] .notif-item-mensaje { color: #b0b3b8; }
:root[data-theme="dark"] .notif-item-tiempo { color: #90a597; }
:root[data-theme="dark"] .notif-vacio { color: #b0b3b8; }
:root[data-theme="dark"] .notif-mark { color: #a5d6a7; }
:root[data-theme="dark"] .notif-mark-all { color: #a5d6a7; }
:root[data-theme="dark"] .notif-mark-all:hover { background: #3a3b3c; }

/* Toast notifications */
:root[data-theme="dark"] .toast-x:hover { color: #e4e6eb; }
:root[data-theme="dark"] .toast-ok { border-left-color: #a5d6a7; }
:root[data-theme="dark"] .toast-err { border-left-color: #ef9a9a; }
:root[data-theme="dark"] .toast-warn { border-left-color: #ffd580; }
:root[data-theme="dark"] .toast-info { border-left-color: #90caf9; }

/* Texto muted general — muchas páginas usan color inline #555 #666 #333 */
:root[data-theme="dark"] .text-muted { color: #b0b3b8 !important; }

/* Home — cards "¿Cómo funciona?" e "Impacto en tiempo real" con efecto glass
   Los inline styles del admin (box_bg_style) llevan fondo claro con !important-like priority,
   así que forzamos con !important + backdrop-filter para el efecto vidrio */
:root[data-theme="dark"] .como-box,
:root[data-theme="dark"] .impacto-box {
  background: rgba(36, 37, 38, .55) !important;
  border: 1px solid rgba(255, 255, 255, .12) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, .3);
  color: #f2f3f5;
}
:root[data-theme="dark"] .como-titulo,
:root[data-theme="dark"] .impacto-header h2 { color: #ffffff; }
:root[data-theme="dark"] .impacto-link { color: #a5d6a7; }
:root[data-theme="dark"] .paso p { color: #f2f3f5; }
:root[data-theme="dark"] .paso-icon,
:root[data-theme="dark"] .impacto-icon { background: rgba(76, 175, 80, .18); color: #a5d6a7; }
:root[data-theme="dark"] .paso-num { color: #a5d6a7; }
:root[data-theme="dark"] .paso-flecha { color: #a5d6a7; }
:root[data-theme="dark"] .impacto-num { color: #ffffff; }
:root[data-theme="dark"] .impacto-lbl { color: #b0b3b8; }

/* Fallback amplio: cualquier <p> o li dentro de .form-card, .plan-card, .pres-card, .amigos-card
   con color inline gris pasa a claro */
:root[data-theme="dark"] .form-card p,
:root[data-theme="dark"] .plan-card p,
:root[data-theme="dark"] .plan-desc,
:root[data-theme="dark"] .plan-price .per { color: #f2f3f5; }

/* Publicaciones (novedades/blog) — .pub-card usada en /comunidad, /novedades, /investigacion */
:root[data-theme="dark"] .pub-card { background: #242526; border-color: #3a3b3c; color: #e4e6eb; }
:root[data-theme="dark"] .pub-card-body { color: #e4e6eb; }
:root[data-theme="dark"] .pub-card-body h3,
:root[data-theme="dark"] .pub-card-titulo { color: #ffffff; }
:root[data-theme="dark"] .pub-card-fecha { color: #b0b3b8; }
:root[data-theme="dark"] .pub-card-resumen { color: #f2f3f5; }
:root[data-theme="dark"] .pub-card-media { background: #18191a; }

/* Carrusel de patrocinadores — mantener .patro-item BLANCO en dark
   (los logos de marca están hechos para fondo claro) */
:root[data-theme="dark"] .patro-carrusel:not([style*="url"]) { background-color: #18191a !important; }

/* Hero de landings — mantiene su bg color original (verde de marca)
   solo aseguramos que los textos sean claros */
:root[data-theme="dark"] .vv-hero-titulo,
:root[data-theme="dark"] .hero-vervivo h1 { color: #ffffff; }
:root[data-theme="dark"] .vv-hero-sub,
:root[data-theme="dark"] .hero-vervivo p { color: #f2f3f5; }

/* /transparencia — Política de cero impacto (checklist) */
:root[data-theme="dark"] .tr-checklist li { color: #e4e6eb; border-color: #3a3b3c; }

/* /transparencia — Uso de su registro (cards SI/NO) */
:root[data-theme="dark"] .tr-registro-col { border-color: #3a3b3c; }
:root[data-theme="dark"] .tr-registro-col li { color: #e4e6eb; border-color: rgba(255,255,255,.08); }
:root[data-theme="dark"] .tr-registro-si { background: #1f3a1f; }
:root[data-theme="dark"] .tr-registro-si h3 { color: #a5d6a7; border-color: #2f5a2f; }
:root[data-theme="dark"] .tr-registro-no { background: #3a1f1f; }
:root[data-theme="dark"] .tr-registro-no h3 { color: #ef9a9a; border-color: #5a2f2f; }
