/* ---------------------- RESET Y FUENTE BASE ---------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Poppins', sans-serif;
  background: linear-gradient(to right, #f9f0f5, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
  color: #333;
}

/* ---------------------- CONTENEDOR PRINCIPAL ---------------------- */
.contenedor-formulario {
  background-color: #ffffff;
  width: 100%;
  max-width: 480px;
  padding: 40px;
  border-radius: 18px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* ---------------------- TÍTULOS ---------------------- */
.formulario h2 {
  text-align: center;
  margin-bottom: 25px;
  font-size: 26px;
  font-weight: 600;
  color: #d63384;
}

/* ---------------------- FORMULARIOS ---------------------- */
.formulario,
#formRecuperar,
#nuevaContrasenaContainer {
  display: none;
  flex-direction: column;
  gap: 20px;
}

.formulario.active {
  display: flex;
}

.formulario form,
#formRecuperar,
#nuevaContrasenaContainer {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ---------------------- INPUTS ---------------------- */
.formulario input,
.formulario select,
#formRecuperar input,
#nuevaContrasenaContainer input {
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 15px;
  transition: all 0.3s ease;
  background-color: #fdfdfd;
  width: 100%;
}

.formulario input:focus,
.formulario select:focus,
#formRecuperar input:focus,
#nuevaContrasenaContainer input:focus {
  border-color: #d63384;
  outline: none;
  background-color: #fff;
}

/* ---------------------- LABELS ---------------------- */
.formulario label,
#formRecuperar label,
#nuevaContrasenaContainer label {
  font-size: 14px;
  font-weight: 500;
  margin-top: 0;
  color: #555;
}

/* ---------------------- PASSWORD WRAPPER CON ICONO ---------------------- */
.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  flex: 1;
  padding-right: 2.8rem; /* espacio para icono */
}

.toggle-password {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 1.2rem;
  color: #555;
  transition: color 0.3s ease;
}

.toggle-password:hover {
  color: #d63384;
}

/* ---------------------- BOTONES ---------------------- */
button[type="submit"],
button[type="button"],
#verifyCodeBtn {
  background-color: #d63384;
  color: #fff;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
}

button[type="submit"]:hover,
button[type="button"]:hover,
#verifyCodeBtn:hover {
  background-color: #b8266d;
}

/* ---------------------- ENLACES CAMBIAR/RECUPERAR ---------------------- */
.cambiar,
.recuperar {
  text-align: center;
  font-size: 14px;
  margin-top: 5px;
}

.cambiar a,
.recuperar a {
  color: #d63384;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s;
}

.cambiar a:hover,
.recuperar a:hover {
  color: #b8266d;
}

/* ---------------------- RECUADRO CÓDIGO ---------------------- */
#codigoSimulado {
  padding: 12px;
  border: 1px dashed #d63384;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  background-color: #fff0f6;
  color: #d63384;
}

/* ---------------------- NUEVA CONTRASEÑA ---------------------- */
#nuevaContrasenaContainer {
  display: none;
  flex-direction: column;
  gap: 20px;
}

/* ---------------------- MODAL VERIFICACIÓN ---------------------- */
.modal {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-contenido {
  background-color: #fff;
  padding: 35px;
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  animation: fadeIn 0.4s ease;
}

.modal-contenido h3 {
  font-size: 22px;
  color: #d63384;
  margin-bottom: 10px;
}

.modal-contenido p {
  margin-bottom: 15px;
  color: #555;
}

.modal-contenido input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 16px;
  margin-bottom: 0;
  background-color: #fafafa;
  transition: border-color 0.3s;
}

.modal-contenido input:focus {
  border-color: #d63384;
  outline: none;
}

#codeError {
  color: red;
  font-size: 14px;
  margin-top: 5px;
}

/* ---------------------- ANIMACIONES ---------------------- */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(15px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------------------- RESPONSIVE ---------------------- */
@media (max-width: 500px) {
  .contenedor-formulario {
    padding: 25px;
  }

  .formulario h2 {
    font-size: 22px;
  }

  button[type="submit"],
  button[type="button"],
  #verifyCodeBtn {
    font-size: 15px;
  }
}







