/* Colivea public-dark.css
   Capa comun de legibilidad para paginas publicas y portales no-admin.
   No toca modo claro: las variables solo existen en theme-dark o SO oscuro. */

html.theme-dark{
  color-scheme:dark !important;
  --pub-bg:#0a0e17;
  --pub-bg-soft:#0f1626;
  --pub-card:#111826;
  --pub-card-2:#0f172a;
  --pub-border:#1e2838;
  --pub-border-2:#334155;
  --pub-text:#e5e7eb;
  --pub-title:#f8fafc;
  --pub-muted:#cbd5e1;
  --pub-soft:#94a3b8;
  --pub-link:#93c5fd;
  --pub-link-strong:#bfdbfe;
  --pub-blue:#1e40af;
  --pub-green:#047857;
  --pub-amber-bg:#422006;
  --pub-amber-border:#92400e;
  --pub-amber-text:#fde68a;
  --pub-red-bg:#450a0a;
  --pub-red-border:#991b1b;
  --pub-red-text:#fecaca;
  --pub-ok-bg:#052e16;
  --pub-ok-border:#166534;
  --pub-ok-text:#bbf7d0;
  --pub-info-bg:#0c1f3d;
  --pub-info-border:#1d4ed8;
  --pub-info-text:#bfdbfe;
  --bg:var(--pub-bg);
  --surface:var(--pub-card);
  --line:var(--pub-border);
  --line-soft:var(--pub-border-2);
  --ink:var(--pub-title);
  --ink-soft:var(--pub-muted);
  --ink-mute:var(--pub-soft);
  --navy-soft:var(--pub-info-bg);
  --amber-soft:var(--pub-amber-bg);
  --amber-border:var(--pub-amber-border);
  --danger-soft:var(--pub-red-bg);
  --olive-soft:var(--pub-ok-bg);
  background:var(--pub-bg) !important;
  color:var(--pub-text) !important;
}

@media (prefers-color-scheme:dark){
  html:not(.theme-light){
    color-scheme:dark !important;
    --pub-bg:#0a0e17;
    --pub-bg-soft:#0f1626;
    --pub-card:#111826;
    --pub-card-2:#0f172a;
    --pub-border:#1e2838;
    --pub-border-2:#334155;
    --pub-text:#e5e7eb;
    --pub-title:#f8fafc;
    --pub-muted:#cbd5e1;
    --pub-soft:#94a3b8;
    --pub-link:#93c5fd;
    --pub-link-strong:#bfdbfe;
    --pub-blue:#1e40af;
    --pub-green:#047857;
    --pub-amber-bg:#422006;
    --pub-amber-border:#92400e;
    --pub-amber-text:#fde68a;
    --pub-red-bg:#450a0a;
    --pub-red-border:#991b1b;
    --pub-red-text:#fecaca;
    --pub-ok-bg:#052e16;
    --pub-ok-border:#166534;
    --pub-ok-text:#bbf7d0;
    --pub-info-bg:#0c1f3d;
    --pub-info-border:#1d4ed8;
    --pub-info-text:#bfdbfe;
    --bg:var(--pub-bg);
    --surface:var(--pub-card);
    --line:var(--pub-border);
    --line-soft:var(--pub-border-2);
    --ink:var(--pub-title);
    --ink-soft:var(--pub-muted);
    --ink-mute:var(--pub-soft);
    --navy-soft:var(--pub-info-bg);
    --amber-soft:var(--pub-amber-bg);
    --amber-border:var(--pub-amber-border);
    --danger-soft:var(--pub-red-bg);
    --olive-soft:var(--pub-ok-bg);
    background:var(--pub-bg) !important;
    color:var(--pub-text) !important;
  }
  html:not(.theme-light) body{
    color-scheme:dark !important;
  }
}

html.theme-dark body{
  color-scheme:dark !important;
}

body{
  background:var(--pub-bg) !important;
  color:var(--pub-text) !important;
}

h1,h2,h3,h4,h5,h6,
.title,.headline,.big-number,.value,.num,.price,.total,.logo,.brand,
.hero h1,.hero-about h1,.hdr h1,.intro h1,.c-hero h1,
.calc-result h3,.card h1,.card h2,.card h3,.box h1,.box h2,.box h3,
strong,b,summary{
  color:var(--pub-title) !important;
}

p,li,td,th,label,small,
.lead,.hero-sub,.c-muted,.muted,.meta,.meta-line,.subtitle,.sub,
.label,.hint,.excerpt,.feature,.dist,.hab-zone,.hab-desc,.footer,
.calc-result .label,.calc-input label,.card p,.box p,.bubble p{
  color:var(--pub-muted) !important;
}

a:not(.c-cta):not(.btn):not(.nav-lang):not(.c-nav-cta){
  color:var(--pub-link) !important;
}
a:not(.c-cta):not(.btn):hover{
  color:var(--pub-link-strong) !important;
}

