:root {
  --primary: #006D5B;
  --blue-hero: #2c5f7d;
  --red-bar: #d32f2f;
  --acr-yellow: #f1c40f;
}

* { box-sizing: border-box; }
html {
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE/Edge legacy */
}
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
  background: transparent !important;
}
body {
  font-family: "Segoe UI", Lato, Helvetica, Arial, sans-serif;
  margin: 0;
  background: #ecf0f1;
  color: #333;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.app-loading {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #e8f5f1 0%, #ecf0f1 45%, #dfe6e9 100%);
  transition: opacity 0.35s ease;
}
.app-loading.hidden {
  opacity: 0;
  pointer-events: none;
}
.app-loading-card {
  text-align: center;
  padding: 2.5rem 2rem;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 109, 91, 0.15);
  max-width: 420px;
  width: 90%;
}
.app-loading-card h2 {
  margin: 0.75rem 0 0.5rem;
  color: var(--primary);
  font-size: 1.35rem;
}
.app-loading-card p {
  margin: 0;
  color: #666;
  font-size: 0.95rem;
}
.app-loading-icon {
  font-size: 2.5rem;
  color: var(--primary);
}
.app-loading-bar {
  margin-top: 1.25rem;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
}
.app-loading-bar span {
  display: block;
  height: 100%;
  width: 40%;
  background: var(--primary);
  border-radius: 2px;
  animation: loading-slide 1.4s ease-in-out infinite;
}
@keyframes loading-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

.offline-banner {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: linear-gradient(160deg, #e8f5f1 0%, #ecf0f1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  text-align: center;
}
.offline-banner-card {
  background: #fff;
  border-radius: 12px;
  padding: 2rem;
  max-width: 480px;
  box-shadow: 0 8px 32px rgba(0,0,0,.1);
}
.offline-banner-card h2 {
  margin: 0 0 12px;
  color: #333;
}
.offline-banner-card p {
  margin: 0;
  color: #555;
  line-height: 1.6;
}

/* Header institucional: un solo bloque compacto logos + menú */
.site-header {
  background: #fff;
  border-bottom: none;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 0 rgba(0, 40, 80, 0.06);
}
.site-header::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, #003da5 0%, #006d5b 55%, #e85d04 100%);
}
.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 1.5rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.55rem 1.25rem;
  flex-wrap: nowrap;
  min-height: 64px;
}
.site-logos {
  display: flex !important;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: nowrap;
  min-width: 0;
  min-height: 0;
  flex: 1 1 auto;
}
.site-logo {
  display: block !important;
  height: 42px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  visibility: visible !important;
  opacity: 1 !important;
}
.site-logo-gfp {
  display: inline-flex !important;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}
.site-logo-gfp img {
  height: 48px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
  display: block !important;
}
.site-logo-seco { height: 42px; max-width: 180px; }
.site-logo-basel { height: 38px; max-width: 160px; }

.navbar {
  display: flex;
  align-items: center;
  background: #f3f6fb;
  border: 1px solid #e2e9f2;
  border-radius: 999px;
  border-bottom: none;
  padding: 0.2rem;
  position: static;
  box-shadow: none;
  margin-left: auto;
  flex: 0 0 auto;
}
.navbar .brand { display: none; }
.nav-tabs {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.15rem;
  flex-wrap: nowrap;
  justify-content: flex-end;
  align-items: center;
}
.nav-tabs button,
.nav-tabs a.nav-link-ext {
  border: none;
  background: none;
  padding: 0.45rem 0.85rem;
  cursor: pointer;
  color: #003DA5;
  font-weight: 700;
  font-size: 0.84rem;
  border-radius: 999px;
  border-bottom: none;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
  display: inline-block;
  font-family: inherit;
  white-space: nowrap;
}
.nav-tabs button:hover,
.nav-tabs a.nav-link-ext:hover {
  background: rgba(0, 61, 165, 0.08);
}
.nav-tabs button.active,
.nav-tabs a.nav-link-ext.active {
  color: #fff;
  background: #003DA5;
  border-bottom-color: transparent;
  box-shadow: 0 3px 10px rgba(0, 61, 165, 0.25);
}
.nav-tabs button i,
.nav-tabs a.nav-link-ext i { margin-right: 5px; }

@media (max-width: 900px) {
  .site-header-inner {
    flex-direction: column;
    align-items: stretch;
    gap: 0.55rem;
    padding: 0.55rem 0.85rem;
  }
  .site-logos {
    justify-content: center;
    gap: 0.85rem;
    min-width: 0;
    min-height: 0;
  }
  .site-logo,
  .site-logo-gfp img { height: 40px; }
  .site-logo-seco { height: 36px; max-width: 160px; }
  .site-logo-basel { height: 32px; max-width: 140px; }
  .navbar {
    margin-left: 0;
    justify-content: center;
    width: 100%;
    border-radius: 12px;
  }
  .nav-tabs { justify-content: center; flex-wrap: wrap; }
  .nav-tabs button,
  .nav-tabs a.nav-link-ext { font-size: 0.78rem; padding: 0.4rem 0.65rem; }
}

.tab-panel { display: none !important; padding: 0 0 2rem; }
.tab-panel.active { display: block !important; }

/* Arranque con ?tab=…: muestra la sección correcta sin flash de Mapa */
html[data-boot-tab="metodologia"] #tab-dashboard.tab-panel,
html[data-boot-tab="reportes"] #tab-dashboard.tab-panel,
html[data-boot-tab="tendencias"] #tab-dashboard.tab-panel {
  display: none !important;
}
html[data-boot-tab="metodologia"] #tab-metodologia.tab-panel,
html[data-boot-tab="reportes"] #tab-reportes.tab-panel,
html[data-boot-tab="tendencias"] #tab-tendencias.tab-panel {
  display: block !important;
}
html[data-boot-tab] .nav-tabs button[data-tab].active {
  background: transparent;
  color: #003DA5;
  box-shadow: none;
}
html[data-boot-tab="metodologia"] .nav-tabs button[data-tab="metodologia"],
html[data-boot-tab="reportes"] .nav-tabs button[data-tab="reportes"],
html[data-boot-tab="tendencias"] .nav-tabs button[data-tab="tendencias"] {
  background: #003DA5;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 61, 165, 0.25);
}

.hero-red {
  background: var(--red-bar);
  color: #fff;
  text-align: center;
  padding: 12px 40px;
  font-weight: 600;
}
.hero-blue {
  background: var(--blue-hero);
  color: #fff;
  padding: 30px 40px;
}
.hero-blue h2 {
  text-align: center;
  margin: 0 0 20px;
  font-size: 1.5rem;
}
.hero-blue p { line-height: 1.7; text-align: justify; margin: 0; }

.layout-dashboard {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  margin-top: 1rem;
}
@media (max-width: 992px) {
  .layout-dashboard { grid-template-columns: 1fr; }
}

