:root {
  --glass-bg: rgba(15, 23, 42, 0.84);
  --glass-border: rgba(255, 255, 255, 0.16);
  --riv-verde: #10b981;
  --riv-verde-dark: #064e3b;
  --riv-lima: #a3e635;
  --riv-amarillo: #facc15;
  --riv-celeste: #38bdf8;
  --riv-rojo: #ef4444;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

body {
  position: relative;
  width: 100vw;
  height: 100dvh;
  background: #090d16;
  overflow: hidden;
  color: #f8fafc;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #090d16;
  cursor: crosshair;
}

#map.modo-seleccion {
  cursor: cell;
}

.leaflet-control-zoom {
  margin-top: 175px !important;
  border: 1px solid var(--glass-border) !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45) !important;
}

.leaflet-control-zoom a {
  background: var(--glass-bg) !important;
  color: #ffffff !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border) !important;
}

/* Brújula y Controles de Rotación */
.compass-stack {
  position: fixed;
  right: 10px;
  top: 255px;
  z-index: 1080;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.compass-btn {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s ease;
}

.compass-btn:hover {
  transform: scale(1.07);
}

#brujula-dial {
  display: block;
  transition: transform 0.12s linear;
}

.rotate-mini-row {
  display: flex;
  gap: 3px;
}

.rot-mini-btn {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
  backdrop-filter: blur(10px);
  color: #e2e8f0;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.rot-mini-btn:hover {
  background: rgba(52, 211, 153, 0.25);
  border-color: #34d399;
}

.satelite-nocturno {
  filter: brightness(0.46) contrast(1.25) saturate(0.75) hue-rotate(195deg);
}

/* Banner de Modo Selección en Mapa */
.banner-seleccion {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(250, 204, 21, 0.96);
  color: #0f172a;
  border: 2px solid #ffffff;
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
}

.banner-seleccion.oculto { display: none !important; }

.btn-cancelar-sel {
  background: #0f172a;
  color: #ffffff;
  border: none;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 800;
  cursor: pointer;
}

/* Barra de Navegación Paso a Paso */
.barra-nav-paso {
  position: fixed;
  top: 148px;
  left: 50%;
  transform: translateX(-50%);
  width: min(94vw, 520px);
  background: rgba(6, 78, 59, 0.94);
  backdrop-filter: blur(18px);
  border: 1.5px solid #34d399;
  border-radius: 16px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1250;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.55);
}

.barra-nav-paso.oculto { display: none !important; }

