/* auth.css — shared styles for /login, /reset-password, /invite, /2fa-setup.
 *
 * Sprint 5 Phase B4 — auth pages aligned with counselor PWA design system.
 *
 * Auth templates are standalone (no base.html). They define tokens here in
 * the counselor convention: default dark, opt-in light via `body.light`
 * (matches counselor-app.css convention so the toggle works the same way
 * on the public auth screens).
 *
 * Token philosophy mirrors design-tokens.css. Components consume var(--*).
 * Page-specific styles live below the tokens block.
 */

/* ─── Reset ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ─── Tokens — default (dark) ───────────────────────────────────────── */
:root {
  /* Type scale (subset — auth pages don't need the full 6-step palette) */
  --fs-micro:   11px;
  --fs-caption: 12px;
  --fs-body:    13px;
  --fs-primary: 14px;
  --fs-title:   18px;
  --fs-kpi:     24px;

  --fw-normal: 500;
  --fw-medium: 600;
  --fw-bold:   700;
  --fw-black:  800;
  --ls-label:  0.065em;

  /* Surfaces */
  --bg:        #0b0f1a;
  --surface:   #111827;
  --surface2:  #1a2236;
  --border:    #1f2d45;
  --text:      #e2e8f0;
  --muted:     #94a3b8;

  /* Brand & semantic — same indigo as counselor PWA */
  --accent:      #6366f1;
  --accent-dim:  rgba(99,102,241,0.15);
  --accent-strong: #4f52d3;
  --accent-deep:   #4338ca;
  --accent-text:   #818cf8;
  --green:       #10b981;
  --green-dim:   rgba(16,185,129,0.12);
  --yellow:      #f59e0b;
  --yellow-dim:  rgba(245,158,11,0.12);
  --red:         #ef4444;
  --red-dim:     rgba(239,68,68,0.12);

  /* Forms */
  --input-bg:    #0e1420;

  /* Elevation */
  --shadow:      0 4px 24px rgba(0,0,0,0.35);
  --shadow-lg:   0 24px 64px rgba(0,0,0,0.30);

  /* Radii */
  --radius-sm:   6px;
  --radius:      10px;
  --radius-md:   12px;
  --radius-lg:   14px;
  --radius-xl:   16px;
}

/* ─── Tokens — light (opt-in via body.light, matches counselor PWA) ─── */
body.light {
  --bg:        #f8f9fb;
  --surface:   #ffffff;
  --surface2:  #f8fafc;
  --border:    #e2e8f0;
  --text:      #0f1424;
  --muted:     #5f6672;
  --accent-dim: rgba(99,102,241,0.10);
  --accent-text: #4338ca;
  --green-dim:  rgba(16,185,129,0.10);
  --yellow-dim: rgba(245,158,11,0.10);
  --red-dim:    rgba(239,68,68,0.10);
  --input-bg:  #f1f5f9;
  --shadow:    0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.10);
}

/* ─── Body baseline ─────────────────────────────────────────────────── */
/* Sprint 5 polish (2026-05-10): фиксируем форму логина — нет «гуляния»
   при touch-drag/overscroll/rubber-band. */
/* Документ не прокручивается: прокрутку забирает .auth-shell. Иначе Safari тянет весь
   документ и возвращает назад — страницу «можно двигать пальцем» по вертикали
   (замечание владельца 12.09.2026); overscroll-behavior отскок документа не отменяет. */
html { overscroll-behavior: none; height: 100dvh; overflow: hidden; }
body {
  font-family: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: var(--fs-primary);
  background: var(--bg);
  color: var(--text);
  /* ⚠ 100dvh, а не 100vh: в Safari на телефоне 100vh — высота БЕЗ свёрнутой адресной
     строки, страница выходит выше видимой области и её можно таскать пальцем
     (замечание владельца 11.09.2026). 100vh строкой выше — запас для старых браузеров. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background .2s, color .2s;
  overscroll-behavior: none;
  height: 100dvh;
  overflow: hidden;
}

/* ─── Theme toggle ──────────────────────────────────────────────────── */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--text);
  z-index: 10;
  transition: border-color .15s, color .15s;
}
.theme-toggle:hover { border-color: var(--accent); }

/* ─── Page wrap (centered column) ───────────────────────────────────── */
.auth-wrap {
  width: 100%;
  max-width: 420px;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}
.auth-wrap--wide { max-width: 460px; padding: 24px; }

/* ─── Две панели (решение владельца 11.09.2026): слева бренд и одно предложение о системе,
   справа форма. На телефоне панель скрыта, над формой стоит крупная связка (вариант А). ─── */
