/* ============================================================================
   POOOL UI — login.css (Layer 4: page styles for POOOL Login.html)
   Page-specific only: split auth layout + brand panel. All controls (inputs,
   buttons, checkbox, social) come from components.css / kit.css — untouched.
   ============================================================================ */

.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }

/* ── Form side ─────────────────────────────────────────────────────────── */
.auth__form { display: flex; flex-direction: column; padding: 28px 48px 40px; }
.auth__top { display: flex; justify-content: space-between; align-items: center; }
.auth__top img { height: 28px; }
.auth__top a { font-size: 14.5px; font-weight: 600; color: var(--fg-secondary); text-decoration: none; }
.auth__top a:hover { color: var(--brand-blue); }
.auth__card { margin: auto; width: 100%; max-width: 420px; padding: 40px 0; animation: heroFade .5s cubic-bezier(.2,.8,.2,1) both; }
/* Smooth swap between Log in ↔ Create account (keyed remount) */
.auth__swap { animation: authSwap .35s cubic-bezier(.2,.8,.2,1) both; }
.auth__swap--center { text-align: center; }
@keyframes authSwap { from { opacity: 0; transform: translateY(12px); } }
.auth__switch { text-align: center; font-size: 14.5px; color: var(--fg-secondary); margin: 24px 0 0; }
.auth__switch button { border: 0; background: none; font: inherit; font-weight: 700; color: var(--brand-blue); cursor: pointer; padding: 0; }
.auth__switch button:hover { text-decoration: underline; }
/* Passkey prompt */
.pk { text-align: center; padding: 26px 0 8px; animation: authSwap .35s cubic-bezier(.2,.8,.2,1) both; }
.pk__ring { position: relative; width: 88px; height: 88px; margin: 0 auto 20px; border-radius: 50%; background: var(--info-bg); display: flex; align-items: center; justify-content: center; color: var(--brand-blue); }
.pk__ring::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand-blue); animation: pulsering 1.6s ease-out infinite; }
.pk__ring svg { width: 40px; height: 40px; }
.pk h2 { font-size: 21px; font-weight: 800; letter-spacing: -.015em; color: var(--fg-heading-2); margin: 0 0 8px; }
.pk p { font-size: 14.5px; color: var(--fg-secondary); margin: 0 0 24px; line-height: 1.55; }
.auth__card h1 { font-size: 32px; font-weight: 800; letter-spacing: -.025em; color: var(--fg-heading-2); margin: 22px 0 8px; }
.auth__card .sub { font-size: 15.5px; color: var(--fg-secondary); margin: 0 0 28px; line-height: 1.55; }
.auth__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 20px; }
.auth__row a { font-size: 14px; font-weight: 600; color: var(--brand-blue); text-decoration: none; }
.auth__row a:hover { text-decoration: underline; }
.auth__alternatives { display: grid; gap: 10px; }
.auth__passkey-icon { width: 20px; height: 20px; flex: 0 0 auto; }
.auth__terms { font-size: 12.5px; color: var(--fg-muted); text-align: center; margin-top: 18px; line-height: 1.6; }
.auth__terms a { color: var(--fg-secondary); }

/* Forgot-password flow */
.fp__logo { display: block; height: 32px; }
.fp__ring { width: 64px; height: 64px; border-radius: 20px; background: var(--info-bg); display: inline-flex; align-items: center; justify-content: center; color: var(--brand-blue); }
.fp__ring svg { width: 30px; height: 30px; }
.fp__ring--pulse { position: relative; border-radius: 50%; }
.fp__ring--pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--brand-blue); animation: pulsering 1.6s ease-out infinite; }
.fp__ring--warn { background: var(--warning-bg); color: var(--warning-fg); }
.fp__email { color: var(--fg-heading-2); font-weight: 700; }
.fp__resend { font-size: 14px; color: var(--fg-secondary); text-align: center; margin-top: 18px; line-height: 1.6; }
.fp__resend button { border: 0; background: none; font: inherit; font-weight: 700; color: var(--brand-blue); cursor: pointer; padding: 0; }
.fp__resend button:disabled { color: var(--fg-muted); cursor: default; font-variant-numeric: tabular-nums; }
.fp__resend button:not(:disabled):hover { text-decoration: underline; }
.mail-icon { width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--info-bg); color: var(--brand-blue); }
.mail-icon svg { width: 30px; height: 30px; }
.mail-icon--success { background: var(--success-bg); color: var(--success-fg); }
.mail-icon--error { background: var(--warning-bg); color: var(--warning-fg); }
.auth-loading { display: block; min-height: 20px; margin-top: 10px; color: var(--fg-secondary); font-size: 13px; text-align: center; }
.auth-success-message { padding: 12px 14px; border-radius: var(--radius-md); background: var(--success-bg); color: var(--success-fg); font-size: 14px; }
.auth-error-message { padding: 12px 14px; border-radius: var(--radius-md); background: var(--danger-bg); color: var(--danger-fg); font-size: 14px; }
.auth-primary-link { text-decoration: none; }

