/* ============================================================
   ALERTA RETÉN - VILLAVICENCIO · UI móvil moderna
   ============================================================ */
:root {
  --bg: #0d1117;
  --surface: rgba(22, 27, 34, 0.82);
  --surface-solid: #161b22;
  --surface-2: #21262d;
  --border: rgba(255, 255, 255, 0.08);
  --red: #ff453a;
  --red-dark: #d32f2f;
  --green: #30d158;
  --blue: #0a84ff;
  --text: #f5f5f7;
  --text-dim: #9ba1a9;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  font-family: -apple-system, 'Segoe UI', system-ui, Roboto, sans-serif;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  overscroll-behavior: none;
}

.hidden { display: none !important; }

/* ============================================================
   SPLASH
   ============================================================ */
#splash {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 5000;
  background: radial-gradient(ellipse at 50% 35%, #1c2530 0%, var(--bg) 70%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: opacity .5s ease, visibility .5s;
}
#splash.fade-out { opacity: 0; visibility: hidden; }

#splash h2 { font-size: 24px; font-weight: 800; letter-spacing: .5px; }
#splash p  { color: var(--text-dim); font-size: 14px; }

.splash-logo {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 52px;
  margin-bottom: 10px;
}
.splash-ring {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid var(--red);
  animation: splash-pulse 1.4s ease-out infinite;
}
@keyframes splash-pulse {
  0%   { transform: scale(.6); opacity: 1; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* ============================================================
   MAPA (Dimensiones explícitas para compatibilidad con todo WebView)
   ============================================================ */
#map {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #11161d;
}
/* Capa de mapa oscura 100% libre sin API key (OpenStreetMap con filtro nocturno de alto contraste) */
.map-tiles-dark {
  filter: invert(100%) hue-rotate(180deg) brightness(92%) contrast(90%);
}

/* ============================================================
   ENCABEZADO (glassmorphism compacto)
   ============================================================ */
/* Contenedor Superior Unificado (Previene cualquier superposición de barras) */
.app-header-container {
  position: absolute;
  top: calc(8px + var(--safe-top));
  left: 10px;
  right: 10px;
  max-width: 480px;
  margin: 0 auto;
  z-index: 1040;
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: none;
}
.app-header-container > * {
  pointer-events: auto;
  position: static !important;
  width: 100% !important;
  margin: 0 !important;
}

#topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .35);
}

.topbar-left { display: flex; align-items: center; gap: 8px; }

.app-badge {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff453a, #b71c1c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 2px 8px rgba(255, 69, 58, .4);
}

.topbar-text h1 { font-size: 14px; font-weight: 800; line-height: 1.1; }
.topbar-text .subtitle { font-size: 10px; color: var(--text-dim); font-weight: 500; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Botón conectar celular oculto en móvil/APK (ya se está en el celular) */
.btn-phone-chip {
  display: none !important;
}

.btn-admin-chip {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: #ff9f0a;
  padding: 4px 9px;
  border-radius: 14px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .12s, border-color .2s, background .2s, box-shadow .2s;
  flex-shrink: 0;
}
.btn-admin-chip:active { transform: scale(0.92); }
.btn-admin-chip.active {
  background: rgba(255, 159, 10, 0.25);
  border-color: #ff9f0a;
  box-shadow: 0 0 10px rgba(255, 159, 10, 0.4);
  color: #ffb340;
}

#gps-chip {
  display: flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px 9px;
  border-radius: 14px;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-dim);
}

#status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #666;
  transition: all .3s;
}
#status-dot.online  { background: var(--green); box-shadow: 0 0 8px var(--green); }
#status-dot.offline { background: var(--red); }
#gps-chip.gps-ok    { color: var(--green); }

/* Botón Maestro Unificado de Estado (En Ruta vs En Pausa) */
.btn-radar-master {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(46, 160, 67, 0.18);
  border: 1.5px solid #2ea043;
  color: #3fb950;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 14px rgba(46, 160, 67, 0.35);
  flex-shrink: 0;
  letter-spacing: 0.3px;
}
.btn-radar-master:active { transform: scale(0.93); }

.btn-radar-master.in-route {
  background: rgba(46, 160, 67, 0.22);
  border-color: #3fb950;
  color: #3fb950;
  box-shadow: 0 0 16px rgba(46, 160, 67, 0.45);
}

.btn-radar-master.paused {
  background: rgba(255, 179, 0, 0.14);
  border-color: #ffb300;
  color: #ffb300;
  box-shadow: 0 0 12px rgba(255, 179, 0, 0.25);
  opacity: 0.92;
}

.radar-master-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3fb950;
  box-shadow: 0 0 8px #3fb950;
  transition: all .3s;
}

.btn-radar-master.in-route .radar-master-dot {
  animation: radarPulseDot 1.8s infinite ease-in-out;
}

.btn-radar-master.paused .radar-master-dot {
  background: #ffb300;
  box-shadow: 0 0 6px #ffb300;
  animation: none;
}

@keyframes radarPulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.35); opacity: 1; box-shadow: 0 0 12px #3fb950; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

/* ============================================================
   BANNER SIN GPS (modo manual)
   ============================================================ */
#gps-banner {
  position: absolute;
  top: calc(180px + var(--safe-top));
  left: 10px;
  right: 56px;
  z-index: 1020;
  background: rgba(255, 159, 10, .16);
  border: 1px solid rgba(255, 159, 10, .55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffb340;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 11.5px;
  text-align: left;
  cursor: pointer;
  animation: alert-slide .35s ease;
}
#gps-banner:active { transform: scale(.97); }
#gps-banner.armed {
  background: rgba(10, 132, 255, .18);
  border-color: var(--blue);
  color: #5eb0ff;
  animation: banner-blink 1s infinite;
}
@keyframes banner-blink {
  0%, 100% { opacity: 1; }
  50%      { opacity: .55; }
}

/* Botón localizar buscando (giro) */
#btn-locate.searching svg {
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   SELECTOR DE CAPA (ultra-compacto)
   ============================================================ */
#layer-switcher {
  position: absolute;
  top: calc(180px + var(--safe-top));
  right: 10px;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.layer-btn {
  width: 33px;
  height: 33px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  transition: transform .12s, border-color .2s, background .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.layer-btn:active { transform: scale(.9); }
.layer-btn.active {
  border-color: var(--blue);
  background: rgba(10, 132, 255, .25);
}

/* En APK o pantallas móviles no necesitamos botón pantalla completa */
#btn-fullscreen {
  display: none !important;
}

/* ============================================================
   ALERTA DE PROXIMIDAD
   ============================================================ */
#proximity-alert {
  position: absolute;
  top: calc(180px + var(--safe-top));
  left: 10px;
  right: 56px;
  z-index: 1025;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .25);
  animation: alert-slide .35s ease;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: #fff;
  cursor: pointer;
  transition: transform .12s ease, filter .2s ease;
}
#proximity-alert:active {
  transform: scale(0.97);
  filter: brightness(1.1);
}

.proximity-tap-hint {
  font-size: 10px;
  opacity: 0.92;
  text-decoration: underline;
  margin-left: 2px;
  font-weight: 700;
}

#proximity-alert.warning {
  background: linear-gradient(135deg, rgba(255, 159, 10, 0.95), rgba(200, 110, 0, 0.95));
  box-shadow: 0 4px 18px rgba(255, 159, 10, 0.45);
}

#proximity-alert.danger {
  background: linear-gradient(135deg, rgba(255, 69, 58, 0.98), rgba(183, 28, 28, 0.98));
  box-shadow: 0 6px 24px rgba(255, 69, 58, 0.6);
  animation: alert-slide .35s ease, alert-pulse-card 1.2s infinite alternate;
}

