body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background-color: #fff;
    color: #333;
}

/* === LOGIN ESTILO  ===*/

.login-container {
  display: flex;
  max-width: 1200px;
  margin: 80px auto;
  background-color: #fff;
  overflow: hidden;
}

/* ---- LADO IZQUIERDO ---- */
.login-left {
  width: 50%;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-left h2 {
  font-size: 2rem;
  margin-bottom: -14px;
  color: #000;
}

.login-left p {
  color: #666;
  margin-bottom: 70px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 50px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-form input {
  border: none;
  border-bottom: 1px solid #ccc;
  padding: 10px 5px;
  font-size: 16px;
  outline: none;
  transition: 0.3s;
}

.login-form input:focus {
  border-bottom: 1px solid #000;
}

.password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-wrapper input {
  width: 100%;
  padding-right: 35px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  width: 22px;
  height: 22px;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.toggle-password:hover {
  opacity: 1;
  transform: scale(1.1);
}

.btn-login {
  background-color: #000;
  color: #fff;
  padding: 14px;
  border: none;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-login:hover {
  background-color: #4e3b2b;
}

.register-text {
  text-align: center;
  margin-top: 20px;
}

.register-text a {
  color: #000;
  font-weight: 600;
  text-decoration: underline;
}

/* ---- LADO DERECHO ---- */
.login-right {
  width: 50%;
  position: relative;
}

.login-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-top-left-radius: 20px;
}

.overlay-text {
  position: absolute;
  bottom: 40px;
  left: 40px;
  color: #fff;
  max-width: 80%;
}

.overlay-text h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.overlay-text p {
  font-size: 0.95rem;
  line-height: 1.5;
  color: #f2f2f2;
}

/* ======== ENLACE OLVIDASTE CONTRASEÑA ======== */
.forgot-password {
  text-align: right;
  margin: -0.3rem 0 1.5rem 0;
}

.forgot-password a {
  color: #888;
  font-size: 0.9rem;
  text-decoration: none;
  transition: color 0.3s ease;
}

.forgot-password a:hover {
  color: #000;
}

/* ======== MODAL RECUPERAR CONTRASEÑA ======== */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.45);
  justify-content: center;
  align-items: center;
  padding: 1rem;
}

.modal-content {
  background-color: #fff;
  border-radius: 14px;
  padding: 2rem;
  width: 90%;
  max-width: 420px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.2);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.modal-header h2 {
  font-size: 1.2rem;
  font-weight: 600;
}

.modal-header .close {
  font-size: 1.5rem;
  cursor: pointer;
  color: #666;
}

.form-recuperar {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1rem;
}

.form-recuperar input {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 10px;
  font-size: 0.95rem;
}

.form-recuperar button {
  background-color: #a8a29e;
  color: #fff;
  border: none;
  padding: 0.75rem;
  border-radius: 10px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-recuperar button:hover {
  background-color: #7a7571;
}

/* =========================================================
   RESPONSIVE LOGIN (versión mejorada)
   ========================================================= */

/* --- Tablets (≤1024px) --- */
@media (max-width: 1024px) {
  .login-container {
    max-width: 95%;
    margin: 60px auto;
    padding: 0 40px;
  }

  .login-left {
    padding: 50px 40px;
  }

  .login-left h2 {
    font-size: 1.8rem;
  }

  .overlay-text h3 {
    font-size: 1.1rem;
  }

  .overlay-text p {
    font-size: 0.9rem;
  }
}

/* --- Móviles (≤768px): solo formulario centrado --- */
@media (max-width: 768px) {
  .login-container {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 60px auto;
    max-width: 500px;
    width: 90%;              /* deja respiración lateral */
    padding: 30px 20px;      /* evita que se pegue a los bordes */
    box-shadow: 0 0 25px rgba(0,0,0,0.05);
    border-radius: 14px;
  }

  /* Ocultamos la imagen y su texto */
  .login-right {
    display: none;
  }

  .login-left {
    width: 100%;
    background-color: #fff;
    padding: 40px 25px;
    text-align: center;
    box-sizing: border-box;
  }

  .login-left h2 {
    font-size: 1.9rem;
    margin-bottom: 10px;
  }

  .login-left p {
    font-size: 0.95rem;
    margin-bottom: 45px;
    color: #555;
  }

  .login-form {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
  }

  .login-form input {
    width: 100%;
    border-radius: 6px;
    padding: 12px 10px;
  }

  .form-group {
    width: 100%;
  }

  .btn-login {
    width: 100%;
    font-size: 16px;
    padding: 14px;
    border-radius: 6px;
  }

  .register-text {
    margin-top: 30px;
    font-size: 0.95rem;
  }

  .forgot-password {
    width: 100%;
    text-align: right;
  }
}

/* --- Pequeños móviles (≤480px) --- */
@media (max-width: 480px) {
  .login-container {
    margin: 40px auto;
    padding: 25px 18px;
    width: 90%;
    box-shadow: none;
  }

  .login-left {
    padding: 30px 15px;
  }

  .login-left h2 {
    font-size: 1.6rem;
  }

  .login-left p {
    font-size: 0.9rem;
  }

  .login-form input {
    font-size: 15px;
    padding: 10px 8px;
  }

  .btn-login {
    font-size: 15px;
    padding: 12px;
  }

  .register-text {
    font-size: 0.9rem;
  }
}