@font-face {
  font-family: "Inter";
  src: url(vendor/inter/inter-latin-wght-normal.woff2) format("woff2-variations"), url(vendor/inter/inter-latin-wght-normal.woff2) format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}
:root {
  --bg: #f4f6f3;
  --card: #ffffff;
  --text: #1b2a1f;
  --muted: #637066;
  --border: #dde3dc;
  --primary: #2f7d32;
  --primary-dark: #22602a;
  --primary-soft: #e6f2e6;
  /* "Done", "paid", "on": stays green whatever the brand's own color is (CurbClock's primary is blue). */
  --ok: #2f7d32;
  --ok-dark: #22602a;
  --ok-soft: #e6f2e6;
  --amber: #a15c07;
  --amber-bg: #fdf2e1;
  --red: #b3261e;
  --red-bg: #fbeaea;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 40, 20, .06), 0 2px 8px rgba(20, 40, 20, .04);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); }
h1 { font-size: 24px; margin: 0 0 16px; }
h2 { font-size: 17px; margin: 0 0 12px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.hidden { display: none !important; }

/* top bar */
.topbar {
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 1000;
}
.topbar-inner {
  max-width: 1180px; margin: 0 auto; padding: 0 16px;
  display: flex; align-items: center; gap: 20px; height: 58px;
}
.brand { font-weight: 800; font-size: 20px; color: var(--primary); text-decoration: none; letter-spacing: -.3px; }
.brand span { color: var(--text); }
.brand::before { content: ""; display: inline-block; width: 1.25em; height: 1.25em; margin-right: .32em; vertical-align: -.3em; background: var(--brand-mark, url(../logo-mark.svg)) center / contain no-repeat; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a {
  text-decoration: none; color: var(--muted); padding: 7px 12px; border-radius: 8px;
  font-weight: 600; white-space: nowrap;
}
.nav a:hover { background: var(--bg); color: var(--text); }
.nav a.active { background: var(--primary-soft); color: var(--primary-dark); }
.who { font-size: 13px; color: var(--muted); white-space: nowrap; }

main { max-width: 1180px; margin: 0 auto; padding: 24px 16px 60px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.page-head h1 { margin: 0; }

/* cards & grid */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px;
}
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-side { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
@media (max-width: 860px) {
  .grid-2, .grid-3, .grid-side { grid-template-columns: 1fr; }
  .who { display: none; }
}
.stat .label { color: var(--muted); font-size: 13px; font-weight: 600; }
.stat .value { font-size: 28px; font-weight: 750; font-variant-numeric: tabular-nums; }
.stat.warn .value { color: var(--amber); }

/* forms */
label.field { display: block; margin-bottom: 14px; }
label.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 9px;
  font: inherit; color: var(--text); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
input[type=checkbox] { width: auto; }
input[type=range] { padding: 0; }
/* iPhone Safari draws date and time boxes at their own minimum width, wider than a phone's card, which pushed the
   Save button off the card and the whole page sideways (Team → "Turn on logging" reminder). Plain boxes that fit. */
input[type=date], input[type=time], input[type=datetime-local], input[type=month] {
  -webkit-appearance: none; appearance: none; display: block; min-width: 0; max-width: 100%; min-height: 44px; text-align: left;
}
input::-webkit-date-and-time-value { text-align: left; }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.row { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 140px; }
.row > .shrink { flex: 0 0 auto; min-width: 0; }
.error { color: var(--red); background: var(--red-bg); border-radius: 8px; padding: 9px 12px; margin-bottom: 12px; }
.error:empty { display: none; }

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 16px; border-radius: 9px; border: 1px solid var(--primary);
  background: var(--primary); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--primary-dark); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.secondary { background: #fff; color: var(--primary-dark); border-color: var(--border); }
.btn.secondary:hover { background: var(--bg); }
.btn.danger { background: #fff; color: var(--red); border-color: var(--border); }
.btn.link { background: none; border: none; color: var(--primary); padding: 4px 6px; }
.btn.block { width: 100%; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 6px 14px;
  font: inherit; font-size: 14px; cursor: pointer; color: var(--text);
}
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* tables */
.table-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
tr:last-child td { border-bottom: none; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #f8faf7; }
tfoot td { font-weight: 700; border-top: 2px solid var(--border); }

.badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: #eef1ee; color: var(--muted); white-space: nowrap; }
.badge.green { background: var(--ok-soft); color: var(--ok-dark); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.red { background: var(--red-bg); color: var(--red); }

.empty { text-align: center; color: var(--muted); padding: 22px 8px; }
.list-check { display: grid; gap: 6px; }
.list-check label { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.list-check .rate { max-width: 150px; margin-left: auto; padding: 6px 10px; }

/* map */
.map { height: 380px; border-radius: 10px; border: 1px solid var(--border); z-index: 0; }
.map.tall { height: 460px; }

/* auth */
.auth-wrap { max-width: 420px; margin: 7vh auto 40px; padding: 0 16px; }
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand .brand { font-size: 34px; }

/* modal */
.modal-back {
  position: fixed; inset: 0; background: rgba(15, 25, 15, .45); z-index: 2000;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal { background: #fff; border-radius: 14px; max-width: 480px; width: 100%; padding: 22px; box-shadow: 0 20px 50px rgba(0,0,0,.2); max-height: 92vh; overflow: auto; }
.secret { font: 600 22px/1.3 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg); border-radius: 8px; padding: 12px; text-align: center; letter-spacing: 1px; margin: 12px 0; user-select: all; }

.toast {
  position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%);
  background: #1f2b22; color: #fff; padding: 10px 18px; border-radius: 10px; z-index: 3000;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.loading { color: var(--muted); padding: 30px 0; text-align: center; }
.badge.blue { background: #e8f0fb; color: #1f5fa8; }
.page-head h1 .badge { vertical-align: middle; font-size: 13px; margin-left: 6px; }

/* schedule */
.week { display:grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap:10px; margin-bottom:16px; }
.day { background:var(--card); border:1px solid var(--border); border-radius:var(--radius); padding:10px; min-height:140px; }
.day.is-today { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.day-head { display:flex; gap:6px; align-items:baseline; margin-bottom:8px; }
.day-head a { margin-left:auto; }
.visit { display:block; width:100%; text-align:left; background:#fafbf9; border:1px solid var(--border); border-left:4px solid #9aa39c;
  border-radius:8px; padding:7px 8px; margin-bottom:6px; cursor:pointer; font:inherit; color:inherit; }
.visit:hover { background:#f1f5f0; }
.visit.done { background:#f1f8f1; } .visit.missed { background:#fdf4f4; } .visit.skipped { opacity:.55; text-decoration:line-through; }
.v-top { display:flex; justify-content:space-between; gap:6px; align-items:center; }
.v-name { font-weight:600; font-size:14px; line-height:1.3; margin-top:2px; }
.dot { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:6px; vertical-align:middle; }
.chip.swatch { width:30px; height:30px; padding:0; border:3px solid #fff; box-shadow:0 0 0 1px var(--border); }
.chip.swatch.active { box-shadow:0 0 0 2px var(--text); }
.plan { padding:8px 0; border-bottom:1px solid var(--border); cursor:pointer; color:var(--text); }
.plan:last-child { border-bottom:0; }
@media (max-width: 980px) { .week { grid-template-columns: 1fr; } .day { min-height:0; } }
/* routes */
.pin { width:28px; height:28px; border-radius:50%; color:#fff; font-weight:800; font-size:13px; display:inline-flex; align-items:center;
  justify-content:center; box-shadow:0 1px 4px rgba(0,0,0,.35); border:2px solid #fff; flex:0 0 auto; }
.pin.done { opacity:.55; } .pin.home { background:#1b2a1f; font-size:15px; }
ol.stops { list-style:none; padding:0; margin:12px 0 0; }
ol.stops li { display:flex; gap:12px; align-items:flex-start; padding:10px 0; border-bottom:1px solid var(--border); }
ol.stops li:last-child { border-bottom:0; }
.stop-body { flex:1; min-width:0; }
.stop-move { display:flex; flex-direction:column; }
.stop-move .btn.link { padding:0 6px; font-size:12px; }
@media print { .topbar, .chips, .btn, #date, .map, .hint { display:none !important; } .grid-side { display:block; } .card { box-shadow:none; border:0; } }

/* Address matches on the job site editor */
.picks { margin: -4px 0 12px; display: grid; gap: 6px; }
.picks .pick { text-align: left; font: inherit; font-size: 14px; background: #fff; border: 1px solid var(--border, #dde3dc); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.picks .pick.on { border-color: var(--primary, #2f7d32); background: var(--primary-soft, #eef6ee); }

/* Checkbox rows (Settings → Crew emails) */
label.check { display: flex; gap: 8px; align-items: center; margin: 8px 0; cursor: pointer; }
label.check input { width: auto; margin: 0; }

/* Purchases */
.nowrap { white-space: nowrap; }
.totals-row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: flex-end; margin: 6px 0 14px; }
.totals-row > div { display: flex; flex-direction: column; }
.big-total strong { font-size: 24px; letter-spacing: -.3px; }
.cat-total { font-weight: 600; }
.filters { max-width: 720px; }
.owed { border-left: 4px solid var(--amber); }
.owed-row { align-items: center; padding: 8px 0; border-top: 1px solid var(--border); }
.seg { display: flex; flex-wrap: wrap; gap: 8px; }
.seg label { display: flex; align-items: center; gap: 8px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; font-weight: 500; }
.seg label:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.seg input { width: auto; margin: 0; }
.billbox { background: #f7f9f6; border: 1px solid var(--border); border-radius: 10px; padding: 4px 12px 2px; margin-bottom: 14px; }
.receipt-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.receipt-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); }
.receipt-full { display: block; max-width: 100%; max-height: 70vh; margin: 0 auto 12px; border-radius: 8px; }
.filebtn { cursor: pointer; }
.danger-link { color: var(--red) !important; }

/* 10 menu items: tighten the bar so Settings stays visible on normal laptop screens */
.nav a { padding: 7px 10px; }
@media (max-width: 1300px) { .who { display: none; } .topbar-inner { gap: 12px; } }
div.field { margin-bottom: 14px; }
div.field > span { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 5px; }
.modal .btn-row { margin-top: 14px; }

/* Week view: keep the status badge inside narrow day cards (wraps under the time instead of spilling out) */
.visit { overflow: hidden; }
.v-top { flex-wrap: wrap; row-gap: 3px; }
.v-top > span { white-space: nowrap; }
.v-top .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.v-top .badge { margin-left: 0; }

/* Invoices: running totals */
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
.warnbox { margin-top: 12px; background: var(--amber-bg); border-radius: 10px; padding: 12px 14px; }
.warnbox ul { margin: 8px 0 0; padding-left: 18px; }

/* Schedule: Week / Month / Year switch */
.seg-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.seg-toggle button { background: #fff; border: 0; padding: 8px 14px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg-toggle button + button { border-left: 1px solid var(--border); }
.seg-toggle button.on { background: var(--primary); color: #fff; }

/* Month grid */
.month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; margin-bottom: 16px; }
.month-dow { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 0 4px; }
.mday { background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 6px; min-height: 104px; display: flex; flex-direction: column; gap: 3px; overflow: hidden; }
.mday.other { background: transparent; opacity: .55; }
.mday.is-today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.mday-num { align-self: flex-start; background: none; border: 0; padding: 1px 5px; border-radius: 6px; font: inherit; font-weight: 700; font-size: 13px; cursor: pointer; color: var(--text); }
.mday-num:hover { background: var(--bg); }
.visit.mini { display: flex; align-items: center; gap: 5px; padding: 3px 6px; border-left-width: 3px; font-size: 12px; border-radius: 6px; margin: 0; }
.mini-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #c3cac4; }
.mini-dot.done { background: var(--ok); } .mini-dot.missed { background: var(--red); } .mini-dot.today { background: #1f5fa8; }
.more { background: none; border: 0; padding: 1px 6px; text-align: left; font: inherit; font-size: 12px; color: var(--primary-dark); cursor: pointer; font-weight: 600; }

/* Year cards */
.year { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.ymonth { text-align: left; font: inherit; cursor: pointer; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.ymonth:hover { border-color: var(--primary); }
.ymonth.is-today { border-color: var(--primary); }
.ym-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.ym-bar { height: 8px; background: #eef1ee; border-radius: 999px; overflow: hidden; display: flex; }
.ym-bar .ok { background: var(--ok); } .ym-bar .bad { background: var(--red); }

@media (max-width: 980px) {
  .year { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .month { gap: 3px; } .mday { min-height: 70px; padding: 4px; } .mini-name { display: none; } .visit.mini { padding: 3px; }
}

/* Drag a visit to another day */
.visit[draggable="true"] { cursor: grab; }
.visit.dragging { opacity: .45; }
.is-dragging [data-drop] { transition: background .1s; }
.drop-over { background: var(--primary-soft) !important; border-color: var(--primary) !important; }
.visit:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.visit[role="button"] { cursor: pointer; user-select: none; }
.visit[draggable="true"] { cursor: grab; }

/* Top bar extras: Owner (site owner only) and Help */
.topbar-extra { display: flex; align-items: center; gap: 8px; }
.help-link { width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center;
  text-decoration: none; font-weight: 800; color: var(--primary-dark); }
.help-link:hover { background: var(--primary-soft); }
.owner-link { text-decoration: none; font-weight: 700; font-size: 13px; color: #fff; background: #1b2a1f; padding: 5px 10px; border-radius: 8px; }
.owner-link.active, .owner-link:hover { background: var(--primary-dark); }
/* Owner page */
.owner-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 4px 0 8px; }
.owner-facts > div { display: flex; flex-direction: column; }
.owner-facts strong { font-size: 18px; }
.modal h3 { font-size: 15px; margin: 18px 0 8px; }
.danger-zone { margin-top: 18px; border: 1px solid var(--red-bg); border-radius: 10px; padding: 10px 14px; }
.danger-zone summary { cursor: pointer; color: var(--red); font-weight: 700; }
.modal.wide { max-width: 760px; }

/* Invoice editor: full line descriptions (wrap instead of cutting off) */
textarea.line-desc { width: 100%; min-height: 40px; resize: vertical; font: inherit; line-height: 1.35; padding: 8px 10px; }

/* Sign-in: show/hide password, remember me, forgot */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: 0; padding: 6px; border-radius: 8px; color: var(--muted); cursor: pointer; line-height: 0; }
.pw-eye:hover { color: var(--text); background: var(--bg); }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -4px 0 14px; flex-wrap: wrap; }
.auth-row label.check { margin: 0; }

/* Compare years */
.yoy-wrap { position: relative; margin: 4px 0 14px; }
.yoy-chart { display: block; max-width: 100%; }
.yoy-chart .grid { stroke: var(--border); stroke-width: 1; }
.yoy-chart .base { stroke: #b9c2b8; stroke-width: 1; }
.yoy-chart .ax { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.yoy-chart .hit { fill: transparent; cursor: pointer; }
.yoy-chart .hit.on { fill: rgba(27, 42, 31, .05); }
.yoy-tip { position: absolute; top: 0; pointer-events: none; background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow); padding: 8px 10px; font-size: 13px; white-space: nowrap; z-index: 2; }
.yoy-tip b { font-variant-numeric: tabular-nums; }
.yoy-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; color: var(--muted); }
.yoy-key { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.yoy td.num, .yoy th.num { white-space: nowrap; }
.yoy .yoy-net td { font-weight: 650; border-top: 2px solid var(--border); }
@media (max-width: 560px) { .yoy td > .muted.small { display: none; } }

/* Quote requests */
.nav-count { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 6px; border-radius: 999px; background: var(--amber); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; vertical-align: 1px; }
.req.req-new { border-left: 4px solid var(--amber); }
.req h2 .badge { vertical-align: 2px; margin-left: 6px; }
.req-details { margin: 10px 0 0; white-space: pre-wrap; }
.req-actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; min-width: 210px; }
.req-actions .btn { text-align: center; }
@media (max-width: 700px) { .req-actions { min-width: 0; width: 100%; } }

/* Price list and extra charges */
table.pl input, table.pl select { width: 100%; padding: 7px 9px; }
table.pl td.num input { text-align: right; }
select.pl-pick { width: auto; max-width: 280px; padding: 9px 10px; border-radius: 10px; }
.pl-total { font-weight: 650; margin: -4px 0 12px; min-height: 20px; font-variant-numeric: tabular-nums; }
.xsec { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 10px; }
.xsec:first-of-type { border-top: 0; padding-top: 0; }
.nav { gap: 2px; }
.nav a { padding: 7px 8px; }

/* Visits that weren't counted (drive-bys, neighboring jobs) */
tr.not-counted td { color: var(--muted); }

/* Company logo (Settings) */
.logo-row { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.logo-box { width: 220px; height: 100px; flex: 0 0 auto; display: flex; align-items: center; justify-content: center; border: 1px dashed var(--border); border-radius: 10px;
  background: repeating-conic-gradient(#f3f5f2 0 25%, #fff 0 50%) 0 0 / 16px 16px; padding: 8px; }
.logo-box img { max-width: 100%; max-height: 100%; display: block; }
.logo-row > div:last-child { flex: 1; min-width: 220px; }
/* scanned receipts */
.scan-note { background: #e8f0fb; color: #1b3d66; border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; }
.scan-note.check { background: var(--amber-bg); color: var(--amber); }
.scan-note .btn.link { padding: 0; font-size: inherit; }
.review-banner .row { margin: 0; }
.filebtn.working { opacity: .6; pointer-events: none; }

/* Admin page */
.owner-chart .bar { fill: var(--primary); }
.owner-chart .bar.partial { fill: var(--primary); opacity: .45; }
.risk { margin: 2px 0; line-height: 1.5; }
.risk .badge { margin-right: 4px; }
.risk-box { background: var(--bg); border-radius: 10px; padding: 8px 12px; margin: 4px 0 12px; font-size: 14px; }
.warn-text { color: var(--amber); font-weight: 600; }
.fb-list { display: flex; flex-direction: column; gap: 12px; }
.fb { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.fb.done { opacity: .7; }
.fb-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.fb-reason { font-weight: 650; margin-top: 6px; }
.fb blockquote { margin: 6px 0 8px; padding: 6px 12px; border-left: 3px solid var(--border); color: var(--text); white-space: pre-line; }
.fb .btn-row { margin-top: 6px; }
.reason-bars { display: flex; flex-direction: column; gap: 10px; }
.reason-row { display: grid; grid-template-columns: minmax(120px, 210px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 14px; }
.reason-track { background: var(--bg); border-radius: 4px; height: 12px; }
.reason-bar { background: var(--primary); height: 12px; border-radius: 4px; }
.reason-num { white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .reason-row { grid-template-columns: 1fr auto; } .reason-track { grid-column: 1 / -1; grid-row: 2; } }
.setup-steps { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); margin: 8px 0 4px; }
.setup-steps .done { color: var(--ok-dark); font-weight: 600; }
ul.history { padding-left: 18px; }
ul.history li { margin-bottom: 4px; }
/* Subscription */
.offer { background: var(--primary-soft); color: var(--primary-dark); border-radius: 10px; padding: 10px 12px; margin: 0 0 12px; }
.offer .btn.link { padding: 0; }
.reason-pick { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 14px; margin-top: 4px; }
.reason-pick label.check { margin: 4px 0; }
@media (max-width: 560px) { .reason-pick { grid-template-columns: 1fr; } }
.inactive-card { max-width: 560px; margin: 40px auto; text-align: center; }
.inactive-card h1 { margin-top: 0; }
.inactive-card .btn-row { justify-content: center; }

/* Two-step sign-in */
.auth-wrap.wide { max-width: 560px; }
.code-input { font: 600 24px/1.2 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 4px; text-align: center; }
.qr-row { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.qr-box { width: 180px; height: 180px; flex: none; background: #fff; border-radius: 8px; padding: 4px; }
.qr-box svg { width: 100%; height: 100%; display: block; }
.qr-row .secret { font-size: 15px; letter-spacing: 0; word-break: break-all; text-align: left; }
.backup-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.backup-codes code { font: 600 17px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--bg); border-radius: 6px; padding: 8px 10px; text-align: center; user-select: all; }
.tf-status { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
@media (max-width: 480px) { .qr-row { flex-direction: column; align-items: center; } }
@media print { .auth-wrap.wide .card:not(:has(.backup-codes)) { display: none !important; } .backup-codes code { border: 1px solid #999; } }


/* ------------------------------------------------------------------ polish (Oct 2026) */
:root { --shadow-lg: 0 1px 2px rgba(20, 40, 20, .05), 0 8px 24px rgba(20, 40, 20, .07); --ring: 0 0 0 3px rgba(47, 125, 50, .22); }
h1 { letter-spacing: -.02em; font-weight: 750; }
h2 { letter-spacing: -.01em; font-weight: 700; }
.card { transition: box-shadow .15s ease; }
.btn { transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease, transform .06s ease; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:focus-visible, .chip:focus-visible, a:focus-visible, .kpi:focus-visible { outline: none; box-shadow: var(--ring); }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: var(--ring); }
.btn.small-btn { padding: 6px 12px; font-size: 13px; border-radius: 8px; }
.btn.link.small { font-size: 13px; }
.nav a { transition: background-color .12s ease, color .12s ease; }
th { font-size: 11.5px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* empty screens */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 34px 16px; color: var(--text); }
.empty-state .muted { max-width: 460px; }
.empty-state .btn-row { margin-top: 10px; justify-content: center; }
.empty-state.compact { padding: 26px 12px; }
.empty-icon { display: inline-grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--primary-soft); color: var(--primary); margin-bottom: 6px; }

/* sample company banner */
.sample-banner { background: #fff8e6; border-bottom: 1px solid #f1dfae; color: #6b4a06; font-size: 14px; }
.sample-banner .banner-inner { max-width: 1180px; margin: 0 auto; padding: 8px 16px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sample-banner .btn { margin-left: auto; }

/* home */
.home-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.home-head h1 { margin: 0 0 2px; font-size: 26px; }
.sample-offer { display: flex; gap: 22px; align-items: center; background: linear-gradient(135deg, #fff 0%, #f3f9f2 100%); }
.sample-offer h2 { margin-bottom: 6px; }
.sample-offer p { margin: 0 0 12px; max-width: 640px; }
.sample-art { flex: none; }
@media (max-width: 640px) { .sample-offer { flex-direction: column; align-items: flex-start; } }

.checklist-head { display: flex; align-items: center; gap: 16px; margin-bottom: 8px; }
.checklist-head h2 { margin: 0; }
.checklist-head .progress { flex: 1; max-width: 260px; margin-left: auto; }
.progress { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--primary); border-radius: 99px; transition: width .4s ease; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.steps li:first-child { border-top: 0; }
.steps .tick { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border); color: #fff; }
.steps li.done .tick { background: var(--ok); border-color: var(--ok); }
.steps li.done strong { color: var(--muted); font-weight: 600; text-decoration: line-through; text-decoration-color: rgba(99, 112, 102, .5); }
.steps li.next .tick { border-color: var(--primary); }
.steps .step-body { flex: 1; min-width: 0; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
@media (max-width: 960px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .kpis { grid-template-columns: 1fr; } }
.kpi { display: flex; flex-direction: column; gap: 2px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 14px 16px; text-decoration: none; color: var(--text); transition: box-shadow .15s ease, border-color .15s ease; }
.kpi:hover { box-shadow: var(--shadow-lg); border-color: #cfd8cd; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-value { font-size: 28px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.kpi-value small { font-size: 17px; color: var(--muted); font-weight: 600; }
.kpi-sub { font-size: 13px; color: var(--muted); }
.kpi.warn .kpi-sub strong { color: var(--red); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #1f9d55; margin-right: 2px; vertical-align: 1px;
  box-shadow: 0 0 0 0 rgba(31, 157, 85, .5); animation: live 2s infinite; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(31, 157, 85, .45); } 70% { box-shadow: 0 0 0 7px rgba(31, 157, 85, 0); } 100% { box-shadow: 0 0 0 0 rgba(31, 157, 85, 0); } }
@media (prefers-reduced-motion: reduce) { .live-dot, .hpin.on_site::after { animation: none; } }

.home-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .home-grid { grid-template-columns: 1fr; } }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-head h2 { margin: 0; }
.legend { display: flex; gap: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.lg.done { background: var(--ok); }
.lg.on_site { background: #1f9d55; box-shadow: 0 0 0 3px rgba(31, 157, 85, .2); }
.lg.to_go { background: #fff; border: 2px solid var(--muted); }
.home-map { height: 330px; border-radius: 10px; border: 1px solid var(--border); z-index: 0; margin-bottom: 12px; }
.hpin { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 3px solid var(--c); background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .3); position: relative; }
.hpin.done { background: var(--c); }
.hpin.on_site { background: var(--c); }
.hpin.on_site::after { content: ""; position: absolute; inset: -3px; border-radius: 50%; border: 3px solid var(--c); animation: ping 1.6s ease-out infinite; }
@keyframes ping { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.1); opacity: 0; } }
.hpin.skipped { border-color: #b6bfb8; background: #eef1ee; }
.crew-rows { display: grid; gap: 10px; margin-bottom: 8px; }
.crew-row { display: flex; gap: 10px; align-items: flex-start; }
.crew-row .dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; }
.crew-main { flex: 1; min-width: 0; }
.crew-line { display: flex; justify-content: space-between; gap: 8px; }
.bar { height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; margin: 5px 0 3px; }
.bar span { display: block; height: 100%; border-radius: 99px; transition: width .4s ease; }
.stop-list { list-style: none; margin: 8px 0 0; padding: 0; border-top: 1px solid var(--border); }
.stop-list li { display: grid; grid-template-columns: 14px 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }
.stop-list li:last-child { border-bottom: 0; }
.stop-list .st { width: 10px; height: 10px; border-radius: 50%; }
.st.done { background: var(--ok); } .st.on_site { background: #1f9d55; box-shadow: 0 0 0 3px rgba(31, 157, 85, .2); }
.st.to_go { border: 2px solid var(--muted); } .st.skipped { background: #c9d1cb; }
.stop-time { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.stop-name a { color: var(--text); text-decoration: none; font-weight: 600; }
.stop-name a:hover { color: var(--primary); text-decoration: underline; }
.stop-list li.skipped .stop-name a { color: var(--muted); text-decoration: line-through; }
.stop-state { color: var(--muted); white-space: nowrap; }
.stop-list li.on_site .stop-state { color: #1f7a44; font-weight: 600; }

.attention { list-style: none; margin: 0; padding: 0; }
.attention li + li { border-top: 1px solid var(--border); }
.attention a { display: flex; align-items: center; gap: 12px; padding: 10px 2px; color: var(--text); text-decoration: none; }
.attention a:hover { color: var(--primary-dark); }
.att-icon { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; background: var(--primary-soft); color: var(--primary); }
.attention a.red .att-icon { background: var(--red-bg); color: var(--red); }
.attention a.amber .att-icon { background: var(--amber-bg); color: var(--amber); }
.attention a > span:nth-child(2) { flex: 1; }
.chev { color: var(--muted); font-size: 20px; line-height: 1; }
.all-clear { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.all-clear .empty-icon { width: 40px; height: 40px; margin: 0; border-radius: 12px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 6px 0; font-size: 14px; }
.feed-dot { width: 8px; height: 8px; border-radius: 50%; background: #c9d1cb; transform: translateY(-1px); }
.feed li.arrive .feed-dot { background: #1f9d55; }
.feed li.depart .feed-dot { background: var(--primary); }
.feed li.paid .feed-dot, .feed li.accepted .feed-dot { background: #c98a12; }
.feed li.declined .feed-dot { background: var(--red); }
.feed-when { white-space: nowrap; }

/* account menu + phone menu */
.who { position: relative; }
@media (max-width: 1300px) { .who { display: block; } }
@media (max-width: 860px) { .who { display: block; } }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--primary-soft); color: var(--primary-dark); font: inherit; font-weight: 750;
  font-size: 13px; cursor: pointer; letter-spacing: .02em; }
.avatar:hover, .avatar[aria-expanded="true"] { background: var(--primary); color: #fff; }
.menu { position: absolute; right: 0; top: 44px; min-width: 230px; background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg);
  padding: 6px; z-index: 1100; display: flex; flex-direction: column; }
.menu-who { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu a, .menu button { text-align: left; padding: 9px 10px; border-radius: 8px; color: var(--text); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--bg); }
.menu-out { color: var(--red) !important; }
.menu-btn { display: none; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); cursor: pointer; place-items: center; }
@media (max-width: 760px) {
  .topbar-inner { position: relative; }
  .menu-btn { display: grid; }
  .help-link { display: none; }
  .nav { display: none; }
  .topbar.nav-open .nav { display: flex; flex-direction: column; position: absolute; top: 58px; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow-lg); padding: 8px 12px 12px; gap: 2px; }
  .topbar.nav-open .nav a { padding: 11px 12px; font-size: 16px; }
  .topbar-extra { margin-left: auto; }
  .steps li { flex-wrap: wrap; }
  .steps li .btn { margin-left: 36px; }
  .home-head .btn-row { width: 100%; }
}
.howto { padding-left: 20px; margin: 0 0 16px; } .howto li { margin-bottom: 10px; }
@media (max-width: 760px) {
  .who { margin-left: auto; }
  .topbar-extra { margin-left: 0; }
  .steps .step-body { flex-basis: calc(100% - 40px); }
}

/* quote lines: options under the description */
.line-main input[data-k="description"] { margin-bottom: 6px; }
.line-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.line-opts label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; flex: 1; min-width: 150px; }
.line-opts select { padding: 6px 8px; font-size: 13px; }
th { white-space: nowrap; }

/* phones: tables become stacked cards, each value labeled with its column */
@media (max-width: 640px) {
  .table-wrap { margin: 0; padding: 0; overflow: visible; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; width: 100%; }
  .table-wrap thead { display: none; }
  .table-wrap tbody tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .table-wrap tbody tr:last-child { border-bottom: 0; }
  .table-wrap tbody td { width: 100% !important; position: relative; border: 0; padding: 3px 0 3px 40%; text-align: left !important; white-space: normal; min-height: 26px; }
  .table-wrap tbody td::before { content: attr(data-label); position: absolute; left: 0; top: 4px; width: 37%; font-size: 12px; font-weight: 600; color: var(--muted); }
  .table-wrap tbody td[data-label=""], .table-wrap tbody td:first-child { padding-left: 0; }
  .table-wrap tbody td[data-label=""]::before, .table-wrap tbody td:first-child::before { display: none; }
  .table-wrap tbody td:first-child { font-size: 15.5px; }
  .table-wrap tbody td:empty { display: none; }
  .table-wrap tbody td.num { font-variant-numeric: tabular-nums; }
  .table-wrap tbody td .btn { margin-top: 4px; }
  .table-wrap tfoot { display: block; border-top: 2px solid var(--border); margin-top: 4px; }
  .table-wrap tfoot tr { display: flex; justify-content: space-between; gap: 12px; }
  .table-wrap tfoot td { display: block; width: auto; border: 0; padding: 4px 0; }
  .table-wrap tfoot td:empty { display: none; }
  tr.clickable:hover td { background: none; }
  .line-opts label { min-width: 0; }
  .sample-banner .banner-inner { font-size: 13px; padding: 6px 12px; gap: 6px; }
  .sample-banner .banner-inner > span { display: none; }
  .sample-banner .banner-inner strong::after { content: " Made-up data; nothing is emailed."; font-weight: 400; }
}

/* Equipment Service Log add-on, and suspend / archive */
/* A 12th menu item (Equipment): tighten the bar a little so it still fits on one line on laptop screens */
@media (min-width: 761px) { .topbar-inner { gap: 12px; } .nav { gap: 0; } .nav a { padding: 7px 6px; } }
.nav a.nav-out .ext { font-size: 11px; margin-left: 2px; opacity: .65; }
.addon-box { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px; background: var(--bg); }
.addon-box .badge { vertical-align: 1px; }
.addon-box input:disabled, .addon-box select:disabled { opacity: .6; }
.status-box { border-top: 1px solid var(--border); margin-top: 14px; padding-top: 12px; display: grid; gap: 10px; }
.status-line { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.status-box .btn-row { margin: 0; }
.owner-facts > div > span.small + strong + span.small { margin-top: 1px; }

/* Equipment maintenance card on Home (what's due in the equipment log add-on) */
.eq-counts { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 0 0 10px; font-size: 14px; color: var(--muted); }
.eq-counts strong { font-size: 20px; color: var(--text); margin-right: 3px; }
.eq-counts .bad strong { color: var(--red); }
.eq-counts .warn strong { color: var(--amber); }
.eq-list { list-style: none; margin: 0; padding: 0; }
.eq-list li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; font-size: 15px; }
.eq-list li + li { border-top: 1px solid var(--border); }
.eq-list.plain li { padding: 6px 0; }
.eq-dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--amber); transform: translateY(-1px); }
.eq-dot.overdue, .eq-dot.never { background: var(--red); }
.eq-main { min-width: 0; overflow-wrap: anywhere; }
.eq-sub { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 2px; }
.eq-card .card-head .btn.link { padding: 0; }

/* Admin: Stripe status under the add-on prices */
.stripe-box { margin-top: 16px; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--bg); display: grid; gap: 6px; }
.stripe-box .badge { margin-left: 6px; vertical-align: 1px; }
.stripe-box details summary { cursor: pointer; color: var(--primary-dark); font-weight: 600; }
.stripe-box code.block { display: block; background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin: 6px 0; overflow-wrap: anywhere; user-select: all; }
.offer.warn { background: var(--red-bg); color: var(--red); }

/* Admin: what kinds of business are signing up */
.type-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.type-tag { background: var(--bg); border: 1px solid var(--border); border-radius: 99px; padding: 4px 12px; font-size: 13px; }

/* ---------- Shifts: the week of who works when ---------- */
.shift-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.shift-bar .btn-row { align-items: center; }
.shift-range { font-size: 16px; min-width: 132px; text-align: center; }
.shift-warn { margin: 0 0 14px; }
.shift-card { padding: 0; overflow: hidden; }
.shift-scroll { overflow-x: auto; }
.shift-grid { display: grid; grid-template-columns: minmax(150px, 190px) repeat(7, minmax(118px, 1fr)); min-width: 980px; }
.shift-grid > div { border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); padding: 8px; min-width: 0; }
.shift-grid > div:nth-child(8n) { border-right: 0; }
.sg-head { display: flex; flex-direction: column; background: #fafbf9; }
.sg-head.is-today strong { color: var(--primary-dark); }
.sg-head.is-today { box-shadow: inset 0 3px 0 var(--primary); }
.sg-name { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; position: sticky; left: 0; z-index: 2; background: var(--card); }
.sg-corner { background: #fafbf9; justify-content: flex-end; }
.sg-cell { display: flex; flex-direction: column; gap: 6px; min-height: 76px; position: relative; }
.sg-cell.is-today { background: #fcfdfb; }
.sg-cell.is-off { background: repeating-linear-gradient(135deg, #f6f7f5 0 8px, #fff 8px 16px); }
.sg-foot { background: #fafbf9; border-bottom: 0 !important; }
.sg-add { align-self: stretch; margin-top: auto; border: 1px dashed var(--border); background: none; color: var(--muted); border-radius: 8px; font: inherit; font-size: 16px; line-height: 1;
  padding: 4px 0; cursor: pointer; opacity: 0; transition: opacity .12s ease; }
.sg-cell:hover .sg-add, .sg-add:focus-visible { opacity: 1; }
.sg-cell:not(:has(.shift)) .sg-add { opacity: .55; }
.sg-add:hover { border-color: var(--primary); color: var(--primary-dark); background: var(--primary-soft); }
@media (hover: none) { .sg-add { opacity: .7; } }
.shift { display: flex; flex-direction: column; gap: 1px; align-items: flex-start; background: #fafbf9; border: 1px solid var(--border); border-left: 4px solid #9aa39c;
  border-radius: 8px; padding: 6px 8px; cursor: grab; user-select: none; font-size: 13px; line-height: 1.35; }
.shift strong { font-size: 13px; white-space: nowrap; }
.shift:hover { background: #f1f5f0; }
.shift:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.shift.dragging { opacity: .45; }
.shift.st-draft, .shift.st-changed { border-style: dashed; border-left-style: solid; background: #fff; }
.shift.st-removed { opacity: .6; cursor: pointer; }
.shift.st-removed strong { text-decoration: line-through; }
.shift .badge { font-size: 11px; padding: 1px 7px; margin-top: 2px; }
.shift-note { color: var(--muted); overflow-wrap: anywhere; }
.off-tag { font-size: 12px; font-weight: 700; border-radius: 6px; padding: 2px 7px; text-decoration: none; align-self: flex-start; background: #eef1ee; color: var(--muted); }
.off-tag.pending { background: var(--amber-bg); color: var(--amber); }
.shift-hint { margin: 10px 2px 0; font-size: 13px; }
.shift-times { gap: 12px; }
.seg-toggle .nav-count { margin-left: 4px; }

/* Time off, and "My schedule" */
.off-list { display: flex; flex-direction: column; }
.off-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 0; border-bottom: 1px solid var(--border); }
.off-row:last-child { border-bottom: 0; padding-bottom: 0; }
.off-row:first-child { padding-top: 0; }
.off-main { min-width: 0; flex: 1 1 240px; }
.off-sep { padding: 12px 0 0; font-weight: 600; }
.next-shift { border-left: 4px solid var(--primary); }
.next-shift .kpi-value { font-size: 24px; }
.next-shift .btn-row { margin-top: 12px; }
.next-shift .shift-note { margin-top: 6px; }
.my-shifts { display: flex; flex-direction: column; }
.my-shift { display: flex; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.my-shift:last-child { border-bottom: 0; padding-bottom: 0; }
.my-shift.past { opacity: .55; }
.my-day { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 58px; flex: none; border-radius: 10px; background: #f4f6f3; padding: 6px 0; line-height: 1.25; }
.my-day span { font-size: 12px; color: var(--muted); }
.my-shift.is-today .my-day { background: var(--primary-soft); }
.my-shift.is-today .my-day strong { color: var(--primary-dark); }
.my-body { flex: 1; min-width: 0; }
.shift-today { display: flex; flex-direction: column; gap: 2px; border-left: 4px solid var(--primary); }
@media (max-width: 640px) {
  .shift-bar { flex-direction: column; align-items: stretch; }
  .shift-bar .btn-row { justify-content: space-between; }
  .shift-grid { grid-template-columns: 116px repeat(7, 128px); min-width: 0; width: max-content; }
  .shift-grid > .sg-name { font-size: 13px; }
}
@media print { .shift-bar, .sg-add, .shift-hint, .seg-toggle { display: none !important; } .shift-grid { min-width: 0; } }

/* Settings → Send from your own email */
.notice-good { color: var(--ok-dark); background: var(--ok-soft); border-radius: 8px; padding: 9px 12px; }
#mailboxcard .btn-row { align-items: center; }

/* Home: the red alert for time off waiting for an answer, with who is free to cover */
.alertbox { background: var(--red-bg); border: 1px solid var(--red); border-left-width: 6px; border-radius: 12px; padding: 14px 16px; margin: 0 0 16px; }
.alertbox .alert-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.alertbox .alert-head h2 { margin: 0; flex: 1 1 0; min-width: 170px; color: var(--red); font-size: 18px; }
.alertbox .alert-sub { font-weight: 600; font-size: 14px; color: var(--text); }
.alertbox .alert-icon { display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 50%; background: var(--red); color: #fff; font-weight: 800; flex: none; }
.alertbox .alert-item { display: flex; gap: 16px; align-items: flex-start; padding-top: 12px; margin-top: 12px; border-top: 1px solid rgba(179, 38, 30, .25); }
.alertbox .alert-main { flex: 1 1 auto; min-width: 0; }
.alertbox .alert-actions { display: flex; flex-direction: column; gap: 8px; flex: none; min-width: 120px; }
.alertbox .alert-actions .btn { text-align: center; }
.alertbox .alert-cover { margin-top: 10px; background: #fff; border-radius: 10px; padding: 10px 12px; }
.alertbox .alert-cover-head { font-size: 13px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.alertbox .alert-cover ul { list-style: none; margin: 0; padding: 0; }
.alertbox .alert-cover li { display: flex; gap: 12px; justify-content: space-between; align-items: baseline; flex-wrap: wrap; padding: 6px 0; }
.alertbox .alert-cover li + li { border-top: 1px solid var(--border); }
.alertbox .alert-cover .reach { display: flex; gap: 14px; flex-wrap: wrap; font-size: 14px; }
.alertbox .alert-cover .reach { min-width: 0; }
.alertbox .alert-cover .reach a { font-weight: 600; white-space: nowrap; }
.alertbox .alert-cover .reach a.mail { white-space: normal; overflow-wrap: anywhere; }
.alertbox .badge { vertical-align: 1px; margin-left: 4px; }
@media (max-width: 700px) {
  .alertbox .alert-item { flex-direction: column; }
  .alertbox .alert-actions { flex-direction: row; width: 100%; }
  .alertbox .alert-actions .btn { flex: 1; }
  .alertbox .alert-cover li { flex-direction: column; align-items: flex-start; gap: 2px; }
}

/* quotes: photos the customer sees with the quote */
.qphotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.qphoto .thumb { aspect-ratio: 4 / 3; background: var(--bg); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 13px; text-align: center; padding: 0; }
.qphoto .thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }   /* the whole photo, as the customer sees it */
.qphoto .cap { margin-top: 6px; padding: 7px 9px; font-size: 14px; }
.qphoto-actions { display: flex; gap: 2px; align-items: center; margin-top: 2px; }
.qphoto-actions .danger-link { margin-left: auto; color: var(--red); }

/* Sales tax (views-tax.js, the quote and invoice editors) */
.text-bad { color: var(--red); }
.plain-list { margin: 6px 0 10px; padding-left: 18px; }
.plain-list li { margin: 4px 0; }
td.taxcol, th.taxcol { width: 48px; text-align: center; }
td.taxcol input { width: auto; margin: 0; }
.tax-pick { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.tax-pick .field { margin-bottom: 0; }

/* Home: money by period */
#moneyperiods .card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.money-periods td.num, .money-periods th.num { white-space: nowrap; }
.money-periods td:first-child { min-width: 200px; }
.notinv { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; margin: 4px 0 12px; border: 1px solid var(--border); border-radius: 10px; color: inherit; text-decoration: none; }
.notinv > span:first-child { display: flex; flex-direction: column; gap: 2px; }
.notinv.has { background: var(--amber-bg); border-color: transparent; }

/* Money page */
.money-periods tr.mp-total td { border-top: 2px solid var(--border); }
.aging { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 4px 0 14px; }
.aging-cell { border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; }
.aging-cell strong { display: block; margin-top: 2px; }
.aging-cell.late strong { color: var(--red); }
@media (max-width: 700px) { .aging { grid-template-columns: repeat(3, 1fr); } }
.mlegend { display: flex; gap: 16px; margin: 0 0 10px; color: var(--muted); }
.mlegend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.mchart { display: grid; gap: 8px; }
.mrow { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: center; }
.mlabel { font-size: 13px; color: var(--muted); }
.mbars { display: grid; gap: 2px; }
.mbar { display: flex; align-items: center; gap: 8px; height: 12px; }
.mbar-fill { display: block; height: 10px; border-radius: 0 4px 4px 0; }
.mbar-val { font-size: 12px; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* "What do these numbers mean?" (C.explainer) */
details.explain { margin: -4px 0 16px; }
details.explain summary { cursor: pointer; color: var(--primary-dark); font-weight: 600; font-size: 14px; list-style: none; display: inline-flex; align-items: center; gap: 6px; }
details.explain summary::-webkit-details-marker { display: none; }
details.explain summary::before { content: '?'; display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid currentColor; font-size: 12px; }
details.explain[open] summary { margin-bottom: 10px; }
details.explain dl { margin: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px 24px; }
details.explain dt { font-weight: 700; font-size: 14px; }
details.explain dd { margin: 2px 0 0; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* Admin → Income: plans and prices */
table.plan-edit { max-width: 640px; }
table.plan-edit th[scope="row"] { text-align: left; white-space: nowrap; }
table.plan-edit input { width: 100%; min-width: 76px; max-width: 130px; }

/* Choose a plan (views-billing.js) */
.plan-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 0 0 16px; }
.plan-card { display: flex; flex-direction: column; margin: 0; }
.plan-card.best { border: 2px solid var(--primary); }
.plan-card.here { box-shadow: 0 0 0 3px rgba(79, 121, 183, .25); }
.plan-card h2 { margin: 6px 0 4px; }
.plan-card .plan-price { margin: 4px 0 8px; }
.plan-card .plan-price strong { font-size: 28px; }
.plan-card ul { padding-left: 18px; margin: 0 0 14px; flex: 1; }
.plan-card li.plus { list-style: none; margin-left: -18px; font-weight: 700; }
.plan-card .badge { align-self: flex-start; }

/* The site owner's message on Home and My day (notice.php): "Heads up" in the site's color, "Important" in amber. */
.site-notice { display: flex; align-items: flex-start; gap: 10px; background: var(--primary-soft); color: var(--text); border: 1px solid var(--primary);
  border-left-width: 6px; border-radius: 12px; padding: 12px 14px; margin: 0 0 16px; }
.site-notice.warn { background: var(--amber-bg); border-color: var(--amber); }
.site-notice-icon { color: var(--primary-dark); flex: none; margin-top: 1px; }
.site-notice.warn .site-notice-icon { color: var(--amber); }
.site-notice p { margin: 0; flex: 1; font-weight: 600; line-height: 1.45; overflow-wrap: anywhere; }
.site-notice-hide { flex: none; }
.notice-site { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.notice-site:first-of-type { border-top: 0; }
.notice-site .site-notice { margin: 8px 0 0; }
.notice-count { text-align: right; }

/* Emergency jobs (views-emergency.js) */
.btn.danger-solid { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger-solid:hover { filter: brightness(.94); }
.emergency-card { border: 2px solid var(--red); border-left-width: 6px; }
.emergency-card h2 { margin-top: 2px; }
.em-label { color: var(--red); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; }
.em-people { display: grid; gap: 6px; max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; }
.em-people .check { margin: 0; }

/* Sign in: email or cell number + PIN (views-auth.js) */
.signin-mode { margin: -2px 0 14px; flex-wrap: nowrap; }
.signin-mode button { flex: 1; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.signin-mode button.active { border-color: var(--primary); background: var(--primary-soft); color: var(--text); }

/* ------------------------------------------------------------------ For your accountant (views-books.js) */
.print-only { display: none; }
.books-kpis { margin: 4px 0 6px; }
.books-kpis .kpi { cursor: default; }
.books-h3 { font-size: 15px; margin: 18px 0 6px; }
.books-detail > summary { cursor: pointer; padding: 2px 0; }
.books-detail[open] > summary { margin-bottom: 10px; }
.books-pnl td:first-child { width: 75%; }
.books-pnl .books-sec td { background: #f7f9f6; padding-top: 10px; }
.books-files { display: grid; gap: 10px; margin: 10px 0; }
.books-file { display: flex; gap: 12px; align-items: center; justify-content: space-between; border-top: 1px solid var(--border); padding-top: 10px; }
.books-file:first-child { border-top: 0; padding-top: 0; }
.books-file .btn { flex-shrink: 0; }
@media print {
  .print-only { display: block !important; }
  .no-print, .explain, .page-head .btn-row, .site-notice { display: none !important; }
  .books-print-head { margin: 0 0 14px; font-size: 14px; line-height: 1.5; }
  .books-detail:not([open]) { display: none !important; }
  .books-kpis .kpi { border: 1px solid #ccc; break-inside: avoid; }
  table { break-inside: auto; } tr { break-inside: avoid; }
  .card { break-inside: avoid-page; margin-bottom: 12px; }
  a[href]::after { content: none !important; }
}

/* ------------------------------------------------------------------ Mileage (views-mileage.js) */
.mileage-modes label { align-items: flex-start; flex: 1 1 220px; }
.mileage-modes .mode-hint { display: block; font-weight: 400; margin-top: 2px; }
.mileage-off { border-left: 4px solid var(--amber); }
.mileage-days .odo { width: 92px; padding: 6px 8px; margin: 0 4px 0 0; }
.mileage-days .leg-row > td { background: #f7f9f6; }
.mileage-days table.legs { width: 100%; margin: 0; }
.mileage-days table.legs td { border: 0; padding: 3px 6px; }
.books-mileage { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.odo-card h2 { font-size: 16px; }
@media print { .mileage-days .odo { border: 0; width: 70px; } #mset .btn-row { display: none; } }
/* The crew's start-of-day screen (views-mileage.js) */
.start-day { max-width: 460px; margin: 24px auto; }
.start-day h1 { margin-top: 0; }
.start-day-meta { margin: -4px 0 16px; }
.start-day input[name="start"] { font-size: 22px; padding: 12px 14px; }
.odo-card.odo-due { border-left: 4px solid var(--amber); }
/* Vehicles (views-vehicles.js, views-mileage.js; 057) */
.odo-catchup { background: #fdf6e8; border-left: 4px solid var(--amber); border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; }
.odo-catchup p { margin: 0 0 8px; }
.odo-photo input[type="file"] { padding: 8px 0; border: 0; }
.odo-photo-big { display: block; max-width: 100%; max-height: 70vh; margin: 6px auto 12px; border-radius: 8px; }
.veh-card .card-head h2 { margin: 0; }
.veh-archived { opacity: .75; }
.veh-facts { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 12px 0 4px; }
.veh-facts > div { display: flex; flex-direction: column; gap: 2px; }
.veh-h3 { font-size: 15px; margin: 16px 0 6px; }
.veh-services td { vertical-align: top; }
.veh-log summary { cursor: pointer; margin: 10px 0 6px; }
.veh-foot { margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
.veh-report-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: baseline; }
.veh-report-head h2 { margin: 0; }
@media (min-width: 961px) { .veh-report .kpis { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .02em; }
@media print {
  .veh-report { break-inside: auto; }
  .veh-report + .veh-report { break-before: page; }
  .veh-report .kpis { grid-template-columns: repeat(5, 1fr); }
}

/* ------------------------------------------------------------------ One injury or damage report, printed (views-incidents.js printReport) */
.print-sheet { display: none; }
@media print {
  body.print-one { background: #fff !important; }
  body.print-one > *:not(.print-sheet) { display: none !important; }
  body.print-one > .print-sheet { display: block !important; color: #111; font-size: 12pt; line-height: 1.45; padding: 0; }
  .print-sheet .ps-head { display: flex; justify-content: space-between; border-bottom: 2px solid #111; padding-bottom: 6px; margin-bottom: 14px; }
  .print-sheet .ps-muted, .print-sheet .ps-foot { color: #555; }
  .print-sheet h1 { font-size: 20pt; margin: 0 0 12px; }
  .print-sheet h2 { font-size: 13pt; margin: 18px 0 6px; }
  .print-sheet .ps-table { width: 100%; border-collapse: collapse; }
  .print-sheet .ps-table th, .print-sheet .ps-table td { border: 1px solid #bbb; padding: 6px 8px; text-align: left; vertical-align: top; font-size: 11pt;
    text-transform: none; letter-spacing: 0; color: #111; }
  .print-sheet .ps-table th { width: 30%; background: #f2f2f2; font-weight: 600; }
  .print-sheet .ps-text { white-space: pre-wrap; margin: 0; }
  .print-sheet .ps-photos { display: flex; flex-wrap: wrap; gap: 10px; }
  .print-sheet .ps-photos img { width: 48%; max-height: 3.6in; object-fit: contain; border: 1px solid #ccc; break-inside: avoid; }
  .print-sheet .ps-foot { font-size: 9pt; margin-top: 18px; border-top: 1px solid #ccc; padding-top: 6px; }
}

/* ------------------------------------------------------------------ Import customers: "Match the columns" (views-import.js) */
table.match select { width: 100%; max-width: 320px; padding: 7px 9px; }
table.match td { vertical-align: middle; }
table.match tr.dup td { background: var(--amber-bg); }
table.match .badge { margin-left: 4px; }

/* ------------------------------------------------------------------ The small footer under every signed-in screen (main.js) */
.app-foot { max-width: 1180px; margin: 28px auto 0; padding: 16px 20px 28px; border-top: 1px solid var(--border); color: var(--muted); font-size: 12.5px; line-height: 1.9; text-align: center; }
.app-foot a { color: var(--muted); }
.app-foot a:hover { color: var(--text); }
@media print { .app-foot { display: none !important; } }

/* ------------------------------------------------------------------ Property Measure add-on (views-measure.js) */
.measure-layout { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
.measure-layout > div > .card + .card { margin-top: 16px; }
@media (max-width: 900px) { .measure-layout { grid-template-columns: 1fr; } }
.map.measure { height: 600px; }
@media (max-width: 900px) { .map.measure { height: 440px; } }
.pm-crosshair, .pm-crosshair .leaflet-interactive { cursor: crosshair !important; }
.pm-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.pm-tools .pm-sep { flex: 1; }
.pm-drawing { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--primary-soft); border-radius: 9px; padding: 4px 6px 4px 10px; }
.pm-vertex { background: #fff; border: 2px solid #111; border-radius: 50%; box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.pm-vertex.on { background: #ffd400; }
.pm-list { display: grid; gap: 6px; margin: 0 0 10px; }
.pm-row { display: grid; grid-template-columns: 14px minmax(0, 1fr) auto auto auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; }
.pm-row.on { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.pm-row input[data-sname] { padding: 5px 8px; min-width: 0; }
.pm-size { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }
.pm-minus { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); white-space: nowrap; }
.pm-swatch { width: 14px; height: 14px; border-radius: 4px; background: var(--primary); opacity: .85; }
.pm-swatch.line { background: #f39c12; height: 4px; border-radius: 2px; }
.pm-swatch.minus { background: none; border: 2px dashed #c0392b; }
.pm-totals { display: flex; gap: 24px; margin: 0 0 12px; }
.pm-totals > div { display: flex; flex-direction: column; }
.pm-totals strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.pm-qtable td { vertical-align: middle; }
.pm-qtable select { padding: 6px 8px; }
@media print { .pm-tools { display: none !important; } }

/* Feature requests (views-ideas.js; 058) */
.ideas-card .idea { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; border-top: 1px solid var(--border); padding: 10px 0; }
.ideas-card .idea:first-of-type { border-top: 0; }
.ideas-card h2 + p + .idea { border-top: 0; }
.ideas-card .idea-text { flex: 1 1 auto; min-width: 0; }
.ideas-card .idea-vote { flex-shrink: 0; white-space: nowrap; }
.ideas-inline { border-left: 4px solid var(--border); }
.ideas-admin td { vertical-align: top; }
.idea-votes { margin: 6px 0 0; padding-left: 18px; }
.idea-votes li { margin-bottom: 6px; }
.suggestion { border-top: 1px solid var(--border); padding: 10px 0; }
.suggestion.is-new .sug-text { font-weight: 600; }
.sug-text { white-space: pre-wrap; margin: 4px 0 6px; }
@media (max-width: 560px) { .ideas-card .idea { flex-direction: column; } }

/* Add-ons page: Your add-ons / Available to add / Coming soon (views-subscription.js) */
.section-label { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin: 26px 0 10px; }
.page-head + .section-label { margin-top: 6px; }

/* ---------------------------------------------------------------- the menu as a sidebar (zip 23k)
   Wide screens: beside the page, hidden or shown with the ☰ button (remembered). Up to 900px: slides in over the page. */
.side-btn { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); cursor: pointer; flex: none; }
.side-btn:hover { background: var(--bg); }
.topbar-gap { flex: 1; }
.menu-btn { display: none !important; }
body.with-sidebar .topbar-inner { max-width: none; gap: 14px; }
.sidebar { position: fixed; top: 59px; bottom: 0; left: 0; width: 224px; background: var(--card); border-right: 1px solid var(--border);
  overflow-y: auto; overscroll-behavior: contain; padding: 12px 10px 28px; z-index: 990; transition: transform .2s ease, box-shadow .2s ease; }
.sidebar .nav, .topbar.nav-open .nav { display: flex !important; flex-direction: column; gap: 2px; overflow: visible; position: static; box-shadow: none; border: 0; padding: 0; background: none; }
.sidebar .nav a { padding: 9px 12px !important; font-size: 15px; border-radius: 9px; display: flex; align-items: center; justify-content: space-between; }
.sidebar .nav a .nav-count { margin-left: auto; }
.sidebar .nav a.nav-end { margin-top: 10px; border-top: 1px solid var(--border); border-radius: 0 0 9px 9px; padding-top: 12px !important; }
body.with-sidebar main, body.with-sidebar .app-foot, body.with-sidebar .sample-banner { margin-left: calc(224px + max(0px, (100vw - 224px - 1180px) / 2)); transition: margin-left .2s ease; }
body.with-sidebar main { margin-right: auto; }
body.sidebar-collapsed .sidebar { transform: translateX(-100%); }
body.with-sidebar.sidebar-collapsed main, body.with-sidebar.sidebar-collapsed .app-foot, body.with-sidebar.sidebar-collapsed .sample-banner { margin-left: auto; }
.side-backdrop { position: fixed; inset: 59px 0 0 0; background: rgba(20, 30, 22, .35); z-index: 980; }
.side-backdrop[hidden] { display: none; }
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); width: min(280px, 82vw); }
  body.sidebar-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  body.with-sidebar main, body.with-sidebar .app-foot, body.with-sidebar .sample-banner { margin-left: auto; }
  .sidebar .nav a { font-size: 16px; padding: 11px 12px !important; }
}
@media (prefers-reduced-motion: reduce) { .sidebar, body.with-sidebar main { transition: none; } }
@media print { .sidebar, .side-backdrop, .side-btn { display: none !important; } body.with-sidebar main { margin-left: auto !important; } }

/* ---------------------------------------------------------------- online payments & customer portal (views-payments.js, 059) */
.pay-card .pay-part { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 12px; }
.pay-card .pay-part:first-of-type { border-top: 0; padding-top: 0; margin-top: 0; }
.pay-card h3 { font-size: 16px; margin: 0 0 8px; }
.pay-url { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0 4px; }
.pay-url code { background: var(--bg); padding: 4px 8px; border-radius: 8px; }

/* Job profit (views-jobprofit.js) */
.jp-table th .jp-sort { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: inherit; cursor: pointer; white-space: nowrap; }
.jp-table th.num .jp-sort { text-align: right; }
.jp-table th .jp-nosort { display: inline-block; cursor: default; text-transform: none; letter-spacing: normal; }
.jp-table td { vertical-align: top; }
.jp-table .jp-bits { max-width: 220px; margin-left: auto; white-space: normal; }
.jp-notes { margin: 12px 0 0; padding-left: 18px; color: var(--muted); }
.jp-notes li { margin: 3px 0; }
.jp-tip { margin-bottom: 16px; }
label.check.jp-check { align-items: flex-start; }
label.check.jp-check input { margin-top: 4px; }

/* Home: the company's trade at the top of "Get set up" */
.trade-pick { display: flex; flex-direction: column; gap: 2px; padding: 4px 0 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.trade-pick select { max-width: 360px; }

/* Customer statement (views-statements.js) */
.statement .st-head { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.statement .st-logo { max-width: 180px; max-height: 64px; display: block; margin-bottom: 4px; }
.statement .st-co { font-size: 20px; }
.statement .st-title { text-align: right; }
.statement .st-to { margin: 16px 0; }
.statement .st-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 6px 0 4px; }
.statement .st-sum > div { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.statement .st-sum strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.statement .st-due { background: var(--primary-soft); border-color: transparent !important; }
.statement .st-aging { margin-top: 12px; }
@media (max-width: 700px) { .statement .st-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); } .statement .st-title { text-align: left; } }
@media print { .statement { border: 0; box-shadow: none; padding: 0; } }

/* Settings → Your subscription: the site's plans with Upgrade / Downgrade (views-subscription.js planPicker) */
.plan-list { border-top: 1px solid var(--border); margin: 4px 0 14px; padding-top: 12px; }
.plan-list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.plan-row { display: flex; gap: 14px; align-items: center; justify-content: space-between; padding: 10px 0; border-top: 1px solid var(--border); }
.plan-list-head + .plan-row { border-top: 0; }
.plan-row.here { background: var(--primary-soft); margin: 0 -12px; padding: 10px 12px; border-radius: 10px; border-top: 0; }
.plan-row.here + .plan-row { border-top: 0; }
.plan-row-text { flex: 1 1 auto; min-width: 0; }
.plan-row .btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 560px) { .plan-row { flex-direction: column; align-items: stretch; } .plan-row .btn { width: 100%; } }

/* Live map (#/map, views-livemap.js) */
.livemap-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .livemap-grid { grid-template-columns: 1fr; } }
.livemap { height: calc(100vh - 250px); min-height: 380px; border-radius: 10px; border: 1px solid var(--border); z-index: 0; }
@media (max-width: 900px) { .livemap { height: 60vh; min-height: 320px; } }
.livemap-people { max-height: calc(100vh - 170px); overflow: auto; }
@media (max-width: 900px) { .livemap-people { max-height: none; } }
.lm-people { list-style: none; margin: 0; padding: 0; }
.lm-people li { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; border-top: 1px solid var(--border); }
.lm-people li:first-child { border-top: 0; }
.lm-people .dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 5px; flex: none; }
.lm-people .lm-person { flex: 1 1 auto; min-width: 0; }
.lm-people li.none { opacity: .75; }
.lm-names { font-weight: 600; font-size: 12px; padding: 2px 6px; }
.chip.active .muted { color: inherit; opacity: .85; }
.check.sms-consent { align-items: flex-start; font-size: 14px; line-height: 1.5; margin: 6px 0 12px; }
.check.sms-consent input { margin-top: 3px; flex: none; }

/* The office menu in groups (main.js NAV_GROUPS): a heading that folds each group away, remembered on this computer. */
.nav-group { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.nav-head { display: flex; align-items: center; gap: 6px; width: 100%; background: none; border: 0; cursor: pointer; text-align: left;
  padding: 6px 12px 4px; font: inherit; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); border-radius: 8px; }
.nav-head:hover { color: var(--text); background: var(--bg); }
.nav-head span:first-child { flex: 1; }
.nav-head .chev { font-size: 16px; line-height: 1; transform: rotate(90deg); transition: transform .15s ease; }
.nav-group.folded .nav-head .chev { transform: rotate(0deg); }
.nav-items { display: flex; flex-direction: column; gap: 2px; }
.nav-group.folded .nav-items { display: none; }
.nav-head .nav-count { margin-left: 0; }
@media (prefers-reduced-motion: reduce) { .nav-head .chev { transition: none; } }
