/* Upjump design system
   Brand: jumper-cable yellow on near-black ink. Light theme by default for daylight
   readability on the roadside; dark theme follows the OS setting. */

:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --ink: #101317;
  --ink-2: #2b3138;
  --muted: #59626e;
  --line: #e1e4e9;
  --line-strong: #c9ced6;
  --brand: #ffc21a;
  --brand-ink: #101317;
  --brand-soft: #fff4cc;
  --green: #0a7a3b;
  --green-soft: #e3f5ea;
  --red: #c42b2b;
  --red-soft: #fde8e8;
  --blue: #1557c7;
  --blue-soft: #e5eefc;
  --amber: #8a5a00;
  --amber-soft: #fff1d6;
  --focus: #1557c7;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow: 0 1px 2px rgba(16, 19, 23, .06), 0 6px 20px rgba(16, 19, 23, .06);
  --shadow-lg: 0 12px 40px rgba(16, 19, 23, .18);
  --space: 16px;
  --tap: 48px;
  --max: 560px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c0e11;
    --surface: #15181d;
    --surface-2: #1b1f25;
    --ink: #f3f5f7;
    --ink-2: #d5dae0;
    --muted: #9aa3ae;
    --line: #262b33;
    --line-strong: #353c46;
    --brand-soft: #3a2f0a;
    --green: #3ccf7c;
    --green-soft: #0f2a1b;
    --red: #ff6b6b;
    --red-soft: #351616;
    --blue: #6aa5ff;
    --blue-soft: #14233d;
    --amber: #ffc457;
    --amber-soft: #33270c;
    --focus: #6aa5ff;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, .6);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* ---------- layout ---------- */

.app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 12px;
  padding: 10px var(--space); padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar .spacer { flex: 1; }
.logo { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 20px; letter-spacing: -.5px; }
.logo img { width: 30px; height: 30px; }
.icon-btn {
  position: relative;
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: var(--surface);
  text-decoration: none; color: var(--ink);
}
.icon-btn svg { width: 20px; height: 20px; }
.dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--red); border: 2px solid var(--surface); }