.well-panel {
  background: #fff;
  border: 1px solid #dce4ec;
  border-radius: 6px;
  padding: 1rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
.well-panel h5 { margin-top: 0; color: var(--primary); }
.well-panel label { font-weight: 600; font-size: 0.9rem; display: block; margin: 0.75rem 0 0.25rem; }
.well-panel select { width: 100%; padding: 8px; border-radius: 4px; border: 1px solid #ccc; }
.well-panel select { min-height: 0; }

.year-range-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.year-range-row select {
  flex: 1;
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ccc;
}
.year-range-sep { color: #666; font-weight: 600; }
.year-range-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: #5d6d7e;
}

/* Controles mapa estilo GFP obras paralizadas */
.gfp-map-ui {
  font-family: "Segoe UI", Lato, Helvetica, Arial, sans-serif;
  pointer-events: auto;
}
.gfp-basemap {
  display: inline-flex;
  align-items: stretch;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0, 45, 85, 0.18);
  border: 1px solid rgba(0, 45, 85, 0.18);
  margin-bottom: 8px !important;
}
.gfp-basemap-btn {
  border: none;
  background: #fff;
  color: #002d55;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.gfp-basemap-btn + .gfp-basemap-btn {
  border-left: 1px solid rgba(0, 45, 85, 0.12);
}
.gfp-basemap-btn:hover { background: #f3f6fb; }
.gfp-basemap-btn.active {
  background: #002d55;
  color: #fff;
}

.gfp-overlays {
  background: #fff;
  border-radius: 10px;
  padding: 0.65rem 0.8rem;
  min-width: 180px;
  box-shadow: 0 4px 16px rgba(0, 45, 85, 0.16);
  border: 1px solid rgba(0, 45, 85, 0.16);
}
.gfp-overlays-title {
  font-weight: 800;
  font-size: 0.8rem;
  color: #002d55;
  margin-bottom: 0.45rem;
}
.gfp-overlay-row {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  margin: 0.28rem 0;
  cursor: pointer;
}
.gfp-overlay-row input { accent-color: #002d55; }

.gfp-map-tools {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 28px !important;
}
.gfp-tool-btn {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1.5px solid rgba(0, 45, 85, 0.35);
  background: #fff;
  color: #002d55;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 45, 85, 0.12);
}
.gfp-tool-btn:hover { background: #f3f6fb; }

#map .leaflet-control-zoom {
  border: none !important;
  box-shadow: none !important;
  margin: 0 12px 12px 0 !important;
}
#map .leaflet-control-zoom a {
  width: 36px !important;
  height: 36px !important;
  line-height: 36px !important;
  border: 1.5px solid rgba(0, 45, 85, 0.35) !important;
  border-radius: 8px !important;
  color: #002d55 !important;
  background: #fff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 10px rgba(0, 45, 85, 0.12);
  margin-bottom: 6px !important;
}
#map .leaflet-control-zoom a:hover { background: #f3f6fb !important; }
#map .leaflet-control-attribution {
  background: rgba(255, 255, 255, 0.88) !important;
  border-radius: 8px 0 0 0;
  color: #475569 !important;
  font-size: 10px !important;
}

/* Leyenda estilo GFP */
.map-legend {
  margin: 0 !important;
  clear: both;
  pointer-events: auto;
}
.map-legend.gfp-legend { margin-top: 0 !important; }
.map-legend-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 10px;
  padding: 12px 14px;
  min-width: 200px;
  max-width: 250px;
  box-shadow: 0 4px 16px rgba(0, 45, 85, 0.16);
  border: 1px solid rgba(0, 45, 85, 0.16);
  font-family: "Segoe UI", Lato, Helvetica, Arial, sans-serif;
  color: #1f2a37;
}
.map-legend-title {
  margin: 0 0 10px;
  color: #002d55;
  font-weight: 800;
  font-size: 0.84rem;
  letter-spacing: 0.01em;
  line-height: 1.25;
}
.map-legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.map-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.25;
}
.map-legend-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
}
.map-legend-dot--acr { background: #2E7D32; }
.map-legend-dot--zi { background: #616161; }
.map-legend-dot--limites { background: #E30613; }
.map-legend-dot--antropico { background: #9a3412; }
.map-legend-dot--natural { background: #0f766e; }
.map-legend-dot--falsa { background: #64748b; }
.map-legend-dot--defo { background: #c0392b; }

/* Pantalla completa del mapa */
.dash-map-card.gfp-map-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  z-index: 10050 !important;
  margin: 0 !important;
  border-radius: 0 !important;
  padding: 0.65rem !important;
  background: #0b1220 !important;
  max-width: none !important;
}
.dash-map-card.gfp-map-fullscreen .section-title,
.dash-map-card.gfp-map-fullscreen .dash-map-period,
.dash-map-card.gfp-map-fullscreen .map-loreto-info {
  color: #e2e8f0;
}
.dash-map-card.gfp-map-fullscreen .dash-map-shell {
  height: calc(100vh - 88px) !important;
  max-height: none !important;
  min-height: 0 !important;
}
.dash-map-card.gfp-map-fullscreen #map.dash-map {
  height: 100% !important;
  max-height: none !important;
  min-height: 0 !important;
  border-radius: 12px;
}
body.gfp-map-fs-open { overflow: hidden; }

/* Compat: swatches antiguas por si quedan referencias */
.map-legend-swatch { flex: 0 0 auto; box-sizing: border-box; }
.map-legend-swatch--outline { width: 14px; height: 14px; border-radius: 3px; background: transparent; }
.map-legend-swatch--acr { border: 2.5px solid #2E7D32; }
.map-legend-swatch--zi { border: 2.5px solid #616161; }
.map-legend-swatch--line { width: 16px; height: 0; border-top: 3px solid #E30613; border-radius: 2px; }
.map-legend-swatch--fill { width: 14px; height: 14px; border-radius: 50%; }
.map-legend-swatch--defo { background: #c0392b; }
.map-legend-swatch--antropico { background: #9a3412; }
.map-legend-swatch--natural { background: #0f766e; }
.map-legend-swatch--dot { width: 11px; height: 11px; border-radius: 50%; background: #c0392b; }
.map-legend-item--causes,
.map-legend-cause,
.map-legend-sep { display: none; }

.map-loreto-info {
  color: #2e7d32;
  font-weight: 600;
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  line-height: 1.45;
}

.filter-info {
  background: var(--primary);
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  margin-top: 1rem;
  font-size: 0.85rem;
  display: none;
}
.filter-info.visible { display: block; }

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 768px) { .kpi-grid { grid-template-columns: 1fr; } }

.value-box {
  background: linear-gradient(135deg, #fff 0%, #fff5f5 100%);
  border-left: 4px solid #d9534f;
  border-radius: 6px;
  padding: 1.25rem;
  min-height: 130px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  transition: transform .3s, box-shadow .3s;
}
.value-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}
.value-box .number { font-size: 2rem; font-weight: 800; margin: 0 0 8px; }
.value-box .label {
  font-size: 0.85rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 600;
  margin: 0;
}
.value-box .sub { font-size: 11px; color: #999; margin-top: 8px; display: block; }

.section-title {
  color: #1a4d2e;
  margin: 1.5rem 0 1rem;
  font-size: 1.1rem;
}

.panelbox {
  background: #fff;
  border: 1px solid #dce4ec;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

#map { height: 600px; border-radius: 8px; }

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 992px) { .charts-row { grid-template-columns: 1fr; } }

.region-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-top: 0.75rem;
}
@media (max-width: 992px) { .region-cards { grid-template-columns: 1fr; } }

.region-insights-root { margin-top: 0.5rem; margin-bottom: 2rem; }
.region-insights-header { margin-bottom: 0.75rem; }
.region-insights-meta {
  margin: 0;
  font-size: 12px;
  color: #7f8c8d;
  font-weight: 500;
}
.region-insights-meta i { margin-right: 6px; color: #1a4d2e; }
.region-insights-error {
  color: #c0392b;
  font-size: 14px;
  padding: 1rem;
  background: #fdecea;
  border-radius: 8px;
}

.region-card {
  border-radius: 12px;
  padding: 1.35rem 1.35rem 1rem;
  min-height: 300px;
  position: relative;
  background: #fff;
  border: 1px solid #e8ece9;
  border-top: 4px solid var(--region-accent, #1a4d2e);
  box-shadow: 0 4px 16px rgba(26, 77, 46, 0.06);
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: default;
  display: flex;
  flex-direction: column;
}
.region-card-loreto { background: linear-gradient(160deg, #ffffff 0%, #fffef8 100%); }
.region-card-sanmartin { background: linear-gradient(160deg, #ffffff 0%, #fffaf3 100%); }
.region-card-cusco { background: linear-gradient(160deg, #ffffff 0%, #f4fff7 100%); }
.region-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(26, 77, 46, 0.12);
}
.region-card-skeleton {
  min-height: 300px;
  background: linear-gradient(90deg, #f4f6f5 25%, #ecefed 50%, #f4f6f5 75%);
  background-size: 200% 100%;
  animation: region-shimmer 1.2s infinite;
  border-top-color: #ddd;
}
@keyframes region-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.region-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 5px 10px;
  border-radius: 999px;
  color: #fff;
  background: var(--region-accent, #1a4d2e);
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.region-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 14px;
  padding-right: 72px;
}
.region-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.region-card-title {
  margin: 0;
  color: #1a4d2e;
  font-size: 1.05rem;
  line-height: 1.35;
  font-weight: 700;
}
.region-desc {
  font-size: 14px;
  text-align: justify;
  color: #555;
  line-height: 1.6;
  margin: 0 0 12px;
}
.region-facts {
  font-size: 13px;
  color: #666;
  margin: 12px 0 0;
  padding-left: 0;
  list-style: none;
}
.region-facts li { margin-bottom: 6px; }
.region-link-wrap {
  text-align: right;
  margin-top: 20px;
  border-top: 1px solid #eee;
  padding-top: 12px;
}
.region-link {
  background: none;
  border: none;
  color: #006D5B;
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
  padding: 0;
}
.region-link:hover { text-decoration: underline; }

.kpi-dynamic { position: relative; min-height: 130px; }
.kpi-bg-icon {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 4em;
  opacity: 0.15;
  pointer-events: none;
}
.kpi-dynamic .sub { font-size: 11px; margin-top: 8px; display: block; }

.modal-region-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}
@media (max-width: 768px) { .modal-region-stats { grid-template-columns: 1fr; } }
.modal-region-block {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  border-left: 4px solid #ccc;
  margin-bottom: 1rem;
}
.modal-region-block h5 { color: #2c5f7d; margin: 0 0 12px; }
.modal-region-block p, .modal-region-block li {
  text-align: justify;
  line-height: 1.7;
  color: #555;
  font-size: 14px;
}
.region-badge {
  position: absolute;
  top: 15px;
  right: 15px;
  color: #fff;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}

.footer-simple {
  text-align: center;
  margin-top: 60px;
  padding: 40px 0;
  background: linear-gradient(to bottom, #fff, #f8f9fa);
  border-top: 1px solid #e0e0e0;
}
.footer-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #4CAF50, #2E7D32);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 2rem;
}

.btn {
  padding: 8px 16px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-weight: 600;
}
.btn-warning { background: #f0ad4e; color: #fff; }
.btn-success { background: #5cb85c; color: #fff; }
.btn-block { width: 100%; margin-top: 0.5rem; }

.hidden { display: none !important; }

.map-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.card-mapa img { width: 100%; height: 200px; object-fit: cover; }

.trend-chart { min-height: 400px; }

#map { z-index: 1; }
.leaflet-popup-content { margin: 10px 14px; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55);
  z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px;
  backdrop-filter: blur(2px);
  animation: kpiModalFade 0.2s ease;
}
@keyframes kpiModalFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-dialog {
  background: #fff; border-radius: 14px; padding: 22px 24px 20px; max-width: 900px;
  width: 100%; max-height: 90vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.28);
  animation: kpiModalPop 0.22s ease;
  scrollbar-width: none;
}
.modal-dialog::-webkit-scrollbar { width: 0; height: 0; display: none; }
.modal-dialog--kpi { max-width: 980px; }
@keyframes kpiModalPop {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.kpi-modal-overlay {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  background: rgba(15, 23, 42, 0.48);
}
.kpi-modal-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.35rem;
}
.kpi-modal-title {
  margin: 0;
  color: #1e3a5f;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.35;
}
.kpi-modal-title i { margin-right: 0.4rem; color: #006D5B; }
.kpi-modal-period {
  display: inline-block;
  margin-left: 0.15rem;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #e8f5f1 0%, #f0f7ff 100%);
  color: #1a4d2e;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  vertical-align: middle;
}
.kpi-modal-body { margin-top: 0.35rem; }
.kpi-modal-charts { margin-top: 1rem; }
.kpi-modal-charts .charts-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.95rem;
}
.kpi-modal-charts .chart-block--wide { grid-column: 1 / -1; }
.kpi-modal-cerrar {
  margin-top: 1.1rem;
  background: linear-gradient(180deg, #1e3a5f 0%, #163049 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 18px rgba(30, 58, 95, 0.28);
}
.kpi-modal-cerrar:hover { background: #163049; }
body.kpi-modal-open { overflow: hidden; }
.kpi-modal-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.9rem; margin: 0.85rem 0 1rem;
}
.kpi-mini {
  text-align: center;
  padding: 1rem 0.85rem 0.9rem;
  border-radius: 12px;
  border-left: 5px solid #94a3b8;
  background: linear-gradient(160deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.kpi-mini:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}
.kpi-mini h2 {
  margin: 0;
  font-size: 1.85rem;
  font-weight: 800;
  color: #1e3a5f;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.kpi-mini span {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.kpi-mini--total { border-left-color: #d9534f; }
.kpi-mini--total h2 { color: #c0392b; }
.kpi-mini--ant { border-left-color: #f39c12; }
.kpi-mini--ant h2 { color: #d68910; }
.kpi-mini--nat { border-left-color: #5cb85c; }
.kpi-mini--nat h2 { color: #2e7d32; }
.data-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; overflow: hidden; border-radius: 10px; }
.data-table th, .data-table td { border-bottom: 1px solid #eef2f7; padding: 10px 12px; text-align: left; }
.data-table th {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  color: #334155;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: #f8fafc; }
.kpi-detail-table-title {
  margin: 0.35rem 0 0.55rem;
  font-size: 0.95rem;
  color: #1e3a5f;
  font-weight: 700;
}
.kpi-detail-table-title i { margin-right: 0.35rem; color: #006D5B; }
.kpi-detail-table-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.value-box { cursor: pointer; }

/* MetodologÃÂ­a */
.metodologia-content h3 { color: #1a4d2e; margin-top: 1.5rem; }
.metodologia-content h3:first-child { margin-top: 0; }
.metodologia-p { text-align: justify; font-size: 15px; line-height: 1.8; }
.metodologia-list { font-size: 15px; line-height: 1.8; }
.metodologia-list a { color: #006D5B; font-weight: 600; }
.metodologia-quote {
  border-left: 4px solid #006D5B;
  padding: 15px 20px;
  margin: 20px 0;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 14px;
  font-style: italic;
  color: #555;
}
.metodologia-warning {
  background: #fff3cd;
  padding: 15px;
  border-left: 4px solid #f0ad4e;
  border-radius: 6px;
  margin: 20px 0;
  font-size: 14px;
}
.metodologia-warning ul { margin: 10px 0 0; padding-left: 1.25rem; }
.metodologia-refs { font-size: 14px; line-height: 1.8; }

/* Reportes Ã¢ÂÂ tarjetas mapa (card-mapa-nueva) */
.reportes-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: flex-start;
  margin: 1rem 0;
  border-left: 4px solid #006D5B;
  background: #f8f9fa;
}
.reportes-filter-select { min-width: 220px; }
.reportes-filter-hint {
  flex: 1;
  min-width: 280px;
  margin: 0;
  color: #666;
  font-size: 14px;
  padding-top: 1.5rem;
}
.map-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
  margin-bottom: 2rem;
}
.card-mapa-nueva {
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  transition: transform .3s, box-shadow .3s;
}
.card-mapa-nueva:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}
.card-mapa-thumb {
  position: relative;
  width: 100%;
  height: 200px;
  background: #eef2f3;
  overflow: hidden;
}
.card-mapa-skeleton {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #eef2f3 0%, #f8f9fa 50%, #eef2f3 100%);
  background-size: 200% 100%;
  animation: thumb-shimmer 1.2s ease-in-out infinite;
}
.card-mapa-skeleton.hidden { display: none; }
@keyframes thumb-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.card-mapa-thumb img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.card-mapa-thumb img.loaded { opacity: 1; }
.modal-map-loading {
  text-align: center;
  padding: 3rem 1rem;
  color: #666;
  font-size: 15px;
}
.card-mapa-body { padding: 20px; }
.card-mapa-body h5 { margin: 0 0 8px; color: #1a4d2e; font-weight: 700; }
.card-mapa-fecha { margin: 0 0 15px; color: #666; font-size: 13px; }
.card-mapa-actions { display: flex; gap: 8px; }
.btn-mapa-ver, .btn-mapa-pdf {
  flex: 1;
  padding: 8px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  border: none;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.btn-mapa-ver { background: #2c5f7d; color: #fff; }
.btn-mapa-pdf { background: #17a2b8; color: #fff; }
.reportes-download-bar {
  background: #f8f9fa;
  padding: 20px;
  border-left: 4px solid #5cb85c;
  border-radius: 8px;
  margin-top: 40px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.reportes-download-bar h4 { margin: 0 0 5px; color: #1a4d2e; }
.reportes-download-bar p { margin: 0; color: #666; font-size: 14px; }
.reportes-download-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Reportes Ã¢ÂÂ sub-pestaÃÂ±as Mapas / ATD */
.reportes-subtabs {
  display: flex;
  gap: 8px;
  margin: 1.25rem 0 0.75rem;
  flex-wrap: wrap;
}
.reportes-subtab {
  border: 1px solid #d5e8de;
  background: #fff;
  color: #1a4d2e;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s ease;
}
.reportes-subtab:hover { background: #f0faf4; }
.reportes-subtab.active {
  background: linear-gradient(135deg, #006D5B, #1a4d2e);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(0,109,91,.25);
}
.reportes-panel.hidden { display: none; }

/* ATD Ã¢ÂÂ alertas tempranas */
.atd-root { margin: 0.5rem 0 2rem; min-height: 120px; }
.atd-section-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2.5rem 0 1rem;
  color: #1a4d2e;
  font-weight: 700;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.atd-section-divider::before,
.atd-section-divider::after {
  content: "";
  flex: 1;
  height: 2px;
  background: linear-gradient(90deg, transparent, #006D5B, transparent);
}
.atd-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #e74c3c;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}
.atd-badge.hidden { display: none; }
.atd-root.hidden,
.atd-section-divider.hidden { display: none; }
.atd-loading-panel {
  padding: 2rem 1rem;
  text-align: center;
  color: #003DA5;
  font-weight: 600;
}
.atd-loading, .atd-empty {
  text-align: center;
  padding: 2rem;
  color: #666;
}
.atd-top {
  padding: 12px 16px;
  margin-bottom: 10px;
}
.atd-top-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.atd-top-head h3 { margin: 0; font-size: 1rem; color: #1a4d2e; }
.atd-stats-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: #444;
}
.atd-stats-inline strong { color: #006D5B; }
.atd-stats-inline i { color: #006D5B; margin-right: 4px; }
.atd-top .atd-flow { margin: 0; }
.atd-filter-compact {
  padding: 8px 12px !important;
  margin: 8px 0 0 !important;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.atd-filter-compact label { font-size: 12px; margin: 0; }
.atd-filter-compact select { max-width: 160px; padding: 4px 8px; font-size: 12px; }
.atd-h1-stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 8px 12px;
  background: linear-gradient(90deg, #003DA5 0%, #003DA5 62%, #E30613 100%);
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  margin-bottom: 10px;
}
.atd-h1-stats-bar strong { font-size: 14px; }
.atd-h1-stats-bar i { opacity: 0.85; margin-right: 4px; }
.atd-mini-map-empty {
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.25); min-height: 80px;
}
.atd-mini-map-hint, .atd-mini-map-loading { font-size: 12px; color: rgba(255,255,255,.85); }
.atd-loading-inline { font-size: 12px; color: #666; }
.atd-demo-header-compact { margin-bottom: 8px; }
.atd-demo-header-compact h4 { font-size: 15px; margin-bottom: 2px; }
.atd-demo-header-compact p { font-size: 12px; }
.atd-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 1rem;
}
@media (max-width: 900px) { .atd-hero { grid-template-columns: 1fr; } }
.atd-hero h3 { margin: 0 0 8px; color: #1a4d2e; }
.atd-hero p { margin: 0; color: #555; line-height: 1.6; font-size: 14px; }
.atd-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 10px;
  min-width: 280px;
}
.atd-kpi {
  background: linear-gradient(135deg, #f8fffb, #eef8f2);
  border: 1px solid #d5e8de;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
}
.atd-kpi-wide { grid-column: 1 / -1; }
.atd-kpi-n { display: block; font-size: 1.5rem; font-weight: 800; color: #006D5B; }
.atd-kpi-n-sm { display: block; font-size: 1rem; font-weight: 700; color: #1a4d2e; }
.atd-kpi-l { display: block; font-size: 11px; color: #777; text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.atd-flow {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
}
.atd-flow-step {
  flex: 1;
  min-width: 160px;
  background: #fff;
  border: 1px solid #e8ece9;
  border-radius: 10px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 600;
  color: #1a4d2e;
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
  text-align: left;
}
.atd-flow-step:hover {
  border-color: #003DA5;
  background: #f3f7fd;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 61, 165, 0.12);
}
.atd-flow-step.atd-flow-active {
  border-color: #003DA5;
  background: linear-gradient(135deg, #eef3fb, #fff);
  box-shadow: 0 0 0 2px rgba(0, 61, 165, 0.2);
}
.atd-flow-play { margin-left: auto; color: #003DA5; opacity: .7; }
.atd-hero-hint { margin-top: 10px; font-size: 13px; color: #003DA5; }
.atd-demo-stage {
  margin: 0 0 1.5rem;
  border-radius: 14px;
  overflow: hidden;
  animation: atdFadeIn .35s ease;
}
.atd-demo-stage.hidden { display: none; }
@keyframes atdFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.atd-demo-panel {
  background: #fff;
  border: 1px solid #d5e8de;
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 8px 28px rgba(26,77,46,.08);
}
.atd-demo-header h4 { margin: 0 0 6px; color: #1a4d2e; }
.atd-demo-header p { margin: 0; color: #666; font-size: 14px; line-height: 1.6; }
.atd-demo-footer {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #eef2ef;
}
.atd-h1-pipeline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 1.25rem 0;
  padding: 1rem;
  background: linear-gradient(135deg, #0d2137, #1a4d6e);
  border-radius: 12px;
}
.atd-pipe-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
  animation: atdPipeIn .6s ease forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes atdPipeIn { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.atd-pipe-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,.15);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.atd-pipe-done .atd-pipe-icon { background: #27ae60; }
.atd-pipe-arrow { color: rgba(255,255,255,.4); font-size: 12px; }
.atd-h1-grid {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 1.25rem;
  align-items: start;
}
.atd-h1-triple {
  display: grid;
  grid-template-columns: 1fr 1fr 280px;
  gap: 1rem;
  align-items: start;
}
@media (max-width: 1100px) {
  .atd-h1-triple { grid-template-columns: 1fr 1fr; }
  .atd-h1-zonas { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .atd-h1-triple { grid-template-columns: 1fr; }
}
.atd-h1-map-col h5 { margin: 0 0 8px; font-size: 13px; color: #1a4d2e; }
.atd-h3-pending { font-size: 13px; color: #555; margin: 10px 0 0; }
.atd-h3-sat-preview { margin-top: 12px; }
.atd-h1-map {
  height: 280px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid #1a4d2e;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  background: #1a1a2e;
}
.atd-h1-map .leaflet-container { height: 100%; width: 100%; background: #1a1a2e; }
.atd-map-legend {
  display: flex; gap: 14px; justify-content: center;
  font-size: 11px; color: #666; margin: 8px 0 0;
}
.atd-leg { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 4px; }
.atd-leg.acr { background: #2ecc71; }
.atd-leg.zi { background: #e67e22; }
.atd-leg.alerta { background: #e74c3c; }
.atd-map-pin span {
  background: #C41E3A; color: #fff; font-size: 9px; font-weight: 800;
  padding: 3px 6px; border-radius: 4px; white-space: nowrap;
  border: 1px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.4);
}
.atd-zona-tabs {
  display: flex; gap: 6px; margin-bottom: 10px;
}
.atd-zona-tab {
  flex: 1; border: 2px solid #d5e8de; background: #fff;
  padding: 10px 8px; border-radius: 8px; cursor: pointer;
  font-weight: 700; font-size: 12px; color: #1a4d2e;
  font-family: inherit; display: flex; align-items: center; justify-content: center; gap: 6px;
}
.atd-zona-tab.active {
  border-color: #006D5B; background: linear-gradient(135deg, #eef8f2, #fff);
}
.atd-zona-tab[data-tab="zi"].active { border-color: #e67e22; }
.atd-tab-n {
  background: #006D5B; color: #fff; padding: 2px 7px; border-radius: 999px; font-size: 10px;
}
.atd-zona-tab[data-tab="zi"] .atd-tab-n { background: #e67e22; }
.atd-zona-list {
  max-height: 200px; overflow-y: auto; margin-bottom: 10px;
}
.atd-zona-card {
  width: 100%; text-align: left; border: 1px solid #e8ece9;
  background: #fff; padding: 10px 12px; border-radius: 8px;
  margin-bottom: 6px; cursor: pointer; font-family: inherit;
  transition: all .15s;
}
.atd-zona-card:hover { border-color: #006D5B; background: #f8fffb; }
.atd-zona-card.active { border-color: #006D5B; background: #eef8f2; box-shadow: 0 0 0 2px rgba(0,109,91,.15); }
.atd-zona-name { display: block; font-weight: 700; font-size: 12px; color: #1a4d2e; }
.atd-zona-stats { font-size: 11px; color: #888; }
.atd-visor-intro {
  background: linear-gradient(135deg, #eef8f2, #fff);
  border: 1px solid #d5e8de;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #444;
  line-height: 1.5;
}
@media (max-width: 800px) { .atd-h1-grid { grid-template-columns: 1fr; } }
.atd-chart { min-height: 260px; }
.atd-h1-stats h5 { margin: 0 0 12px; color: #1a4d2e; font-size: 14px; }
.atd-stat-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
  font-size: 13px;
}
.atd-stat-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.atd-stat-label { flex: 1; color: #333; }
.atd-stat-val { color: #666; font-size: 12px; }
.atd-h1-total {
  margin: 14px 0;
  padding: 12px;
  background: #f8fffb;
  border-radius: 8px;
  display: flex; justify-content: space-between;
  font-size: 14px;
}
.atd-h1-total strong { color: #006D5B; font-size: 1.1rem; }
.atd-empty-sm { font-size: 13px; color: #999; }
.atd-next-btn { margin-top: 8px; }
.atd-h2-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 1rem 0;
  padding: 10px 14px;
  background: #f8f9fa;
  border-radius: 8px;
}
.atd-alerta-select { min-width: 260px; padding: 8px 12px; border-radius: 6px; border: 1px solid #ccc; }
.atd-h2-hint { font-size: 12px; color: #888; margin-left: auto; }
.atd-h2-layout {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 1rem;
  min-height: 380px;
}
@media (max-width: 900px) { .atd-h2-layout { grid-template-columns: 1fr; } }
.atd-h2-scenes h6 { margin: 0 0 10px; color: #1a4d2e; font-size: 12px; text-transform: uppercase; }
.atd-scene-card {
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 8px;
  font-size: 12px;
  cursor: default;
}
.atd-scene-card strong { display: block; margin: 4px 0 2px; }
.atd-scene-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  text-transform: uppercase;
}
.atd-tag-antes { background: #3498db; color: #fff; }
.atd-tag-despues { background: #e67e22; color: #fff; }
.atd-h2-meta { margin-top: 16px; font-size: 12px; color: #555; }
.atd-h2-meta p { margin: 4px 0; }
.atd-h2-viewer {
  background: #0d2137;
  border-radius: 10px;
  overflow: hidden;
}
.atd-viewer-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  background: #1a3050;
  color: #fff;
  font-size: 12px;
}
.atd-swipe-toggle { color: #fff; font-size: 12px; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.atd-compare-side {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  background: #000;
}
.atd-compare-panel { position: relative; background: #111; }
.atd-compare-panel img { width: 100%; height: auto; display: block; min-height: 280px; object-fit: cover; }
.atd-compare-label {
  position: absolute; top: 8px; left: 8px;
  font-size: 10px; font-weight: 800;
  padding: 4px 8px; border-radius: 4px; z-index: 2;
}
.atd-compare-swipe {
  position: relative;
  height: 360px;
  overflow: hidden;
  user-select: none;
}
.atd-compare-swipe.hidden { display: none; }
.atd-compare-side.hidden { display: none; }
.atd-swipe-img, .atd-swipe-before img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
}
.atd-swipe-before {
  position: absolute; inset: 0;
  width: 50%; overflow: hidden;
  border-right: 3px solid #fff;
  z-index: 2;
}
.atd-swipe-handle {
  position: absolute; top: 0; bottom: 0;
  left: 50%; width: 4px;
  background: #fff;
  cursor: ew-resize;
  z-index: 3;
  display: flex; align-items: center; justify-content: center;
}
.atd-swipe-handle i {
  background: #e74c3c; color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px;
  margin-left: -14px;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.atd-swipe-lbl {
  position: absolute; bottom: 10px;
  font-size: 11px; font-weight: 800;
  color: #fff; text-shadow: 0 1px 3px #000;
  z-index: 4;
}
.atd-swipe-lbl-l { left: 12px; }
.atd-swipe-lbl-r { right: 12px; }
.atd-h3-meta { margin: 1rem 0; padding: 14px !important; }
.atd-h3-tags { display: flex; gap: 8px; margin-top: 8px; }
.atd-tag {
  background: #eef8f2;
  color: #006D5B;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}
.atd-pdf-preview {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  background: #f5f5f5;
}
.atd-pdf-preview iframe {
  width: 100%;
  height: min(520px, 70vh);
  border: none;
  display: block;
}

/* H1 Ã¢ÂÂ misiÃÂ³n interactiva (estilo videojuego) */
.atd-h1-mission { padding: 0 !important; overflow: hidden; }
.atd-mission-hero {
  text-align: center;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(160deg, #0d2137 0%, #1a4d6e 50%, #006D5B 100%);
  color: #fff;
  border-radius: 14px;
}
.atd-game-screen {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 2px solid rgba(243, 156, 18, 0.45);
  box-shadow:
    0 0 0 1px rgba(0, 61, 165, 0.35),
    0 20px 50px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.atd-game-scanlines {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0, 0, 0, 0.03) 2px,
    rgba(0, 0, 0, 0.03) 4px
  );
  opacity: 0.5;
}
.atd-game-hud {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
  width: 100%;
}
.atd-game-level {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: #f39c12;
  text-transform: uppercase;
}
.atd-game-icon-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}
.atd-game-icon {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  color: #fff;
  background: linear-gradient(145deg, #003DA5, #006D5B);
  border: 3px solid rgba(243, 156, 18, 0.8);
  box-shadow: 0 0 30px rgba(243, 156, 18, 0.35);
  animation: atdGameIconPulse 2.5s ease-in-out infinite;
}
@keyframes atdGameIconPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 30px rgba(243, 156, 18, 0.35); }
  50% { transform: scale(1.06); box-shadow: 0 0 45px rgba(243, 156, 18, 0.55); }
}
.atd-game-title {
  color: #fff;
  margin: 0 0 8px;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 1;
}
.atd-game-desc-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 0 1.5rem;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}
.atd-game-desc {
  color: rgba(255, 255, 255, 0.88);
  margin: 0 0 1.25rem;
  max-width: 560px;
  width: 100%;
  line-height: 1.55;
  text-align: center !important;
}
.atd-game-objectives {
  list-style: none;
  margin: 0 auto 1.5rem;
  padding: 14px 18px;
  max-width: 420px;
  text-align: left;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 13px;
  position: relative;
  z-index: 1;
}
.atd-game-objectives li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 0;
  color: rgba(255, 255, 255, 0.9);
}
.atd-game-objectives li i {
  font-size: 7px;
  color: #f39c12;
}
.atd-game-start {
  position: relative;
  z-index: 1;
  min-width: 220px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  animation: atdStartPulse 2s ease-in-out infinite;
}
@keyframes atdStartPulse {
  0%, 100% { box-shadow: 0 8px 24px rgba(243, 156, 18, 0.45); }
  50% { box-shadow: 0 12px 36px rgba(243, 156, 18, 0.7), 0 0 20px rgba(243, 156, 18, 0.4); }
}
.atd-game-start-glow {
  position: absolute;
  inset: -4px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(243, 156, 18, 0.35) 0%, transparent 70%);
  z-index: -1;
  animation: atdGlow 1.5s ease-in-out infinite;
}
@keyframes atdGlow {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
.atd-game-hint {
  margin: 1rem 0 0;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.65);
  position: relative;
  z-index: 1;
}
.atd-game-loading {
  background: linear-gradient(160deg, #0a1628 0%, #122a45 55%, #0d3d35 100%);
  border-radius: 14px;
  color: #fff;
  border: 2px solid rgba(0, 61, 165, 0.4);
}
.atd-game-loading-badge {
  display: inline-block;
  margin-bottom: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(227, 6, 19, 0.85);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
}
.atd-xp-label {
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  color: #f39c12;
  margin: -6px 0 10px;
}
.atd-mission-badge {
  display: inline-block;
  background: #e74c3c;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .1em;
  margin-bottom: 12px;
}
.atd-mission-hero h4 { color: #fff; margin: 0 0 8px; font-size: 1.4rem; text-align: center; }
.atd-mission-hero p { color: rgba(255,255,255,.85); margin: 0 0 1.25rem; text-align: center !important; }
.atd-mission-stats-preview {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 1.25rem;
  font-size: 14px;
  position: relative;
  z-index: 1;
}
.atd-mission-stats-preview strong { color: #f39c12; }
.atd-mission-start {
  background: linear-gradient(135deg, #f39c12, #e67e22);
  color: #fff;
  border: none;
  padding: 16px 36px;
  border-radius: 999px;
  font-size: 1.1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(243,156,18,.4);
  transition: transform .2s, box-shadow .2s;
}
.atd-mission-start:hover { transform: scale(1.05); box-shadow: 0 12px 32px rgba(243,156,18,.5); }
.atd-mission-complete {
  background: linear-gradient(135deg, #27ae60, #006D5B);
  color: #fff;
  padding: 12px 18px;
  border-radius: 10px;
  margin-bottom: 1rem;
  font-size: 14px;
  text-align: center;
}
.atd-h1-live { padding: 1.25rem; }
.atd-live-header { display: flex; align-items: center; gap: 10px; font-weight: 700; color: #1a4d2e; margin-bottom: 10px; }
.atd-live-pulse {
  width: 10px; height: 10px; border-radius: 50%; background: #e74c3c;
  animation: atdPulse 1s infinite;
}
@keyframes atdPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .5; transform: scale(1.3); } }
.atd-xp-bar {
  height: 8px; background: #e8ece9; border-radius: 999px; overflow: hidden; margin-bottom: 1rem;
}
.atd-xp-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, #006D5B, #27ae60, #f39c12);
  border-radius: 999px;
  transition: width .08s linear;
}
.atd-pipeline-live { margin-bottom: 1rem; }
.atd-pipe-live { opacity: .35; transition: opacity .3s; }
.atd-pipe-live.atd-pipe-done { opacity: 1; }
.atd-mini-map {
  position: relative;
  height: 140px;
  background: linear-gradient(180deg, #1a4d2e 0%, #0d2818 100%);
  border-radius: 10px;
  margin-bottom: 10px;
  overflow: hidden;
}
.atd-map-dot {
  position: absolute;
  width: 8px; height: 8px;
  background: #e74c3c;
  border-radius: 50%;
  box-shadow: 0 0 8px #e74c3c;
  animation: atdDotPop .4s ease backwards;
}
@keyframes atdDotPop { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.atd-live-log {
  max-height: 80px; overflow-y: auto;
  font-family: Consolas, monospace; font-size: 11px;
  background: #f0f4f8; padding: 8px; border-radius: 6px;
}
.atd-log-line { padding: 2px 0; color: #333; }
.atd-log-ok { color: #27ae60; font-weight: bold; }
.atd-chart-hint { text-align: center; font-size: 12px; color: #888; margin: 8px 0 0; }
.atd-tipo-detail {
  padding: 10px; background: #f8fffb; border-radius: 8px;
  font-size: 13px; margin-bottom: 10px; min-height: 40px;
  border: 1px dashed #d5e8de;
}
.atd-tipo-flash { animation: atdFlash .4s ease; }
@keyframes atdFlash { 0% { background: #c8f0d8; } 100% { background: #f8fffb; } }
.atd-stat-btn {
  width: 100%; border: none; background: transparent; cursor: pointer;
  text-align: left; font-family: inherit;
}
.atd-stat-btn:hover { background: #f8fffb; border-radius: 6px; }
.atd-mission-next { width: 100%; padding: 12px !important; font-weight: 700; }

/* H2 Ã¢ÂÂ visor ArcGIS GFP */
.atd-visor-shell {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #b8c8d8;
  box-shadow: 0 12px 40px rgba(26,46,60,.15);
}
.atd-visor-header {
  background: linear-gradient(90deg, #003DA5 0%, #003DA5 68%, #E30613 100%);
  color: #fff;
  padding: 12px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.atd-visor-title { font-weight: 800; font-size: 1rem; }
.atd-visor-sub { font-size: 12px; opacity: .9; }
.atd-visor-steps {
  display: flex;
  background: #F4F6F8;
  border-bottom: 1px solid #D0DCE8;
}
.atd-visor-step {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 8px;
  font-size: 12px;
  font-weight: 600;
  color: #5A6B7D;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  border-bottom: 3px solid transparent;
}
.atd-visor-step.active { color: #2F5F8F; border-bottom-color: #2F5F8F; background: #fff; }
.atd-visor-step.done { color: #148F77; }
.atd-visor-step-n {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: #D0DCE8;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
}
.atd-visor-step.active .atd-visor-step-n { background: #2F5F8F; }
.atd-visor-step.done .atd-visor-step-n { background: #148F77; }
.atd-visor-body { background: #fff; min-height: 420px; }
.atd-visor-footer { margin-top: 1rem; }
.atd-h2-step-panel { padding: 1.5rem; }
.atd-h2-step-panel h5 { margin: 0 0 8px; color: #1A2B3C; }
.atd-alert-card {
  display: flex; gap: 14px; align-items: center;
  padding: 14px; background: #F4F6F8; border-radius: 10px;
  margin: 1rem 0; border: 1px solid #D0DCE8;
}
.atd-alert-marker {
  background: #C41E3A; color: #fff;
  padding: 8px 12px; border-radius: 8px;
  font-weight: 800; font-size: 13px;
}
.atd-stac-search { min-height: 200px; }
.atd-stac-progress { height: 6px; background: #e0e0e0; border-radius: 999px; margin: 1rem 0; overflow: hidden; }
.atd-stac-bar { height: 100%; width: 0; background: #2F5F8F; transition: width .2s; }
.atd-stac-log {
  font-family: Consolas, monospace; font-size: 12px;
  background: #F0F4F8; padding: 12px; border-radius: 8px;
  min-height: 120px; color: #1A2B3C;
}
.atd-visor-main {
  display: grid;
  grid-template-columns: 220px 1fr 200px;
  min-height: 480px;
}
@media (max-width: 1000px) {
  .atd-visor-main { grid-template-columns: 1fr; }
}
.atd-visor-left {
  background: #F4F6F8;
  border-right: 1px solid #D0DCE8;
  padding: 12px;
  overflow-y: auto;
  max-height: 520px;
}
.atd-visor-left h6 { margin: 0 0 10px; font-size: 11px; color: #2F5F8F; text-transform: uppercase; }
.atd-load-scenes-btn {
  width: 100%;
  background: #2F5F8F;
  color: #fff;
  border: none;
  padding: 10px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  margin-bottom: 12px;
}
.atd-load-scenes-btn.atd-loaded { background: #148F77; }
.atd-scene-item {
  padding: 8px;
  border: 1px solid #D0DCE8;
  border-radius: 6px;
  margin-bottom: 6px;
  background: #fff;
  font-size: 11px;
}
.atd-scene-date { font-weight: 700; color: #1A2B3C; }
.atd-scene-meta { color: #5A6B7D; font-size: 10px; }
.atd-scene-pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 800;
  margin-right: 4px;
  margin-top: 4px;
  background: #e0e0e0;
  color: #666;
}
.atd-scene-pill.active { background: #2F5F8F; color: #fff; }
.atd-visor-center { display: flex; flex-direction: column; background: #1a1a2e; }
.atd-viewer-chrome {
  display: flex; justify-content: space-between; align-items: center;
  padding: 6px 12px; background: #2F5F8F; color: #fff; font-size: 10px;
}
.atd-dual-viewer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  gap: 2px;
  min-height: 320px;
}
.atd-viewport {
  position: relative;
  overflow: hidden;
  background: #000;
  cursor: grab;
}
.atd-viewport:active { cursor: grabbing; }
.atd-vp-label {
  position: absolute; top: 8px; left: 8px; z-index: 5;
  font-size: 10px; font-weight: 800; padding: 4px 8px; border-radius: 4px;
}
.atd-vp-inner {
  position: relative;
  width: 100%; height: 100%;
  min-height: 300px;
  display: flex; align-items: center; justify-content: center;
  transform-origin: center center;
  transition: filter .3s;
}
.atd-vp-inner img {
  max-width: 100%; max-height: 100%;
  object-fit: contain;
  pointer-events: none;
}
.atd-alert-pin {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(196,30,58,.9);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 800;
  border: 2px solid #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.5);
  z-index: 4;
  pointer-events: none;
}
.atd-alert-box {
  position: absolute;
  top: 50%; left: 50%;
  width: 42%; height: 38%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
}
.atd-alert-box-ring {
  position: absolute; inset: 0;
  border: 3px solid #E30613;
  border-radius: 4px;
  box-shadow: 0 0 0 2px rgba(255,255,255,.9), 0 0 20px rgba(227,6,19,.6);
}
.atd-alert-box-ring.atd-pulse-anim {
  animation: atdAlertPulse 1.2s ease-in-out infinite;
}
@keyframes atdAlertPulse {
  0%, 100% { box-shadow: 0 0 0 2px #fff, 0 0 12px rgba(227,6,19,.5); }
  50% { box-shadow: 0 0 0 4px #fff, 0 0 28px rgba(227,6,19,.9); }
}
.atd-alert-box-corner {
  position: absolute; width: 14px; height: 14px;
  border: 3px solid #fff;
}
.atd-alert-box-corner.tl { top: -2px; left: -2px; border-right: none; border-bottom: none; }
.atd-alert-box-corner.tr { top: -2px; right: -2px; border-left: none; border-bottom: none; }
.atd-alert-box-corner.bl { bottom: -2px; left: -2px; border-right: none; border-top: none; }
.atd-alert-box-corner.br { bottom: -2px; right: -2px; border-left: none; border-top: none; }
.atd-alert-label {
  position: absolute;
  top: -28px; left: 50%;
  transform: translateX(-50%);
  background: #C41E3A;
  color: #fff;
  padding: 4px 10px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.atd-chk { font-size: 11px; margin-left: 10px; display: inline-flex; align-items: center; gap: 4px; }
.atd-band-select {
  width: 100%; padding: 8px; font-size: 11px;
  border: 1px solid #D0DCE8; border-radius: 6px;
  margin-bottom: 10px;
}
.atd-tool-opts { font-size: 11px; margin-bottom: 12px; }
.atd-tool-opt { display: block; margin: 6px 0; color: #444; }
.atd-gfp-logo { width: 100%; max-width: 180px; height: auto; display: block; margin: 0 auto; object-fit: contain; }
.atd-gfp-brand { padding: 8px; background: #fff; border: 1px solid #D0DCE8; border-radius: 8px; margin: 12px 0; }

/* Pie institucional ATD Ã¢ÂÂ rojo / azul GFP */
.atd-inst-footer {
  margin-top: 1.25rem;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 61, 165, 0.2);
  background: linear-gradient(135deg, #f8faff 0%, #fff 48%, #fff5f5 100%);
  box-shadow: 0 8px 24px rgba(0, 61, 165, 0.08);
}
.atd-inst-footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1.25rem 1.5rem;
}
@media (max-width: 720px) {
  .atd-inst-footer-inner { grid-template-columns: 1fr; text-align: center; }
  .atd-inst-footer-cta { display: flex; flex-direction: column; align-items: center; }
}
.atd-inst-footer-brand p {
  margin: 0.5rem 0 0;
  font-size: 12px;
  color: #5a6b7d;
  text-align: center;
}
.atd-inst-logos-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1rem 1.25rem;
  padding: 0.5rem 0;
}
.atd-inst-logo-part {
  height: 52px;
  width: auto;
  max-width: 160px;
  object-fit: contain;
  flex: 0 1 auto;
}
.atd-inst-footer img {
  height: 52px !important;
  width: auto !important;
  max-width: 160px !important;
  object-fit: contain !important;
}
.atd-inst-logo-gfp { max-height: 56px; max-width: 120px; }
.atd-inst-logo-seco { max-height: 48px; max-width: 140px; }
.atd-inst-logo-basel { max-height: 44px; max-width: 150px; }
.atd-gfp-brand-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.atd-gfp-logo-sm {
  max-height: 36px;
  max-width: 90px;
  width: auto;
  object-fit: contain;
}
.atd-inst-footer-cta h5 {
  margin: 0 0 6px;
  color: #003DA5;
  font-size: 14px;
}
.atd-inst-footer-cta p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #444;
  line-height: 1.45;
}
.atd-github-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #003DA5, #002a75);
  color: #fff !important;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(0, 61, 165, 0.35);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.atd-github-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(227, 6, 19, 0.25);
  background: linear-gradient(135deg, #003DA5 40%, #E30613);
}
.atd-github-btn i { font-size: 1.25rem; }

.atd-chart-reset {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 12px;
  border: 1px solid rgba(0, 61, 165, 0.25);
  border-radius: 999px;
  background: #fff;
  color: #003DA5;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.atd-chart-reset:hover { background: #eef3fb; border-color: #003DA5; }
.atd-h1-chart-wrap { position: relative; }
.atd-zona-card.atd-zona-dim { opacity: 0.35; pointer-events: none; }
.atd-mission-complete {
  background: linear-gradient(90deg, #003DA5, #E30613) !important;
}
.atd-flow-badge { background: #003DA5 !important; }
.atd-stac-console {
  background: #0d1117;
  border-top: 1px solid #333;
  max-height: 90px;
}
.atd-console-title {
  font-size: 10px; font-weight: 800; color: #58a6ff;
  padding: 4px 10px; background: #161b22;
}
.atd-console-body {
  font-family: Consolas, monospace;
  font-size: 10px;
  color: #7ee787;
  padding: 6px 10px;
  max-height: 60px;
  overflow-y: auto;
}
.atd-visor-right {
  background: #F4F6F8;
  border-left: 1px solid #D0DCE8;
  padding: 12px;
  font-size: 11px;
}
.atd-visor-right h6 { margin: 12px 0 8px; font-size: 10px; color: #2F5F8F; text-transform: uppercase; }
.atd-scene-table { width: 100%; font-size: 10px; }
.atd-scene-table td { padding: 3px 0; border-bottom: 1px solid #e0e0e0; }
.atd-scene-table td:first-child { color: #5A6B7D; width: 45%; }
.atd-index-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.atd-index-btns-4 { grid-template-columns: 1fr 1fr; }
.atd-idx {
  border: none; padding: 10px; border-radius: 6px;
  font-weight: 800; font-size: 11px; cursor: pointer;
  color: #fff;
}
.atd-idx-ndvi { background: #3498db; }
.atd-idx-nbr { background: #e74c3c; }
.atd-idx-swir { background: #e67e22; }
.atd-idx-rgb { background: #5d6d7e; border: 2px solid #3498db; }
.atd-idx[data-band="swir"] { background: #e67e22; grid-column: span 2; }
.atd-idx[data-band="rgb"] { background: #5A6B7D; grid-column: span 2; }
.atd-idx.active { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #2F5F8F; }
.atd-gfp-brand {
  margin-top: 16px; padding: 12px;
  background: #fff; border-radius: 8px; text-align: center;
  border: 1px solid #D0DCE8;
}
.atd-gfp-brand strong { font-size: 1.4rem; color: #C41E3A; display: block; }
.atd-alerta-compact { width: 100%; margin-top: 10px; font-size: 11px; }
.atd-export-preview {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 1rem 0;
}
.atd-export-preview img { width: 100%; border-radius: 8px; border: 1px solid #ddd; }
.atd-h3-complete { background: linear-gradient(135deg, #2F5F8F, #006D5B); }
.atd-flow-badge {
  background: #006D5B;
  color: #fff;
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 6px;
}
.atd-filter {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}
.atd-filter select { min-width: 180px; }
.atd-guia-btn { margin-left: auto; }
.atd-section-title {
  margin: 1.5rem 0 0.75rem;
  color: #1a4d2e;
  font-size: 1.05rem;
}
.atd-reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.atd-report-card {
  display: flex;
  gap: 14px;
  background: #fff;
  border: 1px solid #e8ece9;
  border-radius: 12px;
  padding: 1.1rem;
  box-shadow: 0 4px 14px rgba(26,77,46,.06);
  transition: transform .2s, box-shadow .2s;
}
.atd-report-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(26,77,46,.1);
}
.atd-report-icon {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffe8e8, #fff5f5);
  color: #c0392b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.atd-report-body h5 { margin: 0 0 6px; color: #1a4d2e; font-size: 15px; }
.atd-report-meta { margin: 0 0 12px; font-size: 12px; color: #888; }
.atd-report-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-outline {
  background: #fff;
  border: 1px solid #006D5B;
  color: #006D5B;
  text-decoration: none;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.atd-docs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}
.atd-doc-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fffb;
  border: 1px solid #d5e8de;
  border-radius: 8px;
  color: #1a4d2e;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background .2s;
}
.atd-doc-link:hover { background: #eef8f2; }
.btn-warning { background: #f0ad4e; color: #fff; padding: 10px 20px; }

/* Modal mapa XL */
.modal-dialog-xl {
  max-width: min(1200px, 96vw);
  max-height: 94vh;
}
.modal-map-wrap {
  max-height: calc(94vh - 140px);
  overflow: auto;
}

/* Tendencias welcome */
.tend-welcome {
  text-align: center;
  padding: 100px 40px;
  background: #f8f9fa;
  border-radius: 12px;
  border: 2px dashed #dee2e6;
}
.tend-welcome i { font-size: 5em; color: #ccc; margin-bottom: 20px; display: block; }
.tend-welcome h3 { color: #666; margin: 0 0 15px; }
.tend-welcome p { color: #999; font-size: 15px; max-width: 500px; margin: 0 auto; }
#chart-tendencias-full { min-height: 400px; }

/* ============================================================
   Dashboard redesign (Jorge mockup) â tab-dashboard only
   GFP navy #003DA5 Â· accent #E86A17 Â· cache v=20260911b
   ============================================================ */
:root {
  --gfp-navy: #003DA5;
  --gfp-orange: #E86A17;
  --dash-forest: #0b3d2e;
  --dash-forest-mid: #145a32;
}

#tab-dashboard {
  padding-left: 0;
  padding-right: 0;
  max-width: none;
}

#tab-dashboard > .dash-hero,
#tab-dashboard > .dash-filters-bar,
#tab-dashboard > .dash-main-grid,
#tab-dashboard > .dash-analysis-below,
#tab-dashboard > .region-insights-section,
#tab-dashboard > .footer-simple {
  margin-left: auto;
  margin-right: auto;
}

.dash-hero {
  background-image:
    linear-gradient(105deg, rgba(0, 18, 45, 0.72) 0%, rgba(0, 22, 55, 0.45) 48%, rgba(0, 18, 40, 0.22) 100%),
    url(/assets/img/hero_amazonia.jpg);
  background-position: center 40%;
  background-size: cover;
  background-repeat: no-repeat;
  color: #fff;
  min-height: 280px;
  padding: 2.25rem 1.5rem;
  margin: 0 0 1rem;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
}
.dash-hero::after {
  content: none;
}
.dash-hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
}
.dash-hero-copy {
  flex: 1 1 320px;
  max-width: 720px;
  background: rgba(0, 25, 65, 0.58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  padding: 1.15rem 1.35rem 1.2rem;
  box-shadow: 0 8px 28px rgba(0, 10, 30, 0.25);
}
.dash-hero-copy h1 {
  margin: 0 0 0.55rem;
  font-size: clamp(1.35rem, 2.4vw, 1.85rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0.01em;
}
.dash-hero-sub {
  margin: 0;
  font-size: 1rem;
  opacity: 0.92;
  font-weight: 500;
  line-height: 1.45;
}
.dash-hero-eyebrow { margin:0 0 0.4rem; font-size:0.8rem; font-weight:700; letter-spacing:0.04em; text-transform:uppercase; opacity:0.9; color:#E85D04; }
.section-hero { min-height: 200px; }
.section-hero .dash-hero-copy h1 { font-size: clamp(1.15rem, 2vw, 1.55rem); }
.dash-hero-accent {
  display: flex;
  align-items: stretch;
  gap: 14px;
  max-width: 260px;
  flex: 0 1 auto;
  background: rgba(0, 25, 65, 0.45);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 8px;
  padding: 0.85rem 1rem 0.85rem 0;
}
.dash-hero-accent-bar {
  width: 7px;
  border-radius: 0 4px 4px 0;
  background: #E30613;
  flex-shrink: 0;
}
.dash-hero-accent p {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
  align-self: center;
}

.dash-filters-bar {
  max-width: 1400px;
  margin: 0 1rem 1rem;
  margin-left: max(1rem, calc((100% - 1400px) / 2));
  margin-right: max(1rem, calc((100% - 1400px) / 2));
  padding: 0.85rem 1.1rem 0.95rem;
  border: 1px solid #dce4ec;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 40, 80, 0.07);
  background: #f7f9fc;
}
.dash-filters-row {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) minmax(120px, 1fr) minmax(150px, 1.35fr) minmax(140px, 1.05fr) auto;
  gap: 0.75rem 0.9rem;
  align-items: end;
}
.dash-filters-title {
  margin: 0;
  color: #0a1f4d;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
  align-self: center;
  padding-bottom: 0.15rem;
}
.dash-filters-title i {
  margin-right: 6px;
  color: #0a1f4d;
}
.dash-filters-bar .filter-info-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.55rem 0.65rem;
  margin: 0.55rem 0 0;
}
.dash-filters-bar .filter-info {
  margin: 0;
  padding: 6px 12px;
  font-size: 0.78rem;
  background: rgba(0, 61, 165, 0.08);
  color: var(--gfp-navy);
  border-radius: 999px;
  display: none;
}
.dash-filters-bar .filter-info.visible {
  display: inline-block;
}
.dash-filters-bar .filter-info:empty {
  display: none;
  margin: 0;
  padding: 0;
}
.btn-restablecer {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1e3a5f;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}
.btn-restablecer:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #0f172a;
}
.btn-restablecer.hidden {
  display: none !important;
}
.dash-filter-field {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.55rem 0.65rem 0.6rem;
  box-shadow: 0 1px 3px rgba(15, 40, 80, 0.04);
}
.dash-filter-field label {
  display: block;
  font-weight: 700;
  font-size: 0.76rem;
  color: #334155;
  margin: 0 0 0.3rem;
}
.dash-filter-field label i {
  margin-right: 5px;
  color: #0a1f4d;
  width: 14px;
  text-align: center;
}
.dash-filter-field select {
  width: 100%;
  padding: 7px 8px;
  border-radius: 6px;
  border: 1px solid #d0d9e4;
  font-family: inherit;
  font-size: 0.88rem;
  background: #fff;
}
.dash-filter-periodo .year-range-hint {
  margin-top: 0.25rem;
  margin-bottom: 0;
  font-size: 0.72rem;
}

.dash-main-grid {
  display: grid;
  grid-template-columns: minmax(280px, 36%) minmax(0, 64%);
  gap: 1rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem 1rem;
  align-items: stretch;
}
.dash-col-left,
.dash-col-right {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
  height: 100%;
}
.dash-col-left .dash-kpi-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
}
.dash-col-right .dash-map-card {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  height: 100%;
}
.dash-col-right .dash-map-shell {
  flex: 1 1 auto;
}

.dash-kpi-card .section-title,
.dash-analysis-card .section-title,
.dash-map-card .section-title {
  margin: 0 0 0.35rem;
  color: var(--gfp-navy);
  font-size: 1.05rem;
}
.dash-kpi-subtitle {
  margin: 0 0 0.45rem;
  font-size: 0.82rem;
  color: #6b7c93;
  font-weight: 500;
  line-height: 1.35;
}
.dash-kpi-hint {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  color: #1e3a5f;
  background: rgba(0, 61, 165, 0.06);
  border: 1px dashed rgba(0, 61, 165, 0.25);
  border-radius: 8px;
  padding: 0.45rem 0.65rem;
}
.dash-kpi-hint i { margin-right: 0.35rem; color: var(--gfp-navy, #003da5); }

.kpi-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  flex: 1 1 auto;
  min-height: 0;
  justify-content: space-between;
}
.kpi-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  flex: 1 1 0;
  min-height: 88px;
  padding: 1rem 1.05rem;
  background: linear-gradient(165deg, #ffffff 0%, #f8fafc 100%);
  border-left-width: 4px;
  border-left-style: solid;
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  border-top: 1px solid #eef2f6;
  border-right: 1px solid #eef2f6;
  border-bottom: 1px solid #eef2f6;
  transition: box-shadow 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.kpi-row--ha { border-left-color: #d9534f; }
.kpi-row--var { border-left-color: #5cb85c; }
.kpi-row--ant { border-left-color: #f39c12; }
.kpi-row--causa { border-left-color: #1e3a5f; }
.kpi-row:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(0, 61, 165, 0.12);
}
.kpi-row.is-open {
  box-shadow: 0 0 0 2px rgba(0, 61, 165, 0.2);
  border-color: rgba(0, 61, 165, 0.35);
}
.kpi-chevron {
  margin-left: auto;
  color: #94a3b8;
  font-size: 0.75rem;
  transition: transform 0.2s ease;
  flex-shrink: 0;
}
.kpi-row.is-open .kpi-chevron {
  transform: rotate(180deg);
  color: var(--gfp-navy, #003da5);
}

.kpi-detail-dock {
  margin: 0.85rem 0 0;
  padding: 0.85rem 0.75rem 1rem;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  animation: kpiDockIn 0.28s ease;
}
.dash-kpi-card .kpi-detail-dock:not(.hidden) {
  max-height: min(70vh, 900px);
  overflow-y: auto;
  scrollbar-width: none;
}
.dash-kpi-card .kpi-detail-dock:not(.hidden)::-webkit-scrollbar {
  width: 0;
  height: 0;
  display: none;
}
.charts-stack--compact {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.charts-stack--compact .chart-block {
  margin: 0;
}
@keyframes kpiDockIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.kpi-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.kpi-detail-head .section-title { margin: 0; }
.kpi-detail-close {
  border: 1px solid #e2e8f0;
  background: #fff;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  cursor: pointer;
  color: #64748b;
}
.kpi-detail-close:hover {
  background: #f8fafc;
  color: #0f172a;
}
.kpi-detail-lead {
  margin: 0.5rem 0 0.75rem;
  color: #64748b;
  font-size: 0.9rem;
  line-height: 1.45;
}
.kpi-detail-loading,
.kpi-detail-empty {
  margin: 0.5rem 0;
  color: #64748b;
}
.kpi-detail-table-title {
  margin: 1rem 0 0.5rem;
  color: #1e3a5f;
  font-size: 0.95rem;
}
.kpi-detail-table-wrap {
  overflow-x: auto;
  border: 1px solid #eef2f6;
  border-radius: 10px;
}
.kpi-detail-placeholder { margin-top: 0.75rem; }
.kpi-detail-dock .charts-stack { margin-top: 0.75rem; }
.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1.15rem;
}
.kpi-icon--tree {
  background: #fef2f2;
  color: #9a3412;
}
.kpi-icon--chart {
  background: #ecfdf5;
  color: #0f766e;
}
.kpi-icon--pie {
  background: #fff7ed;
  color: #9a3412;
}
.kpi-icon--gear {
  background: #eff6ff;
  color: #1e3a5f;
}
.kpi-body { flex: 1; min-width: 0; }
.kpi-body .label {
  margin: 0 0 2px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #7a8699;
  text-transform: none;
  letter-spacing: 0;
}
.kpi-body .number {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0d2b5c;
  line-height: 1.2;
}
.kpi-body .sub {
  display: block;
  margin-top: 4px;
  font-size: 0.75rem;
  color: #8a96a8;
}
#kpi-hectareas .kpi-icon { background: rgba(217, 83, 79, 0.12); color: #d9534f; }
#kpi-variacion .kpi-icon { background: rgba(243, 156, 18, 0.14); color: #e67e22; }
#kpi-porcentaje .kpi-icon { background: rgba(0, 61, 165, 0.1); color: var(--gfp-navy); }
#kpi-causa .kpi-icon { background: rgba(92, 184, 92, 0.14); color: #2e7d32; }
.kpi-body { flex: 1; min-width: 0; position: relative; z-index: 1; }
.kpi-row .label {
  font-size: 0.78rem;
  color: #64748b;
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 700;
  margin: 0 0 2px;
}
.kpi-row .number {
  font-size: clamp(1.45rem, 2.1vw, 1.85rem);
  font-weight: 800;
  margin: 0;
  line-height: 1.15;
  color: #1e293b;
  letter-spacing: -0.02em;
}
.kpi-row .sub {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-top: 4px;
}
.kpi-row.kpi-dynamic .kpi-bg-icon {
  right: 12px;
  font-size: 2.4em;
  opacity: 0.1;
}

.dash-analysis-card {
  min-height: 280px;
}
.charts-placeholder {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 1.25rem 1rem;
  background: linear-gradient(135deg, #f5f8fc, #fff);
  border: 1px dashed rgba(0, 61, 165, 0.25);
  border-radius: 8px;
  color: #475569;
  font-size: 0.9rem;
  line-height: 1.5;
}
.charts-placeholder i {
  color: var(--gfp-navy);
  margin-top: 2px;
  flex-shrink: 0;
}
.charts-placeholder p { margin: 0; }
.charts-stack {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  align-items: stretch;
}
.chart-block {
  background: linear-gradient(165deg, #ffffff 0%, #f7fafc 55%, #f1f5f9 100%);
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 14px;
  padding: 0.75rem 0.8rem 0.5rem;
  min-width: 0;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.8) inset,
    0 8px 22px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.chart-block:hover {
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.9) inset,
    0 12px 28px rgba(15, 23, 42, 0.09);
}
.chart-block--wide {
  grid-column: 1 / -1;
}
.chart-block h6 {
  margin: 0 0 0.45rem;
  font-size: 0.84rem;
  color: #0f172a;
  font-weight: 750;
  letter-spacing: 0.01em;
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
  padding-bottom: 0.45rem;
}
.chart-block h6 i { margin-right: 6px; color: #006D5B; }

.dash-map-card { height: auto; }
.dash-map-period {
  margin: -0.4rem 0 0.65rem;
  font-size: 0.88rem;
  color: #64748b;
  font-weight: 600;
}
#tab-dashboard .dash-map-shell {
  position: relative;
  height: auto;
  min-height: 560px;
  height: 64vh;
  max-height: 820px;
  border-radius: 12px;
  border: 1px solid #d5dee8;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(0, 45, 85, 0.04);
  background: #0b1220;
}
#tab-dashboard #map.dash-map,
#tab-dashboard .dash-map {
  height: 100% !important;
  min-height: 100% !important;
  max-height: none !important;
  border-radius: 0;
  border: none;
  box-shadow: none;
}

/* Panel lateral tipo ficha / tabla de atributos */
.map-feature-panel {
  position: absolute;
  top: 12px;
  right: 12px;
  bottom: 12px;
  width: min(360px, calc(100% - 24px));
  z-index: 650;
  pointer-events: none;
  opacity: 0;
  transform: translateX(18px);
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.map-feature-panel.is-open {
  pointer-events: auto;
  opacity: 1;
  transform: translateX(0);
}
.map-feature-panel[hidden] {
  display: block !important;
  visibility: hidden;
}
.map-feature-panel.is-open[hidden] {
  visibility: visible;
}
.map-feature-panel-inner {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(226, 232, 240, 0.95);
  overflow: hidden;
}
.map-feature-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.85rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
  border-bottom: 1px solid #e2e8f0;
}
.map-feature-eyebrow {
  margin: 0 0 0.2rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}
.map-feature-head h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f274f;
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.map-feature-badge-host { margin-top: 0.25rem; }
.map-feature-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #64748b;
  cursor: pointer;
}
.map-feature-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.map-feature-body {
  flex: 1 1 auto;
  overflow: auto;
  padding: 0.85rem 1rem 1.1rem;
  scrollbar-width: thin;
}
.map-feature-section {
  margin-bottom: 0.85rem;
}
.map-feature-section-title {
  margin: 0 0 0.55rem;
  padding: 0.4rem 0.65rem;
  border-radius: 8px;
  background: #0f274f;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}
.map-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.map-feature-field {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  padding: 0.55rem 0.6rem;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.map-feature-field--wide { grid-column: 1 / -1; }
.map-feature-field i {
  margin-top: 2px;
  color: #003DA5;
  width: 14px;
  text-align: center;
  flex-shrink: 0;
}
.map-feature-field .label {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #94a3b8;
  margin-bottom: 0.12rem;
}
.map-feature-field .value {
  display: block;
  font-size: 0.88rem;
  font-weight: 700;
  color: #1e293b;
  line-height: 1.3;
  word-break: break-word;
}
.map-feature-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
}
.map-feature-metric {
  text-align: center;
  padding: 0.75rem 0.5rem;
  border-radius: 12px;
  background: linear-gradient(165deg, #fff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-left: 4px solid #94a3b8;
}
.map-feature-metric strong {
  display: block;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0f274f;
  line-height: 1.1;
}
.map-feature-metric span {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #64748b;
}
.map-feature-metric--ant { border-left-color: #9a3412; }
.map-feature-metric--ant strong { color: #9a3412; }
.map-feature-metric--nat { border-left-color: #0f766e; }
.map-feature-metric--nat strong { color: #0f766e; }
.map-feature-metric--total { border-left-color: #c0392b; }
.map-feature-metric--total strong { color: #c0392b; }
.map-feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.35rem;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.map-feature-badge--ant { background: #fef2f2; color: #9a3412; }
.map-feature-badge--nat { background: #ecfdf5; color: #0f766e; }
.map-feature-badge--acr { background: #ecfdf5; color: #166534; }
.map-feature-badge--zi { background: #f1f5f9; color: #475569; }
.map-feature-note {
  margin: 0.35rem 0 0;
  padding: 0.65rem 0.75rem;
  border-radius: 10px;
  background: #fff7ed;
  border-left: 4px solid #f59e0b;
  color: #9a3412;
  font-size: 0.84rem;
  line-height: 1.45;
}
.map-feature-foot {
  margin-top: 0.5rem;
  padding-top: 0.65rem;
  border-top: 1px solid #eef2f7;
  font-size: 0.78rem;
  color: #94a3b8;
}
@media (max-width: 720px) {
  .map-feature-panel {
    top: auto;
    left: 10px;
    right: 10px;
    bottom: 10px;
    width: auto;
    max-height: 48%;
    transform: translateY(16px);
  }
  .map-feature-panel.is-open { transform: translateY(0); }
}

.dash-analysis-below {
  max-width: 1400px;
  margin: 0 auto 1rem;
  padding: 1rem 1.1rem 1.15rem;
}

.region-insights-section {
  max-width: 1400px;
  margin: 0 auto 1.5rem;
  padding: 0 1rem 0.5rem;
}
.region-insights-section-title {
  margin: 0 0 0.85rem;
  color: #0a1f4d;
  font-size: 1.2rem;
  font-weight: 800;
}
.region-insights-section-title i {
  margin-right: 8px;
  color: var(--gfp-navy);
}
#tab-dashboard .region-insights-root {
  margin-top: 0;
  margin-bottom: 0;
}
#tab-dashboard .region-cards {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1100px) {
  .dash-filters-row {
    grid-template-columns: 1fr 1fr;
  }
  .dash-filters-title {
    grid-column: 1 / -1;
    white-space: normal;
  }
  .dash-filter-actions {
    flex-direction: row;
    grid-column: 1 / -1;
  }
  .dash-main-grid {
    grid-template-columns: 1fr;
  }
  #tab-dashboard #map.dash-map {
    height: 480px;
    max-height: none;
  }
  #tab-dashboard .region-cards {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .dash-filters-row { grid-template-columns: 1fr; }
  .dash-hero { padding: 1.35rem 1rem; min-height: 220px; }
  .dash-hero-accent { max-width: 100%; }
  .dash-main-grid { padding: 0 0.75rem 1rem; }
  .region-insights-section { padding: 0 0.75rem 0.5rem; }
  .dash-filter-actions { flex-direction: column; }
}
