:root{
  --bg: #0b0f17;
  --card: #121a27;
  --text: #e7eefc;
  --muted: #a9b4c7;
  --accent: #ff7a00;

  --danger: #ff3b3b;
  --ok: #2ecc71;
  --info: #a9b4c7;

  --border: rgba(255,255,255,.08);
  --shadow: 0 10px 30px rgba(0,0,0,.25);

  --radius-lg: 14px;
  --radius-md: 12px;
  --radius-pill: 999px;

  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*{ box-sizing:border-box; }
html,body{
  margin:0;
  padding:0;
  font-family:var(--font);

}

a{ color:var(--accent); text-decoration:none; }
a:hover{ text-decoration:underline; }

.container{ max-width:920px; margin:0 auto; padding:18px; }

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:10px;
}
.topbar .actions{ display:flex; gap:10px; flex-wrap:wrap; }

/* ✅ NUEVO: acciones genéricas (usadas en pasajero.html / conductor.html) */
.actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  align-items:center;
}

.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:16px;
  margin:12px 0;
  box-shadow:var(--shadow);
}

.muted{ color:var(--muted); }

.hr{ height:1px; background:var(--border); margin:14px 0; }

.row{ display:flex; gap:10px; flex-wrap:wrap; }
.col{ flex:1; min-width:220px; }

label{ display:block; font-size:12px; color:var(--muted); margin:6px 0; }

