.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 10;
}

.login-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: #fff;
  width: 420px;
  padding: 32px 36px 28px;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 2000;
  max-height: 90vh;
  overflow-y: auto;
}

.overlay.active {
  opacity: 1;
  pointer-events: all;
}

.login-modal.active {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

.page-content.blur {
  filter: blur(6px);
}

.login-modal h2 {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  margin-bottom: 6px;
}

.login-modal p {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
  margin-bottom: 20px;
}

.login-modal label {
  font-size: 13px;
  color: #374151;
  margin-bottom: 6px;
  display: block;
}

.phone-input {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 20px;
}

.phone-input span {
  background: #f3f4f6;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 14px;
}

.phone-input input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  width: 100%;
}

.continue-btn {
  width: 100%;
  height: 48px;
  background: #e5e7eb;
  color: #9ca3af;
  border: none;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: not-allowed;
  transition: all 0.25s ease;
}

.continue-btn.active {
  background: #65d852;
  color: #ffffff;
  cursor: pointer;
}

.terms {
  font-size: 13px;
  color: #6b7280;
  text-align: center;
  margin-top: 16px;
}

.terms a {
  color: #65d852;
  text-decoration: none;
  font-weight: 500;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 18px;
  color: #6b7280;
  cursor: pointer;
}

.login-logo {
  display: block;
  margin: 0 auto 12px;
  height: 50px;
  object-fit: contain;
  border-radius: 12px;
}

@media (max-width: 640px) {
  .login-modal {
    width: 80%;
    padding: 20px;
  }
}

/* ---------- OTP ---------- */
.auth-step {
  display: none;
}

.auth-step.active {
  display: block;
}

.otp-text {
  font-size: 14px;
  color: #6b7280;
  text-align: center;
  margin-bottom: 20px;
}

.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 24px 0;
}

.otp-inputs input {
  width: 48px;
  height: 56px;
  text-align: center;
  font-size: 18px;
  border-radius: 14px;
  border: 2px solid #e5e7eb;
  outline: none;
}

.otp-inputs input:focus {
  border-color: #65d852;
}

.verify-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: #e5e7eb;
  color: #9ca3af;
  border: none;
  font-weight: 600;
  cursor: not-allowed;
  margin-bottom: 24px;
}

.verify-btn.active {
  background: #65d852;
  color: white;
  cursor: pointer;
}

.resend {
  text-align: center;
  font-size: 14px;
  color: #6b7280;
}

#timer {
  color: #65d852;
  font-weight: 600;
}

.resend-btn {
  display: none;
  background: none;
  border: none;
  padding: 0;
  margin-top: 12px;
  margin-bottom: 22px;
  font-size: 14px;
  font-weight: 500;
  color: #65d852;
  cursor: pointer;
  transition: color 0.2s ease;
}

.resend-btn:hover {
  color: #173c1f;
}

/* ---------- PASSWORD STEP ---------- */

.password-input {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  height: 56px;
  padding: 0 16px;
  margin-bottom: 14px;
  transition: border-color .25s ease, box-shadow .25s ease;
}

.password-input:focus-within {
  border-color: #65d852;
}

.password-input input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15px;
  font-weight: 500;
  color: #111827;
}

.password-input input::placeholder {
  color: #9ca3af;
  font-weight: 400;
}

.password-input img:first-child {
  width: 20px;
  height: 20px;
  opacity: .6;
  flex-shrink: 0;
}

.toggle-login-password {
  width: 18px;
  height: 18px;
  cursor: pointer;
  opacity: .6;
  transition: opacity .2s ease, transform .2s ease;
  flex-shrink: 0;
}

.toggle-reset-password,
.toggle-confirm-reset-password {

  width: 18px;
  height: 18px;
  cursor: pointer;
  opacity: .6;
  transition: opacity .2s ease, transform .2s ease;
  flex-shrink: 0;

}

.toggle-reset-password:hover,
.toggle-confirm-reset-password:hover {

  opacity: 1;
  transform: scale(1.08);

}

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

.forgot-password {
  text-align: right !important;
  font-size: 14px !important;
  font-weight: 500;
  color: #65d852 !important;
  cursor: pointer;
  margin: 8px 0 26px !important;
}



.password-login-btn.active {
  background: #65d852;
  color: #fff;
  cursor: pointer;
}

.password-login-btn.active:hover {
  background: #58c245;
  transform: translateY(-1px);
}

.password-login-btn {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 15px;
  background: #e5e7eb;
  color: #9ca3af;
  font-size: 16px;
  font-weight: 600;
  cursor: not-allowed;
  transition: all .25s ease;

  margin-bottom: 20px;
  /* <-- Add this */
}

.forgot-email-btn,
.reset-password-btn {

  width: 100%;
  height: 52px;
  border: none;
  border-radius: 15px;
  background: #e5e7eb;
  color: #9ca3af;
  font-size: 16px;
  font-weight: 600;
  cursor: not-allowed;
  transition: all .25s ease;
  margin-bottom: 20px;

}

.forgot-email-btn.active,
.reset-password-btn.active {

  background: #65d852;
  color: white;
  cursor: pointer;

}

.forgot-email-btn.active:hover,
.reset-password-btn.active:hover {

  background: #58c245;
  transform: translateY(-1px);

}

.password-input img:first-child,
.email-input img:first-child {
  width: 20px;
  height: 20px;
  flex-shrink: 0;

  filter:
    brightness(0)
    saturate(100%)
    invert(66%)
    sepia(18%)
    saturate(1050%)
    hue-rotate(62deg)
    brightness(98%)
    contrast(95%);

  opacity: 0.8;
}

@media (max-width: 640px) {
  .otp-inputs {
    gap: 8px;
  }

  .otp-inputs input {
    width: 38px;
    height: 46px;
    font-size: 16px;
    border-radius: 12px;
  }
}

@media (max-width: 640px) {

  .password-input {
    padding: 10px;
  }

  .password-input img:first-child,
  .toggle-login-password {
    width: 16px;
  }

  .password-login-btn,
  .forgot-email-btn,
  .reset-password-btn {

    height: 46px;
    font-size: 14px;

  }

  .forgot-password {
    font-size: 12px !important;
  }

}