main,section,
.c-nav,.nav,.navbar,.top-bar,
.trust-bar,.cta-sticky-bottom,
.c-card,.card,.box,.panel,.section,.module,.tool,
.c-form,.availability-panel,.calc-input,.calc-result,
details.c-faq,.barrio-card,.pillar,.contact-card,.zona-block,
.hab,.hab-card,.hab-placeholder,.choice,.choices .choice,
.sino,.pros-cons,.compare-yes,.compare-no,.cookie-table,
.wrap,.wrap > .card,.chat,.msgs,.bubble,.bubble.bot,.next,.field,
.rueda-timeline,.rueda-day,.callout,.note,.q,
.intro,.hdr,.hero,.hero-about,.c-hero,
.result-row,.total,.dist,.features,.feature,
.home-live-availability,.home-live-grid,.home-live-empty,.home-live-head,
.home-live-room,
.tenant-strip,.tenant-strip-inner,
.hab-detail,.hab-summary,.hab-price-box,.hab-price-row,.hab-extra-section,
.hab-cta-row,.hab-carousel,.carousel-btn,.support-box,.login-card,
.form-card,.form-step,.responsable,.identity-card,
.rooms-live,.room-card,.room-empty,.room-photo,.room-tag,
.state,.state-actions,.state-link,.stats,.quote,.equipo-quote,.checks-block,
.legal,.a,.a > div,.topbar,.lang-switch,.lang-toggle,
.pilar,.pilar-row,.sino-grid,.sino .img,.error-box,.err-box,
.day-chip,.availability-badge,.home-live-pill,
.c-container > div:not(.c-cta-box):not(.c-alert),
table,thead,tbody,tr,th,td{
  background:var(--pub-card) !important;
  border-color:var(--pub-border) !important;
  color:var(--pub-text) !important;
}

.hero,.hero-about,.hdr,.intro,.c-hero{
  background:linear-gradient(135deg,#0f172a 0%,#111826 55%,#0c1f3d 100%) !important;
}

.nav,.c-nav{
  box-shadow:0 1px 0 var(--pub-border) !important;
  backdrop-filter:blur(12px);
}
.nav a,.c-nav a,.nav-links a,.c-nav-links a{
  color:var(--pub-muted) !important;
}
.nav-logo,.c-nav-logo,.minilogo{
  color:var(--pub-title) !important;
}
.nav-logo span,.c-nav-logo span,.logo span{
  color:#fbbf24 !important;
}
body > a:not(.c-cta):not(.btn),
.lang-switch,.lang-toggle,.nav-lang,.c-lang{
  background:var(--pub-card-2) !important;
  border-color:var(--pub-border-2) !important;
  color:var(--pub-link-strong) !important;
}

[style*="background:white"],
[style*="background: white"],
[style*="background:#fff"],
[style*="background: #fff"],
[style*="background:#ffffff"],
[style*="background: #ffffff"],
[style*="background:rgb(255,255,255)"],
[style*="background: rgb(255,255,255)"],
[style*="background-color:white"],
[style*="background-color: white"],
[style*="background-color:#fff"],
[style*="background-color: #fff"],
[style*="background-color:#ffffff"],
[style*="background-color: #ffffff"]{
  background:var(--pub-card) !important;
  border-color:var(--pub-border) !important;
  color:var(--pub-text) !important;
}

.c-alert.info,.info,[style*="#dbeafe"],[style*="#eff6ff"],[style*="#f0f9ff"],
.badge,.c-tag,.b-tag,.chip,.pill,.tag,.source-badge,.hab-code,
.zone-badges span,.nav-lang,.c-lang,.info-tooltip,
.feature .icon,.features .icon,.hab-chip,.room-tag{
  background:var(--pub-info-bg) !important;
  border-color:var(--pub-info-border) !important;
  color:var(--pub-info-text) !important;
}

.c-alert.warn,.warn,.warning,[style*="#fef3c7"],[style*="#fff7ed"],[style*="#fffbeb"]{
  background:var(--pub-amber-bg) !important;
  border-color:var(--pub-amber-border) !important;
  color:var(--pub-amber-text) !important;
}
[style*="background:var(--amber-soft)"],
[style*="background: var(--amber-soft)"]{
  background:var(--pub-amber-bg) !important;
  border-color:var(--pub-amber-border) !important;
  color:var(--pub-amber-text) !important;
}

.c-alert.err,.err,.error,[style*="#fee2e2"],[style*="#fef2f2"]{
  background:var(--pub-red-bg) !important;
  border-color:var(--pub-red-border) !important;
  color:var(--pub-red-text) !important;
}

.c-alert.ok,.ok,.success,[style*="#d1fae5"],[style*="#f0fdf4"],[style*="#dcfce7"]{
  background:var(--pub-ok-bg) !important;
  border-color:var(--pub-ok-border) !important;
  color:var(--pub-ok-text) !important;
}
.pros,.included,.si{
  background:var(--pub-ok-bg) !important;
  border-color:var(--pub-ok-border) !important;
  color:var(--pub-ok-text) !important;
}
.cons,.no{
  background:var(--pub-red-bg) !important;
  border-color:var(--pub-red-border) !important;
  color:var(--pub-red-text) !important;
}
.aparte,.amber,.peak{
  background:var(--pub-amber-bg) !important;
  border-color:var(--pub-amber-border) !important;
  color:var(--pub-amber-text) !important;
}

input:not([type="checkbox"]):not([type="radio"]),
select,textarea{
  background:var(--pub-card-2) !important;
  border-color:var(--pub-border-2) !important;
  color:var(--pub-text) !important;
}
input::placeholder,textarea::placeholder{
  color:var(--pub-soft) !important;
}

button,.btn,.c-cta{
  border-color:var(--pub-border-2) !important;
}
.btn:not(.wa):not(.primary):not(.danger):not(.warn),
.c-cta.ghost{
  background:var(--pub-card-2) !important;
  color:var(--pub-link-strong) !important;
}
.c-cta:not(.amber):not(.wa),.btn.primary,.c-nav-cta{
  background:var(--pub-blue) !important;
  color:#fff !important;
}
.c-cta.wa,.btn.wa,a.wa,[class*="whatsapp"],[href*="wa.me"]{
  background:var(--pub-green) !important;
  border-color:#34d399 !important;
  color:#fff !important;
}
.c-cta.amber,.btn.amber{
  background:#b45309 !important;
  border-color:#f59e0b !important;
  color:#fff !important;
}

details.c-faq[open],details.c-faq[open] p,
details.c-faq summary,.c-table th,th{
  color:var(--pub-title) !important;
}

.c-footer,.footer,footer{
  background:#020617 !important;
  color:var(--pub-muted) !important;
  border-color:var(--pub-border) !important;
}

svg,img,video,canvas{
  color-scheme:normal;
}

/* Remate de paginas publicas con CSS local no compartido. */
.container > div > div,
.hab-header,.hab-header-main,.hab-address,.hab-zone,.hab-features,.hab-tagline,.hab-status,.home-live-pill,
.trust-tile,.trust-tile div,.tenant-actions a,.tenant-secondary,
.testimonio,.testimonio blockquote,.equipo-quote blockquote,
.checks-block,.checks-block label,.checks-block span,.ck,
.stat,.room-title,.room-meta,.room-price,.room-empty,.room-loading,
#errorbox,.msg-sub{
  background:var(--pub-card) !important;
  border-color:var(--pub-border) !important;
  color:var(--pub-text) !important;
}

