/* ══════════════════════════════════════════
   AUTH PAGE — split-screen login
   ══════════════════════════════════════════ */

html, body {
  height: 100%;
  overflow: hidden;
}

/* ── Двухколоночная обёртка ── */
.auth-wrap {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* ══════════════════════════════
   ЛЕВАЯ ПАНЕЛЬ — коллаж
   ══════════════════════════════ */
.auth-visual {
  flex: 0 0 62%;
  overflow: hidden;
  background: #07051c;
  display: flex;
}

.auth-visual__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: left top;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
  user-select: none;
}

/* ══════════════════════════════
   ПРАВАЯ ПАНЕЛЬ — форма
   ══════════════════════════════ */
.auth-panel {
  flex: 0 0 38%;
  display: flex;
  flex-direction: column;
  /* п.5 — radial gradient: центр чуть светлее */
  background:
    radial-gradient(ellipse 70% 55% at 50% 52%,
      rgba(110, 60, 200, 0.13) 0%,
      transparent 70%),
    linear-gradient(160deg, #140036 0%, #07051c 100%);
  overflow-y: auto;
  position: relative;
}

/* ── Стрелка «на главную» ── */
.auth-back {
  padding: 20px 28px 0;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.auth-back a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--white-40);
  text-decoration: none;
  transition: color var(--transition);
}
.auth-back a:hover { color: var(--white-70); }

/* ── Логотип — прибит к верху, отдельно от формы ── */
.auth-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 72px 48px 0;
  flex-shrink: 0;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.auth-logo__img { height: 60px; width: auto; }


/* ── Центральный блок — форма ── */
/* п.1 — чуть выше центра через padding-bottom */
.auth-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 44px 10%;
  position: relative;
  z-index: 1;
}

/* ══════════════════════════════
   ИЕРАРХИЯ БЛОКОВ (шаг 8px)
   ══════════════════════════════ */

/* п.2 — Заголовок: крупнее, жирнее */
.auth-title {
  font-family: 'Unbounded', sans-serif;
  font-size: 24px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.02em;
  margin-bottom: 32px; /* 8×4 */
  text-align: center;
  line-height: 1.2;
}

/* Форма */
.auth-form {
  width: 100%;
  max-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 16px; /* п.8 — между полями 16px */
}

/* п.3 — Поля: лёгкий fill, тонкая граница, больше padding */
.auth-form .post-input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 15px 18px;
  font-size: 14px;
}

.auth-form .post-input2, .post-select2, .post-textarea2 {
    /*background: var(--bg-light);*/
    border: 1.5px solid var(--white-14);
    border-radius: var(--r-m);
    padding: 12px 16px;
    /*color: #ffffff;*/
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, background 0.3s, color 0.3s;
    width: 100%;
    box-sizing: border-box;
}

.auth-form .post-input2::placeholder {
  color: rgba(255, 255, 255, 0.22); /* менее контрастный */
}

.auth-form .post-input2:focus {
  border-color: rgba(139, 93, 246, 0.45);
  background: rgba(139, 93, 246, 0.06);
  box-shadow: none;
}

/* Поле с глазом */
.auth-pass-wrap {
  position: relative;
}

.auth-pass-wrap .post-input2 {
  padding-right: 48px;
}

.auth-eye {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.22);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--transition);
}
.auth-eye:hover { color: rgba(255, 255, 255, 0.6); }

/* п.7 — «Забыли пароль?» — очень вторичный */
.auth-forgot {
  text-align: right;
  margin-top: -6px;
}

.auth-forgot a {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.22);
  text-decoration: none;
  transition: color var(--transition);
}
.auth-forgot a:hover { color: rgba(255, 255, 255, 0.5); }

/* п.4 + п.8 — Кнопка: мягче, отступ от полей 24px */
.auth-form .btn-post-submit {
  width: 100%;
  margin-top: 8px; /* gap: 16px + margin: 8px = 24px от последнего поля */
  padding: 15px 24px;
  font-size: 14px;
  text-transform: none;
  letter-spacing: 0.02em;
  border-radius: 10px;
}

.auth-submit--purple {
  background: linear-gradient(135deg, #8b5df6 0%, #6b3fd4 100%);
  color: #ffffff;
  /* п.4 — glow уменьшен на ~40% */
  box-shadow: 0 2px 12px rgba(139, 93, 246, 0.22);
}
.auth-submit--purple:hover {
  background: linear-gradient(135deg, #9d72f7 0%, #7a4de8 100%);
  filter: none;
  box-shadow: 0 4px 18px rgba(139, 93, 246, 0.32);
}
.auth-submit--purple:active {
  background: linear-gradient(135deg, #7040e0 0%, #5524bd 100%);
}

/* п.8 — Разделитель: 24–32px от кнопки */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 32px; /* 8×4 */
  width: 100%;
  max-width: 300px;
}

/* п.6 — Разделитель усилен */
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
}

.auth-divider span {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.35);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

/* п.6 — Соцсети: крупнее, единый стиль */
.auth-socials {
  display: flex;
  gap: 12px;
  margin-top: 20px; /* 8×2.5 */
}

.auth-social-btn {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: background var(--transition), border-color var(--transition), transform 0.12s;
}
.auth-social-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
}
/* Все иконки внутри кнопок — одинаковый размер */
.auth-social-btn svg,
.auth-social-btn img {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}

/* п.7 — Регистрация: акцентная ссылка */
.auth-register {
  margin-top: 24px; /* 8×3 */
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
}
.auth-register a {
  color: var(--purple);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}
