/* Barlow and Barlow Semi Condensed, latin, served from vendor/fonts (SIL Open Font License, vendor/fonts/OFL.txt). */
@font-face{font-family:'Barlow';font-style:normal;font-weight:400;font-display:swap;src:url('vendor/fonts/barlow-400.woff2') format('woff2')}
@font-face{font-family:'Barlow';font-style:normal;font-weight:500;font-display:swap;src:url('vendor/fonts/barlow-500.woff2') format('woff2')}
@font-face{font-family:'Barlow';font-style:normal;font-weight:600;font-display:swap;src:url('vendor/fonts/barlow-600.woff2') format('woff2')}
@font-face{font-family:'Barlow';font-style:normal;font-weight:700;font-display:swap;src:url('vendor/fonts/barlow-700.woff2') format('woff2')}
@font-face{font-family:'Barlow Semi Condensed';font-style:normal;font-weight:500;font-display:swap;src:url('vendor/fonts/barlow-semi-condensed-500.woff2') format('woff2')}
@font-face{font-family:'Barlow Semi Condensed';font-style:normal;font-weight:600;font-display:swap;src:url('vendor/fonts/barlow-semi-condensed-600.woff2') format('woff2')}
@font-face{font-family:'Barlow Semi Condensed';font-style:normal;font-weight:700;font-display:swap;src:url('vendor/fonts/barlow-semi-condensed-700.woff2') format('woff2')}
/* GarageOS prototype stylesheet. */

:root{
  --bg:#dfe5ed;--surface:#fff;--tint:#eef2f8;--field:#f4f6fa;--ink:#0f1b2d;--ink2:#3c4a5e;--muted:#5e6b7c;--line:#cfd7e2;--soft:#f3f5f8;
  --navy:#16325a;--navy2:#22457a;--navy-ink:#fff;--navy-soft:#dde7f5;
  --amber:#d08a22;--amber-soft:#fcecd3;--amber-ink:#7e4f0c;--amber-on:#1b1205;
  --green:#1b7a48;--green-soft:#dcf1e5;
  --red:#c0392b;--red-soft:#fbe1dd;
  --teal:#11766f;--plum:#6b3fa0;
  --grey:#6b7686;--grey-soft:#eceff3;--grey-ink:#566170;
  --plate:#fff;--plate-ink:#111;
  --f-ui:"Barlow",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  --f-num:"Barlow Semi Condensed","Barlow",system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  /* Names the older rules use, now pointing at the tokens above. */
  --page:var(--bg);--line-strong:#b9c4d2;--hover:var(--soft);
  --brand:var(--navy);--brand-hover:#0f2444;--accent:var(--amber);--accent-soft:#e3a957;
  --nav:var(--ink);--nav-line:#2b3a50;--nav-ink:#cdd6e2;--nav-muted:#93a1b5;
  --status-info-bg:var(--navy-soft);--status-info-ink:var(--navy);
  --status-wait-bg:var(--amber-soft);--status-wait-ink:var(--amber-ink);
  --status-alert-bg:var(--red-soft);--status-alert-ink:var(--red);
  --radius-s:6px;--radius:10px;--radius-l:12px;--control:36px;
  --shadow:0 1px 2px rgba(19,32,51,.05);--shadow-pop:0 12px 32px rgba(19,32,51,.18);
  font-family:var(--f-ui);font-size:14px;line-height:1.45;color:var(--ink);background:var(--bg);
  -webkit-font-smoothing:antialiased;
}
*{box-sizing:border-box}
body{margin:0}
[hidden]{display:none!important}

/* ---------- Typography ---------- */
h1,h2,h3,p{margin-top:0}
h1{font-size:24px;line-height:1.2;letter-spacing:-.01em;font-weight:700;margin-bottom:2px}
h2{font-size:16px;line-height:1.3;letter-spacing:-.005em;font-weight:700;margin-bottom:8px}
h3{font-size:15px;line-height:1.35;font-weight:700;margin-bottom:6px}
p{line-height:1.55;margin-bottom:10px}
small,.muted{color:var(--muted)}
small{font-size:12px}
.eyebrow{font-size:13px;font-weight:500;color:var(--muted);margin-bottom:2px}
.footnote{font-size:12px;color:var(--muted);margin:12px 0;line-height:1.55}
.margin-scheme-note{font-size:13.5px;margin:12px 0;line-height:1.55}

/* ---------- Links, buttons, inputs ---------- */
a{color:var(--brand);text-decoration:none}
a:hover{text-decoration:underline}
:is(p,td,dd,li,.kv,.help-list) a:not(.button):not(.badge){text-decoration:underline;text-decoration-color:#a9b8c9;text-underline-offset:2px}
:is(p,td,dd,li,.kv,.help-list) a:not(.button):hover{text-decoration-color:currentColor}
button,input,select,textarea{font:inherit;color:inherit}
button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,summary:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--amber);outline-offset:2px}

