/* T.T Ride · demo · tema oscuro con acento dorado del logo */
:root {
  --bg: #0B0B0C; --panel: #151517; --panel2: #1D1D20; --panel3: #26262A; --line: #2C2C31; --line2: #3A3A40;
  --text: #F4F1EC; --muted: #A9A39A; --dim: #6F6A63;
  --gold: #E4B15C; --gold2: #F0C77A; --gold-ink: #1A1206; --brick: #B62701; --brick2: #D8451B;
  --ok: #5FBF8A; --warn: #F1C453; --bad: #FB7185; --info: #8FD0FF;
  --serif: "Onest", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --sans: "Onest", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --ease: cubic-bezier(.23, 1, .32, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.4; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
.serif { font-family: var(--serif); font-weight: 500; letter-spacing: -.02em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); } .dim { color: var(--dim); } .small { font-size: 12px; } .tiny { font-size: 10.5px; }
.gold { color: var(--gold); }
.eyebrow { font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); font-weight: 700; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 12px; padding: 12px 16px; font-weight: 700; font-size: 14px; background: var(--gold); color: var(--gold-ink); transition: transform 160ms var(--ease), background-color 160ms ease, opacity 160ms ease; white-space: nowrap; }
.btn.sec { background: var(--panel3); color: var(--text); border: 1px solid var(--line2); }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line2); }
.btn.ok { background: #1F7A4D; color: #fff; } .btn.bad { background: var(--brick); color: #fff; } .btn.info { background: #1F4E6E; color: #fff; }
.btn.sm { padding: 7px 11px; font-size: 12px; border-radius: 9px; } .btn.xl { padding: 15px 18px; font-size: 15.5px; border-radius: 14px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .4; pointer-events: none; }
.btn:active, .press:active, .tab:active, .chip:active, .tile:active, .seg button:active { transform: scale(.97); }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.card.p2 { background: var(--panel2); }
.card.gold { background: linear-gradient(160deg, #2A1F0C, #1A1408); border-color: #4A3814; }
.card h3 { font-size: 13px; font-weight: 700; letter-spacing: .02em; margin-bottom: 8px; }
.card h3 span { color: var(--muted); font-weight: 500; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--panel3); color: var(--text); white-space: nowrap; }
.pill.ok { background: #16321F; color: var(--ok); } .pill.warn { background: #3A2E12; color: var(--warn); } .pill.bad { background: #3A1518; color: var(--bad); } .pill.info { background: #15303F; color: var(--info); } .pill.gold { background: #2E230D; color: var(--gold2); }
.badge { display: inline-block; font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; padding: 4px 9px; border-radius: 999px; line-height: 1.2; }
input.txt, select.txt, textarea.txt { width: 100%; border: 1px solid var(--line2); border-radius: 12px; padding: 12px 13px; background: var(--panel2); color: var(--text); outline: none; transition: border-color 160ms ease; }
input.txt:focus, select.txt:focus, textarea.txt:focus { border-color: var(--gold); }
label.lbl { display: block; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; margin: 12px 0 6px 0; }
.seg { display: inline-flex; background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.seg button { border: 0; background: transparent; color: var(--muted); font-weight: 700; font-size: 12px; padding: 7px 12px; border-radius: 999px; transition: transform 160ms var(--ease), background-color 160ms ease, color 160ms ease; }
.seg button.on { background: var(--gold); color: var(--gold-ink); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { background: var(--panel3); border: 1px solid var(--line2); color: var(--text); border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 600; transition: transform 160ms var(--ease), background-color 160ms ease; }
.chip.on { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: left; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line); }
td { padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.bar { height: 7px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--gold); border-radius: 999px; }
.bar i.ok { background: var(--ok); } .bar i.warn { background: var(--warn); } .bar i.bad { background: var(--bad); }
.sheet-bg { position: fixed; inset: 0; background: rgba(0,0,0,.66); z-index: 50; display: flex; align-items: flex-end; justify-content: center; animation: fade 160ms var(--ease) both; }
.sheet { background: var(--panel); border: 1px solid var(--line2); border-radius: 22px 22px 0 0; padding: 18px 18px calc(18px + env(safe-area-inset-bottom)) 18px; width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; animation: up 220ms var(--ease) both; }
@media (min-width: 720px) { .sheet-bg { align-items: center; padding: 16px; } .sheet { border-radius: 20px; animation: pop 200ms var(--ease) both; } }
@keyframes fade { from { opacity: 0; } } @keyframes up { from { transform: translateY(24px); opacity: 0; } } @keyframes pop { from { opacity: 0; transform: scale(.97) translateY(6px); } }
.toast { position: fixed; left: 50%; bottom: calc(86px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--text); color: #111; padding: 10px 16px; border-radius: 999px; font-size: 13px; font-weight: 700; z-index: 60; animation: toastin 200ms var(--ease) both; max-width: 92vw; text-align: center; }
@keyframes toastin { from { opacity: 0; transform: translateX(-50%) translateY(8px); } }
.map { width: 100%; height: 100%; background: #0E0E10; }
.leaflet-container { background: #0E0E10; font-family: var(--sans); }
.leaflet-control-attribution { background: rgba(11,11,12,.7) !important; color: #777 !important; font-size: 9px !important; }
.leaflet-control-attribution a { color: #999 !important; }
.mk { display: grid; place-items: center; }
.mk-car { width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--gold-ink); box-shadow: 0 0 0 4px rgba(228,177,92,.25), 0 6px 16px rgba(0,0,0,.5); display: grid; place-items: center; font-size: 17px; }
.mk-car.off { background: #4A4A50; color: #bbb; box-shadow: 0 0 0 3px rgba(255,255,255,.08); }
.mk-car.busy { background: var(--info); color: #082030; box-shadow: 0 0 0 4px rgba(143,208,255,.22), 0 6px 16px rgba(0,0,0,.5); }
.mk-pin { width: 16px; height: 16px; border-radius: 50%; background: var(--text); border: 3px solid var(--bg); box-shadow: 0 0 0 3px var(--gold); }
.mk-pin.dest { background: var(--gold); box-shadow: 0 0 0 3px var(--text); }
.mk-lbl { position: absolute; left: 22px; top: -2px; white-space: nowrap; font-size: 11px; font-weight: 700; color: var(--text); text-shadow: 0 1px 2px #000, 0 0 6px #000; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--panel3); color: var(--gold); display: grid; place-items: center; font-weight: 800; font-size: 14px; border: 1px solid var(--line2); flex: 0 0 40px; }
.stars { color: var(--gold); letter-spacing: 2px; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.kv:last-child { border-bottom: 0; } .kv span:first-child { color: var(--muted); }
.feed div { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.feed div:last-child { border-bottom: 0; } .feed time { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 8px; }
.chat { display: flex; flex-direction: column; gap: 6px; max-height: 44vh; overflow: auto; padding: 4px 0; }
.cb { max-width: 82%; border-radius: 14px; padding: 9px 12px; font-size: 13.5px; line-height: 1.4; }
.cb.me { margin-left: auto; background: var(--gold); color: var(--gold-ink); border-bottom-right-radius: 4px; }
.cb.them { background: var(--panel3); border: 1px solid var(--line2); border-bottom-left-radius: 4px; }
.cb time { display: block; font-size: 9.5px; opacity: .65; margin-top: 3px; }
.legal { font-size: 10.5px; color: var(--dim); line-height: 1.45; }
/* selector de estilo de mapa (híbrido / mapa / sobrio) */
.mapstyle { position: absolute; left: 12px; top: 12px; z-index: 500; background: rgba(11,11,12,.82); color: var(--text); border: 1px solid var(--line2); border-radius: 999px; padding: 6px 11px; font-size: 11px; font-weight: 700; letter-spacing: .04em; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); transition: transform 160ms var(--ease), background-color 160ms ease; }
.mapstyle:active { transform: scale(.96); }
.leaflet-container .mk-lbl { text-shadow: 0 1px 2px #000, 0 0 8px #000, 0 0 2px #000; }
