/* Portal ciudadano — identidad municipal (estado de deuda / libre deuda) */

:root {
  --portal-teal: #098dbc;
  --portal-teal-dark: #06779f;
  --portal-teal-light: #02a3bf;
  --portal-accent: #4aa8d8;
  --portal-accent-soft: #e8f5fb;
  --portal-bg: #f2f7fc;
  --portal-surface: #ffffff;
  --portal-text: #2f3b45;
  --portal-muted: #8a97a3;
  --portal-border: #d7e6ef;
  --portal-header: #098dbc;
  --portal-header-text: #ffffff;
  --portal-danger: #b42318;
  --portal-warning-bg: #fffbeb;
  --portal-warning-border: #fcd34d;
  --portal-info-bg: #e8f5fb;
  --portal-info-border: #9fd4eb;
  --portal-radius: 16px;
  --portal-radius-card: 22px;
  --portal-radius-pill: 999px;
  --portal-shadow: 0 10px 28px rgba(9, 75, 110, 0.12);
  --portal-font: "Open Sans", "Segoe UI", Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body.portal-body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--portal-font);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--portal-text);
  background: var(--portal-bg);
}

/* —— Header —— */
.portal-header {
  background: linear-gradient(
    90deg,
    var(--portal-teal-light) 0%,
    var(--portal-teal) 55%,
    var(--portal-teal-dark) 100%
  );
  color: var(--portal-header-text);
  box-shadow: 0 2px 12px rgba(9, 75, 110, 0.22);
}

.portal-header__inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0.65rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
  min-height: 72px;
}

.portal-header__brand {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  text-decoration: none;
  color: inherit;
}

.portal-header__brand:hover {
  opacity: 0.94;
}

.portal-header__logo {
  display: block;
  height: 48px;
  width: auto;
  max-width: min(560px, 100%);
  object-fit: contain;
}

.portal-social {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.portal-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;
}

.portal-social a:hover,
.portal-social a:focus {
  color: #fff;
  opacity: 0.88;
  transform: translateY(-1px);
  text-decoration: none;
}

.portal-social__icon {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* —— Layout —— */
.portal-main {
  flex: 1;
  padding: 1.75rem 1rem 2.5rem;
}

.portal-container {
  max-width: 1440px;
  margin: 0 auto;
}

.portal-container--narrow {
  max-width: 42rem;
}

.portal-footer {
  margin-top: auto;
  min-height: 56px;
  padding: 14px 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.9);
  background: var(--portal-teal);
  border-top: none;
}

.portal-footer a {
  color: #fff;
  text-decoration: underline;
}

.portal-footer a:hover {
  color: #e8f7fc;
}

/* —— Typography (legacy pages) —— */
.portal-body h1 {
  margin: 0 0 0.5rem;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--portal-teal-dark);
}

.portal-body h2 {
  margin: 1.5rem 0 0.75rem;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--portal-text);
}

.portal-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.portal-lead {
  margin: 0 0 1.25rem;
  color: var(--portal-muted);
  max-width: 42rem;
}

.portal-lead strong {
  color: var(--portal-text);
  font-weight: 600;
}

/* —— Estado de deuda card —— */
.portal-ed-card {
  background: var(--portal-surface);
  border-radius: var(--portal-radius-card);
  box-shadow: var(--portal-shadow);
  overflow: hidden;
}

.portal-ed-card__header {
  background: linear-gradient(90deg, var(--portal-teal-light) 0%, var(--portal-teal) 50%, #0b6fa0 100%);
  color: #fff;
  padding: 1.6rem 2rem 1.75rem;
  position: relative;
}

.portal-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;
}

.portal-ed-card__eyebrow {
  margin: 0 0 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  opacity: 0.92;
}

.portal-body h1.portal-ed-card__title,
.portal-ed-card__title {
  margin: 0;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.15;
  color: #ffffff;
}

.portal-ed-card__body {
  padding: 1.75rem 2rem 2.25rem;
}

/* —— Modes (Vehículo | Persona) —— */
.portal-modes {
  display: flex;
  gap: 1.1rem;
  margin-bottom: 1.35rem;
}

