/* =====================================================
   OBSERVATORIO
===================================================== */

.observatory-content {
  padding-top: 28px;
}


/* =====================================================
   HERO
===================================================== */

.observatory-hero {
  position: relative;

  min-height: 185px;

  display: flex;

  align-items: center;
  justify-content: space-between;

  gap: 25px;

  padding:
    30px
    32px;

  margin-bottom: 20px;

  overflow: hidden;

  border:
    1px solid
    #dce9f5;

  border-radius: 24px;

  background:
    radial-gradient(
      circle at 88% 12%,
      rgba(93,201,255,.24),
      transparent 28%
    ),
    radial-gradient(
      circle at 70% 110%,
      rgba(22,136,255,.14),
      transparent 35%
    ),
    linear-gradient(
      130deg,
      #ffffff 0%,
      #f4faff 100%
    );

  box-shadow:
    0 16px 44px
    rgba(19,75,124,.06);
}


.observatory-hero::after {
  content: "";

  position: absolute;

  right: -60px;
  top: -80px;

  width: 260px;
  height: 260px;

  border:
    45px solid
    rgba(22,136,255,.045);

  border-radius: 50%;
}


.observatory-hero-copy {
  position: relative;

  z-index: 2;

  max-width: 700px;
}


.observatory-badge {
  display: inline-flex;

  align-items: center;

  gap: 7px;

  padding:
    7px
    10px;

  border:
    1px solid
    #d7eaff;

  border-radius: 999px;

  color:
    #1476d3;

  background:
    #eef7ff;

  font-size: 11.5px;

  font-weight: 800;
}


.observatory-hero h1 {
  margin-top: 14px;

  font-family:
    "Manrope",
    sans-serif;

  color:
    #061326;

  font-size: 32px;

  letter-spacing:
    -1.3px;
}


.observatory-hero p {
  max-width: 680px;

  margin-top: 8px;

  color:
    #6e7c90;

  font-size: 13px;

  line-height: 1.7;
}


.observatory-status {
  position: relative;

  z-index: 2;

  min-width: 185px;

  display: flex;

  align-items: center;

  gap: 11px;

  padding:
    14px
    15px;

  border:
    1px solid
    rgba(255,255,255,.9);

  border-radius: 15px;

  background:
    rgba(255,255,255,.75);

  box-shadow:
    0 12px 30px
    rgba(8,69,119,.08);

  backdrop-filter:
    blur(8px);
}


.status-dot {
  width: 10px;
  height: 10px;

  flex:
    0
    0
    auto;

  border-radius: 50%;

  background:
    #18a66b;

  box-shadow:
    0 0 0 5px
    rgba(24,166,107,.12);
}


.observatory-status small {
  display: block;

  color:
    #8592a4;

  font-size: 11px;
}


.observatory-status strong {
  display: block;

  margin-top: 3px;

  color:
    #061326;

  font-size: 12.5px;
}


/* =====================================================
   FILTROS
===================================================== */

.filter-panel {
  display: flex;

  align-items: flex-end;
  justify-content: space-between;

  gap: 22px;

  padding:
    18px
    20px;

  margin-bottom: 20px;

  border:
    1px solid
    #dfe8f2;

  border-radius: 19px;

  background:
    #ffffff;

  box-shadow:
    0 10px 30px
    rgba(20,73,118,.04);
}


.filter-title {
  min-width: 220px;

  display: flex;

  align-items: center;

  gap: 11px;
}


.filter-icon {
  width: 40px;
  height: 40px;

  display: flex;

  align-items: center;
  justify-content: center;

  flex:
    0
    0
    auto;

  border-radius: 12px;

  color:
    #1688ff;

  background:
    #ebf6ff;

  font-size: 14.5px;
}


.filter-title strong {
  display: block;

  color:
    #061326;

  font-size: 13px;
}


.filter-title span {
  display: block;

  margin-top: 3px;

  color:
    #8995a6;

  font-size: 11px;
}


.filter-grid {
  flex: 1;

  display: grid;

  grid-template-columns:
    repeat(3,minmax(135px,1fr))
    auto;

  gap: 10px;

  align-items: end;
}


.filter-field label {
  display: block;

  margin-bottom: 5px;

  color:
    #69768a;

  font-size: 11px;

  font-weight: 700;
}


.filter-field select {
  width: 100%;
  height: 39px;

  padding:
    0
    10px;

  border:
    1px solid
    #dce6f0;

  border-radius: 10px;

  outline: 0;

  color:
    #4d5b6f;

  background:
    #f9fbfd;

  font-size: 11.5px;
}


.filter-field select:focus {
  border-color:
    #a9d5fa;

  box-shadow:
    0 0 0 3px
    rgba(22,136,255,.07);

  background:
    white;
}