@keyframes alert-pulse-card {
  from { transform: scale(1); }
  to   { transform: scale(1.02); }
}

.alert-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.proximity-badge {
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.proximity-detail {
  font-size: 11.5px;
  font-weight: 500;
}

#btn-proximity-hazard-gone {
  transition: transform 0.15s ease, filter 0.15s ease;
}
#btn-proximity-hazard-gone:active {
  transform: scale(0.95);
  filter: brightness(1.2);
}

.alert-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #fff;
  flex-shrink: 0;
  animation: alert-blink .8s infinite;
}
@keyframes alert-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: .4; transform: scale(.8); }
}

.btn-dismiss-proximity {
  margin-left: auto;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(0, 0, 0, 0.28);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn-dismiss-proximity:hover {
  background: rgba(0, 0, 0, 0.5);
}
.btn-dismiss-proximity:active {
  transform: scale(0.88);
}

/* ============================================================
   BOTONES REPORTAR (DUAL: PUNTO CALIENTE Y TRANCÓN)
   ============================================================ */
#report-zone {
  position: absolute;
  bottom: calc(66px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}

.report-btn-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.report-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(255, 69, 58, .65);
  animation: ring-pulse 2s ease-out infinite;
  pointer-events: none;
}
.report-ring.ring-yellow {
  border-color: rgba(255, 179, 0, .65);
}
@keyframes ring-pulse {
  0%   { transform: scale(1); opacity: .8; }
  100% { transform: scale(1.35); opacity: 0; }
}

#btn-report {
  position: relative;
  width: 66px;
  height: 66px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff5a4e, #c62828);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow:
    0 5px 20px rgba(255, 69, 58, .45),
    inset 0 2px 4px rgba(255, 255, 255, .25),
    inset 0 -3px 6px rgba(0, 0, 0, .25);
  border: 2.5px solid rgba(255, 255, 255, .85);
  transition: transform .12s;
  user-select: none;
  touch-action: manipulation;
}
#btn-report:active { transform: scale(.92); }
#btn-report.sending { opacity: .6; pointer-events: none; }

#btn-report .btn-icon { font-size: 19px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
#btn-report .btn-text {
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  line-height: 1.1;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

#btn-report-traffic {
  position: relative;
  width: 66px;
  height: 66px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffd54f, #ff8f00);
  color: #000;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow:
    0 5px 20px rgba(255, 179, 0, .45),
    inset 0 2px 4px rgba(255, 255, 255, .35),
    inset 0 -3px 6px rgba(0, 0, 0, .25);
  border: 2.5px solid rgba(255, 255, 255, .9);
  transition: transform .12s;
  user-select: none;
  touch-action: manipulation;
}
#btn-report-traffic:active { transform: scale(.92); }
#btn-report-traffic.sending { opacity: .6; pointer-events: none; }
#btn-report-traffic .btn-icon { font-size: 19px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.2)); }
#btn-report-traffic .btn-text {
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  line-height: 1.1;
  text-align: center;
  color: #000;
}

.report-ring.ring-orange {
  border-color: rgba(255, 112, 67, .75);
}
#btn-report-hazard {
  position: relative;
  width: 66px;
  height: 66px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff7043, #d84315);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  box-shadow:
    0 5px 20px rgba(255, 112, 67, .45),
    inset 0 2px 4px rgba(255, 255, 255, .35),
    inset 0 -3px 6px rgba(0, 0, 0, .25);
  border: 2.5px solid rgba(255, 255, 255, .9);
  transition: transform .12s;
  user-select: none;
  touch-action: manipulation;
}
#btn-report-hazard:active { transform: scale(.92); }
#btn-report-hazard.sending { opacity: .6; pointer-events: none; }
#btn-report-hazard .btn-icon { font-size: 19px; line-height: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
#btn-report-hazard .btn-text {
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: 0.4px;
  line-height: 1.1;
  text-align: center;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

/* ============================================================
   BOTÓN LOCALIZAR
   ============================================================ */
#btn-locate {
  position: absolute;
  bottom: calc(135px + var(--safe-bottom));
  right: 10px;
  z-index: 1000;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
  transition: transform .12s;
}
#btn-locate:active { transform: scale(.9); }
#btn-locate svg {
  width: 18px;
  height: 18px;
}

/* ============================================================
   BOTÓN FLOTANTE VER TODAS LAS ALERTAS EN EL MAPA
   ============================================================ */
.btn-view-all-floating {
  position: absolute;
  bottom: calc(178px + var(--safe-bottom));
  right: 10px;
  z-index: 1000;
  height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(255, 69, 58, 0.45);
  border-radius: 18px;
  background: rgba(22, 27, 34, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 3px 14px rgba(0, 0, 0, .4);
  transition: transform .12s ease, background .2s ease;
}
.btn-view-all-floating:active {
  transform: scale(.92);
}
.btn-view-all-floating .view-all-pill {
  background: #ff453a;
  color: #fff;
  border-radius: 10px;
  padding: 1px 6px;
  font-size: 11px;
  font-weight: 800;
}
.btn-view-all-floating.dimmed {
  opacity: 0.75;
  border-color: var(--border);
}

/* ============================================================
   BOTÓN FLOTANTE Y HUD COPILOTO IA MANOS LIBRES (VIP)
   ============================================================ */
.btn-copilot-floating {
  position: absolute;
  bottom: calc(222px + var(--safe-bottom));
  right: 10px;
  z-index: 1000;
  height: 36px;
  padding: 0 12px;
  border: 1.5px solid #ffd700;
  border-radius: 18px;
  background: rgba(22, 27, 34, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #ffd700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 4px 15px rgba(255, 215, 0, 0.35);
  transition: transform .12s ease, background .2s ease, box-shadow .2s ease;
}
.btn-copilot-floating:active {
  transform: scale(.92);
}
.btn-copilot-floating.always-on {
  border-color: #30d158;
  color: #fff;
  box-shadow: 0 4px 15px rgba(48, 209, 88, 0.35);
}
.btn-copilot-floating.always-on .copilot-vip-crown {
  animation: pulse-dot 1.5s infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.85); }
}
.btn-copilot-floating.paused {
  background: rgba(30, 30, 35, 0.85);
  color: #8e8e93;
  border-color: #555;
  box-shadow: none;
}
.btn-copilot-floating.listening {
  background: linear-gradient(135deg, #ffd700, #ff8f00);
  color: #000;
  border-color: #fff;
  box-shadow: 0 0 20px rgba(255, 215, 0, 0.85);
  animation: pulse-copilot 1s infinite alternate;
}
@keyframes pulse-copilot {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}

.copilot-hud {
  display: none !important;
  position: absolute;
  top: calc(180px + var(--safe-top));
  left: 10px;
  right: 10px;
  z-index: 2000;
  background: rgba(15, 20, 30, 0.95);
  border: 1.5px solid #ffd700;
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 215, 0, 0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  animation: slideDown .2s cubic-bezier(0.16, 1, 0.3, 1);
}
.copilot-hud-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.copilot-hud-pulse {
  font-size: 20px;
  animation: pulse 1s infinite;
}
.copilot-hud-title {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.copilot-status-text {
  font-size: 11px;
  color: #aaa;
}
.copilot-hud-close {
  background: transparent;
  border: none;
  color: #888;
  font-size: 16px;
  cursor: pointer;
  padding: 4px;
}
.copilot-transcript {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  padding: 8px 10px;
  border-radius: 8px;
  border-left: 3px solid #ffd700;
  min-height: 24px;
  line-height: 1.35;
}
.copilot-response {
  margin-top: 8px;
  font-size: 12.5px;
  color: #ffd700;
  font-weight: 700;
  line-height: 1.35;
}

.btn-panel-action {
  background: rgba(255, 69, 58, .16);
  border: 1px solid rgba(255, 69, 58, .45);
  color: #ff5a4e;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  margin-right: 10px;
  transition: transform .12s, background .2s;
}
.btn-panel-action:active {
  transform: scale(.92);
  background: rgba(255, 69, 58, .3);
}

#report-list .view-single {
  background: rgba(10, 132, 255, .22);
  border: 1px solid rgba(10, 132, 255, .45);
  color: #5ac8fa;
  font-size: 11px;
  font-weight: 700;
  width: auto;
  min-width: 46px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
#report-list .view-single:active {
  transform: scale(.9);
}

.popup-view-all {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: background .15s, color .15s;
}
.popup-view-all:hover, .popup-view-all:active {
  background: rgba(255, 255, 255, 0.16);
  color: var(--text);
}

/* ============================================================
   PANEL INFERIOR (bottom sheet compacto)
   ============================================================ */
#panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1001;
  background: var(--surface);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid var(--border);
  border-radius: 18px 18px 0 0;
  max-height: 48%;
  display: flex;
  flex-direction: column;
  transition: transform .3s cubic-bezier(.32, .72, .35, 1);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, .4);
  padding-bottom: var(--safe-bottom);
}
#panel.collapsed { transform: translateY(calc(100% - 50px - var(--safe-bottom))); }