.portal-mode {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 14px;
  background: transparent;
  color: var(--portal-muted);
  text-align: left;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.portal-mode:hover,
.portal-mode:focus {
  color: var(--portal-teal);
  text-decoration: none;
  outline: none;
}

.portal-mode.is-active {
  border-color: var(--portal-accent);
  background: #fff;
  color: var(--portal-teal);
  box-shadow: 0 0 0 1px rgba(74, 168, 216, 0.15);
}

.portal-mode__icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #e9eef2;
  color: #6b7a86;
}

.portal-mode.is-active .portal-mode__icon {
  background: var(--portal-accent);
  color: #fff;
}

.portal-mode__icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.portal-mode__label {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
}

.portal-mode__action {
  display: inline-block;
  margin-top: 0.1rem;
  padding: 0.3rem 0.85rem;
  border: 1px solid #c9d4dc;
  border-radius: var(--portal-radius-pill);
  font-size: 0.75rem;
  font-weight: 600;
  color: inherit;
  background: #fff;
}

.portal-mode.is-active .portal-mode__action {
  border-color: var(--portal-accent);
  color: var(--portal-teal);
}

.portal-tab {
  display: none;
}

.portal-tab.is-active {
  display: block;
}

/* —— Filter bar —— */
.portal-filter {
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  padding: 1.1rem;
  background: #fff;
  margin-bottom: 1.5rem;
}

.portal-filter__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin: 0;
}

.portal-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 1.25rem;
  border: 1px solid var(--portal-accent);
  border-radius: var(--portal-radius-pill);
  color: var(--portal-teal);
  background: #fff;
  font-weight: 600;
  font-size: 0.875rem;
  white-space: nowrap;
}

.portal-filter .portal-input,
.portal-filter select.portal-input {
  height: 42px;
  border-radius: var(--portal-radius-pill);
  border: 1px solid #d8dee4;
  background: #f4f5f6;
  padding: 0.5rem 1.1rem;
  max-width: none;
  min-width: 12rem;
  flex: 1 1 14rem;
}

.portal-filter .portal-input--tipo-doc {
  flex: 0 1 11rem;
  min-width: 9rem;
}

.portal-filter .portal-input--sexo {
  flex: 0 1 8rem;
  min-width: 7rem;
}

.portal-filter .portal-input:focus {
  outline: 2px solid rgba(9, 141, 188, 0.28);
  border-color: var(--portal-teal);
  background: #fff;
}

.portal-filter__actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

/* —— Subject / result cards —— */
.portal-subject {
  border: 1px solid var(--portal-border);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 1.1rem;
  background: #fff;
}

.portal-subject__title {
  background: #f7fbfe;
  border-bottom: 1px solid var(--portal-border);
  padding: 0.85rem 1.1rem;
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--portal-teal-dark);
}

.portal-subject__title span {
  font-weight: 400;
  color: var(--portal-teal-dark);
}

.portal-subject__body {
  padding: 1rem 1.1rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem 1.25rem;
}

.portal-subject__meta {
  color: var(--portal-text);
  font-size: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
  align-items: baseline;
}

.portal-subject__meta-item strong {
  font-weight: 700;
  margin-right: 0.25rem;
}

.portal-subject__meta strong {
  font-weight: 700;
  margin-right: 0.25rem;
}

.portal-subject__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

/* —— Generic cards / forms (libre deuda + legacy) —— */
.portal-card {
  background: var(--portal-surface);
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  box-shadow: 0 4px 16px rgba(9, 75, 110, 0.08);
  padding: 1.25rem 1.35rem;
  margin-bottom: 1.25rem;
}

.portal-card--form {
  padding: 1.35rem 1.5rem;
}

.portal-card > h2:first-child {
  margin-top: 0;
  color: var(--portal-teal-dark);
}

.portal-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin-top: 0.65rem;
  align-items: flex-start;
}

.portal-form-row__field {
  flex: 1 1 8rem;
  min-width: 7rem;
  max-width: 12rem;
}

.portal-form-row__field .portal-label {
  margin-top: 0;
}

.portal-form-row__field input {
  max-width: 100%;
}

.portal-label {
  display: block;
  margin-top: 0.65rem;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--portal-text);
}

