/* Built for a phone in one hand, outdoors in sunlight: big targets, strong
   contrast, light background only. Brand: deep green + gold. */
:root {
  --green: #0d4a2c; --green-2: #146b41; --green-soft: #e7f3ec;
  --gold: #c9a24a; --gold-soft: #fbf4e2;
  --ink: #15201a; --ink-2: #4b5a51; --line: #dfe6e1; --bg: #f4f6f4; --card: #fff;
  --red: #b42318; --red-soft: #fdecea; --amber: #a15c07; --amber-soft: #fff4e0;
  --blue: #1d4ed8; --blue-soft: #e8efff;
  --r: 14px; --tap: 52px;
  font-size: 16px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Noto Nastaliq Urdu", sans-serif; }
body { min-height: 100vh; padding-bottom: env(safe-area-inset-bottom); }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green-2); }
.boot { padding: 40vh 0 0; text-align: center; color: var(--ink-2); }

/* ---- top bar ---- */
.bar { position: sticky; top: 0; z-index: 5; background: var(--green); color: #fff;
  padding: calc(10px + env(safe-area-inset-top)) 12px 10px; display: flex; align-items: center; gap: 10px; }
.bar h1 { font-size: 1.1rem; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar .sub { display: block; font-size: .78rem; font-weight: 400; opacity: .85; }
.bar button { background: rgba(255,255,255,.12); border: 0; color: #fff; border-radius: 10px;
  min-width: 44px; height: 44px; padding: 0 10px; font-size: .95rem; }
.pill { font-size: .78rem; padding: 4px 10px; border-radius: 999px; background: rgba(255,255,255,.16); white-space: nowrap; }
.pill.wait { background: var(--gold); color: #2b1d00; font-weight: 600; }
.pill.off { background: #6b7280; }

.banner { padding: 10px 14px; font-size: .9rem; background: var(--amber-soft); color: #5c3700; border-bottom: 1px solid #f3d9a8; }
.banner.red { background: var(--red-soft); color: var(--red); border-color: #f5c2bd; }
.wrap { padding: 12px; max-width: 720px; margin: 0 auto; }

/* ---- cards & lists ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 10px; }
.list { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r); padding: 12px 14px; min-height: var(--tap); text-align: start; width: 100%; cursor: pointer; }
.row:active { background: var(--green-soft); }
.row .main { flex: 1; min-width: 0; }
.row .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.row .s { font-size: .82rem; color: var(--ink-2); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row.done { background: #fbfcfb; }
.row.done .t { color: var(--ink-2); }
.sec { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); margin: 18px 4px 8px; font-weight: 600; }

.chip { display: inline-block; font-size: .75rem; padding: 3px 8px; border-radius: 999px; background: var(--bg);
  color: var(--ink-2); border: 1px solid var(--line); white-space: nowrap; }
.chip.water { background: var(--green-soft); color: var(--green); border-color: #bfe0cc; }
.chip.paid { background: var(--blue-soft); color: var(--blue); border-color: #c7d6fb; }
.chip.skip { background: var(--amber-soft); color: var(--amber); border-color: #f3d9a8; }
.chip.late { background: var(--red-soft); color: var(--red); border-color: #f5c2bd; }
.chip.due { background: var(--gold-soft); color: #7a5a0c; border-color: #ecd9a3; }
.chip.wait { background: var(--gold-soft); color: #7a5a0c; border-color: #ecd9a3; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

.prog { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; }
.prog > i { display: block; height: 100%; background: var(--green-2); border-radius: 99px; }
.count { font-variant-numeric: tabular-nums; font-weight: 700; }

/* ---- tabs / segmented ---- */
.seg { display: flex; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 9px; min-height: 44px; font-weight: 600; color: var(--ink-2); }
.seg button.on { background: var(--green); color: #fff; }

.seg.tabs { overflow-x: auto; scrollbar-width: none; }
.seg.tabs button { flex: none; padding: 0 14px; white-space: nowrap; }
.seg.filt button { font-size: .82rem; padding: 0 4px; min-height: 38px; }
.seg.filt button .muted { font-size: .75rem; }
.seg.filt button.on .muted { color: rgba(255,255,255,.8); }
.tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.tools .tl { font-size: .75rem; color: var(--ink-2); font-weight: 600; margin: 0 2px 4px; text-transform: uppercase; letter-spacing: .05em; }
.tools select.in, .tools .picker { min-height: 44px; font-size: .9rem; padding: 6px 10px; border-color: #dfe6e1; }
.pickrow { display: flex; gap: 6px; }
.picker { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 6px;
  text-align: start; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xbtn { width: 46px; flex: none; min-height: 46px; padding: 0; cursor: pointer; color: var(--red); }

/* bottom sheet (area picker) */
.sheet-bg { position: fixed; inset: 0; background: rgba(10, 25, 16, .45); z-index: 40; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 41; max-width: 560px; margin: 0 auto; max-height: 82vh;
  background: var(--card); border-radius: 18px 18px 0 0; display: flex; flex-direction: column;
  padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -8px 30px rgba(0,0,0,.18); }
.sheet-h { display: flex; justify-content: space-between; align-items: baseline; padding: 16px 16px 10px; font-size: 1.1rem; }
.sheet-list { overflow-y: auto; padding: 6px 6px; flex: 1; }
.pick { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 6px 10px; border-radius: 10px; cursor: pointer; }
.pick:active { background: var(--green-soft); }
.pick input { width: 22px; height: 22px; accent-color: var(--green); flex: none; }
.pick .pn { flex: 1; font-weight: 600; }
.sheet-f { display: grid; grid-template-columns: 1fr 2fr; gap: 8px; padding: 10px 14px 14px; border-top: 1px solid var(--line); }

button.in { background: #fff; color: var(--ink); border: 1px solid #c9d3cc; border-radius: 12px; }

.s.note { color: #6b4e00 !important; white-space: normal !important; }

.chips.smart .chip { min-height: 38px; padding: 6px 12px; font-size: .85rem; cursor: pointer; background: var(--card); }
.chips.smart .chip.on { background: var(--green); color: #fff; border-color: var(--green); }
.plan-h { font-weight: 700; margin-bottom: 8px; display: flex; justify-content: space-between; align-items: baseline; }
.card.plan { margin-bottom: 0; }
details.card summary { list-style: none; }
details.card summary::-webkit-details-marker { display: none; }

.bar .rfb { font-size: 1.35rem; }
.bar .rfb { position: relative; }
.bar .rfb .rfi { display: inline-block; }
.bar .rfb.spin .rfi { animation: rfspin 1s linear infinite; opacity: .8; }
.bar .rfb .rfn { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #dc2626; color: #fff; font: 700 .7rem/18px system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px #0d4a2c; }
@keyframes rfspin { to { transform: rotate(360deg); } }

/* ---- home: rider's day ---- */
.hero { background: linear-gradient(140deg, #0d4a2c 0%, #156a40 60%, #1d7a4b 100%); color: #fff; border-radius: 20px;
  padding: 16px 16px 14px; box-shadow: 0 8px 24px rgba(13, 74, 44, .22); position: relative; overflow: hidden; }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 160px; height: 160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,162,74,.28), transparent 70%); pointer-events: none; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.hello { font-size: 1.15rem; font-weight: 700; }
.hdate { font-size: .82rem; opacity: .8; margin-top: 2px; }
.scope { font-size: .72rem; background: rgba(255,255,255,.14); padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.hero-mid { display: flex; align-items: center; gap: 14px; margin-top: 14px; position: relative; }
.ring { width: 84px; height: 84px; flex: none; }
.ring-bg { fill: none; stroke: rgba(255,255,255,.16); stroke-width: 8; }
.ring-fg { fill: none; stroke: var(--gold); stroke-width: 8; stroke-linecap: round; transition: stroke-dasharray .5s; }
.ring-txt { position: absolute; inset-inline-start: 0; width: 84px; text-align: center; line-height: 1.05; }
.ring-txt b { display: block; font-size: 1.45rem; }
.ring-txt span { font-size: .75rem; opacity: .8; }
.ring-txt span { display: block; font-size: .68rem; margin-top: 2px; }
.ring-fg.low { stroke: #ff8a7a; }
.ring-txt.low b { color: #ffb4a8; }
.ring-load { width: 84px; height: 84px; flex: none; border-radius: 50%; border: 2px dashed rgba(255,255,255,.6);
  background: rgba(255,255,255,.08); color: #fff; font-weight: 700; font-size: .8rem; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; cursor: pointer; }
.ring-load span { font-size: 1.5rem; }
.hstats { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; text-align: center; }
.hstats b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hstats b.low { color: #ffb4a8; }
.hstats.two { grid-template-columns: repeat(2, 1fr); }
.hstats span { font-size: .72rem; opacity: .82; }
.hload { grid-column: span 1; border: 1px dashed rgba(255,255,255,.55); background: rgba(255,255,255,.08); color: #fff;
  border-radius: 12px; font-size: .78rem; font-weight: 600; padding: 6px 4px; cursor: pointer; }
.hlinks { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.hlinks button { background: none; border: 0; color: #fff; opacity: .85; font-size: .8rem; font-weight: 600; text-decoration: underline; cursor: pointer; padding: 4px; }
.hcta { margin-top: 14px; width: 100%; min-height: 56px; border: 0; border-radius: 14px; background: var(--gold); color: #241800;
  display: flex; justify-content: space-between; align-items: center; padding: 0 16px; font-size: 1.05rem; cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.18); position: relative; }
.hcta:active { transform: translateY(1px); }
.hcta-sub { font-size: .85rem; font-weight: 700; opacity: .8; }
.hdone { margin-top: 14px; background: rgba(255,255,255,.14); border-radius: 14px; padding: 14px; text-align: center; font-weight: 700; }

.searchbox { display: flex; align-items: center; gap: 8px; margin-top: 12px; background: #fff; border: 1px solid #d6ded9;
  border-radius: 14px; padding: 0 12px; min-height: 50px; }
.searchbox input { flex: 1; border: 0; outline: 0; font-size: 1rem; background: transparent; min-height: 48px; }
.searchbox:focus-within { border-color: var(--green-2); box-shadow: 0 0 0 3px #b9dcc6; }

.wtiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.wt { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 10px 6px; text-align: center; }
.wt .wi { display: block; font-size: 1.1rem; }
.wt b { display: block; font-size: 1.1rem; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wt span:last-child { font-size: .7rem; color: var(--ink-2); }
.w-due b { color: #8a5a00; } .w-new b { color: var(--blue); } .w-money b { color: var(--red); font-size: .95rem; } .w-emp b { color: var(--green-2); }

.agrid { display: grid; grid-template-columns: 1fr; gap: 8px; }
.acard { display: block; width: 100%; text-align: start; background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; cursor: pointer; border-inline-start: 4px solid var(--gold); }
.acard:active { background: var(--green-soft); }
.acard.is-done { border-inline-start-color: var(--green-2); background: #fbfdfb; }
.acard-top { display: flex; justify-content: space-between; align-items: baseline; }
.aname { font-weight: 700; font-size: 1.02rem; }
.afrac { color: var(--ink-2); font-variant-numeric: tabular-nums; }
.afrac b { color: var(--ink); font-size: 1.05rem; }
.prog.thin { height: 6px; margin: 8px 0 6px; }
.ameta { font-size: .8rem; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.ameta i { font-style: normal; color: var(--ink-2); }
.b-due { color: #8a5a00; font-weight: 600; } .b-late { color: var(--red); font-weight: 600; }
.b-money { color: var(--ink-2); } .ameta .ok { color: var(--green-2); font-weight: 600; }
@media (min-width: 560px) { .agrid { grid-template-columns: 1fr 1fr; } }

/* Customer screen: extra bottles card */
.xcard { border: 1px solid #f6c9c4; background: var(--red-soft); color: var(--ink); border-radius: 14px; padding: 12px 14px; margin-bottom: 10px; }
.xcard b { display: block; color: var(--red); font-size: 1rem; }
.xcard .muted { margin-top: 2px; font-size: .85rem; }
.xpick { margin-top: 6px; font-weight: 700; font-size: 1.05rem; color: var(--red); }
.xcard.loan { border-width: 2px; border-color: var(--red); }
.xcard .lrow { margin-top: 4px; font-weight: 600; }
.xk { margin-top: 10px; padding: 10px; border: 1px solid #f3d9a8; background: var(--amber-soft); border-radius: 12px; }
.xk > div:first-child { font-weight: 600; margin-bottom: 8px; }
.xk .seg button { min-height: 52px; }
.xk .seg button small.ur { display: block; }
.xcard.ok { border-color: #bfe0cc; background: var(--green-soft); }
.xcard.ok b { color: var(--green-2); }

/* Home: today's cash and extra-bottle progress */
.prbox { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; }
.pr { display: block; width: 100%; padding: 10px 0; background: none; border: 0; color: inherit; text-align: start; font: inherit; }
button.pr { cursor: pointer; }
.pr + .pr { border-top: 1px solid var(--line); }
.pr-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: .92rem; font-weight: 600; }
.pr-n { font-weight: 400; color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pr-n b { color: var(--ink); font-size: 1.05rem; }
.pr .prog.thin { margin: 8px 0 0; }
.pr-emp .prog i { background: var(--green-2); }
.pr-cash .prog i { background: var(--gold); }

.weekbar { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 12px;
  min-height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid #f3d9a8; background: var(--amber-soft);
  color: #5c3700; font-size: .98rem; cursor: pointer; text-align: start; }
.weekbar b { font-size: 1.15rem; }
.weekbar.ok { border-color: #bfe0cc; background: var(--green-soft); color: var(--green); font-weight: 600; cursor: default; }
.wk-h { display: flex; justify-content: space-between; align-items: baseline; text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--ink); }
.wk-h a { font-size: .85rem; font-weight: 600; }

.owesbtn { border: 0; background: var(--red-soft); color: var(--red); font-weight: 700; font-size: 1rem; border-radius: 10px;
  padding: 6px 10px; cursor: pointer; display: inline-flex; gap: 8px; align-items: baseline; }
.owesbtn span { font-size: .78rem; font-weight: 600; opacity: .85; text-decoration: underline; }
.sheet table.t td.n { white-space: nowrap; }
.due-row { display: flex; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.due-amt { text-align: end; font-weight: 700; color: var(--red); white-space: nowrap; }
.due-amt .muted { font-weight: 400; font-size: .75rem; }
.xclose { border: 0; background: var(--bg); border-radius: 50%; width: 36px; height: 36px; font-size: 1rem; cursor: pointer; }
.sheet-h { align-items: center; }
@media (min-width: 760px) {
  .sheet.side { left: auto; right: 0; top: 0; bottom: 0; margin: 0; width: 420px; max-width: 92vw; max-height: none;
    border-radius: 18px 0 0 18px; box-shadow: -8px 0 30px rgba(0,0,0,.18); }
}

.locknote { background: var(--green-soft); border: 1px solid #bfe0cc; color: var(--green); border-radius: 12px;
  padding: 10px 12px; font-size: .82rem; margin: 6px 0 4px; }
.locknote a { display: block; margin-top: 4px; font-weight: 700; }

.countbtn { margin-inline-start: 6px; border: 1px solid var(--line); background: var(--bg); border-radius: 8px;
  padding: 3px 8px; font-size: .8rem; font-weight: 600; cursor: pointer; vertical-align: middle; }

.gwrap { display: flex; justify-content: center; margin: 18px 0 6px; min-height: 44px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-2); margin: 14px 0 0; font-size: .85rem; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.pinalt { margin-top: 14px; text-align: start; }
.pinalt summary { cursor: pointer; color: var(--ink-2); font-size: .88rem; text-align: center; }

/* the Undo bar */
#snack { position: fixed; left: 10px; right: 10px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 60;
  max-width: 560px; margin: 0 auto; background: var(--ink); color: #fff; border-radius: 14px; padding: 10px 10px 10px 14px;
  display: flex; align-items: center; gap: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transform: translateY(calc(100% + 40px)); visibility: hidden; transition: transform .2s, visibility .2s; }
#snack.on { transform: none; visibility: visible; }
.sn-t { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .9rem; }
.sn-t b, .sn-t span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sn-t span { opacity: .85; font-size: .82rem; }
.sn-b { min-height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid rgba(255,255,255,.3); background: transparent;
  color: #fff; font-weight: 700; display: inline-flex; align-items: center; text-decoration: none; cursor: pointer; }
.sn-b.gold { background: var(--gold); color: #2b1d00; border-color: var(--gold); }

/* vehicle stock */
.vbtn { border-style: dashed; color: var(--green); }
.vcard { margin: 0; }
.vcard.low { border-color: var(--red); }
.vrow { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; gap: 4px; }
.vv { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.vv.red { color: var(--red); }
.vl { font-size: .75rem; color: var(--ink-2); }
.sheet-f.one { grid-template-columns: 1fr; }
.sheet .reasons button { width: 100%; }

/* ---- buttons ---- */
.btn { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: var(--tap);
  border-radius: 12px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 1rem;
  padding: 0 14px; cursor: pointer; text-decoration: none; color: var(--ink); }
.btn.primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn.gold { background: var(--gold); color: #2b1d00; border-color: var(--gold); }
.btn.warn { background: var(--amber-soft); color: var(--amber); border-color: #f3d9a8; }
.btn.danger { background: var(--red-soft); color: var(--red); border-color: #f5c2bd; }
.btn[disabled] { opacity: .45; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btns.three { grid-template-columns: 1fr 1fr 1fr; }
.sticky-foot { position: sticky; bottom: 0; padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 30%); }

/* ---- forms ---- */
label.f { display: block; font-size: .85rem; color: var(--ink-2); margin: 14px 0 6px; font-weight: 600; }
input.in, select.in, textarea.in { width: 100%; min-height: var(--tap); border: 1px solid #c9d3cc; border-radius: 12px;
  padding: 10px 12px; background: #fff; font-size: 1.05rem; }
textarea.in { min-height: 70px; }
input.in:focus, textarea.in:focus, select.in:focus { outline: 3px solid #b9dcc6; border-color: var(--green-2); }
.step { display: flex; align-items: stretch; gap: 8px; }
.step button { width: 64px; min-height: 60px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  font-size: 1.6rem; font-weight: 700; color: var(--green); }
.step input { flex: 1; text-align: center; font-size: 1.6rem; font-weight: 700; min-height: 60px; }
.sum { display: flex; justify-content: space-between; align-items: baseline; padding: 6px 0; }
.sum b { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.big { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-2); font-size: .88rem; }
.err { color: var(--red); font-size: .9rem; margin-top: 8px; }
.kv { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: .95rem; }
.kv dt { color: var(--ink-2); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.reasons { display: grid; grid-template-columns: 1fr; gap: 8px; }
.reasons button { min-height: var(--tap); border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  text-align: start; padding: 0 14px; font-weight: 600; }
.reasons button.on { border: 2px solid var(--green); background: var(--green-soft); }

.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; }
.tile .v { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile .l { font-size: .8rem; color: var(--ink-2); }
.tile.red .v { color: var(--red); }
.tile.green .v { color: var(--green-2); }

table.t { width: 100%; border-collapse: collapse; font-size: .88rem; }
table.t th, table.t td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: start; vertical-align: top; }
table.t th { color: var(--ink-2); font-weight: 600; font-size: .78rem; }
table.t td.n, table.t th.n { text-align: end; font-variant-numeric: tabular-nums; }
.scroll-x { overflow-x: auto; }

.login { max-width: 380px; margin: 0 auto; padding: 12vh 20px 20px; text-align: center; }
.login img { width: 120px; height: 120px; border-radius: 28px; }
.login h1 { color: var(--green); margin: 14px 0 4px; }
.login form { text-align: start; margin-top: 18px; }

#toast { position: fixed; left: 50%; bottom: calc(88px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; z-index: 50;
  opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 90vw; text-align: center; }
#toast.on { opacity: 1; }

[dir="rtl"] .row, [dir="rtl"] .reasons button { text-align: right; }
@media (min-width: 560px) { .tiles { grid-template-columns: repeat(4, 1fr); } }

/* Owner: the day as graphs */
.rptbtn { margin-top: 12px; }
.daynav { display: grid; grid-template-columns: 52px 1fr 52px; gap: 8px; margin-bottom: 12px; }
.daynav button { font-size: 1.4rem; padding: 0; cursor: pointer; }
.daynav button:disabled { opacity: .35; cursor: default; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 560px) { .kpis { grid-template-columns: repeat(4, 1fr); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 2px; }
.kpi b { font-size: 1.6rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi span { font-size: .82rem; color: var(--ink-2); }
.kpi small { font-size: .72rem; color: var(--ink-2); }
.kpi.bad b { color: #d03b3b; }
.dlt { font-size: .78rem; font-weight: 600; }
.dlt.up { color: #146b41; } .dlt.down { color: #a15c07; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { font-size: 9px; fill: var(--ink-2); }
.chart .now { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: .8rem; color: var(--ink-2); margin-bottom: 8px; }
.legend i, .rtop i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.rbar, .abar { padding: 10px 0; }
.rbar + .rbar, .abar + .abar { border-top: 1px solid var(--line); }
.rtop { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; font-size: .92rem; }
.rtrack { height: 10px; background: var(--bg); border-radius: 99px; margin: 7px 0 5px; overflow: hidden; }
.rtrack div { height: 100%; border-radius: 99px; }
.rnums { font-size: .85rem; } .rnums b { font-size: 1rem; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.flag { font-size: .76rem; padding: 3px 8px; border-radius: 99px; background: var(--bg); border: 1px solid var(--line); }
.flag.bad { background: var(--red-soft); border-color: #f6c9c4; color: var(--red); font-weight: 600; }
.rareas { font-size: .76rem; margin-top: 4px; }
.stack { display: flex; gap: 2px; height: 14px; margin-top: 7px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.stack div { height: 100%; }
.tip { position: absolute; z-index: 50; background: var(--ink); color: #fff; font-size: .8rem; padding: 6px 10px; border-radius: 8px; pointer-events: none; max-width: 260px; }
button.kpi, button.abar { width: 100%; text-align: start; font: inherit; color: inherit; cursor: pointer; }
button.abar { display: block; background: none; border: 0; border-radius: 0; }

/* Urdu help line under English names, main buttons and No water reasons.
   plaintext: the Urdu runs right-to-left but lines up with the English above. */
.ur { display: block; unicode-bidi: plaintext; text-align: left; font-size: .82em; font-weight: 400; opacity: .8; line-height: 1.5; margin-top: 1px; }
.btn:has(.ur) { flex-direction: column; gap: 2px; line-height: 1.25; padding-top: 6px; padding-bottom: 6px; }
.btn .ur, .sn-b .ur, .bar .ur { text-align: center; }
.bar .ur { text-align: left; }
.btn .ur, .reasons button .ur, .sheet button .ur { font-size: .78em; opacity: .85; line-height: 1.7; }
.row .t .ur { font-weight: 400; color: var(--muted, #667); opacity: 1; }
.sn-b .ur { font-size: .75em; }
.reasons button:has(.ur), .sheet button:has(.ur) { padding-top: 7px; padding-bottom: 7px; line-height: 1.3; }
.reasons button .ur, .sheet button .ur { margin-top: 3px; }
.sn-b:has(.ur) { display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.15; padding-top: 4px; padding-bottom: 4px; }
.bar h1 .sub.ur { line-height: 1.6; font-size: .74rem; margin-top: 4px; }

/* Customer info card, kept short so Give water stays near the top:
   three small tiles, a thin money bar, then one-line details. */
.cinfo { padding: 10px; }
.cinfo > .ci-money:first-child, .cinfo > .ci-lines:first-child { margin-top: 0; }
.cinfo > .ci-lines:first-child > div:first-child { border-top: 0; }
.ci-money { display: flex; align-items: center; gap: 8px; width: 100%; margin-top: 6px; padding: 7px 12px;
  border: 0; border-radius: 10px; text-align: start; }
.ci-money span { font-size: .82rem; font-weight: 600; }
.ci-money b { font-size: 1.05rem; flex: 1; text-align: end; }
.ci-money em { font-style: normal; font-size: .76rem; font-weight: 600; text-decoration: underline; opacity: .85; }
.ci-money.owe { background: var(--red-soft); color: var(--red); cursor: pointer; }
.ci-money.adv { background: var(--green-soft); color: var(--green-2); }
.ci-lines { margin-top: 6px; font-size: .9rem; font-weight: 600; }
.ci-lines > div { padding: 5px 2px; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.ci-two { display: flex; justify-content: space-between; gap: 10px; }
.ci-bot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ci-bot .muted { font-weight: 400; font-size: .8rem; }
.ci-bot .countbtn { margin: 0; flex: none; padding: 3px 8px; font-size: .8rem; }
.ci-lines .ic { font-style: normal; display: inline-block; width: 1.6em; }
.ci-bot .muted { display: none; }
.needc { color: var(--red); font-size: .78rem; font-weight: 600; }   /* how the count was made; kept off to stay one line */

/* customer with no location: save it at the door before giving water */
.ci-noloc { color: var(--red, #b42318); font-weight: 600; }

/* Urgent orders: the red bar under the header on every screen, the 🚨 button */
.ubar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; background: var(--red); color: #fff;
  text-decoration: none; font-size: .95rem; border-bottom: 1px solid rgba(255,255,255,.25); }
.ubar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ubar i { font-style: normal; font-weight: 700; font-size: 1.2rem; }
.ubar.pulse { animation: upulse 1.2s ease-in-out infinite; }
@keyframes upulse { 50% { background: #e0412f; } }
.ubar.cant { background: var(--amber-soft); color: #5c3700; border-color: #f3d9a8; }
.bar .ubtn { position: relative; font-size: 1.15rem; }
.bar .ubtn .rfn { position: absolute; top: 2px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #dc2626; color: #fff; font: 700 .7rem/18px system-ui, sans-serif; text-align: center; box-shadow: 0 0 0 2px #0d4a2c; }
.btn.red { background: var(--red); color: #fff; border-color: var(--red); }
.btn.ghost { opacity: .6; cursor: default; }
.nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.ppl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nums button, .ppl button { min-height: 52px; border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  font-weight: 700; font-size: 1.15rem; color: var(--ink); cursor: pointer; }
.ppl button { font-size: 1rem; font-weight: 600; padding: 0 8px; }
.nums button.on, .ppl button.on { background: var(--green); color: #fff; border-color: var(--green); }
.upick { display: flex; align-items: center; gap: 10px; margin: 0; border-color: var(--green-2); }
.upick .main { flex: 1; min-width: 0; }
.linkbtn { display: inline-block; background: none; border: 0; color: var(--green-2); font-weight: 600; padding: 10px 0 0;
  text-decoration: underline; cursor: pointer; font-size: .95rem; }
.ustat .ust-top { display: flex; justify-content: space-between; align-items: center; }
.ustat .ufromto { margin-top: 8px; font-size: 1rem; }
.ustat.st-new { border-color: var(--red); }
.ustat.st-cant { border-color: #f3d9a8; background: var(--amber-soft); }
.ustat.st-done { border-color: #bfe0cc; background: var(--green-soft); }
.ustat .ok { color: var(--green-2); font-weight: 600; }
.ubig { float: right; font-size: 1.25rem; font-weight: 800; color: var(--red); margin-left: 8px; }
.ulog { padding: 5px 0; font-size: .9rem; border-bottom: 1px dashed var(--line); }
.ulog:last-child { border-bottom: 0; }

/* Customer page with Give water on it */
.ci-acts { display: grid; gap: 6px; margin-top: 8px; }
.ci-acts .btn { min-height: 40px; font-size: .9rem; padding: 0 6px; }
.gcard { padding: 12px; border-color: #bfe0cc; }
.gc-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 4px; }
.gc-t { font-size: 1.15rem; font-weight: 700; color: var(--green); }
.gc-t .ur { text-align: start; font-size: .75em; }
.gc-no { width: auto; min-height: 46px; padding: 4px 14px; font-size: .92rem; }
.grow { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.grow > label { flex: 1; min-width: 0; font-weight: 600; font-size: .95rem; color: var(--ink-2); }
.grow .step { flex: none; width: 196px; gap: 6px; }
.grow .step button { width: 56px; min-height: 56px; }
.grow .step input { min-height: 56px; font-size: 1.5rem; padding: 0; }
.gbill { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px;
  padding: 10px 12px; background: var(--bg); border-radius: 12px; }
.gbill span { font-weight: 600; }
.gbill small { color: var(--ink-2); font-weight: 400; margin-left: 4px; }
.gbill b { font-size: 1.3rem; font-variant-numeric: tabular-nums; }
.grate { display: flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--ink-2); }
.grate input { width: 84px; min-height: 38px; padding: 4px 8px; }
.gcash { font-size: 1.4rem; font-weight: 700; }
.gquick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-top: 8px; padding-bottom: 2px; }
.gquick .chip { flex: none; min-height: 38px; padding: 6px 12px; cursor: pointer; background: var(--card); }
.gmeth { margin-top: 10px; }
.gafter { min-height: 1.4em; margin-top: 8px; }
.glk { margin-top: 10px; }
.glk .btn { min-height: 46px; font-size: .9rem; background: var(--amber-soft); border-color: #f3d9a8; color: #5c3700; }
.glk.done .btn { background: var(--green-soft); border-color: #bfe0cc; color: var(--green-2); }
.glk #lks { margin-top: 4px; font-size: .85rem; }
.glk #lks.ok { color: var(--green-2); font-weight: 600; }
.gsave { min-height: 60px; margin-top: 12px; font-size: 1.1rem; }

/* ---- PET stock (#/stock): the Inventory sheet's number, big ---- */
.stk-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stk { background: var(--card); border: 1px solid var(--line); border-top: 6px solid var(--green-2);
  border-radius: var(--r); padding: 12px 14px 14px; }
.stk.low { border-top-color: var(--gold); background: var(--gold-soft); }
.stk.out { border-top-color: var(--red); background: var(--red-soft); }
.stk.none { border-top-color: var(--line); }
.stk-p { font-weight: 700; font-size: 1rem; }
.stk-n { font-size: 2.6rem; font-weight: 800; line-height: 1.05; margin-top: 4px; font-variant-numeric: tabular-nums; color: var(--green); }
.stk.low .stk-n { color: #7a5a0c; }
.stk.out .stk-n { color: var(--red); }
.stk-l { font-size: .8rem; color: var(--ink-2); }
.stk-s { font-size: .85rem; font-weight: 600; margin-top: 8px; }
.stk.ok .stk-s { color: var(--green-2); }
.stk.low .stk-s { color: #7a5a0c; }
.stk.out .stk-s { color: var(--red); }
.stk-r { font-size: .78rem; color: var(--ink-2); margin-top: 2px; }
.stk-w { font-size: .78rem; margin-top: 8px; padding: 4px 8px; border-radius: 8px; background: var(--amber-soft); color: var(--amber); }
.stk-tot { text-align: center; color: var(--ink-2); margin: 10px 0 0; font-weight: 600; }
.stk-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn.big { min-height: 68px; font-size: 1.05rem; font-weight: 700; }
.stk-after { min-height: 1.4em; font-size: 1.05rem; margin: 14px 2px 4px; }
.stk-q { margin-top: 10px; }
.stk-q .chip { min-width: 56px; text-align: center; font-size: 1rem; }
b.neg, .stk-after .neg { color: var(--red); }
b.pos { color: var(--green-2); }
.stk-mv .t b { font-variant-numeric: tabular-nums; }
.stk-left { text-align: right; flex: none; }
.stk-left b { display: block; font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.stk-left small { font-size: .72rem; color: var(--ink-2); }
.stk-e.failed { border-color: #f5c2bd; background: var(--red-soft); }
.stk-e.practice { opacity: .75; }
.stk-how { margin-top: 16px; font-size: .9rem; }
.stk-how summary { font-weight: 600; cursor: pointer; }
.stk-ban { border-radius: var(--r); margin: 0 0 10px; }
/* the one-line stock on Home (owner and people switched on) */
.stk-strip { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 12px; padding: 12px 14px;
  background: var(--card); border: 1px solid var(--line); border-left: 6px solid var(--green-2); border-radius: var(--r);
  text-align: left; cursor: pointer; }
.stk-strip.low { border-left-color: var(--gold); }
.stk-strip.out { border-left-color: var(--red); }
.stk-strip .stk-st { font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; }
.stk-strip .stk-sv { white-space: nowrap; font-size: .92rem; }
.stk-strip .stk-sv b { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.stk-strip .stk-sv.low b { color: #7a5a0c; }
.stk-strip .stk-sv.out b { color: var(--red); }
.stk-strip i { font-style: normal; color: var(--ink-2); font-size: 1.3rem; }

/* Riders page: name on top, the switches on the line under it (a phone is too narrow for both) */
.urow { flex-wrap: wrap; row-gap: 8px; }
.urow .main { flex-basis: 100%; }

.stk-fixed { padding: 14px; border-radius: 12px; background: var(--green-soft); color: var(--green); font-weight: 700; text-align: center; }
.stk-x { font-size: .8rem; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); color: var(--ink-2); line-height: 1.5; }
.stk-x b { color: var(--ink); }
.seg button.stk-lk { opacity: .45; }
.seg.segw { flex-wrap: wrap; }
.seg.segw button { flex: 1 1 30%; }

.seg button:has(.ur) { flex-direction: column; gap: 1px; line-height: 1.2; }
.seg button .ur { text-align: center; }

/* Area days: the ✏️ beside the Day box, the line on an area screen, the 7 day buttons */
.sec-row { display: flex; align-items: center; justify-content: space-between; }
.linkbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); border-radius: 999px;
  padding: 5px 12px; min-height: 32px; font: inherit; font-size: .8rem; font-weight: 600; color: var(--green-2);
  text-transform: none; letter-spacing: 0; cursor: pointer; }
.linkbtn, .linkbtn * { text-decoration: none; }
.linkbtn:active { background: var(--green-soft); }
.linkbtn .lb-ur { font-weight: 400; font-size: .78rem; color: var(--ink-2); padding-inline-start: 6px; border-inline-start: 1px solid var(--line);
  unicode-bidi: plaintext; line-height: 1.6; }
.dayline { display: flex; align-items: center; gap: 6px; width: 100%; margin-top: 10px; padding: 8px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--card); font: inherit; color: var(--ink); cursor: pointer; text-align: left; }
.dayline span { margin-left: auto; color: var(--green); font-weight: 600; font-size: .85rem; }
.reasons.days { grid-template-columns: 1fr 1fr; }
.dayrow { gap: 8px; padding: 6px 8px 6px 12px; cursor: default; }
.dayrow:active { background: var(--card); }
.dayrow .dnum { width: 22px; flex: none; color: var(--ink-2); font-weight: 700; font-size: .85rem; }
.dayrow .dname { display: flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; color: var(--ink);
  padding: 8px 0; min-height: 44px; cursor: pointer; text-align: start; }
.dayrow .dname .t { flex: 1; min-width: 0; }
.dayrow .mv { width: 44px; height: 44px; flex: none; border: 1px solid var(--line); border-radius: 10px; background: var(--card);
  color: var(--green); font-size: .95rem; cursor: pointer; }
.dayrow .mv:disabled { opacity: .3; cursor: default; }

/* Day route on Home: cards on a numbered line */
.tools.dayt { grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); }
.urin { font-size: .82em; font-weight: 400; color: var(--ink-2); unicode-bidi: isolate; margin-inline-start: 4px; }
.route { display: flex; flex-direction: column; gap: 8px; }
.rstop { display: flex; gap: 10px; position: relative; }
.rstop .acard { flex: 1; min-width: 0; }
.rdot { width: 28px; height: 28px; flex: none; margin-top: 14px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: .85rem; font-weight: 700; background: #fff; border: 2px solid #c9d3cc; color: var(--ink-2); z-index: 1; }
.rstop:not(:last-child)::after { content: ''; position: absolute; left: 13px; top: 42px; bottom: -22px; width: 2px; background: #c9d3cc; }
.rstop.dn .rdot { background: var(--green-2); border-color: var(--green-2); color: #fff; }
.rstop.dn::after { background: var(--green-2); }
.rstop.nw .rdot { border-color: var(--green-2); color: var(--green-2); }
.acard.is-now { border-color: var(--green-2); border-inline-start-color: var(--green-2); box-shadow: 0 0 0 1px var(--green-2); }
.nowtag { margin-inline-start: 8px; font-size: .7rem; font-weight: 600; background: var(--green-soft); color: var(--green-2);
  padding: 2px 8px; border-radius: 999px; vertical-align: 2px; }

/* Urgent order: sector -> customer */
.nums.when { grid-template-columns: repeat(3, 1fr); }
.nums.when button { font-size: 1rem; font-weight: 600; padding: 2px 4px; }
.nums.when button .ur { text-align: center; }
.uhint { font-size: .8rem; color: var(--ink-2); margin: 6px 2px 0; }
.uor { font-size: .8rem; color: var(--ink-2); margin: 12px 2px 6px; }
.usecbtn { width: 100%; min-height: 52px; padding: 10px 14px; display: flex; justify-content: space-between; align-items: center; text-align: start; cursor: pointer; font: inherit; }
.usecbtn b { font-weight: 700; }
.usec-l { font-size: .75rem; font-weight: 700; color: var(--ink-2); margin: 10px 10px 2px; }
.usec-i { display: flex; justify-content: space-between; align-items: center; width: 100%; min-height: 48px; padding: 6px 12px;
  border: 0; border-bottom: 1px solid var(--line); background: none; font: inherit; font-size: 1rem; font-weight: 600; color: var(--ink); cursor: pointer; text-align: start; }
.usec-i em { font-style: normal; font-weight: 400; font-size: .82rem; color: var(--ink-2); }
.usec-i.on { color: var(--green-2); background: var(--green-soft); border-radius: 10px; }
.usec-i:active { background: var(--green-soft); }
.usec-i[hidden], .usec-l[hidden] { display: none; }
/* Extra bottles still to collect (given without security) */
.xtag { display: block; font-size: .78rem; font-weight: 600; color: #8a5a00; margin-top: 3px; }
.usec-i em { display: flex; flex-direction: column; align-items: flex-end; text-align: end; }
.usec-i .xtag { margin-top: 2px; }
.usecbtn .xtag { margin-top: 2px; }
.xall { margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: #fdf6e8; color: #8a5a00; font-size: .85rem; font-weight: 600; }
.b-extra { color: #8a5a00; font-weight: 600; font-size: .8rem; margin-top: 4px; }
.b-extra .urin { color: #8a5a00; opacity: .8; }
.chip.xkc { background: #fdf6e8; color: #8a5a00; border-color: #ecd9a3; font-weight: 600; }
.xarea { margin-top: 10px; padding: 8px 12px; border-radius: 10px; background: #fdf6e8; color: #8a5a00; font-size: .88rem; font-weight: 600; }
.xarea .urin { color: #8a5a00; opacity: .8; }

/* Today's loads: the list behind the "on vehicle" ring, so a load typed twice can be deleted. */
button.ring-txt { background: none; border: 0; color: inherit; font: inherit; padding: 0; cursor: pointer; }
.lsofar { margin: 10px 0 0; font-size: .88rem; color: var(--green-2); font-weight: 600; }
.lsofar .urin, .lwarn .urin { display: block; margin: 2px 0 0; }
.lwarn { margin-top: 10px; padding: 10px 12px; border-radius: 12px; background: var(--amber-soft); color: #5c3700;
  border: 1px solid #f3d9a8; font-size: .88rem; line-height: 1.35; }
.lwarn span { display: block; margin-top: 6px; color: var(--ink-2); font-size: .82rem; }
.llist { border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.lrow { display: grid; grid-template-columns: 48px 1fr auto 44px; align-items: center; gap: 8px; padding: 8px 10px; min-height: 52px; }
.lrow + .lrow, .lconf + .lrow { border-top: 1px solid var(--line); }
.lrow.ask { grid-template-columns: 48px 1fr auto; background: var(--red-soft); }
.lrow .lt { color: var(--ink-2); font-variant-numeric: tabular-nums; font-size: .9rem; }
.lrow .lq { font-size: 1.15rem; font-variant-numeric: tabular-nums; color: var(--green-2); }
.lrow .lq.neg { color: var(--amber); }
.ldel { width: 44px; height: 44px; border: 0; border-radius: 10px; background: var(--bg); font-size: 1.05rem; cursor: pointer; }
.lconf { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 0 10px 10px;
  background: var(--red-soft); font-size: .9rem; font-weight: 600; }
.lconf .btn { min-height: 44px; padding: 0 14px; }
.lsum { margin-top: 12px; padding: 10px 12px; border-radius: 12px; background: var(--green-soft); font-size: .9rem; line-height: 1.6; }
.lsum .big { font-size: 1.2rem; color: var(--green); }
.lsum.off { background: var(--amber-soft); color: #5c3700; }
.lsum .diff { color: var(--red); }
.hlinks { flex-wrap: wrap; }

/* Live location: tells the rider customers can see them */
.banner.liveb { background: #e8f3ec; color: #1d5236; border-color: #c5e0cf; }
.keepon { display: block; margin-top: 6px; padding: 6px 10px; border: 1px solid #c5e0cf; border-radius: 8px; background: #fff; color: inherit; font: inherit; font-size: .85rem; }

/* ---- team voice calls (web/calls.js) ---- */
body.tc-open { overflow: hidden; }
.tc-layer { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(180deg, #0b3a23, #072414); color: #fff; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
.tc-layer[hidden] { display: none; }
.tc-box { position: relative; width: 100%; max-width: 380px; text-align: center; }
.tc-rec { position: absolute; top: -8px; right: 0; padding: 4px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700;
  letter-spacing: .05em; background: #d92d20; color: #fff; animation: tcBlink 1.4s ease-in-out infinite; }
.tc-rec[hidden] { display: none; }
@keyframes tcBlink { 50% { opacity: .55; } }
.tc-avatar { width: 96px; height: 96px; margin: 8px auto 16px; display: grid; place-items: center; font-size: 2.6rem; border-radius: 50%;
  background: rgba(255,255,255,.1); border: 3px solid var(--gold); }
.tc-layer[data-mode="ringing"] .tc-avatar { animation: tcPulse 1.6s ease-out infinite; }
@keyframes tcPulse { 0% { box-shadow: 0 0 0 0 rgba(201,162,74,.6); } 100% { box-shadow: 0 0 0 26px rgba(201,162,74,0); } }
.tc-name { margin: 0; font-size: 1.6rem; }
.tc-status { margin: 6px 0 0; opacity: .85; }
.tc-note { min-height: 1.2em; margin: 14px 0 0; font-size: .92rem; color: #ffd9d6; }
.tc-note .ur { display: block; margin-top: 4px; text-align: center; }
.tc-layer[data-mode="done"] .tc-timer { visibility: hidden; }
.tc-timer { min-height: 1.5em; margin: 10px 0 30px; font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tc-btns { display: none; justify-content: center; gap: 44px; }
.tc-layer[data-mode="ringing"] .tc-ringing, .tc-layer[data-mode="calling"] .tc-live, .tc-layer[data-mode="done"] .tc-done { display: flex; }
.tc-done .btn { max-width: 220px; }
.tc-b { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 76px; height: 76px; border: 0; border-radius: 50%;
  font-size: 1.7rem; color: #fff; cursor: pointer; justify-content: center; position: relative; }
.tc-b span { position: absolute; top: 84px; font-size: .85rem; white-space: nowrap; }
.tc-b span .ur { display: block; font-size: .78rem; opacity: .8; }
.tc-yes { background: #1fa65a; }
.tc-no { background: #d92d20; }
.tc-mute { background: rgba(255,255,255,.16); }
.tc-mute.on { background: #fff; color: var(--green); }
.tc-b:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.tc-btns { margin-bottom: 40px; }
.tc-person .main, .tc-logrow .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tc-person .main small, .tc-logrow .main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-dot { width: 12px; height: 12px; border-radius: 50%; background: #c4ccc6; flex-shrink: 0; }
.tc-dot.on { background: #1fa65a; box-shadow: 0 0 0 4px rgba(31,166,90,.18); }
.tc-callbtn, .tc-play { width: auto; min-height: 44px; padding: 0 14px; flex-shrink: 0; }
.tc-callbtn:disabled { opacity: .45; }
.tc-logrow { flex-wrap: wrap; cursor: default; }
.tc-res { padding: 3px 9px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--amber-soft); color: var(--amber); white-space: nowrap; }
.tc-res.ok { background: var(--green-soft); color: var(--green-2); }
.tc-player { flex-basis: 100%; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.tc-player audio { flex: 1; min-width: 200px; }
@media (prefers-reduced-motion: reduce) { .tc-rec, .tc-layer[data-mode="ringing"] .tc-avatar { animation: none; } }
.tc-reach { font-size: .74rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; white-space: nowrap; color: var(--ink-2); background: #eef0ee; flex-shrink: 0; }
.tc-reach.on { color: var(--green-2); background: var(--green-soft); }
.tc-reach.push { color: var(--amber); background: var(--amber-soft); }
.tc-push { border-color: var(--gold); background: var(--gold-soft); }
.tc-push p { margin: 6px 0 10px; }
.tc-push .ur { display: block; margin-top: 6px; line-height: 2.1; text-align: right; }
.tc-push-btns { display: flex; gap: 8px; }
.tc-push-btns .btn { min-height: 46px; }
.tc-push-btns [data-push-later] { flex: 0 0 auto; width: auto; padding: 0 16px; }

/* ---- owner: Audit ---- */
.kpi.tap { text-align: start; font: inherit; color: inherit; cursor: pointer; border-color: var(--gold); background: var(--gold-soft); }
.kpi.tap:disabled { cursor: default; opacity: .6; }
.hands { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hand { border-radius: 14px; padding: 14px 12px; border: 1px solid var(--line); background: var(--card); }
.hand.cash { background: var(--green-soft); border-color: #bfe0cc; }
.hand.ep { background: var(--blue-soft); border-color: #c9d7fb; }
.hand .hl { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.hand b { display: block; font-size: 1.7rem; line-height: 1.2; margin: 4px 0 2px; font-variant-numeric: tabular-nums; color: var(--green); }
.hand.ep b { color: var(--blue); }
.hand b.neg { color: var(--red); }
.hand .hs { font-size: .74rem; color: var(--ink-2); }
.xroute { display: flex; align-items: center; gap: 12px; width: 100%; margin-top: 14px; padding: 14px; border-radius: 14px;
  border: 1px solid #f1d39e; background: var(--amber-soft); color: var(--ink); text-align: start; cursor: pointer; font: inherit; }
.xroute .xi { font-size: 1.5rem; }
.xroute .xt { flex: 1; min-width: 0; }
.xroute .xt b { display: block; color: var(--amber); }
.xroute .xt small { color: var(--ink-2); }
.xroute .xa { font-size: 1.4rem; color: var(--amber); }
.extot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 14px 8px;
  padding: 10px 12px; border-radius: 12px; background: var(--gold-soft); }
.extot span { font-size: .8rem; color: var(--ink-2); }
.extot > div:first-child b { display: block; font-size: 1.3rem; }
.extot .exk { display: flex; flex-direction: column; gap: 2px; text-align: end; }
.exrow { display: flex; gap: 10px; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid var(--line); }
.exrow .exm { min-width: 0; }
.exrow .exr { font-size: .86rem; margin: 2px 0; overflow-wrap: anywhere; }
.exrow .muted { font-size: .75rem; }
.exa { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* the expenses list opens as a side panel at every width */
.sheet.side.exp { left: auto; right: 0; top: 0; bottom: 0; margin: 0; width: 420px; max-width: 92vw; max-height: none;
  border-radius: 18px 0 0 18px; box-shadow: -8px 0 30px rgba(0,0,0,.18); }
.audwho { margin: 0 0 12px; }
.audfor { margin: -4px 2px 12px; }
.rcards { display: grid; grid-template-columns: 1fr; gap: 8px; }
@media (min-width: 640px) { .rcards { grid-template-columns: 1fr 1fr; } }
.rcard { display: block; width: 100%; text-align: start; font: inherit; color: inherit; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 12px; cursor: pointer; }
.rcard:hover { border-color: var(--green-2); }
.rcard.tot { cursor: default; background: var(--bg); border-style: dashed; }
.rc-h { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.rc-h span { font-size: .82rem; color: var(--ink-2); white-space: nowrap; }
.rc-g { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 8px 0; }
.rc-g span { font-size: .72rem; color: var(--ink-2); }
.rc-g b { display: block; font-size: .95rem; color: var(--ink); white-space: nowrap; }
.rc-in { font-size: .82rem; color: var(--ink-2); padding-top: 8px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline; }
.rc-in b { color: var(--green); white-space: nowrap; }
.rc-in b.neg { color: var(--red); }
.btl-tot { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 0 14px 6px; padding: 10px 12px; border-radius: 12px; background: var(--blue-soft); }
.btl-tot span { font-size: .72rem; color: var(--ink-2); }
.btl-tot b { display: block; font-size: 1rem; color: var(--ink); white-space: nowrap; }
.btl-a { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; border-bottom: 2px solid var(--line); }
.btl-a span { font-size: .8rem; color: var(--ink-2); }
.btl-n { font-size: .8rem; margin-top: 2px; }
.btl-n b { color: var(--amber); }
.btl-p { font-size: .8rem; font-weight: 600; margin-top: 2px; }
.btl-p .cr { color: var(--red); }
.xkcards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.xkcard { text-align: start; font: inherit; color: inherit; cursor: pointer; border-radius: 14px; padding: 12px;
  border: 1px solid #f1d39e; background: var(--amber-soft); display: flex; flex-direction: column; gap: 2px; }
.xkcard .xl { font-size: .82rem; font-weight: 600; color: var(--amber); }
.xkcard b { font-size: 1.6rem; line-height: 1.15; font-variant-numeric: tabular-nums; }
.xkcard small { font-size: .72rem; color: var(--ink-2); }
.xkcard small .bad { color: var(--red); font-weight: 600; }
.xkcard.miss { border-color: #f3b4ac; background: var(--red-soft); }
.xkcard.miss .xl, .xkcard.miss b { color: var(--red); }
.xkcard.ok { border-color: #bfe0cc; background: var(--green-soft); }
.xkcard.ok .xl { color: var(--green-2); }
.exa.bad { color: var(--red); }
.exa.good { color: var(--green-2); }

/* Owner > New customer (web/newcust.js) */
.card.nc { padding: 16px; }
.nc-h { font-size: 1.1rem; margin: 0 0 4px; }
.nc-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 10px; }
.nc-2 > div { min-width: 0; }
.nc-opt { font-weight: 400; font-size: .78rem; color: var(--ink-2); }
.nc select.in { width: 100%; }
.nc-loc { display: flex; gap: 8px; }
.nc-loc .in { flex: 1; min-width: 0; }
.nc-loc .btn { width: auto; flex: none; padding: 0 16px; }
.nc-note { border-radius: 12px; padding: 10px 12px; margin-bottom: 10px; font-size: .9rem; }
.nc-note.warn { background: var(--amber-soft); color: var(--amber); border: 1px solid #f3d9a8; }
.nc-note.bad { background: var(--red-soft); color: var(--red); border: 1px solid #f5c2bd; }
.nc-note ul { margin: 6px 0 10px 18px; padding: 0; }
.nc-note .nc-2 { margin-top: 4px; }
.nc-foot { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; margin-top: 16px; }
.nc-done { border-color: var(--green); }
.nc-sub { font-size: .95rem; margin: 18px 0 8px; color: var(--ink-2); }
.nc-row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.nc-row:last-child { border-bottom: 0; }
@media (max-width: 360px) { .nc-2 { grid-template-columns: 1fr; } }

/* ---------------------------------------------- Owner > 💰 Money (money.js) */
.mn-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.mn-t { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; min-width: 0; }
.mn-k { font-size: .75rem; color: var(--ink-2); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.mn-v { font-size: 1.2rem; font-weight: 700; margin-top: 2px; overflow-wrap: anywhere; }
.mn-v i { font-weight: 400; font-size: .95rem; color: var(--ink-2); }
.mn-s { font-size: .75rem; color: var(--ink-2); margin-top: 2px; }
.mn-t.bad .mn-v { color: var(--red); }
.mn-t.good .mn-v { color: var(--green); }
.mn-t.warn { border-color: #e7b416; }
.mn-low { background: var(--amber-soft); color: var(--amber); border: 1px solid #f0d199; border-radius: var(--r); padding: 9px 12px; margin-bottom: 10px; font-weight: 600; font-size: .9rem; }
.mn-al summary { cursor: pointer; font-weight: 700; }
.mn-a { border-left: 4px solid #e7b416; padding: 6px 10px; margin-top: 8px; font-size: .9rem; }
.mn-a.bad { border-left-color: var(--red); }
.mn-a span { color: var(--ink-2); }
.mn-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 10px; }
.mn-b { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); font: inherit; font-weight: 600;
  color: var(--ink); cursor: pointer; padding: 8px; text-align: center; }
.mn-b span { font-size: 1.5rem; }
.mn-b:active { transform: scale(.98); }
.mn-r { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.mn-r:last-child { border-bottom: 0; }
.mn-pay button { font-size: .9rem; padding: 0 4px; }
.mn-num { font-size: 1.25rem; font-weight: 700; }
.mn-day { display: block; margin-top: 14px; background: none; border: 0; color: var(--green-2); font: inherit; font-weight: 600; padding: 4px 0; cursor: pointer; }
.mn-moreb { color: var(--ink-2); }
.mn-small .mn-b { min-height: 64px; font-size: .9rem; }
.mn-done { margin: 0 0 10px; font-weight: 700; }

/* ---- Owner 💰 Money v2: cash book, holders, bars, inventory split (2026-11-17) ---- */
.mn-c { margin-bottom: 10px; }
.mn-big { font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; margin: 2px 0 6px; overflow-wrap: anywhere; }
.mn-big small { font-size: .85rem; font-weight: 600; color: var(--ink-2); }
.mn-big i { font-size: 1.05rem; font-weight: 500; color: var(--ink-2); }
.mn-big.bad, .mn-c b.bad { color: var(--red); } .mn-big.good, .mn-c b.good { color: var(--green-2); }
.mn-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 6px 0 10px; }
.mn-flow > div { background: var(--bg); border-radius: 10px; padding: 6px 8px; min-width: 0; }
.mn-flow small { display: block; font-size: .7rem; color: var(--ink-2); }
.mn-flow b { font-size: .9rem; overflow-wrap: anywhere; }
.mn-h { display: grid; grid-template-columns: 92px 1fr auto; gap: 8px; align-items: center; padding: 5px 0; font-size: .9rem; }
.mn-h small { display: block; font-size: .7rem; color: var(--ink-2); }
.mn-hb { height: 10px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.mn-hb i { display: block; height: 100%; background: var(--green-2); border-radius: 6px; }
.mn-hb.neg i { background: var(--red); }
.mn-bar { height: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 6px 0 4px; }
.mn-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--green-2), #3fa66f); }
.mn-leg { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; font-size: .78rem; color: var(--ink-2); }
.mn-why { display: block; width: 100%; margin-top: 8px; padding: 10px 12px; border-radius: 10px; border: 1px solid #f0d199;
  background: var(--amber-soft); color: var(--amber); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.mn-whyok { margin-top: 8px; font-size: .85rem; border-left: 3px solid var(--red); padding: 4px 8px; background: var(--red-soft); border-radius: 6px; }
.mn-ivbar { display: flex; height: 14px; border-radius: 8px; overflow: hidden; background: var(--bg); margin: 8px 0 4px; }
.mn-ivbar i { display: block; height: 100%; }
.mn-ivbar .pet, .mn-dot.pet { background: #2a78d6; }
.mn-ivbar .l19, .mn-dot.l19 { background: #12a19a; }
.mn-ivbar .gen, .mn-dot.gen { background: #d99a1e; }
.mn-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 7px; vertical-align: -1px; }
.mn-locked { opacity: .75; } .mn-locked small { font-size: .72rem; color: var(--ink-2); font-weight: 500; }
.mn-hist { margin-top: 8px; } .mn-hist summary { cursor: pointer; font-weight: 700; color: var(--green-2); padding: 4px 0; }
.mn-rt { text-align: right; white-space: nowrap; } .mn-rt small { display: block; font-size: .72rem; color: var(--ink-2); }
.mn-lu { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.mn-marks { margin-top: 10px; }
.mn-mk { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: .9rem; cursor: pointer; border-radius: 8px; }
.mn-mk input { width: 20px; height: 20px; accent-color: #7c4dff; }
.mn-mk.on { background: color-mix(in srgb, #7c4dff 9%, transparent); }
.mn-stick { position: sticky; bottom: 0; background: var(--card); padding: 10px 0 4px; margin-top: 10px; }

/* Pick-or-type dropdown in the Expense tab (replaces the phone's plain datalist) */
.mn-combo { position: relative; }
.mn-combo input.in { padding-right: 44px; }
.mn-caret { position: absolute; right: 6px; top: 0; height: var(--tap); min-height: 44px; width: 38px; display: flex;
  align-items: center; justify-content: center; color: var(--green-2); font-size: 1.1rem; cursor: pointer;
  transition: transform .18s ease; }
.mn-combo.open .mn-caret { transform: rotate(180deg); }
.mn-dd { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40; background: #fff;
  border: 1px solid #d6e3da; border-radius: 14px; box-shadow: 0 12px 28px rgba(20, 60, 35, .16);
  padding: 6px; max-height: 260px; overflow-y: auto; animation: mnDrop .16s ease-out; }
.mn-dd[hidden] { display: none; }
@keyframes mnDrop { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.mn-opt { display: flex; align-items: center; width: 100%; min-height: 46px; padding: 0 14px; border: 0;
  border-radius: 10px; background: transparent; color: var(--ink); font: inherit; font-size: 1rem;
  text-align: left; cursor: pointer; }
.mn-opt + .mn-opt { margin-top: 2px; }
.mn-opt:hover, .mn-opt:active { background: #eaf5ee; }
.mn-opt.on { background: var(--green-2); color: #fff; font-weight: 600; }
.mn-opt.on::after { content: '✓'; margin-left: auto; }
.mn-none { padding: 12px 14px; color: #6b7a70; font-size: .92rem; }
/* Investment form (2026-11-23) */
.mn-wrap { flex-wrap: wrap; height: auto; }
.mn-wrap button { flex: 1 1 40%; min-height: 40px; }
.mn-inv-h { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #eef4ff; color: #1c3d7a; font-weight: 600; }
.mn-inv-res { display: grid; gap: 4px; margin-top: 14px; padding: 12px; border-radius: 10px; border: 1px solid #ddd; }
.mn-inv-res.good { background: #ecf8ef; border-color: #b7e2c2; color: #14532d; }
.mn-inv-res.warn { background: #fdf6e6; border-color: #f0dca8; color: #6d5410; }
.mn-inv-res.bad { background: #fdecec; border-color: #f2b8b8; color: #8a1c1c; }
.mn-inv-res small { opacity: .8; }
