/* ==========================================================================
   Экран входа и регистрации
   ========================================================================== */

#loginPage {
  position: fixed;
  inset: 0;
  z-index: 900;
  overflow-y: auto;
  overflow-x: hidden;
  background: #eef3fb;
  font-family: var(--c-font, 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif);
  color: #0f172a;
}

.auth-page *,
.auth-page *::before,
.auth-page *::after { box-sizing: border-box; }

.auth-page [hidden] { display: none !important; }

/* ---------- Фон ---------- */
.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  background:
    radial-gradient(1100px 600px at 8% 6%, rgba(37, 99, 235, .16), transparent 60%),
    radial-gradient(900px 600px at 92% 94%, rgba(124, 58, 237, .13), transparent 60%),
    linear-gradient(160deg, #f7f9ff 0%, #eef3fb 55%, #e9eef9 100%);
}
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .55;
  animation: auth-orb-float 18s ease-in-out infinite alternate;
}
.auth-orb--1 { width: 520px; height: 520px; left: -140px; top: -160px; background: rgba(96, 165, 250, .45); }
.auth-orb--2 { width: 460px; height: 460px; right: -160px; bottom: -140px; background: rgba(167, 139, 250, .38); animation-delay: -6s; }
.auth-orb--3 { width: 300px; height: 300px; right: 32%; top: -120px; background: rgba(45, 212, 191, .22); animation-delay: -11s; }
@keyframes auth-orb-float {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(30px, 26px, 0) scale(1.08); }
}
.auth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 23, 42, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 23, 42, .045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(circle at 50% 40%, #000 0%, transparent 78%);
}

/* ---------- Раскладка ---------- */
.auth-layout {
  position: relative;
  z-index: 1;
  min-height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, .95fr);
  gap: 0;
  padding: 24px;
  align-items: stretch;
}
.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 32px;
  padding: 44px 48px;
  border-radius: 30px;
  color: #eaf1ff;
  background:
    radial-gradient(700px 380px at 10% 0%, rgba(59, 130, 246, .38), transparent 65%),
    radial-gradient(600px 420px at 100% 100%, rgba(124, 58, 237, .32), transparent 60%),
    linear-gradient(155deg, #0b1220 0%, #0e1a33 50%, #111d3d 100%);
  overflow: hidden;
  box-shadow: 0 30px 80px -30px rgba(8, 15, 35, .55);
}
.auth-brand::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 30% 30%, #000, transparent 75%);
  -webkit-mask-image: radial-gradient(circle at 30% 30%, #000, transparent 75%);
  pointer-events: none;
}
.auth-brand > * { position: relative; z-index: 1; }

.auth-brand__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-logo { display: flex; align-items: center; gap: 12px; }
.auth-logo__img {
  width: 148px;
  height: auto;
  max-height: 48px;
  object-fit: contain;
  object-position: left center;
  display: block;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .35));
}
.auth-secure-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  color: #bbf7d0;
  background: rgba(16, 185, 129, .12);
  border: 1px solid rgba(52, 211, 153, .25);
  white-space: nowrap;
}
.auth-secure-pill i { font-size: .78rem; }

.auth-brand__body { margin-top: 2vh; max-width: 560px; }
.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #7dd3fc;
  margin-bottom: 18px;
}
.auth-eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #38bdf8, transparent);
}
.auth-brand h1 {
  margin: 0 0 18px;
  font-size: clamp(1.85rem, 2.4vw, 2.65rem);
  line-height: 1.12;
  letter-spacing: -.03em;
  font-weight: 750;
  color: #fff;
}
.auth-brand h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #60a5fa, #a78bfa 60%, #34d399);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-brand__lead { margin: 0 0 30px; font-size: .96rem; line-height: 1.65; color: #a9bddb; max-width: 480px; }

