:root {
  --navy: #143c5d; --navy-2: #163a5c; --deep: #081a2b; --or: #d97757; --or-2: #c4643f;
  --ink: #141f2b; --muted: #5b6672; --line: #dbe1e8; --line-2: #c5cdd7; --bg: #f3f5f8; --card: #fff; --card-2: #fafbfc; --card-hover: #f6f8fb; --tint-warn: #fff8e8;
  --ok: #2f7d55; --bad: #b3402a; --warn: #9a6a12; --r: 10px; --shadow: 0 1px 2px rgba(14,44,71,.06), 0 4px 16px rgba(14,44,71,.06);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body, #app { margin: 0; height: 100%; }
body { font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--ink); background: var(--bg); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.shell { height: 100%; display: grid; grid-template-rows: auto 1fr; }
.top { background: var(--navy); color: #fff; display: flex; align-items: center; gap: 10px; padding: 10px 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .01em; margin-right: 10px; }
.brand img { width: 28px; height: 28px; background: #fff; border-radius: 6px; padding: 2px; }
.brand small { font-weight: 500; opacity: .7; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { color: #dce6f0; text-decoration: none; padding: 6px 12px; border-radius: 7px; font-weight: 600; font-size: 14px; }
.nav a.on { background: rgba(255,255,255,.12); color: #fff; } @media (hover: hover) and (pointer: fine) { .nav a:hover { background: rgba(255,255,255,.12); color: #fff; } }
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); padding: 7px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none; }
@media (hover: hover) and (pointer: fine) { .btn:hover { border-color: var(--navy); } }
.btn.primary { background: var(--or); border-color: var(--or); color: var(--deep); }
@media (hover: hover) and (pointer: fine) { .btn.primary:hover { background: var(--or-2); } }
.btn.primary:active { filter: brightness(.94); } /* touch: hover colours are mouse-only; a press dips and the accent stays #D97757 */
.btn.dark { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.small { padding: 4px 9px; font-size: 13px; }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.top .btn { border-color: rgba(255,255,255,.3); background: transparent; color: #fff; }
.top .btn.primary { background: var(--or); border-color: var(--or); color: var(--deep); }
.icon-btn { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 1px solid var(--line); background: var(--card); border-radius: 6px; padding: 0; color: var(--muted); font-size: 13px; }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { color: var(--ink); border-color: var(--line-2); } }
main { overflow: auto; min-height: 0; }
.page { max-width: 1180px; margin: 0 auto; padding: 22px 22px 120px; }
h1 { font-size: 24px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 0 0 10px; }
.muted { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 22px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 24px; color: var(--navy); margin-top: 2px; }
.stat span { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.stat.warn b { color: var(--bad); }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.bar .grow { flex: 1; }
.bar input[type=search], .bar select { padding: 7px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); }
table.list { width: 100%; border-collapse: collapse; background: var(--card); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--line); }
.list th { text-align: left; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--card-2); }
.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .list tbody tr:hover td { background: var(--card-hover); } }
.list .r { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 5px; background: #e9e4db; color: var(--navy); text-transform: capitalize; white-space: nowrap; }
.chip.sent { background: #e7eefb; color: #1f4a8a; } .chip.accepted, .chip.paid { background: #e3f3ea; color: var(--ok); }
.chip.overdue, .chip.declined, .chip.expired { background: #fbe9e5; color: var(--bad); } .chip.void { background: #eee; color: #777; text-decoration: line-through; }
.chip.part { background: #fff3dc; color: var(--warn); }
.empty { color: var(--muted); padding: 30px; text-align: center; }

/* editor */
.editor { display: grid; grid-template-columns: minmax(420px, 1fr) minmax(380px, 0.95fr); gap: 0; height: 100%; min-height: 0; }
.ed-form { overflow: auto; padding: 18px 18px 140px; min-height: 0; }
.ed-preview { border-left: 1px solid var(--line); min-height: 0; }
.ed-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.ed-head h1 { margin: 0; flex: 1; font-size: 22px; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; position: sticky; top: -18px; background: var(--bg); padding: 8px 0; z-index: 2; }
.sec { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.sec > h3 { margin: 0 0 10px; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--navy); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }
.f { display: grid; gap: 4px; }
.f label { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.f input, .f textarea, .f select { width: 100%; padding: 7px 9px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--card); }
.f textarea { resize: vertical; min-height: 60px; line-height: 1.4; }
.f input:focus, .f textarea:focus, .f select:focus { outline: 2px solid rgba(217,119,87,.45); border-color: var(--or); }
.hint { font-size: 12px; color: var(--muted); }
table.lines { width: 100%; border-collapse: collapse; }
.lines th { font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); text-align: left; padding: 4px 4px; }
.lines td { padding: 3px 4px; vertical-align: top; }
.lines input, .lines textarea { width: 100%; padding: 6px 7px; border: 1px solid var(--line-2); border-radius: 6px; font-size: 13.5px; }
.lines textarea { resize: vertical; min-height: 34px; height: 34px; line-height: 1.35; }
.lines .num { width: 74px; } .lines .unit { width: 72px; } .lines .unit input { padding-inline: 6px; } .lines.items th:nth-child(2), .lines.items th:nth-child(4) { text-align: right; } .lines .amt { width: 92px; text-align: right; font-variant-numeric: tabular-nums; padding-top: 9px; font-size: 13.5px; }
.lines th.amt { padding-top: 4px; font-size: 11.5px; } .lines input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; } /* the header like its neighbours; figures right-aligned (1 Nov 2026) */
.lines .tools { width: 92px; white-space: nowrap; }
.tot { display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; justify-content: end; margin-left: auto; width: min(320px, 100%); font-variant-numeric: tabular-nums; }
.tot .big { font-weight: 800; font-size: 18px; color: var(--navy); }
.opt { border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px; display: grid; gap: 6px; }
.pay-row { display: flex; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.pay-row:last-child { border-bottom: 0; }
.warnbox { background: var(--warn-bg, #f3ece0); border: 1px solid var(--hair, #ddd6ca); border-left: 3px solid var(--warn, #7a4e00); color: var(--text, #141f2b); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.okbox { background: #e6f4ec; color: var(--ok); border-radius: 8px; padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }

.modal { position: fixed; inset: 0; background: rgba(8,26,43,.55); display: grid; place-items: center; z-index: 50; padding: 20px; }
.dlg { background: var(--card); border-radius: 14px; width: min(560px, 100%); max-height: 100%; overflow: auto; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.dlg header { padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; font-size: 17px; }
.dlg .body { padding: 16px 18px; display: grid; gap: 12px; }
.dlg footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--card-2); }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--deep); color: #fff; padding: 10px 16px; border-radius: 10px; z-index: 60; box-shadow: 0 10px 30px rgba(0,0,0,.25); max-width: 90vw; }
.toast.bad { background: var(--bad); }
.drive { max-width: 520px; margin: 12vh auto; background: var(--card); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); text-align: center; }
/* Page view beside the form: >= 1280 px side by side; 900-1279 px and below, an Edit | Page switch (the page never disappears) */
.ed-wrap { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.ed-wrap > .ed-seg { display: none; margin: 8px 12px 0; align-self: flex-start; }
.ed-preview { position: relative; min-width: 0; min-height: 0; }
.ed-preview > .pv { height: 100%; }
.pv-draftlayer { position: absolute; inset: 41px 0 0 0; background: var(--card); display: flex; flex-direction: column; }
.pv-draftlayer > .chip { align-self: center; margin: 8px; }
.pv-draftlayer iframe { flex: 1; border: 0; width: 100%; }
@media (max-width: 1279px) { .ed-wrap > .ed-seg { display: inline-flex; } .editor { grid-template-columns: 1fr; } .editor[data-pane="edit"] .ed-preview { display: none; } .editor[data-pane="page"] > :not(.ed-preview) { display: none; } .editor[data-pane="page"] .ed-preview { display: block; height: 100%; } }

/* Office additions: jobs, receipts, reports, login */
.brand { color: #fff; text-decoration: none; }
.badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 5px; background: var(--or); color: var(--deep); font-size: 11.5px; font-weight: 800; text-align: center; line-height: 18px; }
a.stat { text-decoration: none; color: inherit; }
@media (hover: hover) and (pointer: fine) { a.stat:hover { border-color: var(--line-2); } }
.chip.active { background: #e3f3ea; color: var(--ok); } .chip.closed { background: #eee; color: #666; }
.hint.warn { color: var(--bad); }
.cb { display: flex; gap: 8px; align-items: center; font-weight: 600; font-size: 14px; color: var(--ink); }
.drop { border: 2px dashed var(--line-2); border-radius: var(--r); background: var(--card-2); padding: 18px; text-align: center; cursor: pointer; display: grid; gap: 4px; color: var(--muted); }
.drop b { color: var(--navy); font-size: 16px; }
.drop.over { border-color: var(--or); background: #fff7f3; } @media (hover: hover) and (pointer: fine) { .drop:hover { border-color: var(--or); background: #fff7f3; } }
.timebar { display: grid; grid-template-columns: 150px 90px 1fr auto auto; gap: 8px; align-items: center; }
.timebar input[type=date], .timebar input[type=number], .timebar input[type=text] { padding: 7px 9px; border: 1px solid var(--line-2); border-radius: 7px; background: var(--card); width: 100%; }
.list.small th { padding: 7px 9px; }
.list.small td { padding: 7px 9px; font-size: 14px; }
.list tfoot td { padding: 8px 9px; border-top: 2px solid var(--line-2); background: var(--card-2); }
.list tr.check td { background: var(--tint-warn); }
.list tbody tr.head { cursor: default; } .list tr.head td { font-weight: 800; color: var(--navy); background: var(--card-2); }
.list tr.total td { font-weight: 700; border-top: 2px solid var(--line-2); }
.list tr.grand td { font-weight: 800; background: var(--navy); color: #fff; }
.list.report tbody tr { cursor: default; } .list.report tbody tr.link { cursor: pointer; }
@media (hover: hover) and (pointer: fine) { .list.report tbody tr:not(.link):hover td { background: inherit; } }
@media (hover: hover) and (pointer: fine) { .list.report tr.grand:hover td { background: var(--navy) !important; } }
.notes { margin: 12px 0 0; padding-left: 18px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; border-bottom: 1px solid var(--line); }
.tab { border: 0; background: transparent; padding: 8px 12px; font-weight: 700; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tab.on { color: var(--navy); border-bottom-color: var(--current, var(--navy)); }
@media (hover: hover) and (pointer: fine) { .tab:hover { color: var(--navy); } }
.dlg.wide { width: min(1080px, 100%); }
.rc { display: grid; grid-template-columns: minmax(280px, 1fr) minmax(320px, 1fr); gap: 16px; align-items: start; }
.rc-view { display: block; width: 100%; height: 64vh; object-fit: contain; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; }
.rc-none { display: grid; place-items: center; color: var(--muted); font-size: 14px; text-align: center; padding: 20px; height: 140px; }
.ocr { white-space: pre-wrap; font-size: 12px; background: var(--card-2); border: 1px solid var(--line); border-radius: 6px; padding: 8px; max-height: 220px; overflow: auto; margin: 0; }
.login { display: grid; gap: 12px; text-align: left; }
.login img { width: 54px; height: 54px; }
.login h1 { margin: 0; }
.login input { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 8px; font-size: 16px; }
.login .err { color: var(--bad); margin: 0; min-height: 1em; }
/* Champion ID sign-in (HQ on the server): the same card, one step at a time */
.login.cid .cid-step, .login.cid .cid-form { display: grid; gap: 12px; }
.login.cid .cid-passkey { display: grid; gap: 8px; margin-bottom: 4px; }
.login.cid .cid-passkey .err:empty { display: none; }
.login.cid .cid-passkey .cid-or { margin: 8px 0 0; padding-top: 12px; border-top: 1px solid var(--line-2); }
.login.cid.cid-closed > .cid-step { display: none; }
.login.cid .cid-pw + .cid-forgot { justify-self: start; }
.login.cid .cid-forgot { background: none; border: 0; padding: 4px 0; color: var(--ink-2, inherit); text-decoration: underline; font: inherit; font-size: 14px; cursor: pointer; text-align: left; }
.login.cid .cid-qr { width: 180px; height: 180px; justify-self: center; background: #fff; border: 1px solid var(--line-2); border-radius: 8px; padding: 6px; }
.login.cid .cid-secret code { user-select: all; word-break: break-all; }
@media (max-width: 760px) {
  .grid2, .grid3, .rc { grid-template-columns: 1fr; }
  .timebar { grid-template-columns: 1fr 1fr; }
  .page { padding: 16px 12px 100px; }
  .rc-view { height: 46vh; }
  .list.small td, .list.small th { padding: 6px; font-size: 13px; }
}
@media print {
  .top, .bar, .tabs, .actions { display: none !important; }
  main { overflow: visible !important; }
  .panel { box-shadow: none; border: 0; }
}
/* narrow windows and phones: brand and buttons on one row, the menu scrolls sideways under them */
@media (max-width: 1180px) {
  .top { row-gap: 6px; }
  .nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; }
  .brand { margin-right: auto; }
}
@media (max-width: 560px) {
  .brand small { display: none; }
  .top .btn { padding: 6px 9px; font-size: 13px; }
}

.ed-wrap > .editor { flex: 1; height: auto; min-height: 0; }

.editor[data-full="1"] { grid-template-columns: 1fr; }
.editor[data-full="1"] > :not(.ed-preview) { display: none; }

/* the document editor as an application (28 Oct 2026): commands in the window toolbar; the form in flat inspector
   sections with hairlines, not stacked cards */
.ed-form .sec { background: none; border: 0; border-bottom: 1px solid var(--hair, var(--line)); border-radius: 0; box-shadow: none; padding: 14px 4px 16px; margin: 0; }
.ed-form .sec > h3 { font-size: 11.5px; color: var(--text-2, var(--navy)); letter-spacing: .06em; }
.tbtn.danger { color: var(--danger, #b42318); }
/* corrections (29 Oct 2026 audit): an issued invoice shows its fixed parts greyed, not as inputs to type in */
.ed-form fieldset.lockset { border: 0; padding: 0; margin: 0; min-width: 0; }
.ed-form fieldset.lockset input, .ed-form fieldset.lockset textarea, .ed-form fieldset.lockset select { background: var(--bg-2, #f4f5f7); color: var(--ink); opacity: 1; cursor: default; }
.ed-form fieldset.lockset .icon-btn, .ed-form fieldset.lockset .btn { display: none; }
.warnbox.muted { background: #f2f2f2; border-color: #ddd; color: #555; }
.chip.cancelled, .chip.void-soft { background: #eee; color: #666; } .chip.adjustment, .chip.credited { background: #fff3dc; color: var(--warn); }
/* account and tax code under a quote or invoice line (Settings › Chart of accounts): compact, one row */
.line-codes { display: flex; gap: 4px; margin-top: 4px; }
.line-codes select { flex: 1 1 0; min-width: 0; font-size: 12px; padding: 2px 4px; border: 1px dashed var(--line-2); border-radius: 6px; background: transparent; color: var(--muted); }
.line-codes select:focus { color: var(--ink); }
.chart-list td { vertical-align: top; }
.acc-jline select.tax { max-width: 160px; }
/* a sent quote or invoice revised in place (30 Oct 2026): when it went, when it last changed, that the client's link follows, Resend */
.ed-form .sentline { margin: -4px 0 10px; }
.ed-form .sentline .linklike { font: inherit; }

/* The job pipeline (wt/pipeline, report §2.3): the stepper, its buttons, the facts and the board by stage. */
.pipe { background: var(--sheet, #fff); border: 1px solid var(--hair, #ddd6ca); border-radius: 10px; padding: 12px 14px; margin-bottom: 12px; }
.pipe-steps { list-style: none; display: flex; gap: 0; margin: 0 0 10px; padding: 0; overflow-x: auto; }
.pstep { flex: 1 1 0; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 0 4px; font-size: 11px; color: var(--text-2, #5a6779); }
.pstep::before { content: ''; position: absolute; top: 11px; left: 0; right: 0; height: 2px; background: var(--hair, #ddd6ca); z-index: 0; }
.pstep:first-child::before { left: 50%; } .pstep:last-child::before { right: 50%; }
.pstep .pdot { position: relative; z-index: 1; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--sheet, #fff); border: 2px solid var(--hair, #ddd6ca); font: 600 11px var(--f-ui, sans-serif); color: var(--text-2, #5a6779); }
.pstep.done .pdot { background: var(--on-bg, #143c5d); border-color: var(--on-bg, #143c5d); color: #fff; } .pstep.done::before { background: var(--on-line, #143c5d); }
.pstep.current .pdot { background: var(--or, #d97757); border-color: var(--or, #d97757); color: #fff; } .pstep.current { color: var(--text, #141f2b); font-weight: 600; }
.pstep.current.side-hold .pdot { background: var(--warn); border-color: var(--warn); } .pstep.current.side-cancelled .pdot { background: var(--bad, #8c3a2e); border-color: var(--bad, #8c3a2e); } .pstep.current.side-return .pdot { background: var(--purple); border-color: var(--purple); }
.pstep .plbl { margin-top: 4px; line-height: 1.2; } .pstep small { color: var(--text-2, #5a6779); font-weight: 400; font-size: 10px; }
.pipe-now { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.pipe-where { flex: 1 1 260px; font-size: 14px; line-height: 24px; } .pipe-where .urg { display: inline-flex; align-items: center; height: var(--pill-h, 24px); margin-left: 8px; padding: 0 10px; border-radius: var(--r-pill, 6px); font: 600 12px/1 var(--f-ui); vertical-align: middle; }
.urg.red { background: var(--danger-bg); color: var(--danger); } .urg.orange { background: var(--warn-bg); color: var(--warn); } .urg.green { background: var(--ok-bg); color: var(--ok); }
.pipe-btns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .pipe-btns .btn[disabled] { opacity: .5; cursor: not-allowed; } .pipe-side { margin-left: 8px; display: inline-flex; gap: 4px; opacity: .8; }
.pipe-facts { margin-top: 10px; } .pipe-facts summary { cursor: pointer; font-size: 13px; color: var(--text-2, #5a6779); }
.pipe-facts h4 { margin: 12px 0 6px; font-size: 13px; } .pipe-kv { margin-top: 8px; } .pipe-list { margin: 0; padding-left: 18px; font-size: 13px; } .pipe-list li.bad { color: var(--bad, #8c3a2e); } .pipe-list .btn.small { margin-left: 6px; }
.pipe-mats.flash { outline: 2px solid var(--or, #d97757); border-radius: 6px; } .pipe-mats table input { text-align: right; }
.hint.lead { display: inline-block; margin-top: 2px; } .hint.lead input { margin-left: 2px; }
.pipe-board { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 12px; }
@media (max-width: 720px) { .pipe-board { flex-direction: column; overflow-x: visible; } .pipe-board > * { min-width: 0 !important; width: 100% !important; flex: none !important; } } /* the jobs board stacks its stages on a phone */
.pb-col { flex: 0 0 200px; background: var(--sheet-2, #f6f8fa); border-radius: 8px; padding: 8px; } .pb-col h4 { margin: 0 0 6px; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-2, #5a6779); }
.pb-card { display: block; background: var(--sheet, #fff); border: 1px solid var(--hair, #ddd6ca); border-left: 4px solid var(--hair, #ddd6ca); border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; font-size: 12px; color: inherit; text-decoration: none; }
.pb-col.pb-quoting { background: var(--bg-2, #eef1f4); } .pb-none { margin: 0 2px 6px; font-size: 12px; } .pb-all { display: block; margin-top: 2px; padding: 2px 2px 0; font-size: 12px; text-decoration: none; }
@media (hover: hover) { .pb-all:hover { text-decoration: underline; } }
.pb-card.urg-red { border-left-color: var(--bad, #8c3a2e); } .pb-card.urg-orange { border-left-color: var(--warn); } .pb-card.urg-green { border-left-color: var(--ok, #1e7b4e); }
/* the phone: the stepper stands up, the buttons go full width at the bottom of the panel */
@media (max-width: 640px) {
  .pipe-steps { flex-direction: column; gap: 6px; overflow: visible; }
  .pstep { flex-direction: row; align-items: center; text-align: left; gap: 8px; min-width: 0; padding: 0; }
  .pstep::before { top: 22px; bottom: -8px; left: 10px; right: auto; width: 2px; height: auto; } .pstep:last-child::before { display: none; } .pstep:first-child::before { left: 10px; }
  .pstep .plbl { margin-top: 0; } .pstep small { margin-left: 6px; }
  .pipe-btns { width: 100%; } .pipe-btns .btn { flex: 1 1 45%; }
}
/* The receipt screen fills the window: the photo on the left, the form beside it (Sean, 2 Nov 2026) */
.dlg.full { width: min(98vw, 2200px); max-height: 96vh; }
.dlg.full .rc { grid-template-columns: minmax(380px, 1.1fr) minmax(440px, 1fr); }
.dlg.full .rc > :first-child { position: sticky; top: 0; align-self: start; }
.dlg.full .rc-view { height: 78vh; }
.rc-view { cursor: zoom-in; }
.rc-view.zoom { cursor: zoom-out; object-fit: none; object-position: top left; }
.rc-pic { max-height: 82vh; overflow: auto; }
@media (max-width: 760px) { .dlg.full { width: 100vw; } .dlg.full .rc > :first-child { position: static; } .dlg.full .rc-view { height: 46vh; } }
/* every dialog on a phone is a sheet the width of the glass (12 Nov 2026: wide dialogs sat 20px off the right edge) */
@media (max-width: 600px) { .modal:not(.side) { padding: 0; place-items: end stretch; } .modal:not(.side) .dlg, .modal:not(.side) .dlg.wide, .modal:not(.side) .dlg.full { width: 100%; max-width: 100vw; max-height: 94dvh; border-radius: 16px 16px 0 0; } .modal:not(.side) .dlg footer { position: sticky; bottom: 0; padding-bottom: calc(12px + env(safe-area-inset-bottom)); } .modal:not(.side) .dlg header { position: sticky; top: 0; background: var(--card); z-index: 2; } }
/* the one receipt tool on a phone (12 Nov 2026): one column, the whole screen, nothing wider than the glass */
@media (max-width: 760px) { .dlg.full .rc, .dlg.wide .rc { grid-template-columns: minmax(0, 1fr); } .dlg.full, .dlg.wide { width: 100vw; max-width: 100vw; max-height: 100dvh; border-radius: 14px 14px 0 0; } .dlg .body { padding: 12px; } .rc input, .rc select, .rc textarea { max-width: 100%; min-width: 0; font-size: 16px; } .rc .grid2, .rc .grid3 { grid-template-columns: minmax(0, 1fr); } }
.rc-abnfix { display: block; } .rc-abnfix .btn { margin: 4px 6px 0 0; }
.rc-capture { display: grid; gap: 8px; align-content: start; } .rc-capture .drop { min-height: 180px; } .rc-or { margin: 0; }
.dlg.full .rc.rc-new > :first-child { position: static; }
@media (max-width: 760px) { .rc-capture .drop { min-height: 0; padding: 18px 12px; } .rc-capture .snap { min-height: 52px; font-size: 17px; width: 100%; justify-content: center; } }

/* declutter (Sean, 8 Nov 2026, reports/Champion HQ declutter screens.md): the dates row first, the client as one line */
.ed-form .sec.ed-dates { padding-top: 6px; }
.ed-form .sec.ed-dates .grid2 { max-width: 420px; }
.ed-client-sum { font-size: 14px; color: var(--ink, var(--text)); line-height: 1.5; overflow-wrap: anywhere; }
.ed-form .sec.ed-price { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.ed-form .sec.ed-price .drawbox { align-self: stretch; }
/* the job overview (declutter, 8 Nov 2026): step bar, figures, the facts one click away; the latest photos beside it on a wide window */
.ws-ov { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@media (min-width: 1100px) { .ws-ov:has(.job-photos:not([hidden])) { grid-template-columns: minmax(0, 1fr) 280px; } }
.ws-ov-main { min-width: 0; }
.ws-facts:empty { display: none; }
.job-photos { display: block; background: var(--sheet, #fff); border: 1px solid var(--hair, #ddd6ca); border-radius: 10px; padding: 12px 14px; }
.job-photos h2 { font-size: 15px; }
.job-photos .bar { margin-bottom: 8px; }
.ws-ph-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.ws-ph-grid .ph-tile { cursor: pointer; }
.tbtn .ic.sm { margin-top: -2px; }
/* the receipts intake (declutter, 8 Nov 2026): the camera with its arrow as one split button; one settings line; help folded */
.snap-split { display: inline-flex; align-items: stretch; gap: 0; }
.snap-split .snap { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.snap-split .snap-arrow { border-top-left-radius: 0; border-bottom-left-radius: 0; border-left: 1px solid rgba(255, 255, 255, .35); padding: 0 8px; min-width: 32px; }
.rc-dest { margin-top: 10px; gap: 8px; flex-wrap: wrap; }
.rc-dest select { max-width: 260px; } .rc-dest .cpick { flex: 0 1 340px; min-width: 200px; }
/* "Charged to": one box that opens a short list with a search line (office/ui/chargepick.mjs) */
.cpick { position: relative; display: inline-block; min-width: 0; max-width: 100%; vertical-align: middle; } .f .cpick { display: block; } .f .cpick-btn { padding: 7px 9px; border-radius: 7px; min-height: 0; }
.cpick-btn { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 36px; padding: 6px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); text-align: left; cursor: pointer; }
.cpick-btn:focus-visible { outline: 2px solid var(--navy); outline-offset: 1px; } .cpick.off .cpick-btn { opacity: .55; cursor: default; }
.cpick-text { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cpick-text b { font-weight: 400; } .cpick-text small { color: var(--muted); font-size: 12px; } .cpick-chev { flex: none; color: var(--muted); font-size: 12px; }
.cpick-pop { position: fixed; z-index: 400; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 8px 28px rgba(14,44,71,.18); overflow: hidden; } .cpick-pop.sheet { border-radius: 14px; box-shadow: 0 0 0 100vmax rgba(8,26,43,.45), 0 8px 28px rgba(14,44,71,.3); }
.cpick-search { flex: none; margin: 8px; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--card); font-size: 16px; }
.cpick-list { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; padding: 0 4px 6px; }
.cpick-group { padding: 8px 8px 3px; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cpick-row { display: flex; flex-direction: column; gap: 1px; padding: 8px 10px; border-radius: 7px; cursor: pointer; } .cpick-row.at { background: var(--card-hover); } .cpick-row.on .cpick-name { color: var(--navy); }
.cpick-row.on .cpick-name::after { content: ' ✓'; } .cpick-name { font-weight: 600; overflow-wrap: anywhere; } .cpick-sub { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.cpick-none { padding: 8px 10px; font-size: 12px; color: var(--muted); }
@media (hover: hover) { .cpick-row:hover { background: var(--card-hover); } }
@media (max-width: 600px) { .rc-dest .cpick { flex: 1 1 100%; } .cpick-row { padding: 11px 10px; } }
.rc-help { margin-top: 8px; } .rc-help summary { cursor: pointer; }
.linklike .ic.sm { vertical-align: -2px; }
/* the Client portal page (8 Nov 2026): two columns for what came in and the log on a wide window */
@media (min-width: 1100px) { .page .ws-ov:has(> .panel + .panel) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.cards .stat.on { outline: 2px solid var(--poseidon, #143c5d); }

/* the variations' own step line on the job (8 Nov 2026) */
.pipe-vars { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--hair, #ddd6ca); }
.pipe-vars h4 { margin: 0 0 6px; font-size: 13px; }
.pipe-var { display: grid; grid-template-columns: minmax(160px, 1.2fr) minmax(0, 2fr) minmax(140px, 1fr); gap: 6px 14px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--hair, #ddd6ca); }
.pipe-var:last-of-type { border-bottom: 0; }
.pipe-var.declined .pipe-var-t { color: var(--text-2, #5a6779); }
.pipe-var-t { text-decoration: none; color: inherit; min-width: 0; overflow-wrap: anywhere; }
.pipe-vsteps { list-style: none; display: flex; gap: 0; margin: 0; padding: 0; }
.pipe-vsteps li { flex: 1; display: flex; flex-direction: column; align-items: center; font-size: 10.5px; color: var(--text-2, #5a6779); position: relative; }
.pipe-vsteps li .pdot { width: 18px; height: 18px; font-size: 10px; }
.pipe-vsteps li.done .pdot { background: var(--poseidon, #143c5d); color: #fff; } .pipe-vsteps li.current .pdot { background: var(--accent, #d97757); color: #fff; }
.pipe-var-sum { margin: 8px 0 0; font-weight: 600; }
@media (max-width: 760px) { .pipe-var { grid-template-columns: 1fr; } }
.ws-var-sub { margin: 10px 0 4px; font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--text-2, #5a6779); }
.ws-var-more { margin: 4px 0 10px; } .ws-var-more summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.rc-view.rc-none, .dlg.full .rc-view.rc-none { height: auto; min-height: 56px; }
@media (max-width: 600px) { .modal:not(.side) .dlg footer { flex-wrap: wrap; padding-left: 12px; padding-right: 12px; } }
/* Scan receipts and its arrow: one height, a small gap, not touching (Sean, 15 Nov 2026) */
.drop .snap-split { justify-self: center; margin-top: 6px; gap: 6px; }
.snap-split .snap { margin-top: 0; border-radius: var(--r-ctl, 8px); }
.snap-split .snap-arrow { border-radius: var(--r-ctl, 8px); border-left: 0; min-width: 40px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 760px) { .rc-capture .snap-split { width: 100%; } .rc-capture .snap-split .snap { flex: 1; width: auto; } .rc-capture .snap-split .snap-arrow { min-height: 52px; min-width: 52px; } }
/* The job summary after a job (hq-011): a difference that cost money reads in the loss colour; the details fold away */
.jsum .jsum-worse td:last-child { color: var(--danger); }
.jsum .jsum-two { align-items: start; margin: 0 0 10px; }
.jsum .jsum-two > .panel { margin: 0; }
.jsum .jsum-more > summary { cursor: pointer; }
.jsum .jsum-more[open] > summary { margin-bottom: 8px; }
.jsum .jsum-more table { margin-top: 4px; }
@media (max-width: 640px) { .jsum .jsum-two { grid-template-columns: minmax(0, 1fr); } .jsum table.list { display: block; overflow-x: auto; } }
