.formulario {
  background: linear-gradient(180deg, #121220, #0d0d18);
  padding: 2.5rem 2.8rem;
  border-radius: 16px;
  width: 100%;
  max-width: 420px;
  box-shadow:
    0 0 40px rgba(120, 70, 255, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.04);
  margin: 60px auto;
}

.formulario h1,
.formulario h2 {
  text-align: center;
  margin-bottom: 1.5rem;
  color: #ffffff;
}

.campo-formulario {
  margin-bottom: 1.3rem;
}

.campo-formulario.campo-password {
  margin-bottom: 0.4rem;
}

.campo-formulario label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: #cfcfe8;
}

.entrada {
  width: 100%;
  padding: 0.65rem 0.8rem;
  background-color: #1a1a2b;
  border: 1px solid #2a2a44;
  border-radius: 8px;
  color: #ffffff;
  font-size: 0.95rem;
  transition: all 0.25s ease;
}

.entrada::placeholder {
  color: #8b8bb5;
}

.entrada:focus {
  outline: none;
  border-color: #8b5cf6;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, 0.35);
  background-color: #1e1e35;
}

.btn-enviar {
  width: 100%;
  margin-top: 0.8rem;
  padding: 0.7rem;
  background: linear-gradient(135deg, #6d28d9, #8b5cf6);
  border: none;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.4px;
  transition: all 0.25s ease;
}

.btn-enviar:hover {
  background: linear-gradient(135deg, #7c3aed, #a78bfa);
  box-shadow: 0 0 18px rgba(167, 139, 250, 0.6);
  transform: translateY(-1px);
}

.btn-enviar:active {
  transform: translateY(0);
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.4);
}

.btn-contorno {
  width: 100%;
  padding: 0.7rem;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  color: #ffffff;
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
  transition: all 0.25s ease;
}

.btn-contorno:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.05);
}

.grupo-boton {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.separador {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  margin: 1.5rem 0;
}

.seccion-registro {
  margin-top: 0.5rem;
}

.aviso-error {
  padding: 0.65rem 0.9rem;
  margin-bottom: 1rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  font-size: 0.88rem;
}

@keyframes slideInError {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideOutError {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(-6px) scale(0.97);
  }
}

@keyframes shakeField {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-6px);
  }
  40% {
    transform: translateX(6px);
  }
  60% {
    transform: translateX(-4px);
  }
  80% {
    transform: translateX(4px);
  }
}

.aviso-credenciales {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.9rem;
  margin-bottom: 1.1rem;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  font-size: 0.88rem;
  line-height: 1.4;
  animation: slideInError 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.aviso-credenciales--ocultando {
  animation: slideOutError 0.3s ease forwards;
}

.icono-aviso {
  font-size: 1rem;
  flex-shrink: 0;
  filter: drop-shadow(0 0 4px rgba(239, 68, 68, 0.7));
}

.texto-aviso {
  flex: 1;
}

.entrada.campo-error {
  border-color: rgba(239, 68, 68, 0.7);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
  animation: shakeField 0.45s ease both;
}

.enlace-recuperacion {
  text-align: right;
  margin-bottom: 1.2rem;
}

.enlace-recuperacion a {
  font-size: 0.82rem;
  color: #7c5fc8;
  text-decoration: none;
  transition: color 0.2s ease;
}

.enlace-recuperacion a:hover {
  color: #a78bfa;
  text-decoration: underline;
}
