/* ============================================================
   pages/auth.css — Login, Register, Forgot Password
   ============================================================ */

.auth-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
}

/* Gradient blob decorations */
.auth-page::before,
.auth-page::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}

.auth-page::before {
  width: 280px; height: 280px;
  top: -80px; right: -60px;
  background: radial-gradient(circle, rgba(var(--color-primary-rgb), 0.15), transparent 70%);
}

.auth-page::after {
  width: 220px; height: 220px;
  bottom: 120px; left: -60px;
  background: radial-gradient(circle, rgba(var(--color-secondary-rgb), 0.10), transparent 70%);
}

/* ── Auth Header ──────────────────────────────────────────── */
.auth-header {
  padding: calc(var(--space-12) + var(--safe-top)) var(--space-6) var(--space-6);
  position: relative; z-index: 1;
}

.auth-logo {
  width: 60px; height: 60px;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-primary);
}

.auth-logo svg { color: #fff; }

.auth-greeting {
  font-size: var(--text-3xl);
  font-weight: var(--font-bold);
  color: var(--color-text-primary);
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.auth-subtext {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  margin-top: var(--space-2);
  line-height: var(--leading-relaxed);
}

/* ── Auth Card (form area) ────────────────────────────────── */
.auth-card {
  flex: 1;
  background: var(--color-surface);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  padding: var(--space-8) var(--space-6);
  position: relative; z-index: 1;
  box-shadow: 0 -4px 32px rgba(0,0,0,0.06);
  border: 1px solid var(--color-border-light);
  border-bottom: none;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* ── Auth Footer Links ────────────────────────────────────── */
.auth-footer {
  text-align: center;
  margin-top: var(--space-6);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.auth-footer a,
.auth-link {
  color: var(--color-primary);
  font-weight: var(--font-semi);
  cursor: pointer;
  text-decoration: none;
}

.auth-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--space-2);
}

/* ── Remember Me Row ──────────────────────────────────────── */
.remember-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: calc(-1 * var(--space-1));
}

.remember-check {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.remember-check input[type="checkbox"] {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--color-border);
  appearance: none;
  -webkit-appearance: none;
  background: var(--color-surface);
  cursor: pointer;
  position: relative;
  transition: all var(--transition-fast);
  flex-shrink: 0;
}

.remember-check input[type="checkbox"]:checked {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.remember-check input[type="checkbox"]:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 7px; height: 11px;
  border: 2px solid #fff;
  border-top: none; border-left: none;
  transform: rotate(45deg);
}

.remember-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  cursor: pointer;
}

/* ── OTP Input ────────────────────────────────────────────── */
.otp-inputs {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}

.otp-input {
  width: 52px !important;
  height: 56px !important;
  text-align: center;
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  border-radius: var(--radius-lg) !important;
  padding: 0 !important;
}

/* ── Auth Error Banner ────────────────────────────────────── */
#auth-error {
  display: none;
  margin-bottom: var(--space-2);
}

#auth-error.visible { display: flex; }

/* ── Back Button (auth pages) ─────────────────────────────── */
.auth-back {
  position: absolute;
  top: calc(var(--space-6) + var(--safe-top));
  left: var(--space-5);
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--color-text-primary);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  z-index: 2;
}
