/* Rendición de cuentas + mapa interactivo */
.page-accountability .reveal {
  opacity: 1;
  transform: none;
}

.page-main--accountability {
  padding: 2rem 24px 4rem;
  background: #ffffff;
}

.acct-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.acct-hero {
  text-align: center;
  margin-bottom: 2rem;
}

.acct-eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--friendly);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}

.acct-title {
  margin: 0 0 0.65rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

.acct-lead {
  margin: 0 auto 1.25rem;
  max-width: 36rem;
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.acct-hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
}

.acct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.25rem;
  font-family: var(--friendly);
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 8px;
  transition: background var(--transition), color var(--transition), transform var(--transition);
}

.acct-btn--primary {
  color: #000000;
  background: var(--yellow);
  border: 1px solid var(--yellow);
}

.acct-btn--primary:hover {
  background: #000000;
  border-color: #000000;
  transform: none;
  text-decoration: none;
  color: #ffffff;
}

.acct-btn--ghost {
  color: var(--navy);
  background: #ffffff;
  border: 1px solid var(--border);
}

.acct-btn--ghost:hover {
  border-color: var(--navy-light);
  text-decoration: none;
}

/* Stats */
.acct-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.acct-stat {
  padding: 1.35rem 1.25rem;
  text-align: center;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.acct-stat-value {
  display: block;
  font-family: var(--friendly);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--navy);
  line-height: 1.1;
}

.acct-stat-label {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Sections */
.acct-section {
  margin-bottom: 2.5rem;
}

.acct-section-head {
  margin-bottom: 1.25rem;
}

.acct-section-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.acct-section-desc {
  margin: 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Mapa */
.acct-map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.acct-filter-btn {
  padding: 0.45rem 1rem;
  font-family: var(--friendly);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy);
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.acct-filter-btn:hover {
  border-color: var(--navy-light);
}

.acct-filter-btn.is-active {
  color: #ffffff;
  background: #000000;
  border-color: #000000;
}

.acct-filter-btn[data-filter="all"].is-active {
  background: var(--navy);
  border-color: var(--navy);
}

.acct-map-stage {
  position: relative;
  min-height: 520px;
  background: #ebebeb;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.acct-map-shell {
  position: relative;
  min-height: 520px;
}

.acct-map-tint {
  position: absolute;
  inset: 0;
  z-index: 350;
  pointer-events: none;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.04) 0%,
    rgba(0, 0, 0, 0.02) 45%,
    rgba(0, 0, 0, 0.06) 100%
  );
}

.acct-map-vignette {
  position: absolute;
  inset: 0;
  z-index: 400;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 70% at 50% 50%, transparent 55%, rgba(0, 0, 0, 0.08) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 18%, transparent 82%, rgba(0, 0, 0, 0.06) 100%);
}

.acct-map {
  position: relative;
  z-index: 1;
  width: 100%;
  min-height: 520px;
}

.acct-map-float {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 500;
  width: min(300px, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 1.15rem;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 14px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.acct-map-float.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.acct-map-float:not(.is-open) .acct-map-panel-empty {
  margin: 0;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.45;
}

.acct-map-panel-empty {
  margin: 2rem 0;
  font-size: 0.9375rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.55;
}

.acct-map-panel-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 28px;
  height: 28px;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--text-muted);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 50%;
  cursor: pointer;
}

.acct-map-panel-media {
  margin: 0 0 0.85rem;
  border-radius: 8px;
  overflow: hidden;
}

.acct-map-panel-media img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
}

.acct-map-panel-tag {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.acct-map-panel-title {
  margin: 0 0 0.5rem;
  font-family: var(--sans);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--navy);
}

.acct-map-panel-desc {
  margin: 0 0 1rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.55;
}

.acct-map-panel-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.65rem;
}

.acct-map-panel-stat-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.acct-map-panel-stat-value {
  font-family: var(--friendly);
  font-size: 0.9375rem;
  color: var(--navy);
}

