/* Estado de deuda — maquetado público según diseño municipal */

:root {
  --ed-teal: #098dbc;
  --ed-teal-dark: #06779f;
  --ed-teal-light: #02a3bf;
  --ed-accent: #4aa8d8;
  --ed-accent-soft: #e8f5fb;
  --ed-page-bg: #f2f7fc;
  --ed-card-shadow: 0 10px 28px rgba(9, 75, 110, 0.12);
  --ed-border: #d7e6ef;
  --ed-muted: #8a97a3;
  --ed-text: #2f3b45;
  --ed-radius-card: 22px;
  --ed-radius-pill: 999px;
}

body.page-estado-deuda {
  background: var(--ed-page-bg);
  color: var(--ed-text);
  margin-bottom: 72px;
  font-family: "Open Sans", "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Reduce legacy footer clearance when using the compact municipal bar */
body:has(.ed-footer) {
  margin-bottom: 72px;
}

/* Header */
.navbar.ed-topbar,
.ed-topbar.navbar-inverse {
  background: linear-gradient(90deg, var(--ed-teal-light) 0%, var(--ed-teal) 55%, var(--ed-teal-dark) 100%) !important;
  border: 0 !important;
  margin: 0;
  min-height: 72px;
  border-radius: 0;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.ed-topbar .container-fluid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.ed-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}

.ed-brand__logo-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  text-decoration: none;
}

.ed-brand__logo-link:hover,
.ed-brand__logo-link:focus {
  opacity: 0.92;
  text-decoration: none;
}

.ed-brand__logo {
  display: block;
  height: 48px;
  width: auto;
  max-width: min(560px, 100%);
  object-fit: contain;
}

.ed-social {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ed-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #fff;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  text-decoration: none;
  background: transparent;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.ed-social a:hover,
.ed-social a:focus {
  color: #fff;
  opacity: 0.88;
  transform: translateY(-1px);
  text-decoration: none;
}

.ed-social__icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Main card */
.ed-page {
  padding: 28px 15px 40px;
}

.ed-card {
  max-width: 1440px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--ed-radius-card);
  box-shadow: var(--ed-card-shadow);
  overflow: hidden;
}

.ed-card__header {
  background: linear-gradient(90deg, var(--ed-teal-light) 0%, var(--ed-teal) 50%, #0b6fa0 100%);
  color: #fff;
  padding: 26px 34px 28px;
  position: relative;
}

.ed-card__header::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}

.ed-card__eyebrow {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.92;
}

.ed-card__title {
  margin: 0;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.15;
}

.ed-card__body {
  padding: 28px 34px 36px;
}

/* Mode selector */
.ed-modes {
  display: flex;
  gap: 18px;
  margin-bottom: 22px;
}

.ed-mode {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px 18px;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--ed-muted);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ed-mode:hover,
.ed-mode:focus {
  color: var(--ed-teal);
  text-decoration: none;
  outline: none;
}

.ed-mode.is-active {
  border-color: var(--ed-accent);
  background: #fff;
  color: var(--ed-teal);
  box-shadow: 0 0 0 1px rgba(74, 168, 216, 0.15);
}

.ed-mode__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e9eef2;
  color: #fff;
  font-size: 18px;
}

.ed-mode.is-active .ed-mode__icon {
  background: var(--ed-accent);
}

.ed-mode__label {
  font-size: 22px;
  font-weight: 700;
  line-height: 1.1;
}

.ed-mode__action {
  display: inline-block;
  margin-top: 2px;
  padding: 5px 14px;
  border: 1px solid #c9d4dc;
  border-radius: var(--ed-radius-pill);
  font-size: 12px;
  font-weight: 600;
  color: inherit;
  background: #fff;
}

.ed-mode.is-active .ed-mode__action {
  border-color: var(--ed-accent);
  color: var(--ed-teal);
}

/* Filters */
.ed-filter {
  border: 1px solid var(--ed-border);
  border-radius: 16px;
  padding: 18px 18px;
  background: #fff;
  margin-bottom: 24px;
}

.ed-filter.well {
  box-shadow: none;
  background: #fff;
}

.ed-filter form,
.ed-filter .ed-filter__row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0;
}

.ed-filter .form-group {
  margin: 0;
}

.ed-filter .has-error .help-block,
.ed-filter .has-error .form-error {
  margin-top: 4px;
}

.ed-pill,
.ed-filter .form-control {
  height: 42px;
  border-radius: var(--ed-radius-pill) !important;
  border: 1px solid #d8dee4;
  background: #f4f5f6;
  box-shadow: none !important;
  padding: 8px 18px;
  font-size: 14px;
}

