/* ══════════════════════════════════════════════════════════
   BanoVano — auth pages (login / register / password flows)
   Подключается только на /account/* страницах (extra_head).
   Опирается на переменные из style.css (--gold, --dark, --bg-card…).
   ══════════════════════════════════════════════════════════ */

.auth-shell {
  min-height: calc(100vh - 96px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 0;
  position: relative;
}

/* Атмосферное золотое свечение за карточкой */
.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(58% 52% at 50% 6%, rgba(245, 200, 66, .32), transparent 70%),
    radial-gradient(42% 42% at 88% 92%, rgba(240, 214, 99, .18), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1.5px solid var(--border);
  border-radius: 22px;
  padding: 34px 30px 28px;
  box-shadow:
    0 20px 50px -20px rgba(45, 36, 24, .28),
    0 2px 8px rgba(45, 36, 24, .06);
  overflow: hidden;
  animation: auth-rise .5s cubic-bezier(.2, .7, .2, 1) both;
}

/* Золотая мерцающая полоса сверху */
.auth-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
  background-size: 200% 100%;
  animation: auth-shimmer 6s linear infinite;
}

html[data-theme="dark"] .auth-card {
  background: #1F160D;
  border-color: rgba(245, 200, 66, .16);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, .6);
}

/* ── Заголовок ─────────────────────────────────────────── */
.auth-head {
  text-align: center;
  margin-bottom: 24px;
  animation: auth-rise .5s .05s cubic-bezier(.2, .7, .2, 1) both;
}

.auth-badge {
  width: 58px; height: 58px;
  margin: 0 auto 14px;
  border-radius: 17px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-dim);
  border: 1.5px solid var(--gold-border);
  color: var(--gold);
  box-shadow: 0 6px 18px -8px rgba(245, 200, 66, .7);
}
.auth-badge svg { width: 28px; height: 28px; }

.auth-title {
  font-size: 23px; font-weight: 800;
  color: var(--dark);
  letter-spacing: -.01em;
  margin: 0 0 5px;
}
.auth-sub { font-size: 14px; color: var(--muted); margin: 0; line-height: 1.45; }
html[data-theme="dark"] .auth-title { color: #F3E6C0; }

/* ── Уведомления об ошибках / успехе ───────────────────── */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 13px;
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  margin-bottom: 18px;
  animation: auth-shake .4s cubic-bezier(.36, .07, .19, .97) both;
}
.auth-alert-ico { flex-shrink: 0; width: 19px; height: 19px; margin-top: 1px; }
.auth-alert--error {
  background: rgba(217, 64, 64, .09);
  border: 1.5px solid rgba(217, 64, 64, .30);
  color: var(--red);
}
.auth-alert--success {
  background: rgba(58, 158, 80, .10);
  border: 1.5px solid rgba(58, 158, 80, .30);
  color: var(--green);
  animation: auth-rise .4s cubic-bezier(.2, .7, .2, 1) both;
}
html[data-theme="dark"] .auth-alert--error { background: rgba(217, 64, 64, .13); }
html[data-theme="dark"] .auth-alert--success { background: rgba(58, 158, 80, .14); }

/* ── Поля с иконкой ────────────────────────────────────── */
.auth-field { position: relative; margin-bottom: 15px; animation: auth-rise .5s cubic-bezier(.2, .7, .2, 1) both; }
.auth-field--d1 { animation-delay: .10s; }
.auth-field--d2 { animation-delay: .16s; }
.auth-field--d3 { animation-delay: .22s; }

.auth-field-icon {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  width: 19px; height: 19px; color: var(--muted);
  pointer-events: none; transition: color .18s;
}

.auth-input {
  width: 100%;
  padding: 14px 46px 14px 44px;
  border-radius: 13px;
  border: 1.5px solid var(--border);
  background: var(--bg-card2);
  font-family: inherit; font-size: 15px; font-weight: 500;
  color: var(--dark);
  transition: border-color .18s, box-shadow .18s, background .18s;
  outline: none;
}
.auth-input::placeholder { color: rgba(122, 106, 80, .55); }
.auth-input:focus {
  border-color: var(--gold);
  background: var(--bg-card);
  box-shadow: 0 0 0 4px var(--gold-dim);
}
.auth-field:focus-within .auth-field-icon { color: var(--gold); }
html[data-theme="dark"] .auth-input {
  background: #2A1E10; border-color: rgba(245, 200, 66, .16); color: #EEE0B8;
}
html[data-theme="dark"] .auth-input:focus { background: #322414; }

/* Кнопка показать/скрыть пароль */
.auth-eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px;
  border: none; background: transparent; color: var(--muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  border-radius: 9px; transition: color .18s, background .18s;
}
.auth-eye:hover { color: var(--gold); background: var(--gold-dim); }
.auth-eye svg { width: 19px; height: 19px; }
.auth-eye .auth-eye-off { display: none; }
.auth-eye.is-on .auth-eye-on { display: none; }
.auth-eye.is-on .auth-eye-off { display: block; }

.auth-hint { font-size: 12px; color: var(--muted); margin: 6px 2px 0; }

/* Индикатор силы пароля */
.auth-meter { height: 4px; border-radius: 3px; background: var(--border); margin: 8px 2px 0; overflow: hidden; }
.auth-meter-bar { height: 100%; width: 0; border-radius: 3px; transition: width .25s, background .25s; }

/* ── Согласие ──────────────────────────────────────────── */
.auth-agree {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 13px; color: var(--muted); line-height: 1.5;
  cursor: pointer; margin-bottom: 16px;
  animation: auth-rise .5s .24s cubic-bezier(.2, .7, .2, 1) both;
}
.auth-agree input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--gold); flex-shrink: 0; }
.auth-agree a { color: var(--gold); font-weight: 600; }

