
:root{
  --navy:#0b2234; --navy-2:#153347; --orange:#e04a22; --orange-d:#bd3a16;
  --ink:#1b2733; --ink-2:#3c4d5c; --muted:#5f7483;
  --line:#dce4ea; --line-2:#eaf0f4; --bg:#f1f5f8; --surface:#fff; --surface-2:#f7fafb;
  --ok:#17693c;  --ok-bg:#e6f4ea;
  --info:#17618f; --info-bg:#e6f0f7;
  --live:#0f6b6b; --live-bg:#e1f2f2;
  --warn:#9a5b00; --warn-bg:#fff3e0;
  --late:#a8341f; --late-bg:#fdeae6;
  --off:#6b7883;  --off-bg:#eef1f3;
  --r-card:13px; --r-ctl:9px;
  --sh:0 1px 2px rgba(11,34,52,.05),0 6px 18px rgba(11,34,52,.06);
  --sh-lift:0 2px 6px rgba(11,34,52,.09),0 14px 34px rgba(11,34,52,.10);
  --font:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;background:var(--bg);color:var(--ink);font:400 16px/1.55 var(--font);
  -webkit-font-smoothing:antialiased}

/* ── app bar ─────────────────────────────────────────────────────────── */
.appbar{background:var(--navy);color:#fff;padding:0 20px;position:sticky;top:0;z-index:30;
  box-shadow:0 1px 0 rgba(255,255,255,.06)}
.appbar-in{max-width:1280px;margin:0 auto;display:flex;align-items:center;gap:16px;min-height:54px;
  flex-wrap:nowrap;padding:6px 0}
.brand{font-weight:700;letter-spacing:.4px;font-size:1.02rem;white-space:nowrap}
.brand b{color:var(--orange)}
/* ── ONE ROW, ALWAYS ──────────────────────────────────────────────────────
   The bar wrapped onto two rows for the owner: thirteen destinations and 113 characters of label
   do not fit beside the brand, the search box and his name in 1280px. Two rows of navigation above
   every screen is a quarter of the bar spent on getting somewhere.

   So the row never wraps and never widens the page. The links that do not fit are not dropped --
   they move into a More menu, which is a <details> and therefore works with no JavaScript. The
   nav itself scrolls rather than clips, so a long label can never push the page sideways. */
.appnav{display:flex;gap:2px;flex-wrap:nowrap;flex:1;min-width:0;overflow-x:auto;
  scrollbar-width:none;-ms-overflow-style:none}
.appnav::-webkit-scrollbar{display:none}
.appnav a{color:#c6d4de;text-decoration:none;padding:7px 10px;border-radius:8px;font-size:.88rem;
  font-weight:500;white-space:nowrap;line-height:1.35}
