/* Transporte NCV — transporte bajo demanda con NANUSD. Misma identidad visual del monedero. */

@font-face {
  font-family: "Sora";
  src: url("../fonts/sora-var.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("../fonts/jakarta-var.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #08111f;
  --bg-2: #0c1a2c;
  --surface: #0f2137;
  --surface-2: #142944;
  --line: #1f3d5f;
  --ink: #eef5ff;
  --muted: #9db4cf;
  --faint: #6f89a6;
  --blue: #2f7ce0;
  --blue-2: #4d96f0;
  --blue-soft: #16324f;
  --positive: #37c391;
  --negative: #f26d7d;
  --warning: #e9b357;
  --radius: 18px;
  --shadow: 0 18px 40px rgba(2, 8, 18, 0.45);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body {
  background:
    radial-gradient(1100px 600px at 12% -10%, rgba(47, 124, 224, 0.32), transparent 60%),
    radial-gradient(900px 500px at 110% 6%, rgba(77, 150, 240, 0.18), transparent 55%),
    var(--bg);
  padding-bottom: 92px;
}

a { color: var(--blue-2); }

h1, h2, h3, h4 { font-family: "Sora", system-ui, sans-serif; margin: 0; letter-spacing: -0.02em; }

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 18px 8px;
  max-width: 760px;
  margin: 0 auto;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--line);
  background: rgba(15, 33, 55, 0.7);
  padding: 8px 12px;
  border-radius: 999px;
}

.brand { text-align: right; }
.brand strong {
  display: block;
  font-family: "Sora", sans-serif;
  font-size: 14px;
  letter-spacing: 0.08em;
  line-height: 1.25;
}
.brand small { color: var(--faint); font-size: 11px; letter-spacing: 0.04em; }

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 18px 40px;
}

.card {
  background: linear-gradient(180deg, rgba(20, 41, 68, 0.92), rgba(15, 33, 55, 0.92));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 16px;
}

.card h2 { font-size: 17px; margin-bottom: 6px; }
.card p.sub { color: var(--muted); font-size: 13.5px; line-height: 1.5; margin: 0 0 14px; }

.label { display: block; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); margin: 14px 0 6px; }

.input, .select, .textarea {
  width: 100%;
  background: #0a1a2c;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--ink);
  font-family: inherit;
  font-size: 15px;
  padding: 12px 14px;
}
.textarea { min-height: 74px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid rgba(77, 150, 240, 0.55); outline-offset: 1px; }

