@media screen{
 :root{--surface:#fff;--notification-bg:#a34b40;--notification-ink:#fff;--attention-surface:color-mix(in srgb,var(--red,#a34b40) 18%,var(--surface,var(--card,#fff)))}
 /* One department palette for desktop sidebar, mobile dock and More menu. */
  :is(.mobile-nav-item[data-mobile-item=audio],.project-menu-row[data-menu-page=audio],.schema-library-branch[data-library-page=audio]){--mobile-nav-bg:#e8f2eb;--mobile-nav-active-bg:#d6e8dc;--mobile-nav-ink:#25563a}
  :is(.mobile-nav-item[data-mobile-item=ict],.project-menu-row[data-menu-page=ict],.schema-library-branch[data-library-page=ict]){--mobile-nav-bg:#eee8f6;--mobile-nav-active-bg:#dfd2ef;--mobile-nav-ink:#5b4278}
  :is(.mobile-nav-item[data-mobile-item=intercom],.project-menu-row[data-menu-page=intercom],.schema-library-branch[data-library-page=intercom]){--mobile-nav-bg:#eaf3d9;--mobile-nav-active-bg:#d8e9ba;--mobile-nav-ink:#435b24}
  :is(.mobile-nav-item[data-mobile-item=lighting],.project-menu-row[data-menu-page=lighting],.schema-library-branch[data-library-page=lighting],.mobile-nav-item[data-mobile-item=lighting-designer],.project-menu-row[data-menu-page=lighting-designer],.schema-library-branch[data-library-page=lighting-designer]){--mobile-nav-bg:#fff7dc;--mobile-nav-active-bg:#f9edc4;--mobile-nav-ink:#6d5516}
  :is(.mobile-nav-item[data-mobile-item=video],.project-menu-row[data-menu-page=video],.schema-library-branch[data-library-page=video]){--mobile-nav-bg:#e8f4f8;--mobile-nav-active-bg:#d5eaf2;--mobile-nav-ink:#285a6d}
  :is(.mobile-nav-item[data-mobile-item=rigging],.project-menu-row[data-menu-page=rigging],.schema-library-branch[data-library-page=rigging]){--mobile-nav-bg:#f8eaf1;--mobile-nav-active-bg:#efd9e5;--mobile-nav-ink:#773e5b}
  html[data-onsite-theme=dark] :is(.mobile-nav-item[data-mobile-item=audio],.project-menu-row[data-menu-page=audio],.schema-library-branch[data-library-page=audio]){--mobile-nav-bg:#28322d;--mobile-nav-active-bg:#304136;--mobile-nav-ink:#b7dec1}
  html[data-onsite-theme=dark] :is(.mobile-nav-item[data-mobile-item=ict],.project-menu-row[data-menu-page=ict],.schema-library-branch[data-library-page=ict]){--mobile-nav-bg:#322b3b;--mobile-nav-active-bg:#443653;--mobile-nav-ink:#dcc5ef}
  html[data-onsite-theme=dark] :is(.mobile-nav-item[data-mobile-item=intercom],.project-menu-row[data-menu-page=intercom],.schema-library-branch[data-library-page=intercom]){--mobile-nav-bg:#303728;--mobile-nav-active-bg:#3e4b2e;--mobile-nav-ink:#d0e4aa}
  html[data-onsite-theme=dark] :is(.mobile-nav-item[data-mobile-item=lighting],.project-menu-row[data-menu-page=lighting],.schema-library-branch[data-library-page=lighting],.mobile-nav-item[data-mobile-item=lighting-designer],.project-menu-row[data-menu-page=lighting-designer],.schema-library-branch[data-library-page=lighting-designer]){--mobile-nav-bg:#343126;--mobile-nav-active-bg:#45402d;--mobile-nav-ink:#f2d88f}
  html[data-onsite-theme=dark] :is(.mobile-nav-item[data-mobile-item=video],.project-menu-row[data-menu-page=video],.schema-library-branch[data-library-page=video]){--mobile-nav-bg:#293238;--mobile-nav-active-bg:#30414d;--mobile-nav-ink:#b4daed}
  html[data-onsite-theme=dark] :is(.mobile-nav-item[data-mobile-item=rigging],.project-menu-row[data-menu-page=rigging],.schema-library-branch[data-library-page=rigging]){--mobile-nav-bg:#342b31;--mobile-nav-active-bg:#443440;--mobile-nav-ink:#edbfd7}
  .mobile-nav-item:is([data-mobile-item=audio],[data-mobile-item=lighting],[data-mobile-item=lighting-designer],[data-mobile-item=video],[data-mobile-item=rigging],[data-mobile-item=intercom],[data-mobile-item=ict],[data-mobile-item=stage-design])>.mobile-nav-destination.active{box-shadow:inset 0 0 0 1px currentColor}
 @media(min-width:761px){
  #sideNav .project-menu-row:is([data-menu-page=audio],[data-menu-page=lighting],[data-menu-page=lighting-designer],[data-menu-page=video],[data-menu-page=rigging],[data-menu-page=intercom],[data-menu-page=ict],[data-menu-page=stage-design])>[data-project-view]{background:var(--mobile-nav-bg);color:var(--mobile-nav-ink)}
  #sideNav .project-menu-row:is([data-menu-page=audio],[data-menu-page=lighting],[data-menu-page=lighting-designer],[data-menu-page=video],[data-menu-page=rigging],[data-menu-page=intercom],[data-menu-page=ict],[data-menu-page=stage-design])>[data-project-view]:is(:hover,:focus-visible,.active,.project-menu-moving){background:var(--mobile-nav-active-bg);color:var(--mobile-nav-ink)}
  #sideNav .project-menu-row:is([data-menu-page=audio],[data-menu-page=lighting],[data-menu-page=lighting-designer],[data-menu-page=video],[data-menu-page=rigging],[data-menu-page=intercom],[data-menu-page=ict],[data-menu-page=stage-design])>[data-project-view].active{box-shadow:inset 0 0 0 1px currentColor}
  #sideNav .project-menu-row:is([data-menu-page=audio],[data-menu-page=lighting],[data-menu-page=lighting-designer],[data-menu-page=video],[data-menu-page=rigging],[data-menu-page=intercom],[data-menu-page=ict],[data-menu-page=stage-design])>[data-project-view] .navicon{color:inherit}
 }
 html{color-scheme:only light}
 html[data-onsite-theme=dark]{color-scheme:only dark}
 html[data-onsite-theme=dark]{--surface:#25292c;--card:#25292c;--surface-alt:#202427;--paper:#191c1e;--ink:#ecebe6;--muted:#b4b4ae;--line:#454a4d;--brand:#d6bc83;--brand-soft:#3d372b;--soft:#3d372b;--brand-deep:#e1ca98;--deep:#e1ca98;--red:#efaba2;--red-soft:#4c2c2c;--green:#a6c8ae;--green-soft:#293d32;--blue:#a8c7e8;--blue-soft:#283c4c;--amber:#e9c384;--amber-soft:#433926;--shadow:0 8px 28px #0004}
 html[data-onsite-theme=dark] body{background:var(--paper);color:var(--ink)}
 html[data-onsite-theme=dark] :is(.app,.modal,dialog,.onsite-feedback-dialog,.issue-attention-dialog){color:var(--ink)}
 html[data-onsite-theme=dark] :is(.card,.panel,.modal,dialog,.modal-head,.modal-body,.table-wrap,.video-library-content,.video-preview,.library-hover-preview,.onsite-feedback-dialog,.issue-attention-dialog,.timeclock-dialog,.site-plan-dialog,.audio-doc-card,.video-version-list>div,.video-activity-row,.role-card,.module-card,.list-row,.import-card,.dropzone,.more-menu,.bottom-nav,.admin-mobile-more,.topbar,.sidebar){background:var(--surface);border-color:var(--line);color:var(--ink)}
 html[data-onsite-theme=dark] .onsite-admin .sidebar{background:#171a1c}
 html[data-onsite-theme=dark] :is(.app,.modal,dialog,.onsite-feedback-dialog) :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea,.btn:not(.primary),.select,.column-menu,.table-column-label,.filter-chip,.close,.iconbtn){background:var(--surface);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] :is(.table,.data-table,.patch-table,.gantt-table,.personnel-total-table,.dante-matrix){background:var(--surface);color:var(--ink)}
 html[data-onsite-theme=dark] :is(th,.column-menu,.table-column-label,.table-group-heading,.day-group-row,.trucking-day-row,.material-order-heading,.catering-day-heading,.audio-doc-tabs,.video-pdf-controls,.project-modules,.role-permission-select){background:var(--paper);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] :is(td,tr,.section-head,.equipment-heading,.panel-head,.video-tree,.video-toolbar,.modal-head,.chat-input){border-color:var(--line)}
 html[data-onsite-theme=dark] :is(.chat-message .bubble,.segmented,.badge,.tag,.notice,.help-box,.video-hover-target,.dante-device){background:var(--brand-soft);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] :is(.chat-message.is-highlighted .bubble,.notice.urgent){background:var(--red-soft);color:var(--ink)}
 html[data-onsite-theme=dark] :is(.weekend-saturday,.is-saturday){background-color:#302f2a}
 html[data-onsite-theme=dark] :is(.weekend-sunday,.is-sunday){background-color:#3b342a}
 html[data-onsite-theme=dark] :is(.muted,.help,.breadcrumb,.crumb,.list-main small,.bubble small){color:var(--muted)}
 html[data-onsite-theme=dark] :is(.btn.primary,.primary-btn):not(.action-add){background:var(--brand);color:#21201c;border-color:var(--brand)}
 html[data-onsite-theme=dark] .onsite-feedback-dialog button:not(.primary):not(.action-delete){background:var(--surface);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] .onsite-feedback-dialog .onsite-feedback-submit{background:var(--brand);color:#21201c;border-color:var(--brand)}
 html[data-onsite-theme=dark] :is(.onsite-feedback-current-page,.onsite-feedback-page,.onsite-feedback-dialog-head small,.onsite-feedback-own article small){color:var(--muted)}
 html[data-onsite-theme=dark] .action-delete{color:var(--red)!important}
 html[data-onsite-theme=dark] .library-hover-media{background:var(--paper)}
 html[data-onsite-theme=dark] :is(.video-pdf-canvas,.site-plan-page){background:#35393c}
 html[data-onsite-theme=dark] :is(.onsite-feedback-item,.feedback-development,.feedback-review,.audio-doc-summary,.trucking-inline-input,.equipment-input,.equipment-row,.day-group-toggle,.table-filter-bar){background:var(--surface);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] .app>.sidebar .brand img.habegger-logo{background:transparent!important}
 html[data-onsite-theme=dark] .app :is(.nav,.bottom-nav,.more-menu) button{color:var(--muted)}
 html[data-onsite-theme=dark] .app :is(.nav,.bottom-nav,.more-menu) button.active{background:var(--brand-soft);color:var(--brand-deep)}
 html[data-onsite-theme=dark] .app #content :is(.equipment-heading,.library-heading,.patch-heading,.audio-doc-card>summary,.table-filter-bar>.search,.column-menu-panel,.log-column-options){background:var(--surface);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] .app #content :is(.table,.data-table,.video-table,.patch-table){background:var(--surface);color:var(--ink)}
 html[data-onsite-theme=dark] .app #content :is(.table,.data-table,.video-table,.patch-table)>thead>tr>th{background:var(--surface);color:var(--ink)}
 html[data-onsite-theme=dark] .app #content :is(.column-menu>summary,.table-column-label){background:var(--surface-alt);color:var(--ink)}
 html[data-onsite-theme=dark] :is(.print-output-page,.personnel-preview-page,.timing-preview-page,.diary-report-page,.crew-preview-page,.print-page,.report-page,.print-preview-pages,.report-preview-pages){--ink:#242321;--muted:#747474;--line:#e6e3dc;--paper:#fff;--surface:#fff;--surface-alt:#f7f5f1;color:#242321;background:#fff;color-scheme:light}
 html[data-onsite-theme=dark] #offline-content :is(th,.table-column-label){background:var(--paper);color:var(--ink)}
 html[data-onsite-theme=dark] .onsite-admin .sidebar .nav{background:var(--surface);border-color:var(--line)}
 html[data-onsite-theme=dark] :is(.stat,.filter.active){background:var(--surface);color:var(--ink)}
 html[data-onsite-theme=dark] .btn.brand{background:var(--brand)!important;color:#21201c!important}
 html[data-onsite-theme=dark] .login-brand{background:#171a1c;color:#fff}
 html[data-onsite-theme=dark] :is(.bottom-nav,.more-menu) button{color:var(--muted)}
 html[data-onsite-theme=dark] :is(.bottom-nav,.more-menu) button.active{color:var(--brand-deep);background:var(--brand-soft)}

 /* Mobile navigation uses semantic surfaces; department tiles supply their own palette below. */
 html[data-onsite-theme=dark] :is(.more-menu,.admin-mobile-more) button{background:var(--surface-alt);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] :is(.more-menu,.admin-mobile-more) button:is(:hover,:focus-visible){background:var(--brand-soft);color:var(--brand-deep)}
 html[data-onsite-theme=dark] :is(.more-menu,.admin-mobile-more) button.active{background:var(--brand-soft);color:var(--brand-deep)}
 html[data-onsite-theme=dark] .mobile-nav-item .mobile-nav-change{background:var(--surface);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] .mobile-nav-empty{border-color:var(--line)}
 /* Screen content must use semantic surfaces, including editable and nested rows.
    Keep this scoped to the application; PDF canvases and paper previews stay white. */
 html[data-onsite-theme=dark] :is(.side-project,.toast,.quick-entry,.import-preview,.import-notice,.import-map-field,.import-mode,.import-mode-option,.export-scope-option,.assign-block,.logo-upload,.video-dropzone,.video-empty,.audio-doc-source,.audio-import-summary,.material-import-summary,.material-preview-scroll,.personnel-total-scroll,.personnel-total-card,.personnel-total-day,.mobile-list-card,.mobile-time-card,.catering-mobile-card){background:var(--surface);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] :is(.crumb,.crumb a,.crumb b,.breadcrumb a,.breadcrumb strong,.side-project strong,.side-project small){color:var(--ink)}
 html[data-onsite-theme=dark] .app #content :is(.material-mainrow,.material-mobile-card){background:var(--surface);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] :is(.material-subrow,.material-mobile-card.is-subarticle,.material-review-table .material-subrow){background:var(--surface-alt);color:var(--ink)}
 html[data-onsite-theme=dark] :is(.material-needs-review,.material-review-table .material-mainrow.material-needs-review){background:var(--amber-soft);color:var(--ink)}
 html[data-onsite-theme=dark] :is(.material-cell-input,.material-expand,.material-parent-select){color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] :is(.material-cell-input:hover,.material-cell-input:focus,.audio-doc-table td[data-edit-row]:hover,.trucking-editable:hover,.personnel-inline-edit:hover){background:var(--surface-alt);color:var(--ink)}
 html[data-onsite-theme=dark] .app #content :is(.segmented,.personnel-view-toggle,.personnel-time-basis,.audio-doc-tabs) button,html[data-onsite-theme=dark] .history-preview-modal .segmented button{background:transparent;color:var(--muted);border-color:var(--line)}
 html[data-onsite-theme=dark] .app #content :is(.segmented,.personnel-view-toggle,.personnel-time-basis,.audio-doc-tabs) button.active,html[data-onsite-theme=dark] .history-preview-modal .segmented button.active{background:var(--surface);color:var(--ink)}
 html[data-onsite-theme=dark] :is(.column-menu-panel,.log-column-options) button{background:var(--surface-alt);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] :is(.column-menu-panel,.log-column-options) button:hover{background:var(--brand-soft)}
 html[data-onsite-theme=dark] #content :is(.personnel-total-table td,.personnel-total-table tbody th,.personnel-axis,.gantt-axis,.personnel-gantt-row){background:var(--surface);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] #content :is(.personnel-overall-drag-handle,.personnel-overall-marker,.personnel-marker,.personnel-date-activity,.personnel-shift-time){background:var(--surface-alt);color:var(--muted);border-color:var(--line)}
 html[data-onsite-theme=dark] #content :is(.personnel-overall-marker.is-active,.personnel-marker.is-active,.hotel-booking-toggle.is-booked){background:var(--green-soft);color:var(--green);border-color:var(--green)}
 html[data-onsite-theme=dark] #content :is(.personnel-date-activity:not(.is-empty),.personnel-shift-time){background:var(--brand-soft);color:var(--ink)}
 html[data-onsite-theme=dark] #content .is-weekend{--weekend-bg:#3b342a;--weekend-head:#40382d;--weekend-total:#40382d}
 html[data-onsite-theme=dark] #content .is-saturday{--weekend-bg:#302f2a;--weekend-head:#35332d;--weekend-total:#35332d}
 html[data-onsite-theme=dark] #content .trucking-saturday td{background:#302f2a}
 html[data-onsite-theme=dark] #content .trucking-sunday td{background:#3b342a}
 html[data-onsite-theme=dark] .app #content .mobile-list-actions button{background:var(--surface-alt);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] .app #content .mobile-list-actions .action-delete{color:var(--red)}
 html[data-onsite-theme=dark] :is(.audio-doc-table .audio-column-target,.dante-edit:hover,.dante-edit:focus-visible){background:var(--brand-soft)!important;color:var(--ink)}
 html[data-onsite-theme=dark] :is(.dante-device-head,.dante-device-row th,.dante-channel-head,.dante-receiver,.dante-channel-band,.dante-tx-separator,.dante-group-cross){background:var(--surface-alt);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] .dante-cross{background:var(--surface);border-color:var(--line)}
 html[data-onsite-theme=dark] .dante-cross.is-patched{background:var(--green-soft);color:var(--green)}
 html[data-onsite-theme=dark] .dante-cross.dante-hover{background:var(--brand-soft)}
 html[data-onsite-theme=dark] .dante-cross.is-patched.dante-hover{background:#3b5945}
 html[data-onsite-theme=dark] .dante-inline-input{color:var(--ink)!important}
 html[data-onsite-theme=dark] :is(.dante-status,.dante-activity-before){color:var(--muted)}
 html[data-onsite-theme=dark] .dante-activity-after{color:var(--green)}
 html[data-onsite-theme=dark] .dante-error{background:var(--red-soft);color:var(--red);border-color:var(--red)}
 html[data-onsite-theme=dark] #content :is(.build-row,.gantt-row,.mobile-timeline-scroll,.personnel-timeline-scroll .personnel-axis>*,.personnel-timeline-scroll .personnel-drag-cell,.personnel-timeline-scroll [data-timeline-column],.personnel-timeline-scroll [data-field]){background:var(--surface);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] #content :is(.build-actions,.gantt-actions) button{background:var(--surface-alt);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] #content :is(.build-actions,.gantt-actions) .action-delete{color:var(--red)}
 html[data-onsite-theme=dark] #content .personnel-total-table tfoot :is(th,td){background:var(--surface-alt);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] .dante-matrix :is(.dante-device-head,.dante-channel-head){background:var(--surface-alt)!important;color:var(--ink)}
 html[data-onsite-theme=dark] .dante-matrix :is(.dante-device-row th,.dante-device-row td,.dante-group-cross,.dante-tx-separator){background:var(--surface-alt);color:var(--ink)}
 html[data-onsite-theme=dark] .dante-matrix :is(th,td){border-color:var(--line)}
 html[data-onsite-theme=dark] .dante-matrix tbody tr:hover .dante-receiver{background:var(--brand-soft);color:var(--ink)}
 html[data-onsite-theme=dark] .dante-edit:is(:hover,:focus-visible){background:var(--brand-soft);color:var(--ink);outline-color:var(--brand-deep)}
 html[data-onsite-theme=dark] .dante-matrix .dante-group-cross button{color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] .dante-matrix .dante-cross.is-summary.is-patched{background:var(--green-soft)}
 html[data-onsite-theme=dark] .dante-matrix .dante-cross.is-summary button{color:var(--green)}
 html[data-onsite-theme=dark] :is(.clock-close,.clock-time button,.clock-new-entry,.clock-calendar-toggle,.clock-calendar){background:var(--surface-alt);color:var(--ink);border-color:var(--line)}
 html[data-onsite-theme=dark] .clock-calendar button{color:var(--ink)}
 html[data-onsite-theme=dark] .clock-calendar button:hover{background:var(--brand-soft)}
 html[data-onsite-theme=dark] .clock-calendar [aria-pressed=true]{background:var(--brand);color:#21201c}
 html[data-onsite-theme=dark] :is(.clock-note,.clock-calendar-days span){color:var(--muted)}
 html[data-onsite-theme=dark] .clock-warning{background:var(--amber-soft);color:var(--amber)}
 html[data-onsite-theme=dark] .clock-form [role=alert]{color:var(--red)}
 @media(max-width:600px){.app .topbar{height:auto;min-height:60px}}
}
@media print{.onsite-theme-switch{display:none!important}html[data-onsite-theme=dark]{color-scheme:light!important}}

/* Frozen personnel identity cells must keep their row's opaque weekend tint. */
@media screen{
 #content .personnel-timeline-scroll,#content .personnel-timeline-scroll .personnel-gantt{background:var(--surface,#fff)}
 html[data-onsite-theme=dark] #content .personnel-gantt-row .personnel-drag-handle{background:var(--surface-alt);color:var(--muted);border-color:var(--line)}
 #content .personnel-timeline-scroll .personnel-gantt-row.is-weekend>:is(.gantt-cell,.personnel-drag-cell){background:var(--weekend-bg)}
}

/* Shared button surfaces: visible outlines and readable labels in dark mode. */
@media screen{
 html[data-onsite-theme=dark]{--button-surface:#30363a;--button-hover:#3b4247;--button-line:#626b70}
 html[data-onsite-theme=dark] :is(.btn,.iconbtn,.material-expand,.onsite-feedback-dialog button):not(:where(.top-actions *,.login-language *,body>header *,.print-preview-pages *,.report-preview-pages *,.print-output-page *,.personnel-preview-page *,.timing-preview-page *,.diary-report-page *,.crew-preview-page *,.print-page *,.report-page *,.personnel-color-swatch,.onsite-context-menu *)):not(.primary):not(.primary-btn):not(.brand):not(.active):not([aria-pressed=true]):not(.is-issued):not(.is-booked):not(.action-delete):not(.danger){background:var(--button-surface)!important;color:var(--ink)!important;border-color:var(--button-line)!important}
 html[data-onsite-theme=dark] :is(.btn,.iconbtn,.material-expand,.onsite-feedback-dialog button):not(:where(.top-actions *,.login-language *,body>header *,.print-preview-pages *,.report-preview-pages *,.print-output-page *,.personnel-preview-page *,.timing-preview-page *,.diary-report-page *,.crew-preview-page *,.print-page *,.report-page *,.personnel-color-swatch)):hover:not(:disabled):not(.primary):not(.brand):not(.is-issued):not(.is-booked):not(.action-delete):not(.danger){background:var(--button-hover)!important;color:var(--ink)!important}
 html[data-onsite-theme=dark] :is(.btn.primary,.btn.brand,.primary-btn,.onsite-feedback-submit):not(.action-add):not(.ui-icon-primary){background:var(--brand)!important;color:#21201c!important;border-color:var(--brand)!important}
 html[data-onsite-theme=dark] :is(.btn,.iconbtn,.material-expand,.onsite-feedback-dialog button):focus-visible{outline:2px solid var(--brand-deep);outline-offset:2px}
 html[data-onsite-theme=dark] :is(.btn.action-delete,.iconbtn.action-delete,.btn.danger,.plain-filter-reset){color:var(--red)!important}
 html[data-onsite-theme=dark] :is(.btn.action-delete,.iconbtn.action-delete,.btn.danger,.plain-filter-reset):hover:not(:disabled){background:var(--red-soft)!important;color:var(--red)!important}
 html[data-onsite-theme=dark] :is(.btn,.iconbtn,.material-expand,.onsite-feedback-dialog button):disabled:not(:where(.top-actions *,.login-language *,body>header *)){opacity:1;color:var(--muted)!important;background:var(--surface-alt)!important;border-color:var(--line)!important;cursor:not-allowed}
}
@media screen{
 html[data-onsite-theme=dark] :is(.nav,.bottom-nav,.more-menu) button .navicon{color:inherit}
 html[data-onsite-theme=dark] .dashboard-metric-icon{background:var(--surface-alt);color:var(--ink)}
 html[data-onsite-theme=dark] .dashboard-current{color:var(--brand-deep)}
}

/* Important build items: one continuous surface in list and timeline, light/dark. */
@media screen{
 #content :is(.build-row,.gantt-row,.mobile-list-card,.mobile-time-row).is-important,
 #content .gantt-row.is-important>:is(.gantt-cell,.gantt-lane,.gantt-actions),
 #content .build-row.is-important .build-detail{background-color:var(--attention-surface,var(--red-soft))!important}
 #content .schedule-important-toggle[aria-pressed=true]{color:var(--red)}
 .schedule-important-field>span{display:flex;align-items:center;gap:8px}
 .build-form .schedule-important-field input,.quick-entry .schedule-important-field input{width:18px;height:18px;min-height:0;margin:0;padding:0;flex:none;accent-color:var(--red)}
 .build-form .schedule-important-field{align-content:start}
}

/* Personal RF tile palette: shared surfaces keep all 16 choices readable in both themes. */
@media screen{
 .wireless-tile[data-tile-color=rose],.wireless-color-swatch[data-rf-color=rose]{--wireless-tile-accent:#ce7e98}
 .wireless-tile[data-tile-color=coral],.wireless-color-swatch[data-rf-color=coral]{--wireless-tile-accent:#d97b75}
 .wireless-tile[data-tile-color=peach],.wireless-color-swatch[data-rf-color=peach]{--wireless-tile-accent:#db9d85}
 .wireless-tile[data-tile-color=apricot],.wireless-color-swatch[data-rf-color=apricot]{--wireless-tile-accent:#dba15f}
 .wireless-tile[data-tile-color=sand],.wireless-color-swatch[data-rf-color=sand]{--wireless-tile-accent:#bca36e}
 .wireless-tile[data-tile-color=lemon],.wireless-color-swatch[data-rf-color=lemon]{--wireless-tile-accent:#c6b94f}
 .wireless-tile[data-tile-color=lime],.wireless-color-swatch[data-rf-color=lime]{--wireless-tile-accent:#a4b76c}
 .wireless-tile[data-tile-color=mint],.wireless-color-swatch[data-rf-color=mint]{--wireless-tile-accent:#70b390}
 .wireless-tile[data-tile-color=sage],.wireless-color-swatch[data-rf-color=sage]{--wireless-tile-accent:#8baf8b}
 .wireless-tile[data-tile-color=teal],.wireless-color-swatch[data-rf-color=teal]{--wireless-tile-accent:#5faaa5}
 .wireless-tile[data-tile-color=ice],.wireless-color-swatch[data-rf-color=ice]{--wireless-tile-accent:#7bb4c5}
 .wireless-tile[data-tile-color=sky],.wireless-color-swatch[data-rf-color=sky]{--wireless-tile-accent:#779fc9}
 .wireless-tile[data-tile-color=lavender],.wireless-color-swatch[data-rf-color=lavender]{--wireless-tile-accent:#8d90c7}
 .wireless-tile[data-tile-color=lilac],.wireless-color-swatch[data-rf-color=lilac]{--wireless-tile-accent:#ab88c5}
 .wireless-tile[data-tile-color=mauve],.wireless-color-swatch[data-rf-color=mauve]{--wireless-tile-accent:#bc8eae}
 .wireless-tile[data-tile-color=stone],.wireless-color-swatch[data-rf-color=stone]{--wireless-tile-accent:#a49e96}
 .wireless-tile[data-tile-color]{background:color-mix(in srgb,var(--wireless-tile-accent) 18%,var(--surface,var(--card,#fff)));border-color:color-mix(in srgb,var(--wireless-tile-accent) 45%,var(--line))}
}

/* Shared UHF/IEM distinction and readiness in both live monitors. */
@media screen {
 :root{--rf-iem-surface:#e8f2fb;--rf-iem-ink:#426d96;--rf-ready-surface:#e5f2e9;--rf-ready-ink:#316b43;--rf-prepared-surface:#fff0dc;--rf-prepared-ink:#89551b}
 html[data-onsite-theme=dark]{--rf-iem-surface:var(--blue-soft);--rf-iem-ink:var(--blue);--rf-ready-surface:var(--green-soft);--rf-ready-ink:var(--green);--rf-prepared-surface:#49361f;--rf-prepared-ink:#edc28a}
 .wireless-tile[data-rf-kind=iem]:not([data-tile-color]),.rehearsal-rf-tile[data-rf-kind=iem]{background:var(--rf-iem-surface);border-color:var(--rf-iem-ink)}
 .wireless-tile[data-rf-kind=iem]{box-shadow:inset 0 3px 0 var(--rf-iem-ink)}
 :is(.wireless-status,.rehearsal-rf-readiness)[data-readiness=preparing]{background:var(--rf-prepared-surface)!important;color:var(--rf-prepared-ink)!important}
 :is(.wireless-status,.rehearsal-rf-readiness)[data-readiness=ready]{background:var(--rf-ready-surface)!important;color:var(--rf-ready-ink)!important}
}

@media screen{
 #content .rehearsals-table tr.is-highlighted>td{background:var(--attention-surface,var(--red-soft))}
 #content [data-rehearsal-highlight][aria-pressed=true]{color:var(--red)}
}

@media screen{html[data-onsite-theme=dark] #content .personnel-shift-bar:not(.is-offday){background:color-mix(in srgb,var(--trade-color,var(--brand)) 22%,var(--surface) 78%)!important;color:var(--ink)!important}html[data-onsite-theme=dark] #content .personnel-shift-bar :is(.personnel-bar-time,.personnel-bar-grip,.gantt-bar-label,.personnel-bar-edge){color:var(--ink)!important}}

/* Subtle alternating data rows, retaining weekend, status and sticky-cell surfaces. */
@media screen{
 :root{--table-row-tint:rgba(36,35,33,.035)}
 #audio-model-picker{background-color:var(--surface);background-image:linear-gradient(var(--table-row-tint),var(--table-row-tint))}
 html[data-onsite-theme=dark]{--table-row-tint:rgba(236,235,230,.035)}
 :is(#content,.modal,dialog) :is(.table,.data-table,.patch-table,.admin-list-table):not(:where(.gantt-table,.build-table,.personnel-total-table))>tbody>tr:nth-child(even of :not(:where([hidden],.day-group-row,.material-order-heading,.trucking-day-row,.material-import-row,.catering-day-heading,:has(>td[colspan]))))>:where(td,th[scope=row]){background-image:linear-gradient(var(--table-row-tint),var(--table-row-tint))}
}

@media screen{html{--personnel-weekday-bg:#faf9f5}html[data-onsite-theme=dark]{--personnel-weekday-bg:#252a2a}#content .personnel-unified-grid :is(.unified-day,.unified-day-heading):not(.is-weekend),#content .personnel-gantt-row:not(.is-weekend)>.gantt-lane{background-color:var(--personnel-weekday-bg)}}

@media screen {
 :is(.mobile-nav-item[data-mobile-item=stage-design],.project-menu-row[data-menu-page=stage-design],.schema-library-branch[data-library-page=stage-design]){--mobile-nav-bg:#f5dfd1;--mobile-nav-active-bg:#edc6ae;--mobile-nav-ink:#71482f}
 html[data-onsite-theme=dark] :is(.mobile-nav-item[data-mobile-item=stage-design],.project-menu-row[data-menu-page=stage-design],.schema-library-branch[data-library-page=stage-design]){--mobile-nav-bg:#3c302a;--mobile-nav-active-bg:#584033;--mobile-nav-ink:#f0c7ac}
}

@media screen{.project-budget-module{--budget-green:#eaf3d9}html[data-onsite-theme=dark] .project-budget-module{--budget-green:#303728}}

/* Palette swatches represent actual row colours, including in Darkmode. */
@media screen{html[data-onsite-theme=dark] .staff-dialog .personnel-color-grid .personnel-color-swatch:not(:disabled),html[data-onsite-theme=dark] .staff-dialog .personnel-color-grid .personnel-color-swatch:hover:not(:disabled){background:var(--swatch)!important;color:#202124!important}html[data-onsite-theme=dark] .staff-dialog .personnel-color-grid .personnel-color-swatch[aria-pressed=true]{border-color:var(--ink)!important}}

/* Offdays have one shared visual identity, independent of department colours. */
@media screen{
 :root{--personnel-offday-red:#efaaa2;--personnel-offday-orange:#f4c18b;--personnel-offday-ink:#553227}
 html #content :is(.personnel-shift-bar,.unified-plan-bar).is-offday{background:repeating-linear-gradient(135deg,var(--personnel-offday-red) 0 8px,var(--personnel-offday-orange) 8px 12px);color:var(--personnel-offday-ink);border:1px solid #bd8067}
 html #content .is-offday svg{background:var(--personnel-offday-red);color:var(--personnel-offday-ink);border-radius:2px}
}

@media screen {
 :root{--lighting-lowest-bg:#eaf3d9;--lighting-lowest-ink:#435b24}
 html[data-onsite-theme=dark]{--lighting-lowest-bg:#303728;--lighting-lowest-ink:#d0e4aa}
}

@media screen{html[data-onsite-theme=dark] .vp-modal .segmented button.active{background:var(--surface);color:var(--ink)}}

@media screen{
 :is(#vp-walls,#vp-processors,#vp-port-table,#lp-ports) tr.vp-capacity-exceeded>td{background:var(--attention-surface,var(--red-soft))!important;color:var(--ink)}
 :is(#vp-walls,#vp-processors,#vp-port-table,#lp-ports) tr.vp-capacity-exceeded:hover>td{background:var(--attention-surface,var(--red-soft))!important}
}

/* Resource calendar reuses the soft status and personnel palettes. Screen only. */
@media screen{
 :is(.resource-planner,.label-sheet-control){--resource-job-bg:var(--red-soft,#f6e4e0);--resource-job-ink:var(--red,#a34b40);--resource-requested-bg:var(--amber-soft,#f6eddb);--resource-requested-ink:#6d5516;--resource-vacation-bg:#d4e2f2;--resource-vacation-ink:#285a6d;--resource-unavailable-bg:#dddeda;--resource-unavailable-ink:#4b504c;--resource-compensation-bg:#e6d9ef;--resource-compensation-ink:#5b4278;--resource-sick-bg:#efd5df;--resource-sick-ink:#773e5b;--resource-available-bg:var(--green-soft,#e6eee6);--resource-available-ink:var(--green,#355c40)}
 html[data-onsite-theme=dark] :is(.resource-planner,.label-sheet-control){--resource-job-bg:var(--red-soft);--resource-job-ink:var(--red);--resource-requested-bg:var(--amber-soft);--resource-requested-ink:var(--amber);--resource-vacation-bg:#30414d;--resource-vacation-ink:#b4daed;--resource-unavailable-bg:#363c3b;--resource-unavailable-ink:#d2d6d2;--resource-compensation-bg:#443653;--resource-compensation-ink:#dcc5ef;--resource-sick-bg:#443440;--resource-sick-ink:#edbfd7;--resource-available-bg:var(--green-soft);--resource-available-ink:var(--green)}
}
@media screen{
 .onsite-context-menu button.onsite-context-item{background:transparent;border-color:transparent;color:var(--ink)}
 .onsite-context-menu button.onsite-context-item.action-delete:not(:disabled){color:var(--red)}
 html[data-onsite-theme=dark] .onsite-context-menu button.onsite-context-item:not(:disabled){background:transparent!important;border-color:transparent!important;color:var(--ink)!important}
 html[data-onsite-theme=dark] .onsite-context-menu button.onsite-context-item.action-delete:not(:disabled){color:var(--red)!important}
 html[data-onsite-theme=dark] .onsite-context-menu button.onsite-context-item:disabled{background:transparent!important;border-color:transparent!important;color:var(--muted)!important}
 .onsite-context-menu button.onsite-context-item:hover:not(:disabled){background:var(--surface-alt)!important}
 .onsite-context-menu button.onsite-context-item.action-delete:hover:not(:disabled){background:var(--red-soft)!important}
}
@media screen{
 html body .onsite-context-menu button.onsite-context-item:focus,
 html[data-onsite-theme=dark] body .onsite-context-menu button.onsite-context-item:focus{outline:2px solid var(--brand)!important;outline-offset:-2px;box-shadow:none!important;background:var(--brand-soft,var(--surface-alt))!important}
}
/* Shared tooltip / information / context-action frame; screen only. */
@media screen{
 :root{--overlay-info-bg:#f0efec;--overlay-action-bg:#fff;--overlay-radius:8px;--overlay-padding:8px;--overlay-shadow:0 4px 18px #0002}
 html[data-onsite-theme=dark]{--overlay-info-bg:#303539;--overlay-action-bg:var(--surface);--overlay-shadow:0 4px 18px #0006}
 html body .onsite-overlay{position:fixed!important;box-sizing:border-box;z-index:30020;right:auto!important;bottom:auto!important;margin:0!important;padding:var(--overlay-padding)!important;border:1px solid var(--line,#dedbd6)!important;border-radius:var(--overlay-radius)!important;box-shadow:var(--overlay-shadow)!important;color:var(--ink,#242321);font:400 12px/1.4 var(--ui-font,Arial,sans-serif)!important;max-width:calc(100vw - 16px);max-height:calc(100dvh - 16px);overflow:auto;transform:none!important;translate:none!important;text-align:left;text-transform:none;letter-spacing:normal}
 html body .onsite-overlay-info{width:max-content;background:var(--overlay-info-bg)!important}
 html body .onsite-overlay-action{background:var(--overlay-action-bg)!important}
 html body .onsite-overlay-info :is(span,p,small,strong,h1,h2,h3,h4,label){font-family:inherit;font-size:inherit;line-height:inherit}
 html body .onsite-overlay-info :is(strong,h1,h2,h3,h4){font-weight:600}
 html body .onsite-title-tooltip{width:max-content;max-width:min(360px,calc(100vw - 16px));white-space:pre-wrap;overflow-wrap:anywhere;pointer-events:none}
 html body .onsite-overlay[hidden]{display:none!important}
}
@media print{.onsite-overlay{display:none!important}}

/* Project pages and the standalone resource planner share the existing PB palette. */
@media screen{html:not([data-onsite-theme=dark]) .project-ui{--ink:#242321;--muted:#706d67;--line:#e4e0d8;--paper:#f5f3ef;--card:#fff;--brand:#d7c8aa;--brand-deep:#625c52;--brand-soft:#f2eee6;--red:#a34b40;--red-soft:#f1ece7;--amber:#766d5d;--amber-soft:#f3efe7;--blue:#5d5b56;--blue-soft:#efede8;--shadow:0 10px 30px rgba(32,31,29,.06);--radius:16px}}

@media screen{
 .resource-planner .resource-state.booked{--resource-state-bg:var(--resource-job-bg);--resource-state-ink:var(--resource-job-ink)}
 .resource-planner .resource-state.workshop{--resource-state-bg:var(--resource-requested-bg);--resource-state-ink:var(--resource-requested-ink)}
 .resource-planner .resource-state.retired{--resource-state-bg:var(--resource-unavailable-bg);--resource-state-ink:var(--resource-unavailable-ink)}
 .fleet-dispatch .resource-state.unavailable{--resource-state-bg:var(--surface-alt);--resource-state-ink:var(--muted)}
}

/* Patch import reuses the shared semantic surfaces; printed views retain original colors. */
@media screen{
 .patch-modal .patch-count{background:var(--surface-alt)}
 .patch-modal :is(.patch-count.patch-added,.patch-diff-table tr.patch-added td){background:var(--green-soft)}
 .patch-modal :is(.patch-count.patch-changed,.patch-warning,.patch-diff-table tr.patch-changed td){background:var(--amber-soft)}
 .patch-modal :is(.patch-count.patch-removed,.patch-diff-table tr.patch-removed td){background:var(--red-soft)}
 .patch-modal :is(.patch-sheet-warnings,.patch-modes label){border-color:var(--line)}
 .patch-modal .patch-modes label:has(input:checked){background:var(--amber-soft);border-color:var(--brand-deep)}
 .patch-modal .patch-modes small{color:var(--muted)}
}

/* Shared modal backdrop for new native side panels. */
@media screen{ :root{--ui-dialog-backdrop:rgba(36,35,33,.4)} html[data-onsite-theme=dark]{--ui-dialog-backdrop:rgba(0,0,0,.55)}}

/* Shared data-module shadow in every workspace. */
@media screen{:root{--ui-data-panel-line:#e4e0d8;--ui-data-panel-shadow:0 2px 10px rgba(32,31,29,.04)}html[data-onsite-theme=dark]{--ui-data-panel-line:#454a4d;--ui-data-panel-shadow:0 4px 16px rgba(0,0,0,.18)}}

/* AB dialog palette is shared by user management, master cards and embedded planners. */
@media screen {
 :root{--admin-dialog-bg:#f7f6f3;--admin-dialog-field-bg:#fff;--admin-dialog-soft-bg:#f6f3ed;--admin-dialog-line:#e6e3dc;--admin-dialog-field-line:#dcd7ce;--admin-dialog-ink:#202124;--admin-dialog-muted:#747474;--admin-dialog-accent:#75613c;--admin-dialog-backdrop:#24232180;--admin-dialog-shadow:0 25px 90px #0003}
 html[data-onsite-theme=dark]{--admin-dialog-bg:#25292c;--admin-dialog-field-bg:#25292c;--admin-dialog-soft-bg:#30363a;--admin-dialog-line:#454a4d;--admin-dialog-field-line:#454a4d;--admin-dialog-ink:#ecebe6;--admin-dialog-muted:#b4b4ae;--admin-dialog-accent:#e1ca98;--admin-dialog-backdrop:#0008;--admin-dialog-shadow:0 25px 90px #0006}
}

/* AB uses a dark rail in both display modes; the mobile sheet follows its theme. */
@media screen and (min-width:601px){
 .onsite-admin .sidebar .admin-grouped-nav{--admin-nav-surface:#292c2e;--admin-nav-line:#454a4d;--admin-nav-ink:#ecebe6;--admin-nav-muted:#b4b4ae;--admin-nav-hover:#353a3d;--admin-nav-active:#494131;--admin-nav-active-ink:#f2e4c5;--admin-nav-accent:#e1ca98}
 html[data-onsite-theme=dark] .onsite-admin .sidebar .admin-grouped-nav{--admin-nav-surface:#202427;--admin-nav-hover:#2d3337;--admin-nav-active:#3d372b}
}

@media screen{
 .onsite-admin{--admin-dialog-readonly-bg:color-mix(in srgb,var(--admin-dialog-soft-bg,var(--surface-alt)) 88%,var(--admin-dialog-muted,var(--muted)))}
}
