/* ============================================================================================================
   APARIENCIA DE LA PÁGINA — Colores / Claro / Oscuro        (el botón y la lógica: assets/js/tema.js)

   - "Colores" es el diseño de siempre y NO se toca: todo lo de este archivo cuelga de html[data-tema="claro"] o
     html[data-tema="oscuro"] (y del botón/menú, que se ve igual en los tres).
   - Cada tema define sus variables (--t-*) y luego se aplican a las superficies de cada página.
   - Las páginas traen muchos colores fijos y varios con !important; por eso aquí también hay !important donde hace falta.
   Para sumar una página o un componente: agregar su selector a la sección que corresponda (buscar "== PÁGINA:").
   ============================================================================================================ */

/* ---------- Paleta ---------- */
html[data-tema="claro"] {
    --t-fondo: #f3f5f9;
    --t-fondo2: #ffffff;
    --t-card: #ffffff;
    --t-card2: #f6f8fb;
    --t-borde: #e2e7ef;
    --t-texto: #1f2937;
    --t-texto2: #4b5563;
    --t-texto3: #6b7280;
    --t-link: #2563eb;
    --t-input: #ffffff;
    --t-sombra: rgba(15, 23, 42, .08);
    --t-marca: #2563eb;
    color-scheme: light;
}

html[data-tema="oscuro"] {
    --t-fondo: #0d1017;
    --t-fondo2: #131824;
    --t-card: #1a2030;
    --t-card2: #232b3f;
    --t-borde: #2c364b;
    --t-texto: #e8ecf4;
    --t-texto2: #b4bdd0;
    --t-texto3: #8590a8;
    --t-link: #7cc7ff;
    --t-input: #121722;
    --t-sombra: rgba(0, 0, 0, .5);
    --t-marca: #8ec9ff;
    color-scheme: dark;
}

/* Transición suave SOLO mientras se cambia de tema (tema.js pone la clase 0,5 s) */
html.tema-anim *,
html.tema-anim *::before,
html.tema-anim *::after {
    transition: background-color .35s ease, color .35s ease, border-color .35s ease, box-shadow .35s ease !important;
}

/* ============================================================================================================
   BOTÓN Y MENÚ (se ven en los 3 temas)
   ============================================================================================================ */
.tema-sel {
    position: relative;
    flex: 0 0 auto;
    margin-left: .6rem;
    z-index: 5;
}

.tema-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    color: #334155;
    background: rgba(255, 255, 255, .88);
    border: 1px solid rgba(255, 255, 255, .95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .15);
    transition: transform .15s ease, background .2s ease;
    -webkit-tap-highlight-color: transparent;
}

.tema-btn:hover { transform: scale(1.08); background: #ffffff; }
.tema-btn:active { transform: scale(.95); }
.tema-btn:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }
.tema-btn svg { display: block; }

.tema-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    width: 244px;
    padding: 8px;
    background: #ffffff;
    color: #1f2937;
    border: 1px solid #e2e7ef;
    border-radius: 14px;
    box-shadow: 0 14px 40px rgba(15, 23, 42, .25);
    z-index: 3000;
    text-align: left;
}

.tema-menu[hidden] { display: none; }

.tema-menu__titulo {
    margin: 4px 8px 6px;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6b7280;
}