.auth-register a:hover { color: #a87dff; }

/* ══════════════════════════════
   ВИД-ПЕРЕКЛЮЧАТЕЛЬ
   ══════════════════════════════ */
.auth-view {
  display: none;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.auth-view.is-active {
  display: flex;
  animation: viewFadeIn 0.22s ease both;
}

@keyframes viewFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Подсказка под заголовком в восстановлении */
.auth-recovery-hint {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  margin-top: -18px;
  margin-bottom: 24px;
  max-width: 260px;
  line-height: 1.55;
}

/* ── Граффити (скрыто) ── */
.auth-panel__graffiti {
  position: absolute;
  bottom: 56px;
  left: 50%;
  transform: translateX(-50%);
  width: clamp(160px, 54%, 273px);
  opacity: 0.87;
  pointer-events: none;
  user-select: none;
}

/* ── Футер ── */
.auth-footer {
  flex-shrink: 0;
  padding: 0 28px 16px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.auth-footer p {
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.25);
}

.auth-footer a {
  color: rgba(255, 255, 255, 0.45);
  text-underline-offset: 3px;
  transition: color var(--transition);
}
.auth-footer a:hover { color: rgba(255, 255, 255, 0.85); }

/* ══════════════════════════════
   СВЕТЛАЯ ТЕМА
   ══════════════════════════════ */
[data-theme="light"] .auth-panel {
  background:
    radial-gradient(ellipse 70% 55% at 50% 52%,
      rgba(139, 93, 246, 0.07) 0%,
      transparent 70%),
    var(--bg);
}

[data-theme="light"] .auth-title {
  color: #1a1a2e;
}

[data-theme="light"] .auth-back a {
  color: rgba(26, 26, 46, 0.4);
}
[data-theme="light"] .auth-back a:hover { color: rgba(26, 26, 46, 0.7); }

[data-theme="light"] .auth-form .post-input {
  background: rgba(26, 26, 46, 0.04);
  border-color: rgba(26, 26, 46, 0.15);
  color: #1a1a2e;
}
[data-theme="light"] .auth-form .post-input::placeholder {
  color: rgba(26, 26, 46, 0.35);
}
[data-theme="light"] .auth-form .post-input:focus {
  border-color: rgba(139, 93, 246, 0.5);
  background: rgba(139, 93, 246, 0.05);
}

[data-theme="light"] .auth-eye {
  color: rgba(26, 26, 46, 0.3);
}
[data-theme="light"] .auth-eye:hover { color: rgba(26, 26, 46, 0.6); }

[data-theme="light"] .auth-forgot a {
  color: rgba(26, 26, 46, 0.3);
}
[data-theme="light"] .auth-forgot a:hover { color: rgba(26, 26, 46, 0.6); }

[data-theme="light"] .auth-divider::before,
[data-theme="light"] .auth-divider::after {
  background: rgba(26, 26, 46, 0.15);
}
[data-theme="light"] .auth-divider span {
  color: rgba(26, 26, 46, 0.4);
}

[data-theme="light"] .auth-social-btn {
  background: rgba(26, 26, 46, 0.04);
  border-color: rgba(26, 26, 46, 0.12);
}
[data-theme="light"] .auth-social-btn:hover {
  background: rgba(26, 26, 46, 0.08);
  border-color: rgba(26, 26, 46, 0.25);
}

[data-theme="light"] .auth-register {
  color: rgba(26, 26, 46, 0.4);
}

[data-theme="light"] .auth-recovery-hint {
  color: rgba(26, 26, 46, 0.45);
}

[data-theme="light"] .auth-footer p {
  color: rgba(26, 26, 46, 0.3);
}
[data-theme="light"] .auth-footer a {
  color: rgba(26, 26, 46, 0.5);
}
[data-theme="light"] .auth-footer a:hover { color: rgba(26, 26, 46, 0.85); }

/* ══════════════════════════════
   АДАПТИВ
   ══════════════════════════════ */
.auth-page .m-nav { display: none; }

@media (max-width: 1024px) {
  html, body { overflow: auto; }

  .auth-wrap {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }

  /* Мобильная шапка вместо боковой навигации */
  .auth-page .m-nav { display: flex; }
  .auth-back { display: none; }

  /* Изображение скрыто */
  .auth-visual { display: none; }

  /* Лого скрываем */
  .auth-logo__img { display: none; }
  .auth-logo { padding: 16px 24px 0; }


  .auth-panel {
    flex: 1;
    width: 100%;
    overflow-y: visible;
  }

  .auth-logo {
    padding: 24px 24px 0;
    align-items: center;
  }

  .auth-body {
    padding: 24px 24px 32px;
    align-items: center;
  }

  /* Формы — не на всю ширину, максимум 420px по центру */
  .auth-form,
  .auth-divider {
    max-width: 420px;
    width: 100%;
  }

  .auth-socials { justify-content: center; }
  .auth-register { text-align: center; }
}

@media (max-width: 400px) {
  .auth-body { padding: 20px 16px 28px; }
}
.phone-input-wrapper {
    display: flex;
    align-items: center;
    background: var(--input-bg);
    border-radius: var(--r-md);
    border: 1px solid var(--white-14);
    padding: 0 12px;
}
.phone-prefix {
    color: var(--white);
    font-size: 16px;
    opacity: 0.7;
    margin-right: 8px;
}
.phone-input-wrapper input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 12px 0;
    font-size: 16px;
    color: var(--white);
    outline: none;
}
.phone-input-wrapper input:focus {
    outline: none;
}