/* ============================================================
   Pawtalk - sign in / sign up
   ============================================================
   A single centred card on a warm gradient. The panel beside the form
   carries the identity so the form itself can stay plain.
   ============================================================ */

.auth-page {
  position: relative;
  isolation: isolate;
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.25rem, 4vw, 4rem) 1.25rem;
  background:
    radial-gradient(1000px 680px at 6% -12%, rgba(229, 129, 58, 0.28), transparent 60%),
    radial-gradient(850px 600px at 100% 112%, rgba(201, 95, 36, 0.17), transparent 62%),
    linear-gradient(145deg, #110c0a 0%, #1a120e 48%, #100b09 100%);
  overflow: hidden;
}

.auth-page::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 0;
  opacity: 0.22;
  background-image:
    linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 50% 45%, #000 0, transparent 72%);
}

.auth-card {
  display: grid;
  grid-template-columns: minmax(310px, 0.82fr) minmax(400px, 1.18fr);
  width: 100%;
  max-width: 940px;
  min-height: 520px;
  background: rgba(24, 28, 34, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px) saturate(1.12);
  overflow: hidden;
}

/* ── Identity panel ───────────────────────────────────────── */

.auth-aside {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  padding: 2.6rem 2.25rem;
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 183, 126, 0.27), transparent 34%),
    linear-gradient(155deg, rgba(229, 129, 58, 0.25), rgba(201, 95, 36, 0.06) 58%, transparent),
    rgba(12, 14, 17, 0.88);
  border-right: 1px solid var(--line);
}

.auth-aside::before {
  content: '';
  position: absolute;
  z-index: -1;
  right: -6rem;
  bottom: -8rem;
  width: 22rem;
  height: 22rem;
  border: 1px solid rgba(255, 173, 112, 0.16);
  border-radius: 42% 58% 48% 52%;
  background: radial-gradient(circle at 38% 35%, rgba(229,129,58,0.17), transparent 58%);
  transform: rotate(-18deg);
}

.auth-aside::after {
  content: 'PAW  /  FOXFIRE';
  position: absolute;
  left: 2.25rem;
  bottom: 2rem;
  color: var(--fg-dim);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Three stacked bars that step outward - a spoken line trailing off.
   Drawn in CSS so there is no image to load or licence. */
.brand-mark {
  width: 42px;
  height: 42px;
  background: url('../img/mark.png') center / contain no-repeat;
  filter: drop-shadow(0 8px 16px rgba(201,95,36,0.28));
}
/* The three bars were the old drawn mark. Kept in the markup so no
   template has to change, but they no longer paint anything. */
.brand-mark i { display: none; }

.auth-tagline {
  max-width: 24ch;
  margin-top: 1rem;
  color: var(--fg-mid);
  font-size: 0.92rem;
}

.auth-points {
  margin: 2.35rem 0 4.5rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.85rem;
}
.auth-points li {
  display: flex;
  gap: 0.78rem;
  padding: 0.72rem 0.78rem;
  border: 1px solid rgba(255,226,204,0.075);
  border-radius: 13px;
  background: rgba(255,255,255,0.025);
  font-size: 0.87rem;
  color: var(--fg-mid);
  line-height: 1.45;
}
.auth-points b {
  display: block;
  color: var(--fg);
  font-size: 0.89rem;
}
.auth-points .dot {
  flex: none;
  width: 7px;
  height: 7px;
  margin-top: 0.4rem;
  border-radius: 50%;
  background: var(--accent);
}

/* ── Form side ────────────────────────────────────────────── */

.auth-main { display: flex; flex-direction: column; justify-content: center; padding: 3rem clamp(2rem, 5vw, 3.5rem); }

.auth-title {
  margin: 0 0 0.2rem;
  font-size: clamp(1.75rem, 3vw, 2.15rem);
  font-weight: 750;
  letter-spacing: -0.045em;
}
.auth-sub {
  margin: 0 0 1.5rem;
  color: var(--fg-dim);
  font-size: 0.9rem;
}

.auth-alt {
  margin-top: 1.35rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  font-size: 0.87rem;
  color: var(--fg-dim);
}

/* The handle field shows its @ inside the box so the value lines up with
   how the name is written everywhere else on the site. */
.prefixed { position: relative; }
.prefixed .at {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--fg-dim);
  font-size: 0.94rem;
  pointer-events: none;
}
.prefixed .input { padding-left: 1.65rem; }

@media (max-width: 720px) {
  .auth-card { grid-template-columns: 1fr; max-width: 420px; }
  .auth-card { min-height: 0; border-radius: 22px; }
  .auth-aside {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 1.5rem;
  }
  .auth-aside::after { display: none; }
  .auth-points { display: none; }
  .auth-main { padding: 1.5rem; }
}

