:root{--ink:#182b3b;--muted:#71808f;--line:#e3e9ee;--nav:#142937;--accent:#087f79;--bg:#f4f7f9}*{box-sizing:border-box}body{margin:0;font:14px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--ink);background:var(--bg)}a{color:var(--accent);text-decoration:none}a:hover{text-decoration:underline}aside{position:fixed;inset:0 auto 0 0;width:238px;background:var(--nav);color:#fff;padding:30px 18px;overflow:auto;display:flex;flex-direction:column}.brand{color:#fff;font-size:23px;font-weight:750;display:block;line-height:1.2;margin:0 8px 35px}.brand:hover{text-decoration:none}.brand-icon{display:inline-grid;place-items:center;width:36px;height:36px;background:#24b6a4;color:#092f34;border-radius:10px;margin-right:7px;font-weight:850}.brand-sub{display:block;font-size:9px;letter-spacing:4px;margin-left:49px;color:#89a5b5}.nav-label{font-size:9px;letter-spacing:1.6px;color:#7d99a9;margin:20px 12px 10px}nav a{display:block;padding:10px 14px;border-radius:7px;color:#c3d0d9;margin:3px 0;font-weight:500}nav a.active,nav a:hover{background:#244352;color:white;text-decoration:none}.sidebar-bottom{margin-top:auto;padding:30px 14px 0}.sidebar-bottom small{color:#8fa5b5}small{display:block;color:var(--muted);font-size:12px}main{margin-left:238px;padding:30px 38px;max-width:1800px}header{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid var(--line);padding-bottom:24px;margin-bottom:25px}.eyebrow{font-size:10px;letter-spacing:1.5px;font-weight:700;color:var(--muted);text-transform:uppercase}h1{font-size:28px;letter-spacing:-.8px;margin:4px 0 0;font-weight:700}h2{font-size:18px;letter-spacing:-.3px;margin:0 0 12px}h3{font-size:14px;margin-top:24px}.date,.muted,.hint{color:var(--muted)}.hint{font-size:12px}.toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:22px}.toolbar h2{font-size:24px;margin:5px 0 9px}.button,button{display:inline-block;border:0;border-radius:7px;padding:11px 17px;background:var(--accent);color:white;font:600 13px/1.4 inherit;font-family:inherit;font-size:13px;font-weight:600;cursor:pointer;white-space:nowrap}.button:hover,button:hover{filter:brightness(.96);text-decoration:none}.secondary{background:#fff;border:1px solid #d5dfe5;color:var(--ink)}.danger{background:#fff2ef;color:#ac493e;padding:7px 10px}.link{background:transparent;padding:8px 0;color:#c6d4db}.inline{display:inline}.actions,.form-actions{display:flex;flex-wrap:wrap;gap:10px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:18px;margin-bottom:25px}.stat,.card{background:#fff;border:1px solid var(--line);border-radius:11px;box-shadow:0 2px 3px #14293703}.stat{padding:21px 24px}.stat>span{font-size:12px;color:var(--muted)}.stat strong{display:block;font-size:32px;letter-spacing:-1px;margin:5px 0}.stat small{font-size:11px}.card{padding:23px;margin-bottom:23px;min-width:0}.section-head{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:15px}.section-head h2{margin:0}.section-head a{font-size:12px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:23px}.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left;white-space:normal}th{font-size:10px;letter-spacing:.8px;text-transform:uppercase;font-weight:650;color:var(--muted);background:#f8fafb;padding:12px 10px;border-bottom:1px solid var(--line);white-space:nowrap}td{padding:16px 10px;border-bottom:1px solid #edf1f4;vertical-align:middle;font-size:13px}td small{margin-top:4px}tr:last-child td{border-bottom:0}td>a{font-weight:650}.reg{display:inline-block;background:#fff6cb;border:1px solid #eadfae;border-radius:4px;color:#293443;font-size:12px;font-weight:750;letter-spacing:.8px;padding:3px 8px;white-space:nowrap}.badge{display:inline-block;padding:4px 9px;border-radius:5px;background:#edf1f4;color:#657785;font-size:10px;font-weight:650;white-space:nowrap}.booked{background:#eaf1ff;color:#4f6ca4}.in-progress{background:#e4f5f5;color:#137c7a}.awaiting-parts{background:#fff3db;color:#9b721a}.ready,.completed{background:#e7f4ed;color:#3c835c}.cancelled{background:#fcebea;color:#a85b54}.filters{display:flex;gap:15px;align-items:end;margin:15px 0 24px;flex-wrap:wrap}.filters label{flex:1;min-width:160px}.filters button{height:43px}.filters>a{align-self:center}label{display:flex;flex-direction:column;gap:7px;font-size:12px;font-weight:600;color:#526473}input,select,textarea{font:14px/1.5 inherit;font-family:inherit;font-size:14px;background:#fff;border:1px solid #d5dfe5;border-radius:6px;padding:10px 12px;color:var(--ink);width:100%;min-width:0}input:focus,select:focus,textarea:focus{outline:2px solid #0e968e44;border-color:var(--accent)}textarea{resize:vertical}.grid-form{display:grid;grid-template-columns:1fr 1fr;gap:20px}.wide{grid-column:1/-1}.form-card{max-width:1000px}.check{flex-direction:row;align-items:center;font-weight:500;gap:9px;min-height:43px}.check input{width:16px;height:16px;accent-color:var(--accent)}.detail-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:18px}.detail-grid p{margin:5px 0}.preserve{white-space:pre-wrap;overflow-wrap:anywhere}.list-row{display:flex;justify-content:space-between;align-items:center;gap:15px;padding:13px 0;border-bottom:1px solid var(--line)}.quick-links{display:grid;gap:14px;padding:10px 0}.totals{display:flex;justify-content:flex-end;gap:28px;flex-wrap:wrap;padding-top:20px;margin-top:10px;border-top:1px solid var(--line)}.totals span{display:block;color:var(--muted);font-size:11px}.totals strong{font-size:18px}.grand strong{color:var(--accent)}.notice,.error{padding:14px 18px;border-radius:7px;margin:0 0 20px}.notice{background:#e0f2e8;color:#276c47}.error{background:#ffebe7;color:#a14439}.empty{text-align:center;padding:40px;color:var(--muted)}.pagination{display:flex;justify-content:space-between;font-size:12px;margin-top:20px}footer{font-size:11px;color:#9aa7b2;padding:20px 0}.auth-main{margin:40px auto;max-width:560px}.auth-card{padding:32px}.auth-card form{display:grid;gap:19px;margin-top:25px}.auth-card h2{font-size:24px;margin-top:25px}.auth-main header .date{display:none}.print-body{background:#e8edf0}.paper{background:white;max-width:850px;margin:20px auto;padding:55px;box-shadow:0 5px 20px #0001}.print-tools{max-width:850px;margin:25px auto;display:flex;gap:12px}.invoice-head{display:flex;justify-content:space-between;border-bottom:2px solid var(--ink);padding-bottom:20px;margin-bottom:25px}.invoice-head h1{font-size:24px}.invoice-totals{margin-left:auto;width:290px;text-align:right;padding:20px 0}.invoice-totals p{display:flex;justify-content:space-between}.invoice-footer{border-top:1px solid var(--line);padding-top:20px}.work-notes>div{height:180px;background:repeating-linear-gradient(white,white 29px,#ddd 30px)}@media(max-width:1100px){aside{width:200px}main{margin-left:200px;padding:24px}.stats{grid-template-columns:repeat(2,1fr)}.two-col{grid-template-columns:1fr}.date{display:none}}@media(max-width:720px){aside{position:static;width:100%;padding:15px}.brand{margin:0 0 14px}.brand-sub,.nav-label,.sidebar-bottom{display:none}nav{display:flex;overflow:auto;gap:5px}nav a{white-space:nowrap;padding:7px 10px;font-size:12px}main{margin-left:0;padding:18px}h1{font-size:25px}.toolbar{align-items:start;flex-direction:column}.grid-form{grid-template-columns:1fr}.wide{grid-column:auto}.card{padding:17px}.stat{padding:16px}.stat strong{font-size:27px}.stats{gap:10px}.paper{padding:22px;margin:0}.print-tools{margin:18px}.invoice-head{gap:15px}.invoice-head h1{font-size:19px}.totals{gap:18px}.auth-main{margin:0 auto}}
@media print{@page{size:A4;margin:12mm}.print-body{background:white}.paper{padding:0;margin:0;box-shadow:none;max-width:none}.print-tools{display:none}.paper table{font-size:11px}.paper th,.paper td{padding:8px}.paper .two-col{display:grid;grid-template-columns:1fr 1fr}a{color:inherit}.invoice-head{break-inside:avoid}tr,.invoice-totals,.invoice-footer{break-inside:avoid}thead{display:table-header-group}body{print-color-adjust:exact;-webkit-print-color-adjust:exact}}

.job-status-actions{flex-wrap:wrap;gap:8px}.job-status-actions button{white-space:nowrap;min-height:42px}.complete-job{background:#167448}.complete-job:hover{background:#105a37}

[hidden]{display:none!important}.inline-create{border:1px solid var(--border,#dce2eb);border-radius:12px;padding:20px;margin:0}.inline-create legend{font-weight:700;padding:0 8px}.company-logo{display:block;max-width:240px;max-height:110px;object-fit:contain;object-position:left center;margin:0 0 16px}.logo-settings input[type=file]{max-width:100%}

.inline-create{min-width:0}.inline-create .grid-form>*{min-width:0}

.invoice-head>div{min-width:0}.company-logo{max-width:220px;max-height:90px;flex-shrink:0}.archive-data{max-width:480px;overflow-wrap:anywhere;font-family:monospace;font-size:10px}@media print{.paper .company-logo{max-width:220px;max-height:90px;object-fit:contain;break-inside:avoid}}

.record-dialog{width:min(680px,calc(100% - 24px));max-height:90vh;overflow:auto;border:1px solid var(--line);border-radius:14px;padding:24px;color:var(--ink);background:#fff;box-shadow:0 20px 80px #0003}.record-dialog::backdrop{background:#10202c99}.record-dialog .grid-form>*{min-width:0}.record-dialog h2{margin:0}.record-dialog button:disabled{opacity:.6;cursor:wait}body:has(dialog[open]){overflow:hidden}

.customer-picker{display:flex;flex-direction:column;gap:9px;min-width:0}.customer-search-results:empty{display:none}.customer-search-results{font-size:11px;font-weight:400}

.record-actions-heading{text-align:right}.record-actions-cell{width:1%;white-space:nowrap}.record-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:nowrap}.record-actions .button{display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:8px 12px;line-height:18px;font-size:12px;font-weight:600;box-sizing:border-box}.record-actions .secondary{padding:7px 11px}

.customer-picker{position:relative;gap:0}.customer-picker>.customer-search-results{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.customer-options{position:absolute;z-index:30;left:0;right:0;top:100%;max-height:250px;overflow-y:auto;margin-top:5px;background:white;border:1px solid #cbd7df;border-radius:8px;box-shadow:0 10px 25px #14293725;padding:5px}.customer-options button{display:block;width:100%;text-align:left;white-space:normal;background:white;color:var(--ink);border-radius:5px;font-weight:400;padding:10px 12px}.customer-options button:hover,.customer-options button[aria-selected=true]{background:#e4f5f5;color:#087f79}.customer-options p{margin:10px;color:var(--muted);font-size:12px}.customer-picker input{width:100%}select{min-height:43px;padding:10px 12px;font-family:inherit;font-size:14px;line-height:1.4}

.invoice-job{margin-top:28px;padding-top:20px;border-top:1px solid var(--line)}.invoice-job .section-head{break-after:avoid}.job-subtotal{text-align:right}.invoice-job tr{break-inside:avoid}

/* ATC branding and persisted colour themes. Printed documents use light variables. */
:root{color-scheme:dark;--ink:#e6ebf2;--muted:#a0adbd;--line:#303b4b;--nav:#11151d;--accent:#ff7a82;--primary:#c92330;--bg:#141a23;--surface:#1d2633;--surface-alt:#222e3e;--input:#151e2b;--field-border:#526782;--shadow:#0003;--hover:#35222f;--success-bg:#183a2b;--success-ink:#a1e0bd;--warning-bg:#43341c;--warning-ink:#f4d28d;--error-bg:#47232b;--error-ink:#ffb6bc;--info-bg:#233754;--info-ink:#b0d0ff}
:root[data-theme=light]{color-scheme:light;--ink:#202c3a;--muted:#627286;--line:#dce3ec;--nav:#11151d;--accent:#bb1c2b;--primary:#c92330;--bg:#f3f5f8;--surface:#fff;--surface-alt:#f7f9fc;--input:#fff;--field-border:#cbd5e1;--shadow:#172c4308;--hover:#fff0f2;--success-bg:#e6f4eb;--success-ink:#236344;--warning-bg:#fff2da;--warning-ink:#805b15;--error-bg:#ffeaec;--error-ink:#a12635;--info-bg:#eaf1ff;--info-ink:#385c95}
body{background:var(--bg);color:var(--ink)}a{color:var(--accent)}.card,.stat,.auth-card,.record-dialog{background:var(--surface);border-color:var(--line);color:var(--ink);box-shadow:0 2px 4px var(--shadow)}.auth-card{border:1px solid var(--line);border-radius:14px}.button,button{background:var(--primary);color:#fff}.secondary{background:var(--surface);color:var(--ink);border-color:var(--field-border)}.danger{background:var(--error-bg);color:var(--error-ink)}.link{background:transparent;color:#c6d4e2}input,select,textarea{background:var(--input);border-color:var(--field-border);color:var(--ink)}input::placeholder,textarea::placeholder{color:var(--muted);opacity:.8}input:focus,select:focus,textarea:focus{border-color:var(--accent);outline-color:#ef202b44}.check input{accent-color:var(--primary)}th{background:var(--surface-alt);color:var(--muted);border-color:var(--line)}td,.list-row,.inline-create{border-color:var(--line)}.badge{background:var(--surface-alt);color:var(--muted)}.booked{background:var(--info-bg);color:var(--info-ink)}.in-progress{background:var(--info-bg);color:var(--info-ink)}.awaiting-parts{background:var(--warning-bg);color:var(--warning-ink)}.ready,.completed,.notice{background:var(--success-bg);color:var(--success-ink)}.cancelled,.error{background:var(--error-bg);color:var(--error-ink)}.complete-job{background:#167448;color:#fff}.complete-job:hover{background:#105a37}.reg{background:#fff0b6;color:#2a2f37;border-color:#dcc66d}.customer-options{background:var(--surface);border-color:var(--field-border);box-shadow:0 10px 25px var(--shadow)}.customer-options button{background:var(--surface);color:var(--ink)}.customer-options button:hover,.customer-options button[aria-selected=true]{background:var(--hover);color:var(--accent)}.customer-options p{color:var(--muted)}.record-dialog::backdrop{background:#070c14ba}footer{color:var(--muted)}.grand strong{color:var(--accent)}.header-tools{display:flex;align-items:center;gap:18px}.theme-toggle{min-height:38px;padding:8px 12px;white-space:nowrap}.site-logo{display:block;width:180px;height:auto;max-width:100%}.logo-light{display:none}:root[data-theme=light] .logo-dark{display:none}:root[data-theme=light] .logo-light{display:block}aside .logo-dark,:root[data-theme=light] aside .logo-dark{display:block}aside .logo-light,:root[data-theme=light] aside .logo-light{display:none}.brand{margin:0 8px 24px}.brand .site-logo{width:180px}.auth-brand .site-logo{width:220px}.auth-brand{margin-bottom:18px}nav a{color:#c3d0df}nav a.active,nav a:hover{background:#3b202b;color:#fff}.nav-label{color:#9aa7b9}.sidebar-bottom small{color:#a1adbe}.print-body{background:#e8edf0}.paper{background:#fff;color:#202c3a}.print-body .reg{background:#fff0b6;color:#2a2f37}
@media(max-width:720px){.brand .site-logo{width:125px}.brand{margin:0 0 15px}.header-tools{gap:8px}.theme-toggle{font-size:12px;padding:8px 10px}header{gap:12px;align-items:flex-start}.auth-main header{align-items:center}.auth-brand .site-logo{width:185px}}
@media print{.theme-toggle{display:none}.print-body,.paper{background:#fff;color:#202c3a}}

.brand-row{display:flex;align-items:center;justify-content:space-between;gap:12px}.mobile-menu-toggle{display:none}.job-row-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px}.job-row-actions .job-status-actions{margin:0}.table-wrap{max-width:100%;-webkit-overflow-scrolling:touch}header>div:first-child{min-width:0}main{min-width:0}.record-dialog form{margin:0}
@media screen and (max-width:720px){
 html{scroll-padding-top:16px}body{overflow-wrap:anywhere}aside{padding:12px max(16px,env(safe-area-inset-right)) 12px max(16px,env(safe-area-inset-left));padding-top:max(12px,env(safe-area-inset-top))}.brand-row .brand{margin:0}.brand-row .site-logo{width:108px}.mobile-menu-toggle{display:block;min-height:44px;border:1px solid #526782;background:#202a38;color:#fff;padding:10px 16px}aside nav{display:none}aside[data-mobile-open] nav{display:grid;grid-template-columns:1fr 1fr;gap:5px;margin-top:14px;overflow:visible}aside nav a{white-space:normal;min-height:44px;display:flex;align-items:center;padding:10px 12px}aside .sidebar-bottom{display:none}aside[data-mobile-open] .sidebar-bottom{display:block;padding:16px 12px 0}.sidebar-bottom .link{min-height:44px}main{padding:20px max(16px,env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}header{margin-bottom:20px;padding-bottom:18px}h1{font-size:24px;line-height:1.2}h2{line-height:1.3}.header-tools{flex-shrink:0}.theme-toggle{min-height:44px}.card,.auth-card{padding:17px}.auth-main{padding-top:max(18px,env(safe-area-inset-top))}.grid-form{gap:17px}.grid-form>*{min-width:0}input,select,textarea{font-size:16px;min-height:44px}textarea{min-height:100px}.button,button{min-height:44px;padding:11px 14px;font-size:14px}.record-actions .button{min-height:44px}.actions,.form-actions{gap:8px}.form-actions .button,.form-actions button{flex:1;text-align:center}.filters{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;align-items:stretch}.filters label{min-width:0}.filters button{height:auto;min-height:44px}.check input{min-height:20px;height:20px;width:20px;flex-shrink:0}.toolbar{gap:12px}.toolbar>.button{width:100%;text-align:center}.section-head{align-items:flex-start;flex-wrap:wrap}.stats{gap:12px}.stat{padding:15px}.stat strong{font-size:25px}.two-col{gap:0}.detail-grid{grid-template-columns:minmax(0,1fr)}.totals{gap:18px;justify-content:space-between}.totals>div{flex:1 0 40%}.totals strong{font-size:17px}.record-dialog{width:calc(100% - 20px);padding:18px;max-height:88vh;max-height:calc(100dvh - 32px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}.customer-options{max-height:220px}.customer-options button{font-size:16px;min-height:46px}.jobs-table-wrap{overflow:visible}.jobs-table{display:block}.jobs-table thead{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}.jobs-table tbody{display:grid;gap:14px}.jobs-table tr{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);border:1px solid var(--line);border-radius:10px;padding:12px;background:var(--surface-alt);gap:12px}.jobs-table td{display:block;border:0;padding:0;min-width:0;font-size:14px}.jobs-table td::before{content:attr(data-label);display:block;color:var(--muted);font-size:10px;letter-spacing:.7px;text-transform:uppercase;margin-bottom:5px}.jobs-table td:first-child{grid-column:1/-1;padding-bottom:10px;border-bottom:1px solid var(--line)}.jobs-table td:first-child>a{font-size:17px}.jobs-table td:last-child{grid-column:1/-1}.jobs-table .empty{grid-column:1/-1;padding:16px!important}.jobs-table .empty::before{display:none}.job-row-actions{align-items:stretch}.job-row-actions>.button,.job-row-actions>button{flex:1}.job-status-actions{flex:2}.job-status-actions .inline{display:flex;flex:1}.job-status-actions button{width:100%}.customer-picker{align-self:start}
}

.notification-count{display:inline-flex;min-width:1.4rem;justify-content:center;padding:.05rem .35rem;border-radius:999px;background:var(--accent,#f59e0b);color:#111;font-weight:800}.notification-count[hidden]{display:none}.part-request-row{padding:1rem 0;border-bottom:1px solid var(--border,#555)}.part-request-row p{overflow-wrap:anywhere}.part-request-row form{margin-top:.6rem}.request-part-details{margin-top:1rem}.request-part-details summary{cursor:pointer;display:inline-block}.request-part-details[open] summary{margin-bottom:1rem}.parts-notification{white-space:nowrap}@media(max-width:600px){.parts-notification{font-size:.8rem;padding:.45rem}.request-part-details .grid-form{grid-template-columns:1fr}}

.diary-card{padding:20px}.diary-navigation{justify-content:flex-start;gap:14px}.diary-navigation h2{flex:1;margin:0}.diary-scroll{overflow-x:auto}.diary-grid{display:grid;grid-template-columns:repeat(7,minmax(130px,1fr));min-width:910px;gap:1px;background:var(--border,#39414d);border:1px solid var(--border,#39414d);border-radius:12px;overflow:hidden}.diary-weekday{padding:12px;background:var(--surface,#19212d);text-align:center;font-weight:700}.diary-day{min-height:175px;padding:8px;background:var(--bg,#141a23)}.outside-month{opacity:.55}.is-selected{box-shadow:inset 0 0 0 2px #5e9dff}.diary-date{display:flex;justify-content:space-between;align-items:center;padding:3px 2px 10px}.diary-date strong{display:grid;place-items:center;width:29px;height:29px}.is-today .diary-date strong{background:#3275de;color:white;border-radius:50%}.diary-job{display:block;border-left:3px solid #659bf7;border-radius:5px;background:#3877d51c;padding:7px;margin:4px 0;color:inherit;font-size:12px}.diary-job span,.diary-job small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.diary-job.awaiting-parts{border-color:#efba53}.diary-job.in-progress{border-color:#a98aff}.diary-job.completed,.diary-job.ready{border-color:#4ac694}.diary-job.cancelled{border-color:#dc7373;opacity:.65}[data-theme=light] .diary-day{background:#fff}[data-theme=light] .diary-weekday{background:#eef2f8}@media(max-width:700px){.diary-card{padding:12px}.diary-navigation{gap:8px}.diary-navigation h2{font-size:18px}.diary-day{min-height:150px}.diary-scroll{margin:0 -4px}}

/* Keep each request and its controls inside one visible card. */
.part-request-row{background:var(--surface-alt);border:1px solid var(--line);border-radius:14px;padding:18px;margin:14px 0}.part-request-row .section-head{align-items:flex-start}.part-request-row p{margin:10px 0}.part-request-row form{margin-top:14px}.request-part-details{padding-top:10px}.request-part-details>summary{margin-bottom:8px}

.vehicle-photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px;margin:18px 0}.vehicle-photo-card{background:var(--surface-alt);border:1px solid var(--line);border-radius:12px;overflow:hidden}.vehicle-photo-card img{display:block;width:100%;height:200px;object-fit:cover}.vehicle-photo-card>div{padding:15px}.vehicle-photo-card .actions{margin-top:12px}.vehicle-photo-card p:empty{display:none}#vehicle-photos details form{margin-top:18px}

/* Clear printed invoice groups and compact business address. */
.paper .invoice-head p{margin:5px 0;line-height:1.25}.paper .invoice-head .preserve{white-space:pre-line}
.paper .invoice-job{border:1px solid #ccd2d8;border-radius:10px;padding:18px;margin:20px 0;background:#fff;box-decoration-break:clone;-webkit-box-decoration-break:clone}
.paper .invoice-job>.section-head{padding-bottom:10px;border-bottom:1px solid #e3e9ee;margin-bottom:10px}.paper .invoice-job h3{margin:16px 0 6px}.paper .invoice-job p{margin:6px 0}.paper .invoice-job .job-subtotal{padding-top:10px;border-top:1px solid #e3e9ee;font-weight:700}
@media print{.paper .invoice-job{break-inside:avoid-page;padding:12px;margin:14px 0}.paper .invoice-job h3{break-after:avoid}.paper .invoice-job table{width:100%}}

.job-quick-filters{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:0 0 16px}.job-status-chips{display:flex;flex-wrap:wrap;gap:8px}.job-status-chips .button{border-radius:20px;padding:8px 14px}.job-quick-filters .check{margin-left:auto}.job-quick-filters small{width:100%}@media(max-width:720px){.job-quick-filters .check{margin-left:0}}

.job-quick-filters{gap:18px!important}.job-status-chips{display:flex!important;flex-wrap:wrap!important;gap:12px!important}.job-status-chips>.button{margin:0!important;min-height:42px}.job-visibility-form{display:flex;align-items:center;gap:12px;margin-left:auto}.job-visibility-form .check{margin:0}.job-visibility-form button{padding:8px 12px}@media(max-width:720px){.job-visibility-form{margin-left:0;width:100%}}

/* Customer messages must fit the content column, including long links and provider diagnostics. */
.sms-history-table{table-layout:fixed;width:100%}.sms-history-table th,.sms-history-table td{overflow-wrap:anywhere;word-break:break-word;white-space:normal;min-width:0}.sms-history-table td button{max-width:100%;white-space:normal}.sms-history-table th:nth-child(3){width:32%}.sms-history-table th:nth-child(4){width:27%}
.extra-work-editor{border:1px solid var(--line);border-radius:12px;padding:16px;min-width:0}.extra-work-editor legend{font-weight:700;padding:0 8px}.extra-item-row{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);gap:12px;margin-bottom:14px}.extra-work-editor details{margin-top:10px}.extra-work-editor summary{cursor:pointer;color:var(--accent);padding:10px 0}.extra-work-group{border:1px solid var(--line);border-radius:12px;padding:15px;margin:14px 0;overflow-wrap:anywhere}.extra-work-group h3{margin:0 0 12px}.extra-work-line{border-top:1px solid var(--line);padding:10px 0}.extra-work-line p{display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px}
@media(max-width:1100px){.sms-history-table,.sms-history-table tbody{display:block;width:100%}.sms-history-table thead{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}.sms-history-table tr{display:grid;grid-template-columns:minmax(0,1fr);gap:12px;border:1px solid var(--line);border-radius:12px;padding:16px;margin-bottom:14px}.sms-history-table td{display:block;padding:0;border:0}.sms-history-table td::before{content:attr(data-label);display:block;font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;margin-bottom:5px}.sms-history-table td:empty{display:none}.extra-item-row{grid-template-columns:minmax(0,1fr)}}

/* Invoice-style live job rows */
.live-line-editor:not([data-ready]){display:none}
.live-line-row{display:block;border:1px solid var(--line);background:var(--surface-alt);padding:16px;border-radius:12px;margin:12px 0}
.live-line-main{display:grid;grid-template-columns:130px minmax(180px,1fr) 100px 130px 85px 130px auto;gap:12px;align-items:end}
.live-line-editor[data-vat="0"] .live-line-main{grid-template-columns:130px minmax(180px,1fr) 100px 130px 130px auto}
.live-line-field{min-width:0;color:var(--muted);font-size:12px;font-weight:600;gap:6px}
.live-line-row input,.live-line-row select{display:block;width:100%;min-width:0;height:42px;min-height:42px;padding:9px 11px;font-size:14px;line-height:22px;border-radius:7px;box-sizing:border-box}
.live-line-row select{appearance:none;-webkit-appearance:none;padding-right:30px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2396a6b9' stroke-width='1.5'/%3E%3C/svg%3E");background-position:right 9px center;background-repeat:no-repeat}
.live-line-row input[type=checkbox]{width:20px;height:20px;min-height:20px}
.live-line-preview{display:flex;align-items:center;justify-content:flex-end;min-height:42px;font-size:14px;white-space:nowrap;padding:0}
.live-line-main>.actions{display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-end;gap:8px}
.live-line-main>.actions button{height:42px;padding:9px 12px;font-size:12px;line-height:22px;white-space:nowrap}
.live-line-row details{margin:10px 0 0}.live-line-row summary{cursor:pointer;font-size:12px;color:var(--muted);padding:6px 0}
.live-line-extras{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;padding-top:10px}
.live-line-state{font-size:11px;color:var(--muted);overflow-wrap:anywhere;margin:8px 0 0}
.live-line-row input[readonly]{opacity:.7}
@media(max-width:1400px){.live-line-main,.live-line-editor[data-vat="0"] .live-line-main{grid-template-columns:130px minmax(180px,1fr) 100px 130px}.live-line-preview{justify-content:flex-start}.live-line-main>.actions{grid-column:span 2;justify-content:flex-end}}
@media(max-width:850px){.live-line-main,.live-line-editor[data-vat="0"] .live-line-main{grid-template-columns:repeat(2,minmax(0,1fr))}.live-line-main>.live-line-field:nth-child(2){grid-column:auto}.live-line-main>.actions{grid-column:auto}.live-line-extras{grid-template-columns:repeat(2,minmax(0,1fr))}.live-line-main>.actions{flex-wrap:wrap}}
@media(max-width:480px){.live-line-main,.live-line-editor[data-vat="0"] .live-line-main,.live-line-extras{grid-template-columns:minmax(0,1fr)}.live-line-main>.actions{justify-content:flex-start}.live-line-row{padding:12px}.live-line-preview{justify-content:flex-start}}

.approval-withdraw-actions{display:flex;align-items:center;justify-content:flex-start;gap:10px}.approval-withdraw-actions button{width:auto;min-height:42px;align-self:flex-start;white-space:normal;padding:10px 16px}.approval-detail>.actions{margin:18px 0;gap:10px}.approval-detail .extra-work-group{background:var(--surface-alt)}

.extra-item-row>label:first-child{grid-column:1/-1}
/* Website repair quote editor, v1.64 */
[data-web-repair-editor][hidden],[data-legacy-approval-lines][hidden]{display:none!important}
.approval-repair-card{padding:20px;margin:16px 0;border:1px solid var(--line);border-radius:16px;background:var(--surface-alt);min-width:0}
.approval-repair-header,.approval-repair-footer{display:flex;gap:16px;align-items:end;justify-content:space-between;flex-wrap:wrap}
.approval-repair-header label{flex:1;min-width:200px;font-weight:600}
.approval-line{display:grid;grid-template-columns:minmax(120px,1fr) minmax(180px,2fr) minmax(90px,.7fr) minmax(100px,.8fr) minmax(100px,.8fr) auto;gap:12px;align-items:end;padding:18px 0;border-bottom:1px solid var(--line)}
.approval-line label,.approval-repair-header label{display:flex;flex-direction:column;gap:8px;min-width:0}
.approval-line input,.approval-line select,.approval-repair-header input{width:100%;min-width:0;box-sizing:border-box}
.approval-line output{display:block;padding:12px 0;font-weight:700}
.approval-repair-footer{margin-top:18px}.approval-quote-total{font-size:1.15rem;font-weight:700}
@media(max-width:1200px){.approval-line{grid-template-columns:1fr 2fr}.approval-line button{justify-self:start}}
@media(max-width:600px){.approval-repair-card{padding:14px}.approval-line{grid-template-columns:1fr 1fr}.approval-line label:nth-child(2){grid-column:1/-1;grid-row:2}.approval-repair-header{align-items:stretch}.approval-repair-header label{flex-basis:100%}.approval-repair-footer{align-items:start;flex-direction:column}}
/* Customer and vehicle history, v1.65 */
.history-feed{display:grid;gap:16px}.history-event{margin:0;min-width:0;border-left:3px solid var(--accent)}.history-event h2{font-size:16px}.history-event .reg{display:inline-block;margin:0 10px 8px 0}.history-event .actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:18px}.history-event h3{margin-top:16px}.history-excerpt{white-space:pre-wrap;overflow-wrap:anywhere}
/* Booking administration tabs, v1.67 */
.booking-admin-nav{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 24px;padding:8px;border:1px solid var(--line);border-radius:14px;background:var(--surface-alt)}
.booking-admin-tab{display:block;padding:11px 16px;border:1px solid transparent;border-radius:9px;color:var(--muted);font-weight:600;min-height:44px;line-height:22px;text-align:center}
.booking-admin-tab:hover{background:var(--surface);color:var(--ink);text-decoration:none}
.booking-admin-tab[aria-current=page]{background:var(--surface);border-color:var(--line);color:var(--ink);box-shadow:inset 0 -3px 0 var(--accent)}
.booking-admin-tab:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
@media(max-width:650px){.booking-admin-nav{display:grid;grid-template-columns:1fr;margin-bottom:20px}.booking-admin-tab{text-align:left;white-space:normal}}

/* Consistent settings card width and legible field labels. */
.page-settings>.card{width:100%;max-width:none}
.grid-form label,.filters label,.logo-settings label{color:var(--ink);font-weight:500}
.grid-form .hint{font-weight:400}
.profile-link{display:flex;flex-direction:column;gap:4px;color:#f4f7fc;min-height:44px}
.profile-link span{font-size:12px;color:#c5d3e4}
.activity-table{table-layout:fixed;width:100%}.activity-table th:nth-child(1){width:17%}.activity-table th:nth-child(2){width:15%}.activity-table th:nth-child(3){width:17%}.activity-table th:nth-child(4){width:13%}.activity-table td{overflow-wrap:anywhere;vertical-align:top}
.page-audit .pagination{align-items:center;flex-wrap:wrap;gap:12px}

/* Restricted staff rows keep actions separate from quantity / hours at every width. */
.live-line-editor [hidden]{display:none!important}
.live-line-editor[data-pricing-restricted="1"] .live-line-main{grid-template-columns:minmax(110px,.7fr) minmax(0,2fr) minmax(100px,.7fr)}
.live-line-editor[data-pricing-restricted="1"] .live-line-main>.actions{grid-column:1/-1;justify-content:flex-start;flex-wrap:wrap;gap:12px;margin:4px 0 0;padding-top:16px;border-top:1px solid var(--line);min-width:0}
@media(max-width:850px){.live-line-editor[data-pricing-restricted="1"] .live-line-main{grid-template-columns:repeat(2,minmax(0,1fr))}.live-line-editor[data-pricing-restricted="1"] .live-line-main>.live-line-field:nth-child(2){grid-column:1/-1}}
@media(max-width:480px){.live-line-editor[data-pricing-restricted="1"] .live-line-main{grid-template-columns:minmax(0,1fr)}}

/* Inspection checks retain readable labels and distinct result colours. */
.inspection-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr));gap:16px;margin:18px 0}.inspection-grid>.card{margin:0;min-width:0;overflow-wrap:anywhere}.inspection-check{border-top:4px solid var(--line)}.inspection-check h2{font-size:17px;margin:0 0 8px}.inspection-result{font-weight:750}.inspection-pass{border-top-color:#328258}.inspection-advisory{border-top-color:#d99c32}.inspection-urgent{border-top-color:#cf3b48}.inspection-check .actions,.inspection-job-card .actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:16px}.inspection-check-form label{color:var(--ink)}.inspection-job-card p{margin-bottom:18px}.inspection-grid .preserve{white-space:pre-wrap}.inspection-check .eyebrow{color:var(--ink);opacity:.85}

.weekday-choices{border:1px solid var(--line);border-radius:12px;padding:16px;display:flex;flex-wrap:wrap;gap:16px}.weekday-choices legend{font-weight:700;padding:0 8px}.weekday-choices[hidden]{display:none!important}

/* Diary content stays readable; red identifies the appointment time and actions. */
.diary-job,.diary-job:visited,.diary-job b,.diary-job>span{color:var(--ink)}
.diary-job b em{font-style:normal;color:var(--accent,#d12b3c)}
.diary-job small{color:var(--muted)}
.diary-card~.card .jobs-table td:first-child>a{color:var(--ink)}
.catalog-tabs{display:flex;gap:12px;flex-wrap:wrap;margin:0 0 20px}
.catalog-tabs [aria-current="page"]{border-color:var(--accent,#d12b3c)}
[hidden]{display:none!important}

.setup-steps{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 22px}.setup-steps a{margin:0;padding:10px 14px;border:1px solid var(--line);background:var(--bg);color:var(--ink)}.setup-steps a[aria-current="step"]{background:var(--accent);color:#fff}.setup-intro h2{margin-top:8px}.setup-intro .actions{margin-top:16px}.setup-form form{margin-top:16px}

/* Setup actions share one wrapping row, including their POST forms. */
.setup-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:18px}
.setup-actions>.setup-control-compact{display:block;margin:0;padding:0;flex:0 0 auto}
.setup-actions>.setup-control-compact>.wide{margin:0;padding:0}
.setup-actions .button,.setup-actions button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;margin:0;white-space:normal;text-align:center;line-height:1.4}
.setup-steps a[aria-current="step"]{background:var(--primary);color:#fff;border-color:var(--primary)}
@media(max-width:480px){.setup-actions{align-items:stretch}.setup-actions>.button,.setup-actions>.setup-control-compact{flex:1 1 100%}.setup-actions button{width:100%}}
