/* Accent colours only affect interface accents; status colours and logos keep their meaning. */
:root{--accent:#e3132f;--accent-hover:#b90d24;--accent-ink:#b90d24;--accent-soft:#fff1f3;--accent-dark-ink:#ff8b9e;--surface:#fff;--surface-soft:#f5f6f8;--settings-ink:#111722}
:root[data-accent=blue]{--accent:#2563eb;--accent-hover:#1d4ed8;--accent-ink:#1d4ed8;--accent-soft:#edf3ff;--accent-dark-ink:#93bcff}
:root[data-accent=green]{--accent:#087f5b;--accent-hover:#066448;--accent-ink:#066448;--accent-soft:#ebf8f2;--accent-dark-ink:#80dfba}
:root[data-accent=purple]{--accent:#7c3aed;--accent-hover:#6d28d9;--accent-ink:#6d28d9;--accent-soft:#f4efff;--accent-dark-ink:#c9a4ff}
:root[data-accent=amber]{--accent:#9a5b00;--accent-hover:#784600;--accent-ink:#784600;--accent-soft:#fff5e7;--accent-dark-ink:#f2c67f}
:root[data-accent=graphite]{--accent:#475569;--accent-hover:#334155;--accent-ink:#334155;--accent-soft:#f0f3f7;--accent-dark-ink:#bbc9df}
:root[data-accent]{--red:var(--accent);--red-dark:var(--accent-hover)}
:root[data-theme=light]{color-scheme:light}
.button.primary{background:var(--accent);color:#fff;box-shadow:0 9px 22px color-mix(in srgb,var(--accent) 20%,transparent)}.button.primary:hover{background:var(--accent-hover)}
input:focus,select:focus,textarea:focus{border-color:var(--accent);box-shadow:0 0 0 4px var(--accent-soft)}
.repair-summary article strong{color:var(--accent-ink)}
.eyebrow{color:var(--accent-ink)}
.nav-item.active span{color:var(--accent-dark-ink)}
.install-platforms button[aria-pressed=true]{background:var(--accent-soft);color:var(--accent-ink);border-color:var(--accent)}
.app-settings-top{display:grid;place-items:center;flex-shrink:0;color:var(--ink)}
.app-settings-login{margin-top:12px;min-height:44px;font-size:12px}
.settings-dialog{width:min(820px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;background:var(--surface);color:var(--ink);overflow:hidden}
.settings-dialog[open]{display:flex;flex-direction:column}
.settings-head{display:flex;align-items:center;justify-content:space-between;gap:15px;padding:23px 28px;border-bottom:1px solid var(--line);flex:none}
.settings-head h2{margin:0;font-size:24px;letter-spacing:-.04em}.settings-head .eyebrow{font-size:10px;margin-bottom:6px}
.settings-head .close-button{width:44px;height:44px;flex-shrink:0;color:var(--ink)}
.settings-body{overflow:auto;min-height:0;overscroll-behavior:contain;padding:24px 28px 26px}
.settings-tabs{display:flex;gap:5px;background:var(--surface-soft);padding:5px;border-radius:12px;margin-bottom:26px}
.settings-tabs button{flex:1;min-height:44px;border:0;border-radius:9px;background:transparent;color:var(--muted);font-size:13px;font-weight:750}
.settings-tabs button[aria-pressed=true]{background:var(--surface);color:var(--ink);box-shadow:0 2px 8px #0c142010}
.settings-layout{display:grid;grid-template-columns:minmax(0,1fr) 240px;gap:28px}
.settings-section{margin-bottom:27px}.settings-section h3,.settings-install-intro h3{font-size:18px;letter-spacing:-.025em;margin:0 0 8px}
.settings-section>p,.settings-install-intro>p{font-size:12px;color:var(--muted);line-height:1.65;margin:0 0 15px}
.theme-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.theme-choice{border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);padding:10px 8px;min-height:100px;display:grid;gap:10px;justify-items:center;font-size:12px;font-weight:700}
.theme-choice[aria-pressed=true],.accent-choice[aria-pressed=true]{border-color:var(--accent);box-shadow:0 0 0 1px var(--accent)}
.theme-tile{width:63px;height:42px;border:1px solid #ccd1db;border-radius:7px;background:linear-gradient(90deg,#19202b 23%,#f1f3f7 23%);padding:7px 7px 7px 21px;display:grid;gap:4px}
.theme-tile:before,.theme-tile:after{content:"";background:white;border-radius:2px;box-shadow:0 1px 2px #0001}
.theme-tile.dark{background:linear-gradient(90deg,#080c13 23%,#202735 23%);border-color:#455064}.theme-tile.dark:before,.theme-tile.dark:after{background:#394356}
.theme-tile.system{background:linear-gradient(90deg,#19202b 23%,#f1f3f7 23%,#f1f3f7 61%,#202735 61%)}
.accent-choices{display:grid;grid-template-columns:repeat(3,1fr);gap:9px}
.accent-choice{background:var(--surface);color:var(--ink);border:1px solid var(--line);border-radius:11px;min-height:68px;padding:10px 5px;display:grid;justify-items:center;gap:8px;font-size:11px;font-weight:650}
.accent-dot{display:block;width:24px;height:24px;border-radius:50%;background:var(--swatch);box-shadow:inset 0 0 0 1px #0001}
.accent-dot.red{--swatch:#e3132f}.accent-dot.blue{--swatch:#2563eb}.accent-dot.green{--swatch:#087f5b}.accent-dot.purple{--swatch:#7c3aed}.accent-dot.amber{--swatch:#9a5b00}.accent-dot.graphite{--swatch:#475569}
.settings-toggle{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:15px 0;border-block:1px solid var(--line);font-size:13px;cursor:pointer}
.settings-toggle strong{display:block}.settings-toggle small{display:block;color:var(--muted);font-size:11px;line-height:1.6;margin-top:5px;font-weight:400}.settings-toggle input{width:20px;height:20px;flex-shrink:0;accent-color:var(--accent)}
.settings-preview{align-self:start;background:var(--surface-soft);border:1px solid var(--line);border-radius:17px;padding:20px;position:sticky;top:0}
.settings-preview>p{font-size:10px;letter-spacing:.12em;font-weight:800;color:var(--muted);margin:0 0 17px}
.settings-miniapp{background:var(--surface);border:1px solid var(--line);border-radius:13px;overflow:hidden;box-shadow:0 7px 22px #10141c08}
.settings-minihead{background:#10141c;color:white;padding:13px;display:flex;gap:9px;align-items:center;font-size:10px;font-weight:700}
.settings-minihead img{border-radius:5px;width:26px;height:26px}.settings-miniapp>div:last-child{padding:15px}
.settings-miniapp h4{font-size:16px;margin:0 0 6px}.settings-miniapp small{color:var(--muted);font-size:10px}
.settings-miniline{height:7px;width:90%;background:var(--surface-soft);border-radius:8px;margin-top:13px}.settings-miniline.short{width:62%;margin-top:7px}
.settings-minibutton{display:block;background:var(--accent);color:#fff;padding:11px 5px;margin-top:18px;text-align:center;border-radius:7px;font-size:10px;font-weight:750}
.settings-preview>strong{display:block;font-size:12px;margin-top:17px}.settings-preview>small{display:block;font-size:11px;color:var(--muted);line-height:1.6;margin-top:6px}
.settings-footer{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-top:23px;border-top:1px solid var(--line);padding-top:18px}.settings-footer .button{font-size:11px;min-height:44px}.settings-save-status{font-size:11px;color:var(--muted);line-height:1.5;margin:0}
.settings-device{display:flex;align-items:center;gap:10px;padding:12px 14px;background:var(--accent-soft);color:var(--accent-ink);font-size:12px;line-height:1.6;border-radius:10px;margin:0 0 18px}.settings-device:before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor;flex-shrink:0}
.settings-install-cards{display:grid;gap:11px}
.settings-install-card{border:1px solid var(--line);border-radius:14px;padding:18px;display:grid;grid-template-columns:44px 1fr auto;gap:15px;align-items:center}
.settings-device-icon{width:44px;height:44px;display:grid;place-items:center;background:var(--surface-soft);border-radius:12px;color:var(--ink)}.settings-device-icon svg{width:23px;height:23px}
.settings-install-card h4{margin:0 0 5px;font-size:14px}.settings-install-card p{font-size:11px;color:var(--muted);line-height:1.6;margin:0;max-width:390px}.settings-install-card .button{min-height:44px;font-size:12px}
.settings-install-note{font-size:11px;line-height:1.7;color:var(--muted);margin:20px 0 0}
.settings-dialog button:focus-visible,.settings-dialog a:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
:root[data-reduced-motion=true] *, :root[data-reduced-motion=true] *:before, :root[data-reduced-motion=true] *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}
@media(max-width:650px){.settings-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:18px}.settings-head{padding:19px 18px;padding-top:max(19px,env(safe-area-inset-top))}.settings-head h2{font-size:22px}.settings-body{padding:18px}.settings-layout{grid-template-columns:1fr;gap:0}.settings-preview{display:none}.settings-tabs{margin-bottom:22px}.settings-install-card{grid-template-columns:38px 1fr;gap:12px;padding:16px}.settings-device-icon{width:38px;height:38px}.settings-install-card .button{grid-column:1/-1}.settings-footer{align-items:flex-start;flex-direction:column;gap:9px}.settings-footer .button{width:100%}}

/* Shared dark surfaces for the existing staff screens. Product images, camera
   feeds, maps, PDFs and semantic status badges are intentionally not recoloured. */
:root[data-theme=dark]{color-scheme:dark;--ink:#edf1f7;--muted:#aeb8c7;--line:#354052;--paper:#192130;--canvas:#10151f;--surface:#192130;--surface-soft:#222d3e;--accent-ink:var(--accent-dark-ink);--accent-soft:#273247;--shadow:0 20px 55px #0004;color:var(--ink);background:var(--canvas)}
:root[data-theme=dark] body{background:var(--canvas);color:var(--ink)}
:root[data-theme=dark] :is(.panel,.dialog,.job-card,.repair-card,.user-row,.hours-stat,.payroll-row,.active-clock-row,.location-row,.schedule-day,.request-card,.invoice-row,.accounting-stat,.empty,.install-dialog,.invoice-viewer-head,.customer-result,.login-card,.settings-dialog){background:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] :is(input,select,textarea,.icon-button,.close-button,.mini-button,.button.secondary,.quote-line-edit button,.quantity-controls button,.install-platforms button,.route-controls select,.route-controls input){background:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] :is(.button.ghost,.detail-box,.job-meta span,.role,.time-row,.hours-row,.team-head,.repair-bike span,.repair-problem,.repair-confirmation-box,.manual-invoice-line,.invoice-import-status,.invoice-mode-card,.invoice-line.header,.quote-picker,.receipt-original,.receipt-totals,.receipt-reviewed,.admin-note,.invoice-pdf-tools,.app-install-login,.install-browser-note,.customer-results,.cart-empty,.order-payment-note){background:var(--surface-soft);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] :is(.repair-summary article,.schedule-summary article,.request-summary article){background:var(--surface);border-color:var(--line)}
:root[data-theme=dark] .topbar{background:#10151fe8}
:root[data-theme=dark] .sidebar,:root[data-theme=dark] .mobile-nav{background:#0b1019}
:root[data-theme=dark] :is(.invoice-form h3,.invoice-form label,.invoice-lines,.repair-intro,.order-intro,.order-section,.order-cart,.order-step-title,.manual-invoice-line label){color:var(--ink)}
:root[data-theme=dark] .install-steps li{color:var(--muted)}
:root[data-theme=dark] .install-steps li:before{background:var(--surface-soft)}
:root[data-theme=dark] .install-platforms button[aria-pressed=true]{background:var(--accent-soft);color:var(--accent-ink);border-color:var(--accent)}
:root[data-theme=dark] #order-page .product-search input{background:var(--surface-soft);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] #order-page .product-shortcuts button{background:var(--surface-soft);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] .order-steps button{background:var(--surface);color:var(--muted);border-color:var(--line)}
:root[data-theme=dark] .order-steps button>span{background:var(--surface-soft)}
:root[data-theme=dark] .order-steps button[aria-current=step]{border-color:var(--accent);color:var(--accent-ink)}
:root[data-theme=dark] .receipt-dialog .dialog-actions{background:var(--surface)}
:root[data-theme=dark] .repair-card-head small,:root[data-theme=dark] .order-empty strong{color:var(--ink)}
:root[data-theme=dark] :is(.repair-card-head strong,.repair-mail-status,.repair-summary article small,.planning-date,.repair-confirmation-box p){color:var(--muted)}
:root[data-theme=dark] .repair-tabs{background:var(--surface-soft)}
:root[data-theme=dark] .repair-tabs button{color:var(--muted)}
:root[data-theme=dark] .repair-tabs button[aria-pressed=true]{background:var(--surface);color:var(--ink)}
:root[data-theme=dark] .shift-card,:root[data-theme=dark] .schedule-day>header strong{background:var(--surface-soft);color:var(--ink)}
:root[data-theme=dark] .shift-card small{color:var(--muted)}
:root[data-theme=dark] .active-clock-row>b{color:#80dfba}
:root[data-theme=dark] .login-card .brand-emblem{background-image:url('/logo-dark-transparent.png')}
:root[data-theme=dark] #workspace-chooser,:root[data-theme=dark] #transport-app{background:var(--canvas);color:var(--ink)}
:root[data-theme=dark] :is(.workspace-choice,.transport-topbar,.transport-stats>div,.transport-booking,.transport-month-days button,.transport-team,.transport-dialog){background:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] :is(.transport-day,.transport-close,.transport-status,.transport-block){background:var(--surface-soft);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] :is(.transport-stats small,.transport-booking>span:not(.transport-booking-time),.transport-booking small,.transport-day-empty,.transport-month-days button span,.transport-team small,.transport-details dt,.transport-customer-link p){color:var(--muted)}
:root[data-theme=dark] .transport-edit :is(input,select,textarea){background:var(--surface);color:var(--ink);border-color:var(--line)}
:root[data-theme=dark] .transport-day.today,:root[data-theme=dark] .transport-month-days button[aria-current=date]{background:var(--surface-soft);border-color:var(--accent)}
