/* Rayau: a map-first phone app. Teal for the brand and the picked route, amber for highlights,
   red only for SOS and danger. Bottom tab bar on phones, a side rail from 900px. No web fonts. */
:root {
  --bg: #f4f6f5; --card: #ffffff; --ink: #14201d; --muted: #5e6d69; --line: #dfe5e3; --soft: #eef2f1;
  --accent: #0f766e; --accent-ink: #ffffff; --accent-soft: #dcf1ee;
  --amber: #f59e0b; --good: #15803d; --good-soft: #dcfce7; --warn: #b45309; --warn-soft: #fef3c7;
  --bad: #dc2626; --bad-soft: #fee2e2; --info: #0369a1; --info-soft: #e0f2fe;
  --k-pin: #7c3aed; --k-landmark: #0369a1; --k-business: #ea580c; --k-event: #db2777; --k-sport: #16a34a; --k-van: #0f766e;
  --radius: 14px; --shadow: 0 2px 8px rgb(20 32 29 / 8%), 0 10px 30px rgb(20 32 29 / 6%);
  --bar: 64px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1513; --card: #15201d; --ink: #e4ece9; --muted: #95a7a2; --line: #26332f; --soft: #1b2824;
    --accent: #2dd4bf; --accent-ink: #04201c; --accent-soft: #123a35;
    --good: #4ade80; --good-soft: #12301f; --warn: #fbbf24; --warn-soft: #3a2c0c; --bad: #f87171; --bad-soft: #3d1717; --info: #7dd3fc; --info-soft: #0f2c3d;
    --shadow: 0 2px 10px rgb(0 0 0 / 40%);
    color-scheme: dark;
  }
  .leaflet-tile-pane { filter: brightness(0.82) contrast(1.1) saturate(0.85); }
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0 0 6px; line-height: 1.2; }
h1 { font-size: 22px; } h2 { font-size: 16px; } h3 { font-size: 14px; margin-top: 12px; }
p { margin: 6px 0; }
a { color: var(--accent); }
.muted { color: var(--muted); } .small { font-size: 13px; } .center { text-align: center; }
.grow { flex: 1; min-width: 0; } .hidden { display: none !important; } [hidden] { display: none !important; }
.boot, .loading { padding: 48px; text-align: center; color: var(--muted); }
.error { color: var(--bad); margin: 8px 0 0; }
.pad { padding: 10px 14px; } .pad-x { padding: 0 14px; }
.clamp { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.code { font-family: ui-monospace, Consolas, monospace; letter-spacing: 0.12em; background: var(--soft); padding: 1px 6px; border-radius: 6px; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Layout: bottom bar on phones */
.layout { min-height: 100vh; }
.rail { position: fixed; z-index: 1000; left: 0; right: 0; bottom: 0; height: calc(var(--bar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  display: flex; background: var(--card); border-top: 1px solid var(--line); }
.rail a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); text-decoration: none; font-size: 11px; }
.rail a.on { color: var(--accent); font-weight: 600; }
.rail a.sos-link .icon { color: var(--bad); }
.rail .brand { display: none; }
#view { padding: 16px 16px calc(var(--bar) + 24px); max-width: 1100px; margin: 0 auto; }
#view.full { padding: 0; max-width: none; height: calc(100vh - var(--bar)); height: calc(100dvh - var(--bar) - env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  .layout { display: flex; }
  .rail { position: sticky; top: 0; height: 100vh; width: 92px; flex-direction: column; justify-content: flex-start; border-top: 0; border-right: 1px solid var(--line); padding: 8px 0; }
  .rail a { flex: none; padding: 12px 4px; }
  .rail .brand { display: flex; padding: 10px 4px 16px; }
  .rail .brand strong { font-size: 13px; color: var(--ink); }
  main#view { flex: 1; padding: 24px 28px; }
  #view.full { height: 100vh; }
}

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.small { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.btn.big { min-height: 52px; font-size: 17px; padding: 10px 20px; }
.btn.block { width: 100%; }
.link, .plain { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-align: left; }
.plain { color: inherit; }
label { display: block; margin: 10px 0; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select, textarea { display: block; width: 100%; margin-top: 4px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink); font: inherit; font-weight: 400; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
input[type=checkbox] { display: inline; width: auto; margin: 0 6px 0 0; }
.small-input { width: 180px; margin: 0; padding: 6px 10px; }
.code-input { text-transform: uppercase; letter-spacing: 0.2em; font-family: ui-monospace, Consolas, monospace; font-size: 20px; text-align: center; }
.switch { display: flex; align-items: center; margin: 0; color: var(--ink); font-size: 14px; }
.grid2, .grid3 { display: grid; gap: 0 12px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .grid2 { grid-template-columns: 1fr 1fr; } .grid3 { grid-template-columns: 1fr 1fr 1fr; } }

/* Cards and lists */
.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin-bottom: 16px; }
.controls, .actions { display: flex; flex-wrap: wrap; gap: 8px; }
.actions { margin: 12px 0; }
.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; display: block; }
.card.flat { box-shadow: none; border: 1px solid var(--line); padding: 12px; }
.card.link { color: inherit; text-decoration: none; }
.card.link:hover { outline: 2px solid var(--accent-soft); }
.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin-bottom: 14px; }
.cards .card { margin: 0; }
.card.new { display: flex; gap: 12px; text-align: left; border: 0; font: inherit; color: inherit; cursor: pointer; }
.card.new small { display: block; margin-top: 2px; }
.row { display: flex; align-items: center; gap: 10px; }
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; align-items: center; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows a.grow { color: inherit; text-decoration: none; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
.narrow { max-width: 560px; margin: 0 auto; }
.back { display: inline-block; margin-bottom: 8px; text-decoration: none; font-size: 14px; }
.notice { background: var(--warn-soft); color: var(--warn); padding: 8px 12px; border-radius: 10px; }
.notice a { color: inherit; font-weight: 700; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--soft); color: var(--muted); text-transform: capitalize; }
.badge.good { background: var(--good-soft); color: var(--good); } .badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.bad { background: var(--bad-soft); color: var(--bad); } .badge.info { background: var(--info-soft); color: var(--info); }
.big { font-size: 26px; display: block; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; padding: 6px 0; border-bottom: 1px solid var(--line); }
.feed li small { margin-left: auto; }
.table-wrap { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; }
.tabs { display: flex; gap: 4px; margin-bottom: 8px; background: var(--soft); padding: 4px; border-radius: 12px; }
.tabs button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.tabs button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* Markers */
.mk-wrap { background: none; border: 0; }
.mk { position: relative; display: grid; place-items: center; width: var(--s); height: var(--s); border-radius: 50%; background: var(--c); color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgb(0 0 0 / 30%); flex: none; }
.mk .icon { width: calc(var(--s) * 0.55); height: calc(var(--s) * 0.55); }
.mk b { position: absolute; top: -6px; right: -6px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; background: #111; color: #fff; font-size: 10px; line-height: 16px; text-align: center; }
.mk.pulse::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 3px solid var(--c); animation: pulse 1.6s ease-out infinite; }
@keyframes pulse { from { transform: scale(0.8); opacity: 0.9; } to { transform: scale(1.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .mk.pulse::after { animation: none; } }
.popup strong { font-size: 15px; }
.popup-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--card); color: var(--ink); }

