/*
 * Auth pages (`/auth/login`, `/auth/signup`) — `.au-*` components, served by
 * the `/onboard/static` mount alongside the wizard's and landing page's
 * stylesheets. Reuses the ported design tokens and the shared `.button` /
 * `.text-field` families (`onboarding.css`); adds no new tokens or fonts.
 * Neo-brutalist dark look — mirrors `home.css`. Do not restyle the shared bits.
 */

/* --- Header / brand --- */
.au-header {
  padding: 20px 30px;
  border-bottom: 1px solid var(--color-border-shell);
}

.au-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
}

.au-brand__dot {
  width: 26px;
  height: 26px;
  background: var(--color-accent);
  border-radius: 7px;
  box-shadow: 0 0 16px rgba(194, 242, 74, 0.5);
}

.au-brand__name {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 22px;
  color: var(--color-ink);
}

/* --- Layout --- */
/* Vertically centers the card against the viewport (minus the ~70px header)
 * instead of pinning it near the top, so tall viewports don't read as a
 * small card floating in an otherwise empty page. `min-height` is a floor,
 * not a cap: on short viewports the column still grows to fit its content. */
.au-main {
  max-width: 420px;
  margin: 0 auto;
  min-height: calc(100dvh - 70px);
  padding: 56px 30px 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* --- Card --- */
.au-card {
  background: var(--color-surface);
  border: var(--border-width-thin) solid var(--color-border-sub);
  border-radius: var(--radius-xl);
  padding: 32px 30px;
}

.au-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: 28px;
  margin: 0 0 20px;
}

/* --- Banners --- */
.au-flash {
  color: var(--color-muted);
  font-size: var(--text-compact);
  background: var(--color-surface-2);
  border: var(--border-width-hairline) solid var(--color-border-sub);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 0 0 16px;
}

.au-error {
  color: var(--color-coral);
  font-size: var(--text-compact);
  font-weight: 600;
  background: rgba(255, 122, 102, 0.08);
  border: var(--border-width-hairline) solid var(--color-coral);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  margin: 0 0 16px;
}

.au-error__link {
  color: var(--color-coral);
  text-decoration: underline;
  font-weight: 700;
}

/* --- Form --- */
.au-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.au-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.au-field__label {
  font-size: var(--text-compact);
  font-weight: 600;
  color: var(--color-ink);
}

.au-field__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.au-field__toggle {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-muted);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
}

.au-field__toggle:hover,
.au-field__toggle:focus-visible {
  color: var(--color-accent);
}

.au-field__hint {
  font-size: 13px;
  color: var(--color-muted);
}

/* `.text-field` is the shared input family from `onboarding.css`; the auth
 * pages restyle it here so it reads as a form field, not the wizard's
 * large/mono variants. */
.au-form .text-field {
  width: 100%;
  padding: 10px 12px;
  font-size: var(--text-default);
  color: var(--color-ink);
  background: var(--color-bg);
  border: var(--border-width-thin) solid var(--color-border-sub);
  border-radius: var(--radius-md);
}

.au-form .text-field:focus {
  outline: none;
  border-color: var(--color-accent);
}

.au-submit {
  align-self: flex-start;
  margin-top: 4px;
}

/* --- Footer link --- */
.au-alt {
  margin: 20px 0 0;
  text-align: center;
  font-size: var(--text-compact);
  color: var(--color-muted);
}

.au-alt__link {
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
}

.au-alt__link:hover {
  text-decoration: underline;
}

/* --- Responsive --- */
@media (max-width: 520px) {
  .au-main {
    padding: 40px 20px 80px;
  }

  .au-card {
    padding: 26px 22px;
  }

  .au-card__title {
    font-size: 24px;
  }
}