.filter-button {
  height: 39px;

  display: flex;

  align-items: center;

  gap: 7px;

  padding:
    0
    15px;

  border-radius: 10px;

  color: white;

  background:
    linear-gradient(
      100deg,
      #0e70d6,
      #1688ff
    );

  box-shadow:
    0 9px 22px
    rgba(22,136,255,.18);

  cursor: pointer;

  font-size: 11.5px;

  font-weight: 700;
}


/* =====================================================
   KPIS
===================================================== */

.observatory-kpis {
  display: grid;

  grid-template-columns:
    repeat(4,minmax(0,1fr));

  gap: 15px;

  margin-bottom: 20px;
}


.observatory-kpi {
  min-height: 125px;

  display: flex;

  align-items: center;

  gap: 15px;

  padding:
    18px;

  border:
    1px solid
    #dfe8f2;

  border-radius: 18px;

  background:
    white;

  box-shadow:
    0 11px 30px
    rgba(20,73,118,.04);
}


.obs-kpi-icon {
  width: 45px;
  height: 45px;

  display: flex;

  align-items: center;
  justify-content: center;

  flex:
    0
    0
    auto;

  border-radius: 13px;

  font-size: 15px;
}


.obs-kpi-icon.blue {
  color:
    #1688ff;

  background:
    #eaf5ff;
}


.obs-kpi-icon.cyan {
  color:
    #0a9eac;

  background:
    #e4f8fa;
}


.obs-kpi-icon.green {
  color:
    #169868;

  background:
    #e7f8f1;
}


.obs-kpi-icon.orange {
  color:
    #df930e;

  background:
    #fff3dd;
}


.observatory-kpi span {
  display: block;

  color:
    #778599;

  font-size: 11.5px;
}


.observatory-kpi strong {
  display: block;

  margin-top: 4px;

  color:
    #061326;

  font-family:
    "Manrope",
    sans-serif;

  font-size: 24px;

  letter-spacing:
    -.7px;
}


.observatory-kpi small {
  display: block;

  margin-top: 5px;

  font-size: 10.5px;
}


.observatory-kpi small.positive {
  color:
    #168e65;
}


.observatory-kpi small.negative {
  color:
    #d45c65;
}


/* =====================================================
   MAIN CHART
===================================================== */

.obs-main-grid {
  display: grid;

  grid-template-columns:
    minmax(0,2fr)
    minmax(285px,.82fr);

  gap: 17px;

  margin-bottom: 20px;
}


.obs-chart-card,
.gap-card {
  min-height: 390px;
}


.analysis-tag {
  display: inline-flex;

  align-items: center;

  gap: 6px;

  padding:
    6px
    9px;

  border-radius: 999px;

  color:
    #1877d0;

  background:
    #edf7ff;

  font-size: 11px;

  font-weight: 700;
}


.obs-chart-wrapper {
  height: 305px;

  padding:
    15px
    20px
    20px;
}


/* =====================================================
   GAP CHART
===================================================== */

.gap-chart-wrapper {
  position: relative;

  width: 205px;
  height: 205px;

  margin:
    17px
    auto
    5px;
}


.gap-center {
  position: absolute;

  inset: 0;

  display: flex;

  flex-direction: column;

  align-items: center;
  justify-content: center;

  pointer-events: none;
}


.gap-center strong {
  color:
    #061326;

  font-family:
    "Manrope",
    sans-serif;

  font-size: 27px;
}


.gap-center span {
  margin-top: 2px;

  color:
    #8592a4;

  font-size: 11.5px;
}


.gap-summary {
  display: grid;

  grid-template-columns:
    repeat(2,1fr);

  gap: 10px;

  margin:
    5px
    20px
    20px;

  padding-top: 13px;

  border-top:
    1px solid
    #edf2f6;
}


.gap-summary > div {
  display: flex;

  align-items: center;
  justify-content: center;

  gap: 8px;
}


.gap-color {
  width: 9px;
  height: 9px;

  border-radius: 50%;
}


.gap-color.attended {
  background:
    #1688ff;
}


.gap-color.pending {
  background:
    #e7edf4;
}


.gap-summary strong {
  display: block;

  color:
    #061326;

  font-size: 13px;
}


.gap-summary small {
  display: block;

  margin-top: 2px;

  color:
    #8995a7;

  font-size: 10px;
}


/* =====================================================
   MAPA + SEGMENTACIÓN
===================================================== */

.obs-map-grid {
  display: grid;

  grid-template-columns:
    minmax(0,1.5fr)
    minmax(300px,.75fr);

  gap: 17px;

  margin-bottom: 20px;
}


.territorial-card,
.segmentation-card {
  min-height: 440px;
}


.observatory-map {
  width:
    calc(100% - 34px);

  height: 345px;

  margin:
    11px
    17px
    8px;

  overflow: hidden;

  border:
    1px solid
    #dbe7f1;

  border-radius: 15px;

  background:
    #edf4fa;
}


