.dash-shell { max-width: 1180px; }

.dash-hero {
  width: auto;
  margin-bottom: 1rem;
  background:
    linear-gradient(135deg, rgba(11, 110, 79, 0.08), rgba(58, 124, 165, 0.08)),
    var(--card);
}
.dash-hero .eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 700;
}
.dash-hero h1 {
  margin: 0 0 0.45rem;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  line-height: 1.25;
  max-width: 40ch;
}
.dash-hero .lede {
  margin: 0 0 0.75rem;
  color: var(--muted);
  max-width: 62ch;
  line-height: 1.5;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.85rem;
  margin-bottom: 1rem;
}
@media (max-width: 980px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 0.95rem 1rem;
  box-shadow: var(--shadow);
}
.kpi-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}
.kpi-value {
  margin-top: 0.25rem;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
}
.kpi-hint {
  margin-top: 0.2rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.findings {
  margin: 0.4rem 0 0;
  padding-left: 1.15rem;
  line-height: 1.55;
}
.findings li { margin-bottom: 0.35rem; }

.dash-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}
.dash-grid.two { grid-template-columns: 1.1fr 1fr; }
@media (max-width: 900px) {
  .dash-grid,
  .dash-grid.two { grid-template-columns: 1fr; }
}

.dash-grid .panel,
.dash-shell > .panel { width: auto; }

.dash-grid canvas { max-width: 100%; }

.map-panel .section-head {
  align-items: flex-start;
  margin-bottom: 0.85rem;
}
.map-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: end;
  margin-bottom: 0.9rem;
}
.map-controls label {
  margin: 0;
  min-width: 220px;
}
.map-controls .map-toggle {
  min-width: 0;
  padding-bottom: 0.55rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  white-space: nowrap;
}
.map-controls .map-toggle input { width: auto; }

.map-layout {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 920px) {
  .map-layout { grid-template-columns: 1fr; }
}

.qoe-map {
  width: 100%;
  height: min(62vh, 560px);
  min-height: 360px;
  border-radius: 14px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #dfece5;
  z-index: 1;
}

.map-side h3 {
  margin: 0 0 0.45rem;
  font-size: 0.95rem;
}
.map-side h3:not(:first-child) { margin-top: 1rem; }

.map-legend {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.4rem;
}
.map-legend li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.86rem;
}
.map-swatch {
  width: 1rem;
  height: 1rem;
  border-radius: 4px;
  border: 1px solid rgba(0,0,0,.12);
  flex: 0 0 auto;
}

.acept-pill {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 650;
  color: #fff;
}
.acept-pill.excelente { background: #0b6e4f; }
.acept-pill.buena { background: #2f9e6b; }
.acept-pill.aceptable { background: #c9a227; }
.acept-pill.deficiente { background: #b42318; }
.acept-pill.sin_muestras,
.acept-pill.sin_dato { background: #8aa399; }

.leaflet-popup-content {
  font-size: 0.88rem;
  line-height: 1.4;
  margin: 0.55rem 0.7rem;
}
.leaflet-popup-content strong { display: block; margin-bottom: 0.2rem; }
