/* ==========================================================================
   Author Monitoring Dashboard — Auth pages (login, first-run password change)
   ========================================================================== */

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(1000px 500px at 85% -10%, var(--accent-soft), transparent 60%),
    radial-gradient(800px 420px at -10% 110%, var(--accent-soft), transparent 55%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 30px 28px;
  animation: auth-in var(--dur-slow) var(--ease);
}

.auth-brand { display: flex; align-items: center; gap: 11px; margin-bottom: 24px; }
.auth-brand .brand-mark { width: 38px; height: 38px; font-size: var(--fs-base); }
.auth-brand h1 { font-size: var(--fs-lg); letter-spacing: -0.01em; }
.auth-brand p { font-size: var(--fs-xs); color: var(--ink-3); }

.auth-card h2 { font-size: var(--fs-md); margin-bottom: 4px; }
.auth-card .auth-sub { color: var(--ink-2); font-size: var(--fs-sm); margin-bottom: 20px; }

.auth-foot {
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  font-size: var(--fs-xs); color: var(--ink-3);
}

.auth-step[hidden] { display: none; }

/* Secondary actions under a step (forgot password, back to sign in) */
.auth-links {
  margin-top: 14px;
  display: flex; justify-content: center; gap: 16px; flex-wrap: wrap;
}
.auth-link {
  background: none; border: 0; padding: 4px; cursor: pointer;
  font-size: var(--fs-xs); color: var(--accent);
  text-decoration: underline; text-underline-offset: 2px;
}
.auth-link:hover { color: var(--ink); }
.auth-link:focus-visible { outline: 2px solid var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }

/* The reset-sent confirmation sits inside the step, not above the card */
#forgot-sent[hidden] { display: none; }

/* New-device account restore */
.auth-restore { margin-top: 18px; }
.auth-restore-toggle {
  width: 100%; text-align: center;
  background: none; border: 0; padding: 6px;
  font-size: var(--fs-xs); color: var(--accent); cursor: pointer;
  text-decoration: underline; text-underline-offset: 2px;
}
.auth-restore-toggle:hover { color: var(--ink); }
.auth-restore form { margin-top: 12px; }
.auth-restore #restore-status { margin-top: 10px; margin-bottom: 0; min-height: 1em; }

/* Phones: card fills the width, comfortable padding */
@media (max-width: 480px) {
  .auth-page { padding: 14px; place-items: start center; }
  .auth-card { padding: 24px 20px 20px; max-width: none; }
}

/* TOTP code input */
.totp-input {
  letter-spacing: 0.5em; text-align: center;
  font-family: var(--font-mono); font-size: var(--fs-lg);
}

@keyframes auth-in {
  from { opacity: 0; transform: translateY(14px); }
}