.appnav a:hover{background:rgba(255,255,255,.09);color:#fff}
.appnav a.on{background:rgba(255,255,255,.14);color:#fff}

/* ── the More menu ───────────────────────────────────────────────────────
   Outside .appnav on purpose: the nav scrolls, and a panel inside a scrolling box gets clipped by
   it. Rendered only when something is actually in it. */
.navmore{position:relative;flex:0 0 auto}
.navmore>summary{list-style:none;cursor:pointer;color:#c6d4de;padding:7px 10px;border-radius:8px;
  font-size:.88rem;font-weight:500;white-space:nowrap;line-height:1.35;user-select:none}
.navmore>summary::-webkit-details-marker{display:none}
.navmore>summary::after{content:"";display:inline-block;margin-left:6px;border:4px solid transparent;
  border-top-color:currentColor;transform:translateY(2px)}
.navmore>summary:hover{background:rgba(255,255,255,.09);color:#fff}
.navmore[open]>summary{background:rgba(255,255,255,.14);color:#fff}
.navmore>summary.on{background:rgba(255,255,255,.14);color:#fff}
.navmore-p{position:absolute;top:calc(100% + 6px);right:0;z-index:40;min-width:190px;
  background:var(--navy);border:1px solid rgba(255,255,255,.14);border-radius:10px;padding:6px;
  box-shadow:0 12px 30px rgba(0,0,0,.35);display:flex;flex-direction:column;gap:2px}
.navmore-p a{color:#c6d4de;text-decoration:none;padding:9px 12px;border-radius:7px;font-size:.9rem;
  font-weight:500;white-space:nowrap}
.navmore-p a:hover{background:rgba(255,255,255,.10);color:#fff}
.navmore-p a.on{background:rgba(255,255,255,.16);color:#fff}
.appwho{color:#93a8b8;font-size:.82rem;text-align:right;line-height:1.3;white-space:nowrap}
.appwho a{color:#c6d4de;text-decoration:none;display:block;font-size:.8rem}
.appwho a:hover{color:#fff;text-decoration:underline}

.page{max-width:1280px;margin:0 auto;padding:26px 20px 90px}
@media(max-width:640px){.page{padding:18px 14px 70px}}

/* ── the app bar on a phone ───────────────────────────────────────────────
   The nav wrapped. An owner has twelve destinations and about a hundred characters of label, which
   at 390px is three or four stacked rows of links -- roughly a quarter of the screen spent on
   navigation before any content, every time he opens a page. The office manager had ten.

   One scrolling row instead. Every destination stays reachable and nothing is hidden behind a menu
   that needs JavaScript to open; the fade on the right edge is what says there is more. The owner's
   name goes too -- he knows who he is, and on a phone the two links are what the corner is for. */
@media(max-width:760px){
  .appbar{padding:0 12px}
  .appbar-in{gap:10px;min-height:50px;padding:6px 0;flex-wrap:nowrap}
  .brand{font-size:.95rem}
  .appnav{scroll-snap-type:x proximity;mask-image:linear-gradient(to right,#000 85%,transparent)}
  .appnav a{padding:7px 11px;font-size:.9rem;scroll-snap-align:start}
  .navmore>summary{padding:7px 9px;font-size:.88rem}
  .appwho{font-size:0;display:flex;gap:10px;align-items:center;white-space:nowrap}
  .appwho a{font-size:.78rem;display:inline}
}

/* ── type ────────────────────────────────────────────────────────────── */
h1{font-size:1.75rem;line-height:1.2;margin:0 0 4px;letter-spacing:-.015em;font-weight:700;color:var(--navy)}
h2{font-size:1.15rem;line-height:1.25;margin:0 0 12px;font-weight:650;color:var(--navy)}
.sec{font-size:.76rem;font-weight:700;letter-spacing:.09em;text-transform:uppercase;color:var(--muted);
  margin:0 0 12px}
.lede{font-size:1rem;color:var(--ink-2);margin:0 0 18px;max-width:62ch}
.dim{color:var(--muted)}
.sm{font-size:.86rem}
.xs{font-size:.78rem}
.nowrap{white-space:nowrap}

/* ── cards & layout ──────────────────────────────────────────────────── */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);
  padding:20px 22px;box-shadow:var(--sh)}
.card + .card{margin-top:16px}
.card-tight{padding:14px 16px}
.card-head{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin:0 0 14px}
.card-head h2{margin:0}
.grid{display:grid;gap:16px}
.g2{grid-template-columns:1fr}
.g3{grid-template-columns:1fr}
@media(min-width:760px){.g2{grid-template-columns:1fr 1fr}}
@media(min-width:1040px){.g3{grid-template-columns:1fr 1fr 1fr}}
@media(min-width:1040px){.g-main{grid-template-columns:minmax(0,1.45fr) minmax(0,1fr)}}
.stack{display:flex;flex-direction:column;gap:16px}

/* ── the customer centre: a list that stays put, and everything else ──────
 *
 * The office manager works QuickBooks' Customer Center all day and asked for this shape: the
 * customers down the left, always there, and the one she is looking at filling the rest. Ours made
 * her go back to a list screen and come forward again for every customer.
 *
 * ONE COLUMN UNTIL 1040px. On a phone the list is above the customer, which is the same two things
 * in the only order that fits -- not a pane squeezed to nothing.
 */
/*
 * THE MAIN CONTENT COMES FIRST IN THE MARKUP and the list is placed beside it with the order
 * property.
 *
 * Two reasons, and they agree. The Customers screen is measured on how far into the page the first
 * customer row begins -- a screenful of preamble before the content was the whole of what that
 * redesign fixed -- and a 60-row list emitted first puts 7KB back in front of it. And on a phone
 * there are no columns: what belongs at the top is the customer you opened, not the list you
 * opened them from.
 */
.cc{display:grid;gap:16px;grid-template-columns:1fr;align-items:start}
/*
 * THE LIST SCROLLS INSIDE ITS OWN PANE, and getting there takes three rules rather than one.
 *
 * It did not scroll at all, reported by the office manager on 4 Nov. .cc-left was a sticky flex
 * column with a max-height and .cc-list had overflow:auto -- which looks complete and is not,
 * because the CARD sits between them. A flex item's min-height is auto, so the card refused to
 * shrink below its own content; the list inside it therefore had no constrained height, nothing to
 * overflow, and nothing to scroll. The pane being sticky then made the overflow unreachable: the
 * rows past the fold were rendered and could not be got to by any amount of scrolling.
 *
 * So the chain has to be unbroken from the pane to the list: the card is a flex column too, it is
 * allowed to shrink (min-height:0), and the LIST is the part that takes up the slack and scrolls.
 * The heading, the search box and the "showing 60 of 212" line keep their natural height -- the
 * search box scrolling away from under the hand that is typing in it was never the ask.
 */
@media(min-width:1040px){.cc{grid-template-columns:300px minmax(0,1fr)}
  .cc-left{order:-1;position:sticky;top:70px;max-height:calc(100vh - 90px);
    display:flex;flex-direction:column}
  .cc-left>.card{display:flex;flex-direction:column;min-height:0;max-height:100%;overflow:hidden}
  .cc-left>.card>.card-head,.cc-left>.card>form,.cc-left>.card>p{flex:none}
  /* The scrollbar sits in the card's own padding instead of pushing a long name off the edge. */
  .cc-left .cc-list{flex:1 1 auto;min-height:0;overflow-y:auto;margin-right:-10px;
    padding-right:10px}}
.cc-list{overflow:auto;min-height:0}
.cc-row{display:flex;justify-content:space-between;gap:10px;align-items:baseline;
  padding:7px 10px;border-radius:7px;text-decoration:none;color:var(--ink);font-size:.9rem}
.cc-row:hover{background:var(--ground)}
.cc-row.on{background:var(--ok-bg);font-weight:600}
.cc-row b{font-weight:inherit;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cc-row span{color:var(--muted);font-variant-numeric:tabular-nums;flex:none;text-align:right}
.cc-row.owes span{color:var(--warn)}
/* Money of theirs already in QuickBooks, under the debt rather than subtracted from it. */
.cc-credit,.dir-credit{display:block;color:var(--ok);font-size:.72rem;font-weight:600;
  white-space:nowrap}

/* Handing an appointment to somebody else, from the panel that opens on a click. */
.ev-assign{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:14px 0 0;
  padding-top:12px;border-top:1px solid var(--line-2)}
.ev-assign select{flex:1 1 150px;min-width:0}
.ev-assign-why{flex-basis:100%;margin:0}
/* Money we have already applied, on a screen reading a snapshot taken before we did. */
.cc-credit-done,.dir-credit-done{color:var(--muted);font-weight:500}

/* The ledger: one table, newest first, and the memo is a column and not a detail. */
.led{width:100%;border-collapse:collapse;font-size:.88rem}
.led th{text-align:left;font-weight:600;color:var(--muted);font-size:.74rem;
  text-transform:uppercase;letter-spacing:.04em;padding:6px 8px;border-bottom:1px solid var(--line)}
.led td{padding:7px 8px;border-bottom:1px solid var(--line);vertical-align:top}
.led tr:last-child td{border-bottom:0}
.led .num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.led .memo{color:var(--ink-2)}
.led tr.void td{color:var(--muted)}
.led tr.unsent{background:var(--warn-bg)}
.led-wrap{overflow-x:auto}

/* ── lists replace dense tables ──────────────────────────────────────── */
.list{display:flex;flex-direction:column}
.item{display:flex;gap:14px;align-items:flex-start;justify-content:space-between;
  padding:13px 0;border-bottom:1px solid var(--line-2);text-decoration:none;color:inherit}
.item:last-child{border-bottom:0}
.item:hover{background:#f8fbfd}
a.item:hover .item-t{text-decoration:underline}
.item-b{flex:1;min-width:0}
.item-t{font-weight:650;font-size:.99rem;color:var(--navy)}
.item-s{color:var(--muted);font-size:.87rem;margin-top:2px}
.item-r{text-align:right;display:flex;flex-direction:column;gap:5px;align-items:flex-end;flex-shrink:0}
/* A row read out of Google Calendar, not managed here. Held off the left edge by a dashed rule and
   set on a tint, so a glance down the timeline separates observed history from confirmed work
   without having to read either. */
.item-cal{border-left:3px dashed var(--line);padding-left:11px;background:#fbfcfe}
.item-cal:hover{background:#f6f9fc}
.item-cal .item-t{font-weight:600;color:var(--muted-strong,#4a5a6a)}
.item-src{color:var(--muted);font-size:.78rem;margin-top:3px;font-style:italic}
/* The job a service plan has already generated, and the absence of one. The absence is the thing
   worth seeing on a past-due plan, so it is not styled as nothing. */
.ag-job{color:var(--info);font-weight:600;text-decoration:none}
.ag-job:hover{text-decoration:underline}
.ag-nojob{color:var(--muted)}

/* ── "what was done": one row per calendar entry awaiting confirmation ── */
.cf-list{display:flex;flex-direction:column}
.cf{display:grid;grid-template-columns:120px 1fr auto auto;gap:12px;align-items:start;
  padding:12px 0;border-bottom:1px solid var(--line-2)}
.cf:last-child{border-bottom:0}
.cf-when{font-size:.9rem;line-height:1.5}
.cf-when b{display:block;color:var(--navy)}
.cf-who{min-width:0}
.cf-title{font-weight:600;color:var(--navy);overflow-wrap:anywhere}
.cf-who>a{font-weight:650;color:var(--navy)}
.cf-why{color:var(--muted);font-size:.82rem;margin-top:2px}
.cf-where{color:var(--muted);font-size:.82rem;margin-top:2px}
.cf-act{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:0}
.cf-act select{min-width:150px}
.cf-pick select{min-width:190px}
.cf-no{margin:0}
/* The unsure half is tinted, so a glance separates "press one button" from "make a decision". */
.cf-unsure{background:#fbfcfe}
@media (max-width:820px){
  .cf{grid-template-columns:1fr;row-gap:8px}
  .cf-when b{display:inline}
}

/* ── the customer directory: a list to run an eye down ────────────────── */
/* Three columns on a grid rather than a table, so the amount column stays aligned down the page
   while the row is still one clickable anchor. */
.dirlist{display:flex;flex-direction:column}
/* ── THE CUSTOMERS SCREEN ──────────────────────────────────────────────────
   One band across the top -- heading with the count, the search box, the folded filters -- then
   the chips and the list. What this replaced: a hero card, a separate new-customer row, a
   three-sentence notice about missing addresses, a whole card of filters with a two-line
   explanation, a red coverage warning, chips, a count and a column header, before any customer.
   The office opens this screen to find one person; the search box is now the first thing and the
   first row is above the fold on a laptop. */
.chead{background:var(--card);border:1px solid var(--line);border-radius:var(--r-card);
  padding:16px 18px;margin:0 0 12px}
.chead-top{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:0 0 12px}
.chead-top h1{margin:0;font-size:1.44rem;line-height:1.15}
.chead-top .b{margin-left:auto}
.chead-n{font-size:.92rem;font-weight:650;color:var(--muted);
  font-variant-numeric:tabular-nums;margin-left:4px}

/* The filters: a summary line that names the period when one is set, so folding never hides
   WHICH filter is on -- only the controls that set it. */
.cfilt{margin:12px 0 0;border-top:1px solid var(--line-2);padding-top:10px}
.cfilt > summary{display:flex;align-items:center;gap:8px;cursor:pointer;list-style:none;
  font-size:.88rem;color:var(--ink-2)}
.cfilt > summary::-webkit-details-marker{display:none}
.cfilt > summary::before{content:'';width:7px;height:7px;flex:none;border-right:2px solid var(--muted);
  border-bottom:2px solid var(--muted);transform:rotate(45deg);transition:transform .12s ease}
.cfilt[open] > summary::before{transform:rotate(-135deg)}
.cfilt-h{font-weight:700}
/* The period stays in the summary even while the controls are open. It was hidden when open, and
   since the panel opens itself whenever a filter is set, that meant the one state where naming the
   period matters was the one state that never showed it. A break test on the label found it. */
.cfilt-v{color:var(--muted)}
.cfilt-body{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:10px}
.cfilt-body select,.cfilt-body input[type=date]{margin:0;min-height:38px}
.cfilt-note{flex-basis:100%;color:var(--muted);font-size:.8rem}

/* The chips and the count on one line, outside the list card so the list starts at a row. */
.cbar{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 10px}
.cbar .chiprow{margin:0}
.cbar-n{margin-left:auto;color:var(--muted);font-size:.86rem;font-variant-numeric:tabular-nums}

/* The two facts that used to be banners. Still said, still linked, at the end. */
.cfoot{margin:10px 2px 0;color:var(--muted);font-size:.82rem}
.cfoot:empty{display:none}
.cfoot a{color:var(--muted);text-decoration:underline}
.cfoot a:hover{color:var(--navy)}

@media (max-width:640px){
  /* A phone: the search box wants the full width and the list becomes two lines a row, with the
     amount on the right of the name rather than in a column that would squash both. */
  .chead{padding:13px 14px}
  .chead-top h1{font-size:1.24rem}
  .chead-top .b{margin-left:0;width:100%;justify-content:center}
  .cfilt-body select,.cfilt-body input[type=date]{flex:1 1 44%;min-width:0}
  .cbar-n{margin-left:0;flex-basis:100%}
  .dirrow,.dirrow-2{grid-template-columns:1fr auto;gap:2px 10px;padding:9px 8px}
  .dirhead{display:none}
  .dir-phone{grid-column:1;font-size:.84rem}
  .dir-amt{grid-column:2;grid-row:1;text-align:right}
}

/* Denser than it was: 100 rows at 9px of padding each was most of a screen of whitespace, and the
   office reads this beside a QuickBooks window. The type size is untouched -- the ask was less
   scrolling, not smaller words -- and the alternating ground keeps a row readable across at the
   tighter spacing. */
.dirrow{display:grid;grid-template-columns:1fr 150px 130px;gap:12px;align-items:baseline;
  padding:6px 8px;border-bottom:1px solid var(--line-2);text-decoration:none;color:inherit}
.dirlist a.dirrow:nth-of-type(even){background:#fafcfd}
.dirrow:last-child{border-bottom:0}
a.dirrow:hover{background:#f8fbfd}
a.dirrow:hover .dir-name{text-decoration:underline}
.dirrow-2{grid-template-columns:1fr 150px}
.dirhead{font-size:.74rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;
  color:var(--muted);border-bottom:1px solid var(--line)}
.dir-name{font-weight:600;color:var(--navy);min-width:0;overflow-wrap:anywhere}
.dir-phone{color:var(--muted);font-size:.87rem;font-variant-numeric:tabular-nums}
.dir-amt{text-align:right;font-variant-numeric:tabular-nums}
.dir-amt.owes{font-weight:700;color:var(--late)}
/* A zero is printed, not blank: "nothing owed" and "we do not know" must not look the same. */
.dir-amt.zero{color:var(--muted)}
.pager{display:flex;gap:14px;align-items:center;justify-content:center;margin-top:14px;
  flex-wrap:wrap}

/* ── a customer's transactions: one list, every type ──────────────────── */
/* A grid so the amounts line up down the page the way they do on a statement. */
.txlist{display:flex;flex-direction:column}
.txrow{display:grid;grid-template-columns:110px 112px 110px 1fr 100px 100px;gap:10px;
  align-items:baseline;padding:9px 0;border-bottom:1px solid var(--line-2)}
.txrow:last-child{border-bottom:0}
.txhead{font-size:.74rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em;
  color:var(--muted);border-bottom:1px solid var(--line)}
.tx-date{color:var(--navy);font-weight:600;white-space:nowrap}
.tx-num{font-variant-numeric:tabular-nums;font-weight:600}
.tx-what{color:var(--muted);font-size:.87rem;min-width:0;overflow-wrap:anywhere}
.tx-amt,.tx-bal{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
/* A payment or a credit reduces what is owed, so it reads as the opposite of an invoice. */
.tx-amt.credit{color:var(--ok)}
.tx-bal .owed{color:var(--late)}
@media (max-width:820px){
  .txrow{grid-template-columns:96px 1fr 100px;row-gap:2px}
  .tx-kind{grid-column:2}
  .tx-what,.tx-bal{display:none}
}
@media (max-width:620px){
  .dirrow{grid-template-columns:1fr 110px}
  .dir-phone{display:none}
}
.when{font-weight:700;font-variant-numeric:tabular-nums;color:var(--navy);white-space:nowrap}
.empty{color:var(--muted);padding:20px 0;text-align:center;font-size:.92rem}
.empty-ok{color:var(--ok)}

/* ── pills ───────────────────────────────────────────────────────────── */
.pill{display:inline-block;font-size:.74rem;font-weight:700;padding:3px 10px;border-radius:99px;
  white-space:nowrap;line-height:1.45}
.p-ok{background:var(--ok-bg);color:var(--ok)}
.p-info{background:var(--info-bg);color:var(--info)}
.p-live{background:var(--live-bg);color:var(--live)}
.p-warn{background:var(--warn-bg);color:var(--warn)}
.p-late{background:var(--late-bg);color:var(--late)}
.p-off{background:var(--off-bg);color:var(--off)}
/* Calendar-sourced history: deliberately not one of the status tones, because it is not a status. */
.p-cal{background:#eef2f7;color:#5b6b7c;border:1px dashed #c3d0dd}
.dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:6px;vertical-align:1px}

/* ── buttons: one primary per view, everything else quieter ───────────── */
.b{display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:44px;padding:11px 18px;border-radius:var(--r-ctl);border:1px solid var(--line);
  background:var(--surface);color:var(--ink);font:600 .94rem/1 var(--font);cursor:pointer;
  text-decoration:none;white-space:nowrap}
.b:hover{border-color:#b9c7d2;background:var(--surface-2)}
.b:focus-visible{outline:3px solid #9fc4e4;outline-offset:2px}
.b-primary{background:var(--orange);border-color:var(--orange);color:#fff}
.b-primary:hover{background:var(--orange-d);border-color:var(--orange-d)}
.b-go{background:var(--ok);border-color:var(--ok);color:#fff}
.b-go:hover{background:#12562f;border-color:#12562f}
.b-quiet{border-color:transparent;background:transparent;color:var(--info);padding:11px 12px}
/* Voiding money. Outlined rather than filled: it should read as a deliberate act and never sit on
   a page looking like the obvious thing to press. */
/* A CONTROL THAT IS THERE AND IS NOT ON. Texting has no sender behind it -- 183 messages have been
   queued since 30 September and not one has left the building -- so "Send text" must not look like
   a press that does something. Greyed and not pressable, with the reason on it, rather than removed:
   the office asked for texting and will have it, and a control that vanishes reads as a feature that
   was taken away. aria-disabled, not the disabled attribute, so it still reads as a control to a
   screen reader and so nothing about the markup of forms that carry a name changes. */
.b.b-off,.b.b-off:hover{opacity:.5;filter:grayscale(1);pointer-events:none;cursor:not-allowed;
  background:transparent;border-color:var(--line);color:var(--muted,#6b7280)}
.b-danger{background:#fff;border-color:var(--late);color:var(--late)}
.b-danger:hover{background:var(--late);border-color:var(--late);color:#fff}
.b-quiet:hover{background:var(--info-bg);border-color:transparent}
.b-sm{min-height:36px;padding:8px 13px;font-size:.87rem}
.b-lg{min-height:52px;padding:14px 24px;font-size:1rem}
.b-block{width:100%}
.actions{display:flex;flex-wrap:wrap;gap:9px}
.actions-sep{margin-left:auto}

/* ── forms ───────────────────────────────────────────────────────────── */
label{display:block;font-weight:600;font-size:.86rem;color:var(--ink-2);margin:0 0 5px}
input,select,textarea{width:100%;padding:11px 13px;border:1px solid var(--line);
  border-radius:var(--r-ctl);font:400 1rem/1.4 var(--font);background:var(--surface);color:var(--ink)}
input:focus,select:focus,textarea:focus{outline:3px solid #9fc4e4;outline-offset:1px;border-color:#7fb0d8}
.fields{display:grid;gap:15px;grid-template-columns:1fr}
@media(min-width:680px){.fields.two{grid-template-columns:1fr 1fr}}
.fields .wide{grid-column:1/-1}
.hint{font-size:.82rem;color:var(--muted);margin-top:5px}
/* Finished today, by name: a short read of what happened, never a worklist. */
.fin{margin-top:14px;padding-top:12px;border-top:1px solid var(--line)}
.fin-h{margin:0 0 6px;font-size:.84rem;color:var(--muted)}
.fin-t{margin:0 0 8px;font-size:.88rem}
.fin-t ul{margin:3px 0 0;padding:0 0 0 15px}
.fin-t li{margin:0 0 2px;line-height:1.45}
.fin-why{color:var(--muted);font-size:.82rem;margin-left:6px}
.fin-todo .fin-why{color:#8a4b00}
.fin-no,.fin-flag{font-size:.76rem;margin-left:6px;padding:0 5px;border-radius:3px;
  background:#fdf0e3;color:#8a4b00}
/* The nearby-technician suggestion on the booking form: facts, read quickly, never a control. */
.bk-near{margin:0;padding:0 0 0 16px;font-size:12.5px;color:#444;line-height:1.5}
.bk-near li{margin:0 0 2px}
form.inline{display:inline}

/* ── notices ─────────────────────────────────────────────────────────── */
.note{border-radius:var(--r-ctl);padding:13px 16px;margin:0 0 16px;font-size:.93rem;
  border:1px solid transparent}
.note-ok{background:var(--ok-bg);border-color:#a9d6b9;color:#10542f}
.note-warn{background:var(--warn-bg);border-color:#e0b878;color:#7c4900}
.note-info{background:var(--info-bg);border-color:#a8c8e0;color:#124f74}

/* ── the hero search on Home ─────────────────────────────────────────── */
.hero{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-card);
  padding:26px 24px 24px;box-shadow:var(--sh);margin-bottom:20px}
.hero h1{font-size:1.5rem;margin-bottom:6px}
.hero .ko-ta input[data-ko-input]{font-size:1.18rem;padding:16px 18px;border-radius:11px;
  border:2px solid var(--line)}
.hero .ko-ta input[data-ko-input]:focus{border-color:var(--orange)}
@media(min-width:760px){.hero .ko-ta{max-width:640px}}

/* ── counters, kept deliberately small and low ────────────────────────── */
.mini{display:flex;flex-wrap:wrap;gap:10px}
.mini div{background:var(--surface-2);border:1px solid var(--line-2);border-radius:10px;
  padding:9px 14px;min-width:96px}
.mini b{display:block;font-size:1.2rem;line-height:1.15;color:var(--navy);
  font-variant-numeric:tabular-nums}
.mini span{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;color:var(--muted)}

/* A checkbox the office has to tick on purpose: full-width target, never a 13px box in a margin. */
label.chk{display:flex;align-items:flex-start;gap:9px;font-size:.92rem;line-height:1.4;
  background:var(--surface-2);border:1px solid var(--line-2);border-radius:9px;padding:11px 13px;
  cursor:pointer}
label.chk input{width:18px;height:18px;flex:none;margin-top:1px;cursor:pointer}

/* The row somebody arrived here to deal with, marked so it is findable at a glance rather than
   merely sitting first. */
.focus-row{background:#fdf6ee;border-left:3px solid var(--orange);padding-left:11px!important;
  border-radius:8px}

/* A field shown but not editable, because something upstream owns it. Deliberately NOT styled as a
   disabled input: a greyed-out box invites clicking and then does nothing. */
.ro{padding:9px 11px;background:var(--surface-2);border:1px solid var(--line-2);border-radius:8px;
  font-size:.95rem;color:var(--ink);min-height:20px}
textarea{width:100%;font:inherit;padding:9px 11px;border:1px solid var(--line);border-radius:8px;
  background:#fff;color:var(--ink);resize:vertical}
textarea:focus{outline:2px solid var(--orange);outline-offset:1px;border-color:var(--navy)}

/* ── one invoice ──────────────────────────────────────────────────────────
   The amount leads, because "how much is still owed" is the question somebody has when they open an
   invoice. The totals block right-aligns on tabular numerals so the column reads as a column. */
.inv-head{display:flex;gap:24px;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;
  margin:0 0 20px}
.inv-amt{text-align:right;flex:none}
.inv-amt b{display:block;font-size:1.9rem;line-height:1.1;color:var(--navy);letter-spacing:-.02em;
  font-variant-numeric:tabular-nums;margin:5px 0 2px}
table.tbl tfoot td{border-bottom:0;padding-top:8px;color:var(--muted)}
table.tbl tfoot .inv-total td{border-top:2px solid var(--navy);color:var(--navy);font-weight:700;
  font-size:1rem}
table.tbl td .sub{font-size:.84rem;color:var(--muted);margin-top:2px}
@media (max-width:560px){ .inv-amt{text-align:left} }

/* ── permissions ──────────────────────────────────────────────────────────
   One row per permission with three states as segmented buttons rather than a checkbox, because
   "the role gives this and this person must not have it" is a thing an owner needs to say and a
   checkbox cannot express it. The row tints when the permission is effective, so the page can be
   read down the left edge to see what somebody actually has. */
.capr-list{display:flex;flex-direction:column;gap:3px}
.capr{display:flex;gap:16px;justify-content:space-between;align-items:center;flex-wrap:wrap;
  padding:10px 11px;border-radius:9px;border:1px solid transparent}
.capr-on{background:var(--surface-2);border-color:var(--line-2)}
.capr-main{flex:1;min-width:200px}
.capr-label{font-weight:600;font-size:.96rem;color:var(--navy)}
.capr-detail{font-size:.83rem;color:var(--muted);margin-top:2px;max-width:62ch}
.capr-warn{font-size:.83rem;color:var(--orange-d);margin-top:3px}
.capr-ctl{display:flex;gap:4px;flex:none;background:var(--surface-2);border:1px solid var(--line-2);
  border-radius:8px;padding:3px}
.capr-on .capr-ctl{background:#fff}
.capr-opt{display:flex;align-items:center;cursor:pointer;border-radius:6px;padding:5px 10px;
  font-size:.78rem;color:var(--muted);white-space:nowrap;line-height:1.2}
.capr-opt input{position:absolute;opacity:0;pointer-events:none}
.capr-opt:hover{color:var(--ink)}
.capr-opt.on{background:var(--navy);color:#fff;font-weight:600}
.capr-opt.on b{color:#fff}
.capr-opt b{font-weight:700;color:var(--ink)}
.capr-opt:focus-within{outline:2px solid var(--orange);outline-offset:1px}
@media (max-width:620px){
  .capr{gap:9px}
  .capr-ctl{width:100%}
  .capr-opt{flex:1;justify-content:center}
}

/* A person's effective access, summarised in prose rather than a wall of ticks. */
.capsum{display:flex;flex-direction:column;gap:7px}
.capsum-g{font-size:.9rem;line-height:1.45}
.capsum-g b{color:var(--navy);display:inline-block;min-width:108px}

/* ── the office worklist ──────────────────────────────────────────────────
   One row shape for every kind of exception, because the page used to carry six different ones and
   the office had to know which panel meant what. Three columns: who and why on the left, the age in
   the middle of that block where the eye lands, the single action on the right. The action column is
   fixed-width so every button in a list lines up and the page can be scanned down rather than read. */
.day-head{display:flex;gap:20px;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;
  margin:0 0 20px}
.day-head h1{margin:0 0 2px}
.day-find{flex:0 1 420px;min-width:260px}

.tr-list{display:flex;flex-direction:column}
.tr{display:grid;grid-template-columns:72px 1fr 150px auto;gap:12px;align-items:center;
  padding:9px 2px;border-bottom:1px solid var(--line-2)}
.tr:last-child{border-bottom:0}
.tr-when{font-weight:700;font-variant-numeric:tabular-nums;color:var(--navy);font-size:.9rem}
.tr-who{font-weight:600;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tr-tech{font-size:.86rem;color:var(--muted);min-width:0;overflow:hidden;text-overflow:ellipsis;
  white-space:nowrap}
@media (max-width:700px){
  .tr{grid-template-columns:64px 1fr auto;row-gap:2px}
  .tr-tech{grid-column:2;font-size:.8rem}
}

.wl-list{display:flex;flex-direction:column;gap:2px}
.wl{display:flex;gap:14px;justify-content:space-between;align-items:flex-start;
  padding:11px 2px;border-bottom:1px solid var(--line-2)}
.wl:last-child{border-bottom:0}
.wl-main{min-width:0;flex:1}
.wl-top{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.wl-who{font-weight:650;color:var(--navy);text-decoration:none;font-size:1rem}
a.wl-who:hover{text-decoration:underline}
.wl-age{font-size:.72rem;font-variant-numeric:tabular-nums;color:var(--muted);
  background:var(--surface-2);border-radius:999px;padding:2px 8px;white-space:nowrap}
.wl-age.wl-old{background:#fdf3ef;color:var(--orange-d);font-weight:600}
.wl-what{font-size:.92rem;color:var(--ink);margin-top:2px}
.wl-why{font-size:.86rem;color:var(--muted);margin-top:3px;max-width:72ch}
.wl-act{display:flex;flex-direction:column;gap:5px;align-items:stretch;flex:none;min-width:148px}
.wl-act .b{width:100%;text-align:center}
.wl-act form.inline{display:block}
@media (max-width:640px){
  .wl{flex-direction:column;gap:9px}
  .wl-act{flex-direction:row;min-width:0;width:100%}
  .wl-act .b{width:auto;flex:1}
}
/* A left edge per group, so the three bands are distinguishable while scrolling without each
   needing its own colour scheme. */
.wl-g{border-left:3px solid var(--line)}
.wl-now{border-left-color:var(--orange)}
.wl-money{border-left-color:#b8761c}
.wl-book{border-left-color:var(--navy)}

/* ── the money: aged balances ─────────────────────────────────────────────
   A bar per band rather than a pie or a stacked total: the question is "how much is in this band",
   and bands are read down a column, so they get rows. Widths are proportional to the biggest band,
   not to the total, because this book's problem is one band dwarfing the rest and a total-relative
   scale would flatten all six into near-nothing. */
.money-head{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:12px;
  margin:0 0 20px}
.mh-big{background:var(--surface-2);border:1px solid var(--line-2);border-radius:11px;padding:15px 17px}
.mh-big b{display:block;font-size:1.9rem;line-height:1.1;color:var(--navy);letter-spacing:-.02em;
  font-variant-numeric:tabular-nums;margin:3px 0 4px}
.mh-warn{background:#fdf3ef;border-color:#f2cdbf}
.mh-warn b{color:var(--orange-d)}

.agtable{display:flex;flex-direction:column;gap:3px}
.agr{display:grid;grid-template-columns:110px 1fr 92px 64px;gap:12px;align-items:center;
  padding:8px 10px;border-radius:8px;text-decoration:none;color:inherit}
a.agr:hover{background:var(--surface-2)}
.agr-head{font-size:.67rem;text-transform:uppercase;letter-spacing:.09em;color:var(--muted);
  font-weight:700;padding-bottom:2px}
.agr-l{font-size:.92rem;font-weight:600;color:var(--navy)}
.agr-bar{height:20px;background:var(--surface-2);border-radius:4px;overflow:hidden}
.agr-fill{display:block;height:100%;border-radius:4px;background:var(--navy)}
.agr-fill.t-ok{background:#1b6349}
.agr-fill.t-off{background:#4e6d84}
.agr-fill.t-warn{background:#b8761c}
.agr-fill.t-dead{background:var(--orange-d)}
.agr-n{text-align:right;font-variant-numeric:tabular-nums;font-weight:700;color:var(--navy);
  font-size:.95rem}
.agr-c{text-align:right;font-variant-numeric:tabular-nums;color:var(--muted);font-size:.86rem}
@media (max-width:620px){
  .agr{grid-template-columns:1fr 84px 52px;row-gap:4px}
  .agr-bar{grid-column:1/span 3;order:3;height:14px}
}

.money-cols{display:grid;grid-template-columns:1fr 1fr;gap:14px}
@media (max-width:860px){ .money-cols{grid-template-columns:1fr} }

.agtabs{display:flex;flex-wrap:wrap;gap:5px;margin:0 0 16px}
.agtab{font-size:.85rem;padding:6px 11px;border-radius:999px;text-decoration:none;
  background:var(--surface-2);border:1px solid var(--line-2);color:var(--ink)}
.agtab:hover{border-color:var(--navy)}
.agtab.on{background:var(--navy);border-color:var(--navy);color:#fff}
.agtab.on .dim{color:#c6d4de}

.agc-list{display:flex;flex-direction:column;gap:8px}
.agc{display:flex;gap:14px;justify-content:space-between;align-items:flex-start;background:#fff;
  border:1px solid var(--line);border-radius:11px;padding:13px 15px}
.agc-main{min-width:0;flex:1}
.agc-inv{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}
.agc-pill{font-size:.78rem;background:var(--surface-2);border:1px solid var(--line-2);
  border-radius:6px;padding:3px 7px;white-space:nowrap;font-variant-numeric:tabular-nums}
.agc-side{text-align:right;white-space:nowrap}
.agc-side b{display:block;font-size:1.15rem;color:var(--navy);font-variant-numeric:tabular-nums}

/* Applying a payment to invoices: invoice, what is outstanding, how much of this payment goes to it. */
.alloc{display:flex;flex-direction:column;gap:7px}
.alloc-row{display:grid;grid-template-columns:1fr auto 120px auto;gap:12px;align-items:center;
  background:var(--surface-2);border:1px solid var(--line-2);border-radius:9px;padding:9px 12px}
.alloc-row input[name^="alloc_amt_"]{width:100%;text-align:right;font-variant-numeric:tabular-nums}
/* Leaving one invoice out of a payment: a customer settles everything owed except the job nobody
   has done yet. Quiet, because it is the exception; legible, because getting it wrong moves money
   to the wrong bill. */
.alloc-skip{display:flex;align-items:center;gap:6px;white-space:nowrap;cursor:pointer;
  font-size:.78rem;color:var(--muted)}
.alloc-skip input{width:auto;margin:0}
.alloc-left-out{opacity:.6}
.alloc-left-out input[name^="alloc_amt_"]{background:var(--line-2)}
@media (max-width:620px){
  .alloc-row{grid-template-columns:1fr 110px;row-gap:5px}
  .alloc-row>div:nth-child(2){grid-column:1;text-align:left}
  .alloc-row>div:nth-child(3){grid-column:2;grid-row:1/span 2}
  .alloc-row>.alloc-skip{grid-column:1/-1}
}

/* ── plain tables, only where a table is genuinely right ──────────────── */
.tbl-wrap{overflow-x:auto;margin:0 -4px}
table.tbl{width:100%;border-collapse:collapse;font-size:.92rem}
table.tbl th{text-align:left;font-size:.74rem;text-transform:uppercase;letter-spacing:.06em;
  color:var(--muted);font-weight:700;padding:9px 12px;border-bottom:1px solid var(--line)}
table.tbl td{padding:12px;border-bottom:1px solid var(--line-2);vertical-align:top}
table.tbl tr:last-child td{border-bottom:0}
table.tbl tr:hover td{background:#f8fbfd}
.num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}

/* ── the schedule, drawn as a calendar ───────────────────────────────────
   One knob runs the whole grid: --ph, pixels per hour. Blocks are positioned in calc() against
   it, so changing it at a breakpoint rescales everything in step and nothing has to be measured
   in JavaScript. Colour is by technician; weight is by source — a portal job is solid, an entry
   from Google is quieter, because the office is looking for its own work first. */
.sched-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap}
.sched-head h1{margin:0 0 2px}
.sched-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:14px 0 14px}
.sched-bar .seg{display:flex;align-items:center;gap:6px}
.sched-bar .seg.wrap{flex-wrap:wrap}
.sched-bar .seg.push{margin-left:auto}
.akind{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:10px 0 0}
.akind-is{font-weight:600}
.akind-why{flex:1;min-width:160px}
.sched-find input[type=search]{margin:0;min-width:190px;padding:5px 9px;font-size:.86rem}
@media(max-width:640px){.sched-find{width:100%}.sched-find input[type=search]{flex:1;min-width:0}}
@media(max-width:640px){.sched-bar .seg.push{margin-left:0}}
/* ── who is working, on request ───────────────────────────────────────────
   This was a full-width blue notice above the calendar, repeating the same sentence every Sunday
   and pushing the day's work down the screen. It is a control in the bar now, and it answers both
   halves -- who is working and who is not -- which the notice never did. */
.availpop{position:relative}
.availpop>summary{list-style:none;cursor:pointer;font-size:.82rem;font-weight:600;color:var(--ink-2);
  background:var(--card);border:1px solid var(--line);border-radius:8px;padding:6px 11px;
  white-space:nowrap;user-select:none}
.availpop>summary::-webkit-details-marker{display:none}
.availpop>summary:hover{border-color:var(--muted);color:var(--ink)}
.availpop[open]>summary{border-color:var(--navy);color:var(--ink)}
.avail-badge{display:inline-block;margin-left:5px;background:var(--warn-bg);
  color:var(--warn);border-radius:999px;padding:1px 7px;font-size:.72rem;font-weight:700}
.availpop-p{position:absolute;top:calc(100% + 6px);left:0;z-index:25;min-width:262px;
  background:var(--card);border:1px solid var(--line);border-radius:11px;padding:12px 14px;
  box-shadow:0 14px 34px rgba(11,34,52,.18)}
.avail-h{margin:0 0 8px;font-weight:700;font-size:.9rem;color:var(--ink)}
.avail-s{margin:10px 0 4px;font-size:.72rem;letter-spacing:.06em;text-transform:uppercase;
  color:var(--muted);font-weight:700}
.avail-s:first-of-type{margin-top:0}
.avail-row{display:flex;justify-content:space-between;gap:14px;padding:3px 0;font-size:.86rem}
.avail-row.is-off .avail-n{color:var(--muted);text-decoration:line-through}
.avail-n{color:var(--ink)}
.avail-r{color:var(--ink-2);white-space:nowrap}
.avail-f{margin:10px 0 0;font-size:.76rem;color:var(--muted);line-height:1.4}
@media(max-width:640px){.availpop-p{left:auto;right:0}}

.dot{width:9px;height:9px;border-radius:50%;display:inline-block;margin-right:2px}

.cal{--ph:58px;background:var(--surface);border:1px solid var(--line);border-radius:12px;
  overflow:hidden}
@media(max-width:1100px){.cal{--ph:50px}}

/* all-day strip */
.cal-allday{display:flex;align-items:stretch;border-bottom:1px solid var(--line);
  background:var(--surface-2);min-height:40px}
.cal-allday-label{width:64px;flex:none;font-size:.7rem;font-weight:700;text-transform:uppercase;
  letter-spacing:.05em;color:var(--muted);padding:12px 8px;text-align:right;
  border-right:1px solid var(--line)}
.cal-allday-lane{flex:1;display:flex;flex-wrap:wrap;gap:5px;padding:8px 10px;align-content:center}
.cal-allday-week{flex:1;display:grid}
.cal-allday-cell{padding:7px 6px;border-right:1px solid var(--line-2);display:flex;
  flex-direction:column;gap:4px;min-width:0}
.cal-allday-cell:last-child{border-right:0}
.cal-allday-cell.is-today{background:#fff7f4}
.ad{display:block;font-size:.76rem;font-weight:600;padding:3px 8px;border-radius:5px;
  background:var(--navy);color:#fff;text-decoration:none;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis;max-width:100%}
.ad-cal{background:var(--tcbg,#e7edf2);color:var(--tcfg,var(--ink-2));
  border:1px solid color-mix(in srgb, var(--tcbg,#e7edf2) 75%, #1a1a1a)}

/* which colours are on screen, in Google's own words */
.cal-key{display:flex;flex-wrap:wrap;gap:6px 16px;align-items:center;padding:9px 14px;
  border-bottom:1px solid var(--line);background:var(--surface-2);font-size:.78rem;
  color:var(--muted)}
.cal-key b{font-weight:700;color:var(--ink-2)}
.cal-key span{display:inline-flex;align-items:center;gap:6px}
.cal-key i{width:11px;height:11px;border-radius:3px;display:inline-block;
  border:1px solid rgba(0,0,0,.18)}

/* column heads (week) */
.cal-heads{display:flex;border-bottom:1px solid var(--line);background:var(--surface)}
.cal-heads-pad{width:64px;flex:none;border-right:1px solid var(--line)}
/* No column count of its own. The day headers, the all-day chips and the grid below them must
   share one, or the headers sit over the wrong columns -- which is exactly what happened when the
   week became Monday-Friday and this rule stayed at seven. The cols-N class supplies it to all
   three, so there is one number to change and nothing to keep in step by hand. */
.cal-heads-row{flex:1;display:grid}
.cal-dayhead{display:flex;align-items:baseline;justify-content:center;gap:6px;padding:10px 4px;
  text-decoration:none;color:var(--ink-2);border-right:1px solid var(--line-2);position:relative}
.cal-dayhead:last-child{border-right:0}
.dh-dow{font-size:.72rem;text-transform:uppercase;letter-spacing:.06em;font-weight:700}
.dh-num{font-size:1.15rem;font-weight:700;color:var(--navy);font-variant-numeric:tabular-nums}
.dh-count{font-size:.66rem;font-weight:700;background:#e7edf2;color:var(--ink-2);
  border-radius:20px;padding:1px 6px}
.cal-dayhead.is-today .dh-num{background:var(--orange);color:#fff;border-radius:50%;
  width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;font-size:.95rem}
.cal-dayhead.is-today .dh-dow{color:var(--orange)}
.cal-dayhead.is-selected::after{content:'';position:absolute;left:0;right:0;bottom:-1px;height:3px;
  background:var(--navy)}

/* the scrolling grid */
.cal-scroll{max-height:min(68vh,760px);overflow-y:auto;overscroll-behavior:contain}
.cal-body{display:flex;align-items:stretch}
.cal-axis{width:64px;flex:none;border-right:1px solid var(--line);background:var(--surface)}
.cal-h{height:var(--ph);position:relative}
.cal-h span{position:absolute;top:-8px;right:8px;font-size:.72rem;color:var(--muted);
  font-variant-numeric:tabular-nums;background:var(--surface);padding:0 2px}
.cal-h:first-child span{top:2px}
.cal-cols{flex:1;display:grid;min-width:0}
.cols-1{grid-template-columns:1fr}
/* Five, because the week grid is Monday to Friday — see WEEK_DAYS in calendar-view.mjs. Seven is
   kept so an older bookmark or a future seven-day view still lays out rather than collapsing. */
.cols-5{grid-template-columns:repeat(5,1fr)}
.cols-6{grid-template-columns:repeat(6,1fr)}
.cols-7{grid-template-columns:repeat(7,1fr)}
.cal-col{position:relative;border-right:1px solid var(--line-2);min-width:0}
.cal-col:last-child{border-right:0}
.cal-col.is-today{background:#fffaf8}
.cal-canvas{position:relative}
.cal-lines{position:absolute;inset:0}
.cal-line{height:var(--ph);border-bottom:1px solid var(--line-2)}
.cal-line:nth-child(odd){background:linear-gradient(to bottom,transparent 50%,rgba(220,228,234,.35) 50%,rgba(220,228,234,.35) 50.5%,transparent 50.5%)}
.cal-events{position:absolute;inset:0}

/* now */
.cal-now{position:absolute;left:0;right:0;height:0;border-top:2px solid #d92e1f;z-index:5;
  pointer-events:none}
.cal-now-dot{position:absolute;left:-1px;top:-5px;width:9px;height:9px;border-radius:50%;
  background:#d92e1f}

/* an appointment */
/*
 * THE TYPE IS SET SO THAT MORE OF THE APPOINTMENT FITS IN THE SAME BLOCK.
 *
 * The block's height is fixed by the appointment -- 58 pixels to the hour -- so the only way to
 * show the address and whose it is, is to spend fewer pixels per line. Down about 12% from .8rem,
 * with the padding and the leading tightened to match: at these sizes a three-quarter-hour block
 * holds the time, the name and the address, and an hour and a half holds the service and a wrapped
 * name as well. See LINES in schedule-ui.mjs, which is the same arithmetic from the other side.
 *
 * Nothing here touches colour. --tc, --tcbg and --tcfg arrive from the office's own palette and
 * every rule that paints a block is further down, unchanged.
 */
.ev{position:absolute;border-radius:7px;padding:3px 6px;overflow:hidden;text-decoration:none;
  border-left:3px solid var(--tc,#6b7a87);background:var(--tcbg,#eef4fa);color:var(--ink);
  box-shadow:0 1px 2px rgba(11,34,52,.10);font-size:.7rem;line-height:1.2;
  transition:box-shadow .12s ease,transform .12s ease}
.ev:hover{box-shadow:0 5px 16px rgba(11,34,52,.20);z-index:6}
.ev:focus-visible{outline:3px solid #9fc4e4;outline-offset:1px;z-index:6}
.ev-in{display:flex;flex-direction:column;gap:0;min-width:0}
.ev-t{font-size:.62rem;font-weight:700;opacity:.8;font-variant-numeric:tabular-nums;white-space:nowrap}
.ev-n{font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  display:flex;align-items:baseline;gap:5px;min-width:0}
/*
 * THE AREA CODE, WHICH MUST NOT BE THE THING THAT GETS CUT.
 *
 * Marilyn plans the route by ZIP and reads it off the block without opening it. flex:none so a
 * narrow column shortens the customer's name instead; tabular figures so a column of them lines
 * up down the day; and a touch of its own weight so it reads as a label rather than as part of
 * the name.
 */
.ev-z{flex:none;font-variant-numeric:tabular-nums;letter-spacing:.01em;opacity:.95;
  font-size:.72rem}
/*
 * An ageing row whose money has already come in. Not green: the invoice IS still open in the
 * accounts, and this is a caution against chasing it, not a claim that it is settled.
 */
.agc-pill.agc-paid{border-color:#6a9ec0;background:rgba(106,158,192,.12)}
/* What the office wrote for whoever goes out. Set apart so it reads as somebody's words. */
.wo-notes{margin:4px 0 0;padding:8px 10px;border-left:3px solid var(--line,#ccc);
  background:var(--soft,#f6f6f4);white-space:pre-wrap;font-size:.95rem;line-height:1.5}
.ev-nn{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/*
 * A NAME TOO LONG FOR THE WIDTH WRAPS, in a block tall enough to hold the second line.
 *
 * "WRH-Woodlake Park Apartments" is cut at "WRH-Woodlake Park…" in a week column, and the word
 * that tells the office which property it is, is the one that goes. Two lines at most: the clamp
 * is what stops a four-word name pushing the address and the technician out of a block that was
 * showing them.
 */
.ev-wrap .ev-n{white-space:normal}
.ev-wrap .ev-nn{white-space:normal;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;
  -webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.ag-m .ev-z{opacity:1;font-weight:700}
/*
 * Small screens: the ZIP keeps its size while everything else gives way -- Marilyn plans the route
 * from it and reads it off the block without opening anything. The rest of the block is a notch
 * smaller again, because a phone column is narrower than anything on the desk.
 */
@media (max-width:620px){
  .ev-z{font-size:.76rem}
  .ev{padding:3px 5px;font-size:.68rem}
  .ev-m,.ev-w,.ev-s{font-size:.62rem}
  /* On a phone the third and fourth lines are clipped more often than read. */
  .ev-s{display:none}
}
.ev-m,.ev-w,.ev-s{font-size:.64rem;opacity:.78;white-space:nowrap;overflow:hidden;
  text-overflow:ellipsis}
.ev-w{font-weight:600;opacity:.85}
/* The service itself, last in and first out: the name and the address are what identify the stop. */
.ev-s{opacity:.7}
.ev-short{padding:2px 6px;display:flex;align-items:center}
.ev-short .ev-in{flex-direction:row;align-items:baseline;gap:6px;width:100%}
.ev-short .ev-t{flex:none}
.ev-short .ev-n{font-weight:600;min-width:0}
/* A short block never wraps: half a second line is worse than an ellipsis. */
.ev-short .ev-nn{white-space:nowrap}
.ev-mid{padding-top:2px}
.ev-dot{position:absolute;top:5px;right:5px;width:7px;height:7px;border-radius:50%;
  background:var(--late);box-shadow:0 0 0 2px #fff}

/* Colour is the office's own colour language. A Google entry is painted in the colour it already
   has on the office's calendar, and a portal visit in the colour Google would give its technician
   -- one palette, resolved through the map the office filled in. --tcbg and --tcfg arrive inline
   from Google's own palette, and every rail is derived from that same colour, so there is no
   lookup table here to fall out of date. */
.ev-cal{background:var(--tcbg,#e1e1e1);color:var(--tcfg,#1d1d1d);
  border-left:3px solid color-mix(in srgb, var(--tcbg,#e1e1e1) 70%, #1a1a1a);
  box-shadow:0 1px 2px rgba(11,34,52,.10)}
.ev-cal .ev-n{font-weight:700}
.ev-cal .ev-t,.ev-cal .ev-m{opacity:.72}
/* an entry with no colour of its own, wearing the calendar's: same colour, quieter edge */
.ev-inherited{border-left-style:solid;border-left-color:color-mix(in srgb, var(--tcbg,#9fc6e7) 80%, #1a1a1a)}

/* a portal job whose technician nobody has mapped: no colour to wear, so it wears none */
.ev-visit{--tc:var(--navy);--tcbg:#fff;background:#fff;border:1px solid var(--line);
  border-left:3px solid var(--navy);color:var(--ink)}
/* and one whose technician IS mapped, in that person's colour.

   The NAVY RAIL STAYS. Hue says who is going; the rail and the badge say which side of the
   migration the block lives on, and those two facts must not share a channel -- an office that
   reads "yellow means Jordan" must not also have to read "yellow means Google". */
.ev-tinted{background:var(--tcbg);color:var(--tcfg,#1d1d1d);
  border:1px solid color-mix(in srgb, var(--tcbg) 70%, #1a1a1a);
  border-left:3px solid var(--navy)}
.ev-tinted .ev-n{font-weight:700}
.ev-tinted .ev-t,.ev-tinted .ev-m{opacity:.75}
.ev-done{opacity:.72}
.ev-done .ev-n{text-decoration:none}
.ev-missed{--tc:var(--late);--tcbg:#fdeae6}
.ev-off{opacity:.5}
.ev-off .ev-n{text-decoration:line-through}
.ev-flag{box-shadow:0 0 0 1.5px var(--late),0 1px 2px rgba(11,34,52,.10)}

/* A card that folds. The summary is the heading row, so it reads as a card head that can be
   pressed -- the marker sits on the right where a disclosure belongs rather than in front of the
   title. */
.fold{margin:0}
.fold-sum{display:flex;align-items:center;gap:10px;cursor:pointer;list-style:none;
  padding:0;margin:0}
.fold-sum::-webkit-details-marker{display:none}
.fold-sum::after{content:'';margin-left:auto;width:8px;height:8px;flex:none;
  border-right:2px solid var(--muted);border-bottom:2px solid var(--muted);
  transform:rotate(45deg);transition:transform .12s ease}
details[open] > .fold-sum::after{transform:rotate(-135deg)}
.fold-sum:hover::after{border-color:var(--navy)}
.fold-h{min-width:0}
.fold-h h2{margin:0}
.fold-n{font-size:.78rem;font-weight:700;background:#eef3f7;color:var(--ink-2);
  border-radius:999px;padding:1px 8px;font-variant-numeric:tabular-nums}
.fold-body{margin-top:12px}
.fold-sum:focus-visible{outline:2px solid var(--navy);outline-offset:3px;border-radius:6px}

/* ── OFFICE | MY DAY ──────────────────────────────────────────────────────
   Two segments, with the one in force filled in. It was a single button carrying the name of the
   OTHER mode, which asks the reader to work out whether "My day" means where they are or where
   they can go -- and now that the mode genuinely narrows what the account may do, "which mode am
   I in" is a question with consequences, so the answer is on the screen rather than inferable.
   Quiet enough not to read as the most important thing in the bar, and big enough to hit on a
   phone. */
.modesw{display:inline-flex;margin:0 10px 0 0;border:1px solid rgba(255,255,255,.3);
  border-radius:999px;padding:2px;background:rgba(255,255,255,.06);flex:0 0 auto}
.modesw button{min-height:30px;padding:4px 11px;border-radius:999px;cursor:pointer;border:0;
  background:transparent;color:#c6d4de;font:650 .8rem/1 var(--font);white-space:nowrap}
.modesw button:hover:not(.on){background:rgba(255,255,255,.14);color:#fff}
.modesw button.on{background:#fff;color:var(--navy);cursor:default}
.modesw button:focus-visible{outline:2px solid #fff;outline-offset:2px}
@media (max-width:700px){.modesw button{min-height:38px;padding:8px 13px;font-size:.82rem}}

/* ── one sent email, shown as the customer received it ────────────────────
   The HTML body goes into a sandboxed iframe rather than into this page: it is our own markup,
   but it is markup assembled around a customer's name and address, and a page that splices stored
   HTML into itself is one bad import away from executing it. */
.emailframe{width:100%;min-height:520px;border:1px solid var(--line);border-radius:10px;
  background:#fff}
.emailtext{white-space:pre-wrap;word-break:break-word;font:400 .86rem/1.55 var(--mono,ui-monospace),
  monospace;background:var(--ground);border:1px solid var(--line);border-radius:10px;
  padding:14px 16px;margin:0;overflow-x:auto}

.cal-empty{text-align:center;color:var(--muted);padding:26px 16px;margin:0}

/* ── the office's search box, and the two identifiers it reports ─────────── */
.jsearch{display:flex;gap:8px;margin:0 0 16px;flex-wrap:wrap}
.jsearch input[type=search]{flex:1;min-width:240px;margin:0}
.ids{display:inline-flex;gap:6px;flex-wrap:wrap;align-items:baseline}
.id-job,.id-inv,.id-none,.id-disc{font-size:.75rem;font-weight:650;padding:1px 8px;border-radius:999px;
  white-space:nowrap}
/* A screen-only letter telling otherwise identical rows apart. Deliberately quiet: it is a reading
   aid, not a name, and it must not look like a reference anybody could quote. */
.id-disc{background:var(--soft);border:1px solid var(--line);color:var(--muted);
  min-width:1.5em;text-align:center;letter-spacing:.02em}
.id-job{background:var(--soft);border:1px solid var(--line);color:var(--ink)}
.id-inv{background:var(--info-bg);border:1px solid #a8c8e0;color:#124f74}
.id-none{background:transparent;border:1px dashed var(--line);color:var(--muted);font-weight:500}

/* ── Open jobs: one row per job, closable on its own ─────────────────────── */
.oj-list{display:flex;flex-direction:column}
.oj{display:grid;grid-template-columns:1fr auto auto;gap:10px 16px;align-items:center;
  padding:13px 0;border-bottom:1px solid var(--line)}
.oj:last-child{border-bottom:0}
.oj-main{min-width:0}
.oj-who{font-weight:640;text-decoration:none;color:inherit}
.oj-who:hover{text-decoration:underline}
.oj-what{font-size:.9rem;margin-top:1px}
.oj-where{font-size:.8rem;color:var(--muted);margin-top:2px}
.oj-meta{font-size:.8rem;margin-top:3px;display:flex;gap:5px;flex-wrap:wrap;align-items:baseline}
.oj-when{font-weight:600}
.oj-side{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.oj-act{display:flex;gap:7px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
/* The booked-visit warning spans the row, under everything, so it cannot be missed or mistaken for
   part of the address. */
.oj-warn{grid-column:1/-1;margin:2px 0 0;font-size:.78rem;color:#7c4900;background:var(--warn-bg);
  border:1px solid #e0b878;border-radius:var(--r-ctl);padding:6px 10px}
@media(max-width:700px){
  .oj{grid-template-columns:1fr;gap:8px}
  .oj-side,.oj-act{justify-content:flex-start}
}

/* ── the rail of jobs you drag onto the day ───────────────────────────────── */
.rail{margin:0 0 14px;padding:12px 14px;border-radius:var(--r-card);background:var(--card);
  border:1px solid var(--line)}
.rail-head{display:flex;align-items:baseline;gap:9px;margin-bottom:9px}
.rail-strip{display:flex;gap:9px;overflow-x:auto;padding-bottom:4px;scrollbar-width:thin}
.chip{display:flex;align-items:center;gap:8px;flex:0 0 auto;max-width:260px;padding:8px 11px;
  border-radius:var(--r-ctl);background:var(--soft);border:1px solid var(--line);
  cursor:grab;user-select:none;text-decoration:none;color:inherit}
.chip:active{cursor:grabbing}
.chip:hover{border-color:var(--brand);background:var(--card)}
.chip.is-dragging{opacity:.4}
.chip-grip{color:var(--muted);font-size:.8rem;letter-spacing:-2px;flex:0 0 auto}
.chip-in{display:flex;flex-direction:column;min-width:0}
.chip-n{font-weight:640;font-size:.88rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chip-m{font-size:.76rem;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chip-p{flex:0 0 auto;font-size:.7rem;font-weight:650;padding:1px 7px;border-radius:999px;
  background:var(--warn-bg);border:1px solid #e0b878;color:#7c4900}
.chip-more{justify-content:center;font-size:.8rem;color:var(--muted);cursor:pointer}
.rail-hint{margin:9px 0 0;font-size:.76rem;color:var(--muted)}
/* An event being dragged off its own slot. */
.ev.is-dragging,[data-ev].is-dragging{opacity:.35}
[data-movable="1"]{cursor:grab}
/* Where the drop would land: same hatched band as the booking screen, so the two screens agree. */
.cal-canvas.is-over::after{content:"";position:absolute;left:0;right:3px;z-index:4;
  pointer-events:none;border:2px dashed var(--brand);border-radius:var(--r-ctl);
  background:repeating-linear-gradient(135deg,rgba(17,110,180,.15) 0 7px,rgba(17,110,180,.05) 7px 14px);
  top:calc(var(--ph) * var(--drop-at, 0));
  height:calc(var(--ph) * var(--drop-len, 1))}

/* ── the placed-but-unsaved visit, and its Save button ────────────────────── */
.pending{margin:0 0 14px;padding:13px 15px;border-radius:var(--r-card);background:var(--card);
  border:2px solid var(--brand);box-shadow:0 2px 10px rgba(11,34,52,.09)}
.pending-in{display:flex;flex-wrap:wrap;gap:14px 18px;align-items:flex-end}
.pending-who{display:flex;flex-direction:column;min-width:150px;flex:1 1 auto}
.pending-when,.pending-tech{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.pending-when input[type=time],.pending-when select,.pending-tech select{margin:0;width:auto}
.pending-go{display:flex;gap:8px;flex:0 0 auto;margin-left:auto}
.pending-note{display:flex;align-items:center;gap:9px;margin:10px 0 0;flex-wrap:wrap}

/* ── booking: the day strip, and the block you are about to add to it ─────── */
/* Shorter than the full Schedule page: this is context under a form, not the page itself. */
.cal-strip .cal-scroll{max-height:clamp(260px,42vh,420px)}
.cal-strip{margin:0}
/* The proposed slot, drawn over the day so "is it free?" is answered by looking. Hatched and
   outlined rather than solid, so it never reads as something already booked. */
.cal-proposal{position:absolute;left:0;right:3px;z-index:3;pointer-events:none;
  border:2px dashed var(--brand);border-radius:var(--r-ctl);
  background:repeating-linear-gradient(135deg,rgba(17,110,180,.13) 0 7px,rgba(17,110,180,.04) 7px 14px);
  display:flex;align-items:flex-start;justify-content:flex-end}
.cal-proposal span{font-size:.72rem;font-weight:650;color:var(--brand);background:var(--card);
  border:1px solid var(--brand);border-radius:999px;padding:1px 8px;margin:4px 6px 0 0;white-space:nowrap}
/* The computed finish time. Stated, not editable — the point is that nobody types it. */
.bk-calc{display:flex;align-items:baseline;gap:9px;padding:12px 15px;border-radius:var(--r-ctl);
  background:var(--soft);border:1px solid var(--line)}
.bk-calc b{font-size:1.16rem}
.bk-day .fields{margin:0}
/* The new-service-address panel on New Job: hidden until the office asks for it. */
.addr-new{display:none;grid-column:1/-1;margin-top:4px;padding:15px;border-radius:var(--r-ctl);
  background:var(--soft);border:1px solid var(--line)}
.addr-new.is-open{display:block}
.addr-new .fields{margin:0}

/* the compact panel */
.ev-dlg{border:0;border-radius:14px;padding:24px 26px 20px;max-width:440px;width:calc(100% - 32px);
  box-shadow:0 24px 70px rgba(11,34,52,.35);color:var(--ink);background:var(--surface)}
.ev-dlg::backdrop{background:rgba(11,34,52,.42)}
.ev-dlg h2{margin:2px 0 14px;font-size:1.25rem}
.ev-dlg-kind{font-size:.7rem;font-weight:700;text-transform:uppercase;letter-spacing:.06em;
  color:var(--muted);margin:0}
.ev-dlg-warn{margin:14px 0 0;font-size:.86rem;color:var(--late)}
.ev-dlg .actions{margin-top:20px}
.ev-x{position:absolute;top:10px;right:12px;border:0;background:transparent;font-size:1.5rem;
  line-height:1;color:var(--muted);cursor:pointer;padding:4px 8px}
.ev-x:hover{color:var(--ink)}

/* the phone falls back to an agenda: an hour is four millimetres wide on a 390px screen */
.cal-agenda{display:none}
@media(max-width:760px){
  .cal{display:none}
  .cal-agenda{display:block;background:var(--surface);border:1px solid var(--line);
    border-radius:12px;overflow:hidden}
  .ag{display:flex;gap:12px;align-items:flex-start;padding:12px 14px;text-decoration:none;
    color:inherit;border-bottom:1px solid var(--line-2);
    border-left:3px solid var(--navy);position:relative}
  .ag:last-child{border-bottom:0}
  .ag{border-left-color:var(--navy)}
  .ag-cal{background:var(--tcbg,var(--surface-2));color:var(--tcfg,inherit);
    border-left-color:color-mix(in srgb, var(--tcbg,#c9d4dd) 70%, #1a1a1a)}
  .ag-cal .ag-m{opacity:.72}
  .ag-t{min-width:76px;font-weight:700;font-size:.85rem;color:var(--navy);
    font-variant-numeric:tabular-nums}
  .ag-b{display:flex;flex-direction:column;gap:2px;min-width:0}
  .ag-n{font-weight:600}
  .ag-m{font-size:.82rem;color:var(--muted)}
  .ag-day{margin:0;padding:10px 14px 6px;font-size:.72rem;font-weight:700;text-transform:uppercase;
    letter-spacing:.06em;color:var(--muted);background:var(--surface-2)}
}

/* ── key/value blocks ────────────────────────────────────────────────── */
.kv{display:grid;grid-template-columns:auto 1fr;gap:7px 16px;font-size:.95rem;align-items:baseline}
.kv dt{color:var(--muted);font-size:.84rem;white-space:nowrap}
.kv dd{margin:0;font-weight:500}
/* Identifiers an admin has to compare against another screen character by character. */
code{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.86em;
  background:var(--surface-2);border:1px solid var(--line);border-radius:5px;padding:2px 6px}
.brk{overflow-wrap:anywhere}
/* A short numbered sequence, used where the order really is the information. */
.steps{margin:14px 0 10px;padding-left:22px;color:var(--ink-2);font-size:.97rem}
.steps li{margin:6px 0}
.big-name{font-size:1.9rem;line-height:1.15;font-weight:700;letter-spacing:-.02em;color:var(--navy);
  margin:0 0 6px}
@media(max-width:640px){.big-name{font-size:1.5rem}}
.contact{display:flex;flex-wrap:wrap;gap:6px 20px;font-size:1rem;color:var(--ink-2);margin:0 0 4px}
.contact a{color:var(--info);text-decoration:none;font-weight:600}
.contact a:hover{text-decoration:underline}
/* ── the owner's dashboard ────────────────────────────────────────────────
   Tiles that are links, not decorations: every number on that screen goes somewhere, so each one
   gets the whole tile as its hit area rather than a small arrow beside it. */
.dstats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:10px;margin:0}
.dstat{display:block;text-decoration:none;color:inherit;background:var(--surface-2);
  border:1px solid var(--line-2);border-radius:10px;padding:12px 14px}
a.dstat:hover{border-color:var(--navy);background:#fff}
.dstat b{display:block;font-size:1.7rem;line-height:1.05;font-weight:700;letter-spacing:-.02em;
  color:var(--navy)}
.dstat .sec{margin-bottom:4px}
.dstat small{display:block;color:var(--muted);font-size:.84rem;margin-top:3px}
.dstat.warn{border-color:#e4b878;background:#fdf7ec}
.dstat.warn b{color:#9a6410}
.dstat.bad{border-color:#e0a3a3;background:#fdf1f1}
.dstat.bad b{color:#9d2f2f}
@media(max-width:640px){
  .dstats{grid-template-columns:repeat(auto-fit,minmax(130px,1fr));gap:8px}
  .dstat b{font-size:1.45rem}
}

/* Who is out today. One row per person, their load beside their name. */
.dtechs{display:flex;flex-direction:column;gap:6px}
.dtech{display:flex;align-items:center;gap:11px;text-decoration:none;color:inherit;
  padding:10px 12px;border:1px solid var(--line-2);border-radius:10px;background:var(--surface-2)}
a.dtech:hover{border-color:var(--navy);background:#fff}
.dtech-dot{width:11px;height:11px;border-radius:50%;flex:none}
.dtech-main{flex:1;min-width:0}
.dtech-main b{display:block;font-size:1rem;color:var(--navy)}
.dtech-state{flex:none;font-size:.86rem;font-weight:600;color:var(--muted);white-space:nowrap}

/* Today's work with nobody on it. The one list on the dashboard that is a to-do. */
.dunassigned{display:flex;flex-direction:column;gap:6px}
.dun{display:flex;align-items:center;gap:12px;text-decoration:none;color:inherit;padding:10px 12px;
  border:1px solid #e4b878;border-radius:10px;background:#fdf7ec}
a.dun:hover{border-color:var(--orange);background:#fff}
.dun-when{flex:none;font-variant-numeric:tabular-nums;font-weight:650;color:var(--navy);
  font-size:.92rem;min-width:66px}
.dun-what{flex:1;min-width:0}
.dun-go{flex:none;font-size:.86rem;font-weight:600;color:var(--orange-d);white-space:nowrap}
@media(max-width:560px){
  .dun{flex-wrap:wrap;gap:4px 12px}
  .dun-what{flex-basis:100%;order:3}
  .dun-go{margin-left:auto}
}

/* ── assigning a visit ────────────────────────────────────────────────────
   One button per technician rather than a dropdown, because the office is choosing between PEOPLE
   and the load beside each name IS the decision. A dropdown hides exactly that. */
.atechs{display:flex;flex-direction:column;gap:6px}
.atech-f{margin:0}
.atech{display:flex;align-items:center;gap:12px;width:100%;text-align:left;cursor:pointer;
  background:var(--surface-2);border:1px solid var(--line-2);border-radius:10px;padding:12px 14px;
  font:inherit;color:inherit}
.atech:hover:not(:disabled){border-color:var(--navy);background:#fff}
.atech:disabled{cursor:default;opacity:.75}
.atech.on{border-color:var(--navy);background:#fff}
.atech-dot{width:12px;height:12px;border-radius:50%;flex:none}
.atech-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.atech-main b{font-size:1rem;color:var(--navy)}
.atech-go{flex:none;font-size:.85rem;font-weight:600;color:var(--orange-d);white-space:nowrap}
.atech:disabled .atech-go{color:var(--muted)}
@media(max-width:560px){.atech-go{display:none}}

/* ── dispatch ─────────────────────────────────────────────────────────────
   The lanes are cards, and only cards. The grid variant that put one narrow column per technician
   is gone: five columns across a nine-hour window were slivers in a field of white, and their
   headings named everybody a second time under the filter row that already lists them. A
   forty-pixel block has no room for an address and a button either. .lh-dot stays -- the filter
   row and the card headings both use it. */
.lh-dot{width:9px;height:9px;border-radius:50%;flex:none;display:inline-block}

/* The technician filter. The count is the information; the name is the label on it. */
.tfilter{gap:5px}
.chiprow{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 18px}
/* Days past due, on an invoice. A fact, not a prompt to chase anybody. */
.od{color:#9d2f2f;font-weight:700}

/* ── the invoice, on a job ────────────────────────────────────────────────
   The office manager reads a job and an invoice as one thing, so the number, what it was for and
   what is owed sit together on one line near the top. */
.jinv{display:flex;flex-wrap:wrap;align-items:baseline;gap:6px 14px;margin:10px 0 0}
.jinv-no{font-weight:700;font-size:1.02rem;color:var(--navy);text-decoration:none;
  border-bottom:2px solid var(--line-2)}
.jinv-no:hover{border-bottom-color:var(--navy)}
.jinv-what{font-size:.93rem;color:var(--ink-2)}
.jinv-amt{font-variant-numeric:tabular-nums;font-weight:650;color:var(--navy)}
.jinv-ok{font-size:.88rem;font-weight:700;color:var(--go-d)}
.jinv-owed{font-size:.88rem;font-weight:700;color:#9d2f2f;font-variant-numeric:tabular-nums}
/* The invoice the office arrived from, so it is not lost among the others. */
.alloc-came{background:#f4f8fb;border-left:3px solid var(--navy);padding-left:10px;
  margin-left:-10px;border-radius:4px}

/* ── a completed office action ────────────────────────────────────────────
   Recording a payment is finished the moment it commits. The page has to look finished too, or the
   office goes looking for a Submit button that is not there. */
.paid-done{background:linear-gradient(180deg,#f3faf5,#fff);border:1px solid var(--ok);
  border-radius:12px;padding:18px 20px;margin:0 0 18px}
.paid-head{display:flex;align-items:flex-start;gap:14px;margin-bottom:14px}
.paid-tick{flex:none;width:34px;height:34px;border-radius:50%;background:var(--ok);color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:1.15rem;font-weight:700}
.paid-head b{display:block;font-size:1.3rem;color:var(--go-d);letter-spacing:-.01em}
.paid-head span{display:block;font-size:.97rem;color:var(--ink-2);margin-top:2px}
.paid-facts{display:grid;grid-template-columns:auto 1fr;gap:7px 18px;margin:0 0 16px;
  font-size:.95rem}
.paid-facts dt{color:var(--muted);font-size:.84rem;text-transform:uppercase;
  letter-spacing:.05em;font-weight:700;padding-top:2px}
.paid-facts dd{margin:0;color:var(--ink)}
.paid-facts a{color:var(--info);text-decoration:none;font-weight:600}
.paid-done .actions{margin:0}
@media(max-width:560px){
  .paid-facts{grid-template-columns:1fr;gap:2px 0}
  .paid-facts dd{margin-bottom:8px}
  .paid-done .actions .b{width:100%;text-align:center}
}

/* ── what is still unfinished about the setup ─────────────────────────────
   One row per thing a person can finish today, with the screen that finishes it. */
.setup{display:flex;flex-direction:column;gap:2px}
.setup-row{display:flex;gap:16px;align-items:center;padding:11px 0;
  border-bottom:1px solid var(--line-2)}
.setup-row:last-child{border-bottom:0;padding-bottom:2px}
.setup-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.setup-main b{color:var(--navy);font-size:1rem}
.setup-main span{font-size:.9rem;color:var(--ink-2)}
.setup-go{flex:none}
.setup-bad .setup-main b{color:#9d2f2f}
.setup-warn .setup-main b{color:#9a6410}
@media(max-width:640px){
  .setup-row{flex-wrap:wrap;gap:8px}
  .setup-go,.setup-go .b{width:100%;text-align:center}
}
.tchip{display:inline-flex;align-items:center;gap:6px;text-decoration:none;padding:5px 10px;
  border:1px solid var(--line-2);border-radius:999px;background:#fff;color:var(--ink-2);
  font-size:.86rem;font-weight:600;line-height:1.3}
.tchip:hover{border-color:var(--navy);color:var(--navy)}
.tchip.on{background:var(--navy);border-color:var(--navy);color:#fff}
.tchip b{font-variant-numeric:tabular-nums;background:#eef3f7;color:var(--ink-2);border-radius:999px;
  padding:0 6px;font-size:.78rem}
.tchip.on b{background:rgba(255,255,255,.22);color:#fff}
.tchip b.zero{opacity:.55}
/* A technician chip in that person's own calendar colour: a dot, and a wash faint enough that the
   label stays on ordinary ink. The colour arrives inline as --tint, so there is no lookup table
   here and a colour the office changes tomorrow is picked up for free. The selected state is
   untouched -- which filter is on has to read louder than whose colour it is. */
.tchip.tinted{background:color-mix(in srgb, var(--tint) 14%, #fff);
  border-color:color-mix(in srgb, var(--tint) 42%, var(--line-2))}
.tchip.tinted:hover{background:color-mix(in srgb, var(--tint) 24%, #fff)}
.tchip.tinted b{background:color-mix(in srgb, var(--tint) 26%, #fff)}
.tchip.tinted.on{background:var(--navy);border-color:var(--navy);color:#fff}
.tchip.tinted.on b{background:rgba(255,255,255,.22)}
/* Nobody assigned: an absence, so grey rather than the amber it used to borrow from "needs
   attention". The count still says how much of it there is. */
.tchip.is-none{border-color:var(--line-2);background:#f6f8fa;color:var(--ink-2)}
.tchip.is-none .lh-dot,.cal-key i.dot-none{background:#c3ced6}
.tchip.is-none.on{background:var(--navy);border-color:var(--navy);color:#fff}
.cal-key .key-none{color:var(--muted)}
.cal-key i.dot-none{display:inline-block;width:9px;height:9px;border-radius:50%;flex:none}
.tchip.is-open{border-color:#e4b878;background:#fdf7ec;color:#9a6410}
.tchip.is-open b{background:#f3e0bf;color:#7d5210}
.tchip.is-open.on{background:var(--orange);border-color:var(--orange);color:#fff}
.tchip.is-open.on b{background:rgba(255,255,255,.25);color:#fff}

/* One lane as a section of cards. */
.dboard{display:flex;flex-direction:column;gap:18px;margin-top:20px}
.dlane{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:14px 16px;
  box-shadow:var(--shadow)}
.dlane-open{border-color:#e4b878;background:#fffdf8}
.dlane-head{display:flex;align-items:baseline;justify-content:space-between;gap:14px;flex-wrap:wrap;
  padding-bottom:10px;margin-bottom:4px;border-bottom:1px solid var(--line-2)}
.dlane-head h2{margin:0;font-size:1.05rem;display:flex;align-items:center;gap:7px}
.dlane-open .dlane-head h2{color:var(--orange-d)}

.dcard{display:flex;gap:14px;align-items:flex-start;padding:12px 0;
  border-bottom:1px solid var(--line-2)}
.dcard:last-child{border-bottom:0;padding-bottom:2px}
.dcard-when{flex:none;width:82px;display:flex;flex-direction:column;gap:1px}
.dcard-when b{font-variant-numeric:tabular-nums;font-size:.95rem;color:var(--navy)}
.dcard-main{flex:1;min-width:0}
.dcard-who{font-weight:650;font-size:1rem;color:var(--navy);text-decoration:none}
.dcard-who:hover{text-decoration:underline}
.dcard-what{font-size:.9rem;color:var(--ink-2);margin-top:2px}
.dcard-where,.dcard-ph{font-size:.86rem;color:var(--muted);margin-top:2px}
.dcard-ph a{color:var(--info);text-decoration:none;font-weight:600}
.dcard-warn{font-size:.84rem;color:#9a6410;margin-top:4px}
.dcard-act{flex:none;display:flex;flex-direction:column;gap:5px;min-width:132px}
.dcard-act .b{width:100%;text-align:center}
.dcard-open .dcard-when b{color:var(--orange-d)}

@media(max-width:700px){
  /* On a phone the cards are the whole screen. */
  .dcard{flex-wrap:wrap;gap:4px 12px}
  .dcard-when{width:auto;flex-direction:row;align-items:baseline;gap:7px}
  .dcard-main{flex-basis:100%;order:3}
  .dcard-act{flex-basis:100%;order:4;flex-direction:row;min-width:0;margin-top:6px}
  .dcard-act .b{flex:1}
  .dlane{padding:12px 13px}
}

/* ── the job workspace ────────────────────────────────────────────────────
   One action, said once, with the reason beside it. Everything else on the page is quiet. */
.jnext{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin:20px 0 0;padding:16px 18px;
  background:linear-gradient(180deg,#fff,#f7fafc);border:1px solid var(--navy);border-radius:12px}
.jnext-say{flex:1;min-width:200px;display:flex;flex-direction:column;gap:2px}
.jnext-say b{font-size:1.08rem;color:var(--navy)}
.jnext-say span{font-size:.92rem;color:var(--ink-2)}
.jnext-go{flex:none}
.jnext-go form{margin:0}
@media(max-width:560px){
  .jnext{padding:14px}
  .jnext-go,.jnext-go .b{width:100%;text-align:center}
}

/* When, who, where: the three facts a phone call needs, above everything else. */
.jfacts{display:grid;grid-template-columns:1fr 1fr;gap:12px 24px;margin-top:16px;
  padding-top:14px;border-top:1px solid var(--line-2)}
.jfacts .wide{grid-column:1/-1}
.jfacts > div > div{font-size:1rem;color:var(--ink)}
@media(max-width:560px){.jfacts{grid-template-columns:1fr}}
.jbig{font-size:1.35rem;font-weight:700;color:var(--navy);letter-spacing:-.01em}
.card-warn{border-color:#e4b878;background:#fffdf8}
.card-warn .card-head h2{color:var(--orange-d)}

/* ── website leads ────────────────────────────────────────────────────────
   The name and the number first, because the next action on a lead is always a phone call. */
.enq-list{display:flex;flex-direction:column;gap:2px}
/* A password being read down a phone: big, spaced, and unmistakably a thing to say out loud. */
/* "What happened in QuickBooks": one band per kind of record, three numbers each. */
.qa{padding:16px 0;border-bottom:1px solid var(--line-2)}
.qa:last-child{border-bottom:0}
.qa-h{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap}
.qa-h h3{margin:0;font-size:1.02rem}
.qa-n{display:flex;gap:26px;flex-wrap:wrap;margin-top:8px}
.qa-n div{display:flex;flex-direction:column}
.qa-n b{font-size:1.5rem;font-variant-numeric:tabular-nums;line-height:1.15}
.qa-n b.ok{color:var(--ok)}
.qa-n b.bad{color:var(--late)}
.qa-n span{font-size:.76rem;color:var(--muted)}
.qa-x{list-style:none;margin:10px 0 0;padding:0;display:flex;flex-direction:column;gap:3px}
.qa-x li{font-size:.84rem;color:var(--ink-2);display:flex;gap:8px;align-items:baseline;
  flex-wrap:wrap}
.qa-x .t{font:.72rem/1.5 ui-monospace,monospace;color:var(--muted);flex:none;min-width:92px}
.qa-x .a{font-variant-numeric:tabular-nums;color:var(--ink);font-weight:600}

/* A row with an action beside it. The row keeps its own full-width link; the action sits outside. */
.item-wrap{display:flex;align-items:stretch;gap:0;border-bottom:1px solid var(--line-2)}
.item-wrap:last-child{border-bottom:0}
.item-wrap > .item{flex:1;min-width:0;border-bottom:0}
.item-after{display:flex;align-items:center;padding:0 10px 0 4px;flex:none}

/* A word beside the block she just dropped, rather than a banner at the top of the page. */
.cal-toast{
  position:absolute;left:0;right:3px;z-index:6;margin-top:-26px;
  background:var(--navy);color:#fff;border-radius:7px;padding:5px 9px;
  font-size:.76rem;font-weight:600;line-height:1.35;pointer-events:none;
  box-shadow:var(--sh-lift);opacity:1;transition:opacity .45s ease;
}
.cal-toast.bad{background:var(--late)}
.cal-toast.go{opacity:0}
@media(prefers-reduced-motion:reduce){.cal-toast{transition:none}}

/* A block that has just been released and is on its way to the server. */
.cal-ev.is-moving{opacity:.45;outline:2px dashed var(--orange);outline-offset:1px}
.temp-pw{
  font:600 1.5rem/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;
  letter-spacing:.04em;color:var(--navy);background:var(--surface);
  border:1px dashed var(--line);border-radius:var(--r-ctl);
  padding:12px 14px;margin:10px 0 0;word-break:break-all;user-select:all;
}
.enq{display:flex;gap:16px;align-items:flex-start;padding:13px 0;
  border-bottom:1px solid var(--line-2)}
.enq:last-child{border-bottom:0;padding-bottom:2px}
.enq-attn{background:#fffdf8;border-left:3px solid var(--orange);padding-left:12px;
  margin-left:-12px}
.enq-main{flex:1;min-width:0}
.enq-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.enq-who{font-weight:650;font-size:1.02rem;color:var(--navy)}
.enq-contact{display:flex;gap:6px 18px;flex-wrap:wrap;margin-top:4px;font-size:.92rem}
.enq-contact a{color:var(--info);text-decoration:none;font-weight:600}
.enq-contact a:hover{text-decoration:underline}
.enq-msg{margin-top:6px;font-size:.93rem;color:var(--ink-2);max-width:78ch;
  overflow-wrap:anywhere}
.enq-all{margin-top:8px}
.enq-all summary{cursor:pointer}
.enq-why{margin-top:7px;font-size:.88rem;color:#9a6410}
/* A dropped submission reads as set aside, not as something waiting to be worked. */
.enq-spam{opacity:.86}
.enq-spam .enq-who{color:var(--ink-2);font-weight:600}
.enq-act{flex:none;display:flex;flex-direction:column;gap:5px;min-width:160px}
.enq-act .b{width:100%;text-align:center}
.enq-act form{margin:0}
@media(max-width:700px){
  .enq{flex-wrap:wrap}
  .enq-act{flex-basis:100%;flex-direction:row;min-width:0;margin-top:8px}
  .enq-act .b{flex:1}
}

.print-only{display:none}
@media print{.appbar,.actions,.no-print{display:none!important}.page{padding:0;max-width:none}
  .card{box-shadow:none;border:0;padding:0}.print-only{display:block}}

/*
 * WHAT THE OFFICE NEEDS TO TELL US -- the screen the owner and Marilyn work through together.
 *
 * A left border carries the state because it survives printing and reads at a glance across a
 * dozen cards: amber for unanswered, green and faded for answered. The facts are a two-column
 * definition list rather than prose, because on the day they are scanned and not read.
 */
.oq{border-left:4px solid #c47f17}
.oq-done{border-left-color:#2d7a3e;opacity:.78}
.oq-head{display:flex;justify-content:space-between;align-items:baseline;gap:14px}
.oq-head h2{margin:0}
.oq-amt{font-weight:700;font-size:1.15rem;white-space:nowrap;font-variant-numeric:tabular-nums}
.oq-why{margin:8px 0 0;color:var(--ink-2)}
.oq-facts{display:grid;grid-template-columns:auto 1fr;gap:3px 14px;margin:12px 0 0;font-size:.9rem}
.oq-facts dt{color:var(--muted);font-weight:600}
.oq-facts dd{margin:0}
.oq-opts{display:flex;flex-direction:column;gap:6px;margin:14px 0 10px}
.oq-opt{display:flex;gap:9px;align-items:flex-start;padding:8px 10px;border:1px solid var(--line);
  border-radius:7px;cursor:pointer}
.oq-opt:hover{background:var(--ground)}
.oq-opt.on{border-color:#2d7a3e;background:var(--ok-bg)}
.oq-opt input{margin-top:3px;flex:none}
.oq-answered{margin-top:12px}
.oq-note{margin-top:4px;font-style:italic}
.oq-form{margin-top:14px}
.oq-tally{display:flex;gap:26px;margin-top:14px;flex-wrap:wrap}
.oq-tally .oq-n{display:block;font-size:1.5rem;font-weight:700;font-variant-numeric:tabular-nums}
@media print{.oq-form{display:none}}

.b.ko-busy,.b.ko-busy:hover{opacity:.55;pointer-events:none;cursor:progress;
  filter:grayscale(1)}
form[aria-busy="true"]{opacity:.9}