/*
  handyman.css - the look of the Handyman pages (colors, buttons, cards, light and dark mode, phone width).

  WHERE THE LOOK COMES FROM: Doug's Workbench (ciscoengmodel7/program/style.css). The same colors and the same
  buttons, so the two applications feel like one family:
    Sky Blue   #00BCEB / #049FD9   the brand color: main buttons, the picked tab, focus rings
    Charcoal   #242424             text, and the dark text on Sky Blue buttons (white text on Sky Blue is too faint)
    Teal       #244C5A             the banner and the quieter labels
    Slate      #5B6B73             the trip-charge color and other quiet things
    Red / orange / yellow          only for small warnings, "very sparingly" (the Cisco brand guide)

  RULE (Doug, from Workbench): all styling lives in this file. No style="..." in a page, and none written by the script.
  The colors are defined once at the top (:root) and again for dark mode. System fonts only, nothing to download.

  Used by every page of the application (app.py): Estimate, Inbox, Categories, Job catalog, Settings.
  The pieces are grouped below: the top bar, the Estimate page, the Inbox page, the maintenance lists and forms.
*/

:root {
  --sky:#00BCEB; --sky-deep:#049FD9; --charcoal:#242424; --black:#000000; --white:#FFFFFF; --teal:#244C5A; --slate:#5B6B73;
  --bg:#f3f6f8; --card:#ffffff; --ink:#242424; --mute:#58656c; --line:#d6dde1; --chip:#edf2f5;
  --accent:#049FD9; --accent-ink:#242424; --accent-text:#244C5A;
  --ok:#1d7a46; --ok-bg:#e6f4ec; --warn:#8a5a00; --warn-bg:#fff6dc; --bad:#c8102e; --bad-bg:#fdecee;
  --g1:#242424; --g2:#244C5A; --g3:#049FD9;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif; --mono:ui-monospace,Menlo,Consolas,monospace;
}
@media (prefers-color-scheme:dark) { :root:not([data-theme="light"]) {
  --bg:#000000; --card:#242424; --ink:#f2f2f2; --mute:#a9b6bc; --line:#3a3d3f; --chip:#2f3133;
  --accent:#00BCEB; --accent-ink:#000000; --accent-text:#00BCEB;
  --ok:#5cc28a; --ok-bg:#16301f; --warn:#f2b84b; --warn-bg:#33270f; --bad:#ff6b6b; --bad-bg:#3a1c1c; color-scheme:dark; } }
:root[data-theme="dark"] {
  --bg:#000000; --card:#242424; --ink:#f2f2f2; --mute:#a9b6bc; --line:#3a3d3f; --chip:#2f3133;
  --accent:#00BCEB; --accent-ink:#000000; --accent-text:#00BCEB;
  --ok:#5cc28a; --ok-bg:#16301f; --warn:#f2b84b; --warn-bg:#33270f; --bad:#ff6b6b; --bad-bg:#3a1c1c; color-scheme:dark; }

* { box-sizing:border-box; }
[hidden] { display:none !important; }
body { margin:0; background:var(--bg); color:var(--ink); font:15px/1.5 var(--sans); }
button, input, select, textarea { font:inherit; color:inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible, summary:focus-visible {
  outline:3px solid var(--accent); outline-offset:2px; }
a { color:var(--accent-text); }
h1, h2, h3 { margin:0; text-wrap:balance; }
.small { font-size:13px; color:var(--mute); }
.mono { font-family:var(--mono); }
.right { text-align:right; }
.nowrap { white-space:nowrap; }
.spacer { height:8px; }

/* ---------- the top bar ---------- */
.topbar { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; padding:10px 18px; background:var(--card); border-bottom:1px solid var(--line); }
.topbar .brand { font-weight:700; font-size:17px; margin-right:12px; color:var(--ink); text-decoration:none; }
.topbar .brand span { color:var(--accent-text); }
.topbar nav { display:flex; gap:2px; flex-wrap:wrap; margin-right:auto; }
.topbar nav a { padding:6px 10px; color:var(--mute); text-decoration:none; border-bottom:2px solid transparent; }
.topbar nav a:hover { color:var(--ink); }
.topbar nav a.on { color:var(--ink); border-color:var(--accent); font-weight:600; }
.themebtn { border:1px solid var(--line); background:var(--card); border-radius:16px; padding:4px 12px; font-size:13px; cursor:pointer; }
/* PHONE (2026-11-12, Doug: no wasted space at the top): the menu is ONE row you swipe sideways, under the name and Theme */
@media (max-width:639px) {
  .topbar { padding:6px 12px 0; gap:2px 10px; }
  .topbar .brand { font-size:16px; margin-right:auto; }
  .themebtn { padding:2px 10px; font-size:12px; }
  .topbar nav { order:3; width:100%; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; -webkit-overflow-scrolling:touch; margin:0 -4px; }
  .topbar nav::-webkit-scrollbar { display:none; }
  .topbar nav a { white-space:nowrap; padding:8px 8px; font-size:15px; }
}

main { max-width:1000px; margin:0 auto; padding:18px 16px 70px; }
main.wide { max-width:1280px; }
.copybar { background:var(--warn-bg); color:var(--warn); text-align:center; font-weight:600; font-size:13.5px; padding:6px 12px; overflow-wrap:anywhere; }
.pagehead { margin:4px 0 14px; }
.pagehead h1 { font-size:26px; }
.pagehead p { margin:2px 0 0; }
h2.section { font-size:18px; margin:26px 0 10px; }

/* ---------- the banner at the top of the page ---------- */
.hero { position:relative; overflow:hidden; border-radius:22px; padding:26px 26px 22px; color:#fff; background:linear-gradient(135deg,var(--g1) 0%,var(--g2) 55%,var(--g3) 100%);
        box-shadow:0 10px 30px rgba(4,159,217,.22); }
.hero::before { content:""; position:absolute; width:340px; height:340px; right:-90px; top:-170px; border-radius:50%; background:radial-gradient(circle,rgba(0,188,235,.38),rgba(0,188,235,0) 70%); pointer-events:none; }
.hero::after { content:""; position:absolute; width:260px; height:260px; left:-80px; bottom:-150px; border-radius:50%; background:radial-gradient(circle,rgba(255,255,255,.16),rgba(255,255,255,0) 70%); pointer-events:none; }
.hero > * { position:relative; z-index:1; }
.hero .eyebrow { font-size:12px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; color:var(--sky); }
.hero .top { display:flex; flex-wrap:wrap; justify-content:space-between; align-items:flex-end; gap:12px 24px; }
.hero h1 { font-size:30px; line-height:1.15; margin:4px 0 4px; }
.hero p { margin:0; opacity:.92; overflow-wrap:anywhere; }
.hero .bigtotal { text-align:right; }
.hero .bigtotal .amount { font-size:46px; font-weight:800; line-height:1; letter-spacing:-.01em; }
.hero .bigtotal .what { font-size:13px; opacity:.9; margin-top:4px; }
.tiles { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:10px; margin-top:20px; }
.tile { background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.22); border-left:4px solid var(--sky); border-radius:14px; padding:10px 14px; backdrop-filter:blur(2px); }
.tile .k { font-size:12px; opacity:.85; }
.tile .v { font-size:21px; font-weight:700; }

/* ---------- the workspace: the Jobs list on the left, ONE column of blocks on the right ---------- */
.workspace { display:grid; grid-template-columns:292px minmax(0,1fr); gap:20px; align-items:start; margin-top:18px; }
.stack { display:grid; gap:18px; min-width:0; }
@media (max-width:900px) { .workspace { grid-template-columns:minmax(0,1fr); } .hero .bigtotal { text-align:left; } }

/* the Jobs list: stays in view while the blocks scroll, and scrolls by itself when there are many jobs */
.jobside { position:sticky; top:12px; max-height:calc(100vh - 24px); display:flex; flex-direction:column; min-width:0;
           background:var(--card); border:1px solid var(--line); border-radius:18px; box-shadow:0 6px 20px rgba(0,0,0,.06); overflow:hidden; }
.jobside > h2 { display:flex; justify-content:space-between; align-items:center; padding:14px 16px 10px; font-size:12px; text-transform:uppercase; letter-spacing:.12em; color:var(--accent-text);
                border-bottom:1px solid var(--line); background:linear-gradient(180deg,var(--chip),var(--card)); }
.jcount { background:var(--accent); color:var(--accent-ink); border-radius:10px; padding:0 9px; font-size:12px; letter-spacing:0; }
.joblist { overflow-y:auto; overscroll-behavior:contain; padding:10px; display:grid; gap:8px; scrollbar-width:thin; }
.jobitem { --st:var(--line); display:grid; gap:3px; padding:9px 12px; color:var(--ink); background:var(--bg);
           border:1px solid var(--line); border-left:6px solid var(--st); border-radius:12px; transition:transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.jobitem:hover { border-color:var(--accent); border-left-color:var(--st); transform:translateX(2px); box-shadow:0 3px 10px rgba(0,0,0,.08); }
.jlink { display:grid; gap:3px; text-decoration:none; color:inherit; }
.jobitem.is-archived { border-style:dashed; border-left-style:solid; opacity:.8; filter:grayscale(.55); }
.jobitem.is-returned { background:var(--warn-bg); outline:2px solid #e0a100; outline-offset:-2px; }
.jobitem.s-ok { --st:var(--ok); }
.jobitem.s-warn { --st:#e0a100; }
.jobitem.s-bad { --st:var(--bad); }
.jobitem.s-sky { --st:var(--sky); }
.jobitem.on { background:var(--accent); border-color:var(--accent); border-left-color:var(--st); color:var(--accent-ink); box-shadow:0 4px 14px rgba(4,159,217,.35); }
.jobitem.on .jcat, .jobitem.on .jwords, .jobitem.on .jdate { color:var(--accent-ink); opacity:.85; }
.jtop { display:flex; justify-content:space-between; align-items:baseline; gap:8px; }
.jtop b { font-size:15px; }
.jtotal { font-weight:700; font-size:14px; white-space:nowrap; }
.jcat { font-size:12.5px; font-weight:600; color:var(--accent-text); }
.jwords { font-size:12.5px; color:var(--mute); overflow-wrap:anywhere; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.jfoot { display:flex; justify-content:space-between; align-items:center; gap:6px; margin-top:2px; }
.jtags { display:flex; gap:4px; flex-wrap:wrap; justify-content:flex-end; }
.jnote { font-size:12px; font-weight:600; color:var(--warn); }
.jobitem.is-archived .jnote { color:var(--mute); font-weight:500; }
.jobitem.on .jnote { color:var(--accent-ink); }
.jbtns { display:flex; gap:6px; margin-top:4px; }
.jbtn { font-size:12px; padding:2px 11px; border:1px solid var(--line); background:var(--card); color:var(--ink); border-radius:9px; cursor:pointer; }
.jbtn:hover { border-color:var(--accent); }
.jbtn:disabled { opacity:.5; cursor:default; }
.jempty { padding:6px 4px; }
.jtabs { display:flex; gap:6px; padding:8px 10px 0; }
.jtabs a { flex:1; text-align:center; padding:6px 8px; border-radius:10px 10px 0 0; border:1px solid var(--line); border-bottom:0; background:var(--chip); color:var(--mute); text-decoration:none; font-size:13px; }
.jtabs a b { background:var(--bg); border-radius:9px; padding:0 7px; margin-left:3px; color:var(--ink); }
.jtabs a.on { background:var(--card); color:var(--ink); font-weight:700; box-shadow:0 2px 0 var(--card); position:relative; top:1px; }
.archivednote { margin-top:14px; }
.jdate { font-size:11.5px; color:var(--mute); }
@media (max-width:900px) { .jobside { position:static; max-height:300px; } }

.card { background:var(--card); border:1px solid var(--line); border-radius:16px; padding:18px; box-shadow:0 4px 16px rgba(0,0,0,.04); min-width:0; }
.card > h2 { font-size:17px; display:flex; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:4px; }
.card > .sub { margin:0 0 12px; font-size:13.5px; color:var(--mute); }
.card.accent { border-top:5px solid var(--sky); }
.card.teal { border-top:5px solid var(--teal); }
.card.warnbox { border-color:var(--warn); }

/* the Estimate page's blocks (in the right-hand column): own color and icon each */
.stack .card { border-top:5px solid var(--k,var(--line)); padding:20px 20px 18px; }
.stack .card > h2 { font-size:18px; margin-bottom:6px; }
.stack .card > h2::before { content:var(--ico,""); display:inline-grid; place-items:center; width:32px; height:32px; border-radius:50%; font-size:16px; background:var(--chip); }
@supports (background:color-mix(in srgb, red 10%, white)) { .stack .card > h2::before { background:color-mix(in srgb, var(--k,#888) 18%, transparent); } }
.k-request  { --k:#049FD9; --ico:"\2709\FE0F"; }
.k-client   { --k:#2f7f95; --ico:"\1F464"; }
.k-details  { --k:#5B6B73; --ico:"\1F4CB"; }
.k-lines    { --k:#1d9a5a; --ico:"\1F9FE"; }
.k-adjust   { --k:#00BCEB; --ico:"\1F6E0\FE0F"; }
.k-rates    { --k:#5B6B73; --ico:"\1F4B2"; }
.k-versions { --k:#7a8a92; --ico:"\1F5C2\FE0F"; }
.k-notes    { --k:#d9a400; --ico:"\1F4DD"; }
.k-title    { --k:#5f6fd8; --ico:"\1F3F7\FE0F"; }
.k-history  { --k:#5B6B73; --ico:"\1F4EC"; }

/* ---------- small labels ---------- */
.tag { font-size:11.5px; padding:1px 9px; border-radius:9px; background:var(--chip); color:var(--mute); font-weight:600; white-space:nowrap; }
.tag.ok { background:var(--ok-bg); color:var(--ok); }
.tag.warn { background:var(--warn-bg); color:var(--warn); }
.tag.bad { background:var(--bad-bg); color:var(--bad); }
.tag.sky { background:var(--sky); color:var(--charcoal); }
.pill { display:inline-block; white-space:nowrap; font-size:12px; font-weight:700; padding:1px 10px; border-radius:10px; color:#fff; background:var(--slate); text-transform:capitalize; }
.pill.labor { background:var(--sky-deep); color:var(--charcoal); }
.pill.trip { background:var(--slate); }
.pill.part, .pill.material { background:var(--teal); }
.pill.disposal, .pill.other { background:var(--slate); }
@media (prefers-color-scheme:dark) { :root:not([data-theme="light"]) .pill.part, :root:not([data-theme="light"]) .pill.material { background:#5fb3c9; color:#000; } }
:root[data-theme="dark"] .pill.part, :root[data-theme="dark"] .pill.material { background:#5fb3c9; color:#000; }

.msg { border-radius:10px; padding:8px 12px; font-size:13.5px; margin:10px 0 0; }
.msg.ok { background:var(--ok-bg); color:var(--ok); }
.msg.warn { background:var(--warn-bg); color:var(--warn); }
.msg.bad { background:var(--bad-bg); color:var(--bad); }
.msg.info { background:var(--chip); color:var(--ink); }
.banner { margin:14px 0 0; }

/* ---------- tables ---------- */
.tablewrap { overflow-x:auto; }
table.lines { width:100%; border-collapse:collapse; font-size:14px; }
table.lines th { text-align:left; font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:var(--mute); padding:6px 8px; border-bottom:1px solid var(--line); }
table.lines td { padding:8px; border-bottom:1px solid var(--line); vertical-align:top; overflow-wrap:anywhere; }
table.lines th.right, table.lines td.right { text-align:right; white-space:nowrap; }
table.lines tr.total td { border-bottom:0; font-size:16px; font-weight:800; padding-top:12px; }
table.lines td.up { color:var(--bad); }
table.lines td.down { color:var(--ok); }
.empty { padding:18px; text-align:center; color:var(--mute); }

/* ---------- forms ---------- */
.field { display:grid; gap:4px; margin-bottom:14px; min-width:0; }
.field label, .label { font-size:13px; font-weight:600; }
.field .hint { font-size:12.5px; color:var(--mute); }
input.t, select.t, textarea.t { width:100%; padding:9px 11px; border:1px solid var(--line); border-radius:9px; background:var(--bg); min-width:0; }
textarea.t { min-height:76px; resize:vertical; }
.row2 { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:0 14px; }
.hoursbox { display:flex; gap:6px; align-items:center; }
.hoursbox input { flex:1; text-align:center; font-weight:700; font-size:17px; }

.partrow { display:grid; grid-template-columns:minmax(0,1fr) 70px 96px 84px 36px; gap:6px; align-items:center; margin-bottom:6px; }
.partrow .rowtotal { text-align:right; font-weight:600; font-size:14px; white-space:nowrap; }
.partrow.heads { font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.05em; color:var(--mute); }
@media (max-width:560px) { .partrow { grid-template-columns:minmax(0,1fr) 60px 80px 32px; } .partrow .rowtotal, .partrow.heads .rowtotal { display:none; } }

/* ---------- buttons (the Workbench set) ---------- */
.btn { border:1px solid var(--line); background:var(--card); color:var(--ink); border-radius:10px; padding:8px 16px; cursor:pointer; }
.btn:hover { border-color:var(--accent); }
.btn.p { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); font-weight:600; }
.btn.p:hover { background:var(--sky); border-color:var(--sky); }
.btn.sm { padding:4px 12px; font-size:13px; }
.btn.icon { padding:4px 0; width:36px; text-align:center; }
.btn.danger { color:var(--bad); border-color:var(--bad); }
a.btn { display:inline-block; text-decoration:none; color:var(--ink); }
a.btn.p { color:var(--accent-ink); }
.btn:disabled { opacity:.5; cursor:default; }
.actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:6px; }

/* ---------- the preview strip, notes, details ---------- */
.preview { border:2px dashed var(--sky-deep); border-radius:14px; padding:12px 14px; margin-top:14px; background:var(--bg); }
.preview h3 { font-size:14px; margin-bottom:6px; display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.note { border-left:4px solid var(--sky); background:var(--bg); border-radius:0 10px 10px 0; padding:8px 12px; margin-bottom:8px; overflow-wrap:anywhere; white-space:pre-wrap; }
.note .when { display:block; font-size:12px; color:var(--mute); }
.sysnote { font-size:13px; color:var(--mute); background:var(--chip); border-radius:10px; padding:8px 12px; overflow-wrap:anywhere; margin-bottom:8px; }
dl.summary { display:grid; grid-template-columns:max-content 1fr; gap:6px 14px; margin:0; font-size:14px; }
dl.summary dt { color:var(--mute); }
dl.summary dd { margin:0; min-width:0; overflow-wrap:anywhere; }
.words { white-space:pre-wrap; background:var(--bg); border:1px solid var(--line); border-radius:10px; padding:12px; margin:0 0 12px; font:inherit; overflow-wrap:anywhere; }
.photos { display:flex; flex-wrap:wrap; gap:8px; }
.photos img { height:96px; width:auto; max-width:100%; border-radius:10px; border:1px solid var(--line); display:block; }
details { font-size:14px; }
details summary { cursor:pointer; font-weight:600; color:var(--accent-text); padding:4px 0; }
details > .inner { padding-top:10px; }
.ratechips { display:flex; flex-wrap:wrap; gap:8px; margin-bottom:10px; }
.ratechip { background:var(--chip); border-radius:12px; padding:6px 12px; }
.ratechip .k { font-size:12px; color:var(--mute); display:block; }
.ratechip .v { font-weight:700; }
.versionlist { display:grid; gap:6px; }
.versionlist a { display:flex; justify-content:space-between; gap:10px; align-items:center; border:1px solid var(--line); border-radius:12px; padding:8px 12px; text-decoration:none; color:var(--ink); background:var(--bg); }
.versionlist a.on { border-color:var(--accent); box-shadow:0 0 0 1px var(--accent); font-weight:600; }
.versionlist a:hover { border-color:var(--accent); }

.hero .heroactions { margin-top:16px; display:flex; flex-wrap:wrap; justify-content:flex-end; align-items:center; gap:8px 14px; }
.hero .pdfnote { font-size:12px; opacity:.9; flex:1 1 220px; text-align:right; }
.hero .pdfnote a { color:#fff; }
@media (max-width:900px) { .hero .heroactions { justify-content:flex-start; } .hero .pdfnote { text-align:left; } }

/* ---------- the Inbox page ---------- */
.tiles.flat .tile { background:var(--bg); border:1px solid var(--line); color:var(--ink); }
/* Inbox (2026-11-13, Doug's screen review): the "things to check" tile jumps to the folded box under the jobs */
.tilelink { color:inherit; text-decoration:none; display:block; }
.tilelink:hover .tile { border-color:var(--bad); }
.probbox > summary, .advbox > summary { cursor:pointer; font-weight:700; font-size:17px; min-height:44px; display:flex; align-items:center; gap:10px; }
.probbox > summary .small, .advbox > summary .small { font-weight:400; }
.advbox[open] > summary { margin-bottom:12px; }
.probbox[open] > summary .small { display:none; }
.tiles.flat .tile .k { opacity:1; color:var(--mute); }
.tiles.flat .tile.bad .v { color:var(--bad); }
.problemlist { margin:6px 0 0; padding-left:20px; }
.problemlist li { margin:4px 0; overflow-wrap:anywhere; }
.msg .problemlist { margin-top:4px; }
.jobcard { margin-bottom:16px; }
.jobcard .sub { overflow-wrap:anywhere; }
.jobcard .actions { justify-content:space-between; margin-top:12px; }
/* Inbox: each job is one line that opens on a tap (2026-11-13, Doug's screen review) */
.jobcard { padding:0; }
.jobline { list-style:none; cursor:pointer; display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:4px 12px;
  padding:14px 18px; min-height:56px; }
.jobline::-webkit-details-marker { display:none; }
.jobline .jname { font-weight:700; font-size:16px; min-width:0; overflow-wrap:anywhere; }
.jobline .jtags { display:flex; gap:6px; flex-wrap:wrap; }
.jobline .jamt { font-weight:700; font-variant-numeric:tabular-nums; }
.jobline .small { grid-column:1 / -1; }
.jobcard[open] > .jobline { border-bottom:1px solid var(--line); }
.jobbody { padding:14px 18px 18px; }
@media (max-width:639px) { .jobline { grid-template-columns:minmax(0,1fr) auto; } .jobline .jtags { grid-column:1 / -1; grid-row:2; } }
.clientform { border-top:1px solid var(--line); margin-top:14px; padding-top:12px; }
.clientform h3 { display:flex; align-items:center; gap:10px; margin:0 0 10px; font-size:15px; }
.clientform .actions { justify-content:flex-start; gap:10px; margin-top:4px; }
.clientmsg:empty { display:none; }
.history { margin-top:12px; font-size:13.5px; }
.history summary { cursor:pointer; font-weight:600; }
#result:not(:empty) { margin:0; }
.diary { white-space:pre-wrap; overflow-wrap:anywhere; font:13px/1.5 var(--mono); margin:0; max-height:360px; overflow:auto; }
table.lines td .tag { white-space:normal; }
.tablewrap table.lines { min-width:520px; }

/* ---------- the maintenance lists and forms (Categories, Job catalog, Settings) ---------- */
.bar { display:flex; flex-wrap:wrap; gap:8px 14px; align-items:center; margin:0 0 12px; }
tr.off td { color:var(--mute); }
table.lines td form { display:inline; margin:0; }
table.lines td .btn { margin-left:6px; }
code { font-family:var(--mono); font-size:13px; background:var(--chip); border-radius:6px; padding:1px 6px; }
.filters { display:flex; flex-wrap:wrap; gap:8px 14px; align-items:end; margin:0 0 14px; }
.filters label { display:grid; gap:4px; font-size:13px; font-weight:600; }
.editform { max-width:760px; }
.editform label { display:grid; gap:4px; margin-bottom:14px; font-size:13px; font-weight:600; min-width:0; }
.editform .hint { display:block; font-weight:400; font-size:12.5px; color:var(--mute); }
.editform input.t.short { max-width:180px; }
.trio { display:flex; flex-wrap:wrap; gap:0 18px; }
.trio label { flex:0 1 220px; }
select.t { appearance:auto; }

@media (prefers-reduced-motion:no-preference) { .card { animation:rise .25s ease; } @keyframes rise { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:none; } } }
@media (max-width:560px) { .hero h1 { font-size:24px; } .hero .bigtotal .amount { font-size:38px; } .card { padding:14px; } }
@media print { .heroactions, .topbar, .copybar, .jobside, .actions, .themebtn { display:none !important; } body { background:#fff; } .hero { color:#000; background:#fff; border:1px solid #999; } }

/* History page (history_page.py): the form and the list side by side on a wide screen, one under the other on a phone */
.hgrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(380px,1fr)); gap:18px; align-items:start; }
.hpart { display:grid; grid-template-columns:minmax(0,1fr) 70px 110px; gap:6px; margin-bottom:6px; }
.hpart.heads { font-size:12px; font-weight:600; text-transform:uppercase; letter-spacing:.05em; color:var(--mute); }
.hgrid .editform { max-width:none; }

/* History page, version B (history_page.py): job names on the left, ONE column of blocks on the right (like the Estimate page) */
.k-add  { --k:#00BCEB; --ico:"\2795"; }
.k-edit { --k:#d9a400; --ico:"\270F\FE0F"; }
.k-past { --k:#1d9a5a; --ico:"\1F5C2\FE0F"; }
.namepane .namesearch { display:flex; gap:6px; padding:10px 10px 0; }
.namepane .namesearch .t { flex:1; padding:6px 10px; }
.namepane .joblist { gap:2px; max-height:calc(100vh - 230px); }
.catlabel { font-size:11.5px; text-transform:uppercase; letter-spacing:.1em; font-weight:700; color:var(--accent-text); padding:10px 6px 2px; }
.nm { display:flex; justify-content:space-between; align-items:center; gap:8px; padding:6px 10px; border:1px solid transparent; border-radius:10px; color:var(--ink); text-decoration:none; font-size:14px; }
.nm:hover { border-color:var(--accent); }
.nm.on { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); font-weight:600; }
.cnt { min-width:22px; text-align:center; font-size:12px; font-weight:700; border-radius:10px; padding:0 7px; background:var(--ok-bg); color:var(--ok); }
.cnt.zero { background:transparent; color:var(--mute); border:1px solid var(--line); font-weight:500; }
.nm.on .cnt { background:var(--accent-ink); color:var(--card); border-color:var(--accent-ink); }
.subs { display:grid; gap:3px; margin:2px 0 6px 12px; padding-left:10px; border-left:3px solid var(--accent); }
.en { display:flex; flex-direction:column; padding:5px 10px; border:1px solid var(--line); border-radius:9px; background:var(--bg); color:var(--ink); text-decoration:none; font-size:13px; }
.en:hover { border-color:var(--accent); }
.en.on { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); font-weight:600; }
.en.on .small { color:var(--accent-ink); }
.en.off { opacity:.65; }
.en.off span:first-child { text-decoration:line-through; }
.addname { display:block; margin-top:8px; padding:8px 10px; border:1px dashed var(--slate); border-radius:10px; color:var(--ink); text-decoration:none; font-size:13.5px; }
.addname:hover { border-color:var(--accent); }
.editgrid { display:grid; grid-template-columns:repeat(auto-fit,minmax(260px,1fr)); gap:0 28px; align-items:start; }
.editgrid > * { min-width:0; }
.stack .editform { max-width:none; }
.switchrow { margin-top:14px; padding-top:12px; border-top:1px solid var(--line); }
.switchrow form { margin:0; }
tr.sel td { background:var(--chip); }
.namepane { align-self:start; }
.k-hidden { --k:#7a8a92; --ico:"\1F5C3\FE0F"; }
.hiddenbox summary { display:inline-block; list-style:none; cursor:pointer; padding:8px 16px; border:1px solid var(--line); border-radius:10px; background:var(--card); font-weight:600; }
.hiddenbox summary::-webkit-details-marker { display:none; }
.hiddenbox summary:hover { border-color:var(--accent); }
.hiddenbox[open] summary { margin-bottom:12px; }
.k-saved { --k:#1d7a46; --ico:"\1F4B2"; }
.k-ratesedit { --k:#049FD9; --ico:"\1F527"; }
.k-ratehist { --k:#7a8a92; --ico:"\1F4C5"; }
.k-worknote { --k:#2f78b7; --ico:"\1F4DD"; }

/* ===== Phone sign-in (signin_page.py, 2026-11-12). Phone first: big targets, 16px+ text so iOS does not zoom. ===== */
.signin-main { max-width:440px; margin:0 auto; padding:24px 16px 40px; }
.signin-card h1 { font-size:24px; margin:2px 0 12px; }
.signin-card .eyebrow, .eyebrow { margin:0; font-size:12px; font-weight:700; letter-spacing:.08em; text-transform:uppercase; color:var(--accent-text); }
.signin-form { display:grid; gap:10px; margin-top:8px; }
.signin-label { font-weight:600; font-size:16px; }
.pinbox, .bigbox { box-sizing:border-box; width:100%; min-height:52px; font-size:22px; padding:8px 12px; border:1px solid #7d8b93;
  border-radius:12px; background:var(--card); color:var(--ink); }
.pinbox { letter-spacing:.5em; text-align:center; font-family:var(--mono); }
.bigbox { font-size:17px; }
.keypad { display:grid; grid-template-columns:repeat(3, 1fr); gap:10px; margin:4px 0; }
.keypad[hidden] { display:none; }
.key { min-height:60px; font-size:26px; font-weight:600; border:1px solid var(--line); border-radius:14px; background:var(--chip);
  color:var(--ink); cursor:pointer; touch-action:manipulation; }
.key:active { background:var(--line); }
.key-small { font-size:16px; }
.remember { display:flex; align-items:center; gap:10px; min-height:44px; font-size:16px; }
.remember input { width:24px; height:24px; }
.btn.big { min-height:52px; font-size:17px; width:100%; display:inline-flex; align-items:center; justify-content:center; box-sizing:border-box; }

/* ===== Intake page (intake_page.py, 2026-11-12; made COMPACT for the phone 2026-11-12 evening, Doug). MOBILE FIRST: these
   base rules are the PHONE layout (one column, slim top band, Approve and send right under it, sticky Save bar).
   min-width queries below add the iPad (640px) and laptop (1024px) layouts. Touch targets stay at least 44px high with
   16px text (iOS zooms smaller text); input borders #7d8b93 = 3:1 contrast. ===== */
.intake { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
.intake-main, .intake-side { display:grid; gap:10px; align-content:start; min-width:0; }
/* the slim top band */
.hero.ihero { padding:10px 14px 10px; margin-bottom:10px; border-radius:16px; }
.ihero-row { display:flex; align-items:center; justify-content:space-between; gap:8px 12px; min-width:0; }
.ihero .eyebrow { font-size:11px; letter-spacing:.06em; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ihero h1 { font-size:18px; line-height:1.2; margin:4px 0 2px; overflow-wrap:anywhere; min-width:0; }
.ihero .iamount { font-size:24px; font-weight:800; line-height:1; white-space:nowrap; }
.ihero .small { color:#fff; opacity:.85; margin:0; font-size:13px; }
.chip { display:inline-block; font-size:12px; font-weight:700; padding:2px 9px; border-radius:10px; background:rgba(255,255,255,.18); color:#fff; white-space:nowrap; }
.chip.ok { background:var(--ok-bg); color:var(--ok); }
.chip.warn { background:var(--warn-bg); color:var(--warn); }
/* the cards: smaller padding and headings on the phone */
.intake .card, .iact { padding:12px 14px; border-radius:14px; }
.icard h2, .iact h2 { display:flex; align-items:center; gap:8px; margin:0 0 8px; font-size:17px; }
.icard .num { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:50%;
  background:var(--teal); color:#fff; font-size:13px; flex:none; }
/* Approve and send (right under the top band) */
.iact { margin-bottom:10px; display:grid; gap:8px; }
.iact h2 { margin:0; }
.iactrow { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:8px; }
.iactrow .btn.big, .isend .btn.big { margin:0; min-height:46px; font-size:15.5px; padding:6px 8px; white-space:nowrap; }
.iapproved.msg { margin:0; display:flex; align-items:center; font-size:15px; font-weight:600; }
.isend { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; }
.isend .btn.big { width:auto; min-width:110px; }
.imsg summary { cursor:pointer; font-size:14px; font-weight:600; color:var(--accent-text); min-height:32px; display:flex; align-items:center; }
.imsg .ibox { margin-top:6px; }
/* a draft invoice's "Throw away this draft", at the bottom of the page in red (2026-11-13, Doug's screen review) */
.dangerbox { border-color:var(--bad); }
.dangerbox .imsg summary { color:var(--bad); min-height:44px; }
.dangerbox .btn.big { border-color:var(--bad); color:var(--bad); }
.iact .switch { font-size:14px; font-weight:600; }
.iact .ifoot, .iact #sendwhy { margin:0; font-size:12.5px; color:var(--mute); }
.iact .msg { margin:0; }
/* the floating "Saved" / "Nothing was saved" message (only with JavaScript; without it, it sits at the top) */
.itoast { position:relative; margin-bottom:10px; }
.itoast .msg { margin:0; padding:10px 44px 10px 12px; font-size:15px; }
.itoastx { position:absolute; top:4px; right:4px; min-width:36px; min-height:36px; padding:0; font-size:20px; background:transparent; border:0; }
.js .itoast { position:fixed; z-index:30; left:12px; right:12px; top:calc(10px + env(safe-area-inset-top)); max-width:560px; margin:0 auto;
  box-shadow:0 8px 24px rgba(0,0,0,.18); border-radius:10px; }
.itoast[hidden] { display:none; }
.js .itoast .msg { background-color:var(--card); }   /* (2026-11-13) it floats over the page: solid, even with the Ledger look's clear backgrounds */
.ihelp { font-size:12.5px; color:var(--mute); margin:10px 0 0; }
.ftag { display:inline-block; font-size:11.5px; font-weight:600; padding:1px 7px; border-radius:10px; margin-left:6px; vertical-align:1px; }
.ihelp .ftag { margin-left:0; }
.ftag[hidden] { display:none; }
.ftag.got { background:var(--ok-bg); color:var(--ok); }
.ftag.miss { background:var(--warn-bg); color:var(--warn); }
.ftag.opt { background:var(--chip); color:var(--mute); }
.ftag.mine { background:var(--chip); color:var(--ink); }
.ftag.edited { background:#dbeffa; color:#0b5d86; }
.attn { border:2px solid #e0a100; background:var(--warn-bg); }
.attn h2 { color:var(--warn); margin:0 0 4px; font-size:16px; }
.attn ul { margin:0; padding-left:18px; font-size:15px; }
.attn li { margin:2px 0; }
.attn .small { margin:6px 0 0; }
.attn.done { border-color:var(--ok); background:var(--ok-bg); padding:8px 14px; }
.attn.done h2 { color:var(--ok); margin:0; font-size:15px; }
/* boxes */
.igrid { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; }
.igrid.two { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
.igrid.two .full { grid-column:1 / -1; }
.ifield { display:grid; gap:2px; margin-bottom:8px; min-width:0; }
.igrid .ifield { margin-bottom:0; }
.igrid + .ifield, .ifield.wide { margin-top:8px; }
.ifield label { font-weight:600; font-size:14px; }
.ibox { box-sizing:border-box; width:100%; min-height:44px; font-size:16px; padding:8px 10px; border:1px solid #7d8b93; border-radius:9px;
  background:var(--card); color:var(--ink); font-family:inherit; }
textarea.ibox { min-height:76px; resize:vertical; }
textarea.ibox.short { min-height:52px; }
.ibox:disabled { opacity:.6; }
.ibtn { min-width:44px; min-height:44px; font-size:22px; font-weight:700; padding:0 10px; touch-action:manipulation; }
.stepper { display:grid; grid-template-columns:52px minmax(0,1fr) 52px; gap:8px; }
.stepper .ibox { text-align:center; font-size:20px; font-weight:700; }
.ilabel { font-weight:600; font-size:14px; margin:10px 0 4px; }
/* phone: each part = the name on its own line, then qty | price | remove */
.ipart { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) 44px; gap:6px; padding:8px 0; border-bottom:1px solid var(--line); }
.ipart .pname { grid-column:1 / -1; }
.ipart.heads { display:none; }
.addpart { font-size:15px; font-weight:600; margin-top:8px; width:100%; }
.ptotal { display:flex; justify-content:space-between; margin:8px 0 0; font-size:15px; }
/* each box's own Save (keeps your place). With JavaScript it shows once something in that box is changed. */
.cardsave { display:flex; justify-content:flex-end; margin-top:10px; }
.cardsave .btn { min-height:44px; min-width:120px; font-size:16px; font-weight:700; }
.js .cardsave:not(.on) { display:none; }
.srow { display:flex; justify-content:space-between; gap:10px; padding:6px 0; border-bottom:1px solid var(--line); font-size:15px; }
.srow.total { border-bottom:0; font-size:18px; }
.intake-side .btn.big { margin-top:8px; min-height:46px; }
.intake-side .small { margin:6px 0 0; }
.btn.approve { border-color:var(--ok); color:var(--ok); font-weight:700; }
.btn:disabled { opacity:.55; cursor:not-allowed; }
.savebar { position:sticky; bottom:0; z-index:5; display:flex; align-items:center; justify-content:space-between; gap:12px; margin:10px -16px -70px;
  padding:8px 16px calc(8px + env(safe-area-inset-bottom)); background:var(--card); border-top:1px solid var(--line); box-shadow:0 -4px 14px rgba(0,0,0,.08); font-size:16px; }
.savebar .btn { min-height:44px; min-width:110px; font-size:16px; }
.ilist { display:grid; gap:8px; }
.etable { display:none; }   /* the Estimates table: laptop side only (2026-11-13) */
.invstack { display:flex; flex-direction:column; gap:14px; }   /* the Invoices list page: button, list, CSV download */
.ilistrow { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:10px; align-items:center; min-height:48px; padding:8px 12px;
  border:1px solid var(--line); border-radius:12px; color:var(--ink); text-decoration:none; }
.ilistrow .amt { font-weight:700; }

/* iPad: still one column; client and job boxes two per row; parts in one row each */
@media (min-width:640px) {
  .igrid { grid-template-columns:repeat(2, minmax(0,1fr)); }
  .igrid.two .full { grid-column:auto; }
  .ihero h1 { font-size:22px; }
  .ihero .iamount { font-size:30px; }
  .iactrow { grid-template-columns:repeat(2, minmax(0,220px)); }
  .isend { grid-template-columns:minmax(0,440px) auto; justify-content:start; }
  .ipart { grid-template-columns:minmax(0,3fr) minmax(0,1fr) minmax(0,1.3fr) 44px; padding:4px 0; border-bottom:0; }
  .ipart .pname { grid-column:auto; }
  .ipart.heads { display:grid; font-size:12px; text-transform:uppercase; letter-spacing:.05em; color:var(--mute); }
  .addpart { width:auto; }
}
/* laptop: main column + a 360px sticky side column (Estimate summary); no bottom Save bar */
@media (min-width:1024px) {
  .intake { grid-template-columns:minmax(0,1fr) 360px; align-items:start; }
  .intake-side { position:sticky; top:12px; }
  .savebar { display:none; }
  .ihero h1 { font-size:24px; }
}
.ifield .hint { font-size:12.5px; color:var(--mute); }
.confirmbox { display:grid; gap:8px; padding:10px; border:2px solid var(--accent); border-radius:12px; background:var(--chip); }
.confirmbox p.big { font-size:17px; margin:0; }
.confirmbox p.small { margin:0; }
.confirmbox p.sendto { margin:0; font-family:var(--mono); font-size:19px; font-weight:700; color:var(--accent-text); overflow-wrap:anywhere; }
/* (2026-11-15) the Send to box: a NEW address shows the part after the @ big, so a typo is caught before sending */
.newaddr .atpart { font-family:var(--mono); font-size:18px; overflow-wrap:anywhere; }
.switch { font-weight:600; }
a.btn[hidden] { display:none; }
.intake .card, .iact { animation:none; }       /* no fade-in: after a Save the page comes back still, where you were */

/* ===== Settings: Your PIN, Signed-in phones, Who can receive estimates (security_page.py, 2026-11-12) ===== */
.sblocks { display:grid; gap:14px; margin:14px 0; }
.scard h2 { margin-top:0; }
.scard .signin-form { max-width:440px; }
.sblock { margin:8px 0; max-width:440px; }
.sblock summary { list-style:none; }
.sblock summary::-webkit-details-marker { display:none; }
.sblock[open] summary { margin-bottom:8px; }
.rlist { display:grid; gap:10px; margin:8px 0 16px; }
.rrow { display:grid; grid-template-columns:minmax(0,1fr); gap:8px; padding:10px; border:1px solid var(--line); border-radius:12px; }
.rrow.off { opacity:.7; }
.rrow .btn { min-height:48px; }
@media (min-width:640px) { .rrow { grid-template-columns:minmax(0,1fr) 140px auto; align-items:end; } }
/* read aloud by screen readers, not shown (2026-11-12) */
.visually-hidden { position:absolute !important; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }

/* ===== Invoices (invoice_page.py, 2026-11-12, schema v14). The one-invoice page reuses the Intake page's classes (phone first);
   these are only the extras. ===== */
.chip.sky { background:var(--chip); color:var(--sky-deep); }
.chip.bad { background:var(--bad-bg); color:var(--bad); }
form.inline { display:inline; margin:0; }
.k-from h2 a { color:inherit; }
.k-from .srow.warnrow b, .srow.warnrow span { color:var(--bad); }
.invtabs { padding:0 0 10px; }
.isearch { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px; margin-bottom:10px; }
.invrow { grid-template-columns:64px minmax(0,1fr) auto; }
.invrow .amt { text-align:right; }
.iinvoice { margin:0; }
.iinvoice .btn.big { width:100%; margin:0; min-height:46px; font-size:15.5px; }
/* (2026-11-14, Doug) already invoiced: "Open invoice #N" (a big button), then a small "Make another invoice" link that warns first */
.iopeninv { display:flex; align-items:center; justify-content:center; width:100%; min-height:46px; font-size:15.5px; text-decoration:none; }
.ianother { text-align:center; margin:2px 0 0; }
.anotherbtns { display:grid; gap:10px; max-width:420px; }
.linkbtn { background:none; border:0; padding:12px 4px; min-height:44px; font:inherit; font-size:14px; color:var(--accent-text);
  text-decoration:underline; cursor:pointer; }
.iact form .btn.full, .iact .igrid .full { grid-column:1 / -1; }
.k-diary ul { margin:4px 0 8px; padding-left:18px; }
.k-diary li.warn { color:var(--warn); }
.k-diary li.error { color:var(--bad); }
.k-from, .k-diary, #lines { animation:none; }            /* no fade-in on the invoice page (like the intake page) */

/* ===== THE COMPACT HEADER (2026-11-13, Doug): Estimate page, Estimate Intake and Invoice pages. Made for a phone: the number and
   status chip on the left, the amount on the right, then the title, a small meta line, ONE strip of figures and ONE row of
   buttons. The number never carries the status; the chip does. ===== */
.hero.chero { padding:10px 14px 12px; margin:0 0 10px; border-radius:16px; box-shadow:0 4px 14px rgba(4,159,217,.18); }
.chero::before, .chero::after { display:none; }
.chero .ihero-row { align-items:center; }
.chero h1 { display:flex; flex-wrap:wrap; align-items:center; gap:2px 8px; font-size:21px; line-height:1.15; margin:0; }
.chero .iamount { font-size:26px; }
.chero .htitle { margin:3px 0 0; font-size:15px; line-height:1.3; opacity:.97; overflow-wrap:anywhere; }
.chero .hmeta { margin:1px 0 0; font-size:12.5px; opacity:.8; overflow-wrap:anywhere; }
.hstats { display:flex; flex-wrap:wrap; gap:2px 14px; margin-top:8px; padding-top:7px; border-top:1px solid rgba(255,255,255,.22); font-size:13px; }
.hstats i { font-style:normal; opacity:.78; }
.hstats b { font-weight:700; }
.chero .heroactions { margin-top:8px; justify-content:flex-start; gap:6px 8px; }
.chero > .heroactions { display:inline-flex; margin-right:6px; vertical-align:top; }
.chero .btn { padding:6px 13px; font-size:14px; min-height:36px; box-sizing:border-box; display:inline-flex; align-items:center; }
.chero .btn .hst { margin-left:6px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.04em; opacity:.7; }
.chero form.inline { display:inline-flex; margin:0; }
.heromore { display:inline-block; margin-top:8px; vertical-align:top; }
.heromore summary { list-style:none; cursor:pointer; }
.heromore summary::-webkit-details-marker { display:none; }
.heromore[open] { display:block; }
.heromore[open] .heroactions { margin-top:6px; }
.chero .pdfnote { flex:1 1 100%; text-align:left; }
@media (min-width:900px) { .chero h1 { font-size:24px; } .chero .iamount { font-size:32px; } }

/* the progress track under the header (estimate_page.track_html, option A, Doug 2026-11-13) */
.track { display:flex; align-items:flex-start; margin-top:9px; padding-top:8px; border-top:1px solid rgba(255,255,255,.22); }
.tstop { flex:0 0 auto; width:84px; display:flex; flex-direction:column; align-items:center; gap:1px; text-align:center; color:#fff; text-decoration:none; font-size:11.5px; line-height:1.25; }
a.tstop:hover .tdot { box-shadow:0 0 0 2px rgba(255,255,255,.5); }
.tline { flex:1; height:2px; margin-top:10px; background:rgba(255,255,255,.35); min-width:8px; }
.tdot { width:22px; height:22px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; border:2px solid rgba(255,255,255,.55); color:#fff; box-sizing:border-box; }
.tdot.done { background:#EAF3DE; border-color:#EAF3DE; color:#27500A; }
.tdot.wait { background:#FAEEDA; border-color:#FAEEDA; color:#633806; }
.tdot.late { background:#FCEBEB; border-color:#FCEBEB; color:#791F1F; }
.tdot.void { background:#D3D1C7; border-color:#D3D1C7; color:#444441; }
.tname { opacity:.78; margin-top:2px; }
.tword { font-weight:700; }
.tmore { font-weight:500; opacity:.8; }
a.tstop .tword { text-decoration:underline; text-underline-offset:2px; text-decoration-color:rgba(255,255,255,.55); }

/* THE HISTORY TREE (estimate_page.timeline_html, 2026-11-13, Doug): a vertical bar of dots down the left of the header, the
   number / amount / title / figures / buttons in the column beside it. Set estimate_page.TRACK_STYLE = "line" for the old line. */
.chero.vt { display:grid; grid-template-columns:128px minmax(0,1fr); gap:0 12px; align-items:start; }
.vt .vmain { min-width:0; }
.vt .ihero-row { flex-wrap:wrap; justify-content:flex-start; gap:0 10px; }
.vt h1 { font-size:19px; }
.vt .iamount { font-size:24px; flex:1 1 100%; }
.vrail { display:flex; flex-direction:column; padding-right:10px; border-right:1px solid rgba(255,255,255,.22); min-width:0; }
.vnode { position:relative; display:flex; gap:7px; padding:0 0 7px; color:#fff; text-decoration:none; min-width:0; }
.vnode:not(:last-child)::before { content:""; position:absolute; left:9px; top:20px; bottom:-1px; width:2px; background:rgba(255,255,255,.35); }
.vnode .tdot { width:20px; height:20px; font-size:12px; flex:0 0 auto; }
.vnode .vtext { display:flex; flex-direction:column; min-width:0; line-height:1.2; }
.vnode .vtext b { font-size:12px; font-weight:700; }
.vnode .vtext small { font-size:10.5px; opacity:.8; overflow-wrap:anywhere; }
a.vnode .vtext b { text-decoration:underline; text-underline-offset:2px; text-decoration-color:rgba(255,255,255,.5); }
a.vnode:hover .tdot { box-shadow:0 0 0 2px rgba(255,255,255,.5); }
.tdot.old { background:rgba(255,255,255,.25); border-color:transparent; color:#fff; }
.vt .hstats { margin-top:6px; }
@media (min-width:640px) { .chero.vt { grid-template-columns:180px minmax(0,1fr); } .vnode .vtext b { font-size:13px; } .vnode .vtext small { font-size:11.5px; } }

/* Top menu: plain-text Search and the Admin drop-down (2026-11-13) */
.topbar nav .navtext { padding:6px 10px; color:var(--mute); border-bottom:2px solid transparent; cursor:default; }
.topbar nav .admin { position:relative; }
.topbar nav .admin summary { list-style:none; cursor:pointer; padding:6px 10px; color:var(--mute); border-bottom:2px solid transparent; white-space:nowrap; }
.topbar nav .admin summary::-webkit-details-marker { display:none; }
.topbar nav .admin summary::after { content:" \25BE"; }
.topbar nav .admin summary:hover, .topbar nav .admin[open] summary { color:var(--ink); }
.topbar nav .admin.on summary { color:var(--ink); border-color:var(--accent); font-weight:600; }
.topbar nav .adminmenu { position:fixed; z-index:50; min-width:170px; display:flex; flex-direction:column; background:var(--card); border:1px solid var(--line); border-radius:8px; box-shadow:0 6px 18px rgba(0,0,0,.15); padding:4px; }
.topbar nav .adminmenu a { border-bottom:none; border-radius:6px; padding:9px 12px; white-space:nowrap; }
.topbar nav .adminmenu a:hover { background:var(--line); }
.topbar nav .adminmenu a.on { font-weight:600; color:var(--ink); }
/* PHONE TOP BAR (2026-11-13, Doug's screen review): "Admin" becomes "More" and also holds Theme and Log out, so the bar
   shows only Inbox, Estimates, Invoices, Search and More, with nothing cut off */
.topbar .phoneonly { display:none; }
.topbar nav .adminmenu .themebtn { border:0; border-radius:6px; background:none; color:var(--ink); text-align:left; font:inherit; padding:9px 12px; }
.menusplit { height:1px; background:var(--line); margin:4px 0; }
@media (max-width:639px) {
  .topbar .phoneonly { display:block; }
  .topbar span.phoneonly:not(.menusplit) { display:inline; }
  .topbar .wideonly { display:none; }
  .topbar > .themebtn, .topbar > .logout { display:none; }
  .topbar nav .adminmenu a, .topbar nav .adminmenu .themebtn { min-height:44px; display:flex; align-items:center; }
}
.topbar .logout { color:var(--mute); text-decoration:none; padding:6px 4px; }
.topbar .logout:hover { color:var(--ink); }
@media (max-width:640px) { .topbar .logout { order:2; } }
/* Search page (2026-11-13) */
.searchgrid { display:grid; grid-template-columns:1fr; gap:10px; margin-bottom:12px; }
.searchgrid label { display:flex; flex-direction:column; gap:4px; font-size:13.5px; color:var(--mute); }
.searchgrid input, .searchgrid select { font:inherit; padding:8px 10px; border:1px solid var(--line); border-radius:8px; background:var(--card); color:var(--ink); }
/* the laptop side's five boxes in two even rows (Doug, 2026-11-13): Client name | Job words or address (wide), then
   Show | From | To | Search and Clear, every box lined up; measured by the form's own width, so an iPad gets one column */
.searchfull { container-type:inline-size; }
.searchgrid input, .searchgrid select { width:100%; min-width:0; box-sizing:border-box; }
.searchfull .sbtns { margin:0; display:flex; gap:8px; align-items:flex-end; }
.searchfull .sbtns .btn { min-height:44px; display:inline-flex; align-items:center; margin:0; }
@container (min-width:560px) {
  .searchfull .searchgrid { grid-template-columns:minmax(0,1.7fr) minmax(0,1fr) minmax(0,1fr) auto; align-items:end; margin-bottom:0; }
  .searchfull .sname { grid-column:1; }
  .searchfull .swords { grid-column:2 / -1; }
}
/* Search (2026-11-13, Doug's screen review): ONE box on the phone; all five boxes on the laptop side */
.searchfull { display:none; }
.phone-live .searchfull { display:block; }
.phone-live .searchone { display:none; }
.searchone > label { font-weight:600; display:block; margin-bottom:6px; }
.searchrow { display:flex; gap:8px; }
.searchrow .ibox { flex:1 1 auto; min-width:0; }
.searchone .searchgrid { grid-template-columns:1fr; margin-top:8px; }
.k-results { margin-top:14px; }
.tablewrap { overflow-x:auto; }
.searchtable td, .searchtable th { padding:8px 10px; text-align:left; vertical-align:top; }
.searchtable .num { text-align:right; white-space:nowrap; }
/* Left column = this job's documents (2026-11-13) */
.jobside.docs > h2 { display:block; text-transform:none; letter-spacing:0; font-size:16px; line-height:1.3; color:var(--ink); padding:14px 16px 2px; border-bottom:0; background:var(--card); }
.jobsub { padding:0 16px 10px; font-size:12.5px; color:var(--mute); border-bottom:1px solid var(--line); }
.jobside.docs .jobitem.doc.s-plain { opacity:.6; }
.jobside.docs .jobitem.doc.on .chip { background:var(--card); }
.jobfoot { padding:8px 12px 12px; border-top:1px solid var(--line); }
.jobside.docs { max-height:none; }

/* =============================================================================================================
   THE LEDGER LOOK (2026-11-13, Doug picked "2 Ledger" from the Design canvas "Three Phone-First Design Directions").
   WHAT IT IS: white paper, black ink, ONE navy accent, rules instead of shadows, numbers in a monospaced font, and every status
   as a dot plus a word (green = approved or paid, amber = waiting for you, red = late, hollow grey = replaced or void), so it
   reads without color. Phone first (buttons and fields at least 44px tall), laptop = the same, wider.
   TO GO BACK: copy data/backup-handyman-css-before-ledger.css over this file.
   FONTS: system fonts only (nothing is downloaded): the design canvas used IBM Plex; any clean system font is close enough.
   ============================================================================================================= */
:root {
  --bg:#ffffff; --card:#ffffff; --ink:#111315; --mute:#53575c; --line:#c9ccd1; --chip:#f1f3f5; --rowhl:#eef2f8; --field:#767b81;
  --accent:#14325c; --accent-ink:#ffffff; --accent-text:#14325c;
  --ok:#1e6b3a; --ok-bg:transparent; --warn:#8a5a00; --warn-bg:#fbf3e0; --bad:#a3211b; --bad-bg:transparent;
  --sans:-apple-system,BlinkMacSystemFont,"Segoe UI","IBM Plex Sans",Roboto,Arial,sans-serif;
  --mono:ui-monospace,"SF Mono","IBM Plex Mono",Menlo,Consolas,monospace;
}
@media (prefers-color-scheme:dark) { :root:not([data-theme="light"]) {
  --bg:#101316; --card:#161a1e; --ink:#eceff1; --mute:#a3adb5; --line:#323941; --chip:#1e2429; --rowhl:#1f2a33; --field:#6b757d;
  --accent:#8fb8c9; --accent-ink:#0f1418; --accent-text:#8fb8c9;
  --ok:#7fc49a; --ok-bg:transparent; --warn:#e3b25c; --warn-bg:#2b2412; --bad:#f08c7d; --bad-bg:transparent; } }
:root[data-theme="dark"] {
  --bg:#101316; --card:#161a1e; --ink:#eceff1; --mute:#a3adb5; --line:#323941; --chip:#1e2429; --rowhl:#1f2a33; --field:#6b757d;
  --accent:#8fb8c9; --accent-ink:#0f1418; --accent-text:#8fb8c9;
  --ok:#7fc49a; --ok-bg:transparent; --warn:#e3b25c; --warn-bg:#2b2412; --bad:#f08c7d; --bad-bg:transparent; }

body { font-size:16px; }
h1, h2, h3 { letter-spacing:-.01em; }
.pagehead h1 { font-size:24px; }

/* top bar: a heavy rule under it, the picked page gets a thick navy underline */
.topbar { background:var(--card); border-bottom:2px solid var(--ink); }
.topbar .brand { font-size:18px; }
.topbar .brand span { color:var(--ink); }
.topbar nav a, .topbar nav .navtext, .topbar nav .admin summary { padding:11px 10px; color:var(--mute); }
.topbar nav a.on, .topbar nav .admin.on summary { color:var(--ink); font-weight:700; border-bottom:0; box-shadow:inset 0 -4px 0 var(--accent); }
.topbar nav .adminmenu { border-radius:4px; box-shadow:0 4px 12px rgba(0,0,0,.18); }
.topbar nav .adminmenu a { border-radius:3px; box-shadow:none; }
.topbar nav .adminmenu a.on { background:var(--rowhl); box-shadow:none; }
.themebtn { border-radius:4px; }

/* the header block: white, a heavy rule under it (it used to be a blue banner) */
.hero { background:var(--card); color:var(--ink); border-radius:0; border:0; border-bottom:2px solid var(--ink); box-shadow:none; padding-left:0; padding-right:0; }
.hero.chero { background:var(--card); border-radius:0; box-shadow:none; padding:12px 0 14px; margin:0 0 14px; }
.hero .eyebrow { color:var(--mute); }
.hero p, .chero .htitle, .chero .hmeta, .ihero .small { color:var(--ink); opacity:1; }
.chero .hmeta, .ihero .small { color:var(--mute); }
.chero h1 { font-size:26px; font-family:var(--mono); font-weight:600; letter-spacing:-.02em; }
.chero .iamount, .hero .bigtotal .amount, .ihero .iamount { font-family:var(--mono); font-weight:600; letter-spacing:-.02em; }
.chero .iamount { font-size:30px; }
.chero .htitle { font-size:17px; font-weight:600; }
.hstats { border-top:1px solid var(--line); }
.hstats i { opacity:1; color:var(--mute); }
.tile { background:var(--chip); border-color:var(--line); border-left-color:var(--accent); border-radius:4px; color:var(--ink); backdrop-filter:none; }
.tile .k { opacity:1; color:var(--mute); }

/* status = a dot plus a word */
.chip, .tag.ok, .tag.warn, .tag.bad { display:inline-flex; align-items:center; background:transparent; border-radius:0; padding:0; font-size:14px; font-weight:600; color:var(--mute); }
.chip::before, .tag.ok::before, .tag.warn::before, .tag.bad::before { content:""; width:10px; height:10px; border-radius:50%; box-sizing:border-box; border:2px solid currentColor; background:currentColor; margin-right:7px; flex:0 0 auto; }
.chip.ok, .tag.ok { color:var(--ok); }
.chip.warn, .tag.warn { color:var(--warn); }
.chip.bad, .tag.bad { color:var(--bad); }
.chip.mute { color:var(--mute); }
.chip.mute::before { background:transparent; }
.chip.sky { color:var(--accent-text); }
.tag { border-radius:3px; }
.tag.sky { background:var(--accent); color:var(--accent-ink); }

/* the history tree on the left of the header */
.vrail { border-right:1px solid var(--line); }
.vnode { color:var(--ink); }
.vnode:not(:last-child)::before { background:var(--field); width:1.5px; }
a.vnode .vtext b { text-decoration-color:var(--field); }
a.vnode:hover .tdot { box-shadow:0 0 0 2px var(--rowhl), 0 0 0 3px var(--accent); }
.vnode .vtext small { opacity:1; color:var(--mute); }
.tdot { border:2px solid var(--field); background:var(--card); color:var(--mute); }
.tdot.done { background:var(--ok); border-color:var(--ok); color:#fff; }
.tdot.wait { background:var(--warn); border-color:var(--warn); color:#fff; }
.tdot.late { background:var(--bad); border-color:var(--bad); color:#fff; }
.tdot.pay { background:var(--accent); border-color:var(--accent); color:#fff; }   /* waiting for payment, not due yet: calm, no alarm */
.tdot.void, .tdot.old { background:var(--card); border-color:var(--field); color:var(--mute); }
:root[data-theme="dark"] .tdot.done, :root[data-theme="dark"] .tdot.wait, :root[data-theme="dark"] .tdot.late, :root[data-theme="dark"] .tdot.pay { color:#0f1418; }
a.tstop .tword { text-decoration-color:var(--field); }

/* blocks: flat, ruled, no icons, no colored tops */
.card, .stack .card { border-radius:4px; box-shadow:none; border:1px solid var(--line); border-top:2px solid var(--ink); background:var(--card); }
.stack .card > h2::before { display:none; }
.stack .card > h2 { font-size:17px; }
.card.accent, .card.teal { border-top:2px solid var(--ink); }
.card.warnbox { border-top-color:var(--warn); }

/* the job column: ruled rows, the open document shaded */
.jobside { border-radius:4px; box-shadow:none; border:1px solid var(--line); border-top:2px solid var(--ink); }
.jobside > h2, .jobside.docs > h2 { background:var(--card); color:var(--ink); }
.jobitem { border-radius:3px; background:var(--card); transition:none; }
.jobitem:hover { transform:none; box-shadow:none; }
.jobitem.on { background:var(--rowhl); color:var(--ink); border-color:var(--accent); box-shadow:none; }
.jobitem.on .jcat, .jobitem.on .jwords, .jobitem.on .jdate, .jobitem.on .jnote { color:var(--mute); opacity:1; }
.jtotal, .jobitem .jtop b + .jtotal { font-family:var(--mono); }
.jbtn { border-radius:4px; border:1.5px solid var(--ink); background:var(--card); }
.jobside.docs .jobitem.doc.on .chip { background:transparent; }

/* buttons and fields: 44px tall, square-ish, firm outlines */
.btn { border:1.5px solid var(--ink); border-radius:4px; background:var(--card); color:var(--ink); min-height:44px; padding:8px 16px; font-weight:600; display:inline-flex; align-items:center; justify-content:center; }
.btn:hover { border-color:var(--accent); background:var(--rowhl); }
.btn.p { background:var(--accent); border-color:var(--accent); color:var(--accent-ink); }
.btn.p:hover { background:var(--accent); filter:brightness(1.15); }
.btn.sm { min-height:34px; padding:4px 12px; }
.btn.icon { min-height:34px; }
.btn.danger { color:var(--bad); border-color:var(--bad); }
.btn.approve { border-color:var(--ok); color:var(--ok); }
.chero .btn { min-height:44px; padding:8px 16px; font-size:15px; }
input.t, select.t, textarea.t, .searchgrid input, .searchgrid select { border:1.5px solid var(--field); border-radius:4px; background:var(--card); min-height:44px; padding:8px 12px; font-size:16px; }
textarea.t { min-height:90px; }
input.t:focus-visible, select.t:focus-visible, textarea.t:focus-visible { border-color:var(--accent); }
.msg { border-radius:4px; }
.msg.ok { border:1px solid var(--ok); }
.msg.bad { border:1px solid var(--bad); }
.msg.warn { border:1px solid var(--warn); }

/* tables: numbers in the mono font, a double rule under the total */
table.lines th { color:var(--mute); border-bottom:2px solid var(--ink); }
table.lines th.right, table.lines td.right, table.lines td.num, table.lines th.num { font-family:var(--mono); }
table.lines tr.total td { border-top:2px solid var(--ink); border-bottom:3px double var(--ink); font-family:var(--mono); }
.pill { border-radius:3px; }
.ratechip { border-radius:4px; background:var(--chip); }
.ratechip .v { font-family:var(--mono); }
.k-results { margin-top:14px; }
.jcount { border-radius:4px; }

/* =============================================================================================================
   ONE ESTIMATE PAGE: PHONE COLUMN + DESK (intake_page.py + estimate_desk.py, 2026-11-13, Doug).
   WHAT IT IS: the Estimate Intake page in two parts. .phonecol = exactly what the phone shows (the same markup at every width);
   .desk = read-only tabs (Request, PDF, History, Client, Similar past jobs, This job's documents).
   Phone (under 700px): the desk sits under the phone view, folded behind "More about this job".
   iPad portrait (700px+): phone column 400px on the left, the desk beside it. Laptop (1100px+): the same, the desk just wider.
   The phone column KEEPS THE PHONE LOOK on wide screens: the iPad/laptop rules of the intake section above are undone inside it.
   TO GO BACK: copy data/backup-handyman-css-before-desk.css over this file.
   ============================================================================================================= */
.onepage { display:grid; grid-template-columns:minmax(0,1fr); gap:16px; }
.phonecol, .desk { min-width:0; }
.phonecol .savebar { margin-bottom:0; }            /* the old -70px pulled it over whatever came next (the desk) */
.deskfold { width:100%; justify-content:space-between; }
.deskfold::after { content:"\25BE"; }
.deskfold[aria-expanded="true"]::after { content:"\25B4"; }
.deskfold[hidden] { display:none; }
@media (max-width:699px) { .js .desk:not(.open) .deskbody { display:none; } }
.desk.open .deskbody { margin-top:10px; }
.desktabs { display:flex; flex-wrap:wrap; border-bottom:2px solid var(--ink); margin-bottom:10px; }
.desktab { min-height:44px; padding:10px 12px; display:inline-flex; align-items:center; color:var(--mute); text-decoration:none; font-weight:600; font-size:15px; }
.desktab:hover { color:var(--ink); }
.desktab[aria-selected="true"] { color:var(--ink); box-shadow:inset 0 -4px 0 var(--accent); }
.deskpanel { border:1px solid var(--line); border-top:2px solid var(--ink); border-radius:4px; padding:12px 14px; margin-bottom:12px; background:var(--card); }
.deskpanel[hidden] { display:none; }
.deskpanel > h2 { font-size:17px; margin:0 0 8px; }
.js .deskpanel > h2 { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.deskpanel h3 { font-size:15px; margin:16px 0 6px; }
.deskpanel h3:first-child { margin-top:0; }
.deskpanel .words { max-height:none; }
.deskphotos { display:grid; grid-template-columns:repeat(auto-fill, minmax(220px, 1fr)); gap:8px; }
.deskphotos a { display:block; }
.deskphotos img { display:block; width:100%; height:auto; border:1px solid var(--line); }
.deskpdfbar { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; margin-bottom:8px; font-weight:600; }
.deskpdf { display:block; width:100%; height:75vh; min-height:420px; border:1px solid var(--line); background:var(--chip); }
.desklist { display:grid; grid-template-columns:minmax(0,1fr); }
.desklist > * { min-width:0; }      /* (2026-11-14) an opened replaced version keeps its 520px lines table INSIDE the phone width: the table scrolls in its own box instead of pushing the whole phone page sideways */
.deskrow { display:grid; grid-template-columns:minmax(0,1fr) auto auto; gap:10px; align-items:center; min-height:44px; padding:6px 4px;
  border-bottom:1px solid var(--line); color:var(--ink); text-decoration:none; }
.deskrow:hover, .deskrow.on { background:var(--rowhl); }
.deskrow > span:first-child { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; min-width:0; }
.deskwhen { color:var(--mute); font-size:13px; font-family:var(--mono); }
.deskpanel .amt { font-family:var(--mono); }
.deskul { margin:0; padding-left:18px; font-size:14.5px; }
.deskul li { margin:4px 0; overflow-wrap:anywhere; }
.deskdl { margin:8px 0 12px; }
.deskdocs { display:grid; gap:6px; }
/* the Estimates list (intake_page.list_page, Stage 3) */
.erow { grid-template-columns:auto minmax(0,1fr) auto; }
.erow > span { display:flex; flex-direction:column; min-width:0; }
.erow .etitle { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.erow .eright { align-items:flex-end; gap:2px; }
.erow .amt { font-family:var(--mono); }
@media (max-width:480px) { .erow { grid-template-columns:minmax(0,1fr) auto; } .erow > b { grid-column:1 / -1; } }
.deskform { display:grid; gap:8px; margin:6px 0 12px; }
.deskform .btn { justify-self:start; }
.deskform label { font-weight:600; font-size:14px; }
.deskgrid { display:grid; grid-template-columns:repeat(auto-fill, minmax(150px, 1fr)); gap:8px; }
.deskgrid .ifield { margin:0; }
.deskbtns { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.deskbtns > p, .deskbtns > h3 { flex:1 1 100%; margin:4px 0 0; }
.deskinline { display:inline-flex; margin:0; }
.iarchived { display:flex; align-items:center; justify-content:space-between; gap:10px; }
.deskver summary { list-style:none; cursor:pointer; }
.deskver summary::-webkit-details-marker { display:none; }
.deskver[open] summary { background:var(--rowhl); }
.deskver .tablewrap { margin:4px 0 10px; }

@media (min-width:700px) {
  .onepage { grid-template-columns:400px minmax(0,1fr); gap:20px; align-items:start; }
  .deskfold { display:none !important; }
  .desk { position:sticky; top:12px; max-height:calc(100vh - 24px); overflow:auto; }
  /* the phone column keeps the PHONE look (undo the 640px / 1024px intake rules inside it) */
  .phonecol .intake { grid-template-columns:minmax(0,1fr); }
  .phonecol .intake-side { position:static; }
  .phonecol .savebar { display:flex; margin:10px 0 0; }
  .phonecol .igrid { grid-template-columns:minmax(0,1fr); }
  .phonecol .igrid.two { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .phonecol .igrid.two .full { grid-column:1 / -1; }
  .phonecol .iactrow { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .phonecol .isend { grid-template-columns:minmax(0,1fr) auto; }
  .phonecol .ipart { grid-template-columns:minmax(0,1fr) minmax(0,1.4fr) 44px; padding:8px 0; border-bottom:1px solid var(--line); }
  .phonecol .ipart .pname { grid-column:1 / -1; }
  .phonecol .ipart.heads { display:none; }
  .phonecol .addpart { width:100%; }
  .phonecol .chero.vt { grid-template-columns:128px minmax(0,1fr); }
  .phonecol .vnode .vtext b { font-size:12px; }
  .phonecol .vnode .vtext small { font-size:10.5px; }
}

/* LIST TABS ON A PHONE (2026-11-13, Stage 4): Estimates and Invoices lists - each tab's words stay on ONE line; when they do not
   all fit, the row of tabs slides sideways (like the menu) instead of making every tab three lines tall. */
@media (max-width:599px) {
  .invtabs { overflow-x:auto; scrollbar-width:none; gap:4px; }
  .invtabs::-webkit-scrollbar { display:none; }
  .invtabs a { flex:1 0 auto; white-space:nowrap; padding-left:7px; padding-right:7px; }
}

/* =============================================================================
   THE PHONE ON A LAPTOP (2026-11-13, Doug): ui.py phone_html() + app.js.
   WHY: when the handyman calls and says "I don't see it", the office sees EXACTLY what his phone shows.
   On a laptop or iPad (700px and wider) every page (except ui.PHONE_OFF) has a drawn iPhone at its left: dark border,
   rounded corners, the camera "island", a status bar with the time and the home bar. Its screen is a window of our own
   site, 390 points wide like a typical iPhone, so the app inside draws itself exactly as on the phone (menu bar, every
   page) and moves on its own. app.js adds "phone-live" to the page only then. On a phone nothing is drawn.
   TWO COLUMNS THAT NEVER MIX (Doug): the phone alone on the left, from the top of the window; the laptop's menu bar,
   the copy warning and the page all in the right column (.laptopside). Pages without the phone keep the full-width bar.
   On the estimate and invoice pages the laptop's side then shows only the desk (the phone column is in the drawn phone).
   ============================================================================= */
.phonedev[hidden], .laptopnote { display:none; }
/* the app inside the drawn phone: like an iPhone, the scrollbar floats and takes no room (390 points stay 390) */
html.in-phone { scrollbar-width:none; }
html.in-phone::-webkit-scrollbar { display:none; }
@media (min-width:700px) {
  /* (2026-11-16, Doug) the Phone On/Off switch that sat in the gap is gone: the gap is now just space */
  .phone-live .office { display:grid; grid-template-columns:414px minmax(0,1fr); gap:0 28px; align-items:start; padding:12px 16px 0; }
  .phone-live .laptopside { min-width:0; }
  .phone-live .laptopside > .topbar { border:1px solid var(--line); border-bottom:2px solid var(--ink); border-radius:12px 12px 0 0; }
  .phone-live .laptopside > main { width:100%; margin:0; padding:18px 0 70px; min-width:0; }
  .phonedev { position:sticky; top:12px; width:414px; height:min(900px, calc(100vh - 24px)); min-height:560px; padding:12px;
    border-radius:62px; background:var(--case,#15171a); box-shadow:0 0 0 2px var(--rim1,#454b52), 0 0 0 5px var(--rim2,#23272b), 0 22px 50px rgba(0,0,0,.30); }
  .phonedev::before { content:""; position:absolute; z-index:3; top:23px; left:50%; width:120px; height:34px; margin-left:-60px;
    border-radius:20px; background:#000; }                                     /* the camera "island" */
  .phonedev::after { content:""; position:absolute; z-index:3; bottom:20px; left:50%; width:136px; height:5px; margin-left:-68px;
    border-radius:3px; background:var(--ink); opacity:.45; pointer-events:none; } /* the home bar */
  .phonescreen { display:flex; flex-direction:column; height:100%; overflow:hidden; border-radius:50px; background:var(--card); }
  .phonestatus { display:flex; flex:0 0 auto; align-items:center; justify-content:space-between; height:54px;
    padding:8px 30px 0 40px; background:var(--card); color:var(--ink); font-size:16px; font-weight:600; }
  .phoneicons { display:flex; align-items:center; gap:6px; }
  .psig { display:flex; align-items:flex-end; gap:2px; height:12px; }
  .psig b { width:3px; border-radius:1px; background:var(--ink); }
  .psig b:nth-child(1) { height:4px; } .psig b:nth-child(2) { height:6px; } .psig b:nth-child(3) { height:9px; } .psig b:nth-child(4) { height:12px; }
  .pbat { position:relative; width:24px; height:12px; border:1.5px solid var(--ink); border-radius:4px; opacity:.9; }
  .pbat::before { content:""; position:absolute; inset:1.5px; right:5px; border-radius:1.5px; background:var(--ink); }
  .pbat::after { content:""; position:absolute; top:3px; right:-4px; width:2px; height:4px; border-radius:0 1px 1px 0; background:var(--ink); }
  .phoneview { flex:1 1 auto; display:block; width:390px; border:0; background:var(--bg); }
  .phonechanged { display:flex; align-items:center; justify-content:space-between; gap:10px; margin:0 0 12px; }
  /* estimate and invoice pages: the phone column is in the drawn phone, so this side is the desk alone */
  .phone-live .onepage { grid-template-columns:minmax(0,1fr); }
  .phone-live .onepage > .phonecol { display:none; }
  .phone-live .onepage .desk { top:12px; max-height:calc(100vh - 24px); }
  .phone-live .laptopnote { display:block; }
  /* the Invoices list on the laptop side: the CSV download at the top, under New quick invoice (Doug, 2026-11-13) */
  .phone-live .newjob { display:none; }
  .phone-live .elist:has(.erow) { display:none; }   /* Estimates: the laptop side shows the table instead of the list */
  .phone-live .reqlist:has(.reqrow) { display:none; }   /* Requests (2026-11-20): the laptop side shows the table too */
  .phone-live .etable { display:block; }   /* Call in / Email a new job: field buttons, on the phone only (2026-11-13) */
  .phone-live .invstack > #download { order:1; }
  .phone-live .invstack > .invlist { order:2; }
  /* ...and the top kept short (Doug, 2026-11-13): the title on the left and New quick invoice on the right of one row;
     the CSV box is its title and note on one line, then From, To and the two buttons on one row */
  .phone-live .invhead { display:flex; align-items:center; justify-content:space-between; gap:16px; margin:4px 0 14px; }
  .phone-live .invhead .pagehead { margin:0; }
  .phone-live .invhead .iactrow { display:block; flex:0 0 auto; }
  .phone-live .invhead .btn.big { width:auto; padding:6px 22px; }
  .phone-live #download { padding:12px 18px 14px; }
  .phone-live #download .dlhead { display:flex; flex-wrap:wrap; align-items:baseline; column-gap:14px; margin-bottom:8px; }
  .phone-live #download .dlhead h2 { margin:0; font-size:17px; }
  .phone-live #download .dlhead p { margin:0; }
  .phone-live #download .dlform { display:flex; flex-wrap:wrap; align-items:flex-end; gap:8px 10px; }   /* wraps on an iPad */
  .phone-live #download .dlform .ifield { flex:1 1 120px; max-width:190px; }
  .phone-live #download .ftag.opt { display:none; }   /* the note above already says the dates are optional */
  .phone-live #download .btn.big { width:auto; min-height:44px; margin:0; padding:6px 18px; font-size:15.5px; white-space:nowrap; }
}
/* a narrow right column (iPad): the laptop's menu bar takes the phone's two-row shape - name, Log out and Theme on top,
   the menu below in ONE row that slides sideways - instead of wrapping onto four lines */
@media (min-width:700px) and (max-width:1099px) {
  .phone-live .office { column-gap:20px; padding:12px 12px 0; }   /* a narrower gap on an iPad */
  .phone-live .laptopside > .topbar { padding:6px 12px 0; gap:2px 10px; }
  .phone-live .laptopside > .topbar .brand { font-size:16px; margin-right:auto; }
  .phone-live .laptopside > .topbar .logout { order:2; }
  .phone-live .laptopside > .topbar nav { order:3; width:100%; flex-wrap:nowrap; overflow-x:auto; scrollbar-width:none; margin:0 -4px; }
  .phone-live .laptopside > .topbar nav::-webkit-scrollbar { display:none; }
  .phone-live .laptopside > .topbar nav a { white-space:nowrap; padding:8px 8px; font-size:15px; }
}

/* =============================================================================
   BIGGER TAP TARGETS ON A PHONE (2026-11-13, Doug's screen review): a link inside a sentence ("Change for this job",
   "approved list") gets about 44px of height to tap, without moving the words around it.
   ============================================================================= */
@media (max-width:699px) {
  main p a, main .hint a { display:inline-block; padding-block:12px; margin-block:-12px; }
}

/* the Job name finder above its list (2026-11-13, Doug's screen review): type a word, the list shortens */
.jobfind { font:inherit; font-size:16px; width:100%; min-height:44px; padding:8px 12px; margin-bottom:6px; border:1px dashed var(--line);
  border-radius:4px; background:var(--bg); color:var(--ink); }
.jobfind[hidden] { display:none; }
.searchtable td:first-child { white-space:nowrap; }   /* "Estimate" / "Invoice" on one line (Search results) */


/* =============================================================================================================
   STYLES: THE PHONE CASE + THE LAPTOP THEME (2026-11-13, Doug). Chosen in the "Style" drop-down in the top bar (ui.py STYLES, app.js).
   A choice sets data-case on the laptop page's <html>; nothing else. Black = no data-case = the look as it was.
   ONE LINE PER STYLE below. t-case/t-rim1/t-rim2 = the drawn phone's case and its two rims (inner, outer);
   t-acc = the laptop accent (buttons, picked menu and tab, focus, rules), t-accd = the same for dark mode;
   t-rowl/t-rowd = the shaded row (light/dark); t-line/t-lined = the thin lines (light/dark).
   Only the laptop side changes: everything below sits in @media (min-width:700px), and the phone window (390px) and a real phone are narrower.
   TO ADD A STYLE: one line here + one line in ui.py STYLES. Check the accent is dark enough for white text (light) and light enough for dark text (dark).
   ============================================================================================================= */
html[data-case="silver"] { --t-case:#b9bec4; --t-rim1:#e8ebee; --t-rim2:#7d848b; --t-acc:#3d4750; --t-accd:#b9c2ca; --t-rowl:#eceff2; --t-rowd:#262d33; --t-line:#cfd4d9; --t-lined:#3a424a; }
html[data-case="grafito"] { --t-case:#2b2f33; --t-rim1:#ff7a00; --t-rim2:#8b9399; --t-acc:#b85400; --t-accd:#ffa14d; --t-rowl:#fdf0e3; --t-rowd:#382a1c; --t-line:#ddd2c6; --t-lined:#4a3d2f; }
html[data-case="violeta"] { --t-case:#5b3fa0; --t-rim1:#e5d4ff; --t-rim2:#2b1a52; --t-acc:#5b3fa0; --t-accd:#b9a2f2; --t-rowl:#efeafa; --t-rowd:#261f3a; --t-line:#d5cdea; --t-lined:#3a3057; }
html[data-case="rosa"] { --t-case:#d81b72; --t-rim1:#ffb400; --t-rim2:#1c3f94; --t-acc:#b0155e; --t-accd:#ff7fb4; --t-rowl:#fdeaf3; --t-rowd:#33202b; --t-line:#ebccdc; --t-lined:#4a2c3b; }
html[data-case="talavera"] { --t-case:#1c3f94; --t-rim1:#f4f1ea; --t-rim2:#e8a317; --t-acc:#1c3f94; --t-accd:#8fb0ff; --t-rowl:#e9eefb; --t-rowd:#1f2638; --t-line:#c9d3ea; --t-lined:#2c3652; }
html[data-case="barro"] { --t-case:#b4501f; --t-rim1:#f7a600; --t-rim2:#3a1d12; --t-acc:#9a3f14; --t-accd:#f0a070; --t-rowl:#fbeee6; --t-rowd:#33251d; --t-line:#e6cfbf; --t-lined:#4a3425; }
html[data-case="bandera"] { --t-case:#006847; --t-rim1:#ffffff; --t-rim2:#ce1126; --t-acc:#006847; --t-accd:#6fd09a; --t-rowl:#e6f3ec; --t-rowd:#1c2f25; --t-line:#c6dccf; --t-lined:#2a4435; }
html[data-case="hawaii"] { --t-case:#0b4a6f; --t-rim1:#ff5a7a; --t-rim2:#ffc43d; --t-acc:#0b4a6f; --t-accd:#6cc0e8; --t-rowl:#e6f0f6; --t-rowd:#1b2e3a; --t-line:#c3d6e2; --t-lined:#2a4252; }
html[data-case="bosque"] { --t-case:#1f5a3a; --t-rim1:#d9b44a; --t-rim2:#12301f; --t-acc:#1f5a3a; --t-accd:#7fcf9f; --t-rowl:#e8f2ec; --t-rowd:#1b2d23; --t-line:#cbdccf; --t-lined:#2b4435; }
html[data-case="atardecer"] { --t-case:#e2552d; --t-rim1:#ffc857; --t-rim2:#7a1f5c; --t-acc:#b83f1a; --t-accd:#ff9a7a; --t-rowl:#fdece6; --t-rowd:#35211b; --t-line:#efd0c4; --t-lined:#4d332a; }
html[data-case="cereza"] { --t-case:#8e1b2e; --t-rim1:#f3d6d6; --t-rim2:#3b0a12; --t-acc:#8e1b2e; --t-accd:#ff8fa0; --t-rowl:#f9e9eb; --t-rowd:#351c20; --t-line:#e6cdd1; --t-lined:#4d2d33; }
html[data-case] { --case:var(--t-case); --rim1:var(--t-rim1); --rim2:var(--t-rim2); }
.stylepick { display:none; align-items:center; gap:6px; font-size:13px; color:var(--mute); }
.casesel { font-size:13px; max-width:190px; padding:3px 6px; border:1px solid var(--line); border-radius:4px; background:var(--card); color:var(--ink); }
@media (min-width:700px) {
  .stylepick { display:inline-flex; }
  html[data-case] { --accent:var(--t-acc); --accent-text:var(--t-acc); --rowhl:var(--t-rowl); --line:var(--t-line); }
  html[data-case] .laptopside > .topbar, html[data-case] .hero, html[data-case] .desktabs, html[data-case] .vrail { border-color:var(--accent); }
  html[data-case] .laptopside > .topbar { border-top-color:var(--line); border-left-color:var(--line); border-right-color:var(--line); }
  html[data-case] .hero { border-top-color:transparent; }
  html[data-case] .vrail { border-top-color:transparent; border-bottom-color:transparent; border-left-color:transparent; }
  html[data-case] .desktabs { border-top-color:transparent; border-left-color:transparent; border-right-color:transparent; }
  html[data-case] .card:not(.warnbox), html[data-case] .stack .card:not(.warnbox), html[data-case] .jobside { border-top-color:var(--accent); }
  html[data-case] .desktab:hover, html[data-case] .desktab[aria-selected="true"] { color:var(--accent-text); }
  html[data-case] .jtabs a.on { border-top:3px solid var(--accent); }
  html[data-case] table.lines th { border-bottom-color:var(--accent); }
  html[data-case] table.lines tr.total td { border-top-color:var(--accent); border-bottom-color:var(--accent); }
  html[data-case] .jbtn, html[data-case] .btn { border-color:var(--accent); }
  html[data-case] .btn.danger { border-color:var(--bad); }
  html[data-case] .btn.approve { border-color:var(--ok); }
}
/* dark: the same two ways the page goes dark as at the top of this file (an explicit choice, or the computer's setting) */
@media (min-width:700px) {
  html[data-case][data-theme="dark"] { --accent:var(--t-accd); --accent-text:var(--t-accd); --rowhl:var(--t-rowd); --line:var(--t-lined); }
}
@media (min-width:700px) and (prefers-color-scheme:dark) {
  html[data-case]:not([data-theme="light"]) { --accent:var(--t-accd); --accent-text:var(--t-accd); --rowhl:var(--t-rowd); --line:var(--t-lined); }
}

/* =============================================================================
   SEARCH GROUPS (Doug, 2026-11-14; search_page.family_html): one card per piece of work, headed "<work> for <client>",
   holding the same small document cards as "This job's documents" (EST1427-4, INV2050 ...), what was asked for first.
   ============================================================================= */
.k-family .famhead { margin:0 0 2px; font-size:17px; line-height:1.3; }
.k-family > .small { margin:0 0 8px; }
.famdocs { display:grid; gap:6px; }
.famcount { margin:6px 0 10px; font-size:16px; }

/* =============================================================================
   WAITING ON YOU (Doug, 2026-11-14; intake_page.waiting_card): the to-do list at the top of the Estimates page, on the phone
   and the laptop alike (it is NOT .elist, so the laptop side does not swap it for the table).
   ============================================================================= */
.waitcard h2 { margin:0 0 2px; font-size:19px; display:flex; align-items:center; gap:8px; }
.waitcard .waitn { display:inline-flex; align-items:center; justify-content:center; min-width:26px; height:26px; padding:0 7px; border-radius:13px;
  background:var(--accent); color:#fff; font-size:14px; }
.waitcount { margin:0 0 10px; }
.waitcount .bad { color:var(--bad); font-weight:700; }
.waitrow .eright { display:flex; flex-direction:column; align-items:flex-end; gap:2px; }
.waitmore { margin-top:8px; }
.waitmore summary { cursor:pointer; min-height:44px; display:flex; align-items:center; font-weight:600; color:var(--accent-text); }
.waitmore[open] summary { margin-bottom:8px; }

/* PHONE MENU ORDER (Doug, 2026-11-14; ui.top_bar). (2026-11-15, Doug) the phone now reads the same as the laptop:
   Estimates, Invoices, Search, More (the order the menu is written in), so nothing is moved here any more. */
@media (max-width:639px) {
  .topbar nav .admin.phoneon summary { color:var(--ink); font-weight:700; box-shadow:inset 0 -4px 0 var(--accent); }
}

/* =============================================================================
   THE SIMPLIFIED ESTIMATE PAGE (2026-11-15, Doug approved the mock-up). Field order, ONE next step in the bottom bar,
   Lucide icons (icons.py; each next to its word), nothing under 15px for older eyes outdoors.
   Backup of this file before: data/backup-before-new-estimate-page/handyman.css
   ============================================================================= */
.ico { flex:none; vertical-align:middle; }
.phonecol .small, .phonecol .hint, .phonecol .ptotal, .phonecol .srow, .phonecol .ifoot { font-size:15px; }
.phonecol .ftag { font-size:13.5px; }
.ihead { display:grid; gap:3px; padding:12px 14px; margin-bottom:10px; border-radius:14px; }
.iheadrow { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.ihead .inum { display:inline-flex; align-items:center; gap:8px; margin:0; font:800 22px/1.1 var(--mono); color:var(--accent-text); }
.ihead .inum span { color:var(--ink); }
.ihead .chip { display:inline-flex; align-items:center; gap:5px; font-size:15px; }
.ititle { margin:2px 0 0; font-size:20px; font-weight:700; line-height:1.25; overflow-wrap:anywhere; text-wrap:balance; }
.iwhere { margin:0; font-size:16px; overflow-wrap:anywhere; }
.imeta { margin:0; font-size:15px; color:var(--mute); }
.inext { margin:6px 0 0; display:flex; align-items:center; gap:6px; font-size:15.5px; font-weight:700; color:var(--accent-text); }
.icard h2 .ico, .isendcard h2 .ico, .attn h2 .ico { color:var(--accent-text); }
.attn h2 .ico { color:inherit; }
.isendcard { display:grid; gap:10px; margin-top:10px; padding:12px 14px; border-radius:14px; }
.isendcard h2 { display:flex; align-items:center; gap:8px; margin:0; font-size:17px; }
.isendcard .hint { margin:0; color:var(--mute); }
.isendcard .msg { margin:0; }
/* (2026-11-17, Doug) the "Customer approved" tick under Send to: the client's yes, with its date */
.iapproved { display:grid; gap:8px; margin-top:10px; padding:12px 14px; border-radius:14px; }
.iapproved h2 { display:flex; align-items:center; gap:8px; margin:0; font-size:17px; }
.iapproved h2 .ico { color:var(--accent-text); }
.iapproved .hint, .iapproved .small { margin:0; color:var(--mute); }
.iapproved .checkline { display:flex; align-items:center; gap:10px; min-height:44px; font-weight:600; cursor:pointer; }
.iapproved .checkline input { width:24px; height:24px; margin:0; accent-color:var(--accent); }
.iapproved .btn { justify-self:start; }
.ipdf { display:flex; align-items:center; justify-content:center; gap:8px; min-height:50px; margin:0; }
.ipdf.stale { opacity:.6; }
.addpart { display:flex; align-items:center; justify-content:center; gap:6px; }
.stepper .ibtn { display:grid; place-items:center; }
/* Client and job site, The job: folded to one line; tap to open */
.ifold { margin-top:10px; background:var(--card); border:1px solid var(--line); border-radius:14px; }
.ifold > summary { list-style:none; min-height:64px; padding:10px 14px; display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:10px; align-items:center; cursor:pointer; }
.ifold > summary::-webkit-details-marker { display:none; }
.ifold > summary .ico { color:var(--accent-text); }
.ifoldwhat { display:grid; min-width:0; }
.ifoldwhat b { font-size:16px; }
.ifoldwhat span { font-size:15px; color:var(--mute); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ifoldchg { font-size:15px; font-weight:700; color:var(--accent-text); }
.ifold[open] .ifoldchg { visibility:hidden; }
.ifold > .card { border:0; margin:0; padding-top:0; box-shadow:none; }
/* the bottom bar: total + ONE next step */
.ibar { flex-wrap:wrap; }
.ibartot { display:grid; font-size:14px; line-height:1.15; color:var(--mute); white-space:nowrap; }
.ibartot b { font-size:19px; color:var(--ink); font-variant-numeric:tabular-nums; }
.savebar .ibarbtn { flex:1; min-width:0; min-height:54px; display:flex; align-items:center; justify-content:center; gap:8px; font-size:16.5px; font-weight:700; line-height:1.2; text-align:left; white-space:normal; }
.ibarbtn[hidden] { display:none; }
.iwho { overflow-wrap:anywhere; }
.ibarsmall { flex-basis:100%; display:flex; justify-content:center; margin:-4px 0 -6px; }
.ibarsmall .linkbtn { font-size:15px; min-height:40px; padding:6px 4px; text-decoration:underline; }
/* the confirm step as a sheet over the bottom of the screen */
.isheet { position:fixed; inset:auto 0 0 0; z-index:30; padding:12px max(12px, env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background:rgba(0,0,0,.35); }
.isheet .confirmbox { max-width:460px; margin:0 auto; background:var(--card); box-shadow:0 -6px 24px rgba(0,0,0,.25); }
.isheet .iactrow .btn { display:flex; align-items:center; justify-content:center; gap:6px; min-height:52px; }
#barsave.waiting { display:none; }   /* intake.js shows it once something is changed; <noscript> shows it without JavaScript */
.ihead .chip::before { display:none; }   /* the icon is the marker; no extra dot */

/* ============================================================================
   THE EN / ES SWITCH (2026-11-15, Doug): in the menu bar on every page (phone: top right, next to the name).
   words.py makes the links; the look follows the mock-up (two halves, the one in use raised).
   ============================================================================ */
.langsw { display:inline-grid; grid-template-columns:1fr 1fr; background:var(--chip, var(--line)); border-radius:10px; padding:3px; }
.langsw a { display:flex; align-items:center; justify-content:center; min-height:38px; min-width:48px; border-radius:8px;
  font-weight:650; font-size:15px; color:var(--mute); text-decoration:none; }
.langsw a.on { background:var(--card); color:var(--ink); box-shadow:0 1px 3px rgb(0 0 0 / .18); }
@media (max-width:639px) { .topbar > .langsw { margin:2px 0; } .langsw a { min-height:40px; min-width:52px; } }
.loginlang { display:flex; justify-content:flex-end; margin-bottom:12px; }

/* ============================================================================
   THE SIMPLIFIED INVOICE PAGE (2026-11-15, Doug approved the mock-up "Simplified Invoice Page"; invoice_page.py).
   The same pieces as the Estimate page (.ifold, .ibar, .isheet, .isendcard); these are the invoice's own.
   ============================================================================ */
.chero .ifrom { margin:4px 0 0; display:flex; flex-wrap:wrap; align-items:center; gap:2px 6px; font-size:15px; opacity:.95; }
.chero .ifrom a { color:inherit; font-weight:700; }
.chero .inext { margin:6px 0 0; color:inherit; font-size:15px; }
.chero h1 .ico { opacity:.9; }
.chero .chip .ico, .ilistrow .chip .ico { margin-right:4px; vertical-align:-3px; }
.ipdfrow { margin:0 0 10px; }
.ipdfbig { min-height:56px; font-size:17px; font-weight:700; border:2px solid var(--accent-text); color:var(--accent-text); background:var(--card); border-radius:14px; }
.ipaidcard, .ivoidcard { display:grid; gap:4px; margin:0 0 10px; padding:12px 14px; border-radius:14px; }
.ipaidcard { background:var(--ok-bg); border-color:transparent; }
.ivoidcard { background:var(--bad-bg, #fdecee); border-color:transparent; }
.ipaidcard h2, .ivoidcard h2 { display:flex; align-items:center; gap:8px; margin:0; font-size:17px; }
.ipaidcard h2 { color:var(--ok); }
.ivoidcard h2 { color:var(--bad); }
.ipaidcard p, .ivoidcard p { margin:0; font-size:16px; }
.ireachrow { display:grid; grid-template-columns:1fr 1fr; gap:8px; padding:0 14px 6px; }
.ireach { display:flex; align-items:center; justify-content:center; gap:8px; min-height:50px; margin:0; }
.imore .card { border:0; border-top:1px solid var(--line); border-radius:0; margin:0; box-shadow:none; }
.imore .dangerbox { background:none; }
.savebar .ipaidbtn, .isheet .ipaidbtn { background:var(--ok); border-color:var(--ok); color:var(--card); display:flex; align-items:center; justify-content:center; gap:8px; }
.ibardone { flex:1; min-height:54px; display:flex; align-items:center; justify-content:center; gap:8px; border-radius:12px; background:var(--ok-bg); color:var(--ok); font-weight:700; font-size:16.5px; }
.ipay { display:grid; gap:10px; }
.ipay .big { margin:0; }
.ihows { border:0; margin:0; padding:0; min-width:0; }
.ihows legend { font-size:15px; font-weight:650; color:var(--mute); padding:0; margin-bottom:6px; }
.ihowrow { display:grid; grid-template-columns:repeat(auto-fit, minmax(82px, 1fr)); gap:6px; }
.ihow { display:grid; justify-items:center; gap:2px; min-height:56px; padding:6px 2px; border:1px solid var(--line); border-radius:12px; background:var(--card); font-weight:650; font-size:14.5px; cursor:pointer; position:relative; }
.ihow input { position:absolute; opacity:0; inset:0; margin:0; cursor:pointer; }
.ihow:has(input:checked) { border:2px solid var(--ok); background:var(--ok-bg); color:var(--ok); }
.ihow:has(input:focus-visible) { outline:3px solid var(--accent); outline-offset:2px; }
.voidlink { font-size:15px; }
/* the spreadsheet download is for the laptop (Doug, 2026-11-15): not on a phone, not inside the drawn phone */
@media (max-width:639px) { #download { display:none; } }
/* touch targets of 44 px or more on the invoice page (the critique: Add a message was 32 px) */
.phonecol .isendcard .imsg > summary { min-height:44px; display:flex; align-items:center; gap:6px; }
.phonecol .ibarsmall .linkbtn { min-height:44px; }
.chip:has(.ico)::before { display:none; }   /* a chip with its icon needs no dot */
.ipay .iactrow { display:grid; grid-template-columns:1fr 1.6fr; gap:10px; }
.ipay .iactrow .btn { margin:0; min-width:0; white-space:normal; text-align:center; }
.chero .chip { white-space:normal; max-width:100%; }

/* =============================================================================
   THE SIMPLIFIED SEARCH PAGE (2026-11-15, Doug approved the mock-up "Simplified Search Page"; search_page.py).
   The phone (and the drawn phone on a laptop): the box + Search + a small Dates fold, the five MONEY LISTS with their
   counts, All estimates / All invoices / More lists, then every list as ROW CARDS (the whole card taps). The laptop side
   (.phone-live) keeps its five boxes and its tables: .scards (cards) and .stable (tables) swap below.
   ============================================================================= */
.stable { display:none; }
.phone-live .stable { display:block; }
.phone-live .scards { display:none; }
.searchone .searchrow { align-items:stretch; }
.searchone .ibox { min-height:52px; font-size:17px; }
.searchone .ibox::placeholder { font-size:16px; }
.sgo { gap:6px; min-height:52px; }
.sdates > summary, .qmore > summary { list-style:none; display:inline-flex; align-items:center; gap:6px; min-height:44px; cursor:pointer;
  color:var(--accent-text); text-decoration:underline; font-size:16px; }
.sdates > summary::-webkit-details-marker, .qmore > summary::-webkit-details-marker { display:none; }
.sdategrid { grid-template-columns:1fr 1fr !important; margin:4px 0 0; }
.qlists { display:grid; gap:8px; margin:14px 0 18px; }
.qhead { margin:4px 0 0; font-size:14px; font-weight:700; color:var(--mute); text-transform:uppercase; letter-spacing:.05em; }
.qgrid { display:grid; gap:8px; }
.qbtn { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto; gap:12px; align-items:center; min-height:64px; box-sizing:border-box;
  padding:8px 12px 8px 14px; border:1px solid var(--line); border-radius:14px; background:var(--card); color:var(--ink); text-decoration:none; }
.qbtn > .ico { color:var(--accent-text); }
.qw { display:grid; min-width:0; }
.qw b { font-size:17px; }
.qw span { font-size:15px; color:var(--mute); }
.qct { min-width:34px; height:34px; box-sizing:border-box; padding:0 8px; border-radius:999px; display:inline-grid; place-items:center;
  background:var(--chip); color:var(--ink); font-weight:700; font-size:17px; font-variant-numeric:tabular-nums; }
.qhot .qct { background:var(--warn-bg); color:var(--warn); }
.qbad .qct { background:var(--bad); color:#fff; }
.qbad > .ico, .qbad .qw b { color:var(--bad); }
.qchev { color:var(--mute); }
.qlinks { display:flex; flex-wrap:wrap; align-items:flex-start; gap:0 18px; }
.qlink { display:inline-flex; align-items:center; gap:6px; min-height:44px; color:var(--accent-text); font-size:16px; }
.qmore[open] { flex-basis:100%; }
.qmore nav { display:grid; }
.qmore nav a { display:flex; align-items:center; gap:12px; min-height:52px; border-top:1px solid var(--line); color:var(--ink); text-decoration:none; font-size:17px; }
.qmore nav a .ico { color:var(--mute); }
.qmore .qn { margin-left:auto; color:var(--mute); font-variant-numeric:tabular-nums; }
.scards { display:grid; gap:8px; margin-bottom:14px; }
.slist { display:grid; gap:8px; }
.scard { display:grid; gap:4px; padding:12px 12px 12px 14px; border:1px solid var(--line); border-radius:14px; background:var(--card);
  color:var(--ink); text-decoration:none; }
.stop { display:flex; justify-content:space-between; align-items:baseline; gap:10px; }
.stop b { font-size:17px; min-width:0; overflow-wrap:anywhere; }
.samt { font-weight:700; font-size:17px; font-variant-numeric:tabular-nums; white-space:nowrap; }
.swork { font-size:16px; }
.sline { display:flex; flex-wrap:wrap; align-items:center; gap:4px 12px; font-size:15px; color:var(--mute); }
.sdoc { display:inline-flex; align-items:center; gap:5px; font:700 15px var(--mono); color:var(--accent-text); }
.shead { display:flex; align-items:center; gap:8px; margin:4px 0 6px; font-size:21px; }
.shead > .ico { color:var(--accent-text); }
.shead.sbad, .shead.sbad > .ico { color:var(--bad); }
.sback { display:inline-flex; align-items:center; gap:6px; min-height:44px; color:var(--accent-text); font-size:16px; }
.sempty { margin:0; padding:16px; border:1px dashed var(--line); border-radius:14px; color:var(--mute); font-size:16px; }
.phone-live .qgrid { grid-template-columns:repeat(auto-fill, minmax(230px, 1fr)); }
@media (max-width:360px) { .qbtn { grid-template-columns:auto minmax(0,1fr) auto; } .qchev { display:none; } }

/* =============================================================================================================
   THE PROGRESS BAR (2026-11-15, Doug picked option B of mockups/progress-mockup.html; progress_bar.py).
   Five stops across the top of the Estimate and Invoice headers: Estimate, Sent, Invoice, Billed, Paid (3 on a quick
   invoice). Green = done (check badge), amber = your move, blue = waiting on the client, red = late ("!" badge), dashed
   grey = not yet, grey = void. Each stop: a 40px circle with its icon, its word, one short word or date; a 64px tap.
   ============================================================================================================= */
:root { --pb-pay:#1f5f8b; --pb-pay-bg:#e4f0f8; --pb-wait-bg:#fff6dc; --pb-on:#ffffff; }
@media (prefers-color-scheme:dark) { :root:not([data-theme="light"]) { --pb-pay:#7cc0ef; --pb-pay-bg:#13293a; --pb-wait-bg:#33270f; --pb-on:#0b0b0b; } }
:root[data-theme="dark"] { --pb-pay:#7cc0ef; --pb-pay-bg:#13293a; --pb-wait-bg:#33270f; --pb-on:#0b0b0b; }
.pbar { list-style:none; margin:0 -6px; padding:0; display:grid; grid-template-columns:repeat(5, minmax(0,1fr)); }
.pbar.n3 { grid-template-columns:repeat(3, minmax(0,1fr)); max-width:340px; }
.pstop { position:relative; display:grid; justify-items:center; text-align:center; min-width:0; }
.pstop::before { content:""; position:absolute; top:20px; left:-50%; width:100%; height:3px; background:var(--line); }
.pstop:first-child::before { display:none; }
.pstop.done::before, .pstop.wait::before, .pstop.pay::before, .pstop.late::before { background:var(--ok); }
.pgo { position:relative; display:grid; justify-items:center; align-content:start; gap:3px; width:100%; min-height:64px; padding:0 2px 2px;
       box-sizing:border-box; color:var(--ink); text-decoration:none; border-radius:10px; }
a.pgo:hover .pbname { text-decoration:underline; }
a.pgo:focus-visible { outline:3px solid var(--accent); outline-offset:1px; }
.pring { position:relative; width:40px; height:40px; box-sizing:border-box; border-radius:50%; display:grid; place-items:center;
         border:2px solid var(--line); background:var(--card); color:var(--mute); }
.pring > .ico { width:20px; height:20px; }
.pbadge { position:absolute; right:-4px; bottom:-4px; width:18px; height:18px; border-radius:50%; display:grid; place-items:center; background:var(--card); }
.pbadge .ico { width:14px; height:14px; stroke-width:3; }
.pstop.done .pring { background:var(--ok); border-color:var(--ok); color:var(--pb-on); }
.pstop.done .pbadge { color:var(--ok); }
.pstop.wait .pring { background:var(--pb-wait-bg); border:3px solid var(--warn); color:var(--warn); }
.pstop.pay .pring { background:var(--card); border:3px solid var(--pb-pay); color:var(--pb-pay); }   /* (2026-11-15, Doug) out with the client: white fill */
.pstop.late .pring { background:var(--bad); border-color:var(--bad); color:var(--pb-on); }
.pstop.late .pbadge { color:var(--bad); }
.pstop.todo .pring { border-style:dashed; }
.pstop.void .pring { background:var(--chip); color:var(--mute); }
.pbname { font-size:15px; font-weight:700; line-height:1.15; max-width:100%; hyphens:auto; }
.pbsub { font-size:14px; line-height:1.15; color:var(--mute); max-width:100%; hyphens:auto; }
.pstop.todo .pbname, .pstop.void .pbname { color:var(--mute); font-weight:600; }
.pstop.wait .pbsub { color:var(--warn); font-weight:650; }
.pstop.pay .pbsub { color:var(--pb-pay); font-weight:650; }
.pstop.late .pbname, .pstop.late .pbsub { color:var(--bad); font-weight:700; }
.pline { border:0; border-top:1px solid var(--line); margin:4px 0 6px; }
.chero.pb .pbar { margin-top:2px; }
@media (max-width:440px) { .pbname, .pbsub { font-size:13px; } }
.phone-live .pbname, .phone-live .pbsub { font-size:13px; }
@media (max-width:360px) { .pring { width:36px; height:36px; } .pstop::before { top:18px; } }

/* =============================================================================================================
   THE DOCUMENT STRIP (2026-11-15, Doug; doc_strip.py): the job's history as a row of icons at the top of the desk's
   History tab (laptop / iPad), about level with the phone's progress bar. The same circles and colours as the progress
   bar, plus "old" (grey + x: replaced, void, declined). Click a stop: its document shows under the strip (intake.js).
   ============================================================================================================= */
.pbar.dstrip { display:grid; grid-template-columns:none; grid-auto-flow:column; grid-auto-columns:minmax(88px, 104px);
               justify-content:start; margin:0 0 6px; padding:2px 0 4px; overflow-x:auto; }
.dstrip button.pgo { border:0; background:none; font:inherit; cursor:pointer; padding:4px 2px 6px; }
.dstrip button.pgo:hover .pbname { text-decoration:underline; }
.dstrip button.pgo:focus-visible { outline:3px solid var(--accent); outline-offset:1px; }
.dstrip .pbname { font-size:14px; }
.dstrip .pbsub { font-size:13px; }
.js .dstrip button.pgo[aria-pressed="true"] .pring { box-shadow:0 0 0 3px var(--card), 0 0 0 5px var(--ink); }
.js .dstrip button.pgo[aria-pressed="true"] .pbname { text-decoration:underline; text-decoration-thickness:3px; text-underline-offset:4px; }
.pstop.old .pring { background:var(--chip); color:var(--mute); }
.pstop.old .pbadge { color:var(--mute); }
.pstop.old .pbsub { color:var(--mute); }
.ddjob { margin:2px 0 10px; font-size:15px; }
.ddocs { display:grid; gap:12px; margin-bottom:16px; }
.ddoc { border:1px solid var(--line); border-radius:12px; padding:12px 16px; background:var(--card); }
.ddoc > h3 { margin:0 0 8px; font:700 18px/1.2 var(--mono); }
.ddsub + .ddsub { margin-top:12px; padding-top:12px; border-top:1px solid var(--line); }
.ddsub h4 { margin:0 0 6px; font:700 16px/1.2 var(--mono); }
.ddfacts { display:grid; grid-template-columns:auto 1fr; gap:4px 16px; margin:0 0 8px; font-size:15px; }
.ddfacts dt { color:var(--mute); }
.ddfacts dd { margin:0; }
.ddtext { margin:0 0 8px; font-size:16px; }
.ddbtns { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }
.ddbtns .btn { display:inline-flex; align-items:center; gap:6px; min-height:44px; box-sizing:border-box; }

/* =============================================================================================================
   ONE MENU BAR (2026-11-15, Doug): Estimates, Invoices, Search, More, then EN / ES, the same on the phone and the laptop.
   "More" holds the Inbox, the setup pages, this computer's Style and Theme, and Log out (ui.top_bar). The laptop's
   second row (Style, Theme, Log out) is gone.
   ============================================================================================================= */
.topbar nav .adminmenu { min-width:220px; }
.topbar nav .adminmenu a, .topbar nav .adminmenu .themebtn { min-height:40px; display:flex; align-items:center; box-sizing:border-box; }
.topbar nav .adminmenu .themebtn { width:100%; cursor:pointer; }
.topbar nav .adminmenu .themebtn:hover { background:var(--line); }
.topbar nav .adminmenu .stylepick { padding:6px 12px; gap:8px; font-size:15px; color:var(--ink); }
.topbar nav .adminmenu .stylepick > span { color:var(--mute); }
.topbar nav .adminmenu .casesel { font-size:14px; max-width:200px; min-height:32px; }
@media (max-width:639px) { .topbar nav .adminmenu a, .topbar nav .adminmenu .themebtn { min-height:44px; } }

/* ============================================================================
   RATES FOR THIS JOB, IN THE ESTIMATE CARD (2026-11-15, Doug): the desk's old Labor rates tab, folded under the total
   (intake_page.rates_fold). The line says which rates; "Change for this job" opens the four boxes.
   ============================================================================ */
.ratefold { margin-top:10px; border-top:1px solid var(--line); padding-top:8px; }
.ratefold > summary { cursor:pointer; list-style:none; min-height:44px; display:flex; flex-wrap:wrap; align-items:center; gap:4px 8px; }
.ratefold > summary::-webkit-details-marker { display:none; }
.ratefold > summary .small { margin:0; }
.ratechg { font-size:15px; font-weight:700; color:var(--accent-text); text-decoration:underline; text-underline-offset:3px; }
.ratefold[open] .ratechg { visibility:hidden; }
.rategrid { display:grid; grid-template-columns:1fr 1fr; gap:8px 12px; }
.rategrid .ifield { margin:0; }
.ratebtns { display:flex; flex-wrap:wrap; gap:8px; margin-top:8px; }

/* ============================================================================
   SENT TO THE CLIENT (2026-11-15, Doug; doc_strip.py): a small send arrow at the TOP-LEFT of a strip circle when that
   document was emailed to the client. Neutral (a fact, not "whose move"), the same size as the bottom-right badge.
   ============================================================================ */
.psent { position:absolute; left:-4px; top:-4px; width:18px; height:18px; border-radius:50%; display:grid; place-items:center;
         background:var(--card); color:var(--ink); box-shadow:0 0 0 1px var(--line); }
.psent .ico { width:12px; height:12px; stroke-width:2.5; }

/* ============================================================================
   NEW ESTIMATE (2026-11-15, Doug): "+ New estimate" sits beside the Estimates title like "+ New quick invoice" (.invhead);
   the phone's call card is ONE full-width button, "Call in a new estimate" (intake_page.new_job_card).
   ============================================================================ */
.invhead form.iactrow { margin:0; }
.newjob .callnew { display:flex; align-items:center; justify-content:center; gap:10px; width:100%; box-sizing:border-box; }
.newjob .callnew .ico { width:20px; height:20px; }
.newjob p.small { margin:8px 0 0; text-align:center; }

/* ---------- SMALL PROGRESS BAR in list rows (2026-11-15, Doug; progress_bar.mini_html) ----------
   Five small dots joined by a line, the big bar's colours; the laptop side only (hidden on a phone and in the drawn phone).
   Hover a dot for its words. A quick invoice's first two places are empty (.gap) so every column lines up. */
.pmini, .erow > .pmini { display:none; }
.phone-live .pmini, .phone-live .erow > .pmini { display:flex; flex-direction:row; align-items:center; justify-self:center; gap:0; }
/* a fixed-width right column, so every row's dots sit in the same place and read as columns down the list */
.phone-live .waitrow { grid-template-columns:auto minmax(0,1fr) auto 190px; }
.phone-live .invrow { grid-template-columns:auto minmax(0,1fr) auto 170px; }
.phone-live .waitrow .pmini, .phone-live .invrow .pmini { justify-self:end; margin:0 24px 0 12px; }
.phone-live .invrow > .amt { text-align:right; }
.pm { position:relative; display:block; width:14px; height:14px; border-radius:50%; border:2px solid var(--line); background:var(--card); box-sizing:border-box; }
.pm + .pm { margin-left:16px; }
.pm + .pm::before { content:""; position:absolute; top:50%; right:100%; width:18px; height:2px; margin-top:-1px; margin-right:0; background:var(--line); }
.pm.done, .pm.wait, .pm.pay, .pm.late { --pm-line:var(--ok); }
.pm.done + .pm::before { background:var(--ok); }
.pm.done { background:var(--ok); border-color:var(--ok); }
.pm.wait { background:var(--pb-wait-bg); border-color:var(--warn); border-width:3px; }
.pm.pay { background:var(--card); border-color:var(--pb-pay); border-width:3px; }
.pm.late { background:var(--bad); border-color:var(--bad); }
.pm.todo { border-style:dashed; }
.pm.void { background:var(--chip); border-color:var(--line); }
.pm.gap { border-color:transparent; background:transparent; }
.pm.gap + .pm::before, .pm.gap::before { display:none; }
.pm .ptip { display:none; position:absolute; bottom:calc(100% + 6px); left:50%; transform:translateX(-50%); white-space:nowrap;
  padding:3px 8px; border-radius:6px; background:var(--ink); color:var(--card); font-size:12px; font-weight:600; z-index:5; pointer-events:none; }
.pm:hover .ptip { display:block; }
.etable td.pcell { white-space:nowrap; }
.pm .ptip > span:first-child::after { content:":"; }

/* ---------- ONE CURRENT-STEP ICON in list rows (2026-11-16, Doug: replaced by the single current-step icon) ----------
   progress_bar.mini_icon_html: the stop the job is on now, the big bar's 40px circle (same .pstop / .pring colours and
   badge), its two words beside it. Same 134px as the old five dots, so the rows keep their width and line up.
   The old five-dot CSS (.pm ...) above is left in place for progress_bar.MINI_STYLE = "dots". */
.phone-live .pmini.one, .phone-live .erow > .pmini.one { display:flex; flex-direction:row; align-items:center; gap:8px;
  width:134px; box-sizing:border-box; text-align:left; justify-items:start; }
.phone-live .waitrow .pmini.one, .phone-live .invrow .pmini.one { justify-self:end; }
.etable td.pcell .pmini.one { justify-content:flex-start; }
.pmini.one::before { display:none; }
.pmini.one .pring { flex:none; }
.pmini.one .pwords { display:flex; flex-direction:column; min-width:0; }
.pmini.one .pbname { font-size:14px; }
.pmini.one .pbsub { font-size:13px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }

/* ---------- THE ONE ICON ON THE PHONE TOO (2026-11-16, Doug: "I'd like them on the phone too") ----------
   Before, the small progress picture showed only on the laptop side. Now the one current-step icon shows everywhere.
   Phone (480px and under): the icon sits on the top line beside the EST / INV number, the title and the
   chip + amount on the line under it, so the title keeps the full width. Tablet: a fourth column before the amount. */
.pmini.one, .erow > .pmini.one { display:flex; flex-direction:row; align-items:center; gap:8px; width:134px; box-sizing:border-box;
  text-align:left; justify-items:start; }
html:not(.phone-live) .erow:has(> .pmini.one) { grid-template-columns:auto minmax(0,1fr) auto auto; }     /* the laptop side keeps its own */
html:not(.phone-live) .invrow:has(> .pmini.one) { grid-template-columns:64px minmax(0,1fr) auto auto; }
@media (max-width:480px) {
  html:not(.phone-live) .erow:has(> .pmini.one), html:not(.phone-live) .invrow:has(> .pmini.one) { grid-template-columns:minmax(0,1fr) auto; row-gap:6px; }
  .ilistrow > .pmini.one { grid-row:1; grid-column:2; justify-self:end; width:auto; }
  .ilistrow:has(> .pmini.one) > b { grid-row:1; grid-column:1; }
  .ilistrow:has(> .pmini.one) > span:not(.pmini):not(.eright):not(.amt) { grid-row:2; grid-column:1; }
  .ilistrow:has(> .pmini.one) > .eright, .ilistrow:has(> .pmini.one) > .amt { grid-row:2; grid-column:2; }
  .pmini.one .pring { width:36px; height:36px; }
}


/* APPROVED RECIPIENTS (2026-11-16, Doug; security_page.py): one row per person (name, company, email) with an Edit button
   that opens the edit form; Remove sits inside it. And the send screens' "Pick from your approved list" drop-down (send_to.py). */
.arow { grid-template-columns:minmax(0,1fr); align-items:start; }
.arow .rwho { display:grid; gap:2px; min-width:0; overflow-wrap:anywhere; }
.arow .rco { color:var(--mute); }
.arow .redit summary { list-style:none; width:max-content; min-height:44px; }
.arow .redit summary::-webkit-details-marker { display:none; }
.arow .redit[open] summary { margin-bottom:8px; }
.arow .rremove { margin-top:10px; }
.arow .rremove .btn { width:100%; max-width:440px; }
@media (min-width:640px) { .arow { grid-template-columns:minmax(0,1fr) auto; } .arow .redit[open] { grid-column:1 / -1; } }
.radd { border-top:1px solid var(--line); padding-top:12px; }
.sendpick { width:100%; }

/* SEARCH RESULTS: PHONE ROWS, LAPTOP STRIP (2026-11-17, Doug). On a phone every document keeps its row, with its circle
   in the middle of the row. On a laptop (.phone-live) each piece of work is ONE row: the document strip (a circle is a link
   to that document) and beside it the document's card (Job, number, Made, Status, Total). */
html:not(.phone-live) .k-family .famlaptop { display:none; }
.phone-live .k-family .famphone { display:none; }
.phone-live .k-family .famlaptop { display:flex; flex-wrap:wrap; align-items:flex-start; gap:12px 28px; padding:6px 10px 10px; }
.k-family .famlaptop .slinks { flex:0 1 auto; max-width:100%; margin:0; }
.k-family .sdetail { flex:1 1 280px; min-width:260px; max-width:420px; }
.k-family .sdetail .ddoc h3 a { color:inherit; }
.k-family .slinks { margin:6px 0 0; padding:2px 10px 4px; }
.slinks a.pgo { display:grid; justify-items:center; color:inherit; text-decoration:none; padding:4px 2px 6px; }
.slinks a.pgo:hover .pbname { text-decoration:underline; }
.slinks a.pgo:focus-visible { outline:3px solid var(--accent); outline-offset:1px; }
.k-family .famphone .jobitem { position:relative; }
.k-family .jmid { position:absolute; left:50%; top:50%; transform:translate(-50%, -50%); pointer-events:none; }
.k-family .jmid::before { display:none; }

/* ---------- (2026-11-17, Doug) LIST ROWS SAY WHERE THE JOB STANDS ----------
   intake_page.row_status: a sent estimate's chip is "Estimate sent" in blue with the send arrow (like the strip), and a
   short plain line says what comes next ("Waiting for the client's yes. Make the invoice when the work is done.").
   The line shows on the laptop side only; the phone rows stay as they were. */
.chip.chipico { gap:6px; }
.chip.chipico::before { display:none; }
.chip.chipico .ico { width:16px; height:16px; flex:none; }
.erow > .enext { display:none; }
.phone-live .waitrow { grid-template-columns:auto minmax(0,1fr) auto minmax(150px,260px) 190px; }
.phone-live .waitrow > .enext { display:block; align-self:center; font-size:14px; line-height:1.35; color:var(--mute); padding-right:12px; }
.etable .tnext { display:block; margin-top:3px; font-size:13px; line-height:1.3; color:var(--mute); max-width:240px; }
@media (max-width:1199px) {        /* a narrow laptop window: no room for the line, keep the row as it was */
  .phone-live .waitrow { grid-template-columns:auto minmax(0,1fr) auto 190px; }
  .phone-live .waitrow > .enext { display:none; }
}

/* (2026-11-17, Doug) the one-click Archive on the Estimates table: only on jobs nothing has gone out on yet
   (intake_page.can_quick_archive), and the answer at the top with Undo. */
.etable td.tarch { width:1%; white-space:nowrap; text-align:right; }
.etable .tarchbtn { display:inline-flex; align-items:center; gap:6px; padding:4px 6px; min-height:32px; color:var(--mute); }
.etable .tarchbtn:hover, .etable .tarchbtn:focus-visible { color:var(--accent-text); text-decoration:underline; }
.listmsg { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:12px 0; }
#jobslist { scroll-margin-top:12px; }
.listmsg form { margin:0; }
.chip.pay { color:var(--pb-pay); }      /* (2026-11-17, Doug) sent, out with the client: the strip's blue, not the accent */

/* (2026-11-17, Doug picked mock-up A) THE ESTIMATES TABLE ROW: the number as a small tag, the title dark and bold
   without an underline ("No title yet" soft and italic, so it reads as missing), Archive as a small rounded button. */
.etable a.etag { display:inline-block; font-family:var(--mono); font-size:14px; font-weight:600; padding:3px 9px; border-radius:6px;
  background:var(--chip); color:var(--accent-text); border:1px solid var(--line); text-decoration:none; white-space:nowrap; }
.etable a.etag:hover, .etable a.etag:focus-visible { border-color:var(--accent-text); text-decoration:none; }
.etable a.ework { color:var(--ink); font-weight:650; text-decoration:none; }
.etable a.ework:hover, .etable a.ework:focus-visible { color:var(--accent-text); text-decoration:underline; }
.etable a.ework.none { font-weight:400; font-style:italic; color:var(--mute); }
.etable .tarchbtn { gap:6px; padding:5px 12px; min-height:32px; border-radius:999px; border:1px solid var(--line); background:var(--chip);
  color:var(--mute); font-size:13px; text-decoration:none; }
.etable .tarchbtn:hover, .etable .tarchbtn:focus-visible { color:var(--bad); border-color:var(--bad); background:var(--bad-bg); text-decoration:none; }

/* ===== THE CLIENT CARD IN TWO PARTS (2026-11-18, Doug's stage 3 decision): "Client" (the person, shared by all
   their jobs) and "Job site" (this job's address and access notes). intake_page.two_parts. ===== */
.icard .ipart-h { margin:4px 0 6px; font-size:13px; font-weight:600; letter-spacing:.04em; text-transform:uppercase; color:var(--mute); }
.icard .ipart-h + .igrid { margin-bottom:10px; }
.icard .ipart-h .small { text-transform:none; letter-spacing:0; font-weight:400; }

/* (2026-11-19, Doug; F13) A PAUSED COMPANY: the red strip at the top of every page (phone and laptop) */
.pausebar { background:var(--bad-bg, #fde8e8); color:var(--bad, #b42318); border-bottom:2px solid currentColor;
            text-align:center; font-size:14px; padding:8px 12px; overflow-wrap:anywhere; }
.pausebar b { margin-right:4px; }

/* (2026-11-19, Doug) THE CUSTOMER REQUEST FORM (request_form.py): the public /ask/ page, a request, the "Your request form" page */
.askform textarea.bigbox { width:100%; font-size:16px; font-family:inherit; resize:vertical; }
.askform input[type=file].bigbox { padding:10px; }
.askhint { display:block; margin-bottom:4px; }
.asktrap { position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }
.reqfacts { display:grid; gap:8px; margin:0 0 12px; }
.reqfacts > div { display:grid; grid-template-columns:7.5em 1fr; gap:8px; }
.reqfacts dt { color:var(--muted, #666); font-size:14px; }
.reqfacts dd { margin:0; overflow-wrap:anywhere; }
.reqwords { white-space:normal; overflow-wrap:anywhere; }
.reqphotos { display:flex; flex-wrap:wrap; gap:8px; }
.reqphoto { width:140px; height:140px; object-fit:cover; border-radius:8px; border:1px solid var(--line, #ddd); }
.reqbtns { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.reqbtns form { margin:0; }
.reqlink { width:100%; font-size:15px; }
.reqqr { width:220px; max-width:100%; height:auto; background:#fff; padding:8px; border-radius:8px; }

/* =============================================================================
   VOICE MINUTES (2026-11-20, usage.py): the ring in the menu bar (the Owner only) and the Usage page's bar.
   Blue within the included minutes, amber from 80%, red at the limit (the progress bar's colours).
   ============================================================================= */
.usagering { display:inline-flex; align-items:center; justify-content:center; min-width:30px; min-height:30px;
             margin:0 8px 0 -4px; border-radius:50%; }
.usagering:focus-visible { outline:3px solid var(--accent); outline-offset:1px; }
.uring { display:block; }
.uring circle { fill:none; stroke-width:3.5; }
.uring .urbase { stroke:var(--line); }
.uring .urfill { stroke-linecap:round; }
.uring.s-ok .urfill, .ubar.s-ok span { stroke:var(--pb-pay); background:var(--pb-pay); }
.uring.s-near .urfill, .ubar.s-near span { stroke:var(--warn); background:var(--warn); }
.uring.s-limit .urfill, .ubar.s-limit span { stroke:var(--bad); background:var(--bad); }
.ubig { margin:4px 0 10px; font-size:18px; }
.ubig b { font-size:30px; }
.ubar { height:16px; border-radius:8px; background:var(--line); overflow:hidden; }
.ubar span { display:block; height:100%; width:var(--ufill, 0%); border-radius:8px; }
.ustate { margin:10px 0 4px; font-weight:700; }
.ustate.s-ok { color:var(--pb-pay); }
.ustate.s-near { color:var(--warn); }
.ustate.s-limit { color:var(--bad); }
.ulimit { display:grid; gap:8px; max-width:420px; }
.utable { width:100%; border-collapse:collapse; font-size:15px; }
.utable th, .utable td { text-align:left; padding:8px 6px; border-bottom:1px solid var(--line); }
/* the ring sits right beside the name: where the name pushes everything else right (phone, iPad), the ring does it */
@media (max-width:639px) {
  .topbar .brand:has(+ .usagering) { margin-right:0; }
  .topbar .usagering { margin:0 auto 0 2px; }
}
@media (min-width:700px) and (max-width:1099px) {
  .phone-live .laptopside > .topbar .brand:has(+ .usagering) { margin-right:0; }
  .phone-live .laptopside > .topbar .usagering { margin:0 auto 0 2px; }
}
.uring { width:24px; height:24px; }

/* ============================================================================
   REQUESTS IN THE MENU BAR AND THE REQUESTS PAGE (2026-11-20, Doug)
   The count of new requests beside "Requests" in the menu bar; the list on /requests (request_form.list_page):
   one row per request, the whole row opens it, Call beside it; a NEW request older than 2 hours is amber.
   ============================================================================ */
.mbadge { display:inline-block; min-width:1.4em; padding:0 6px; margin-left:4px; border-radius:999px;
          background:var(--warn, #b45309); color:#fff; font-size:12px; font-weight:700; line-height:1.5em; text-align:center; }
.reqlist { display:grid; gap:8px; margin-top:10px; }
.reqrow { display:flex; align-items:center; gap:10px; padding:10px 12px; border:1px solid var(--line, #ddd); border-radius:10px; }
.reqrow.late { border-color:var(--warn, #b45309); }
.reqopen { flex:1 1 auto; min-width:0; display:grid; gap:2px; color:inherit; text-decoration:none; min-height:44px; }
.reqopen:hover .reqname { text-decoration:underline; }
.reqfirst { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.reqside { flex:0 0 auto; display:flex; flex-direction:column; align-items:flex-end; gap:6px; }
.reqcall { min-height:44px; display:inline-flex; align-items:center; gap:4px; }
/* (2026-11-20, Doug) the first photo, small, on every request row (phone cards and the laptop table) */
.reqthumb { position:relative; flex:none; width:52px; height:52px; border-radius:8px; overflow:hidden; display:inline-flex;
            align-items:center; justify-content:center; background:var(--chip); border:1px solid var(--line); color:var(--mute); }
.reqthumb img { width:100%; height:100%; object-fit:cover; display:block; }
.reqthumb.none { background:transparent; border-style:dashed; opacity:.5; }
.reqthumb.heic { flex-direction:column; gap:0; font-size:12px; }
.reqthumbn { position:absolute; right:3px; bottom:3px; min-width:18px; padding:0 4px; border-radius:999px; font-size:11px;
             line-height:18px; text-align:center; background:rgba(0,0,0,.65); color:#fff; }
.reqtable td { vertical-align:middle; }
.reqtable td.tthumb { width:1%; padding-right:4px; }
.reqtable tr.late td:first-child { box-shadow:inset 3px 0 0 var(--warn, #b45309); }
.reqtable a.reqtwords { color:var(--ink); text-decoration:none; display:block; max-width:340px; }
.reqtable a.reqtwords:hover, .reqtable a.reqtwords:focus-visible { color:var(--accent-text); text-decoration:underline; }
.reqtable .reqcall { min-height:36px; }
.reqarch { margin-top:14px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }

/* ===== ONE PRESS (2026-11-20, onepress.js): a pressed Send / Accept is greyed out with a spinning circle ===== */
.onepress button:disabled { opacity:.6; cursor:wait; }
.onepress button.busy { opacity:.85; display:inline-flex; align-items:center; justify-content:center; gap:10px; }
.onepress button.busy::before { content:""; width:18px; height:18px; flex:none; border-radius:50%;
  border:3px solid currentColor; border-right-color:transparent; animation:onepress-spin .8s linear infinite; }
@keyframes onepress-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .onepress button.busy::before { animation-duration:2.4s; } }
.onepress .busynote { margin-top:8px; text-align:center; }

/* =============================================================================
   THE "MORE" MENU OUTSIDE THE SLIDING BAR (2026-11-20, Doug: More did nothing on his iPhone). app.js moves the open menu
   into this holder at the end of the page, so the phone's sideways-scrolling menu bar cannot clip it. The holder takes
   no room and draws nothing itself; the menu is "fixed" under its word as before.
   ============================================================================= */
.topbar.menuportal { position:fixed; top:0; left:0; width:0; height:0; padding:0; margin:0; border:0; background:none;
  box-shadow:none; overflow:visible; z-index:60; display:block; }
.topbar.menuportal nav { overflow:visible !important; width:auto !important; margin:0 !important; padding:0; display:block; }



/* ============================================================================================================
   SIGN-IN PAGES IN THE BRAND'S LOOK (2026-11-20, Doug): sign in, forgot password, choose a password, expired link
   (signin_page.frame: body.signin.brand-handyman / .brand-catering, picked by the address). Always light, like the
   home pages: Handyman Voice = "Blueprint" (site/handyman.css), Catering Voice = "Warm kitchen" (site/catering.css).
   ============================================================================================================ */
body.signin.brand-handyman, body.signin.brand-catering { color-scheme:light; --card:#ffffff; --chip:#f2efe6; --ok:#1d7a46;
  --ok-bg:#e6f4ec; --warn:#8a5a00; --warn-bg:#fff6dc; --bad:#b3261e; --bad-bg:#fdecee; }
body.signin.brand-handyman { --bg:#F4F1E8; --ink:#1A2433; --mute:#3a4556; --line:#b9c0cc; --accent:#E8692C; --accent-ink:#1A1A1A;
  --accent-text:#1F3A5F; --sky:#f07a40;
  background-color:#F4F1E8; color:#1A2433;
  background-image:linear-gradient(#e3dfd2 1px,transparent 1px),linear-gradient(90deg,#e3dfd2 1px,transparent 1px); background-size:32px 32px; }
body.signin.brand-catering { --bg:#FBF5EC; --ink:#2E211A; --mute:#5a4636; --line:#ecdcc8; --accent:#A8321E; --accent-ink:#FBF5EC;
  --accent-text:#A8321E; --sky:#7d2414; background:#FBF5EC; color:#2E211A; }
.signin .brandbar { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:16px; }
.signin .brandbar .loginlang { margin:0; }
.signin .brandname { font-weight:700; font-size:22px; text-decoration:none; }
body.signin.brand-handyman .brandname { color:#1F3A5F; }
body.signin.brand-catering .brandname { color:#A8321E; font-weight:800; font-size:24px;
  font-family:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,"Times New Roman",serif; }
/* the card */
body.signin.brand-handyman .signin-card { border:2px solid #1F3A5F; border-radius:6px; box-shadow:8px 8px 0 #1F3A5F; padding:24px; }
body.signin.brand-handyman .signin-card .eyebrow { font-family:var(--mono); color:#C4501A; letter-spacing:1px; }
body.signin.brand-handyman .signin-card h1 { color:#1F3A5F; }
body.signin.brand-catering .signin-card { border:1px solid #ecdcc8; border-radius:20px; box-shadow:none; padding:28px; }
body.signin.brand-catering .signin-card .eyebrow { color:#6B4F3A; }
body.signin.brand-catering .signin-card h1 { font-family:"Iowan Old Style","Palatino Linotype",Palatino,Georgia,"Times New Roman",serif;
  font-weight:800; font-size:28px; }
/* boxes and buttons */
body.signin.brand-handyman .bigbox { border:2px solid #b9c0cc; border-radius:4px; }
body.signin.brand-handyman .bigbox:focus { border-color:#1F3A5F; outline:2px solid #1F3A5F; outline-offset:1px; }
body.signin.brand-catering .bigbox { border:1px solid #cdb79d; border-radius:12px; }
body.signin.brand-catering .bigbox:focus { border-color:#A8321E; outline:2px solid #A8321E; outline-offset:1px; }
body.signin.brand-handyman .btn.p { background:#E8692C; border-color:#E8692C; color:#1A1A1A; border-radius:4px; font-weight:700; }
body.signin.brand-handyman .btn.p:hover { background:#f07a40; border-color:#f07a40; }
body.signin.brand-catering .btn.p { background:#A8321E; border-color:#A8321E; color:#FBF5EC; border-radius:999px; font-weight:700; }
body.signin.brand-catering .btn.p:hover { background:#7d2414; border-color:#7d2414; }
body.signin.brand-handyman .btn:not(.p) { border:2px solid #1F3A5F; color:#1F3A5F; background:#fff; border-radius:4px; }
body.signin.brand-catering .btn:not(.p) { border:2px solid #A8321E; color:#A8321E; background:#fff; border-radius:999px; }