.tema-op {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.tema-op:hover,
.tema-op:focus-visible { background: #f1f5f9; outline: none; }
.tema-op--activa { background: #eef4ff; }

.tema-op__ico {
    flex: 0 0 auto;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.tema-op[data-tema-op="colores"] .tema-op__ico { background: linear-gradient(135deg, #5BCEFA, #F5A9B8); }
.tema-op[data-tema-op="claro"] .tema-op__ico { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.tema-op[data-tema-op="oscuro"] .tema-op__ico { background: linear-gradient(135deg, #334155, #0f172a); }

.tema-op__txt { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.tema-op__txt b { font-size: .95rem; font-weight: 700; }
.tema-op__txt small { font-size: .78rem; color: #6b7280; }
.tema-op__ok { flex: 0 0 auto; width: 20px; text-align: center; font-weight: 900; color: #2563eb; opacity: 0; }
.tema-op--activa .tema-op__ok { opacity: 1; }

/* Sin cabecera en la página: botón flotante arriba a la derecha */
.tema-sel--flotante {
    position: fixed;
    top: 12px;
    right: 12px;
    margin: 0;
    z-index: 2500;
}

.tema-sel--flotante .tema-btn { background: rgba(255, 255, 255, .9); color: #1f2937; border-color: rgba(0, 0, 0, .12); }

/* Perfil público: va debajo de los 4 botones redondos de la derecha (WhatsApp, tienda, videollamada, compartir), del mismo tamaño */
.tema-sel--perfil { top: 260px; right: 20px; }
.tema-sel--perfil .tema-btn { width: 50px; height: 50px; box-shadow: 0 2px 10px rgba(0, 0, 0, .2); }
.tema-sel--perfil .tema-menu { top: 0; right: calc(100% + 10px); }

/* En celular la cabecera tiene la marca arriba y botones debajo: el selector va arriba a la derecha de la cabecera */
@media (max-width: 768px) {
    .header__container > .tema-sel:not(.tema-sel--flotante) {
        position: absolute;
        top: 8px;
        right: 10px;
        margin: 0;
    }

    .tema-btn { width: 38px; height: 38px; }
    .tema-menu { width: min(244px, calc(100vw - 24px)); }
}

/* ---- el botón y el menú en cada tema ---- */
html[data-tema="claro"] .tema-btn {
    color: #334155;
    background: #f1f5f9;
    border-color: #dbe2ec;
    box-shadow: none;
}

html[data-tema="claro"] .tema-btn:hover { background: #e7edf5; }

html[data-tema="oscuro"] .tema-btn {
    color: #e2e8f0;
    background: #232b3f;
    border-color: #36425c;
    box-shadow: none;
}

html[data-tema="oscuro"] .tema-btn:hover { background: #2c364b; }
html[data-tema="oscuro"] .tema-btn:focus-visible { outline-color: #7cc7ff; }

html[data-tema="oscuro"] .tema-menu {
    background: #1a2030;
    color: #e8ecf4;
    border-color: #2c364b;
    box-shadow: 0 14px 40px rgba(0, 0, 0, .6);
}

html[data-tema="oscuro"] .tema-menu__titulo,
html[data-tema="oscuro"] .tema-op__txt small { color: #8590a8; }
html[data-tema="oscuro"] .tema-op:hover,
html[data-tema="oscuro"] .tema-op:focus-visible { background: #232b3f; }
html[data-tema="oscuro"] .tema-op--activa { background: #202a42; }
html[data-tema="oscuro"] .tema-op__ok { color: #7cc7ff; }

html[data-tema="claro"] .tema-sel--flotante .tema-btn,
html[data-tema="oscuro"] .tema-sel--flotante .tema-btn { box-shadow: 0 2px 10px var(--t-sombra); }

/* ============================================================================================================
   BASE COMÚN (Claro y Oscuro): fondo sin animación, cabecera, texto, formularios, pie
   ============================================================================================================ */
html[data-tema="claro"] body,
html[data-tema="oscuro"] body {
    background: var(--t-fondo) !important;
    color: var(--t-texto);
}

/* El fondo pastel animado ("Colores") se apaga */
html[data-tema="claro"] body::before,
html[data-tema="claro"] body::after,
html[data-tema="oscuro"] body::before,
html[data-tema="oscuro"] body::after {
    display: none !important;
    animation: none !important;
}

/* ---- Cabecera ---- */
html[data-tema="claro"] .header {
    background: #ffffff !important;
    color: var(--t-texto) !important;
    box-shadow: 0 1px 0 var(--t-borde), 0 6px 18px var(--t-sombra) !important;
}

html[data-tema="oscuro"] .header {
    background: linear-gradient(135deg, #131824 0%, #1a2030 100%) !important;
    color: var(--t-texto) !important;
    box-shadow: 0 1px 0 var(--t-borde), 0 8px 22px rgba(0, 0, 0, .5) !important;
}

html[data-tema="claro"] .header__brand,
html[data-tema="oscuro"] .header__brand { color: var(--t-marca) !important; }

/* Algunas páginas le dan su propio degradado al contenedor interior (.header--full-width, .header.scrolled): se anula */
html[data-tema="claro"] .header .header__container,
html[data-tema="oscuro"] .header .header__container,
html[data-tema="claro"] .header.scrolled,
html[data-tema="oscuro"] .header.scrolled {
    background: transparent !important;
    box-shadow: none !important;
}

html[data-tema="claro"] .header.scrolled { background: #ffffff !important; }
html[data-tema="oscuro"] .header.scrolled { background: #131824 !important; }

/* ---- Pie ---- */
html[data-tema="claro"] .footer { background: #111827 !important; }
html[data-tema="oscuro"] .footer { background: #07090d !important; border-top: 1px solid var(--t-borde); }

/* ---- Formularios ---- */
html[data-tema="claro"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]),
html[data-tema="claro"] select,
html[data-tema="claro"] textarea,
html[data-tema="oscuro"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="color"]):not([type="file"]):not([type="submit"]):not([type="button"]),
html[data-tema="oscuro"] select,
html[data-tema="oscuro"] textarea {
    background-color: var(--t-input) !important;
    color: var(--t-texto) !important;
    border-color: var(--t-borde) !important;
}

html[data-tema="oscuro"] input::placeholder,
html[data-tema="oscuro"] textarea::placeholder { color: #6f7a92 !important; opacity: 1; }
html[data-tema="oscuro"] select option { background: #1a2030; color: #e8ecf4; }

/* ---- Títulos y textos sueltos de las páginas ---- */
html[data-tema="oscuro"] .seo-main-title,
html[data-tema="oscuro"] .main__title,
html[data-tema="oscuro"] .section-title,
html[data-tema="oscuro"] .page-title { color: var(--t-texto) !important; }

html[data-tema="claro"] .seo-main-title,
html[data-tema="claro"] .main__title { color: var(--t-texto) !important; }

/* ============================================================================================================
   == PÁGINA: Portada (index.html)
   ============================================================================================================ */
html[data-tema="oscuro"] .seo-intro-text,
html[data-tema="oscuro"] .seo-main-title { color: var(--t-texto2) !important; }
html[data-tema="oscuro"] .seo-main-title { color: var(--t-texto) !important; }

/* Panel de filtros (país / ciudad / distrito / buscar) */
html[data-tema="oscuro"] .location-filter {
    background: var(--t-card) !important;
    border: 1px solid var(--t-borde) !important;
    box-shadow: 0 8px 26px rgba(0, 0, 0, .45) !important;
}

html[data-tema="claro"] .location-filter {
    border: 1px solid var(--t-borde) !important;
    box-shadow: 0 6px 20px var(--t-sombra) !important;
}

html[data-tema="oscuro"] .filter-label,
html[data-tema="oscuro"] .location-filter label { color: #7cc7ff !important; }
html[data-tema="claro"] .filter-label,
html[data-tema="claro"] .location-filter label { color: #2b7fb0 !important; }

/* Aviso de mayores de edad */
html[data-tema="oscuro"] .aviso-adultos__caja { background: #1a2030 !important; color: #e8ecf4 !important; border: 1px solid #2c364b; }
html[data-tema="oscuro"] .aviso-adultos__caja *:not(button):not(a):not(.aviso-adultos__sello) { color: inherit; }
html[data-tema="oscuro"] .aviso-adultos__btn--salir { background: #232b3f !important; color: #cbd5e1 !important; }
html[data-tema="oscuro"] .aviso-adultos__sello { background: #3b1d24 !important; color: #fca5a5 !important; }

/* ============================================================================================================
   == PÁGINA: Registro e Inicio de sesión (registro.html, login.html)
   ============================================================================================================ */
html[data-tema="oscuro"] .registro-container,
html[data-tema="oscuro"] .form-container,
html[data-tema="oscuro"] .login-container {
    background: var(--t-card) !important;
    color: var(--t-texto) !important;
    border: 1px solid var(--t-borde);
    box-shadow: 0 16px 44px rgba(0, 0, 0, .55) !important;
}

html[data-tema="oscuro"] .form-section {
    background: var(--t-card2) !important;
    border-color: var(--t-borde) !important;
}

html[data-tema="claro"] .registro-container,
html[data-tema="claro"] .form-container,
html[data-tema="claro"] .login-container { box-shadow: 0 10px 32px var(--t-sombra) !important; border: 1px solid var(--t-borde); }

html[data-tema="oscuro"] .registro-title,
html[data-tema="oscuro"] .registro-subtitle,
html[data-tema="oscuro"] .form-container h1,
html[data-tema="oscuro"] .form-container h2,
html[data-tema="oscuro"] .form-container p,
html[data-tema="oscuro"] .form-container label,
html[data-tema="oscuro"] .form-label { color: var(--t-texto) !important; }
html[data-tema="oscuro"] .form-container .form-subtitle,
html[data-tema="oscuro"] .form-container small { color: var(--t-texto2) !important; }

/* ============================================================================================================
   == PÁGINA: Blog (blog.php, blog-post.php)
   ============================================================================================================ */
html[data-tema="oscuro"] .blog-card-new {
    background: var(--t-card) !important;
    border: 1px solid var(--t-borde);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .4) !important;
    color: var(--t-texto);
}

html[data-tema="oscuro"] .blog-card-new h2,
html[data-tema="oscuro"] .blog-card-new h3,
html[data-tema="oscuro"] .blog-card-new a { color: var(--t-texto) !important; }
html[data-tema="oscuro"] .blog-card-new p { color: var(--t-texto2) !important; }

/* ============================================================================================================
   == PÁGINA: Videos (videos.php, ver-video.php)
   ============================================================================================================ */
html[data-tema="oscuro"] .video-card {
    background: var(--t-card) !important;
    border: 1px solid var(--t-borde);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .4) !important;
    color: var(--t-texto) !important;
}

html[data-tema="oscuro"] .video-thumbnail { background: var(--t-card2) !important; }
html[data-tema="oscuro"] .video-user-name { color: var(--t-texto) !important; }
html[data-tema="oscuro"] .video-location { color: var(--t-texto2) !important; }

html[data-tema="claro"] .filters-section {
    background: #ffffff !important;
    border-bottom: 1px solid var(--t-borde) !important;
}

html[data-tema="oscuro"] .filters-section {
    background: var(--t-fondo2) !important;
    border-bottom: 1px solid var(--t-borde) !important;
}

html[data-tema="oscuro"] .filter-group label { color: #7cc7ff !important; }
html[data-tema="claro"] .filter-group label { color: #2b7fb0 !important; }

/* ============================================================================================================
   == PÁGINA: Ver video (ver-video.php)
   ============================================================================================================ */
html[data-tema="oscuro"] .video-player-section,
html[data-tema="oscuro"] .user-sidebar,
html[data-tema="oscuro"] .comments-section,
html[data-tema="oscuro"] .related-card {
    background: var(--t-card) !important;
    color: var(--t-texto) !important;
    border: 1px solid var(--t-borde);
    box-shadow: 0 6px 22px rgba(0, 0, 0, .4) !important;
}

html[data-tema="oscuro"] .video-player-section :is(h1, h2, h3, h4, strong),
html[data-tema="oscuro"] .user-sidebar :is(h1, h2, h3, h4, strong),
html[data-tema="oscuro"] .comments-section :is(h1, h2, h3, h4, strong),
html[data-tema="oscuro"] .related-card :is(h1, h2, h3, h4, strong, p) { color: var(--t-texto) !important; }
html[data-tema="oscuro"] .video-player-section :is(p, small, span:not([class*="btn"])),
html[data-tema="oscuro"] .user-sidebar :is(p, small),
html[data-tema="oscuro"] .comments-section :is(p, small, label) { color: var(--t-texto2); }
html[data-tema="oscuro"] .breadcrumb a,
html[data-tema="oscuro"] [class*="breadcrumb"] a { color: #b9a4ff !important; }

/* ============================================================================================================
   == PÁGINA: Perfil público (visualizar-perfil.php)
   La cabecera del perfil (foto, nombre, estadísticas) es un banner con degradado de marca y texto blanco:
   en Oscuro pasa a un degradado oscuro; en Claro se deja como está (es el acento de color de la página).
   ============================================================================================================ */
html[data-tema="oscuro"] .profile-header { background: linear-gradient(135deg, #1a2238 0%, #2b1d3a 100%) !important; }

html[data-tema="oscuro"] .contact-info,
html[data-tema="oscuro"] .info-section,
html[data-tema="oscuro"] #personal-info-section,
html[data-tema="oscuro"] #gallery-section,
html[data-tema="oscuro"] #map-section,
html[data-tema="oscuro"] .map-container,
html[data-tema="oscuro"] .comment-form,
html[data-tema="oscuro"] .contact-item,
html[data-tema="oscuro"] .info-item,
html[data-tema="oscuro"] .info-content,
html[data-tema="oscuro"] #map-info {
    background: var(--t-card) !important;
    border-color: var(--t-borde) !important;
    color: var(--t-texto) !important;
}

html[data-tema="oscuro"] .info-item,
html[data-tema="oscuro"] .contact-item { background: var(--t-card2) !important; }
html[data-tema="oscuro"] .info-content { background: transparent !important; }
/* En celular (≤ 768 px) visualizar-perfil.php fuerza la caja de Presentación/Servicios a blanco translúcido con !important
   (selector .personal-info-content .info-item .info-content, más específico que el de arriba) y el texto de Oscuro es claro →
   texto gris claro sobre caja gris claro (contraste 1.3, no se leía). Se repite el selector largo para que Oscuro gane. */
html[data-tema="oscuro"] .personal-info-content .info-item .info-content {
    background: var(--t-card) !important;
    border-color: var(--t-borde) !important;
}
html[data-tema="oscuro"] :is(.info-label, .info-subtitle, .section-title, .contact-label) { color: #7cc7ff !important; }
html[data-tema="oscuro"] :is(.info-value, .contact-value, .comment-text) { color: var(--t-texto) !important; }

/* Comentarios de visitantes (#comments-list): cada comentario era una tarjeta BLANCA con degradado y el texto del tema Oscuro es claro →
   no se leía. Las tarjetas (y las respuestas) pasan a oscuro. (La lista del visor de fotos, #media-comments-list, ya es oscura de origen.) */
html[data-tema="oscuro"] #comments-list .comment-item,
html[data-tema="oscuro"] #comments-list .reply-item {
    background: var(--t-card2) !important;
    border-color: var(--t-borde) !important;
    box-shadow: none !important;
}

html[data-tema="oscuro"] #comments-list .comment-item:hover { border-color: #3b4a68 !important; }
html[data-tema="oscuro"] #comments-list :is(.comment-date, .comment-time) { color: var(--t-texto3) !important; }
html[data-tema="oscuro"] #comments-list .comment-text { color: var(--t-texto) !important; }
html[data-tema="oscuro"] #comments-list :is(.comment-author, .comment-username) { color: #8ec9ff !important; }
html[data-tema="oscuro"] #comments-list .comment-replies { border-color: var(--t-borde) !important; }
html[data-tema="oscuro"] .info-text { color: var(--t-texto2) !important; }

/* Visor de fotos y videos del perfil (#media-modal): el panel de comentarios era blanco con el texto de la tarjeta forzado a claro (Oscuro) →
   el comentario publicado no se leía. Panel, tarjetas y textos pasan a oscuro. */
html[data-tema="oscuro"] #media-modal .content-panel { background: var(--t-card) !important; color: var(--t-texto) !important; }
html[data-tema="oscuro"] #media-modal :is(.post-header, .actions-bar, .post-date, .comment-form) { border-color: var(--t-borde) !important; }
html[data-tema="oscuro"] #media-modal :is(.username, .action-btn, .options-btn, .comment-text) { color: var(--t-texto) !important; }
html[data-tema="oscuro"] #media-modal :is(.location, .date-text, .comment-time, .no-comments, .loading-comments) { color: var(--t-texto3) !important; }
html[data-tema="oscuro"] #media-modal .comment-author { color: #8ec9ff !important; }
html[data-tema="oscuro"] #media-modal #media-comments-list .comment-item { background: var(--t-card2) !important; border-color: var(--t-borde) !important; box-shadow: none !important; }
html[data-tema="oscuro"] #media-modal .comment-submit:disabled { color: var(--t-texto3) !important; }
html[data-tema="oscuro"] #media-modal .comment-form { background: var(--t-card) !important; }

/* ============================================================================================================
   == PÁGINA: Listado de anuncios (tramperas-anuncios.html / hub-anuncios.php) y detalle de un anuncio (visualizar-anuncio.php)
   ============================================================================================================ */
html[data-tema="oscuro"] .anuncio-card,
html[data-tema="oscuro"] .anuncios-search,
html[data-tema="oscuro"] .preview-card,
html[data-tema="oscuro"] .preview-head-contact {
    background: var(--t-card) !important;
    border-color: var(--t-borde) !important;
    color: var(--t-texto) !important;
    box-shadow: 0 6px 22px rgba(0, 0, 0, .4) !important;
}

html[data-tema="oscuro"] .anuncio-card__footer { background: var(--t-card2) !important; border-color: var(--t-borde) !important; }
html[data-tema="oscuro"] .anuncio-detail-main { background: transparent !important; }
html[data-tema="oscuro"] .anuncios-title { color: var(--t-texto) !important; }
html[data-tema="oscuro"] .anuncio-card a:not(.btn):not([class*="btn"]) { color: #8ec9ff !important; }
html[data-tema="oscuro"] .anuncio-card :is(h2, h3, p, strong) { color: var(--t-texto) !important; }
html[data-tema="oscuro"] .preview-card :is(h1, h2, h3, h4, strong) { color: var(--t-texto) !important; }
html[data-tema="oscuro"] .preview-card :is(p, .preview-desc) { color: var(--t-texto2) !important; }
html[data-tema="oscuro"] .anuncio-pill { color: #a9cbff !important; }

html[data-tema="claro"] .anuncio-card,
html[data-tema="claro"] .anuncios-search,
html[data-tema="claro"] .preview-card { border: 1px solid var(--t-borde); box-shadow: 0 6px 20px var(--t-sombra) !important; }

/* ---- Claro: lo que en "Colores" se apoya en el degradado y aquí necesita su propio color ---- */
/* Recuadro de texto del listado de anuncios: era negro translúcido con letras blancas */
html[data-tema="claro"] .seo-hub-description {
    background: #ffffff !important;
    border: 1px solid var(--t-borde);
    border-left: 4px solid #dc2626;
    color: var(--t-texto2) !important;
}

html[data-tema="claro"] .seo-hub-description h1 { color: #dc2626 !important; text-shadow: none !important; }
html[data-tema="claro"] .seo-hub-description :is(p, strong, li, span) { color: var(--t-texto2) !important; }
html[data-tema="claro"] .seo-hub-description p a { color: var(--t-link) !important; }
/* Los botones "Ver también" traen su propio fondo azul con letras blancas (estilo en línea): las reglas de texto de arriba no deben tocarlos */
html[data-tema="claro"] .seo-hub-description a[style*="background-color"],
html[data-tema="oscuro"] .seo-hub-description a[style*="background-color"] { color: #ffffff !important; }

/* Botones "Registrarse" / "Iniciar sesión" de las cabeceras que los dejan translúcidos con texto blanco (ej. ver-video) */
html[data-tema="claro"] .header .header__nav a.btn[href="registro.html"]:not(.btn--register),
html[data-tema="oscuro"] .header .header__nav a.btn[href="registro.html"]:not(.btn--register) { background: #16a34a !important; color: #fff !important; border-color: transparent !important; }
html[data-tema="claro"] .header .header__nav a.btn[href="login.html"]:not(.btn--login),
html[data-tema="oscuro"] .header .header__nav a.btn[href="login.html"]:not(.btn--login) { background: #2563eb !important; color: #fff !important; border-color: transparent !important; }
html[data-tema="oscuro"] #forgot-credentials-link,
html[data-tema="oscuro"] .form-container .link { color: var(--t-texto2) !important; }

/* ============================================================================================================
   == PÁGINA: Mi perfil / Actualizar perfil (actualizar-perfil.html, perfil.html)
   ============================================================================================================ */
html[data-tema="oscuro"] .profile-content-container,
html[data-tema="oscuro"] .profile-section,
html[data-tema="oscuro"] .gallery-item,
html[data-tema="oscuro"] .additional-info-form,
html[data-tema="oscuro"] .comments-container,
html[data-tema="oscuro"] .anuncios-table,
html[data-tema="oscuro"] .plan-actual-card {
    background: var(--t-card) !important;
    border-color: var(--t-borde) !important;
    color: var(--t-texto) !important;
}

html[data-tema="oscuro"] .profile-section .form-section,
html[data-tema="oscuro"] .profile-section [class*="info-field"],
html[data-tema="oscuro"] .gallery-item { background: var(--t-card2) !important; }
html[data-tema="oscuro"] .profile-section :is(.form-label, label) { color: var(--t-texto) !important; }
html[data-tema="oscuro"] .form-help,
html[data-tema="oscuro"] .additional-info-help,
html[data-tema="oscuro"] .clip-ayuda,
html[data-tema="oscuro"] .clip-nota,
html[data-tema="oscuro"] .clip-pie { color: var(--t-texto3) !important; }
html[data-tema="oscuro"] .clip-estado,
html[data-tema="oscuro"] .clip-campo label { color: var(--t-texto) !important; }
html[data-tema="oscuro"] #seccion-clip-tarjeta .clip-ajustes { background: var(--t-card2) !important; border-color: var(--t-borde) !important; }
html[data-tema="oscuro"] #seccion-clip-tarjeta .clip-btn:not(.clip-btn--primario) { background: var(--t-card2); color: var(--t-texto); border-color: var(--t-borde); }
html[data-tema="oscuro"] .anuncios-table :is(th, td) { color: var(--t-texto) !important; border-color: var(--t-borde) !important; }
/* Mis Anuncios: título y ubicación llevan colores en línea para fondo claro (#0f172a / #64748b) → casi invisibles sobre la tabla
   oscura; el estado (Activo / Pendiente / Inactivo) igual. En celular cada anuncio es una tarjeta (assets/css/mis-anuncios.css). */
html[data-tema="oscuro"] .anuncios-table .anuncio-titulo { color: var(--t-texto) !important; }
html[data-tema="oscuro"] .anuncios-table .anuncio-ubicacion { color: var(--t-texto3) !important; }
html[data-tema="oscuro"] .anuncios-table tr.anuncio-fila { background: var(--t-card2) !important; border-color: var(--t-borde) !important; box-shadow: none !important; }
html[data-tema="oscuro"] .anuncios-table td[data-label]::before { color: var(--t-texto3) !important; }
html[data-tema="oscuro"] .anuncios-table .anuncio-estado--ok { color: #6ee7b7 !important; background: rgba(16, 185, 129, .18) !important; border-color: rgba(52, 211, 153, .45) !important; }
html[data-tema="oscuro"] .anuncios-table .anuncio-estado--pend { color: #fcd34d !important; background: rgba(245, 158, 11, .18) !important; border-color: rgba(251, 191, 36, .45) !important; }
html[data-tema="oscuro"] .anuncios-table .anuncio-estado--off { color: #cbd5e1 !important; background: rgba(148, 163, 184, .2) !important; border-color: rgba(148, 163, 184, .4) !important; }
html[data-tema="oscuro"] .comments-container :is(h3, p) { color: var(--t-texto2) !important; }
html[data-tema="oscuro"] .social-label,
html[data-tema="oscuro"] .social-label span,
html[data-tema="oscuro"] .subsection-title { color: var(--t-texto) !important; }
html[data-tema="oscuro"] .plan-actual-card__texto,
html[data-tema="oscuro"] .plan-actual-card__label { color: var(--t-texto2) !important; }
html[data-tema="oscuro"] .plan-actual-card strong { color: var(--t-texto) !important; }

/* Mi perfil (perfil.html): contenedor y título; marca de la cabecera en actualizar-perfil.html */
html[data-tema="oscuro"] .perfil-container {
    background: var(--t-card) !important;
    color: var(--t-texto) !important;
    border: 1px solid var(--t-borde);
    box-shadow: 0 16px 44px rgba(0, 0, 0, .55) !important;
}

html[data-tema="claro"] .perfil-container { border: 1px solid var(--t-borde); box-shadow: 0 10px 32px var(--t-sombra) !important; }
html[data-tema="oscuro"] :is(.perfil-title, .perfil-subtitle) { color: var(--t-texto) !important; }
html[data-tema="claro"] .header__title,
html[data-tema="oscuro"] .header__title { color: var(--t-marca) !important; }

/* ============================================================================================================
   == PÁGINAS DE COMPRA Y PUBLICACIÓN: planes, elegir plan, carrito, publicar anuncio
   ============================================================================================================ */
html[data-tema="oscuro"] .comparison-section,
html[data-tema="oscuro"] .plans-section,
html[data-tema="oscuro"] .faq-section,
html[data-tema="oscuro"] .comparison-table,
html[data-tema="oscuro"] .plan-card,
html[data-tema="oscuro"] .plan-card-4,
html[data-tema="oscuro"] .faq-item,
html[data-tema="oscuro"] .save-section,
html[data-tema="oscuro"] .final-card,
html[data-tema="oscuro"] .section,
html[data-tema="oscuro"] .wrap {
    background: var(--t-card) !important;
    border-color: var(--t-borde) !important;
    color: var(--t-texto) !important;
}

html[data-tema="oscuro"] .feature-name { background: var(--t-card2) !important; color: var(--t-texto) !important; }
html[data-tema="oscuro"] .plan-value { color: var(--t-texto) !important; }
html[data-tema="oscuro"] :is(.plan-card, .plan-card-4, .faq-item, .final-card, .section, .wrap, .save-section) :is(h1, h2, h3, h4, strong, label) { color: var(--t-texto) !important; }
html[data-tema="oscuro"] :is(.plan-card, .plan-card-4, .faq-item, .final-card, .section, .wrap, .save-section) :is(p, li, small) { color: var(--t-texto2); }

/* Botón "Inicio" de las cabeceras que lo dejan translúcido con letras blancas: en Claro (cabecera blanca) no se vería */
html[data-tema="claro"] .header :is(#btnInicio, #btn-inicio, .btn--home) {
    background: #eef2f7 !important;
    color: #1f2937 !important;
    border: 1px solid var(--t-borde) !important;
}
html[data-tema="oscuro"] :is(.currency, .period, .amount, .detalle, .plan-c4-name, .plan-c4-price, .plan-c4-btn, .section__head, #sumPlan, #sumUnit, #sumTotal, .final-card b) { color: var(--t-texto) !important; }
html[data-tema="oscuro"] :is(.currency, .period) { color: var(--t-texto2) !important; }
html[data-tema="oscuro"] #limitInfoText { color: #86efac !important; }
html[data-tema="oscuro"] .section :is(div, span, label):not([class*="btn"]):not([class*="badge"]):not([class*="pill"]):not([class*="tag"]):not([class*="price"]):not([class*="alert"]) { color: inherit; }

/* ============================================================================================================
   == PÁGINAS DE CUENTA: configuración de cuenta, tienda virtual, VideoOnline (usuaria)
   ============================================================================================================ */
html[data-tema="oscuro"] .card,
html[data-tema="oscuro"] .planes-disponibles-section,
html[data-tema="oscuro"] .payment-method,
html[data-tema="oscuro"] .packs-section,
html[data-tema="oscuro"] .config-card,
html[data-tema="oscuro"] .instructions-text {
    background: var(--t-card) !important;
    border-color: var(--t-borde) !important;
    color: var(--t-texto) !important;
}

html[data-tema="oscuro"] .payment-method,
html[data-tema="oscuro"] .instructions-text { background: var(--t-card2) !important; }
html[data-tema="oscuro"] :is(.card, .config-card, .packs-section, .planes-disponibles-section) :is(h1, h2, h3, h4, strong, label) { color: var(--t-texto) !important; }
html[data-tema="oscuro"] :is(.card, .config-card, .packs-section) :is(p, li, small) { color: var(--t-texto2); }
html[data-tema="oscuro"] :is(.configuracion-subtitle, .page-subtitle) { color: var(--t-texto2) !important; }
html[data-tema="oscuro"] :is(.config-title, .config-card h3) { color: #7cc7ff !important; }

/* Títulos de página: blancos sobre el degradado en "Colores"; en Claro necesitan color propio */
html[data-tema="claro"] :is(.configuracion-title, .page-title, #main-page-title, .registro-title, .perfil-title) { color: var(--t-texto) !important; text-shadow: none !important; }
html[data-tema="claro"] :is(.configuracion-subtitle, .page-subtitle) { color: var(--t-texto2) !important; }
html[data-tema="claro"] :is(.config-title, .config-card h3) { color: #1d6fa5 !important; }
html[data-tema="oscuro"] :is(.configuracion-title, .page-title, #main-page-title) { color: var(--t-texto) !important; text-shadow: none !important; }

/* Gestor de tienda virtual (gestordecontenidosvirtual.html) */
html[data-tema="oscuro"] .content-card,
html[data-tema="oscuro"] .tickets-section {
    background: var(--t-card) !important;
    border-color: var(--t-borde) !important;
    color: var(--t-texto) !important;
}

html[data-tema="oscuro"] .upload-area { background: var(--t-card2) !important; border-color: var(--t-borde) !important; color: var(--t-texto2) !important; }
html[data-tema="oscuro"] :is(.content-card, .tickets-section) :is(h1, h2, h3, h4, strong, label, th, td) { color: var(--t-texto) !important; }
html[data-tema="oscuro"] :is(.content-card, .tickets-section) :is(p, small, li) { color: var(--t-texto2); }

/* Términos y condiciones: los títulos de color claro no se leen sobre fondo claro */
html[data-tema="claro"] .terms-section h2 { color: #1d6fa5 !important; }
html[data-tema="claro"] .terms-section h3 { color: #b83a63 !important; }
html[data-tema="claro"] .terms-container .back-button,
html[data-tema="oscuro"] .terms-container .back-button,
html[data-tema="claro"] a.back-button,
html[data-tema="oscuro"] a.back-button { background: #2563eb !important; color: #fff !important; }
html[data-tema="oscuro"] .configuracion-page .container { background: transparent !important; box-shadow: none !important; }
html[data-tema="oscuro"] .configuracion-page :is(.no-plan-title, .card-title, .section-title) { color: var(--t-texto) !important; }
html[data-tema="oscuro"] .configuracion-page :is(.no-plan-description, .card p, .card small, .planes-disponibles-section p) { color: var(--t-texto2) !important; }

/* Confirmar perfil (reclamar.html) */
html[data-tema="oscuro"] .tarjeta { background: var(--t-card) !important; color: var(--t-texto) !important; border: 1px solid var(--t-borde); }
html[data-tema="oscuro"] .tarjeta :is(h1, h2, h3, strong) { color: var(--t-texto) !important; }
html[data-tema="oscuro"] .tarjeta :is(p, small, li) { color: var(--t-texto2) !important; }
html[data-tema="oscuro"] .tarjeta a:not([class*="btn"]) { color: #8ec9ff !important; }

/* Mi perfil: aviso "no hay comentarios" en Claro */
html[data-tema="claro"] .comments-container h3 { color: #1d6fa5 !important; }

/* Ventana de vista previa de un anuncio (tramperas-anuncios.html): el panel de datos y el de comentarios eran blancos con texto claro en Oscuro */
html[data-tema="oscuro"] .preview-info,
html[data-tema="oscuro"] .preview-comments {
    background: var(--t-card2) !important;
    color: var(--t-texto) !important;
    border-color: var(--t-borde) !important;
}

html[data-tema="oscuro"] .preview-hero { background: #0f1420 !important; }
html[data-tema="oscuro"] .preview-comments :is(.preview-comments__head, .preview-comment__name, .preview-comment__text) { color: var(--t-texto) !important; }
html[data-tema="oscuro"] .preview-comment__date { color: var(--t-texto3) !important; }
html[data-tema="oscuro"] .preview-comment { background: rgba(255, 255, 255, .05) !important; border-color: var(--t-borde) !important; }
html[data-tema="oscuro"] .preview-info :is(.preview-label, dt, small) { color: var(--t-texto3) !important; }