.obs-map-legend {
  display: flex;

  flex-wrap: wrap;

  gap: 14px;

  padding:
    5px
    18px
    16px;

  color:
    #6e7d90;

  font-size: 11px;
}


.obs-map-legend span {
  display: flex;

  align-items: center;

  gap: 5px;
}


.legend-circle {
  width: 8px;
  height: 8px;

  border-radius: 50%;
}


.legend-circle.critical {
  background:
    #ec5f6c;
}


.legend-circle.warning {
  background:
    #eca31a;
}


.legend-circle.good {
  background:
    #18a66b;
}


/* =====================================================
   SEGMENTACIÓN
===================================================== */

.segment-chart-wrapper {
  height: 220px;

  padding:
    10px
    30px
    5px;
}


.segment-list {
  display: flex;

  flex-direction: column;

  gap: 8px;

  padding:
    5px
    20px
    20px;
}


.segment-list > div {
  display: grid;

  grid-template-columns:
    9px
    1fr
    auto;

  align-items: center;

  gap: 8px;

  color:
    #68778b;

  font-size: 11px;
}


.segment-list strong {
  color:
    #061326;

  font-size: 11px;
}


.segment-dot {
  width: 8px;
  height: 8px;

  border-radius: 50%;
}


.segment-dot.one {
  background:
    #1688ff;
}


.segment-dot.two {
  background:
    #14b5ba;
}


.segment-dot.three {
  background:
    #f0a31d;
}


.segment-dot.four {
  background:
    #ed6571;
}


.segment-dot.five {
  background:
    #a9b4c3;
}


/* =====================================================
   TABLE
===================================================== */

.municipality-card {
  margin-bottom: 24px;
}


.export-button {
  height: 34px;

  display: flex;

  align-items: center;

  gap: 6px;

  padding:
    0
    11px;

  border:
    1px solid
    #dbe7f2;

  border-radius: 9px;

  color:
    #53647a;

  background:
    white;

  cursor: pointer;

  font-size: 11px;

  font-weight: 700;
}


.export-button:hover {
  color:
    #1688ff;

  border-color:
    #abd6fb;

  background:
    #f6fbff;
}


.table-scroll {
  width: 100%;

  overflow-x: auto;

  padding:
    8px
    18px
    18px;
}


.observatory-table {
  width: 100%;

  min-width: 760px;

  border-collapse: collapse;
}


.observatory-table th {
  padding:
    12px
    11px;

  border-bottom:
    1px solid
    #dfe7ef;

  color:
    #768497;

  background:
    #f8fbfe;

  text-align: left;

  font-size: 11px;

  font-weight: 800;

  letter-spacing:
    .1px;
}


.observatory-table td {
  padding:
    13px
    11px;

  border-bottom:
    1px solid
    #edf1f5;

  color:
    #59687c;

  font-size: 11.5px;
}


.observatory-table tbody tr:hover {
  background:
    #f9fcff;
}


.observatory-table td strong {
  color:
    #061326;
}


.status-badge {
  display: inline-flex;

  align-items: center;

  padding:
    5px
    8px;

  border-radius: 999px;

  font-size: 10px;

  font-weight: 800;
}


.status-badge.critical {
  color:
    #cf5360;

  background:
    #ffedf0;
}


.status-badge.warning {
  color:
    #c58210;

  background:
    #fff4df;
}


.status-badge.good {
  color:
    #168c63;

  background:
    #e8f7f1;
}


/* =====================================================
   HALLAZGOS
===================================================== */

.findings-section {
  margin-top: 28px;
}


.section-title {
  margin-bottom: 15px;
}


.section-title span {
  color:
    #1688ff;

  font-size: 11px;

  font-weight: 800;

  letter-spacing: 1px;
}


.section-title h2 {
  margin-top: 4px;

  color:
    #061326;

  font-family:
    "Manrope",
    sans-serif;

  font-size: 22px;
}


.section-title p {
  margin-top: 4px;

  color:
    #7c899b;

  font-size: 11.5px;
}


.findings-grid {
  display: grid;

  grid-template-columns:
    repeat(3,minmax(0,1fr));

  gap: 15px;

  margin-bottom: 24px;
}


.finding-card {
  position: relative;

  min-height: 205px;

  padding:
    19px;

  overflow: hidden;

  border:
    1px solid
    #dfe8f2;

  border-radius: 18px;

  background:
    white;

  box-shadow:
    0 12px 30px
    rgba(19,71,116,.04);
}


.finding-card::before {
  content: "";

  position: absolute;

  left: 0;
  top: 0;

  width: 4px;
  height: 100%;
}


.finding-card.high::before {
  background:
    #e85f6b;
}


.finding-card.medium::before {
  background:
    #efa21c;
}


