/* Riffic Bold (licensed). Drop the font file in public/fonts/; until it's there, Fredoka stands in. */
@font-face {
  font-family: 'Riffic';
  src: url('/fonts/riffic-bold.woff2') format('woff2'), url('/fonts/riffic-bold.woff') format('woff'), url('/fonts/riffic-bold.otf') format('opentype');
  font-weight: 400 900; font-style: normal; font-display: swap;
}
:root {
  --green: #062e34;
  --green-2: #0d4a52;
  --green-3: #e6eeee;
  --gold: #f9b233;
  --gold-2: #fff3da;
  --ink: #14211f;
  --muted: #5d6b69;
  --line: #d9e1e0;
  --bg: #f5f7f6;
  --card: #ffffff;
  --red: #b42318;
  --red-bg: #fde8e6;
  --ok: #1d7a46;
  --radius: 14px;
  --head: 'Riffic', 'Fredoka', 'Poppins', system-ui, sans-serif;
  --body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --green-3: #12302f; --gold-2: #3a2e14; --ink: #eef3f2; --muted: #9db0ad; --line: #24403f;
    --bg: #0b1c1e; --card: #102628; --red-bg: #3b1714;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* keep hidden things hidden even when a class sets display */
html, body { margin: 0; }
body { font-family: var(--body); background: var(--bg); color: var(--ink); font-size: 16px; line-height: 1.45; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }

.topbar {
  position: sticky; top: 0; z-index: 10; background: var(--green); color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(env(safe-area-inset-top) + 10px) 16px 10px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--gold); color: var(--green); font-family: var(--head); font-weight: 700; display: grid; place-items: center; font-size: 15px; }
