@font-face {
  font-family: 'Bricolage';
  src: url('/vendor/fonts/bricolage-grotesque-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: 'Bricolage';
  src: url('/vendor/fonts/bricolage-grotesque-latin-ext-wght-normal.woff2') format('woff2-variations');
  font-weight: 200 800;
  font-display: swap;
  unicode-range: U+0100-024F, U+1E00-1EFF;
}

:root {
  --bg: #0b0b0c;
  --bg-2: #121214;
  --surface: #17171a;
  --surface-2: #202024;
  --surface-3: #2a2a30;
  --line: #2c2c32;
  --text: #f6f3ea;
  --text-2: #b9b4a6;
  --text-3: #8a8578;
  --amber: #f5c43c;
  --amber-2: #ffd766;
  --amber-ink: #1a1405;
  --amber-soft: rgba(245, 196, 60, 0.13);
  --green: #4fd18b;
  --green-soft: rgba(79, 209, 139, 0.14);
  --blue: #6cb6ff;
  --blue-soft: rgba(108, 182, 255, 0.14);
  --red: #ff6b5e;
  --red-soft: rgba(255, 107, 94, 0.14);
  --violet: #b99cff;
  --violet-soft: rgba(185, 156, 255, 0.14);
  --radius: 16px;
  --radius-sm: 11px;
  --shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.7), 0 2px 6px -2px rgba(0, 0, 0, 0.5);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --nav-h: 66px;
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Bricolage', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}
::selection { background: var(--amber); color: var(--amber-ink); }
input, textarea, select, button { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--amber); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; border-radius: 6px; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 6px; }
.ico { width: 20px; height: 20px; flex: none; display: inline-block; vertical-align: middle; }
.ico.sm { width: 16px; height: 16px; }
.ico.lg { width: 24px; height: 24px; }
[hidden] { display: none !important; }

/* ---------- estructura ---------- */
#app { min-height: 100%; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 30;
  padding: calc(var(--safe-t) + 12px) 16px 12px;
  background: rgba(11, 11, 12, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; gap: 10px;
}
.top h1 { font-size: 26px; font-weight: 760; letter-spacing: -0.025em; margin: 0; line-height: 1.05; flex: 1; min-width: 0; text-wrap: balance; }
.top h1 small { display: block; font-size: 13px; font-weight: 500; letter-spacing: 0; color: var(--text-3); margin-top: 3px; }
.brand-mark { width: 34px; height: 34px; border-radius: 10px; background: var(--amber); color: var(--amber-ink); display: grid; place-items: center; font-weight: 800; font-size: 15px; letter-spacing: -0.04em; flex: none; }
.view { flex: 1; padding: 0 16px calc(var(--nav-h) + var(--safe-b) + 96px); }
.view.no-nav { padding-bottom: calc(var(--safe-b) + 120px); }