/* Two-step verification */
.mfa-card { max-width: 920px; }
.mfa-steps { list-style: none; margin: 1.5rem 0; padding: 0; display: grid; gap: 1rem; counter-reset: mfa; }
.mfa-steps li { position: relative; padding-left: 2.4rem; counter-increment: mfa; opacity: 0.55; }
.mfa-steps li::before { content: counter(mfa); position: absolute; left: 0; top: 0; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: grid; place-items: center; border: 1px solid currentColor; font-size: 0.8rem; font-weight: 800; }
.mfa-steps li.is-now { opacity: 1; }
.mfa-steps li.is-now::before { background: var(--accent); border-color: var(--accent); color: #fff; }
.mfa-steps li.is-done { opacity: 0.9; }
.mfa-steps li.is-done:not(.is-now)::before { content: '✓'; background: color-mix(in srgb, var(--ok, #3ba55d) 25%, transparent); border-color: var(--ok, #3ba55d); color: var(--ok, #3ba55d); }
.mfa-steps b { display: block; }
.mfa-steps span { font-size: 0.85rem; opacity: 0.8; }
.mfa-status { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.75rem; border-radius: 999px; background: rgba(255,255,255,0.06); font-size: 0.82rem; font-weight: 700; }
.mfa-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--fg-dim, #888); }
.mfa-status.is-on i { background: var(--ok, #3ba55d); }
.mfa-qr-wrap { display: grid; justify-items: center; gap: 0.8rem; margin: 0.5rem 0 1.2rem; }
.mfa-qr { width: 220px; height: 220px; padding: 10px; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.mfa-qr svg { width: 100%; height: 100%; display: block; }
.mfa-manual { width: 100%; text-align: center; font-size: 0.88rem; }
.mfa-manual summary { cursor: pointer; color: var(--accent-soft, var(--accent)); }
.mfa-manual p { margin: 0.5rem 0; opacity: 0.8; }
.mfa-key { display: block; margin: 0 auto 0.6rem; padding: 0.6rem 0.8rem; border-radius: 10px; background: rgba(255,255,255,0.06); font-size: 1rem; letter-spacing: 0.08em; word-break: break-all; }
.mfa-code-input { font-size: 1.3rem; letter-spacing: 0.2em; text-align: center; font-variant-numeric: tabular-nums; }
.mfa-row { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-top: 0.6rem; }
.mfa-codes { display: grid; grid-template-columns: 1fr; gap: 0.35rem; margin: 1rem 0; }
.mfa-codes code { padding: 0.4rem 0.5rem; border-radius: 8px; background: rgba(255,255,255,0.06); text-align: center; font-size: 0.8rem; letter-spacing: 0.03em; word-break: break-all; }
.mfa-back { margin-top: 1.5rem; font-size: 0.88rem; }

/* Register: Move from Discord (left panel) */
.move-side { display: grid; gap: 0.35rem; margin-top: 1.4rem; padding: 1rem 1.1rem; border-radius: 14px; border: 1px solid rgba(88,101,242,0.45); background: rgba(88,101,242,0.12); }
.move-side b { font-size: 0.95rem; }
.move-side span { font-size: 0.85rem; opacity: 0.85; }
.move-side .move-discord { justify-self: start; margin-top: 0.4rem; }
.move-discord { background: #5865f2; border-color: #5865f2; color: #fff; }
.move-discord:hover { background: #4752c4; border-color: #4752c4; color: #fff; }

/* QR login on the sign-in page: centred in the side panel */
.qr-side { display: grid; justify-items: center; gap: 0.7rem; margin: auto 0; padding: 1.2rem 1rem; text-align: center; }
.qr-side > b { font-size: 1.05rem; }
.qr-side > span { max-width: 250px; font-size: 0.82rem; opacity: 0.8; }
.qr-side > span b { font-size: inherit; }
.qr-login { position: relative; width: 190px; height: 190px; padding: 8px; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.35); }
.qr-login svg { width: 100%; height: 100%; display: block; }
.qr-login.is-dim svg { opacity: 0.12; }
.qr-login-state { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; text-align: center; color: #111; font-size: 0.85rem; font-weight: 600; }
.qr-login-state button { font: inherit; color: #5865f2; background: none; border: 0; cursor: pointer; text-decoration: underline; }
/* Dead centre of the side panel on wide screens */
@media (min-width: 721px) {
  .qr-side { position: absolute; top: 50%; left: 50%; width: max-content; margin: 0; transform: translate(-50%, -50%); }
}

/* Add-friend link page */
.add-friend-card { max-width: 420px; grid-template-columns: 1fr; }
.add-friend-who { display: grid; justify-items: center; text-align: center; margin-bottom: 1.2rem; }
.add-friend-who .auth-title { margin-bottom: 0.2rem; }
.add-friend-avatar { display: grid; place-items: center; width: 88px; height: 88px; margin-bottom: 0.9rem; border-radius: 50%; overflow: hidden; color: #fff; font-size: 2rem; font-weight: 700; }
.add-friend-avatar img { width: 100%; height: 100%; object-fit: cover; }
