/* ===============================
   PREMIUM LOGIN UI
================================ */

.login-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  isolation: isolate;
}

/* BACKGROUND */
.login-page::before {
  content: "";
  position: fixed;
  inset: 0;
  background: url("../img/ui/bg.png") center / cover no-repeat;
  z-index: -1;
}

/* CENTER WRAPPER */
.login-container {
  width: 100%;
  display: flex;
  justify-content: center;
  padding: 20px;
}

/* CARD */
.login-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border-radius: 24px;
  padding: 40px 35px;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.18);
  animation: fadeUp 0.6s ease;
}

/* LOGO */
.login-logo-wrap {
  text-align: center;
  margin-bottom: 25px;
}

.login-logo-wrap img {
  width: 170px;
}

/* TEXT */
.login-title {
  text-align: center;
  font-size: 30px;
  margin-bottom: 8px;
}

.login-subtitle {
  text-align: center;
  opacity: 0.65;
  margin-bottom: 30px;
}

/* INPUTS */
.login-input {
  margin-bottom: 20px;
}

.mil-input-frame {
  position: relative;
}

.mil-input-frame input {
  width: 100%;
  height: 52px;
  padding: 0 50px 0 18px;
  border-radius: 14px;
  font-size: 15px;
}

.mil-input-frame i {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #999;
}

/* ACTIONS */
.login-actions {
  text-align: right;
  margin-bottom: 25px;
}

/* BUTTON WRAPPER */
.login-btn-wrap {
  display: flex;
  justify-content: center;
}

/* BUTTON */
.login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  height: 52px;
  padding: 0 40px;

  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.3px;

  border-radius: 999px;
  transition: all 0.3s ease;
}

/* BUTTON ICON */
.login-btn i {
  font-size: 14px;
}

/* HOVER EFFECT */
.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

/* ANIMATION */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(25px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* MOBILE */
@media (max-width: 480px) {
  .login-card {
    padding: 30px 22px;
  }

  .login-title {
    font-size: 26px;
  }
}

/* ===============================
   BUTTON LOADER (REUSED)
================================ */
.mil-btn.loading {
  pointer-events: none;
  opacity: 0.85;
}

.mil-btn.loading i {
  display: none; /* hide arrow icon while loading */
}

.mil-btn.loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  margin-left: 12px;
  display: inline-block;
  animation: spin 0.8s linear infinite;
}

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

/* ===============================
   OTP INPUT UI (PREMIUM)
================================ */

/* OTP BOXES */
.otp-boxes {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 28px 0;
}

/* Individual OTP Input */
.otp-input {
  width: 48px;
  height: 54px;

  text-align: center;
  font-size: 20px;
  font-weight: 600;

  border-radius: 14px;
  border: 1.5px solid #e5e7eb;
  background: #ffffff;
  color: #1f2937;

  transition: border-color 0.25s ease, box-shadow 0.25s ease,
    transform 0.2s ease;
}

/* Focus animation */
.otp-input:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.18);
  transform: scale(1.06);
}

/* Filled state (optional if you add JS class) */
.otp-input.filled {
  border-color: #6366f1;
}

/* ===============================
   BACK BUTTON UNDER OTP
================================ */

.otp-actions {
  text-align: center;
  margin-top: 18px;
}

/* Animated back link */
.otp-link {
  position: relative;
  background: none;
  border: none;

  font-size: 14px;
  font-weight: 500;
  color: #64748b;

  cursor: pointer;
  padding: 6px 4px;

  display: inline-flex;
  align-items: center;
  gap: 6px;

  transition: color 0.25s ease, transform 0.25s ease;
}

/* underline animation */
.otp-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;

  width: 0%;
  height: 1px;
  background: currentColor;

  transition: width 0.25s ease;
}

/* hover */
.otp-link:hover {
  color: #1f2937;
  transform: translateX(-3px);
}

.otp-link:hover::after {
  width: 100%;
}

/* active feedback */
.otp-link:active {
  transform: translateX(-6px);
}

/* focus accessibility */
.otp-link:focus {
  outline: none;
}

/* ===============================
   MOBILE TUNING
================================ */

@media (max-width: 480px) {
  .otp-input {
    width: 44px;
    height: 50px;
    font-size: 18px;
  }
}
