:root {
  --bg: #f4f6f8; --panel: #fff; --ink: #17212b; --muted: #677480; --line: #e3e7eb; --soft: #eff2f5; --card: #f8fafb;
  --brand: #0b7290; --brand-ink: #fff; --brand-soft: #e2f1f6; --brand-hover: #095e77;
  --warn-bg: #fff5e3; --warn-ink: #7a4a00; --warn-line: #f2c97f;
  --err-bg: #fdecec; --err-ink: #9b1c1c; --ok-bg: #e6f6ec; --ok-ink: #1a6b36;
  --radius: 12px; --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .14); color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e1417; --panel: #172025; --ink: #e7edf0; --muted: #98a6ad; --line: #26323a; --soft: #1f2a30; --card: #1b252a;
    --brand: #4db4d1; --brand-ink: #06151a; --brand-soft: #14323b; --brand-hover: #74c7de;
    --warn-bg: #3a2c12; --warn-ink: #f3cf8f; --warn-line: #6b5120;
    --err-bg: #3b1d1d; --err-ink: #f4b4b4; --ok-bg: #163322; --ok-ink: #9be0b1;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35); --shadow-lg: 0 12px 32px rgba(0, 0, 0, .5); color-scheme: dark;
  }
}
/* Inter (SIL Open Font License, assets/fonts/OFL.txt), served from here: the CSP allows no outside fonts. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/inter-latin.woff2") format("woff2"); }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: var(--brand); text-underline-offset: 2px; }
h1 { font-size: 1.55rem; font-weight: 650; letter-spacing: -.015em; line-height: 1.25; margin: 0 0 .75rem; }
h1 small { font-size: .75rem; font-weight: 600; color: var(--brand); background: var(--brand-soft); border-radius: 999px; padding: .15rem .55rem; margin-left: .5rem; vertical-align: middle; letter-spacing: 0; }
h2 { font-size: 1.02rem; font-weight: 650; margin: 0; letter-spacing: -.005em; }
h3 { font-size: .72rem; font-weight: 650; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem 0 .4rem; }
code, pre { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85em; }
[hidden] { display: none !important; }

.top { display: flex; align-items: center; gap: .5rem 1rem; padding: .55rem 1.25rem; background: var(--panel); border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgba(16, 24, 40, .04); position: sticky; top: 0; z-index: 5; }
.brand { font-weight: 700; letter-spacing: -.01em; text-decoration: none; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.brand span { color: var(--brand); }
.mainnav { display: flex; gap: .15rem; }
.mainnav a, .menupanel a { padding: .4rem .7rem; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 500; white-space: nowrap; }
.mainnav a:hover { color: var(--ink); }
.mainnav a:hover, .menupanel a:hover, .menuitem:hover { background: var(--soft); }
.mainnav a[aria-current] { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.count { background: var(--brand); color: var(--brand-ink); border-radius: 999px; padding: 0 .45rem; font-size: .75rem; }
.topright { margin-left: auto; display: flex; align-items: center; gap: .4rem; }
.booknow { min-height: 38px; white-space: nowrap; }
.booknow[aria-current] { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--brand); }
/* Menus are <details>: no script needed to open them (app.js closes them on an outside click / Esc). */
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: .3rem; min-height: 38px; padding: .3rem .6rem; border-radius: 8px; color: var(--ink); white-space: nowrap; }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover, .menu[open] > summary { background: var(--soft); }
.menu > summary span { font-size: .7rem; color: var(--muted); }
.usermenu > summary { max-width: 14rem; overflow: hidden; text-overflow: ellipsis; }
.menupanel { position: absolute; right: 0; top: calc(100% + .35rem); min-width: 13rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(0, 0, 0, .12); padding: .35rem; display: flex; flex-direction: column; z-index: 20; }
.menupanel a, .menuitem { display: block; padding: .55rem .7rem; }
.menupanel a[aria-current] { font-weight: 700; }
.menupanel hr { border: 0; border-top: 1px solid var(--line); margin: .3rem 0; }
.menupanel form { margin: 0; }
.menupanel .coswitch { padding: .3rem .7rem .5rem; }
.menupanel .coswitch select { width: 100%; }
.menuwho { margin: 0; padding: .45rem .7rem .55rem; font-size: .85rem; color: var(--muted); border-bottom: 1px solid var(--line); margin-bottom: .3rem; overflow-wrap: anywhere; }
.usermenu .menupanel { min-width: 16rem; }
.menuitem { width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; font: inherit; color: var(--ink); cursor: pointer; }
.navmenu { display: none; }
.navmenu > summary { font-size: 1.25rem; padding: .3rem .7rem; }
.navmenu .menupanel { min-width: 15rem; }
main { padding: 1.5rem 1.25rem 2rem; max-width: 1240px; margin: 0 auto; }
/* Narrow screens: the company, + Book, your name, and ☰ for the rest. */
@media (max-width: 900px) {
  .mainnav, .gear { display: none; }
  .navmenu { display: block; }
}
@media (max-width: 640px) {
  .top { position: static; padding: .45rem .75rem; gap: .5rem; }
  .booknow .wide { display: none; }
  .usermenu > summary { max-width: 7.5rem; }
}

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 42px; padding: .5rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); transition: background-color .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 1px 2px rgba(11, 114, 144, .3); }
.btn.primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); }
.btn.danger { background: var(--err-ink); border-color: var(--err-ink); color: #fff; }
.btn.ghost { background: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--soft); }
.btn.small { min-height: 34px; padding: .3rem .75rem; font-size: .875rem; border-radius: 9px; }
.btn svg { flex: none; }
.linkbtn { background: none; border: 0; padding: .4rem 0; color: var(--brand); font: inherit; cursor: pointer; text-decoration: underline; }

.flash { background: var(--ok-bg); color: var(--ok-ink); padding: .65rem .9rem; border-radius: var(--radius); font-weight: 500; }
.note { background: var(--warn-bg); color: var(--warn-ink); border: 1px solid var(--warn-line); padding: .65rem .9rem; border-radius: var(--radius); }
.errors { background: var(--err-bg); color: var(--err-ink); padding: .6rem .9rem; border-radius: var(--radius); margin-bottom: 1rem; }
.errors ul { margin: 0; padding-left: 1.1rem; }
.hint, .muted { color: var(--muted); font-weight: normal; font-size: .86rem; }
.small { font-size: .875rem; }
.warn { color: var(--warn-ink); }
.empty { color: var(--muted); margin: .4rem 0 .6rem; font-size: .9rem; }

.dayhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .75rem; }
.dayhead h1 { margin: 0; }
.daynav { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.jump input { min-height: 42px; }

.lanes { display: grid; gap: 1.1rem; grid-template-columns: 1fr; margin-top: 1rem; align-items: start; }
@media (min-width: 760px) { .lanes { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.lane { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem; box-shadow: var(--shadow); }
.lane header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .7rem; }
.lane header h2 { display: flex; align-items: center; gap: .55rem; min-width: 0; }
.lane .lanecount { font-size: .78rem; font-weight: 500; color: var(--muted); }
.lane.attention { border-color: var(--warn-line); }
.lanefoot { display: flex; flex-wrap: wrap; gap: .3rem; margin: .7rem 0 0; }
.avatar { flex: none; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--tc, var(--brand)); color: #fff; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.allday { margin-top: 1.5rem; }
.cards { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-top: .5rem; }

.card { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--tc, var(--brand)); border-radius: 10px; padding: .6rem .75rem .65rem; margin-bottom: .55rem; }
.lane .card { background: var(--card); }
.card.warn { border-left-color: #e0a030; }
.card.own { border-left-style: dashed; border-left-color: var(--muted); background: transparent; }
.card.done { background: transparent; }
.card.done .what { color: var(--muted); }
.card.big { max-width: 560px; }
.card .when { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .8rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.card .what { font-weight: 600; margin: .15rem 0 .25rem; overflow-wrap: anywhere; line-height: 1.35; }
.card .meta { display: flex; flex-direction: column; gap: .05rem; font-size: .84rem; }
.card .meta a, .card .meta span { overflow-wrap: anywhere; color: var(--muted); text-decoration: none; }
.card .meta a:hover { color: var(--brand); text-decoration: underline; }
.card .acts { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .5rem; }
.card .act, .lanefoot a { display: inline-flex; align-items: center; gap: .25rem; padding: .2rem .6rem; border-radius: 999px; background: var(--soft); color: var(--ink); text-decoration: none; font-size: .78rem; font-weight: 600; }
.card .act:hover, .lanefoot a:hover { background: var(--brand-soft); color: var(--brand); }
.card .act.go { background: var(--brand-soft); color: var(--brand); }
.pill { display: inline-flex; align-items: center; gap: .2rem; padding: .05rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 650; background: var(--soft); color: var(--muted); white-space: nowrap; }
.pill.done { background: var(--ok-bg); color: var(--ok-ink); }
.pill.noaccess { background: var(--warn-bg); color: var(--warn-ink); }
.pill.crew { background: var(--brand-soft); color: var(--brand); }
.card .actions { display: flex; gap: .5rem; align-items: center; margin-top: .4rem; }
.card .actions form { margin: 0; }
.notes { white-space: pre-wrap; background: var(--soft); padding: .5rem; border-radius: 6px; }

.dot { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .45rem; background: var(--brand); }
/* Tech colours (Google colorId) as a variable: card stripes, avatars. */
.tc1 { --tc: #7986cb; } .tc2 { --tc: #33b679; } .tc3 { --tc: #8e24aa; } .tc4 { --tc: #e67c73; } .tc5 { --tc: #e2a90c; } .tc6 { --tc: #f4511e; }
.tc7 { --tc: #039be5; } .tc8 { --tc: #616161; } .tc9 { --tc: #3f51b5; } .tc10 { --tc: #0b8043; } .tc11 { --tc: #d50000; }
.c1 { background: #7986cb; } .c2 { background: #33b679; } .c3 { background: #8e24aa; } .c4 { background: #e67c73; }
.c5 { background: #f6bf26; } .c6 { background: #f4511e; } .c7 { background: #039be5; } .c8 { background: #616161; }
.c9 { background: #3f51b5; } .c10 { background: #0b8043; } .c11 { background: #d50000; }

form.job { max-width: 640px; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); padding: .8rem 1.1rem 1.1rem; margin: 0 0 1rem; min-width: 0; box-shadow: var(--shadow); }
legend { font-weight: 650; padding: 0 .35rem; }
/* Card-style sections: the title sits inside the card (fieldset.days is a plain inline group). */
fieldset:not(.days) > legend { float: left; width: 100%; padding: 0; margin: 0 0 .1rem; font-size: 1rem; }
fieldset:not(.days) > legend + * { clear: both; }
label { display: block; font-weight: 550; font-size: .9rem; margin: .75rem 0 .3rem; }
input:not([type=radio]):not([type=checkbox]), select, textarea {
  width: 100%; min-height: 42px; padding: .5rem .7rem; border: 1px solid var(--line); border-radius: 10px;
  background: var(--panel); color: var(--ink); font: inherit; transition: border-color .12s, box-shadow .12s;
}
input:not([type=radio]):not([type=checkbox]):hover, select:hover, textarea:hover { border-color: #cfd5db; }
textarea { min-height: 5rem; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.btn:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
input[type=checkbox], input[type=radio] { accent-color: var(--brand); }
@media (max-width: 640px) { input:not([type=radio]):not([type=checkbox]), select, textarea { font-size: 16px; } } /* no iOS zoom-on-focus */
.row2 { display: grid; gap: 0 .8rem; grid-template-columns: 1fr; }
@media (min-width: 520px) { .row2 { grid-template-columns: 1fr 1fr; } }
label.check { display: flex; gap: .5rem; align-items: center; font-weight: 600; color: var(--warn-ink); }
label.check input { width: 1.2rem; height: 1.2rem; }
.seg { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .4rem; }
.seg label { display: flex; align-items: center; gap: .45rem; margin: 0; padding: .5rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-weight: 500; cursor: pointer; }
.seg label:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }

.results { list-style: none; margin: .3rem 0 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.results li + li { border-top: 1px solid var(--line); }
.results button { display: block; width: 100%; text-align: left; padding: .55rem .7rem; background: var(--panel); border: 0; color: var(--ink); font: inherit; cursor: pointer; min-height: 44px; }
.results button:hover, .results button:focus { background: var(--soft); }
.results strong { display: block; }
.results span { color: var(--muted); font-size: .88rem; }
.results .none, .results .error { padding: .6rem .7rem; color: var(--muted); }
.results .error { color: var(--err-ink); }
.linked { color: var(--ok-ink); font-weight: 600; margin: .5rem 0 0; }

.conflicts p { margin: .5rem 0 0; padding: .45rem .6rem; border-radius: 8px; font-size: .92rem; }
.conflicts .warn { background: var(--warn-bg); }
.conflicts .soft { background: var(--soft); color: var(--muted); }
.conflicts .ok { background: var(--ok-bg); color: var(--ok-ink); }
.orig { margin-top: .6rem; }
.orig pre { white-space: pre-wrap; background: var(--soft); padding: .5rem; border-radius: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
form.cancel { max-width: 640px; margin-top: 1.5rem; }
form.cancel summary { cursor: pointer; color: var(--err-ink); font-weight: 600; }
form.cancel .btn { margin-top: .6rem; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.15rem; margin-bottom: 1rem; max-width: 720px; box-shadow: var(--shadow); }
.panel h2 { margin-bottom: .4rem; }
.tablewrap { overflow-x: auto; }
table.log { border-collapse: collapse; width: 100%; background: var(--panel); font-size: .9rem; }
table.log th, table.log td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }

.panel.wide { max-width: none; }
table.grid { border-collapse: collapse; width: 100%; min-width: 760px; }
table.grid th { text-align: left; font-size: .85rem; padding: .3rem .35rem; vertical-align: bottom; }
table.grid td { padding: .25rem .35rem; vertical-align: middle; }

table.grid input:not([type=checkbox]), table.grid select { min-height: 38px; padding: .3rem .45rem; }
table.grid select { width: auto; }
table.grid .num { width: 6.5rem; }
table.grid .center { text-align: center; }
table.grid input[type=checkbox] { width: 1.2rem; height: 1.2rem; }
table.grid tr.new input::placeholder { color: var(--brand); }
table.grid td .dot { flex: none; }
label.check.plain { color: var(--ink); font-weight: 500; margin-top: .8rem; }
label.check input { flex: none; }
#estimate p { margin: .45rem 0 0; }
#estimate .ok { color: var(--ok-ink); }
#estimate .warn { background: var(--warn-bg); padding: .4rem .6rem; border-radius: 8px; }
#estimate .warranty { margin-top: .7rem; background: var(--ok-bg); color: var(--ok-ink); padding: .5rem .7rem .2rem; border-radius: 8px 8px 0 0; font-weight: 700; }
#estimate .warranty-sub { margin: 0; background: var(--ok-bg); color: var(--ok-ink); padding: 0 .7rem .5rem; border-radius: 0 0 8px 8px; font-size: .88rem; }
.warrantybar { background: var(--ok-bg); color: var(--ok-ink); border-radius: 10px; padding: .6rem .85rem; margin: 0 0 1rem; max-width: 900px; }
#estimate .price { font-size: 1.05rem; background: var(--soft); padding: .5rem .7rem; border-radius: 8px; }
.addr-check { margin: .4rem 0 0; font-size: .9rem; padding: .35rem .6rem; border-radius: 8px; }
.addr-check.good { background: var(--ok-bg); color: var(--ok-ink); }
.addr-check.partial, .addr-check.bad { background: var(--warn-bg); color: var(--warn-ink); }
.addr-check .linkbtn { padding: 0; }
label.check.save { margin-top: .5rem; font-weight: 600; }

/* Month view */
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; font-size: .9rem; }
.legend > span { display: inline-flex; align-items: center; }
.dot.unassigned { background: #e0a030; }
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-top: .5rem; }
.mhead { font-size: .8rem; font-weight: 700; color: var(--muted); text-align: center; padding: .2rem 0; }
.mday { display: flex; flex-direction: column; gap: 2px; min-height: 110px; padding: .35rem .4rem; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; color: var(--ink); text-decoration: none; overflow: hidden; box-shadow: var(--shadow); }
.mday:hover, .mday:focus-visible { border-color: var(--brand); }
/* Dim the contents, not the cell: opacity on the cell would trap the hover preview under the next row. */
.mday.other > :not(.peek) { opacity: .45; }
.mday.weekend { background: var(--bg); }
.mday.past > :not(.peek) { opacity: .7; }
.mday.today { border: 2px solid var(--brand); }
.mday .num { font-weight: 700; font-size: .9rem; }
.mday .wd { display: none; }
.mday .hol { font-size: .72rem; color: var(--brand); font-weight: 600; line-height: 1.2; }
.mday .load { display: grid; grid-template-columns: auto 1fr auto; align-items: center; column-gap: .25rem; font-size: .75rem; line-height: 1.2; }
.mday .load .dot { width: .55rem; height: .55rem; margin: 0; }
.mday .load .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mday .load .n { color: var(--muted); white-space: nowrap; }
.mday .load .bar { grid-column: 1 / -1; height: 4px; background: var(--soft); border-radius: 2px; overflow: hidden; }
.mday .load .fill { display: block; height: 100%; border-radius: 2px; }
.mday .load.over .n { color: var(--err-ink); font-weight: 700; }
.mday .load.warnline .n { color: var(--warn-ink); font-weight: 700; }
.mday .allday-n { font-size: .72rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w0 { width: 0; } .w10 { width: 10%; } .w20 { width: 20%; } .w30 { width: 30%; } .w40 { width: 40%; } .w50 { width: 50%; }
.w60 { width: 60%; } .w70 { width: 70%; } .w80 { width: 80%; } .w90 { width: 90%; } .w100 { width: 100%; }
@media (max-width: 640px) {
  .month { grid-template-columns: 1fr; }
  .mhead, .mday.other.blank, .mday.blank.past { display: none; }
  .mday { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .2rem .6rem; }
  .mday .num { min-width: 4.2rem; }
  .mday .wd { display: inline; font-weight: 500; color: var(--muted); }
  .mday .load { display: inline-flex; gap: .25rem; font-size: .8rem; }
  .mday .load .bar { display: none; }
  .mday.blank .num::after { content: " — nothing booked"; font-weight: 400; color: var(--muted); font-size: .8rem; }
}

/* Find a time */
.finder { margin-top: .9rem; border: 1px solid var(--line); border-radius: 8px; padding: .4rem .6rem; background: var(--bg); }
.finder summary { cursor: pointer; font-weight: 700; color: var(--brand); padding: .3rem 0; min-height: 32px; }
.finder-bar { display: flex; align-items: center; gap: .5rem; margin: .4rem 0; }
.finder-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.fday { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: .3rem; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fday.closed { opacity: .5; }
.fday.picked { border: 2px solid var(--brand); }
.fdate { font-size: .75rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fday .slot { display: flex; align-items: center; gap: .25rem; min-height: 30px; padding: .15rem .3rem; border: 1px solid var(--line); border-radius: 6px;
  background: var(--soft); color: var(--ink); font: inherit; font-size: .75rem; cursor: pointer; text-align: left; overflow: hidden; white-space: nowrap; }
.fday .slot:hover, .fday .slot:focus-visible { border-color: var(--brand); }
.fday .slot .dot { width: .5rem; height: .5rem; margin: 0; flex: none; }
.fday .full { color: var(--muted); font-size: .72rem; }
fieldset.days { border: 0; padding: 0; margin: .7rem 0 0; background: none; box-shadow: none; border-radius: 0; display: flex; flex-wrap: wrap; gap: .3rem .8rem; }
fieldset.days legend { font-weight: 600; padding: 0; margin-bottom: .3rem; }
fieldset.days label { display: inline-flex; align-items: center; gap: .3rem; margin: 0; font-weight: 500; }
@media (max-width: 640px) {
  .finder-grid { grid-template-columns: 1fr; }
  .fday { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .fday.closed { display: none; }
  .fdate { min-width: 5.5rem; font-size: .85rem; }
  .fday .slot { font-size: .85rem; min-height: 36px; }
}

/* Estimate side panel (inline on phones, sticky right column on desktop) */
aside.side { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem 1.1rem; margin: 0 0 1rem; box-shadow: var(--shadow); }
aside.side h2 { font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0 0 .2rem; }
aside.side .total { font-size: 2rem; font-weight: 800; line-height: 1.1; margin-bottom: .4rem; font-variant-numeric: tabular-nums; }
aside.side .parts { list-style: none; margin: 0 0 .6rem; padding: 0; font-size: .92rem; }
aside.side .parts li { display: flex; justify-content: space-between; gap: .5rem; padding: .2rem 0; border-bottom: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
aside.side .parts li.muted { border: 0; }
aside.side .summary { display: grid; grid-template-columns: auto 1fr; gap: .15rem .6rem; font-size: .88rem; margin: .4rem 0 .6rem; }
aside.side .summary dt { color: var(--muted); }
aside.side .summary dd { margin: 0; overflow-wrap: anywhere; }
aside.side .summary:empty { display: none; }
@media (min-width: 1000px) {
  form.job { max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) 330px; column-gap: 1.25rem; align-items: start; }
  form.job > * { grid-column: 1; }
  form.job > aside.side { grid-column: 2; grid-row: 1 / span 30; position: sticky; top: 4.5rem; }
  form.job > aside.side[hidden] { display: block !important; }
}
.fday .slot .nm { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fday .slot .tm { flex: none; font-variant-numeric: tabular-nums; font-weight: 600; }

/* Address suggestions */
.ac-wrap { position: relative; }
.results.ac { position: absolute; left: 0; right: 0; top: calc(100% + 2px); z-index: 20; margin: 0; background: var(--panel); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
.results.ac li.active button { background: var(--soft); }

/* Billing */
.filters { display: flex; flex-wrap: wrap; gap: .5rem .8rem; align-items: flex-end; margin-bottom: .8rem; }
.filters > div { min-width: 9rem; }
.filters label { margin-top: 0; }
.tabs { display: inline-flex; flex-wrap: wrap; gap: 2px; margin: .4rem 0 .9rem; padding: 3px; background: var(--soft); border: 1px solid var(--line); border-radius: 11px; }
.tabs a { display: inline-flex; align-items: center; gap: .35rem; padding: .32rem .8rem; border-radius: 8px; text-decoration: none; color: var(--muted); font-weight: 550; font-size: .9rem; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current] { background: var(--panel); color: var(--ink); font-weight: 650; box-shadow: var(--shadow); }
.tabs .count { background: var(--line); color: var(--muted); }
.tabs .count.hot { background: #e0a030; color: #241600; }
.billlist { display: flex; flex-direction: column; gap: .4rem; }
.billrow { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: .9rem; align-items: center; padding: .65rem .9rem; background: var(--panel);
  border: 1px solid var(--line); border-left: 4px solid #e0a030; border-radius: 10px; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); transition: box-shadow .12s, transform .12s; }
.billrow:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.billrow small { display: block; color: var(--muted); font-weight: 400; }
.billrow .d { font-weight: 700; }
.billrow .t { overflow-wrap: anywhere; }
.billrow .s { text-align: right; }
.billrow.st-draft { border-left-color: var(--brand); }
.billrow.st-billed { border-left-color: #33b679; }
.billrow.st-no_charge { border-left-color: var(--muted); }
.badge { display: inline-block; padding: .1rem .5rem; border-radius: 999px; background: var(--soft); font-size: .8rem; font-weight: 700; white-space: nowrap; }
.badge.big { font-size: .9rem; padding: .2rem .7rem; }
.badge.st-unbilled { background: var(--warn-bg); color: var(--warn-ink); }
.badge.st-billed { background: var(--ok-bg); color: var(--ok-ink); }
.badge.st-draft { background: var(--brand-soft); color: var(--brand); }
.billhead h2 { font-size: 1.15rem; margin: .5rem 0 .2rem; }
form.bill { max-width: 900px; }
table.grid.lines { min-width: 560px; }
table.grid.lines td:first-child input { width: 100%; }
table.grid.lines select.disc { width: auto; min-width: 6.2rem; }
.pill.off { background: var(--ok-bg); color: var(--ok-ink); }
table.grid .right, .right { text-align: right; }
.linetotal { font-variant-numeric: tabular-nums; white-space: nowrap; }
#bill-total { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) { .billrow { grid-template-columns: 1fr auto; } .billrow .d { grid-column: 1 / -1; } }

/* Job type cards + Shopify product pickers */
.jobcards { display: grid; gap: .8rem; grid-template-columns: 1fr; }
@media (min-width: 1000px) { .jobcards { grid-template-columns: 1fr 1fr; } }
.jobcard { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem .8rem; background: var(--bg); min-width: 0; }
.jobcard.new { border-style: dashed; }
.jobcard.off { opacity: .6; }
.jc-head { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.jc-head .jc-name { flex: 1 1 12rem; font-weight: 700; }
label.inline { display: inline-flex; align-items: center; gap: .35rem; margin: 0; font-weight: 500; white-space: nowrap; }
label.inline input[type=checkbox] { width: 1.1rem; height: 1.1rem; }
input.tiny { width: 4.5rem !important; min-height: 36px !important; }
.jc-grid { display: grid; gap: 0 .7rem; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.jc-grid label, .jobcard label.kw { font-size: .85rem; margin: .5rem 0 0; }
.jc-grid input, .jc-grid select, .jobcard .kw input { margin-top: .2rem; min-height: 38px; }
.picker { margin-top: .6rem; font-size: .9rem; display: flex; flex-wrap: wrap; gap: .2rem .6rem; align-items: baseline; }
.picker .picker-box { flex-basis: 100%; position: relative; }
.picker-box .results { position: absolute; left: 0; right: 0; z-index: 15; background: var(--panel); box-shadow: 0 6px 20px rgba(0, 0, 0, .18); }
#bill-product-box { position: relative; margin-top: .4rem; max-width: 520px; }
small.v-show { display: block; color: var(--brand); margin-top: .15rem; }
.badge.st-untracked { background: var(--soft); color: var(--muted); }
.billrow.st-untracked { border-left-color: var(--line); opacity: .8; }
.conflicts .blockline { background: var(--soft); color: var(--ink); }
.owntoggle { margin: -.25rem 0 .25rem; }
.owntoggle label.check { margin: 0; font-size: .9rem; }

/* Month view: hover preview */
.mday { position: relative; overflow: visible; }
.mday:hover, .mday:focus-visible { z-index: 31; }
.mday .peek { display: none; position: absolute; top: calc(100% - 6px); left: 6px; z-index: 30; width: 320px; max-width: 80vw;
  flex-direction: column; gap: .3rem; padding: .6rem .7rem; background: var(--panel); color: var(--ink); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 10px 28px rgba(0, 0, 0, .25); pointer-events: none; }
.mday .peek.left { left: auto; right: 6px; }
@media (hover: hover) and (min-width: 641px) {
  .mday:hover .peek, .mday:focus-visible .peek { display: flex; }
}
.peek-h { font-weight: 700; font-size: .85rem; margin-bottom: .1rem; }
.peek-all { font-size: .78rem; color: var(--muted); }
.peek-row { display: grid; grid-template-columns: auto auto 1fr; gap: .4rem; align-items: baseline; font-size: .8rem; line-height: 1.3; }
.peek-row .dot { width: .55rem; height: .55rem; margin: 0; align-self: center; }
.peek-row .pt { color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.peek-row .pn { overflow-wrap: anywhere; }

/* Todo */
.todo-add { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; max-width: none; }
.todo-add input[name=title] { flex: 1 1 18rem; }
.todo-add select, .todo-add input[type=date] { width: auto; flex: 0 1 auto; }
.schedtabs { margin: 0 0 .9rem; }
.tabs-sep { flex-basis: 1px; width: 1px; background: var(--line); margin: 0 .3rem; }
.todos { list-style: none; margin: .5rem 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.todo { display: flex; gap: .7rem; align-items: flex-start; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 10px; padding: .65rem .85rem; box-shadow: var(--shadow); }
.todo.high { border-left-color: #e0a030; }
.todo.due-overdue { border-left-color: var(--err-ink); }
.todo.done { opacity: .6; }
.todo.done .todo-title { text-decoration: line-through; }
.todo form { margin: 0; }
.tick { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--muted); background: transparent; color: var(--ok-ink); font-weight: 800; cursor: pointer; flex: none; margin-top: .1rem; }
.tick:hover { border-color: var(--brand); background: var(--soft); }
.todo.done .tick { background: var(--ok-bg); border-color: var(--ok-ink); }
.todo-body { flex: 1; min-width: 0; color: var(--ink); text-decoration: none; display: flex; flex-direction: column; gap: .15rem; }
.todo-title { font-weight: 600; overflow-wrap: anywhere; }
.todo-title .pri { color: #e0a030; }
.todo-notes { color: var(--muted); font-size: .88rem; overflow-wrap: anywhere; }
.todo-meta { display: flex; flex-wrap: wrap; gap: .3rem .6rem; font-size: .8rem; align-items: center; }
.chip { background: var(--soft); border-radius: 999px; padding: .05rem .5rem; font-weight: 600; }
.chip.muted { font-weight: 400; }
.todo.due-overdue .due { color: var(--err-ink); font-weight: 700; }
.todo.due-today .due { color: var(--warn-ink); font-weight: 700; }
.todo-side { margin-top: .5rem; }
.danger-link { color: var(--err-ink); }
table.grid.small-grid { min-width: 520px; }

/* Auto-refresh offer */
.livebar { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 50; display: flex; gap: .8rem; align-items: center;
  background: var(--panel); color: var(--ink); border: 1px solid var(--brand); border-radius: 999px; padding: .4rem .5rem .4rem 1rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); max-width: calc(100vw - 2rem); }

.offline { margin: 0 0 .4rem; padding: .3rem .5rem; border-radius: 6px; background: var(--warn-bg); color: var(--warn-ink); font-size: .85rem; font-weight: 600; }
.mday .offm { font-size: .72rem; color: var(--warn-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.okline { color: var(--ok-ink); font-weight: 600; }
.report { background: var(--ok-bg); color: var(--ink); border-radius: 8px; padding: .5rem .7rem; margin: .5rem 0; }
.report p { margin: .3rem 0 0; }
.myjob { position: relative; background: var(--panel); border: 1px solid var(--line); border-left: 4px solid var(--tc, var(--brand)); border-radius: var(--radius); padding: .85rem .95rem; margin-bottom: .75rem; box-shadow: var(--shadow); }
.myjob .myedit { position: absolute; top: .5rem; right: .5rem; min-height: 34px; }
.myjob:has(.myedit) .big, .myjob:has(.myedit) > div:first-of-type { padding-right: 4.5rem; }
.myjob.done { box-shadow: none; background: transparent; }
.myjob.done .big { color: var(--muted); }
.myjob .big { font-size: 1.12rem; font-weight: 650; letter-spacing: -.01em; margin: .1rem 0; }
.myjob .when { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.myjob .addr { color: var(--muted); font-size: .9rem; }
.myjob .notes-line { margin: .5rem 0 0; padding: .45rem .65rem; background: var(--soft); border-radius: 8px; font-size: .9rem; }
.myjob .btns { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .75rem; }
.custlist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.custlist a { display: block; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .85rem; color: var(--ink); text-decoration: none; box-shadow: var(--shadow); }
.custlist small { display: block; color: var(--muted); }
.hist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.hist li { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .55rem .75rem; }
.hist .when { font-weight: 700; }
.hist.possible li { border-style: dashed; }
/* Product search on bills / job reports: sits below the lines table (whose sideways scroll box would
   clip a floating list) and pushes the page down instead of floating over it. */
#bill-product-box { position: static; margin: .5rem 0 0; max-width: 560px; }
#bill-product-box .results { position: static; box-shadow: none; margin-top: .3rem; }

form[data-parts-mode] #bill-product-box { margin: .2rem 0 .6rem; }
form[data-parts-mode] #bill-product-box label { margin-top: 0; }

/* Leads */
.sr { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.leadsearch input { min-width: 16rem; }
@media (max-width: 640px) { .leadsearch, .leadsearch input { width: 100%; min-width: 0; } }
.leadstats { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .8rem; }
.leadstats { gap: .6rem; }
.leadstats > * { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .9rem; color: var(--muted); text-decoration: none; font-size: .86rem; box-shadow: var(--shadow); }
.leadstats b { display: block; color: var(--ink); font-size: 1.15rem; font-weight: 700; letter-spacing: -.01em; }
.leadstats b { font-variant-numeric: tabular-nums; }
.leadstats .hot { border-color: #e0a030; background: var(--warn-bg); color: var(--warn-ink); }
.leadadd { max-width: none; }
.leadadd summary { cursor: pointer; padding: .2rem 0; }
.leadadd .row2 { grid-template-columns: 1fr; }
@media (min-width: 520px) { .leadadd .row2 { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .leadadd .row2 { grid-template-columns: repeat(3, 1fr); } }
.tick.call { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; color: var(--brand); border-color: var(--brand); font-weight: 400; }
.lead.stage-won { border-left-color: #33b679; }
.lead.stage-lost { opacity: .65; }
.lead.due-today:not(.due-overdue) { border-left-color: #e0a030; }
.leadval { font-weight: 700; color: var(--ok-ink); font-variant-numeric: tabular-nums; }
.chip.stage { background: var(--brand); color: var(--brand-ink); }
.lead.stage-won .chip.stage { background: #33b679; color: #fff; }
.lead.stage-lost .chip.stage { background: var(--muted); color: var(--panel); }
.lead.due-soon .due { color: var(--ink); }
.leadcontact { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.leadcontact .due { font-weight: 700; font-size: .9rem; }
.leadcontact .due.overdue { color: var(--err-ink); }
.leadcontact .due.today { color: var(--warn-ink); }
.leadlog h2 { margin-bottom: .5rem; }
.leadhist { max-width: 720px; }
.leadhist li { padding: .45rem .7rem; }
.leadhist li div { margin-top: .15rem; overflow-wrap: anywhere; }
.leadhist .k-stage, .leadhist .k-created { background: var(--soft); border-style: dashed; font-size: .9rem; }
.leadadd-go { margin-top: .8rem; }
.jobcheck form { margin-top: .5rem; }
.jobcheck tr.k-mismatch td:nth-child(2) { color: var(--err-ink); font-weight: 700; }

/* Needs tidying */
.onlinebar { margin: 0; background: var(--ok-bg); color: var(--ok-ink); border-bottom: 1px solid var(--line); padding: .5rem 1rem; text-align: center; }
.onlinebar a { font-weight: 600; color: inherit; }
.tidybar { display: block; background: var(--warn-bg); color: var(--warn-ink); border-bottom: 1px solid var(--warn-line); padding: .5rem 1rem; font-weight: 600; text-decoration: none; text-align: center; }
.srcbar { margin: 0; background: var(--soft); color: var(--muted); padding: .3rem 1rem; font-size: .85rem; text-align: center; }
.tidy { background: var(--panel); border: 1px solid var(--line); border-left: 4px solid #e0a030; border-radius: 10px; padding: .7rem .8rem; margin-bottom: .7rem; max-width: 760px; }
.tidy .kind { font-weight: 700; color: var(--warn-ink); font-size: .85rem; }
.tidy .vs { display: grid; grid-template-columns: 1fr; gap: .5rem; margin: .5rem 0; }
@media (min-width: 640px) { .tidy .vs { grid-template-columns: 1fr 1fr; } }
.tidy .vs > div { background: var(--soft); border-radius: 8px; padding: .45rem .6rem; font-size: .9rem; overflow-wrap: anywhere; }
.tidy .vs b { display: block; font-size: .78rem; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.tidy .btns { display: flex; flex-wrap: wrap; gap: .4rem; }
.tidy .btns form { margin: 0; }

/* Sign-in (crm.laps-supply.com) */
body.bare main.signin { max-width: 420px; margin: 8vh auto 2rem; padding: 0 16px; }
.signin .brand { font-weight: 700; color: var(--brand); margin: 0 0 1rem; }
.signin form.panel .btn { margin-top: .8rem; width: 100%; }
.signin .errors { margin-bottom: .8rem; }

/* Platform admin panel */
.acct-save { margin-top: .6rem; }
table.people td { vertical-align: middle; }
table.people .inline-edit { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin: 0; }
table.people .inline-edit input { width: auto; flex: 1 1 10rem; min-height: 36px; padding: .3rem .5rem; }
table.people select { width: auto; min-height: 36px; padding: .2rem .4rem; }
table.people form { margin: 0; }
table.people tr.placeholder td:first-child { border-left: 3px solid #e0a030; }
table.people tr.disabled { opacity: .6; }
.rowacts { white-space: nowrap; }
.rowacts form { display: inline; margin-right: .6rem; }
.chip.status-active { background: var(--ok-bg); color: var(--ok-ink); }
.chip.status-trial, .chip.status-setup { background: var(--soft); }
.chip.status-past_due { background: var(--warn-bg); color: var(--warn-ink); }
.chip.status-suspended, .chip.status-cancelled { background: var(--err-bg); color: var(--err-ink); }
.panel pre { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--soft); padding: .5rem .6rem; border-radius: 6px; }
.addco { margin-top: 1rem; }
.steps { margin: .4rem 0 .6rem; padding-left: 1.2rem; }
.steps li { margin: .25rem 0; }
.reconnect summary { cursor: pointer; color: var(--brand); margin: .5rem 0; }

/* Job photos */
.photogrid { display: flex; flex-wrap: wrap; gap: .5rem; margin: .3rem 0 .6rem; }
.photogrid figure { position: relative; margin: 0; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; background: var(--soft); }
.photogrid img { width: 96px; height: 96px; object-fit: cover; display: block; }
.photogrid figure.uploading img { opacity: .45; }
.photogrid figure.uploading::after { content: "…"; position: absolute; inset: 0; display: grid; place-items: center; font-weight: 700; color: var(--ink); }
.photo-del { position: absolute; top: 3px; right: 3px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; cursor: pointer; font-size: .8rem; }
.photo-add { cursor: pointer; }
.photostrip { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0 .2rem; align-items: center; }
.photostrip img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; display: block; }

#colors label.inline { display: inline-flex; align-items: center; gap: .4rem; margin: .3rem .8rem .3rem 0; font-weight: 600; }
#colors select { width: auto; }
#colors .recolor { margin-top: .7rem; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }

/* Customer photo page + link */
body.bare main.sharepage { max-width: 900px; margin: 2rem auto; padding: 0 16px; }
.sharephotos { display: grid; grid-template-columns: 1fr; gap: .8rem; margin-top: 1rem; }
@media (min-width: 700px) { .sharephotos { grid-template-columns: 1fr 1fr; } }
.sharephotos img { width: 100%; height: auto; border-radius: 10px; display: block; background: var(--soft); }
.linkrow { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin: .4rem 0; }
.linkrow input { flex: 1 1 18rem; min-height: 36px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .85rem; }
#photo-link { margin-top: 1.2rem; }
.breakline { margin: .3rem 0; padding: .3rem .6rem; border-radius: 8px; background: var(--soft); color: var(--muted); font-size: .85rem; font-weight: 600; }
.simple-upload { margin-top: 1rem; }
.simple-upload summary { cursor: pointer; color: var(--brand); }
.simple-upload input[type=file] { margin: .4rem 0; }
.danger-zone { border-color: var(--err-ink); }
.danger-zone summary { cursor: pointer; margin-top: .6rem; }
.danger-zone label { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.danger-zone label input { width: auto; }
/* Inside the Shopify admin */
body.shopify-frame main.shopapp { max-width: 760px; margin: 1rem auto; padding: 0 16px; }
.checklist { list-style: none; padding: 0; margin: .3rem 0; }
.checklist li { padding: .25rem 0 .25rem 1.6rem; position: relative; }
.checklist li::before { content: "○"; position: absolute; left: .2rem; color: var(--muted); }
.checklist li.done::before { content: "✓"; color: var(--ok-ink); font-weight: 700; }

/* Water testing */
.inrow { display: flex; gap: .4rem; align-items: center; }
.pickup-add { margin: .6rem 0 0; } .inrow select { width: auto; flex: none; }
select.auto { width: auto; }
.wfind { margin: .2rem 0 .6rem; } .wfind .grow { flex: 1 1 18rem; }
.wnew { margin-top: .8rem; } .wnew summary, .wideals summary { cursor: pointer; padding: .2rem 0; }
.wgrid { display: grid; gap: .6rem .9rem; grid-template-columns: repeat(auto-fill, minmax(13rem, 1fr)); margin-top: .5rem; }
@media (max-width: 640px) { .wgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem .6rem; } .wfield { justify-content: flex-end; } .wfield .hint { display: block; } }
.wfield { display: flex; flex-direction: column; gap: .25rem; margin: 0; font-weight: 550; font-size: .88rem; }
.wfield .hint { font-weight: 400; font-size: .78rem; }
.wtest h3 { margin-top: 1.1rem; }
.wtest .actions { margin-top: 1rem; }
.wbodies { display: grid; gap: .7rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); margin-bottom: 1rem; }
.wbodycard { display: flex; gap: .8rem; align-items: center; padding: .85rem 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: box-shadow .12s, transform .12s; }
.wbodycard:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.wbodycard small { display: block; color: var(--muted); font-size: .82rem; }
.wicon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--brand-soft); color: var(--brand); font-size: 1.3rem; }
.kind-spa .wicon, .kind-swim_spa .wicon { background: #fdeee4; color: #c2410c; }
.wrecent { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.wrecent a { display: flex; gap: .8rem; align-items: center; padding: .55rem .8rem; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.wrecent small { display: block; color: var(--muted); font-size: .8rem; font-weight: 400; }
.wrecent .d { min-width: 3.6rem; font-weight: 650; }
.whist { border-collapse: collapse; width: 100%; background: var(--panel); font-size: .88rem; font-variant-numeric: tabular-nums; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.whist th { text-align: left; font-size: .75rem; font-weight: 650; color: var(--muted); padding: .45rem .55rem; background: var(--soft); white-space: nowrap; }
.whist td { padding: .4rem .55rem; border-top: 1px solid var(--line); white-space: nowrap; }
.whist td.st-ok { color: var(--ok-ink); } .whist td.st-low { color: #b45309; font-weight: 650; } .whist td.st-high { color: var(--err-ink); font-weight: 650; }
.wremove { margin-top: .8rem; }
.whelpers { display: grid; gap: .5rem; margin: .8rem 0 .2rem; }
.whelp { border: 1px dashed var(--line); border-radius: 10px; padding: .55rem .8rem; }
.whelp summary { cursor: pointer; }
.whelp .row2 { margin-top: .3rem; } .whelp input.num { width: 8rem; } .whelp .actions { margin-top: .6rem; }
.wdose { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin: .8rem 0 .3rem; }
.wdose input.num { width: 6.5rem; } .wdose select { width: auto; }
.wproduct:has(input[name=mode][value=fixed]:checked) .wchange { display: none; }
.wlevels { display: none; } .wproduct:has(#wp-param option[data-level]:checked) .wlevels { display: flex; } /* conditions only: Light / Heavy doses */
.wlevels label { display: inline-flex; align-items: center; gap: .35rem; margin: 0; }
.wideals { margin-top: .8rem; } .wideals input.num { width: 6rem; }
.wreg { margin-top: .9rem; padding: .7rem .85rem; border: 1px dashed var(--line); border-radius: 10px; }
.wreg .check { margin: 0; }
.wreg:not(:has(input[name=registered]:checked)) .wreg-fields { display: none; } /* shown once "Sold by us" is ticked */
.wreg-fields input.num { width: 6rem; }
.wregline { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: -.3rem 0 1rem; font-size: .9rem; }
.wbodycard small .pill { font-size: .68rem; }
.pill.reg { background: var(--ok-bg); color: var(--ok-ink); } .pill.reg.off { background: var(--soft); color: var(--muted); }
/* The report */
.wreport-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: 1rem; }
.wreport-bar .actions form { margin: 0; }
.wreport { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.6rem 1.8rem; max-width: 900px; }
.wr-head { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; font-size: .88rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.wr-co { font-size: 1.05rem; } .wr-meta { display: flex; flex-direction: column; align-items: flex-end; color: var(--muted); }
.wr-cust { text-align: center; margin: 1.1rem 0 .2rem; font-size: 1.5rem; text-transform: uppercase; letter-spacing: .02em; }
.wr-body { text-align: center; color: var(--muted); margin: 0 0 1rem; }
.wr-h { text-align: center; font-weight: 500; font-size: 1.1rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 1.4rem 0 .7rem; }
.wr-tables { display: grid; gap: 1rem; grid-template-columns: 1fr; }
@media (min-width: 760px) { .wr-tables { grid-template-columns: 1fr 1fr; } }
.wres { border-collapse: collapse; width: 100%; font-size: .88rem; border: 1px solid var(--line); }
.wres th { text-align: left; font-size: .78rem; font-weight: 700; padding: .4rem .55rem; border-bottom: 1px solid var(--line); }
.wres td { padding: .4rem .55rem; border-top: 1px solid var(--line); }
.wres td.v { font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wres td.m { width: 2rem; text-align: center; }
.wmark { display: inline-grid; place-items: center; width: 1.45rem; height: 1.45rem; border-radius: 50%; font-weight: 800; font-size: .85rem; }
.st-ok .wmark { background: var(--ok-bg); color: var(--ok-ink); }
.st-low .wmark { background: #fef3c7; color: #b45309; }
.st-high .wmark { background: var(--err-bg); color: var(--err-ink); }
.wr-extra { margin: .7rem 0 0; font-size: .9rem; color: var(--muted); }
.wr-ok { color: var(--ok-ink); font-weight: 600; text-align: center; }
.wr-treat { margin: 0 0 1rem; }
.wr-treat h3 { text-transform: none; letter-spacing: 0; font-size: 1rem; font-style: italic; color: var(--ink); margin: 0 0 .2rem; }
.wr-treat p { margin: .15rem 0; }
.wr-dose b { font-size: 1.05rem; }
.wr-note p { font-weight: 600; }
.wreport .whist { margin-top: .3rem; }
.wr-fine { margin: 1.6rem 0 0; font-size: .72rem; color: var(--muted); line-height: 1.4; }
@media print {
  body { background: #fff; color: #000; font-size: 12px; }
  header.top, .noprint, .tidybar, .onlinebar, .flash, .livebar { display: none !important; }
  main { padding: 0; max-width: none; }
  .wreport { border: 0; box-shadow: none; padding: 0; max-width: none; }
  .wr-tables { grid-template-columns: 1fr 1fr; }
  a { color: inherit; text-decoration: none; }
  .wr-treat, .wres, .whist tr { break-inside: avoid; }
  .wr-h { break-after: avoid; }
}

/* ---- Service plans ---- */
.flash.bad { background: var(--err-bg); color: var(--err-ink); }
fieldset.plandays { border: 0; padding: 0; margin: 0 0 .8rem; background: none; box-shadow: none; border-radius: 0; display: flex; flex-wrap: wrap; gap: .35rem; }
fieldset.plandays > legend { font-weight: 600; font-size: .9rem; margin-bottom: .3rem; padding: 0; }
.daychip { display: inline-flex; align-items: center; cursor: pointer; margin: 0; }
.daychip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.daychip span { display: inline-block; min-width: 3rem; text-align: center; padding: .35rem .6rem; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-weight: 600; font-size: .9rem; color: var(--muted); }
.daychip input:checked + span { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.daychip input:focus-visible + span { outline: 2px solid var(--brand); outline-offset: 2px; }
.planform select[data-plan-variant] { max-width: 100%; }
.planst { text-transform: none; }
.planst.st-paused { background: var(--warn-bg); color: var(--warn-ink); }
.planst.st-ended { background: var(--soft); color: var(--muted); }
.planacts { margin: 0 0 1rem; }
.planacts form { display: inline; }
.plancols { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
.plancols .panel { max-width: none; }
@media (min-width: 900px) { .plancols { grid-template-columns: 1fr 1fr; } }
.planvisits { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); gap: .3rem .8rem; }
.planvisits li { display: flex; align-items: center; gap: .35rem; white-space: nowrap; }
.planline { margin: .2rem 0 .6rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.planline .pill { font-size: .8rem; padding: .2rem .6rem; text-decoration: none; }
table.planbill td.rowacts form { display: inline; margin: 0 .4rem 0 0; }

/* ---- Settings tabs ---- */
.settabs { margin-bottom: .5rem; }
@media (max-width: 700px) { .settabs { display: flex; flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: none; } .settabs a { white-space: nowrap; } }
.setpanel > :first-child, .setpanel > form:first-child > :first-child, .setpanel > form:first-child > input[type=hidden] + * { margin-top: 0; }
.settabhint { margin: 0 0 1rem; max-width: 720px; }
.setpanel { padding-top: .5rem; }
#wq-out.loading { opacity: .6; transition: opacity .15s; }
.planvisits li.clash { grid-column: 1 / -1; flex-wrap: wrap; white-space: normal; }
.planvisits li.clash small { flex-basis: 100%; color: var(--warn-ink); font-size: .8rem; }
.planfit { margin: .2rem 0 .9rem; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.planfit.loading { opacity: .6; }
.fitcap { margin: 0 0 .4rem; font-size: .85rem; color: var(--muted); }
.fitcap b { color: var(--ink); }
table.fitgrid { border-collapse: collapse; font-size: .85rem; width: 100%; }
table.fitgrid th, table.fitgrid td { padding: .25rem .4rem; text-align: center; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.fitgrid th:first-child { text-align: left; }
table.fitgrid th { font-weight: 600; color: var(--muted); font-size: .78rem; }
table.fitgrid tr.picked th:first-child .linkbtn { font-weight: 700; }
table.fitgrid tr.picked { background: var(--brand-soft); }
.fit-ok { color: var(--ok-ink); font-weight: 700; }
.fit-alt { color: var(--warn-ink); font-weight: 600; }
.fit-full { color: var(--err-ink); font-weight: 700; }
.fit-off, .fit-closed, .fit-past { color: var(--muted); }
.fit-score { color: var(--muted); text-align: right !important; }
.fit-score.all { color: var(--ok-ink); font-weight: 600; }

/* ---- Water-test jobs ---- */
.wtestsum h2 small { font-size: .75rem; }
.wadd { margin: 0; padding-left: 1.1rem; }
.wadd li { margin: .25rem 0; }
.chemrows { display: grid; gap: .5rem; margin-bottom: .6rem; }
.chemrow { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; padding: .5rem; border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.chemrow .chem-pick { flex: 1 1 14rem; min-width: 0; margin: 0; }
.chemqty { display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; }
.chemqty .qty { width: 5rem; margin: 0; }
.chem-total { margin-left: auto; font-weight: 600; min-width: 4rem; text-align: right; }
.chem-unit { color: var(--muted); font-size: .85rem; }
.dayhead .actions form { display: inline; margin: 0; }
.convrow { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-bottom: .6rem; }
.convrow input.num { width: 6rem; margin: 0; }

/* ---- Bills moved onto another job ---- */
.badge.st-moved { background: var(--brand-soft); color: var(--brand); }
.billrow.st-moved { border-left-color: var(--brand); opacity: .85; }
.movedbox { border-left: 4px solid var(--brand); }
.movebill { margin: .6rem 0 1rem; padding: .6rem .8rem; border: 1px dashed var(--line); border-radius: 10px; }
.movebill summary { cursor: pointer; font-weight: 600; }
.wr-histwrap { max-width: 100%; overflow-x: auto; }
.wr-histwrap .whist { width: 100%; }
.wr-histwrap .whist th, .wr-histwrap .whist td { white-space: nowrap; }
.wr-histkey { margin-top: .3rem; font-size: .75rem; }

/* ---- Report logo + barcodes ---- */
.wr-head { align-items: center; }
.wr-logo { max-width: 200px; max-height: 72px; object-fit: contain; }
.wr-coblock { flex: 1; }
.wr-treat.has-code::after { content: ""; display: block; clear: both; }
.wr-code { float: right; margin: 0 0 .4rem 1rem; text-align: center; background: #fff; padding: 4px 6px; border-radius: 4px; }
.wr-code img { display: block; height: 38px; max-width: 180px; }
.wr-code figcaption { font-size: .7rem; color: #3b4650; letter-spacing: .05em; }
.brandrow { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: .6rem; }
.logobox { width: 220px; height: 90px; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--line); border-radius: 10px; background: #fff; }
.logobox img { max-width: 200px; max-height: 80px; }
.logobox.wide { width: 100%; max-width: 560px; height: auto; border: 0; background: none; margin: .4rem 0 .6rem; }
.logobox.wide img { max-width: 100%; max-height: none; border-radius: 4px; }
textarea.code { font: 12px/1.4 ui-monospace, Menlo, Consolas, monospace; width: 100%; }
/* A previous visit's bill attached to this job */
.carriednote { background: var(--brand-soft); color: var(--ink); border-left: 4px solid var(--brand); padding: .5rem .8rem; border-radius: 8px; margin: .3rem 0 .8rem; }
#carried { margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--line); }
.carried-h { margin: 0 0 .2rem; font-weight: 650; font-size: .85rem; }
.carried-total { display: flex; justify-content: space-between; margin: .3rem 0 0; font-weight: 600; }
.syncform { margin: 0; }

/* ---- Saved on the phone, waiting for signal ---- */
#outbox-pill { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 50; width: max-content; max-width: min(560px, calc(100% - 24px));
  background: var(--panel); color: var(--ink); border: 1px solid var(--brand); border-radius: 12px; box-shadow: var(--shadow-lg); padding: .5rem .8rem; font-size: .88rem; }
#outbox-pill p { margin: .15rem 0; }
#outbox-pill p.bad { color: var(--err-ink); }
#photo-grid figure.waiting { opacity: .55; outline: 2px dashed var(--brand); }

/* ---- "Add to home screen" ---- */
.installbar { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .8rem; background: var(--brand-soft); border: 1px solid var(--brand); border-radius: var(--radius); padding: .6rem .8rem; margin-bottom: .9rem; }
.installbar p { margin: 0; flex: 1 1 16rem; }
@media (display-mode: standalone) { .top { padding-top: max(.55rem, env(safe-area-inset-top)); } }
.people .rowacts form + form { margin-left: .8rem; }

/* Booking links: the customer's page (no sign-in) */
.booklink { max-width: 620px; margin: 0 auto; }
/* Not the job form's two-column (side panel) layout: one roomy card. */
.booklink form.job { display: block; max-width: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.1rem 1.25rem 1.25rem; }
.booklink form.job .actions { margin-top: 1rem; }
.booklink .panel { margin-top: .5rem; }
@media (max-width: 480px) { .booklink form.job { padding: .9rem .9rem 1rem; } }
.bookhead { margin-bottom: 1rem; } .bookhead img { max-width: 200px; max-height: 72px; display: block; }
.booksteps { display: flex; gap: 1rem; list-style: none; padding: 0; margin: .4rem 0 1rem; font-size: .9rem; color: var(--muted); counter-reset: s; }
.booksteps li { counter-increment: s; } .booksteps li::before { content: counter(s) ". "; } .booksteps li[aria-current] { color: var(--ink); font-weight: 600; }
.slotlist { display: grid; gap: .45rem; margin: .6rem 0 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.slotlist label.check { margin: 0; padding: .65rem .85rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); font-weight: 500; color: var(--ink); cursor: pointer; }
.slotlist .slotwin { display: block; font-size: .88rem; color: var(--muted); font-weight: 400; }
.slotlist label.check:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 30%, transparent); }
.tag { display: inline-block; font-size: .72rem; font-weight: 600; padding: .05rem .45rem; border-radius: 999px; background: var(--brand-soft); color: var(--brand); vertical-align: middle; }

/* Reports */
.repform { margin-bottom: 1rem; max-width: none; }
.repgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: .2rem 1rem; }
.repgrid label { margin-top: .4rem; }
.repdates { display: none; } .repform:has(#rp-range option[value=custom]:checked) .repdates { display: block; }
.repfilter { margin-top: .8rem; } .repfilter summary { cursor: pointer; font-weight: 600; }
.repfilter fieldset { display: flex; flex-wrap: wrap; gap: 0 1.2rem; margin-top: .6rem; } .repfilter fieldset legend { width: 100%; }
.repfilter label.check.plain { margin-top: .35rem; }
.repsum { margin: .5rem 0; }
table.report th[scope=row] { text-align: left; font-weight: 500; position: sticky; left: 0; background: var(--panel); min-width: 10rem; }
table.report .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
table.report tfoot th, table.report tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.repactions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: 1rem; }
.repactions form.inline { display: flex; gap: .4rem; flex-wrap: wrap; } .repactions input[name=name] { width: 16rem; max-width: 100%; }
.savedreps { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 .8rem; }
.savedreps .chip { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); padding: .15rem .3rem .15rem .75rem; }
.savedreps .chip.on { border-color: var(--brand); background: var(--brand-soft); }
.savedreps .chip a { text-decoration: none; font-weight: 600; color: var(--ink); }
.savedreps .chip form { margin: 0; } .savedreps .chipx { border: 0; background: none; color: var(--muted); font-size: 1.1rem; cursor: pointer; padding: 0 .35rem; }

.reptabs { margin-bottom: .8rem; flex-wrap: wrap; }
.repchecks { display: flex; flex-wrap: wrap; gap: 0 1.5rem; } .repchecks label.check.plain { margin-top: .6rem; }
.repchart { display: block; width: 100%; max-width: 640px; height: auto; margin: .4rem 0 .8rem; }
.repchart rect.pos { fill: var(--brand); } .repchart rect.neg { fill: var(--warn-line); } .repchart g:hover rect { opacity: .8; }
.repchart text { font-size: 14px; fill: var(--muted); } .repchart text.val { fill: var(--ink); font-weight: 600; }
table.report td.num a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--muted); }
table.report td.num a:hover { color: var(--brand); border-bottom-color: var(--brand); }
table.report td.chg.up { color: var(--ok-ink); } table.report td.chg.down { color: var(--err-ink); }
.repactions form.repsave { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; flex: 1 1 auto; }
.repactions form.repsave > input, .repactions form.repsave > select { width: auto; flex: 1 1 12rem; max-width: 17rem; }

/* Book online page: a field only bots fill in */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Water trend charts */
.wtrends { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: .8rem; margin: .4rem 0 1.2rem; }
.wtrendbox { margin: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .7rem .3rem; }
.wtrendbox figcaption { font-size: .9rem; margin-bottom: .2rem; }
.wtrend { display: block; width: 100%; height: auto; }
.wtrend .band { fill: var(--ok-bg); }
.wtrend .line { fill: none; stroke: var(--brand); stroke-width: 2; }
.wtrend .pt { fill: var(--brand); stroke: var(--panel); stroke-width: 1.5; }
.wtrend .pt.low, .wtrend .pt.high { fill: var(--err-ink); }
.wtrend .axis { font-size: 10px; fill: var(--muted); }
.wtrendbox .pill.ok { background: var(--ok-bg); color: var(--ok-ink); } .wtrendbox .pill.low, .wtrendbox .pill.high { background: var(--err-bg); color: var(--err-ink); }

/* Truck stock */
.lowstock { border-left: 4px solid var(--warn-line); } .lowstock ul { margin: .3rem 0 0; padding-left: 1.1rem; }
.stocktable input.num { width: 6.5rem; } .stocktable tr.low th { color: var(--warn-ink); } .stocktable b.neg { color: var(--err-ink); }
.stocktable .pill.low { background: var(--warn-bg); color: var(--warn-ink); }

/* Quotes */
.pill.qst-draft { background: var(--soft); color: var(--muted); } .pill.qst-sent { background: var(--brand-soft); color: var(--brand); }
.pill.qst-accepted { background: var(--ok-bg); color: var(--ok-ink); } .pill.qst-declined, .pill.qst-cancelled, .pill.qst-expired { background: var(--err-bg); color: var(--err-ink); }
h1 .pill { vertical-align: middle; font-size: .8rem; }
.quotecard { margin-top: .6rem; } .qlines { width: 100%; border-collapse: collapse; }
.qlines td { padding: .45rem 0; border-bottom: 1px solid var(--line); vertical-align: top; } .qlines td.num { text-align: right; white-space: nowrap; padding-left: 1rem; }
.qlines tr.qtotal td { font-weight: 700; border-bottom: 0; padding-top: .7rem; } .qnote { margin: .8rem 0 .4rem; }
.qsend { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.qsend form.inline { display: inline-flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0; }
.qsend form.inline input[type=email] { width: 16rem; max-width: 100%; }
.stocktable tr.grouprow th { background: var(--soft); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.stockadd h2 { margin-top: 0; } .stockadd input.num { width: 8rem; }
/* Customer alerts (CustomerAlerts.php): banners wherever the customer comes up; the editor on the customer page. */
.custalerts { display: flex; flex-direction: column; gap: .4rem; margin: .6rem 0; }
.custalerts[hidden] { display: none; }
.custalert { margin: 0; padding: .6rem .85rem; border-radius: 10px; border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-ink); }
.custalert.sev-block { border-color: var(--err-ink); background: var(--err-bg); color: var(--err-ink); }
.custalert small { display: block; opacity: .8; font-size: .78rem; margin-top: .15rem; }
.custalerts label.check { color: var(--err-ink); }
.pill.sev-note { background: var(--warn-bg); color: var(--warn-ink); }
.pill.sev-block { background: var(--err-bg); color: var(--err-ink); }
.alertsedit h2 { margin-top: 0; }
.alertlist { list-style: none; padding: 0; margin: 0 0 .8rem; display: flex; flex-direction: column; gap: .45rem; }
.alertlist li { display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; }
.alertlist form.inline { margin: 0 0 0 auto; }
.alertlist.cleared li { opacity: .75; } .alertlist.cleared small { flex-basis: 100%; }
.alertadd .inrow { flex-wrap: wrap; gap: .3rem 1rem; margin-top: .4rem; }
.alertadd .inrow .btn { margin-left: auto; }
/* Labels (views/labels.php) */
.lbresults { border: 1px solid var(--line); border-radius: 8px; max-height: 320px; overflow: auto; margin: .3rem 0 .8rem; background: var(--panel); box-shadow: var(--shadow-lg); }
.lbhit { display: block; width: 100%; text-align: left; padding: .55rem .75rem; border: 0; border-bottom: 1px solid var(--line); background: none; color: var(--ink); cursor: pointer; font: inherit; }
.lbhit:last-child { border-bottom: 0; }
.lbhit:hover, .lbhit:focus-visible { background: var(--brand-soft); outline: none; }
.lbhit .hint { color: var(--muted); }
.lbthumb { float: left; margin-right: .5rem; border-radius: 4px; object-fit: cover; }
input.lbqty { width: 5rem; }
iframe.lbpreview { width: 100%; max-width: 420px; height: 220px; border: 1px solid var(--line); border-radius: 8px; background: var(--soft); }
/* Add-ons → Product options (views/po_set.php) */
details.poopt { border: 1px solid var(--line); border-radius: 10px; padding: 0; margin: 0 0 .5rem; background: var(--panel); }
details.poopt > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; padding: .6rem .9rem; }
details.poopt > summary::-webkit-details-marker { display: none; }
details.poopt > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
details.poopt[open] > summary::before { transform: rotate(90deg); }
details.poopt[open] > summary { border-bottom: 1px solid var(--line); background: var(--soft); border-radius: 10px 10px 0 0; }
details.poopt > :not(summary) { margin-left: .9rem; margin-right: .9rem; }
details.poopt > :last-child { margin-bottom: .9rem; }
input.pourl { font-size: .8rem; max-width: 12rem; }
.povalues input { min-width: 6rem; }
img.pothumb { width: 32px; height: 32px; object-fit: cover; border-radius: 4px; vertical-align: middle; margin-right: .3rem; }
.porules { margin-top: .5rem; } .porules summary { cursor: pointer; }
.stickyactions { position: sticky; bottom: 0; background: var(--panel); padding: .6rem 0; border-top: 1px solid var(--line); }
/* Add-ons → Stock take (views/stocktake*.php, assets/stocktake.js) */
input.qtyin { width: 6rem; }
.stcount h1 { font-size: 1.3rem; margin: 0; }
.stscan { display: flex; gap: .5rem; align-items: stretch; }
.stscan input { flex: 1; font-size: 1.15rem; padding: .7rem .8rem; }
.stconfirm { border: 2px solid var(--brand); border-radius: var(--radius); padding: .8rem .9rem; margin: .6rem 0; background: var(--panel); }
.stconfirm p { margin: 0 0 .6rem; font-size: 1.05rem; }
.stqty { display: flex; gap: .4rem; align-items: stretch; max-width: 18rem; }
.stqty .btn { min-width: 3.2rem; font-size: 1.3rem; }
.stqty input { width: 6rem; text-align: center; font-size: 1.2rem; }
.stvideo { margin: .5rem 0; }
.stvideo video { width: 100%; max-width: 480px; max-height: 50vh; border-radius: var(--radius); background: #000; display: block; margin-bottom: .4rem; }
#st-msg .btn { margin-left: .4rem; }
/* Add-ons: the sidebar (views/_addontabs.php) */
.addons { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.addonnav { position: sticky; top: 1rem; }
.addonnav h1 { font-size: 1.3rem; margin: .1rem 0 .4rem; }
.addongroup { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 1rem 0 .3rem; padding: 0 .65rem; }
.addonlist a { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .65rem; border-radius: 8px; color: var(--ink); text-decoration: none; font-size: .93rem; }
.addonlist a:hover { background: var(--soft); }
.addonlist a[aria-current] { background: var(--brand-soft); color: var(--brand); font-weight: 650; }
.addonlist a.sub { padding-left: 1.5rem; font-size: .86rem; color: var(--muted); }
.addonlist a.sub[aria-current] { color: var(--brand); }
.addondot { width: .5rem; height: .5rem; border-radius: 50%; background: #33b679; flex: none; }
.addonpick { display: none; }
.addonmain > .panel:first-child, .addonmain > :first-child { margin-top: 0; }
@media (max-width: 800px) {
  .addons { grid-template-columns: 1fr; gap: .4rem; }
  .addonnav { position: static; display: flex; align-items: center; gap: .75rem; }
  .addonnav h1 { margin: 0; }
  .addonlist { display: none; }
  .addonpick { display: block; flex: 1; }
  .addonpick select { width: 100%; }
}
/* A panel that folds: <details class="panel"><summary><h2>…</h2></summary> */
details.panel > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: .5rem; }
details.panel > summary::-webkit-details-marker { display: none; }
details.panel > summary h2 { margin: 0; }
details.panel > summary::after { content: '▸'; color: var(--muted); margin-left: auto; transition: transform .15s; }
details.panel[open] > summary::after { transform: rotate(90deg); }
details.panel[open] > summary { margin-bottom: .7rem; }
/* Add-ons → Google reviews (views/google_reviews.php) */
.grrow { border-top: 1px solid var(--line); padding: .7rem 0; }
.grrow.off { opacity: .6; }
.grrow p { margin: .4rem 0 0 2.6rem; white-space: normal; }
.grhead { display: flex; align-items: center; gap: .6rem; }
.grhead > span:not(.gravatar) { flex: 1; }
.grhead form { margin: 0; }
.gravatar { width: 2rem; height: 2rem; border-radius: 50%; object-fit: cover; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--brand-soft); color: var(--brand); font-weight: 700; }
.grstars { color: #f5a623; letter-spacing: .05em; }
/* LAPS CRM (Internal) inside the Shopify admin (views/shopify_internal.php) */
.shopapp .leadstats button { font: inherit; text-align: left; cursor: pointer; }
.shoplinks { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: .75rem; margin: 1rem 0; }
.shoplink { display: flex; flex-direction: column; gap: .2rem; text-align: left; padding: .85rem 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--ink); font: inherit; cursor: pointer; box-shadow: var(--shadow); }
.shoplink:hover { border-color: var(--brand); }
.shoplink b { color: var(--brand); }
.shoplink span { color: var(--muted); font-size: .88rem; }
.shoplink:disabled { opacity: .6; }