.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  padding: 6px 8px calc(var(--safe-b) + 6px);
  background: rgba(16, 16, 18, 0.92);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-top: 1px solid var(--line);
}
.nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 7px 0 5px; border-radius: 12px; color: var(--text-3); text-decoration: none;
  font-size: 11.5px; font-weight: 600; position: relative;
  transition: color 0.2s var(--ease);
}
.nav a .ico { width: 23px; height: 23px; }
.nav a.on { color: var(--amber); }
.nav a.on::before { content: ''; position: absolute; top: -7px; width: 28px; height: 3px; border-radius: 0 0 3px 3px; background: var(--amber); }
.nav .badge { position: absolute; top: 2px; left: calc(50% + 6px); min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

.fab {
  position: fixed; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 35;
  height: 60px; padding: 0 24px 0 20px; border-radius: 30px; border: 0;
  background: var(--amber); color: var(--amber-ink);
  font-weight: 760; font-size: 17px; letter-spacing: -0.01em;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 14px 30px -10px rgba(245, 196, 60, 0.55), 0 4px 10px -4px rgba(0, 0, 0, 0.6);
  transition: transform 0.25s var(--ease);
}
.fab:active { transform: scale(0.96); }
.fab .ico { width: 24px; height: 24px; stroke-width: 2.6; }

/* ---------- elementos ---------- */
.btn {
  min-height: 48px; padding: 0 18px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font-weight: 650; font-size: 15.5px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: transform 0.15s var(--ease), background 0.2s, border-color 0.2s, opacity 0.2s;
  text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn[disabled] { opacity: 0.45; pointer-events: none; }
.btn.primary { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.btn.green { background: var(--green); border-color: var(--green); color: #05220f; }
.btn.danger { color: var(--red); border-color: rgba(255, 107, 94, 0.35); background: var(--red-soft); }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; }
.btn.big { min-height: 58px; font-size: 17px; border-radius: 16px; }
.btn.sm { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 11px; }
.btn.icon { width: 46px; padding: 0; flex: none; }
.btn.icon.sm { width: 38px; }
.btn.wa { color: #5fe08f; }
.row { display: flex; gap: 8px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row > .grow { flex: 1; min-width: 0; }
.stack { display: grid; gap: 10px; }
.muted { color: var(--text-3); }
.sub { color: var(--text-2); }
.small { font-size: 13.5px; }
.money { font-weight: 720; letter-spacing: -0.01em; }
.spacer { height: 14px; }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

.section-title { display: flex; align-items: baseline; gap: 8px; font-size: 19px; font-weight: 720; letter-spacing: -0.015em; margin: 26px 2px 10px; }
.section-title .count { font-size: 14px; font-weight: 600; color: var(--text-3); }
.section-title .right { margin-left: auto; font-size: 14px; font-weight: 600; }

.card { background: var(--surface); border-radius: var(--radius); padding: 14px; }
.card + .card { margin-top: 10px; }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13.5px; font-weight: 650; color: var(--text-2); }
.input, .field input, .field textarea, .field select {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 13px;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  outline: none; transition: border-color 0.2s, background 0.2s; font-size: 16px;
}
.field textarea { min-height: 84px; resize: vertical; line-height: 1.4; }
.input:focus, .field input:focus, .field textarea:focus, .field select:focus { border-color: var(--amber); background: var(--surface-3); }
input::placeholder, textarea::placeholder { color: #77736a; }
.input-wrap { position: relative; }
.input-wrap > .ico { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--text-3); pointer-events: none; }
.input-wrap > input { padding-left: 44px; }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: var(--surface-2); border-radius: 15px; padding: 5px; }
.seg button { min-height: 48px; border: 0; border-radius: 11px; background: transparent; color: var(--text-2); font-weight: 650; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 6px; transition: background 0.2s var(--ease), color 0.2s; }
.seg button.on { background: var(--amber); color: var(--amber-ink); }
.seg button.on.g { background: var(--green); color: #05220f; }
.seg button.on.b { background: var(--blue); color: #04192d; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 4px; margin: 0 -16px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 42px; padding: 0 15px; border-radius: 21px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text-2); font-weight: 620; font-size: 14.5px;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s, border-color 0.2s;
}
.chip.on { background: var(--amber-soft); color: var(--amber); border-color: rgba(245, 196, 60, 0.55); }
.chip .dot { width: 9px; height: 9px; border-radius: 50%; }
.chip .n { font-size: 12px; background: var(--surface-3); color: var(--text-2); border-radius: 8px; padding: 1px 6px; }

.switch { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface-2); border-radius: 14px; cursor: pointer; }
.switch .grow { flex: 1; }
.switch b { display: block; font-weight: 650; }
.switch small { color: var(--text-3); font-size: 13px; }
.switch input { appearance: none; width: 50px; height: 30px; border-radius: 15px; background: var(--surface-3); position: relative; flex: none; transition: background 0.25s var(--ease); margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #d9d4c7; transition: transform 0.25s var(--ease), background 0.2s; }
.switch input:checked { background: var(--amber); }
.switch input:checked::after { transform: translateX(20px); background: var(--amber-ink); }

.pill { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: 13px; font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.pill.pendiente { background: var(--red-soft); color: var(--red); }
.pill.asignado { background: var(--amber-soft); color: var(--amber); }
.pill.en_camino { background: var(--blue-soft); color: var(--blue); }
.pill.entregado { background: var(--green-soft); color: var(--green); }
.pill.cancelado { background: var(--surface-3); color: var(--text-3); }
.pill.efectivo { background: var(--green-soft); color: var(--green); }
.pill.transferencia { background: var(--violet-soft); color: var(--violet); }
.pill.pagado { background: var(--blue-soft); color: var(--blue); }
.pill.code { background: var(--amber-soft); color: var(--amber); }
.pill.neutral { background: var(--surface-3); color: var(--text-2); }

/* ---------- tarjetas de pedido ---------- */
.order {
  position: relative; display: block; width: 100%; text-align: left; border: 0;
  background: var(--surface); border-radius: var(--radius); padding: 14px 14px 13px;
  color: inherit; text-decoration: none;
  transition: transform 0.18s var(--ease), background 0.2s;
}
.order + .order { margin-top: 10px; }
.order:active { transform: scale(0.985); background: var(--surface-2); }
.order .head { display: flex; align-items: center; gap: 8px; }
.order .num { font-size: 13px; font-weight: 700; color: var(--text-3); }
.order .name { font-size: 18px; font-weight: 720; letter-spacing: -0.015em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order .addr { display: flex; gap: 6px; align-items: flex-start; color: var(--text-2); margin-top: 6px; font-size: 14.5px; }
.order .addr .ico { margin-top: 1px; color: var(--text-3); }
.order .items { color: var(--text-3); font-size: 14px; margin-top: 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.order .foot { display: flex; align-items: center; gap: 6px; margin-top: 11px; flex-wrap: wrap; }
.order .foot .money { margin-left: auto; font-size: 18px; }
.age { font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); }
.age.warn { color: var(--amber); }
.age.hot { color: var(--red); }
.driver-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 650; color: var(--text-2); }
.driver-tag i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.stop-n { width: 34px; height: 34px; border-radius: 11px; background: var(--amber); color: var(--amber-ink); font-weight: 800; display: grid; place-items: center; flex: none; font-size: 17px; }

.empty { text-align: center; padding: 42px 20px; color: var(--text-3); }
.empty .ico { width: 42px; height: 42px; color: var(--surface-3); margin-bottom: 10px; }
.empty b { display: block; color: var(--text-2); font-size: 17px; margin-bottom: 4px; }

/* ---------- formularios de pedido ---------- */
.step { margin-top: 22px; }
.step > h3 { margin: 0 0 10px; font-size: 15px; font-weight: 720; letter-spacing: -0.005em; display: flex; align-items: center; gap: 8px; color: var(--text); }
.step > h3 .ico { color: var(--amber); }
.loc-card { background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.loc-card .mini-map { height: 150px; background: var(--surface-2); }
.loc-card .body { padding: 12px 14px; }
.loc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.loc-actions .btn { font-size: 14.5px; justify-content: flex-start; padding: 0 13px; }
.loc-actions .btn .ico { color: var(--amber); }
.suggest { background: var(--surface-2); border-radius: 14px; margin-top: 6px; overflow: hidden; }
.suggest button { display: flex; width: 100%; text-align: left; gap: 10px; align-items: center; background: none; border: 0; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.suggest button:last-child { border-bottom: 0; }

.cart-line { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .nm { flex: 1; min-width: 0; font-weight: 600; font-size: 15px; }
.cart-line .nm small { display: block; color: var(--text-3); font-weight: 500; }
.qty { display: flex; align-items: center; background: var(--surface-2); border-radius: 12px; }
.qty button { width: 38px; height: 38px; border: 0; background: none; color: var(--amber); display: grid; place-items: center; }
.qty span { min-width: 22px; text-align: center; font-weight: 720; }
.menu-pick { max-height: 46vh; overflow: auto; border-radius: 14px; background: var(--surface-2); margin-top: 8px; }
.menu-pick .sec { position: sticky; top: 0; background: var(--surface-3); padding: 7px 14px; font-size: 12.5px; font-weight: 720; color: var(--text-2); letter-spacing: 0.01em; z-index: 1; }
.menu-pick button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 12px 14px; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; }
.menu-pick button .nm { flex: 1; font-size: 15px; }
.menu-pick button .money { font-size: 14.5px; color: var(--text-2); }
.menu-pick button .in { background: var(--amber); color: var(--amber-ink); border-radius: 8px; padding: 1px 7px; font-weight: 800; font-size: 13px; }
.totals { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; }
.totals .l { display: flex; justify-content: space-between; padding: 4px 0; color: var(--text-2); }
.totals .l.t { color: var(--text); font-size: 22px; font-weight: 760; padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--line); letter-spacing: -0.02em; }

.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; padding: 12px 16px calc(var(--safe-b) + 12px); background: linear-gradient(rgba(11, 11, 12, 0), var(--bg) 35%); }

/* ---------- hoja inferior / modales ---------- */
.sheet-back { position: fixed; inset: 0; z-index: 80; background: rgba(0, 0, 0, 0.6); opacity: 0; transition: opacity 0.25s var(--ease); }
.sheet-back.show { opacity: 1; }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 81; max-height: 92vh; overflow: auto;
  background: var(--bg-2); border-radius: 24px 24px 0 0; padding: 10px 16px calc(var(--safe-b) + 18px);
  transform: translateY(105%); transition: transform 0.35s var(--ease);
  box-shadow: 0 -20px 40px -20px rgba(0, 0, 0, 0.8);
}
.sheet.show { transform: none; }
.sheet .grab { width: 42px; height: 5px; border-radius: 3px; background: var(--surface-3); margin: 0 auto 12px; }
.sheet h2 { margin: 4px 0 14px; font-size: 22px; letter-spacing: -0.02em; font-weight: 760; }
.fullmap { position: fixed; inset: 0; z-index: 90; background: var(--bg); display: flex; flex-direction: column; }
.fullmap .map { flex: 1; }
.fullmap .bar { position: absolute; left: 12px; right: 12px; top: calc(var(--safe-t) + 12px); z-index: 500; display: flex; gap: 8px; }
.fullmap .bottom { position: absolute; left: 12px; right: 12px; bottom: calc(var(--safe-b) + 14px); z-index: 500; display: grid; gap: 8px; }
.fullmap .addr-preview { background: rgba(23, 23, 26, 0.95); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; box-shadow: var(--shadow); }
.crosshair { position: absolute; left: 50%; top: 50%; z-index: 450; pointer-events: none; translate: -50% -100%; color: var(--amber); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.6)); }
.crosshair .ico { width: 44px; height: 44px; fill: var(--amber); stroke: var(--amber-ink); stroke-width: 1.6; }

/* ---------- toasts ---------- */
.toasts { position: fixed; left: 12px; right: 12px; top: calc(var(--safe-t) + 10px); z-index: 200; display: grid; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; background: var(--surface-3); color: var(--text); border-radius: 14px; padding: 13px 15px; font-weight: 600; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; animation: toast-in 0.4s var(--ease); }
.toast.err { background: #3a1916; color: #ffb4ab; }
.toast.ok { background: #12301f; color: #9df0bf; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(0.98); filter: blur(4px); } }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; padding: calc(var(--safe-t) + 40px) 22px calc(var(--safe-b) + 24px); }
.login .logo { font-size: 56px; font-weight: 800; letter-spacing: -0.04em; line-height: 0.9; margin: 8px 0 6px; }
.login .logo span { color: var(--amber); }
.login .tag { color: var(--text-3); font-weight: 600; margin-bottom: 26px; }
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 22px 0 18px; }
.pin-dots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--surface-3); transition: background 0.15s, border-color 0.15s, transform 0.2s var(--ease); }
.pin-dots i.on { background: var(--amber); border-color: var(--amber); transform: scale(1.1); }
.pin-dots.shake { animation: shake 0.4s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 340px; margin: 0 auto; width: 100%; }
.pad button { height: 64px; border-radius: 18px; border: 0; background: var(--surface); font-size: 26px; font-weight: 650; transition: background 0.15s, transform 0.12s var(--ease); }
.pad button:active { background: var(--surface-3); transform: scale(0.95); }
.pad button.fn { background: transparent; font-size: 15px; color: var(--text-2); }

/* ---------- datos ---------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--surface); border-radius: var(--radius); padding: 13px 14px; }
.kpi b { display: block; font-size: 25px; font-weight: 760; letter-spacing: -0.025em; line-height: 1.1; }
.kpi span { font-size: 13px; color: var(--text-3); font-weight: 600; }
.kpi.wide { grid-column: span 2; display: flex; align-items: baseline; gap: 10px; }
.kpi.wide b { font-size: 34px; color: var(--amber); }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 130px; padding-top: 8px; }
.bars div { flex: 1; background: var(--amber); border-radius: 4px 4px 1px 1px; min-height: 2px; position: relative; opacity: 0.88; }
.bars div.dim { background: var(--surface-3); }
.bar-labels { display: flex; gap: 3px; font-size: 10.5px; color: var(--text-3); margin-top: 5px; }
.bar-labels span { flex: 1; text-align: center; overflow: hidden; }
.hbar { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; align-items: center; font-size: 14.5px; padding: 6px 0; }
.hbar .track { grid-column: span 2; height: 7px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--amber); border-radius: 4px; }

.chat { display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 88%; padding: 11px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; overflow-wrap: anywhere; }
.msg.user { align-self: flex-end; background: var(--amber); color: var(--amber-ink); border-bottom-right-radius: 6px; font-weight: 560; }
.msg.assistant { align-self: flex-start; background: var(--surface); border-bottom-left-radius: 6px; }
.msg.assistant table { border-collapse: collapse; font-size: 13.5px; margin: 6px 0; display: block; overflow-x: auto; }
.msg.assistant td, .msg.assistant th { border: 1px solid var(--line); padding: 4px 7px; text-align: left; }
.msg.assistant p { margin: 0 0 8px; } .msg.assistant p:last-child { margin: 0; }
.msg.assistant ul, .msg.assistant ol { margin: 4px 0 8px; padding-left: 20px; }
.msg.typing { color: var(--text-3); }
.chat-input { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 36; padding: 10px 12px; background: linear-gradient(rgba(11, 11, 12, 0), var(--bg) 30%); display: flex; gap: 8px; }
.chat-input textarea { flex: 1; min-height: 50px; max-height: 140px; resize: none; padding: 13px 15px; border-radius: 16px; background: var(--surface-2); border: 1px solid var(--line); outline: none; font-size: 16px; }
.chat-input textarea:focus { border-color: var(--amber); }
.prompts { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- mapa ---------- */
.map-view { position: fixed; left: 0; right: 0; top: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 1; }
.leaflet-container { background: #0e0f11; font-family: inherit; }
.leaflet-control-attribution { background: rgba(11, 11, 12, 0.7) !important; color: var(--text-3) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--text-2) !important; }
.leaflet-bar a { background: var(--surface-2) !important; color: var(--text) !important; border-color: var(--line) !important; }
.leaflet-popup-content-wrapper, .leaflet-popup-tip { background: var(--surface-2); color: var(--text); box-shadow: var(--shadow); }
.leaflet-popup-content { margin: 12px 14px; font-size: 14px; }
.pin { width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center; box-shadow: 0 6px 12px -4px rgba(0, 0, 0, 0.7); border: 2px solid rgba(0, 0, 0, 0.35); }
.pin b { transform: rotate(45deg); font-size: 14px; font-weight: 800; color: #111; }
.pin.store { background: #fff; }
.me-dot { width: 18px; height: 18px; border-radius: 50%; background: var(--blue); border: 3px solid #fff; box-shadow: 0 0 0 6px rgba(108, 182, 255, 0.25); }
.map-overlay { position: fixed; left: 12px; right: 12px; z-index: 20; }

.code-big { font-size: 46px; font-weight: 800; letter-spacing: 0.18em; text-align: center; color: var(--amber); padding: 6px 0; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; font-size: 15px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.timeline li { display: flex; gap: 10px; padding: 6px 0; color: var(--text-2); }
.timeline li b { color: var(--text); font-weight: 650; min-width: 48px; }

.notice { display: flex; gap: 10px; align-items: flex-start; background: var(--amber-soft); color: var(--amber-2); border-radius: 14px; padding: 12px 14px; font-size: 14.5px; font-weight: 550; }
.notice.red { background: var(--red-soft); color: #ffb4ab; }
.notice .ico { margin-top: 1px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--surface); border-radius: 14px; width: 100%; border: 0; text-align: left; text-decoration: none; color: inherit; }
.list-item + .list-item { margin-top: 8px; }
.list-item .av { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; font-weight: 760; color: var(--amber); flex: none; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; font-weight: 680; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .grow small { color: var(--text-3); font-size: 13.5px; }

@media (min-width: 720px) {
  .view, .top { max-width: 720px; margin-left: auto; margin-right: auto; width: 100%; }
  .nav { max-width: 720px; margin: 0 auto; border-radius: 20px 20px 0 0; border: 1px solid var(--line); }
  .sheet { max-width: 640px; margin: 0 auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
.dark-tiles { filter: invert(1) hue-rotate(180deg) brightness(0.92) contrast(0.88) saturate(0.55); }
/* Cada mapa en su propio contexto de apilado: así sus capas (z-index 400+) no tapan encabezados ni hojas. */
.leaflet-container { isolation: isolate; }
