/* RBGROUP Traslados — mismo sistema visual que app.rbgroup-flota.com */
:root {
  color-scheme: light;
  --ink: #20232d; --muted: #6e7482; --soft: #979daa; --line: #e2e5ec; --line-strong: #dce0e8;
  --surface: #fff; --bg: #f4f5f8; --hover: #f6f7fa; --label: #555d6c;
  /* Acento de esta app (equivale a --brand de la app de liquidación) */
  --brand: #2f5bd3; --brand-soft: #eef2fc; --brand-dark: #2347a8;
  --green: #166445; --green-soft: #edf8f2;
  --red: #b03442; --red-soft: #fff1f2;
  --amber: #8a4b00; --amber-soft: #fff6e8;
  --wa: #25d366; --wa-hover: #20c562; --wa-ink: #073b21;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; scrollbar-gutter: stable both-edges; }
body {
  margin: 0; min-height: 100vh; min-height: 100svh;
  padding: 16px 20px; padding-top: max(16px, env(safe-area-inset-top)); padding-bottom: max(24px, env(safe-area-inset-bottom));
  display: flex; flex-direction: column; align-items: center;
  background: var(--bg); color: var(--ink);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
body.menu-open, body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; touch-action: manipulation; }
button:disabled { cursor: default; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 4px; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }

/* ---------- Shell */
.app-shell { width: 100%; max-width: 960px; min-width: 0; }
.app-header { display: grid; grid-template-columns: 110px minmax(0, 1fr) 110px; align-items: center; gap: 8px; margin-bottom: 16px; }
.brand { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.brand-name { font-weight: 730; letter-spacing: -.035em; line-height: 1.2; }
.brand strong { font-size: 27px; }
.brand-sub { font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); margin-top: 1px; }
.header-actions { justify-self: end; }
.icon-button { width: 44px; height: 44px; padding: 0; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line); border-radius: 12px; color: var(--ink); }
.icon-button:hover { background: var(--hover); }
.text-button { display: inline-flex; justify-content: center; align-items: center; gap: 6px; min-height: 44px; background: transparent; border: 0; color: var(--muted); border-radius: 8px; padding: 8px 0; font-size: 12px; font-weight: 600; white-space: nowrap; }
.text-button:hover { color: var(--ink); }
.text-button .icon { width: 16px; height: 16px; }
.app-footer { text-align: center; font-size: 10px; color: #8a919e; margin: 18px 0 0; }

/* ---------- Layout */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 320px); gap: 16px; align-items: start; }
.column { display: grid; gap: 12px; min-width: 0; }
.sticky { position: sticky; top: 16px; }
.panel { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface); min-width: 0; }
.panel.flush { padding: 0; overflow: hidden; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading h2 { font-size: 15px; font-weight: 700; letter-spacing: -.015em; }
.section-heading > span { color: var(--soft); font-size: 10px; font-weight: 600; letter-spacing: .08em; }
.divider { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.stack { display: grid; gap: 8px; }
.row { display: flex; align-items: center; gap: 8px; }
.grow { flex: 1; min-width: 0; }

/* ---------- Forms */
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-group { min-width: 0; }
.field-full { grid-column: 1 / -1; }
label, .field-label { display: block; margin-bottom: 5px; color: var(--label); font-size: 12px; font-weight: 600; }
.input {
  width: 100%; min-width: 0; min-height: 48px; padding: 11px 13px; color: var(--ink); background: #fff;
  border: 1px solid var(--line-strong); border-radius: 10px; font-size: 16px; line-height: 24px;
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { min-height: 88px; resize: vertical; display: block; }
.input::placeholder { color: #9aa0ac; opacity: 1; }
.input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
select.input { appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23757d8b' stroke-width='1.6'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
input[type="time"].input { appearance: none; text-align: left; }
.input-wrap { position: relative; }
.input-prefix { position: absolute; left: 13px; top: 12px; color: #969daa; font-size: 16px; pointer-events: none; }
.input-wrap .input { padding-left: 30px; font-variant-numeric: tabular-nums; }
.field-note { color: var(--muted); margin: 8px 0 0; font-size: 11px; }
.field-note.warn { color: var(--amber); }
.field-note.error { color: var(--red); }
.field-note.ok { color: var(--green); font-weight: 600; }
.field-note a { text-decoration: underline; }

.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 0 0; min-height: 44px; }
.toggle-copy label { color: var(--ink); font-size: 13px; margin: 0; cursor: pointer; }
.toggle-copy p { margin: 3px 0 0; font-size: 11px; color: var(--muted); }
.switch { position: relative; width: 44px; height: 26px; flex: 0 0 44px; margin: 0; }
.switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.slider { position: absolute; inset: 0; background: #d3d7e0; border-radius: 20px; pointer-events: none; transition: background .15s; }
.slider::before { content: ""; position: absolute; width: 20px; height: 20px; left: 3px; top: 3px; background: white; border-radius: 50%; box-shadow: 0 1px 3px #20232d22; transition: transform .15s; }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch input:focus-visible + .slider { outline: 3px solid var(--brand); outline-offset: 4px; }

/* Fecha con flechas (igual que la app de liquidación) */
.fecha-wrapper { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; gap: 8px; }
.fecha-arrow { height: 48px; width: 44px; border: 1px solid var(--line-strong); border-radius: 10px; display: grid; place-items: center; background: white; }
.fecha-arrow:hover { background: var(--hover); }
.fecha-box { min-width: 0; position: relative; display: flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line-strong); border-radius: 10px; min-height: 48px; background: #fff; }
.fecha-box .icon { width: 16px; height: 16px; color: #8a91a0; }
.fecha-box input { position: absolute; inset: 0; padding: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; border: 0; }
.fecha-box input::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.fecha-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.fecha-box span { font-size: 13px; font-weight: 600; white-space: nowrap; pointer-events: none; }
.fecha-box span.is-placeholder { color: #9aa0ac; font-weight: 500; }

/* Ubicaciones */
.loc-line { display: flex; gap: 8px; align-items: center; }
.loc-line .input { flex: 1; }
.loc-marker { width: 10px; height: 10px; flex: 0 0 10px; border-radius: 50%; border: 2px solid var(--ink); background: #fff; }
.loc-marker.dest { background: var(--ink); border-radius: 2px; }
.loc-results { display: grid; gap: 6px; margin-top: 8px; }
.loc-results:empty { display: none; }
.loc-results button { text-align: left; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; }
.loc-results button:hover { border-color: var(--brand); background: #fbfcff; }
.loc-results .icon { width: 16px; height: 16px; color: var(--soft); margin-top: 2px; }
.loc-gap { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 4px 4px; }
.loc-gap::before { content: ""; width: 1px; height: 20px; background: var(--line-strong); }

/* Pestañas segmentadas (como #platform-tabs) */
.tabs { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 4px; padding: 4px; background: var(--bg); border-radius: 12px; }
.tab-btn { min-height: 40px; display: flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 9px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 650; padding: 0 6px; }
.tab-btn[aria-pressed="true"] { color: var(--brand); background: white; border-color: #e3e7f1; box-shadow: 0 2px 4px #20232d05; }

/* ---------- Buttons */
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink); font-size: 13px; font-weight: 650; white-space: nowrap; transition: background .15s, border-color .15s, color .15s; }
.btn:hover:not(:disabled) { background: var(--hover); border-color: #cdd2dc; }
.btn:disabled { opacity: .6; cursor: wait; }
.btn .icon { width: 18px; height: 18px; }
.btn.block { width: 100%; }
.btn.lg { min-height: 50px; }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover:not(:disabled) { background: #2d313d; border-color: #2d313d; }
.btn.wa { background: var(--wa); border-color: var(--wa); color: var(--wa-ink); }
.btn.wa:hover:not(:disabled) { background: var(--wa-hover); border-color: var(--wa-hover); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn.quiet:hover:not(:disabled) { color: var(--ink); background: var(--hover); border-color: transparent; }
.btn.danger { color: var(--red); }
.btn.sm { min-height: 38px; padding: 6px 12px; font-size: 12px; }
.btn.sm .icon { width: 16px; height: 16px; }
.btn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.action-group { display: flex; align-items: stretch; gap: 8px; }
.action-group > :first-child { flex: 1; min-width: 0; }
.square { flex: 0 0 50px; width: 50px; padding: 0; color: var(--muted); }

/* ---------- Tags (sólo para lo que importa) */
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 600; background: #f0f2f6; color: var(--muted); white-space: nowrap; }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.brand { background: var(--brand-soft); color: var(--brand); }

/* ---------- Agenda */
.search { position: relative; }
.search .icon { position: absolute; left: 13px; top: 14px; width: 18px; height: 18px; color: #8a91a0; pointer-events: none; }
.search .input { padding-left: 40px; }
.filter-list { display: grid; gap: 2px; margin: 0 -6px; }
.filter-item { width: 100%; min-height: 42px; padding: 9px 10px; border: 0; border-radius: 10px; display: flex; align-items: center; gap: 10px; background: transparent; font-size: 13px; text-align: left; }
.filter-item:hover { background: var(--bg); }
.filter-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.filter-item .count { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 650; color: var(--muted); }
.filter-item.active .count { color: var(--brand); }
.filter-item .count.alert { color: var(--red); }
.filter-select { display: none; }

.next-trip { display: grid; gap: 2px; padding: 14px; border-radius: 12px; background: var(--hover); border: 1px solid var(--line); }
.next-trip .when { font-size: 22px; font-weight: 750; letter-spacing: -.035em; font-variant-numeric: tabular-nums; margin-top: 4px; }
.next-trip .route { font-size: 13px; font-weight: 600; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eyebrow { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }

.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 18px 12px; border-bottom: 1px solid var(--line); }
.day-head h2 { font-size: 15px; font-weight: 700; letter-spacing: -.015em; }
.day-head h2 .date { color: var(--muted); font-weight: 500; margin-left: 6px; font-size: 13px; letter-spacing: 0; }
.day-head > span { color: var(--soft); font-size: 10px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.trip-row { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 14px 18px; border-top: 1px solid var(--line); transition: background .15s; }
.day-head + .trip-row { border-top: 0; }
.trip-row:hover { background: #fafbfc; }
.trip-row .time { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.trip-row .time small { display: block; font-size: 10px; font-weight: 600; color: var(--soft); letter-spacing: .04em; }
.trip-row .route { font-size: 14px; font-weight: 650; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-row .route .arrow { color: var(--soft); font-weight: 400; margin: 0 5px; }
.trip-row .meta { margin-top: 2px; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trip-row .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.trip-row .tags:empty { display: none; }
.trip-row .side { display: flex; align-items: center; gap: 6px; }
.trip-row .price { font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums; }
.trip-row .side .icon { color: #9298a5; width: 16px; height: 16px; }
.trip-row.is-cancelled .route, .trip-row.is-cancelled .time { color: var(--soft); text-decoration: line-through; }

.empty { padding: 40px 20px; text-align: center; color: var(--muted); display: grid; justify-items: center; gap: 4px; font-size: 13px; }
.empty .icon { width: 26px; height: 26px; color: #9aa0ac; margin-bottom: 6px; }
.empty strong { color: var(--ink); font-size: 15px; }
.empty .btn { margin-top: 12px; }

/* ---------- Detalle */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 600; min-height: 32px; margin-bottom: 8px; }
.back-link:hover { color: var(--ink); }
.back-link .icon { width: 16px; height: 16px; }
.trip-when { font-size: clamp(24px, 6vw, 30px); font-weight: 750; letter-spacing: -.035em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.trip-when-sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.trip-head-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.stop { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 12px; }
.stop-rail { display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.stop-rail .line { flex: 1; width: 1px; background: var(--line-strong); margin-top: 6px; }
.stop .k { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.stop .v { font-size: 15px; font-weight: 650; letter-spacing: -.015em; margin-top: 2px; overflow-wrap: anywhere; }
.stop .extra { font-size: 12px; color: var(--muted); margin-top: 2px; }
.stop .nav-btns { display: flex; gap: 8px; margin: 10px 0 18px; flex-wrap: wrap; }
#map { height: 220px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); margin-bottom: 16px; z-index: 0; }

.data-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 13px; border-top: 1px solid var(--line); }
.data-row:first-child { border-top: 0; padding-top: 0; }
.data-row > span:first-child { color: var(--muted); flex: 0 0 auto; }
.data-row > :last-child { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.data-row .links { display: flex; gap: 12px; justify-content: flex-end; }
.data-row a { color: var(--brand); }
.notes { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: var(--bg); font-size: 13px; white-space: pre-wrap; }

/* Caja de resultado (como #resultado-box) */
.result-box { padding: 14px; border: 1px solid var(--line); background: var(--hover); border-radius: 12px; }
.result-label { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.result-amount { display: block; margin-top: 5px; font-size: clamp(22px, 5vw, 28px); font-weight: 750; letter-spacing: -.035em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.result-rows { margin-top: 10px; padding-top: 6px; border-top: 1px solid var(--line); }
.result-row { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 4px 8px; padding: 5px 0; font-size: 12px; color: var(--muted); }
.result-row span:last-child { font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }

.person { display: flex; align-items: center; gap: 10px; padding: 8px 0; }
.person + .person { border-top: 1px solid var(--line); }
.person .grow strong { display: block; font-size: 13px; font-weight: 650; }
.person .grow span { display: block; font-size: 12px; color: var(--muted); }
.initials { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; display: grid; place-items: center; background: var(--bg); border: 1px solid var(--line); color: var(--label); font-size: 12px; font-weight: 700; }
.initials.vacant { border-style: dashed; color: var(--soft); background: #fff; }

.log { display: grid; gap: 6px; font-size: 12px; color: var(--muted); }
.log div { display: flex; gap: 10px; }
.log time { flex: 0 0 auto; color: var(--soft); font-variant-numeric: tabular-nums; }

.bottom-bar { display: none; }

/* ---------- Lista simple (choferes) */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); }
.section-heading + .list-item { border-top: 0; }
.list-item .grow strong { display: block; font-size: 14px; font-weight: 650; }
.list-item .grow span { display: block; font-size: 12px; color: var(--muted); }
.panel.flush > .section-heading { padding: 16px 18px 4px; margin: 0; }

/* ---------- Drawer (igual a la app de liquidación) */
.drawer-overlay { position: fixed; inset: 0; z-index: 40; background: #161c2a66; }
.drawer { position: fixed; inset: 0 auto 0 0; width: min(320px, 88vw); max-height: 100dvh; z-index: 41; background: white; padding: 24px; padding-top: max(24px, env(safe-area-inset-top)); display: flex; flex-direction: column; overflow-y: auto; box-shadow: 8px 0 40px #151b2a18; }
.drawer-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.drawer-brand { font-size: 21px; }
.drawer-caption { color: var(--muted); font-size: 11px; margin: 24px 0 12px; }
.drawer-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.drawer-item { width: 100%; min-height: 48px; padding: 12px; border: 0; border-radius: 10px; display: flex; align-items: center; gap: 10px; background: transparent; color: inherit; font-size: 13px; text-align: left; }
.drawer-item.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.drawer-item:hover:not(.active) { background: var(--bg); }
.drawer-badge { font-size: 9px; margin-left: auto; background: #f0f2f6; padding: 3px 6px; border-radius: 5px; }
.drawer-footer { margin-top: auto; padding-top: 32px; font-size: 11px; color: var(--muted); }

/* ---------- Modal */
.modal-wrap { position: fixed; inset: 0; z-index: 50; background: #161c2a66; display: flex; align-items: flex-end; justify-content: center; opacity: 0; transition: opacity .15s; }
.modal-wrap.open { opacity: 1; }
.modal { width: 100%; max-width: 440px; max-height: 92dvh; overflow-y: auto; background: #fff; border-radius: 18px 18px 0 0; padding: 20px; padding-bottom: max(20px, env(safe-area-inset-bottom)); box-shadow: 0 16px 56px #20232d1a; transform: translateY(16px); transition: transform .18s; }
.modal-wrap.open .modal { transform: none; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.modal-head h3 { font-size: 16px; font-weight: 700; letter-spacing: -.015em; }
.modal-body { display: grid; gap: 12px; font-size: 13px; }
.modal-actions { display: flex; gap: 8px; margin-top: 18px; }
.modal-actions .btn { flex: 1; }
.pick-list { display: grid; gap: 6px; }
.pick-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; text-align: left; }
.pick-list button:hover { background: var(--hover); }
.pick-list button.active { border-color: var(--brand); background: #fbfcff; }
.pick-list button strong { display: block; font-size: 13px; font-weight: 650; }
.pick-list button .grow > span { display: block; font-size: 12px; color: var(--muted); }
.pick-list .check { margin-left: auto; color: var(--brand); }
.card-preview { display: block; width: 100%; aspect-ratio: 4 / 5; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); }

/* ---------- Toasts */
#toasts { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; display: grid; gap: 8px; width: min(92vw, 380px); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 11px 14px; border-radius: 11px; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px #20232d26; animation: toast-in .18s ease; }
.toast .icon { width: 16px; height: 16px; color: #7fdcaa; }
.toast.error { background: var(--red); }
.toast.error .icon { color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

.skeleton { display: grid; gap: 12px; }
.skeleton div { height: 96px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(90deg, #fff 0%, #f6f7fa 50%, #fff 100%); background-size: 200% 100%; animation: sk 1.2s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }
.leaflet-container { font-family: inherit; }

/* ---------- Responsive */
@media (max-width: 799px) {
  .app-shell { max-width: 560px; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .sticky { position: static; }
  .order-first { order: -1; }
  .filter-list { display: none; }
  .filter-select { display: block; }
  .bottom-bar {
    display: flex; align-items: center; gap: 8px;
    position: sticky; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 20; margin-top: 12px;
    padding: 8px; background: #fffffff2; border: 1px solid var(--line); border-radius: 16px;
    box-shadow: 0 8px 28px #20232d14; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  }
  .bottom-bar .btn { min-height: 46px; }
  .bottom-bar .grow-btn { flex: 1; }
  .bottom-bar .total { flex: 1; padding-left: 8px; line-height: 1.15; min-width: 0; }
  .bottom-bar .total strong { display: block; font-size: 19px; font-weight: 750; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
  .hide-mobile { display: none !important; }
}
@media (min-width: 640px) {
  .modal-wrap { align-items: center; padding: 24px; }
  .modal { border-radius: 18px; }
}
@media (max-width: 480px) {
  body { padding: 12px; padding-top: max(12px, env(safe-area-inset-top)); padding-bottom: max(20px, env(safe-area-inset-bottom)); }
  .app-header { grid-template-columns: 88px minmax(0, 1fr) 88px; margin-bottom: 12px; }
  .brand strong { font-size: 25px; }
  .header-actions .text-button { font-size: 11px; gap: 4px; }
  .panel { padding: 16px; border-radius: 15px; }
  .panel.flush > .section-heading { padding: 14px 16px 4px; }
  .day-head { padding: 12px 16px 10px; }
  .trip-row { padding: 12px 16px; gap: 12px; grid-template-columns: 44px minmax(0, 1fr) auto; }
  .trip-row .time small { font-size: 9px; letter-spacing: 0; white-space: nowrap; }
  .trip-row .route { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
  .trip-row .side .icon { display: none; }
  .list-item { padding: 12px 16px; }
  .field-grid.stack-mobile { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 359px) {
  .app-header { grid-template-columns: 44px minmax(0, 1fr) 44px; }
  .header-actions .label { display: none; }
}
@media (prefers-reduced-motion: reduce) { *, *::before { transition: none !important; animation: none !important; } }
@media (max-width: 799px) { #toasts { bottom: max(84px, calc(env(safe-area-inset-bottom) + 72px)); } }