#panel-toggle {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  padding: 6px 14px 8px;
  min-height: 50px;
}

.panel-handle {
  width: 40px;
  height: 5px;
  border-radius: 3px;
  background: rgba(255, 255, 255, .25);
  margin: 0 auto 10px;
}

.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-title { font-size: 15px; font-weight: 700; }

#panel-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  height: 26px;
  background: linear-gradient(135deg, #ff5a4e, #c62828);
  border-radius: 9px;
  padding: 0 8px;
  margin-right: 6px;
  font-size: 14px;
  box-shadow: 0 2px 8px rgba(255, 69, 58, .4);
}

#panel-arrow {
  color: var(--text-dim);
  font-size: 18px;
  transition: transform .3s;
}
#panel.collapsed #panel-arrow { transform: rotate(180deg); }

/* Barra de herramientas Administrador */
.admin-toolbar {
  background: rgba(255, 159, 10, 0.12);
  border-bottom: 1px solid rgba(255, 159, 10, 0.35);
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.admin-toolbar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}
.admin-info-badge {
  font-size: 11px;
  font-weight: 800;
  color: #ff9f0a;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.admin-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.admin-action-btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: 9px;
  cursor: pointer;
  transition: transform .1s, background .2s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.admin-action-btn:active { transform: scale(0.93); }
.admin-action-btn.danger {
  background: rgba(255, 69, 58, 0.22);
  border-color: rgba(255, 69, 58, 0.5);
  color: #ff453a;
}
.admin-action-btn.official {
  background: rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.5);
  color: #ffd700;
}
.admin-action-btn.logout {
  color: var(--text-dim);
  font-size: 10.5px;
  padding: 4px 8px;
}

/* PIN Input en Modal Administrador */
.admin-pin-group {
  margin: 10px 0;
}
.admin-pin-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 159, 10, 0.5);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 18px;
  color: #fff;
  text-align: center;
  letter-spacing: 4px;
  outline: none;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
}
.admin-pin-input:focus {
  border-color: #ff9f0a;
  box-shadow: 0 0 14px rgba(255, 159, 10, 0.35);
}

.mini-btn.admin-del {
  background: rgba(255, 69, 58, 0.25) !important;
  border: 1px solid rgba(255, 69, 58, 0.55) !important;
  color: #fff;
  font-size: 15px !important;
}
.mini-btn.admin-verify {
  background: rgba(255, 215, 0, 0.25) !important;
  border: 1px solid rgba(255, 215, 0, 0.6) !important;
  color: #ffd700;
  font-size: 14px !important;
}

/* Sección de Moderación Admin dentro del Popup de Leaflet */
.popup-admin-section {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 159, 10, 0.4);
}
.popup-admin-title {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  color: #ff9f0a;
  text-transform: uppercase;
  margin-bottom: 6px;
  letter-spacing: 0.4px;
}
.popup-admin-btns {
  display: flex;
  gap: 6px;
}
.popup-admin-btn {
  flex: 1;
  padding: 7px 8px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform .1s;
}
.popup-admin-btn:active { transform: scale(0.95); }
.popup-admin-btn.del {
  background: #a81c1c;
  color: #fff;
}
.popup-admin-btn.verify {
  background: #b38f00;
  color: #fff;
}

.badge-verified {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 215, 0, 0.2);
  border: 1px solid rgba(255, 215, 0, 0.6);
  color: #ffd700;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 6px;
  margin-left: 6px;
  text-transform: uppercase;
}

#report-list {
  list-style: none;
  overflow-y: auto;
  padding: 2px 14px 14px;
  -webkit-overflow-scrolling: touch;
}

#report-list li {

  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 10px;
  animation: item-in .3s ease;
}
@keyframes item-in {
  from { transform: translateY(8px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

#report-list .item-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: rgba(255, 69, 58, .16);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  flex-shrink: 0;
}

#report-list .info { flex: 1; min-width: 0; }
#report-list .dist { color: var(--red); font-weight: 800; font-size: 15px; }
#report-list .time { color: var(--text-dim); font-size: 12px; margin-top: 2px; }

#report-list .mini-btn {
  border: none;
  border-radius: 12px;
  width: 42px;
  height: 42px;
  font-size: 17px;
  cursor: pointer;
  color: #fff;
  flex-shrink: 0;
  transition: transform .12s;
}
#report-list .mini-btn:active { transform: scale(.88); }
#report-list .confirm { background: rgba(48, 209, 88, .22); border: 1px solid rgba(48,209,88,.4); }
#report-list .gone    { background: rgba(255, 69, 58, .18); border: 1px solid rgba(255,69,58,.4); }

.empty-msg {
  text-align: center;
  color: var(--text-dim);
  padding: 18px 10px 22px;
  font-size: 14px;
  display: block !important;
  background: none !important;
  border: none !important;
  animation: none !important;
}

/* ============================================================
   TOAST
   ============================================================ */
#toast {
  position: absolute;
  bottom: calc(220px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  background: var(--surface);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  color: var(--text);
  padding: 13px 22px;
  border-radius: 14px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .5);
  border: 1px solid var(--border);
  white-space: nowrap;
  animation: toast-in .25s ease;
}
@keyframes toast-in {
  from { transform: translate(-50%, 12px); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}

/* ============================================================
   MARCADORES DEL MAPA
   ============================================================ */

/* ---- Marcador de retén con ondas (ripple) ---- */
.reten-pin {
  position: relative;
  width: 46px;
  height: 46px;
}
.reten-pin .pin-body {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ff5a4e, #b71c1c);
  border: 3px solid #fff;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .55);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  z-index: 2;
}
.reten-pin .pin-wave,
.reten-pin .pin-wave2 {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid rgba(255, 69, 58, .8);
  animation: reten-wave 2s ease-out infinite;
  z-index: 1;
}
.reten-pin .pin-wave2 { animation-delay: 1s; }
@keyframes reten-wave {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: .9; }
  100% { transform: translate(-50%, -50%) scale(2.4); opacity: 0; }
}

