:root {
  --bg: #f4f8ff;
  --ink: #0f172a;
  --muted: #475569;
  --line: #d6dfeb;
  --panel: rgba(255, 255, 255, 0.95);
  --conv: #0f766e;
  --bonus: #d97706;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: radial-gradient(900px 520px at -10% -20%, #dbeafe 0%, transparent 56%),
    radial-gradient(900px 620px at 110% 10%, #d1fae5 0%, transparent 58%),
    var(--bg);
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.layout {
  width: min(1080px, 100% - 20px);
  margin: 0 auto;
  padding: 14px 0 20px;
  display: grid;
  gap: 10px;
}

.panel {
  background: var(--panel);
  border: 1px solid #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
}

.top-panel {
  padding: 14px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #0e7490;
}

h1 {
  margin: 4px 0 2px;
  font-size: clamp(20px, 5vw, 30px);
  font-family: "Montserrat", "Segoe UI", sans-serif;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.link-back {
  align-self: center;
  color: #0369a1;
  text-decoration: none;
  font-weight: 700;
}

.link-back:hover {
  text-decoration: underline;
}

.controls {
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  color: var(--ink);
  font-weight: 700;
}

button {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  padding: 8px 11px;
  cursor: pointer;
}

button:hover {
  border-color: #93c5fd;
}

.map-panel {
  padding: 8px;
}

#map {
  height: calc(100vh - 220px);
  min-height: 500px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #cbd5e1;
}

.marker-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
}

.marker-dot.convenios {
  background: var(--conv);
}

.marker-dot.bonus {
  background: var(--bonus);
}

.popup-title {
  margin: 0 0 2px;
  font-weight: 800;
}

.popup-address {
  margin: 0;
  color: var(--muted);
}

.legend {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #1e293b;
  margin-bottom: 4px;
}

.legend-item:last-child {
  margin-bottom: 0;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.legend-dot.conv {
  background: var(--conv);
}

.legend-dot.bon {
  background: var(--bonus);
}

@media (max-width: 640px) {
  #map {
    height: calc(100vh - 240px);
    min-height: 460px;
  }
}
