/* Tipografía del portal (sin archivos Nexa en el repo; evita 404 en consola) */

/* CREDI-DEMO — mismo estilo visual que plantilla de correo al cliente */

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --credidemo-rojo: #ea002a;
  --credidemo-rojo-oscuro: #c40024;
  --credidemo-texto: #1b262c;
  --credidemo-texto-muted: #5f5f5f;
  --credidemo-blanco: #ffffff;
  --credidemo-ancho-max: 650px;
  --portal-fuente-marca: "Segoe UI", Verdana, sans-serif;
}

.portal-envoltorio {
  min-height: 100vh;
}

.portal-envoltorio--embed {
  min-height: 0;
  font-family: var(--portal-fuente-marca, "Segoe UI", Verdana, sans-serif);
  font-size: 16px;
  line-height: 1.5;
  color: var(--credidemo-texto);
}

.portal-envoltorio--embed .portal-main {
  max-width: 100%;
  padding: 0;
  margin: 0;
}

.portal-navbar {
  background: var(--credidemo-blanco);
  border-bottom: 1px solid #dcdcdc;
  box-shadow: 0 2px 12px rgb(27 38 44 / 0.06);
}

.portal-navbar-contenedor {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.85rem 2rem;
  min-height: 4.5rem;
}

.portal-navbar-marca {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.portal-logo {
  display: block;
  width: auto;
  height: 2.75rem;
  max-width: min(220px, 55vw);
  object-fit: contain;
}

.portal-main {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem 3rem;
}

.portal-tarjeta {
  background: var(--credidemo-blanco);
  border-radius: 1rem;
  padding: 2.5rem 2.75rem;
  box-shadow: 0 4px 24px rgb(27 38 44 / 0.1);
  max-width: 1150px;
  margin: 0 auto;
}

.portal-contenido {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 560px);
  gap: 2.5rem 3.5rem;
  align-items: center;
  justify-content: center;
}

.portal-intro {
  text-align: left;
  margin: 0;
  padding: 0;
  font-family: var(--portal-fuente-marca);
}

.portal-titulo-hero,
.portal-subtitulo-fuerte,
.portal-tagline {
  font-family: var(--portal-fuente-marca);
}

.portal-titulo-hero {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.portal-titulo-hero span {
  display: block;
}

.portal-titulo-negro {
  color: #000000;
}

.portal-titulo-rojo {
  color: var(--credidemo-rojo);
}

.portal-subtitulo-fuerte {
  margin: 1.5rem 0 0;
  max-width: 34rem;
  font-size: clamp(1.05rem, 2.5vw, 1.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.01em;
  color: #575756;
}

.portal-tagline {
  margin: 1rem 0 0;
  max-width: 34rem;
  font-size: 1.075rem;
  font-weight: 400;
  line-height: 1.6;
  color: var(--credidemo-texto-muted);
}

#vista-lista {
  width: 100%;
  min-width: 0;
  max-width: 560px;
  justify-self: center;
  margin: 0 auto;
}

#vista-lista .panel-seleccion-proceso {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

#estado-carga {
  text-align: center;
  color: var(--credidemo-texto-muted);
  padding: 0.75rem 0;
  font-size: 1rem;
}

.texto-muted {
  color: var(--credidemo-texto-muted);
  font-size: 0.95rem;
  text-align: center;
}

.texto-error {
  color: var(--credidemo-rojo);
  font-size: 0.95rem;
}

.alerta-error {
  background: #fff5f5;
  border: 1px solid #fecaca;
  color: var(--credidemo-rojo);
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.tarjeta-proceso {
  background: var(--credidemo-blanco);
  border: none;
  border-radius: 0.5rem;
  padding: 1.5rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 12px rgb(27 38 44 / 0.08);
}

.tarjeta-proceso h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--credidemo-texto);
  text-align: center;
}

.tarjeta-proceso p {
  margin: 0 0 1.25rem;
  color: var(--credidemo-texto-muted);
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
}

.tarjeta-proceso .btn {
  display: block;
  width: 100%;
  max-width: 16rem;
  margin: 0 auto;
}

.panel-formulario,
.panel-confirmacion,
.panel-seleccion-proceso {
  background: var(--credidemo-blanco);
  border: none;
  border-radius: 0.625rem;
  padding: 2rem 1.75rem 2.25rem;
  box-shadow: 0 2px 16px rgb(27 38 44 / 0.1);
}

.panel-seleccion-proceso .campo-grupo {
  margin-bottom: 1.25rem;
}

.descripcion-proceso {
  margin: 0 0 1.25rem;
  font-size: 0.95rem;
  line-height: 1.45;
  color: var(--credidemo-texto-muted);
  text-align: left;
}