.portal-input {
  display: block;
  width: 100%;
  max-width: 18rem;
  padding: 0.5rem 0.65rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--portal-border);
  border-radius: 10px;
  background: var(--portal-surface);
  color: var(--portal-text);
}

.portal-input:focus {
  outline: 2px solid rgba(9, 141, 188, 0.3);
  border-color: var(--portal-teal);
}

.portal-card--form input:not([type="hidden"]):not([type="submit"]):not([type="checkbox"]),
.portal-card--form select,
.portal-card--form textarea {
  display: block;
  width: 100%;
  max-width: 18rem;
  padding: 0.5rem 0.65rem;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--portal-border);
  border-radius: 10px;
  background: var(--portal-surface);
  margin-bottom: 0.25rem;
}

/* —— Buttons —— */
.portal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
  min-height: 42px;
  padding: 0.45rem 1.35rem;
  font-size: 0.9rem;
  font-weight: 700;
  font-family: inherit;
  color: #fff;
  background: var(--portal-teal);
  border: 1px solid var(--portal-teal);
  border-radius: var(--portal-radius-pill);
  cursor: pointer;
  text-decoration: none;
  box-shadow: none;
}

.portal-btn:hover {
  background: var(--portal-teal-dark);
  border-color: var(--portal-teal-dark);
  color: #fff;
  text-decoration: none;
}

.portal-btn--primary {
  background: var(--portal-teal);
  border-color: var(--portal-teal);
  color: #fff;
}

.portal-btn--primary:hover {
  background: var(--portal-teal-dark);
  border-color: var(--portal-teal-dark);
  color: #fff;
}

.portal-btn--secondary,
.portal-btn--ghost {
  background: #fff;
  color: var(--portal-muted);
  border: 1px solid #d5dde3;
  box-shadow: none;
}

.portal-btn--secondary:hover,
.portal-btn--ghost:hover {
  background: #f7fafc;
  border-color: #c2ccd4;
  color: #667580;
  text-decoration: none;
}

.portal-btn--sm {
  min-height: 36px;
  padding: 0.3rem 1rem;
  font-size: 0.82rem;
  margin-top: 0;
}

.portal-filter .portal-btn {
  margin-top: 0;
  min-width: 110px;
}

.boleta-sheet {
  margin-top: 1.25rem;
  border: 1px solid var(--portal-border);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  color: var(--portal-text);
}

.boleta-sheet__logo {
  display: block;
  width: 100%;
  height: auto;
}

.boleta-sheet__banner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.55rem 1rem;
  background: var(--portal-teal-dark);
  color: #fff;
  font-size: 0.95rem;
}

.boleta-sheet__banner span {
  font-weight: 400;
  font-size: 0.85rem;
}

