:root {
  --fondo: #1e1858;
  --fondo-medio: #2a2470;
  --fondo-claro: #322b88;
  --acento: #5750ad;
  --acento-claro: #7773eb;
  --blanco: #ffffff;
  --celeste: #dfe7f4;

  --texto-principal: #ffffff;
  --texto-suave: #c3c0e8;
  --texto-tenue: #8f8cc4;
  --borde: #4a44b8;
  --borde-claro: #4f4ab0;
  --error: #ff6b6b;

  --chico: 0.25rem;
  --pequeno: 0.5rem;
  --normal: 1rem;
  --grande: 1.5rem;
  --mayor: 2rem;
  --enorme: 3rem;
  --margen: 24px;

  --radio: 0.25rem;
  --radio-md: 0.5rem;
  --radio-lg: 0.75rem;

  --fuente: 'Poppins', sans-serif;
  --fuente-titulo: 'Montserrat', sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--fuente);
  background-color: #1e1858;
  background-image:
    var(--luz-fondo, none),
    radial-gradient(ellipse at top left, #2a2470 0%, #1e1858 60%);
  color: var(--texto-principal);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input {
  font-family: inherit;
}

.logo {
  height: 35px;
  width: 45px;
}

.material-symbols-outlined {
  font-family: 'Material Symbols Outlined';
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  font-size: 24px;
  line-height: 1;
  display: inline-block;
  vertical-align: middle;
}

.icono-md {
  font-size: 20px;
}

.icono-sm {
  font-size: 16px;
}

.encabezado {
  background: rgba(30, 24, 88, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--borde);
  position: sticky;
  top: 0;
  z-index: 50;
}

.encabezado-interior {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--normal) var(--margen);
}

.marca {
  display: flex;
  align-items: center;
  gap: var(--pequeno);
}

.marca-nombre {
  font-family: var(--fuente-titulo);
  font-size: 20px;
  font-weight: 700;
  color: var(--blanco);
}

.nav-encabezado {
  display: flex;
  gap: var(--grande);
}

.nav-encabezado a {
  font-size: 12px;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--texto-suave);
  transition: color 0.2s, background-color 0.2s, box-shadow 0.2s;
  padding: 6px 14px;
  border-radius: 10px;
}

.nav-encabezado a:hover {
  background-color: #c3c0e8;
  box-shadow: 0 6px 20px rgba(119, 115, 235, 0.5);
  color: #1e1858;
}

@media (max-width: 640px) {
  .nav-encabezado {
    display: none;
  }
}

.contenido {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--enorme) var(--margen);
}

.envoltorio {
  width: 100%;
  max-width: 448px;
}

.tarjeta-envuelta {
  position: relative;
  border-radius: var(--radio-lg);
  padding: 1px;
  background: var(--borde);
}

.tarjeta {
  position: relative;
  z-index: 1;
  background: rgba(30, 24, 88, 0.88);
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(113, 86, 131, 0.5);
  border-radius: calc(var(--radio-lg) - 1px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tarjeta-encabezado {
  position: relative;
  height: 120px;
  background: linear-gradient(135deg, var(--acento) 0%, var(--fondo-medio) 100%);
  display: flex;
  align-items: flex-end;
  padding: var(--normal) var(--grande);
  gap: var(--normal);
  overflow: hidden;
}

.icono-tarjeta-encabezado {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radio-md);
  padding: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tarjeta-encabezado h1 {
  color: var(--blanco);
  font-family: var(--fuente-titulo);
  font-size: 20px;
  font-weight: 700;
}

.tarjeta-cuerpo {
  padding: var(--grande);
  display: flex;
  flex-direction: column;
  gap: var(--grande);
}

.descripcion {
  font-size: 14px;
  line-height: 22px;
  color: var(--texto-suave);
}

.formulario {
  display: flex;
  flex-direction: column;
  gap: var(--normal);
}

.campo {
  display: flex;
  flex-direction: column;
  gap: var(--chico);
}

.etiqueta-campo {
  font-size: 12px;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--texto-suave);
  margin-left: 4px;
}

.caja-entrada {
  position: relative;
}

.icono-entrada {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--texto-tenue);
  pointer-events: none;
}

.entrada {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border-radius: var(--radio-md);
  border: 1px solid var(--borde);
  background: rgba(30, 24, 88, 0.6);
  color: var(--blanco);
  outline: none;
  font-size: 14px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.entrada::placeholder {
  color: var(--texto-tenue);
}

.entrada:focus {
  border-color: var(--acento-claro);
  box-shadow: 0 0 0 2px rgba(119, 115, 235, 0.25);
}

.boton-enviar {
  width: 100%;
  background: linear-gradient(135deg, var(--acento) 0%, var(--acento-claro) 100%);
  color: var(--blanco);
  padding: 13px;
  border-radius: var(--radio-md);
  font-family: var(--fuente-titulo);
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(119, 115, 235, 0.35);
  transition: opacity 0.2s, transform 0.1s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.boton-enviar:hover {
  opacity: 0.92;
  box-shadow: 0 6px 20px rgba(119, 115, 235, 0.5);
}

.boton-enviar:active {
  transform: scale(0.98);
}

.enlace-volver {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 12px;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--acento-claro);
  transition: opacity 0.2s;
  padding-top: var(--pequeno);
}

.enlace-volver:hover {
  opacity: 0.75;
  text-decoration: underline;
}

.estado-exito {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--normal);
  padding: var(--mayor) 0;
}

.icono-exito {
  background: rgba(34, 197, 94, 0.15);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 50%;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.icono-exito .material-symbols-outlined {
  font-size: 40px;
  color: #22c55e;
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.exito-titulo {
  font-family: var(--fuente-titulo);
  font-size: 20px;
  font-weight: 700;
  color: var(--blanco);
}

.exito-descripcion {
  font-size: 14px;
  line-height: 22px;
  color: var(--texto-suave);
}

.exito-descripcion strong {
  color: var(--acento-claro);
}

.boton-reintentar {
  font-size: 12px;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--acento-claro);
  margin-top: var(--pequeno);
}

.boton-reintentar:hover {
  text-decoration: underline;
}

.texto-ayuda {
  margin-top: var(--grande);
  text-align: center;
  font-size: 11px;
  color: var(--texto-tenue);
}

.texto-ayuda a {
  color: var(--acento-claro);
  font-weight: 600;
}

.texto-ayuda a:hover {
  text-decoration: underline;
}

.pie {
  background: rgba(30, 24, 88, 0.85);
  border-top: 1px solid var(--borde);
}

.pie-interior {
  display: flex;
  flex-direction: column;
  gap: var(--normal);
  padding: var(--grande) var(--margen);
  max-width: 1280px;
  margin: 0 auto;
}

@media (min-width: 640px) {
  .pie-interior {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.pie-marca {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pie-nombre {
  font-family: var(--fuente-titulo);
  font-size: 12px;
  font-weight: 700;
  color: var(--blanco);
  letter-spacing: 0.05em;
}

.pie-derechos {
  font-size: 11px;
  color: var(--texto-suave);
}

.pie-nav {
  display: flex;
  gap: var(--grande);
}

.pie-nav a {
  font-size: 12px;
  letter-spacing: 0.05em;
  font-weight: 600;
  color: var(--texto-tenue);
  transition: color 0.2s;
}

.pie-nav a:hover {
  color: var(--acento-claro);
}

@keyframes girar {
  to {
    transform: rotate(360deg);
  }
}

.girando {
  display: inline-block;
  animation: girar 0.8s linear infinite;
}

@keyframes aparecer {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.aparecer {
  animation: aparecer 0.4s ease forwards;
}