/* Estados de envejecimiento y confirmación de retenes */
.reten-pin.moderate .pin-body {
  background: linear-gradient(145deg, #ff9f0a, #d47a00);
}
.reten-pin.moderate .pin-wave,
.reten-pin.moderate .pin-wave2 {
  border-color: rgba(255, 159, 10, 0.7);
  animation-duration: 2.8s;
}

.reten-pin.aging .pin-body {
  background: linear-gradient(145deg, #8e95a0, #5b626d);
  border-color: #cbd5e1;
  opacity: 0.85;
}
.reten-pin.aging .pin-wave,
.reten-pin.aging .pin-wave2 {
  display: none;
}

.reten-pin .pin-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #ff3b30;
  color: #fff;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 4px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.5);
  border: 1.5px solid #fff;
  z-index: 3;
}

/* Pin específico para Trampas Asfálticas (Huecos y Aceite) */
.reten-pin.hazard-pin .pin-body {
  background: linear-gradient(145deg, #ff7043, #d84315);
  border-color: #ffe082;
}
.reten-pin.hazard-pin .pin-wave,
.reten-pin.hazard-pin .pin-wave2 {
  border-color: rgba(255, 112, 67, 0.85);
}

/* ======= BANNER COMUNITARIO: MOTO HURTADA (RED SOLIDARIA) ======= */
.stolen-bike-banner {
  position: relative;
  margin: 8px 12px 0 12px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(183, 28, 28, 0.95), rgba(216, 67, 21, 0.92));
  border: 1.5px solid #ff5252;
  box-shadow: 0 0 16px rgba(255, 23, 68, 0.65);
  color: #fff;
  z-index: 999;
  overflow: hidden;
  animation: stolenGlow 2s infinite alternate;
}
@keyframes stolenGlow {
  0% { box-shadow: 0 0 8px rgba(255, 23, 68, 0.4); }
  100% { box-shadow: 0 0 20px rgba(255, 23, 68, 0.9); }
}
.stolen-bike-content {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.stolen-bike-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.stolen-bike-tag {
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.5px;
  color: #ffebee;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}
.stolen-bike-time {
  font-size: 10px;
  color: #ffcdd2;
  font-weight: 600;
}
.stolen-bike-desc {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  line-height: 1.25;
}
.stolen-bike-plate {
  background: #ffd700;
  color: #000;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 900;
  letter-spacing: 0.5px;
  display: inline-block;
}
.stolen-bike-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}
.stolen-bike-btn {
  flex: 1;
  background: linear-gradient(135deg, #ffd700, #ffb300);
  color: #000;
  border: none;
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  cursor: pointer;
  transition: all 0.15s;
}
.stolen-bike-btn:active { transform: scale(0.97); }

@keyframes stolenPulse {
  0% { transform: scale(0.9); opacity: 0.85; }
  100% { transform: scale(1.45); opacity: 0.15; }
}
.stolen-bike-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Transición suave para desplazamiento fluido (estilo Google Maps / Uber) */
.leaflet-marker-pane .leaflet-marker-icon.user-marker-smooth {

  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.4, 1) !important;
}

.user-pin {
  position: relative;
  width: 60px;
  height: 60px;
}

.user-pin .user-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--blue);
  border: 3.5px solid #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
  z-index: 2;
  transition: background 0.3s;
}
.user-pin .user-halo {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(10, 132, 255, .45);
  animation: user-pulse 2.2s ease-out infinite;
  z-index: 1;
}
/* Precisión baja (naranja) */
.user-pin.imprecise .user-dot {
  background: #ff9f0a;
}
.user-pin.imprecise .user-halo {
  background: rgba(255, 159, 10, .4);
}
@keyframes user-pulse {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: .9; }
  100% { transform: translate(-50%, -50%) scale(3.4); opacity: 0; }
}

/* Indicador direccional de navegación para moto */
.user-nav-pointer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 32px;
  height: 32px;
  margin-left: -16px;
  margin-top: -16px;
  z-index: 3;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1);
  filter: drop-shadow(0 2px 8px rgba(0, 212, 255, 0.6));
}
.user-pin.navigating .user-dot {
  display: none !important;
}

/* ---- Efecto radar al reportar ---- */
.radar-burst {
  position: relative;
  width: 10px;
  height: 10px;
}
.radar-burst .burst {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 3px solid rgba(255, 69, 58, .9);
  animation: burst 1.2s ease-out forwards;
}
.radar-burst .burst:nth-child(2) { animation-delay: .25s; }
.radar-burst .burst:nth-child(3) { animation-delay: .5s; }
@keyframes burst {
  0%   { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(22); opacity: 0; }
}

/* ============================================================
   POPUPS DE LEAFLET (rediseñados)
   ============================================================ */
