/* Área de clientes Dongee — modo oscuro de la capa "Diseño G".
   Se activa con <html data-theme="dark">, que pone el script del selector de tema
   (includes/head.tpl): la elección guardada del visitante o, si no eligió, el modo
   de su sistema. Sin JavaScript el sitio queda en claro. */

html[data-theme="dark"]{
    color-scheme:dark;
    --pf-bg:oklch(11.5% .028 268);
    --pf-soft:oklch(16% .04 268);
    --pf-soft-2:oklch(21% .07 268);
    --pf-ink:oklch(96% .012 264);
    --pf-ink-2:oklch(81% .024 264);
    --pf-muted:oklch(67% .03 264);
    --pf-line:oklch(23% .04 268);
    --pf-line-2:oklch(34% .07 268);
    --pf-blue:#2136f2;
    --pf-blue-hover:#3d50ff;
    --pf-blue-text:oklch(79% .135 266);
    --pf-ok:oklch(80% .15 155);
    --pf-warn:oklch(82% .13 82);
    --pf-bad:oklch(74% .15 25);
}

/* Lo que trae color fijo en la hoja base */
html[data-theme="dark"] section#header .logo img{filter:invert(1) hue-rotate(180deg)}
html[data-theme="dark"] section#footer{border-top:1px solid var(--pf-line)}
html[data-theme="dark"] img[src$="overlay-spinner.svg"]{filter:invert(1)}
html[data-theme="dark"] .icheckbox_square-blue,html[data-theme="dark"] .iradio_square-blue{filter:brightness(1.25)}
html[data-theme="dark"] .captchaimage,html[data-theme="dark"] .g-recaptcha{color-scheme:light}
html[data-theme="dark"] .table-list>tbody>tr:nth-child(even)>td{background-color:var(--pf-bg)}

/* Contenido con diseño claro propio: por dentro conserva los tokens claros para que
   su texto no se pierda (la factura queda como documento claro; /store se invierte abajo). */
html[data-theme="dark"] .template3,html[data-theme="dark"] .invoice-container,html[data-theme="dark"] .landing-page{
    color-scheme:light;--pf-bg:#fff;--pf-soft:oklch(96.6% .012 264);--pf-soft-2:oklch(93.5% .03 264);--pf-ink:oklch(18% .04 266);--pf-ink-2:oklch(40% .03 266);--pf-muted:oklch(52% .025 266);--pf-line:oklch(90% .014 264);--pf-line-2:oklch(80% .03 264);--pf-blue:#0013C5;--pf-blue-hover:#0a25e6;--pf-blue-text:#0013C5;--pf-ok:oklch(48% .13 150);--pf-warn:oklch(50% .12 75);--pf-bad:oklch(52% .19 27);color:var(--pf-ink)
}
/* Páginas comerciales de /store (hoja store.css, colores fijos): por dentro siguen en
   claro y cada sección clara se invierte, igual que el DNS Manager. Fotos, vídeos y
   botones se des-invierten; los logos de la cabecera no, para que no queden oscuros.
   Las franjas que ya son oscuras o de color en el diseño original no se tocan. */