.paso-icono {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(163, 230, 53, 0.22);
  border: 1px solid #a3e635;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

.paso-texto-wrap { flex: 1; min-width: 0; }
.paso-principal { font-size: 0.84rem; font-weight: 800; color: #ffffff; line-height: 1.25; }
.paso-secundario { font-size: 0.72rem; font-weight: 600; color: #a7f3d0; margin-top: 2px; }

/* Toast Flotante No Intrusivo */
.toast-flotante {
  position: fixed;
  bottom: 185px;
  left: 50%;
  transform: translateX(-50%);
  max-width: min(92vw, 460px);
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  border: 1.5px solid #38bdf8;
  color: #f8fafc;
  padding: 9px 15px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  text-align: center;
  z-index: 1650;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.65);
  animation: fadeSlideUp 0.22s ease;
}

.toast-flotante.oculto { display: none !important; }

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translate(-50%, 8px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* HUD Superior */
.hud-top {
  position: fixed;
  top: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  z-index: 1100;
  pointer-events: none;
}

.hud-left-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}

.hud-right-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
}

.glass-card {
  pointer-events: auto;
  background: var(--glass-bg);
  backdrop-filter: blur(18px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  padding: 6px 13px 6px 8px;
  display: flex;
  align-items: center;
  gap: 9px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.48);
}

.logo-svg-wrap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.titulo-row { display: flex; align-items: center; gap: 7px; }
.brand-info h1 { font-size: 1.06rem; font-weight: 800; color: #ffffff; }

.pill-vivo {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(52, 211, 153, 0.5);
  color: #6ee7b7;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  animation: pulseGlow 1.6s infinite;
}

@keyframes pulseGlow {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(1.3); }
}

.sub-ciudad { font-size: 0.7rem; color: #94a3b8; font-weight: 600; }

.acciones-top { pointer-events: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }

.btn-glass {
  backdrop-filter: blur(14px);
  border-radius: 13px;
  padding: 8px 11px;
  font-size: 0.77rem;
  font-weight: 800;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
}

.btn-glass.cuenta { background: rgba(30, 41, 59, 0.9); border-color: rgba(148, 163, 184, 0.45); }
.btn-glass.cuenta.verificado { background: rgba(6, 95, 70, 0.92); border-color: #34d399; color: #d1fae5; }
.btn-glass.sos { background: linear-gradient(135deg, #ef4444, #b91c1c); }
.btn-glass.refresco { background: linear-gradient(135deg, #0284c7, #0369a1); }

/* Widget Meteorológico con Alerta SMN integrada */
.weather-widget {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 18px;
  padding: 7px 10px 8px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
}

.weather-main-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
}

.clima-ilustracion { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; }
.clima-datos { display: flex; flex-direction: column; line-height: 1.15; }
.clima-temp-principal { font-size: 1.12rem; font-weight: 800; color: #ffffff; }
.clima-st { font-size: 0.72rem; font-weight: 700; color: #cbd5e1; }
.clima-desc { font-size: 0.66rem; font-weight: 700; color: #94a3b8; }

.clima-alerta-pill {
  font-size: 0.67rem;
  font-weight: 800;
  text-align: center;
  padding: 3px 8px;
  border-radius: 9px;
  line-height: 1.2;
  letter-spacing: 0.1px;
  transition: all 0.2s ease;
}

.clima-alerta-pill.sin-alerta {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: #a7f3d0;
}

.clima-alerta-pill.alerta-amarilla {
  background: rgba(250, 204, 21, 0.94);
  border: 1px solid #ffffff;
  color: #0f172a;
}

.clima-alerta-pill.alerta-naranja {
  background: rgba(249, 115, 22, 0.95);
  border: 1px solid #ffffff;
  color: #ffffff;
}

.clima-alerta-pill.alerta-roja {
  background: rgba(220, 38, 38, 0.96);
  border: 1px solid #ffffff;
  color: #ffffff;
}

.glass-chip {
  pointer-events: auto;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.73rem;
  font-weight: 700;
  color: #e2e8f0;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.glass-chip.oculto { display: none; }

.glass-chip.salud {
  background: rgba(180, 83, 9, 0.9);
  border-color: rgba(251, 191, 36, 0.65);
  color: #fef3c7;
}

.glass-chip.salud.alerta-pico {
  background: rgba(127, 29, 29, 0.94);
  border-color: #f87171;
  color: #fee2e2;
}

.controles-mapa-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }

.btn-chip-capas {
  pointer-events: auto;
  background: var(--glass-bg);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(52, 211, 153, 0.5);
  border-radius: 999px;
  padding: 5px 12px;
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.btn-chip-agua {
  pointer-events: auto;
  background: rgba(3, 105, 161, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(56, 189, 248, 0.65);
  border-radius: 999px;
  padding: 5px 11px;
  color: #e0f2fe;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.btn-chip-noticias {
  pointer-events: auto;
  background: rgba(180, 83, 9, 0.9);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(251, 191, 36, 0.65);
  border-radius: 999px;
  padding: 5px 11px;
  color: #fef3c7;
  font-size: 0.74rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* Panel Lateral Noticias Climáticas Argentina */
.news-drawer {
  position: fixed;
  top: 112px;
  left: 12px;
  width: min(350px, 92vw);
  max-height: calc(100dvh - 300px);
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(18px);
  border: 1.5px solid rgba(251, 191, 36, 0.6);
  border-radius: 18px;
  padding: 13px 14px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.68);
  z-index: 1360;
}

.news-drawer.oculto { display: none !important; }

.alerta-regional-card {
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 0.77rem;
  font-weight: 700;
  color: #d1fae5;
  margin-bottom: 10px;
  line-height: 1.35;
}

.alerta-regional-card.alerta-activa {
  background: rgba(185, 28, 28, 0.32);
  border-color: #f87171;
  color: #fee2e2;
}

.news-subtitulo {
  font-size: 0.69rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: #94a3b8;
  margin-bottom: 6px;
}

.lista-noticias {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.noticia-item {
  display: block;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 11px;
  padding: 8px 10px;
  color: #f8fafc;
  transition: background 0.15s ease;
}

.noticia-item:hover {
  background: rgba(251, 191, 36, 0.16);
  border-color: rgba(251, 191, 36, 0.45);
}

.noticia-titulo {
  font-size: 0.77rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 3px;
}

.noticia-meta {
  font-size: 0.67rem;
  color: #94a3b8;
  font-weight: 600;
}

/* Compactación Mobile-First */
@media (max-width: 540px) {
  .hud-top { top: 8px; left: 8px; right: 8px; }
  .brand-pill { padding: 5px 10px 5px 7px; }
  .sub-ciudad, .pill-vivo { display: none; }
  .brand-info h1 { font-size: 0.96rem; }
  .btn-glass { padding: 6px 8px; font-size: 0.72rem; border-radius: 10px; }
  .weather-widget { padding: 5px 8px 6px; border-radius: 14px; gap: 4px; }
  .weather-main-row { gap: 5px; }
  .termometro-box, .clima-st { display: none; }
  .clima-ilustracion { width: 22px; height: 22px; }
  .clima-ilustracion svg { width: 22px; height: 22px; }
  .clima-datos { flex-direction: row; align-items: center; gap: 5px; }
  .clima-temp-principal { font-size: 0.85rem; }
  .clima-desc { font-size: 0.68rem; color: #cbd5e1; }
  .clima-alerta-pill { font-size: 0.62rem; padding: 2px 6px; border-radius: 7px; }
  .leaflet-control-zoom { margin-top: 132px !important; }
  .compass-stack { top: 212px; right: 8px; }
  .barra-nav-paso { top: 118px; }
}

/* Popover Desplegable de Capas */
.popover-capas {
  pointer-events: auto;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 16px;
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.6);
  min-width: 245px;
}

.popover-capas.oculto { display: none; }
.capas-grupo { display: flex; flex-direction: column; gap: 4px; }
.capas-label { font-size: 0.68rem; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.4px; }

.glass-segment {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 3px;
  display: inline-flex;
  gap: 2px;
}

.glass-segment.oculto { display: none; }

.seg-btn {
  padding: 4px 11px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.73rem;
  font-weight: 700;
  cursor: pointer;
}

.seg-btn.activo { background: var(--riv-verde); color: #052e16; font-weight: 800; }

.glass-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.glass-toggle input { display: none; }

.toggle-slider {
  width: 30px;
  height: 17px;
  background: #334155;
  border-radius: 999px;
  position: relative;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.toggle-slider::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 13px;
  height: 13px;
  background: #ffffff;
  border-radius: 50%;
  transition: transform 0.2s ease;
}

.glass-toggle input:checked + .toggle-slider { background: var(--riv-verde); }
.glass-toggle.lluvia input:checked + .toggle-slider { background: #0284c7; }
.glass-toggle input:checked + .toggle-slider::after { transform: translateX(13px); }
.toggle-texto { font-size: 0.75rem; font-weight: 700; color: #f8fafc; }

/* Banner de verificación de anegamiento activo */
.banner-agua {
  position: fixed;
  bottom: 185px;
  left: 12px;
  right: 12px;
  max-width: 540px;
  margin: 0 auto;
  background: rgba(12, 74, 110, 0.95);
  backdrop-filter: blur(16px);
  border: 1.5px solid #38bdf8;
  border-radius: 16px;
  padding: 10px 14px;
  z-index: 1320;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.banner-agua.oculto { display: none !important; }
.banner-agua-top { display: flex; justify-content: space-between; align-items: center; font-size: 0.8rem; font-weight: 700; color: #e0f2fe; }
.banner-agua-btns { display: flex; gap: 7px; }
.btn-agua-ok { flex: 1; padding: 6px; border-radius: 8px; border: none; background: #0284c7; color: #fff; font-weight: 800; font-size: 0.75rem; cursor: pointer; }
.btn-agua-no { flex: 1; padding: 6px; border-radius: 8px; border: 1px solid rgba(255,255,255,0.25); background: rgba(255,255,255,0.1); color: #e0f2fe; font-weight: 700; font-size: 0.75rem; cursor: pointer; }

/* Pines de Refresco con etiqueta visible solo en HOVER */
.pin-refugio-wrap {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  cursor: pointer !important;
  pointer-events: auto !important;
  white-space: nowrap;
}

.pin-refugio-head {
  width: 28px;
  height: 28px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, #38bdf8, #0284c7);
  border: 2px solid #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.15s ease;
}

.pin-refugio-wrap:hover .pin-refugio-head {
  transform: rotate(-45deg) scale(1.12);
}

.pin-refugio-head span { transform: rotate(45deg); font-size: 13px; }

.pin-refugio-tag {
  opacity: 0;
  visibility: hidden;
  transform: translateX(-4px);
  transition: opacity 0.16s ease, transform 0.16s ease;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  color: #ffffff;
  border: 1px solid rgba(56, 189, 248, 0.75);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.65);
  pointer-events: none;
}

.pin-refugio-wrap:hover .pin-refugio-tag,
.pin-refugio-wrap.siempre-visible .pin-refugio-tag {
  opacity: 1;
  visibility: visible;
  transform: translateX(0);
}

.poi-comercio { display: inline-flex !important; align-items: center; gap: 4px; white-space: nowrap; cursor: pointer !important; pointer-events: auto !important; }
.poi-pin-mini { width: 13px; height: 13px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 1.5px solid #ffffff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.85); flex-shrink: 0; }
.poi-label { font-size: 11px; font-weight: 700; color: #ffffff; text-shadow: -1px -1px 0 #090d16, 1px -1px 0 #090d16, -1px 1px 0 #090d16, 1px 1px 0 #090d16, 0 2px 5px #000; }

/* Modales */
.floating-modal {
  position: fixed;
  top: 145px;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 430px);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(18px);
  border: 1.5px solid rgba(16, 185, 129, 0.65);
  border-radius: 20px;
  padding: 14px 16px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.65);
  z-index: 1350;
  color: #f8fafc;
}

.floating-modal.sos-card { border-color: rgba(239, 68, 68, 0.8); }
.floating-modal.inspector, .floating-modal.agua-card { border-color: rgba(56, 189, 248, 0.75); }
.floating-modal.oculto { display: none !important; }

.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.modal-titulo { font-weight: 800; font-size: 0.95rem; color: #34d399; }
.btn-close { background: rgba(255, 255, 255, 0.12); color: #f8fafc; border: none; border-radius: 50%; width: 26px; height: 26px; font-weight: 800; cursor: pointer; flex-shrink: 0; }

.sos-texto { font-size: 0.81rem; color: #cbd5e1; margin-bottom: 10px; line-height: 1.4; }
.sos-botones { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.btn-llamar { display: block; text-align: center; text-decoration: none; background: #dc2626; color: #ffffff; padding: 10px 6px; border-radius: 11px; font-weight: 800; font-size: 0.79rem; }
.btn-llamar.sec { background: #1e293b; border: 1px solid var(--glass-border); }

.burbuja-metricas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; text-align: center; }
.metrica-box { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 12px; padding: 7px 4px; }
.metrica-valor { display: block; font-size: 1rem; font-weight: 800; color: #34d399; }
.metrica-label { font-size: 0.69rem; color: #94a3b8; font-weight: 600; }

.acciones-ab-rapidas { margin-top: 9px; display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.btn-ab-punto { padding: 8px 6px; border-radius: 10px; border: none; font-size: 0.76rem; font-weight: 800; cursor: pointer; }
.btn-ab-punto.origen { background: #065f46; color: #d1fae5; border: 1px solid #34d399; }
.btn-ab-punto.destino { background: #10b981; color: #052e16; }

.acciones-reporte { margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.btn-reporte { padding: 7px 6px; border-radius: 9px; border: 1px solid var(--glass-border); background: rgba(255, 255, 255, 0.08); color: #e2e8f0; font-size: 0.72rem; font-weight: 700; cursor: pointer; }
.btn-whatsapp { margin-top: 9px; width: 100%; padding: 9px; border-radius: 11px; border: none; background: linear-gradient(135deg, #10b981, #059669); color: #052e16; font-weight: 800; font-size: 0.82rem; cursor: pointer; }

.btn-google-signin {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: #ffffff;
  color: #1f2937;
  border: none;
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 800;
  cursor: pointer;
  margin-top: 8px;
}

/* Drawer Inferior Derecho */
.drawer-detalle {
  position: fixed;
  right: 12px;
  bottom: 168px;
  width: min(325px, 90vw);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(18px);
  border: 1.5px solid rgba(56, 189, 248, 0.65);
  border-radius: 18px;
  padding: 13px 15px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  z-index: 1400;
}
.drawer-detalle.oculto { display: none !important; }
.drawer-badge { font-size: 0.7rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: rgba(56, 189, 248, 0.2); color: #7dd3fc; }
.drawer-badge.comercio { background: rgba(148, 163, 184, 0.2); color: #cbd5e1; }
.drawer-titulo { font-size: 0.98rem; font-weight: 800; color: #ffffff; margin-bottom: 2px; }
.drawer-subtitulo { font-size: 0.75rem; color: #94a3b8; margin-bottom: 8px; }
.drawer-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.tag-item { font-size: 0.71rem; font-weight: 700; padding: 3px 8px; border-radius: 7px; background: rgba(16, 185, 129, 0.18); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.35); }
.drawer-colab { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 9px; }
.btn-colab-clima { padding: 6px 5px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, 0.16); background: rgba(255, 255, 255, 0.07); color: #e2e8f0; font-size: 0.7rem; font-weight: 700; cursor: pointer; }
.btn-colab-clima.activo-si { background: rgba(56, 189, 248, 0.25); border-color: #38bdf8; color: #bae6fd; }
.btn-colab-clima.activo-no { background: rgba(250, 204, 21, 0.2); border-color: #facc15; color: #fef08a; }
.drawer-btn-ir { width: 100%; padding: 9px 10px; border-radius: 11px; border: none; background: linear-gradient(135deg, #10b981, #059669); color: #052e16; font-weight: 800; font-size: 0.83rem; cursor: pointer; }

/* Dock Flotante Inferior */
.hud-dock {
  position: fixed;
  bottom: 12px;
  left: 12px;
  right: 12px;
  max-width: 840px;
  margin: 0 auto;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  padding: 11px 13px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.65);
  z-index: 1150;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.onboarding-bar {
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 12px;
  padding: 6px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #e0f2fe;
}

.onboarding-bar.oculto { display: none; }

.btn-onboard-gps {
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 0.73rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.ruta-compacta {
  background: rgba(6, 78, 59, 0.35);
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 14px;
  padding: 8px 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ruta-compacta.oculto { display: none; }

.ruta-compacta-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 800;
  color: #6ee7b7;
}

.ruta-compacta-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 0.77rem;
  font-weight: 700;
  color: #f8fafc;
}

.btn-wsp-mini {
  padding: 5px 10px;
  border-radius: 8px;
  border: none;
  background: var(--riv-verde);
  color: #052e16;
  font-weight: 800;
  font-size: 0.74rem;
  cursor: pointer;
}

.dock-inputs-wrap { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; }
@media (max-width: 640px) {
  .dock-inputs-wrap { grid-template-columns: 1fr; gap: 6px; }
  .btn-swap { display: none; }
}

.input-wrapper { position: relative; }

.autocomplete-list {
  position: absolute;
  bottom: calc(100% + 5px);
  left: 0;
  right: 0;
  max-height: 170px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.97);
  border: 1px solid rgba(52, 211, 153, 0.55);
  border-radius: 12px;
  box-shadow: 0 -10px 25px rgba(0, 0, 0, 0.65);
  z-index: 1500;
}

.autocomplete-list.oculto { display: none; }

.autocomplete-item {
  padding: 8px 11px;
  font-size: 0.79rem;
  font-weight: 600;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  cursor: pointer;
}

.autocomplete-item:hover { background: rgba(16, 185, 129, 0.22); color: #ffffff; }

.btn-swap {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #e2e8f0;
  border-radius: 10px;
  width: 32px;
  height: 32px;
  font-weight: 800;
  cursor: pointer;
}

.input-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 4px 6px 4px 10px;
}

.dot-origen { width: 9px; height: 9px; border-radius: 50%; background: #34d399; flex-shrink: 0; }
.dot-destino { width: 9px; height: 9px; border-radius: 2px; background: #f87171; flex-shrink: 0; }
.input-box input { flex: 1; min-width: 0; background: transparent; border: none; color: #ffffff; font-size: 0.82rem; font-weight: 600; outline: none; }
.input-box input::placeholder { color: #94a3b8; }

.icon-btn { background: rgba(255, 255, 255, 0.1); border: none; color: #ffffff; border-radius: 8px; padding: 5px 8px; font-size: 0.78rem; font-weight: 800; cursor: pointer; }
.icon-btn.primary { background: var(--riv-verde); color: #052e16; }
.icon-btn.esperando { background: var(--riv-amarillo); color: #0f172a; }
.icon-btn.gps-activo { background: #0284c7; color: #ffffff; box-shadow: 0 0 0 2px #38bdf8; }

.dock-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mode-pill { padding: 8px 5px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, 0.14); background: rgba(255, 255, 255, 0.06); color: #cbd5e1; font-size: 0.77rem; font-weight: 700; cursor: pointer; }
.mode-pill.activo { background: linear-gradient(135deg, #065f46, #047857); border-color: #34d399; color: #ffffff; }

.dock-footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px; font-size: 0.7rem; color: #94a3b8; }
.leyenda { display: flex; flex-wrap: wrap; gap: 9px; }
.leyenda span { display: flex; align-items: center; gap: 4px; font-weight: 600; }
.swatch { display: inline-block; width: 12px; height: 4px; border-radius: 3px; }
.swatch.verde-ruta { background: #064e3b; border: 1px solid #a3e635; }
.swatch.amarillo { background: #facc15; }
.swatch.rojo { background: #ef4444; }
.swatch.agua { background: #0284c7; border: 1px solid #7dd3fc; }

.creditos { display: flex; align-items: center; gap: 8px; }
.creditos strong { color: #e2e8f0; }
.link-empresa { color: #38bdf8; font-weight: 700; text-decoration: none; }
.btn-cafecito { background: var(--riv-amarillo); color: #0f172a; padding: 2px 8px; border-radius: 7px; text-decoration: none; font-weight: 800; }