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

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #0f172a;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, Arial, sans-serif;
}

#map {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #dbeafe;
}

#map::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(15, 23, 42, 0.20), transparent 28%),
    linear-gradient(to top, rgba(15, 23, 42, 0.28), transparent 45%);
  z-index: 1;
}

/* Header premium */
.glass-header {
  position: absolute;
  top: 14px;
  left: 14px;
  right: 14px;
  z-index: 20;
  height: 66px;
  padding: 10px 12px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-icon {
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: linear-gradient(135deg, #0b57d0, #2563eb);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.32);
}

.brand-title {
  font-size: 17px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.4px;
  line-height: 1.05;
}

.brand-subtitle {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.icon-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 15px;
  background: #f1f5f9;
  color: #0f172a;
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;
}

/* Panel inferior */
.bottom-panel {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 20;
  padding: 10px 12px 12px;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.80);
  box-shadow: 0 -10px 45px rgba(15, 23, 42, 0.26);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.grabber {
  width: 42px;
  height: 5px;
  border-radius: 999px;
  background: #cbd5e1;
  margin: 0 auto 12px;
}

.route-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.summary-label {
  font-size: 12px;
  font-weight: 800;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.summary-title {
  margin-top: 2px;
  font-size: 18px;
  font-weight: 900;
  color: #0f172a;
  letter-spacing: -0.45px;
}

.live-badge {
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 900;
  white-space: nowrap;
}

.live-badge span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.16);
}

.location-card {
  min-height: 58px;
  border-radius: 20px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  margin-bottom: 12px;
}

.location-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #2563eb;
  border: 4px solid #ffffff;
  box-shadow:
    0 0 0 7px rgba(37, 99, 235, 0.18),
    0 8px 18px rgba(37, 99, 235, 0.25);
  flex: 0 0 18px;
}

.location-title {
  font-size: 14.5px;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.15;
}

.location-subtitle {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 700;
  color: #64748b;
  line-height: 1.15;
}

.actions-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 10px;
  margin-bottom: 12px;
}

.secondary-action,
.primary-action {
  height: 48px;
  border: none;
  border-radius: 18px;
  font-size: 14.5px;
  font-weight: 900;
  cursor: pointer;
}

.secondary-action {
  background: #eef2f7;
  color: #0f172a;
}

.primary-action {
  background: linear-gradient(135deg, #0b57d0, #2563eb);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.28);
}

.secondary-action:active,
.primary-action:active,
.icon-btn:active {
  transform: scale(0.98);
}

.stops-preview {
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}

.stops-title {
  font-size: 13px;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 7px;
}

.empty-stops {
  min-height: 38px;
  display: flex;
  align-items: center;
  border-radius: 14px;
  background: #f8fafc;
  padding: 10px 12px;
  color: #64748b;
  font-size: 12.5px;
  font-weight: 700;
  line-height: 1.25;
}

/* Marcador del usuario */
.user-marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #2563eb;
  border: 4px solid #ffffff;
  box-shadow:
    0 0 0 9px rgba(37, 99, 235, 0.20),
    0 12px 28px rgba(15, 23, 42, 0.34);
}

.user-marker::after {
  content: "";
  position: absolute;
  width: 46px;
  height: 46px;
  margin-left: -15px;
  margin-top: -15px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.16);
  animation: pulse 1.9s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.65);
    opacity: 0.9;
  }

  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

/* Ocultar controles feos */
.maplibregl-ctrl-bottom-left,
.maplibregl-ctrl-bottom-right {
  display: none !important;
}