.acciones-seleccion {
  display: flex;
  justify-content: center;
  margin-top: 1.5rem;
}

.acciones-seleccion .btn {
  min-width: 12rem;
}

.panel-formulario h2 {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
  color: var(--credidemo-texto);
}

.panel-formulario .descripcion {
  margin: 0 0 1.5rem;
  color: var(--credidemo-texto-muted);
  font-size: 0.95rem;
  line-height: 1.45;
  text-align: center;
}

.seccion-titulo {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--credidemo-texto-muted);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #eef2f6;
}

.wizard-pasos {
  margin-bottom: 1.5rem;
}

.wizard-pasos-lista {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.wizard-paso {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
  opacity: 0.45;
  transition: opacity 0.2s ease;
}

.wizard-paso--activo,
.wizard-paso--completado {
  opacity: 1;
}

.wizard-paso-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 700;
  background: #eef2f6;
  color: var(--credidemo-texto-muted);
}

.wizard-paso--activo .wizard-paso-num {
  background: var(--credidemo-rojo);
  color: var(--credidemo-blanco);
}

.wizard-paso--completado .wizard-paso-num {
  background: #15803d;
  color: #fff;
}

.wizard-paso-texto {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--credidemo-texto-muted);
  line-height: 1.2;
}

.paso-formulario[hidden] {
  display: none !important;
}

.acciones-paso {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #eef2f6;
}

.campo-grupo {
  margin-bottom: 1rem;
}

.campo-etiqueta {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--credidemo-texto);
}

.requerido {
  color: var(--credidemo-rojo);
}

.opcional {
  font-weight: 500;
  color: var(--credidemo-texto-muted, #64748b);
  font-size: 0.8125rem;
}

.campo-ayuda {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
  color: var(--credidemo-texto-muted, #64748b);
  line-height: 1.4;
}

.campo-ayuda--ok {
  color: #15803d;
}

.campo-ayuda--info {
  color: #1d4ed8;
}

.campo-ayuda--error {
  color: var(--credidemo-rojo);
}

.campo-input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid #dbe3ea;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--credidemo-texto);
  background: var(--credidemo-blanco);
}

.campo-input:focus {
  outline: none;
  border-color: var(--credidemo-rojo);
  box-shadow: 0 0 0 3px rgb(234 0 42 / 0.12);
}

.campo-input-identidad {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.04em;
}

.campo-select {
  background: var(--credidemo-blanco);
}

.campo-opciones {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.campo-radio,
.campo-casilla {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
}

.campo-titulo {
  font-weight: 700;
  font-size: 1rem;
  margin: 0.5rem 0;
}

.campo-encabezado {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--credidemo-texto-muted);
  margin: 0.75rem 0 0.25rem;
}

.campo-no-disponible {
  font-size: 0.85rem;
  color: #94a3b8;
  border: 1px dashed #dbe3ea;
  border-radius: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin: 0;
}

.campo-archivo-lista {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.campo-archivo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #dbe3ea;
  border-radius: 0.5rem;
  background: #f8fafc;
}

.campo-archivo-info {
  min-width: 0;
  flex: 1;
}

.campo-archivo-nombre {
  display: block;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--credidemo-rojo);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.campo-archivo-nombre:hover {
  text-decoration: underline;
}

.campo-archivo-tam {
  display: block;
  font-size: 0.75rem;
  color: #94a3b8;
  margin-top: 0.15rem;
}

.campo-archivo-quitar {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: var(--credidemo-rojo);
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.25rem 0.35rem;
}

.campo-archivo-quitar:hover {
  text-decoration: underline;
}

.campo-archivo-zona {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 1.25rem 1rem;
  border: 1px dashed #cbd5e1;
  border-radius: 0.5rem;
  background: var(--credidemo-blanco);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.campo-archivo-zona:hover,
.campo-archivo-zona--activa {
  border-color: var(--credidemo-rojo);
  background: rgb(234 0 42 / 0.04);
}

.campo-archivo-zona-titulo {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--credidemo-texto);
}

.campo-archivo-zona-hint {
  font-size: 0.75rem;
  color: #94a3b8;
}

.campo-archivo-input {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.campo-archivo-limite {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: #94a3b8;
}

.campo-archivo-error {
  margin: 0.5rem 0 0;
  font-size: 0.8125rem;
  color: var(--credidemo-rojo);
}

.decisiones {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid #eef2f6;
}

.decisiones-titulo {
  text-align: center;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--credidemo-texto-muted);
  margin: 0 0 0.75rem;
}

.decisiones-botones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: transform 0.15s ease, filter 0.15s ease;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--credidemo-rojo);
  color: var(--credidemo-blanco);
  border-bottom: 5px solid var(--credidemo-rojo-oscuro);
  padding-bottom: calc(0.75rem - 2px);
}

