/* Вход и регистрация (/login, /regin) */

.auth-body { min-height: 100vh; }
.auth { display: grid; grid-template-columns: minmax(360px, 5fr) 7fr; min-height: 100vh; }

/* ---------- фирменная панель ---------- */
.auth-brand {
  position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 40px;
  padding: 40px 48px; color: #fff;
  background: linear-gradient(150deg, #0f1b4d 0%, #1a2f8f 55%, #0b7a86 100%);
}
.auth-brand__glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(50% 40% at 15% 10%, rgba(34, 216, 194, .35), transparent 70%),
    radial-gradient(50% 45% at 90% 95%, rgba(107, 135, 255, .45), transparent 70%);
}
.auth-brand > :not(.auth-brand__glow) { position: relative; }
.auth-brand__logo img { height: 30px; width: auto; }
.auth-brand__body h2 { max-width: 440px; font-size: clamp(26px, 2.6vw, 36px); line-height: 1.2; letter-spacing: -.025em; font-weight: 800; }
.auth-brand__list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; max-width: 440px; }
.auth-brand__list li { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.5; color: rgba(255, 255, 255, .85); }
.auth-brand__list i {
  flex-shrink: 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px;
  background: rgba(255, 255, 255, .12); font-size: 18px; color: #fff;
}
.auth-brand__foot { display: flex; align-items: center; gap: 12px; font-size: 13px; color: rgba(255, 255, 255, .75); }
.auth-brand__foot a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .4); text-underline-offset: 3px; }
.auth-brand__icons { display: inline-flex; flex-shrink: 0; }
.auth-brand__icons i { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 2px solid #1a2f8f; font-size: 15px; background: #29a9eb; }
.auth-brand__icons i + i { margin-left: -8px; background: linear-gradient(120deg, #17c9b4, #4c6fff); }

/* ---------- колонка с формой ---------- */
.auth-main { display: flex; flex-direction: column; align-items: center; padding: 24px 24px 28px; background: var(--bg); }
.auth-top { display: flex; align-items: center; gap: 8px; width: 100%; max-width: 440px; margin-bottom: auto; }
.auth-top__logo { display: none; margin-right: auto; }
.auth-top__logo img { height: 26px; width: auto; }
.auth-top__back { margin-right: auto; }

.auth-card {
  width: 100%; max-width: 440px; margin: 40px 0; padding: 36px;
  border: 1px solid var(--border); border-radius: 24px; background: var(--surface); box-shadow: var(--shadow-lg);
}
.auth-step { animation: auth-in .3s var(--ease); }
@keyframes auth-in { from { opacity: 0; transform: translateY(6px); } }
.auth-card h1 { font-size: 26px; letter-spacing: -.02em; }
.auth-sub { margin: 8px 0 28px; font-size: 15px; }
.auth-sub a { font-weight: 700; }

.btn-telegram { background: #29a9eb; color: #fff; box-shadow: 0 8px 24px -10px rgba(41, 169, 235, .8); }
.btn-telegram:hover { background: #1f97d6; color: #fff; }
.btn-telegram i { font-size: 22px; }
.btn-xl.btn-telegram { font-size: 16px; }
.auth-hint { margin-top: 10px; font-size: 13px; color: var(--text-3); text-align: center; }

.auth-or { display: flex; align-items: center; gap: 12px; margin: 24px 0; font-size: 12px; font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.auth-yandex { min-height: 48px; }
.auth-yandex:empty { border: 1px dashed var(--border); border-radius: 12px; }   /* место под кнопку, пока грузится SDK */

.auth-password { margin-top: 16px; border: 1px solid var(--border); border-radius: 14px; }
.auth-password summary {
  display: flex; align-items: center; gap: 8px; padding: 14px 16px; cursor: pointer; list-style: none;
  font-size: 14px; font-weight: 700; color: var(--text-2);
}
.auth-password summary::-webkit-details-marker { display: none; }
.auth-password summary::after { content: '\ea4a'; font-family: boxicons; margin-left: auto; font-size: 20px; transition: transform .2s; }  /* bx-chevron-down */
.auth-password[open] summary::after { transform: rotate(180deg); }
.auth-password summary i { font-size: 18px; }
.auth-password form { padding: 4px 16px 16px; }
.auth-password .btn-block { margin-top: 18px; }
.auth-pass-wrap { position: relative; }
.auth-pass-wrap .input { padding-right: 44px; }
.auth-pass-wrap .btn { position: absolute; right: 4px; top: 4px; }
.auth-error { margin-top: 14px; padding: 10px 12px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 13px; font-weight: 600; }
.auth-error a { color: inherit; text-decoration: underline; }

.auth-note { display: flex; gap: 12px; margin-top: 24px; padding: 14px 16px; border-radius: 14px; background: var(--success-soft); }
.auth-note i { flex-shrink: 0; font-size: 22px; color: var(--success); }
.auth-note p { font-size: 13px; line-height: 1.55; color: var(--text); }
.auth-terms { margin-top: 16px; font-size: 12px; text-align: center; }

/* ---------- ожидание подтверждения ---------- */
#auth-wait { text-align: center; }
.auth-wait__icon {
  position: relative; display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 20px;
  border-radius: 50%; background: #29a9eb; color: #fff; font-size: 36px;
}
.auth-wait__pulse { position: absolute; inset: 0; border-radius: 50%; border: 2px solid #29a9eb; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { from { transform: scale(1); opacity: .8; } to { transform: scale(1.6); opacity: 0; } }
.auth-qr {
  display: flex; align-items: center; gap: 16px; margin-bottom: 20px; padding: 14px;
  border: 1px solid var(--border); border-radius: 16px; background: var(--surface-2); text-align: left;
}
.auth-qr__code { flex-shrink: 0; padding: 6px; border-radius: 10px; background: #fff; line-height: 0; }
.auth-qr__code img, .auth-qr__code canvas { width: 120px; height: 120px; }
.auth-qr b { display: block; font-size: 14px; margin-bottom: 4px; }
.auth-qr .muted { font-size: 13px; line-height: 1.5; }
#auth-wait .btn-ghost { margin-top: 8px; }

.auth-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; width: 100%; max-width: 440px; margin-top: auto; font-size: 12px; text-align: center; }
.auth-foot span { display: inline-flex; align-items: center; gap: 4px; }

/* ---------- адаптив ---------- */
@media (max-width: 960px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .auth-top__logo { display: inline-flex; }
  .auth-top__back { display: none; }
}
@media (max-width: 480px) {
  .auth-main { padding: 16px 16px 24px; }
  .auth-card { margin: 28px 0; padding: 24px 20px; border-radius: 20px; }
  .auth-qr { display: none; }   /* на телефоне QR не нужен — Telegram откроется тут же */
}
