/* RC Go — styles. Tokens follow design-system/rc-go/MASTER.md */
:root {
  --brand: #232060; --brand-2: #312c86; --on-brand: #fff; --brand-ink: #232060;
  --action: #0B7A3E; --action-hover: #096a35; --action-soft: #E3F4EA; --on-action: #fff;
  --danger: #C81E26; --danger-soft: #FCE8E9;
  --info: #1479B8; --info-soft: #E3F1FA;
  --warn: #B26B00; --warn-soft: #FFF3DC; --star: #F2A900;
  --bg: #F5F6FA; --card: #FFFFFF; --card-2: #F0F1F7;
  --text: #14142B; --muted: #565670; --border: #E1E2EC; --border-strong: #C9CADA;
  --focus: #1479B8;
  --sh-1: 0 1px 2px rgba(20,20,43,.06), 0 2px 8px rgba(20,20,43,.06);
  --sh-2: 0 8px 28px rgba(20,20,43,.16);
  --r-sm: 10px; --r: 12px; --r-lg: 18px; --r-xl: 24px;
  --rail: 248px; --tabbar: 64px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --ease: cubic-bezier(.2,.8,.2,1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --brand: #2E2A7A; --brand-2: #3b36a0; --brand-ink: #BDB9FF;
    --action: #22B567; --action-hover: #2cc775; --action-soft: #12301f; --on-action: #06210f;
    --danger: #F0545B; --danger-soft: #3a1416; --info: #4FB3EA; --info-soft: #10283a;
    --warn: #F2B33D; --warn-soft: #33260b;
    --bg: #0E0E1A; --card: #1C1C31; --card-2: #24243d;
    --text: #F1F1F7; --muted: #A9A9C2; --border: #2E2E4A; --border-strong: #42425f; --focus: #4FB3EA;
    --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 10px 30px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --brand: #2E2A7A; --brand-2: #3b36a0; --brand-ink: #BDB9FF;
  --action: #22B567; --action-hover: #2cc775; --action-soft: #12301f; --on-action: #06210f;
  --danger: #F0545B; --danger-soft: #3a1416; --info: #4FB3EA; --info-soft: #10283a;
  --warn: #F2B33D; --warn-soft: #33260b;
  --bg: #0E0E1A; --card: #1C1C31; --card-2: #24243d;
  --text: #F1F1F7; --muted: #A9A9C2; --border: #2E2E4A; --border-strong: #42425f; --focus: #4FB3EA;
  --sh-1: 0 1px 2px rgba(0,0,0,.4); --sh-2: 0 10px 30px rgba(0,0,0,.5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--info); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0; text-wrap: balance; }
h1 { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
h2 { font-size: 22px; font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 18px; font-weight: 700; }
h4 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.xs { font-size: 12px; }
.num { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 2000; background: var(--card); padding: 10px 14px; border-radius: var(--r); box-shadow: var(--sh-2); }
.skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.ic { width: 20px; height: 20px; stroke-width: 2; flex: none; }
.ic-sm { width: 16px; height: 16px; }
.ic-lg { width: 28px; height: 28px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 20px; }
.row { display: flex; align-items: center; gap: 12px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.center { text-align: center; }
.hidden { display: none !important; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: var(--r); border: 1.5px solid transparent; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; transition: background .15s var(--ease), transform .1s var(--ease), border-color .15s; touch-action: manipulation; background: var(--card-2); color: var(--text); white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--action); color: var(--on-action); }
.btn-primary:hover:not([disabled]) { background: var(--action-hover); }
.btn-brand { background: var(--brand); color: var(--on-brand); }
.btn-brand:hover { background: var(--brand-2); }
.btn-outline { background: transparent; border-color: var(--border-strong); }
.btn-outline:hover { border-color: var(--text); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--card-2); }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: var(--r-sm); }
.btn-block { width: 100%; }
.btn-icon { width: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
.btn .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); } }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-weight: 600; font-size: 14px; }
.req::after { content: ' *'; color: var(--danger); }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1.5px solid var(--border-strong); border-radius: var(--r); background: var(--card); font-size: 16px; transition: border-color .15s; }
textarea.input { min-height: 88px; resize: vertical; }
.input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.input[aria-invalid="true"] { border-color: var(--danger); }
.help { font-size: 13px; color: var(--muted); }
.err { font-size: 13px; color: var(--danger); font-weight: 600; display: flex; gap: 6px; align-items: center; }
.err:empty { display: none; }
.grid-2 { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 600px) { .grid-2 { grid-template-columns: 1fr 1fr; } }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-weight: 700; font-size: 16px; margin-bottom: 8px; padding: 0; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--action); flex: none; }