/* Explore */
.explore { position: relative; height: 100%; }
.map { width: 100%; height: 100%; background: var(--soft); }
.panel { position: absolute; z-index: 800; top: 12px; left: 12px; right: 12px; max-height: calc(100% - 90px); overflow-y: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
@media (min-width: 900px) { .panel { right: auto; width: 380px; } }
.search-box { position: relative; padding: 8px; }
.field-row { display: flex; align-items: center; gap: 8px; padding: 0 4px; }
.field-row input { border: 0; background: var(--soft); margin: 3px 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.from { background: #2563eb; } .dot.to { background: var(--k-event); }
.suggest { list-style: none; margin: 4px 0 0; padding: 4px 0; border-top: 1px solid var(--line); max-height: 320px; overflow-y: auto; background: var(--card); }
.map-pick .suggest, .modal .suggest { position: relative; border: 1px solid var(--line); border-radius: 10px; }
.suggest button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px 12px; border: 0; background: none; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.suggest button:hover { background: var(--soft); }
.suggest small { display: block; color: var(--muted); font-size: 12px; }
.modes { display: flex; gap: 6px; padding: 0 12px 8px; overflow-x: auto; }
.chip { flex: none; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.chip.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.layer-chips .chip.on { background: var(--c); border-color: var(--c); color: #fff; }
.layer-chips { position: absolute; z-index: 700; left: 12px; right: 64px; bottom: 16px; display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.layer-chips .chip { box-shadow: var(--shadow); }
@media (min-width: 900px) { .layer-chips { left: 404px; top: 12px; bottom: auto; } }
.fab { position: absolute; z-index: 700; right: 12px; bottom: 96px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card); color: var(--accent); box-shadow: var(--shadow); cursor: pointer; display: grid; place-items: center; }
.route-list { list-style: none; margin: 0; padding: 0 8px; }
.route { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; width: 100%; padding: 10px; margin-bottom: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: inherit; font: inherit; text-align: left; cursor: pointer; }
.route.on { border-color: var(--accent); background: var(--accent-soft); }
.route-main strong { font-size: 18px; margin-right: 8px; }
.route-tags { grid-column: 1; display: flex; gap: 4px; flex-wrap: wrap; }
.route-cost { grid-column: 2; grid-row: 1 / span 2; text-align: right; font-weight: 700; }
.route-cost small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.route-actions { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 12px 12px; }
.steps { margin: 0; padding: 0 12px 12px 34px; font-size: 14px; }
.steps li { padding: 6px 0; border-bottom: 1px solid var(--line); }
.steps small { display: block; }
.explore.navigating .panel, .explore.navigating .layer-chips { display: none; }
.nav-banner { position: absolute; z-index: 900; left: 12px; right: 12px; top: 12px; background: var(--accent); color: var(--accent-ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; }
@media (min-width: 900px) { .nav-banner { width: 420px; right: auto; } }
.nav-next { display: flex; gap: 12px; align-items: baseline; font-size: 18px; }
.nav-next strong { font-size: 26px; white-space: nowrap; }
.nav-foot { display: flex; gap: 8px; align-items: center; margin-top: 10px; font-size: 14px; }
.nav-foot span { flex: 1; }

/* Map beside a side panel (transport, help, groups) */
.split { display: flex; flex-direction: column; gap: 14px; }
.split-map { height: 42vh; min-height: 260px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
@media (min-width: 900px) {
  .split { flex-direction: row; height: calc(100vh - 48px); }
  .split-map { flex: 1; height: auto; }
  .split-side { width: 400px; overflow-y: auto; padding-right: 4px; }
}
.status-line { display: flex; gap: 8px; align-items: center; }
.stops { margin: 6px 0; padding-left: 22px; }
.stops li { padding: 3px 0; }
.stops li.done { color: var(--muted); text-decoration: line-through; }
.stop-edit { padding-left: 22px; }
.stop-edit li { display: flex; gap: 4px; align-items: center; margin-bottom: 6px; }
.stop-edit input { margin: 0; }
.stop-edit input[type=time] { width: 110px; }
.eta strong { color: var(--accent); }
.picker { height: 260px; border-radius: 12px; overflow: hidden; margin-top: 6px; }
.picker.small { height: 200px; }

/* Help chat */
.messages { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; }
.messages li { max-width: 85%; padding: 8px 12px; border-radius: 14px; background: var(--soft); }
.messages li.mine { align-self: flex-end; background: var(--accent-soft); }
.messages small { display: block; font-size: 11px; color: var(--muted); }
.send { display: flex; gap: 6px; }
.send input { margin: 0; }

/* SOS */
.sos-card { text-align: center; }
.sos-card.live { background: var(--bad-soft); text-align: left; }
.sos-card.live h2 { color: var(--bad); }
.sos-button { width: 160px; height: 160px; margin: 8px auto; border-radius: 50%; border: 0; background: radial-gradient(circle, #ef4444, #b91c1c); color: #fff; box-shadow: 0 0 0 10px var(--bad-soft), var(--shadow); cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; user-select: none; touch-action: none; }
.sos-button span { font-size: 42px; font-weight: 900; letter-spacing: 0.05em; }
.sos-button small { font-size: 12px; opacity: 0.9; }
.sos-button.holding { animation: hold 2s linear forwards; }
@keyframes hold { to { box-shadow: 0 0 0 26px rgb(220 38 38 / 35%), var(--shadow); transform: scale(0.96); } }

/* Groups */
.posts { list-style: none; padding: 0; margin: 0; }
.posts .card { margin-bottom: 8px; }
.reply { border-left: 3px solid var(--line); padding: 4px 10px; margin: 6px 0; font-size: 14px; }
.post-form textarea { margin: 0 0 8px; }

/* Modals and toasts */
.modal { border: 0; border-radius: var(--radius); padding: 0; width: min(520px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.modal.wide { width: min(720px, calc(100vw - 24px)); }
.modal::backdrop { background: rgb(0 0 0 / 45%); }
.modal-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px 0; }
.modal-body { padding: 4px 16px 8px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.toast { position: fixed; z-index: 3000; left: 50%; bottom: calc(var(--bar) + 20px); transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 16px; border-radius: 12px; background: #1f2937; color: #fff; box-shadow: var(--shadow); }
.toast.bad { background: var(--bad); }

/* Shared-link pages */
#view.public { padding: 0; max-width: none; }
.public-head { display: flex; align-items: center; gap: 8px; padding: 10px 16px; background: var(--card); border-bottom: 1px solid var(--line); }
.public-head .brand { display: flex; gap: 8px; align-items: center; color: var(--ink); text-decoration: none; }
.public-body { max-width: 760px; margin: 0 auto; padding: 0 0 24px; }
.public-map { height: 45vh; min-height: 260px; }
.public-body .card { margin: -24px 16px 0; position: relative; z-index: 500; }

/* Password field with a show/hide eye */
.pw { position: relative; display: block; }
.pw input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 4px; bottom: 4px; width: 38px; height: calc(100% - 12px); min-height: 32px; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--accent); }

/* Bell and notifications */
.bell { position: fixed; z-index: 1100; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card); color: var(--ink); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; }
.bell b { position: absolute; top: 4px; right: 4px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; }
.bell-panel { position: fixed; z-index: 1100; top: 62px; right: 12px; width: min(360px, calc(100vw - 24px)); max-height: 70vh; overflow-y: auto; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.bell-panel ul { list-style: none; margin: 8px 0; padding: 0; }
.bell-panel li a { display: block; padding: 8px; border-radius: 10px; color: inherit; text-decoration: none; }
.bell-panel li a:hover { background: var(--soft); }
.bell-panel li.unread a { background: var(--accent-soft); }
.bell-panel li span { display: block; font-size: 13px; }
.bell-panel li small { color: var(--muted); font-size: 11px; }
#view.full ~ .bell, .explore ~ .bell { top: 12px; }
@media (max-width: 899px) { .layer-chips { right: 116px; } .wide-only { display: none !important; } }
@media (min-width: 900px) { .panel { margin-right: 60px; } }

/* Extra map buttons */
.fab.report { bottom: 148px; color: var(--bad); }
.fab.prayer { bottom: 200px; color: var(--good); }
.prayers { list-style: none; padding: 0; margin: 0; }
.prayers li { display: flex; justify-content: space-between; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.prayers li.next { color: var(--accent); font-weight: 700; }

/* Activity */
.tabs-nav { display: flex; gap: 4px; margin: 0 0 12px; border-bottom: 1px solid var(--line); }
.tabs-nav a { padding: 8px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; }
.tabs-nav a.on { color: var(--accent); border-color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip .icon { width: 14px; height: 14px; vertical-align: -2px; }
.row.wrap { flex-wrap: wrap; }
label.inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
label.inline input { margin: 0; width: auto; }
.split-list { display: grid; gap: 14px; grid-template-columns: 1fr; }
.mini-map { height: 260px; padding: 0; overflow: hidden; order: -1; }
@media (min-width: 900px) { .split-list { grid-template-columns: 1fr 380px; } .mini-map { position: sticky; top: 16px; height: 420px; order: 0; } }
.day { margin: 14px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.timeline { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); }
.timeline li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: 0; }
.tl-icon { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--soft); color: var(--accent); flex: none; }
.tl-icon .icon { width: 17px; height: 17px; }
.tl-icon.k-sos { background: var(--bad-soft); color: var(--bad); }
.tl-icon.k-van { background: var(--accent-soft); }
.tl-icon.k-delivery { background: var(--warn-soft); color: var(--warn); }
.tl-icon.k-help { background: var(--info-soft); color: var(--info); }
.stats { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-bottom: 14px; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.stat span { display: block; font-size: 12px; color: var(--muted); }
.stat strong { display: block; font-size: 22px; }
.stat small { color: var(--muted); font-size: 12px; }
.small-stats { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); }
.small-stats .stat { box-shadow: none; border: 1px solid var(--line); padding: 8px; }
.small-stats .stat strong { font-size: 18px; }

/* Van riders and the driver's checklist */
.riders { list-style: none; margin: 0; padding: 0; }
.rider-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 8px; }
.rider-card label { margin: 6px 0; }
.rows li.absent, .checklist li.absent { opacity: 0.55; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 8px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.checklist li.done strong { text-decoration: line-through; color: var(--muted); }
.checklist .btn.primary { min-width: 120px; }
.bad-text { color: var(--bad); }
table.attendance th, table.attendance td { padding: 4px; text-align: center; font-size: 12px; }
table.attendance td:first-child, table.attendance th:first-child { text-align: left; white-space: nowrap; }
td.cell.rode { color: var(--good); }
td.cell.off { color: var(--warn); font-weight: 700; }
td.cell.miss { color: var(--muted); }

/* Deliveries */
.proofs { display: flex; flex-wrap: wrap; gap: 8px; }
.proofs img { max-width: 100%; max-height: 260px; border-radius: 10px; border: 1px solid var(--line); }
.proofs img.sig { background: #fff; max-height: 140px; }
.sigpad { width: 100%; height: 160px; border: 1px dashed var(--line); border-radius: 10px; background: #fff; touch-action: none; }
.progress { list-style: none; margin: 12px 0; padding: 0; }
.progress li { position: relative; padding: 0 0 14px 28px; color: var(--muted); }
.progress li::before { content: ''; position: absolute; left: 6px; top: 4px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); }
.progress li::after { content: ''; position: absolute; left: 12px; top: 18px; bottom: -2px; width: 2px; background: var(--line); }
.progress li:last-child::after { display: none; }
.progress li.done { color: var(--ink); font-weight: 600; }
.progress li.done::before { background: var(--accent); border-color: var(--accent); }
.progress li small { margin-left: 8px; color: var(--muted); font-weight: 400; }
/* Room for the bell in the top-right corner. */
.page-head { padding-right: 56px; }
.split-side > h1:first-of-type, .split-side > .back:first-child { margin-right: 56px; }
@media (max-width: 899px) { .panel { right: 64px; } .nav-banner { right: 64px; } }
@media (min-width: 900px) { .layer-chips { right: 64px; } }

/* Report form */
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 8px; }
.report-kind { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); color: var(--ink); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; }
.report-kind .icon { width: 26px; height: 26px; }
.report-kind.k-temporary .icon { color: var(--bad); }
.report-kind.k-long .icon { color: var(--warn); }
.report-kind.k-permanent .icon { color: #7c3aed; }
.report-kind.on { border-color: var(--accent); background: var(--accent-soft); }

/* Navigation extras */
.nav-alert { display: flex; align-items: center; gap: 8px; margin: -4px -6px 10px; padding: 8px 10px; border-radius: 10px; background: #fef3c7; color: #92400e; font-weight: 700; }
.nav-note { margin-top: 6px; font-size: 13px; opacity: 0.9; }

/* People and sharing */
.segmented { display: flex; gap: 4px; background: var(--soft); padding: 4px; border-radius: 12px; margin: 8px 0; }
.segmented button { flex: 1; border: 0; background: none; padding: 9px 6px; border-radius: 9px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented button.on { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.share-card.on { border-left: 4px solid var(--good); }
.inline-select { display: inline-block; width: auto; margin: 0 0 0 6px; padding: 2px 6px; font-size: 12px; }
.share-pill { position: fixed; z-index: 1050; left: 50%; transform: translateX(-50%); bottom: calc(var(--bar) + 12px); display: flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--good); color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; box-shadow: var(--shadow); }
.share-pill .icon { width: 16px; height: 16px; }
@media (min-width: 900px) { .share-pill { left: 108px; transform: none; bottom: 16px; } }
.explore.navigating ~ .share-pill { display: none; }
.quick-links { display: flex; flex-wrap: wrap; gap: 8px; }
.map.placing { cursor: crosshair; outline: 3px solid var(--accent); outline-offset: -3px; }
.pick-on-map strong { color: var(--accent); }

/* Minimising the Explore panel to a one-line bar, so the map can be scrolled */
.panel-bar { display: none; width: 100%; align-items: center; gap: 10px; padding: 12px 14px; border: 0; background: none; color: var(--ink); font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
.panel-bar span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-bar b { font-size: 18px; color: var(--muted); }
.panel-min { position: absolute; top: 8px; right: 6px; z-index: 2; font-size: 18px; line-height: 1; min-height: 32px; }
.panel .search-box { padding-right: 40px; }
.panel.collapsed { overflow: hidden; }
.panel.collapsed > :not(.panel-bar) { display: none !important; }
.panel.collapsed .panel-bar { display: flex; }
@media (min-width: 900px) { .panel.collapsed { width: 320px; } }