.auth-shell { width: 100%; height: 100dvh; overflow-y: auto; overflow-x: hidden;
  overscroll-behavior: contain; touch-action: pan-y; -webkit-overflow-scrolling: touch;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.auth-pane { background: var(--accent-dim); border-right: 1px solid var(--border); display: flex; align-items: center; padding: 48px 8vw; }
.auth-pane-inner { display: grid; gap: 22px; max-width: 520px; }
.auth-pane-brand { display: inline-flex; align-items: center; gap: 16px; }
.auth-pane-brand img { width: 64px; height: 64px; display: block; flex-shrink: 0; }
.auth-pane-brand b { font-size: 48px; font-weight: var(--fw-bold); letter-spacing: -.03em; line-height: 1; }
.auth-pane-title { margin: 0; font-size: 22px; font-weight: var(--fw-medium); line-height: 1.3; letter-spacing: -.01em; }
.auth-pane-text { margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted); max-width: 38ch; }
.auth-pane-note { margin: 0; font-size: 13px; color: var(--muted); }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-main .auth-logo { display: none; }
/* ─── Brand lockup ──────────────────────────────────────────────────── */
/* Логотип приложения: плитка комплекта (белый знак на индиго, скругление 22 %) 40 px
   + надпись «Контур ДОЛ» 30 px Manrope 700 цветом текста, по центру (решение владельца 11.09.2026;
   знак-контур с надписью остаётся на сайте и в письмах) */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  justify-content: center;
  margin-bottom: 28px;  /* подпись «Система управления детскими лагерями» живёт в карточке (решение владельца 11.09) */
}
.auth-logo-mark { width: 40px; height: 40px; display: block; flex-shrink: 0; }
.auth-logo-text {
  font-size: 30px;
  font-weight: var(--fw-bold);
  letter-spacing: -.03em;
  line-height: 1;
}

/* Телефон: панель скрыта, над формой связка 56 / 42 (решение владельца 11.09.2026).
   ⚠ Блок стоит ПОСЛЕ базовых правил связки — иначе базовые 40 / 30 его перекрывают. */
@media (max-width: 720px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); min-height: auto; }
  .auth-pane { display: none; }
  .auth-main { padding: 48px 0 32px; }
  .auth-main .auth-logo { display: flex; gap: 14px; margin-bottom: 32px; }
  .auth-logo-mark { width: 56px; height: 56px; }
  .auth-logo-text { font-size: 42px; }
}

/* Узкий телефон (< 360 px: iPhone SE первого поколения, редкие Android): связке 56 / 42 нужно ~307 px,
   а при полях 20 px она встаёт в строку только с 348 px — ниже надпись переносится. Здесь 48 / 36, та же
   пропорция 0,75, зазор 0,2475 плитки (решение владельца 12.09.2026). 360 px сохраняет 56 / 42. */
@media (max-width: 359px) {
  .auth-main .auth-logo { gap: 12px; }
  .auth-logo-mark { width: 48px; height: 48px; }
  .auth-logo-text { font-size: 36px; }
}