/* Success state */
.auth__ok { text-align: center; padding: 24px 0; animation: heroFade .4s cubic-bezier(.2,.8,.2,1) both; }
.auth__ok .ic { width: 64px; height: 64px; border-radius: 50%; background: var(--brand-blue); display: inline-flex; align-items: center; justify-content: center; margin-bottom: 18px; box-shadow: 0 12px 32px rgba(0,0,255,.25); }
.auth__ok .ic svg { width: 30px; height: 30px; }
.auth__ok h1 { margin-top: 0; }

/* ── Brand panel ───────────────────────────────────────────────────────── */
.auth__panel { position: relative; overflow: hidden; background: #101828; display: flex; align-items: flex-end; }
.auth__panel > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: kenburns 26s ease-in-out infinite alternate; }
.auth__scrim { position: absolute; inset: 0; background: linear-gradient(200deg, rgba(6,8,20,.25), rgba(6,8,20,.05) 40%, rgba(6,8,20,.74) 100%); }
.auth__panel .hero__chip { position: absolute; top: 9%; right: 8%; }
.auth__quote { position: relative; z-index: 2; color: #fff; padding: 0 48px 44px; }
.auth__quote .stars { font-size: 16px; }
.auth__quote blockquote { font-size: 22px; font-weight: 700; letter-spacing: -.015em; line-height: 1.4; margin: 12px 0 16px; max-width: 38ch; }
.auth__quote blockquote .hl { color: var(--brand-green-mint); }
.auth__quote .who { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: rgba(255,255,255,.8); }
.auth__quote .who img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255,255,255,.7); }
.auth__quote .who b { color: #fff; display: block; }
.auth__facts { position: relative; z-index: 2; display: flex; gap: 32px; padding: 0 48px 40px; border-top: 1px solid rgba(255,255,255,.16); margin: 0 48px; padding-left: 0; padding-right: 0; padding-top: 22px; color: #fff; }
.auth__facts .v { font-size: 24px; font-weight: 800; color: var(--brand-green-mint); font-variant-numeric: tabular-nums; }
.auth__facts .k { font-size: 12.5px; color: rgba(255,255,255,.72); margin-top: 2px; }

@media (prefers-reduced-motion: reduce) { .auth__panel > img, .auth__ok, .auth__card, .auth__swap, .pk, .pk__ring::after, .fp__ring--pulse::after { animation: none; } }
/* Auth pages use the shared semantic theme tokens. Explicit surface colors
   prevent light form controls from becoming unreadable in dark mode. */
:root[data-theme="dark"] body,
:root[data-theme="dark"] .auth__form { background: var(--bg-page); }
:root[data-theme="dark"] .auth .input,
:root[data-theme="dark"] .auth .check input,
:root[data-theme="dark"] .auth .btn--social { background: var(--bg-surface); }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] body,
  :root[data-theme="auto"] .auth__form { background: var(--bg-page); }
  :root[data-theme="auto"] .auth .input,
  :root[data-theme="auto"] .auth .check input,
  :root[data-theme="auto"] .auth .btn--social { background: var(--bg-surface); }
}
@media (max-width: 980px) {
  .auth { grid-template-columns: 1fr; }
  .auth__panel { display: none; }
  .auth__form { padding: 20px 24px 32px; }
}
