/* Paired surfaces and text for portal widgets. Print/PDF and authentication are untouched. */
@layer portal-theme-contrast {
@media screen {
body{--pt-surface:#ffffff;--pt-soft:#f1f5f9;--pt-field:#ffffff;--pt-text:#172536;--pt-muted:#526276;--pt-line:#cbd5e1;--pt-selected:#e8f0fc;--pt-selected-text:#164b91;--pt-good-bg:#e8f6ed;--pt-good:#146c43;--pt-bad-bg:#fff0f1;--pt-bad:#a32132;--pt-warn-bg:#fff3df;--pt-warn:#875000;color-scheme:light}
body:is([data-admin-theme=dark],[data-employee-theme=dark],.agency-dark){--pt-surface:#192637;--pt-soft:#22374e;--pt-field:#111c29;--pt-text:#edf3ff;--pt-muted:#b3bfd0;--pt-line:#496079;--pt-selected:#294a70;--pt-selected-text:#e5f0ff;--pt-good-bg:#173c30;--pt-good:#96e6ba;--pt-bad-bg:#472733;--pt-bad:#ffc2ca;--pt-warn-bg:#493820;--pt-warn:#ffdb9c;color-scheme:dark}
body:is([data-hgvera-suite=on],.agency-hgvera){--pt-surface:#173354;--pt-soft:#244361;--pt-field:#102b49;--pt-text:#edf4ff;--pt-muted:#b6c9e2;--pt-line:#4f6c89;--pt-selected:#493724;--pt-selected-text:#ffd08c;--pt-good-bg:#214b42;--pt-good:#a9e8c8;--pt-bad-bg:#512e38;--pt-bad:#ffc0c0;--pt-warn-bg:#4c3a29;--pt-warn:#ffdb9c;color-scheme:dark}
/* Operations sections were introduced after the original theme selectors. */
html body #desktopReferenceDashboard :is(.admin-ops-card,.admin-ops-combined,.admin-ops-combined-head,.admin-ops-status-breakdown,.admin-ops-calendar-hours-body){background:var(--pt-surface)!important;color:var(--pt-text)!important;border-color:var(--pt-line)!important}
html body #desktopReferenceDashboard .admin-ops-main :is(h2,h3,h4,b,strong,.admin-ops-status-row){color:var(--pt-text)!important;opacity:1!important}
html body #desktopReferenceDashboard .admin-ops-main :is(p,small,.sketch-empty,.admin-empty,.legend-label){color:var(--pt-muted)!important;opacity:1!important}
html body #desktopReferenceDashboard .admin-ops-main :is(.sketch-card,.dashboard-work-calendar){background:var(--pt-surface)!important;color:var(--pt-text)!important;border-color:var(--pt-line)!important}
html body #desktopReferenceDashboard .admin-ops-main :is(.sketch-table th,.sketch-table td){color:var(--pt-text)!important;border-color:var(--pt-line)!important}
html body #desktopReferenceDashboard .admin-ops-main .sketch-table th{background:var(--pt-soft)!important;color:var(--pt-muted)!important}
html body #desktopReferenceDashboard .admin-ops-main .admin-ops-link{background:var(--pt-soft)!important;color:var(--pt-text)!important;border:1px solid var(--pt-line)!important;min-height:40px!important}
html body #desktopReferenceDashboard .admin-ops-status-total{flex-wrap:wrap!important}
html body #desktopReferenceDashboard .admin-ops-status-list{flex:1 1 110px!important;min-width:0!important}
html body #desktopReferenceDashboard #adminOpsUpcomingSlot .sketch-table{width:100%!important;table-layout:fixed!important}
html body #desktopReferenceDashboard #adminOpsUpcomingSlot .sketch-table :is(th,td){white-space:normal!important;overflow-wrap:anywhere!important;min-width:0!important}
html body #desktopReferenceDashboard #adminOpsUpcomingSlot .sketch-table :is(th,td):nth-child(1){width:25%!important}
html body #desktopReferenceDashboard #adminOpsUpcomingSlot .sketch-table :is(th,td):nth-child(2){width:35%!important}
html body #desktopReferenceDashboard #adminOpsUpcomingSlot .sketch-table :is(th,td):nth-child(3){width:17%!important}
html body #desktopReferenceDashboard #adminOpsUpcomingSlot .sketch-table :is(th,td):nth-child(4){width:23%!important}
html body #desktopReferenceDashboard #adminOpsUpcomingSlot .sketch-pill{max-width:100%!important;white-space:normal!important;overflow-wrap:anywhere!important}
html body #desktopReferenceDashboard .admin-ops-status-ring:before{background:var(--pt-surface)!important}
html body #desktopReferenceDashboard .admin-ops-today-metric{background:var(--pt-soft)!important;color:var(--pt-text)!important}
html body #desktopReferenceDashboard .admin-ops-today-metric.green{background:var(--pt-good-bg)!important;color:var(--pt-good)!important}
html body #desktopReferenceDashboard .admin-ops-today-metric.red{background:var(--pt-bad-bg)!important;color:var(--pt-bad)!important}
html body #desktopReferenceDashboard .admin-ops-today-metric.orange{background:var(--pt-warn-bg)!important;color:var(--pt-warn)!important}
html body #desktopReferenceDashboard .admin-ops-today-metric :is(b,span){color:inherit!important}
html body #desktopReferenceDashboard .admin-ops-attention{background:var(--pt-bad-bg)!important;border-color:var(--pt-line)!important;color:var(--pt-bad)!important}
html body #desktopReferenceDashboard .admin-ops-attention-title :is(b,small){color:var(--pt-bad)!important;opacity:1!important}
html body #desktopReferenceDashboard .admin-ops-alert{background:var(--pt-surface)!important;color:var(--pt-text)!important;border-color:var(--pt-line)!important}
html body #desktopReferenceDashboard .admin-ops-alert :is(b,small){color:inherit!important;opacity:1!important}
html body #desktopReferenceDashboard .admin-ops-alert.ok{background:var(--pt-good-bg)!important;color:var(--pt-good)!important}
/* Fleet controls use the same palette at every width, including unchecked states. */
html body #hgFleetCard{background:var(--pt-surface)!important;color:var(--pt-text)!important;border-color:var(--pt-line)!important}
html body #hgFleetCard :is(h2,b,strong){color:var(--pt-text)!important}
html body #hgFleetCard :is(p,small){color:var(--pt-muted)!important;opacity:1!important}
html body #hgFleetCard .hg-fleet-switches{display:flex!important;flex-wrap:wrap!important;gap:8px!important;background:transparent!important}
html body #hgFleetCard .hg-fleet-switches>:is(button,label){flex:1 1 140px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;min-height:44px!important;padding:8px 10px!important;margin:0!important;border:1px solid var(--pt-line)!important;border-radius:9px!important;background:var(--pt-soft)!important;color:var(--pt-text)!important;font-size:12px!important;font-weight:700!important;cursor:pointer!important}
html body #hgFleetCard .hg-fleet-switches>:is(button,label).active{background:var(--pt-selected)!important;color:var(--pt-selected-text)!important;border-color:var(--pt-selected-text)!important}
html body #hgFleetCard .hg-fleet-switches input{appearance:auto!important;-webkit-appearance:checkbox!important;position:static!important;opacity:1!important;display:inline-block!important;flex:0 0 18px!important;width:18px!important;height:18px!important;min-height:18px!important;margin:0!important;padding:0!important;accent-color:#d67b00!important}
html body #hgFleetCard .hg-fleet-charts{display:flex!important;flex-wrap:wrap!important;gap:10px!important}
html body #hgFleetCard .hg-fleet-indicator{flex:1 1 230px!important;min-width:0!important;background:var(--pt-field)!important;border-color:var(--pt-line)!important}
html body #hgFleetCard .hg-fleet-indicator[hidden]{display:none!important}
html body #hgFleetCard .hg-fleet-ring{display:grid!important;place-items:center!important;width:76px!important;height:76px!important;min-width:76px!important;flex:0 0 76px!important;border-radius:50%!important;background:conic-gradient(var(--fleet-color,#ed941f) var(--fleet-pct,0%),var(--pt-line) 0)!important}
html body #hgFleetCard .hg-fleet-ring:before{background:var(--pt-field)!important}
html body #hgFleetCard .hg-fleet-ring strong{font-size:18px!important;color:var(--pt-text)!important}
html body #hgFleetCard .hg-fleet-link{background:#ffa51f!important;color:#172536!important}
html body #hgFleetCard :focus-visible{outline:2px solid var(--pt-text)!important;outline-offset:3px!important}
html body #app .period-modes{background:var(--pt-field)!important;border-color:var(--pt-line)!important}
html body #app .period-modes button{background:transparent!important;color:var(--pt-muted)!important;-webkit-text-fill-color:var(--pt-muted)!important}
html body #app .period-modes button[aria-pressed=true]{background:var(--pt-selected)!important;color:var(--pt-selected-text)!important;-webkit-text-fill-color:var(--pt-selected-text)!important;border-color:var(--pt-selected-text)!important}
/* Dedicated fleet page now follows the admin preference. */
html body.fleet-utilisation-page{background:var(--pt-field)!important;color:var(--pt-text)!important}
html body.fleet-utilisation-page :is(.stat,.panel){background:var(--pt-surface)!important;color:var(--pt-text)!important;border-color:var(--pt-line)!important}
html body.fleet-utilisation-page :is(h1,h2,b,strong,td){color:var(--pt-text)!important}
html body.fleet-utilisation-page :is(p,small,.muted,.updated,.quality,.empty,.loading,.stat span,th){color:var(--pt-muted)!important}
html body.fleet-utilisation-page :is(.search,.filter,.btn.secondary){background:var(--pt-soft)!important;color:var(--pt-text)!important;border-color:var(--pt-line)!important}
html body.fleet-utilisation-page .search::placeholder{color:var(--pt-muted)!important;opacity:1!important}
html body.fleet-utilisation-page :is(.filter[aria-pressed=true],.btn:not(.secondary)){background:#ffa51f!important;color:#172536!important;border-color:#ffa51f!important}
html body.fleet-utilisation-page :is(th,td,.top){border-color:var(--pt-line)!important}
html body.fleet-utilisation-page .pill.ok{background:var(--pt-good-bg)!important;color:var(--pt-good)!important}
html body.fleet-utilisation-page .pill.off{background:var(--pt-soft)!important;color:var(--pt-muted)!important}
html body.fleet-utilisation-page .warning{background:var(--pt-warn-bg)!important;color:var(--pt-warn)!important;border-color:var(--pt-line)!important}
html body.fleet-utilisation-page .error{background:var(--pt-bad-bg)!important;color:var(--pt-bad)!important;border-color:var(--pt-line)!important}
html body.fleet-utilisation-page .fleet-vehicle-group{color:var(--pt-selected-text)!important;font-size:12px;margin:4px 0}
html body.fleet-utilisation-page td:before{color:var(--pt-muted)!important}
html body.fleet-utilisation-page .bar{background:var(--pt-line)!important}
@media(max-width:600px){html body.fleet-utilisation-page #tbody tr{background:var(--pt-field)!important;border-color:var(--pt-line)!important}}
/* Shared portal controls and detail panels: background and text always travel together. */
html body :is(.agency-display-card,.agency-display-group,.agency-display-content,.employee-notification,.agency-notification,.employee-edit-section,.agency-edit-section,.profile-section,.appearance-section){background:var(--pt-surface)!important;color:var(--pt-text)!important;border-color:var(--pt-line)!important}
html body :is(.agency-display-card,.agency-display-group,.employee-edit-section,.agency-edit-section,.profile-section,.appearance-section) :is(h2,h3,h4,b,strong,label){color:var(--pt-text)!important}
html body :is(.agency-display-card,.agency-display-group,.employee-edit-section,.agency-edit-section,.profile-section,.appearance-section) :is(p,small,.sub,.muted){color:var(--pt-muted)!important}
html body :is(#employeeWeekOverviewOverlay,#employeeQuickInvite,#directDriverRates) :is(input,select,textarea){color-scheme:inherit!important}
html body :is(.agency-logo-on-light){display:block!important}
html body :is(.agency-logo-on-dark){display:none!important}
html body:is(.agency-dark,.agency-hgvera,[data-hgvera-suite=on]) .agency-logo-on-light{display:none!important}
html body:is(.agency-dark,.agency-hgvera,[data-hgvera-suite=on]) .agency-logo-on-dark{display:block!important}
@media(min-width:901px){
}
@media(max-width:1180px) and (min-width:901px){
html body #desktopReferenceDashboard .admin-ops-employee-grid{grid-template-columns:minmax(0,1.5fr) minmax(160px,1fr)!important}
html body #desktopReferenceDashboard .admin-ops-status-total{flex-wrap:wrap!important}
html body #desktopReferenceDashboard .admin-ops-attention{flex-wrap:wrap!important}
}
@media(max-width:600px){
html body #hgFleetCard .hg-fleet-head{align-items:flex-start!important;flex-wrap:wrap!important}
html body #hgFleetCard .hg-fleet-switches>:is(button,label){flex-basis:100px!important}
html body #hgFleetCard .hg-fleet-indicator{padding:12px!important;gap:12px!important}
html body #hgFleetCard .hg-fleet-indicator>div:last-child{min-width:0!important;overflow-wrap:anywhere!important}
}
}
}