input,select,textarea{
  width:100%;
  padding:10px 12px;
  border-radius:12px;
  border:1px solid var(--border);
  background: var(--brand-surface, #fff);
  color: var(--brand-text, #111);
  border-color: var(--brand-border, rgba(0,0,0,.12));

  outline:none;
}
textarea{ min-height:90px; resize:vertical; }

button{
  cursor:pointer;
  background:var(--accent);
  border:none;
  color:#111;
  font-weight:700;
  padding:10px 14px;
  border-radius:12px;
}

/* ✅ Opcional: por si alguna pantalla usa .primary */
button.primary{ background:var(--accent); color:#111; }

button.secondary{ background:transparent; border:1px solid var(--border); color:var(--text); }
button.danger{ background:var(--danger); color:#fff; }
button.ok{ background:var(--ok); color:#0b0f17; }

.badge{
  display:inline-block;
  padding:4px 10px;
  border-radius:var(--radius-pill);
  background:rgba(255,255,255,.05);
  border:1px solid var(--border);
  color:var(--muted);
  font-size:12px;
}
.badge--ok{ color:var(--ok); }
.badge--muted{ color:var(--muted); }
.badge--danger{ color:var(--danger); }

.status--ok{ color:var(--ok); }
.status--info{ color:var(--info); }
.status--error{ color:var(--danger); }

.list{ display:flex; flex-direction:column; gap:10px; }

.item{
  padding:12px;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  background: var(--brand-surface, #fff);
}
.item strong{ display:block; }
.item-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top:10px; }

.code{
  font-family:var(--mono);
  font-size:12px;
  white-space:pre-wrap;
  background: var(--brand-surface, #fff);
  border:1px solid var(--border);
  border-radius:12px;
  padding:10px;
  color: var(--brand-text, #111);
}

.note{
  border-left:4px solid var(--accent);
  padding:10px 12px;
  background: var(--brand-surface, #fff);
  border-radius:12px;
}

/* Utilidades */
.mt-10{ margin-top:10px; }
.mt-8{ margin-top:8px; }


/* =========================
   MAPA (MapLibre) - opcional
   =========================== */
.map{
  width:100%;
  height:280px;
  border-radius: var(--radius-lg);
  overflow:hidden;
  border:1px solid var(--border);
  background: var(--brand-surface, #fff);
}

/* Marker custom */
.ma-marker{
  width:14px;
  height:14px;
  border-radius:999px;
  border:2px solid rgba(255,255,255,.9);
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.ma-marker--driver{ background: var(--accent); }
.ma-marker--origin{ background: #2ecc71; }
.ma-marker--dest{ background: #ff3b3b; }

/* =========================
   PATCH ETAPA 1 - Legibilidad + Móvil
   Basado en auditoría (container max-width + textos 12px)
   ================================ */

/* Tamaño base */
body{ font-size: 16px; }

/* Labels y textos pequeños: subir de 12px a algo usable */
label{ font-size: 14px; }
.small, .muted, .hint, .help{ font-size: 13px; }

/* Contenedor: en PC se queda bien, en móvil ocupa mejor */
.container{ padding: 18px; }
@media (max-width: 480px){
  .container{
    max-width: none !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 12px !important;
  }
}

/* Inputs / botones dedo-friendly */
input, select, textarea{ min-height: 44px; }
button, .btn, input[type="submit"]{ min-height: 44px; }

/* =========================
   PATCH ETAPA 1 (basado en auditoría de .card)
   Objetivo: más grande y cómodo en móvil
   ================================ */

/* labels y microtextos */
label{ font-size:14px !important; }

/* botones dedo-friendly */
button, .btn, input[type="submit"]{
  min-height:44px !important;
  padding:12px 16px !important;
  font-size:16px !important;
}

/* inputs dedo-friendly */
input, select, textarea{
  min-height:44px !important;
  font-size:16px !important;
}

/* columnas: en móvil evitar min-width 220px que aprieta */
@media (max-width: 480px){
  .col{ min-width: 100% !important; }
}

/* =========================
   PATCH ETAPA 2 - Tema por rol
   ================================ */

/* PASAJERO (claro tipo InDrive) */
body.__DISABLED__role-passenger{
  background:#f6f7fb !important;
  color:#111 !important;
}
body.__DISABLED__role-passenger .card{
  background:#fff !important;
  border-color: rgba(0,0,0,.08) !important;
}
body.__DISABLED__role-passenger input,
body.__DISABLED__role-passenger select,
body.__DISABLED__role-passenger textarea{
  background:#fff !important;
  color:#111 !important;
  border-color: rgba(0,0,0,.15) !important;
}

/* CONDUCTOR (oscuro tipo app) */
body.__DISABLED__role-driver{
  background:#0b1220 !important;
  color: rgba(255,255,255,.92) !important;
}
body.__DISABLED__role-driver .card{
  background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.10) !important;
}
body.__DISABLED__role-driver input,
body.__DISABLED__role-driver select,
body.__DISABLED__role-driver textarea{
  background:#0e1522 !important;
  color: rgba(255,255,255,.92) !important;
  border-color: rgba(255,255,255,.14) !important;
}

/* =========================
   MA AYACUCHO — ETAPA 3.1 (Conductor Topbar)
   Version: V1_2025-12-28_r06
   ================================ */
body.__DISABLED__role-driver .topbar{
  position: sticky;
  top: 0;
  z-index: 999;
  padding: 10px 12px;
  margin: 0 0 12px 0;
  border-radius: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(18,18,18,.92);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
}

body.__DISABLED__role-driver .topbar .actions{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

body.__DISABLED__role-driver .topbar .actions button{
  flex: 1 1 30%;
  min-height: 44px;
  padding: 12px 12px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: .2px;
}

/* Badge GPS visible y “pro” */
body.__DISABLED__role-driver .topbar .badge{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
}

body.__DISABLED__role-driver #gpsBadge.gps-on{
  border-color: rgba(34,197,94,.35);
  background: rgba(34,197,94,.14);
}

body.__DISABLED__role-driver #gpsBadge.gps-off{
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.14);
}

/* En pantallas chicas: 2 columnas para acciones */
@media (max-width: 420px){
  body.__DISABLED__role-driver .topbar .actions button{
    flex: 1 1 48%;
  }
}

/* =========================
   MA AYACUCHO — ETAPA 3.4 (Cards Listas)
   Version: V1_2025-12-28_r08
   ================================ */
body.__DISABLED__role-driver .item{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  margin: 10px 0;
}

body.__DISABLED__role-driver .item .muted{
  display: block;
  font-size: 14px;
  line-height: 1.25;
  opacity: .90;
}

body.__DISABLED__role-driver #available-trips .item:only-child,
body.__DISABLED__role-driver #my-trips .item:only-child{
  text-align: center;
  padding: 18px 14px;
  background: rgba(255,255,255,.05);
}

body.__DISABLED__role-driver #available-trips .item:only-child .muted,
body.__DISABLED__role-driver #my-trips .item:only-child .muted{
  font-weight: 700;
  opacity: .95;
}

/* =========================
   MA AYACUCHO — ETAPA 4.1 (Pasajero CTA)
   Version: V1_2025-12-28_r12
   ================================ */
body.__DISABLED__role-passenger #btnCreate.cta{
  width: 100%;
  min-height: 52px;
  border-radius: 16px;
  font-weight: 900;
  letter-spacing: .4px;
  text-transform: uppercase;
  font-size: 16px;
}

/* En móvil: botón fijo abajo tipo app */
@media (max-width: 520px){
  body.__DISABLED__role-passenger #btnCreate.cta{
    position: sticky;
    bottom: 10px;
    z-index: 900;
    box-shadow: 0 14px 30px rgba(0,0,0,.18);
  }
}

/* =========================
   ETAPA 4.2 — Trip Status Card (Passenger)
   ========================= */
.trip-status{
  margin: 12px 0 6px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
}
.trip-status.hidden{ display:none; }

.trip-status__top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.trip-status__title{
  font-weight:700;
  letter-spacing:.2px;
}
.trip-status__id{
  font-size: 12px;
  opacity:.85;
  margin-top:2px;
}

.trip-status__body{
  margin-top:10px;
}
.trip-status__state{
  font-size: 22px;
  font-weight: 800;
  letter-spacing:.3px;
  margin: 2px 0 6px;
}
.trip-status__hint{
  font-size: 13px;
  line-height: 1.35;
}

.trip-status__actions{
  margin-top: 12px;
  display:flex;
  justify-content:flex-end;
}

/* ========================= */

/* ===== Pasajero: MapLibre ===== */
body.__DISABLED__role-passenger #map{
  width: 100%;
  height: 52vh;
  border-radius: 14px;
  overflow: hidden;
  background: #f2f2f2;
  margin-top: 10px;
}

/* Marker pasajero */
.ma-marker--passenger{ background:#2d8cff; }

/* === UI: Align map height between passenger & driver === */
body.__DISABLED__role-driver #map{
  height: 52vh;
}

/* === MA BRANDING (CITY PACK) === */
.brand-row{
  display:flex;
  align-items:center;
  gap:.5rem;
  margin:.25rem 0;
}
.brand-platform{
  font-weight:800;
  letter-spacing:.08em;
}
.brand-city{
  font-weight:700;
}
.brand-support{
  margin-left:auto;
  font-weight:600;
  text-decoration:none;
}

/* util */
.hidden{display:none !important;}