/* ─── Auth card (glass-card aesthetic, sized for forms) ─────────────── */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.auth-card-icon {
  font-size: 36px;
  text-align: center;
  margin-bottom: 14px;
}
.auth-card-icon--lg { font-size: 40px; }
.auth-card-title {
  font-size: var(--fs-title);
  font-weight: var(--fw-bold);
  margin-bottom: 4px;
}
.auth-card-title--bold { font-weight: var(--fw-black); }
.auth-card-subtitle {
  font-size: var(--fs-caption);
  color: var(--muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

/* ─── Forms (input pattern shared across all auth pages) ────────────── */
.form-group { margin-bottom: 18px; }
.form-group--tight { margin-bottom: 16px; }

.form-label {
  display: block;
  font-size: var(--fs-caption);
  font-weight: var(--fw-medium);
  color: var(--muted);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

.form-input {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-size: var(--fs-primary);
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

/* ⚠ 16 px на телефоне — не косметика: при кегле меньше 16 мобильный браузер приближает
   страницу на фокусе поля, и карточка обрезается по краям (замечание владельца 12.09.2026).
   Ячейки кода 2FA (.otp-digit, 18 px) под правило не попадают. */
@media (max-width: 720px) {
  .form-input { font-size: 16px; }
}
.form-input::placeholder { color: var(--muted); }

.form-input-wrap { position: relative; }
.form-input-wrap .form-input { padding-right: 40px; }

.form-hint {
  font-size: var(--fs-micro);
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.4;
}
.form-hint--center { text-align: center; }

/* Show-password / eye toggle */
.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--muted);
  padding: 0;
  line-height: 1;
}
.eye-btn:hover { color: var(--text); }

/* Form row — checkbox + forgot link side by side */
.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.remember {
  display: flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}
.remember input[type=checkbox] {
  width: 15px;
  height: 15px;
  accent-color: var(--accent);
  cursor: pointer;
}
.remember span { font-size: var(--fs-caption); color: var(--muted); }
.forgot-link {
  font-size: var(--fs-caption);
  color: var(--accent);
  text-decoration: none;
}
.forgot-link:hover { text-decoration: underline; }

/* ─── Buttons (auth-page variants — sized for full-width primary CTA) ─ */
.btn-accent {
  width: 100%;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: 13px;
  font-size: var(--fs-primary);
  font-weight: var(--fw-bold);
  font-family: inherit;
  cursor: pointer;
  transition: filter .2s, transform .2s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn-accent:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(99,102,241,.35);
  color: #fff;
}
.btn-accent:active { opacity: .85; }

.btn-ghost {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius);
  padding: 11px;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  font-family: inherit;
  cursor: pointer;
  margin-top: 10px;
  transition: border-color .15s, color .15s;
  text-decoration: none;
  text-align: center;
  display: block;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Danger-tinted ghost button (e.g. "Выйти из системы") */
.btn-danger-ghost {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--radius);
  padding: 11px;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  font-family: inherit;
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-danger-ghost:hover { border-color: var(--red); color: var(--red); }

/* Mattermost SSO button — distinct brand colour, opt-in only */
.btn-mm-sso {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px;
  background: #1d6baa;
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: var(--fs-primary);
  font-weight: var(--fw-bold);
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: opacity .15s;
}
.btn-mm-sso:hover { opacity: .88; color: #fff; }

/* "or" divider between primary CTA and SSO */
.divider-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--muted);
  font-size: var(--fs-caption);
}
.divider-or::before,
.divider-or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ─── Alerts (inline, auth-form-sized) ──────────────────────────────── */
.auth-alert {
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: var(--fs-caption);
  margin-bottom: 16px;
  display: none;
  align-items: center;
  gap: 8px;
  line-height: 1.45;
}
.auth-alert.show { display: flex; }
.auth-alert-error {
  background: var(--red-dim);
  border: 1px solid rgba(239,68,68,.30);
  color: var(--red);
}

/* ─── Page footer (small caption under card) ────────────────────────── */
.auth-footer {
  text-align: center;
  margin-top: 28px;
  font-size: var(--fs-micro);
  color: var(--muted);
}
.auth-footer a {
  color: var(--accent-text);
  text-decoration: none;
}
.auth-footer a:hover { text-decoration: underline; }

/* ─── Multi-screen wizards (login → mfa, reset, invite, 2fa-setup) ─── */
.auth-screen { display: none; }
.auth-screen.active { display: block; }

/* ─── MFA / OTP digit grid ──────────────────────────────────────────── */
.otp-label {
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-bottom: 10px;
}
.otp-wrap {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-bottom: 8px;
}
.otp-digit {
  width: 44px;
  height: 52px;
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 20px;
  font-weight: var(--fw-black);
  font-family: 'JetBrains Mono', monospace;
  color: var(--text);
  text-align: center;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.otp-digit:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.otp-digit.filled { border-color: var(--accent); }
.otp-digit.error {
  border-color: var(--red);
  background: rgba(239,68,68,.05);
  animation: auth-shake .3s;
}
.otp-hint {
  font-size: var(--fs-micro);
  color: var(--muted);
  text-align: center;
  margin-bottom: 20px;
}
@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  25%      { transform: translateX(-4px); }
  75%      { transform: translateX(4px); }
}

/* Single-input MFA code variant (used on /login MFA screen) */
.otp-single {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  letter-spacing: .2em;
  text-align: center;
}

/* ─── Method-choice cards (TOTP vs Email) ──────────────────────────── */
.method-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.method-card {
  background: var(--surface2);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.method-card:hover { border-color: var(--accent); }
.method-card.selected {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.method-icon { font-size: 26px; flex-shrink: 0; }
.method-title {
  font-size: var(--fs-primary);
  font-weight: var(--fw-bold);
  margin-bottom: 3px;
}
.method-desc {
  font-size: var(--fs-micro);
  color: var(--muted);
  line-height: 1.5;
}
.method-rec {
  display: inline-block;
  font-size: 9px;
  font-weight: var(--fw-bold);
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(16,185,129,.30);
  border-radius: var(--radius-sm);
  padding: 1px 6px;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ─── QR block (TOTP enrolment) ─────────────────────────────────────── */
.qr-block {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 20px;
  text-align: center;
}
.qr-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}
.qr-code {
  width: 220px;
  height: 220px;
  background: #fff;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.qr-code img { width: 100%; height: 100%; border-radius: 8px; }
.qr-loading { color: #666; font-size: 13px; }
/* Smaller QR cell used by /invite (160px container, 140px svg inside) */
.qr-code--md { width: 160px; height: 160px; margin: 0 auto; }
.qr-code--md img { width: 160px; height: 160px; }
.qr-secret {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--fs-micro);
  color: var(--muted);
  margin-bottom: 8px;
  word-break: break-all;
  line-height: 1.6;
}
.qr-secret strong { color: var(--text); }
.copy-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  font-size: 10px;
  font-weight: var(--fw-bold);
  color: var(--muted);
  cursor: pointer;
  font-family: inherit;
  transition: border-color .15s, color .15s;
}
.copy-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── Email-OTP notice block ────────────────────────────────────────── */
.email-notice {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  margin-bottom: 24px;
  text-align: center;
}
.email-notice-ico { font-size: 40px; margin-bottom: 12px; }
.email-notice-label { font-size: var(--fs-caption); color: var(--muted); }
.email-notice-addr {
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--fs-body);
  font-weight: var(--fw-bold);
  color: var(--accent);
  background: var(--accent-dim);
  padding: 6px 14px;
  border-radius: var(--radius);
  display: block;
  width: fit-content;
  margin: 10px auto;
  text-align: center;
}
.email-notice-sub {
  font-size: var(--fs-caption);
  color: var(--muted);
  line-height: 1.6;
}

/* ─── Backup codes ──────────────────────────────────────────────────── */
.backup-notice {
  background: var(--yellow-dim);
  border: 1px solid rgba(245,158,11,.30);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: var(--fs-caption);
  line-height: 1.6;
  color: var(--text);
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 20px;
}
.backup-notice-ico { font-size: 16px; flex-shrink: 0; }
.backup-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 16px;
}
.backup-code {
  background: var(--input-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-size: var(--fs-body);
  font-weight: var(--fw-medium);
  text-align: center;
  letter-spacing: .08em;
  color: var(--text);
}
.backup-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.backup-btn {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: border-color .15s, color .15s;
}
.backup-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ─── 2FA / invite success screens ──────────────────────────────────── */
.success-ico {
  font-size: 52px;
  text-align: center;
  margin-bottom: 14px;
}
.success-title {
  font-size: 20px;
  font-weight: var(--fw-black);
  text-align: center;
  margin-bottom: 8px;
}
.success-sub {
  font-size: var(--fs-body);
  color: var(--muted);
  text-align: center;
  line-height: 1.6;
  margin-bottom: 24px;
}
.success-details {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.success-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-caption);
}
.success-row-ico { font-size: 14px; flex-shrink: 0; }
.success-row-label { color: var(--muted); flex: 1; }
.success-row-val {
  font-weight: var(--fw-bold);
  color: var(--green);
}
.success-row-val--text {
  color: var(--text);
  font-weight: var(--fw-medium);
}

/* ─── Section divider (use components.css `.section-divider` first) ── */
/* No additional rules needed — components.css ships .section-divider. */

/* ─── Counselor-without-squad screen (login.html) ───────────────────── */
.counselor-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 2px solid rgba(99,102,241,.30);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 16px;
}
.counselor-greeting {
  font-size: var(--fs-title);
  font-weight: var(--fw-bold);
  text-align: center;
  margin-bottom: 6px;
}
.role-badge {
  display: inline-flex;
  align-items: center;
  background: var(--accent-dim);
  border: 1px solid rgba(99,102,241,.25);
  border-radius: 20px;
  padding: 3px 10px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-medium);
  color: var(--accent);
  font-family: 'JetBrains Mono', monospace;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 24px;
}
.counselor-notice {
  background: var(--yellow-dim);
  border: 1px solid rgba(250,204,21,.25);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  margin-bottom: 24px;
}
.counselor-notice-icon {
  font-size: 20px;
  flex-shrink: 0;
  line-height: 1.2;
}
.counselor-notice-text {
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--text);
}
.counselor-notice strong {
  color: #fbbf24;
  font-weight: var(--fw-medium);
}

