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

/* Portal de consultas — mismo diseño que portal de creación */

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

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

body.modal-abierto {
  overflow: hidden;
}

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

.portal-formulario-consulta {
  width: 100%;
  min-width: 0;
  max-width: 560px;
  justify-self: center;
  margin: 0 auto;
}

.panel-consulta {
  width: 100%;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

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

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

.fila-consulta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
}

.campo-input {
  flex: 1 1 12rem;
  min-width: 0;
  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);
}

.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;
  white-space: nowrap;
}

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

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

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

.paso-actual {
  margin: 0 0 1rem;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgb(27 38 44 / 0.58);
  backdrop-filter: blur(3px);
}

.modal-panel {
  display: flex;
  max-height: 92vh;
  width: 100%;
  max-width: min(52rem, 96vw);
  flex-direction: column;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--credidemo-blanco);
  box-shadow: 0 20px 48px rgb(27 38 44 / 0.28);
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  background: var(--credidemo-blanco);
  color: var(--credidemo-texto);
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid #eef2f6;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}

.modal-referencia {
  margin: 0.35rem 0 0;
  font-family: ui-monospace, monospace;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--credidemo-rojo);
}

.modal-cerrar {
  border: none;
  background: #f1f5f9;
  color: var(--credidemo-texto-muted);
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

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

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
}

.modal-seccion {
  margin-bottom: 1.75rem;
}

.modal-seccion:last-child {
  margin-bottom: 0;
}

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

/* Stepper */
.stepper-contenedor {
  width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0.5rem 0 0.375rem;
  margin-top: -0.125rem;
}

.stepper-lista {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0.125rem 0 0;
  width: 100%;
  min-width: 100%;
}

.stepper-paso {
  position: relative;
  display: flex;
  flex: 1 1 0;
  flex-direction: column;
  align-items: center;
  min-width: 6.5rem;
}

.stepper-linea {
  position: absolute;
  top: 13px;
  left: -50%;
  width: 100%;
  height: 3px;
  background: #e2e5e3;
  transform: translateY(-50%);
}

.stepper-linea.completada {
  background: #038f4c;
}

.stepper-circulo-envoltorio {
  position: relative;
  z-index: 1;
  display: flex;
  height: 1.75rem;
  width: 1.75rem;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.stepper-orbita {
  position: absolute;
  inset: -6px;
  border-radius: 9999px;
  background: rgb(3 143 76 / 0.28);
  pointer-events: none;
}

.stepper-circulo {
  position: relative;
  display: flex;
  height: 100%;
  width: 100%;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
}

.stepper-circulo--pendiente {
  background: #e8ebe9;
}

.stepper-circulo--completado {
  background: #038f4c;
  color: #ffffff;
}

.stepper-circulo--destacado {
  background: #069353;
  color: #ffffff;
}

.stepper-check {
  height: 0.875rem;
  width: 0.875rem;
}

.stepper-punto {
  border-radius: 9999px;
}

.stepper-punto-blanco {
  height: 0.5rem;
  width: 0.5rem;
  background: #ffffff;
}

.stepper-punto-pendiente {
  height: 0.5rem;
  width: 0.5rem;
  background: rgb(255 255 255 / 0.7);
}

.stepper-etiqueta {
  margin-top: 0.625rem;
  width: 100%;
  padding: 0 0.35rem;
  text-align: center;
  font-size: 0.8125rem;
  line-height: 1.35;
  overflow-wrap: break-word;
  hyphens: auto;
}

@media (min-width: 640px) {
  .stepper-etiqueta {
    font-size: 0.875rem;
  }
}

.stepper-etiqueta.activo {
  font-weight: 600;
  color: #18181b;
}

.stepper-etiqueta.pendiente {
  font-weight: 500;
  color: #94a3b8;
}

/* Datos inicio */
.lista-datos {
  margin: 0;
}

.lista-datos-item {
  margin-bottom: 0.75rem;
}

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

.lista-datos-item dd {
  margin: 0;
  font-size: 0.9rem;
  color: var(--credidemo-texto);
}

/* Actividad */
.tarjeta-actividad {
  border: 1px solid #eef2f6;
  border-radius: 0.75rem;
  background: var(--credidemo-blanco);
  padding: 1rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 2px 8px rgb(27 38 44 / 0.05);
}

.tarjeta-actividad-cabecera {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.tarjeta-actividad-titulo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.tarjeta-actividad-titulo h4 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--credidemo-texto);
}

.badge {
  border-radius: 9999px;
  padding: 0.125rem 0.5rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.badge-completada {
  background: #d1fae5;
  color: #047857;
}

.badge-curso {
  background: #ffe8ea;
  color: var(--credidemo-rojo-oscuro);
}

.tarjeta-actividad-asignado {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
  color: #475569;
}

.tarjeta-actividad-asignado span {
  font-weight: 500;
  color: var(--credidemo-texto-muted);
}

.tarjeta-actividad-fecha {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: #94a3b8;
}

.tarjeta-actividad-datos {
  margin-top: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid #f1f5f9;
}

.tarjeta-actividad-datos-titulo {
  margin: 0 0 0.65rem;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--credidemo-texto-muted);
}

.lista-datos-inicio {
  margin: 0;
}

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

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

  .portal-formulario-consulta {
    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-titulo-hero {
    font-size: 1.75rem;
  }

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

  .fila-consulta {
    flex-direction: column;
    align-items: stretch;
  }

  .fila-consulta .btn {
    width: 100%;
  }
}