/* ── Капча ─────────────────────────────────────────────── */
.auth-captcha {
  display: flex; justify-content: center; margin-bottom: 16px;
  animation: auth-rise .5s .26s cubic-bezier(.2, .7, .2, 1) both;
}

/* ── Кнопка отправки ───────────────────────────────────── */
.auth-submit {
  width: 100%; padding: 14px;
  border: none; border-radius: 13px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: #2D2418;
  font-family: inherit; font-size: 15px; font-weight: 800; letter-spacing: .01em;
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .16s, box-shadow .16s;
  box-shadow: 0 10px 24px -10px rgba(245, 200, 66, .8);
  animation: auth-rise .5s .28s cubic-bezier(.2, .7, .2, 1) both;
}
.auth-submit:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -12px rgba(245, 200, 66, .9); }
.auth-submit:active { transform: translateY(0); }
.auth-submit::after {
  content: ""; position: absolute; top: 0; left: -60%;
  width: 40%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .5), transparent);
  transform: skewX(-18deg); transition: left .5s;
}
.auth-submit:hover::after { left: 130%; }

/* ── Ссылки-подвал ─────────────────────────────────────── */
.auth-links {
  margin-top: 20px; padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex; flex-direction: column; gap: 9px;
  font-size: 13.5px; text-align: center;
  animation: auth-rise .5s .32s cubic-bezier(.2, .7, .2, 1) both;
}
.auth-links a { color: var(--muted); text-decoration: none; transition: color .16s; font-weight: 500; }
.auth-links a:hover { color: var(--gold); }
.auth-links a.auth-link-strong { color: var(--dark); font-weight: 700; }
html[data-theme="dark"] .auth-links a.auth-link-strong { color: #EEE0B8; }
.auth-links a.auth-link-strong:hover { color: var(--gold); }

/* Info-плашка (триал и т.п.) */
.auth-note {
  margin-top: 16px; padding: 13px 15px;
  border-radius: 12px;
  background: var(--gold-dim); border: 1px solid var(--gold-border);
  font-size: 12.5px; line-height: 1.5; color: var(--dark);
  animation: auth-rise .5s .34s cubic-bezier(.2, .7, .2, 1) both;
}
html[data-theme="dark"] .auth-note { color: #EEE0B8; }
.auth-note a { color: var(--gold); font-weight: 600; }

/* ── Анимации ──────────────────────────────────────────── */
@keyframes auth-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes auth-shimmer {
  from { background-position: 0 0; }
  to   { background-position: 200% 0; }
}
@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(2px); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-card, .auth-head, .auth-field, .auth-agree, .auth-captcha,
  .auth-submit, .auth-links, .auth-note, .auth-alert { animation: none !important; }
  .auth-card::before { animation: none; }
  .auth-submit:hover { transform: none; }
}

/* ── Настройки аккаунта (settings) ─────────────────────── */
.acct-section {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.acct-section:last-of-type { border-bottom: none; }

.acct-row {
  display: flex;
  align-items: center;
  gap: 12px;
}
.acct-ico {
  width: 42px; height: 42px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gold-dim);
  border: 1px solid var(--gold-border);
  color: var(--gold);
  flex-shrink: 0;
}
.acct-ico svg { width: 21px; height: 21px; }
.acct-body { flex: 1; min-width: 0; }
.acct-name { font-weight: 700; font-size: 14.5px; color: var(--dark); }
html[data-theme="dark"] .acct-name { color: #EEE0B8; }
.acct-status { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.acct-status--ok { color: var(--green); font-weight: 600; }
.acct-action .btn { white-space: nowrap; }

/* Триал-баннер */
.trial-banner {
  padding: 16px 18px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold-dim), rgba(240, 214, 99, .06));
  border: 1px solid var(--gold-border);
  margin: 4px 0 18px;
}
.trial-banner-title { font-weight: 800; font-size: 16px; color: var(--dark); }
html[data-theme="dark"] .trial-banner-title { color: #F3E6C0; }
.trial-banner p { font-size: 13px; color: var(--muted); margin: 6px 0 12px; line-height: 1.5; }

/* Степпер привязки по коду */
.link-steps { margin-top: 14px; display: flex; flex-direction: column; gap: 14px; }
.link-step { display: flex; gap: 12px; align-items: flex-start; }
.link-step-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold); color: #2D2418;
  font-weight: 800; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; margin-top: 1px;
}
.link-step-body { flex: 1; min-width: 0; }
.link-step-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; }

/* Крупное поле для 6-значного кода */
.code-input {
  width: 100%;
  padding: 14px;
  border-radius: 13px;
  border: 1.5px solid var(--border);
  background: var(--bg-card2);
  font-family: inherit;
  font-size: 26px; font-weight: 700;
  letter-spacing: .35em; text-align: center;
  color: var(--dark);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.code-input::placeholder { letter-spacing: .35em; color: rgba(122, 106, 80, .4); }
.code-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px var(--gold-dim);
}
html[data-theme="dark"] .code-input {
  background: #2A1E10; color: #EEE0B8;
  border-color: rgba(245, 200, 66, .16);
}
