/* Scheduler appearance. Shared app.css remains compatible with the technician portal. */
:root {
  color-scheme: light;
  --bg:#f2f5fa; --surface:#fff; --surface-soft:#f0f4fa; --surface-raised:#fff;
  --text:#17243a; --navy:#10233f; --muted:#526176; --line:#cbd5e3;
  --blue:#2563eb; --link:#1d4ed8; --white:var(--surface); --on-accent:#fff;
  --selection-bg:#e5eeff; --selection-text:#174299; --selection-border:#4875c9;
  --success-bg:#e2f5ea; --success-text:#146b38; --danger-bg:#fff0ef; --danger-text:#9f241d;
  --warning-bg:#fff3d1; --warning-text:#795100; --purple-bg:#f0e9ff; --purple-text:#634098;
  --focus:#285ecb; --toast-bg:#10233f; --toast-text:#fff;
  --shadow:0 8px 26px rgba(20,39,73,.08);
}
:root:is([data-theme="default"],[data-theme="dark"]) {
  color-scheme: dark;
  --bg:#0b1220; --surface:#141f30; --surface-soft:#1c2a3e; --surface-raised:#202f46;
  --text:#edf3ff; --navy:#edf3ff; --muted:#b1bfd2; --line:#3b4c65;
  --link:#acccff; --selection-bg:#203d66; --selection-text:#e0edff; --selection-border:#82b3ff;
  --success-bg:#143c2f; --success-text:#a3edc2; --danger-bg:#492528; --danger-text:#ffbfba;
  --warning-bg:#44361b; --warning-text:#ffe09a; --purple-bg:#342747; --purple-text:#dec4ff;
  --focus:#b3d0ff; --toast-bg:#d9e8ff; --toast-text:#0b182c;
  --shadow:0 8px 26px rgba(0,0,0,.2);
}
/* AbcFS charcoal palette, kept separate from the existing navy Default. */
:root[data-theme="dark"] {
  --bg:#101419; --surface:#191f27; --surface-soft:#232b35; --surface-raised:#29333f;
  --text:#f1f5fa; --navy:#f1f5fa; --muted:#b2bccb; --line:#343e4a;
  --link:#8ed7ff; --selection-bg:#19364c; --selection-text:#c1eaff; --selection-border:#8ed7ff;
  --success-bg:#19372d; --success-text:#8adbb5; --danger-bg:#382327; --danger-text:#ffaaa4;
  --warning-bg:#382b1a; --warning-text:#ffd08a; --focus:#8ed7ff;
  --toast-bg:#f1f5fa; --toast-text:#101419;
}
body {font-size:15px;line-height:1.55;background:var(--bg);color:var(--text)}
button,input,select,textarea {color:var(--text)}
button {min-height:44px;font-weight:600}
button:not(:disabled):hover {border-color:var(--selection-border)}
input,select,textarea {accent-color:var(--blue)}
input::placeholder,textarea::placeholder {color:var(--muted);opacity:1}
input:focus-visible,select:focus-visible,textarea:focus-visible,button:focus-visible,summary:focus-visible,a:focus-visible {outline:3px solid var(--focus);outline-offset:3px}
a {color:var(--link)}
small,.muted {color:var(--muted)}
.eyebrow {color:var(--link)}
:root[data-theme] :where(header,button,dialog,.admin-account-menu,.admin-section,.admin-kpi,.admin-team-card,.admin-tech-report,.admin-periods button.active,.login-card,.metrics article,.toolbar,.board-shell,.queue .job,.job,.queue-toolbar,.queue-select span,.schedule,.week-timeline,.week-header,.week-day-head,.week-track,.timeline-job,.team-member.active,.team-member:hover,.notification-preferences label,.dispatcher-notification,.about-grid article,.job-gallery-item,.money-input,.leave-types span,.about-actions,.job-gallery-actions,.editor-actions,.settings-shell>.dialog-actions,.admin-assign-dialog .dialog-actions) {background:var(--surface);color:var(--text)}
html[data-theme] :is(input:not([type="checkbox"]):not([type="radio"]),select,textarea) {background-color:var(--surface);color:var(--text);border-color:var(--line)}
html[data-theme] :is(.admin-action-tile,.admin-periods,.admin-rate-bar,.admin-assign-option.unavailable,.board-shell aside,.tech-head,.resource-corner,.resource-label,.team-sidebar,.tech-summary-grid article,.rate-settings-grid>label,.badge,.device-status,.absence-kind,.view-only-badge,.view-toggle,.job-files-button:disabled,.job-gallery-item>a,.lane-head span,.week-timeline .job-cancelled,.shift-row.disabled) {background:var(--surface-soft);color:var(--text)}
html[data-theme] :is(.admin-action-tile.selected,.admin-periods button.active,.view-toggle button.active,.dropzone.dragover,.week-track.dragover,.week-day-head.today,.bulk-bar,.dispatcher-notification.unread,.push-setup,.about-identity,.security-lock-icon,.leave-types input:checked+span,.job-files-button,.admin-assign-option:has(input:checked)) {background:var(--selection-bg);color:var(--selection-text);border-color:var(--selection-border)}
html[data-theme] :is(.admin-action-tile.selected,.admin-assign-option:has(input:checked)) {box-shadow:inset 0 0 0 1px var(--selection-border)}
html[data-theme] :is(.primary,.queue-select input:checked+span) {background:var(--blue);border-color:var(--blue);color:var(--on-accent)}
html[data-theme] .brand-mark {color:#fff;background:linear-gradient(145deg,#1769bf,#0b3d7c);background-color:#1769bf}
html[data-theme] :is(.admin-job-title,.history-event p) {color:var(--text)}
html[data-theme] :is(.admin-inline-job,.open-hint,.job .time,.timeline-job>div span,.field-history a,.action-heading button,.notification-list-head button,.security-secondary) {color:var(--link)}
html[data-theme] :is(.admin-job-row,.admin-team-card dl>div,.history-event,.hour-labels,.hour-labels span,.job-read-only .form-grid input:disabled,.job-read-only .form-grid select:disabled,.job-read-only .form-grid textarea:disabled) {border-color:var(--line)}
html[data-theme] :is(.admin-status,.admin-job-type.other,.view-only-badge) {background:var(--surface-soft);color:var(--muted)}
html[data-theme] :is(.admin-job-type.install,.completed,.config-state.configured,.absence-kind.available,.about-security,.cloud-state.synced) {background:var(--success-bg);color:var(--success-text)}
html[data-theme] :is(.admin-job-type.callout,.urgent,.high,.alert,.security-error,.absence-kind.sick,.overdue-flag,.leave-types .sick-choice input:checked+span) {background:var(--danger-bg);color:var(--danger-text)}
html[data-theme] :is(.admin-job-type.site_survey,.admin-late,.admin-warning,.admin-error,.config-state,.travel-flag,.cloud-state.pending,.view-only-badge.editing) {background:var(--warning-bg);color:var(--warning-text);border-color:var(--line)}
html[data-theme] :is(.admin-blockers,.danger,.metrics .attention-metric strong) {color:var(--danger-text)}
html[data-theme] .danger {border-color:var(--danger-text)}
html[data-theme] :is(.danger:hover,.job-failed,.job-attention,.timeline-job.job-attention,.timeline-job.job-failed,.device-card.revoked,.metrics .attention-metric) {background:var(--danger-bg);border-color:var(--line)}
html[data-theme] .absence-kind.leave {background:var(--selection-bg);color:var(--selection-text)}
html[data-theme] .absence-kind.training {background:var(--purple-bg);color:var(--purple-text)}
html[data-theme] .device-card {background:var(--warning-bg)}
html[data-theme] .device-card.approved {background:var(--success-bg)}
html[data-theme] .field-history {background:var(--surface-soft)}
html[data-theme] .notification-button {background:var(--selection-bg);color:var(--selection-text);border-color:var(--line)}
html[data-theme] .notification-button b {background:#b91c1c;color:#fff;border-color:var(--surface);font-size:11px;height:22px;min-width:22px;line-height:14px}
html[data-theme] .security-lock {background:var(--bg)}
html[data-theme] .security-card {background:var(--surface);border-color:var(--line)}
html[data-theme] :is(.security-card>small,.hour-labels span,.offshift-overlay>span,.resource-label em) {color:var(--muted)}
html[data-theme] .unavailable-lane {background:repeating-linear-gradient(135deg,var(--surface) 0,var(--surface) 8px,var(--surface-soft) 8px,var(--surface-soft) 16px)}
html[data-theme] .week-track {background-image:repeating-linear-gradient(to right,transparent 0,transparent 59px,var(--line) 60px),repeating-linear-gradient(to right,transparent 0,transparent 659px,var(--line) 660px)}
html[data-theme] .job-read-only .form-grid :is(input,select,textarea):disabled {background:var(--surface-soft);color:var(--text);-webkit-text-fill-color:var(--text)}
html[data-theme] :is(.dialog-head,.dialog-actions,.about-actions,.job-gallery-actions) {background:var(--surface);color:var(--text)}
html[data-theme] #toast {background:var(--toast-bg);color:var(--toast-text);z-index:100}
html[data-theme] #toast.toast-error {background:#a72b22!important;color:#fff}
html[data-theme] .absence-overlay {color:var(--danger-text)}
dialog {border:1px solid var(--line)}
dialog::backdrop {background:rgba(4,10,20,.65)}
/* Larger type for information used while dispatching. */
.admin-heading h1 {font-weight:800;line-height:1.2}
.admin-heading .muted,.admin-section-heading p,.admin-definition {font-size:14px;line-height:1.65}
.admin-notice,.admin-kpi>span,.admin-kpi small,.admin-job-row p,.admin-job-row small,.admin-list-heading span,.admin-team-title p,.admin-team-card dl>div,.admin-team-period,.admin-tech-report p,.admin-payout-row>div:first-child,.admin-inline-job {font-size:13px}
.admin-kpi small {line-height:1.55}
.admin-kpi strong {font-size:29px;font-variant-numeric:tabular-nums}
.admin-job-title {font-size:16px;line-height:1.5;min-height:44px;padding:8px 0;margin-top:2px}
.admin-action-tile span {font-size:14px;font-weight:650}
.admin-action-tile strong {font-variant-numeric:tabular-nums}
.admin-tags {gap:7px}
.admin-job-type,.admin-status,.admin-late {font-size:12px;padding:4px 9px;line-height:1.4}
.admin-periods button {font-size:14px;min-height:44px}
.admin-periods button.active,.view-toggle button.active {box-shadow:inset 0 0 0 2px var(--selection-border)}
.admin-panel label,.admin-assign-dialog label {font-size:14px}
.admin-assign-option strong {font-size:15px}
.admin-assign-option small {font-size:13px;line-height:1.5}
.admin-assign-dialog>form>p {font-size:14px}
.admin-team-card dl>div {grid-template-columns:140px minmax(0,1fr)}
.admin-job-row .admin-blockers {color:var(--warning-text)}
.form-grid label,.tech-summary-grid span,.section-heading span,.device-card label,.device-card small,.about-grid span,.security-brand span,.security-card>small,.secure-note,.workspace-help,.login-divider {font-size:12px}
.job strong,.job p {font-size:14px}
.job small,.job .badge,.history-event p,.history-event small {font-size:12px}
/* Icon + label navigation, with a visible shape change for the current screen. */
header nav {gap:6px;background:var(--surface-soft);padding:5px;border:1px solid var(--line);border-radius:14px;flex:0 1 auto;margin:auto}
header nav button {display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:10px 15px;font-size:14px;font-weight:650;color:var(--muted);background:transparent;border:1px solid transparent;border-radius:10px;position:relative}
header nav button svg {width:21px;height:21px;flex:none;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
html[data-theme] header nav button {background:transparent;color:var(--muted)}
html[data-theme] header nav button.nav-active {background:var(--selection-bg);color:var(--selection-text);border-color:var(--selection-border);box-shadow:inset 0 0 0 1px var(--selection-border);font-weight:800}
header nav button.nav-active::after {content:"";position:absolute;left:30%;right:30%;bottom:3px;height:3px;background:var(--selection-text);border-radius:3px}
.theme-toggle {display:grid;place-items:center;flex:none;width:44px;height:44px;padding:9px!important;border:1px solid var(--line);border-radius:10px}
.theme-toggle svg {width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.theme-sun {display:none}html:is([data-theme="dark"],[data-theme="default"]) .theme-sun {display:block}html:is([data-theme="dark"],[data-theme="default"]) .theme-moon {display:none}
.appearance-control {border:0;border-top:1px solid var(--line);padding:12px 0 2px;margin:4px 0 0;min-width:0}
.appearance-control legend {font-size:13px;font-weight:750;padding:0 6px}
.appearance-options {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;background:var(--surface-soft);border:1px solid var(--line);border-radius:10px;padding:4px}
.appearance-options button {flex:1;min-width:0;min-height:42px;padding:7px 8px;font-size:13px;border:1px solid transparent;text-align:center}
html[data-theme] .appearance-options button {background:transparent;color:var(--muted)}
html[data-theme] .appearance-options button[aria-pressed="true"] {background:var(--selection-bg);border-color:var(--selection-border);color:var(--selection-text);font-weight:800}
.appearance-control small {display:block;font-size:12px;padding:8px 4px 0;color:var(--muted)}
.admin-account-menu {width:280px;max-width:calc(100vw - 24px);gap:7px}
.admin-account-menu>button,.admin-account-menu>form>button {font-size:14px;padding:11px}
.login-appearance {margin-top:26px}
html[data-theme] .login-body {background:var(--bg)}
.login-card h1 {font-size:30px}
@media(max-width:1100px){header{gap:14px;padding:0 18px}header nav button{padding:10px}header .brand{min-width:160px}header .user{gap:8px}.brand strong{font-size:17px}}
@media(max-width:900px) and (min-width:801px){header nav button{padding:10px 8px;font-size:13px;gap:5px}header nav button svg{width:18px}header .brand{min-width:145px}header .brand small{font-size:10px}header .user{gap:5px}}
@media(max-width:800px){
  header{height:72px;padding:0 12px;gap:10px}header .brand{min-width:0;flex:1}header .brand strong{font-size:17px}header .brand small{font-size:11px}header .user{gap:8px}header .user button{min-height:44px}header .notification-button{width:44px;height:44px;padding:9px}header .brand-mark.small{width:34px;height:34px}
  header nav{position:fixed;left:0;right:0;bottom:0;margin:0;grid-template-columns:repeat(4,minmax(0,1fr));gap:5px;border:0;border-top:1px solid var(--line);border-radius:0;background:var(--surface)!important;padding:8px 10px max(10px,env(safe-area-inset-bottom));box-shadow:0 -4px 20px rgba(0,0,0,.08)}
  header nav button{flex-direction:column;gap:4px;min-height:62px;font-size:13px;padding:6px 2px 10px;line-height:1.25}header nav button svg{width:22px;height:22px}header nav button.nav-active::after{bottom:3px;left:36%;right:36%}
  .admin-panel,#adminJobs{padding-bottom:calc(120px + env(safe-area-inset-bottom))}.admin-account-menu{top:70px;max-height:calc(100dvh - 175px);overflow-y:auto}.admin-account summary{min-height:44px;padding:10px 12px}#toast{bottom:105px}
  .admin-panel{padding-top:22px}.admin-section{padding:18px}.admin-heading .muted{font-size:14px}.admin-periods button{font-size:13px}.admin-kpi{padding:16px}.admin-kpi strong{font-size:27px}.admin-team-card dl>div{grid-template-columns:135px minmax(0,1fr)}
  .toolbar input,.toolbar select{font-size:16px}.dialog-head .muted{font-size:13px}.form-grid label{font-size:14px}.form-grid input,.form-grid select,.form-grid textarea{font-size:16px}
}
@media(max-width:480px){.admin-section{padding:16px}.admin-action-tile{min-height:112px}.admin-action-tile:last-child{min-height:76px}.admin-kpi strong{font-size:25px}.admin-team-card dl>div{grid-template-columns:120px minmax(0,1fr)}.admin-section-heading h2{font-size:21px}.admin-heading h1{font-size:27px}.admin-job-copy{width:100%}}
@media(max-width:360px){header{gap:5px;padding:0 8px}header .brand{gap:7px}header .brand strong{font-size:15px}header .brand small{font-size:10px}header .user{gap:5px}header .brand-mark.small{width:28px;height:32px}.admin-account summary{padding:10px 8px}.admin-kpi strong{font-size:23px}.admin-team-card dl>div{grid-template-columns:1fr;gap:4px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