.ed-filter select.form-control {
  min-width: 210px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%238a97a3' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 36px;
}

.ed-filter input.form-control {
  min-width: 220px;
  flex: 1 1 220px;
}

.ed-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--ed-accent);
  border-radius: var(--ed-radius-pill);
  color: var(--ed-teal);
  background: #fff;
  font-weight: 600;
  white-space: nowrap;
}

.ed-filter__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.ed-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  min-width: 110px;
  padding: 0 22px;
  border-radius: var(--ed-radius-pill) !important;
  font-weight: 700;
  font-size: 14px;
  border: 1px solid transparent;
  text-decoration: none !important;
  box-shadow: none !important;
}

.ed-btn-primary,
.ed-filter .btn-primary,
.ed-filter button[type="submit"],
.ed-filter input[type="submit"] {
  background: var(--ed-teal) !important;
  border-color: var(--ed-teal) !important;
  color: #fff !important;
}

.ed-btn-primary:hover,
.ed-btn-primary:focus,
.ed-filter .btn-primary:hover,
.ed-filter .btn-primary:focus,
.ed-filter button[type="submit"]:hover,
.ed-filter button[type="submit"]:focus {
  background: var(--ed-teal-dark) !important;
  border-color: var(--ed-teal-dark) !important;
  color: #fff !important;
}

.ed-btn-ghost,
.ed-filter .btn-default,
.ed-filter a.btn-default {
  background: #fff !important;
  border-color: #d5dde3 !important;
  color: var(--ed-muted) !important;
}

.ed-btn-ghost:hover,
.ed-btn-ghost:focus,
.ed-filter .btn-default:hover,
.ed-filter .btn-default:focus,
.ed-filter a.btn-default:hover,
.ed-filter a.btn-default:focus {
  background: #f7fafc !important;
  border-color: #c2ccd4 !important;
  color: #667580 !important;
}

/* Legacy bootstrap tabs chrome no longer used */
.ed-tabs.nav-tabs {
  display: none;
}

.ed-results .ibox {
  border: 1px solid var(--ed-border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 18px;
  background: #fff;
}

.ed-results .ibox-title {
  background: #f7fbfe;
  border-bottom: 1px solid var(--ed-border);
  padding: 14px 18px;
}

.ed-results .ibox-title h3,
.ed-results .ibox-title h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ed-teal-dark);
}

.ed-results .ibox-content {
  padding: 16px 18px;
}

.ed-results .btn-primary {
  background: var(--ed-teal);
  border-color: var(--ed-teal);
  border-radius: var(--ed-radius-pill);
  font-weight: 600;
}

.ed-results .btn-default {
  border-radius: var(--ed-radius-pill);
  border-color: #d5dde3;
  color: #667580;
}

.ed-results .table > thead > tr > th {
  border-bottom-color: var(--ed-border);
  color: var(--ed-teal-dark);
}

/* Footer */
footer.footer.ed-footer,
.ed-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  background: var(--ed-teal) !important;
  color: rgba(255, 255, 255, 0.9) !important;
  min-height: 56px;
  display: flex;
  align-items: center;
}

.ed-footer .footer__copyright {
  width: 100%;
  padding: 14px 0;
  font-size: 12px;
}

.ed-footer a {
  color: #fff;
  text-decoration: underline;
}

.ed-footer a:hover {
  color: #e8f7fc;
}

@media (max-width: 991px) {
  .ed-card__body {
    padding: 22px 18px 28px;
  }

  .ed-card__header {
    padding: 22px 18px;
  }

  .ed-card__title {
    font-size: 28px;
  }

  .ed-modes {
    flex-direction: column;
  }

  .ed-filter__actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
}

@media (max-width: 767px) {
  .ed-topbar .container-fluid {
    flex-direction: column;
    align-items: flex-start;
  }

  .ed-brand__logo {
    height: 40px;
  }

  .ed-social {
    align-self: flex-end;
  }

  .ed-social a {
    width: 28px;
    height: 28px;
  }

  .ed-filter form,
  .ed-filter .ed-filter__row {
    flex-direction: column;
    align-items: stretch;
  }

  .ed-filter select.form-control,
  .ed-filter input.form-control {
    width: 100%;
    min-width: 0;
  }

  .ed-filter__actions {
    justify-content: stretch;
  }

  .ed-filter__actions .ed-btn,
  .ed-filter__actions .btn {
    flex: 1 1 0;
  }
}
