/* Login / Sign up pages.
   Reuses the FightDeck app design language defined in style.css
   (--fightdeck-primary / --fightdeck-secondary / --fightdeck-border /
   --fightdeck-surface / --fightdeck-text). No new colour system is
   introduced here. The .auth-field / .auth-input / .auth-btn "form kit"
   below is deliberately generic so the onboarding-wizard redesign (QA-23)
   can adopt the same components for one consistent visual language. */

/* --- slim unauthenticated header (replaces the marketing navbar) --- */
.auth-topbar {
  background: #0b0d10;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-topbar__inner {
  display: flex;
  align-items: center;
  max-width: 1140px;
  min-height: 64px;
  margin-inline: auto;
  padding: 0 1rem;
}

.auth-topbar__brand {
  display: inline-flex;
  align-items: center;
}

.auth-topbar__brand img {
  display: block;
  width: auto;
  height: 32px;
}

/* --- page canvas --- */
.auth-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: clamp(2rem, 6vw, 4.5rem) 1rem;
  background: var(--fightdeck-surface);
}

/* --- card --- */
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: clamp(1.75rem, 5vw, 2.5rem);
  background: #fff;
  border: 1px solid var(--fightdeck-border);
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.auth-card__accent {
  display: block;
  width: 36px;
  height: 4px;
  margin-bottom: 1.25rem;
  background: var(--fightdeck-secondary);
  border-radius: 999px;
}

.auth-card__title {
  margin: 0 0 0.4rem;
  color: var(--fightdeck-primary);
  font-size: 1.625rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-card__subtitle {
  margin: 0 0 1.5rem;
  color: #64748b;
  font-size: 0.875rem;
}

/* --- form kit --- */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.auth-field--split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.auth-field--split > * {
  min-width: 0;
}

.auth-field__labelline {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.auth-label {
  color: #64748b;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-form input {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  color: var(--fightdeck-text);
  font: inherit;
  font-size: 0.95rem;
  background: #fff;
  border: 1px solid var(--fightdeck-border);
  border-radius: 10px;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--fightdeck-primary);
  box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.12);
}

.auth-form input:autofill {
  box-shadow: 0 0 0 100px #fff inset;
}

.auth-hint {
  margin: 0.15rem 0 0;
  color: #64748b;
  font-size: 0.8rem;
}

.auth-forgot {
  color: var(--fightdeck-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
}

.auth-forgot:hover,
.auth-forgot:focus {
  text-decoration: underline;
}

/* --- selected-plan summary (signup, when arriving from /pricing/ "Choose Plan") --- */
.auth-plan {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-bottom: 1.5rem;
  padding: 0.85rem 1rem;
  background: var(--fightdeck-surface);
  border: 1px solid var(--fightdeck-border);
  border-left: 3px solid var(--fightdeck-secondary);
  border-radius: 10px;
}

.auth-plan__label {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-plan__name {
  color: var(--fightdeck-primary);
  font-size: 0.95rem;
  font-weight: 700;
}

.auth-plan__meta {
  color: #64748b;
  font-size: 0.8rem;
}

.auth-plan__change {
  align-self: flex-start;
  margin-top: 0.35rem;
}

.auth-btn {
  width: 100%;
  min-height: 48px;
  margin-top: 0.5rem;
  padding: 0 1rem;
  color: #fff;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  background: var(--fightdeck-primary);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
}

/* Same button as an anchor (password-reset "go to sign in" / "request a new link"). */
a.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.auth-btn:hover,
.auth-btn:focus {
  background: #1f2937;
}

.auth-btn:focus-visible {
  outline: 3px solid rgba(17, 24, 39, 0.35);
  outline-offset: 2px;
}

.auth-card__footer {
  margin: 1.5rem 0 0;
  color: #64748b;
  font-size: 0.85rem;
  text-align: center;
}

.auth-card__footer a {
  color: var(--fightdeck-primary);
  font-weight: 700;
  text-decoration: none;
}

.auth-card__footer a:hover,
.auth-card__footer a:focus {
  text-decoration: underline;
}

/* --- validation --- */
.auth-alert {
  margin: 0 0 1.25rem;
  padding: 0.75rem 0.9rem;
  color: #991b1b;
  font-size: 0.85rem;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
}

.auth-form .errorlist {
  margin: 0.3rem 0 0;
  padding: 0;
  color: #b91c1c;
  font-size: 0.8rem;
  list-style: none;
}

.auth-form .errorlist.nonfield {
  margin: 0 0 1rem;
}

.auth-field:has(.errorlist) input {
  border-color: #dc2626;
}

@media (max-width: 480px) {
  .auth-field--split {
    grid-template-columns: 1fr;
  }
}

/* --- error pages (403 / 404 / the QA-35 "not published yet" academy page) ---
   Same card language as .auth-card above. templates/500.html deliberately
   inlines an equivalent of this block: it must render with zero static-file
   dependencies (the broken thing might be static serving itself), so keep the
   two visually in sync by hand. */
.error-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: calc(100vh - 64px);
  padding: clamp(2rem, 6vw, 4.5rem) 1rem;
  background: var(--fightdeck-surface);
}

.error-card {
  width: 100%;
  max-width: 480px;
  padding: clamp(1.75rem, 5vw, 2.5rem);
  background: #fff;
  border: 1px solid var(--fightdeck-border);
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
}

.error-card__accent {
  display: block;
  width: 36px;
  height: 4px;
  margin-bottom: 1.25rem;
  background: var(--fightdeck-secondary);
  border-radius: 999px;
}

.error-card__code {
  margin: 0 0 0.4rem;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.error-card__title {
  margin: 0 0 0.6rem;
  color: var(--fightdeck-primary);
  font-size: clamp(1.4rem, 4vw, 1.75rem);
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.error-card__body {
  margin: 0 0 1.5rem;
  color: #64748b;
  font-size: 0.95rem;
  line-height: 1.55;
}

.error-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.error-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 1.1rem;
  font-size: 0.9rem;
  font-weight: 700;
  border-radius: 10px;
  text-decoration: none;
}

.error-btn--primary {
  color: #fff;
  background: var(--fightdeck-primary);
  border: 1px solid var(--fightdeck-primary);
}

.error-btn--primary:hover,
.error-btn--primary:focus {
  background: #1f2937;
}

.error-btn--ghost {
  color: var(--fightdeck-primary);
  background: #fff;
  border: 1px solid var(--fightdeck-border);
}

.error-btn--ghost:hover,
.error-btn--ghost:focus {
  border-color: var(--fightdeck-primary);
}
