.theme-control { display:flex; justify-content:flex-end; align-items:center; gap:10px; margin:0 0 18px; font-weight:600; }
.theme-control select { min-height:44px; border-radius:10px; padding:8px 12px; font:inherit; }
html[data-hv-theme="oscuro"] { color-scheme:dark; background:#0c1725; --hv-page:#0c1725; --hv-surface:#17293a; --hv-ink:#edf3fa; --hv-muted:#b9c9d8; --hv-line:#42586b; --hv-navy-soft:#253d52; --hv-orange-soft:#4a3021; }
html[data-hv-theme="oscuro"] body { background:#0c1725; color:#edf3fa; }
html[data-hv-theme="oscuro"] :is(.login-panel,.info-panel,.form-box,.registros-wrapper,.registros-panel,.success-box,.tab-panel,.catalog-row,.user-row,.settings-dialog,.recovery-dialog,.communications-dialog,.analysis-filters,.analysis-card,.export-box,.module-card,.ia-result,.hv-ia .answer,.hv-ia .ia-proposal,.ia-typing) { background:#17293a; color:#edf3fa; border-color:#42586b; }
html[data-hv-theme="oscuro"] :is(h1,h2,h3,h4,label,.field span,.catalog-name,.user-primary,.module-copy p,.analysis-business,.section-heading p,.plan-label strong,.plan-note,.report-help,.detail-stat,.insight-fact,.kpi-label,.kpi-value,.login-title,.login-subtitle,.info-title,.info-text,.hv-ia .message-author,.ia-result h3,.ia-result h4,.ia-metrics dt,.ia-metrics dd,.ia-result small) { color:#edf3fa; }
html[data-hv-theme="oscuro"] :is(input:not([type="checkbox"]),select,textarea) { background:#0d1b2a; color:#fff; border-color:#637b8e; }
html[data-hv-theme="oscuro"] :is(input,textarea)::placeholder { color:#b5c5d4; opacity:1; }
html[data-hv-theme="oscuro"] :is(.back-link,.back-button,.secondary-button,.small-button,.tab-button,.ia-back,.inbox-button,.communications-body button,.secondary-action) { background:#253d52; color:#f3f7fc; border-color:#667d90; }
html[data-hv-theme="oscuro"] .tab-button.active { color:#9fe8c7; border-bottom-color:#73d2a4; }
html[data-hv-theme="oscuro"] :is(.ia-full-page,.ia-full-page .hv-ia,.ia-full-page .hv-ia header,.ia-full-page .hv-ia form,.ia-full-page .hv-ia-messages) { background:#0c1725; color:#edf3fa; }
html[data-hv-theme="oscuro"] .ia-full-page .hv-ia-stage { background:radial-gradient(ellipse at 50% 55%,#573c2b80,transparent 68%); }
html[data-hv-theme="oscuro"] :is(.hv-ia .ia-suggestions button,.hv-ia .ia-list-navigation button,.proposal-fields,.ia-result-note,.ia-result-extras,.hv-ia textarea,.ia-typing) { background:#253d52; color:#f3f7fc; border-color:#637b8e; }
html[data-hv-theme="oscuro"] :is(.hv-ia .proposal-fields dt,.hv-ia .proposal-fields dd,.hv-ia .proposal-intro,.hv-ia .ia-result-extras summary) { color:#e0edf7; }
html[data-hv-theme="oscuro"] :is(.state-pill,.user-status,.ia-badge) { background:#245b48; color:#e5fff2; }
html[data-hv-theme="oscuro"] :is(#modalObservacion > div,.success-box) { background:#17293a !important; color:#edf3fa !important; }
html[data-hv-theme="oscuro"] :focus-visible { outline:3px solid #ffbc7a; outline-offset:2px; }
html[data-hv-theme="oscuro"] :is(.login-panel,.info-panel,.form-box,.tab-panel,.catalog-row,.user-row,.settings-dialog,.recovery-dialog,.module-card,#registrationCard,#dashboardCard,#kpis>div,#incomeDetails,#unitsDetails,#pieDetails) { background-color:#17293a !important; border-color:#42586b !important; }
html[data-hv-theme="oscuro"] :is(.secondary-button,.small-button,.secondary-action,.back-button) { background:#253d52 !important; color:#f3f7fc !important; border-color:#667d90 !important; }
html[data-hv-theme="oscuro"] .tab-button.active { color:#b4f5d3 !important; }
.theme-control-home { margin:0; font-size:.85rem; }
.theme-control-home select { min-height:40px; }
@media(max-width:500px){.theme-control-home span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}}
html[data-hv-theme="oscuro"] :is(.home-logout,.home-actions .settings-link) { background:#253d52 !important; color:#f3f7fc !important; border-color:#667d90 !important; }
html[data-hv-theme="oscuro"] :is(.info-card,.info-badge) { background:#253d52 !important; color:#f3f7fc !important; border-color:#637b8e !important; }
html[data-hv-theme="oscuro"] :is(.info-card-title,.info-card-text) { color:#edf3fa !important; }

.hv-footer-simple { padding:18px 16px; text-align:center; }
.hv-footer-simple p { margin:0; color:var(--hv-muted,#64748b); font-size:12px; line-height:1.6; }
.hv-footer-simple a { color:inherit; text-decoration:underline; text-underline-offset:3px; }
.module-visual svg { width:60%; height:60%; color:#1a6b57; }
html[data-hv-theme="oscuro"] .module-visual svg { color:#a6e5ca; }
html[data-hv-theme="oscuro"] .hv-footer-simple { border-color:#42586b; }
html[data-hv-theme="oscuro"] :is(.registros-panel,.registros-body,#modalObservacion > div,.analysis-page #incomeSection,.analysis-page #unitsSection,.analysis-page #pieSection,.analysis-page #insightSection,.analysis-page #tableSection,.analysis-page .analysis-empty,.analysis-page .analysis-error) { background:#17293a !important; color:#edf3fa !important; border-color:#42586b !important; }
html[data-hv-theme="oscuro"] :is(.registros-header,.registro-nombre,#modalObservacion h3,.registro-total) { color:#edf3fa !important; }
html[data-hv-theme="oscuro"] :is(.registro-fecha,.registro-extra,.registros-body .empty-state) { color:#b9c9d8 !important; }
html[data-hv-theme="oscuro"] .registro-item { border-color:#42586b; }
html[data-hv-theme="oscuro"] :is(.edit-btn,.analysis-page .table-header button,.analysis-page .export-actions .secondary-action,.analysis-page .detail-close) { background:#253d52 !important; color:#f3f7fc !important; border-color:#637b8e !important; }
html[data-hv-theme="oscuro"] .analysis-page table { background:#17293a; color:#edf3fa; }
html[data-hv-theme="oscuro"] .analysis-page th { background:#253d52; color:#d6e5f0; }
html[data-hv-theme="oscuro"] .analysis-page td { border-color:#42586b; }
html[data-hv-theme="oscuro"] .registros-body .empty-state { background:#17293a !important; color:#d3e1eb !important; }
html[data-hv-theme="oscuro"] .settings-menu .tab-button { background:transparent; color:#edf3fa; }
html[data-hv-theme="oscuro"] .settings-menu .tab-button:hover { background:#253d52; }
html[data-hv-theme="oscuro"] .settings-back { color:#edf3fa; }

/* El control de movimiento se aplica antes de pintar la página. */
html[data-hv-motion="off"] *, html[data-hv-motion="off"] *::before, html[data-hv-motion="off"] *::after, html[data-hv-motion="off"]::before, html[data-hv-motion="off"]::after { scroll-behavior:auto !important; animation:none !important; transition:none !important; }