.auth-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-features li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .07);
  backdrop-filter: blur(6px);
}
.auth-feature__icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: #bfdbfe;
  background: linear-gradient(140deg, rgba(59, 130, 246, .35), rgba(124, 58, 237, .3));
  border: 1px solid rgba(147, 197, 253, .25);
}
.auth-features b { display: block; font-size: .9rem; color: #eef5ff; font-weight: 650; }
.auth-features small { display: block; margin-top: 2px; font-size: .78rem; color: #8fa6c7; }

.auth-brand__foot { margin-top: auto; display: flex; flex-direction: column; gap: 16px; }
.auth-metrics {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.auth-metrics > div {
  flex: 1 1 90px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .08);
}
.auth-metrics b { display: block; font-size: 1.2rem; color: #fff; letter-spacing: -.02em; }
.auth-metrics span { font-size: .72rem; color: #8fa6c7; }
.auth-brand__foot p { margin: 0; font-size: .74rem; color: #6f86a8; }

/* ---------- Правая панель ---------- */
.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px 22px 26px 34px;
  min-width: 0;
}
.auth-card {
  width: 100%;
  max-width: 470px;
  background: #fff;
  border: 1px solid #e6ebf5;
  border-radius: 30px;
  padding: 34px 38px 26px;
  box-shadow: 0 30px 80px -34px rgba(15, 23, 42, .35);
  animation: auth-card-in .45s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes auth-card-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.auth-card__head { margin-bottom: 22px; }
.auth-mobile-logo { display: none; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-mobile-logo img { width: 132px; height: auto; max-height: 42px; object-fit: contain; object-position: left center; }
.auth-mobile-logo span { font-weight: 750; color: #0f172a; letter-spacing: -.01em; }

.auth-tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 5px;
  border-radius: 14px;
  background: #f1f5fb;
  border: 1px solid #e6ecf7;
}
.auth-tab {
  position: relative;
  z-index: 1;
  border: 0;
  background: transparent;
  padding: 10px 12px;
  border-radius: 10px;
  font: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: color .18s ease;
}
.auth-tab.is-active { color: #0f172a; }
.auth-tab:hover { color: #1d4ed8; }
.auth-tabs__indicator {
  position: absolute;
  top: 5px;
  bottom: 5px;
  left: 5px;
  width: calc(50% - 7px);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px -2px rgba(15, 23, 42, .18), 0 1px 2px rgba(15, 23, 42, .08);
  transition: transform .24s cubic-bezier(.2, .8, .3, 1);
}
.auth-tabs[data-active="register"] .auth-tabs__indicator { transform: translateX(calc(100% + 4px)); }

.auth-view { animation: auth-view-in .24s ease both; }
@keyframes auth-view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.auth-view__head { margin-bottom: 20px; }
.auth-view__head h2 { margin: 0 0 6px; font-size: 1.5rem; letter-spacing: -.025em; color: #0f172a; font-weight: 750; }
.auth-view__head p { margin: 0; font-size: .88rem; color: #64748b; line-height: 1.45; }

/* ---------- Формы ---------- */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.auth-field--wide { grid-column: 1 / -1; }
.auth-field__label { font-size: .78rem; font-weight: 600; color: #475569; }
.auth-field__label em { color: #dc2626; font-style: normal; }
.auth-field__control {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-field__control > i {
  position: absolute;
  left: 13px;
  font-size: .88rem;
  color: #94a3b8;
  pointer-events: none;
  transition: color .16s ease;
}
.auth-field__control input,
.auth-field__control textarea {
  width: 100%;
  min-width: 0;
  padding: 12px 13px 12px 38px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  font: inherit;
  font-size: .92rem;
  color: #0f172a;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.auth-field__control textarea { padding-left: 13px; resize: vertical; min-height: 58px; }
.auth-field__control input[type="password"] { padding-right: 42px; }
.auth-field__control input::placeholder,
.auth-field__control textarea::placeholder { color: #a6b3c7; }
.auth-field__control input:focus,
.auth-field__control textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.auth-field__control:focus-within > i { color: #2563eb; }
.auth-field.is-invalid .auth-field__control input,
.auth-field.is-invalid .auth-field__control textarea { border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .1); }
.auth-field.is-valid .auth-field__control input,
.auth-field.is-valid .auth-field__control textarea { border-color: #10b981; }

.auth-eye {
  position: absolute;
  right: 7px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #94a3b8;
  font-size: .9rem;
  cursor: pointer;
  transition: background .16s ease, color .16s ease;
}
.auth-eye:hover { background: #f1f5f9; color: #2563eb; }

.auth-form__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-check { display: inline-flex; align-items: flex-start; gap: 9px; font-size: .82rem; color: #475569; cursor: pointer; line-height: 1.45; }
.auth-check input {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin: 1px 0 0;
  border: 1.5px solid #cbd5e1;
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
  position: relative;
}
.auth-check input:checked { background: #2563eb; border-color: #2563eb; }
.auth-check input:checked::after {
  content: '';
  position: absolute;
  left: 4.5px;
  top: 1.2px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.auth-check input:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; }
.auth-check--consent { margin-top: 2px; font-size: .78rem; color: #64748b; }

.auth-link {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: .82rem;
  font-weight: 600;
  color: #2563eb;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color .15s ease;
}
.auth-link:hover { color: #1d4ed8; text-decoration: underline; }
.auth-link--muted { color: #64748b; font-weight: 500; }
.auth-link--tiny { font-size: .76rem; color: #64748b; }
.auth-link--tiny:hover { color: #2563eb; }

.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  font-size: .82rem;
  line-height: 1.45;
  animation: auth-shake .3s ease;
}
.auth-alert::before { content: '\f071'; font-family: 'Font Awesome 6 Free', 'Font Awesome 5 Free'; font-weight: 900; font-size: .8rem; margin-top: 1px; }
.auth-alert.is-info { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.auth-alert.is-info::before { content: '\f05a'; }
.auth-alert.is-success { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.auth-alert.is-success::before { content: '\f058'; }
@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.auth-submit {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 18px;
  border: 0;
  border-radius: 13px;
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  font: inherit;
  font-size: .95rem;
  font-weight: 650;
  cursor: pointer;
  box-shadow: 0 10px 24px -10px rgba(37, 99, 235, .7);
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 14px 30px -12px rgba(37, 99, 235, .8); }
.auth-submit:active { transform: translateY(0); }
.auth-submit:disabled { opacity: .65; cursor: progress; transform: none; }
.auth-submit i { font-size: .85rem; transition: transform .16s ease; }
.auth-submit:hover i { transform: translateX(2px); }
.auth-submit--compact { width: auto; padding: 11px 20px; font-size: .88rem; }
.auth-submit .fa-spinner { animation: auth-spin 1s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

.auth-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; flex-wrap: wrap; }
.auth-actions--center { justify-content: center; margin-top: 18px; }

.auth-divider { position: relative; text-align: center; margin: 20px 0 16px; }
.auth-divider::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: #eef2f9; }
.auth-divider span { position: relative; padding: 0 10px; background: #fff; font-size: .74rem; color: #94a3b8; text-transform: lowercase; }

.auth-secondary {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px dashed #d9e2f0;
  border-radius: 13px;
  background: #f8fafd;
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
  font: inherit;
}
.auth-secondary:hover { border-color: #93c5fd; background: #eff6ff; transform: translateY(-1px); }
.auth-secondary__icon {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 11px;
  color: #2563eb;
  background: #e0edff;
}
.auth-secondary__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.auth-secondary__text b { font-size: .86rem; color: #0f172a; font-weight: 650; }
.auth-secondary__text small { font-size: .74rem; color: #64748b; line-height: 1.35; }
.auth-secondary > .fa-chevron-right { color: #94a3b8; font-size: .75rem; }
.auth-secondary--small { padding: 10px 12px; border-style: solid; }

.auth-status-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 12px auto 0;
  border: 0;
  background: none;
  padding: 4px 8px;
  font: inherit;
  font-size: .8rem;
  color: #64748b;
  cursor: pointer;
  transition: color .15s ease;
}
.auth-status-link:hover { color: #2563eb; }
.auth-status-link i { font-size: .75rem; }

/* ---------- Шаги ---------- */
.auth-steps { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; }
.auth-step { display: flex; align-items: center; gap: 8px; font-size: .78rem; color: #94a3b8; white-space: nowrap; }
.auth-step span {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #eef2f9;
  color: #64748b;
  font-size: .72rem;
  font-weight: 700;
  transition: background .2s ease, color .2s ease;
}
.auth-step b { font-weight: 600; }
.auth-step.is-active { color: #1d4ed8; }
.auth-step.is-active span { background: #2563eb; color: #fff; }
.auth-step.is-done span { background: #d1fae5; color: #047857; }
.auth-step__line { flex: 1; height: 2px; border-radius: 2px; background: #eef2f9; }
.auth-step-panel { display: flex; flex-direction: column; gap: 14px; animation: auth-view-in .22s ease both; }

.auth-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8fafc;
  border: 1px solid #eef2f9;
  font-size: .76rem;
  line-height: 1.5;
  color: #64748b;
}
.auth-hint i { color: #2563eb; margin-top: 2px; }

/* ---------- Пароль ---------- */
.auth-strength { display: flex; flex-direction: column; gap: 6px; }
.auth-strength__bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.auth-strength__bars span { height: 4px; border-radius: 4px; background: #eef2f9; transition: background .2s ease; }
.auth-strength__text { font-size: .73rem; color: #94a3b8; }
.auth-strength[data-score="1"] .auth-strength__bars span:nth-child(1) { background: #ef4444; }
.auth-strength[data-score="1"] .auth-strength__text { color: #dc2626; }
.auth-strength[data-score="2"] .auth-strength__bars span:nth-child(-n+2) { background: #f59e0b; }
.auth-strength[data-score="2"] .auth-strength__text { color: #b45309; }
.auth-strength[data-score="3"] .auth-strength__bars span:nth-child(-n+3) { background: #3b82f6; }
.auth-strength[data-score="3"] .auth-strength__text { color: #1d4ed8; }
.auth-strength[data-score="4"] .auth-strength__bars span { background: #10b981; }
.auth-strength[data-score="4"] .auth-strength__text { color: #047857; }

/* ---------- Аватары ---------- */
.auth-avatar-block { display: flex; flex-direction: column; gap: 9px; padding: 12px; border: 1px solid #eef2f9; border-radius: 12px; background: #fbfcfe; }
.auth-avatar-block__head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.auth-avatar-block__head > span:first-child { font-size: .78rem; font-weight: 600; color: #475569; }
.auth-avatar-block__head small { font-weight: 400; color: #94a3b8; }
.auth-avatar-block__hint { font-size: .7rem; color: #94a3b8; }
.auth-avatar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.auth-avatar-option {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.auth-avatar-option img { width: 100%; height: 100%; object-fit: cover; display: block; }
.auth-avatar-option:hover { transform: translateY(-2px); }
.auth-avatar-option.is-selected { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .18); }
.auth-avatar-option.is-none { display: flex; align-items: center; justify-content: center; background: #f1f5f9; color: #94a3b8; font-size: .8rem; }
.auth-avatar-reset {
  align-self: flex-start;
  border: 0;
  background: none;
  padding: 2px 0;
  font: inherit;
  font-size: .72rem;
  font-weight: 600;
  color: var(--c-muted, #64748b);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.auth-avatar-reset:hover { color: #dc2626; }
body.dark-theme .auth-avatar-reset { color: #8fa2bd; }
body.dark-theme .auth-avatar-reset:hover { color: #f87171; }

/* ---------- Результат ---------- */
.auth-success { text-align: center; padding: 8px 0 4px; animation: auth-view-in .25s ease both; }
.auth-success__icon {
  width: 66px;
  height: 66px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.5rem;
  color: #047857;
  background: linear-gradient(140deg, #d1fae5, #a7f3d0);
  box-shadow: 0 12px 26px -12px rgba(5, 150, 105, .55);
}
.auth-success h3 { margin: 0 0 8px; font-size: 1.3rem; color: #0f172a; letter-spacing: -.02em; }
.auth-success > p { margin: 0 auto 18px; max-width: 340px; font-size: .86rem; line-height: 1.55; color: #64748b; }
.auth-request-number {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed #bfdbfe;
  background: #f0f7ff;
  text-align: left;
}
.auth-request-number span { font-size: .74rem; color: #64748b; }
.auth-request-number b { margin-left: auto; font-size: .92rem; color: #1d4ed8; letter-spacing: .04em; }
.auth-copy {
  border: 0;
  background: #fff;
  color: #2563eb;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #dbeafe;
}
.auth-copy:hover { background: #dbeafe; }

.auth-status-result { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.auth-status-card { padding: 14px; border-radius: 12px; border: 1px solid #e6ebf5; background: #fbfcfe; text-align: left; }
.auth-status-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.auth-status-card__head b { font-size: .92rem; color: #0f172a; }
.auth-status-card p { margin: 0; font-size: .8rem; color: #64748b; line-height: 1.5; }
.auth-status-card .auth-request-number { margin-top: 10px; }
.auth-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 650;
  white-space: nowrap;
}
.auth-status-badge.is-pending { background: #fef3c7; color: #92400e; }
.auth-status-badge.is-approved { background: #d1fae5; color: #047857; }
.auth-status-badge.is-rejected { background: #fee2e2; color: #b91c1c; }

/* ---------- Подвал карточки ---------- */
.auth-card__foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  font-size: .72rem;
  color: #94a3b8;
  flex-wrap: wrap;
}
.auth-card__foot i { color: #10b981; font-size: .7rem; }
.auth-card__dot { color: #cbd5e1; }
.auth-legal { margin: 0; font-size: .72rem; color: #94a3b8; text-align: center; max-width: 430px; line-height: 1.5; }

/* ---------- Тёмная тема ---------- */
body.dark-theme #loginPage { background: #070d19; color: #e6edf7; }
body.dark-theme .auth-bg {
  background:
    radial-gradient(1100px 600px at 8% 6%, rgba(37, 99, 235, .22), transparent 60%),
    radial-gradient(900px 600px at 92% 94%, rgba(124, 58, 237, .18), transparent 60%),
    linear-gradient(160deg, #070d19 0%, #0b1324 55%, #0a1020 100%);
}
body.dark-theme .auth-grid { background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px); }
body.dark-theme .auth-card { background: #101a2d; border-color: #24314a; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8); }
body.dark-theme .auth-mobile-logo span,
body.dark-theme .auth-view__head h2,
body.dark-theme .auth-secondary__text b,
body.dark-theme .auth-success h3,
body.dark-theme .auth-status-card__head b { color: #f1f5f9; }
body.dark-theme .auth-tabs { background: #0b1424; border-color: #24314a; }
body.dark-theme .auth-tab { color: #8fa2bd; }
body.dark-theme .auth-tab.is-active { color: #f1f5f9; }
body.dark-theme .auth-tabs__indicator { background: #1b2942; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
body.dark-theme .auth-field__label { color: #a9b6c9; }
body.dark-theme .auth-field__control input,
body.dark-theme .auth-field__control textarea { background: #0b1424; border-color: #2a3a56; color: #e6edf7; }
body.dark-theme .auth-field__control input::placeholder,
body.dark-theme .auth-field__control textarea::placeholder { color: #64748b; }
body.dark-theme .auth-field__control input:focus,
body.dark-theme .auth-field__control textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 3px rgba(96, 165, 250, .2); }
body.dark-theme .auth-check { color: #a9b6c9; }
body.dark-theme .auth-check input { background: #0b1424; border-color: #3b4c68; }
body.dark-theme .auth-check input:checked { background: #2563eb; border-color: #2563eb; }
body.dark-theme .auth-divider::before { background: #24314a; }
body.dark-theme .auth-divider span { background: #101a2d; color: #64748b; }
body.dark-theme .auth-secondary { background: #0c1628; border-color: #2a3a56; }
body.dark-theme .auth-secondary:hover { background: #13223a; border-color: #3b82f6; }
body.dark-theme .auth-secondary__icon { background: #16233c; color: #60a5fa; }
body.dark-theme .auth-secondary__text small { color: #8fa2bd; }
body.dark-theme .auth-hint { background: #0c1628; border-color: #24314a; color: #8fa2bd; }
body.dark-theme .auth-step span { background: #1b2942; color: #8fa2bd; }
body.dark-theme .auth-step__line { background: #24314a; }
body.dark-theme .auth-avatar-block { background: #0c1628; border-color: #24314a; }
body.dark-theme .auth-avatar-block__head > span:first-child { color: #a9b6c9; }
body.dark-theme .auth-avatar-option { background: #0b1424; }
body.dark-theme .auth-avatar-option.is-none { background: #1b2942; color: #64748b; }
body.dark-theme .auth-strength__bars span { background: #24314a; }
body.dark-theme .auth-status-card { background: #0c1628; border-color: #24314a; }
body.dark-theme .auth-request-number { background: #0c1a30; border-color: #1e3a5f; }
body.dark-theme .auth-copy { background: #16233c; border-color: #24314a; color: #60a5fa; }
body.dark-theme .auth-card__foot { border-top-color: #24314a; color: #64748b; }
body.dark-theme .auth-legal { color: #64748b; }
body.dark-theme .auth-alert { background: #2a1315; border-color: #7f1d1d; color: #fca5a5; }
body.dark-theme .auth-alert.is-info { background: #0c1a30; border-color: #1e3a5f; color: #93c5fd; }
body.dark-theme .auth-alert.is-success { background: #06281f; border-color: #065f46; color: #6ee7b7; }
body.dark-theme .auth-link { color: #60a5fa; }
body.dark-theme .auth-link--muted,
body.dark-theme .auth-status-link { color: #8fa2bd; }

/* ---------- Адаптивность ---------- */
@media (max-width: 1100px) {
  .auth-layout { grid-template-columns: minmax(0, 1fr) minmax(400px, .9fr); padding: 18px; }
  .auth-brand { padding: 36px 34px; }
  .auth-brand h1 { font-size: 2rem; }
}
@media (max-width: 900px) {
  .auth-layout { display: flex; flex-direction: column; padding: 16px; align-items: center; justify-content: center; }
  .auth-brand { display: none; }
  .auth-panel { padding: 10px 0 24px; width: 100%; }
  .auth-card { border-radius: 24px; max-width: 520px; padding: 28px 26px 22px; }
  .auth-mobile-logo { display: flex; }
  .auth-mobile-logo img { padding: 4px; }
  .auth-card__head { margin-bottom: 18px; }
}
@media (max-width: 560px) {
  .auth-layout { padding: 10px; }
  .auth-panel { padding: 4px 0 18px; }
  .auth-card { border-radius: 20px; padding: 22px 18px 18px; }
  .auth-view__head h2 { font-size: 1.3rem; }
  .auth-grid2 { grid-template-columns: 1fr; }
  .auth-field--wide { grid-column: auto; }
  .auth-steps { gap: 7px; }
  .auth-step b { display: none; }
  .auth-step__line { flex: 1; }
  .auth-avatar-grid { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .auth-actions { flex-direction: column-reverse; align-items: stretch; }
  .auth-actions .auth-submit--compact { width: 100%; }
  .auth-actions .auth-link { text-align: center; justify-content: center; }
  .auth-card__foot { gap: 6px; }
  .auth-secondary__text small { display: none; }
  .auth-brand__lead { font-size: .9rem; }
}
@media (max-height: 760px) and (min-width: 901px) {
  .auth-brand { padding: 30px 38px; gap: 22px; }
  .auth-brand h1 { font-size: 1.8rem; }
  .auth-features li { padding: 9px 12px; }
  .auth-features small { display: none; }
  .auth-card { padding: 26px 32px 20px; }
}

/* Печать экрана входа не нужна */
@media print {
  #loginPage { display: none !important; }
}

/* Стартовая страница без рекламного блока: только форма входа по центру */
.auth-layout {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  grid-template-columns: none;
}
.auth-panel {
  width: 100%;
  padding: 16px;
}
.auth-mobile-logo { display: flex; }
.auth-layout { width: 100%; }

/* ------------------------------------------------- Выбор типа регистрации */

.auth-role-choose {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-role-card {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--c-border, #e6ebf5);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.auth-role-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 22px -12px rgba(37, 99, 235, .35);
  transform: translateY(-1px);
}

.auth-role-card__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border-radius: 11px;
  background: var(--c-brand-soft, #eff4ff);
  color: var(--c-brand, #2563eb);
  font-size: 1.05rem;
}

.auth-role-card--school .auth-role-card__icon {
  background: rgba(5, 150, 105, .12);
  color: #047857;
}

.auth-role-card__text { flex: 1; min-width: 0; }
.auth-role-card__text b { display: block; font-size: .92rem; font-weight: 700; color: #0f172a; }
.auth-role-card__text small { display: block; margin-top: 3px; font-size: .76rem; line-height: 1.45; color: #64748b; }
.auth-role-card > i.fa-chevron-right { color: #94a3b8; font-size: .8rem; }

body.dark-theme .auth-role-card { background: #101a2d; border-color: #24314a; }
body.dark-theme .auth-role-card__text b { color: #e2e8f0; }
body.dark-theme .auth-role-card__text small { color: #94a3b8; }
