/* =========================================================================
   Auth pages — Login, Register, Recover, ResetPassword
   =========================================================================
   Shared centered-card shell + the bits specific to the auth family
   (registration tooltips + password feedback, recovery mode tabs).
   Consumes tokens.css only.
   ========================================================================= */

/* ---- Shell ------------------------------------------------------------- */

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - 8rem);
  padding: 3rem 1rem;
}

.auth-shell {
  width: 100%;
  max-width: 26rem;
}

.auth-shell--wide { max-width: 34rem; }

.auth-brand {
  text-align: center;
  margin-bottom: 1.5rem;
}

.auth-brand__title {
  font-size: 2rem;
  margin: 0;
}

.auth-brand__sub {
  color: var(--sg-gold);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  margin-top: 0.25rem;
}

.auth-submit {
  width: 100%;
  margin-top: 0.5rem;
}

.auth-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--sg-ink-muted);
  margin-top: 1.25rem;
}

/* ---- Recovery mode tabs ------------------------------------------------ */

.auth-tabs {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
  .auth-tabs { grid-template-columns: 1fr 1fr; }
}

.auth-tab {
  display: block;
  text-align: center;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--sg-ink-muted);
  background: var(--sg-surface);
  border: 1px solid var(--sg-edge);
  border-radius: var(--sg-radius-md);
  transition: color var(--sg-transition), border-color var(--sg-transition),
    background-color var(--sg-transition);
}

.auth-tab:hover {
  color: var(--sg-ink-strong);
  border-color: var(--sg-edge-strong);
}

.auth-tab.active {
  color: var(--sg-accent-strong);
  border-color: var(--sg-accent);
  background: var(--sg-accent-soft);
}

/* ---- Reset-password token meta ----------------------------------------- */

.auth-meta {
  font-size: 0.875rem;
  color: var(--sg-ink-muted);
  margin-bottom: 1rem;
}

.auth-meta strong { color: var(--sg-ink-strong); }

/* ---- Registration: label + help tooltip -------------------------------- */

.auth-label-row {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.auth-tip {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.auth-tip__trigger {
  display: inline-flex;
  height: 1rem;
  width: 1rem;
  cursor: help;
  align-items: center;
  justify-content: center;
  border-radius: var(--sg-radius-pill);
  background: var(--sg-surface-raised);
  border: 1px solid var(--sg-edge);
  font-size: 10px;
  font-weight: 700;
  color: var(--sg-ink-muted);
  outline: none;
}

.auth-tip__trigger:focus-visible {
  box-shadow: 0 0 0 3px var(--sg-focus);
}

.auth-tip__panel {
  pointer-events: none;
  position: absolute;
  bottom: calc(100% + 0.45rem);
  left: 50%;
  z-index: 20;
  width: max-content;
  max-width: min(20rem, calc(100vw - 2rem));
  transform: translateX(-50%);
  border-radius: var(--sg-radius-md);
  background: var(--sg-surface-raised);
  border: 1px solid var(--sg-edge);
  padding: 0.5rem 0.75rem;
  font-size: 0.75rem;
  line-height: 1.25rem;
  font-weight: 400;
  color: var(--sg-ink);
  box-shadow: var(--sg-shadow-2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 80ms ease;
}

.auth-tip:hover .auth-tip__panel,
.auth-tip:focus-within .auth-tip__panel {
  opacity: 1;
  visibility: visible;
}

/* ---- Registration: password feedback panel ----------------------------- */

.auth-feedback {
  margin-top: 0.5rem;
  border-radius: var(--sg-radius-md);
  background: var(--sg-surface-raised);
  border: 1px solid var(--sg-edge-faint);
  padding: 0.75rem;
  font-size: 0.875rem;
}

.auth-feedback.is-hidden { display: none; }

.auth-feedback__line { margin: 0; }
.auth-feedback__line + .auth-feedback__line { margin-top: 0.25rem; }

.auth-feedback__line--error   { color: var(--sg-danger); }
.auth-feedback__line--ok      { color: var(--sg-success); }
.auth-feedback__line--neutral { color: var(--sg-ink-muted); }

/* ---- Registration: radio group ----------------------------------------- */

.auth-radio-group {
  display: flex;
  gap: 1.25rem;
}

.auth-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--sg-ink);
}

.auth-radio input {
  accent-color: var(--sg-accent);
}
