/* ═══════════ BOOM LOGISTICS · Sistema de diseño ═══════════
   Azul Boom #0755E8 · negro #111111 · blanco · gris claro. Montserrat (títulos) + Inter (texto).
   Un solo archivo para el panel de empresa, el superadmin, la app del repartidor y el seguimiento. */
:root {
  --brand: #0755E8; --brand-600: #0442B8; --brand-700: #033A9E; --brand-400: #3D7BF0; --brand-100: #DCE7FD; --brand-50: #EEF4FE;
  --ink: #111111; --ink-2: #272A31; --muted: #5B6170; --muted-2: #8A90A0;
  --bg: #F4F6FA; --card: #fff; --line: #E6E8EE; --line-2: #EEF0F4;
  --ok: #12A150; --ok-50: #E7F7EE; --warn: #E08A00; --warn-50: #FFF4E0; --bad: #E5304A; --bad-50: #FDECEF;
  --violet: #7C4DFF; --violet-50: #F1ECFF; --cyan: #0891B2; --cyan-50: #E2F5FA;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Montserrat', 'Inter', system-ui, sans-serif;
  --r-xl: 24px; --r-lg: 18px; --r-md: 14px; --r-sm: 12px;
  --shadow: 0 1px 2px rgba(17, 17, 17, .04), 0 8px 24px -12px rgba(17, 17, 17, .12);
  --shadow-lg: 0 24px 60px -20px rgba(17, 17, 17, .35);
  --shadow-brand: 0 12px 26px -12px rgba(7, 85, 232, .65);
  --ease: cubic-bezier(.2, .8, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 14px/1.5 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 800; letter-spacing: -.01em; margin: 0; line-height: 1.2; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 16px; } h4 { font-size: 14px; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 10px; } .row.wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── Botones ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border-radius: var(--r-sm); border: 1px solid transparent; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  background: var(--card); color: var(--ink); transition: background .15s, box-shadow .2s, transform .1s, opacity .2s; position: relative; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; pointer-events: none; }