.leaflet-popup-content-wrapper {
  background: var(--surface-solid);
  color: var(--text);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 28px rgba(0, 0, 0, .55);
}
.leaflet-popup-tip { background: var(--surface-solid); }
.leaflet-popup-content {
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  margin: 14px 16px;
}
.leaflet-popup-content .popup-title {
  font-weight: 800;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.leaflet-popup-content .popup-meta { color: var(--text-dim); font-size: 12.5px; margin: 3px 0 9px; }
.leaflet-popup-content button {
  border: none;
  border-radius: 11px;
  padding: 9px 13px;
  margin: 0 6px 0 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  color: #fff;
  transition: transform .1s;
}
.leaflet-popup-content button:active { transform: scale(.93); }
.popup-confirm { background: #248a3d; }
.popup-gone    { background: #c62828; }
.leaflet-popup-close-button { color: var(--text-dim) !important; }

/* Controles de zoom de Leaflet rediseñados */
.leaflet-bar {
  border: 1px solid var(--border) !important;
  border-radius: 13px !important;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0,0,0,.3) !important;
}
.leaflet-bar a {
  background: var(--surface) !important;
  color: var(--text) !important;
  border-bottom: 1px solid var(--border) !important;
  backdrop-filter: blur(14px);
}
.leaflet-bar a:hover { background: var(--surface-2) !important; }
.leaflet-control-attribution {
  background: rgba(13, 17, 23, .6) !important;
  color: rgba(255,255,255,.35) !important;
  font-size: 9px !important;
}
.leaflet-control-attribution a { color: rgba(255,255,255,.45) !important; }

/* ============================================================
   DIÁLOGO MODAL PERSONALIZADO (Glassmorphism & Mobile UX)
   ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: modal-fade-in .25s ease-out;
}

@keyframes modal-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface-solid);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
  padding: 22px 20px 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: modal-slide-up .25s cubic-bezier(.34, 1.3, .64, 1);
}

@keyframes modal-slide-up {
  from { transform: translateY(20px) scale(.95); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.modal-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.modal-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
}

.modal-content {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--text-dim);
  white-space: pre-line;
  max-height: 50vh;
  overflow-y: auto;
}

.modal-content strong {
  color: var(--text);
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.modal-btn {
  flex: 1;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform .12s, background-color .15s;
}

.modal-btn:active {
  transform: scale(0.96);
}

.modal-btn-primary {
  background: linear-gradient(135deg, #0a84ff, #0066cc);
  color: #fff;
  box-shadow: 0 4px 14px rgba(10, 132, 255, 0.35);
}

.modal-btn-danger {
  background: linear-gradient(135deg, #ff453a, #c62828);
  color: #fff;
  box-shadow: 0 4px 14px rgba(255, 69, 58, 0.35);
}

.modal-btn-secondary {
  background: var(--surface-2);
  color: var(--text-dim);
  border: 1px solid var(--border);
}

/* ============================================================
   BOTONES DE ADMINISTRADOR: PUBLICIDAD Y CLAVE
   ============================================================ */
.admin-action-btn.ads {
  background: linear-gradient(135deg, rgba(255, 179, 0, 0.25), rgba(255, 140, 0, 0.35));
  border-color: rgba(255, 179, 0, 0.6);
  color: #ffca28;
  font-weight: 700;
}
.admin-action-btn.pin {
  background: rgba(142, 142, 147, 0.2);
  border-color: rgba(142, 142, 147, 0.4);
  color: #d1d1d6;
}

/* Modal Grande de Publicidad */
.modal-card-large {
  max-width: 440px;
  max-height: 85vh;
  overflow-y: auto;
}

/* Métricas de Publicidad */
.ad-stats-box {
  display: flex;
  gap: 10px;
  background: rgba(255, 179, 0, 0.08);
  border: 1px solid rgba(255, 179, 0, 0.25);
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
}
.stat-item {
  flex: 1;
  text-align: center;
}
.stat-num {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #ffca28;
}
.stat-label {
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Formulario de Anuncios */
.ad-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.ad-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 4px;
}
.ad-input, .ad-textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  outline: none;
  box-sizing: border-box;
}
.ad-input:focus, .ad-textarea:focus {
  border-color: #ffca28;
}
.ad-textarea {
  resize: vertical;
  min-height: 56px;
  font-family: inherit;
}
.btn-ad-mini {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: #0a84ff;
  font-size: 12px;
  font-weight: 700;
  padding: 0 12px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}
.modal-actions-ad {
  flex-wrap: wrap;
}

/* ============================================================
   TARJETA FLOTANTE DE PUBLICIDAD PATROCINADA (USUARIOS)
   ============================================================ */
.sponsored-card {
  position: absolute;
  bottom: calc(105px + var(--safe-bottom));
  left: 12px;
  right: 12px;
  max-width: 420px;
  margin: 0 auto;
  z-index: 1050;
  background: rgba(22, 27, 34, 0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 179, 0, 0.4);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6), 0 0 12px rgba(255, 179, 0, 0.15);
  animation: slide-up .3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes slide-up {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.sponsored-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.sponsored-badge {
  font-size: 10px;
  font-weight: 800;
  color: #ffca28;
  background: rgba(255, 179, 0, 0.16);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}
.sponsored-close {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 16px;
  cursor: pointer;
  padding: 2px 6px;
}
.sponsored-close:hover {
  color: #fff;
}

/* Imagen / Flyer del Anuncio en la Tarjeta */
.sponsored-img-wrap {
  width: 100%;
  max-height: 150px;
  overflow: hidden;
  border-radius: 10px;
  margin-bottom: 8px;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sponsored-img {
  width: 100%;
  height: 100%;
  max-height: 150px;
  object-fit: cover;
  display: block;
}

.sponsored-title {
  margin: 0 0 2px 0;
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}
.sponsored-slogan {
  font-size: 11px;
  font-weight: 700;
  color: #ffca28;
  margin-bottom: 4px;
}
.sponsored-desc {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: #d1d1d6;
  line-height: 1.4;
}
.sponsored-footer {
  display: flex;
  gap: 8px;
}
.sponsored-btn-wa {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #25D366, #128C7E);
  color: #fff;
  text-decoration: none;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
  transition: transform .12s, box-shadow .12s;
}
.sponsored-btn-wa:active {
  transform: scale(0.97);
}
.sponsored-btn-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #0A84FF, #0066CC);
  color: #fff;
  text-decoration: none;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(10, 132, 255, 0.3);
  transition: transform .12s;
}
.sponsored-btn-call:active {
  transform: scale(0.97);
}

/* ============================================================
   ESTILOS DE PLANTILLAS Y SUBIDA DE IMÁGENES EN MODAL ADMIN
   ============================================================ */
.ad-templates-section {
  background: rgba(255, 255, 255, 0.04);
  border: 1px dashed rgba(255, 179, 0, 0.3);
  border-radius: 12px;
  padding: 8px 10px;
  margin-bottom: 12px;
}
.ad-section-title {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: #ffca28;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.ad-templates-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ad-tpl-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 9px;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s ease;
}
.ad-tpl-btn:hover, .ad-tpl-btn:active {
  background: rgba(255, 179, 0, 0.25);
  border-color: #ffb300;
  color: #ffca28;
  transform: translateY(-1px);
}

/* Cargador de Imagen */
.ad-image-uploader {
  margin-bottom: 10px;
}
.btn-ad-img-upload {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: rgba(88, 166, 255, 0.12);
  border: 1.5px dashed rgba(88, 166, 255, 0.4);
  color: #58a6ff;
  padding: 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s;
}
.btn-ad-img-upload:active {
  background: rgba(88, 166, 255, 0.25);
}
.ad-img-preview-box {
  position: relative;
  width: 100%;
  max-height: 140px;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255, 179, 0, 0.4);
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ad-img-preview-box img {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  display: block;
}
.btn-ad-img-del {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #ff453a;
  border: 1px solid #ff453a;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 8px;
  cursor: pointer;
}
.ad-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: 12px;
  color: #e6edf3;
  cursor: pointer;
  user-select: none;
}
.ad-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #ffb300;
  cursor: pointer;
}

/* ============================================================
   BARRA COMUNITARIA SUPERIOR (MOTEROS EN RUTA + COMPARTIR + SUGERENCIAS)
   ============================================================ */
.community-bar {
  position: absolute;
  top: calc(82px + var(--safe-top));
  left: 8px;
  right: 8px;
  z-index: 998;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  pointer-events: none;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.community-bar::-webkit-scrollbar {
  display: none;
}
.community-bar > * {
  pointer-events: auto;
}
.community-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.community-actions::-webkit-scrollbar {
  display: none;
}

.badge-hotspot {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 69, 58, 0.2);
  border: 1px solid rgba(255, 69, 58, 0.5);
  color: #ff6b64;
  padding: 1px 6px;
  border-radius: 6px;
  font-size: 10.5px;
  font-weight: 800;
  margin-left: 4px;
}

/* ============================================================
   CHIP DE MOTEROS EN RUTA + BOTÓN COMPARTIR + SUGERENCIAS
   ============================================================ */
.riders-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 11px;
  font-weight: 800;
  color: #30d158;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.45);
}
.riders-dot {
  width: 7px;
  height: 7px;
  background: #30d158;
  border-radius: 50%;
  box-shadow: 0 0 8px #30d158;
  animation: pulse-dot 1.8s infinite;
}
.riders-label {
  color: var(--text-dim);
  font-weight: 700;
  font-size: 10px;
}
@keyframes pulse-dot {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 12px #30d158; }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.btn-share-chip, .btn-feedback-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: #e6edf3;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  transition: transform .12s, background .15s, border-color .15s, color .15s, box-shadow .15s;
}
.btn-share-chip:hover, .btn-feedback-chip:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.55);
}
.btn-share-chip:active, .btn-feedback-chip:active {
  transform: scale(0.93);
}

.btn-share-chip {
  color: #30d158;
}
.btn-share-chip:hover {
  border-color: #30d158;
  color: #44e884;
}

/* ============================================================
   NAVEGACIÓN DE CARRUSEL DE PUBLICIDAD MULTI-CLIENTE
   ============================================================ */
.sponsored-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.sponsored-nav-btn {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .12s;
}
.sponsored-nav-btn:active {
  background: rgba(255, 179, 0, 0.4);
}
.sponsored-dots {
  display: flex;
  gap: 6px;
  align-items: center;
}
.sponsored-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  transition: all .2s ease;
  cursor: pointer;
}
.sponsored-dot.active {
  width: 16px;
  border-radius: 4px;
  background: #ffb300;
  box-shadow: 0 0 8px rgba(255, 179, 0, 0.8);
}

/* ============================================================
   LISTADO DE ANUNCIOS ACTIVOS Y REPORTE DE COBRO (ADMIN)
   ============================================================ */