.hab-address strong,
.hab-price-box strong,
.home-live-room b,
.home-live-room strong,
.room-title,
.stat .n{
  color:var(--pub-title) !important;
}
.hab-zone,.trust-tile div,.trust-tile span,.home-live-room span,.room-meta,.room-price span,.stat .l,.msg-sub,
.hab-price-label,.hab-price-unit,.hab-price-fianza,.hab-price-footnote,
.habs .container > div > span,.room-loading,
.dia,.what,.caption,.dim,cite,.btn-no-es-para-mi{
  color:var(--pub-muted) !important;
}
.tenant-kicker,em{
  color:var(--pub-link-strong) !important;
}

.hab-tagline,.hab-status.upcoming,.upcoming{
  background:var(--pub-amber-bg) !important;
  border-color:var(--pub-amber-border) !important;
  color:var(--pub-amber-text) !important;
}
.hab-status.available,.available{
  background:var(--pub-ok-bg) !important;
  border-color:var(--pub-ok-border) !important;
  color:var(--pub-ok-text) !important;
}

.hab-cta,.nav-wa,.csb-wa,a.cta,.tenant-primary{
  background:var(--pub-green) !important;
  border-color:#34d399 !important;
  color:#fff !important;
}
.hab-cta.hab-cta-ghost,.tenant-secondary{
  background:var(--pub-card-2) !important;
  border-color:var(--pub-border-2) !important;
  color:var(--pub-link-strong) !important;
}

#errorbox,.errorbox,.err-box{
  background:var(--pub-red-bg) !important;
  border-color:var(--pub-red-border) !important;
  color:var(--pub-red-text) !important;
}
#errorbox strong,.errorbox strong,.err-box strong,.err-box h2{
  color:var(--pub-red-text) !important;
}

