/* ═══════════════════════════════════════════════════════════════
   HARAZI — auth pages
   Dark-theme signup/login card. Matches the rest of the site's
   vibe via the existing tokens.css variables where possible; fall-
   back values are inlined so the page renders cleanly even if
   tokens.css fails to load.
   ═══════════════════════════════════════════════════════════════ */

.auth-body {
  background: var(--bg, #07090d);
  min-height: 100vh;
  min-height: 100dvh;   /* iOS: exclude the dynamic address bar */
  margin: 0;
  color: var(--fg, #e8ecf3);
  font-family: var(--ff-sans, Inter, system-ui, sans-serif);
}

.auth-shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  position: relative;
}

/* "← Back to home" link — pinned to top-left so the user is never
   stuck on an auth page with no way to see the landing. */
.auth-back {
  position: absolute;
  top: 20px; left: 20px;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  color: var(--fg-2, #97a0ad);
  text-decoration: none;
  font-size: 13px; font-weight: 500;
  border: 1px solid var(--line, #1f2533);
  border-radius: 999px;
  background: rgba(12, 16, 24, 0.5);
  backdrop-filter: blur(6px);
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.auth-back:hover {
  color: #4d8eff;
  border-color: rgba(77, 142, 255, 0.4);
  background: rgba(77, 142, 255, 0.08);
}

/* ── Brand ───────────────────────────────────────────────── */
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 4px;          /* tight — the 3D-H is the first letter of HARAZI */
  margin-bottom: 32px;
  text-decoration: none;
  color: inherit;
  font-weight: 700;
  letter-spacing: 0.5px;
}
/* Old yellow lightning bolt — kept for legacy auth pages that still
   use the markup. New pages use .auth-brand__logo (SVG). */
.auth-brand__bolt  { font-size: 22px; color: #ffd447; }
/* 3D Harazi mark on auth pages (login, signup, verify, …). Sized to
   match the wordmark cap height + a subtle hover tilt to match the
   topbar feel. */
.auth-brand__logo {
  width: 28px;
  height: 28px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  transition: transform 220ms cubic-bezier(.2,.8,.3,1), filter 220ms ease;
}
.auth-brand:hover .auth-brand__logo {
  transform: rotate(-3deg) translateY(-1px) scale(1.06);
  filter: drop-shadow(0 4px 7px rgba(77, 142, 255, 0.55));
}
.auth-brand__title {
  font-size: 18px;
  color: #cfddff;
  letter-spacing: -0.02em;
  text-shadow:
    1px 1px 0 #2c5eb8,
    2px 2px 0 #1d57c8,
    3px 3px 0 #0f2c70,
    4px 5px 6px rgba(0, 0, 0, 0.45);
}
.auth-brand__sub   {
  color: #4d8eff;
  margin-left: 2px;
  text-shadow:
    1px 1px 0 #1d57c8,
    2px 2px 0 #0f2c70,
    3px 4px 5px rgba(0, 0, 0, 0.45);
}

/* ── Card ────────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 480px;
  background: var(--bg-1, #0b0e14);
  border: 1px solid var(--line, #1f2533);
  border-radius: 12px;
  padding: 30px 30px 24px;
  box-shadow: 0 2px 24px rgba(0,0,0,0.4);
}
.auth-card--error { text-align: center; }
.auth-error-code {
  font-family: var(--ff-mono, "JetBrains Mono", monospace);
  font-size: 56px;
  line-height: 1;
  color: #4d8eff;
  font-weight: 700;
  margin-bottom: 16px;
}

.auth-title {
  font-size: 21px;
  margin: 0 0 4px;
  font-weight: 600;
  color: var(--fg, #e8ecf3);
}
.auth-subtitle {
  margin: 0 0 18px;
  color: var(--fg-2, #97a0ad);
  font-size: 13px;
  line-height: 1.5;
}
.auth-subtitle .mono {
  font-family: var(--ff-mono, "JetBrains Mono", monospace);
  color: var(--fg, #e8ecf3);
}

/* ── Form ────────────────────────────────────────────────── */
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-field { display: flex; flex-direction: column; gap: 5px; }
.auth-field label {
  /* a11y: was 11px/500 in muted --fg-2 — read as decoration near the
     contrast floor. Larger + heavier + lighter = unambiguous field labels. */
  color: var(--fg, #d7dde8);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.auth-input {
  background: var(--bg-2, #131824);
  border: 1px solid var(--line, #1f2533);
  color: var(--fg, #e8ecf3);
  border-radius: 7px;
  padding: 10px 13px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.12s;
}
.auth-input:focus       { border-color: #4d8eff; }
.auth-input::placeholder { color: var(--fg-3, #5b6573); }
/* Suppress Safari / Chrome autofill yellow tint — keeps FIRST NAME and
   LAST NAME (and any other autofilled pair) looking identical even when
   only one has been autofilled. */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus,
.auth-input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 1000px #131824 inset !important;
  -webkit-text-fill-color: #e8ecf3 !important;
  caret-color: #e8ecf3 !important;
  transition: background-color 5000s ease-in-out 0s;
}
.auth-input--mono       { font-family: var(--ff-mono, "JetBrains Mono", monospace);
                          letter-spacing: 1px; text-transform: uppercase; }
.auth-input--code       { font-family: var(--ff-mono, "JetBrains Mono", monospace);
                          text-align: center; font-size: 28px; letter-spacing: 8px;
                          padding: 14px; }

.auth-hint  { color: var(--fg-3, #5b6573); font-size: 11px; }
.auth-error {
  color: #ff5470;
  font-size: 11px;
  padding: 3px 0 0 2px;
}

.auth-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--fg-2, #97a0ad);
  font-size: 13px;
  cursor: pointer;
}

/* ── Submit ──────────────────────────────────────────────── */
.auth-submit {
  background: #4d8eff;
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  margin-top: 6px;
  transition: background 0.12s, transform 0.05s;
}
.auth-submit:hover    { background: #5b9dff; }
.auth-submit:active   { transform: translateY(1px); }
.auth-submit:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── Footer links ────────────────────────────────────────── */
.auth-alt {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line, #1f2533);
  text-align: center;
  font-size: 12px;
  color: var(--fg-2, #97a0ad);
}
.auth-alt a          { color: #4d8eff; text-decoration: none; }
.auth-alt a:hover    { text-decoration: underline; }
.auth-alt__sep       { margin: 0 8px; color: var(--fg-3, #5b6573); }

.auth-resend-form    { margin-top: 14px; text-align: center; }
.auth-linkbtn {
  background: none;
  border: none;
  color: #4d8eff;
  cursor: pointer;
  font-size: 13px;
  font-family: inherit;
  padding: 6px 0;
}
.auth-linkbtn:hover  { text-decoration: underline; }

.auth-footer {
  margin-top: 32px;
  font-size: 12px;
  color: var(--fg-3, #5b6573);
}

/* ── Flash messages ──────────────────────────────────────── */
.auth-flash {
  width: 100%;
  max-width: 420px;
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.auth-flash__item {
  padding: 10px 14px;
  border-radius: 7px;
  font-size: 13px;
  border: 1px solid transparent;
}
.auth-flash--success { background: rgba(62,213,152,0.08); border-color: rgba(62,213,152,0.35); color: #3ed598; }
.auth-flash--error   { background: rgba(255,84,112,0.08); border-color: rgba(255,84,112,0.35); color: #ff5470; }
.auth-flash--warn    { background: rgba(255,181,71,0.08); border-color: rgba(255,181,71,0.35); color: #ffb547; }
.auth-flash--info    { background: rgba(77,142,255,0.08); border-color: rgba(77,142,255,0.35); color: #4d8eff; }
.auth-flash--message { background: rgba(77,142,255,0.08); border-color: rgba(77,142,255,0.35); color: #4d8eff; }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; }
  .auth-row  { grid-template-columns: 1fr; }
  .auth-error-code { font-size: 42px; }
}