.ad-active-list-section {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 12px;
}
.admin-active-ads-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  margin-top: 6px;
}
.admin-ad-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(22, 27, 34, 0.8);
  border: 1px solid rgba(255, 179, 0, 0.25);
  border-radius: 10px;
  padding: 8px 10px;
}
.admin-ad-item-info {
  flex: 1;
  min-width: 0;
}
.admin-ad-item-title {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-ad-item-stats {
  font-size: 11px;
  color: #a1a1a6;
  margin-top: 2px;
}
.admin-ad-item-actions {
  display: flex;
  gap: 6px;
}
.btn-ad-billing {
  background: rgba(255, 179, 0, 0.15);
  border: 1px solid #ffb300;
  color: #ffca28;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.btn-ad-billing:active {
  background: rgba(255, 179, 0, 0.35);
}
.btn-ad-del-one {
  background: rgba(255, 69, 58, 0.15);
  border: 1px solid rgba(255, 69, 58, 0.5);
  color: #ff453a;
  font-size: 11px;
  font-weight: 800;
  padding: 5px 7px;
  border-radius: 6px;
  cursor: pointer;
}

/* ============================================================
   BUZÓN DE SUGERENCIAS ADMINISTRADOR (Móvil & PC)
   ============================================================ */
.btn-admin-sug {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(88, 166, 255, 0.18);
  border: 1px solid #58a6ff;
  color: #58a6ff;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: transform .12s, background .2s;
}
.btn-admin-sug:active { transform: scale(0.95); }
.sug-pill {
  background: #da3633;
  color: #fff;
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 800;
}

.admin-sug-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}
.admin-sug-item.unread {
  border-color: #58a6ff;
  background: rgba(88, 166, 255, 0.08);
}
.admin-sug-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
}
.admin-sug-type {
  font-weight: 800;
  color: #ff9f0a;
}
.admin-sug-date {
  color: var(--text-dim);
}
.admin-sug-text {
  font-size: 13px;
  line-height: 1.45;
  color: #fff;
  white-space: pre-wrap;
  word-break: break-word;
}
.admin-sug-contact {
  font-size: 12px;
  color: #30d158;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.admin-sug-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}
.admin-sug-btn {
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--surface);
  color: #fff;
}
.admin-sug-btn.del {
  border-color: rgba(255, 69, 58, 0.4);
  color: #ff453a;
}
.admin-sug-btn.read {
  border-color: rgba(88, 166, 255, 0.5);
  color: #58a6ff;
}
.admin-sug-btn.wa {
  border-color: rgba(48, 209, 88, 0.5);
  color: #30d158;
  background: rgba(48, 209, 88, 0.12);
}

/* ============================================================
   PANTALLA DE PERMISOS OBLIGATORIOS (ONBOARDING)
   ============================================================ */
