/* ============================================================
   AUTH — sign in / forgot password
   A centred "index card" on the paper canvas, with a red spine.
   ============================================================ */

.auth-container {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(28px, 6vw, 72px) var(--gutter);
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 430px;
  padding: clamp(30px, 5vw, 48px);
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: auth-in .6s var(--ease) both;
}
/* Red spine — the "print mark" of the card */
.auth-card::before {
  content: "";
  position: absolute;
  left: 0; top: 26px; bottom: 26px;
  width: 3px;
  background: var(--red);
  border-radius: 0 3px 3px 0;
}
@keyframes auth-in { from { opacity: 0; transform: translateY(16px); } }

/* ── Header ───────────────────────────────────────────────── */
.auth-header { text-align: left; margin-bottom: 30px; }

.auth-logo {
  height: 40px;
  width: auto;
  margin-bottom: 24px;
}
body.theme-dark .auth-logo { filter: brightness(0) invert(1); }

.auth-header h1 {
  margin: 0 0 6px;
  font-size: clamp(1.7rem, 4vw, 2.3rem);
  letter-spacing: -0.02em;
}
.auth-header p {
  margin: 0;
  font-size: .94rem;
  color: var(--ink-muted);
}

/* ── Form ─────────────────────────────────────────────────── */
.auth-form { display: grid; gap: 20px; }

.form-field { display: grid; }

.label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.label-row label { margin-bottom: 8px; }

.forgot-link {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  border-bottom: 1px solid transparent;
  transition: border-color .25s var(--ease);
}
.forgot-link:hover { border-bottom-color: var(--red); }

.auth-btn {
  width: 100%;
  margin-top: 4px;
  padding: 15px 24px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 100px;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), transform .3s var(--ease);
}
.auth-btn:hover { background: var(--red); border-color: var(--red); color: #fff; transform: translateY(-2px); }
.auth-btn:active { transform: translateY(0); }
.auth-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ── Divider ──────────────────────────────────────────────── */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 26px 0 20px;
  color: var(--ink-muted);
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}
.auth-divider span {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
}

/* ── Google ───────────────────────────────────────────────── */
.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 11px;
  width: 100%;
  padding: 14px 24px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 100px;
  cursor: pointer;
  transition: border-color .3s var(--ease), background .3s var(--ease), transform .3s var(--ease);
}
.google-btn:hover { border-color: var(--ink); background: var(--paper-sunk); transform: translateY(-2px); }
.google-icon { width: 17px; height: 17px; }

/* ── Footer ───────────────────────────────────────────────── */
.auth-footer {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: .9rem;
  color: var(--ink-muted);
  text-align: center;
}
.auth-footer a {
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--red);
  transition: color .25s var(--ease);
}
.auth-footer a:hover { color: var(--red); }

/* ============================================================
   FORGOT PASSWORD — 3-step card (fp-* classes)
   ============================================================ */
.fp-card {
  position: relative;
  width: min(100% - 2rem, 430px);
  margin: clamp(40px, 10vh, 90px) auto;
  padding: clamp(30px, 5vw, 46px);
  background: var(--paper-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: auth-in .6s var(--ease) both;
}
.fp-card::before {
  content: "";
  position: absolute;
  left: 0; top: 26px; bottom: 26px;
  width: 3px;
  background: var(--red);
  border-radius: 0 3px 3px 0;
}

/* Only the active step is shown */
.fp-card .step { display: none; }
.fp-card .step.active { display: grid; gap: 18px; }

.fp-title {
  margin: 0;
  font-size: clamp(1.6rem, 4vw, 2.15rem);
  letter-spacing: -0.02em;
}
.fp-sub {
  margin: -10px 0 0;
  font-size: .94rem;
  color: var(--ink-muted);
}

.fp-field { display: grid; }

.fp-btn {
  width: 100%;
  padding: 15px 24px;
  font-family: var(--font-body);
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 100px;
  cursor: pointer;
  transition: background .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), transform .3s var(--ease);
}
.fp-btn:hover { background: var(--red); border-color: var(--red); color: #fff; transform: translateY(-2px); }
.fp-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.fp-back {
  justify-self: center;
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  transition: color .25s var(--ease);
}
.fp-back:hover { color: var(--red); }

.fp-error {
  margin: 0;
  min-height: 1.2em;
  font-size: .84rem;
  color: var(--red);
}

/* OTP entry reads better as spaced characters */
#fpOtp {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 1.3rem;
  letter-spacing: .4em;
  text-align: center;
}