.finding-card.good::before {
  background:
    #18a66b;
}


.finding-number {
  position: absolute;

  right: 16px;
  top: 12px;

  color:
    #edf2f7;

  font-family:
    "Manrope",
    sans-serif;

  font-size: 38px;

  font-weight: 800;
}


.finding-level {
  position: relative;

  z-index: 2;

  display: inline-block;

  color:
    #1688ff;

  font-size: 11px;

  font-weight: 800;
}


.finding-card h3 {
  position: relative;

  z-index: 2;

  margin-top: 18px;

  max-width: 90%;

  color:
    #061326;

  font-family:
    "Manrope",
    sans-serif;

  font-size: 15px;

  line-height: 1.4;
}


.finding-card p {
  position: relative;

  z-index: 2;

  margin-top: 9px;

  color:
    #778598;

  font-size: 11.5px;

  line-height: 1.65;
}


/* =====================================================
   RECOMENDACIÓN
===================================================== */

.recommendation-panel {
  display: flex;

  align-items: flex-start;

  gap: 18px;

  padding:
    25px;

  margin-bottom: 30px;

  border:
    1px solid
    #cee5fa;

  border-radius: 21px;

  background:
    radial-gradient(
      circle at 95% 0%,
      rgba(85,182,255,.20),
      transparent 30%
    ),
    linear-gradient(
      120deg,
      #f5fbff,
      #ffffff
    );
}


.recommendation-icon {
  width: 49px;
  height: 49px;

  display: flex;

  align-items: center;
  justify-content: center;

  flex:
    0
    0
    auto;

  border-radius: 14px;

  color:
    #1688ff;

  background:
    white;

  box-shadow:
    0 9px 23px
    rgba(22,136,255,.12);

  font-size: 17px;
}


.recommendation-content > span {
  color:
    #1688ff;

  font-size: 11px;

  font-weight: 800;

  letter-spacing:
    1px;
}


.recommendation-content h2 {
  margin-top: 6px;

  color:
    #061326;

  font-family:
    "Manrope",
    sans-serif;

  font-size: 18px;
}


.recommendation-content p {
  max-width: 900px;

  margin-top: 8px;

  color:
    #6f7e91;

  font-size: 12.5px;

  line-height: 1.65;
}


.recommendation-actions {
  display: flex;

  flex-wrap: wrap;

  gap: 9px;

  margin-top: 15px;
}


.primary-action,
.secondary-action {
  min-height: 38px;

  display: flex;

  align-items: center;

  gap: 7px;

  padding:
    0
    13px;

  border-radius: 10px;

  cursor: pointer;

  font-size: 11px;

  font-weight: 700;
}


.primary-action {
  color: white;

  background:
    linear-gradient(
      100deg,
      #0e70d5,
      #1688ff
    );
}


.secondary-action {
  color:
    #49627c;

  border:
    1px solid
    #d5e3ef;

  background:
    white;
}


/* =====================================================
   LEAFLET
===================================================== */

.observatory-map .leaflet-control-zoom {
  border: 0;
}


.observatory-map .leaflet-control-zoom a {
  color:
    #061326;

  border-color:
    #e0e7ef;
}


.observatory-map .leaflet-popup-content-wrapper {
  border-radius: 12px;
}


.observatory-map .leaflet-popup-content {
  margin:
    13px;

  font-family:
    "Inter",
    sans-serif;
}


/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1150px) {

  .filter-panel {
    align-items:
      stretch;

    flex-direction:
      column;
  }


  .filter-grid {
    grid-template-columns:
      repeat(3,1fr)
      auto;
  }


  .observatory-kpis {
    grid-template-columns:
      repeat(2,1fr);
  }


  .obs-main-grid,
  .obs-map-grid {
    grid-template-columns:
      1fr;
  }


  .findings-grid {
    grid-template-columns:
      1fr;
  }

}


@media (max-width: 760px) {

  .observatory-hero {
    align-items:
      flex-start;

    flex-direction:
      column;
  }


  .observatory-status {
    width: 100%;
  }


  .filter-grid {
    grid-template-columns:
      1fr
      1fr;
  }


  .filter-button {
    justify-content:
      center;
  }

}


@media (max-width: 600px) {

  .observatory-hero {
    padding:
      23px
      19px;
  }


  .observatory-hero h1 {
    font-size:
      27px;
  }


  .filter-grid {
    grid-template-columns:
      1fr;
  }


  .observatory-kpis {
    grid-template-columns:
      1fr;
  }


  .observatory-kpi {
    min-height:
      110px;
  }


  .obs-chart-wrapper {
    height:
      245px;
  }


  .observatory-map {
    height:
      310px;

    width:
      calc(100% - 20px);

    margin:
      10px;
  }


  .recommendation-panel {
    flex-direction:
      column;
  }

}