.mfa-hint {
  font-size: var(--fs-micro);
  color: var(--muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

/* Centered row — used to centre the role-badge under the counselor avatar */
.auth-center-row {
  display: flex;
  justify-content: center;
  margin-bottom: 24px;
}

/* Helper: counselor screen contents centred */
.auth-screen--centered { text-align: center; }

/* ─── Step indicator (invite.html wizard) ───────────────────────────── */
.steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 24px;
}
.step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.step-circle {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--fs-caption);
  font-weight: var(--fw-black);
  background: var(--surface2);
  border: 2px solid var(--border);
  color: var(--muted);
  transition: background .2s, border-color .2s, color .2s, box-shadow .2s;
}
.step-circle.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 16px rgba(99,102,241,.40);
}
.step-circle.done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.step-label {
  font-size: 9px;
  font-weight: var(--fw-bold);
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--muted);
}
.step-label.active { color: var(--accent); }
.step-label.done { color: var(--green); }
.step-line {
  width: 40px;
  height: 2px;
  background: var(--border);
  margin-bottom: 20px;
  flex-shrink: 0;
  transition: background .3s;
}
.step-line.done { background: var(--green); }

/* ─── Invite identity card ──────────────────────────────────────────── */
.invite-info {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 20px;
}
.invite-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.invite-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
  background: rgba(99,102,241,.20);
  border: 2px solid rgba(99,102,241,.30);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: var(--fw-black);
  color: var(--accent);
}
.invite-name {
  font-size: 15px;
  font-weight: var(--fw-bold);
}
.invite-email {
  font-size: var(--fs-micro);
  color: var(--muted);
  font-family: 'JetBrains Mono', monospace;
}
.invite-badges {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 10px;
  font-size: var(--fs-micro);
  font-weight: var(--fw-bold);
}
.badge-role {
  background: var(--accent-dim);
  color: #818cf8;
  border: 1px solid rgba(99,102,241,.30);
}
.badge-camp {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--muted);
}
.badge-2fa {
  background: var(--green-dim);
  color: var(--green);
  border: 1px solid rgba(16,185,129,.30);
}
.invite-notice {
  background: var(--green-dim);
  border: 1px solid rgba(16,185,129,.20);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: var(--fs-caption);
  color: var(--text);
  line-height: 1.55;
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
}
.invite-notice-ico { font-size: 16px; flex-shrink: 0; }

