/* v297 · Resumen por empresa, selector amplio y contraste del correo. */
html[data-theme=dark],html[data-theme=dark] body{--bg:#000!important;background:#000!important;background-image:none!important}
html[data-theme=dark] body #app,html[data-theme=dark] body .wrap{background:transparent!important;background-image:none!important}
html body .company-tools{display:flex!important;flex-wrap:wrap!important;align-items:center!important;gap:12px 20px!important}
html body .company-tools .company-picker{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto!important;align-items:center;column-gap:10px;row-gap:5px;flex:1 1 650px!important;min-width:0!important;max-width:100%!important}
html body .company-tools .company-actions{flex:0 1 auto;flex-wrap:wrap;justify-content:flex-end;margin-left:auto;max-width:100%}
html body #companySelect{width:100%!important;max-width:none!important;min-width:0!important;box-sizing:border-box;font-size:14px;flex:none!important}
html body .company-selected-name{grid-column:2/-1;min-width:0;max-width:100%;font-size:12px;line-height:1.5;font-weight:600;color:#426778;overflow-wrap:anywhere;white-space:normal}
html body .company-picker .rolebadge{margin:0!important;white-space:nowrap;max-width:100%}
html body .ocp-company-summary{--summary-surface:#fff;--summary-ink:#17384b;--summary-muted:#526d7c;--summary-line:#ccdeea;--summary-soft:#f2f8fc;--summary-net:#0b5471;--summary-net-ink:#fff;display:block!important;background:transparent!important;border:0!important;border-radius:0!important;padding:0!important;box-shadow:none!important;margin:0 0 20px!important;min-width:0}
html body .ocp-company-summary .company-summary-heading{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px 20px;margin:0 0 13px}
html body .ocp-company-summary .company-summary-heading>div:first-child{flex:1 1 330px;min-width:0}
html body .ocp-company-summary .company-summary-eyebrow{display:block;font-size:10px;line-height:1.5;font-weight:800;letter-spacing:.1em;color:#0b5471;margin:0 0 4px}
html body .ocp-company-summary #companySummaryTitle{margin:0!important;font-size:clamp(17px,1.7vw,21px)!important;line-height:1.4!important;color:var(--summary-ink)!important;overflow-wrap:anywhere}
html body .ocp-company-summary #companySummaryContext{margin:4px 0 0;font-size:13px;line-height:1.5;color:var(--summary-muted)!important}
html body .ocp-company-summary .company-period-options{display:flex;flex:0 1 auto;gap:6px;min-width:0;max-width:100%;flex-wrap:wrap}
html body .ocp-company-summary .company-period-options button{padding:9px 12px;min-height:40px;margin:0;background:var(--summary-surface)!important;border:1px solid var(--summary-line)!important;border-radius:6px!important;color:var(--summary-ink)!important;font-size:12px;line-height:1.4;white-space:normal;box-shadow:none!important}
html body .ocp-company-summary .company-period-options button[aria-pressed=true]{background:#dff0fb!important;color:#0b4661!important;border-color:#78b4d4!important;box-shadow:inset 0 -2px #0b5471!important}
html body .ocp-company-summary .stats{margin:0!important;padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important;min-width:0}
html body .ocp-company-summary .ocp-company-metrics{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:12px!important}
html body .ocp-company-summary .stat{display:flex!important;flex-direction:column;align-items:flex-start;gap:6px;margin:0!important;padding:16px!important;min-height:0!important;height:auto!important;min-width:0;width:auto!important;border:1px solid var(--summary-line)!important;border-radius:8px!important;background:var(--summary-surface)!important;box-shadow:none!important;grid-column:auto!important;color:var(--summary-ink)!important;transition:none!important}
html body .ocp-company-summary .stat::before,html body .ocp-company-summary .stat::after{display:none!important}
html body .ocp-company-summary .stat small{margin:0;font-size:13px!important;line-height:1.45;font-weight:650;color:var(--summary-muted)!important;overflow-wrap:anywhere}
html body .ocp-company-summary .stat strong{display:block;margin:0!important;font-size:clamp(23px,2.5vw,30px)!important;line-height:1.3;font-weight:800;color:var(--summary-ink)!important;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;max-width:100%}
html body .ocp-company-summary .stat>span{margin:0;font-size:12px;line-height:1.5;color:var(--summary-muted)!important;overflow-wrap:anywhere}
html body .ocp-company-summary .company-status-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;margin:12px 0 0;padding:0 14px;background:var(--summary-soft);border:1px solid var(--summary-line);border-radius:8px;min-width:0}
html body .ocp-company-summary .company-status-item{display:flex;align-items:center;gap:8px;min-width:0;padding:12px 10px;font-size:13px;line-height:1.45;color:var(--summary-ink)}
html body .ocp-company-summary .company-status-item i{width:9px;height:9px;border-radius:3px;flex:0 0 9px;background:#98b9c9}
html body .ocp-company-summary .company-status-absence i{background:#ed939b}
html body .ocp-company-summary .company-status-free i{background:#f4cf58}
html body .ocp-company-summary .company-status-vacation i{background:#86bddf}
html body .ocp-company-summary .company-status-registered i{background:#6cbea0}
html body .ocp-company-summary .company-status-item span{min-width:0;flex:1}
html body .ocp-company-summary .company-status-item b{font-size:16px;font-variant-numeric:tabular-nums}
html body .ocp-company-summary .company-financial-summary{display:block;margin:17px 0 0;padding:0;border:0;background:transparent;min-width:0}
html body .ocp-company-summary .company-financial-summary h3{margin:0 0 9px;font-size:14px;line-height:1.5;color:var(--summary-ink)!important}
html body .ocp-company-summary .ocp-company-finances{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:12px!important}
html body .ocp-company-summary .ocp-company-finances .kpi-payroll-total{background:var(--summary-net)!important;border-color:var(--summary-net)!important;color:var(--summary-net-ink)!important}
html body .ocp-company-summary .ocp-company-finances .kpi-payroll-total :is(small,strong,span){color:var(--summary-net-ink)!important;-webkit-text-fill-color:var(--summary-net-ink)!important;opacity:1!important}
html body .ocp-company-summary .company-summary-footnote{margin:10px 0 0;font-size:12px;line-height:1.6;color:var(--summary-muted)!important}
html body .ocp-company-summary :is(h2,h3,p,small,span,b,strong,button){-webkit-text-fill-color:currentColor!important;opacity:1!important}
html body .ocp-company-summary .hidden,html body .ocp-company-summary .stat.hidden{display:none!important}
html[data-theme=dark] body .ocp-company-summary{--summary-surface:#111c23;--summary-ink:#edf6fb;--summary-muted:#bdd2de;--summary-line:#3c5969;--summary-soft:#13232d;--summary-net:#a1dffd;--summary-net-ink:#123f55}
html[data-theme=dark] body .company-selected-name{color:#c8deeb}
html[data-theme=dark] body .ocp-company-summary .company-summary-eyebrow{color:#a1dffd!important}
html[data-theme=dark] body .ocp-company-summary .company-period-options button[aria-pressed=true]{background:#a8dff5!important;color:#123f55!important;border-color:#c9ecfa!important}
/* El correo usa superficies oscuras y texto claro, sin heredar el azul de botones. */
html[data-theme=dark] body #oncInternalMail .onc-mail-shell{--mail-surface:#10191e;--mail-soft:#182831;--mail-line:#385562;--mail-ink:#eef7fc;--mail-muted:#bed3de;background:var(--mail-surface)!important;border-color:#45616e!important;border-radius:12px!important}
html[data-theme=dark] body #oncInternalMail :is(.onc-mail-heading,.onc-mail-sidebar,.onc-mail-main){background:var(--mail-surface)!important;color:var(--mail-ink)!important}
html[data-theme=dark] body #oncInternalMail .onc-mail-sidebar{background:#0d161b!important}
html[data-theme=dark] body #oncInternalMail .onc-mail-row{background:#182831!important;color:var(--mail-ink)!important;border:1px solid var(--mail-line)!important;border-radius:8px!important;padding:15px!important;margin:0 0 10px!important;box-shadow:none!important;filter:none!important;min-width:0}
html[data-theme=dark] body #oncInternalMail .onc-mail-row:hover{background:#213944!important;border-color:#6a9bb2!important}
html[data-theme=dark] body #oncInternalMail .onc-mail-row :is(strong,.onc-mail-row-subject){color:var(--mail-ink)!important}
html[data-theme=dark] body #oncInternalMail .onc-mail-row :is(time,.onc-mail-row-preview,.onc-mail-row-attachments,.onc-mail-row-arrow){color:var(--mail-muted)!important}
html[data-theme=dark] body #oncInternalMail .onc-mail-avatar{background:#315162!important;color:#f4fbff!important}
html[data-theme=dark] body #oncInternalMail :is(.onc-mail-folder,.onc-mail-folder.secondary){background:transparent!important;border-color:#304c59!important;color:#e8f4fb!important}
html[data-theme=dark] body #oncInternalMail .onc-mail-folder.is-active{background:#a5dcf2!important;border-color:#c1e9fa!important;color:#123f55!important}
html[data-theme=dark] body #oncInternalMail .onc-mail-folder.is-active :is(span,b){color:#123f55!important}
html[data-theme=dark] body #oncInternalMail .onc-mail-folder.is-active .onc-mail-count{background:#153f54!important;color:#fff!important}
html[data-theme=dark] body #oncInternalMail .onc-mail-new{background:#a5dcf2!important;border-color:#c1e9fa!important;color:#123f55!important}
html[data-theme=dark] body #oncInternalMail .onc-mail-new span{color:#123f55!important}
html[data-theme=dark] body #oncInternalMail :is(h2,h3,.onc-mail-message-subject){color:var(--mail-ink)!important}
html[data-theme=dark] body #oncInternalMail :is(.onc-mail-message-body,.onc-mail-message-meta,.onc-mail-sidebar-note,.onc-mail-search-label,.onc-mail-compose-fields label,.onc-mail-heading p,.onc-mail-empty p,.onc-mail-pagination span){color:var(--mail-muted)!important}
html[data-theme=dark] body #oncInternalMail :is(input,textarea){background:#0d171e!important;color:#edf7fc!important;border-color:#56788a!important}
html[data-theme=dark] body #oncInternalMail :is(input,textarea)::placeholder{color:#b6cdd9!important;opacity:1!important}
html[data-theme=dark] body #oncInternalMail .onc-mail-close{background:#ffc0c6!important;border-color:#ff9fa9!important;color:#682b33!important}
html[data-theme=dark] body #oncInternalMail .onc-mail-close span{color:#682b33!important}
html[data-theme=dark] body #oncInternalMail :is(p,span,strong,small,b,time,h2,h3,label,a,input,textarea,button){-webkit-text-fill-color:currentColor!important;opacity:1!important}
@media(max-width:1000px){html body .company-tools .company-picker{flex-basis:100%!important}html body .company-tools .company-actions{width:100%;justify-content:flex-start;margin:0}html body .ocp-company-summary .company-status-summary{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){html body .ocp-company-summary .ocp-company-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}html body .ocp-company-summary .ocp-company-finances{grid-template-columns:minmax(0,1fr)!important}html body .ocp-company-summary .company-summary-heading>div:first-child{flex-basis:100%}html body .ocp-company-summary .company-period-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%}html body .ocp-company-summary .company-period-options button{font-size:12px;min-height:44px;padding:7px}html body .ocp-company-summary .stat{padding:13px!important}html body .ocp-company-summary .stat small{font-size:12px!important}html body .ocp-company-summary .company-status-summary{padding:0 5px}html body .ocp-company-summary .company-status-item{padding:10px 7px;font-size:12px;gap:6px}}
@media(max-width:600px){html body .company-tools .company-picker{grid-template-columns:minmax(0,1fr) auto!important;width:100%}html body .company-picker .toolbar-caption{grid-column:1;grid-row:1}html body .company-picker .rolebadge{grid-column:2;grid-row:1;font-size:11px}html body #companySelect{grid-column:1/-1;grid-row:2;font-size:16px}html body .company-selected-name{grid-column:1/-1;grid-row:3;font-size:12px}html body .company-tools .company-actions{display:flex!important;gap:8px!important}html body .company-tools .company-actions>button,html body .company-tools .company-actions>details{flex:1 1 140px;min-width:0;max-width:100%}html[data-theme=dark] body #oncInternalMail .onc-mail-row{padding:12px!important}}
@media(max-width:350px){html body .ocp-company-summary .company-status-summary{grid-template-columns:minmax(0,1fr)}html body .ocp-company-summary .stat strong{font-size:22px!important}}
