/* ============================================================================
   AUTH: Sign in, Sign up and joining, Welcome, the reset
   and expired-link pages. One column, 380 wide, the layered logo on top, no
   decoration (shared/_auth_page). Desktop centers the column; phone starts
   it at the top. The footer (Terms · Privacy, or the sign-up agreement)
   sits at the bottom of the window.
   ============================================================================ */

.content-main.content-main--auth {
  display: flex;
  flex-direction: column;
  max-width: none;
  min-height: 100vh;
  min-height: 100svh;
  padding: 0;
}

.auth {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-12) var(--sp-6) 26px;
}

.auth-column {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 380px;
  margin: auto 0;
}

.auth-logo {
  margin-bottom: 22px;
}

.auth-logo .logo-mark {
  width: 147px;
  height: 32px;
}

.auth-title {
  margin: 0;
  font: var(--fw-bold) var(--t-display-m) var(--font);
  letter-spacing: var(--tracking-tight);
  color: var(--tx);
}

.auth-subline {
  margin: 4px 0 0;
  font: var(--fw-regular) var(--t-body) var(--font);
  color: var(--tx2);
}

.auth-form {
  display: flex;
  flex-direction: column;
  margin-top: var(--sp-6);
}

.auth-form .field + .field {
  margin-top: var(--sp-4);
}

.auth-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-2);
}

.auth-aside-link {
  font: var(--fw-bold) 13px/18px var(--font);
  color: var(--ac-text);
  text-decoration: none;
}

.auth-aside-link:hover {
  text-decoration: underline;
}

.auth-submit {
  margin-top: var(--sp-6);
}

.auth-submit.button--lg {
  height: 44px;
}

/* "New here? Make an account · Try the demo" under a rule */
.auth-links {
  margin: var(--sp-6) 0 0;
  padding-top: var(--sp-5);
  border-top: var(--bw) solid var(--line);
  font: var(--fw-regular) var(--t-body-s) var(--font);
  color: var(--tx2);
}

/* Sign up: centered, no rule, one link a line */
.auth-links--stacked {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-top: var(--sp-5);
  padding-top: 0;
  border-top: none;
  text-align: center;
}

.auth-link-accent,
.auth-link-strong {
  font-weight: var(--fw-bold);
  text-decoration: none;
}

.auth-link-accent {
  color: var(--ac-text);
}

.auth-link-strong {
  color: var(--tx);
}

.auth-link-accent:hover,
.auth-link-strong:hover {
  text-decoration: underline;
}

.auth-footer {
  max-width: 380px;
  margin: 0;
  font: var(--fw-regular) 12px/18px var(--font);
  color: var(--tx3);
  text-align: center;
}

.auth-footer a {
  color: inherit;
  text-decoration: none;
}

.auth-footer a:hover {
  color: var(--tx2);
  text-decoration: underline;
}

/* One-button join and the expired link: the action, then a quiet line */
.auth-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  margin-top: var(--sp-6);
}

.auth-actions form {
  display: flex;
}

.auth-signed-in {
  margin: var(--sp-6) 0 0;
  font: var(--fw-regular) var(--t-body-s) var(--font);
  color: var(--tx2);
}

@media (max-width: 1099px), (hover: none) and (pointer: coarse) {
  .auth {
    padding: calc(28px + var(--safe-inset-top)) 20px calc(26px + var(--safe-inset-bottom));
  }

  .auth-column {
    max-width: none;
    margin: 0;
    flex: 1;
  }

  .auth-title {
    font: var(--fw-bold) var(--t-display) var(--font);
  }

  .auth-form {
    margin-top: var(--sp-5);
  }

  .auth-submit.button--lg {
    height: 48px;
  }
}

/* --- Welcome --------------------------------------------------------- */

.welcome-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 26px;
}

.welcome-step {
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--line);
}

.welcome-step--done {
  background: var(--ac);
}

.welcome-eyebrow {
  margin: 0 0 6px;
  font: var(--fw-semibold) var(--t-label) var(--font);
  color: var(--tx3);
}

.welcome-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.welcome-name {
  flex: 1;
  min-width: 0;
}

.welcome-logo {
  position: relative;
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 58px;
  height: 58px;
  overflow: hidden;
  border: var(--bw) dashed var(--line);
  border-radius: var(--r-tile);
  color: var(--tx3);
  cursor: pointer;
}

.welcome-logo:hover {
  background: var(--sf2);
}

.welcome-identity:has(#organization_logo:focus-visible) .welcome-logo {
  border-color: var(--ac);
  box-shadow: var(--focus-ring);
}

.welcome-logo-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.welcome-logo-preview.hidden,
.welcome-logo-empty.hidden {
  display: none;
}

.welcome-logo-empty .icon {
  width: 22px;
  height: 22px;
}

.welcome-error {
  margin: 6px 0 0 70px;
}

.welcome-join {
  margin: var(--sp-5) 0 0;
  font: var(--fw-regular) var(--t-body-s) var(--font);
  color: var(--tx2);
  text-align: center;
}

.welcome-up-next {
  margin-top: var(--sp-8);
}

.welcome-up-next p {
  margin: 0;
  font: var(--fw-regular) var(--t-body-s) var(--font);
  color: var(--tx2);
}

.welcome-up-next strong {
  color: var(--tx);
}

/* Welcome: the Up next card sits at the foot of the phone screen */
@media (max-width: 1099px), (hover: none) and (pointer: coarse) {
  .welcome-up-next {
    margin-top: auto;
  }

  .welcome-join {
    margin-bottom: var(--sp-8);
  }
}
