/* Office admin — the colours come from Brand::styleTag() (the company's scheme);
   these are the fallbacks so the sheet is usable on its own. */
:root {
  --brand:#136a3a; --brand-dark:#0d4f2b; --brand-deeper:#093d20; --brand-soft:#e9f5ee; --brand-tint:#f6faf7; --on-brand:#fff;
  --accent:#f59e0b; --accent-dark:#d97706; --on-accent:#3b2500;
  --ink:#0f172a; --text:#0f172a; --muted:#5b6b7f; --line:#e3e8ef; --line-strong:#cbd5e1;
  --bg:#ffffff; --bg-alt:#f4f6f9;
  --radius:12px; --radius-sm:9px;
  --shadow:0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --shadow-sm:0 1px 2px rgba(15,23,42,.05);
  --font:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --sidebar-w:236px;
}
* { box-sizing:border-box; }
html { -webkit-text-size-adjust:100%; }
body { margin:0; background:var(--bg-alt); color:var(--ink); font:15px/1.55 var(--font); }
a { color:var(--brand); }
h1,h2,h3 { line-height:1.2; margin:0 0 .5rem; letter-spacing:-.01em; }
h1 { font-size:1.45rem; font-weight:800; }
h2 { font-size:1.1rem; font-weight:700; }
code { font-size:.9em; background:var(--bg-alt); padding:.1em .35em; border-radius:5px; }
:focus-visible { outline:2px solid var(--brand); outline-offset:2px; }