.permissions-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  z-index: 99999;
  background: rgba(10, 14, 20, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  opacity: 1;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.permissions-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.permissions-card {
  background: #161b22;
  border: 1px solid rgba(255, 90, 30, 0.35);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(255, 90, 30, 0.2);
  border-radius: 20px;
  width: 100%;
  max-width: 380px;
  padding: 24px 20px;
  box-sizing: border-box;
  text-align: center;
  animation: cardPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes cardPop {
  0% { transform: scale(0.92); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}
.perm-badge-main {
  font-size: 38px;
  margin-bottom: 6px;
  animation: pulseGlow 2s infinite ease-in-out;
}
@keyframes pulseGlow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
.perm-title {
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  margin: 0 0 8px 0;
  letter-spacing: -0.3px;
}
.perm-subtitle {
  color: #8b949e;
  font-size: 13px;
  line-height: 1.45;
  margin: 0 0 18px 0;
}
.perm-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
  text-align: left;
}
.perm-item {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color 0.25s, background 0.25s;
}
.perm-item.granted {
  border-color: rgba(48, 209, 88, 0.4);
  background: rgba(48, 209, 88, 0.08);
}
.perm-icon {
  font-size: 24px;
  flex-shrink: 0;
}
.perm-details {
  flex: 1;
  min-width: 0;
}
.perm-name {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 2px;
}
.perm-desc {
  color: #8b949e;
  font-size: 11px;
  line-height: 1.35;
}
.perm-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  flex-shrink: 0;
}
.perm-tag.pending {
  background: rgba(255, 159, 10, 0.2);
  color: #ff9f0a;
  border: 1px solid rgba(255, 159, 10, 0.4);
}
.perm-tag.granted {
  background: rgba(48, 209, 88, 0.2);
  color: #30d158;
  border: 1px solid rgba(48, 209, 88, 0.4);
}
.perm-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.btn-perm-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #ff5a1e, #ff3b30);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(255, 90, 30, 0.4);
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-perm-primary:active {
  transform: scale(0.97);
}
.btn-perm-secondary {
  width: 100%;
  padding: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  color: #58a6ff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}
.btn-perm-secondary:active {
  background: rgba(255, 255, 255, 0.15);
}
.perm-note {
  color: #6e7681;
  font-size: 11px;
  margin: 14px 0 0 0;
}

/* ============================================================
   ESTILOS EXCLUSIVOS MOTEROS VIP (BUSCADOR, RUTAS Y GUÍA)
   ============================================================ */

/* 1. Barra de Búsqueda de Direcciones */
.address-search-container {
  position: relative;
  width: 100%;
  z-index: 1045;
}
.search-input-wrap {
  display: flex;
  align-items: center;
  background: rgba(22, 27, 34, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 24px;
  padding: 6px 14px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 215, 0, 0.15);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.search-input-wrap:focus-within {
  border-color: #ffd700;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.7), 0 0 16px rgba(255, 215, 0, 0.35);
}
.search-icon {
  font-size: 15px;
  margin-right: 8px;
  opacity: 0.85;
}
#address-search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
}
#address-search-input::placeholder {
  color: #8b949e;
  font-size: 12.5px;
}
.btn-clear-search {
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: #c9d1d9;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-size: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-right: 8px;
}
.vip-search-chip {
  background: linear-gradient(135deg, #ffd700, #ff8f00);
  color: #000;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 7px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(255, 215, 0, 0.4);
  white-space: nowrap;
}

/* Barra Comunitaria (Moteros en ruta, Rodadas, Registro, Compartir, Sugerencias) */
.community-bar {
  position: relative;
  width: 100%;
  z-index: 1030;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.community-bar::-webkit-scrollbar {
  display: none;
}
.community-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

/* Dropdown de Resultados de Búsqueda */
.search-results-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  width: 100%;
  z-index: 1099;
  background: rgba(22, 27, 34, 0.98);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 14px;
  max-height: 240px;
  overflow-y: auto;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.85);
  display: flex;
  flex-direction: column;
}
.search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: background 0.15s;
}
.search-result-item:last-child {
  border-bottom: none;
}
.search-result-item:hover, .search-result-item:active {
  background: rgba(255, 215, 0, 0.12);
}
.search-res-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.search-res-info {
  flex: 1;
  min-width: 0;
}
.search-res-title {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-res-subtitle {
  color: #8b949e;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 2. Tarjeta Flotante de Navegación de Ruta GPS */
.route-nav-card {
  position: absolute;
  bottom: calc(100px + var(--safe-bottom));
  left: 12px;
  right: 12px;
  max-width: 440px;
  margin: 0 auto;
  z-index: 1060;
  background: rgba(13, 17, 23, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid #ffd700;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.7), 0 0 16px rgba(255, 215, 0, 0.25);
  animation: slide-up 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.route-nav-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.route-nav-badge {
  background: rgba(255, 215, 0, 0.18);
  border: 1px solid #ffd700;
  color: #ffd700;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}
.route-nav-close {
  background: none;
  border: none;
  color: #8b949e;
  font-size: 16px;
  cursor: pointer;
}
.route-dest-name {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.route-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: #c9d1d9;
  margin-bottom: 12px;
}
.route-metric-item strong {
  color: #ffd700;
  font-size: 14px;
}
.route-checkpoint-status {
  font-size: 11.5px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: auto;
}
.route-checkpoint-status.clear {
  background: rgba(46, 160, 67, 0.2);
  color: #3fb950;
  border: 1px solid rgba(46, 160, 67, 0.4);
}
.route-checkpoint-status.warning {
  background: rgba(218, 54, 51, 0.25);
  color: #ff7b72;
  border: 1px solid #da3633;
  animation: pulse-ring 1.5s infinite;
}
.route-nav-actions {
  display: flex;
  gap: 8px;
}
.btn-route-action {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-route-action.primary {
  background: linear-gradient(135deg, #ffd700, #ff8f00);
  color: #000;
}
.btn-route-action.danger {
  flex: 0 0 85px;
  background: rgba(218, 54, 51, 0.2);
  border: 1px solid rgba(218, 54, 51, 0.5);
  color: #ff7b72;
}

/* Modo Minimizado / Barra HUD de Navegación */
.route-nav-card.minimized {
  padding: 8px 14px;
  bottom: calc(75px + var(--safe-bottom));
  max-width: 420px;
  border-radius: 26px;
  background: rgba(13, 17, 23, 0.94);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.6), 0 0 10px rgba(255, 215, 0, 0.3);
}
.route-nav-card.minimized #route-nav-full {
  display: none !important;
}
.route-nav-card.minimized #route-nav-mini {
  display: flex !important;
}

.route-nav-mini-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mini-left {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.mini-badge {
  font-size: 10px;
  font-weight: 800;
  color: #ffd700;
  background: rgba(255, 215, 0, 0.15);
  padding: 2px 5px;
  border-radius: 4px;
  flex-shrink: 0;
}
.mini-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}
.mini-tag {
  font-size: 11px;
  font-weight: 700;
  color: #30d158;
  background: rgba(48, 209, 88, 0.15);
  padding: 2px 6px;
  border-radius: 10px;
  white-space: nowrap;
  flex-shrink: 0;
}
.mini-right {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}
.btn-mini-hud {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.btn-mini-hud:active {
  transform: scale(0.9);
}
.btn-mini-hud.danger {
  background: rgba(218, 54, 51, 0.25);
  border-color: #da3633;
  color: #ff7b72;
}

/* Cuadro de Próxima Maniobra en Navegación */
.route-maneuver-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(22, 27, 34, 0.9);
  border: 1px solid rgba(255, 215, 0, 0.4);
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 10px;
}
.maneuver-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd700, #ff8f00);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 10px rgba(255, 215, 0, 0.4);
}
.maneuver-icon {
  font-size: 18px;
  color: #000;
}
.maneuver-text-wrap {
  flex: 1;
  min-width: 0;
}
.maneuver-instruction {
  color: #fff;
  font-size: 13.5px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.maneuver-dist {
  color: #58a6ff;
  font-size: 11.5px;
  font-weight: 700;
}

/* Alerta de Incidente / Trancón en Ruta */
.route-incident-alert {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(218, 54, 51, 0.2);
  border: 1px solid #da3633;
  border-radius: 12px;
  padding: 8px 12px;
  margin-bottom: 10px;
  animation: pulse-ring 1.8s infinite;
}
.incident-icon {
  font-size: 20px;
  flex-shrink: 0;
}
.incident-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.incident-content strong {
  color: #ff7b72;
  font-size: 12px;
  font-weight: 800;
}
.incident-content span {
  color: #e6edf3;
  font-size: 11px;
}
.btn-switch-alt {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #fff;
  border: none;
  padding: 5px 9px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.5);
  flex-shrink: 0;
}
.btn-switch-alt:active {
  transform: scale(0.95);
}

/* Selector de Rutas Alternas */
.route-alternatives-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 10px;
}
.route-alt-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  border-radius: 10px;
  padding: 6px 8px;
  cursor: pointer;
  transition: all 0.2s;
}
.route-alt-tab.active {
  background: rgba(0, 212, 255, 0.15);
  border-color: #00d4ff;
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.3);
}
.route-alt-tab.alt-active {
  background: rgba(168, 85, 247, 0.2);
  border-color: #a855f7;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.4);
}
.alt-tab-tag {
  font-size: 10.5px;
  font-weight: 700;
  color: #8b949e;
}
.route-alt-tab.active .alt-tab-tag {
  color: #00d4ff;
}
.route-alt-tab.alt-active .alt-tab-tag {
  color: #a855f7;
}
.alt-tab-time {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

/* Botón Flotante Recentrar en Conductor */
.btn-recenter-driver {
  position: absolute;
  bottom: calc(140px + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1050;
  background: rgba(13, 17, 23, 0.94);
  border: 1.5px solid #ffd700;
  color: #ffd700;
  font-size: 12.5px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 24px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 12px rgba(255, 215, 0, 0.35);
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  animation: slide-up 0.2s ease-out;
}
.btn-recenter-driver:active {
  transform: translateX(-50%) scale(0.95);
}

/* Capa de Tráfico Activa en Layer Switcher */
#btn-traffic-layer.active {
  background: linear-gradient(135deg, #238636, #2ea043);
  color: #fff;
  border-color: #3fb950;
  box-shadow: 0 0 10px rgba(63, 185, 80, 0.5);
}

/* HUD Minimizado mejoras */
.mini-maneuver-icon {
  font-size: 18px;
  flex-shrink: 0;
}
.mini-texts {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.mini-instruction {
  color: #ffd700;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
.mini-meta {
  font-size: 11px;
  color: #c9d1d9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}
.mini-dest-tag {
  color: #fff;
  font-weight: 700;
}

/* 3. Estilos de Guía Turística & Rodadas */
.tourist-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.tourist-tab-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #c9d1d9;
  padding: 6px 12px;
  border-radius: 16px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}
.tourist-tab-btn.active {
  background: rgba(255, 215, 0, 0.2);
  border-color: #ffd700;
  color: #ffd700;
}
.tourist-card-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.tourist-spot-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.tourist-spot-header {
  padding: 12px 14px 4px 14px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.tourist-spot-title {
  color: #fff;
  font-size: 14.5px;
  font-weight: 800;
}
.tourist-spot-cat {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 10px;
  background: rgba(255, 215, 0, 0.15);
  color: #ffd700;
}
.tourist-spot-body {
  padding: 4px 14px 10px 14px;
  color: #8b949e;
  font-size: 12px;
  line-height: 1.45;
}
.tourist-spot-meta {
  display: flex;
  gap: 10px;
  margin-top: 6px;
  font-size: 11px;
}
.tourist-meta-pill {
  background: rgba(255, 255, 255, 0.06);
  padding: 2px 8px;
  border-radius: 8px;
  color: #c9d1d9;
}
.tourist-spot-actions {
  padding: 8px 14px 12px 14px;
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}
.btn-spot-route {
  flex: 1;
  background: linear-gradient(135deg, #ffd700, #ff8f00);
  color: #000;
  border: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-spot-wa {
  background: rgba(46, 160, 67, 0.2);
  border: 1px solid #2ea043;
  color: #3fb950;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 4. Lista de Beneficios VIP */
.vip-perks-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 14px 0;
}
.vip-perk-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  background: rgba(255, 215, 0, 0.06);
  border: 1px solid rgba(255, 215, 0, 0.2);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12.5px;
  color: #e6edf3;
  line-height: 1.4;
}
.vip-perk-item span {
  font-size: 20px;
  flex-shrink: 0;
}
.vip-perk-item strong {
  color: #ffd700;
}

/* ======= BANNER INSTALACIÓN PWA IPHONE ======= */
.ios-pwa-banner {
  position: fixed;
  bottom: calc(15px + var(--safe-bottom));
  left: 12px;
  right: 12px;
  z-index: 99999;
  background: rgba(18, 22, 28, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1.5px solid rgba(255, 90, 30, 0.5);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 90, 30, 0.25);
  animation: slideUpIos 0.4s ease-out;
}
@keyframes slideUpIos {
  from { transform: translateY(100px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
.ios-pwa-content {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ios-pwa-icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.ios-pwa-info {
  flex: 1;
  min-width: 0;
}
.ios-pwa-title {
  font-size: 13.5px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 3px;
}
.ios-pwa-desc {
  font-size: 11.5px;
  color: #8b949e;
  line-height: 1.35;
}
.ios-share-badge {
  background: rgba(255, 255, 255, 0.12);
  color: #00d4ff;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  display: inline-block;
}
.ios-pwa-close {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #8b949e;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ios-pwa-arrow {
  text-align: center;
  color: #ff5a1e;
  font-size: 13px;
  margin-top: 4px;
  animation: bounceArrow 1.5s infinite;
}
@keyframes bounceArrow {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}

/* ============================================================
   RADIO PRIVADA WALKIE-TALKIE (PTT) Y CHAT GRUPO PILOTO
   ============================================================ */
.pilot-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 99998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
}
.pilot-modal-card {
  background: linear-gradient(145deg, #0b1320, #080d16);
  border: 2px solid #0284c7;
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(2, 132, 199, 0.35);
  overflow: hidden;
  animation: pilotModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes pilotModalIn {
  from { transform: scale(0.92) translateY(20px); opacity: 0; }
  to { transform: scale(1) translateY(0); opacity: 1; }
}

/* Cabecera de la Radio */
.pilot-header {
  padding: 14px 16px;
  border-bottom: 1px solid rgba(2, 132, 199, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(2, 132, 199, 0.08);
}
.pilot-header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pilot-radio-icon {
  font-size: 26px;
  filter: drop-shadow(0 0 8px rgba(56, 189, 248, 0.6));
}
.pilot-title {
  color: #fff;
  font-size: 15px;
  font-weight: 800;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pilot-channel-tag {
  color: #38bdf8;
  font-size: 11px;
  font-weight: 600;
  display: block;
}
.pilot-badge-live {
  background: rgba(16, 185, 129, 0.2);
  border: 1px solid #10b981;
  color: #34d399;
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.pilot-badge-dot {
  width: 6px;
  height: 6px;
  background: #34d399;
  border-radius: 50%;
  box-shadow: 0 0 6px #34d399;
  animation: pilotBlink 1.5s infinite;
}
@keyframes pilotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.pilot-close-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}
.pilot-close-btn:hover {
  background: rgba(239, 68, 68, 0.25);
  color: #f87171;
}

/* Selector de Modo: PTT vs Manos Libres */
.pilot-mode-bar {
  display: flex;
  padding: 8px 14px;
  background: rgba(0, 0, 0, 0.3);
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pilot-mode-btn {
  flex: 1;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #94a3b8;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
}
.pilot-mode-btn.active {
  background: rgba(2, 132, 199, 0.25);
  border-color: #38bdf8;
  color: #38bdf8;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.25);
}

/* Zona Central Walkie-Talkie PTT */
.pilot-ptt-zone {
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at center, rgba(2, 132, 199, 0.12) 0%, transparent 70%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pilot-ptt-btn {
  width: 130px;
  height: 130px;
  border-radius: 50%;
  border: 4px solid #0284c7;
  background: linear-gradient(145deg, #0369a1, #0c4a6e);
  color: #fff;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(2, 132, 199, 0.4);
  transition: transform 0.15s, box-shadow 0.15s, background 0.2s;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
  outline: none;
}
.pilot-ptt-btn:hover {
  transform: scale(1.03);
}
.pilot-ptt-btn.transmitting {
  border-color: #ef4444 !important;
  background: linear-gradient(145deg, #dc2626, #991b1b) !important;
  box-shadow: 0 0 35px rgba(239, 68, 68, 0.7), inset 0 0 15px rgba(255, 255, 255, 0.3) !important;
  animation: pttPulse 1s infinite alternate;
}
@keyframes pttPulse {
  from { transform: scale(1.02); }
  to { transform: scale(1.08); }
}
.pilot-ptt-icon {
  font-size: 38px;
}
.pilot-ptt-text {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.pilot-ptt-hint {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 10px;
  text-align: center;
}
.pilot-ptt-status-pill {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 800;
  color: #38bdf8;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pilot-ptt-status-pill.recording {
  color: #ef4444;
}

/* Fila de Chips Rápidos de Calibración */
.pilot-quick-chips {
  display: flex;
  gap: 6px;
  padding: 8px 12px;
  overflow-x: auto;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  scrollbar-width: none;
}
.pilot-quick-chips::-webkit-scrollbar { display: none; }
.pilot-quick-chip {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
  padding: 5px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.pilot-quick-chip:hover, .pilot-quick-chip:active {
  background: rgba(56, 189, 248, 0.2);
  border-color: #38bdf8;
  color: #38bdf8;
}

/* Feed de Mensajes y Audios */
.pilot-feed-container {
  flex: 1;
  min-height: 180px;
  max-height: 250px;
  overflow-y: auto;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(0, 0, 0, 0.15);
}
.pilot-msg-bubble {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pilot-msg-bubble.mine {
  background: rgba(2, 132, 199, 0.12);
  border-color: rgba(2, 132, 199, 0.35);
  align-self: flex-end;
  max-width: 90%;
}
.pilot-msg-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  color: #64748b;
}
.pilot-msg-author {
  font-weight: 800;
  color: #38bdf8;
}
.pilot-msg-bubble.mine .pilot-msg-author {
  color: #34d399;
}
.pilot-msg-text {
  font-size: 13px;
  color: #f1f5f9;
  line-height: 1.35;
}
.pilot-audio-player {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 10px;
  padding: 6px 10px;
  margin-top: 2px;
}
.pilot-audio-play-btn {
  background: #0284c7;
  border: none;
  color: #fff;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.pilot-audio-waveform {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 2px;
  height: 20px;
}
.pilot-waveform-bar {
  flex: 1;
  background: #38bdf8;
  height: 30%;
  border-radius: 2px;
  transition: height 0.15s;
}
.pilot-audio-duration {
  font-size: 10px;
  color: #94a3b8;
  font-weight: 700;
  flex-shrink: 0;
}

/* Barra Inferior de Entrada de Texto */
.pilot-input-bar {
  padding: 10px 14px;
  background: rgba(11, 19, 32, 0.95);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  gap: 8px;
  align-items: center;
}
.pilot-text-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 8px 12px;
  color: #fff;
  font-size: 12.5px;
  outline: none;
}
.pilot-text-input:focus {
  border-color: #38bdf8;
}
.pilot-send-btn {
  background: #0284c7;
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 12px;
  cursor: pointer;
}

/* Modal de Ingreso de PIN */
.pilot-pin-card {
  background: linear-gradient(145deg, #0b1320, #080d16);
  border: 2px solid #0284c7;
  border-radius: 20px;
  width: 100%;
  max-width: 360px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.9), 0 0 25px rgba(2, 132, 199, 0.35);
  animation: pilotModalIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.pilot-pin-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 20px 0;
}
.pilot-pin-box {
  width: 46px;
  height: 52px;
  background: rgba(255, 255, 255, 0.06);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  font-size: 24px;
  font-weight: 800;
  text-align: center;
  outline: none;
}
.pilot-pin-box:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.permissions-card { max-height: 92dvh; overflow-y: auto; }
.pilot-pin-inputs { gap: 6px; }
.pilot-pin-box { min-width: 0; width: 38px; flex: 0 1 38px; }
button:focus-visible, summary:focus-visible, a:focus-visible { outline: 3px solid #76c7ff; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
.pilot-pin-error {
  color: #f87171;
  font-size: 12px;
  font-weight: 700;
  margin-top: 8px;
  min-height: 18px;
}
