:root {
  color-scheme: light;
  --navy: #163767;
  --ink: #172c46;
  --azul: #175995;
  --muted: #506376;
  --linea: #d4dee7;
  --fondo: #f4f7f9;
  --ancho: 72rem;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font: 1rem/1.5 "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--fondo);
}

h1, p, form, dl, dd { margin: 0; }
h1 { color: var(--navy); font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; letter-spacing: -.035em; }
a { color: var(--azul); text-underline-offset: .22em; }
button, input { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #1575bd; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cabecera { background: white; border-bottom: 1px solid var(--linea); }
.cabecera-interior, .documentos, .promo-interior {
  width: min(calc(100% - 3rem), var(--ancho)); margin-inline: auto;
}
.cabecera-interior { min-height: 5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.marca { display: flex; align-items: center; gap: 1.15rem; }
.marca-imagen { display: grid; place-content: center; overflow: hidden; width: 7.5rem; height: 3.1rem; }
.marca-imagen img { display: block; width: 12.6rem; height: auto; max-width: none; }
.marca-portal { padding-left: 1.15rem; border-left: 1px solid var(--linea); font-size: .88rem; color: var(--muted); }
.salir, .pdf, .paginacion a, .promo-enlace {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.75rem; font-weight: 600; text-decoration: none;
}
.salir { padding: .45rem .85rem; background: white; border: 1px solid var(--linea); border-radius: .45rem; color: var(--navy); }
.salir:hover, .paginacion a:hover { background: #eef4f9; border-color: #b2c5d7; }

.acceso { flex: 1; width: 100%; display: grid; align-content: center; padding: clamp(2rem, 8vh, 5rem) 1.25rem; }
.tarjeta-acceso {
  width: min(100%, 27.5rem); margin-inline: auto; padding: clamp(1.5rem, 4vw, 2.5rem);
  background: white; border: 1px solid var(--linea); border-radius: .85rem;
  box-shadow: 0 .5rem 2rem rgba(26, 54, 80, .05);
}
.tarjeta-acceso h1 { font-size: clamp(1.8rem, 5vw, 2.25rem); }
.bajada { margin-top: .65rem; color: var(--muted); }
.form-acceso { margin-top: 1.6rem; display: grid; gap: 1.15rem; }
.campo { display: grid; gap: .35rem; }
.campo label { font-size: .92rem; font-weight: 600; }
.campo input { width: 100%; min-height: 2.85rem; border: 1px solid #aab9c9; border-radius: .4rem; padding: .5rem .75rem; background: white; color: var(--ink); }
.boton-primario { margin-top: .2rem; min-height: 2.9rem; border: none; border-radius: .4rem; background: var(--navy); color: white; font-weight: 650; }
.boton-primario:hover { background: #0f2b55; }
.alerta { margin-top: 1rem; padding: .6rem .8rem; color: #872c29; background: #fff4f3; border-left: 3px solid #af403b; }

.documentos { flex: 1; padding: clamp(1.75rem, 5vw, 3.8rem) 0 3.5rem; }
.titulo-cuenta { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; margin-bottom: 1.8rem; }
.titulo-cuenta p { margin-top: .5rem; color: var(--muted); overflow-wrap: anywhere; }
.resumen { flex: 0 1 auto; border-left: 3px solid #2181ba; padding: .1rem 0 .1rem 1rem; }
.resumen dt { font-size: .85rem; font-weight: 650; color: var(--muted); }
.resumen dd { font-variant-numeric: tabular-nums; font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 650; letter-spacing: -.025em; color: var(--navy); }
.resumen .aclaracion { font-size: .78rem; font-weight: 400; color: var(--muted); letter-spacing: normal; }
.pestanas { display: flex; gap: 1.6rem; border-bottom: 1px solid var(--linea); margin-bottom: 1.15rem; }
.pestanas a { display: inline-flex; align-items: center; min-height: 2.9rem; padding: .65rem .1rem; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.pestanas a[aria-current] { color: var(--navy); font-weight: 650; border-color: var(--azul); }
.pestanas a:hover { color: var(--azul); }
.panel-listado, .vacio { background: white; border: 1px solid var(--linea); border-radius: .65rem; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
thead th { font-weight: 600; color: var(--muted); padding-top: .9rem; padding-bottom: .9rem; font-size: .82rem; border-bottom: 1px solid var(--linea); }
th, td { text-align: left; padding: .7rem 1.05rem; }
tbody tr + tr { border-top: 1px solid #e6edf2; }
.nro { font-weight: 650; color: var(--navy); overflow-wrap: anywhere; }
.numerico { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.saldo { font-weight: 600; }
.descarga { text-align: right; }
.pdf { color: var(--azul); text-decoration: underline; text-decoration-color: #acc7dc; font-size: .86rem; }
.pdf:hover, .promo-enlace:hover { text-decoration: underline; }
.etiqueta { display: none; }
.vacio { padding: 2rem; color: var(--muted); }
.paginacion { margin-top: 1.1rem; display: flex; gap: .6rem; align-items: center; color: var(--muted); font-size: .9rem; }
.paginacion p { margin-right: auto; }
.paginacion a { color: var(--navy); padding-inline: .85rem; border: 1px solid var(--linea); border-radius: .4rem; background: white; }

.promo { background: #e8eff4; border-top: 1px solid var(--linea); }
.promo-interior {
  padding-block: 1.25rem; display: flex; align-items: center;
  justify-content: space-between; gap: .75rem 1.75rem;
}
.promo-identidad { display: flex; align-items: center; gap: 1rem 1.5rem; min-width: 0; }
.promo-marca {
  display: grid; place-items: center; flex: 0 0 auto; padding: .55rem .7rem;
  border: 1px solid var(--linea); border-radius: .5rem; background: #fdfdfd;
}
.promo-marca img { display: block; width: 10rem; max-width: 100%; height: auto; }
.promo-pregunta { font-size: .96rem; font-weight: 650; color: var(--navy); }
.promo-lema { margin-top: .15rem; font-size: .89rem; color: var(--muted); }
.promo-enlace {
  flex: 0 0 auto; gap: .45rem; padding: .5rem .8rem; border: 1px solid #a8bfd2;
  border-radius: .45rem; background: #fff; color: var(--navy); font-size: .9rem;
}
.promo-enlace:hover { background: #f3f8fc; }

@media (max-width: 54rem) {
  .cabecera-interior, .documentos, .promo-interior { width: calc(100% - 2rem); }
  .titulo-cuenta { align-items: flex-start; }
  .panel-listado { background: transparent; border: none; }
  table, tbody { display: block; }
  thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  tbody { display: grid; gap: .8rem; }
  tbody tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1.2rem; padding: 1rem; background: white; border: 1px solid var(--linea); border-radius: .55rem; }
  tbody tr + tr { border-color: var(--linea); }
  tbody th, tbody td { padding: 0; }
  .nro { grid-column: 1 / -1; font-size: 1.05rem; border-bottom: 1px solid #e6edf2; padding-bottom: .5rem; }
  .numerico { white-space: normal; text-align: left; overflow-wrap: anywhere; }
  .etiqueta { display: block; color: var(--muted); font-size: .76rem; font-weight: 500; }
  .descarga { grid-column: 1 / -1; text-align: left; }
  .pdf { min-height: 2.75rem; }
}

@media (max-width: 40rem) {
  .cabecera-interior { min-height: 4.5rem; gap: .35rem; }
  .marca { gap: .5rem; }
  .marca-portal { font-size: .77rem; padding-left: .5rem; }
  .marca-imagen { width: 5.8rem; height: 2.6rem; }
  .marca-imagen img { width: 9.8rem; }
  .salir { padding-inline: .6rem; font-size: .81rem; }
  .titulo-cuenta { display: grid; gap: 1rem; margin-bottom: 1rem; }
  .titulo-cuenta p { margin-top: .35rem; }
  .promo-interior { display: grid; gap: .8rem; }
  .promo-identidad { display: grid; gap: .65rem; justify-items: start; }
  .promo-enlace { justify-self: start; }
  .paginacion { flex-wrap: wrap; }
}
