/* KB#3672 Login/Register and KB#3750 Forgot Password foreground: the Verify/Reset
 * contract through #main.pn-foreground.
 * Page background, ambient layers, card fill/border, control fills and the primary
 * button colour stay owned by main.css/auth.css and are never repainted here. */
body.auth-page #main.pn-foreground {
  color: var(--text);
  font: 400 var(--pn-type-body)/1.5 var(--pn-font-ui);
  letter-spacing: 0;
}

/* Neutral heading ink: only the text-gradient clip is dropped, no surface paint. */
body.auth-page #main.pn-foreground .auth-card h1 {
  color: var(--text);
  background-image: none;
  -webkit-text-fill-color: currentColor;
  font-family: inherit;
  font-size: var(--pn-type-block);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  margin-bottom: var(--pn-space-2);
}

body.auth-page #main.pn-foreground .auth-subtitle,
body.auth-page #main.pn-foreground .tfa-hint {
  color: var(--text-secondary);
  font-size: var(--pn-type-body);
  line-height: 1.5;
  margin-bottom: var(--pn-space-5);
}

body.auth-page #main.pn-foreground .form-group { margin-bottom: var(--pn-space-4); }

body.auth-page #main.pn-foreground .form-group label {
  color: var(--text);
  font-size: var(--pn-type-body);
  font-weight: 500;
  line-height: 1.5;
  margin-bottom: var(--pn-space-2);
}

/* The optional-field hint is secondary text, not a half-transparent label. */
body.auth-page #main.pn-foreground .auth-optional {
  color: var(--text-secondary);
  opacity: 1;
}

body.auth-page #main.pn-foreground .form-group input {
  min-width: 0;
  min-height: 48px;
  padding: var(--pn-space-3) var(--pn-space-4);
  color: var(--text);
  font: inherit;
}

body.auth-page #main.pn-foreground .form-group input.has-toggle {
  padding-right: calc(var(--pn-target-min) + var(--pn-space-2));
}

body.auth-page #main.pn-foreground .form-group input::placeholder {
  color: var(--text-secondary);
  opacity: 1;
}

body.auth-page #main.pn-foreground .form-group .code-input,
body.auth-page #main.pn-foreground .form-group .verify-code-input {
  font-size: var(--pn-type-block);
  font-weight: 500;
}

body.auth-page #main.pn-foreground .pw-toggle {
  right: var(--pn-space-1);
  width: var(--pn-target-min);
  height: var(--pn-target-min);
  padding: 0;
  border-radius: var(--pn-radius-sm);
  color: var(--text-secondary);
}

body.auth-page #main.pn-foreground .pw-toggle:hover { color: var(--text); }

body.auth-page #main.pn-foreground .btn-primary,
body.auth-page #main.pn-foreground .btn-oauth {
  min-height: 48px;
  padding: var(--pn-space-3) var(--pn-space-5);
  font: inherit;
  font-weight: 500;
  line-height: 1.5;
}

body.auth-page #main.pn-foreground .btn-oauth { color: var(--text); }

body.auth-page #main.pn-foreground .separator {
  color: var(--text-secondary);
  font-size: var(--pn-type-body);
  margin: var(--pn-space-5) 0;
}

body.auth-page #main.pn-foreground .auth-links {
  color: var(--text-secondary);
  font-size: var(--pn-type-body);
  line-height: 1.5;
  margin-top: var(--pn-space-4);
}

body.auth-page #main.pn-foreground .auth-links a,
body.auth-page #main.pn-foreground .checkbox-group a,
body.auth-page #main.pn-foreground .auth-ref-toggle {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: var(--pn-space-1);
}

/* Standalone actions get a full touch target; inline sentence links keep line flow. */
body.auth-page #main.pn-foreground .auth-links a,
body.auth-page #main.pn-foreground .auth-ref-toggle,
body.auth-page #main.pn-foreground .btn-link {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-height: var(--pn-target-min);
  overflow-wrap: anywhere;
}

body.auth-page #main.pn-foreground .btn-link {
  color: var(--text);
  font: inherit;
}

body.auth-page #main.pn-foreground .auth-ref-toggle { font-size: var(--pn-type-body); }

/* KB#3751: the card is 440px wide, so "question + action | Download App" never fits
 * one line and the separator was always left orphaned at a line end. The symbol is
 * taken out of rendering, and the link after it takes its own centred line with a
 * content-sized target instead of stretching across the card. */
body.auth-page #main.pn-foreground .auth-links .sep { display: none; }

body.auth-page #main.pn-foreground .auth-links .sep + a {
  display: flex;
  width: fit-content;
  margin: var(--pn-space-2) auto 0;
}

/* The invitation badge is shown by script only when a referral code exists. */
body.auth-page #main.pn-foreground .ref-badge.hidden { display: none; }

body.auth-page #main.pn-foreground .error-msg,
body.auth-page #main.pn-foreground .status-msg,
body.auth-page #main.pn-foreground .success-msg {
  font-size: var(--pn-type-body);
  line-height: 1.5;
}

body.auth-page #main.pn-foreground .checkbox-group {
  gap: var(--pn-space-3);
  color: var(--text-secondary);
  font-size: var(--pn-type-body);
  line-height: 1.5;
  margin-bottom: var(--pn-space-4);
}

body.auth-page #main.pn-foreground .checkbox-group input[type="checkbox"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.125rem;
}

body.auth-page #main.pn-foreground .pw-strength-label {
  min-width: 5rem;
  color: var(--text-secondary);
  font-size: var(--pn-type-body);
}

body.auth-page #main.pn-foreground :focus-visible {
  outline: var(--pn-outline-width) solid var(--text);
  outline-offset: var(--pn-outline-width);
}

@media (prefers-reduced-motion: reduce) {
  body.auth-page #main.pn-foreground .form-group input,
  body.auth-page #main.pn-foreground .btn-primary,
  body.auth-page #main.pn-foreground .btn-oauth,
  body.auth-page #main.pn-foreground .pw-bar { transition: none; }
  body.auth-page #main.pn-foreground .btn-primary:active { transform: none; }
}