/* Buttons: */
button,a.button,summary.button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:var(--control);padding:6px 12px;border:1.5px solid var(--line);border-radius:var(--radius);background:var(--surface);color:var(--navy);font-size:14px;font-weight:600;line-height:18px;cursor:pointer;white-space:nowrap;text-decoration:none}
button:hover,a.button:hover,summary.button:hover{background:var(--soft);border-color:#aebccb;text-decoration:none}
button:active,a.button:active{background:var(--soft)}
button.primary,a.button.primary{background:var(--navy);border-color:var(--navy);color:var(--navy-ink)}
button.primary:hover,a.button.primary:hover{background:var(--brand-hover);border-color:var(--brand-hover)}
button.small,a.button.small{min-height:30px;padding:4px 10px;font-size:13px;border-radius:8px}
button.text,a.button.text{border:0;background:transparent;box-shadow:none;padding:4px 6px;min-height:0;color:var(--navy);font-weight:600}
button.text:hover,a.button.text:hover{background:var(--navy-soft);color:var(--navy)}
button.danger,a.button.danger{color:var(--red);border-color:#e3b6ae}
button.danger:hover,a.button.danger:hover{background:var(--red-soft);border-color:#d79a91}
button.text.danger{color:var(--red);border:0}
button.text.danger:hover{background:var(--red-soft)}
button.primary.danger{background:var(--red);border-color:var(--red);color:#fff}
button.primary.danger:hover{background:#8f3a2e;border-color:#8f3a2e}
button.icon-button{width:var(--control);min-width:var(--control);height:var(--control);padding:0;vertical-align:middle}
button.is-busy{position:relative;color:transparent!important}
button.is-busy::after{content:"Saving…";position:absolute;inset:0;display:flex;align-items:center;justify-content:center;color:var(--navy-ink)}
button:not(.primary).is-busy::after{color:var(--muted)}
button:disabled{opacity:.45;cursor:not-allowed;box-shadow:none}

/* Fields (owner-approved 2026-10-06): a tinted fill with a bottom border, white with a navy ring while it is being written. */
input,select,textarea{width:100%;min-height:var(--control);border:1.5px solid transparent;border-bottom-color:var(--line-strong);background:var(--field);padding:6px 10px;border-radius:var(--radius);color:var(--ink);font-size:14px;line-height:18px;font-weight:500}
input:hover,select:hover,textarea:hover{border-bottom-color:#8fa0b6}
input:focus,select:focus,textarea:focus{background:#fff;border-color:var(--navy2);outline:none;box-shadow:0 0 0 3px var(--navy-soft)}
input::placeholder,textarea::placeholder{color:#6b7686;opacity:1}
textarea{min-height:80px;resize:vertical;line-height:1.5}
select{padding-right:28px;appearance:none;-webkit-appearance:none;background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20' fill='none' stroke='%235f6b7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M5 8l5 5 5-5'/></svg>");background-repeat:no-repeat;background-position:right 10px center}
input[type=checkbox],input[type=radio]{width:18px;height:18px;min-height:0;accent-color:var(--brand);margin:0;padding:0}
label{display:grid;gap:4px;font-size:13px;font-weight:700;color:var(--ink)}
label .hint{display:block;font-weight:400;font-size:12px;line-height:1.4;color:var(--muted);margin-top:2px}
label.check{display:flex;align-items:center;gap:10px;font-size:14px;font-weight:500;padding:8px 0;border-bottom:1px solid var(--line)}
/* One fieldset: */
fieldset{border:1px solid var(--line);border-radius:var(--radius);padding:10px 14px 12px;margin:0;min-width:0}
legend{font-size:12px;font-weight:600;padding:0 6px;color:var(--ink)}
label .optional,.picker-label .optional,legend .optional{font-weight:400;color:var(--muted);margin-left:.25em}
.picker-label{display:block}


/* ---------- Shell ---------- */
.sidebar{position:fixed;inset:0 auto 0 0;width:220px;background:var(--nav);padding:18px 12px 16px;display:flex;flex-direction:column;z-index:4}
.sidebar-heading{flex-shrink:0}
.module-menu{display:none}
.brand{display:flex;align-items:center;gap:9px;font-size:20px;font-weight:700;letter-spacing:-.5px;margin:2px 8px 18px;color:#fff}
.brand::before{content:"";flex-shrink:0;width:24px;height:24px;border-radius:6px;background:var(--amber)}
.brand:hover{text-decoration:none;color:#fff}
.nav-group{font-size:11px;text-transform:uppercase;letter-spacing:1.4px;font-weight:600;margin:16px 10px 6px;color:var(--nav-muted)}
.sidebar nav{min-height:0;overflow-y:auto}
.sidebar nav a{display:flex;align-items:center;gap:10px;padding:7px 10px;margin:1px 0;border-radius:var(--radius);color:var(--nav-ink);font-size:13.5px;font-weight:500;text-decoration:none;box-shadow:inset 3px 0 0 transparent}
.sidebar nav a:hover{background:#1d2c42;color:#fff;text-decoration:none}
.sidebar nav a .nav-icon{flex-shrink:0;opacity:.7}
.sidebar nav a:hover .nav-icon{opacity:1}
.sidebar nav a.active .nav-icon{opacity:1;color:var(--accent-soft)}
.sidebar :is(a,button,summary):focus-visible{outline-color:var(--accent-soft)}
.skip-link{position:absolute;left:8px;top:-48px;z-index:20;padding:8px 12px;background:var(--surface);color:var(--brand);border:1px solid var(--line-strong);border-radius:var(--radius);font-weight:600}
.skip-link:focus{top:8px;text-decoration:none}
h1:focus,main:focus,.error:focus,h1[tabindex]:focus-visible,main[tabindex]:focus-visible{outline:none}
.sidebar nav a.active{background:var(--nav-line);color:#fff;font-weight:650;box-shadow:inset 3px 0 0 var(--accent-soft)}
.company{flex-shrink:0;margin-top:auto;padding:14px 10px 0;border-top:1px solid var(--nav-line);color:var(--nav-ink)}
.company strong{display:block;font-size:13px;margin-bottom:4px;color:#fff}
.sidebar small{display:block;color:var(--nav-muted);font-size:12px;line-height:1.5}

.workspace{margin-left:220px;min-height:100vh}
.topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:44px;padding:5px 24px;border-bottom:1px solid var(--line);background:var(--surface)}
.prototype-label{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted)}
.prototype-label b{background:var(--amber-soft);color:var(--amber-ink);padding:3px 7px;border-radius:var(--radius-s);font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.9px}
.top-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.topbar button,.topbar a.button,.topbar .workspace-menu>summary{min-height:30px;padding:5px 10px;font-size:13px;box-shadow:none}
.global-search-trigger{font-weight:400;color:var(--muted);min-width:190px;justify-content:flex-start;background:var(--page)}
.global-search-trigger svg{flex:none}
/* Phone-only shell parts (below 700 px): the menu button, the page name, the person's initials and the menu's own Help line. */
.topbar .module-menu,.topbar-title,.topbar-back,.who-initials,.drawer-more{display:none}
.global-search-trigger:hover{background:var(--hover);color:var(--ink)}

.main{max-width:1640px;padding:16px 24px 32px;margin:auto}

/* ---------- Page heading ---------- */
.panel-header h2{overflow-wrap:anywhere}
.heading-actions .actions,.heading-actions .toolbar{margin:0;gap:8px}
.heading-actions{flex-wrap:wrap;justify-content:flex-end}
/* The one back link (backLink in prototype-components.js): "← Parent page", the same size and colour on every page. */
.back{margin:0 0 8px}
.back-link{display:inline-flex;align-items:center;min-height:28px;font-size:14px;font-weight:600;color:var(--navy)}
.back-link:hover{text-decoration:underline}

/* ---------- Tabs, filters, view switches ---------- */
.tabs{display:flex;align-items:stretch;gap:2px;flex-wrap:wrap;background:var(--surface,#fff);border-radius:12px;padding:0 6px;margin-bottom:14px;box-shadow:0 1px 0 rgba(15,27,45,.06)}
.tabs a{display:inline-flex;align-items:center;min-height:44px;padding:6px 14px;border-bottom:3px solid transparent;color:var(--muted);font-size:14px;font-weight:600;white-space:nowrap}
.tabs a:hover{background:var(--hover);color:var(--ink);text-decoration:none}
.tabs a.active{color:var(--ink);border-bottom-color:var(--amber);font-weight:700;text-decoration:none}

/* The one filter chip (filterChoices in prototype.js), on every page: */
.filters{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin:0 0 12px}
.filters>a,.filters>button{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:32px;padding:5px 13px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font-size:14px;font-weight:550;line-height:18px;box-shadow:none;text-decoration:none;white-space:nowrap}
.filters .n{font:600 12.5px/1 var(--f-num);font-variant-numeric:tabular-nums;padding:2px 7px;border-radius:999px;background:var(--grey-soft);color:var(--grey-ink)}
.filters>a:hover,.filters>button:hover{background:var(--soft);border-color:#aebccb;text-decoration:none}
.filters>a.active,.filters>button.active{background:var(--navy);border-color:var(--navy);color:#fff;font-weight:600}
.filters>a.active .n,.filters>button.active .n{background:rgba(255,255,255,.2);color:#fff}

/* One toolbar standard: controls left in one wrapping row, action button next to its fields, counts at the right. */
.toolbar,.account-filters,form.toolbar{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:flex-start;gap:8px 10px;margin:0 0 12px}
.toolbar label,.account-filters label{flex:0 0 auto;width:auto;min-width:0}
.toolbar input,.account-filters input{max-width:none}
.toolbar input[type=search],.toolbar input[type=text],.account-filters input[type=search],.account-filters input[type=text]{width:260px}
.toolbar .date-field,.account-filters .date-field{width:190px}
.toolbar select,.account-filters select{width:auto;min-width:160px}
.toolbar>button,.account-filters>button{flex:0 0 auto}
.toolbar>small,.account-filters>small{margin-left:auto;align-self:center;color:var(--muted);font-size:12px;white-space:nowrap}
.toolbar>.filters{margin:0}
.toolbar>.filter-bar{margin:0;flex:1 1 260px}
.toolbar>#module-search-empty{flex-basis:100%}
.toolbar>.filters+.filters{margin-left:auto}
.toolbar>.error,.account-filters>.error{flex-basis:100%;margin:0}
.error:empty{display:none}

/* ---------- Stats ---------- */
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));border:1px solid var(--line);border-radius:var(--radius-l);background:var(--surface);margin-bottom:12px;overflow:hidden;box-shadow:var(--shadow)}
.stat{min-width:0}
.stat strong{display:block;font:700 24px/1.15 var(--f-num);font-variant-numeric:tabular-nums;margin:4px 0 2px}
.stat>span:first-child{display:block;font-size:12px;font-weight:500}.stat span{font-size:12px}
.stat>a{display:block}
a.stat:hover{text-decoration:none;background:var(--hover)}
.cost-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:12px 0}
.cost-summary strong{display:block;margin-top:4px;font-size:17px;font-variant-numeric:tabular-nums}
.cost-summary>div>small{display:block}
.cost-summary .cash-plan-excluded{margin:6px 0 0}
.cash-plan-excluded small{display:block;margin-top:2px}
.cost-gap{color:var(--amber)}
.report-result{font-size:20px;font-variant-numeric:tabular-nums}

/* ---------- Panels, tables, facts ---------- */
.panel{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-l);padding:14px 16px;margin-bottom:12px;box-shadow:var(--shadow)}
.panel>h2:first-child{margin-bottom:10px}
.panel-header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
.panel-header>div:first-child{min-width:0}
.panel-header h2{margin:0}
.panel-header .actions{margin:0}
.grid{display:grid;grid-template-columns:1fr 1fr;gap:10px 14px}
.grid>*{min-width:0}
.span2{grid-column:1/-1}

.table-wrap{overflow:auto;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-l);box-shadow:var(--shadow)}
.table-wrap td:last-child>a{display:inline-block}
/* A table that is wider than its page wraps its words (class fit, set by enhanceTableNavigation) before it ever scrolls sideways. */
.table-wrap.fit :is(th,td){white-space:normal}
.table-wrap.fit :is(td.number,.badge,.money,.plate){white-space:nowrap}
.table-wrap.fit td>:is(button,a.button){white-space:normal;max-width:100%;line-height:1.25}
table{width:100%;border-collapse:collapse;text-align:left;white-space:nowrap}
th{font-weight:600;font-size:11.5px;letter-spacing:.3px;text-transform:uppercase;color:var(--muted);background:var(--soft);padding:8px 12px;border-bottom:1px solid var(--line)}
td{padding:8px 12px;border-bottom:1px solid var(--line);font-size:13.5px;vertical-align:middle}
.table-wrap td{height:48px}
tr:last-child td{border-bottom:0}
td strong{font-weight:600;display:block;margin-bottom:2px}
td small{display:block;font-size:12px;line-height:1.4}
tbody tr:hover{background:var(--hover)}
tr.late td{background:#fdf5f4}
tr.late td:first-child{box-shadow:inset 3px 0 0 var(--status-alert-ink)}
/* A group heading inside a table (the waiting list's job row): bold, normal case, a light tint (SR-24). */
tr.group-row th{background:var(--soft);color:var(--ink);font-size:14px;font-weight:700;letter-spacing:0;text-transform:none;text-align:left;border-top:1px solid var(--line)}
tr.group-row th a{font-weight:700}
.number{text-align:right;font-variant-numeric:tabular-nums}
.number,.totals div,.report-result,.cost-summary strong,.leave-stats .stat strong,.totals .grand{font-family:var(--f-num)}
/* A numeric column: right-aligned header and cells, tabular figures. The header keeps the header's size (A-86); only the cells use the figure face. */
table[data-numeric~="1"]>:is(thead,tbody,tfoot)>tr>:nth-child(1),
table[data-numeric~="2"]>:is(thead,tbody,tfoot)>tr>:nth-child(2),
table[data-numeric~="3"]>:is(thead,tbody,tfoot)>tr>:nth-child(3),
table[data-numeric~="4"]>:is(thead,tbody,tfoot)>tr>:nth-child(4),
table[data-numeric~="5"]>:is(thead,tbody,tfoot)>tr>:nth-child(5),
table[data-numeric~="6"]>:is(thead,tbody,tfoot)>tr>:nth-child(6),
table[data-numeric~="7"]>:is(thead,tbody,tfoot)>tr>:nth-child(7),
table[data-numeric~="8"]>:is(thead,tbody,tfoot)>tr>:nth-child(8),
table[data-numeric~="9"]>:is(thead,tbody,tfoot)>tr>:nth-child(9),
table[data-numeric~="10"]>:is(thead,tbody,tfoot)>tr>:nth-child(10),
table[data-numeric~="11"]>:is(thead,tbody,tfoot)>tr>:nth-child(11),
table[data-numeric~="12"]>:is(thead,tbody,tfoot)>tr>:nth-child(12){text-align:right;font-variant-numeric:tabular-nums}
table[data-numeric~="1"]>:is(tbody,tfoot)>tr>:nth-child(1),
table[data-numeric~="2"]>:is(tbody,tfoot)>tr>:nth-child(2),
table[data-numeric~="3"]>:is(tbody,tfoot)>tr>:nth-child(3),
table[data-numeric~="4"]>:is(tbody,tfoot)>tr>:nth-child(4),
table[data-numeric~="5"]>:is(tbody,tfoot)>tr>:nth-child(5),
table[data-numeric~="6"]>:is(tbody,tfoot)>tr>:nth-child(6),
table[data-numeric~="7"]>:is(tbody,tfoot)>tr>:nth-child(7),
table[data-numeric~="8"]>:is(tbody,tfoot)>tr>:nth-child(8),
table[data-numeric~="9"]>:is(tbody,tfoot)>tr>:nth-child(9),
table[data-numeric~="10"]>:is(tbody,tfoot)>tr>:nth-child(10),
table[data-numeric~="11"]>:is(tbody,tfoot)>tr>:nth-child(11),
table[data-numeric~="12"]>:is(tbody,tfoot)>tr>:nth-child(12){font-family:var(--f-num);font-size:14.5px}
.record-table{table-layout:fixed;white-space:normal}
.record-table th,.record-table td{overflow-wrap:anywhere}
.record-table td{height:48px;padding:7px 12px;line-height:16px}
.record-table td strong{margin:0 0 3px}
.record-table td small{line-height:15px}
.table-scroll-controls{display:flex;align-items:center;gap:8px;padding:6px 8px 6px 12px;background:var(--surface);border:1px solid var(--line);border-bottom:0;border-radius:var(--radius-l) var(--radius-l) 0 0}
.table-scroll-controls>span{flex:1;min-width:0;font-size:12px;line-height:1.4;color:var(--muted)}
.table-scroll-controls>button{flex-shrink:0;width:var(--control);height:var(--control);padding:0;font-size:16px}
.table-scroll-controls:not([hidden])+.table-wrap{border-top-left-radius:0;border-top-right-radius:0}

.kv{display:grid;grid-template-columns:minmax(110px,42%) minmax(0,1fr);align-items:baseline;gap:0 20px;padding:7px 0;border-bottom:1px solid var(--line);font-size:13.5px;line-height:1.5}
.kv:last-child{border-bottom:0}
.record-facts{display:grid;grid-template-columns:minmax(110px,42%) minmax(0,1fr);gap:0 20px;margin:0;font-size:13.5px;line-height:1.5}
.record-facts dt{color:var(--muted)}
.record-facts dd{margin:0;overflow-wrap:anywhere}
.record-facts dt,.record-facts dd{padding:7px 0;border-bottom:1px solid var(--line)}
.record-facts dt:last-of-type,.record-facts dd:last-of-type{border-bottom:0}
.timeline{padding:0;list-style:none;margin:12px 0 0}
.timeline li{padding:0 0 8px 12px;border-left:2px solid var(--line);font-size:13.5px;color:var(--ink);line-height:1.5}
.timeline li:last-child{padding-bottom:0}
.totals{max-width:320px;margin:12px 0 0 auto}
.totals div{display:flex;justify-content:space-between;align-items:baseline;gap:24px;padding:7px 0;color:var(--muted);font-size:13.5px;font-variant-numeric:tabular-nums}
.totals div>strong{white-space:nowrap}
.totals .grand{border-top:1px solid var(--line);margin-top:4px;padding-top:10px;font-size:16px;color:var(--ink);font-weight:650}
.totals .grand>span{white-space:nowrap;font-size:13.5px;font-weight:500;color:var(--muted)}
.estimate-headline{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 12px;margin:0 0 12px}.estimate-headline>span{font-size:13.5px;color:var(--muted)}.estimate-headline>strong{font-family:var(--f-num);font-size:24px;font-weight:650;color:var(--ink)}.estimate-headline>small{flex-basis:100%;color:var(--muted)}
.financial-statement .totals{max-width:420px}
.financial-statement td:last-child{width:220px}
.actions{display:flex;justify-content:flex-end;align-items:center;gap:8px;margin-top:12px;flex-wrap:wrap}
.actions>a:not(.button){padding:6px 4px}
main>.actions{margin-bottom:12px}

/* ---------- Badges, banners, states ---------- */
/* Status is a FILLED pill (owner-approved 2026-10-06): */
.badge,.chip{display:inline-flex;align-items:center;gap:6px;padding:4px 12px;border-radius:999px;font:700 13px/1.2 var(--f-ui);white-space:nowrap;background:#fff;color:var(--navy);box-shadow:inset 0 0 0 1.5px var(--line-strong)}
:is(.badge,.chip).grey{background:#fff;color:var(--navy);box-shadow:inset 0 0 0 1.5px var(--line-strong)}
:is(.badge,.chip).navy{background:var(--navy2);color:#fff;box-shadow:none}
:is(.badge,.chip).amber{background:var(--amber);color:var(--amber-on);box-shadow:none}
:is(.badge,.chip).green{background:var(--green);color:#fff;box-shadow:none}
:is(.badge,.chip).red{background:var(--red);color:#fff;box-shadow:none}
.banner{background:var(--status-info-bg);color:var(--status-info-ink);border:1px solid #c5d3e6;padding:10px 14px;border-radius:var(--radius);font-size:13px;line-height:1.6;margin-bottom:12px}
.banner p{margin:4px 0 0;color:inherit}
.banner.warning{background:var(--status-wait-bg);border-color:#e6cf9b;color:var(--status-wait-ink)}
.error{color:var(--status-alert-ink);font-size:13.5px;margin-top:12px}
.error:not(:empty){background:var(--status-alert-bg);border-left:3px solid var(--status-alert-ink);padding:10px 12px;border-radius:var(--radius-s);line-height:1.55}
.empty{text-align:center;padding:24px 16px;background:var(--surface);border:1px dashed var(--line-strong);border-radius:var(--radius-l);color:var(--muted)}
.empty h2{color:var(--ink);margin-bottom:4px}
.empty p:last-child{margin-bottom:0}
#toast{position:fixed;top:64px;left:16px;right:16px;margin-inline:auto;width:fit-content;transform:translateY(-8px);background:var(--nav);color:#fff;padding:10px 16px;border-radius:var(--radius);box-shadow:var(--shadow-pop);z-index:10;max-width:calc(100vw - 32px);font-size:13.5px;opacity:0;pointer-events:none;transition:opacity .15s,transform .15s}
#toast.show{opacity:1;transform:translateY(0)}
#toast:empty{display:none}
.boot-screen{display:grid;place-content:center;gap:6px;min-height:60vh;text-align:center}
.boot-mark{display:flex;align-items:center;justify-content:center;gap:9px;margin:0;font-size:20px;font-weight:700;letter-spacing:-.5px;color:var(--ink)}
.boot-mark span{width:24px;height:24px;border-radius:6px;background:var(--accent)}
.pagination{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:12px 0}
.pagination>div{display:flex;align-items:center;gap:10px}
.pagination span{font-size:12px;color:var(--muted)}
.pagination .page-size{display:inline-flex;align-items:center;gap:2px;margin-left:8px}
.pagination .page-size :is(a,button){min-width:44px;padding:3px 8px;border-color:transparent;background:none;color:var(--muted);font-size:12px;box-shadow:none}
.pagination .page-size .is-on{color:var(--ink);font-weight:700;border-color:var(--line)}
.print-only,.section-menu{display:none}

/* ---------- Dialog ---------- */
dialog{border:1px solid var(--line);border-radius:10px;width:min(660px,94vw);padding:0;color:var(--ink);max-height:90vh;box-shadow:var(--shadow-pop)}
dialog::backdrop{background:rgba(15,26,43,.45)}
dialog[open]{display:flex;flex-direction:column;overflow:hidden}
dialog>.modal-header{flex-shrink:0;margin:0;padding:14px 20px;border-bottom:1px solid var(--line)}
dialog h2{font-size:15px}
dialog>form{display:flex;flex-direction:column;min-height:0;overflow:hidden;margin:0}
.modal-body{min-height:0;overflow:auto;padding:16px 20px;overscroll-behavior:contain}
.modal-footer{flex-shrink:0;padding:12px 20px;border-top:1px solid var(--line);background:var(--page)}
.modal-footer .actions{margin-top:0}
.modal-footer .error:not(:empty){margin:0 0 10px;max-height:24vh;overflow:auto}
.grid>label{align-self:start}
dialog .panel-header{margin-bottom:0}

/* ---------- Global search ---------- */
.global-results{margin-top:12px}
.global-results section{margin:16px 0}
.global-results h3{border-bottom:1px solid var(--line);padding-bottom:8px}
.global-results h3 small{margin-left:8px}
.search-result{display:block;padding:10px 8px;border-bottom:1px solid var(--line);color:var(--ink);border-radius:var(--radius-s)}
.search-result:hover{background:var(--hover);text-decoration:none}
.search-result strong,.search-result small{display:block;line-height:1.5}
.search-result small{margin-top:2px}

/* ---------- Workspace switcher ---------- */
.workspace-menu{position:relative;min-width:0}
.workspace-menu>summary{display:inline-flex;align-items:center;gap:6px;cursor:pointer;min-height:30px;padding:5px 10px;border:1px solid var(--line-strong);border-radius:var(--radius);font-size:13px;line-height:18px;list-style:none;overflow-wrap:anywhere;background:var(--surface)}
.workspace-menu>summary::-webkit-details-marker{display:none}
.workspace-menu>summary:hover,.workspace-menu[open]>summary{background:var(--hover);border-color:#aebccb}
.workspace-options{position:absolute;right:0;top:calc(100% + 6px);z-index:6;display:grid;gap:4px;width:260px;max-width:calc(100vw - 32px);padding:8px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-l);box-shadow:var(--shadow-pop)}
.workspace-options>p{font-size:12px;margin:0;padding:4px 6px 8px;overflow-wrap:anywhere;color:var(--muted)}
.workspace-options>button{justify-content:flex-start;text-align:left;box-shadow:none;border-color:transparent}
.workspace-options>button:hover{border-color:var(--line)}

:is(.toolbar,.account-filters)>a:not(.button){display:inline-flex;align-items:center;min-height:var(--control);color:var(--muted);font-size:13.5px;font-weight:500}
/* ---------- Workshop ---------- */
.insurance-fields[hidden]{display:none}
.handover-next-service{border:1px solid var(--line);border-radius:var(--radius);padding:10px 14px 12px;margin:14px 0;min-width:0}
.handover-next-service legend{font-weight:650;padding:0 6px}
.handover-next-service p{margin:6px 0 0}
#reception-open-visits{margin:0;font-size:13px;line-height:1.6}
.workshop-note{white-space:pre-wrap;overflow-wrap:anywhere}
.estimate-header{gap:16px;align-items:flex-start}
.estimate-header>.actions{margin:0;flex-wrap:wrap;gap:8px}
.estimate-lines :is(th,td){padding:10px 12px}
.estimate-lines :is(th,td):first-child{white-space:normal;min-width:170px;line-height:1.5}
.estimate-lines td:last-child button{display:inline-flex;margin-left:4px}
.estimate-lines td small{margin-top:2px}
.profile-change-history summary,.company-unlinked>summary{cursor:pointer;font-weight:600;min-height:32px;display:flex;align-items:center}

/* Record sections on narrow screens collapse into one menu. */
@media(max-width:700px){
  .help-list-tight{columns:1}
  .section-navigation{margin-bottom:12px}
  .section-menu{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;text-align:left;background:var(--surface);padding:10px 12px}
  .section-menu-label{font-size:12px;font-weight:400;color:var(--muted)}
  .section-menu strong{flex:1;min-width:0;font-size:14px;font-weight:650;overflow-wrap:anywhere}
  .section-menu-chevron{font-size:16px;line-height:1;transition:transform .15s}
  .section-navigation[data-expanded="true"] .section-menu-chevron{transform:rotate(180deg)}
  .section-navigation>nav{display:none}
  .section-navigation[data-expanded="true"]>nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;margin:6px 0 0;padding:6px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius)}
  .section-navigation>nav a{display:flex;align-items:center;min-height:44px;padding:8px 10px;white-space:normal;overflow-wrap:anywhere;border-radius:var(--radius-s);border:0;border-left:3px solid transparent}
  .section-navigation>nav a.active{border-left-color:var(--brand);background:var(--navy-soft)}
}

/* ---------- Customers, suppliers, insurers ---------- */
.profile-change-history>section{margin-top:12px}
.profile-change-history :is(th,td){white-space:pre-wrap;overflow-wrap:anywhere;min-width:100px;vertical-align:top}
.profile-change-history td:first-child{font-weight:600}
.profile-change-history p{margin:10px 0 0}
.company-unlinked{margin-top:12px}
.company-unlinked[open]>summary{margin-bottom:10px}

/* ---------- Inventory & purchasing ---------- */
.document-preview{white-space:pre-wrap;overflow-wrap:anywhere;max-height:52vh;overflow:auto;background:var(--page);padding:14px;line-height:1.7;border-radius:var(--radius)}
.document-image{display:block;max-width:100%;max-height:60vh;object-fit:contain;margin:auto}
.document-pdf{width:100%;height:52vh;border:1px solid var(--line)}

/* ---------- Invoices ---------- */
.invoice-cards{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:12px 0}
.invoice-card{padding:14px 16px;border:1px solid var(--line);border-radius:var(--radius-l)}
.invoice-card>small{display:block;margin:6px 0 12px;overflow-wrap:anywhere}
.invoice-card .panel-header{align-items:start;gap:8px}
.invoice-card .kv{gap:12px}
.invoice-document{margin-top:12px}
.invoice-document table,.invoice-receipts table{white-space:normal}
.invoice-document td{overflow-wrap:anywhere}
.invoice-document .estimate-lines :is(th,td):not(:first-child),.invoice-document td:last-child,.invoice-receipts td:last-child{white-space:nowrap;overflow-wrap:normal}
.invoice-parties{display:grid;grid-template-columns:1fr 1fr;gap:12px;font-size:13.5px;line-height:1.5;margin:4px 0 12px}
.invoice-parties small{display:block;color:var(--muted);font-size:11.5px;text-transform:uppercase;letter-spacing:.6px;margin-bottom:2px}
.tax-invoice-title{font-size:17px;font-weight:700;color:var(--ink);margin:0 0 8px}
/* The company header and footer every printed document shares (documentHeaderHtml and documentFooterHtml, prototype-settings.js). */
.document-header{display:flex;align-items:flex-start;gap:14px;margin:0 0 12px;font-size:13.5px;line-height:1.5}
.document-logo{flex:none;max-width:160px;max-height:64px;object-fit:contain}
.document-company{display:grid;gap:1px;min-width:0}
.document-company strong{font-size:15px;letter-spacing:-.2px}
.document-footer{margin:16px 0 0;padding-top:8px;border-top:1px solid var(--line);font-size:12px;line-height:1.5;color:var(--muted)}
.document-footer p{margin:0 0 4px}

/* ---------- Accounting ---------- */
/* Opening balances: one row per account, invoice or bill, each field in a column that wraps on a narrow screen. */
.opening-row{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr)) auto;gap:8px 12px;align-items:end;padding:8px 0;border-bottom:1px solid var(--line)}
.opening-row:last-child{border-bottom:0}
.opening-row>button{align-self:end}
.accounting-setup-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:10px}
.accounting-setup{display:flex;flex-direction:column;gap:2px;padding:10px 12px;border:1px solid var(--line);border-radius:var(--radius-l);text-decoration:none;color:var(--ink)}
.accounting-setup:hover{background:var(--hover);text-decoration:none}
.accounting-setup strong{color:var(--brand);font-size:14px}
.accounting-setup small{line-height:1.5}
.journal-edit-line{display:grid;grid-template-columns:minmax(180px,2fr) minmax(130px,2fr) minmax(85px,1fr) minmax(85px,1fr) auto;gap:10px;align-items:end;padding:10px 0;border-bottom:1px solid var(--line)}
.journal-edit-line label{min-width:0}
.journal-edit-line input,.journal-edit-line select{width:100%;min-width:0}
[data-form^="expense-"] label,[data-form^="expense-"] select{min-width:0}
.purchase-entry legend{font-weight:650;padding:0 6px}
.purchase-entry [hidden]{display:none!important}
.bank-selection-total{font-weight:600;margin-top:12px}
#bank-match-search{max-width:420px;margin-bottom:12px}
[data-bank-candidate] td:nth-child(2){white-space:normal;min-width:240px;max-width:440px}
@media(max-width:700px){[data-bank-candidate] td:nth-child(2){min-width:140px}}
.bank-match-candidates .table-wrap{overflow-x:auto}
.bank-more{margin:10px 0 0}
.bank-missing{margin:6px 0 0}
#bank-match-count{display:block;margin:0 0 10px}

/* ---------- Performance ---------- */

/* ---------- People ---------- */
.payroll-stats{grid-template-columns:repeat(auto-fit,minmax(170px,1fr))}
.people-form-editor{min-height:420px;font-size:14px}
.people-form-text{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.75}
.people-print-document{max-width:850px;margin:12px auto;padding:32px}
.people-print-document h2{font-size:20px}
/* An HR form prints straight from its editor; the document itself is for paper only. */
@media screen{.people-form-document{display:none}}

/* ---------- Help ---------- */
.help-summary{font-size:15px;line-height:1.55;max-width:74ch;margin:0 0 12px}
/* Two columns that pack tightly: the modules differ in length and a fixed grid leaves half a page empty. */
.help-grid{columns:2;column-gap:12px}
.help-grid .panel{break-inside:avoid;margin-bottom:12px}
.help-list{list-style:none;margin:0;padding:0}
.help-list li{padding:7px 0;border-bottom:1px solid var(--line)}
.help-list li:last-child{border-bottom:0}
.help-list small{display:block;color:var(--muted);margin-top:1px}
.help-list-tight{columns:2;column-gap:16px}
.help-list-tight li{break-inside:avoid;padding:5px 0}
/* The runs through the product, for someone who does not know where to start. */
.help-paths{background:var(--soft);border-color:#cfdcea}
.help-paths>p{margin-bottom:10px}
.help-path-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fit,minmax(230px,1fr));gap:10px}
.help-path-list>li{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-l);padding:10px 12px}
.help-path-list h3{margin-bottom:1px}
.help-path-list>li>p{font-size:12px;color:var(--muted);margin-bottom:6px;line-height:1.5}
.help-path-list ol{margin:0;padding-left:17px;font-size:13.5px;line-height:1.75}
/* An article: the steps beside the pictures of the screen they happen on. */
.help-article{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.12fr);gap:0 12px;align-items:start}
.help-body{grid-column:1;grid-row:1}
.help-figures{grid-column:2;grid-row:1/span 2}
.help-more{grid-column:1;grid-row:2}
.help-article-plain{grid-template-columns:minmax(0,1fr)}
.help-more>.panel:last-child,.help-figures>:last-child{margin-bottom:0}
.help-before{background:var(--status-info-bg);border-color:#cbdded}
.help-before p:last-child{margin-bottom:0}
.help-steps{list-style:none;margin:0;padding:0}
.help-steps li{display:grid;grid-template-columns:22px minmax(0,1fr);gap:9px;align-items:start;padding:7px 0;border-bottom:1px solid var(--line);line-height:1.55}
.help-steps li:last-child{border-bottom:0}
.help-steps b{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:11px;border:1px solid var(--line-strong);background:var(--surface);color:var(--muted);font-size:12px;font-weight:700}
.help-steps li.marked b{background:var(--nav);border-color:var(--nav);color:#fff}
.help-figures{display:grid;gap:12px;align-content:start}
.help-figure{margin:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-l);box-shadow:var(--shadow);overflow:hidden}
.help-figure img{display:block;width:100%;height:auto;border-bottom:1px solid var(--line);background:var(--hover)}
.help-figure figcaption{padding:8px 10px;font-size:12px;line-height:1.5;color:var(--muted)}
.help-figure figcaption b{color:var(--ink);font-weight:650}
.topbar a.help-trigger{color:var(--muted);font-weight:500}

/* ---------- Sign in ---------- */
.portal-sign-in{max-width:440px;margin:9vh auto;padding:24px}
.portal-sign-in .brand{margin-left:0;color:var(--brand)}
.portal-sign-in h1{font-size:22px}

/* ---------- Responsive ---------- */
@media(min-width:1550px){
  .main{padding:20px 32px 40px}
  .topbar{padding:5px 32px}
}
@media(max-width:1100px){
  .tabs a{padding-inline:7px}
  /* Labelled rail (a tablet): an icon with its name under it, so nothing has to be guessed; the page keeps its width. */
  .sidebar{width:88px;padding:12px 6px}
  .brand{font-size:0;margin:2px 0 10px;justify-content:center}
  .brand::before{width:28px;height:28px}
  .nav-group{display:block;margin:10px 0 2px;padding:0;font-size:9.5px;letter-spacing:.9px;text-align:center}
  .sidebar nav a{flex-direction:column;justify-content:center;gap:3px;min-height:54px;padding:7px 2px;text-align:center;font-size:11.5px;line-height:1.2;overflow-wrap:anywhere}
  .sidebar nav a .nav-icon{width:20px;height:20px;opacity:.85}
  .company{display:none}
  .workspace{margin-left:88px}
  .main{padding:14px 16px 32px}
  .topbar{padding:5px 16px}
  .prototype-label span{display:none}
  .tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none}
  .tabs a{flex-shrink:0}
  .toolbar select,.account-filters select{min-width:130px}
  .toolbar input[type=search],.toolbar input[type=text],.account-filters input[type=search],.account-filters input[type=text]{width:220px}
  .help-grid{columns:1}
  .help-article{grid-template-columns:minmax(0,1fr)}
  .help-body,.help-figures,.help-more{grid-column:1;grid-row:auto}
}
@media(max-width:900px){
  .invoice-cards{grid-template-columns:1fr}
  .journal-edit-line{grid-template-columns:1fr 1fr}
  .journal-edit-line>button{justify-self:start}
}
@media(max-width:850px){.global-search-trigger{min-width:0}}
@media(max-width:800px){
}
@media(max-width:700px){
  :root{--radius-l:14px;font-size:15px}
  body{font-size:15px}
  /* One bar of 56 px for every role: the menu, the page name, search and the person. The menu opens as an overlay under the bar. */
  :root{--bar:56px}
  .sidebar{position:fixed;inset:var(--bar) 0 0 0;z-index:25;width:auto;display:none;flex-direction:column;padding:12px 14px calc(18px + env(safe-area-inset-bottom,0px));overflow-y:auto;overscroll-behavior:contain}
  .sidebar[data-expanded="true"]{display:flex}
  body:has(.sidebar[data-expanded="true"]){overflow:hidden}
  .sidebar-heading{display:none}
  .sidebar nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px;overflow:visible;flex:none}
  .sidebar nav a,.drawer-help{flex-direction:row;justify-content:flex-start;gap:10px;min-height:48px;padding:10px 12px;margin:0;white-space:normal;font-size:15px;line-height:1.25;text-align:left;border-radius:12px;background:#1a2a41;overflow-wrap:anywhere}
  .sidebar nav a.active{background:var(--nav-line)}
  .nav-group{grid-column:1/-1;margin:12px 4px 2px;text-align:left;font-size:11px;letter-spacing:1.4px}
  .nav-group:first-child{margin-top:0}
  .drawer-more{display:grid;gap:6px;margin-top:12px;padding-top:12px;border-top:1px solid var(--nav-line)}
  .drawer-help{display:flex;align-items:center;color:var(--nav-ink);text-decoration:none}
  .drawer-help .nav-icon{opacity:.8}
  .company{display:block;margin-top:auto;padding:14px 4px 0}
  .workspace{margin:0;min-height:0}
  .topbar{position:sticky;top:0;z-index:30;height:var(--bar);min-height:var(--bar);padding:0 6px 0 4px;gap:4px;background:var(--nav);border-bottom:0;color:#fff}
  .topbar .prototype-label,.topbar a.help-trigger{display:none}
  .topbar .module-menu{display:inline-flex;flex:none;align-items:center;gap:6px;min-height:44px;padding:0 10px 0 8px;border:0;border-radius:var(--radius);background:transparent;color:#fff;font-size:15px;font-weight:600;box-shadow:none}
  .topbar .module-menu:hover,.topbar .module-menu[aria-expanded="true"]{background:#24344c}
  .topbar-title{display:block;flex:1;min-width:0;padding-left:4px;font-size:17px;line-height:1.15;font-weight:650;color:#fff;overflow-wrap:anywhere}
  .topbar-back{display:inline-flex;align-items:center;gap:6px;flex:1;min-width:0;min-height:44px;padding:0 8px;font-size:17px;font-weight:650;color:#fff;text-decoration:none}
  .topbar-back span{font-size:26px;line-height:1;margin-top:-3px}
  .top-actions{flex:none;flex-wrap:nowrap;gap:0;margin-left:auto}
  .top-actions>.global-search-trigger{width:44px;min-width:44px;height:44px;min-height:44px;padding:0;justify-content:center;border:0;border-radius:var(--radius);background:transparent;color:#fff}
  .global-search-trigger:hover{background:#24344c;color:#fff}
  .global-search-trigger span{display:none}
  .topbar .workspace-menu>summary{width:44px;height:44px;min-height:44px;padding:0;justify-content:center;border:0;border-radius:50%;background:transparent}
  .topbar .workspace-menu>summary:hover,.topbar .workspace-menu[open]>summary{background:#24344c}
  .who-initials{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--amber);color:#fff;font:700 13px/1 var(--f-num)}
  .who-name,.workspace-role{display:none}
  .workspace-options{position:fixed;right:8px;top:calc(var(--bar) + 4px);width:min(300px,calc(100vw - 16px))}
  .main{padding:16px 14px 32px}
  .stat strong{font-size:17px}
  .grid,.cost-summary{grid-template-columns:1fr}
  .span2{grid-column:auto}
  .tabs{gap:2px}
  .tabs a{padding:8px 9px;font-size:13px;min-height:40px}
  .toolbar,.account-filters{gap:10px}
  .toolbar label,.account-filters label,.toolbar input,.account-filters input,.toolbar select,.account-filters select{width:100%;flex:1 1 100%}
  .toolbar input[type=search],.toolbar input[type=text],.account-filters input[type=search],.account-filters input[type=text],.toolbar .date-field,.account-filters .date-field{width:100%}
  .tabs{flex-wrap:wrap}
  .toolbar>.filters+.filters,.toolbar>small,.account-filters>small{margin-left:0}
  .account-filters label{flex:1;min-width:145px}
  .pagination{flex-direction:column;align-items:start}
  .pagination .page-size{margin-left:0}
  .people-print-document{padding:20px}
  .people-form-editor{min-height:360px}
  .invoice-parties{grid-template-columns:1fr}
  .estimate-header{flex-direction:column}
  .estimate-header>.actions{justify-content:flex-start}
}
@media(max-width:550px){
  .stats .stat strong{overflow-wrap:anywhere}
}

@media(max-width:450px){
  .heading-actions{justify-content:flex-start}
  .record-facts{grid-template-columns:minmax(0,.85fr) minmax(0,1fr);gap:8px 12px}
  .record-facts dt,.record-facts dd{min-width:0;overflow-wrap:anywhere}
  .record-facts .badge{white-space:normal;max-width:100%}
  dialog>.modal-header{padding:12px 16px}
  .modal-body{padding:14px 16px}
  .modal-footer{padding:10px 16px}
}

/* Touch targets */
@media screen and (max-width:700px){
}
@media(max-width:700px),(pointer:coarse){
  .back-link,.toolbar>a:not(.button){display:inline-flex;align-items:center;min-height:44px}
  /* The back link's own 44 px line is its space: no margin under it, so the page title stays near the top of a phone. */
  .back{margin-bottom:0}
  textarea{min-height:80px}
  button,a.button,.filters>a,.filters>button,.tabs a{min-height:44px}
  .actions>a{display:inline-flex;align-items:center;min-height:44px}
  button.icon-button{width:44px;min-width:44px;height:44px}
  input:not([type=checkbox]):not([type=radio]):not([type=hidden]),select,textarea{font-size:16px;min-height:44px;min-width:0}
  input[type=checkbox],input[type=radio]{flex-shrink:0}
  .sidebar nav a{min-height:44px}
  .topbar button,.topbar a.button,.topbar .workspace-menu>summary{min-height:44px}
  button.text,a.button.text{padding-inline:8px}
}

/* ---------- Design-system components (R0) ----------
   Built once, used by every screen; */
.num,.money{font-family:var(--f-num);font-variant-numeric:tabular-nums}
.money{white-space:nowrap}

/* Plate badge: plateBadge() in prototype-profiles.js. */
.plate{display:inline-flex;align-items:stretch;vertical-align:middle;background:var(--plate);color:var(--plate-ink);border:1.5px solid #222;border-radius:5px;font:700 15px/1 var(--f-num);height:28px;overflow:hidden;letter-spacing:.02em;flex:none;white-space:nowrap}
.plate .code{display:flex;align-items:center;padding:0 7px;border-right:1.5px solid #222;font-size:16px}
.plate .em{display:flex;flex-direction:column;justify-content:center;padding:0 5px;font:600 7.5px/1.05 var(--f-ui);letter-spacing:.08em;text-align:center}
.plate .em.long{max-width:44px;white-space:normal;overflow-wrap:anywhere;font-size:7px}
.plate .no{display:flex;align-items:center;padding:0 8px 0 2px;font-size:18px}
.plate.plain .no{padding:0 8px}
.plate.sm{height:22px;font-size:12px}
.plate.sm .code{font-size:13px;padding:0 5px}
.plate.sm .no{font-size:14px}
.plate.sm .em{font-size:6px;padding:0 4px}
.plate.sm .em.long{max-width:36px;font-size:5.5px}
small .plate,td .plate{margin-right:4px}

/* Cards: a .panel is the card; .card-edge adds a status edge. */

/* List row: plate, title + subtitle, amount, chip. */
.list-rows{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-l);overflow:hidden}
.list-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto auto;gap:6px 14px;align-items:center;padding:11px 14px;border-top:1px solid var(--line);color:inherit;text-decoration:none;cursor:pointer}
.list-row:first-child{border-top:0}
a.list-row:hover,.list-row:hover{background:var(--soft);text-decoration:none}
.list-row[aria-selected="true"]{background:var(--navy-soft)}
.list-row .title{font-weight:600;display:block;overflow-wrap:anywhere}
.list-row .sub{display:block;font-size:13px;color:var(--muted)}
.list-row .amount{font:600 15px var(--f-num);font-variant-numeric:tabular-nums;text-align:right;white-space:nowrap}

/* Car card (advisor): plate, model, customer, chip, time, one next-step button. */

/* Summary figure and age bar. */
.summary-figure{display:grid;gap:2px}
.summary-figure .label{font:500 13px var(--f-ui);color:var(--muted)}
.summary-figure .figure{font:700 26px/1.1 var(--f-num);font-variant-numeric:tabular-nums}
.summary-figure .note{font-size:13px;color:var(--muted)}
.age-bar{display:flex;height:8px;border-radius:4px;background:var(--grey-soft);overflow:hidden}
.age-bar>i{display:block;height:100%}
.age-bar>.current{background:var(--green)}.age-bar>.d30{background:var(--amber)}.age-bar>.d60{background:#d9622b}.age-bar>.d90{background:var(--red)}

/* Inbox card: waiting for you, amber edge, count pill. */
.inbox-card{background:var(--surface);border:1px solid var(--line);border-left:5px solid var(--amber);border-radius:var(--radius-l);padding:12px 14px;margin-bottom:12px}
.inbox-card>h2,.inbox-card>h3{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:0 0 6px;font-size:15px}
.count-pill{display:inline-block;min-width:24px;text-align:center;font:700 13px/1 var(--f-num);padding:3px 9px;border-radius:999px;background:var(--amber);color:#fff}
.inbox-card .item{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 0;border-top:1px solid var(--line)}
.inbox-card .item:first-of-type{border-top:0}

/* Stat strip and tiles with an optional sparkline (sparkline() draws it to scale). */
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin:0 0 12px}
.tile{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-l);padding:10px 12px}
/* A figure's label is a short sentence-case line, in every tile and strip. */
.tile small{display:block;font:500 13px var(--f-ui);color:var(--muted)}
.tile b{display:block;margin:2px 0;font:700 22px/1.2 var(--f-num);font-variant-numeric:tabular-nums}
.tile .delta.up{color:var(--green)}.tile .delta.down{color:var(--red)}
svg.spark{display:block;width:100%;height:28px;margin-top:4px;overflow:visible}
svg.spark polyline{fill:none;stroke:var(--navy);stroke-width:2;stroke-linejoin:round;stroke-linecap:round}
svg.spark circle{fill:var(--navy)}

/* Stepper (job card): done navy, current amber, pending line. stepper(['Received',...], currentIndex) */
.stepper{display:grid;grid-auto-flow:column;grid-auto-columns:1fr;gap:4px;margin:2px 0 10px}
.stepper>div{display:grid;gap:4px;font:600 11.5px var(--f-ui);color:var(--muted);text-align:center}
.stepper>div::before{content:"";height:5px;border-radius:3px;background:var(--line)}
.stepper>.done{color:var(--navy)}.stepper>.done::before{background:var(--navy)}
.stepper>.now{color:var(--ink)}.stepper>.now::before{background:var(--amber)}

/* Folding block: a finished block folds to one line. <details class="fold-block"> */
.fold-block{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-l);padding:12px 14px;margin-bottom:12px}
.fold-block>summary{display:flex;justify-content:space-between;align-items:center;gap:10px;cursor:pointer;list-style:none;font-weight:700;min-height:28px}
.fold-block>summary::-webkit-details-marker{display:none}
.fold-block:not([open])>summary{font-weight:500;color:var(--muted)}
.fold-block:not([open])>summary b{color:var(--ink)}
.fold-block[open]>summary{margin-bottom:8px}

/* Sticky action bar (phone) and bottom tab bar (phone). Markup only; the role lanes wire them. */
.sticky-bar{position:sticky;bottom:0;z-index:3;display:grid;gap:6px;padding:10px 12px calc(12px + env(safe-area-inset-bottom,0px));background:var(--surface);border-top:1px solid var(--line)}
.sticky-bar>button,.sticky-bar>a.button{width:100%;min-height:48px;font-size:16px}
.sticky-bar>small{text-align:center;color:var(--muted)}
.tab-bar{display:none}
@media(max-width:700px){
  .tab-bar{position:fixed;left:0;right:0;bottom:0;z-index:5;display:grid;grid-template-columns:repeat(5,1fr);background:var(--surface);border-top:1px solid var(--line);padding:6px 4px calc(10px + env(safe-area-inset-bottom,0px))}
  .tab-bar>a,.tab-bar>button{display:grid;justify-items:center;gap:3px;min-height:44px;padding:6px 0;border:0;border-radius:0;background:none;color:var(--muted);font:600 11.5px var(--f-ui)}
  .tab-bar>.on{color:var(--navy)}
  .tab-bar .plus{width:44px;height:44px;margin-top:-22px;border-radius:50%;background:var(--amber);color:#fff;display:grid;place-items:center;box-shadow:0 6px 14px rgba(196,130,42,.4)}
}

/* Desk layout (Finance): queues, list, detail, context. Markup only. */
.desk-layout{display:grid;grid-template-columns:228px minmax(0,1fr) 250px;gap:12px;align-items:start}
.desk-queues{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-l);padding:8px}
.desk-queues h4{font:600 11.5px var(--f-ui);letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:12px 10px 6px}
.desk-queue{display:flex;justify-content:space-between;align-items:center;gap:8px;width:100%;min-height:36px;padding:8px 10px;border:0;border-radius:8px;background:none;color:inherit;font-weight:500;text-align:left;box-shadow:none}
.desk-queue:hover{background:var(--soft)}
.desk-queue[aria-pressed="true"],.desk-queue.on{background:var(--navy-soft);color:var(--navy);font-weight:600}
.desk-queue .count{font:600 13px var(--f-num);min-width:26px;text-align:center;padding:2px 7px;border-radius:999px;background:var(--grey-soft);color:var(--grey-ink)}
.desk-queue .count.amber{background:var(--amber-soft);color:var(--amber-ink)}.desk-queue .count.red{background:var(--red-soft);color:var(--red)}
.desk-list,.desk-detail,.desk-context{min-width:0}
.desk-detail,.desk-context{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-l);padding:16px}
/* Finance's Desk (R2): queues | list + detail | context. Below 1000 px the queues become a chip row and the context goes under the detail. */
.desk-work{display:grid;gap:12px;align-content:start;min-width:0}
.desk-queue{text-decoration:none}.desk-queue:hover{text-decoration:none}
.desk-queue .count.red{background:var(--red-soft);color:var(--red)}
.desk-work .list-row .title,.desk-work .list-row .sub{white-space:normal;overflow-wrap:break-word}
/* The chip column of a queue row has one width, so the amounts line up from one row to the next. */
@media(min-width:701px){.desk-work .list-row{grid-template-columns:auto minmax(0,1fr) auto 150px}.desk-work .list-row.no-plate{grid-template-columns:minmax(0,1fr) auto 150px}.desk-work .list-row>.badge{justify-self:end}}
.list-row.no-plate{grid-template-columns:minmax(0,1fr) auto auto}
.list-row>span:first-child input[type=checkbox]{margin-right:8px;vertical-align:middle}
.desk-detail h3,.desk-context h3{font:700 18px var(--f-ui);margin:0 0 2px}
.desk-detail .sub{color:var(--muted);font-size:14px;margin-bottom:12px}
.desk-detail .two{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-bottom:8px}
.desk-detail .mini h5,.desk-context h4{font:600 11.5px var(--f-ui);letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:14px 0 6px}
.desk-detail .mini h5{margin-top:0}
.desk-detail .kv .up{color:var(--green)}
.desk-detail .actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap;margin-top:14px}
.desk-row-actions{display:flex;gap:8px;justify-content:flex-end;flex-wrap:wrap}
.desk-context{display:grid;gap:10px;align-content:start}
.age-legend{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);margin-top:4px}
/* The one menu (menu in prototype-components.js): "⋯" on a row, a word on a page. Items are left-aligned; a destructive item is red. */
.menu{position:relative;display:inline-block}
.menu>summary{list-style:none;cursor:pointer}
.menu>summary::-webkit-details-marker{display:none}
.menu-list{position:absolute;right:0;top:calc(100% + 4px);z-index:6;min-width:200px;display:grid;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 8px 24px rgba(19,32,51,.14);padding:4px}
.menu-list>a,.menu-list>button{display:flex;align-items:center;justify-content:flex-start;width:100%;min-height:36px;padding:6px 10px;border:0;border-radius:6px;background:none;color:var(--ink);text-align:left;font-weight:500;text-decoration:none;white-space:nowrap}
.menu-list>a:hover,.menu-list>button:hover{background:var(--soft)}
.menu-list>button.danger,.menu-list>a.danger{color:var(--red)}
.menu-list>button.danger:hover{background:var(--red-soft)}
.fold-money{white-space:nowrap}
details[open]>summary .fold-money{display:none}
@media(max-width:1100px){.desk-layout{grid-template-columns:228px minmax(0,1fr)}.desk-context{grid-column:1/-1}}
@media(max-width:1000px){
 .desk-layout{grid-template-columns:minmax(0,1fr)}
 .desk-queues{display:flex;flex-wrap:wrap;gap:6px;padding:8px}
 .desk-queues h4{display:none}
 .desk-queue{flex:none;width:auto;min-height:40px;border:1px solid var(--line);border-radius:999px;white-space:nowrap;gap:8px}
 .desk-queue.on{border-color:var(--navy)}
 .desk-context{grid-column:auto}
}
@media(max-width:700px){.desk-row-actions>*{flex:1 1 100%}.desk-detail .two{grid-template-columns:1fr}.desk-detail .actions>*{flex:1 1 100%}.list-row{grid-template-columns:auto minmax(0,1fr) auto}.list-row .badge{grid-column:2/-1;justify-self:start}.list-row.no-plate{grid-template-columns:minmax(0,1fr) auto}.list-row.no-plate .badge{grid-column:1/-1}}

/* ---------- Print ---------- */
@media print{
  .sidebar,.topbar,.tabs,.actions,button,.footnote,.section-navigation,.table-scroll-controls,.invoice-receipts{display:none!important}
  .workspace{margin:0}
  .main{padding:0}
  .panel{border:0;box-shadow:none}
  .print-only{display:block}
  .draft-title{color:var(--red)}
  body{background:white}
  body:has(.people-print-document) .main>*:not(.people-print-document){display:none!important}
  /* An invoice or credit note prints alone, without the job header and the panels around it. */
  .people-print-document{max-width:none;margin:0;padding:12mm!important}
  .people-form-text{font-size:11pt;line-height:1.6}
    .people-form-controls{display:none!important}
}

.table-export{display:flex;justify-content:flex-end;margin:4px 0 0}
.count-input{width:110px;margin-left:auto;text-align:right}
@media print{.table-export{display:none!important}}

/* ---------- Payslips, leave balances, salary advances ---------- */
.leave-stats .stat strong{font-size:18px}
.leave-warning{margin-top:8px}
.payslip-document{max-width:760px}
.payslip-parties{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:8px 0 12px}
.payslip-table{border:1px solid var(--line);border-radius:var(--radius-l);overflow:hidden;margin:8px 0}
.payslip-table table{white-space:normal}
.payslip-net td{background:#f8f9fb}
.payslip-summary{font-weight:600}
.advance-schedule summary{cursor:pointer;font-size:11px}
@media print{.payslip-actions{display:none!important}}

/* ---------- VAT return and statements ---------- */
.vat-return .vat-total td{font-weight:650;border-top:1px solid var(--line)}
.statement-document .record-facts{margin:0 0 12px}
.statement-document .statement-opening td{color:var(--muted)}
.statement-totals{max-width:360px}
.statement-title{display:none}
@media print{.statement-title{display:block;font-size:16px;font-weight:650;margin:0 0 8px}.back,.heading-actions,.page-band{display:none!important}}

/* ---------- Section spacing and collapsible dialog sections ---------- */
.spaced{margin-top:20px}

/* Settings → Company: the logo beside its file chooser, and the message from a failed save at the top of the long form. */
.settings-logo{display:flex;align-items:flex-start;gap:14px}
.settings-logo-preview{flex:none;display:flex;align-items:center;justify-content:center;width:160px;height:72px;padding:6px;border:1px dashed var(--line-strong);border-radius:var(--radius);background:var(--hover)}
.settings-logo-preview img{max-width:100%;max-height:100%;object-fit:contain}
.settings-logo-controls{display:grid;gap:4px;min-width:0}
.settings-logo-controls .actions{justify-content:flex-start;margin:0}
.logo-note{color:var(--muted)}
.logo-note.bad{color:var(--status-alert-ink)}
#settings-form>.error{margin:0 0 12px}
#settings-form input:disabled{background:var(--hover);color:var(--muted);cursor:not-allowed}
@media (max-width:640px){.settings-logo{flex-wrap:wrap}}

/* ---------- Customer and vehicle search, customer form, registration parts ---------- */
.plate-fields{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:10px 14px}
.plate-fields legend{font-size:11.5px;font-weight:600;margin-bottom:6px}
.plate-fields>p{grid-column:1/-1;margin:0}
.customer-fields{padding:0}
.customer-warnings:empty{display:none}
.customer-warnings .banner{margin:0 0 6px;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
@media (max-width:640px){.plate-fields{grid-template-columns:1fr 1fr}.plate-fields>:first-child{grid-column:1/-1}}

/* ---------- Performance tiles, Today and the activity log (prototype-insights.js) ---------- */
.kpi-value{display:block;font-size:22px;font-weight:650;letter-spacing:-.4px;line-height:1.25;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.kpi-change{font-size:12px;font-weight:600;color:var(--brand)}
.kpi-change.down{color:var(--ink)}
.kpi-base{font-size:11.5px;line-height:1.4;color:var(--muted)}
.insurer-card{padding:12px 14px}
.insight-figures{margin:0 0 6px;white-space:normal}
.insight-figures th{padding:4px 0 4px 8px;background:none;white-space:nowrap}
.insight-figures th:first-child{padding-left:0}
.insight-figures td{padding:5px 0 5px 8px;font-variant-numeric:tabular-nums}
.insight-figures td:first-child{padding-left:0}
.insight-figures td:first-child{color:var(--muted)}
/* Records that need checking sit next to the totals they are left out of (owner decision 2026-10-03, I-4). */
details.records-to-check{margin:-4px 0 12px;font-size:12.5px}
details.records-to-check>summary{color:var(--amber)}
details.records-to-check ul{margin:6px 0 0;padding-left:18px;line-height:1.6}
/* The receipt dialog: the payer's open invoices, each with the amount the receipt applies to it (I-6). */
.receipt-allocation{width:100%;border-collapse:collapse;font-size:12.5px}
.receipt-allocation th,.receipt-allocation td{padding:6px 8px;border-bottom:1px solid var(--line);text-align:left;vertical-align:middle}
.receipt-allocation th.numeric,.receipt-allocation td.numeric{text-align:right}
.receipt-allocation td small{display:block;color:var(--muted)}
.receipt-allocation input[type=number]{width:120px;text-align:right}
.visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
/* A customer receipt prints alone, like an invoice (I-8). */
@media print{body:has(.receipt-document) .main *:not(.receipt-document,.receipt-document *,:has(.receipt-document)){display:none!important}}
/* Equipment handover signature (A-6.6): drawn with a finger or the mouse; the canvas must not scroll the page. */
.signature-pad{display:grid;gap:6px;justify-items:start}
.signature-pad canvas{width:100%;max-width:480px;aspect-ratio:480/150;border:1px dashed var(--line-strong);border-radius:var(--radius);background:#fff;touch-action:none;cursor:crosshair}
.signature-thumb{height:32px;width:auto;max-width:120px;border:1px solid var(--line);border-radius:var(--radius-s);background:#fff}


/* Technician: complete with an optional photo or note. */

/* The workshop board as cards on a phone. */

/* Advisor home: search first, then cards that work with a thumb. */

@media screen and (max-width:700px){
  .heading-actions:has(.toolbar){width:100%}.heading-actions .toolbar{margin:0}
}
/* One rule for every table on a phone (enhancePhoneLists in prototype.js; */
@media screen and (max-width:1100px){
  .table-scroll-controls:has(+ .table-wrap.as-cards){display:none}
  .table-wrap.as-cards{overflow:visible;border:0;background:transparent;box-shadow:none}
  .table-wrap.as-cards table{min-width:0!important;width:100%!important;table-layout:auto}
  .table-wrap.as-cards colgroup,.table-wrap.as-cards thead{display:none}
  .table-wrap.as-cards td>*{min-width:0;max-width:100%}
  .table-wrap.as-cards table,.table-wrap.as-cards tbody{display:block;width:100%;min-width:0}
  .table-wrap.as-cards tr{display:flex;flex-wrap:wrap;align-items:flex-start;gap:6px 14px;width:100%;margin:0 0 10px;padding:10px 12px;background:var(--surface);border:1px solid var(--line);border-left:4px solid var(--brand);border-radius:var(--radius-l);box-shadow:var(--shadow)}
  .table-wrap.as-cards tr.late{border-left-color:var(--red)}
  .table-wrap.as-cards tr.late td,.table-wrap.as-cards tr.late td:first-child{background:none;box-shadow:none}
  .table-wrap.as-cards tr:hover{background:var(--surface)}
  .table-wrap.as-cards td{display:block;flex:1 1 100%;min-width:0;height:auto;padding:0;border:0;text-align:left!important;white-space:normal;overflow-wrap:anywhere;font-size:14px}
  .table-wrap.as-cards td{order:3}
  .table-wrap.as-cards td.card-lead{order:0;flex:0 0 auto;white-space:nowrap}
  .table-wrap.as-cards td.card-title{order:1;flex:1 1 0;min-width:40%;font-size:15px}
  .table-wrap.as-cards td[data-card-key]{order:1;flex:0 0 auto;margin-left:auto;font:700 17px/1.25 var(--f-num);text-align:right!important;white-space:nowrap}
  .table-wrap.as-cards td.card-menu{order:1;flex:0 0 auto;margin:-6px -8px -6px 0}
  /* A break after the title line: the figures and the rest start on the next line, whatever order the columns come in. */
  .table-wrap.as-cards tr::after{content:"";order:2;flex:0 0 100%;height:0;margin-bottom:-6px}
  .table-wrap.as-cards td[data-label]::before{content:attr(data-label);display:block;margin:0 0 1px;color:var(--muted);font-size:10.5px;font-weight:600;line-height:1.3;text-transform:uppercase;letter-spacing:.3px;white-space:normal}
  .table-wrap.as-cards td[data-card-key]::before{text-align:right}
  .table-wrap.as-cards td[data-shape="line"]{flex:1 1 26%;min-width:84px}
  .table-wrap.as-cards td[data-shape="field"]{padding:2px 0}
  .table-wrap.as-cards td[data-shape="field"]::before{margin-bottom:4px;font-size:12px;text-transform:none;letter-spacing:0;color:var(--ink)}
  .table-wrap.as-cards td[data-shape="field"] :is(input:not([type=checkbox]):not([type=radio]),select,.picker){width:100%;max-width:none}
  .table-wrap.as-cards td.card-zero{color:var(--muted)}
  .table-wrap.as-cards td.card-empty{display:none}
  .table-wrap.as-cards td.card-actions{display:flex;flex-wrap:wrap;gap:8px;padding-top:4px}
  .table-wrap.as-cards td.card-actions>*{flex:1 1 140px;margin:0}
  /* A group heading inside a table (the waiting list's job row) is a heading between cards, not a card. */
  .table-wrap.as-cards tr.group-row{display:block;margin:10px 0 6px;padding:0;background:none;border:0;box-shadow:none}
  .table-wrap.as-cards tr.group-row th{display:block;padding:8px 12px;border:1px solid var(--line);border-radius:var(--radius);white-space:normal;overflow-wrap:anywhere}
}

/* Quick sale lines: the item and description take the room; quantity and price stay narrow. */
.quick-sale-lines{table-layout:fixed;width:100%}
.quick-sale-lines th:nth-child(1),.quick-sale-lines td:nth-child(1){width:26%}
.quick-sale-lines th:nth-child(3),.quick-sale-lines td:nth-child(3){width:76px}
.quick-sale-lines th:nth-child(4),.quick-sale-lines td:nth-child(4){width:132px}
.quick-sale-lines td{padding:6px 8px}
.quick-sale-lines td>select,.quick-sale-lines td>input,.quick-sale-lines input[type=number]{width:100%;min-width:0}
.quick-sale-lines td:nth-child(2) select{margin-top:6px}
/* Error-proofing: live field hints and entry warnings (prototype-checks.js) */
.field-check{display:block;margin-top:2px;font-size:12px;font-weight:400;line-height:1.4;color:var(--muted)}
.field-check:empty{display:none}
.field-check.bad{color:var(--red);font-weight:500}
:is(label,.phone-field):has(>.field-check.bad:not(:empty))>.hint{display:none}
input[aria-invalid="true"],select[aria-invalid="true"],textarea[aria-invalid="true"]{border-color:var(--red)}
.picker:has(.picker-input[aria-invalid="true"]) .picker-input{border-color:var(--red)}
fieldset.choice:has([aria-invalid="true"]) .seg>span{border-color:var(--red)}
.entry-warnings:empty{display:none}
.entry-warnings .banner{margin:6px 0}
.today-health strong{color:var(--red)}
.preline{white-space:pre-line}

/* Management home (R3): */
.home{display:grid;gap:12px;min-width:0;grid-template-columns:minmax(0,1fr)}
.home>*{min-width:0;margin:0}
.home .inbox-card{margin:0}
.home-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;flex-wrap:wrap;margin:0 0 6px}
.home-head h2{margin:0;font-size:15px}
.home-head small{color:var(--muted);font-size:12.5px}
.home-head a{font-size:13px;font-weight:600}
.home-card{padding:12px 14px}
.home-card .kv{align-items:center;min-height:36px;color:inherit;text-decoration:none;font-size:14px}
.home-card a.kv:hover{background:var(--soft)}
.home-card .kv strong{font:600 15px var(--f-num);font-variant-numeric:tabular-nums}
.home-card .kv .up{color:var(--green)}.neg{color:var(--red)}
.home-names{margin:0 0 4px;font-size:13px}
.home-problem{display:block;margin-top:6px;color:var(--red);font-size:13px;font-weight:600;text-decoration:none}
.home .inbox-card .item{color:inherit;text-decoration:none;font-size:14px}
.home .inbox-card .item:hover{background:var(--soft)}
.home .inbox-card .item strong{display:block;font-weight:600}
.home .inbox-card .item small{display:block;color:var(--muted);font-size:13px}
.home .inbox-card .go{flex:none;font-size:13px;font-weight:600;color:var(--navy)}
.home .tiles{margin:0;grid-template-columns:repeat(2,minmax(0,1fr))}
a.tile{display:block;color:inherit;text-decoration:none}
a.tile:hover{background:var(--soft);text-decoration:none}
.tile b{font-size:20px;overflow-wrap:anywhere}
.tile .note,.tile .warn{display:block;font-size:12.5px;color:var(--muted)}
.tile .warn{color:var(--amber-ink,var(--amber));font-weight:600}
.tile .delta{display:block;font-size:12.5px;color:var(--muted)}
@media(min-width:620px){.home .tiles{grid-template-columns:repeat(4,minmax(0,1fr))}.home .tiles>a.tile:last-child{grid-column:span 2}}
@media(min-width:1000px){
  .home{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);align-items:start}
  .home{grid-template-areas:"inbox money" "inbox fin" "perf perf" "lpo next" "lpo people"}
  .home-a-inbox{grid-area:inbox}.home-a-money{grid-area:money}.home-a-fin{grid-area:fin}.home-a-perf{grid-area:perf}.home-a-lpo{grid-area:lpo}.home-a-next{grid-area:next}.home-a-people{grid-area:people}
}
.struck{text-decoration:line-through;color:var(--muted,#6b7280)}

/* A rarely used field group folded behind "More" (bill entry), so a phone shows the short form first. */
.more-fields[open]>summary{margin-bottom:8px}
.settings-group>summary{cursor:pointer}
.settings-group>summary h2{display:inline;margin:0}
.settings-group[open]>summary{margin-bottom:12px}
/* At desktop width the estimate buttons stay side by side; the title gives way, not the buttons. */
@media (min-width:769px){.estimate-header>.actions{flex:none;flex-wrap:nowrap}}

/* Filter bar and summary strip (R3): one pattern for every list. */
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.list-row[hidden]{display:none}
.filter-bar{display:flex;flex-direction:column;gap:8px;margin:0 0 12px}
.filter-bar .filter-search{display:block;width:100%}
.filter-bar .filter-search input{width:100%;max-width:none}
.filter-bar .filters{margin:0}
.filter-bar .filter-count{color:var(--muted);font-size:13px}
.summary-strip{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:8px;margin:0 0 12px}
.summary-strip>.summary-figure{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-l);padding:10px 14px}
.summary-strip .figure{font-size:22px}
@media(min-width:900px){.filter-bar{flex-direction:row;align-items:center}.filter-bar .filter-search{flex:0 0 300px;width:300px}.filter-bar .filters{flex:1 1 auto}.filter-bar .filter-count{margin-left:auto}}
.filter-chips{display:contents}
@media(max-width:700px){
}
.avatar{display:inline-flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:50%;background:var(--navy-soft);color:var(--navy);font:700 15px var(--f-num)}

/* R3 group B: Team rows, To Do rows, Settings panels, Help home cards. */
.settings-group>.panel-header p,.settings-group>p.muted:first-of-type{margin:2px 0 0}
.help-role-cards{display:grid;gap:14px;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));margin:0 0 14px}
.help-role-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-l);padding:14px;display:flex;flex-direction:column;gap:6px}
.help-role-card h2{margin:0;font-size:17px}
.help-role-card .lrows{border-radius:var(--radius)}
.help-role-card .show-all{align-self:flex-start;font-weight:600}
.spending{margin:0 0 4px}
.spending-kinds{margin:0 0 12px;padding:8px 14px}
.spending-kinds summary{cursor:pointer;font-weight:600}
.list-row .row-actions button.text{padding:4px 0;color:var(--navy);font-weight:600}
@media(max-width:700px){.summary-strip>:first-child:nth-last-child(3){grid-column:1/-1}}
/* The advisor's Cars home, the one-page job card, the advisor's phone shell */

/* The job page is a 980 px column at the left edge of the content, like every page; lists and desks use the whole width. */
.job-page{max-width:980px;margin:0}
.job-next{display:grid;gap:6px}
.job-next small{color:var(--muted)}
.job-next-sticky{display:none}
.job-block{scroll-margin-top:12px}
@media(max-width:700px){.job-block{scroll-margin-top:68px}}
.job-block>summary .fold-title{overflow-wrap:anywhere}
.fold-chev{flex:none;width:8px;height:8px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(45deg);margin:0 4px 3px 2px}
.job-block[open]>summary .fold-chev{transform:rotate(-135deg);margin-top:5px}
.job-block[data-state="later"]:not([open])>summary{opacity:.8}
.job-block .fold-body>.panel{border:0;box-shadow:none;padding:0;margin:0 0 12px;background:none}
.job-block .fold-body>.panel>h2,.job-block .fold-body>.panel>.panel-header>h2,.job-block .fold-body>.panel>.panel-header>div>h2{font-size:15px}
.job-block .fold-body .table-wrap{margin-left:-2px;margin-right:-2px}
.fold-result{font-weight:500;color:var(--muted)}
.focus-record{outline:2px solid var(--amber);outline-offset:2px}
@media(max-width:700px){
  .job-next-sticky{display:grid;margin:12px -14px -32px;position:sticky;bottom:0;z-index:4}
  /* The advisor has the bottom bar instead of the menu: the top bar keeps the page name (or the way back from a job card) and the person. */
  #app[data-shell="advisor"] .sidebar,#app[data-shell="advisor"] .topbar .module-menu,#app[data-shell="advisor"] .topbar .top-actions>.global-search-trigger,#app[data-shell="advisor"] .job-band>.back{display:none}
  #app[data-shell="advisor"] .topbar::before{content:"";flex:none;width:26px;height:26px;margin-left:10px;border-radius:7px;background:var(--amber)}
  #app[data-shell="advisor"] .topbar:has(.topbar-back)::before{display:none}
  #app[data-shell="advisor"] .main{padding-bottom:96px}
  #app:has(.job-page,.fp) .tab-bar{display:none}
  #app[data-shell="advisor"] .tab-bar>a,#app[data-shell="advisor"] .tab-bar>button{text-decoration:none;cursor:pointer}
}
@media print{
  .job-next,.back,.fold-chev,.tab-bar{display:none!important}
  body[data-printing] .job-block:not(.print-this),body[data-printing] .job-side:not(:has(.print-this)){display:none!important}
  body:not([data-printing]):has(.invoice-document) .main *:not(.invoice-document,.invoice-document *,:has(.invoice-document)){display:none!important}
  .job-block{border:0;padding:0}
}

/* ---------- Fix-core: quotation print, row menu, waiting sentence ---------- */
.next-wait{margin:0;color:var(--muted);font-weight:500;align-self:center}
.row-actions{text-align:right;white-space:nowrap}
.menu>summary.dots{min-width:36px;padding:0 10px;font-size:18px;line-height:1}
.quotation-facts{margin:0 0 12px}
@media print{.no-print{display:none!important}.menu{display:none!important}.plate{-webkit-print-color-adjust:exact;print-color-adjust:exact}}
@media print{body[data-printing] .record-band{display:none!important}.job-block.print-this>summary{display:none}.job-block.print-this>.fold-body{display:block}}

.statement-note{color:var(--muted);font-size:12px;margin:8px 0}
@media print{.job-block.print-this{border:0!important;box-shadow:none!important;background:none!important}.job-block.print-this>.fold-body{padding:0}}
/* A statement prints alone: no page heading, no date form, no hint. */
@media print{body:has(.statement-document) .main *:not(.statement-document,.statement-document *,:has(.statement-document)){display:none!important}}
/* A customer's printed document carries no status chip ("Balance due", "Draft" and the like are for the screen). */
@media print{.invoice-document>.panel-header .badge,.receipt-document .badge,.statement-document .badge{display:none!important}}
.review-open{margin-bottom:14px;padding-bottom:14px;border-bottom:1px solid var(--line)}
.review-open h2{font-size:15px;margin:0 0 4px}
.sign-in-real>summary{font-weight:600;cursor:pointer;margin-bottom:8px}
.search-more{margin:4px 0 0}
/* People screens (fix-people): attendance exceptions, sticky save, month navigation. */
/* A day's kind is four pills; the chosen one carries the status colour (grey present, red absent, amber leave and day off). */
.attendance-kind .segmented{flex-wrap:nowrap;gap:4px}
.attendance-kind .seg>span{min-height:32px;padding:4px 10px;font-size:13px}
.attendance-kind .seg>input[value="Present"]:checked+span{background:var(--grey-soft);border-color:var(--grey);color:var(--grey-ink)}
.attendance-kind .seg>input[value="Absent"]:checked+span{background:var(--red-soft);border-color:var(--red);color:var(--red)}
.attendance-kind .seg>input[value="Day off"]:checked+span,.attendance-kind .seg>input[value="Leave"]:checked+span{background:var(--amber-soft);border-color:var(--amber);color:var(--amber-ink)}
.attendance-save{position:sticky;bottom:0;z-index:3;background:var(--surface);border-top:1px solid var(--line);padding:10px 0 calc(10px + env(safe-area-inset-bottom,0px));margin-top:8px}
.month-nav{display:flex;gap:8px;flex-wrap:wrap}
@media(max-width:700px){
  .attendance-save>button{width:100%;min-height:48px;font-size:16px}
  .attendance-kind .segmented{flex-wrap:wrap}
  .attendance-kind .seg>span{min-height:44px}
  .table-wrap.as-cards td input[name="overtime"]{width:90px}
}
/* Job cards as list rows on a desktop, Accounting items as buttons */
@media(min-width:701px){
}
button.accounting-setup{background:var(--surface);font:inherit;text-align:left;width:100%;cursor:pointer;box-shadow:none;align-items:flex-start;justify-content:flex-start;white-space:normal;font-weight:400}

/* Insurance hub: the figures strip, the order line and the one line above the Insurers list. */
.record-band .band-tiles>.is-on{box-shadow:inset 0 0 0 2px var(--amber)}

/* ---------- Choices: segmented buttons, and the search-as-you-type picker (prototype-picker.js) ---------- */
.choice{border:0;padding:0;margin:0;min-width:0;display:grid;gap:4px;align-content:start}
.choice>legend{padding:0;margin:0 0 4px;font-size:12px;font-weight:600;color:var(--ink)}
.segmented{display:flex;flex-wrap:wrap;gap:6px}
.seg{position:relative;display:block;font-size:14px;font-weight:500}
.seg>input{position:absolute;inset:0;width:100%;height:100%;opacity:0;margin:0;cursor:pointer}
.seg>span{display:inline-flex;align-items:center;justify-content:center;min-height:var(--control);padding:6px 14px;border:1.5px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font-size:14px;font-weight:500;line-height:18px;text-align:center}
.seg:hover>span{border-color:#aebccb;background:var(--soft)}
.seg>input:focus-visible+span{outline:2px solid var(--amber);outline-offset:2px}
.seg>input:disabled+span{opacity:.5}
fieldset.choice:disabled .seg>span{opacity:.5}
.picker{position:relative;display:grid;gap:4px;min-width:0;align-content:start}
.picker-label{font-size:12px;font-weight:600;color:var(--ink)}
.picker-box{position:relative;min-width:0}
.picker-input{padding-right:34px;text-overflow:ellipsis}
.picker.is-picked .picker-input{font-weight:600}
.picker-input:invalid:not(:focus){border-color:var(--line)}
.picker.has-default .picker-input::placeholder{color:var(--ink)}
.picker-clear{position:absolute;right:2px;top:50%;transform:translateY(-50%);width:32px;height:32px;min-height:0;padding:0;border:0;border-radius:var(--radius-s);background:transparent;color:var(--muted);font-size:20px;line-height:1;font-weight:400}
.picker-clear:hover{background:var(--hover);color:var(--ink)}
.picker-clear[hidden]{display:none}
.picker-box:has(.picker-clear:not([hidden]))::after{display:none}
.picker:not(.is-picked) .picker-box::after{content:"";position:absolute;right:12px;top:50%;width:7px;height:7px;margin-top:-6px;border-right:1.6px solid var(--muted);border-bottom:1.6px solid var(--muted);transform:rotate(45deg);pointer-events:none}
.picker-list{position:fixed;z-index:60;margin:0;padding:4px;list-style:none;background:var(--surface);border:1.5px solid var(--line-strong);border-radius:var(--radius);box-shadow:var(--shadow-pop);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain}
.picker-list[hidden]{display:none}
.picker-option{display:grid;gap:1px;align-content:center;min-height:44px;padding:6px 10px;border-radius:var(--radius-s);cursor:pointer;min-width:0}
.picker-option[aria-selected="true"]{background:var(--navy-soft)}
.picker-option.is-current .picker-main::after{content:"  ✓";color:var(--green);font-weight:700}
.picker-main{font-size:14px;font-weight:600;line-height:1.3;overflow-wrap:anywhere}
.picker-sub{font-size:12px;line-height:1.35;color:var(--muted);overflow-wrap:anywhere}
.picker-empty,.picker-more{padding:10px;font-size:13px;line-height:1.4;color:var(--muted)}
.picker-more{padding-top:6px;font-size:12px}
.grid>.picker,.grid>.choice{align-self:start}
.toolbar>.picker,.account-filters>.picker{flex:0 1 280px;min-width:min(100%,200px)}
.toolbar .picker .picker-input,.account-filters .picker .picker-input{width:100%;max-width:none}
@media(max-width:700px){.toolbar>.picker,.account-filters>.picker{flex:1 1 100%}}
.toolbar>.choice,.account-filters>.choice{flex:0 1 auto}
@media(max-width:700px),(pointer:coarse){
  .seg>span{min-height:44px}
  .picker-clear{width:44px;height:44px}
  .picker-input{padding-right:44px}
}
@media print{.picker-list,.picker-clear{display:none!important}}

/* ---------- Parts on the job card: one row per part, a card on a phone (audit A-20) ---------- */
.parts-actions{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 12px}
.part-rows{list-style:none;margin:0 0 12px;padding:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-l);box-shadow:var(--shadow);overflow:hidden}
.part-row{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(150px,max-content) auto;gap:6px 16px;align-items:center;padding:10px 14px;border-bottom:1px solid var(--line)}
.part-row:last-child{border-bottom:0}
.part-row.late{box-shadow:inset 3px 0 0 var(--status-alert-ink)}
.part-main,.part-status{min-width:0;overflow-wrap:anywhere}
.part-main small,.part-status small{display:block;color:var(--muted);font-size:12px;line-height:1.4}
.part-status{display:grid;justify-items:start;gap:2px}
.part-qty{font:600 15px var(--f-num);font-variant-numeric:tabular-nums;white-space:nowrap}
.part-actions{display:flex;flex-wrap:wrap;gap:6px;justify-content:flex-end}
@media(max-width:700px){
  .part-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"main qty" "status status" "actions actions";padding:12px}
  .part-main{grid-area:main}.part-qty{grid-area:qty;align-self:start}.part-status{grid-area:status}.part-actions{grid-area:actions;justify-content:flex-start}
  .part-actions>button{flex:0 0 auto}
  .parts-actions>button{flex:1 1 150px}
}

/* The quick sale's item rows stack on a phone: each row is a small card with its labels (the table's columns were too narrow for a picker). */
@media(max-width:700px){
  .quick-sale-lines thead{display:none}
  .quick-sale-lines,.quick-sale-lines tbody{display:block;min-width:0!important}
  .quick-sale-lines tr{display:grid;grid-template-columns:1fr 1fr;gap:8px 10px;padding:12px;border-bottom:1px solid var(--line)}
  .quick-sale-lines td.numeric{text-align:left}
  .quick-sale-lines td{display:block;width:auto!important;padding:0;border:0;text-align:left;min-width:0}
  .quick-sale-lines td>input,.quick-sale-lines td .picker{width:100%}
  .quick-sale-lines td:nth-child(1),.quick-sale-lines td:nth-child(2){grid-column:1/-1}
  .quick-sale-lines td::before{content:attr(data-label);display:block;margin-bottom:4px;font-size:12px;font-weight:600;color:var(--ink)}
  .quick-sale-lines td:nth-child(1)::before{display:none}
}

/* A fold's summary line: the title, then its count in quiet text. */
details.panel>summary>small{margin-left:8px;font-weight:400;color:var(--muted)}
/* A list row's amount can name what it is ("Value"), on its own line above the figure (B-34). */
/* A quiet button that removes or ends something reads red (Remove statement, Remove the lock). */
button.text.danger{color:var(--red)}
/* On a phone a row's own action sits on its own line at the left, as a chip does (B-34). */
/* Settings (agent decision, 2026-10-06): one section a tab, its own Save under its fields, labels and hints at a readable size. */
.settings-page .settings-form>.settings-group{margin-bottom:0}
.settings-page label,.settings-page .picker-label{font-size:14px}
.settings-page label .hint,.settings-page small.hint{font-size:13px}
.settings-page .settings-group h3{font-size:15px}
.settings-save{margin-top:12px;justify-content:flex-start}
.settings-activity{margin-bottom:16px}

/* A page title the phone's top bar already shows (agent decision, 2026-10-06). */
@media(max-width:700px){#app[data-shell="advisor"] h1.title-dup{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}}
/* The Insurance page: the order chips sit above the table. */

.more-fields>summary{cursor:pointer;font-weight:600;font-size:14px;color:var(--navy);padding:6px 0}

/* A step with nothing for this person to do is a sentence on the car card, not a button. */
/* ---------- Phone and tablet (ux-4; */
/* A tablet's Job cards: a row has two columns (the car, then the time over the button), so the model and the customer keep their room. */
@media(min-width:701px) and (max-width:1100px){
}

/* A dialog on a phone is a sheet from the bottom edge: its header and its Cancel/Save bar stay in view while the fields scroll. */
@media(max-width:700px){
  dialog{width:100%;max-width:100%;max-height:calc(100dvh - 12px);margin:auto 0 0;border-width:1px 0 0;border-radius:16px 16px 0 0}
  dialog>.modal-header{padding:12px 16px;min-height:56px;display:flex;align-items:center}
  .modal-footer{padding:10px 16px calc(10px + env(safe-area-inset-bottom,0px))}
  .modal-footer .actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .modal-footer .actions>*{min-height:48px;width:100%}
  .modal-footer .actions>:only-child{grid-column:1/-1}
}

/* A fieldset inside a two-column dialog takes the whole row, so the column beside it is never left empty (audit A-49). */
.grid>fieldset.handover-next-service{grid-column:1/-1}
.handover-next-service>.grid{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}

/* Touch sizes: */
@media(max-width:700px),(pointer:coarse){
  body :is(.filter-bar .filters>a,.filter-bar .filters>button,.desk-queue,.attendance-kind .seg>span,.record-heading a){min-height:44px}
  body :is(.filter-bar .filters>a,.filter-bar .filters>button){display:inline-flex;align-items:center}
  body details.menu>summary,body details.menu>summary.dots{min-width:44px;min-height:44px}
  body details>summary,body details:not(.menu,.workspace-menu,.fold-block)>summary{min-height:44px;padding-block:12px}
  body label.check{min-height:44px}
  body :is(td,dd,.kv,.panel-header,.sub,.who,.band-lede,li,.home-head,.search-more,.back,.record-heading,.list-row .title)>a:not(.button):not(.badge),
  body :is(.band-row,.band-meta) a,body .band-lede>a{display:inline-flex;align-items:center;min-height:44px}
  /* Any other link keeps its look and gains a 44 px hit area through its own padding (no layout change: an inline link's padding does not move the line). */
  body :is(main,#dialog) :is(p,small,span,li,td,th,dd,strong,em,b,h2,h3,.kv,.empty,.invoice-card,.fold-body,.panel-header)>a:not(.button):not(.badge):not(.tile):not(.stat):not(.list-row):not(.search-result):not(.lr-link):not(.lr-act a),
  body main>a:not(.button){padding:16px 8px;margin-inline:-8px}
  body .lr-act a:not(.button){display:inline-flex;align-items:center;min-height:44px}
  body .lr-link{padding-block:16px}
  body .home-card .kv{min-height:44px}
  body .pick{display:inline-grid;place-items:center;min-width:44px;min-height:44px}
  body .sidebar .brand{min-height:44px;min-width:44px}
  body .tabs a{min-width:44px;justify-content:center}
  body :is(.toolbar,.account-filters)>a:not(.button){min-height:44px;min-width:44px;justify-content:center}
  /* A short figure that is a link (131.00) still gets a 44 px wide target; the key figure of a card keeps its right edge. */
  body td>a:not(.button):not(.badge){min-width:44px}
  body .table-wrap.as-cards td[data-card-key]>a{justify-content:flex-end}
  body :is(.modal-header button.text,.table-export button,button.text,a.button.text,.picker-clear){min-height:44px}
  body .modal-header button.text{min-width:44px}
  body .date-pick{width:44px;min-width:44px}
}

/* The search dialog keeps one place while results come and go: it opens near the top (a tablet or desktop) or as a tall sheet (a phone). */
dialog:has(#global-query){margin-top:8vh;margin-bottom:auto}
@media(max-width:700px){dialog:has(#global-query){margin:auto 0 0;min-height:calc(100dvh - 12px)}}

/* Home (Management) and the figures on a phone: a lone last tile takes the whole row; a figure and its currency stay on one line. */
@media(max-width:700px){
  .home .tiles>a.tile:last-child:nth-child(odd){grid-column:1/-1}
  .tile b,.kpi-value,.summary-figure .figure,.stat strong{white-space:nowrap;overflow-wrap:normal}
  .home .tile{min-width:0}
}
@media(max-width:450px){
  .heading-actions>:is(a.button,button){flex:1 1 auto}
  .heading-actions{width:100%}
}


/* A panel in a two-column grid keeps its own height, so a short panel beside a tall one leaves no stretched white void (audit B-41). */
.grid>.panel,.grid>section.panel{align-self:start}
/* A row of figure tiles is balanced: six tiles are two rows of three, not five and an orphan (audit A-75). */
.tiles:has(>:nth-child(6):last-child){grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:700px){.tiles:has(>:nth-child(6):last-child){grid-template-columns:repeat(2,minmax(0,1fr))}}
.table-wrap.as-cards td.card-actions>a:not(.button){flex:0 0 auto;display:inline-flex;align-items:center;min-height:44px}

/* The labelled rail of a tablet: each entry is an icon over its name. */
@media(min-width:701px) and (max-width:1100px){
  .sidebar nav a{min-height:54px}
}

/* A filter row on a phone puts two short fields side by side (dates, choices); the search and the pickers take the whole row. */
@media(max-width:700px){
  .toolbar>label,.account-filters>label{flex:1 1 calc(50% - 8px);min-width:0}
  .toolbar>label:has(input[type=search]),.account-filters>label:has(input[type=search]),.toolbar>label:has(.picker),.toolbar>label.span2{flex-basis:100%}
  .toolbar>:is(button,a.button){flex:1 1 calc(50% - 8px)}
}

/* A job card block's title is one line and its result the line under it on a phone, so the currency never splits from its amount (audit A-25). */
.fold-result .sep{font-style:normal}
@media(max-width:700px){
  .job-block>summary .fold-title{display:grid;gap:1px}
  .job-block>summary .fold-result{display:block;font-size:13px;line-height:1.35;overflow-wrap:normal}
  .job-block>summary .fold-result .sep{display:none}
}

/* Finance Home on a phone: the queues are the one Queue menu (like every other section switch); the list shows whole titles and the detail follows it. */
@media(max-width:700px){
  .section-navigation>nav.desk-queues{padding:6px;overflow:visible}
  .section-navigation>nav a.desk-queue{border:0;border-left:3px solid transparent;border-radius:var(--radius-s);white-space:normal}
  .section-navigation>nav a.desk-queue.on{border-left-color:var(--brand);background:var(--navy-soft)}
}
@media(max-width:1000px){
  .desk-work .list-rows{max-height:none;overflow:visible}
  .desk-work .list-row :is(.title,.sub){white-space:normal;overflow:visible;text-overflow:clip}
}
/* On a desktop the list is a box of fixed height: */
@media(min-width:1001px){
  .desk-work .list-rows{background:linear-gradient(var(--surface) 30%,rgba(255,255,255,0)) top/100% 28px no-repeat local,linear-gradient(rgba(255,255,255,0),var(--surface) 70%) bottom/100% 28px no-repeat local,radial-gradient(farthest-side at 50% 0,rgba(19,32,51,.2),rgba(19,32,51,0)) top/100% 9px no-repeat scroll,radial-gradient(farthest-side at 50% 100%,rgba(19,32,51,.2),rgba(19,32,51,0)) bottom/100% 9px no-repeat scroll;background-color:var(--surface)}
  .desk-work .list-row{grid-template-columns:auto minmax(0,1fr) 120px 150px}
  .desk-work .list-row.no-plate{grid-template-columns:minmax(0,1fr) 120px 150px}
  .desk-work .list-row>.badge{justify-self:end}
}

/* Filter chips wrap onto a second row; none is hidden behind a sideways scroll (audit A-3, B-56). */
body .filter-bar .filters{flex-wrap:wrap;overflow:visible}

/* A table that stays a table (two columns) wraps its words on a phone and keeps its figures whole, so it always fits (audit B-60). */
@media(max-width:700px){
  .table-wrap:not(.as-cards) :is(th,td){white-space:normal;overflow-wrap:anywhere}
  .table-wrap:not(.as-cards) :is(td.number,td:has(>input)){white-space:nowrap;overflow-wrap:normal}
  .count-input{width:96px}
}
/* On a tablet a table keeps its words together only where they are figures; names and descriptions wrap instead of widening the page. */
@media(min-width:701px) and (max-width:1100px){
  .table-wrap table:not(.record-table){white-space:normal}
  .table-wrap :is(td.number,th.number){white-space:nowrap}
  .table-wrap :is(th,td){padding-inline:8px}
}
/* The columns of a fixed-width table shrink with the page: tighter padding, a chip never breaks inside its word, a reference breaks only when it must. */
.record-table :is(th,td){padding-inline:8px;overflow-wrap:break-word}
.record-table .badge{white-space:nowrap}

/* A row of a Home card that opens something shows it: a chevron after its figure (audit B-53). */
@media(max-width:700px),(pointer:coarse){
  .home-card a.kv::after{content:"›";flex:none;margin-left:8px;color:var(--muted);font-size:20px;line-height:1}
}

/* The folded part of a long filter form on a phone (enhanceFilterFolds): a quiet "More filters" line over the fields. */
.filter-fold{flex:1 1 100%;min-width:0}
.filter-fold>summary{cursor:pointer;font-weight:600;color:var(--navy)}
.filter-fold-body{margin:8px 0 0}
@media(min-width:701px){.filter-fold>summary{display:none}.filter-fold-body{margin:0}}


/* A plain fact list in a panel (Vehicle details) reads like every other: the name at the left, the value beside it, no browser indent. */
.panel>dl:not([class]){display:grid;grid-template-columns:max-content minmax(0,1fr);gap:8px 20px;margin:0 0 8px;font-size:13.5px;line-height:1.5}
.panel>dl:not([class])>dt{color:var(--muted)}
.panel>dl:not([class])>dd{margin:0;overflow-wrap:anywhere}
@media(max-width:450px){.panel>dl:not([class]){grid-template-columns:minmax(0,.85fr) minmax(0,1fr);gap:8px 12px}}

/* A queue's count never breaks into two lines. */
.desk-queue .count{flex:none;white-space:nowrap}

/* A figure at the end of a Home row stays whole; the words before it give way (audit A-81). */
.home-card .kv strong{white-space:nowrap}

/* A row with no plate (an insurer): the name and its line at the left, the chip at the right, as every other row reads (audit A-61). */
@media(max-width:700px){
}

/* A chip in a card may wrap inside its cell; it never pushes past the card's edge. */
@media screen and (max-width:1100px){.table-wrap.as-cards .badge{white-space:normal;max-width:100%}}

/* Finance Home on a phone: */
@media(max-width:700px){.desk-work>.desk-detail{order:-1}}

/* The action under a list row's line starts where the line starts, on every row (audit B-34). */

/* A next-step button in a table cell (the insurer's Job cards tab) wraps its words on a tablet, so the table fits the page instead of scrolling inside it. */
@media(max-width:1100px){.table-wrap td :is(a.button,button){white-space:normal;text-align:center;height:auto}}

/* ---------- Components: */
/* A date, a time or both: typed as dd/mm/yyyy and hh:mm, with a small calendar button. The field's value is kept in a hidden input. */
.date-field{display:flex;align-items:center;gap:6px;position:relative;min-width:0}
.date-text{flex:1 1 112px;min-width:0}
.time-text{flex:0 0 84px;width:84px;min-width:0}
.date-field.time-only .time-text{flex:1 1 84px;width:auto}
.date-pick{flex:none;width:var(--control);min-width:var(--control);padding:0;color:var(--muted)}
.date-pick svg{display:block}
.date-native{position:absolute;left:0;bottom:0;width:1px;height:1px;opacity:0;pointer-events:none}
.date-field:has([aria-invalid="true"]) .date-text,.date-field:has([aria-invalid="true"]) .time-text{border-color:var(--red)}
/* A phone: a country-code choice and the number; the stored value is in a hidden input. */
.phone-field{display:grid;gap:4px;min-width:0;align-self:start}
.phone-label{font-size:12px;font-weight:600;color:var(--ink)}
.phone-row{display:flex;gap:6px;align-items:flex-start;min-width:0}
.phone-code{flex:0 0 112px;min-width:0}
.phone-code .picker-clear{display:none}
.phone-code .picker-list{min-width:230px}
.phone-text{flex:1 1 120px;min-width:0}
.phone-field:has([aria-invalid="true"]) .phone-text{border-color:var(--red)}
.phone-field .hint{display:block;font-weight:400;font-size:12px;line-height:1.4;color:var(--muted)}
@media(max-width:700px),(pointer:coarse){.phone-text,.phone-code .picker-input{min-height:44px;font-size:16px}}
/* A number shows its thousands separators while the field is not being edited (the input keeps the plain number). */
.num-field{position:relative;display:block;min-width:0;font-size:14px}
.num-field>input{font-size:inherit!important}
.num-field.has-view>input:not(:focus){color:transparent}
.num-view{position:absolute;inset:0;display:flex;align-items:center;padding:0 10px;font-size:inherit;line-height:18px;font-family:var(--f-ui);pointer-events:none;color:var(--ink);overflow:hidden;white-space:nowrap}
.num-field>input:focus~.num-view{display:none}
.num-field:has(>.count-input) .num-view,.receipt-allocation .num-view,td.numeric .num-view,.num-field:has(>input[name="overtime"]) .num-view{justify-content:flex-end}
.num-field>input::-webkit-outer-spin-button,.num-field>input::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}
.num-field>input[type=number]{-moz-appearance:textfield;appearance:textfield}
/* A number field with a width of its own gives the same width to its wrapper, so the view sits over the input. */
.num-field:has(>.count-input){width:110px;margin-left:auto}
.receipt-allocation .num-field{width:120px;margin-left:auto}
.num-field:has(>input[name="overtime"]){width:90px}
@media(max-width:700px),(pointer:coarse){.num-field{font-size:16px}}
/* A file: one button in the product's words, the chosen file's name, a way to take it back. */
.file-field{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0;position:relative}
.file-input{position:absolute;left:0;top:0;width:1px;height:1px;opacity:0;pointer-events:none}
.file-pick{flex:none}
.file-name{flex:1 1 120px;min-width:0;font-size:13px;font-weight:400;color:var(--muted);overflow-wrap:anywhere}
.file-field.has-file .file-name{color:var(--ink)}
.file-field:has(.file-input[aria-invalid="true"]) .file-pick{border-color:var(--red)}
/* A table's total: one row at the foot, in bold, over a heavier line. */
tfoot td,tfoot th{font-weight:700;background:var(--soft);border-top:1px solid var(--line-strong);border-bottom:0;text-transform:none;letter-spacing:0;font-size:13.5px;color:var(--ink)}
tfoot th{text-align:left}

/* One disclosure: every closed "More", "Rules" or history fold has the same chevron and the same bold line; the summary's small text follows the title. */
details:not(.menu,.workspace-menu,.fold-block)>summary{list-style:none;cursor:pointer;display:flex;align-items:center;gap:8px;min-height:32px;font-weight:600}
details:not(.menu,.workspace-menu,.fold-block)>summary::-webkit-details-marker{display:none}
details:not(.menu,.workspace-menu,.fold-block)>summary::before{content:"";flex:none;width:7px;height:7px;margin:0 6px 0 2px;border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);transform:rotate(-45deg);transition:transform .12s}
details[open]:not(.menu,.workspace-menu,.fold-block)>summary::before{transform:rotate(45deg)}
details:not(.menu,.workspace-menu,.fold-block)>summary>small{font-weight:400;color:var(--muted)}

/* Audit A fixes (ux-7a, 2026-10-06). One rule each, for every screen that uses the builder. */
/* N-A-10: a Home row that opens something has its chevron in a third column, never on a line of its own. */
@media(max-width:700px),(pointer:coarse){.home-card a.kv{grid-template-columns:minmax(0,42%) minmax(0,1fr) auto}.home-card a.kv::after{margin-left:0}}
/* N-A-11: a group heading in a boxed list does not touch the box edge. */
/* A-24: the quotation total is stated once on a desktop (the totals table is in view); the phone keeps the leading figure. */
@media(min-width:1001px){.quotation-screen .estimate-headline{display:none}}
/* Menu items are 44 px tall where a finger is the pointer (phone and touch tablet). */
@media(max-width:700px),(pointer:coarse){.menu-list>a,.menu-list>button{min-height:44px}}
/* A second line of a Home row starts on its own line, so no separator dot is left at the end of the first. */
.home-card .kv small.line{display:block}
/* N-B-17: a queue row's tick box sits beside the plate, never on it. */
.list-row .lead-pick{display:flex;align-items:center;gap:6px}
.list-row .lead-pick .pick{flex:none}
@media(min-width:701px){.desk-work .list-row.no-amount{grid-template-columns:auto minmax(0,1fr) 150px}.desk-work .list-row.no-plate.no-amount{grid-template-columns:minmax(0,1fr) 150px}}

/* ---------- Receive vehicle (owner approved, 2026-10-06): one sheet, two blocks, one bar ---------- */
.rv-cols{display:grid;gap:12px;align-items:start;counter-reset:rv}
.rv-block{background:var(--surface);border-radius:16px;overflow:hidden;box-shadow:0 1px 0 var(--line);counter-increment:rv}
.rv-block.is-now{box-shadow:0 0 0 2px var(--amber)}
.rv-head{display:flex;align-items:center;flex-wrap:wrap;gap:8px 10px;padding:12px 18px;min-height:56px;background:var(--tint);border-bottom:1px solid var(--line)}
.rv-head h3{margin:0;flex:none;display:flex;align-items:center;gap:12px;font:700 17px/1.2 var(--f-ui)}
.rv-sum{flex:1;min-width:0;color:var(--muted);font-size:13.5px;overflow-wrap:anywhere}
.rv-body{padding:16px 18px 18px}
.rv-block.is-folded .rv-body{display:none}
.rv-block.is-folded .rv-head{cursor:default}
.rv-picked{border:1.5px solid var(--navy);background:var(--navy-soft);border-radius:12px;padding:12px}
.rv-picked-head{display:flex;align-items:center;gap:12px}
.rv-picked-head>div{flex:1;min-width:0;display:grid}
.rv-facts{display:flex;flex-wrap:wrap;gap:4px 16px;margin:8px 0 0;font-size:13.5px}
.rv-facts b{font-family:var(--f-num);font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.rv-new .button{width:100%;min-height:52px;border:1.5px dashed #a9b6c8;background:none;color:var(--navy);font-weight:700}
.rv-group-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.rv-group-head h4{margin:0;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.rv-quick{display:flex;flex-wrap:wrap;gap:6px}
.rv-quick-box{display:grid;gap:8px;grid-template-columns:minmax(0,1fr)}
.rv-quick{min-width:0}.rv-quick button{white-space:normal;text-align:left;max-width:100%;line-height:1.25;padding-block:6px}
.rv-quick .button,.rv-quick button{min-height:36px;min-width:44px;padding:0 12px;border-radius:999px;background:var(--soft);font-size:13.5px}
.rv-quick button{border:1px solid var(--line)}
/* The categories are a row of tabs, the complaints chips under them: a chosen complaint carries a tick, the open category an underline. */
.rv-quick.rv-cats{gap:0 16px;border-bottom:1px solid var(--line);padding-bottom:0}
.rv-quick.rv-cats button{background:none;border:0;border-radius:0;padding:0 2px;min-height:40px;color:var(--muted);font-weight:600;box-shadow:inset 0 -2px 0 transparent}
.rv-quick.rv-cats button.is-open{color:var(--navy);box-shadow:inset 0 -3px 0 var(--navy)}
.rv-quick.rv-cats button.has-on{color:var(--navy)}
.rv-quick button.is-on{background:#e8eef7;border-color:var(--navy);color:var(--navy);font-weight:600}
.rv-quick button.is-on::before{content:'✓ '}
.rv-lead{flex:0 0 100%;color:var(--muted);font-size:12px;font-weight:600;letter-spacing:.04em}
.rv-complaint{display:grid;gap:8px}
.rv-complaint-label{font-size:13px;font-weight:700}
.rv-tags{display:flex;flex-wrap:wrap;gap:6px}
.rv-tags:empty{display:none}
.rv-tag{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:0 12px;border-radius:999px;background:var(--navy);color:#fff;border:0;font-size:13.5px;font-weight:600}
.rv-tag span{opacity:.8}
.rv-missing{margin-top:10px;padding:12px;border:1.5px dashed var(--amber);border-radius:12px;display:grid;gap:8px}
.rv-missing p{margin:0}
#reception-open-visits .actions{margin-top:6px}
.vin-count{font:600 12.5px var(--f-num);font-variant-numeric:tabular-nums;color:var(--muted)}
.vin-count.ok{color:var(--green)}
[data-rule="vin"]{font-family:var(--f-num);letter-spacing:.08em;text-transform:uppercase}
.picker-option.has-badge{grid-template-columns:auto minmax(0,1fr);column-gap:10px;align-items:center}
.picker-option.has-badge>.plate{grid-row:span 2}
.picker-option.has-badge>.picker-note{grid-column:1/-1}
.picker-option.has-swatch{grid-template-columns:auto minmax(0,1fr);column-gap:10px;align-items:center}
.swatch{width:18px;height:18px;border-radius:50%;border:1px solid rgba(0,0,0,.25);flex:none}
.picker-note{font-size:12.5px;color:var(--amber-ink)}
@media(min-width:900px){
  .rv-cols{grid-template-columns:1fr 1fr}
  .rv-block .rv-head [data-action="rv-edit"]{display:none}
}
/* On a phone or a tablet the sheet fills the screen; Car folds to one line when it is done. */
@media(max-width:899px){
  /* The sheet fills the screen: its fields take the space and scroll, so the action bar sits at the foot of the screen, never half way up. */
  .rv-quick .button,.rv-quick button,.rv-tag{min-height:44px}
}

/* The insurer of a job: its own pill after the customer line (owner, 2026-10-06). Documents missing sits under the time line, never in the button column. */

/* ---------- Visual hierarchy (owner-approved 2026-10-06; */
:root{--ctl:46px}
/* A pressed choice is filled; a cost's destination has its own colour (Job navy, Inventory teal, Expense amber, Equipment plum). */
.seg>input:checked+span{background:var(--navy);border-color:var(--navy);color:#fff;font-weight:700}
.seg:hover>span{background:var(--tint)}
.cost-choice .seg>input[value="jobpart"]:checked+span,.cost-choice .seg>input[value="job"]:checked+span{background:var(--navy2);border-color:var(--navy2)}
.cost-choice .seg>:is(input[value="stock"],input[value="consumable"],input[value="scrap"]):checked+span{background:var(--teal);border-color:var(--teal)}
.cost-choice .seg>input[value="expense"]:checked+span{background:var(--amber);border-color:var(--amber);color:var(--amber-on)}
.cost-choice .seg>input[value="equipment"]:checked+span{background:var(--plum);border-color:var(--plum)}
.cost-tag{display:inline-flex;align-items:center;border-radius:999px;padding:2px 10px;font:700 12px/1.3 var(--f-ui);color:#fff;background:var(--navy2)}
.cost-tag.Inventory{background:var(--teal)}.cost-tag.Expense{background:var(--amber);color:var(--amber-on)}.cost-tag.Equipment{background:var(--plum)}

/* The dark identity band at the top of a record page. */
.record-band{background:var(--navy);color:#fff;border-radius:16px;padding:16px 20px 18px;display:grid;gap:12px;margin-bottom:16px}
.record-band .back{margin:0}
.record-band .back-link{color:#b9c9e3;font-weight:600;font-size:14px}
.record-band .band-row{display:flex;flex-wrap:wrap;align-items:center;gap:8px 14px;min-width:0}
.record-band h1{font:700 26px/1.15 var(--f-ui);margin:0;color:#fff;overflow-wrap:anywhere;text-wrap:balance;flex:0 1 auto}
.record-band .band-lede{margin:0;color:#c9d6ea;font-size:15px}
.record-band .band-meta{margin:0;color:#c9d6ea;font-size:14px}
.record-band :is(.band-lede,.band-meta,.band-row) a:not(.button):not(.badge):not(.back-link){color:#fff;text-decoration:underline;text-decoration-color:rgba(255,255,255,.4);text-underline-offset:2px}
.record-band .band-row b{color:#fff}
.record-band .band-actions{margin-left:auto;display:flex;align-items:center;gap:8px}
.record-band .band-actions :is(button,a.button,summary.button){background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.28);color:#fff}
.record-band .band-actions :is(button,a.button,summary.button):hover{background:rgba(255,255,255,.2)}
.record-band .stepper{margin:2px 0 0;gap:6px}
.record-band .stepper>div{color:#b9c9e3;font-size:12.5px}
.record-band .stepper>div::before{height:8px;border-radius:99px;background:rgba(255,255,255,.18)}
.record-band .stepper>.done{color:#b9c9e3}.record-band .stepper>.done::before{background:#7fd1a5}
.record-band .stepper>.now{color:#fff}.record-band .stepper>.now::before{background:var(--amber)}

/* A form: one readable column of numbered sections, the summary beside it (a bar at the foot of a phone). */
.form-layout{display:grid;gap:16px;align-items:start}
@media(min-width:980px){.form-layout{grid-template-columns:minmax(0,760px) 340px}}
.form-sections{display:grid;gap:14px;min-width:0}
.form-section{background:var(--surface);border-radius:16px;overflow:hidden;box-shadow:0 1px 0 var(--line)}
.form-section>header{display:flex;align-items:center;gap:12px;padding:12px 18px;background:var(--tint);border-bottom:1px solid var(--line)}
.form-section>header h2{font:700 17px/1.2 var(--f-ui);margin:0;flex:1}
.form-section .num{flex:none;width:28px;height:28px;border-radius:8px;background:var(--navy);color:#fff;display:grid;place-items:center;font:700 14px var(--f-num)}
.form-section.done .num{background:var(--green)}
.form-section-body{padding:16px 18px 18px;display:grid;gap:14px}
.form-section-body>*{margin:0}
.form-section :is(input:not([type=checkbox]):not([type=radio]),select,textarea,.picker-input){min-height:var(--ctl);font-size:16px}
.form-section :is(.hint,small.hint){font-weight:500;color:var(--muted);font-size:13px}
.form-section label,.form-section .picker-label,.form-section legend{font-size:14px}
.form-section .grid{gap:14px}
.reveal-link{border:0;background:none;box-shadow:none;color:var(--navy2);font-weight:700;padding:0;min-height:32px;justify-content:flex-start}
.reveal-link:hover{background:none;text-decoration:underline;border:0}
.reveal-body{display:grid;gap:14px;margin-top:8px}
.reveal.is-open>.reveal-link{display:none}
.drop-zone{display:flex;align-items:center;gap:14px;border:2px dashed #9fb0c7;border-radius:12px;padding:14px 16px;background:var(--field);cursor:pointer;min-height:78px}
.drop-zone .ic{width:46px;height:46px;border-radius:12px;background:var(--navy);color:#fff;display:grid;place-items:center;flex:none;font-size:20px}
.drop-zone b{display:block;font-size:16px;color:var(--ink)}
.drop-zone.has{border-style:solid;border-color:var(--green);background:var(--green-soft)}.drop-zone.has .ic{background:var(--green)}
.drop-zone input[type=file]{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}
.drop-zone:focus-within{outline:3px solid #7aa3dc;outline-offset:2px}
.drop-wrap{position:relative;display:grid;gap:6px}

/* The summary: figures and the one primary action. */
.summary-panel{background:var(--navy);color:#fff;border-radius:16px;padding:20px;display:grid;gap:12px;align-content:start}
.summary-panel h3{margin:0;font:700 16px var(--f-ui);color:#c9d6ea}
.summary-panel .sum-row{display:flex;justify-content:space-between;align-items:baseline;gap:12px;font-size:15px}
.summary-panel .sum-row>span:first-child{color:#b9c9e3}
.summary-panel .sum-row b{font:600 17px var(--f-num);font-variant-numeric:tabular-nums;text-align:right}
.summary-panel .sum-total{border-top:1px solid rgba(255,255,255,.2);padding-top:12px}
.summary-panel .sum-total b{font:700 34px/1 var(--f-num)}
.summary-panel button.primary,.next-box :is(button.primary,a.button.primary){background:var(--amber);border-color:var(--amber);color:var(--amber-on);font-weight:800}
.summary-panel button.primary:hover,.next-box :is(button.primary,a.button.primary):hover{background:#dc9530;border-color:#dc9530}
.summary-panel>button.primary{min-height:52px;font-size:17px;width:100%;border-radius:12px}
.summary-panel .sum-problems{background:#fff;color:var(--red);border-radius:10px;padding:10px 12px;font-size:14px;display:grid;gap:4px;font-weight:700}
.summary-panel .sum-problems button{border:0;background:none;color:var(--red);text-decoration:underline;padding:0;min-height:0;text-align:left;font-weight:600;white-space:normal;justify-content:flex-start;box-shadow:none}
@media(min-width:980px){.form-layout>.summary-panel{position:sticky;top:16px}}
@media(max-width:979px){
  .form-layout>.summary-panel{position:sticky;bottom:0;z-index:8;margin:0 -16px -16px;border-radius:16px 16px 0 0;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));grid-template-columns:1fr auto;align-items:center;gap:8px 12px}
  .form-layout>.summary-panel>h3,.form-layout>.summary-panel>.sum-row:not(.sum-total){display:none}
  .form-layout>.summary-panel .sum-total{border:0;padding:0;display:grid;gap:0}.form-layout>.summary-panel .sum-total b{font-size:26px;text-align:left}
  .form-layout>.summary-panel>button.primary{width:auto;padding:0 22px}
  .form-layout>.summary-panel .sum-problems{grid-column:1/-1}
}
@media(max-width:700px){.form-layout>.summary-panel{margin-inline:-14px}}

/* Quiet panels, the amber "what happens now" box and big figures. */
.quiet-panel{background:var(--tint);border-radius:16px;padding:16px;display:grid;gap:8px;font-size:14px}
.quiet-panel h3{margin:0 0 2px;font:700 13px var(--f-ui);text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}
.quiet-panel .r{display:flex;justify-content:space-between;gap:12px}
.quiet-panel.record-details{grid-template-columns:repeat(auto-fill,minmax(300px,1fr));column-gap:32px;margin-top:16px}
.quiet-panel.record-details>h3{grid-column:1/-1}
.quiet-panel .r span:first-child{color:var(--muted)}
.quiet-panel .r b{text-align:right;overflow-wrap:anywhere;font-weight:600}
.next-box{background:var(--amber-soft);border:2px solid var(--amber);border-radius:16px;padding:16px 18px;display:flex;flex-wrap:wrap;align-items:center;gap:12px 16px}
.next-box .next-what{flex:1;min-width:220px;display:grid;gap:2px}
.next-box .next-what b{font-size:18px}
.next-box .next-what span{color:var(--amber-ink);font-weight:600}
.next-box>.next-wait{margin:0;font-weight:700;color:var(--amber-ink)}
.next-box :is(button,a.button){min-height:48px;padding:0 22px;font-size:16px}

/* The job card page: blocks with tinted header strips, the money and facts on the right. */
.job-page{max-width:1180px}
.job-layout{display:grid;gap:16px;align-items:start}
@media(min-width:1100px){.job-layout.has-side{grid-template-columns:minmax(0,1fr) 320px}}
.job-side{display:grid;gap:14px;min-width:0}
.job-layout>.job-blocks{min-width:0}
.job-blocks{display:grid;gap:14px}
.job-layout .next-box{margin-bottom:0}
.job-block.fold-block{background:var(--surface);border:0;border-radius:16px;padding:0;margin:0;box-shadow:0 1px 0 var(--line)}
/* No overflow:hidden on a block: it would clip the ⋯ menu that opens inside it; the heading carries the rounded corners instead. */
.job-block.fold-block>summary{border-radius:16px}
.job-block.fold-block[open]>summary{border-radius:16px 16px 0 0}
.job-block.fold-block>summary{background:var(--tint);padding:12px 18px;min-height:56px;border-bottom:1px solid transparent;gap:12px;justify-content:flex-start}
.job-block.fold-block[open]>summary{border-bottom-color:var(--line);margin-bottom:0}
.job-block.fold-block>summary .fold-title{flex:1;min-width:0;font-size:17px}
.job-block.fold-block>summary .fold-result{font-size:14px}
.job-block.fold-block:not([open])>summary{font-weight:700;color:var(--ink)}
.job-block .fold-body{padding:16px 18px 18px}
.job-block .fold-body>.panel:last-child{margin-bottom:0}
.job-block .num{flex:none;width:28px;height:28px;border-radius:8px;background:var(--navy);color:#fff;display:grid;place-items:center;font:700 14px var(--f-num)}
.job-block[data-state="done"] .num{background:var(--green)}
.job-block[data-state="now"] .num{background:var(--amber);color:var(--amber-on)}
.job-block[data-state="later"] .num,.job-block[data-state="idle"] .num{background:var(--grey)}
.job-block[data-state="now"]{border-left:6px solid var(--amber)}
@media(max-width:700px){
  .record-band{border-radius:14px;padding:14px 14px 16px;margin-bottom:12px}
  .record-band h1{font-size:21px}
  .job-block.fold-block>summary{padding:10px 14px}
  .job-block .fold-body{padding:14px}
}
/* Dialogs that are forms with sections and a summary (Receive money). */
dialog.form-sheet{width:min(1060px,96vw)}
dialog.form-sheet .modal-body{background:var(--bg)}
dialog.form-sheet .form-layout{min-width:0}
@media(min-width:980px){dialog.form-sheet .form-layout{grid-template-columns:minmax(0,1fr) 320px}}
dialog.form-sheet .modal-footer{background:var(--surface)}
dialog.form-sheet .modal-footer .actions{justify-content:flex-start}
@media(max-width:979px){
  dialog.form-sheet .form-layout>.summary-panel{position:sticky;bottom:-16px;margin:0 -20px -16px}
}
@media(max-width:700px){
  dialog.form-sheet{width:100%;max-width:100%}
  dialog.form-sheet .form-layout>.summary-panel{margin:0 -16px -14px}
}
.job-layout .job-next-head{margin-bottom:14px}
.job-layout .job-next-head .next-box{margin:0}
.job-next-sticky{background:var(--navy);color:#fff;border-radius:14px 14px 0 0;padding:10px 14px;grid-template-columns:1fr;gap:4px}
.job-next-sticky small{color:#c9d6ea}
.job-next-sticky :is(button.primary,a.button){background:var(--amber);border-color:var(--amber);color:var(--amber-on);font-weight:800;width:100%;min-height:48px}
.job-next-sticky .next-wait{color:#fff}
@media(max-width:700px){.job-layout .job-next-head{display:none}.job-next-sticky{margin:12px -14px -16px}}

/* New bill: items, the supplier card, the payment line. */
.purchase-entry .error[data-summary]{display:none}
.purchase-line{border:1.5px solid var(--line);border-left-width:6px;border-radius:12px;padding:14px;margin:0 0 12px;background:var(--surface)}
.purchase-line[data-cost="Job"]{border-left-color:var(--navy2)}.purchase-line[data-cost="Inventory"]{border-left-color:var(--teal)}.purchase-line[data-cost="Expense"]{border-left-color:var(--amber)}.purchase-line[data-cost="Equipment"]{border-left-color:var(--plum)}
.purchase-line>legend{font:700 12px var(--f-ui);text-transform:uppercase;letter-spacing:.06em;color:var(--muted);padding:0 6px}
.item-money{display:grid;grid-template-columns:minmax(80px,.6fr) minmax(0,1fr) minmax(100px,auto);gap:12px;align-items:end}
.item-amount{display:grid;gap:4px;text-align:right}
.item-amount span{font-size:13px;font-weight:700}
.item-amount output{font:700 22px/1 var(--f-num);font-variant-numeric:tabular-nums;padding-bottom:10px}
.item-foot{display:flex;justify-content:flex-end;margin-top:4px}
@media(max-width:640px){.item-money{grid-template-columns:1fr 1fr}.item-amount{grid-column:1/-1;text-align:left;display:flex;justify-content:space-between;align-items:baseline}.item-amount output{padding:0}}
.add-row{border:2px dashed #9fb0c7;border-radius:12px;background:none;min-height:50px;font-weight:700;color:var(--navy2);width:100%}
.add-row:hover{background:var(--tint)}
.chosen-new{display:flex;align-items:center;gap:14px;border-radius:12px;padding:12px 14px;background:var(--navy-soft)}
.chosen-new>div{display:grid;gap:2px;flex:1;min-width:0}.chosen-new b{font-size:18px}.chosen-new .cost-tag{justify-self:start;margin:4px 0}
.due-line{margin:0;font-size:16px}
.reveal-link.inline{display:inline;min-height:0}
.form-band{margin-bottom:16px}
dialog.form-sheet .error[data-summary]{display:none}
dialog.form-sheet .form-section-body .table-wrap{margin:0 -4px}
.due-line{display:flex;flex-wrap:wrap;align-items:center;gap:0 6px}
@media(max-width:700px),(pointer:coarse){.reveal-link,.reveal-link.inline{min-height:44px;display:inline-flex;align-items:center}}
@media(max-width:700px){.record-band{gap:8px}.form-band .band-lede{display:none}.record-band .back-link{display:inline-flex;align-items:center;min-height:32px}}
@media(max-width:700px){.form-band{display:flex;align-items:center;gap:12px;padding:6px 14px}.form-band .band-head{flex:1}.form-band h1{font-size:20px}}
.record-facts dd>.badge{justify-self:start;align-self:start}

/* Band actions, Receive vehicle as numbered sections under a dark foot, header strips of figures (Home, Job cards). */
.record-band .band-actions :is(button,a.button).primary{background:var(--amber);border-color:var(--amber);color:var(--amber-on);font-weight:800}
.record-band .band-actions :is(button,a.button).primary:hover{background:var(--bg)}
.rv-head h3::before{content:counter(rv);flex:none;width:28px;height:28px;border-radius:8px;background:var(--navy);color:#fff;display:grid;place-items:center;font:700 14px var(--f-num)}
.rv-block[data-rv=car].is-folded .rv-head h3::before{content:'✓';background:var(--green)}
.rv-block.is-folded .rv-head{border-bottom:0}
.photos-count:not(:empty){display:block;margin-top:2px;font-size:13px;font-weight:700;color:var(--ink)}
.record-band .band-tiles{display:grid;margin:2px 0 0;gap:8px;grid-template-columns:repeat(auto-fit,minmax(104px,1fr))}
.record-band .band-tiles>*{background:rgba(255,255,255,.1);border:0;border-radius:12px;padding:10px 14px;color:#fff;text-decoration:none;display:grid;gap:0}
.record-band .band-tiles b{color:#fff;font:700 30px/1.1 var(--f-num)}
.record-band .band-tiles span{color:#c9d6ea;font-size:13px}
.record-band .band-tiles .red b{color:#ffb4a9}.record-band .band-tiles .green b{color:#7fd1a5}.record-band .band-tiles .amber b{color:#f3c987}
.record-band .band-tiles a:hover{background:rgba(255,255,255,.18)}
.today-band .band-head h1,.advisor-band .band-head h1{font-size:28px}
.home .inbox-card:not(.is-empty){background:var(--amber-soft);border:2px solid var(--amber);border-radius:16px;padding:14px 18px}
.home .inbox-card:not(.is-empty) .item{border-top-color:rgba(126,79,12,.25)}
.home .inbox-card:not(.is-empty) .item:hover{background:rgba(255,255,255,.55)}
.home .inbox-card:not(.is-empty) .go{background:#fff;color:var(--navy);box-shadow:inset 0 0 0 1.5px var(--navy);border-radius:999px;padding:6px 14px;font-weight:800}
.home .inbox-card:not(.is-empty) .item:first-of-type .go{background:var(--amber);color:var(--amber-on);box-shadow:none}
@media(max-width:700px){
  .advisor-band{padding:10px 12px 12px;margin-bottom:10px}
  .advisor-band .band-head{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
  .advisor-band .band-lede{display:none}
  .today-band .band-tiles{gap:6px;margin:0}
  .today-band .band-tiles{grid-template-columns:repeat(4,minmax(0,1fr))}
  .today-band .band-tiles>*{padding:8px 4px;text-align:center}
  .today-band .band-tiles b{font-size:22px}.today-band .band-tiles span{font-size:11.5px}
}
.advisor-band .band-head{justify-content:space-between}
.advisor-band .band-head h1{flex:1}
.form-section fieldset.sticker-fields{border:0;padding:0;margin:0}
.form-section fieldset.sticker-fields>legend{display:none}
@media(max-width:700px){
  .person-band{padding:6px 14px 12px;gap:6px}
  .person-band .back{height:26px;display:flex;align-items:center}
  .person-band .back-link{min-height:26px}
  .person-band h1{font-size:22px}
}


.record-band .band-figure{font:700 20px var(--f-num);font-variant-numeric:tabular-nums;margin-left:4px}
@media screen{.invoice-document>.panel-header{display:none}}
.journal-summary.balanced .sum-total b{color:#7fd1a5}
.journal-summary>button:not(.primary){background:rgba(255,255,255,.12);border-color:rgba(255,255,255,.28);color:#fff}
.desk-queue .queue-amount{display:block;font:600 12px var(--f-num);color:var(--muted);font-variant-numeric:tabular-nums}
.desk-queue.on .queue-amount{color:var(--navy)}
.desk-queue .count:not(.red):not(.amber){background:var(--navy-soft);color:var(--navy)}
.list-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;padding:8px 4px 6px;font-size:14px}
.list-head b{font:700 15px var(--f-ui);color:var(--ink)}
.quick-sale-lines{table-layout:fixed;font-size:14px}
.quick-sale-lines th:nth-child(1){width:30%}.quick-sale-lines th:nth-child(3){width:110px}.quick-sale-lines th:nth-child(4){width:160px}
.quick-sale-lines .num-field{width:100%;margin:0}
.quick-sale-lines input[type=number]{width:100%;text-align:right}
@media(max-width:700px){.record-band .band-actions{flex-wrap:wrap;margin-left:0;max-width:100%}}
@media(max-width:700px){.form-layout>.journal-summary{grid-template-columns:1fr 1fr;margin:0 -14px -14px}.form-layout>.journal-summary>.sum-row:not(.sum-total){display:flex;flex-direction:column;align-items:flex-start;gap:0}.form-layout>.journal-summary>.sum-total{grid-column:1/-1}.form-layout>.journal-summary>button{width:100%}}
/* The page band (heading() in prototype.js), tabs under it, figures as band tiles. */
.record-band .band-eyebrow{color:#b9c9e3;font:600 12.5px var(--f-ui);letter-spacing:.06em;text-transform:uppercase}
.page-band .band-head{justify-content:space-between;flex-wrap:nowrap}
.page-band .band-head h1{flex:1 1 auto;min-width:0}
.page-band .band-actions{flex-wrap:wrap;justify-content:flex-end}
.page-band .band-actions .toolbar,.page-band .band-actions .actions{margin:0;display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.page-band .band-actions>.badge{align-self:center}
@media(max-width:700px){.page-band{padding:10px 14px 12px}.page-band .band-head{flex-wrap:wrap}.page-band .band-actions{width:100%;justify-content:flex-start}.page-band .band-actions>:is(a.button,button){flex:1 1 auto}}
/* Figures: tiles in the band; a strip further down the page is a dark panel of the same tiles. */
.record-band .band-tiles small{color:#c9d6ea;font-size:12.5px;opacity:.9}
.record-band .band-tiles small a{color:#fff}
.record-band .band-tiles .neg,.stats .neg{color:#ffb4a9}
.stats,.summary-strip{background:var(--navy);border:0;border-radius:16px;gap:8px;padding:8px;color:#fff;box-shadow:none;overflow:visible}
.stats{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
.stats>.stat,.summary-strip>.summary-figure{background:rgba(255,255,255,.1);border:0;border-radius:12px;padding:10px 14px;color:#fff}
.stats .stat strong,.summary-figure .figure{color:#fff}
.stats .stat span,.stats .stat>span:first-child,.summary-figure .label,.summary-figure .note{color:#c9d6ea}
.stats .stat a,.summary-figure a{color:#fff}
a.stat:hover,.stats a.stat:hover{background:rgba(255,255,255,.18)}
.stat.tone-wait{background:rgba(208,138,34,.28);box-shadow:none}.stat.tone-wait strong{color:#f3c987}
@media(max-width:700px){.stats,.stats:has(>:nth-child(3)){grid-template-columns:1fr 1fr}.stats>.stat{border:0!important}}
.payroll-headline{margin-bottom:12px}
.payroll-headline .summary-figure{background:var(--navy);border-radius:16px;padding:12px 16px}
.payroll-headline .figure{color:#fff}.payroll-headline :is(.label,.note){color:#c9d6ea}
/* Section cards: a tinted header strip; tables: a tinted header row; empty states: one quiet dashed card. */
.panel>.panel-header:first-child{margin:-14px -16px 12px;padding:10px 16px;background:var(--tint);border-bottom:1px solid var(--line);border-radius:15px 15px 0 0}
.panel>.panel-header:first-child h2{font:700 16px var(--f-ui);color:var(--ink)}
th{background:var(--tint);color:var(--ink2);font-weight:700}
.empty{background:var(--tint);border:2px dashed var(--line-strong);border-radius:16px;text-align:center;padding:28px 20px;box-shadow:none}
.empty h2{font:700 17px var(--f-ui);margin:0 0 4px;color:var(--ink)}
.empty p{margin:0 auto 10px;max-width:56ch;color:var(--muted)}
.record-band .band-tiles b :is(span,a),.stats .stat strong :is(span,a){font:inherit;color:inherit}
@media(max-width:700px){.page-band .band-tiles{grid-template-columns:repeat(2,minmax(0,1fr))}.page-band .band-tiles>*{min-width:0}.page-band .band-tiles b{font-size:20px;white-space:nowrap}.page-band .band-tiles small{display:none}.page-band .band-tiles span{overflow-wrap:anywhere}}

.sticker-fields .grid>label:has(input:disabled){display:none}
/* One amber per list: only a late car's next step is filled; the others are the quiet secondary. */
@media(min-width:701px) and (max-width:1100px){
}

.summary-panel button.primary.danger{background:var(--red);border-color:var(--red);color:#fff}
.summary-panel button.primary.danger:hover{background:#8f3a2e;border-color:#8f3a2e}
.attendance-check{display:grid;gap:8px}
.attendance-check ul{margin:0;padding-left:18px;display:grid;gap:4px}

.date-shortcuts{display:flex;gap:6px;flex-wrap:wrap;margin:-4px 0 4px}
.date-shortcuts button{min-height:44px}
.record-band .badge.navy{background:#3c6199}
/* Performance pages: the key figure sits in the page band. */
.band-kpi{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 14px;margin-top:10px}
.band-kpi .kpi-value{color:#fff;font:700 34px/1.1 var(--f-num,var(--f-ui));letter-spacing:-.3px}
.band-kpi .kpi-change{color:var(--amber);font-size:14px}
.band-kpi .kpi-change.down{color:#fff}
.band-kpi .kpi-base{flex-basis:100%;color:rgba(255,255,255,.72);font-size:13px}
.band-crumbs{margin:8px 0 0;font-size:13px;color:rgba(255,255,255,.72)}
.band-crumbs a{color:#fff;text-decoration:underline;text-decoration-color:rgba(255,255,255,.4)}
.inbox-card .item-head{display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}
.inbox-card .item-head strong{display:inline!important}
/* Change owner: the dialog's own close is the only "×"; typing in the picker replaces the owner. */
[data-form="profile-vehicle-owner"] .picker-clear{display:none!important}

.job-quiet-note{margin:0;padding:2px 4px;color:var(--muted);font-weight:500}
.job-side .side-block{margin:0}
.job-side .job-activity .timeline{margin:0;padding-left:18px;font-size:14px}
.job-side .job-activity .timeline li{margin:0 0 6px}
.activity-all>summary{cursor:pointer;color:var(--navy);font-weight:600;min-height:44px;display:flex;align-items:center}
.doc-checklist{list-style:none;margin:8px 0 12px;padding:0;border:1px solid var(--line);border-radius:12px;overflow:hidden;background:var(--surface)}
.doc-checklist li{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:8px 12px;padding:6px 12px;border-bottom:1px solid var(--line)}
.doc-checklist li:last-child{border-bottom:0}
.doc-checklist .doc-name{min-width:0;display:grid;justify-items:start;gap:3px;overflow-wrap:normal}
.doc-checklist .doc-action{min-width:84px;text-align:right}
.inspection-note>h2+p{margin:0 0 8px}
@media(max-width:700px){
  .job-band .record-band .band-actions,.record-band.job-band .band-actions{flex-wrap:nowrap;margin-left:auto;max-width:none}
  .job-block>summary .fold-result .fold-money{display:block}
}
@media(max-width:700px){
  .record-band.job-band .band-head h1{flex:1 1 120px;min-width:0}
  /* The plate and title first, the status under them, the buttons beside the status. */
  .record-band.job-band .band-head::after{content:"";order:1;flex:0 0 100%;height:0}
  .record-band.job-band .band-head>.badge{order:2}
  .record-band.job-band .band-head .band-actions{order:3;margin-left:auto}
}

/* A summary figure still empty reads 0.00; a long value wraps inside the panel and its button stays inside. */
.summary-panel .sum-money b:empty::before{content:'0.00'}
.summary-panel{min-width:0}
.summary-panel .sum-row>span:first-child{min-width:0;overflow-wrap:anywhere}
.summary-panel .sum-row{flex-wrap:wrap}
.summary-panel .sum-row b{min-width:0;overflow-wrap:break-word;max-width:100%;margin-left:auto}
.summary-panel>button,.summary-panel>.button{max-width:100%;white-space:normal}
/* Quantity and Price labels share one top; the amount keeps the foot of the row. */
.item-money{align-items:start}
.item-money .item-amount{align-self:end}
/* Bills: one width for the status pill, so every amount ends at the same place. */
/* A figure on a white panel (the Home side panels) keeps dark text. */
.desk-context .summary-figure .figure{color:var(--ink)}
.desk-context .summary-figure :is(.label,.note){color:var(--muted)}
/* A pill in a label-and-value row keeps its own size. */
.kv>.badge{justify-self:start;align-self:center}
/* The toast sits at the foot of the screen (the right on a desktop), so it never covers a page title. */
#toast{top:auto;bottom:24px;left:auto;right:24px;margin-inline:0;transform:translateY(8px);max-width:min(380px,calc(100vw - 48px))}
#toast.show{transform:translateY(0)}
@media(max-width:700px){#toast{left:16px;right:16px;bottom:calc(84px + env(safe-area-inset-bottom,0px));margin-inline:auto;max-width:calc(100vw - 32px);font-size:13px;padding:8px 14px}}
/* A strip at the top of a panel inside a job block fills its flat corners (no notch). */
.job-block .fold-body .panel>.panel-header:first-child{border-radius:0}
/* The phone foot bar: the figure keeps its own width and the button takes the rest (and wraps), so neither is squeezed or widens the dialog. */
@media(max-width:979px){
  .form-layout>.summary-panel:not(.journal-summary){grid-template-columns:auto minmax(0,1fr)}
  .form-layout>.summary-panel>button.primary{width:100%;min-width:0;padding:0 12px;font-size:16px;line-height:1.15}
  .form-layout>.summary-panel .sum-total b{white-space:nowrap}
  .form-layout>.summary-panel .sum-total span{max-width:140px}
}

.pay-pick{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px;margin:-8px 0 -8px -10px;cursor:pointer}
.pay-pick input{margin:0;width:18px;height:18px}
.pay-selected{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 16px;margin:0 0 10px;padding:10px 14px;border-radius:var(--radius-l);background:var(--navy-soft)}
.pay-selected[hidden]{display:none}
.pay-selected button:disabled{opacity:.5;cursor:not-allowed}

.journal-summary.unbalanced .sum-total b{color:#ff9d92}
.journal-summary .journal-note{margin:0;background:#fff;color:var(--red);border-radius:10px;padding:10px 12px;font-size:14px;font-weight:700}
.journal-summary .journal-note[hidden]{display:none}
@media(max-width:700px){.form-layout>.journal-summary>.journal-note{grid-column:1/-1}}
.phone-label{display:block}
.fixed-settings .record-facts{grid-template-columns:minmax(150px,32%) minmax(0,1fr);font-size:14px}
.fixed-settings .record-facts dd{font-weight:600;color:var(--ink)}
.fixed-settings .record-facts dd .hint{display:block;font-weight:400;font-size:12.5px;color:var(--muted)}
.xero-figures{margin:12px 0}
.next-box.quiet{background:var(--surface);border:1px solid var(--line)}
.next-box.quiet .next-what b{font-size:16px}
.doc-files>summary{cursor:pointer;color:var(--navy);font-weight:600;min-height:44px;display:flex;align-items:center}

/* The Pay selected and Receive selected bars sit after their list and stay at the foot of the screen while the list scrolls. */
.pay-selected{position:sticky;bottom:12px;z-index:6;margin:12px 0;border:1px solid var(--line);box-shadow:0 6px 20px rgba(11,31,59,.22)}
td>.pay-pick{margin:-10px 0 -10px -10px}
/* The receipt page: the facts sit in a column the width of a receipt, not the width of the screen. */
.receipt-document .record-facts{grid-template-columns:150px minmax(0,1fr);max-width:560px}
.hint.dup-note{color:var(--status-wait-ink);font-weight:600}
.hint.dup-note a{color:inherit;text-decoration:underline}
.band-tiles>:only-child{max-width:380px}

.match-sheet th{white-space:nowrap}
.match-sheet .check{margin:0 6px 0 0;display:inline-flex;vertical-align:middle}
details.book-only>summary{cursor:pointer;min-height:44px;display:flex;align-items:center}

.home-line{display:flex;justify-content:space-between;gap:12px;align-items:center;min-height:44px;color:inherit;text-decoration:none;font-size:14px}
.home-line span{color:var(--navy);font-weight:600;font-size:13px}
form.toolbar.xero-choose{align-items:flex-start}
.home-a-fin{align-self:start}
.record-band .band-tiles>button{font:inherit;text-align:left;cursor:pointer;min-height:44px;border:2px solid transparent}
.record-band .band-tiles>button:is(:hover,.is-on){background:rgba(255,255,255,.18)}
.record-band .band-tiles>button.is-on{border-color:var(--amber)}
.advisor-showing{margin:0 0 10px;font-size:14px;color:var(--muted);display:flex;flex-wrap:wrap;gap:6px 10px;align-items:center}
.form-section .handover-next-service{border:0;padding:0;margin:0}
.form-section .handover-next-service>legend{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0)}
@media(max-width:700px){#app[data-shell="advisor"] [data-action="customer"].primary{background:var(--surface);color:var(--navy);border-color:var(--navy)}}
.file-pick .pick-touch{display:none}
@media(pointer:coarse){.file-pick .pick-desk{display:none}.file-pick .pick-touch{display:inline}}
.quiet-panel a.r{min-height:44px;align-items:center;color:inherit;text-decoration:none}

/* Who pays (owner, 2026-10-06): insurance is a strong filled pill in a colour used for nothing else, anything else is quiet but in words. */
:root{--ins:var(--ins-violet);--ins-ink:#fff;--ins-violet:#7c3aed;--ins-magenta:#a21caf;--ins-sky:#0369a1;--ins-indigo:#3730a3;--ins-brown:#92400e;--ins-teal:#0f766e;--ins-pink:#be185d;--ins-olive:#69701a}
.payer-tag{display:inline-block;max-width:100%;padding:2px 10px;border-radius:999px;font-size:12.5px;font-weight:600;line-height:18px;vertical-align:middle;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.payer-tag.is-insurance{background:var(--ins);color:var(--ins-ink);font-weight:700}
.payer-tag.is-business,.payer-tag.is-customer{background:none;color:var(--muted);border:1px solid var(--line)}
.payer-claim{margin-left:8px;color:var(--muted);font:600 12px var(--f-num);vertical-align:middle}
@media(min-width:701px){
}
.search-result .payer-tag{font-size:12px;padding:1px 8px}
.record-band .payer-tag.is-business,.record-band .payer-tag.is-customer{color:#e4ebf4;border-color:rgba(255,255,255,.45)}
.record-band .payer-claim{color:#cfd9e6}
.record-band .payer-tag.is-insurance{box-shadow:0 0 0 1.5px rgba(255,255,255,.55)}
@media(max-width:700px){
}

.band-tiles .red{color:#fff}

.ins-mark{display:inline-block;width:12px;height:12px;margin-right:8px;border-radius:4px;background:var(--ins);vertical-align:baseline}
.ins-colour .seg>span::before{content:"";display:inline-block;width:12px;height:12px;margin-right:8px;border-radius:4px;background:var(--sw);box-shadow:0 0 0 1.5px #fff}
.ins-colour .seg:has([value=violet]){--sw:var(--ins-violet)}
.ins-colour .seg:has([value=magenta]){--sw:var(--ins-magenta)}
.ins-colour .seg:has([value=sky]){--sw:var(--ins-sky)}
.ins-colour .seg:has([value=indigo]){--sw:var(--ins-indigo)}
.ins-colour .seg:has([value=brown]){--sw:var(--ins-brown)}
.ins-colour .seg:has([value=teal]){--sw:var(--ins-teal)}
.ins-colour .seg:has([value=pink]){--sw:var(--ins-pink)}
.ins-colour .seg:has([value=olive]){--sw:var(--ins-olive)}

.lrows{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-l);container-type:inline-size}
.lrow{display:grid;grid-template-columns:var(--lr);align-items:center;column-gap:16px;padding:8px 18px;min-height:64px;border-top:1px solid var(--line2);position:relative;box-shadow:inset 4px 0 0 var(--edge,transparent);color:inherit}
.lrow[hidden]{display:none}
.lrow:first-child{border-top:0;border-radius:var(--radius-l) var(--radius-l) 0 0}
.lrow:last-child{border-radius:0 0 var(--radius-l) var(--radius-l)}
.lrow:only-child{border-radius:var(--radius-l)}
.lrow:hover{background:#f8fafc}
.lr-group{padding:9px 18px;background:var(--tint,#eef2f8);border-top:1px solid var(--line2);font-weight:700;font-size:14px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.lr-group:first-child{border-top:0;border-radius:var(--radius-l) var(--radius-l) 0 0}
.lr-main{min-width:0}
.lr-title{display:block;font-weight:700;font-size:15.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lr-sub{display:block;font-size:13.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lrows.wrap-sub .lr-sub{white-space:normal;overflow:visible}
.lr-link{color:inherit;text-decoration:none}
.lr-link::after{content:"";position:absolute;inset:0}
.lrow :is(a,button,label,summary,details,input):not(.lr-link){position:relative;z-index:1}
.lr-meta{min-width:0;font-size:14px;color:var(--ink2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lr-meta>:is(.payer-tag,small){margin-right:8px}
.lr-meta a{color:var(--navy);text-decoration:underline}
.lr-status{justify-self:start}
.lr-age{font:600 13px var(--f-num);color:var(--muted);min-width:0}
.lr-when.late{color:var(--red)}
.lr-amt{text-align:right;font:700 16.5px var(--f-num);font-variant-numeric:tabular-nums;white-space:nowrap}
.lr-amt>a{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;min-width:44px;min-height:44px;color:inherit;text-decoration:none}
.lr-amt strong{font:inherit}
.lr-amt small{display:block;font:500 12px var(--f-num);color:var(--muted)}
.lr-lead{display:flex;align-items:center;gap:6px;min-width:0}
.lr-lead>*{flex:none}
.lr-act,.lr-menu{justify-self:end}
.lr-act{display:flex;gap:8px;align-items:center}
.lr-act .primary{background:#fff;color:var(--navy);border-color:var(--line-strong)}
.lrow.is-late .lr-act .primary,.lrow.is-late .lr-act>:is(button,.button):first-child{background:var(--amber);border-color:var(--amber);color:var(--amber-on,#1b1205)}
.lrow .lr-act :is(button,.button){min-height:38px;padding-block:0}
@media(min-width:701px){.lrow .lr-act>:is(button,.button){min-width:170px;justify-content:center}}
@media(pointer:coarse){.lrow .lr-act :is(button,.button){min-height:44px}}
/* Month end: every step's status pill and button share one width, so the seven rows line up. */
@container (max-width:859px){
 .lrow{grid-template-columns:auto auto auto 1fr auto auto;grid-template-areas:"select lead status . age menu" "main main main main amount amount" "meta meta meta meta meta meta" "action action action action action action";column-gap:0;row-gap:0;padding:12px 14px 12px 18px;align-items:center;min-height:0}
 .lrow>:not(:first-child):is(.lr-lead,.lr-status,.lr-age,.lr-menu){margin-inline-start:8px}
 .lr-age{justify-self:end}.lr-select{grid-area:select}.lr-lead{grid-area:lead}.lr-status{grid-area:status}.lr-age{grid-area:age}.lr-menu{grid-area:menu}.lr-main{grid-area:main;margin-top:6px}.lr-amt{grid-area:amount;margin-top:6px}.lr-meta{grid-area:meta;margin-top:4px;white-space:normal}.lr-act{grid-area:action;margin-top:10px;justify-self:start}
 .lr-title{font-size:16px}
 .lr-title,.lr-sub{white-space:normal}
 .avatar-lead{display:none}
 .lrows.sel .lrow{grid-template-areas:"select lead status status status menu" "main main main main amount amount" "meta meta meta meta age age" "action action action action action action"}
 .lrows.sel .lr-age{margin-top:4px}
 /* A row with nothing before its title (no plate, status or age) keeps its menu beside the amount, not on a line of its own. */
 .lrows:not(.sel,.has-figs,.open-work) .lrow:not(:has(>.lr-lead,>.lr-status,>.lr-age)){grid-template-areas:"main main main main amount menu" "meta meta meta meta meta meta" "action action action action action action"}
 .lrows:not(.sel,.has-figs,.open-work) .lrow:not(:has(>.lr-lead,>.lr-status,>.lr-age))>:is(.lr-main,.lr-amt){margin-top:0}
}
@container (max-width:559px){
 .lr-act{justify-self:stretch}.lr-act>*{flex:1}.lrow .lr-act :is(button,.button){min-height:44px;width:100%}
}

.lr-meta .car-chip{display:inline-block;margin:2px 8px 2px 0;border-radius:6px}
.lr-meta .car-chip.hit{box-shadow:0 0 0 3px var(--amber-soft),0 0 0 4.5px var(--amber)}
.lr-meta small{white-space:nowrap}
.open-work .lr-meta,.wrap-text :is(.lr-title,.lr-sub,.lr-meta){white-space:normal}
.open-work .lr-status{white-space:normal;justify-self:stretch;display:grid;gap:4px}
.open-line{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.open-line a{font-weight:600;color:var(--navy)}
.lr-meta .open-line .car-chip{margin:0}.lr-meta .open-line+.open-line{margin-top:6px}
.stage-link{text-decoration:none}
@container (max-width:859px){
 .lrows.open-work .lrow{grid-template-columns:1fr;grid-template-areas:"lead" "main" "meta" "status"}
 .lrows.open-work .lr-status{justify-self:stretch;margin-top:8px}
}
.record-band .band-actions .only-phone{display:none}
@media(max-width:700px){.record-band .band-actions .only-phone{display:block}.record-band .band-actions .not-phone{display:none}}
/* Job cards band label row: one choice (All, an insurer pill each, Cash, Business). */
.record-band .band-labels{min-width:0;max-width:100%;margin:0 0 4px}
.band-labels .filters{margin:0;gap:8px}
.band-labels .filters>button{min-height:44px;background:rgba(255,255,255,.1);border:2px solid transparent;color:#fff;font-weight:600}
.band-labels .filters>button .n{background:rgba(255,255,255,.2);color:inherit}
.band-labels .filters>button.is-insurance{background:var(--ins);color:var(--ins-ink)}
.band-labels .filters>button.active{border-color:var(--amber)}
.band-labels .filters>button.active:not(.is-insurance){background:rgba(255,255,255,.24)}

.global-search-trigger{max-width:360px}.global-search-trigger span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.record-band .band-actions .menu-list>:is(button,a.button){background:none;border:0;color:var(--ink);font-weight:500;padding:6px 10px;justify-content:flex-start}
.record-band .band-actions .menu-list>:is(button,a.button):hover{background:var(--soft)}
.record-band .band-actions .menu-list>button.danger{color:var(--red)}
#toast a{pointer-events:auto;color:#fff;font-weight:700;text-decoration:underline}

.lr-act .next-wait{margin:0;background:none;border:0;color:var(--muted);font-weight:500;text-align:right}
/* The kind of job is one two-way switch; the pressed side is filled. */
.labels-fold>.text{display:none}
@media(max-width:700px){
  .labels-fold>.text{display:flex;align-items:center;min-height:44px;padding:0 14px;border:2px solid transparent;border-radius:999px;background:rgba(255,255,255,.1);color:#fff;font-weight:600;text-decoration:none}
  .labels-fold>.text::after{content:"";margin-left:8px;border:5px solid transparent;border-top-color:currentColor;border-bottom:0}
  .labels-fold:not(.is-open)>.filters{display:none}
  .labels-fold.is-open>.filters{margin-top:8px}
}

.job-block.block-line{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:8px 18px;background:var(--surface);border:1px solid var(--line);border-radius:14px}
.job-block.block-line .fold-title{font-size:15px}
/* Imported from GaragePlug (mapping 2.10): history is labelled and muted, read-only; an excess card kept apart sits under its insurance job. */
.badge.imported-tag{background:transparent;color:var(--muted);border:1px dashed var(--line-strong);font-weight:600}
.record-band .badge.imported-tag{color:#dfe5ee;border-color:rgba(255,255,255,.5)}
.job-page.is-imported .job-blocks{opacity:.82}
tr.is-imported>td{color:var(--muted)}
.lrow.lr-attached{min-height:44px;padding-left:42px;border-top:1px dashed var(--line);background:var(--soft)}
.lrow.lr-attached .lr-title{font-size:14px;font-weight:600}
.job-excess-cards ul{margin:0;padding:0;list-style:none;display:grid;gap:6px}

/* Real-data copy on this laptop (migration/local-real.mjs): a red stripe on every page and a red band in the top bar. */
html[data-real]::before{content:"";position:fixed;inset:0 0 auto 0;height:4px;background:#b3261e;z-index:1000}
.prototype-label.real-data{background:#b3261e;color:#fff;padding:4px 10px;border-radius:var(--radius-s);gap:10px;flex-wrap:wrap}
.prototype-label.real-data b{background:#fff;color:#b3261e}
.prototype-label.real-data span{color:#fff}
.prototype-label.real-data button{min-height:28px;padding:2px 10px;font-size:12px}
.danger-text{color:#b3261e}
@media (max-width:700px){.prototype-label.real-data span{display:inline}.topbar .prototype-label.real-data{display:flex}}
/* The quotation's own print: everything else is hidden while it prints. */
.quotation-share{display:inline-flex;gap:8px;flex-wrap:wrap;margin-top:8px}
@media print{body[data-printing="quotation"]>*:not(#quotation-print-root){display:none!important}}
.quotation-share a.button,.quotation-share button,.quotation-share a.button.text,.quotation-share button.text{min-height:44px;min-width:44px;padding-left:12px;padding-right:12px;display:inline-flex;align-items:center}
.quiet-panel img.done-photo{display:block;max-width:100%;max-height:160px;border-radius:6px;margin:6px 0}
.history-lines{margin:0;padding:0;list-style:none;display:grid;gap:4px}
/* Photos field: the chosen pictures as square tiles with × to take one back. */
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(96px,1fr));gap:10px;margin-top:10px}
.photo-grid:empty{display:none}
.photo-tile{position:relative;display:block;aspect-ratio:1;border:1px solid var(--line);border-radius:12px;background:var(--bg);overflow:hidden}
.photo-img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.photo-clear{position:absolute;top:2px;right:2px;z-index:2;width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:rgba(17,24,39,.72);color:#fff;font-size:22px;line-height:1;cursor:pointer}

/* The list tab (listTab in prototype-components.js): chips and the date fields in one row; a payer's age figures inside its row. */
.list-filters{display:flex;flex-wrap:wrap;align-items:flex-end;gap:8px 14px;margin:0 0 12px}
.list-filters>.filters,.list-filters>form.account-filters{margin:0}
.lr-figs{display:grid;grid-template-columns:repeat(var(--figs),minmax(0,1fr));gap:0 4px;font:600 13.5px var(--f-num);font-variant-numeric:tabular-nums;text-align:right}
.lr-fig{display:flex;flex-direction:column;align-items:flex-end;min-width:0;white-space:nowrap}
.lr-fig small{font:500 11px var(--f-ui);color:var(--muted)}
.lr-fig.late{color:var(--red)}
@container (max-width:859px){
 .lrows.has-figs .lrow{grid-template-areas:"select lead status . age menu" "main main main main amount amount" "meta meta meta meta meta meta" "figs figs figs figs figs figs" "action action action action action action"}
 .lr-figs{grid-area:figs;margin-top:8px;grid-template-columns:repeat(auto-fit,minmax(88px,1fr));gap:6px 8px;text-align:left}
 .lr-fig{align-items:flex-start}
}

.lrow.lr-total{background:var(--tint,#eef2f8);font-weight:700}.lrow.lr-total .lr-title{font-weight:700}
.list-filters>.filters{flex:1 1 100%}
.list-filters>:is(form.account-filters,div.account-filters){flex:1 1 100%}
.list-filters>.filter-search{flex:1 1 100%}.list-filters>.filter-search input{width:100%;max-width:none}
@media(min-width:900px){.list-filters>.filter-search{flex:0 0 300px}}


/* Job cards list (owner, 2026-10-08): two sections, one row per car, the whole row opens the card. Columns: plate, car, stage, waits for, amount, days in. */
/* List sections (Job cards, Customers): a heading with its count over the rows of one kind; is-insurance tints it. */
.lr-group:has(.list-section){padding:0}
.list-section{display:flex;align-items:baseline;gap:10px;width:100%;margin:0;padding:10px 18px;font:inherit;font-size:14px}
.list-section>b{font-size:13px;letter-spacing:.06em;text-transform:uppercase}
.list-section>span{color:var(--muted);font-weight:600}
.lr-group:has(.list-section.is-insurance){background:color-mix(in srgb,var(--ins) 14%,#fff);color:var(--ins)}
.list-section.is-insurance>span{color:inherit}
/* Customers: one row per customer; the figures sit in their own columns, left aligned. */
.customer-list .lr-fig{align-items:flex-start;text-align:left;font:500 14px var(--f-ui)}
.customer-list .lr-figs{text-align:left}
.cu-money{display:flex;flex-direction:column;align-items:flex-end;font:700 15px var(--f-num);font-variant-numeric:tabular-nums;white-space:nowrap}
.cu-money small{font:500 11px var(--f-ui);color:var(--muted)}
.cu-money.late{color:var(--amber-ink,#9a5b00)}
.customer-list .lr-meta .muted,.customer-list .lr-status .muted{white-space:nowrap}
@container (max-width:859px){
 .lrows.customer-list .lrow{display:flex;flex-wrap:wrap;align-items:center;gap:2px 12px;padding:10px 14px 10px 18px}
 .lrows.customer-list .lr-main{flex:1 1 100%;margin:0}
 .lrows.customer-list .lr-meta,.lrows.customer-list .lr-figs,.lrows.customer-list .lr-status,.lrows.customer-list .lr-amt,.lrows.customer-list .lr-act{flex:0 0 auto;margin:0;display:flex;align-items:center;justify-self:auto;width:auto}
 .lrows.customer-list .lr-status{display:flex;flex-wrap:wrap;gap:4px;flex:1 1 100%}
 .lrows.customer-list .lr-meta .car-chip,.lrows.customer-list .lr-status a{display:inline-flex;align-items:center;min-height:44px;margin-block:-10px}
 .lrows.customer-list .lr-meta,.lrows.customer-list .lr-figs{flex:1 1 45%}
 .lrows.customer-list .lr-amt,.lrows.customer-list .lr-act{flex:1 1 calc(50% - 6px)}
 .lrows.customer-list .lr-figs .lr-fig{flex-direction:row;flex-wrap:wrap;gap:0 6px}
 .lrows.customer-list .lr-figs{display:flex;flex-direction:column;justify-content:center;align-items:flex-start}
 .lrows.customer-list .cu-money{align-items:flex-start}
}

/* Job cards board (trial, owner 2026-10-08): one column per payer, compact wide rows with thin separators, no card boxes. */
.job-board{display:flex;gap:12px;align-items:flex-start;overflow:auto;padding-bottom:8px;scroll-snap-type:x proximity;max-width:100%}
.board-col{flex:1 0 250px;min-width:0;scroll-snap-align:start;border:1px solid var(--line);border-radius:8px;background:#fff}
.board-col h3{position:sticky;top:0;z-index:1;margin:0;padding:10px 12px;display:flex;align-items:center;gap:8px;font-size:15px;border-radius:7px 7px 0 0;background:var(--ins);color:#fff}
.board-col h3 b{flex:1;min-width:0}
.board-col h3>span{color:#fff;font-weight:700}
.board-stages{margin:0 0 10px}
.board-stages .filters{margin:0}
.board-stage{position:sticky;top:41px;z-index:1;display:flex;align-items:center;gap:6px;margin:0;padding:6px 12px;font-size:13px;font-weight:700;color:var(--ink);background:var(--stage-bg);border-top:3px solid var(--stage);border-bottom:1px solid var(--line)}
.board-stage.is-received{--stage:#9aa5b4;--stage-bg:#f0f2f5}
.board-stage.is-progress{--stage:#2f6fd0;--stage-bg:#e8f0fb}
.board-stage.is-ready{--stage:#2e9e68;--stage-bg:#e6f5ec}
.board-row{display:block;min-height:44px;padding:8px 12px;border-bottom:1px solid var(--line);color:inherit;text-decoration:none}
.board-row:hover{background:#f5f7fa}
.board-row .br-top{display:flex;align-items:center;gap:8px;min-width:0}
.board-row .br-top>:first-child{flex:none}
.board-row .br-no{font-weight:700;white-space:nowrap;flex:none}
.board-row .br-exno{flex:none;color:var(--muted);font-size:12px;white-space:nowrap}
.board-row .br-car{display:flex;gap:4px;margin-top:2px;min-width:0;font-weight:600}
.board-row .br-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.board-row .br-year{flex:none;white-space:nowrap}
.board-row .br-age{color:var(--muted);white-space:nowrap;margin-left:auto}
.board-row .br-sub{display:flex;align-items:center;gap:6px;margin-top:2px;font-size:13px;color:var(--muted);min-width:0}
.board-row .br-sub-text{flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.board-row .gp-badge{background:none;color:#17703c;border:1px solid #17703c;font-size:10px;line-height:12px;padding:0 4px;font-weight:600}
.board-row .br-warn{display:flex;flex-wrap:wrap;gap:2px 8px;margin-top:3px;font-size:13px;color:var(--amber-ink,#8a5a00);font-weight:500}
.board-row .br-amt{font-weight:500}
.board-none{margin:0;padding:10px 12px;color:var(--muted);font-size:13px}
@media (min-width:700px){.job-board{max-height:calc(100vh - 90px)}}
@media (max-width:600px){.board-col{flex:0 0 85%}}
/* Several job expenses in one sheet: each line is a quiet bordered group; × takes it back, hidden while it is the only one. */
.part-entry{position:relative;border:1px solid var(--line);border-radius:12px;padding:12px 14px;margin:0 0 10px;background:var(--surface)}
.part-entry>legend{font:700 12px var(--f-ui);text-transform:uppercase;letter-spacing:.06em;color:var(--muted);padding:0 6px}
.part-entry-x{position:absolute;top:-6px;right:6px;min-width:44px;min-height:44px;font-size:22px;line-height:1;padding:0}
[data-part-rows]>.part-entry:only-child .part-entry-x{display:none}
.part-add{min-height:44px;margin:0 0 4px}

/* GaragePlug job cards: a small green GP badge beside the plate until they close (owner, 2026-10-08). */
.gp-badge{display:inline-flex;align-items:center;padding:1px 6px;border-radius:4px;background:#17703c;color:#fff;font-size:11px;font-weight:700;letter-spacing:.04em;line-height:16px}

/* Photos & documents on the job card */
.media-open{display:block;width:100%;aspect-ratio:1;padding:0;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--surface);cursor:pointer}
.media-open img{width:100%;height:100%;object-fit:cover;display:block}
.media-icon{display:grid;place-items:center;width:100%;height:100%;font-weight:700;color:var(--navy);font-size:13px}
.gp-block h4{margin:10px 0 0;font-size:13px;color:var(--muted)}
.gp-uses{display:grid;gap:2px;justify-items:start}
.gp-use{white-space:normal}

/* The job card's invoice icons (owner, 2026-10-08): one per document the job will have; grey and not a link until Finance issues it. */
.doc-icons{display:inline-flex;flex-wrap:wrap;gap:8px}
.record-band .doc-icon{display:inline-flex;align-items:center;gap:8px;min-height:36px;padding:4px 12px 4px 10px;border-radius:var(--radius-s,8px);border:1px solid rgba(255,255,255,.45);background:rgba(255,255,255,.14);color:#fff;text-decoration:none;line-height:1.15}
.record-band .doc-icon .doc-text{display:grid;gap:1px;min-width:0}
.record-band .doc-icon b{font-size:13px;color:#fff}
.record-band .doc-icon small{font-size:12px;color:#e3eaf5}
.record-band .doc-icon.is-owed{border-color:var(--amber);background:rgba(208,138,34,.22)}
.record-band a.doc-icon:hover{background:rgba(255,255,255,.24)}
.record-band .doc-icon.is-off{border-style:dashed;border-color:rgba(255,255,255,.35);background:none;cursor:not-allowed}
.record-band .doc-icon.is-off,.record-band .doc-icon.is-off b,.record-band .doc-icon.is-off small{color:#b7c4d8}
.doc-svg{flex:none}
@media(max-width:640px){.record-band .doc-icon{min-height:44px}}
.record-band .band-row .doc-icons a.doc-icon.is-issued:not(.button):not(.badge):not(.back-link){text-decoration:none}
@media(max-width:640px){.doc-icons{display:grid;width:100%;gap:6px}.record-band .doc-icon{min-height:44px}.record-band .doc-icon .doc-text{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 8px}}
/* Receive sheets, Visit step (owner, 2026-10-08): two compact columns where the block is wide enough, one column on a phone. */
.rv-block[data-rv=visit]{container-type:inline-size}
.rv-visit{grid-template-columns:minmax(0,1fr);align-items:start}
.rv-visit .span2{grid-column:1/-1}
.rv-visit .insurance-fields{padding:0}
@container (min-width:520px){.rv-visit{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.rv-visit .insurance-fields{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}}
@container (max-width:519px){.rv-visit .insurance-fields{grid-template-columns:minmax(0,1fr)}}
fieldset.sticker-fields.is-compact{border:0;padding:0;margin:0;min-width:0}
fieldset.sticker-fields.is-compact>legend{display:block;padding:0;margin:0 0 4px;font-size:14px;font-weight:600;color:var(--ink)}
fieldset.sticker-fields.is-compact>.grid{gap:8px 10px}
fieldset.sticker-fields.is-compact>.grid>small{display:none}
.rv-visit .drop-zone{min-height:56px;padding:8px 14px}
.rv-visit .drop-zone .ic{width:36px;height:36px}
.rv-visit .drop-zone b{font-size:15px}
.rv-visit .photo-grid{grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:8px;margin-top:8px}

/* ---------- Form page (owner, 2026-10-08): the reception pages and every data-entry form after them ---------- */
.fp{display:grid;gap:12px;min-width:0}
.fp-body{min-width:0}
.fp-draft{display:grid;gap:8px}
.fp-draft p{margin:0}
/* The one bar at the foot of the page: a short summary and the primary button; on a phone it is the bottom bar. */
.fp-bar{position:sticky;bottom:0;z-index:8;margin:0 -16px -16px;padding:12px 20px calc(12px + env(safe-area-inset-bottom,0px));background:var(--navy);color:#fff;display:grid;gap:8px}
.fp-bar .error{margin:0;max-height:24vh;overflow:auto}
.fp-bar .error:not(:empty){background:#fff;color:var(--red);border-radius:10px;padding:8px 12px;font-weight:700}
.fp-bar .actions{display:flex;align-items:center;gap:12px;margin:0}
.fp-what{flex:1;min-width:0;margin:0;color:#c9d6ea;font-size:14px;overflow-wrap:anywhere}
.fp-what b{color:#fff}
.fp-bar .primary{flex:none;background:var(--amber);border-color:var(--amber);color:var(--amber-on);font-weight:800;min-height:48px;padding:0 24px;font-size:16px}
.fp-bar .primary:hover{background:#dc9530;border-color:#dc9530}
@media(max-width:700px){.fp-bar{margin:0 -14px -14px;padding-inline:14px}}
@media(max-width:899px){.fp-bar .actions{flex-direction:column;align-items:stretch;gap:6px}.fp-bar .primary{width:100%}}
.fp .rv-cols{align-items:stretch}
.fp .rv-block{display:flex;flex-direction:column;box-shadow:0 1px 0 var(--line),0 1px 3px rgba(11,31,59,.08)}
.fp .rv-block>.rv-body{flex:1 1 auto}

/* ---------- Reception pages (owner, 2026-10-08): two columns, the Documents block, the video, the LPO ---------- */
.rv-col{display:grid;gap:12px;align-content:start;min-width:0}
.rv-head h3::before{content:attr(data-n)}
.rv-block[data-rv=car].is-folded .rv-head h3::before{content:'✓'}
.rv-need{display:contents}
.rv-doclist{display:grid;gap:10px}
.rv-doc{border:1px solid var(--line);border-radius:12px;padding:10px 12px;display:grid;gap:6px;min-width:0}
.rv-doc.is-onfile{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;background:var(--tint)}
.rv-doc-name{display:grid;gap:2px;min-width:0}
.rv-doc-name small{color:var(--muted)}
.rv-doc-name .rv-doc-old{color:var(--amber-ink);font-weight:600}
.rv-doc-actions{display:flex;gap:6px}
.rv-lpo-note{margin:0}
.rv-video .file-field{min-width:0}
video.reception-video{width:100%;max-height:70vh;border-radius:12px;background:#000}
@media(max-width:899px){
  .rv-cols{display:flex;flex-direction:column}
  .rv-col{display:contents}
  .rv-block[data-rv=car]{order:1}.rv-block[data-rv=visit]{order:2}.rv-block[data-rv=docs]{order:3}.rv-block[data-rv=lpo]{order:4}
}
@media(min-width:900px){.rv-cols{align-items:start}.fp .rv-cols{align-items:start}}

/* The customer page (owner, 2026-10-08): initials in the band, an amber old-document hint. */
.record-band .band-initials{display:inline-grid;place-items:center;flex:0 0 auto;width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.16);color:#fff;font:700 16px/1 var(--f-num)}
.doc-checklist .doc-old{color:var(--amber-ink);font-weight:600}
.doc-checklist .doc-action button,.doc-checklist .doc-action a{min-width:48px;min-height:44px}
.person-band .band-tiles{grid-template-columns:repeat(auto-fit,minmax(150px,1fr))}
@media (max-width:700px){.person-band .band-tiles{gap:6px}.person-band .band-tiles b{font-size:20px;overflow-wrap:anywhere}}
/* Job card band (jc-page): the job card number is prominent; the stepper shows the date of each finished step and gives way to the stage pill on a phone. */
.record-band.job-band .band-meta .job-no{font:700 17px var(--f-num);color:#fff;letter-spacing:.02em}
.record-band.job-band .stepper>div small{display:block;font:500 11.5px var(--f-num);color:#9fb3d3;margin-top:-2px}
@media(min-width:701px){.record-band.job-band .band-row .doc-icons{margin-left:auto}}
@media(max-width:700px){.record-band.job-band .stepper{display:none}}
.job-side .job-activity>summary{cursor:pointer;min-height:44px;display:flex;flex-wrap:wrap;align-items:center}.job-side .job-activity>summary small{flex:1 0 100%;padding-left:17px}
.job-side .job-activity[open]>summary{margin-bottom:6px}
.job-side .gp-block,.job-side .job-reception .r b{min-width:0}

/* Job card polish (jc-polish): Claim & LPO as three rows, the Documents block, and one Files panel. */
.job-facts{display:grid;gap:0;padding:4px 14px}
.job-fact{display:grid;grid-template-columns:minmax(90px,28%) minmax(0,1fr) auto;align-items:center;gap:4px 12px;min-height:44px;padding:4px 0;border-bottom:1px solid var(--line)}
.job-fact:last-child{border-bottom:0}
.job-fact .k{color:var(--muted);font-size:13.5px}
.job-fact .v{min-width:0;overflow-wrap:anywhere}
.job-fact .a{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:2px}
.job-fact .need{display:inline-block;margin-left:6px;color:var(--amber-ink);font-weight:600}
@media(max-width:700px){.job-fact{grid-template-columns:minmax(0,1fr) auto}.job-fact .k{grid-column:1/-1;font-size:12.5px}.job-fact .v{grid-column:1}}
.doc-later{margin:6px 0 2px;font-size:13px}
.doc-checklist .doc-name small{font-size:12.5px}
.gp-title{margin:14px 0 4px;font-size:13px;color:var(--muted);text-transform:none}
.gp-list,.gp-photos{list-style:none;margin:0 0 8px;padding:0}
.gp-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:2px 8px;border-bottom:1px solid var(--line);min-height:44px}
.gp-open{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:0 8px;border:0;background:none;padding:6px 0;text-align:left;cursor:pointer;min-height:44px;font:inherit;color:inherit}
.gp-icon{display:inline-grid;place-items:center;min-width:34px;height:24px;border-radius:5px;background:var(--surface-2,#eef2f8);color:var(--navy);font:700 10.5px var(--f-num)}
.gp-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.gp-open small{grid-column:2;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.gp-icon{grid-row:1/span 2}
.gp-photos{display:grid;grid-template-columns:repeat(auto-fill,minmax(56px,1fr));gap:6px;margin-top:8px}
.gp-photo{display:grid;gap:0;justify-items:start;min-width:0}
.gp-photo .media-open{width:56px;height:56px;border-radius:8px}
.gp-photo .text{padding:0 2px;font-size:12px}
.job-block[open] .fold-result:has(>.sep+.fold-money:last-child){display:none}