.row { display: flex; gap: 10px; }
.row > * { flex: 1; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 14px 18px;
  border: 0;
  border-radius: 14px;
  font-family: "Sora", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(180deg, var(--blue-2), var(--blue));
  cursor: pointer;
  margin-top: 14px;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn.ghost { background: transparent; border: 1px solid var(--line); color: var(--ink); }
.btn.small { width: auto; padding: 9px 14px; font-size: 13px; margin: 0; border-radius: 11px; }
.btn.danger { background: linear-gradient(180deg, #d8566a, #b53e51); }
.btn.ok { background: linear-gradient(180deg, #35c193, #1f9d75); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--blue-soft);
  color: #b9d6f8;
  border: 1px solid var(--line);
}
.pill.ok { background: rgba(55, 195, 145, 0.14); color: #8ce7c5; border-color: rgba(55, 195, 145, 0.35); }
.pill.warn { background: rgba(233, 179, 87, 0.14); color: #f3ce93; border-color: rgba(233, 179, 87, 0.35); }
.pill.bad { background: rgba(242, 109, 125, 0.14); color: #f7a7b1; border-color: rgba(242, 109, 125, 0.35); }

.money { font-family: "Sora", sans-serif; font-weight: 800; letter-spacing: -0.01em; }
.money small { font-size: 0.55em; letter-spacing: 0.08em; color: var(--muted); margin-left: 4px; }

.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 12.5px; }
.hr { height: 1px; background: var(--line); margin: 16px 0; }

#map {
  height: 300px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 14px;
  background: #0a1a2c;
}

.leaflet-container { font-family: inherit; background: #0a1a2c; }
.leaflet-control-attribution { background: rgba(8, 17, 31, 0.8) !important; color: var(--muted) !important; font-size: 10px !important; }
.leaflet-control-attribution a { color: var(--blue-2) !important; }
.leaflet-bar a { background: #0f2137 !important; color: var(--ink) !important; border-color: var(--line) !important; }

.stop { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; }
.dot { width: 12px; height: 12px; border-radius: 50%; margin-top: 4px; flex: 0 0 auto; }
.dot.a { background: var(--blue-2); box-shadow: 0 0 0 4px rgba(77, 150, 240, 0.18); }
.dot.b { background: var(--positive); box-shadow: 0 0 0 4px rgba(55, 195, 145, 0.18); }
.stop-body { flex: 1; min-width: 0; }
.stop-title { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--faint); font-weight: 700; }
.stop-text { font-size: 14px; line-height: 1.4; margin-top: 2px; word-break: break-word; }

.metrics { display: flex; gap: 10px; margin: 10px 0 4px; }
.metric { flex: 1; background: #0a1a2c; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.metric span { display: block; font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); font-weight: 700; }
.metric strong { font-family: "Sora", sans-serif; font-size: 16px; }

.offer {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #0a1a2c;
  margin-bottom: 10px;
}
.offer.best { border-color: rgba(55, 195, 145, 0.5); }
.offer-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.offer-who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(140deg, #22456b, #16324f);
  display: grid; place-items: center;
  font-family: "Sora", sans-serif; font-weight: 700; font-size: 14px; color: #cfe4ff;
  flex: 0 0 auto; overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.offer-name { font-weight: 700; font-size: 14px; }
.offer-meta { font-size: 12px; color: var(--muted); }
.offer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }

.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media (max-width: 460px) { .grid2 { grid-template-columns: 1fr; } .row { flex-direction: column; } }

.nav {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 6px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(8, 17, 31, 0.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(12px);
  z-index: 30;
}
.nav-inner { display: flex; gap: 6px; width: 100%; max-width: 760px; margin: 0 auto; }
.nav button {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: transparent; border: 0; color: var(--faint);
  font-family: inherit; font-size: 11px; font-weight: 700;
  padding: 8px 4px; border-radius: 12px; cursor: pointer;
}
.nav button svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.7; }
.nav button.on { color: #cfe4ff; background: rgba(47, 124, 224, 0.16); }
.nav .badge { position: absolute; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 108px;
  transform: translate(-50%, 12px);
  background: #132a44;
  color: var(--ink);
  border: 1px solid var(--line);
  padding: 11px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  max-width: 90vw;
  z-index: 60;
  text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

.banner {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid var(--line);
  background: #0a1a2c;
  color: var(--muted);
  margin-bottom: 14px;
}
.banner.warn { border-color: rgba(233, 179, 87, 0.4); background: rgba(233, 179, 87, 0.08); color: #f0d3a1; }
.banner.ok { border-color: rgba(55, 195, 145, 0.4); background: rgba(55, 195, 145, 0.08); color: #a9ecd4; }

.ride-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #0a1a2c; margin-bottom: 10px; }
.ride-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.ride-route { font-size: 13.5px; line-height: 1.5; color: var(--muted); }
.ride-route strong { color: var(--ink); }

.empty { text-align: center; padding: 26px 12px; color: var(--faint); font-size: 13.5px; line-height: 1.6; }
.empty svg { width: 42px; height: 42px; stroke: var(--line); fill: none; stroke-width: 1.5; margin-bottom: 8px; }

.chat { max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 0; }
.bubble { max-width: 82%; padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.4; background: #12283f; border: 1px solid var(--line); }
.bubble.mine { align-self: flex-end; background: rgba(47, 124, 224, 0.28); border-color: rgba(77, 150, 240, 0.4); }

.stars { display: flex; gap: 6px; margin: 6px 0 2px; }
.stars button { background: transparent; border: 0; font-size: 26px; line-height: 1; color: #35506e; cursor: pointer; padding: 0; }
.stars button.on { color: var(--warning); }

.steps { display: flex; gap: 6px; margin: 12px 0 4px; }
.step { flex: 1; height: 4px; border-radius: 999px; background: #1b3350; }
.step.on { background: var(--blue-2); }
.step.done { background: var(--positive); }

.code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 11.5px; word-break: break-all; color: var(--muted); background: #071427; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin-top: 6px; }

.status-line { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-top: 4px; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--warning); }

/* Tipos de servicio: pasajeros, fletes, cargas, mudanzas y grúa. */
.service-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.service-chip {
  width: auto;
  padding: 8px 12px;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: #0a1a2c;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 700;
}
.service-chip.on {
  border-color: rgba(77, 150, 240, 0.55);
  background: rgba(47, 124, 224, 0.22);
  color: #cfe3ff;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  font-size: 13px;
  color: var(--muted);
}
.check input { width: 16px; height: 16px; accent-color: #4d96f0; }
