/* Personal staff themes are opt-in. No attribute means the existing Evergreen appearance. */
.employee-profile > strong { font-size:20px }
.employee-profile > p { margin:8px 0 20px;color:var(--muted) }
.employee-profile-actions { display:grid;gap:12px;margin:20px 0 }
.employee-profile-actions button { display:flex;align-items:center;justify-content:space-between;text-align:left;gap:20px;min-height:48px;font-size:15px }
.employee-profile-actions button > span { font-size:13px }
.employee-appearance-intro { margin:0 0 22px;font-size:15px;line-height:1.7 }
.employee-theme-options { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:22px }
.employee-theme-option { min-width:0;display:flex;flex-direction:column;gap:12px;text-align:left;padding:12px;border:1px solid var(--line);border-radius:12px;background:#fff;color:#193b2e;font:inherit;cursor:pointer }
.employee-theme-option[aria-checked=true] { border:2px solid var(--green);padding:11px;box-shadow:0 0 0 2px var(--mint) }
.employee-theme-option:focus-visible { outline:3px solid var(--ui-focus);outline-offset:3px }
.employee-theme-name { display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:16px;font-weight:600 }
.employee-theme-name > span { font-size:13px;color:#335844 }
.employee-theme-option > small { font-size:13px;line-height:1.6;color:#506457 }
.employee-theme-preview { display:block;position:relative;overflow:hidden;width:100%;height:145px;border:1px solid #b2c1b8;border-radius:7px;background:var(--theme-bg) }
.employee-theme-preview i { position:absolute;display:block;border-radius:4px }
.employee-theme-sidebar { left:0;top:0;bottom:0;width:22%;background:var(--theme-surface);border-right:1px solid var(--theme-muted) }
.employee-theme-sidebar:after { content:'';position:absolute;left:18%;right:18%;top:25px;height:6px;background:var(--theme-primary);box-shadow:0 20px 0 var(--theme-soft),0 40px 0 var(--theme-soft),0 60px 0 var(--theme-soft) }
.employee-theme-heading { left:29%;top:23px;width:46%;height:9px;background:var(--theme-ink) }
.employee-theme-card { top:53px;width:18%;height:42px;background:var(--theme-surface);border-top:3px solid var(--theme-primary) }
.employee-theme-card.one { left:29% }.employee-theme-card.two { left:51% }.employee-theme-card.three { left:73% }
.employee-theme-button { top:112px;right:9%;width:25%;height:14px;background:var(--theme-primary) }
@media screen {
 body[data-staff-theme]:not(.client-experience) { --green:var(--staff-primary);--ink:var(--staff-ink);--muted:var(--staff-muted);--line:var(--staff-border);--bg:var(--staff-bg);--mint:var(--staff-soft);--ui-control-border:var(--staff-border);--ui-focus:var(--staff-accent);background:var(--staff-bg);color:var(--staff-ink) }
 body[data-staff-theme]:not(.client-experience) :is(.sidebar,.topbar,dialog,.card,.metric,.work-action,.section-help,.workspace-switch) { background:var(--staff-surface);border-color:var(--staff-border);color:var(--staff-ink) }
 body[data-staff-theme]:not(.client-experience) :is(.brand,.page-heading h1,.metric-value,.card h2,.work-action,.text-button,.guide-link,.row-button) { color:var(--staff-primary) }
 body[data-staff-theme]:not(.client-experience) .primary { background:var(--staff-primary);border-color:var(--staff-primary);color:var(--staff-on-primary);box-shadow:none }
 body[data-staff-theme]:not(.client-experience) .primary:hover { filter:brightness(.93) }
 body[data-staff-theme]:not(.client-experience) .secondary { background:var(--staff-soft);border-color:var(--staff-border);color:var(--staff-ink) }
 body[data-staff-theme]:not(.client-experience) .secondary:hover:not(:disabled) { background:var(--staff-soft);border-color:var(--staff-primary);filter:brightness(.97) }
 body[data-staff-theme]:not(.client-experience) :is(.nav-item.active,.subnav button.active) { background:var(--staff-primary);border-color:var(--staff-primary);color:var(--staff-on-primary) }
 body[data-staff-theme]:not(.client-experience) .nav-item:not(.active):hover { background:var(--staff-soft);color:var(--staff-ink) }
 body[data-staff-theme]:not(.client-experience) :is(th,thead,.avatar,.square,.metric-icon) { background:var(--staff-soft);color:var(--staff-ink) }
 body[data-staff-theme]:not(.client-experience) tbody tr:hover { background:var(--staff-soft) }
 body[data-staff-theme]:not(.client-experience) .metric { border-top-color:var(--staff-primary) }
 body[data-staff-theme]:not(.client-experience) :is(.search,.filter-group select,.subnav button:not(.active)) { background:var(--staff-surface);color:var(--staff-ink);border-color:var(--staff-border) }
 body[data-staff-theme]:not(.client-experience) .workspace-switch select { color:var(--staff-ink) }
 body[data-staff-theme]:not(.client-experience) .employee-theme-option[aria-checked=true] { border-color:var(--staff-primary);box-shadow:0 0 0 2px var(--staff-soft) }
 body[data-staff-theme]:not(.client-experience) .employee-theme-name > span { color:#335844 }
 body[data-staff-theme]:not(.client-experience) :is(.primary,.secondary,button):disabled { opacity:1;background:var(--staff-soft);color:var(--staff-muted);border-color:var(--staff-border);box-shadow:none;filter:none }
 body[data-staff-theme=midnight] :is(.sidebar,.topbar) :is(.profile,.profile small,.demo-badge,.breadcrumb,.breadcrumb strong,.breadcrumb span,.nav-label,.guide-link,.icon-button) { color:var(--staff-muted) }
 body[data-staff-theme=midnight] :is(main,dialog) :is(h1,h2,h3,h4,p,small,span,strong,dt,dd,li,label,th,td,a,button,time,summary,code,legend,output,div):not(:where(.status,.status *,.safe-note,.safe-note *,.inline-error,.inline-error *,.reconcile-ok,.reconcile-ok *,.receipt-document,.receipt-document *,.public-template-option,.public-template-option *,.employee-theme-option,.employee-theme-option *,.follow-up-status,.follow-up-status *,.mail-state,.mail-state *,.mail-recovery-label,.fleet-state,.fleet-state *, .claim-benefit-type,.claim-benefit-type *)) { color:var(--staff-ink) }
 body[data-staff-theme=midnight] :is(.card,.metric,dialog,.section-help,.section-help[open],.section-help>div,.detail-list>div,.detail-grid>div,.public-page-hero,.public-page-stats>div,.public-content-card,.public-share-card,.public-enquiry-card,.public-guide-card,.client-design-dashboard,.workspace-setting-card,.workspace-usage-card,.policy-preview-card,.driver-sheet-card,.driver-activity-card,.vehicle-card,.mail-message,.mail-announcement-card,.staff-message,.document-archive,.employee-search-result,.follow-up-card,.claim-detail-card) { background:var(--staff-surface);border-color:var(--staff-border);color:var(--staff-ink) }
 body[data-staff-theme=midnight] :is(.notice,.public-review-note,.builder-note,.builder-section-row,.public-builder-preview,.public-builder-preview>header,.public-builder-preview>p,.public-builder-tabs button,.sale-payment-summary,.sale-payment-totals,.sale-remaining,.payment-account-panel,.payment-summary-top,.payment-summary-grid,.payment-balance-grid,.refund-balance-grid,.policy-search-hover-banner,.mailbox-empty,.mail-original-message,.workspace-backup-note,.workspace-settings-note,.vehicle-register-note,.driver-sheet-summary,.driver-activity-change,.health-note,.accounting-basis,.help-card,.chip-list,.donut-hole) { background:var(--staff-soft);border-color:var(--staff-border);color:var(--staff-ink) }
 body[data-staff-theme=midnight] .field-help { background:transparent }
 body[data-staff-theme=midnight] :is(.form-grid,.auth-form,.search,.table-toolbar,.public-builder-controls) :is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]) { color:var(--staff-ink);background:var(--staff-bg);border-color:var(--staff-border) }
 body[data-staff-theme=midnight] :is(input,textarea)::placeholder { color:var(--staff-muted);opacity:1 }
 body[data-staff-theme=midnight] :is(.table-scroll,.table-bottom,.card-head,.table-toolbar,.mailbox-heading,.mailbox-filters,.public-preview-stage) { background:var(--staff-surface);border-color:var(--staff-border) }
 body[data-staff-theme=midnight] :is(th,thead) { background:var(--staff-soft);color:var(--staff-ink) }
 body[data-staff-theme=midnight] :is(td,tr,fieldset,.profile,.document-row,.driver-activity-event,.policy-activity-event,.task,.mail-list,.mail-message-summary) { border-color:var(--staff-border) }
 body[data-staff-theme=midnight] :is(tr[data-policy-state],tr[data-job-status],.staff-message.unread,.follow-up-card.is-overdue) { background:var(--staff-soft) }
 body[data-staff-theme=midnight] .member-avatar { background:var(--staff-soft);color:var(--staff-ink) }
 body[data-staff-theme=midnight] .chart-wrap text { fill:var(--staff-muted) }
 body[data-staff-theme=midnight] .chart-wrap polyline:not([stroke-dasharray]),body[data-staff-theme=midnight] .chart-wrap circle { stroke:var(--staff-primary) }
 body[data-staff-theme=midnight] .chart-wrap polyline[stroke-dasharray] { stroke:var(--staff-accent) }
 body[data-staff-theme=midnight] .chart-caption span[style] { color:var(--staff-accent)!important }
 body[data-staff-theme=midnight] .primary,body[data-staff-theme=midnight] .primary > :is(span,strong) { color:var(--staff-on-primary) }
 body[data-staff-theme=midnight] .secondary,body[data-staff-theme=midnight] .top-actions .secondary { color:var(--staff-ink);background:var(--staff-soft);border-color:var(--staff-border) }
 body[data-staff-theme=midnight] .employee-theme-option { background:#fff;color:#193b2e }
 body[data-staff-theme=midnight] .employee-theme-option > small { color:#506457 }
 body[data-staff-theme=midnight] .public-builder-tabs button.active,body[data-staff-theme=midnight] .builder-device-buttons button[aria-pressed=true] { background:var(--staff-primary);color:var(--staff-on-primary) }
 body[data-staff-theme=midnight] :is(.safe-note,.inline-error,.reconcile-ok) :is(p,small,strong,span) { color:inherit }
 body[data-staff-theme=midnight] :is(.mailbox-card,.message-compose-form,.vehicle-register,.driver-activity-log) { color:var(--staff-ink) }
 body[data-staff-theme=midnight] dialog::backdrop { background:#030910b8 }
}
@media(max-width:600px) { .employee-theme-options { grid-template-columns:minmax(0,1fr) }.employee-theme-preview { height:130px }.employee-theme-name { flex-wrap:wrap }.employee-profile-actions button { flex-wrap:wrap } }
@media screen {
 body[data-staff-theme]:not(.client-experience) .nav-item:not(.active) { color:var(--staff-muted) }
 body[data-staff-theme=midnight] :is(.eyebrow,.metric-top,.metric-foot,.key-row,.table-bottom,.donut-hole small) { color:var(--staff-muted) }
 body[data-staff-theme=midnight] :is(.filter-group label,.filter-group select,.policy-status-legend button,.mailbox-panel,.mail-message-card,.mail-message-card.is-unread,.mail-message-card.is-recovery) { background:var(--staff-surface);color:var(--staff-ink);border-color:var(--staff-border) }
 body[data-staff-theme=midnight] :is(.mailbox-stats>div,.mailbox-stats .has-unread,.mail-avatar,.mail-tab-count,.public-share-field,.public-guide-card li>span) { background:var(--staff-soft);color:var(--staff-ink);border-color:var(--staff-border) }
 body[data-staff-theme=midnight] .mailbox-filters :is(input,select) { background:var(--staff-bg);color:var(--staff-ink);border-color:var(--staff-border) }
}
@media screen {
 #entry-form:has(.employee-appearance) > .form-actions { position:sticky;bottom:-27px;z-index:2;padding:16px 0;background:var(--staff-surface,#fff);border-top:1px solid var(--line) }
}
@media screen {
 body[data-staff-theme=midnight] .public-builder-tabs button.active > span { color:var(--staff-on-primary);opacity:1 }
}

/* Keep nested sections distinct from the modal or page that contains them. */
@media screen {
 body[data-staff-theme=midnight]:not(.client-experience) .form-section {
   background:var(--staff-soft);color:var(--staff-ink);border:1px solid var(--staff-border);
 }
 body[data-staff-theme=midnight]:not(.client-experience) .form-section legend { color:var(--staff-primary) }
 body[data-staff-theme=midnight]:not(.client-experience) .form-section .form-section-number { background:var(--staff-primary);color:var(--staff-on-primary);border:1px solid var(--staff-primary) }
 body[data-staff-theme=midnight]:not(.client-experience) .form-section .form-section-description { color:var(--staff-muted) }
 body[data-staff-theme=midnight]:not(.client-experience) .form-section .small-heading { color:var(--staff-ink) }
 body[data-staff-theme=midnight]:not(.client-experience) :is(.detail-list>div,.detail-grid>div) { background:var(--staff-soft);border:1px solid var(--staff-border);border-radius:10px }
 body[data-staff-theme=midnight]:not(.client-experience) :is(.detail-list,.detail-grid) { gap:16px }
 body[data-staff-theme=midnight]:not(.client-experience) :is(.follow-up-context,.claim-detail-benefit,.operations-dialog-summary>div,.operations-dialog-tools,.driver-event-change,.vehicle-register-row .fleet-notes,.mail-compose-intro,.recipient-hover-card,.builder-colours,.public-builder-upload) { background:var(--staff-soft);color:var(--staff-ink);border-color:var(--staff-border) }
 body[data-staff-theme=midnight]:not(.client-experience) :is(.driver-event-card,.vehicle-register-row.fleet-card,.fleet-card[data-vehicle-state=Inactive],.vehicle-option,.recipient-result,.recipient-selected,.operations-empty) { background:var(--staff-surface);color:var(--staff-ink);border-color:var(--staff-border) }
 body[data-staff-theme=midnight]:not(.client-experience) :is(.claim-benefit-type,.driver-event-kind,.fleet-registration) { background:var(--staff-bg);color:var(--staff-primary);border:1px solid var(--staff-border) }
 body[data-staff-theme=midnight]:not(.client-experience) :is(.payment-history-controls,.operations-dialog-tools) :is(input,select) { background:var(--staff-bg);color:var(--staff-ink);border-color:var(--staff-border);color-scheme:dark }
 body[data-staff-theme=midnight]:not(.client-experience) :is(.form-grid,.public-builder-controls) :is(input,select,textarea) { color-scheme:dark }
 body[data-staff-theme=midnight]:not(.client-experience) :is(.field-help,.required-legend) { background:transparent;color:var(--staff-muted) }
 body[data-staff-theme=midnight]:not(.client-experience) :is(.operations-dialog-footer,.public-page-builder-form>.form-actions) { background:var(--staff-surface);border-color:var(--staff-border);box-shadow:0 -8px 16px #101c2ad9 }
 body[data-staff-theme=midnight]:not(.client-experience) .public-review-note { padding:16px;border:1px solid var(--staff-border);border-radius:8px }
 body[data-staff-theme=midnight]:not(.client-experience) .claim-eligibility { border:1px solid }
 body[data-staff-theme=midnight]:not(.client-experience) .claim-eligibility.needs-review { background:#3b301e;color:#ffdb91;border-color:#a88745 }
 body[data-staff-theme=midnight]:not(.client-experience) .claim-eligibility.is-eligible { background:#193c32;color:#a9e6c9;border-color:#5a9e82 }
 body[data-staff-theme=midnight]:not(.client-experience) .claim-eligibility :is(strong,small,p,li) { color:inherit }
 body[data-staff-theme=midnight]:not(.client-experience) .fleet-state.is-active { background:var(--ui-success-bg);color:var(--ui-success) }
 body[data-staff-theme=midnight]:not(.client-experience) .fleet-state.is-inactive { background:#e8edef;color:#435760 }
 body[data-staff-theme=midnight]:not(.client-experience) .driver-event-card { border-left-color:var(--event-colour) }
 body[data-staff-theme=midnight]:not(.client-experience) .receipt-settings-preview { background:#fff;border-color:var(--staff-border) }
}

/* Selection widgets and upload controls share the same dark surfaces as their forms. */
@media screen {
 body[data-staff-theme=midnight]:not(.client-experience) :is(.client-login-option,.relationship-rate-row,.refund-payment-summary,.claim-benefit-summary,.employee-selected,.payment-fee-separate,.payment-collection-options>button,.payment-month-grid>button,.checklist,.plan-region-group,.policy-preview-record,.recipient-detail-role) { background:var(--staff-soft);color:var(--staff-ink);border-color:var(--staff-border) }
 body[data-staff-theme=midnight]:not(.client-experience) :is(.refund-payment-result,.refund-payment-result:has(.refund-payment-select:hover),.policy-search-result,.policy-search-select:hover,.policy-search-select:focus-visible) { background:var(--staff-surface);color:var(--staff-ink);border-color:var(--staff-border) }
 body[data-staff-theme=midnight]:not(.client-experience) :is(.workspace-setting-icon,.policy-search-reset) { background:var(--staff-soft);color:var(--staff-primary);border:1px solid var(--staff-border) }
 body[data-staff-theme=midnight]:not(.client-experience) .policy-search-reset:hover { background:var(--staff-bg);border-color:var(--staff-primary) }
 body[data-staff-theme=midnight]:not(.client-experience) .refund-select-label { background:var(--staff-primary);color:var(--staff-on-primary) }
 body[data-staff-theme=midnight]:not(.client-experience) .refund-select-label > span { color:inherit }
 body[data-staff-theme=midnight]:not(.client-experience) :is(input,select,textarea):not([type=hidden]):not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]) { background:var(--staff-control-bg,var(--staff-bg));color:var(--staff-ink);border-color:var(--ui-field-border,var(--staff-border));color-scheme:dark }
 body[data-staff-theme=midnight]:not(.client-experience) input[type=file] { border:1px solid var(--staff-border) }
 body[data-staff-theme=midnight]:not(.client-experience) input[type=file]::file-selector-button { background:var(--staff-soft);color:var(--staff-ink);border:1px solid var(--staff-border);border-radius:5px;padding:7px 10px;margin-right:12px;font:inherit;cursor:pointer }
 body[data-staff-theme=midnight]:not(.client-experience) .field-validation { color:#ffb4a6 }
}
@media screen {
 body[data-staff-theme=midnight]:not(.client-experience) :is(input[type=checkbox],input[type=radio]) { color-scheme:dark;accent-color:var(--staff-primary) }
}
@media screen {
 body[data-staff-theme=midnight]:not(.client-experience) .refund-payment-result .refund-payment-reference { color:var(--staff-muted) }
}
@media screen {
 body[data-staff-theme=midnight]:not(.client-experience) { --staff-income:var(--staff-primary);--staff-expense:var(--staff-accent) }
 body[data-staff-theme=midnight]:not(.client-experience) :is(.search,.filter-group label) { --staff-control-bg:transparent;background:var(--staff-surface) }
 body[data-staff-theme=midnight]:not(.client-experience) .payment-confirmation { background:var(--staff-surface);color:var(--staff-ink);border:1px solid var(--staff-border);padding:16px;border-radius:9px }
 body[data-staff-theme=midnight]:not(.client-experience) .payment-confirmation :is(.payment-summary-top,.payment-summary-grid) { background:transparent;border-color:var(--staff-border) }
 body[data-staff-theme=midnight]:not(.client-experience) .reconcile-ok { background:#193c32;color:#a9e6c9;border-color:#5a9e82 }
 body[data-staff-theme=midnight]:not(.client-experience) :is(.progress,.bar-track) { background:var(--staff-soft) }
 body[data-staff-theme=midnight]:not(.client-experience) .progress span { background:var(--staff-income) }
 body[data-staff-theme=midnight]:not(.client-experience) .bar-income { background:var(--staff-income) }
 body[data-staff-theme=midnight]:not(.client-experience) .bar-expense { background:var(--staff-expense) }
}

@media screen {
 body[data-staff-theme]:not(.client-experience) .required-marker { background:var(--staff-soft);color:var(--staff-primary);border:1px solid var(--staff-border) }
 body[data-staff-theme=midnight]:not(.client-experience) .required-marker { background:#3b301e;color:#e5c584;border-color:#8d7446 }
}

/* Driver sheets and nested pickers must use matching text and surface tokens. */
@media screen {
 body[data-staff-theme]:not(.client-experience) :is(.job-sheet-section,.job-sheet-actions,.equipment-dialog-footer,.equipment-chip) {
   background:var(--staff-surface);color:var(--staff-ink);border-color:var(--staff-border);
 }
 body[data-staff-theme]:not(.client-experience) :is(.job-sheet-hero,.job-note,.job-lodged-by,.job-cash-benefit,.job-benefit-tags span,.equipment-field,.equipment-option.is-selected,.equipment-list-creator,.equipment-chip strong,.equipment-close) {
   background:var(--staff-soft);color:var(--staff-ink);border-color:var(--staff-border);
 }
 body[data-staff-theme]:not(.client-experience) .job-sheet-hero .job-facts { border-color:var(--staff-border) }
 body[data-staff-theme]:not(.client-experience) .job-sheet-actions { box-shadow:none }
 body[data-staff-theme]:not(.client-experience) :is(.job-sheet-hero h2,.job-sheet-section h3,.job-sheet dd) { color:var(--staff-ink) }
 body[data-staff-theme]:not(.client-experience) :is(.job-section-label,.job-task-status small,.job-sheet dt,.job-note small,.job-cash-benefit small,.job-claim-help,.job-reference) { color:var(--staff-muted) }
 body[data-staff-theme]:not(.client-experience) .job-cash-benefit strong { color:var(--staff-primary) }
 body[data-staff-theme]:not(.client-experience) .equipment-option.is-selected { border-color:var(--staff-primary) }
 body[data-staff-theme=midnight]:not(.client-experience) .job-claim-rejected { background:#3d2628;color:#ffb4a6;border:1px solid #a46767 }
 body[data-staff-theme=midnight]:not(.client-experience) .job-claim-rejected :is(p,small) { color:inherit }
 body[data-staff-theme=midnight]:not(.client-experience) .equipment-dialog [data-item-error] { color:#ffb4a6 }
}

/* Include the viewport and nested scrolling areas in the selected workspace theme. */
html { scrollbar-width:thin;scrollbar-color:var(--app-scrollbar-thumb,#a3b6aa) var(--app-scrollbar-track,#f3f6f3) }
body,body * { scrollbar-width:thin;scrollbar-color:var(--app-scrollbar-thumb,#a3b6aa) var(--app-scrollbar-track,#f3f6f3) }
@supports not (scrollbar-color:auto) {
  ::-webkit-scrollbar { width:9px;height:9px }
  ::-webkit-scrollbar-track { background:var(--app-scrollbar-track,#f3f6f3) }
  ::-webkit-scrollbar-thumb { background:var(--app-scrollbar-thumb,#a3b6aa);border:2px solid var(--app-scrollbar-track,#f3f6f3);border-radius:8px }
}