main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: var(--space); padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
main.wide { max-width: 1100px; }
main.flush { padding: 0; max-width: none; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  background: var(--surface); border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 4px 10px; min-height: 58px;
  font-size: 12px; font-weight: 600; text-decoration: none; color: var(--muted);
}
.tabbar a svg { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"] svg { color: var(--ink); background: var(--brand); border-radius: 999px; padding: 2px 14px; width: 52px; }

/* ---------- banners ---------- */

.banner { display: flex; gap: 10px; align-items: flex-start; padding: 10px var(--space); font-size: 14px; line-height: 1.4; }
.banner strong { font-weight: 700; }
.banner a { color: inherit; font-weight: 700; }
.banner.emergency { background: var(--red-soft); color: var(--red); }
.banner.test { background: var(--amber-soft); color: var(--amber); justify-content: center; text-align: center; }
.banner.offline { background: var(--ink); color: var(--surface); justify-content: center; }

/* ---------- typography ---------- */

h1, h2, h3 { line-height: 1.15; margin: 0; letter-spacing: -.02em; }
h1 { font-size: clamp(26px, 6vw, 34px); font-weight: 800; }
h2 { font-size: 20px; font-weight: 750; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
.lead { color: var(--muted); font-size: 17px; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 20px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.section-label { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 24px 0 10px; }
.page-head { margin: 4px 0 20px; }
.page-head p { margin-top: 6px; }
.back { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; color: var(--muted); text-decoration: none; margin-bottom: 10px; min-height: 32px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--tap); padding: 12px 20px;
  border-radius: 14px; border: 1px solid transparent;
  font-weight: 700; font-size: 16px; line-height: 1.2; text-decoration: none; text-align: center;
  transition: transform .08s, filter .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; transform: none; }
.btn.block { width: 100%; }
.btn.lg { min-height: 58px; font-size: 18px; border-radius: 16px; }
.btn.sm { min-height: 38px; padding: 8px 14px; font-size: 14px; border-radius: 11px; }
.btn.primary { background: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(.97); }
.btn.dark { background: var(--ink); color: var(--surface); }
.btn.secondary { background: var(--surface); border-color: var(--line-strong); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.danger { background: var(--surface); color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.btn.success { background: var(--green); color: #fff; }
.btn-row { display: flex; gap: 10px; }
.btn-row > .btn { flex: 1; }
.spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- cards & lists ---------- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: var(--space); box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card.tight { padding: 12px; }
.card.highlight { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.card + .card { margin-top: 12px; }
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.list > * { display: flex; align-items: center; gap: 12px; padding: 14px var(--space); text-decoration: none; color: inherit; min-height: 56px; }
.list > * + * { border-top: 1px solid var(--line); }
.list > a:hover, .list > button:hover { background: var(--surface-2); }
.list > button { width: 100%; background: none; border: 0; border-top: 1px solid var(--line); text-align: left; }
.list > button:first-child { border-top: 0; }
.chev { color: var(--muted); margin-left: auto; }
.empty { text-align: center; padding: 36px 20px; color: var(--muted); border: 1.5px dashed var(--line-strong); border-radius: var(--radius); }
.empty .big { font-size: 40px; display: block; margin-bottom: 8px; }

/* ---------- forms ---------- */

.field { display: block; margin-bottom: 14px; }
.field > .label { display: block; font-weight: 650; font-size: 15px; margin-bottom: 6px; }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 5px; }
.field .error { font-size: 13px; color: var(--red); margin-top: 5px; font-weight: 600; }
.input, select.input, textarea.input {
  width: 100%; min-height: var(--tap); padding: 12px 14px;
  background: var(--surface); border: 1.5px solid var(--line-strong); border-radius: 12px;
  font-size: 16px; /* prevents iOS zoom */
}
textarea.input { min-height: 88px; resize: vertical; }
.input:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent); }
.input[aria-invalid="true"] { border-color: var(--red); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; font-size: 15px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); flex: none; }
.form-error { background: var(--red-soft); color: var(--red); padding: 10px 14px; border-radius: 12px; font-weight: 600; font-size: 14px; margin-bottom: 14px; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; background: var(--surface-2); border: 1px solid var(--line); padding: 4px; border-radius: 14px; }
.segmented button { min-height: 40px; border: 0; border-radius: 10px; background: transparent; font-weight: 650; font-size: 14px; color: var(--muted); }
.segmented button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- service tiles ---------- */

.services { display: grid; gap: 10px; }
.service-tile {
  display: flex; align-items: center; gap: 14px; width: 100%;
  padding: 14px; min-height: 72px; text-align: left;
  background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius);
}
.service-tile .ico { font-size: 30px; width: 48px; height: 48px; display: grid; place-items: center; background: var(--surface-2); border-radius: 14px; flex: none; }
.service-tile .t { font-weight: 750; font-size: 17px; }
.service-tile .d { font-size: 14px; color: var(--muted); line-height: 1.35; }
.service-tile[aria-pressed="true"] { border-color: var(--ink); background: var(--brand-soft); }
.service-tile:disabled { opacity: .55; cursor: not-allowed; }
.service-tile .soon { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); padding: 3px 8px; border-radius: 999px; }

/* ---------- wizard ---------- */

