/* =====================================================================
   auth.css — centered card pages: sign-up, confirm, password reset,
   onboarding, support/contact. Load styles.css first (for nav/footer/tokens).
   ===================================================================== */

:root {
  --border: #e8edf6;
  --blue-soft: rgba(59,130,246,0.10);
  --green: #00915c;              /* reference "instant" green family */
  --green-soft: #e6faf3;         /* = --success-bg on the public sign-up form */
  --amber: #b45309;              /* warmed to match app tier-bronze */
  --amber-soft: #fdf3e4;
  --red: #ef4444;                /* = --error on public forms */
  --red-soft: #fef2f2;           /* = --error-bg */
}

.auth-wrap {
  min-height: calc(100vh - 73px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 56px 24px;
}

.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 60px rgba(2,12,69,0.12); /* same elevation as the login/sign-up shells */
  padding: 36px 34px;
}
.auth-card.wide { max-width: 620px; }

/* Default link colour inside the card (bare <a> in copy otherwise renders UA blue) */
.auth-card a:not([class]) { color: var(--blue); text-decoration: none; font-weight: 500; }
.auth-card a:not([class]):hover { text-decoration: underline; }

.auth-icon {
  width: 54px; height: 54px; border-radius: 14px;
  background: var(--blue-soft); color: var(--blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.auth-icon.green { background: var(--green-soft); color: var(--green); }
.auth-icon.amber { background: var(--amber-soft); color: var(--amber); }
.auth-icon.red   { background: var(--red-soft);   color: var(--red); }

.auth-title {
  font-family: 'Sora', sans-serif;
  font-size: 1.5rem; font-weight: 700; color: var(--ink);
  letter-spacing: -0.02em; margin-bottom: 8px;
}
.auth-sub { font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 24px; }

/* Form primitives (self-contained so only styles.css + auth.css are needed) */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field > label { font-size: 0.85rem; font-weight: 600; color: var(--ink); }
.field .req { color: var(--red); }
.field input, .field select, .field textarea {
  font-family: 'DM Sans', sans-serif; font-size: 0.95rem; color: var(--text);
  padding: 12px 14px; border: 1.5px solid var(--gray-mid);
  border-radius: var(--radius); background: var(--white); width: 100%;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(80,162,255,0.15);
}
.field-hint { font-size: 0.78rem; color: var(--text-muted); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.btn-block {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--blue); color: #ffffff;
  border: none; border-radius: var(--radius);
  font-family: 'DM Sans', sans-serif; font-size: 0.98rem; font-weight: 700;
  padding: 13px 18px; cursor: pointer; text-decoration: none;
  transition: background 0.2s, transform 0.12s, box-shadow 0.2s;
}
.btn-block:hover { background: var(--blue-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(80,162,255,0.3); text-decoration: none; }
.btn-block.secondary { background: var(--white); color: var(--ink); border: 1.5px solid var(--gray-mid); }
.btn-block.secondary:hover { border-color: var(--blue); color: var(--blue); background: none; box-shadow: none; }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--text); margin-bottom: 18px; line-height: 1.5; }
.checkbox-row input { margin-top: 3px; }
.checkbox-row a { color: var(--blue); }

.chip-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-grid label {
  font-size: 0.85rem; padding: 8px 14px;
  border: 1.5px solid var(--gray-mid); border-radius: 50px;
  cursor: pointer; color: var(--text-muted); transition: all 0.15s; user-select: none;
}
.chip-grid input { display: none; }
.chip-grid label:hover { border-color: var(--blue); color: var(--blue); }
.chip-grid label:has(input:checked) { border-color: var(--blue); color: var(--blue); background: var(--blue-soft); }

.auth-alt { text-align: center; font-size: 0.9rem; color: var(--text-muted); margin-top: 22px; }
.auth-alt a { color: var(--blue); text-decoration: none; font-weight: 500; }
.auth-alt a:hover { text-decoration: underline; }

.auth-note {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--blue-soft); color: var(--blue-dark);
  border-radius: var(--radius); padding: 12px 14px;
  font-size: 0.85rem; line-height: 1.5; margin-bottom: 20px;
}
.auth-note svg { flex-shrink: 0; margin-top: 1px; }

/* ── QA dark-mode accessibility fixes (auth pages also load styles.css → nav handled there) ── */
body.dark .field > label { color: #dbe4f8; }
body.dark .auth-note { color: #cfe0ff; }
body.dark .btn-block.secondary { background: transparent; color: #dbe4f8; border-color: #34426e; }

/* Captcha placeholder box (Turnstile mounts here later) */
.captcha-box {
  height: 66px; border: 1.5px dashed var(--gray-mid); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 0.82rem; margin-bottom: 18px;
}

/* Avatar upload (onboarding) */
.avatar-upload { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.avatar-drop {
  width: 76px; height: 76px; border-radius: 50%;
  border: 1.5px dashed var(--gray-mid); background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); flex-shrink: 0;
}

/* Success / status states */
.status-block { text-align: center; }
.status-block .auth-icon { margin: 0 auto 18px; }

@media (max-width: 520px) {
  .auth-card { padding: 28px 22px; }
  .form-row { grid-template-columns: 1fr; }
}