.boleta-sheet__section,
.boleta-sheet__cupon-title {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.boleta-sheet__section {
  padding: 0.9rem 1rem 0.2rem;
  color: var(--portal-teal-dark);
}

.boleta-sheet__fields,
.boleta-sheet__cupon-fields {
  margin: 0;
  padding: 0.4rem 1rem 0.2rem;
}

.boleta-sheet__fields > div,
.boleta-sheet__cupon-fields > div {
  padding: 0.35rem 0 0.45rem;
  border-bottom: 1px solid var(--portal-border);
}

.boleta-sheet__fields dt,
.boleta-sheet__cupon-fields dt,
.boleta-sheet__barcode > span,
.boleta-sheet__qr > span {
  color: var(--portal-muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.boleta-sheet__fields dd,
.boleta-sheet__cupon-fields dd {
  margin: 0;
  font-weight: 700;
}

.boleta-sheet__fields dd.is-danger {
  color: var(--portal-danger);
}

.boleta-sheet__fields dd.is-ok {
  color: var(--portal-teal-dark);
}

.boleta-sheet__importe {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin: 0.9rem 1rem 0;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  background: var(--portal-accent-soft);
}

.boleta-sheet__importe span {
  color: var(--portal-teal-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.boleta-sheet__importe strong {
  font-size: 1.35rem;
}

.boleta-sheet__nota {
  margin: 0.75rem 1rem 0;
  color: var(--portal-muted);
  font-size: 0.78rem;
}

.boleta-sheet__corte {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1rem 1rem 0;
  color: var(--portal-teal);
  font-size: 0.75rem;
}

.boleta-sheet__corte::before,
.boleta-sheet__corte::after {
  content: "";
  flex: 1;
  border-top: 1px dashed var(--portal-teal);
}

.boleta-sheet__cupon {
  margin: 0.9rem 1rem 1rem;
  border: 1px solid var(--portal-border);
  border-radius: 8px;
  overflow: hidden;
}

.boleta-sheet__cupon-title {
  margin: 0;
  padding: 0.45rem 0.8rem;
  background: var(--portal-teal-dark);
  color: #fff;
}

.boleta-sheet__cupon-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 1rem;
  padding: 0.4rem 0.8rem 0.2rem;
}

.boleta-sheet__codes {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin: 0.4rem 0.8rem 0.8rem;
  padding: 0.6rem;
  border: 1px solid var(--portal-border);
  border-radius: 8px;
}

.boleta-sheet__barcode {
  flex: 1;
  min-width: 0;
}

.boleta-sheet__barcode svg {
  display: block;
  width: 100%;
  height: 64px;
  margin-top: 0.25rem;
}

.boleta-sheet__barcode code {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-align: center;
  word-break: break-all;
}

.boleta-sheet__qr {
  flex: 0 0 8.5rem;
  text-align: center;
}

.boleta-sheet__qr svg {
  display: block;
  width: 8rem;
  height: 8rem;
  margin: 0.25rem auto 0;
}

.portal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  align-items: center;
  margin-top: 1rem;
}

.portal-actions a {
  font-weight: 500;
}

.portal-list {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.portal-list li {
  margin-bottom: 0.35rem;
}

/* Content links */
.portal-main a {
  color: var(--portal-teal);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.portal-main a:hover {
  color: var(--portal-teal-dark);
}

.portal-main a.portal-btn,
.portal-main a.portal-mode {
  text-decoration: none;
}

/* Links estilizados como botón: no heredar color teal del contenido */
.portal-main a.portal-btn {
  color: #fff;
}

.portal-main a.portal-btn:hover {
  color: #fff;
}

.portal-main a.portal-btn--secondary,
.portal-main a.portal-btn--ghost {
  color: var(--portal-muted);
}

.portal-main a.portal-btn--secondary:hover,
.portal-main a.portal-btn--ghost:hover {
  color: #667580;
}

.portal-table-wrap {
  overflow-x: auto;
  margin-top: 0.75rem;
  border-radius: var(--portal-radius);
  border: 1px solid var(--portal-border);
  box-shadow: 0 4px 14px rgba(9, 75, 110, 0.07);
}

.portal-table-section {
  margin-top: 1rem;
  border: 1px solid var(--portal-border);
  border-radius: var(--portal-radius);
  overflow: hidden;
  background: var(--portal-surface);
}

.portal-body h2.portal-table-section__title,
.portal-table-section__title {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--portal-border);
  background: #f7fbfe;
  color: var(--portal-teal-dark);
  font-size: 1.1rem;
  font-weight: 700;
}

.portal-table-section .portal-table-wrap {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.portal-table-wrap--infracciones .portal-table {
  min-width: 1040px;
}

.portal-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--portal-surface);
  font-size: 0.95rem;
}

.portal-table th,
.portal-table td {
  padding: 0.6rem 0.85rem;
  text-align: left;
  border-bottom: 1px solid var(--portal-border);
}

.portal-table th {
  background: #f7fbfe;
  font-weight: 700;
  color: var(--portal-teal-dark);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.portal-table tbody tr:last-child td {
  border-bottom: none;
}

.portal-table tbody tr:hover {
  background: #f8fcfe;
}

.portal-table__actions {
  white-space: nowrap;
}

.portal-pay-form {
  display: inline;
  margin: 0;
}

.portal-muted {
  color: var(--portal-muted);
  font-size: 0.92rem;
}

.portal-small {
  font-size: 0.85rem;
}

.portal-alert {
  padding: 0.85rem 1rem;
  border-radius: 12px;
  margin: 1rem 0;
  border: 1px solid;
}

.portal-alert--error {
  background: #fef3f2;
  border-color: #fecdca;
  color: var(--portal-danger);
}

.portal-alert--warning {
  background: var(--portal-warning-bg);
  border-color: var(--portal-warning-border);
  color: #92400e;
}

.portal-alert--info {
  background: var(--portal-info-bg);
  border-color: var(--portal-info-border);
  color: var(--portal-teal-dark);
}

.portal-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
}

.portal-modal__backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}

.portal-modal__panel {
  position: relative;
  width: min(100%, 28rem);
  background: #fff;
  color: var(--portal-text, #1e293b);
  border-radius: 16px;
  padding: 1.5rem 1.35rem 1.25rem;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.portal-modal__title {
  margin: 0 0 0.6rem;
  font-size: 1.15rem;
}

.portal-modal[hidden] {
  display: none !important;
}

.portal-modal__panel p {
  margin: 0 0 1.1rem;
  line-height: 1.45;
}

.portal-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.5rem;
}

.portal-banner {
  background: var(--portal-info-bg);
  border: 1px solid var(--portal-info-border);
  border-radius: var(--portal-radius);
  padding: 1rem 1.15rem;
  margin: 1rem 0;
}

.portal-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin: 0.75rem 0 1rem;
  padding: 0.75rem 1rem;
  background: var(--portal-surface);
  border-radius: 12px;
  border: 1px dashed var(--portal-border);
}

.portal-link-row a {
  font-weight: 600;
  text-decoration: none;
}

.portal-link-row a:hover {
  text-decoration: underline;
}

.portal-messages {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}

.portal-message {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  margin-bottom: 0.5rem;
}

.portal-message--success {
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  color: #065f46;
}

.portal-message--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--portal-danger);
}