html[data-theme="dark"] .landing-page{background:#1a1a1a}
html[data-theme="dark"] .landing-page>*{filter:invert(.9) hue-rotate(180deg)}
html[data-theme="dark"] .landing-page>* img,html[data-theme="dark"] .landing-page>* video,html[data-theme="dark"] .landing-page>* iframe,html[data-theme="dark"] .landing-page>* .btn{filter:invert(1) hue-rotate(180deg)}
html[data-theme="dark"] .landing-page>* img{border-radius:12px}
html[data-theme="dark"] .landing-page>.hero img,html[data-theme="dark"] .landing-page .logo-container img,html[data-theme="dark"] .landing-page>.navbar img,html[data-theme="dark"] .landing-page img.img-logo{filter:none;border-radius:0}
/* CodeGuard: esta sección hereda el fondo de la página; se fija en blanco para que invierta bien */
html[data-theme="dark"] .landing-page.codeguard>.content-block.features{background:#fff}
html[data-theme="dark"] .landing-page.nordvpn>.hero,html[data-theme="dark"] .landing-page.nordvpn>.feature.world,html[data-theme="dark"] .landing-page.sitelock>.content-block.plans,html[data-theme="dark"] .landing-page.sitelock>.content-block.emergency,html[data-theme="dark"] .landing-page.mail-services>.product-options,html[data-theme="dark"] .landing-page.mail-services>.content-block.get-started,html[data-theme="dark"] .landing-page.codeguard>.content-block.pricing,html[data-theme="dark"] .landing-page.ssl>.validation-levels,html[data-theme="dark"] .landing-page.ssl>.standout-1,html[data-theme="dark"] .landing-page.ssl>.content-block.competitive-upgrade-promo{filter:none}
html[data-theme="dark"] .landing-page.nordvpn>.hero img,html[data-theme="dark"] .landing-page.nordvpn>.hero .btn,html[data-theme="dark"] .landing-page.nordvpn>.hero video,html[data-theme="dark"] .landing-page.nordvpn>.hero iframe,html[data-theme="dark"] .landing-page.nordvpn>.feature.world img,html[data-theme="dark"] .landing-page.nordvpn>.feature.world .btn,html[data-theme="dark"] .landing-page.nordvpn>.feature.world video,html[data-theme="dark"] .landing-page.nordvpn>.feature.world iframe,html[data-theme="dark"] .landing-page.sitelock>.content-block.plans img,html[data-theme="dark"] .landing-page.sitelock>.content-block.plans .btn,html[data-theme="dark"] .landing-page.sitelock>.content-block.plans video,html[data-theme="dark"] .landing-page.sitelock>.content-block.plans iframe,html[data-theme="dark"] .landing-page.sitelock>.content-block.emergency img,html[data-theme="dark"] .landing-page.sitelock>.content-block.emergency .btn,html[data-theme="dark"] .landing-page.sitelock>.content-block.emergency video,html[data-theme="dark"] .landing-page.sitelock>.content-block.emergency iframe,html[data-theme="dark"] .landing-page.mail-services>.product-options img,html[data-theme="dark"] .landing-page.mail-services>.product-options .btn,html[data-theme="dark"] .landing-page.mail-services>.product-options video,html[data-theme="dark"] .landing-page.mail-services>.product-options iframe,html[data-theme="dark"] .landing-page.mail-services>.content-block.get-started img,html[data-theme="dark"] .landing-page.mail-services>.content-block.get-started .btn,html[data-theme="dark"] .landing-page.mail-services>.content-block.get-started video,html[data-theme="dark"] .landing-page.mail-services>.content-block.get-started iframe,html[data-theme="dark"] .landing-page.codeguard>.content-block.pricing img,html[data-theme="dark"] .landing-page.codeguard>.content-block.pricing .btn,html[data-theme="dark"] .landing-page.codeguard>.content-block.pricing video,html[data-theme="dark"] .landing-page.codeguard>.content-block.pricing iframe,html[data-theme="dark"] .landing-page.ssl>.validation-levels img,html[data-theme="dark"] .landing-page.ssl>.validation-levels .btn,html[data-theme="dark"] .landing-page.ssl>.validation-levels video,html[data-theme="dark"] .landing-page.ssl>.validation-levels iframe,html[data-theme="dark"] .landing-page.ssl>.standout-1 img,html[data-theme="dark"] .landing-page.ssl>.standout-1 .btn,html[data-theme="dark"] .landing-page.ssl>.standout-1 video,html[data-theme="dark"] .landing-page.ssl>.standout-1 iframe,html[data-theme="dark"] .landing-page.ssl>.content-block.competitive-upgrade-promo img,html[data-theme="dark"] .landing-page.ssl>.content-block.competitive-upgrade-promo .btn,html[data-theme="dark"] .landing-page.ssl>.content-block.competitive-upgrade-promo video,html[data-theme="dark"] .landing-page.ssl>.content-block.competitive-upgrade-promo iframe{filter:none;border-radius:0}

/* ── Mis Apps (dongeelive) y otros bloques con colores escritos en línea ── */
html[data-theme="dark"] #main-body [style*="#f7f7f9"]{background:var(--pf-soft)!important;border-color:var(--pf-line)!important;color:var(--pf-ink)!important}
html[data-theme="dark"] #main-body [style*="#f7f7f9"] code{background:var(--pf-soft-2);color:var(--pf-ink)}
/* Pestañas de asistente (Claude Code, Codex…): la activa resaltada, las demás discretas */
html[data-theme="dark"] #main-body .dap-tab{color:var(--pf-ink-2);border-radius:10px 10px 0 0;text-decoration:none}
html[data-theme="dark"] #main-body .dap-tab:hover{color:var(--pf-ink);background:var(--pf-soft)}
html[data-theme="dark"] #main-body .dap-tab.active{background:var(--pf-soft-2)!important;border-color:var(--pf-line-2)!important;border-bottom-color:var(--pf-soft-2)!important;color:var(--pf-ink);font-weight:700}
/* Campos de texto sin clase de formulario (el navegador los pinta gris con letra oscura) */
html[data-theme="dark"] #main-body textarea:not(.form-control),html[data-theme="dark"] #main-body select:not(.form-control),html[data-theme="dark"] #main-body input[type="text"]:not(.form-control),html[data-theme="dark"] #main-body input[type="email"]:not(.form-control),html[data-theme="dark"] #main-body input[type="url"]:not(.form-control),html[data-theme="dark"] #main-body input[type="number"]:not(.form-control),html[data-theme="dark"] #main-body input[type="search"]:not(.form-control),html[data-theme="dark"] #main-body input:not([type]):not(.form-control){background-color:var(--pf-bg);color:var(--pf-ink);border-color:var(--pf-line-2)}
html[data-theme="dark"] #main-body [style*="solid #ddd"],html[data-theme="dark"] #main-body [style*="solid #e3e3e8"]{border-color:var(--pf-line)!important}
html[data-theme="dark"] #main-body textarea[style*="#ccc"]{border-color:var(--pf-line-2)!important}
html[data-theme="dark"] #main-body summary[style*="#1a5fd0"]{color:var(--pf-blue-text)!important}
html[data-theme="dark"] #main-body .btn-link[style*="#a23b34"]{color:var(--pf-bad)!important}

/* Promos de complementos en el carrito (SiteLock, CodeGuard…): sus logos traen letra
   oscura sobre transparente; se les pone una ficha blanca para que se lean. */
html[data-theme="dark"] .addon-promo-container .logo img,html[data-theme="dark"] .promo-container .logo img{background:#fff;padding:5px 9px;border-radius:8px;box-sizing:content-box}
html[data-theme="dark"] .addon-promo-container,html[data-theme="dark"] .promo-container{border-color:var(--pf-line)!important;background:var(--pf-bg);color:var(--pf-ink)}

/* ── Cloudflare DNS (dongee_cloudflare) ── */
html[data-theme="dark"] .dcf-shell{--dcf-text:var(--pf-ink);--dcf-muted:var(--pf-muted);--dcf-border:var(--pf-line);--dcf-blue:var(--pf-blue-text);color:var(--pf-ink)}
html[data-theme="dark"] .dcf-panel,html[data-theme="dark"] .dcf-zone,html[data-theme="dark"] .dcf-loading-card{background:var(--pf-bg);border-color:var(--pf-line);color:var(--pf-ink);box-shadow:none}
html[data-theme="dark"] .dcf-zone:hover{border-color:var(--pf-blue-text);box-shadow:none}
html[data-theme="dark"] .dcf-loading-card span:last-child,html[data-theme="dark"] .dcf-dns,html[data-theme="dark"] .dcf-editor-help{color:var(--pf-muted)}
html[data-theme="dark"] .dcf-select,html[data-theme="dark"] .dcf-input{background:var(--pf-bg);border-color:var(--pf-line-2);color:var(--pf-ink)}
html[data-theme="dark"] .dcf-btn-primary{background:var(--pf-blue);color:#fff}
html[data-theme="dark"] .dcf-btn-light{background:var(--pf-bg);border-color:var(--pf-line-2);color:var(--pf-ink)}
html[data-theme="dark"] .dcf-btn-warning{background:color-mix(in oklab,var(--pf-warn) 14%,var(--pf-bg));border-color:color-mix(in oklab,var(--pf-warn) 45%,var(--pf-bg));color:var(--pf-warn)}
html[data-theme="dark"] .dcf-btn-danger{background:transparent;border-color:color-mix(in oklab,var(--pf-bad) 45%,var(--pf-bg));color:var(--pf-bad)}
html[data-theme="dark"] .dcf-kpi,html[data-theme="dark"] .dcf-ns,html[data-theme="dark"] .dcf-editor-row>td{background:var(--pf-soft);border-color:var(--pf-line)}
html[data-theme="dark"] .dcf-ns code,html[data-theme="dark"] .dcf-table code{color:var(--pf-ink)}
html[data-theme="dark"] .dcf-table td{border-bottom-color:var(--pf-line)}
html[data-theme="dark"] .dcf-status{background:var(--pf-soft-2);color:var(--pf-blue-text)}
html[data-theme="dark"] .dcf-status-active,html[data-theme="dark"] .dcf-status-returned_to_dongee{background:color-mix(in oklab,var(--pf-ok) 14%,var(--pf-bg));color:var(--pf-ok)}
html[data-theme="dark"] .dcf-status-needs_attention{background:color-mix(in oklab,var(--pf-bad) 14%,var(--pf-bg));color:var(--pf-bad)}
html[data-theme="dark"] [class*="dcf-status-pending"],html[data-theme="dark"] [class*="dcf-status-awaiting"],html[data-theme="dark"] [class*="dcf-status-preparing"]{background:color-mix(in oklab,var(--pf-warn) 16%,var(--pf-bg));color:var(--pf-warn)}
html[data-theme="dark"] .dcf-alert-success{background:color-mix(in oklab,var(--pf-ok) 10%,var(--pf-bg));border-color:color-mix(in oklab,var(--pf-ok) 40%,var(--pf-bg));color:var(--pf-ok)}
html[data-theme="dark"] .dcf-alert-error{background:color-mix(in oklab,var(--pf-bad) 10%,var(--pf-bg));border-color:color-mix(in oklab,var(--pf-bad) 40%,var(--pf-bg));color:var(--pf-bad)}
html[data-theme="dark"] .dcf-proxy{color:var(--pf-warn)}
html[data-theme="dark"] .dcf-waf-options,html[data-theme="dark"] .dcf-setting{border-color:var(--pf-line-2)}
html[data-theme="dark"] .dcf-waf-option:hover{background:var(--pf-soft)}
html[data-theme="dark"] .dcf-danger-zone{border-color:color-mix(in oklab,var(--pf-bad) 40%,var(--pf-bg))}
html[data-theme="dark"] .dcf-danger-zone .dcf-panel-head{background:color-mix(in oklab,var(--pf-bad) 8%,var(--pf-bg))}
html[data-theme="dark"] .dcf-danger-divider{border-top-color:color-mix(in oklab,var(--pf-bad) 40%,var(--pf-bg))}
html[data-theme="dark"] .dcf-danger-copy{color:var(--pf-bad)}

/* ── Passkeys (dongee_passkeys) ── */
html[data-theme="dark"] .dp-panel{background:var(--pf-bg);border-color:var(--pf-line);color:var(--pf-ink)}
html[data-theme="dark"] .dp-device{border-bottom-color:var(--pf-line)}
html[data-theme="dark"] .dp-device-meta,html[data-theme="dark"] .dp-empty,html[data-theme="dark"] .dp-divider{color:var(--pf-muted)}
html[data-theme="dark"] .dp-divider::before,html[data-theme="dark"] .dp-divider::after{background:var(--pf-line)}
html[data-theme="dark"] .dp-help-button{background:var(--pf-bg);border-color:var(--pf-line-2);color:var(--pf-blue-text)}
html[data-theme="dark"] .dp-help{background:var(--pf-soft);border-color:var(--pf-line);color:var(--pf-ink-2)}
html[data-theme="dark"] .dp-help::before{background:var(--pf-soft);border-color:var(--pf-line)}
html[data-theme="dark"] .dp-help a{color:var(--pf-blue-text)}
html[data-theme="dark"] .dp-error,html[data-theme="dark"] .dsp-message.is-error{color:var(--pf-bad)}
html[data-theme="dark"] .dp-success,html[data-theme="dark"] .dsp-message.is-success{color:var(--pf-ok)}

/* ── Support PIN (dongee_support_pin) ── */
html[data-theme="dark"] .dsp-page{background:var(--pf-bg);border-color:var(--pf-line);box-shadow:none;color:var(--pf-ink)}
html[data-theme="dark"] .dsp-page-head{background:var(--pf-soft)}
html[data-theme="dark"] .dsp-expiry,html[data-theme="dark"] .dsp-note{color:var(--pf-muted)}

/* ── Router de IA (inference) ── */
html[data-theme="dark"] .inf-wrap{--inf-border:var(--pf-line);--inf-bg-soft:var(--pf-soft);--inf-text-dim:var(--pf-muted);--inf-accent:var(--pf-blue-text);--inf-shadow:none;color:var(--pf-ink-2)}
html[data-theme="dark"] .inf-wrap h1,html[data-theme="dark"] .inf-wrap h2,html[data-theme="dark"] .inf-wrap h3,html[data-theme="dark"] .inf-wrap h4,html[data-theme="dark"] .inf-wrap h5,html[data-theme="dark"] .inf-filter:hover{color:var(--pf-ink)}
html[data-theme="dark"] .inf-card,html[data-theme="dark"] details.inf-prices{background:var(--pf-bg);border-color:var(--pf-line)}
html[data-theme="dark"] .inf-hero{background:var(--pf-soft);border-color:var(--pf-line)}
html[data-theme="dark"] .inf-cta{background:var(--pf-soft);border-color:var(--pf-line)}
html[data-theme="dark"] .inf-video{background:var(--pf-soft)}
html[data-theme="dark"] .inf-tiers,html[data-theme="dark"] .inf-filters{border-color:var(--pf-blue-text)}
html[data-theme="dark"] .inf-tier-count,html[data-theme="dark"] .inf-rec,html[data-theme="dark"] .inf-filter-rec,html[data-theme="dark"] .inf-prices-chevron,html[data-theme="dark"] .inf-filter.is-on{color:var(--pf-blue-text)}
html[data-theme="dark"] .inf-filter.is-on,html[data-theme="dark"] .inf-model:hover{border-color:var(--pf-blue-text)}
html[data-theme="dark"] .inf-model:hover{background:var(--pf-soft)}
html[data-theme="dark"] .inf-tier--emerald .inf-tier-count{color:var(--pf-ok)}
html[data-theme="dark"] .inf-tier--amber .inf-tier-count,html[data-theme="dark"] .inf-blocked i{color:var(--pf-warn)}
html[data-theme="dark"] .inf-prices-hint{color:var(--pf-muted)}
html[data-theme="dark"] .inf-hero-eyebrow{background:var(--pf-soft-2);color:var(--pf-blue-text)}
html[data-theme="dark"] .inf-endpoint code,html[data-theme="dark"] .inf-chip{color:var(--pf-ink)}
html[data-theme="dark"] .inf-steps li::before{background:var(--pf-bg);border-color:var(--pf-blue-text);color:var(--pf-blue-text)}
html[data-theme="dark"] .inf-blocked{background:color-mix(in oklab,var(--pf-warn) 8%,var(--pf-bg));border-color:color-mix(in oklab,var(--pf-warn) 40%,var(--pf-bg))}
html[data-theme="dark"] .inf-blocked p{color:var(--pf-ink-2)}

/* ── DNS Manager (ModulesGarden, hoja "Layers UI" de 460 KB con colores fijos) ──
   En vez de reescribir cientos de reglas, cada bloque se invierte como pieza: el blanco
   pasa a casi negro y los colores conservan su tono. Por dentro se mantienen los tokens
   claros para que la inversión dé texto claro. No se aplica al contenedor entero porque
   rompería las ventanas modales (posición fija). */
html[data-theme="dark"] .mg-wrapper .lu-navbar,html[data-theme="dark"] .mg-wrapper .lu-widget,html[data-theme="dark"] .mg-wrapper .lu-modal__content,html[data-theme="dark"] .mg-wrapper .lu-alert,html[data-theme="dark"] .mg-wrapper .lu-toast,html[data-theme="dark"] .mg-toast{
    --pf-bg:#fff;--pf-soft:oklch(96.6% .012 264);--pf-soft-2:oklch(93.5% .03 264);--pf-ink:oklch(18% .04 266);--pf-ink-2:oklch(40% .03 266);--pf-muted:oklch(52% .025 266);--pf-line:oklch(90% .014 264);--pf-line-2:oklch(80% .03 264);--pf-blue:#0013C5;--pf-blue-hover:#0a25e6;--pf-blue-text:#0013C5;--pf-ok:oklch(48% .13 150);--pf-warn:oklch(50% .12 75);--pf-bad:oklch(52% .19 27);color:var(--pf-ink);filter:invert(.9) hue-rotate(180deg);box-shadow:none
}
html[data-theme="dark"] .mg-wrapper .lu-widget img,html[data-theme="dark"] .mg-wrapper .lu-modal__content img{filter:invert(1) hue-rotate(180deg)}
html[data-theme="dark"] .mg-wrapper h2,html[data-theme="dark"] .mg-wrapper .lu-app{color:var(--pf-ink)}