/* Segmented / chips */
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--card-2); border-radius: var(--r); padding: 4px; gap: 4px; }
.seg button { min-height: 44px; border: 0; border-radius: 9px; background: transparent; font-weight: 700; font-size: 14px; display: flex; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--muted); }
.seg button[aria-pressed="true"], .seg button[aria-selected="true"] { background: var(--card); color: var(--text); box-shadow: var(--sh-1); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--border-strong); background: var(--card); font-weight: 600; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }

/* Toggle switch */
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 48px; height: 28px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .2s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s var(--ease); }
.switch input:checked + .track { background: var(--action); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid var(--focus); outline-offset: 2px; }

/* ---------- Cards, badges, lists ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--sh-1); }
.card-flat { background: var(--card-2); border-radius: var(--r); padding: 14px; }
.card-link { cursor: pointer; transition: transform .12s var(--ease), border-color .15s; text-decoration: none; color: inherit; display: block; }
.card-link:hover { border-color: var(--border-strong); }
.card-link:active { transform: scale(.99); }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--card-2); color: var(--muted); white-space: nowrap; }
.badge-green { background: var(--action-soft); color: var(--action); }
.badge-red { background: var(--danger-soft); color: var(--danger); }
.badge-blue { background: var(--info-soft); color: var(--info); }
.badge-amber { background: var(--warn-soft); color: var(--warn); }
.badge-brand { background: var(--brand); color: #fff; }
.stars { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; font-size: 14px; }
.stars .ic { color: var(--star); fill: var(--star); width: 16px; height: 16px; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.divider { height: 1px; background: var(--border); margin: 4px 0; border: 0; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }
.price { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.price-lg { font-size: 32px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.empty { text-align: center; padding: 32px 16px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty .ic { width: 40px; height: 40px; color: var(--border-strong); }
.tile { display: flex; flex-direction: column; gap: 2px; }
.tile .v { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tiles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, 1fr); } }

/* ---------- App shell ---------- */
.app { min-height: 100dvh; }
.rail { display: none; }
.tabbar { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; height: calc(var(--tabbar) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom); background: var(--card); border-top: 1px solid var(--border); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--muted); font-size: 12px; font-weight: 600; position: relative; }
.tabbar a[aria-current="page"] { color: var(--brand-ink); }
.tabbar a[aria-current="page"] .ic { stroke-width: 2.5; }
.nav-badge { position: absolute; top: 6px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 800; display: grid; place-items: center; }
.main { padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom)); min-height: 100dvh; }
.app.no-nav .main { padding-bottom: 0; }
.app.no-nav .tabbar, .app.no-nav .rail { display: none !important; }