.btn-aceptar:disabled,
button:disabled{
  background:#334155 !important;
  border-color:#475569 !important;
  color:#cbd5e1 !important;
}
.precio{
  color:#fca5a5 !important;
}
.identity-card span,
.checks-block span{
  color:var(--pub-muted) !important;
}
.sino.si .label,.sino.no .label{
  color:#fff !important;
}
.input-row,.lang-switch button{
  background:var(--pub-card-2) !important;
  border-color:var(--pub-border-2) !important;
  color:var(--pub-text) !important;
}
.support-btn,.footer a,.link-portal a,#back-portal-link{
  color:#fff !important;
}
a[href*="wa.me"],a[href*="whatsapp"],.footer a[href*="wa.me"]{
  color:#fff !important;
}
html.theme-dark body .footer a[href*="wa.me"][href],
html.theme-dark body a[href*="wa.me"][href]{
  color:#fff !important;
}
html.theme-dark body > .box,
html.theme-dark body .box{
  background:var(--pub-card) !important;
  border:1px solid var(--pub-border) !important;
  color:var(--pub-text) !important;
  box-shadow:0 18px 48px rgba(0,0,0,.35) !important;
}
html.theme-dark .box .logo,
html.theme-dark .box .brand{
  color:#93c5fd !important;
}
html.theme-dark .box .logo span{
  color:#fbbf24 !important;
}
html.theme-dark .err,
html.theme-dark .box .err{
  background:var(--pub-red-bg) !important;
  border:1px solid var(--pub-red-border) !important;
  color:var(--pub-red-text) !important;
}
[style*="color:var(--ink)"],
[style*="color: var(--ink)"]{
  color:var(--pub-title) !important;
}
.quiz-q,.quiz-opt{
  background:var(--pub-card) !important;
  border-color:var(--pub-border) !important;
  color:var(--pub-text) !important;
}
.quiz-q p,.quiz-opt span{
  color:var(--pub-text) !important;
}

/* Sweep 2026-07-05: paginas publicas anidadas y portales generados.
   Cubre blog/, en/, habitaciones/, portal-renovacion y reportes renderizados. */
article,.c-article,.blog-card,.post-card,.cta-box,
.precio-hero,.hucha-hero,.endowment,.social-proof,.op,.opciones .op,
.actual,.fianza,.plan-pago,.garantia-flex,.aviso-agua,.slider-microcopy,
.desglose-tabla,.precio-hero .desglose-tabla,
.modal-box,.causa-item,.sub-pregunta,.opt-out,
.kpi-row .kpi,.report-card,.print-panel,
.contact-block,.trace-note,.editar-banner,.hab-pill,
.c-cta-box{
  background:var(--pub-card) !important;
  border-color:var(--pub-border) !important;
  color:var(--pub-text) !important;
}
.cta-box,.c-cta-box,.garantia-flex,.endowment,.opt-out{
  border-left-color:var(--pub-info-border) !important;
}
.c-cta-box h2,.c-cta-box h3,.c-cta-box strong,.c-cta-box b{
  color:var(--pub-title) !important;
}
.c-cta-box p,.c-cta-box li,.c-cta-box small{
  color:var(--pub-muted) !important;
}
.c-cta-box a:not(.c-cta):not(.btn){
  color:var(--pub-link-strong) !important;
}
.card > .header,
.box > .header,
body > #content > .header,
.header{
  background:linear-gradient(135deg,var(--pub-card-2),var(--pub-info-bg)) !important;
  border-color:var(--pub-border) !important;
  color:var(--pub-title) !important;
}
.card > .header h1,
.card > .header .kicker,
.box > .header h1,
.box > .header .kicker,
body > #content > .header h1,
body > #content > .header p,
body > #content > .header .id,
body > #content > .header .meta,
.header h1,
.header p,
.header .id,
.header .meta{
  color:var(--pub-title) !important;
  -webkit-text-fill-color:currentColor !important;
  opacity:1 !important;
}
.social-proof,.fianza,.aviso-agua,.slider-microcopy.warn{
  background:var(--pub-amber-bg) !important;
  border-color:var(--pub-amber-border) !important;
  color:var(--pub-amber-text) !important;
}
.hucha-hero,.precio-hero .ahorro,.op.recomendada,.success-card,.slider-microcopy.ok{
  background:var(--pub-ok-bg) !important;
  border-color:var(--pub-ok-border) !important;
  color:var(--pub-ok-text) !important;
}
.precio-hero,.op.selected,.plan-pago.selected,.causa-item.checked{
  border-color:var(--pub-ok-border) !important;
  box-shadow:0 0 0 3px rgba(52,211,153,.18) !important;
}
.header .lock-pill,.op .badge,.badge,.estado-pill,
.pill-verde,.pill-amarillo,.pill-naranja,.pill-rojo{
  background:var(--pub-card-2) !important;
  border:1px solid var(--pub-border-2) !important;
  color:var(--pub-link-strong) !important;
}
.pill-verde,.op .badge{
  background:var(--pub-ok-bg) !important;
  border-color:var(--pub-ok-border) !important;
  color:var(--pub-ok-text) !important;
}
.pill-amarillo,.pill-naranja{
  background:var(--pub-amber-bg) !important;
  border-color:var(--pub-amber-border) !important;
  color:var(--pub-amber-text) !important;
}
.pill-rojo{
  background:var(--pub-red-bg) !important;
  border-color:var(--pub-red-border) !important;
  color:var(--pub-red-text) !important;
}
.precio-hero .precio-grande .num,
.precio-hero .precio-grande .num .small,
.precio-hero .ahorro b,
.hucha-hero h2,
.hucha-hero h2 .euros,
.hucha-hero .label,
.op .titulo,
.op .precio,
.op.recomendada .titulo,
.actual b,
.fianza .total,
.plan-pago b,
.success-card h2,
.kpi-row .kpi .kpi-val,
.v-good{
  color:var(--pub-ok-text) !important;
}
.precio-hero .ancla,
.precio-hero .ancla b,
.precio-hero .precio-grande .sub,
.precio-hero .footnote,
.op .duracion,
.op .precio .small,
.op .puntos,
.slider-labels,
.modal-box .modal-sub,
.kpi-label,
.subtitle{
  color:var(--pub-muted) !important;
}
.precio-hero summary,
.cta-box a,
.opt-out a{
  color:var(--pub-link-strong) !important;
}
.precio-hero details,
.precio-hero .desglose-tabla .row,
.op .puntos,
.modal-step-dot{
  border-color:var(--pub-border-2) !important;
}
.precio-hero .desglose-tabla .row.descuento{
  background:var(--pub-ok-bg) !important;
  color:var(--pub-ok-text) !important;
}
.precio-hero .desglose-tabla .row.descuento b{
  color:var(--pub-ok-text) !important;
}
.contact-block h3,
.contact-block .who,
.editar-banner b{
  color:var(--pub-title) !important;
}
.estado-pill.COMPLETADO,
.hab-pill{
  background:var(--pub-ok-bg) !important;
  border:1px solid var(--pub-ok-border) !important;
  color:var(--pub-ok-text) !important;
}
.v-bad,.precio.v-bad{
  color:var(--pub-red-text) !important;
}
.v-warn{
  color:var(--pub-amber-text) !important;
}
.photo-grid figure{
  background:var(--pub-card-2) !important;
  border-color:var(--pub-border) !important;
}
.photo-grid figcaption{
  background:linear-gradient(transparent, rgba(2,6,23,.9)) !important;
  color:#fff !important;
}
.gallery-hint,.photo figcaption{
  color:var(--pub-muted) !important;
}
.carousel-btn{
  background:rgba(15,23,42,.9) !important;
  border:1px solid var(--pub-border-2) !important;
  color:#fff !important;
}
.print-btn{
  background:var(--pub-blue) !important;
  color:#fff !important;
}