.portal-message--info {
  background: var(--portal-info-bg);
  border: 1px solid var(--portal-info-border);
}

.portal-result-block {
  margin-top: 0.25rem;
}

.portal-back {
  margin: 0 0 1rem;
}

.portal-back a {
  font-weight: 600;
  text-decoration: none;
}

.portal-back a:hover {
  text-decoration: underline;
}

@media (max-width: 991px) {
  .portal-ed-card__body {
    padding: 1.35rem 1.1rem 1.75rem;
  }

  .portal-ed-card__header {
    padding: 1.35rem 1.1rem;
  }

  .portal-ed-card__title {
    font-size: 1.65rem;
  }

  .portal-modes {
    flex-direction: column;
  }

  .portal-filter__actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
}

@media (max-width: 640px) {
  .portal-header__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .portal-header__logo {
    height: 40px;
  }

  .portal-social {
    align-self: flex-end;
  }

  .portal-social a {
    width: 28px;
    height: 28px;
  }

  .portal-input {
    max-width: 100%;
  }

  .portal-filter__row {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-filter {
    padding: 0.9rem;
  }

  .portal-filter .portal-input,
  .portal-filter select.portal-input,
  .portal-filter .portal-input--tipo-doc,
  .portal-filter .portal-input--sexo {
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
  }

  .portal-chip {
    align-self: flex-start;
    height: 32px;
    padding: 0 0.9rem;
  }

  .portal-filter__actions {
    flex-wrap: wrap;
    justify-content: stretch;
    gap: 0.5rem;
  }

  .portal-filter__actions .portal-btn {
    flex: 1 1 0;
    min-width: 0;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    white-space: nowrap;
  }

  .portal-modes {
    flex-direction: row;
    gap: 0.6rem;
  }

  .portal-mode {
    align-items: center;
    text-align: center;
    padding: 0.75rem 0.5rem;
    gap: 0.35rem;
  }

  .portal-mode__icon {
    width: 36px;
    height: 36px;
  }

  .portal-mode__label {
    font-size: 1.1rem;
  }

  .portal-mode__action {
    font-size: 0.7rem;
    padding: 0.25rem 0.6rem;
  }

  .portal-subject__body {
    flex-direction: column;
    align-items: stretch;
  }

  .portal-table th,
  .portal-table td {
    padding: 0.5rem 0.6rem;
    font-size: 0.88rem;
  }
}
