/* ===========================
   MODAL OVERLAY
=========================== */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .65);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  padding: 20px;
}

.modal-overlay.active {
  display: flex;
}

/* ===========================
   MODAL
=========================== */

.login-modal {
  width: 100%;
  max-width: 950px;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
  position: relative;
  animation: popup .35s ease;
}

/* ===========================
   ANIMATION
=========================== */

@keyframes popup {
  from {
    transform: translateY(-30px) scale(.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

/* ===========================
   CLOSE BUTTON
=========================== */

.close-modal {
  position: absolute;
  right: 18px;
  top: 15px;
  width: 40px;
  height: 40px;
  border: none;
  background: #f4f4f4;
  border-radius: 50%;
  font-size: 28px;
  cursor: pointer;
  transition: .3s;
  z-index: 20;
}

.close-modal:hover {
  background: #1B5E20;
  color: #fff;
}

/* ===========================
   LEFT SIDE
=========================== */

.login-left {
  background: linear-gradient(135deg, #1B5E20, #2E7D32);
  color: #fff;
  padding: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.login-left h2 {
  font-size: 38px;
  margin-bottom: 20px;
}

.login-left p {
  width: 80%;
  text-align: center;
  line-height: 1.8;
  font-size: 18px;
  margin-bottom: 40px;
}

.login-left img {
  width: 80%;
  margin: auto;
}

.login-illustration {
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-illustration img {
  width: 90%;
  max-width: 420px;
  background: none;
  border: none;
  box-shadow: none;
  mix-blend-mode: multiply;
}

/* ===========================
   RIGHT SIDE
=========================== */

.login-right {
  padding: 60px;
}

.login-right h2 {
  font-size: 34px;
  color: #222;
}

.login-right > p {
  color: #777;
  margin: 12px 0 35px;
}

/* ===========================
   FORM
=========================== */

.form-group {
  margin-bottom: 22px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.form-group input {
  width: 100%;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: 10px;
  outline: none;
  font-size: 15px;
  transition: .3s;
}

.form-group input:focus {
  border-color: #1B5E20;
  box-shadow: 0 0 0 4px rgba(27, 94, 32, .12);
}

/* ===========================
   REMEMBER ROW
=========================== */

.remember-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  font-size: 14px;
}

.remember-row a {
  color: #1B5E20;
  text-decoration: none;
  font-weight: 600;
}

/* ===========================
   LOGIN BUTTON
=========================== */

.login-btn {
  width: 100%;
  padding: 16px;
  border: none;
  background: #1B5E20;
  color: #fff;
  border-radius: 10px;
  font-size: 16px;
  cursor: pointer;
  transition: .3s;
  font-weight: 600;
}

.login-btn:hover {
  background: #2E7D32;
  transform: translateY(-2px);
}

/* ===========================
   REGISTER LINK
=========================== */

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

.register-link a {
  color: #1B5E20;
  text-decoration: none;
  font-weight: 700;
}

/* ===========================
   ALERTS
=========================== */

.alert {
  padding: 12px;
  margin-bottom: 20px;
  border-radius: 8px;
}

.alert.success {
  background: #d4edda;
}

.alert.error {
  background: #f8d7da;
}

/* ===========================
   RESPONSIVE
=========================== */

@media (max-width: 900px) {
  .login-modal {
    grid-template-columns: 1fr;
  }

  .login-left {
    display: none;
  }

  .login-right {
    padding: 35px;
  }
}