/* Inline legacy colors: paginas generadas con style="" despues del CSS compartido. */
[style*="background:#f1f5f9"],
[style*="background: #f1f5f9"],
[style*="background:#f8fafc"],
[style*="background: #f8fafc"],
[style*="background:#ecfdf5"],
[style*="background: #ecfdf5"],
[style*="background:#f0f9ff"],
[style*="background: #f0f9ff"],
[style*="background:#eff6ff"],
[style*="background: #eff6ff"],
[style*="background:#ffffff"],
[style*="background: #ffffff"],
[style*="background:white"],
[style*="background: white"]{
  background:var(--pub-card) !important;
  border-color:var(--pub-border) !important;
  color:var(--pub-text) !important;
}
[style*="linear-gradient(135deg,#ecfdf5"],
[style*="linear-gradient(135deg, #ecfdf5"],
[style*="linear-gradient(135deg,#f0fdf4"],
[style*="linear-gradient(135deg, #f0fdf4"]{
  background:var(--pub-ok-bg) !important;
  border-color:var(--pub-ok-border) !important;
  color:var(--pub-ok-text) !important;
}
[style*="background:#fef3c7"],
[style*="background: #fef3c7"],
[style*="background:#fffbeb"],
[style*="background: #fffbeb"],
[style*="background:#fde68a"],
[style*="background: #fde68a"]{
  background:var(--pub-amber-bg) !important;
  border-color:var(--pub-amber-border) !important;
  color:var(--pub-amber-text) !important;
}
[style*="background:#f59e0b"],
[style*="background: #f59e0b"],
[style*="background:#eab308"],
[style*="background: #eab308"]{
  background:#92400e !important;
  border-color:#fbbf24 !important;
  color:#fff !important;
}
[style*="background:#10b981"],
[style*="background: #10b981"],
[style*="background:#16a34a"],
[style*="background: #16a34a"],
button.cta,
.cta-sticky-wrap button.cta{
  background:#047857 !important;
  border-color:#34d399 !important;
  color:#fff !important;
}
.cta-sticky-wrap{
  background:linear-gradient(to top,var(--pub-bg) 70%,rgba(10,14,23,0)) !important;
}
[style*="color:#0f172a"],
[style*="color: #0f172a"],
[style*="color:#1e3a8a"],
[style*="color: #1e3a8a"],
[style*="color:#1e40af"],
[style*="color: #1e40af"],
[style*="color:#334155"],
[style*="color: #334155"],
[style*="color:#475569"],
[style*="color: #475569"]{
  color:var(--pub-title) !important;
}
[style*="color:#64748b"],
[style*="color: #64748b"],
[style*="color:#94a3b8"],
[style*="color: #94a3b8"]{
  color:var(--pub-muted) !important;
}
[style*="color:#065f46"],
[style*="color: #065f46"],
[style*="color:#14532d"],
[style*="color: #14532d"],
[style*="color:#166534"],
[style*="color: #166534"],
[style*="color:#10b981"],
[style*="color: #10b981"]{
  color:var(--pub-ok-text) !important;
}
[style*="color:#78350f"],
[style*="color: #78350f"],
[style*="color:#92400e"],
[style*="color: #92400e"]{
  color:var(--pub-amber-text) !important;
}
html.theme-dark body a[href*="wa.me"][href]:not(.c-cta):not(.btn):not(.nav-lang):not(.c-nav-cta),
html.theme-dark body a[href*="whatsapp"][href]:not(.c-cta):not(.btn):not(.nav-lang):not(.c-nav-cta){
  color:#fff !important;
}