.btn-primary:hover:not(:disabled) {
  filter: brightness(1.05);
}

.btn-primary:active:not(:disabled) {
  transform: translateY(2px);
  border-bottom-width: 3px;
}

.btn-secondary {
  background: var(--credidemo-blanco);
  border: 1px solid #cbd5e1;
  color: var(--credidemo-texto);
  text-transform: none;
  letter-spacing: normal;
  font-weight: 600;
  border-bottom-width: 1px;
  padding-bottom: 0.75rem;
}

.btn-secondary:hover:not(:disabled) {
  background: #f8fafc;
}

.btn-decision {
  background: var(--credidemo-rojo);
  color: var(--credidemo-blanco);
  border-bottom: 4px solid var(--credidemo-rojo-oscuro);
  font-size: 0.85rem;
  padding: 0.6rem 1.1rem;
}

.btn-decision:hover:not(:disabled) {
  filter: brightness(1.05);
}

.acciones-formulario {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid #eef2f6;
}

.acciones-decisiones {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.acciones-decisiones .decisiones {
  margin: 0;
  padding: 0;
  border: none;
}

.acciones-decisiones .decisiones-titulo {
  display: none;
}

.acciones-decisiones .decisiones-botones {
  justify-content: flex-end;
}

.btn.oculto {
  display: none !important;
}

.panel-confirmacion {
  text-align: center;
}

.panel-confirmacion .icono-ok {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 1rem;
  background: #ffe8ea;
  color: var(--credidemo-rojo);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
}

.confirmacion-mensaje {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 1.25rem;
  color: var(--credidemo-texto);
  line-height: 1.45;
}

.confirmacion-correo {
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
}

.confirmacion-correo--ok {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.confirmacion-correo--aviso {
  background: #fffbeb;
  border: 1px solid #fcd34d;
  color: #92400e;
}

.confirmacion-datos {
  text-align: left;
  margin: 0 auto 1.5rem;
  max-width: 22rem;
}

.confirmacion-datos div {
  margin-bottom: 0.75rem;
}

.confirmacion-datos dt {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--credidemo-texto-muted);
  margin-bottom: 0.15rem;
  font-weight: 700;
}

.confirmacion-datos dd {
  margin: 0;
  font-size: 1rem;
  color: var(--credidemo-texto);
}

body.portal-modal-abierto {
  overflow: hidden;
}

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

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

.portal-modal-fondo {
  position: absolute;
  inset: 0;
  background: rgb(27 38 44 / 0.58);
  backdrop-filter: blur(3px);
}

.portal-modal-contenedor {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--credidemo-ancho-max);
  max-height: min(92vh, 920px);
  overflow-y: auto;
  border-radius: 0.625rem;
  box-shadow: 0 20px 48px rgb(27 38 44 / 0.28);
  animation: portal-modal-entrada 0.22s ease-out;
}

.portal-modal-cerrar {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 2;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: rgb(255 255 255 / 0.95);
  color: var(--credidemo-texto-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgb(27 38 44 / 0.12);
  transition: color 0.15s ease, background 0.15s ease;
}

.portal-modal-cerrar:hover {
  color: var(--credidemo-rojo);
  background: var(--credidemo-blanco);
}

.portal-modal-contenedor .panel-formulario,
.portal-modal-contenedor .panel-confirmacion {
  margin: 0;
  padding-top: 2.75rem;
  padding-right: 2.75rem;
}

@keyframes portal-modal-entrada {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 900px) {
  .portal-tarjeta {
    padding: 2rem 1.75rem;
  }

  .portal-contenido {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  #vista-lista {
    max-width: 100%;
  }
}

@media (max-width: 670px) {
  .portal-navbar-contenedor {
    padding: 0.75rem 1rem;
    min-height: 4rem;
  }

  .portal-logo {
    height: 2.35rem;
    max-width: min(190px, 62vw);
  }

  .portal-main {
    padding: 1rem 1rem 2rem;
  }

  .portal-tarjeta {
    padding: 1.5rem 1.25rem;
    border-radius: 0.875rem;
  }

  .portal-contenido {
    gap: 1.75rem;
  }

  .portal-intro {
    margin-bottom: 0;
  }

  .portal-titulo-hero {
    font-size: 1.75rem;
  }

  .portal-subtitulo-fuerte {
    font-size: 1rem;
  }

  .portal-modal {
    padding: 0.75rem;
  }

  .portal-modal-contenedor {
    max-height: 94vh;
  }

  .portal-modal-cerrar {
    top: 0.5rem;
    right: 0.5rem;
  }

  .panel-formulario,
  .panel-confirmacion {
    padding: 1.25rem 1rem;
  }

  .acciones-formulario {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .acciones-formulario .btn {
    width: 100%;
  }
}
