/* ─────────────────────────────────────────────────────────────────────────
   BonkiPay Cabinet — premium auth pages refresh (Phase 1.4C)
   CSS-only. Стилизует ТОЛЬКО публичные страницы /login и /register.

   Загрузка: ПОСЛЕ app.css и tokens.css в login.html / register.html.
   Всё на токенах из tokens.css → light/dark работает автоматически.
   app.css и tokens.css не редактируются. Логика форм не меняется.
   ───────────────────────────────────────────────────────────────────────── */

/* ── Каркас страницы ─────────────────────────────────────────────────────── */
body.auth-page {
  position: relative;
  min-height: 100vh;
  padding: var(--sp-6) var(--sp-4);
  /* центрирование шелла наследуется от .auth-body (flex center) в app.css */
}

/* Мягкий фон без изображений — два «orb»-пятна на токенах. */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.auth-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
}
.auth-bg-orb--1 {
  width: 540px;
  height: 540px;
  top: -180px;
  left: -140px;
  background: radial-gradient(circle, var(--accent) 0%, transparent 70%);
  opacity: 0.10;
}
.auth-bg-orb--2 {
  width: 600px;
  height: 600px;
  bottom: -220px;
  right: -160px;
  background: radial-gradient(circle, var(--info) 0%, transparent 70%);
  opacity: 0.08;
}

/* ── Шелл: бренд-панель + форма ──────────────────────────────────────────── */
.auth-shell {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1080px;
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-6);
  align-items: center;
}

/* Бренд-панель — только desktop. */
.auth-brand-panel { display: none; }

.auth-brand-mark {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.auth-brand-logo {
  max-height: 44px;
  width: auto;
  object-fit: contain;
}
.auth-brand-name {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}
.auth-brand-title {
  margin: 0 0 var(--sp-3);
  font-size: var(--fs-2xl);
  line-height: var(--lh-heading);
  font-weight: 700;
  color: var(--text);
  max-width: 22ch;
}
.auth-brand-copy {
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-base);
  line-height: var(--lh-body);
  color: var(--muted);
  max-width: 40ch;
}
.auth-benefit-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.auth-benefit-list li {
  position: relative;
  padding-left: calc(var(--sp-5) + var(--sp-1));
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--text);
}
.auth-benefit-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 1px;
  width: 20px;
  height: 20px;
  border-radius: var(--r-pill);
  background: var(--success-bg);
  /* галочка нарисована CSS-границами, без иконок/картинок */
}
.auth-benefit-list li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 5px;
  width: 5px;
  height: 9px;
  border: solid var(--success);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ── Панель формы ────────────────────────────────────────────────────────── */
.auth-panel {
  display: flex;
  justify-content: center;
}

/* Переопределяем легаси/токеновую .auth-card под премиальный вид. */
.auth-card {
  width: 100%;
  max-width: 460px;
  padding: var(--sp-6);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
}

/* Компактный бренд внутри карточки — для mobile (на desktop скрыт). */
.auth-card-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-1);
  margin-bottom: var(--sp-5);
}
.auth-card-brand .auth-login-logo { max-height: 56px; }
.auth-card-brand .auth-login-brand {
  font-size: var(--fs-lg);
  font-weight: 700;
  color: var(--text);
}
.auth-card-brand .auth-login-caption {
  font-size: var(--fs-sm);
  color: var(--muted);
}

.auth-kicker {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}
.auth-card h1.auth-title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-2xl);
  line-height: var(--lh-heading);
  font-weight: 700;
  color: var(--text);
}
.auth-subtitle {
  margin: 0 0 var(--sp-5);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
  color: var(--muted);
}

/* ── Форма ───────────────────────────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
/* Метка-обёртка вокруг input (сохранён исходный доступный паттерн). */
.auth-card label.auth-field {
  display: block;
  margin: 0;
  color: var(--text);
}
.auth-field-label {
  display: block;
  margin-bottom: var(--sp-2);
  font-size: var(--fs-sm);
  font-weight: 500;
  line-height: var(--lh-body);
  color: var(--muted);
}
.auth-card .auth-field input {
  display: block;
  width: 100%;
  min-height: 44px;
  margin: 0;
  padding: 0 var(--sp-3);
  font-size: var(--fs-base);
  color: var(--text);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  transition: border-color 0.14s ease, background-color 0.14s ease;
}
.auth-card .auth-field input::placeholder { color: var(--muted); }
.auth-card .auth-field input:hover { border-color: var(--muted); }
.auth-card .auth-field input:focus-visible {
  outline: var(--focus-width) solid var(--accent);
  outline-offset: var(--focus-offset);
  border-color: var(--accent);
  background: var(--surface);
}

.auth-actions {
  margin-top: var(--sp-1);
}
.auth-card button.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 var(--sp-4);
  font-size: var(--fs-base);
  font-weight: 600;
  line-height: 1;
  color: #fff;
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background-color 0.14s ease;
}
.auth-card button.auth-submit:hover { background: var(--accent-hover); }
.auth-card button.auth-submit:focus-visible {
  outline: var(--focus-width) solid var(--accent);
  outline-offset: var(--focus-offset);
}

/* ── Подвал и ссылки ─────────────────────────────────────────────────────── */
.auth-footer {
  margin: var(--sp-5) 0 0;
  font-size: var(--fs-sm);
  color: var(--muted);
  text-align: center;
}
.auth-footer-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.auth-footer-link:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

/* ── Индикатор силы пароля (register) — мягкая подгонка под токены ────────── */
.auth-card .pwd-meter { margin: var(--sp-1) 0 var(--sp-2); }
/* Видимый трек пустых сегментов в обеих темах; цвета силы (.on) не трогаем. */
.auth-card .pwd-meter-bars i:not(.on) { background: var(--border); }
.auth-card .pwd-meter-text { font-size: var(--fs-xs); color: var(--muted); }
.auth-card .pwd-hint {
  margin: 0 0 var(--sp-4);
  font-size: var(--fs-xs);
  line-height: var(--lh-body);
  color: var(--muted);
}

/* ── Desktop ≥881px: показываем бренд-панель, прячем компактный бренд ─────── */
@media (min-width: 881px) {
  .auth-shell {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--sp-8);
  }
  .auth-brand-panel {
    display: flex;
    flex-direction: column;
  }
  .auth-card-brand { display: none; }
  .auth-card { padding: var(--sp-8); }
  .auth-panel { justify-content: flex-end; }
}