/* ─── Password strength meter (reset, invite) ───────────────────────── */
.pw-bar-wrap {
  height: 3px;
  border-radius: 2px;
  background: var(--border);
  margin: 7px 0 4px;
}
.pw-bar-fill {
  height: 100%;
  border-radius: 2px;
  width: 0%;
  transition: width .3s, background .3s;
}
.pw-text {
  font-size: 10px;
  font-weight: var(--fw-bold);
  color: var(--muted);
}
.pw-rules {
  list-style: none;
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 0;
}
.pw-rule {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-micro);
  color: var(--muted);
}
.pw-rule.ok { color: var(--green); }
.pw-rule::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  flex-shrink: 0;
}
.pw-rule.ok::before { background: var(--green); }

/* ─── Reset/invite confirmation panels (success / token-error) ──────── */
.email-check {
  background: var(--green-dim);
  border: 1px solid rgba(16,185,129,.20);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  margin-bottom: 20px;
}
.email-check-ico { font-size: 44px; margin-bottom: 12px; }
.email-check-title {
  font-size: 16px;
  font-weight: var(--fw-bold);
  margin-bottom: 6px;
}
.email-check-sub {
  font-size: var(--fs-caption);
  color: var(--muted);
  line-height: 1.6;
}
.email-check-sub strong { color: var(--text); }

.token-error {
  background: var(--red-dim);
  border: 1px solid rgba(239,68,68,.20);
  border-radius: var(--radius-md);
  padding: 22px;
  text-align: center;
  margin-bottom: 20px;
}
.token-error-ico { font-size: 40px; margin-bottom: 10px; }
.token-error-title {
  font-size: 16px;
  font-weight: var(--fw-bold);
  margin-bottom: 6px;
  color: var(--red);
}
.token-error-sub {
  font-size: var(--fs-caption);
  color: var(--muted);
  line-height: 1.6;
}

/* ─── Mobile polish ─────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 24px 22px; }
  .otp-digit { width: 42px; height: 50px; font-size: 18px; }
}