.brand-name { font-family: var(--head); font-weight: 700; font-size: 20px; letter-spacing: .2px; }
.topnav { display: flex; gap: 4px; }
.topnav a { text-decoration: none; padding: 8px 10px; border-radius: 10px; font-weight: 500; font-size: 15px; color: #d7e6e4; }
.topnav a.on { background: rgba(255,255,255,.12); color: #fff; }

.offline { background: var(--gold); color: var(--green); text-align: center; padding: 8px 16px; font-weight: 600; font-size: 14px; }
main { max-width: 720px; margin: 0 auto; padding: 16px 16px calc(env(safe-area-inset-bottom) + 40px); }
main.wide { max-width: 1100px; }
.loading { color: var(--muted); padding: 40px 0; text-align: center; }

h1, h2 { font-family: var(--head); color: var(--ink); margin: 0 0 6px; line-height: 1.15; }
h1 { font-size: 26px; }
h2 { font-size: 20px; margin-top: 22px; }
.sub { color: var(--muted); margin: 0 0 14px; font-size: 15px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.stack > * + * { margin-top: 10px; }

/* Route summary */
.summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 16px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.stat b { display: block; font-size: 22px; font-family: var(--head); }
.stat span { color: var(--muted); font-size: 13px; }

/* Stop cards */
.stops { list-style: none; margin: 0; padding: 0; }
.stop { display: flex; gap: 12px; align-items: flex-start; text-decoration: none; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
.stop:active { transform: scale(.995); }
.num { flex: 0 0 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; }
.stop-main { flex: 1; min-width: 0; }
.stop-name { font-weight: 600; font-size: 17px; }
.stop-addr { color: var(--muted); font-size: 14px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { font-size: 12.5px; font-weight: 600; padding: 3px 8px; border-radius: 999px; background: var(--green-3); color: var(--ink); }
.tag.gold { background: var(--gold-2); color: #7a4d00; }
.tag.red { background: var(--red-bg); color: var(--red); }
@media (prefers-color-scheme: dark) { .tag.gold { color: var(--gold); } .tag.red { color: #ff9b91; } }
.chev { color: var(--muted); align-self: center; font-size: 22px; }

/* Stop detail */
.back { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; color: var(--muted); font-weight: 500; margin-bottom: 10px; }
.nav-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0; }
.nav-buttons .btn-gold { grid-column: 1 / -1; }
.nav-buttons .btn-ghost { min-height: 44px; padding: 8px 6px; font-size: 14px; }
.seg.four { grid-template-columns: repeat(4, 1fr); }
.seg.four button { padding: 10px 4px; font-size: 14px; }
.btn { appearance: none; border: 0; border-radius: 12px; padding: 14px 16px; font-weight: 600; font-size: 16px; cursor: pointer; text-align: center; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; }
.btn-gold { background: var(--gold); color: var(--green); }
.btn-green { background: var(--green); color: #fff; }
.btn-ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn-small { min-height: 38px; padding: 8px 12px; font-size: 14px; }
.btn:disabled { opacity: .55; cursor: default; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.info { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; }
.info div { padding: 10px 0; border-bottom: 1px solid var(--line); }
.info div:last-child { border-bottom: 0; }
.info dt { font-size: 13px; color: var(--muted); font-weight: 500; }
.info dd { margin: 2px 0 0; font-weight: 500; white-space: pre-wrap; }
.gate-code { font-family: ui-monospace, Menlo, monospace; font-size: 22px; font-weight: 700; letter-spacing: 2px; }
.warn { background: var(--red-bg); color: var(--red); border-radius: 12px; padding: 10px 12px; font-weight: 600; margin: 10px 0; }
@media (prefers-color-scheme: dark) { .warn { color: #ffb4ab; } }
.empty-yard { background: var(--gold-2); border-radius: 12px; padding: 12px; margin: 10px 0; font-size: 15px; }

/* Forms */
label { display: block; font-weight: 600; font-size: 14px; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=time], input[type=number], input[type=search], input[type=url], select, textarea {
  width: 100%; border: 1.5px solid var(--line); background: var(--card); border-radius: 12px; padding: 12px 14px; font-size: 16px;
}
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 3px solid color-mix(in srgb, var(--gold) 60%, transparent); border-color: var(--gold); }
.check { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 12px 0; }
.check input { width: 22px; height: 22px; accent-color: var(--green); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg button { border: 1.5px solid var(--line); background: var(--card); border-radius: 10px; padding: 10px; font-weight: 600; cursor: pointer; }
.seg button.on { background: var(--green); color: #fff; border-color: var(--green); }
.form-actions { display: flex; gap: 8px; margin-top: 18px; }
.form-actions .btn { flex: 1; }
.error { color: var(--red); font-weight: 600; margin-top: 10px; min-height: 1.2em; }
@media (prefers-color-scheme: dark) { .error { color: #ff9b91; } }

/* Login */
.login { max-width: 380px; margin: 8vh auto 0; }
.login h1 { font-size: 30px; }
.pin { letter-spacing: 8px; font-size: 22px !important; text-align: center; }

/* Admin */
.tabs { display: flex; gap: 6px; margin: 4px 0 16px; overflow-x: auto; }
.tabs a { text-decoration: none; padding: 9px 14px; border-radius: 999px; border: 1.5px solid var(--line); font-weight: 600; font-size: 14px; white-space: nowrap; }
.tabs a.on { background: var(--green); color: #fff; border-color: var(--green); }
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar input[type=date] { width: auto; }
.tech-group { margin-bottom: 18px; }
.tech-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.tech-head h2 { margin: 0; font-size: 18px; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: 14.5px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12.5px; color: var(--muted); font-weight: 600; background: var(--green-3); }
tr:last-child td { border-bottom: 0; }
td select { padding: 6px 8px; font-size: 14px; border-radius: 8px; }
.table-wrap { overflow-x: auto; }
.removed td { opacity: .5; text-decoration: line-through; }

.toast { position: fixed; left: 50%; bottom: calc(env(safe-area-inset-bottom) + 20px); transform: translateX(-50%); background: var(--green); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.25); max-width: calc(100% - 32px); z-index: 50; }
.toast.bad { background: var(--red); }

@media (min-width: 560px) {
  .nav-buttons { grid-template-columns: 2fr 1fr 1fr 1fr; }
  .nav-buttons .btn-gold { grid-column: auto; }
  .info { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .info .full { grid-column: 1 / -1; }
}

/* ---------- Phase 2 ---------- */
.pending-pill { background: var(--gold); color: var(--green); font-weight: 700; font-size: 12px; padding: 4px 10px; border-radius: 999px; margin-left: auto; white-space: nowrap; }
.tag.ok { background: #dcf3e5; color: var(--ok); }
@media (prefers-color-scheme: dark) { .tag.ok { background: #143726; color: #7fdca3; } }
.tag.big { font-size: 14px; padding: 10px 12px; display: inline-flex; align-items: center; justify-content: center; }
.clockbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin: 12px 0; }
.clockbar.on { border-color: var(--ok); }
.clockbar.break { border-color: var(--gold, #d4a017); }
.clockbar .clock-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.clockbar b { display: block; }
.clockbar span { color: var(--muted); font-size: 14px; }
.next-btn { width: 100%; margin-bottom: 14px; }
.done-card { margin-bottom: 14px; border-color: var(--ok); }
.stop.is-done { opacity: .62; }
.num.ok { background: var(--ok); }
.num.bad { background: var(--red); }
.action-panel { display: grid; gap: 10px; margin: 6px 0 16px; }
.row-btns.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn.full { width: 100%; }
.danger-text { color: var(--red) !important; }
@media (prefers-color-scheme: dark) { .danger-text { color: #ff9b91 !important; } }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.step-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.step p { margin: 4px 0 10px; }
.photo-btn { width: 100%; cursor: pointer; }
.small-photo { margin-top: 12px; min-height: 44px; }
.skip-box { display: grid; gap: 4px; }
.radio { display: flex; align-items: center; gap: 10px; font-weight: 500; margin: 6px 0; font-size: 15px; }
.radio input { width: 20px; height: 20px; accent-color: var(--green); }
.status-card { margin: 10px 0; border-width: 1.5px; }
.status-card.completed { border-color: var(--ok); }
.status-card.skipped { border-color: var(--red); }
.status-card div { margin-top: 4px; }
.photo-strip { display: flex; gap: 8px; overflow-x: auto; margin: 4px 0 14px; }
.photo-strip:empty { display: none; }
.photo-strip a, .photo-strip .local { position: relative; flex: 0 0 auto; text-decoration: none; }
.photo-strip img { width: 104px; height: 104px; object-fit: cover; border-radius: 12px; display: block; border: 1px solid var(--line); }
.photo-strip span span, .photo-strip a span { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; padding: 2px 6px; border-radius: 6px; text-transform: capitalize; }
td input[type=time] { width: auto; padding: 6px 8px; font-size: 14px; border-radius: 8px; }
@media (max-width: 440px) {
  .topbar:has(.pending-pill:not([hidden])) .brand-name { display: none; }
}

/* Aggressive dog check */
.dog-card { border: 2px solid var(--red); display: grid; gap: 10px; }
.dog-card p { margin: 0; }
.dog-timer { display: flex; align-items: baseline; gap: 10px; background: var(--red-bg); border-radius: 12px; padding: 10px 14px; }
.dog-timer span { font-family: ui-monospace, Menlo, monospace; font-size: 30px; font-weight: 700; color: var(--red); }
.dog-timer small { color: var(--muted); }
.dog-timer.ready { background: #dcf3e5; }
.dog-timer.ready span { color: var(--ok); }
@media (prefers-color-scheme: dark) { .dog-timer.ready { background: #143726; } .dog-timer span { color: #ff9b91; } .dog-timer.ready span { color: #7fdca3; } }
.checklist { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.call-line { background: var(--green-3); border-radius: 12px; padding: 10px 12px; font-size: 15px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.call-line.ok { background: #dcf3e5; }
.call-line.bad { background: var(--red-bg); }
@media (prefers-color-scheme: dark) { .call-line.ok { background: #143726; } }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--gold); animation: pulse 1.2s infinite; flex: 0 0 auto; }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.7); } }

/* Phase 4: client texts */
.text-line{margin:6px 0;font-size:.88rem;color:#4b5a5c}
.text-line.ok{color:#1f7a3a}
.text-line.bad{color:#b3261e}
.notice-box summary{cursor:pointer;padding:2px 0}
.notice-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-top:12px}
.nt-list{max-height:340px;overflow:auto;border:1px solid #e5e1d6;border-radius:10px;padding:6px 10px;margin-top:8px}
.mode-seg{max-width:360px}
.toggles{display:grid;gap:2px;margin:10px 0}
.wording li{margin:4px 0}
.wording p{margin:4px 0 12px}
@media (max-width:760px){.notice-grid{grid-template-columns:1fr}}

/* Holiday pay and Company Vacation Pay */
.notice { border-radius: 12px; padding: 10px 12px; margin: 0 0 10px; border: 1px solid var(--line); }
.notice .small { margin-top: 4px; }
.notice-gold { background: var(--gold-2); border-color: var(--gold); }
.notice-blue { background: var(--green-3); border-color: var(--green-2); }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.check input { width: 18px; height: 18px; padding: 0; margin: 0; }
.hrs-in, .rate-in { width: 92px; padding: 6px 8px; font-size: 15px; }
.vac { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.vac:first-of-type { border-top: 0; margin-top: 0; }
.vac-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.vac-amount { font-family: var(--head); font-size: 22px; color: var(--ok); }
table.compact td, table.compact th { padding: 6px 8px; }
h3 { font-family: var(--head); margin: 0 0 6px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; }

/* Phase 3: dispatch */
.dot{display:inline-block;width:12px;height:12px;border-radius:50%;margin-right:6px;vertical-align:middle}
.limits input[type=number]{width:90px}
.limits input[type=time]{width:120px}
.dp-map{height:420px;border-radius:14px;margin:10px 0 14px;border:1px solid #e5e1d6;background:#eef2ee}
.route-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:14px}
.route-head{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-bottom:8px}
.route-head .small{flex-basis:100%}
.plan-stops{margin:0;padding-left:22px}
.plan-stops li{display:grid;grid-template-columns:70px 1fr auto;gap:8px;align-items:center;padding:6px 0;border-bottom:1px solid #f0ede4}
.plan-stops li.problem{background:#fdecea}
.plan-stops .eta{font-weight:600;font-size:.85rem}
.plan-stops select{max-width:110px;font-size:.8rem;padding:4px}
.num-pin span{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:50%;color:#fff;font:700 12px/1 Poppins,sans-serif;border:2px solid #fff;box-shadow:0 1px 3px rgba(0,0,0,.4)}
.rule-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}
.day-checks{display:flex;flex-wrap:wrap;gap:10px}
.rf-results{display:grid;gap:4px;margin:4px 0}
.rf-pick{text-align:left;background:#fff;border:1px solid #e5e1d6;border-radius:8px;padding:6px 10px;cursor:pointer}
.center{text-align:center}
@media (max-width:760px){.rule-grid{grid-template-columns:1fr 1fr}.route-cards{grid-template-columns:1fr}}

input[type=search]{width:100%}
.limits input[type=number],.limits input[type=time]{padding:8px 10px}
.dp-map,.plan-stops li,.rf-pick{border-color:var(--line,#e5e1d6)}
@media (prefers-color-scheme: dark){.rf-pick{background:transparent}.plan-stops li.problem{background:#4a1f1b}}
.auto-plan{margin:4px 0 8px}

/* Non-scoop visits stand out */
.tag.svc{font-weight:700;letter-spacing:.02em}
.tag.svc-deo{background:#ede4ff;color:#5b21b6}
.tag.svc-bucket{background:#dbeafe;color:#1e40af}
.tag.svc-other{background:#fde7d3;color:#9a3412}
.tag.svc-comm{background:#062e34;color:#f9b233}
.svc-banner{display:grid;gap:2px;border-radius:12px;padding:10px 12px;margin:8px 0;background:#eef5f4;border:1.5px solid var(--line)}
.svc-banner.svc-deo{background:#ede4ff;border-color:#a78bfa;color:#3b0764}
.svc-banner.svc-bucket{background:#dbeafe;border-color:#60a5fa;color:#1e3a8a}
.svc-banner.svc-other{background:#fde7d3;border-color:#fb923c;color:#7c2d12}
@media (prefers-color-scheme: dark){
  .tag.svc-deo{background:#3b2470;color:#d8c6ff}.tag.svc-bucket{background:#1e3a8a;color:#cfe0ff}.tag.svc-other{background:#5a2a10;color:#ffd2b0}
  .svc-banner{background:#12302f}.svc-banner.svc-deo{background:#2a1a50;color:#e9ddff}.svc-banner.svc-bucket{background:#132a5c;color:#dbe7ff}.svc-banner.svc-other{background:#45200c;color:#ffe0c8}
}
.standing{margin:10px 0}

.compare{display:grid;gap:2px;margin:8px 0}

/* Batch: tasks, messages, receipts, wrap-up */
.tag.svc-task{background:#fff1c2;color:#7a5200}
.svc-banner.svc-task{background:#fff1c2;border-color:#f9b233;color:#4a3300}
@media (prefers-color-scheme: dark){.tag.svc-task{background:#4a3a10;color:#ffe08a}.svc-banner.svc-task{background:#3a2e14;color:#ffe9b0}}
.task-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:6px 0;border-bottom:1px solid var(--line)}
.add-task{margin-top:8px}.add-task summary{cursor:pointer;padding:6px 0}
.brief-box{margin-top:10px}
.msg-overlay{position:fixed;inset:0;background:rgba(6,46,52,.92);z-index:1000;display:flex;align-items:flex-start;justify-content:center;padding:16px;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
.msg-overlay>.msg-card{margin:auto 0}
body.overlay-open{overflow:hidden}
.msg-card{background:var(--card);color:var(--ink);border-radius:18px;max-width:520px;width:100%;padding:20px;display:grid;gap:12px;box-shadow:0 10px 40px rgba(0,0,0,.4)}
.msg-head{font-family:var(--head);font-size:1.3rem;color:var(--green,#062e34)}
@media (prefers-color-scheme: dark){.msg-head{color:var(--gold)}}
.msg-body{font-size:1.05rem;line-height:1.5;white-space:normal;max-height:55vh;overflow:auto}
.rc-preview{width:100%;max-height:260px;object-fit:contain;border-radius:12px;margin:8px 0}
.rc-cats{grid-template-columns:repeat(auto-fit,minmax(90px,1fr))}
.rc-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center;padding:6px 0;border-bottom:1px solid var(--line)}
.wu-row{display:flex;gap:10px;align-items:flex-start;padding:8px 0;border-bottom:1px solid var(--line);cursor:pointer}
.wu-row input{margin-top:4px;width:20px;height:20px}
.wu-row.is-done{opacity:.55}
.wu-note{padding:4px 0}

/* Office: left-side menu */
main.office, #app.office { max-width: 1400px; }
.office-wrap { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
.office-nav { position: sticky; top: 72px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 10px; max-height: calc(100vh - 90px); overflow: auto; }
.office-title { font-family: var(--head); font-size: 1.35rem; padding: 2px 10px 10px; color: var(--green); }
@media (prefers-color-scheme: dark) { .office-title { color: var(--gold); } }
.nav-group { margin-bottom: 10px; }
.nav-group-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted, #6b7a7c); padding: 6px 10px 4px; font-weight: 700; }
.office-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; text-decoration: none; color: inherit; font-weight: 600; font-size: 14.5px; }
.office-nav a:hover { background: rgba(249, 178, 51, .15); }
.office-nav a.on { background: var(--green); color: #fff; }
.nav-ico { width: 22px; text-align: center; }
.office-main { min-width: 0; }
.office-h1 { margin-top: 0; }
.office-mobile-nav { display: none; margin-bottom: 8px; }
.office-mobile-nav select { width: 100%; font-weight: 600; }
@media (max-width: 900px) {
  .office-wrap { grid-template-columns: 1fr; gap: 0; }
  .office-nav { display: none; }
  .office-mobile-nav { display: block; }
}

/* House pictures + property photos */
.house-thumb { width: 74px; height: 56px; object-fit: cover; object-position: 50% 35%; border-radius: 10px; flex: none; background: var(--line); }
.house-thumb.none { visibility: hidden; }
.house-hero { position: relative; width: 100%; height: 220px; border-radius: 16px; margin: 6px 0 8px; overflow: hidden; background: var(--line); }
.house-hero-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(16px) brightness(.85); transform: scale(1.15); }
.house-hero-img { position: relative; width: 100%; height: 100%; object-fit: contain; display: block; }
.prop-photos { margin: 8px 0; }
.pp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pp { margin: 0; background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.pp img { width: 100%; height: 120px; object-fit: cover; display: block; }
.pp figcaption { padding: 6px 8px; font-size: 13px; }
.pp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.linklike { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; font-size: 12.5px; }
.pp-add { margin-top: 8px; }
.pp-add summary { cursor: pointer; font-size: 14px; padding: 4px 0; }
.pp-add > * + * { margin-top: 8px; }

/* Commercial checklist */
.site-checklist { display: block; }
.site-checklist h2 { margin-bottom: 6px; }
.ck { min-width: 0; }
.ck-waste { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.ck { display: grid; gap: 8px; }
.ck-done { border-color: #1f7a3a; }
.ck-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ck-waste { grid-template-columns: repeat(5, 1fr); }
.ck-waste button { font-size: 12.5px; padding: 8px 2px; }
.ck-toggles { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid var(--line); background: transparent; color: inherit; border-radius: 999px; padding: 8px 12px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.chip.warnchip.on { background: #b3261e; border-color: #b3261e; }
.chip.big { padding: 10px 18px; font-size: 15px; }
.ck-photos { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ck-photos img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.ck-photos img.waiting { opacity: .6; }
.cs-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cs-row .cs-name { flex: 1; min-width: 160px; }
.cs-add { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cs-add input { flex: 1; min-width: 200px; }

/* Weather day */
.wd-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; align-items: start; }
@media (max-width: 860px) { .wd-grid { grid-template-columns: 1fr; } }
.wd-group { border-top: 1px solid var(--line); padding: 8px 0; }
.wd-stop { padding-left: 22px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* Live map */
.live-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 14px; align-items: start; }
@media (max-width: 900px) { .live-grid { grid-template-columns: 1fr; } }
.live-map { height: 560px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--line); }
@media (max-width: 900px) { .live-map { height: 360px; } }
.live-card { margin-bottom: 10px; }
.live-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.live-bar { height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 6px 0; }
.live-bar span { display: block; height: 100%; border-radius: 99px; }
.live-stop { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 3px solid #062e34; font: 700 11px/18px Poppins, sans-serif; text-align: center; color: #062e34; box-sizing: border-box; }
.live-stop.done { background: #e7f4ea; color: #1f7a3a; }
.live-stop.skip { background: #fde8e7; color: #b3261e; }
.live-tech { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; color: #fff; font: 700 15px/28px Poppins, sans-serif; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.35); box-sizing: border-box; }

/* Scorecard */
.sc-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 12px; }
/* Scorecard tiles: follow the light/dark theme so the numbers are always readable */
.sc-tile { border: 1px solid var(--line); border-left: 5px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--bg); color: var(--ink); }
.sc-tile.ok { border-color: #1f7a3a; background: #eef8f0; }
.sc-tile.gold { border-color: #d99a1e; background: #fff8e6; }
.sc-tile.red { border-color: #b3261e; background: #fdeeed; }
.sc-v { font-family: var(--head); font-size: 28px; font-weight: 700; line-height: 1.1; color: var(--ink); }
.sc-tile.ok .sc-v { color: #1d7a46; } .sc-tile.gold .sc-v { color: #9a6200; } .sc-tile.red .sc-v { color: #b42318; }
.sc-l { font-weight: 700; font-size: 13px; color: var(--ink); text-transform: uppercase; letter-spacing: .03em; margin-top: 2px; }
.sc-s { font-size: 12px; color: var(--muted); margin-top: 4px; }
@media (prefers-color-scheme: dark) {
  .sc-tile { background: #0b1c1e; }
  .sc-tile.ok { background: #143726; border-color: #3fae6e; } .sc-tile.ok .sc-v { color: #7fdca3; }
  .sc-tile.gold { background: #3a2e14; border-color: #f9b233; } .sc-tile.gold .sc-v { color: #f9b233; }
  .sc-tile.red { background: #3b1714; border-color: #ff7a6e; } .sc-tile.red .sc-v { color: #ff9b91; }
  .sc-tile .sc-s { color: #b9c9c6; }
}

/* Dog ID photos */
.dog-ids { margin: 8px 0 10px; }
.dog-ids-title { font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.dog-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.dog-id { margin: 0; text-align: center; flex: none; width: 96px; }
.dog-id img { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); display: block; margin: 0 auto 4px; }
.dog-id figcaption { font-size: 13px; }
.pp-dogwrap { margin: 6px 0; }

.sp-low-row td { background: #fdeeed; }

/* Gusto box */
.gusto-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.gusto-name { margin-top: 4px; max-width: 220px; padding: 6px 8px !important; font-size: 13px !important; }
.wd-grid > * { min-width: 0; }
.wd-at { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.wd-at input[type=date], .wd-at input[type=time] { max-width: 100%; }

/* Bulk reassign */
.bulk-bar { position: sticky; top: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px 12px; margin: 10px 0; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.bulk-act { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.bulk-act select { width: auto; min-width: 140px; }
.sel-col { width: 34px; }
.plan-stops li { grid-template-columns: 22px 70px 1fr auto; }
.plan-stops li .dp-sel { margin: 0; width: 18px; height: 18px; }
.route-head .dp-sel-route { margin-right: 6px; }

/* Practice mode */
.practice-banner { position: sticky; top: 0; z-index: 50; background: repeating-linear-gradient(45deg, #f9b233, #f9b233 14px, #ffcf6b 14px, #ffcf6b 28px); color: #062e34; padding: 8px 12px; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.practice-banner button { border: 0; background: #062e34; color: #fff; border-radius: 999px; padding: 4px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.to-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }

/* Vehicle check */
.vc-list { display: grid; gap: 6px; margin-bottom: 10px; }
.vc-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.vc-btns { display: flex; gap: 4px; flex: none; }
.vc-btns .chip { padding: 6px 10px; font-size: 13px; }

/* Client history */
.hist-visit { margin-bottom: 10px; }
.hist-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 4px; }
.hist-photos { display: flex; gap: 8px; flex-wrap: wrap; margin: 6px 0; }
.hist-photos a { position: relative; display: block; }
.hist-photos img { width: 92px; height: 92px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); display: block; }
.hist-photos span { position: absolute; left: 4px; bottom: 4px; background: rgba(6,46,52,.8); color: #fff; font-size: 11px; border-radius: 6px; padding: 1px 5px; }
.hist-complaint { background: #fdeeed; border-radius: 10px; padding: 6px 8px; margin: 6px 0; font-size: 14px; }
.pf-table td, .pf-table th { white-space: nowrap; }

/* Weather strip */
.wx { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 8px 0 4px; }
@media (max-width: 600px) { .wx { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wx-day { border: 1px solid var(--line); background: var(--card); border-radius: 14px; padding: 8px 10px; }
.wx-day.watch { border-color: #b42318; background: #fdeeed; }
.wx-d { font-weight: 700; font-size: 13px; }
.wx-i { font-size: 26px; line-height: 1.2; }
.wx-t { font-weight: 700; }
.wx-w { color: #b42318; font-weight: 600; }

/* Vehicle check: keep Done reachable */
#vc-form .vc-done{position:sticky;bottom:-20px;margin:0 -20px -20px;padding:12px 20px 20px;background:var(--card);border-radius:0 0 18px 18px;box-shadow:0 -6px 12px rgba(0,0,0,.06)}
.sync-card{border:2px solid var(--gold)}

/* Work timer on a started stop */
.work-timer { background: var(--green-3); border-radius: 12px; padding: 10px 14px; display: grid; gap: 6px; }
.wt-top { display: flex; align-items: baseline; gap: 10px; }
.wt-top span { font-family: ui-monospace, Menlo, monospace; font-size: 30px; font-weight: 700; color: var(--ok); }
.wt-top small, .work-timer > small { color: var(--muted); }
.wt-bar { height: 8px; border-radius: 999px; background: rgba(0,0,0,.08); overflow: hidden; }
.wt-bar i { display: block; height: 100%; width: 0; background: var(--ok); border-radius: 999px; transition: width .9s linear; }
.work-timer.near .wt-top span { color: #a86a00; }
.work-timer.near .wt-bar i { background: var(--gold); }
.work-timer.over { background: var(--red-bg); }
.work-timer.over .wt-top span { color: var(--red); }
.work-timer.over .wt-bar i { background: var(--red); }
@media (prefers-color-scheme: dark) { .wt-bar { background: rgba(255,255,255,.12); } .wt-top span { color: #7fdca3; } .work-timer.near .wt-top span { color: var(--gold); } .work-timer.over .wt-top span { color: #ff9b91; } }
.svc-banner.extra-time { background: var(--gold-2); border-color: var(--gold); }

/* "Is there a gate?" question at yards with no gate info */
.gate-q { border: 2px solid var(--gold); display: grid; gap: 8px; }
.gate-q-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* Pre-shift checklist on Dispatch */
.ready-card { border-radius: 12px; padding: 10px 14px; margin: 8px 0; background: var(--green-3); display: grid; gap: 6px; }
.ready-card.ok { background: #dcf3e5; }
.ready-card.warn { background: var(--gold-2); border: 1.5px solid var(--gold); }
.ready-card.bad { background: var(--red-bg); border: 1.5px solid var(--red); }
.ready-card ul { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.ready-card li span { display: block; font-weight: 600; }
.ready-card li small { display: block; color: var(--muted); }
@media (prefers-color-scheme: dark) { .ready-card.ok { background: #143726; } }

/* Daily tip approval (Office > Team messages) */
.tips-card { display: grid; gap: 10px; border: 2px solid var(--gold); }
.tip-item { border-top: 1px solid var(--line); padding-top: 10px; display: grid; gap: 6px; }
.tip-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tip-text { white-space: normal; }

/* Real-world pace panel on Dispatch */
.pace-card summary { cursor: pointer; }
.pace-card[open] { display: grid; gap: 8px; }

.vc-fuel { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 4px; }
.svc-banner.no-hwy { background: #fde2e2; border-color: #ef4444; color: #7f1d1d; }

/* ---------- Team hub ---------- */
.nav-badge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 5px; border-radius: 999px; background: var(--gold); color: var(--green); font-size: 11.5px; font-weight: 700; vertical-align: 1px; }
.hub-gate { border: 2px solid var(--gold); background: var(--gold-2); }
.hub-gate-head { font-family: var(--head); font-size: 18px; color: var(--green); margin-bottom: 4px; }
@media (prefers-color-scheme: dark) { .hub-gate-head { color: var(--gold); } }
.hub-gate-list { margin: 6px 0 12px; padding-left: 4px; list-style: none; }
.hub-gate-list li { padding: 3px 0; font-weight: 600; }
.hub-ok { border-left: 5px solid var(--ok); font-weight: 600; }
.hub-draft { border-left: 5px solid var(--gold); font-weight: 600; }
.hub-gusto { margin-top: 6px; }
.hub-list { display: grid; gap: 8px; margin-bottom: 8px; }
.hub-item { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: inherit; text-decoration: none; }
.hub-item:active { transform: scale(.99); }
.hub-ico { font-size: 22px; width: 30px; text-align: center; }
.hub-main { flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.hub-title { font-weight: 600; font-size: 16px; }
.hub-body h3 { font-family: var(--head); color: var(--green); font-size: 18px; margin: 18px 0 6px; }
.hub-body h3:first-child { margin-top: 0; }
@media (prefers-color-scheme: dark) { .hub-body h3 { color: var(--gold); } }
.hub-body p { margin: 0 0 10px; line-height: 1.55; }
.hub-body ul { margin: 0 0 10px; padding-left: 22px; line-height: 1.55; }
.hub-body li { margin: 3px 0; }
.hub-sign .check { align-items: flex-start; margin-bottom: 10px; }
.hub-progress { height: 10px; border-radius: 999px; background: var(--green-3); overflow: hidden; margin-bottom: 6px; }
.hub-progress span { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.hub-checklist { list-style: none; margin: 8px 0 0; padding: 0; }
.hub-checklist li { display: flex; gap: 8px; padding: 5px 0; }
.hub-checklist li.done { color: var(--muted); }
.hb-pol summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hb-pol textarea { width: 100%; font-family: inherit; }
.topnav a { white-space: nowrap; display: inline-flex; align-items: center; }
@media (max-width: 400px) { .topnav a { padding-left: 9px; padding-right: 9px; } .brand-name { font-size: 18px; } }
.hb-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 6px; }
.hb-edit textarea { min-height: 380px; font-size: 14.5px; line-height: 1.5; }
.hb-preview { border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; min-height: 380px; max-height: 520px; overflow-y: auto; background: var(--card); }
.hb-pol summary { padding: 4px 0; font-size: 16px; }
.hb-pol[open] summary { margin-bottom: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.hb-tips code { background: var(--green-3); padding: 1px 6px; border-radius: 6px; font-size: 13px; }
.hb-tip-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 6px 14px; margin-top: 8px; }
@media (max-width: 900px) { .hb-edit { grid-template-columns: 1fr; } .hb-edit textarea, .hb-preview { min-height: 240px; } }


/* ================= Field Mode (Nov 2026 redesign) =================
   High contrast for bright sun, big tap targets, Riffic Bold headlines,
   real logo, line icons, bottom tab bar on phones. */
:root { --ink: #0b1a1c; --muted: #44585b; --line: #dde3e1; --bg: #ffffff; --radius: 16px; --tap: 56px; }
@media (prefers-color-scheme: dark) { :root { --ink: #f1f6f5; --muted: #a9bdba; --bg: #0b1c1e; --card: #112a2d; --line: #26474a; } }
h1, h2, h3, .brand-name, .office-title { font-weight: 700; letter-spacing: .2px; }
h1 { font-size: 30px; color: var(--green); }
@media (prefers-color-scheme: dark) { h1 { color: var(--gold); } }
.ico { flex: none; display: block; }

/* Top bar: white with a heavy green rule, real logo */
.topbar { background: var(--card); color: var(--green); border-bottom: 3px solid var(--green); padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; min-height: 62px; }
.brand-logo { width: 40px; height: auto; display: block; }
.brand-mark { display: none; }
.brand-name { font-size: 23px; color: var(--green); }
.pending-pill { margin-left: auto; }
@media (prefers-color-scheme: dark) {
  .topbar { background: #0b1c1e; color: #fff; border-bottom-color: var(--gold); }
  .brand-name { color: var(--gold); }
}

/* Nav links: top bar on bigger screens */
.topnav { gap: 4px; }
.topnav a { position: relative; gap: 7px; padding: 9px 13px; border-radius: 12px; font-size: 15px; font-weight: 600; color: var(--muted); }
.topnav a:hover { background: var(--green-3); color: var(--green); }
.topnav a.on { background: var(--green); color: #fff; }
.topnav .ico { width: 19px; height: 19px; }
@media (prefers-color-scheme: dark) {
  .topnav a { color: #c3d4d1; }
  .topnav a:hover { background: rgba(255,255,255,.08); color: #fff; }
  .topnav a.on { background: var(--gold); color: var(--green); }
}

/* Phones: the same links become a bottom tab bar */
@media (max-width: 760px) {
  .topnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; background: var(--green); padding: 6px 6px calc(env(safe-area-inset-bottom) + 6px); box-shadow: 0 -2px 10px rgba(0,0,0,.12); }
  .topnav a { flex-direction: column; gap: 3px; padding: 8px 0 6px; border-radius: 12px; font-size: 12.5px; font-weight: 700; color: #e4eeec; justify-content: center; }
  .topnav a:hover { background: transparent; color: #fff; }
  .topnav a.on { background: transparent; color: var(--gold); }
  .topnav .ico { width: 26px; height: 26px; }
  .topnav .nav-badge { position: absolute; top: 2px; left: calc(50% + 6px); margin: 0; }
  body.has-tabs main { padding-bottom: calc(env(safe-area-inset-bottom) + 100px); }
  body.has-tabs .toast { bottom: calc(env(safe-area-inset-bottom) + 92px); }
  .topbar { justify-content: flex-start; }
}
@media (max-width: 760px) and (prefers-color-scheme: dark) { .topnav { background: #071416; border-top: 1px solid var(--line); } }

/* Buttons: bigger and bolder */
.btn { min-height: var(--tap); border-radius: 14px; font-weight: 700; font-size: 17px; }
.btn-small { min-height: 44px; font-size: 15px; border-radius: 12px; }
.btn-ghost { border-width: 2.5px; border-color: var(--green); color: var(--green); }
.btn-white { background: #fff; color: var(--green); }
@media (prefers-color-scheme: dark) { .btn-ghost { border-color: #4f7a7e; color: var(--ink); } .btn-green { border: 2.5px solid #4f7a7e; } }
.nav-buttons .btn-gold { min-height: 64px; font-size: 18px; }

/* Cards: flat, crisp edges, no soft shadows */
.card, .stop, .stat, .step, .hub-item { border-width: 2px; }
.card { border-radius: var(--radius); }

/* Clock bar */
.clockbar { border-width: 2.5px; border-radius: var(--radius); padding: 12px 14px; }
.clockbar b { font-size: 17px; }
.clockbar.on { background: #e6f5ec; border-color: var(--ok); }
.clockbar.break { background: var(--gold-2); }
@media (prefers-color-scheme: dark) { .clockbar.on { background: #123524; } }

/* Route progress */
.progress { margin: 16px 0 14px; }
.progress-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.progress-top b { font-family: var(--head); font-size: 28px; color: var(--green); line-height: 1; }
.progress-top span { color: var(--muted); font-weight: 600; font-size: 14.5px; text-align: right; }
.progress-bar { height: 12px; border-radius: 999px; background: var(--green-3); overflow: hidden; }
.progress-bar i { display: block; height: 100%; background: var(--gold); border-radius: 999px; min-width: 6px; }
@media (prefers-color-scheme: dark) { .progress-top b { color: var(--gold); } .progress-bar { background: #1c3a3d; } }

/* Big next-stop card */
.next-card { background: var(--green); color: #fff; border-radius: 22px; padding: 20px; display: grid; gap: 12px; margin: 0 0 18px; }
.next-label { font-size: 13px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--gold); }
.next-name { font-family: var(--head); font-size: 32px; font-weight: 700; line-height: 1.05; margin-top: -4px; }
.next-addr { font-size: 17px; color: #d6e4e1; margin-top: -6px; }
.next-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.next-fact { background: rgba(255,255,255,.1); border-radius: 12px; padding: 9px 12px; display: grid; }
.next-fact span { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #a9c2be; }
.next-fact b { font-size: 17px; }
.next-fact.gold { background: var(--gold); color: var(--green); }
.next-fact.gold span { color: var(--green); }
.next-card .tags { margin-top: 0; }
.next-card .btn { min-height: 64px; font-size: 19px; font-weight: 800; border-radius: 16px; }
@media (prefers-color-scheme: dark) { .next-card { background: #123a40; border: 2px solid #2a5a60; } }

/* Stop list */
.list-label { font-size: 13px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); margin: 6px 0 8px; }
.stop { border-radius: var(--radius); padding: 12px 14px; }
.stop.is-next { border-color: var(--gold); border-width: 2.5px; }
.stop-name { font-size: 17.5px; font-weight: 700; }
.num { font-family: var(--head); font-size: 16px; }
.tag { font-size: 13px; font-weight: 700; padding: 4px 10px; }
.tag.red { background: #b3261e; color: #fff; }
@media (prefers-color-scheme: dark) { .tag.red { background: #8f1f18; color: #fff; } }

/* Stop page */
.back { font-weight: 700; color: var(--green); font-size: 16px; min-height: 44px; }
@media (prefers-color-scheme: dark) { .back { color: var(--gold); } }
.info dt { font-weight: 700; text-transform: uppercase; letter-spacing: .6px; font-size: 12px; }
.info dd { font-size: 17px; font-weight: 600; }
.warn { border: 2px solid var(--red); font-size: 16px; }

/* Office (desktop) */
.office-nav { border-width: 2px; }
.office-nav a { font-size: 15px; }
.nav-ico { width: 22px; display: inline-flex; justify-content: center; color: var(--green-2); }
.office-nav a.on .nav-ico { color: var(--gold); }
@media (prefers-color-scheme: dark) { .nav-ico { color: #8fb0ab; } }
.office-nav { top: 78px; }
.progress-top b { white-space: nowrap; }
@media (prefers-color-scheme: dark) {
  .office-nav a.on { background: var(--gold); color: var(--green); }
  .office-nav a.on .nav-ico { color: var(--green); }
  .office-title { color: var(--gold); }
}

/* Nov 18 2026: route card buttons, guided stop steps, required gas level */
.next-card .btn-ghost-light { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.45); min-height: 52px; font-size: 17px; }
.next-note { margin: -4px 0 0; color: #d6e4e1; }
.guide { background: var(--card); border: 2px solid var(--gold); border-radius: var(--radius); padding: 14px; display: grid; gap: 10px; }
.guide-step { font-size: 12px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.guide h3 { margin: 0; font-size: 21px; }
.guide textarea { min-height: 84px; }
.guide .btn { min-height: 58px; font-size: 18px; font-weight: 800; }
.guide .linklike { justify-self: start; }
.vc-fuel-box { border: 2.5px solid var(--gold); border-radius: 14px; padding: 10px 12px; margin: 4px 0 10px; background: rgba(249,178,51,.12); }
.vc-fuel-box.missing { border-color: #d92d20; background: rgba(217,45,32,.1); }
.vc-fuel-box .vc-fuel-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 18px; }
.vc-fuel-box .chip { min-height: 48px; font-size: 16px; padding: 8px 14px; }
.photo-strip .ph-wrap { position: relative; flex: 0 0 auto; }
.photo-strip .ph-del { position: absolute; top: -6px; right: -6px; width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; background: #d92d20; color: #fff; font-weight: 800; font-size: 14px; line-height: 1; padding: 0; cursor: pointer; }
.just-done { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; margin: -4px 0 10px; color: var(--muted); }
.just-done a { font-weight: 800; color: var(--ink, #0b2f33); white-space: nowrap; }

/* System health */
.health-row { display: flex; gap: 12px; align-items: flex-start; }
.health-dot { width: 14px; height: 14px; border-radius: 7px; margin-top: 5px; flex: none; }
.health-dot.ok { background: var(--ok); }
.health-dot.bad { background: var(--red); box-shadow: 0 0 0 4px rgba(179,38,30,.18); }

/* Growth pages */
.risk-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.risk-signs { margin: 8px 0; padding-left: 20px; }
.risk-signs li { margin: 2px 0; }
pre.pv { white-space: pre-wrap; font-family: inherit; background: var(--green-3); padding: 12px; border-radius: 12px; font-size: 14px; }
@media (prefers-color-scheme: dark) { pre.pv { background: #17373a; } }
.nb-which { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 10px; }
.nb-form label { display: block; margin-top: 8px; font-weight: 600; font-size: 14px; }
.nb-form input { width: 100%; }
.rule-grid .full { grid-column: 1 / -1; }

/* Postcard blasts */
.nb-btn { border-color: var(--gold) !important; border-width: 2.5px; font-weight: 700; }
.blast-banner { display: block; background: var(--gold); color: var(--green); border-radius: 14px; padding: 12px 16px; margin: 0 0 12px; text-decoration: none; font-size: 16px; }
.blast-banner:hover { filter: brightness(1.05); color: var(--green); }

/* ---------- Today's steps (Office checklist) ---------- */
.ts-bar { height: 10px; border-radius: 999px; background: var(--green-3); overflow: hidden; margin: 0 0 6px; }
.ts-bar span { display: block; height: 100%; background: var(--ok); border-radius: 999px; transition: width .4s; }
.ts-list { display: grid; gap: 8px; }
.ts-step { background: var(--card); border: 1.5px solid var(--line); border-radius: var(--radius); }
.ts-step.is-next { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-2); }
.ts-step.is-problem { border-color: var(--red); }
.ts-step.is-done .ts-text b { color: var(--muted); }
.ts-step.is-skip, .ts-step.is-waiting { opacity: .7; }
.ts-main { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; text-decoration: none; color: inherit; }
.ts-main:hover { background: var(--green-3); border-radius: var(--radius); }
.ts-num { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-family: var(--head); font-size: 17px; background: var(--green-3); color: var(--ink); }
.is-done .ts-num { background: var(--ok); color: #fff; }
.is-next .ts-num { background: var(--gold); color: var(--green); }
.is-problem .ts-num { background: var(--red); color: #fff; }
.ts-text { display: grid; gap: 2px; min-width: 0; }
.ts-detail { font-size: 14px; color: var(--muted); }
.ts-go { display: grid; justify-items: end; gap: 4px; text-align: right; }
.ts-action { font-size: 13.5px; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.ts-tick { display: flex; align-items: center; gap: 8px; padding: 0 14px 12px 64px; font-size: 14px; cursor: pointer; }
.ts-tick input { width: 20px; height: 20px; }
@media (max-width: 640px) {
  .ts-main { grid-template-columns: 34px 1fr; }
  .ts-go { grid-column: 2; justify-items: start; text-align: left; grid-auto-flow: column; justify-content: start; gap: 10px; align-items: center; }
  .ts-tick { padding-left: 60px; }
}
.flash { animation: ts-flash 2s ease-out; }
@keyframes ts-flash { 0%, 40% { background: var(--gold-2); box-shadow: 0 0 0 4px var(--gold); } 100% { box-shadow: none; } }

/* Map pin fix (Yard info) */
.pin-map { height: 300px; border-radius: 12px; overflow: hidden; margin: 6px 0; background: var(--green-3); display: grid; place-items: center; }
.pin-map.leaflet-container { display: block; }

/* Map pins (wrong-pin finder) */
.pc-item { margin-bottom: 10px; }
.pc-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pc-dist { display: grid; justify-items: end; }
.pc-dist b { font-family: var(--head); font-size: 22px; }
.pc-map { height: 240px; border-radius: 12px; overflow: hidden; margin: 10px 0 4px; background: var(--green-3); display: grid; place-items: center; }
.pc-map.leaflet-container { display: block; }

/* Busy season planner */
.cap-controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; align-items: end; margin-bottom: 10px; }
.cap-controls input[type=range] { width: calc(100% - 40px); vertical-align: middle; }
.cap-controls b { margin-left: 8px; font-size: 18px; }
.cap-table { width: 100%; border-collapse: separate; border-spacing: 4px; }
.cap-table th { text-align: left; }
.cap-cell { border-radius: 10px; padding: 8px; vertical-align: top; min-width: 110px; }
.cap-pct { font-family: var(--head); font-size: 20px; }
.cap-ok { background: #dcf3e5; color: #14211f; }
.cap-tight { background: #fff3da; color: #14211f; }
.cap-gold { background: #fde7b0; color: #14211f; border: 2px solid var(--gold); }
.cap-red { background: var(--red-bg); color: var(--red); border: 2px solid var(--red); }
.cap-break { background: var(--green-3); color: var(--muted); }
.cap-key { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin: 0 4px 0 10px; }

/* Client answered the dog text: impossible to miss on the route */
.reply-flash { display: block; margin: 6px 0 2px; padding: 8px 10px; border-radius: 10px; font-weight: 800; font-size: 15px; line-height: 1.25; }
.reply-flash.enter { background: #22c55e; color: #052e14; animation: enter-flash 1s ease-in-out infinite; }
.reply-flash.skip { background: var(--red); color: #fff; animation: enter-flash 1s ease-in-out infinite; }
.reply-flash.other { background: var(--gold); color: #062e34; }
.reply-flash-box { animation: enter-flash 1s ease-in-out infinite; border: 2px solid #22c55e; }
@keyframes enter-flash { 0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .9); filter: brightness(1); } 50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); filter: brightness(1.25); } }
@media (prefers-reduced-motion: reduce) { .reply-flash, .reply-flash-box { animation: none; } }
/* Office-only notes (never sent to techs) */
.office-only { background: var(--gold-2); border: 1.5px dashed var(--gold); border-radius: 12px; padding: 10px 12px; margin: 10px 0; }

/* Text log */
.tl-row { padding: 10px 12px; margin: 8px 0; }
.tl-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.tl-body { white-space: pre-line; margin: 6px 0; font-size: 15px; }
.tl-in { border-left: 4px solid var(--gold); }
.tl-out { border-left: 4px solid var(--green-2); }
.tl-bad { border-left-color: var(--red); }
.tl-arrow { font-weight: 800; }
/* Happy dog photos */
.dp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.dp-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; display: block; margin-bottom: 6px; }
.dp-used { opacity: .6; }
.dog-photo-btn { border: 2px dashed var(--gold); }
.dog-photo-note { margin: 4px 0 0; }
/* Attendance */
.att-pts { font-size: 28px; font-weight: 800; margin: 4px 0; }
.att-table input[type=text] { min-width: 160px; }

/* In-app viewer for photos and office pages (no dead-end windows on the home screen app) */
.viewer { position: fixed; inset: 0; z-index: 3000; background: #041f23; display: flex; flex-direction: column; }
.viewer-bar { display: flex; gap: 8px; justify-content: space-between; padding: calc(env(safe-area-inset-top, 0px) + 10px) 12px 10px; }
.viewer-body { flex: 1; display: flex; align-items: center; justify-content: center; overflow: auto; padding: 0 8px calc(env(safe-area-inset-bottom, 0px) + 8px); }
.viewer-body img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.viewer-body iframe { width: 100%; height: 100%; border: 0; background: #fff; border-radius: 8px; }
.viewer .btn-ghost-light { background: transparent; color: #fff; border: 2px solid rgba(255,255,255,.5); }

/* Yard notes up front on the route and the stop */
.yn-card { background: var(--gold-2); border: 2px solid var(--gold); border-radius: 14px; padding: 10px 12px; margin: 10px 0; color: var(--ink); text-align: left; }
.yn-title { font-family: var(--head); font-size: 15px; color: var(--green); margin-bottom: 4px; }
.yn-row { display: flex; gap: 8px; align-items: flex-start; padding: 5px 0; border-top: 1px solid rgba(249, 178, 51, .45); }
.yn-title + .yn-row { border-top: 0; }
.yn-ico { font-size: 20px; line-height: 1.2; }
.yn-text { white-space: pre-line; font-size: 16px; font-weight: 600; }
.yn-mini { display: block; margin: 6px 0 2px; padding: 6px 8px; background: var(--gold-2); border-left: 4px solid var(--gold); border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--ink); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
@media (prefers-color-scheme: dark) { .yn-card, .yn-mini { color: #fff; } .yn-title { color: var(--gold); } }

/* Office > Billing settings: grouped, readable fields */
.bset-group { padding: 14px 0; border-top: 1px solid var(--line); }
.bset-group:first-of-type { border-top: 0; }
.bset-group h3 { margin: 0 0 4px; font-size: 17px; }
.bset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px 16px; margin-top: 8px; }
.bset { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.bset.wide { grid-column: 1 / -1; }
.bset-in { display: flex; align-items: center; gap: 8px; }
.bset-in i { font-style: normal; font-weight: 700; color: var(--muted); min-width: 1ch; }
.bset-in input { flex: 1; min-width: 0; font-size: 17px; font-weight: 600; }
.bset.wide .bset-in input { font-size: 16px; font-weight: 500; }
.check-line { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 8px 0; cursor: pointer; }
.check-line input[type=checkbox] { width: 22px; height: 22px; flex: none; accent-color: var(--gold); }
/* Office > Hiring > Applicants */
.hire-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.hire-card { margin: 0; display: flex; flex-direction: column; gap: 8px; }
.hire-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.hire-name { font-size: 17px; }
.hire-ans { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; margin: 4px 0; font-size: 14px; }
.hire-ans dt { color: var(--muted, #6b7a7c); font-weight: 600; }
.hire-ans dd { margin: 0; }
.hire-quote { margin: 0; padding: 8px 12px; border-left: 3px solid var(--gold, #f9b233); background: var(--green-3); border-radius: 8px; font-size: 14px; }
.hire-status { border-top: 1px solid var(--line); padding-top: 8px; margin-top: auto; }
.hire-ask { background: #fff7e6; border: 1px solid var(--gold, #f9b233); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.hire-ref { background: var(--green-3); border-radius: 10px; padding: 8px 10px; font-size: 14px; line-height: 1.5; }
.hire-notes summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.hire-note { font-size: 14px; padding: 6px 0; border-bottom: 1px dashed var(--line); white-space: pre-wrap; }
.hire-note-add { display: flex; gap: 6px; margin-top: 6px; }
.hire-note-add input { flex: 1; min-width: 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--green, #0d4a52); text-decoration: underline; cursor: pointer; font: inherit; font-size: 13px; }