/* Sweep 2026-07-05: remate sistematico de inline legacy publico/portal.
   Usa variables dark; en claro quedan indefinidas y no alteran la pagina. */
[style*="background-color:white"],
[style*="background-color: white"],
[style*="background-color:#fff"],
[style*="background-color: #fff"],
[style*="background-color:#ffffff"],
[style*="background-color: #ffffff"],
[style*="background-color:rgb(255"],
[style*="background-color: rgb(255"],
[style*="background:rgb(255"],
[style*="background: rgb(255"],
[style*="background:#f9fafb"],
[style*="background: #f9fafb"],
[style*="background:#f7f9fc"],
[style*="background: #f7f9fc"],
[style*="background:#f5f5f4"],
[style*="background: #f5f5f4"],
[style*="background:#f5f3ff"],
[style*="background: #f5f3ff"],
[style*="background:#fdf4ff"],
[style*="background: #fdf4ff"],
[style*="background:#faf5ff"],
[style*="background: #faf5ff"],
[style*="background:#eef2ff"],
[style*="background: #eef2ff"],
[style*="background:#e0e7ff"],
[style*="background: #e0e7ff"],
[style*="background:#e0f2fe"],
[style*="background: #e0f2fe"],
[style*="background:#ecfeff"],
[style*="background: #ecfeff"],
[style*="background:#cffafe"],
[style*="background: #cffafe"],
[style*="background:#f0fdfa"],
[style*="background: #f0fdfa"],
[style*="background:#ccfbf1"],
[style*="background: #ccfbf1"],
[style*="background:#ede9fe"],
[style*="background: #ede9fe"],
[style*="background:#f3e8ff"],
[style*="background: #f3e8ff"],
[style*="background:#e2e8f0"],
[style*="background: #e2e8f0"],
[style*="background:#cbd5e1"],
[style*="background: #cbd5e1"]{
  background:var(--pub-card) !important;
  border-color:var(--pub-border) !important;
  color:var(--pub-text) !important;
  -webkit-text-fill-color:currentColor !important;
}
[style*="background:#fefce8"],
[style*="background: #fefce8"],
[style*="background:#fef9c3"],
[style*="background: #fef9c3"],
[style*="background:#fff7ed"],
[style*="background: #fff7ed"],
[style*="background:#fffbeb"],
[style*="background: #fffbeb"],
[style*="background:#ffedd5"],
[style*="background: #ffedd5"]{
  background:var(--pub-amber-bg) !important;
  border-color:var(--pub-amber-border) !important;
  color:var(--pub-amber-text) !important;
  -webkit-text-fill-color:currentColor !important;
}
[style*="background:#fff1f2"],
[style*="background: #fff1f2"],
[style*="background:#ffe4e6"],
[style*="background: #ffe4e6"],
[style*="background:#fecaca"],
[style*="background: #fecaca"]{
  background:var(--pub-red-bg) !important;
  border-color:var(--pub-red-border) !important;
  color:var(--pub-red-text) !important;
  -webkit-text-fill-color:currentColor !important;
}
[style*="background:#dbeafe"],
[style*="background: #dbeafe"],
[style*="background:#bfdbfe"],
[style*="background: #bfdbfe"]{
  background:var(--pub-info-bg) !important;
  border-color:var(--pub-info-border) !important;
  color:var(--pub-info-text) !important;
  -webkit-text-fill-color:currentColor !important;
}
[style*="background:#d1fae5"],
[style*="background: #d1fae5"]{
  background:var(--pub-ok-bg) !important;
  border-color:var(--pub-ok-border) !important;
  color:var(--pub-ok-text) !important;
  -webkit-text-fill-color:currentColor !important;
}
[style*="color:black"],
[style*="color: black"],
[style*="color:#000"],
[style*="color: #000"],
[style*="color:#111"],
[style*="color: #111"],
[style*="color:#222"],
[style*="color: #222"],
[style*="color:#333"],
[style*="color: #333"],
[style*="color:#111827"],
[style*="color: #111827"],
[style*="color:#1f2937"],
[style*="color: #1f2937"],
[style*="color:#374151"],
[style*="color: #374151"],
[style*="color:#4b5563"],
[style*="color: #4b5563"],
[style*="color:#6b7280"],
[style*="color: #6b7280"]{
  color:var(--pub-title) !important;
  -webkit-text-fill-color:currentColor !important;
}
[style*="color:#0c4a6e"],
[style*="color: #0c4a6e"],
[style*="color:#0369a1"],
[style*="color: #0369a1"],
[style*="color:#0284c7"],
[style*="color: #0284c7"],
[style*="color:#0891b2"],
[style*="color: #0891b2"],
[style*="color:#0e7490"],
[style*="color: #0e7490"],
[style*="color:#155e75"],
[style*="color: #155e75"],
[style*="color:#1d4ed8"],
[style*="color: #1d4ed8"],
[style*="color:#2563eb"],
[style*="color: #2563eb"]{
  color:var(--pub-link-strong) !important;
  -webkit-text-fill-color:currentColor !important;
}
[style*="color:#14532d"],
[style*="color: #14532d"],
[style*="color:#15803d"],
[style*="color: #15803d"],
[style*="color:#0f766e"],
[style*="color: #0f766e"],
[style*="color:#115e59"]{
  color:var(--pub-ok-text) !important;
  -webkit-text-fill-color:currentColor !important;
}
[style*="color:#854d0e"],
[style*="color: #854d0e"],
[style*="color:#a16207"],
[style*="color: #a16207"],
[style*="color:#b45309"],
[style*="color: #b45309"],
[style*="color:#ca8a04"],
[style*="color: #ca8a04"]{
  color:var(--pub-amber-text) !important;
  -webkit-text-fill-color:currentColor !important;
}
[style*="color:#7f1d1d"],
[style*="color: #7f1d1d"],
[style*="color:#991b1b"],
[style*="color: #991b1b"],
[style*="color:#b91c1c"],
[style*="color: #b91c1c"]{
  color:var(--pub-red-text) !important;
  -webkit-text-fill-color:currentColor !important;
}