.progress { display: flex; gap: 6px; margin-bottom: 18px; }
.progress span { flex: 1; height: 5px; border-radius: 99px; background: var(--line); }
.progress span.on { background: var(--ink); }
.wizard-foot {
  position: sticky; bottom: calc(58px + env(safe-area-inset-bottom)); z-index: 5;
  padding: 12px 0; margin-top: 20px;
  background: linear-gradient(to top, var(--bg) 70%, transparent);
}
.offer-input { display: flex; align-items: center; justify-content: center; font-size: 56px; font-weight: 800; letter-spacing: -2px; padding: 8px 0; }
.offer-input span { color: var(--muted); }
.offer-input input { width: 4.2ch; border: 0; background: transparent; font-size: inherit; font-weight: inherit; letter-spacing: inherit; outline: none; text-align: left; padding: 0; -moz-appearance: textfield; }
.offer-input input::-webkit-inner-spin-button, .offer-input input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.chip { min-height: 40px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--surface); font-weight: 700; }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }

.breakdown { width: 100%; border-collapse: collapse; font-size: 15px; }
.breakdown td { padding: 7px 0; }
.breakdown td:last-child { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.breakdown tr.total td { border-top: 1.5px solid var(--line-strong); padding-top: 10px; font-weight: 800; font-size: 17px; }
.breakdown .sub { color: var(--muted); font-size: 13px; }

/* ---------- map ---------- */

.map { height: 260px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); position: relative; z-index: 0; }
.map.tall { height: 340px; }
.map.short { height: 180px; }
.map-center-pin { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -100%); z-index: 500; pointer-events: none; font-size: 38px; filter: drop-shadow(0 3px 3px rgba(0,0,0,.3)); }
.map-msg { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; color: var(--muted); z-index: 400; background: var(--surface-2); font-size: 14px; }
.pin { display: inline-block; transform: translate(-50%, -50%); white-space: nowrap; background: var(--brand); color: var(--brand-ink); border: 2px solid var(--ink); border-radius: 999px; padding: 2px 9px; font-weight: 800; font-size: 13px; box-shadow: 0 2px 6px rgba(0,0,0,.3); }
.pin.me { background: var(--blue); color: #fff; border-color: #fff; }
.pin.area { width: 0; height: 0; padding: 0; border: 0; box-shadow: none; }
.leaflet-container { font: inherit; }
.leaflet-div-icon { background: none; border: 0; }
.search-results { margin-top: 6px; }
.search-results button { font-size: 14px; }

/* ---------- status ---------- */

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.searching { background: var(--amber-soft); color: var(--amber); }
.pill.searching::before { animation: blink 1.2s infinite; }
.pill.accepted, .pill.en_route, .pill.arrived, .pill.in_progress { background: var(--blue-soft); color: var(--blue); }
.pill.completion_pending { background: var(--brand-soft); color: var(--amber); }
.pill.completed { background: var(--green-soft); color: var(--green); }
.pill.canceled, .pill.expired { background: var(--surface-2); color: var(--muted); }
.pill.disputed { background: var(--red-soft); color: var(--red); }
.pill.plain::before { display: none; }
@keyframes blink { 50% { opacity: .2; } }

.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.ok { background: var(--green-soft); color: var(--green); }
.badge.warn { background: var(--amber-soft); color: var(--amber); }
.badge.bad { background: var(--red-soft); color: var(--red); }
.badge.test { background: var(--amber-soft); color: var(--amber); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { display: flex; gap: 12px; align-items: flex-start; padding: 6px 0; color: var(--muted); font-size: 15px; }
.timeline li .tdot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; display: grid; place-items: center; font-size: 12px; background: var(--surface); }
.timeline li.done { color: var(--ink); }
.timeline li.done .tdot { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.timeline li.now { color: var(--ink); font-weight: 700; }
.timeline li.now .tdot { border-color: var(--ink); box-shadow: 0 0 0 4px var(--brand-soft); background: var(--brand); }

/* ---------- searching animation ---------- */

.radar { position: relative; width: 140px; height: 140px; margin: 8px auto 18px; display: grid; place-items: center; }
.radar::before, .radar::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 3px solid var(--brand); opacity: 0; animation: ripple 2.4s infinite; }
.radar::after { animation-delay: 1.2s; }
.radar .core { position: relative; z-index: 1; width: 76px; height: 76px; border-radius: 50%; background: var(--brand); display: grid; place-items: center; font-size: 36px; }
@keyframes ripple { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(1.25); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .radar::before, .radar::after, .pill.searching::before, .spinner { animation: none; } }

/* ---------- people ---------- */

.avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 18px; background: var(--brand); color: var(--brand-ink); flex: none; }
.avatar.sm { width: 36px; height: 36px; font-size: 14px; }
.avatar.lg { width: 64px; height: 64px; font-size: 24px; }
.stars { color: #e3a008; letter-spacing: 1px; white-space: nowrap; }
.star-input { display: flex; gap: 6px; justify-content: center; }
.star-input button { font-size: 38px; line-height: 1; background: none; border: 0; color: var(--line-strong); padding: 4px; min-width: var(--tap); }
.star-input button[aria-pressed="true"] { color: #e3a008; }

/* ---------- chat ---------- */

.chat { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow-y: auto; padding: 4px 0; }
.msg { max-width: 80%; padding: 9px 13px; border-radius: 16px; font-size: 15px; line-height: 1.35; background: var(--surface-2); border: 1px solid var(--line); align-self: flex-start; word-wrap: break-word; }
.msg.mine { align-self: flex-end; background: var(--ink); color: var(--surface); border-color: var(--ink); }
.msg .when { display: block; font-size: 11px; opacity: .65; margin-top: 2px; }
.chat-form { display: flex; gap: 8px; margin-top: 8px; }
.chat-form .input { min-height: 44px; }

/* ---------- stats ---------- */

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat .v { font-size: 26px; font-weight: 800; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.money { font-variant-numeric: tabular-nums; font-weight: 800; }
.money.pos { color: var(--green); }

/* ---------- online toggle ---------- */

.online-toggle { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface); width: 100%; text-align: left; }
.online-toggle.on { border-color: var(--green); background: var(--green-soft); }
.switch { width: 56px; height: 32px; border-radius: 99px; background: var(--line-strong); position: relative; flex: none; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.online-toggle.on .switch { background: var(--green); }
.online-toggle.on .switch::after { transform: translateX(24px); }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.checklist li:first-child { border-top: 0; }
.checklist .ck { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; border: 2px solid var(--line-strong); }
.checklist .ck.ok { background: var(--green); border-color: var(--green); color: #fff; }
.checklist .ck.wait { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); }

/* ---------- sheet / modal / toast ---------- */

dialog.sheet {
  border: 0; padding: 0; margin: auto auto 0; width: 100%; max-width: var(--max);
  max-height: 92dvh; border-radius: 22px 22px 0 0; background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lg);
}
@media (min-width: 640px) { dialog.sheet { margin: auto; border-radius: 22px; } }
dialog.sheet::backdrop { background: rgba(10, 12, 15, .55); }
.sheet-body { padding: 20px var(--space) calc(20px + env(safe-area-inset-bottom)); overflow-y: auto; max-height: 92dvh; }
.sheet-grip { width: 40px; height: 5px; background: var(--line-strong); border-radius: 99px; margin: 0 auto 14px; }

.toast-wrap { position: fixed; left: 0; right: 0; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 1000; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; padding: 0 var(--space); }
.toast { background: var(--ink); color: var(--surface); padding: 12px 18px; border-radius: 14px; font-weight: 600; font-size: 15px; box-shadow: var(--shadow-lg); max-width: 480px; animation: up .25s ease; pointer-events: auto; }
.toast.error { background: var(--red); color: #fff; }
@keyframes up { from { transform: translateY(12px); opacity: 0; } }

/* ---------- landing ---------- */

.hero { background: var(--ink); color: #fff; padding: 40px var(--space) 44px; }
.hero-inner { max-width: 1000px; margin: 0 auto; display: grid; gap: 28px; }
@media (min-width: 860px) { .hero-inner { grid-template-columns: 1.2fr 1fr; align-items: center; } }
.hero h1 { font-size: clamp(36px, 8vw, 58px); letter-spacing: -.035em; }
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p { color: #c5cbd3; font-size: 18px; margin-top: 14px; max-width: 520px; }
.hero .btn.secondary { background: transparent; color: #fff; border-color: #4a525d; }
.hero-card { background: #1b1f25; border: 1px solid #2b313a; border-radius: var(--radius-lg); padding: 18px; }
.hero-card .row + .row { margin-top: 10px; }
.section { max-width: 1000px; margin: 0 auto; padding: 44px var(--space); }
.section h2 { font-size: clamp(24px, 5vw, 32px); margin-bottom: 8px; }
.steps-grid { display: grid; gap: 14px; margin-top: 22px; }
@media (min-width: 760px) { .steps-grid { grid-template-columns: repeat(3, 1fr); } }
.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-weight: 800; margin-bottom: 10px; }
.split { display: grid; gap: 14px; }
@media (min-width: 760px) { .split { grid-template-columns: 1fr 1fr; } }
.footer { border-top: 1px solid var(--line); padding: 28px var(--space) 110px; color: var(--muted); font-size: 14px; }
.footer-inner { max-width: 1000px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 14px 24px; }
.footer a { color: var(--muted); }

/* ---------- admin ---------- */

.admin-nav { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 16px; scrollbar-width: none; }
.admin-nav a { flex: none; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 650; font-size: 14px; border: 1px solid var(--line); background: var(--surface); }
.admin-nav a[aria-current="page"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.data td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data tr:last-child td { border-bottom: 0; }
table.data tr.click { cursor: pointer; }
table.data tr.click:hover td { background: var(--surface-2); }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }
pre.json { font-size: 12px; background: var(--surface-2); padding: 10px; border-radius: 10px; overflow-x: auto; margin: 0; }

.loading { display: grid; place-items: center; padding: 60px 0; color: var(--muted); }

/* Inline icons (all use a 24x24 viewBox); Leaflet's own SVG layers are unaffected. */
svg[viewBox="0 0 24 24"] { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
.banner svg[viewBox="0 0 24 24"] { margin-top: 1px; }
.tabbar a svg[viewBox="0 0 24 24"] { width: 24px; height: 24px; }
.tabbar a[aria-current="page"] svg[viewBox="0 0 24 24"] { width: 52px; }
[tabindex="-1"]:focus { outline: none; }
.banner.test { font-size: 13px; padding: 6px var(--space); }

/* Sign-up: account type picker */
.role-pick { border: 0; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.role-pick legend { margin-bottom: 8px; padding: 0; }
.role-card { position: relative; display: flex; flex-direction: column; gap: 4px; padding: 14px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); cursor: pointer; }
.role-card input { position: absolute; opacity: 0; pointer-events: none; }
.role-card .ico { font-size: 28px; line-height: 1; }
.role-card:has(input:checked) { border-color: var(--ink); box-shadow: 0 0 0 3px var(--brand-soft); background: var(--brand-soft); }
.role-card:has(input:focus-visible) { outline: 3px solid var(--focus, var(--brand)); outline-offset: 2px; }
@media (max-width: 360px) { .role-pick { grid-template-columns: 1fr; } }

/* Account dashboards */
.dash-switch { margin: 0 0 16px; }
.dash-hero { display: flex; gap: 14px; align-items: center; }
.dash-hero .v { font-size: 34px; font-weight: 800; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stats.compact { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); margin-top: 12px; }
.stats.compact .stat .v { font-size: 22px; }
.bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 6px; align-items: end; height: 120px; margin-top: 14px; }
.bars .bar { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 4px; }
.bars .fill { width: 100%; min-height: 3px; border-radius: 6px 6px 2px 2px; background: var(--line-strong); }
.bars .bar.now .fill { background: var(--brand); }
.bars .lbl { font-size: 11px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.review { padding: 12px 0; border-top: 1px solid var(--line); }
.review:first-child { border-top: 0; padding-top: 0; }
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