.btn--primary { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.btn--primary:hover { background: var(--brand-600); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--ink-2); }
.btn--ghost { background: transparent; border-color: var(--line); }
.btn--ghost:hover { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-600); }
.btn--soft { background: var(--brand-50); color: var(--brand-600); }
.btn--soft:hover { background: var(--brand-100); }
.btn--ok { background: var(--ok); color: #fff; }
.btn--danger { background: var(--bad-50); color: var(--bad); }
.btn--danger:hover { background: #FAD5DB; }
.btn--sm { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn--lg { min-height: 48px; padding: 0 22px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--icon { width: 40px; padding: 0; }
.btn--icon.btn--sm { width: 32px; }
.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after { content: ''; position: absolute; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn--ghost.is-loading::after, .btn--soft.is-loading::after, .btn:not([class*="--"]).is-loading::after { border-color: var(--brand-100); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Formularios ── */
.field { display: block; }
.field > span { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
.field > span em { font-style: normal; color: var(--muted-2); font-weight: 500; }
.input, .select, .textarea {
  width: 100%; min-height: 42px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: #fff;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.textarea { min-height: 76px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-50); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; padding: 10px 0; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: #D5D9E2; position: relative; flex: none; cursor: pointer; transition: background .2s; margin: 0; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }
.switch b { display: block; font-weight: 600; } .switch small { display: block; color: var(--muted); font-size: 12.5px; }
.form-error { background: var(--bad-50); color: var(--bad); padding: 10px 12px; border-radius: var(--r-sm); font-weight: 500; font-size: 13px; }

/* ── Tarjetas, chips, tablas ── */
.card { background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow); border: 1px solid var(--line-2); }
.card__head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card__head h3 { flex: 1; }
.card__body { padding: 16px 18px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.chip::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.chip--plain::before { display: none; }
.st-pendiente { background: var(--warn-50); color: #A86400; }
.st-asignado { background: var(--violet-50); color: var(--violet); }
.st-aceptado { background: var(--brand-50); color: var(--brand-600); }
.st-yendo_retiro { background: var(--cyan-50); color: var(--cyan); }
.st-retirado { background: var(--cyan-50); color: #066A82; }
.st-en_camino { background: var(--brand); color: #fff; }
.st-entregado { background: var(--ok-50); color: var(--ok); }
.st-fallido { background: var(--bad-50); color: var(--bad); }
.st-cancelado { background: var(--line-2); color: var(--muted); }
.st-activa { background: var(--ok-50); color: var(--ok); }
.st-suspendida { background: var(--bad-50); color: var(--bad); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-weight: 600; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #FAFBFC; }
.table td:first-child { white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--brand-50); }
.table td.r, .table th.r { text-align: right; }
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty img { width: 110px; display: block; margin: 0 auto 12px; filter: drop-shadow(0 12px 18px rgba(7, 85, 232, .18)); }
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-50); color: var(--brand-600); font-weight: 700; font-size: 13px; flex: none; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; background: var(--muted-2); }
.dot--ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-50); } .dot--busy { background: var(--brand); box-shadow: 0 0 0 3px var(--brand-50); } .dot--off { background: #C3C8D2; }

/* ── Toast y modal ── */
.toasts { position: fixed; z-index: 1000; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-md); box-shadow: var(--shadow-lg); font-weight: 500; max-width: 360px; display: flex; gap: 10px; align-items: center; animation: toastIn .35s var(--ease); }
.toast--error { background: var(--bad); } .toast--ok { background: var(--ok); } .toast--warn { background: #B86E00; } .toast--info { background: var(--brand); }
@keyframes toastIn { from { opacity: 0; transform: translateY(10px) scale(.98); } }
.modal-bg { position: fixed; inset: 0; z-index: 900; background: rgba(17, 17, 17, .45); backdrop-filter: blur(2px); display: grid; place-items: center; padding: 16px; animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: #fff; border-radius: var(--r-xl); box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; max-height: calc(100dvh - 32px); display: flex; flex-direction: column; animation: pop .3s var(--ease); }
.modal--wide { max-width: 860px; }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } }
.modal__head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 12px; }
.modal__head h2 { flex: 1; font-size: 18px; }
.modal__body { padding: 4px 20px 16px; overflow-y: auto; }
.modal__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line-2); }
@media (max-width: 640px) { .modal-bg { place-items: end stretch; padding: 0; } .modal { max-width: none; border-radius: var(--r-xl) var(--r-xl) 0 0; max-height: 92dvh; } }

/* ── Panel: estructura con menú lateral ── */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: #fff; padding: 20px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.side__brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.side__brand { justify-content: center; }
.side__brand img { height: 92px; }
.side__tenant { margin: 0 4px 14px; padding: 10px 12px; border-radius: var(--r-md); background: rgba(255, 255, 255, .06); display: flex; align-items: center; gap: 10px; }
.side__tenant img { width: 32px; height: 32px; border-radius: 8px; object-fit: cover; background: #fff; }
.side__tenant b { display: block; font-size: 13.5px; } .side__tenant small { color: rgba(255, 255, 255, .55); font-size: 12px; }
.nav { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); color: rgba(255, 255, 255, .72); font-weight: 500; cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.nav:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav.is-active { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.nav .badge { margin-left: auto; background: #fff; color: var(--brand); border-radius: 99px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.nav.is-active .badge { background: rgba(255, 255, 255, .22); color: #fff; }
.side__foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.side__user { display: flex; align-items: center; gap: 10px; padding: 8px; }
.side__user .avatar { background: rgba(255, 255, 255, .1); color: #fff; }
.side__user b { font-size: 13px; display: block; } .side__user small { color: rgba(255, 255, 255, .5); font-size: 12px; }
.main { min-width: 0; padding: 22px 28px 40px; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.topbar h1 { flex: 1; font-size: 24px; }
.topbar .sub { color: var(--muted); font-size: 13px; font-weight: 500; display: block; font-family: var(--font); letter-spacing: 0; margin-top: 2px; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--ok); background: var(--ok-50); padding: 4px 10px; border-radius: 99px; }
.live::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
.live.is-off { color: var(--muted); background: var(--line-2); } .live.is-off::before { animation: none; }
@keyframes pulse { 50% { opacity: .3; } }
.menu-btn { display: none; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 800; left: 0; top: 0; width: 270px; transform: translateX(-105%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg); }
  .side.is-open { transform: none; }
  .menu-btn { display: inline-flex; }
  .main { padding: 16px 14px 32px; }
}

/* ── KPIs ── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border-radius: var(--r-lg); padding: 14px 16px; border: 1px solid var(--line-2); box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi small { display: block; color: var(--muted); font-weight: 600; font-size: 12px; }
.kpi b { display: block; font: 800 26px/1.15 var(--font-display); margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi i { position: absolute; right: 12px; top: 12px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.kpi--brand { background: var(--brand); color: #fff; border-color: var(--brand); box-shadow: var(--shadow-brand); }
.kpi--brand small { color: rgba(255, 255, 255, .8); } .kpi--brand i { background: rgba(255, 255, 255, .16); color: #fff; }
.cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }

.tabs { display: flex; gap: 4px; background: #fff; padding: 4px; border-radius: var(--r-md); border: 1px solid var(--line); overflow-x: auto; }
.tab { border: 0; background: none; padding: 7px 12px; border-radius: 10px; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab.is-active { background: var(--brand-50); color: var(--brand-600); }
.tab .n { font-size: 11px; background: var(--line-2); border-radius: 99px; padding: 0 6px; margin-left: 4px; }
.tab.is-active .n { background: var(--brand-100); }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search .ic { position: absolute; left: 12px; top: 12px; color: var(--muted-2); }
.search .input { padding-left: 36px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 13px; }
.timeline li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--brand); }
.timeline li::after { content: ''; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline time { color: var(--muted); font-size: 12px; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 13.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.map { width: 100%; height: 360px; border-radius: var(--r-lg); overflow: hidden; background: var(--brand-50); z-index: 0; }
.map--tall { height: calc(100vh - 150px); min-height: 420px; }
.map--pick { height: 260px; border-radius: var(--r-md); }
.leaflet-container { font-family: var(--font); }
.pin { width: 30px; height: 30px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--brand); border: 3px solid #fff; box-shadow: 0 6px 14px -4px rgba(7, 85, 232, .7); }
.pin--dest { background: var(--ink); } .pin--store { background: #fff; border-color: var(--brand); }
.pin--pendiente { background: var(--warn); }
.moto { width: 38px; height: 38px; border-radius: 50%; background: var(--brand); border: 3px solid #fff; display: grid; place-items: center; box-shadow: 0 8px 18px -6px rgba(7, 85, 232, .8); color: #fff; }
.moto--off { background: #8A90A0; box-shadow: none; }
.moto--stale { background: #B9BFCB; }
.moto .ic { width: 18px; height: 18px; }
.map-label { background: var(--ink); color: #fff; border: 0; border-radius: 8px; font-weight: 600; font-size: 12px; padding: 3px 8px; box-shadow: none; }
.map-label::before { display: none; }
.geo-results { border: 1px solid var(--line); border-radius: var(--r-sm); margin-top: 6px; max-height: 180px; overflow-y: auto; background: #fff; }
.geo-results button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 9px 12px; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.geo-results button:hover { background: var(--brand-50); }

/* ── Login / registro ── */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.auth__art { background: var(--brand); color: #fff; padding: 40px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth__art::before { content: ''; position: absolute; width: 620px; height: 620px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .16), transparent 65%); right: -200px; top: -160px; }
.auth__art .logo-chip { background: #fff; border-radius: 18px; padding: 10px 16px; display: inline-flex; align-self: flex-start; position: relative; }
.auth__art .logo-chip img { height: 64px; display: block; }
.auth__art h1 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.1; max-width: 520px; position: relative; }
.auth__art p { color: rgba(255, 255, 255, .85); max-width: 460px; font-size: 15px; position: relative; }
.auth__mascot { width: min(380px, 70%); align-self: center; filter: drop-shadow(0 30px 40px rgba(0, 0, 0, .28)); animation: float 5s ease-in-out infinite; position: relative; }
@keyframes float { 50% { transform: translateY(-12px); } }
.auth__feats { display: flex; gap: 18px; flex-wrap: wrap; position: relative; font-weight: 600; font-size: 13px; }
.auth__feats span { display: inline-flex; align-items: center; gap: 6px; }
.auth__form { display: grid; place-items: center; padding: 32px 20px; background: #fff; }
.auth__box { width: 100%; max-width: 400px; }
.auth__box h2 { font-size: 26px; margin-bottom: 4px; }
.auth__switch { margin-top: 18px; text-align: center; color: var(--muted); }
.auth__switch button { border: 0; background: none; color: var(--brand); font-weight: 700; cursor: pointer; padding: 0; }
.auth__mobile-logo { display: none; }
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth__art { display: none; }
  .auth__mobile-logo { display: block; height: 72px; margin: 0 auto 18px; }
  .auth__form { align-items: start; padding-top: 48px; }
}
.notice { display: flex; gap: 12px; align-items: flex-start; background: var(--brand-50); border: 1px solid var(--brand-100); padding: 12px 14px; border-radius: var(--r-md); color: var(--brand-700); font-size: 13.5px; }
.notice--warn { background: var(--warn-50); border-color: #FFE0A8; color: #8A5200; }
.notice--ok { background: var(--ok-50); border-color: #BDE8CF; color: #0B6E36; }

/* ═══════════ APP DEL REPARTIDOR (una mano, botones grandes, abajo) ═══════════ */
body.rd-body { background: var(--bg); overscroll-behavior-y: contain; }
.rd { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.rd-top { position: sticky; top: 0; z-index: 30; background: var(--brand); color: #fff; padding: calc(12px + env(safe-area-inset-top)) 16px 16px; border-radius: 0 0 26px 26px; box-shadow: 0 12px 28px -16px rgba(7, 85, 232, .8); }
.rd-top__row { display: flex; align-items: center; gap: 12px; }
.rd-top__logo { height: 40px; background: #fff; border-radius: 12px; padding: 4px 8px; }
.rd-top__hi { flex: 1; min-width: 0; }
.rd-top__hi small { display: block; color: rgba(255, 255, 255, .8); font-size: 12.5px; }
.rd-top__hi b { display: block; font: 800 18px/1.2 var(--font-display); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rd-bell { position: relative; width: 44px; height: 44px; border-radius: 14px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; cursor: pointer; }
.rd-bell .ic { width: 22px; height: 22px; }
.rd-bell i { position: absolute; top: 6px; right: 6px; min-width: 18px; height: 18px; border-radius: 99px; background: #fff; color: var(--brand); font: 700 11px/18px var(--font); font-style: normal; text-align: center; padding: 0 4px; }
.rd-avail { margin-top: 14px; display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, .12); border-radius: 18px; padding: 10px 12px 10px 14px; cursor: pointer; border: 0; color: #fff; width: 100%; text-align: left; }
.rd-avail b { display: block; font-size: 15px; } .rd-avail small { display: block; font-size: 12px; color: rgba(255, 255, 255, .8); }
.rd-avail .knob { margin-left: auto; width: 58px; height: 34px; border-radius: 99px; background: rgba(0, 0, 0, .25); position: relative; flex: none; transition: background .2s; }
.rd-avail .knob::after { content: ''; position: absolute; top: 4px; left: 4px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.rd-avail.is-on .knob { background: var(--ok); } .rd-avail.is-on .knob::after { transform: translateX(24px); }
.rd-main { flex: 1; padding: 16px 14px calc(96px + env(safe-area-inset-bottom)); }
.rd-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.rd-sum div { background: #fff; border-radius: var(--r-lg); padding: 12px; box-shadow: var(--shadow); text-align: center; }
.rd-sum b { display: block; font: 800 22px/1.1 var(--font-display); } .rd-sum small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.rd-sec { display: flex; align-items: center; justify-content: space-between; margin: 18px 4px 10px; }
.rd-sec h3 { font-size: 15px; }
.rd-card { background: #fff; border-radius: var(--r-xl); box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; border: 2px solid transparent; cursor: pointer; transition: transform .15s; display: block; width: 100%; text-align: left; }
.rd-card:active { transform: scale(.99); }
.rd-card--new { border-color: var(--violet); box-shadow: 0 14px 30px -18px rgba(124, 77, 255, .9); }
.rd-card__top { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.rd-card__code { font-weight: 700; font-size: 13px; color: var(--muted); }
.rd-card__name { font: 800 17px/1.25 var(--font-display); }
.rd-card__addr { display: flex; gap: 8px; color: var(--ink-2); margin-top: 6px; font-size: 14px; }
.rd-card__addr .ic { color: var(--brand); margin-top: 2px; }
.rd-card__meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.rd-card__actions { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 14px; }
.rd-btn { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 18px; border-radius: 16px; border: 0; font: 700 15px/1.1 var(--font); cursor: pointer; text-decoration: none; position: relative; -webkit-tap-highlight-color: transparent; transition: transform .12s; }
.rd-btn:active { transform: scale(.97); }
.rd-btn:disabled { opacity: .5; pointer-events: none; }
.rd-btn .ic { width: 22px; height: 22px; }
.rd-btn--xl { min-height: 62px; font-size: 17px; border-radius: 18px; width: 100%; }
.rd-btn--brand { background: var(--brand); color: #fff; box-shadow: var(--shadow-brand); }
.rd-btn--ok { background: var(--ok); color: #fff; box-shadow: 0 14px 28px -14px rgba(18, 161, 80, .8); }
.rd-btn--dark { background: var(--ink); color: #fff; }
.rd-btn--soft { background: var(--brand-50); color: var(--brand-600); }
.rd-btn--white { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.rd-btn--bad { background: var(--bad-50); color: var(--bad); }
.rd-btn.is-loading { color: transparent !important; }
.rd-btn.is-loading::after { content: ''; position: absolute; width: 24px; height: 24px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .5); border-top-color: #fff; animation: spin .7s linear infinite; }
.rd-btn--soft.is-loading::after, .rd-btn--white.is-loading::after, .rd-btn--bad.is-loading::after { border-color: var(--line); border-top-color: var(--brand); }
.rd-nav { position: fixed; z-index: 40; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 560px; background: #fff; display: grid; grid-template-columns: repeat(4, 1fr); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 30px -18px rgba(17, 17, 17, .35); }
.rd-nav button { border: 0; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 0; font-size: 11.5px; font-weight: 600; color: var(--muted-2); cursor: pointer; border-radius: 14px; position: relative; }
.rd-nav button .ic { width: 24px; height: 24px; }
.rd-nav button.is-active { color: var(--brand); background: var(--brand-50); }
.rd-nav button i { position: absolute; top: 4px; right: calc(50% - 22px); min-width: 16px; height: 16px; border-radius: 99px; background: var(--bad); color: #fff; font: 700 10px/16px var(--font); font-style: normal; padding: 0 4px; }
.rd-detail { padding-bottom: 170px; }
.rd-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.rd-back { width: 44px; height: 44px; border-radius: 14px; border: 0; background: #fff; box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; }
.rd-steps { display: flex; gap: 4px; margin: 4px 0 16px; }
.rd-steps span { flex: 1; height: 6px; border-radius: 99px; background: var(--line); }
.rd-steps span.on { background: var(--brand); }
.rd-block { background: #fff; border-radius: var(--r-xl); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.rd-block h4 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 8px; font-family: var(--font); font-weight: 700; }
.rd-place { display: flex; gap: 12px; align-items: flex-start; }
.rd-place__ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--brand-50); color: var(--brand); }
.rd-place__ic--dest { background: var(--ink); color: #fff; }
.rd-place b { display: block; font-size: 15px; } .rd-place p { margin: 2px 0 0; color: var(--ink-2); }
.rd-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.rd-quick a, .rd-quick button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border-radius: 14px; background: var(--brand-50); color: var(--brand-600); font-weight: 700; font-size: 12px; border: 0; cursor: pointer; text-decoration: none; }
.rd-quick .ic { width: 22px; height: 22px; }
.rd-money { display: flex; align-items: center; gap: 12px; background: var(--warn-50); color: #7A4A00; border-radius: var(--r-lg); padding: 12px 14px; font-weight: 600; }
.rd-money b { font: 800 20px/1 var(--font-display); margin-left: auto; color: #5C3700; }
.rd-dock { position: fixed; z-index: 45; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 560px; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--bg) 70%, transparent); display: grid; gap: 8px; }
.rd-dock .two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rd-empty { text-align: center; padding: 28px 16px 8px; }
.rd-empty img { width: 150px; filter: drop-shadow(0 18px 24px rgba(7, 85, 232, .2)); animation: float 5s ease-in-out infinite; }
.rd-empty b { display: block; font: 800 18px/1.3 var(--font-display); margin-top: 8px; }
.rd-empty p { color: var(--muted); margin: 6px 0 0; }
.rd-reasons { display: grid; gap: 8px; }
.rd-reasons label { display: flex; align-items: center; gap: 12px; padding: 14px; border: 2px solid var(--line); border-radius: 16px; cursor: pointer; font-weight: 600; }
.rd-reasons input { width: 20px; height: 20px; accent-color: var(--bad); }
.rd-reasons label:has(input:checked) { border-color: var(--bad); background: var(--bad-50); }
.rd-photo { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 120px; border: 2px dashed var(--brand-100); border-radius: 18px; background: var(--brand-50); color: var(--brand-600); font-weight: 700; cursor: pointer; overflow: hidden; position: relative; }
.rd-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.rd-photo input { display: none; }
.rd-hist { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.rd-hist:last-child { border-bottom: 0; }
.rd-hist__ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.rd-hist__ic.ok { background: var(--ok-50); color: var(--ok); } .rd-hist__ic.bad { background: var(--bad-50); color: var(--bad); }
.rd-notif { display: flex; gap: 12px; padding: 12px; border-radius: 16px; background: #fff; margin-bottom: 8px; box-shadow: var(--shadow); }
.rd-notif.unread { border-left: 4px solid var(--brand); }
.rd-banner { display: flex; gap: 10px; align-items: center; background: var(--warn-50); color: #7A4A00; padding: 10px 12px; border-radius: 14px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.rd-banner button { margin-left: auto; }
.rd-login { min-height: 100dvh; background: var(--brand); color: #fff; display: flex; flex-direction: column; padding: calc(28px + env(safe-area-inset-top)) 22px 28px; }
.rd-login .chip-logo { background: #fff; border-radius: 18px; padding: 8px 14px; align-self: center; }
.rd-login .chip-logo img { height: 58px; display: block; }
.rd-login__mascot { width: 200px; align-self: center; margin: 18px 0 6px; filter: drop-shadow(0 22px 28px rgba(0, 0, 0, .3)); animation: float 5s ease-in-out infinite; }
.rd-login h1 { text-align: center; font-size: 24px; }
.rd-login p { text-align: center; color: rgba(255, 255, 255, .85); margin: 6px 0 20px; }
.rd-login .card { padding: 18px; color: var(--ink); border-radius: 24px; }

/* ═══════════ Seguimiento público ═══════════ */
.tk { max-width: 560px; margin: 0 auto; min-height: 100dvh; display: flex; flex-direction: column; }
.tk-top { background: var(--brand); color: #fff; padding: calc(16px + env(safe-area-inset-top)) 18px 22px; border-radius: 0 0 26px 26px; }
.tk-top .row img { height: 36px; background: #fff; border-radius: 10px; padding: 3px 6px; }
.tk-status { margin-top: 16px; }
.tk-status small { color: rgba(255, 255, 255, .8); font-weight: 600; }
.tk-status h1 { font-size: 26px; color: #fff; }
.tk-map { height: 300px; margin: -12px 14px 0; border-radius: 22px; overflow: hidden; box-shadow: var(--shadow); position: relative; z-index: 1; }
.tk-body { padding: 16px 14px 28px; }
.tk-steps { list-style: none; padding: 0; margin: 0; }
.tk-steps li { display: flex; gap: 12px; align-items: center; padding: 10px 0; color: var(--muted-2); font-weight: 600; }
.tk-steps li i { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); flex: none; }
.tk-steps li.done { color: var(--ink); } .tk-steps li.done i { background: var(--brand); color: #fff; }
.tk-steps li.now i { box-shadow: 0 0 0 6px var(--brand-100); }
.tk-steps time { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 500; }
.tk-foot { text-align: center; color: var(--muted); font-size: 12px; padding: 12px; }
.tk-foot img { height: 26px; vertical-align: middle; }