.acct-map-panel-progress {
  height: 6px;
  margin-bottom: 0.65rem;
  background: #f0f0f0;
  border-radius: 100px;
  overflow: hidden;
}

.acct-map-panel-progress-bar {
  height: 100%;
  border-radius: 100px;
  transition: width 0.6s ease;
}

.acct-map-panel-foot {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  text-align: center;
}

.acct-map-panel-cta {
  display: block;
  padding: 0.7rem;
  font-family: var(--friendly);
  font-size: 0.8125rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
  color: #ffffff;
  background: var(--crimson);
  border-radius: 8px;
}

.acct-map-panel-cta:hover {
  background: var(--crimson-hover);
  text-decoration: none;
  color: #ffffff;
}

/* Marcadores */
.acct-marker-wrap {
  background: none !important;
  border: none !important;
}

.acct-marker {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  white-space: nowrap;
}

.acct-marker-halo {
  position: absolute;
  left: 0;
  width: 14px;
  height: 14px;
  background: var(--m-color, var(--navy));
  border-radius: 50%;
  opacity: 0.25;
  transform: translateX(-1px);
  animation: acct-marker-pulse 2.8s ease-in-out infinite;
}

.acct-marker-core {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  background: #ffffff;
  border: 2.5px solid var(--m-color, var(--navy));
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.acct-marker-label {
  position: relative;
  z-index: 2;
  padding: 0.2rem 0.55rem;
  font-family: var(--friendly);
  font-size: 0.6875rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 100px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.acct-marker-wrap.is-active .acct-marker-core,
.acct-marker-wrap:hover .acct-marker-core {
  transform: scale(1.25);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
}

.acct-marker-wrap.is-active .acct-marker-label,
.acct-marker-wrap:hover .acct-marker-label {
  color: #ffffff;
  background: var(--m-color, var(--navy));
  border-color: var(--m-color, var(--navy));
}

.acct-marker-wrap.is-active .acct-marker-halo {
  opacity: 0.45;
  animation-duration: 1.6s;
}

@keyframes acct-marker-pulse {
  0%, 100% { transform: translateX(-1px) scale(1); opacity: 0.2; }
  50% { transform: translateX(-1px) scale(2.2); opacity: 0; }
}

/* Tooltip al hover */
.leaflet-tooltip.acct-map-tooltip {
  margin: 0;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.leaflet-tooltip.acct-map-tooltip::before {
  display: none;
}

.acct-tip {
  width: 260px;
  padding: 0.85rem;
  font-family: var(--sans);
  color: var(--text);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
}

.acct-tip-head {
  display: flex;
  gap: 0.65rem;
  align-items: center;
  margin-bottom: 0.55rem;
}

.acct-tip-head img {
  flex-shrink: 0;
  width: 48px;
  height: 36px;
  object-fit: cover;
  border-radius: 6px;
}

.acct-tip-title {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.acct-tip-region {
  display: block;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.acct-tip-desc {
  margin: 0 0 0.65rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.acct-tip-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.35rem;
  padding-top: 0.65rem;
  border-top: 1px solid #f2f2f2;
}

.acct-tip-stat {
  text-align: center;
}

.acct-tip-stat span {
  display: block;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.acct-tip-stat strong {
  display: block;
  margin-top: 0.15rem;
  font-family: var(--friendly);
  font-size: 0.8125rem;
  color: var(--navy);
}

.acct-tip-stat--pending strong {
  color: #000000;
}

/* Tabla */
.acct-section-head--table {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem 1.5rem;
}

.acct-table-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.acct-table-filter-btn {
  padding: 0.4rem 0.9rem;
  font-family: var(--friendly);
  font-size: 0.8125rem;
  font-weight: 700;
  color: var(--navy);
  background: #ffffff;
  border: 2px solid var(--border);
  border-radius: 100px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), color var(--transition);
}

.acct-table-filter-btn:hover {
  border-color: var(--navy-light);
}

.acct-table-filter-btn.is-active {
  color: #ffffff;
  background: var(--filter-color, var(--navy));
  border-color: var(--filter-color, var(--navy));
}

.acct-table-wrap {
  overflow-x: auto;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.acct-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.acct-table th,
.acct-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid #f2f2f2;
}

.acct-table th {
  font-family: var(--friendly);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: #fafafa;
}

.acct-table tbody tr:hover {
  background: #fafafa;
}

.acct-table tfoot .acct-table-total th,
.acct-table tfoot .acct-table-total td {
  padding: 0.95rem 1rem;
  font-weight: 800;
  color: var(--navy);
  background: #fafafa;
  border-top: 2px solid var(--border);
  border-bottom: none;
}

.acct-table tfoot .acct-table-total th {
  font-family: var(--friendly);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.acct-table-amount {
  font-weight: 700;
  color: var(--navy);
}

.acct-table-amount--exec {
  color: #000000;
}

.acct-table-pending {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.acct-table-pending.is-pending {
  font-weight: 700;
  color: #000000;
}

.acct-table-badge {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--badge-color, var(--navy));
  background: color-mix(in srgb, var(--badge-color, var(--navy)) 12%, #ffffff);
  border-radius: 4px;
}

/* Otros aportes */
.acct-other-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .acct-other-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.acct-other-card {
  position: relative;
  padding: 1.15rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--yellow);
  border-radius: var(--radius);
}

.acct-other-card.is-pending {
  background: var(--gray-light);
}

.acct-other-type {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}

.acct-other-partner {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--graphite);
}

.acct-other-desc {
  margin: 0 0 0.85rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--text-muted);
}

.acct-other-metrics {
  margin: 0;
  border-top: 1px solid var(--border);
}

.acct-other-metrics > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.48rem 0;
  border-bottom: 1px solid var(--border);
}

.acct-other-metrics dt {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.acct-other-metrics dd {
  margin: 0;
  text-align: right;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--black);
}

.acct-other-metrics .acct-other-total {
  margin-top: 0.35rem;
  padding: 0.6rem 0.65rem;
  background: var(--yellow);
  border-bottom: 0;
}

.acct-other-total dt,
.acct-other-total dd {
  color: var(--black);
}

.acct-other-total dd {
  font-size: 0.9rem;
}

.acct-other-total small {
  display: block;
  font-size: 0.62rem;
  font-weight: 600;
}

.acct-other-proof {
  margin: 0.75rem 0 0;
  font-size: 0.68rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.acct-other-badge {
  display: inline-block;
  margin-top: 0.75rem;
  padding: 0.2rem 0.45rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--black);
  background: var(--yellow);
  border-radius: 2px;
}

.acct-other-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Documentos */
.acct-docs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.acct-doc-list {
  list-style: none;
  margin: 0;
  padding: 1rem 1.15rem;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.acct-doc-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid #f2f2f2;
}

.acct-doc-item:last-child {
  border-bottom: none;
}

.acct-doc-icon {
  display: flex;
  color: var(--accent);
}

.acct-doc-info {
  flex: 1;
  min-width: 0;
}

.acct-doc-info strong {
  display: block;
  font-size: 0.875rem;
  color: var(--navy);
}

.acct-doc-info span {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.acct-doc-dl {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-family: var(--friendly);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
}

.acct-doc-dl:hover {
  border-color: var(--accent);
  text-decoration: none;
  color: var(--accent);
}

.acct-doc-empty,
.acct-doc-missing {
  padding: 0.85rem 0;
  font-size: 0.875rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .acct-stats,
  .acct-docs-grid {
    grid-template-columns: 1fr;
  }

  .acct-map-stage,
  .acct-map-shell,
  .acct-map {
    min-height: 420px;
  }

  .acct-map-float {
    right: 0.75rem;
    bottom: 0.75rem;
    width: calc(100% - 1.5rem);
    max-height: 45%;
  }

  .acct-section-head--table {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 768px) {
  .page-main--accountability {
    padding: 1.5rem 16px 3rem;
  }
}
