body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #7b1fa2, #e91e63);
  padding: 20px;
}

.loginpage {
  width: 100%;
  max-width: 420px;
  background: white;
  border-radius: 28px;
  padding: 40px 28px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.18);
  animation: fade 0.5s ease;
}

/* Animation */
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Logo */
.loginpage .logo img {
  width: 65px;
}

.loginpage .title {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 6px;
}

.loginpage .desc {
  font-size: 14px;
  color: #777;
  margin-bottom: 28px;
}

/* Input field */
.loginpage .field {
  position: relative;
  margin-bottom: 20px;
}

.loginpage .field input {
  width: 100%;
  height: 54px;
  border-radius: 14px;
  border: 1px solid #ddd;
  padding: 0 15px;
  font-size: 15px;
  outline: none;
}

.loginpage .field label {
  position: absolute;
  top: 16px;
  right: 15px;
  font-size: 14px;
  color: #999;
  background: white;
  padding: 0 6px;
  transition: 0.2s;
}

.loginpage .field input:focus + label,
.loginpage .field input:not(:placeholder-shown) + label {
  top: -8px;
  font-size: 12px;
  color: #e91e63;
}

.loginpage .field input:focus {
  border-color: #e91e63;
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.15);
}

/* Button */
.loginpage .btn {
  width: 100%;
  height: 54px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(90deg, #e91e63, #9c27b0);
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

/* Loader */
.loginpage .loader {
  width: 18px;
  height: 18px;
  border: 2px solid white;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* OTP wrapper */
.otp-wrapper {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 25px;
  flex-wrap: wrap; /* مهم برای موبایل */
  direction: ltr;
}

.otp-wrapper .otp-input {
  width: 48px;
  height: 54px;
  border-radius: 14px;
  border: 1px solid #ddd;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  outline: none;
  transition: 0.2s;
}

.otp-wrapper .otp-input:focus {
  border-color: #e91e63;
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.15);
}

/* Timer */
.timer {
  font-size: 14px;
  color: #777;
  margin-bottom: 25px;
}

/* Edit mobile */
.edit-mobile {
  font-size: 13px;
  color: #e91e63;
  cursor: pointer;
  margin-bottom: 20px;
  transition: 0.2s;
}

.edit-mobile:hover {
  opacity: 0.7;
}

/* ------------------------------ */
/* RESPONSIVE BREAKPOINTS */
/* ------------------------------ */

/* موبایل کوچکتر از 380px */
@media (max-width: 380px) {
  .loginpage {
    padding: 30px 18px;
  }

  .loginpage .logo img {
    width: 55px;
  }

  .otp-wrapper {
    gap: 10px;
  }

  .otp-wrapper .otp-input {
    width: 42px;
    height: 50px;
    font-size: 18px;
  }
}

/* تبلت 600px به بالا */
@media (min-width: 600px) {
  .loginpage {
    max-width: 480px;
    padding: 50px 40px;
  }

  .otp-wrapper .otp-input {
    width: 52px;
    height: 56px;
  }
}
/* Step3 Password Inputs */
#step3 input[type="password"] {
  width: 100%;
  height: 54px;
  border-radius: 14px;
  border: 1px solid #ddd;
  padding: 0 15px;
  font-size: 15px;
  outline: none;
  margin-bottom: 15px;
  transition: 0.2s;
}

#step3 input[type="password"]:focus {
  border-color: #e91e63;
  box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.15);
}

/* فاصله بیشتر بین دو input */
#step3 input[type="password"]:first-of-type {
  margin-bottom: 12px;
}

/* دکمه Step3 همان استایل قبلی */
#step3 .btn {
  margin-top: 10px;
}

/* Loader برای Step3 */
#setPasswordLoader {
  display: none;
}

/* ریسپانسیو برای موبایل خیلی کوچک */
@media (max-width: 380px) {
  #step3 input[type="password"] {
    height: 50px;
    font-size: 14px;
  }
}

/* تبلت */
@media (min-width: 600px) {
  #step3 input[type="password"] {
    height: 56px;
    font-size: 16px;
  }
}

.error-box {
  background: #ffebee;
  color: #c62828;
  padding: 12px;
  border-radius: 10px;
  margin-bottom: 15px;
  display: none;
  font-size: 14px;
}
/* Step4 Password Login */
#step4 input[type="password"] {
    width: 100%;
    height: 54px;
    border-radius: 14px;
    border: 1px solid #ddd;
    padding: 0 15px;
    font-size: 15px;
    outline: none;
    margin-bottom: 18px;
    transition: 0.2s;
}

#step4 input[type="password"]:focus {
    border-color: #e91e63;
    box-shadow: 0 0 0 3px rgba(233, 30, 99, 0.15);
}

#loginPasswordLoader {
    display: none;
}

/* لینک‌های زیرین */
.extra-links {
    margin-top: 18px;
    font-size: 13px;
    color: #e91e63;
    display: flex;
    justify-content: space-between;
    padding: 0 4px;
}

.extra-links span {
    cursor: pointer;
    transition: 0.2s;
}

.extra-links span:hover {
    opacity: 0.7;
}

/* موبایل خیلی کوچک */
@media (max-width: 380px) {
    #step4 input[type="password"] {
        height: 50px;
        font-size: 14px;
    }
}

/* تبلت */
@media (min-width: 600px) {
    #step4 input[type="password"] {
        height: 56px;
        font-size: 16px;
    }
}