/* === Auth Pages Styles === */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 64px - 80px); /* header height - footer height */
  padding: 2rem 1rem;
}

.auth-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 440px;
}

.auth-box .logo {
  display: block;
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 2rem;
}

.auth-box h1 {
  font-size: 1.5rem;
  text-align: center;
  margin-bottom: 0.5rem;
}

#stepReset h1 {
  margin-top: 1.2rem;
}

.auth-box .auth-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

/* Form fields */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.form-group input {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  font-family: var(--font);
  transition: border-color 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.form-group input::placeholder {
  color: var(--text-muted);
  opacity: 0.6;
}

/* Error display */
.form-error {
  display: none;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.form-error.visible {
  display: block;
}

/* Success toast */
.form-success {
  display: none;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #4ade80;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.form-success.visible {
  display: block;
}

/* Submit button */
.auth-box .btn {
  width: 100%;
  padding: 0.85rem;
  font-size: 1rem;
  margin-top: 0.5rem;
}

.auth-box .btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Footer link */
.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--accent);
  font-weight: 600;
}

.auth-footer a:hover {
  color: var(--accent-hover);
}

/* OTP input styling */
.otp-input {
  text-align: center;
  font-size: 1.5rem !important;
  letter-spacing: 0.5rem;
  max-width: 200px;
  margin: 0 auto;
  display: block;
}

/* Email display in verify page */
.auth-email-display {
  text-align: center;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  word-break: break-all;
}

/* Loading spinner on button */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* Password visibility toggle */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 2.75rem;
}

.password-toggle {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  padding: 0.25rem;
  line-height: 1;
}

.password-toggle:hover {
  color: var(--text);
}

/* Responsive */
@media (max-width: 480px) {
  .auth-box {
    padding: 2rem 1.25rem;
  }

  .auth-box h1 {
    font-size: 1.3rem;
  }
}