/* Grupo ON · TEST. Presentation only: status colours remain semantic. */
:root {
 --bg:#f1f4f7;--bg2:#e8eef3;--panel:#fff;--panel2:#f7f9fb;
 --text:#20374a;--muted:#526c80;--soft:#365971;
 --line:#d4dfe7;--line2:#a7bdcc;--blue:#2d5d81;--blue2:#34749f;
 --good:#16804a;--green:#16804a;--warn:#946000;--bad:#c42f49;--pink:#c42f49;
 --shadow:0 3px 14px rgba(30,60,85,.07);--radius:12px;
 --kpi-bg-0:#f1f4f7;--kpi-bg-1:#fff;--kpi-bg-2:#e8eef3;
 --kpi-panel:#fff;--kpi-panel-strong:#fff;--kpi-panel-soft:#f5f8fa;
 --kpi-text:#20374a;--kpi-muted:#526c80;--kpi-faint:#627c8e;
 --kpi-line:#d4dfe7;--kpi-line-strong:#a7bdcc;
 --kpi-cyan:#2d5d81;--kpi-blue:#34749f;--kpi-green:#16804a;--kpi-red:#c42f49;
 --kpi-radius-xl:14px;--kpi-radius-lg:12px;--kpi-radius-md:10px;
 --kpi-shadow-card:0 3px 14px rgba(30,60,85,.07);--kpi-shadow-soft:0 4px 18px rgba(30,60,85,.08);
 --kpi-sidebar-bg-a:#2d5d81;--kpi-sidebar-bg-b:#2d5d81;
 --kpi-sidebar-border:#234a68;--kpi-sidebar-text:#fff;--kpi-sidebar-muted:#e0ebf2;
 --kpi-sidebar-cyan:#fff;--kpi-sidebar-active-bg:#224966;--kpi-sidebar-active-border:#abc9dd;
 color-scheme:light;
}
html,body {background:#f1f4f7!important;color:#20374a!important;font-family:"Segoe UI",Arial,sans-serif!important;}
body {font-weight:500!important;}
.sidebar,.app-sidebar,.kpi-sidebar-unified {background:#2d5d81!important;color:white!important;border-right-color:#234a68!important;}
.sidebar :is(a,strong,span,h1,h2,h3),.kpi-sidebar-unified :is(a,strong,span,h1,h2,h3){color:white!important;}
.sidebar-nav a:hover,.sidebar-nav a.active {background:#224966!important;}
body :is(.panel,.card,.summary-card,.metric-card,.mini,.kpi-glass,.modal-content,.modal-box,.operator-card,.ficha,.filter-panel,.hero,.kpi-operational-overview) {
 background:#fff!important;color:#20374a!important;box-shadow:0 3px 14px rgba(30,60,85,.06)!important;border-radius:12px!important;
}
body :is(.panel-title,.panel h2,.card h3,.metric-card .value,.summary-card strong,.mini strong,.modal-title,.name) {color:#20374a!important;}
body :is(.panel-sub,.code,.label,.sub,.mini span,.metric-card .label){color:#526c80!important;}
body :is(.topbar,.timebar,.kpi-time-filter,.kpi-period-filter,.kpi-calidad-filter-line,.filters) {background:#e8eef3!important;color:#20374a!important;}
body :is(input,select,textarea) {background:#fff!important;color:#20374a!important;border-color:#a7bdcc!important;color-scheme:light;}
body :is(input,select,textarea):focus-visible,body button:focus-visible {outline:3px solid #84b7d8;outline-offset:2px;}
body :is(.btn,button.btn,.nav-link.active) {background:#2d5d81!important;color:#fff!important;border-color:#2d5d81!important;box-shadow:none!important;}
body :is(.btn.secondary,.nav-link) {background:#fff!important;color:#2d5d81!important;border-color:#a7bdcc!important;}
body :is(table,tbody,tr,td) {color:#20374a;}
body th {background:#e8eef3!important;color:#365971!important;border-color:#d4dfe7!important;}
body td {border-color:#e0e7ec!important;}
body tbody tr:hover {background:#edf4f9;}
body :is(.track,.ranking-track) {background:#dce6ed!important;}
body :is(.modal-head,.modal-sub,.operator-row) {color:#20374a;}
body .danger strong,body .bad,body .summary-card.danger strong {color:#c42f49!important;}
body .good {color:#16804a!important;}
body .warn {color:#946000!important;}
body .badge.bad {background:#fce9ed!important;color:#a71e37!important;}
body .badge.warn {background:#fff3d5!important;color:#805200!important;}
body .badge.good {background:#e4f4ea!important;color:#14693e!important;}
body .modal {background:rgba(21,42,58,.55);}
/* Do not override chart fills, severities or responsible-call row styles. */

/* Module review: Gerencia, Operaciones, Calidad and their detail views. */
:root{--ops-bg:#f1f4f7;--ops-panel:#fff;--ops-panel-2:#f5f8fa;--ops-line:#c7d6e0;--ops-line-soft:#dce5ec;--ops-blue:#2d6b94;--ops-blue-soft:#365971;--ops-text:#20374a;--ops-muted:#526c80;--ops-danger:#bf2944;}
/* Shared period selector: active state stays distinguishable. */
html body :is(.kpi-time-filter,.timebar,.topbar-filter,.ops-filter-row,.kpi-calidad-filter-wrap,.kpi-calidad-filter-card){background:#e8eef3!important;color:#20374a!important;box-shadow:none!important;}
html body :is(.kpi-time-filter,.timebar) :is(button,a){background:#fff!important;color:#2d5d81!important;border-color:#a7bdcc!important;box-shadow:none!important;}
html body :is(.kpi-time-filter,.timebar) :is(button,a).active,html body :is(.kpi-time-filter,.timebar) button.primary{background:#2d5d81!important;color:#fff!important;}
html body :is(.kpi-time-filter,.timebar,.kpi-calidad-filter-line) label,html body :is(.date-field,.turnos)>span{color:#365971!important;}
html body .turno-row label{background:#fff!important;color:#365971!important;}
html body .turno-row label.active{background:#fff1cf!important;color:#795000!important;}
/* Gerencia: all nested metric surfaces and commercial detail. */
html body :is(.metric,.sem-metric,.commercial-summary-item,.commercial-chart-period,.ficha-stat,.ficha-primary,.ranking-kpi,.ranking-province,.ficha-location,.ficha-operational,.hiper-scenario-toolbar){background:#f2f6f9!important;border-color:#d4dfe7!important;color:#20374a!important;}
html body :is(.chart-box,.ficha-box,.ranking-item,.compact-item,.hiper-bar-item,.hiper-abonado-item,.criteria-box,.audit-kpi-box){background:#fff!important;color:#20374a!important;border-color:#d4dfe7!important;box-shadow:none!important;}
html body :is(.ranking-item.active,.ranking-item:hover,.hiper-bar-item.active){background:#e7f1f8!important;border-color:#5f93b6!important;}
html body :is(.sem-title,.metric strong,.sem-metric strong,.ranking-name-line strong,.ranking-item strong,.compact-item strong,.ficha-title,.ficha-stat strong,.ficha-operational-grid strong,.commercial-summary-item strong,.hiper-bar-top strong,.hiper-abonado-name,.hiper-abonado-total strong,.criteria-box h3,.criteria-box li,.audit-kpi-box p,.audit-kpi-box h5){color:#20374a!important;text-shadow:none!important;}
html body :is(.ratio-row span,.metric span,.sem-metric span,.commercial-summary-item span,.commercial-chart-period,.commercial-chart-group>span,.ranking-primary span,.ranking-province,.ranking-kpi,.ficha-location,.ficha-stat span,.ficha-operational-title,.ficha-operational-grid span,.hiper-bar-top small,.hiper-abonado-meta,.hiper-abonado-total span,.audit-kpi-table td){color:#526c80!important;}
html body :is(.ranking-primary em,.ficha-primary strong,.ranking-position,.hiper-abonado-rank){color:#2d5d81!important;}
html body :is(.ranking-tabs button,.hiper-scenario-btn,.criteria-close){background:#fff!important;color:#2d5d81!important;border-color:#a7bdcc!important;}
html body :is(.ranking-tabs button.active,.hiper-scenario-btn.active){background:#2d5d81!important;color:#fff!important;}
html body .donut{background:radial-gradient(circle at center,#fff 0 52%,transparent 53%),conic-gradient(var(--pink) calc(var(--ratio)*1%),#dae4ec 0)!important;box-shadow:none!important;}
html body .donut :is(strong,small){color:#20374a!important;}
html body .ficha-logo-card-v7.light-logo{background:#2d5d81!important;}
html body .ficha-logo-card-v7.dark-logo{background:#f5f8fa!important;}
html body .ficha-logo-card-v7.fallback{background:#e8eef3!important;}
/* Operaciones: headline cards, every KPI, groups and operator tables. */
html body :is(.ops-card,.ops-panel,.ops-kpi,.ops-ficha,.ops-turnos-panel,.ops-groups-panel,.ops-group-card,.ops-modal-card,.oad-card,.oad-dialog,.oad-operator){background:#fff!important;color:#20374a!important;box-shadow:0 2px 8px #20374a0a!important;}
html body :is(.ops-stat,.ops-mini-grid>div,.ops-semaforo-grid-final>div,.ops-group-kpi,.ops-group-member,.ops-group-detail,.ops-criteria-grid article,.oad-stat){background:#f3f7fa!important;color:#20374a!important;border-color:#d4dfe7!important;}
html body :is(.ops-card h3,.ops-kpi strong,.ops-stat strong,.ops-mini-grid strong,.ops-semaforo-grid-final strong,.ops-group-kpi strong,.ops-group-headtext strong,.ops-ficha-head h2,.ops-operator strong,.ops-activity strong,.ops-num,.oad-dialog h2,.oad-operator h3,.oad-stat b,.oad-groups b,.oad-op-total strong){color:#20374a!important;text-shadow:none!important;}
html body :is(.ops-card-kicker,.ops-kpi span,.ops-kpi small,.ops-stat span,.ops-mini-grid span,.ops-semaforo-grid-final span,.ops-group-kpi span,.ops-group-kpi-foot,.ops-group-count,.ops-group-member-code,.ops-period-pill,.ops-groups-kicker,.ops-semaforo-trend-final-title,.ops-semaforo-trend-final-last,.oad-stat span,.oad-toolbar,.oad-op-total span,.oad-groups,.oad-note,.oad-code span){color:#526c80!important;}
html body :is(.ops-table td,.ops-turnos-table td,.oad-dialog td){background:#fff;color:#20374a!important;border-color:#dce5ec!important;}
html body :is(.ops-table tr.active td,.ops-table tr:hover td,.ops-turnos-table tr:hover td){background:#e7f1f8!important;}
html body :is(.ops-group-info,.ops-group-history-btn,.ops-group-history-current,.ops-group-badge,.ops-rank-bubble,.ops-turno-pill,.ops-ratio-group-btn,.ops-modal-card button,.oad-dialog button){background:#e8f1f7!important;color:#2d5d81!important;border-color:#a7bdcc!important;}
html body .ops-group-card-head{background:#f7f9fb!important;}
html body .ops-donut{background:radial-gradient(circle at center,#fff 58%,transparent 59%),conic-gradient(var(--ops-blue) calc(var(--value)*1%),#dce5ec 0)!important;}
html body .ops-donut :is(strong,span){color:#20374a!important;}
html body :is(.ops-ratio-track,.ops-ratio-bars .track,.oad-bar){background:#dce5ec!important;}
html body #ops-kpis .oad-card{background:#fff!important;}
html body #ops-kpis .oad-card h3,html body .oad-compact-actions summary{color:#526c80!important;}
html body .oad-compact-actions [data-split]{background:#fff!important;color:#20374a!important;border-color:#c7d6e0!important;}
html body .oad-badge{background:#e1f2e9!important;color:#176b45!important;}
html body #ops-turnos .ops-responsible-row td{background:#e1f2e9!important;color:#176b45!important;}
html body #ops-responsible-legend{color:#176b45!important;}
html body #ops-turnos button[data-oad-fecha]{background:#e8f1f7!important;color:#2d5d81!important;border-color:#a7bdcc!important;}
/* Calidad: formerly hardcoded grey surfaces, pale text and fluorescent score. */
html body .metric-card.metric-cumplimiento .value{color:#176b45!important;text-shadow:none!important;}
html body :is(.kpi-calidad-filter-panel,.kpi-calidad-filter-box,.filters-card,.filter-card){background:#e8eef3!important;color:#20374a!important;box-shadow:none!important;}
html body :is(.kpi-tipos-item,.operator-row td,.operators-scroll td,.eval-item,.mini,.modal-content,.modal-body,.radar-box){background:#fff!important;color:#20374a!important;}
html body .operator-row:hover td{background:#e7f1f8!important;}
html body :is(.quality-line>span,.kpi-tipos-pct,.kpi-tipos-name,.kpi-tipos-donut-center strong,.kpi-tipos-donut-center span){color:#20374a!important;}
html body .kpi-tipos-donut::after{background:#fff!important;}
html body :is(.status-pill,.pill,.badge:not(.bad):not(.warn):not(.good)){background:#e8eef3!important;color:#365971!important;border-color:#c7d6e0!important;}
html body #ambitoCalidad{width:auto!important;min-width:180px;max-width:100%;}
html body #opsGrid{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
html body #opsGrid .mini{display:block!important;}
/* Semantic text: preserve red losses, green positive balance and alarm colours. */
html body :is(.metric.danger strong,.ops-stat.danger strong,.ops-mini-grid .danger strong,.commercial-summary-item.bajas strong,.commercial-summary-item.saldo.negative strong,.ranking-kpi.bajas b,.ranking-kpi.saldo.negative b,.ficha-stat.bajas strong,.ficha-stat.saldo.negative strong){color:#bf2944!important;}
html body :is(.commercial-summary-item.saldo.positive strong,.ranking-kpi.saldo.positive b,.ficha-stat.saldo.positive strong){color:#176b45!important;}
html body :is(.sem-card-status,.ops-semaforo-status){text-shadow:none!important;box-shadow:none!important;}
html body [data-state="rojo"] :is(.sem-card-status,.ops-semaforo-status){background:#fce9ed!important;color:#a71e37!important;}
html body [data-state="ambar"] :is(.sem-card-status,.ops-semaforo-status){background:#fff1cf!important;color:#795000!important;}
html body [data-state="verde"] :is(.sem-card-status,.ops-semaforo-status){background:#e1f2e9!important;color:#176b45!important;}
@media(max-width:800px){html body #opsGrid{grid-template-columns:repeat(2,minmax(0,1fr));}}
html body .ranking-kpi b{color:#20374a!important;}
html body .ranking-kpi.bajas b,html body .ranking-kpi.saldo.negative b{color:#bf2944!important;}
html body .ranking-kpi.saldo.positive b{color:#176b45!important;}
html body .kpi-calidad-filter-one-row{background:#e8eef3!important;box-shadow:none!important;}
html body .kpi-calidad-filter-one-row :is(.filter-title,#rangeLabel){color:#365971!important;}
html body .kpi-time-filter__field>span,html body .kpi-time-filter__turnos>span{color:#365971!important;}
html body .kpi-time-filter__turnos-row label{background:#fff!important;color:#365971!important;}
html body .kpi-time-filter__turnos-row label.active{background:#fff1cf!important;color:#795000!important;}
html body .kpi-time-filter .kpi-apply{background:#2d5d81!important;color:#fff!important;}
html body :is(.oad-resp-metrics p,.ops-group-detail-section,.kpi-trend-module__panel,.kpi-trend-module__svg-wrap){background:#f3f7fa!important;color:#20374a!important;}
html body .oad-resp-metrics :is(h4,span,b,small){color:#176b45!important;}
html body :is(.ops-semaforo-trend-final,.kpi-trend-module__svg-wrap) svg text{fill:#526c80!important;}
html body .ops-semaforo-tooltip-bg{fill:#fff!important;stroke:#a7bdcc!important;}

/* Secondary modules and remaining nested states. */
:root{--bg0:#f1f4f7;--bg1:#e8eef3;--card:#fff;--panel-2:#f5f8fa;--line-soft:#dce5ec;--line-strong:#8aadc5;--accent:#2d5d81;--accent2:#365971;--accent3:#24567a;--cyan:#2d6b94;}
html body :is(.matrix,.subpanel,.map-panel,.login-card,.brand-card,.gt-group,.gt-member,.table-wrap,.operators-scroll){background:#fff!important;color:#20374a!important;border-color:#d4dfe7!important;box-shadow:none!important;}
html body :is(.eyebrow,.card-title,.card-value,.meta-value,.section-title h2,.subpanel h3,.gt-summary strong,.gt-group-title,.login-title,.map-head h1,.map-panel h2){color:#20374a!important;text-shadow:none!important;}
html body :is(.subtitle,.meta,.meta-row,.foot,.login-subtitle,.map-head p,.summary-card small,.panel-title p,.gt-role-label,.gt-group-count){color:#526c80!important;}
html body :is(.login-card,.shell,.map-filters) label{color:#365971!important;}
html body :is(.tab,.button-link,.back,.back-link,.export-pdf-btn,.map-filters button,.password-toggle){background:#fff!important;color:#2d5d81!important;border-color:#a7bdcc!important;}
html body :is(.tab.active,.submit,.map-filters button:last-child){background:#2d5d81!important;color:#fff!important;}
html body .shell .check-row{color:#365971!important;}
html body .shell .pill.active{background:#e1f2e9!important;color:#176b45!important;}
html body .shell .pill.disabled,html body .card.negative .card-title{color:#bf2944!important;}
html body :is(.ops-group-detail-title,.ops-group-detail-section span,.ops-groups-title,.ops-groups-summary strong){color:#20374a!important;}
html body :is(.ops-group-detail-section b,.ops-group-kpi-placeholder,.ops-group-kpi-placeholder b,.ops-groups-subtitle){color:#526c80!important;}
html body .ops-group-role{background:#e8f1f7!important;color:#2d5d81!important;}
html body .ops-group-role[data-role="REFUERZO"],html body .ops-group-detail-section span.is-refuerzo{background:#fff1cf!important;color:#795000!important;}
html body .metric-card .sub{white-space:normal!important;overflow:visible!important;text-overflow:clip!important;}

/* White surfaces; colour is retained only for data and selected states. */
html,html body{background:#fff!important;}
html body #evolucion-chart,html body .chart-box,
html body #ops-grupos-cra-tendencia-host .gtmx-card,
html body #ops-grupos-cra-tendencia-host .gtmx-summary-card,
html body #ops-grupos-cra-tendencia-host .gtmx-table-wrap,
html body .kpi-trend-module,html body .kpi-trend-module__shell,
html body .kpi-trend-module__kpi,html body .kpi-trend-module__panel,
html body .kpi-trend-module__svg-wrap,html body .kpi-trend-module__tooltip{background:#fff!important;background-image:none!important;color:#20374a!important;border-color:#d4dfe7!important;box-shadow:none!important;}
html body #ops-grupos-cra-tendencia-host :is(.gtmx-title,.gtmx-summary-main,.gtmx-summary-sub,.gtmx-subtitle,.gtmx-meta),
html body .kpi-trend-module :is(h2,h3,strong,span,p){color:#20374a!important;}
html body #ops-grupos-cra-tendencia-host .gtmx-btn{background:#fff!important;color:#2d5d81!important;border-color:#a7bdcc!important;}
html body #ops-grupos-cra-tendencia-host .gtmx-btn.is-active{background:#2d5d81!important;color:#fff!important;}
html body #ops-grupos-cra-tendencia-host td:empty,
html body #ops-grupos-cra-tendencia-host :is(.gtmx-free,.gtmx-incomplete,.gtmx-future){background:#fff!important;color:#526c80!important;}
html body .kpi-trend-module__svg path[stroke="#cbd5e1"],html body .kpi-trend-module__svg path[stroke="#cbd5e0"]{stroke:#2d5d81!important;}
html body :is(.sem-metric,.metric,.ops-stat,.ops-kpi,.ops-mini-grid>div,.ops-group-kpi,.oad-stat,.commercial-summary-item,.commercial-chart-period,.ficha-stat,.ficha-primary,.ranking-kpi,.kpi-calidad-filter-one-row,.kpi-calidad-filter-line){background:#fff!important;}

html body #ops-grupos-cra-tendencia-host :is(.gtmx-scroll,.gtmx-group-head,.gtmx-current){background:#fff!important;color:#365971!important;}
html body #ops-grupos-cra-tendencia-host thead th{background:#fff!important;color:#365971!important;}
html body .kpi-trend-module__svg[data-chart-index="0"] path[stroke-width="2.6"]{stroke:#2d5d81!important;}
html body .kpi-trend-module__panel:first-child .kpi-trend-module__dot{background:#2d5d81!important;}

html body :is(.kpi-auth-user-pill,.kpi-auth-sidebar-link,.kpi-auth-logout-btn){background:#fff!important;color:#2d5d81!important;border-color:#d4dfe7!important;}
html body :is(.ops-ranking-panel .ops-table-wrap,.ops-ranking-panel .ops-table,.ops-ranking-panel tbody,#ops-period-pill,#ops-count){background:#fff!important;color:#365971!important;}
html body header.header{background:#fff!important;background-image:none!important;border-color:#d4dfe7!important;}
html body header.header::before,html body header.header::after{background:none!important;}

/* Map and operator profile: light surfaces, including dynamically rendered details. */
html body :is(.operator-modal,.radar-card,.profile-card,.profile-metric),
html body #mapaCarteraApp :is(.map-card,.ranking-card,.province-kpi,.tile),
html body #mapTooltip{background:#fff!important;background-image:none!important;color:#20374a!important;border-color:#d4dfe7!important;box-shadow:0 4px 18px #20374a0d!important;}
html body .operator-modal :is(.modal-title,.profile-metric strong,.panel-head h3,.radar-line,.legend-content),
html body #mapaCarteraApp :is(h2,strong,.detail-list,.tooltip-title),html body #mapTooltip :is(strong,.tooltip-title){color:#20374a!important;}
html body .operator-modal :is(.modal-sub,.profile-metric span,.panel-head p,.empty),
html body #mapaCarteraApp :is(.province-kpi small,.map-legend,.muted),html body #mapTooltip .tooltip-grid span{color:#526c80!important;}
html body .operator-modal .radar-wrap svg text{fill:#365971!important;}
html body .operator-modal .radar-wrap svg line,html body .operator-modal .radar-wrap svg polygon[fill="none"]{stroke:#c8d7e2!important;}
html body .operator-modal .radar-wrap svg polygon:not([fill="none"]){fill:#2d5d8126!important;stroke:#2d5d81!important;}
html body .operator-modal .radar-wrap svg circle{fill:#2d5d81!important;stroke:#fff!important;}
html body .modal-backdrop{background:#20374a33!important;backdrop-filter:blur(3px)!important;}

html body[data-kpi-page="gerencia"] #evolucion-chart.chart-box{background:#fff!important;background-image:none!important;}
