/* ===== AUTH PAGE BASE (shared with register/login) ===== */
.auth-page {
  min-height: 100vh;
  background: var(--gradient-page);
  display: flex;
  flex-direction: column;
}

.auth-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 40px) 24px 60px;
}

.auth-card {
  width: 100%;
  max-width: 560px;
  background: var(--white);
  border-radius: 20px;
  padding: 48px 44px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.08);
  animation: fadeInUp 0.7s ease-out;
  text-align: center;
}

.auth-card__title {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 28px;
  color: var(--text-dark);
  margin-bottom: 8px;
}

.auth-card__subtitle {
  font-size: 14px;
  color: var(--text-body);
  margin-bottom: 36px;
}

.auth-card__subtitle a {
  color: var(--green-primary);
  font-weight: 600;
  text-decoration: none;
}

/* ===== OTP INPUT BOXES ===== */
.otp-inputs {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 28px;
}

.otp-inputs input {
  /* Fluid so six boxes + gaps always fit a 320px phone without overflowing the
     card (was a fixed 58px → 316px+ row that spilled off-screen and dragged the
     fixed navbar wide with it). Caps at the original 58/64 on wide screens. */
  width: clamp(40px, 12.5vw, 58px);
  height: clamp(46px, 14vw, 64px);
  min-width: 0;
  box-sizing: border-box;
  border: 1.5px solid #E6EAF1;
  border-radius: 12px;
  font-family: var(--font-body);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-dark);
  text-align: center;
  background: var(--white);
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.15s ease;
  outline: none;
  caret-color: var(--green-primary);
}

.otp-inputs input:focus {
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(30,58,138,0.15);
  transform: scale(1.05);
}

.otp-inputs input.filled {
  border-color: var(--green-primary);
  background: #f0faf4;
}

.otp-inputs input.error {
  border-color: #e53935;
  box-shadow: 0 0 0 3px rgba(229,57,53,0.12);
  animation: shake 0.4s ease;
}

/* ===== RESEND SECTION ===== */
.otp-resend {
  font-size: 14px;
  color: var(--text-body);
  margin-bottom: 32px;
}

.otp-resend a {
  color: var(--green-primary);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

.otp-resend a:hover {
  text-decoration: underline;
}

.otp-resend a.disabled {
  color: #8A93A4;
  pointer-events: none;
  cursor: default;
}

/* ===== VERIFY BUTTON ===== */
.auth-btn {
  width: 100%;
  padding: 16px;
  background: var(--green-primary);
  color: var(--white);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(30,58,138,0.3);
}

.auth-btn:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(30,58,138,0.4);
}

.auth-btn:active {
  transform: translateY(0);
}

.auth-btn:disabled {
  background: #8A93A4;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* ===== STATUS MESSAGE ===== */
.otp-status {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  display: none;
  animation: fadeInUp 0.4s ease-out;
}

.otp-status.success {
  display: block;
  background: #f0faf4;
  color: #1b7a34;
  border: 1px solid rgba(30,58,138,0.25);
}

.otp-status.error {
  display: block;
  background: #fef2f2;
  color: #b91c1c;
  border: 1px solid rgba(229,57,53,0.2);
}

/* ===== FOOTER LINK ===== */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 14px;
  color: var(--text-body);
}

.auth-footer a {
  color: var(--green-primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-footer a:hover {
  text-decoration: underline;
}

/* ===== SHAKE ANIMATION ===== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 640px) {
  .auth-card {
    padding: 32px 20px;
  }
  /* box size is fluid (clamp above); just tighten the gap and text */
  .otp-inputs {
    gap: clamp(6px, 2vw, 10px);
  }
  .otp-inputs input {
    font-size: 20px;
    border-radius: 10px;
  }
}

@media (max-width: 380px) {
  .auth-card {
    padding: 28px 14px;
  }
  .otp-inputs input {
    font-size: 18px;
  }
}