/* ------------------------------------------------------------- structure */
.shell { display:flex; min-height:100vh; }
.nav-toggle { position:absolute; opacity:0; width:0; height:0; }
.sidebar {
  width:var(--sidebar-w); flex:0 0 var(--sidebar-w); background:var(--brand-dark); color:#fff;
  padding:1rem 0 .75rem; display:flex; flex-direction:column; position:sticky; top:0; height:100vh; overflow:auto;
}
.sidebar__brand { display:flex; align-items:center; justify-content:space-between; gap:.5rem; padding:.25rem 1rem 1rem; }
.sidebar__logo { display:flex; align-items:center; gap:.6rem; color:inherit; text-decoration:none; min-width:0; }
.sidebar__logo img { display:block; max-height:44px; max-width:180px; width:auto; height:auto; }
.sidebar__mark { flex:0 0 auto; width:38px; height:38px; border-radius:10px; background:var(--brand); color:var(--on-brand); display:grid; place-items:center; font-weight:800; font-size:1.05rem; box-shadow:inset 0 0 0 1px rgba(255,255,255,.15); }
.sidebar__name { font-weight:700; font-size:1rem; line-height:1.2; overflow:hidden; text-overflow:ellipsis; }
.nav-burger { display:none; }
.nav { display:flex; flex-direction:column; gap:2px; padding:0 .6rem; }
.nav a {
  display:flex; align-items:center; gap:.65rem; color:rgba(255,255,255,.78); text-decoration:none;
  padding:.5rem .7rem; border-radius:9px; font-weight:500; font-size:.93rem; transition:background .12s, color .12s;
}
.nav a:hover { background:rgba(255,255,255,.1); color:#fff; }
.nav a.is-active { background:rgba(255,255,255,.16); color:#fff; font-weight:600; box-shadow:inset 0 0 0 1px rgba(255,255,255,.08); }
.nav__icon { width:18px; height:18px; flex:0 0 18px; opacity:.85; }
.nav a.is-active .nav__icon { opacity:1; }
.sidebar__foot { margin-top:auto; padding:.9rem 1rem 0; font-size:.8rem; color:rgba(255,255,255,.7); border-top:1px solid rgba(255,255,255,.1); }
.sidebar__user { display:flex; gap:.6rem; align-items:center; line-height:1.4; }
.sidebar__user strong { color:#fff; font-weight:600; }
.sidebar__user a { color:rgba(255,255,255,.8); }
.sidebar__avatar { flex:0 0 auto; width:30px; height:30px; border-radius:50%; background:rgba(255,255,255,.15); display:grid; place-items:center; font-weight:700; color:#fff; }
.sidebar__foot form { display:inline; }
.sidebar__foot button { background:none; border:0; color:rgba(255,255,255,.8); padding:0; cursor:pointer; text-decoration:underline; font:inherit; }
/* Light sidebar option */
.sidebar--light { background:var(--bg); color:var(--ink); border-right:1px solid var(--line); }
.sidebar--light .nav a { color:var(--muted); }
.sidebar--light .nav a:hover { background:var(--bg-alt); color:var(--ink); }
.sidebar--light .nav a.is-active { background:var(--brand-soft); color:var(--brand-dark); box-shadow:none; }
.sidebar--light .sidebar__foot { color:var(--muted); border-top-color:var(--line); }
.sidebar--light .sidebar__user strong, .sidebar--light .sidebar__user a, .sidebar--light .sidebar__foot button { color:var(--ink); }
.sidebar--light .sidebar__avatar { background:var(--brand-soft); color:var(--brand-dark); }
.sidebar--light .sidebar__name { color:var(--ink); }

.main { flex:1; min-width:0; display:flex; flex-direction:column; }
.topbar {
  display:flex; align-items:center; justify-content:space-between; gap:1rem;
  background:var(--bg); border-bottom:1px solid var(--line); padding:.85rem 1.5rem; position:sticky; top:0; z-index:5;
}
.topbar h1 { margin:0; min-width:0; overflow-wrap:anywhere; } /* a customer name that is one long word wraps on a phone */
.content { padding:1.5rem; max-width:1200px; width:100%; overflow-wrap:break-word; } /* a long email or web address breaks rather than pushing a phone page sideways */

/* ----------------------------------------------------------- components */
.card { background:var(--bg); border:1px solid var(--line); border-radius:var(--radius); padding:1.1rem 1.25rem; margin-bottom:1.25rem; box-shadow:var(--shadow-sm); }
.card > h2 { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:.75rem; }
.card__empty { color:var(--muted); margin:.35rem 0 0; }
.grid { display:grid; gap:1.25rem; }
/* min(…, 100%): one column on a phone narrower than 340px, never wider than the screen. */
.grid--2 { grid-template-columns:repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.stats { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px,1fr)); gap:1rem; margin-bottom:1.25rem; }
.stat { background:var(--bg); border:1px solid var(--line); border-radius:var(--radius); padding:.95rem 1.1rem; box-shadow:var(--shadow-sm); position:relative; overflow:hidden; }
.stat::before { content:""; position:absolute; left:0; top:0; bottom:0; width:4px; background:var(--brand); border-radius:4px 0 0 4px; }
.stat b { display:block; font-size:1.7rem; line-height:1.1; font-weight:800; letter-spacing:-.02em; }
.stat span { color:var(--muted); font-size:.82rem; font-weight:500; }

table { width:100%; border-collapse:collapse; }
th, td { text-align:left; padding:.6rem .65rem; border-bottom:1px solid var(--line); vertical-align:top; }
th { font-size:.74rem; text-transform:uppercase; letter-spacing:.05em; color:var(--muted); font-weight:700; background:var(--bg-alt); }
thead th:first-child { border-radius:8px 0 0 8px; }
thead th:last-child { border-radius:0 8px 8px 0; }
tbody tr:last-child td { border-bottom:0; }
tbody tr:hover { background:var(--brand-tint); }
td.num, th.num { text-align:right; white-space:nowrap; }
.table-wrap { overflow-x:auto; }

.badge { display:inline-block; padding:.15rem .55rem; border-radius:999px; font-size:.74rem; font-weight:600; white-space:nowrap; letter-spacing:.01em; }
.badge--grey   { background:#eef2f6; color:#475569; }
.badge--blue   { background:#e0edfb; color:#1d4ed8; }
.badge--green  { background:var(--brand-soft); color:var(--brand-dark); }
.badge--amber  { background:#fef3c7; color:#92400e; }
.badge--purple { background:#ede9fe; color:#5b21b6; }
.badge--red    { background:#fee2e2; color:#b91c1c; }

.btn {
  display:inline-flex; align-items:center; justify-content:center; gap:.4rem; border:1px solid var(--brand); background:var(--brand); color:var(--on-brand);
  padding:.5rem .95rem; border-radius:var(--radius-sm); font-weight:600; font-size:.9rem; cursor:pointer;
  text-decoration:none; line-height:1.3; transition:background .12s, border-color .12s, transform .06s, box-shadow .12s; box-shadow:var(--shadow-sm);
}
.btn:hover { background:var(--brand-dark); border-color:var(--brand-dark); }
.btn:active { transform:translateY(1px); box-shadow:none; }
.btn--ghost { background:var(--bg); color:var(--brand-dark); border-color:var(--line-strong); }
.btn--ghost:hover { background:var(--brand-tint); border-color:var(--brand); }
.btn--accent { background:var(--accent); border-color:var(--accent); color:var(--on-accent); }
.btn--accent:hover { background:var(--accent-dark); border-color:var(--accent-dark); }
.btn--sm { padding:.3rem .65rem; font-size:.8rem; }
.actions { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }

.flash { padding:.75rem 1rem; border-radius:var(--radius-sm); margin-bottom:1rem; font-weight:500; border:1px solid transparent; }
.flash--success { background:var(--brand-soft); color:var(--brand-dark); border-color:color-mix(in srgb, var(--brand) 25%, transparent); }
.flash--error   { background:#fee2e2; color:#b91c1c; border-color:#fecaca; }
.flash--info    { background:#e0edfb; color:#1e3a8a; border-color:#bfdbfe; }
/* Needs attention: something to finish, not something that failed. Amber so it
   is plainly not the red of a failure, and plainly not nothing either. */
.flash--warn    { background:#fef3c7; color:#92400e; border-color:#fde68a; }
/* Test mode, and anything else that is a state of the system rather than news
   about this page. */
.flash--test    { background:#eef2ff; color:#3730a3; border-color:#c7d2fe; border-left:4px solid #6366f1; }

/* --------------------------------------------------------------- forms */
form.stack { display:grid; gap:1rem; max-width:760px; }
.fields { display:grid; gap:1rem; grid-template-columns:repeat(auto-fit, minmax(min(220px, 100%),1fr)); }
.field { display:flex; flex-direction:column; gap:.3rem; min-width:0; }
.field--wide { grid-column:1 / -1; }
.field label { font-weight:600; font-size:.85rem; }
.field input, .field select, .field textarea {
  font:inherit; padding:.55rem .7rem; border:1px solid var(--line-strong); border-radius:var(--radius-sm); background:var(--bg); color:var(--ink);
  transition:border-color .12s, box-shadow .12s;
}
.field select { max-width:100%; } /* a long customer name in the list does not widen the form */
.field input:focus, .field select:focus, .field textarea:focus { outline:0; border-color:var(--brand); box-shadow:0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.field textarea { min-height:90px; resize:vertical; }
.field .hint { color:var(--muted); font-size:.8rem; }
.field .err { color:#b91c1c; font-size:.8rem; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color:#b91c1c; }
.filters { display:flex; flex-wrap:wrap; gap:.6rem; align-items:flex-end; margin-bottom:1rem; }
.filters .field { gap:.2rem; }

.dl { display:grid; grid-template-columns:minmax(120px,180px) 1fr; gap:.45rem 1rem; margin:0; }
.dl dt { color:var(--muted); font-size:.85rem; }
.dl dd { margin:0; min-width:0; overflow-wrap:anywhere; }
.muted { color:var(--muted); }
.right { text-align:right; }
.nowrap { white-space:nowrap; }

/* ---------------------------------------------------------- login page */
.login { min-height:100vh; display:grid; place-items:center; padding:1.5rem;
  background:radial-gradient(1200px 600px at 20% -10%, color-mix(in srgb, var(--brand) 55%, var(--brand-dark)) 0%, var(--brand-dark) 55%, var(--brand-deeper) 100%); }
.login .card { width:100%; max-width:400px; margin:0; box-shadow:var(--shadow); padding:1.5rem 1.5rem 1.35rem; }
.login__logo { display:flex; justify-content:center; margin-bottom:1rem; }
.login__logo img { max-height:64px; max-width:220px; }
.login__mark { width:56px; height:56px; border-radius:14px; background:var(--brand); color:var(--on-brand); display:grid; place-items:center; font-weight:800; font-size:1.4rem; }

/* -------------------------------------------------- printable transfer note */
.sheet { background:#fff; max-width:820px; margin:1.5rem auto; padding:2rem; border:1px solid var(--line); }
.sheet h1 { font-size:1.35rem; margin-bottom:.15rem; }
.sheet__head { display:flex; justify-content:space-between; gap:2rem; border-bottom:2px solid var(--ink); padding-bottom:1rem; margin-bottom:1.25rem; }
.sheet__sig { display:grid; grid-template-columns:1fr 1fr; gap:2rem; margin-top:2rem; }
.sheet__sig div { border-top:1px solid var(--ink); padding-top:.4rem; font-size:.85rem; }
.sheet section { margin-bottom:1.25rem; }
.sheet h2 { font-size:.8rem; text-transform:uppercase; letter-spacing:.06em; color:var(--muted); margin-bottom:.4rem; }

.btn--big { display:block; width:100%; text-align:center; padding:.9rem 1rem; font-size:1.05rem; border-radius:12px; margin-top:.6rem; }
.btn--amber { background:var(--accent); border-color:var(--accent); color:#3b2500; }
.btn--amber:hover { background:var(--accent-dark); border-color:var(--accent-dark); }
.btn--red { background:#b91c1c; border-color:#b91c1c; }
.btn--red:hover { background:#991b1b; border-color:#991b1b; }

/* ------------------------------------------------------------ driver app */
body.drv { background:var(--bg-alt); font-size:16px; }
.drv__top { display:flex; align-items:center; gap:.75rem; background:var(--brand-dark); color:#fff; font-family:var(--font); padding:.75rem 1rem; padding-top:max(.75rem, env(safe-area-inset-top)); }
.drv__brand { color:#fff; font-weight:700; text-decoration:none; flex:1; }
.drv__who { font-size:.9rem; opacity:.85; }
.drv__link { background:none; border:0; color:#dbeae1; text-decoration:underline; font:inherit; font-size:.9rem; cursor:pointer; padding:0; }
.drv__shift { background:#fff; border-bottom:1px solid var(--line); padding:.6rem 1rem; font-size:.9rem; }
.drv__shift form { display:flex; align-items:center; justify-content:space-between; gap:.75rem; }
.drv__shift.is-on { background:var(--brand-soft); }
.drv__shift .dot { display:inline-block; width:.6rem; height:.6rem; border-radius:50%; background:var(--brand); margin-right:.3rem; animation:pulse 1.6s infinite; }
.drv__locstatus { display:block; margin-top:.3rem; color:var(--muted); font-size:.8rem; }
@keyframes pulse { 0%,100% { opacity:1 } 50% { opacity:.35 } }
.drv__main { padding:1rem; max-width:640px; margin:0 auto; }
.drv__h1 { font-size:1.35rem; margin:.25rem 0 .75rem; }
.drv__h2 { font-size:1rem; margin:1.5rem 0 .5rem; color:var(--muted); text-transform:uppercase; letter-spacing:.04em; }
.drv__card { background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:1rem 1.1rem; margin-bottom:1rem; }
.drv__card .stack { max-width:none; }
.drv__job { display:block; background:#fff; border:1px solid var(--line); border-radius:var(--radius); padding:.9rem 1rem; margin-bottom:.6rem; color:var(--ink); text-decoration:none; }
.drv__job:active { background:var(--brand-soft); }
.drv__job-top { display:flex; justify-content:space-between; align-items:center; margin-bottom:.2rem; }
.drv__job-name { font-weight:700; font-size:1.05rem; }
.drv__job-addr { margin-top:.25rem; }
.drv__big { font-size:1.05rem; margin:.25rem 0 .75rem; }
.drv__addr { font-size:1.1rem; font-weight:600; margin:.5rem 0; }
.drv__notes { white-space:pre-wrap; background:var(--bg-alt); border-radius:9px; padding:.6rem .8rem; }
.drv__back { display:inline-block; margin-bottom:.6rem; text-decoration:none; font-weight:600; }
.drv__details { margin-top:1rem; border-top:1px solid var(--line); padding-top:.75rem; }
.drv__details summary { cursor:pointer; font-weight:600; color:#b91c1c; padding:.4rem 0; }
.drv .field input, .drv .field select { font-size:16px; padding:.7rem .75rem; } /* stops iOS zooming on focus */

/* ---------------------------------------------------------- tracking */
.track { display:grid; grid-template-columns:320px 1fr; gap:1rem; min-height:calc(100vh - 140px); }
.track__map { border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; min-height:520px; }
#map { width:100%; height:100%; min-height:520px; }
.track__row { display:block; padding:.6rem .2rem; border-bottom:1px solid var(--line); color:var(--ink); text-decoration:none; }
.track__row:last-child { border-bottom:0; }
.track__row:hover, .track__row.is-selected { background:var(--brand-soft); margin:0 -.5rem; padding-left:.7rem; padding-right:.7rem; border-radius:8px; }
.track__row-top { display:flex; justify-content:space-between; align-items:center; gap:.5rem; }
.track__job { font-size:.85rem; margin-top:.2rem; }
.track__actions { margin-top:.4rem; }
.pin { transform:translate(-50%, -100%); background:#fff; border:2px solid var(--brand); color:var(--brand-dark); font-weight:700; font-size:.8rem; padding:.2rem .5rem; border-radius:999px; white-space:nowrap; box-shadow:var(--shadow); position:relative; }
.pin::after { content:""; position:absolute; left:50%; bottom:-7px; width:10px; height:10px; background:#fff; border-right:2px solid var(--brand); border-bottom:2px solid var(--brand); transform:translateX(-50%) rotate(45deg); }
.pin--live { border-color:var(--brand); }
.pin--stale { border-color:var(--accent); color:#92400e; }
.pin--stale::after { border-color:var(--accent); }
.pin--off { border-color:#94a3b8; color:#475569; opacity:.7; }
.pin--off::after { border-color:#94a3b8; }
@media (max-width:900px) { .track { grid-template-columns:1fr; } .track__map, #map { min-height:380px; } }

/* ------------------------------------------------- vehicle check form */
.check__list { display:grid; gap:.5rem; margin:.75rem 0; }
.check__item { border:1px solid var(--line); border-radius:10px; padding:.6rem .75rem; margin:0; }
.check__item legend { font-weight:600; padding:0 .2rem; }
.check__opts { display:flex; gap:.5rem; margin:.4rem 0; }
.check__opt { flex:1; text-align:center; padding:.55rem; border:1px solid var(--line); border-radius:9px; cursor:pointer; font-weight:600; }
.check__opt input { margin-right:.35rem; }
.check__opt--ok:has(input:checked) { background:var(--brand-soft); border-color:var(--brand); color:var(--brand-dark); }
.check__opt--bad:has(input:checked) { background:#fee2e2; border-color:#b91c1c; color:#b91c1c; }
.check__note { width:100%; font:inherit; padding:.45rem .6rem; border:1px solid var(--line); border-radius:8px; }
.check__item:not(:has(.check__opt--bad input:checked)) .check__note { display:none; }

/* ----------------------------------------------- consignment notes */
.cn-line { border:1px solid var(--line); border-radius:10px; padding:.75rem 1rem; margin-bottom:.75rem; }
.cn-line legend { font-weight:700; padding:0 .3rem; }
.cn-line--spare { opacity:.75; }
.line-remove { border:1px solid var(--line); background:#fff; color:#b91c1c; border-radius:999px; width:1.5rem; height:1.5rem; line-height:1; font-size:1rem; cursor:pointer; vertical-align:middle; margin-left:.3rem; }
.line-remove:hover { background:#fee2e2; border-color:#b91c1c; }
.add-line { margin-right:.5rem; }
.extra-lines:empty { display:none; }
.cn-hp { display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:.25rem .75rem; }
.cn-hp__opt { font-size:.85rem; }
.cn-sheet { page-break-after:always; font-size:.85rem; }
.cn-sheet h2 { margin-top:.5rem; }
.cn-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:.75rem; }
.cn-sigbox { border:1px solid var(--ink); padding:.4rem; min-height:80px; }
.cn-table { font-size:.78rem; }
.cn-table th, .cn-table td { border:1px solid var(--line); padding:.3rem .4rem; }

@media print {
  .no-print { display:none !important; }
  body { background:#fff; }
  .sheet { border:0; margin:0; max-width:none; padding:0; }
}

@media (max-width:780px) {
  .shell { flex-direction:column; }
  .sidebar { width:auto; flex:none; position:static; height:auto; padding:.6rem 0; }
  .sidebar__brand { padding:.25rem .9rem .35rem; }
  .nav-burger { display:flex; flex-direction:column; gap:4px; padding:.5rem; cursor:pointer; border-radius:8px; }
  .nav-burger span { display:block; width:22px; height:2px; background:currentColor; border-radius:2px; }
  .nav, .sidebar__foot { display:none; }
  .nav-toggle:checked ~ .sidebar .nav { display:flex; }
  .nav-toggle:checked ~ .sidebar .sidebar__foot { display:block; }
  .nav a { padding:.6rem .8rem; }
  .topbar { position:static; padding:.75rem 1rem; flex-wrap:wrap; }
  .content { padding:1rem; }
  .dl { grid-template-columns:minmax(0, 1fr); gap:.15rem .5rem; }
  .dl dd { margin-bottom:.5rem; }
}

/* ------------------------------------------------- job photos (before/after) */
.photos { display:grid; grid-template-columns:1fr 1fr; gap:1rem; }
.photos__h { font-size:.85rem; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin:0 0 .5rem; }
.photos__grid { display:flex; flex-wrap:wrap; gap:.5rem; }
.photos__thumb { position:relative; display:inline-block; border:1px solid var(--line); border-radius:9px; overflow:hidden; background:var(--bg-alt); text-decoration:none; }
.photos__thumb img { display:block; max-height:140px; width:auto; max-width:100%; }
.photos__when { display:block; font-size:.7rem; color:var(--muted); padding:.2rem .4rem; }
.photos__del { position:absolute; top:.3rem; right:.3rem; width:1.7rem; height:1.7rem; border:0; border-radius:50%; background:rgba(0,0,0,.6); color:#fff; font-size:.9rem; line-height:1.7rem; cursor:pointer; }
.photos__add label { cursor:pointer; }
.photos__hint { color:#b45309; font-size:.9rem; margin:.5rem 0 0; }
.btn[disabled], .btn:disabled { opacity:.45; cursor:not-allowed; }
.override { display:inline-block; }
.override summary { list-style:none; display:inline-block; }
.override summary::-webkit-details-marker { display:none; }
.override__form { display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; margin-top:.5rem; padding:.6rem .75rem; border:1px solid var(--line); border-radius:9px; background:var(--bg-alt); }
.override__form label { flex-basis:100%; font-size:.9rem; }
.override__form input { flex:1; min-width:220px; }
@media (max-width:520px) { .photos { grid-template-columns:1fr; } }

/* Settings sub-navigation and the getting-started checklist */
.subnav { display:flex; flex-wrap:wrap; gap:.25rem; margin:-.25rem 0 1rem; border-bottom:1px solid var(--line); }
.subnav a { padding:.5rem .8rem; border-bottom:2px solid transparent; color:var(--muted); text-decoration:none; font-weight:600; }
.subnav a:hover { color:var(--text); }
.subnav a.is-active { color:var(--brand-dark); border-bottom-color:var(--brand); }
.checklist { list-style:none; margin:0; padding:0; }
.checklist li { display:flex; gap:.75rem; align-items:flex-start; padding:.55rem 0; border-top:1px solid var(--line); }
.checklist li:first-child { border-top:0; }
.checklist li > div { min-width:0; overflow-wrap:anywhere; }
.checklist__mark { flex:0 0 1.4rem; height:1.4rem; border-radius:50%; border:2px solid var(--line); text-align:center; line-height:1.2rem; font-weight:800; color:#fff; }
.checklist li.is-done .checklist__mark { background:var(--brand); border-color:var(--brand); }
.checklist li.is-done a { color:var(--muted); text-decoration:line-through; }

/* Plain-language choices (radio with a description) */
.choice { display:flex; gap:.6rem; align-items:flex-start; padding:.6rem .75rem; border:1px solid var(--line); border-radius:10px; cursor:pointer; }
.choice:has(input:checked) { border-color:var(--brand); background:var(--bg-alt); }
.choice input { margin-top:.3rem; }

/* Public enquiry page */
.public { max-width:560px; margin:0 auto; padding:1rem 1rem 2.5rem; font-size:17px; }
.public--embed { padding-top:.25rem; }
.public__head { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.5rem 1rem; padding:.5rem 0 1rem; }
.public__head h1 { font-size:1.35rem; margin:0; color:var(--brand-dark); }
.public__phone { display:inline-block; font-weight:700; text-decoration:none; color:var(--brand-dark); background:var(--brand-soft); border-radius:999px; padding:.45rem .9rem; }
.public__card { background:var(--bg); border:1px solid var(--line); border-radius:var(--radius); padding:1.25rem 1.25rem 1.5rem; box-shadow:var(--shadow); }
.public__title { font-size:1.4rem; margin:0 0 .35rem; }
.public__lead { margin:0 0 1rem; color:var(--muted); }
.public__form { display:grid; gap:1rem; }
.public__form .field label { font-size:1rem; }
.public__form .field input, .public__form .field select, .public__form .field textarea {
  font-size:17px; padding:.85rem .9rem; border-radius:11px; border:1.5px solid #cbd5e1; min-height:3.1rem;
}
.public__form .field select { appearance:none; -webkit-appearance:none;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23475569' stroke-width='2'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E") no-repeat right .8rem center; padding-right:2.4rem; }
.public__form .field textarea { min-height:120px; }
.public__form .field .hint, .public__form .field .err { font-size:.9rem; }
.public__form .field .err { font-weight:600; }
.public__send { font-size:1.15rem; padding:1rem; margin-top:.25rem; }
.public__foot { margin:1.25rem 0 0; text-align:center; }
.public__done { text-align:center; }
.public__tick { width:3.2rem; height:3.2rem; line-height:3.2rem; margin:.25rem auto .9rem; border-radius:50%; background:var(--brand); color:var(--on-brand); font-size:1.8rem; font-weight:700; }
.public__ref { font-size:1.1rem; margin:.5rem 0 0; }
/* Honeypot: off-screen, never hidden with display:none so bots still fill it. */
/* Packages on Settings → Plan. */
.packages { display:grid; grid-template-columns:repeat(auto-fit, minmax(240px, 1fr)); gap:1rem; margin-top:.5rem; }
.package { border:1px solid var(--line); border-radius:var(--radius); padding:1rem; display:flex; flex-direction:column; gap:.5rem; }
.package--current { border-color:var(--brand); border-width:2px; background:var(--brand-soft); }
.package h3 { margin:0; font-size:1.15rem; }
.package__price { margin:0; font-size:1.4rem; }
.package__blurb { margin:0; color:var(--muted); font-size:.92rem; }
.package__list { margin:0; padding-left:1.1rem; font-size:.92rem; display:grid; gap:.25rem; }
.package form { margin-top:auto; }
.package .btn { width:100%; justify-content:center; }

/* Skip board: tighter tiles, the drop-off menu and one-line forms. */
.stats--tight { margin-bottom:1rem; }
.inline-form { display:flex; flex-wrap:wrap; align-items:center; gap:.5rem; }
.inline-form label { font-weight:600; font-size:.9rem; }
.inline-form select, .inline-form input { padding:.45rem .6rem; border:1px solid var(--line); border-radius:8px; font:inherit; max-width:100%; }
.drop { position:relative; display:inline-block; }
.drop summary { list-style:none; cursor:pointer; }
.drop summary::-webkit-details-marker { display:none; }
.drop__menu { position:absolute; right:0; z-index:5; margin-top:.3rem; padding:.7rem; width:min(22rem, 80vw); display:grid; gap:.4rem; text-align:left;
  background:var(--bg); border:1px solid var(--line); border-radius:10px; box-shadow:var(--shadow); }
.drop__menu label { font-size:.85rem; font-weight:600; }
.drop__menu select { padding:.45rem .5rem; border:1px solid var(--line); border-radius:8px; font:inherit; max-width:100%; }

/* "Next: price it" on an enquiry with no quote yet. */
.next-step { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:.75rem 1rem; margin:.25rem 0 1.1rem; padding:.9rem 1rem; border-radius:var(--radius); background:var(--brand-soft); border:1px solid var(--brand); }
.next-step strong { display:block; font-size:1.05rem; color:var(--brand-dark); }
.next-step span { color:var(--muted); font-size:.92rem; }
.next-step > div { flex:1 1 240px; }

/* Price list (Settings) and the picker on quote/invoice lines. */
.price-rows { display:grid; gap:.4rem; margin-bottom:.75rem; }
.price-row { display:grid; grid-template-columns:minmax(0, 1fr) 9rem auto; gap:.5rem; align-items:start; }
.price-row .field { margin:0; min-width:0; }
.price-row input { width:100%; min-width:0; }
.price-row__price { position:relative; }
.price-row__price input { padding-left:1.6rem; }
.price-row__pound { position:absolute; left:.65rem; top:.6rem; color:var(--muted); pointer-events:none; }
.price-row--empty .price-row__price input { border-color:#f59e0b; background:#fffbeb; }
.price-row__remove { margin-top:.55rem; }
.price-pick-field { grid-column:1 / -1; }
.price-pick-field select { font-weight:600; }
.price-save { display:inline-flex; align-items:center; gap:.4rem; font-size:.85rem; color:var(--muted); margin-top:.35rem; cursor:pointer; font-weight:400; }
.price-save[hidden] { display:none; }
@media (max-width:560px) { .price-row { grid-template-columns:minmax(0, 1fr) 6.5rem auto; } }

/* Photo picker: a big "Add photos" button and previews of what was chosen. */
.photo-pick { display:grid; gap:.5rem; }
.photo-pick__btn { position:relative; display:flex; align-items:center; justify-content:center; gap:.5rem; padding:.9rem 1rem; border:2px dashed var(--brand); border-radius:var(--radius); background:var(--brand-soft); color:var(--brand-dark); font-weight:700; font-size:1.05rem; cursor:pointer; text-align:center; }
.photo-pick__btn:focus-within { outline:3px solid var(--brand); outline-offset:2px; }
.photo-pick__btn input { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; }
.photo-pick__list { display:flex; flex-wrap:wrap; gap:.4rem; align-items:center; }
.photo-pick__list:empty { display:none; }
.photo-pick__item { width:64px; height:64px; border-radius:8px; overflow:hidden; background:var(--bg-alt); border:1px solid var(--line); font-size:.7rem; display:flex; align-items:center; justify-content:center; word-break:break-all; }
.photo-pick__item img { width:100%; height:100%; object-fit:cover; display:block; }
.photo-pick__count { flex-basis:100%; font-size:.9rem; color:var(--muted); }
/* Enquiry photos in the office: square tiles, click for the full picture. */
.qphotos { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:.6rem; margin:.25rem 0 0; }
.qphotos__tile { position:relative; aspect-ratio:1; border-radius:10px; overflow:hidden; border:1px solid var(--line); background:var(--bg-alt); }
.qphotos__tile a { display:block; width:100%; height:100%; }
.qphotos__tile img { width:100%; height:100%; object-fit:cover; display:block; transition:transform .15s; }
.qphotos__tile a:hover img { transform:scale(1.04); }
.qphotos__tag { position:absolute; left:.35rem; bottom:.35rem; font-size:.7rem; background:rgba(15,23,42,.72); color:#fff; border-radius:999px; padding:.1rem .5rem; pointer-events:none; }
.qphotos__tile .photos__del { top:.35rem; right:.35rem; }
.public__hp { position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }
@media (max-width:480px) {
  .public { padding:.5rem .6rem 2rem; }
  .public__card { padding:1rem .9rem 1.25rem; border-radius:10px; }
  .public__head { padding-top:.25rem; }
}

/* Look settings page */
.swatches { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:.6rem; }
.swatch { display:flex; align-items:center; gap:.6rem; padding:.5rem .6rem; border:1px solid var(--line); border-radius:10px; cursor:pointer; background:var(--bg); }
.swatch:has(input:checked) { border-color:var(--brand); box-shadow:0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.swatch input { position:absolute; opacity:0; }
.swatch__dot { width:28px; height:28px; border-radius:8px; flex:0 0 auto; position:relative; overflow:hidden; }
.swatch__dot i { position:absolute; right:0; bottom:0; width:40%; height:40%; border-radius:6px 0 0 0; }
.swatch span { font-weight:600; font-size:.9rem; }
.look-preview { border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; display:flex; min-height:190px; box-shadow:var(--shadow-sm); }
.look-preview__side { width:120px; padding:.8rem; color:#fff; background:var(--pv-dark); font-size:.75rem; display:flex; flex-direction:column; gap:.35rem; }
.look-preview__side.is-light { background:#fff; color:#0f172a; border-right:1px solid var(--line); }
.look-preview__side b { display:block; margin-bottom:.4rem; }
.look-preview__side i { display:block; height:8px; border-radius:4px; background:rgba(255,255,255,.25); width:80%; }
.look-preview__side i.on { background:rgba(255,255,255,.5); width:90%; }
.look-preview__side.is-light i { background:#e3e8ef; }
.look-preview__side.is-light i.on { background:var(--pv-soft); }
.look-preview__main { flex:1; padding:.9rem; background:var(--bg-alt); font-size:.8rem; }
.look-preview__btn { display:inline-block; padding:.35rem .7rem; border-radius:7px; background:var(--pv); color:var(--pv-on); font-weight:700; margin-right:.4rem; }
.look-preview__btn.alt { background:var(--pv-accent); color:var(--pv-on-accent); }
.look-preview__card { background:#fff; border:1px solid var(--line); border-radius:8px; padding:.6rem; margin-top:.6rem; }
.look-preview__badge { display:inline-block; padding:.05rem .45rem; border-radius:999px; background:var(--pv-soft); color:var(--pv-dark); font-size:.7rem; font-weight:700; }
input[type=color] { width:64px; height:40px; padding:2px; border:1px solid var(--line-strong); border-radius:8px; background:#fff; cursor:pointer; }
.logo-box { display:flex; align-items:center; gap:1rem; flex-wrap:wrap; }
.logo-box img { max-height:56px; max-width:220px; background:repeating-conic-gradient(#f1f5f9 0 25%, #fff 0 50%) 0 0/16px 16px; border:1px solid var(--line); border-radius:8px; padding:.3rem; }

/* Customer accounts, office side (README "Customer accounts") */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
/* The customer page's heading: the name and its badges (Commercial, Trade
   account, On account, On stop, Can sign in) go onto more lines on a phone
   instead of pushing the page sideways. One line on a desktop, as before. */
.card > h2.cust-head { flex-wrap:wrap; row-gap:.35rem; overflow-wrap:anywhere; }
@media (max-width:780px) { .card > h2.cust-head { justify-content:flex-start; column-gap:.4rem; } }
.acct-tabs { margin:.25rem 0 0; }
.acct-h3 { font-size:1rem; margin:1rem 0 .4rem; }
.acct-tick { display:inline-flex; gap:.45rem; align-items:flex-start; font-weight:500; cursor:pointer; }
.acct-tick input { margin-top:.25rem; }
.acct-warn { background:#fef3c7; color:#92400e; border-left:4px solid #f59e0b; border-radius:8px; padding:.55rem .75rem; margin:.5rem 0; }
.acct-warn a { color:inherit; font-weight:600; }
.acct-inline { display:flex; flex-wrap:wrap; gap:.5rem; align-items:center; }
.acct-inline input:not([type=checkbox]):not([type=hidden]) { font:inherit; padding:.35rem .55rem; border:1px solid var(--line-strong); border-radius:8px; min-width:min(12rem, 100%); max-width:100%; }
.acct-edit { margin:.6rem 0; }
.acct-edit > summary { cursor:pointer; color:var(--brand-dark); font-weight:600; }
.acct-edit[open] > summary { margin-bottom:.6rem; }
.acct-people-ticks { border:1px solid var(--line); border-radius:10px; padding:.6rem .8rem; margin:0; min-width:0; }
.acct-people-ticks legend { font-weight:600; padding:0 .3rem; }
.acct-people-ticks__row { display:flex; flex-wrap:wrap; gap:.4rem 1rem; align-items:center; padding:.3rem 0; border-bottom:1px solid var(--line); }
.acct-people-ticks__row input[inputmode] { font:inherit; padding:.25rem .45rem; border:1px solid var(--line-strong); border-radius:7px; }
.acct-people tr.is-off td { color:var(--muted); }
.acct-row-actions { white-space:nowrap; }
.acct-row-actions form { display:inline-block; margin:.1rem .15rem .1rem 0; }
/* People on a phone: one card per person instead of an eight-column table.
   Each cell names itself (data-label). Wider screens keep the table, which
   scrolls inside its own box (.table-wrap) when it does not fit. */
@media (max-width:640px) {
  .acct-people, .acct-people tbody, .acct-people tr, .acct-people td { display:block; width:auto; }
  .acct-people thead { position:absolute; width:1px; height:1px; margin:-1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
  .acct-people tr { border:1px solid var(--line); border-radius:10px; padding:.55rem .75rem; margin-bottom:.6rem; }
  .acct-people tr:last-child { margin-bottom:0; }
  .acct-people td { border:0; padding:.2rem 0; overflow-wrap:anywhere; }
  .acct-people td.nowrap, .acct-people .acct-row-actions { white-space:normal; }
  .acct-people td[data-label]::before { content:attr(data-label); display:block; font-size:.72rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--muted); }
  .acct-people .acct-people__name { font-size:1rem; }
  .acct-people .acct-row-actions { padding-top:.45rem; }
}
.acct-sites { display:grid; grid-template-columns:repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap:.75rem; }
.acct-site { border:1px solid var(--line); border-radius:10px; padding:.7rem .8rem; background:var(--bg-alt); }
.acct-site form { display:inline-block; }
.acct-site__notes { margin-top:.3rem; font-size:.9rem; }
.acct-site__by { font-size:.8rem; margin-top:.3rem; }
.acct-archived { margin:.5rem 0 0; padding-left:1.2rem; }
.acct-activity td { vertical-align:top; }
.acct-job { align-items:end; }
.acct-job__label { display:block; font-size:.85rem; }
.acct-onaccount { border:1px solid var(--line); border-left:4px solid #7c3aed; border-radius:10px; padding:.6rem .8rem; background:#faf8ff; }
.acct-onaccount[hidden], [data-acct-price][hidden], [data-acct-sites][hidden], [data-acct-warn][hidden] { display:none; }
.acct-bill__jobs > td { padding-top:0; border-top:0; }
.acct-bill__jobs table { width:100%; font-size:.9rem; }
.acct-bill__jobs tr.is-problem td { color:#b91c1c; }
.acct-problem { color:#b91c1c; font-size:.9rem; }
.acct-warning { color:#92400e; font-size:.9rem; }
.acct-warnings { margin:0; padding-left:1.1rem; }
.acct-warnings li { margin:.3rem 0; }
.acct-warnings li.is-blocking { color:#b91c1c; }
/* the quote desk: the linked customer's account */
.dp-acct { margin:.35rem 0 0; padding:.4rem .6rem; border-radius:8px; background:#f5f3ff; color:#4c1d95; font-size:.9rem; }
.dp-acct--note { background:#fef3c7; color:#92400e; }
.dp-quick__trade { margin:.3rem 0; font-size:.85rem; color:#5b21b6; }
.dn__acct { margin-top:.5rem; padding-top:.5rem; border-top:1px dashed var(--line); }

/* A long label (e.g. "On account: goes on the monthly invoice once it is done") wraps on a phone instead of pushing the page sideways. */
.badge { max-width: 100%; }
@media (max-width: 640px) {
  .badge { white-space: normal; overflow-wrap: anywhere; }
}

/* A gentle note for the office (BookingDays::officeHint): an item collection put on a day that is
   not a collection round day. Never blocks anything: the office can book any day by hand. */
.round-hint { background:#e0edfb; color:#1e3a8a; border-left:4px solid #93c5fd; border-radius:8px; padding:.5rem .75rem; margin:.35rem 0 0; font-size:.92rem; font-weight:500; }
.round-hint[hidden] { display:none; }

/* ------------------------------------------------ Website prices (/prices) */
.wp { max-width:760px; }
.wp-small { font-size:.85rem; }
.wp-group > summary { list-style:none; cursor:pointer; }
.wp-group > summary::-webkit-details-marker { display:none; }
.wp-group > summary h2 { margin:0; display:flex; align-items:center; gap:.5rem; }
.wp-group > summary h2::after { content:"+"; margin-left:auto; font-weight:400; color:var(--muted); }
.wp-group[open] > summary h2::after { content:"–"; }
.wp-group[open] > summary { margin-bottom:.5rem; }
.wp-count { font-weight:500; font-size:.85rem; }
.wp-sub { font-size:.8rem; text-transform:uppercase; letter-spacing:.04em; color:var(--muted); margin:1rem 0 .25rem; }
.wp-row { display:grid; grid-template-columns:minmax(0,1fr) 7.5rem; gap:.25rem .75rem; align-items:center; padding:.6rem 0; border-top:1px solid var(--line); }
.wp-row__what { display:flex; flex-direction:column; gap:.1rem; min-width:0; cursor:pointer; }
.wp-row__what .badge { align-self:flex-start; }
.wp-row__now { font-size:.92rem; }
.wp-row__box { position:relative; }
.wp-row__pound { position:absolute; left:.6rem; top:50%; transform:translateY(-50%); color:var(--muted); pointer-events:none; }
.wp-row__box input { width:100%; padding:.55rem .5rem .55rem 1.4rem; font:inherit; font-size:16px; text-align:right; border:1px solid var(--line-strong); border-radius:var(--radius-sm); background:var(--bg); }
.wp-row.has-error input { border-color:#dc2626; background:#fef2f2; }
.wp-row__err { grid-column:1 / -1; color:#b91c1c; font-size:.88rem; }
.wp-bar { position:sticky; bottom:0; padding:.75rem 0 calc(.75rem + env(safe-area-inset-bottom)); background:linear-gradient(transparent, var(--bg-alt) 35%); z-index:4; }
.wp-bar .btn { width:100%; justify-content:center; }
.wp-log { white-space:pre-wrap; overflow-wrap:anywhere; font-size:.8rem; background:var(--bg-alt); border:1px solid var(--line); border-radius:var(--radius-sm); padding:.6rem .75rem; margin:.5rem 0 0; max-height:20rem; overflow:auto; }
.wp-result--ok { border-left:4px solid var(--brand); }
.wp-result--bad { border-left:4px solid #dc2626; }
.wp-changes { list-style:none; margin:0; padding:0; }
.wp-changes li { display:flex; flex-wrap:wrap; gap:.15rem .75rem; align-items:baseline; padding:.55rem 0; border-top:1px solid var(--line); }
.wp-changes__prices { margin-left:auto; white-space:nowrap; }
.wp-changes--big { background:#fffbeb; }
.wp-changes .wp-small { flex-basis:100%; text-align:right; }
.wp-confirm { display:flex; flex-wrap:wrap; gap:.5rem; margin-top:1rem; }
.wp-recent { margin:0; padding-left:1.1rem; font-size:.9rem; }
.wp-recent li { margin:.3rem 0; }
@media (max-width:420px) { .wp-row { grid-template-columns:minmax(0,1fr) 6.5rem; } .wp-confirm .btn { flex:1 1 100%; justify-content:center; } }
