/* login.css: the sign-in pages, /login and /link (templates/login.html, templates/link.html), on top of brand.css.
   No inline styles on these pages: their Content-Security-Policy is style-src 'self'. */

.auth-card {
  position: relative;
  max-width: 520px;
  margin: -72px auto 0;
}

.auth-card .fe-lead {
  margin-top: 6px;
  color: var(--fe-muted);
  font-size: 15px;
}

/* Notices and errors sit above what they are about; the first field needs no gap of its own. */
.auth-card > .fe-alert { margin: 0 0 18px; }
.auth-card > .fe-alert.link-error { margin: 18px 0 0; }
.auth-card form > .fe-field:first-child { margin-top: 0; }

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 22px;
}

.auth-hint {
  margin-top: 14px;
  font-size: 14px;
  color: var(--fe-muted);
}

.auth-turnstile { margin-top: 18px; min-height: 65px; }

/* "or": the password sign-in is the second way in. */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 24px 0 16px;
  font-size: 13px;
  color: var(--fe-muted);
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--fe-border);
}

.auth-password { margin-top: 4px; }
.auth-password > .auth-hint:first-child { margin-top: 18px; }

.auth-password-row { position: relative; }
.auth-password-row .fe-input { padding-right: 52px; }
.auth-eye {
  position: absolute;
  right: 4px;
  top: 2px;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: var(--fe-muted);
  cursor: pointer;
  border-radius: var(--fe-radius);
}
.auth-eye:hover { color: var(--fe-green); }
.auth-eye svg { width: 20px; height: 20px; }

.auth-sent h2 { margin-top: 0; }
.auth-sent p { margin-top: 10px; }

.auth-footnote {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--fe-border);
  font-size: 13px;
  color: var(--fe-muted);
}
.auth-footnote p + p { margin-top: 8px; }
.auth-footnote .auth-start { font-weight: 700; }

/* /link: one state shown at a time (static/js/link.js). */
.link-state p { margin-top: 10px; font-size: 15px; color: var(--fe-muted); }
.link-state p.fe-lead { margin-top: 0; font-size: 17px; color: var(--fe-text); }
.link-state h2 + p { margin-top: 10px; }
.link-ref { font-weight: 700; white-space: nowrap; }
.link-waiting {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--fe-muted);
}
.link-spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid var(--fe-border);
  border-top-color: var(--fe-green-mid);
  animation: link-spin 0.8s linear infinite;
}
@keyframes link-spin { to { transform: rotate(360deg); } }

@media (max-width: 640px) {
  .auth-card { margin-top: -64px; }
}