.topbar { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); padding: 12px 16px; display: flex; align-items: center; gap: 10px; min-height: 64px; border-bottom: 1px solid transparent; }
.topbar h1 { font-size: 20px; }
.page { padding: 16px; max-width: 960px; margin: 0 auto; }
.page-narrow { max-width: 640px; }

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: inherit; }
.brand .emblem { width: 36px; height: 36px; border-radius: 50%; background: #fff; flex: none; box-shadow: 0 0 0 2px rgba(255,255,255,.6); }
.brand b { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.brand small { display: block; font-size: 11px; font-weight: 600; opacity: .8; line-height: 1.2; }

@media (min-width: 900px) {
  .app:not(.no-nav) { display: grid; grid-template-columns: var(--rail) 1fr; }
  .rail { display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100dvh; background: var(--brand); color: var(--on-brand); padding: 20px 14px; }
  .rail .brand { padding: 4px 8px 20px; }
  .rail a.nav { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 14px; border-radius: var(--r); color: rgba(255,255,255,.82); text-decoration: none; font-weight: 600; position: relative; }
  .rail a.nav:hover { background: rgba(255,255,255,.08); color: #fff; }
  .rail a.nav[aria-current="page"] { background: rgba(255,255,255,.14); color: #fff; }
  .rail .nav-badge { position: static; margin-left: auto; }
  .rail .rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
  .rail .rail-user { padding: 12px; border-radius: var(--r); background: rgba(255,255,255,.08); font-size: 14px; }
  .rail .rail-user .muted { color: rgba(255,255,255,.7); }
  .rail .btn-ghost { color: rgba(255,255,255,.85); justify-content: flex-start; }
  .rail .btn-ghost:hover { background: rgba(255,255,255,.08); }
  .tabbar { display: none; }
  .main { padding-bottom: 0; }
  .topbar { padding: 18px 28px; }
  .page { padding: 24px 28px; }
}

/* ---------- Map views ---------- */
.mapview { position: relative; height: calc(100dvh - var(--tabbar) - env(safe-area-inset-bottom)); overflow: hidden; }
.app.no-nav .mapview { height: 100dvh; }
.map { position: absolute; inset: 0; background: #e8eaf0; z-index: 0; }
.map-top { position: absolute; z-index: 15; top: calc(12px + env(safe-area-inset-top)); left: 12px; right: 64px; display: flex; gap: 8px; align-items: center; pointer-events: none; }
.map-top > * { pointer-events: auto; }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--card); border-radius: 999px; padding: 6px 12px 6px 6px; box-shadow: var(--sh-2); font-weight: 700; font-size: 14px; min-height: 44px; }
.pill .emblem { width: 32px; height: 32px; border-radius: 50%; background: #fff; }
.pill-status { padding: 8px 14px; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); flex: none; }
.dot.on { background: var(--action); box-shadow: 0 0 0 4px color-mix(in srgb, var(--action) 25%, transparent); }
.fab { position: absolute; z-index: 15; right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: var(--card); box-shadow: var(--sh-2); display: grid; place-items: center; cursor: pointer; color: var(--text); }
.sheet { position: absolute; z-index: 20; left: 0; right: 0; bottom: 0; max-height: 64%; overflow-y: auto; overscroll-behavior: contain; background: var(--card); border-radius: var(--r-xl) var(--r-xl) 0 0; box-shadow: 0 -8px 30px rgba(20,20,43,.18); padding: 8px 16px 20px; }
.sheet::before { content: ''; display: block; width: 40px; height: 5px; border-radius: 99px; background: var(--border-strong); margin: 4px auto 12px; }
.sheet.tall { max-height: 82%; }
.fab-locate { bottom: calc(64% + 12px); }
.sheet-hint { position: absolute; z-index: 16; left: 50%; top: 72px; transform: translateX(-50%); background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 999px; font-weight: 700; font-size: 14px; box-shadow: var(--sh-2); white-space: nowrap; }
@media (min-width: 900px) {
  .mapview { height: 100dvh; }
  .sheet, .sheet.tall { top: 16px; bottom: auto; left: auto; right: 16px; width: 420px; max-height: calc(100% - 32px); border-radius: var(--r-xl); padding: 20px; }
  .sheet::before { display: none; }
  .map-top { right: 460px; }
  .fab-locate { bottom: 24px; right: auto; left: 16px; }
  .leaflet-top.leaflet-right { right: 440px; }
}

/* Markers */
.mk-wrap { background: none; border: 0; }
.mk { display: grid; place-items: center; }
.mk-vehicle { width: 40px; height: 40px; border-radius: 50%; background: var(--mk); border: 3px solid #fff; box-shadow: 0 3px 10px rgba(0,0,0,.3); transition: transform .3s; }
.mk-pin { width: 32px; height: 42px; position: relative; }
.mk-pin::before { content: ''; position: absolute; inset: 0 0 10px 0; background: var(--mk); border: 2px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg) scale(.8); transform-origin: 50% 50%; box-shadow: 0 3px 8px rgba(0,0,0,.3); }
.mk-pin span { position: relative; color: #fff; font-weight: 800; font-size: 13px; margin-bottom: 10px; }
.mk-me { width: 22px; height: 22px; border-radius: 50%; background: #1479B8; border: 3px solid #fff; box-shadow: 0 0 0 8px rgba(20,121,184,.22); }
.mk-label { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 2px; background: #fff; color: #14142B; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.pulse { position: absolute; z-index: 5; left: 50%; top: 50%; width: 160px; height: 160px; margin: -80px; border-radius: 50%; background: color-mix(in srgb, var(--action) 30%, transparent); animation: pulse 1.8s ease-out infinite; pointer-events: none; }
@keyframes pulse { from { transform: scale(.2); opacity: .9; } to { transform: scale(1.4); opacity: 0; } }

/* Location fields */
.locbox { border: 1.5px solid var(--border); border-radius: var(--r-lg); overflow: hidden; }
.locrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 8px 14px; background: var(--card); border: 0; text-align: left; cursor: pointer; }
.locrow + .locrow { border-top: 1px solid var(--border); }
.locrow:hover { background: var(--card-2); }
.locrow .lbl { font-size: 12px; color: var(--muted); font-weight: 600; display: block; }
.locrow .val { font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.locrow .val.ph { color: var(--muted); font-weight: 500; }
.ldot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.ldot.a { background: var(--action); }
.ldot.b { background: var(--danger); border-radius: 3px; }
.opt-list { list-style: none; margin: 0; padding: 0; }
.opt-list button { width: 100%; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 4px; border: 0; background: none; text-align: left; cursor: pointer; border-bottom: 1px solid var(--border); }
.opt-list button:hover { background: var(--card-2); }
.opt-list .ic-box { width: 36px; height: 36px; border-radius: 50%; background: var(--card-2); display: grid; place-items: center; flex: none; }

/* Offer stepper */
.stepper { display: grid; grid-template-columns: 52px 1fr 52px; gap: 8px; align-items: center; }
.stepper button { height: 52px; border-radius: var(--r); border: 1.5px solid var(--border-strong); background: var(--card); cursor: pointer; display: grid; place-items: center; }
.stepper .amount { display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--border-strong); border-radius: var(--r); height: 52px; font-weight: 800; font-size: 24px; }
.stepper .amount input { border: 0; background: transparent; width: 7ch; text-align: left; font-weight: 800; font-size: 24px; font-variant-numeric: tabular-nums; outline: none; }

/* Bids / offers */
.bid { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 14px; border: 1.5px solid var(--border); border-radius: var(--r-lg); background: var(--card); animation: slideIn .3s var(--ease); }
.bid.best { border-color: var(--action); }
.bid-actions { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 2fr; gap: 8px; }
@keyframes slideIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Progress steps */
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; }
.steps li { flex: 1; height: 6px; border-radius: 99px; background: var(--border); }
.steps li.done { background: var(--action); }
.steps li.now { background: linear-gradient(90deg, var(--action) 50%, var(--border) 50%); }
.timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.timeline li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; padding-bottom: 14px; position: relative; font-size: 14px; }
.timeline li::before { content: ''; position: absolute; left: 11px; top: 22px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::before { display: none; }
.timeline .tdot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--card-2); color: var(--muted); }
.timeline li.done .tdot { background: var(--action); color: #fff; }
.timeline li.now .tdot { background: var(--info); color: #fff; }
.timeline li.done b, .timeline li.now b { color: var(--text); }
.timeline b { color: var(--muted); font-weight: 700; }

/* Wizard progress */
.wiz { display: flex; gap: 6px; list-style: none; padding: 0; margin: 0 0 4px; }
.wiz li { flex: 1; display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); }
.wiz li::before { content: ''; height: 5px; border-radius: 99px; background: var(--border); }
.wiz li.done::before, .wiz li.now::before { background: var(--action); }
.wiz li.now { color: var(--text); }
@media (max-width: 599px) { .wiz li span { display: none; } .wiz li.now span { display: inline; } }

/* Upload tiles */
.uploads { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.upload { position: relative; border: 1.5px dashed var(--border-strong); border-radius: var(--r); padding: 12px; min-height: 120px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; cursor: pointer; background: var(--card); }
.upload:hover, .upload:focus-within { border-color: var(--info); }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload.has { border-style: solid; border-color: var(--action); background: var(--action-soft); }
.upload .thumb { width: 100%; height: 64px; object-fit: cover; border-radius: 8px; }
.upload b { font-size: 13px; line-height: 1.3; }
.upload .fname { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.upload[aria-invalid="true"] { border-color: var(--danger); }
.doc-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.doc-thumb { border: 1px solid var(--border); border-radius: var(--r); padding: 8px; background: var(--card); cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.doc-thumb img, .doc-thumb .ph { width: 100%; height: 90px; object-fit: cover; border-radius: 8px; background: var(--card-2); display: grid; place-items: center; color: var(--muted); }

/* Shop */
.vendor-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 600px) { .vendor-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1200px) { .vendor-grid { grid-template-columns: 1fr 1fr 1fr; } }
.vendor-card { display: grid; grid-template-columns: 64px 1fr; gap: 14px; align-items: center; }
.vlogo { width: 64px; height: 64px; border-radius: var(--r); display: grid; place-items: center; color: #fff; flex: none; overflow: hidden; }
.vlogo img { width: 100%; height: 100%; object-fit: cover; }
.vlogo.restaurant { background: #C2410C; } .vlogo.supermarket { background: #0B7A3E; } .vlogo.retail { background: #232060; }
.vlogo .ic { width: 28px; height: 28px; }
.prod-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.prod { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 12px; align-items: start; min-width: 0; }
.vendor-grid > *, .prod-grid > * { min-width: 0; }
.prod .pimg { width: 72px; height: 72px; border-radius: var(--r); background: var(--card-2); display: grid; place-items: center; overflow: hidden; color: var(--muted); }
.prod .pimg img { width: 100%; height: 100%; object-fit: cover; }
.qty { display: inline-flex; align-items: center; gap: 4px; border: 1.5px solid var(--border-strong); border-radius: 999px; padding: 2px; }
.qty button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--card-2); cursor: pointer; display: grid; place-items: center; }
.qty span { min-width: 24px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.cartbar { position: fixed; z-index: 35; left: 12px; right: 12px; bottom: calc(var(--tabbar) + 12px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) { .cartbar { left: calc(var(--rail) + 28px); right: 28px; bottom: 24px; max-width: 904px; margin: 0 auto; } }
.cartbar .btn { width: 100%; min-height: 56px; box-shadow: var(--sh-2); justify-content: space-between; padding: 0 20px; }
.hero-vendor { border-radius: var(--r-lg); padding: 20px; color: #fff; background: linear-gradient(135deg, var(--brand), #3d3799); display: flex; gap: 16px; align-items: center; }
.hero-vendor .vlogo { width: 72px; height: 72px; box-shadow: 0 0 0 3px rgba(255,255,255,.4); }
.searchbox { position: relative; }
.searchbox .ic { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbox .input { padding-left: 44px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; }
.tabs button { min-height: 44px; padding: 0 14px; border: 0; background: none; font-weight: 700; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--action); }

/* Landing */
.landing { min-height: 100dvh; display: grid; grid-template-rows: auto 1fr; }
.land-hero { position: relative; color: #fff; padding: 20px 16px 96px; background: linear-gradient(180deg, rgba(20,18,70,.82), rgba(35,32,96,.92)), url('../assets/camp-gate.jpg') center/cover; }
.land-hero .inner { max-width: 1040px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; }
.land-hero h1 { font-size: clamp(30px, 6vw, 48px); max-width: 16ch; }
.land-hero p.lead { font-size: 18px; color: rgba(255,255,255,.88); max-width: 46ch; }
.land-hero .emblem { width: 44px; height: 44px; }
.land-feats { display: flex; gap: 8px; flex-wrap: wrap; }
.land-feats span { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2); padding: 6px 12px; border-radius: 999px; font-size: 14px; font-weight: 600; }
.land-body { max-width: 1040px; margin: -64px auto 0; padding: 0 16px 40px; width: 100%; position: relative; }
.role-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
@media (min-width: 600px) { .role-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .role-grid { grid-template-columns: repeat(4, 1fr); } }
.role-card { display: flex; flex-direction: column; gap: 10px; padding: 20px; min-height: 180px; }
.role-card .ricon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--action-soft); color: var(--action); }
.role-card.brand .ricon { background: color-mix(in srgb, var(--brand-ink) 14%, transparent); color: var(--brand-ink); }
.role-card .go { margin-top: auto; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--action); }
.demo-note { margin-top: 20px; display: flex; gap: 12px; align-items: flex-start; }

/* Modal & toast */
.modal-back { position: fixed; inset: 0; z-index: 1000; background: rgba(10,10,25,.55); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s; }
@media (min-width: 600px) { .modal-back { align-items: center; padding: 24px; } }
.modal { background: var(--card); width: 100%; max-width: 560px; max-height: 90dvh; overflow: auto; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 20px; animation: up .22s var(--ease); }
@media (min-width: 600px) { .modal { border-radius: var(--r-xl); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(24px); opacity: .6; } }
.toasts { position: fixed; z-index: 1100; left: 50%; transform: translateX(-50%); top: calc(12px + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 12px 16px; border-radius: var(--r); box-shadow: var(--sh-2); font-weight: 600; font-size: 14px; display: flex; gap: 10px; align-items: center; animation: up .2s var(--ease); pointer-events: auto; }
.toast.ok .ic { color: #4ade80; } .toast.bad .ic { color: #f87171; }

.star-input { display: flex; gap: 4px; flex-direction: row-reverse; justify-content: flex-end; }
.star-input input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.star-input label { cursor: pointer; padding: 4px; color: var(--border-strong); }
.star-input label svg { width: 36px; height: 36px; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: var(--star); }
.star-input input:focus-visible + label { outline: 3px solid var(--focus); border-radius: 8px; }

.bank { background: var(--info-soft); border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.bank .acct { font-size: 22px; font-weight: 800; letter-spacing: .04em; font-variant-numeric: tabular-nums; }

.online-toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border-radius: var(--r-lg); background: var(--card-2); }
.online-toggle.on { background: var(--action-soft); }

.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r); background: var(--warn-soft); color: var(--text); font-size: 14px; }
.banner .ic { color: var(--warn); }
.banner.info { background: var(--info-soft); } .banner.info .ic { color: var(--info); }
.banner.ok { background: var(--action-soft); } .banner.ok .ic { color: var(--action); }
.banner.bad { background: var(--danger-soft); } .banner.bad .ic { color: var(--danger); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 8px; border-bottom: 1px solid var(--border); }
.tbl td { padding: 12px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl-wrap { overflow-x: auto; }

.leaflet-container { font-family: var(--font); }
.leaflet-control-attribution { font-size: 10px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .pulse { display: none; }
}