/* Sweep 2026-07-05 system10: gradientes claros, fondo html y paginas "light only".
   Algunos portales tenian color-scheme:light only !important y fondos por
   linear-gradient; si el SO esta en oscuro, eso puede dejar controles y textos
   ilegibles aunque los fondos solidos esten cubiertos. */
html.theme-dark,
html.theme-dark body{
  color-scheme:dark !important;
}
[style*="linear-gradient"][style*="#fef3c7"],
[style*="linear-gradient"][style*="#fffbeb"],
[style*="linear-gradient"][style*="#fff7ed"],
[style*="linear-gradient"][style*="#ffedd5"],
[style*="linear-gradient"][style*="#fef9c3"],
[style*="linear-gradient"][style*="#fefce8"]{
  background:linear-gradient(135deg,var(--pub-amber-bg),#2a1806) !important;
  border-color:var(--pub-amber-border) !important;
  color:var(--pub-amber-text) !important;
  -webkit-text-fill-color:currentColor !important;
}
[style*="linear-gradient"][style*="#fee2e2"],
[style*="linear-gradient"][style*="#fef2f2"],
[style*="linear-gradient"][style*="#fff1f2"],
[style*="linear-gradient"][style*="#ffe4e6"],
[style*="linear-gradient"][style*="#fecaca"]{
  background:linear-gradient(135deg,var(--pub-red-bg),#2a1212) !important;
  border-color:var(--pub-red-border) !important;
  color:var(--pub-red-text) !important;
  -webkit-text-fill-color:currentColor !important;
}
[style*="linear-gradient"][style*="#ecfdf5"],
[style*="linear-gradient"][style*="#f0fdf4"],
[style*="linear-gradient"][style*="#d1fae5"],
[style*="linear-gradient"][style*="#dcfce7"],
[style*="linear-gradient"][style*="#ccfbf1"]{
  background:linear-gradient(135deg,var(--pub-ok-bg),#082f1b) !important;
  border-color:var(--pub-ok-border) !important;
  color:var(--pub-ok-text) !important;
  -webkit-text-fill-color:currentColor !important;
}
[style*="linear-gradient"][style*="#f8fafc"],
[style*="linear-gradient"][style*="#f1f5f9"],
[style*="linear-gradient"][style*="#eff6ff"],
[style*="linear-gradient"][style*="#f0f9ff"],
[style*="linear-gradient"][style*="#dbeafe"],
[style*="linear-gradient"][style*="#bfdbfe"],
[style*="linear-gradient"][style*="#e0f2fe"],
[style*="linear-gradient"][style*="#f5f3ff"],
[style*="linear-gradient"][style*="#ede9fe"],
[style*="linear-gradient"][style*="#f3e8ff"]{
  background:linear-gradient(135deg,var(--pub-info-bg),var(--pub-card)) !important;
  border-color:var(--pub-info-border) !important;
  color:var(--pub-info-text) !important;
  -webkit-text-fill-color:currentColor !important;
}

/* Sweep 2026-07-06: estados ocultos de portales y shortlinks.
   Modales/dropzones y paneles flotantes creados en display:none no entraban
   en la carga inicial; al mostrarlos deben heredar superficies oscuras reales. */
.foto-drop,
.cb-panel{
  background:var(--pub-card) !important;
  border-color:var(--pub-border-2) !important;
  color:var(--pub-text) !important;
  -webkit-text-fill-color:currentColor !important;
  box-shadow:0 18px 48px rgba(0,0,0,.35) !important;
}
.foto-drop:hover{
  background:var(--pub-ok-bg) !important;
  border-color:var(--pub-ok-border) !important;
}
.foto-drop *,
.cb-panel *,
.cb-panel .cb-powered,
.cb-panel .cb-powered *{
  color:var(--pub-text) !important;
  -webkit-text-fill-color:currentColor !important;
}
.foto-drop p,
.foto-drop span,
.cb-panel .cb-powered{
  color:var(--pub-muted) !important;
  -webkit-text-fill-color:currentColor !important;
}
.foto-drop b,
.cb-panel a,
.cb-panel .cb-powered a{
  color:var(--pub-link-strong) !important;
  -webkit-text-fill-color:currentColor !important;
}
#hist-pct{
  color:var(--pub-link-strong) !important;
  -webkit-text-fill-color:currentColor !important;
}

/* Sweep 2026-07-06 system10: blancos RGB inline y cache antigua.
   Cubre HTML generado con rgba/rgb en vez de hex, muy habitual en enlaces
   cortos, portales y widgets que no pasan por el design-system admin. */
[style*="background:rgba(255,255,255"],
[style*="background: rgba(255,255,255"],
[style*="background:rgba(255, 255, 255"],
[style*="background: rgba(255, 255, 255"],
[style*="background-color:rgba(255,255,255"],
[style*="background-color: rgba(255,255,255"],
[style*="background-color:rgba(255, 255, 255"],
[style*="background-color: rgba(255, 255, 255"],
[style*="background:rgb(255,255,255"],
[style*="background: rgb(255,255,255"],
[style*="background:rgb(255, 255, 255"],
[style*="background: rgb(255, 255, 255"],
[style*="background-color:rgb(255,255,255"],
[style*="background-color: rgb(255,255,255"],
[style*="background-color:rgb(255, 255, 255"],
[style*="background-color: rgb(255, 255, 255"]{
  background:var(--pub-card) !important;
  border-color:var(--pub-border) !important;
  color:var(--pub-text) !important;
  -webkit-text-fill-color:currentColor !important;
}
[style*="color:rgb(15,23,42"],
[style*="color: rgb(15,23,42"],
[style*="color:rgb(15, 23, 42"],
[style*="color: rgb(15, 23, 42"],
[style*="color:rgb(17,24,39"],
[style*="color: rgb(17,24,39"],
[style*="color:rgb(17, 24, 39"],
[style*="color: rgb(17, 24, 39"],
[style*="color:rgb(30,41,59"],
[style*="color: rgb(30,41,59"],
[style*="color:rgb(30, 41, 59"],
[style*="color: rgb(30, 41, 59"]{
  color:var(--pub-text) !important;
  -webkit-text-fill-color:currentColor !important;
}

@media (prefers-color-scheme:dark){
  html:not(.theme-light) body > .box,
  html:not(.theme-light) body .box{
    background:var(--pub-card) !important;
    border:1px solid var(--pub-border) !important;
    color:var(--pub-text) !important;
    box-shadow:0 18px 48px rgba(0,0,0,.35) !important;
  }
  html:not(.theme-light) .box .logo,
  html:not(.theme-light) .box .brand{
    color:#93c5fd !important;
  }
  html:not(.theme-light) .box .logo span{
    color:#fbbf24 !important;
  }
  html:not(.theme-light) .err,
  html:not(.theme-light) .box .err{
    background:var(--pub-red-bg) !important;
    border:1px solid var(--pub-red-border) !important;
    color:var(--pub-red-text) !important;
  }
}

@media print{
  html,body,main,section,article,.card,.box,.panel,.kpi,.kpi-row .kpi,table,th,td{
    background:#fff !important;
    color:#0f172a !important;
    box-shadow:none !important;
  }
  h1,h2,h3,h4,strong,b,.kpi-val,.value,.num{
    color:#0f172a !important;
  }
  p,li,td,th,small,.subtitle,.muted,.c-muted{
    color:#334155 !important;
  }
  .print-btn{
    display:none !important;
  }
}
