/* Estilos compartidos · Central Valledupar */
:root {
  --verde: #0b6e4f; --verde-osc: #084c37; --verde-claro: #e3f3ec;
  --ambar: #f2a900; --ambar-claro: #fff4d6;
  --rojo: #c2362b; --rojo-claro: #fde8e6;
  --azul: #1f5fae; --azul-claro: #e4eefb;
  --tinta: #1b2420; --gris: #5d6b65; --linea: #dfe5e2; --fondo: var(--app-fondo, #f4f6f5); --blanco: #fff;
  --radio: 12px; --sombra: 0 1px 2px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.06);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--tinta); background: var(--fondo);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-size: 16px; line-height: 1.4; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { margin: 0 0 .4em; line-height: 1.2; }
h1 { font-size: 1.35rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
a { color: var(--azul); }
.oculto { display: none !important; }
.fila { display: flex; gap: .5rem; align-items: center; }
.fila.envolver { flex-wrap: wrap; }
.col { display: flex; flex-direction: column; gap: .5rem; }
.crece { flex: 1; min-width: 0; }
.suave { color: var(--gris); font-size: .9em; }
.peq { font-size: .82rem; }
.centro { text-align: center; }

/* controles */
button, .boton {
  font: inherit; border: 0; border-radius: 10px; padding: .7em 1em; cursor: pointer; font-weight: 600;
  background: var(--app-boton, var(--verde)); color: #fff; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .4em;
  min-height: 44px;
}
button:disabled { opacity: .5; cursor: default; }
button.sec, .boton.sec { background: var(--blanco); color: var(--tinta); border: 1px solid var(--linea); }
button.peligro { background: var(--rojo); }
button.ambar { background: var(--ambar); color: #2b2100; }
button.azul, .boton.azul { background: var(--azul); }
button.chico { padding: .35em .7em; min-height: 34px; font-size: .88rem; }
button.ancho, .boton.ancho { width: 100%; }
button.enorme { font-size: 1.25rem; padding: 1em; border-radius: 14px; }
label { display: block; font-size: .85rem; font-weight: 600; color: var(--gris); margin-bottom: .2rem; }
input, select, textarea {
  font: inherit; width: 100%; padding: .65em .75em; border: 1px solid var(--linea); border-radius: 10px; background: #fff; color: var(--tinta);
  min-height: 44px;
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--verde); outline-offset: 0; border-color: var(--verde); }
input[type=checkbox] { width: 22px; height: 22px; min-height: 0; accent-color: var(--verde); }
input[type=range] { width: 100%; min-height: 28px; padding: 0; border: 0; background: transparent; accent-color: var(--app-boton, var(--verde)); }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 500; color: var(--tinta); font-size: .95rem; }
.campo { margin-bottom: .75rem; }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }

/* tarjetas y etiquetas */
.tarjeta { background: var(--blanco); border-radius: var(--radio); box-shadow: var(--sombra); padding: 1rem; }
.etq { display: inline-block; padding: .15em .55em; border-radius: 99px; font-size: .78rem; font-weight: 700; background: var(--fondo); color: var(--gris); white-space: nowrap; }
.etq.pendiente { background: var(--rojo-claro); color: var(--rojo); }
.etq.asignado { background: var(--ambar-claro); color: #8a5a00; }
.etq.aceptado, .etq.llego { background: var(--azul-claro); color: var(--azul); }
.etq.en_curso { background: var(--verde-claro); color: var(--verde-osc); }
.etq.terminado { background: #eef0ef; color: var(--gris); }
.etq.cancelado { background: #eef0ef; color: var(--gris); text-decoration: line-through; }
.etq.viaje { background: var(--verde-claro); color: var(--verde-osc); }
.etq.mandado { background: var(--azul-claro); color: var(--azul); }
.etq.carga { background: var(--ambar-claro); color: #8a5a00; }
.aviso { padding: .7rem .9rem; border-radius: 10px; background: var(--ambar-claro); color: #6b4700; font-size: .92rem; }
.aviso.error { background: var(--rojo-claro); color: var(--rojo); }
.aviso.ok { background: var(--verde-claro); color: var(--verde-osc); }
.foto { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: var(--linea); flex: none; }
.foto.grande { width: 84px; height: 84px; }
.placa {
  display: inline-block; background: #ffd400; color: #111; font-weight: 800; letter-spacing: .06em; border: 2px solid #111;
  border-radius: 6px; padding: .05em .45em; font-family: ui-monospace, monospace;
}
.movil { display: inline-block; background: var(--tinta); color: #fff; font-weight: 800; border-radius: 6px; padding: .05em .45em; }

/* avisos flotantes */
#toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: .4rem; pointer-events: none; }
#toast div { background: var(--tinta); color: #fff; padding: .7em 1em; border-radius: 10px; box-shadow: var(--sombra); max-width: 90vw; font-size: .95rem; }
#toast div.error { background: var(--rojo); }

/* marcadores del mapa */
.marca-moto { background: none; border: 0; }
.marca-moto div {
  width: 34px; height: 34px; border-radius: 50%; background: var(--verde); color: #fff; display: grid; place-items: center; font-weight: 800;
  font-size: 12px; border: 3px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.marca-moto.ocupado div { background: var(--azul); }
.marca-moto.fuera div { background: #8a948f; }
.marca-punto div {
  width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--rojo); border: 3px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.marca-punto.destino div { background: var(--tinta); }
.marca-punto.sel div { background: var(--ambar); width: 32px; height: 32px; }
.gm-style { font: inherit; }

/* pantalla de entrada */
.entrada { min-height: 100%; display: grid; place-items: center; padding: 1.2rem; background: linear-gradient(160deg, var(--app-barra, var(--verde)) 0%, var(--verde-osc) 100%); }
/* aviso de sistema apagado */
.sistema-apagado { background: var(--rojo); color: #fff; text-align: center; padding: .55rem .8rem; font-weight: 700; z-index: 3000; position: relative; }
.entrada .tarjeta { width: 100%; max-width: 400px; }
.logo { width: 64px; height: 64px; border-radius: 16px; display: block; margin: 0 auto .6rem; }

/* Estado GPS del conductor en el mapa de central */
.marca-moto.en-servicio div { background:#16834b; }
.marca-moto.activo-libre div { background:#e3a700; color:#202020; }
.marca-moto.fuera div { background:#8a948f; }

/* v1.9 · ventana del botón de pánico (conductor y cliente) */
.dialogo-panico { border-top:6px solid #c62828; }
.dialogo-panico h2 { color:#c62828; }
.panico-fotos { display:flex; gap:.5rem; flex-wrap:wrap; }
.panico-fotos .pf { position:relative; }
.panico-fotos img { width:84px; height:84px; object-fit:cover; border-radius:10px; }
.panico-fotos .pf button { position:absolute; top:-6px; right:-6px; min-height:26px; padding:0 .45rem; border-radius:13px; }
#bEnviarPanico { font-size:1.2rem; }
.marca-moto.panico div { background:#c62828 !important; color:#fff; font-size:1rem; box-shadow:0 0 0 6px rgba(198,40,40,.35); }
.adj-img { display:block; max-width:min(260px, 100%); max-height:260px; border-radius:10px; margin:.15rem 0; object-fit:cover; }
.adj-doc { display:inline-block; padding:.45rem .7rem; border-radius:8px; background:rgba(0,0,0,.06); font-weight:600; text-decoration:none; color:inherit; word-break:break-all; }
.adjunto-listo { display:flex; align-items:center; gap:.4rem; font-size:.85rem; background:#eef6f1; border-radius:8px; padding:.3rem .5rem; }
.adjunto-listo.oculto { display:none; }
.etq-masivo { display:inline-block; font-size:.7rem; font-weight:700; color:#0b4fa0; margin-bottom:.15rem; }
