/* ── Cabeçalho ── */
.mapa-header {
  background: linear-gradient(135deg, var(--azul) 0%, var(--azul-escuro) 100%);
  border-bottom: 4px solid var(--amarelo);
  padding: 32px 20px 24px;
}

.mapa-header-inner { max-width: 1100px; margin: 0 auto; }

.mapa-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.mapa-title i { color: var(--amarelo); font-size: 24px; }

.mapa-subtitle {
  font-size: 14px;
  color: rgba(255,255,255,0.82);
  margin-bottom: 18px;
}

/* ── Legenda ── */
.mapa-legenda { display: flex; gap: 10px; flex-wrap: wrap; }

.legenda-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 99px;
  padding: 6px 14px;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.legenda-item:hover {
  background: rgba(255,255,255,0.2);
  transform: translateY(-1px);
}

.dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.4);
}

.dot-buraco { background: #FF6B4A; }
.dot-ilum   { background: #FFA940; }
.dot-lixo   { background: #52C41A; }
.dot-agua   { background: #4A9EFF; }
.dot-outros { background: #BFBFBF; }

/* ── Área do mapa ── */
.mapa-wrapper {
  max-width: 1100px;
  margin: 20px auto 40px;
  padding: 0 20px;
}

#mapa-container {
  height: 580px;
  border-radius: var(--radius-lg);
  border: 4px solid var(--branco);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp .5s var(--ease) both;
}

.mapa-contagem {
  font-size: 13px;
  color: var(--cinza-4);
  margin-top: 12px;
  text-align: center;
}

/* ── Popup do Leaflet ── */
.leaflet-popup-content-wrapper {
  border-radius: var(--radius-lg);
  font-family: var(--font);
  box-shadow: var(--shadow-lg);
  padding: 2px;
}

.leaflet-popup-content { margin: 12px 14px; }

.popup-relato { min-width: 200px; }

.popup-titulo {
  font-size: 14px;
  font-weight: 700;
  color: var(--cinza-5);
  line-height: 1.35;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--borda);
}

.popup-meta {
  font-size: 12.5px;
  color: var(--cinza-4);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.popup-meta span { display: flex; align-items: center; gap: 6px; }
.popup-meta i { color: var(--azul); font-size: 14px; flex-shrink: 0; }

.popup-status {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 9px;
  border-radius: 99px;
  margin-top: 6px;
}

/* ── Responsivo ── */
@media (max-width: 640px) {
  .mapa-header { padding: 24px 16px 20px; }
  .mapa-title { font-size: 21px; }
  .mapa-wrapper { padding: 0 12px; margin-top: 14px; }
  #mapa-container { height: 440px; border-width: 3px; }
  .legenda-item { font-size: 12px; padding: 5px 11px; }
}