/* ============================================================
   AUTH MODAL REDESIGN (v2) — двухпанельная модалка входа/регистрации
   Всё scoped под #modal_auth.av2, чтобы не конфликтовать с modalauth.css.
   ID полей/форм НЕ меняются — JS (login/signup/respass) работает как есть.
   ============================================================ */

#modal_auth.av2 .modal-base__wrapper,
#modal_auth.av2 .modal-base,
#modal_auth.av2 .auth-promo { all: unset; }

#modal_auth.av2 .modal-content { padding: 16px; }

#modal_auth.av2 .av2-shell {
  display: flex;
  flex-direction: column;
  width: min(500px, 96vw);
  background: #0B111E;
  border: 1px solid #1e2740;
  border-radius: 22px;
  overflow: visible;
  box-shadow: 0 24px 80px -20px rgba(0,0,0,.7);
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  padding: 22px 26px 24px;
}

/* ---------- ЛЕВАЯ ПАНЕЛЬ (промо-арт + бонус-карты) ---------- */
#modal_auth.av2 .av2-left {
  position: relative;
  flex: 0 1 306px;          /* обе панели узкие */
  min-width: 0;
  background: #120a24;
  overflow: hidden;
}
#modal_auth.av2 .av2-left__bg {
  position: absolute; inset: 0;
  background-position: bottom;
  background-repeat: no-repeat;
  opacity: 1;
}
#modal_auth.av2 .av2-left__bg--signup { display: none; }
#modal_auth.av2 .av2-left__bg--login  { background-image: url('/templates/redesign/img/auth/login_left_fon_2.png'); }

/* промо-текст поверх арта (пишем в коде — адаптируется). Спека Figma: Bounded
   ExtraBold(800), letter-spacing -1%, uppercase; фиол. градиент 6C2CFF→B253FF.
   px из макета = максимум в clamp, ниже — уменьшается для мобилки. Только signup. */
/* Промо реєстрації: ВІТАЛЬНИЙ БОНУС / 600% (жёлтый) / +500FS / лимит.
   Локализуется (reg_bonus_*), авто-фит через transform:scale в JS. Только signup. */
#modal_auth.av2 .av2-promo {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  padding: clamp(24px, 3.6vw, 34px) clamp(16px, 3vw, 24px);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
  font-family: 'Bounded', 'Montserrat', system-ui, sans-serif;
  font-weight: 800; text-transform: uppercase; letter-spacing: -.01em;
  line-height: 1.06; text-shadow: 0 2px 12px rgba(0,0,0,.5);
  text-align: center;
}
#modal_auth.av2.av2--signup .av2-promo { opacity: 1; }
#modal_auth.av2 .av2-promo__wb  { font-size: clamp(18px, 2.6vw, 24px); color: #fff; }
#modal_auth.av2 .av2-promo__pct { font-size: clamp(42px, 6.2vw, 60px); color: #FFC93C; line-height: 1; margin-top: 4px; }
#modal_auth.av2 .av2-promo__fs  { font-size: clamp(14px, 1.9vw, 18px); color: #fff; margin-top: 2px; }
#modal_auth.av2 .av2-promo__lim { font-size: clamp(12px, 1.6vw, 15px); color: #cfd6e2; font-weight: 700; margin-top: 8px; text-transform: none; }

/* WELCOME BACK текстом (login-арт без текста), локализуется через welcome_back_title.
   Бело-фиолетовый вертикальный градиент: верх (WELCOME) белый, низ (BACK) фиол —
   работает для любого языка (1 или 2 слова). Только login. */
#modal_auth.av2 .av2-wb {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  padding: clamp(20px, 3.4vw, 34px) clamp(18px, 3vw, 30px);
  opacity: 0; pointer-events: none; transition: opacity .25s ease;
  font-family: 'Bounded', 'Montserrat', system-ui, sans-serif;
  font-weight: 800; text-transform: uppercase; letter-spacing: -.02em; line-height: .98;
  font-size: clamp(26px, 4.1vw, 40px); text-shadow: 0 2px 12px rgba(0,0,0,.45);
}
#modal_auth.av2.av2--login .av2-wb { opacity: 1; }
/* WELCOME — чисто белый; BACK — яркий фиол. градиент (раздельно, не общий). */
#modal_auth.av2 .av2-wb__w { display: block; color: #fff; -webkit-text-fill-color: #fff; }
#modal_auth.av2 .av2-wb__g {
  display: block; margin-top: 1px;
  background: linear-gradient(180deg, #8B45FF 0%, #C27DFF 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}

/* бонус-карты — только в режиме регистрации, прижаты к низу арта */
#modal_auth.av2 .av2-bonus {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  gap: 12px;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
#modal_auth.av2.av2--signup .av2-bonus { opacity: 1; pointer-events: auto; }

#modal_auth.av2 .av2-bcard {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 12px 12px;
  border-radius: 16px;
  border: 1.5px solid rgba(255,255,255,.12);
  cursor: pointer;
  text-align: center;
  overflow: hidden;
  transition: border-color .2s ease, transform .12s ease;
}
#modal_auth.av2 .av2-bcard::before {
  content: ""; position: absolute; inset: 0; z-index: 0; opacity: .9;
}
#modal_auth.av2 .av2-bcard--casino::before { background: radial-gradient(120% 100% at 50% 0%, #4a1d8f 0%, #2a1152 60%, #1a0c38 100%); }
#modal_auth.av2 .av2-bcard--sport::before  { background: radial-gradient(120% 100% at 50% 0%, #0f4e8f 0%, #0b2f5c 60%, #08203c 100%); }
#modal_auth.av2 .av2-bcard > * { position: relative; z-index: 1; }
#modal_auth.av2 .av2-bcard.is-active { border-color: #9a6bff; }
#modal_auth.av2 .av2-bcard--sport.is-active { border-color: #4aa8ff; }
#modal_auth.av2 .av2-bcard:active { transform: scale(.98); }

#modal_auth.av2 .av2-bcard__ic { width: 54px; height: 54px; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.5)); }
#modal_auth.av2 .av2-bcard__label {
  font-size: 13px; font-weight: 600; text-transform: uppercase;
  color: #fff; opacity: .8; letter-spacing: .01em;
}
#modal_auth.av2 .av2-bcard__vals { display: flex; align-items: baseline; gap: 6px; }
#modal_auth.av2 .av2-bcard__pct {
  font-family: 'Bounded', 'Montserrat', sans-serif;
  font-weight: 700; font-size: 22px; letter-spacing: -.01em;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent;
}
#modal_auth.av2 .pct-casino { background-image: linear-gradient(180deg, #8f5bff 0%, #c07dff 100%); }
#modal_auth.av2 .pct-sport  { background-image: linear-gradient(180deg, #0095FF 0%, #68C0FF 100%); }
#modal_auth.av2 .av2-bcard__suf { font-size: 13px; font-weight: 600; color: #fff; letter-spacing: -.02em; }

/* тумблер карты */
#modal_auth.av2 .av2-sw {
  margin-top: 4px;
  width: 40px; height: 22px; border-radius: 999px;
  background: rgba(255,255,255,.18); position: relative; transition: background .2s ease;
}
#modal_auth.av2 .av2-sw::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s ease;
}
#modal_auth.av2 .av2-bcard.is-active .av2-sw { background: #7b3ff2; }
#modal_auth.av2 .av2-bcard--sport.is-active .av2-sw { background: #0d8bff; }
#modal_auth.av2 .av2-bcard.is-active .av2-sw::after { left: 21px; }

/* Скроллится ВСЯ модалка: overflow убран у формы и max-height у шелла (выше),
   скролл делает существующий .modal-overlay__wrapper (overflow-y-auto) +
   .modal-content (margin auto) — центрирует, если влезает, иначе прокрутка. */
#modal_auth.av2 .modal-content { min-height: 100%; }

#modal_auth.av2 .av2-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
#modal_auth.av2 .av2-head__ic { width: 40px; height: 40px; border-radius: 11px; flex: none; }
#modal_auth.av2 .av2-head__tx { flex: 1; min-width: 0; }
#modal_auth.av2 .av2-head__title { font-size: 20px; font-weight: 700; color: #fff; line-height: 1.1; letter-spacing: .01em; text-transform: uppercase; display: none; }
#modal_auth.av2.av2--login  .av2-head__title.only-login  { display: block; }
#modal_auth.av2.av2--signup .av2-head__title.only-signup { display: block; }
#modal_auth.av2 .av2-head__sub { font-size: 13px; color: #8b95a7; margin-top: 2px; }

#modal_auth.av2 .av2-close {
  flex: none; width: 38px; height: 38px; border-radius: 11px;
  background: #172233; border: 1px solid #232f47; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s ease;
}
#modal_auth.av2 .av2-close:hover { background: #1f2b42; }
#modal_auth.av2 .av2-close img { width: 15px; }

/* табы + подчёркивание-сегменты (актив = синий градиент, пассив = #25344C) */
#modal_auth.av2 .av2-tabs { display: flex; gap: 0; border-bottom: none; margin-bottom: 20px; }
#modal_auth.av2 .av2-tabs .v-modal__auth-tabs-btn {
  flex: 1 1 0; background: none; border: none; padding: 0 0 14px; cursor: pointer;
  font-size: 15px; font-weight: 700; color: #6d7789; text-align: center; position: relative; transition: color .15s ease;
}
#modal_auth.av2 .av2-tabs .v-modal__auth-tabs-btn.active { color: #fff; }
#modal_auth.av2 .av2-tabs .v-modal__auth-tabs-btn::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: #25344C;
}
#modal_auth.av2 .av2-tabs .v-modal__auth-tabs-btn:first-child::after { border-top-right-radius: 8px; }
#modal_auth.av2 .av2-tabs .v-modal__auth-tabs-btn:last-child::after  { border-top-left-radius: 8px; }
#modal_auth.av2 .av2-tabs .v-modal__auth-tabs-btn.active::after { background: linear-gradient(180deg, #0095FF 0%, #68C0FF 100%); }

/* табы-контент */
#modal_auth.av2 .v-modal__tab { display: none; }
#modal_auth.av2 .v-modal__tab.active { display: block; }
/* .v-modal__auth из старой modalauth.css = display:grid → его row-gap добавлял
   лишние ~20px между формой и соц-кнопками. Гасим — управляем отступами сами. */
#modal_auth.av2 .av2-form-wrap { display: block; width: 100%; max-width: none; }
#modal_auth.av2 .av2-form { display: flex; flex-direction: column; gap: 11px; }

#modal_auth.av2 .av2-field { display: flex; flex-direction: column; gap: 6px; }
#modal_auth.av2 .av2-lbl { font-size: 13px; color: #9aa4b6; font-weight: 500; }

/* инпут: h50, radius 10, pad 16, gap 10, bg #172233, Montserrat 600 14 */
#modal_auth.av2 .av2-input.v-input { display: block; }
#modal_auth.av2 .av2-input .v-input__wrapper {
  display: flex; align-items: center; gap: 0;
  background: #172233; border: 1px solid #232f47; border-radius: 10px;
  padding: 0 5px; height: 50px; transition: border-color .15s ease;
}
#modal_auth.av2 .av2-input .v-input__wrapper:focus-within { border-color: #4b5f8c; }
#modal_auth.av2 .av2-input .v-input__prefix,
#modal_auth.av2 .av2-input .v-input__suffix { display: flex; align-items: center; }
#modal_auth.av2 .av2-input .v-input__prefix-btn img { width: 20px; height: 20px; object-fit: contain; }
#modal_auth.av2 .av2-input .v-input__element {
  flex: 1 1 auto; min-width: 0; background: none; border: none; outline: none;
  color: #fff; font-size: 14px; font-weight: 600; font-family: inherit; height: 100%;
  margin: 0 5px 0 0;
}
#modal_auth.av2 .av2-input .v-input__element::placeholder { color: #5f6a7d; font-weight: 600; }
#modal_auth.av2 .av2-input .v-input__border { display: none; }
#modal_auth.av2 .av2-input .v-input__element:-webkit-autofill,
#modal_auth.av2 .av2-input .v-input__element:-webkit-autofill:hover,
#modal_auth.av2 .av2-input .v-input__element:-webkit-autofill:focus {
  -webkit-text-fill-color: #fff;
  -webkit-box-shadow: 0 0 0 1000px #172233 inset;
  caret-color: #fff;
  transition: background-color 9999s ease-out 0s;
}
#modal_auth.av2 .av2-input .password-show { background: none; border: none; cursor: pointer; display: flex; padding: 0; }
#modal_auth.av2 .av2-input .password-show__ico {
  display: block; width: 20px; height: 20px; opacity: .8;
  background: url('/templates/redesign/img/auth/eye.svg') center/contain no-repeat;
}

/* строка remember / forgot */
#modal_auth.av2 .av2-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 2px; }
#modal_auth.av2 .av2-remember { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #B9BCC6; cursor: pointer; user-select: none; }
#modal_auth.av2 .av2-remember input { position: absolute; opacity: 0; width: 0; height: 0; }
#modal_auth.av2 .av2-remember span {
  width: 18px; height: 18px; border-radius: 5px; border: 1px solid #33405d; background: #141c2c; flex: none; position: relative; transition: all .15s ease;
}
#modal_auth.av2 .av2-remember input:checked + span { background: #7b3ff2; border-color: #7b3ff2; }
#modal_auth.av2 .av2-remember input:checked + span::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
#modal_auth.av2 .av2-forgot { font-size: 14px; font-weight: 600; color: #35ABFF; cursor: pointer; }
#modal_auth.av2 .av2-forgot:hover { text-decoration: underline; }

/* согласие 18+ (регистрация) */
#modal_auth.av2 .av2-terms { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: #8b95a7; line-height: 1.4; cursor: pointer; }
#modal_auth.av2 .av2-terms input { position: absolute; opacity: 0; width: 0; height: 0; }
#modal_auth.av2 .av2-terms > span:first-of-type {
  width: 18px; height: 18px; border-radius: 5px; border: 1px solid #33405d; background: #141c2c; flex: none; position: relative; margin-top: 1px; transition: all .15s ease;
}
#modal_auth.av2 .av2-terms input:checked + span:first-of-type { background: #7b3ff2; border-color: #7b3ff2; }
#modal_auth.av2 .av2-terms input:checked + span:first-of-type::after {
  content: ""; position: absolute; left: 5px; top: 1px; width: 5px; height: 10px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
#modal_auth.av2 .av2-terms > span:last-child { flex: 1; min-width: 0; }
#modal_auth.av2 .av2-terms a { color: #35ABFF; }

/* CTA */
#modal_auth.av2 .av2-cta {
  position: relative; overflow: hidden;
  height: 50px; border: none; border-radius: 12px; cursor: pointer;
  background: linear-gradient(90deg, #7C3AED 0%, #B44BFF 100%);
  color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  margin-top: 3px; transition: filter .15s ease;
}
#modal_auth.av2 .av2-cta:hover { filter: brightness(1.08); }
#modal_auth.av2 .av2-cta:disabled { opacity: .6; cursor: default; }

/* соц-кнопки (переиспользуем старую разметку .auth_socials) */
#modal_auth.av2 .auth_socials { display: block; margin-top: 5px; }
#modal_auth.av2 .auth_socials__divider { display: none; }
#modal_auth.av2 .auth_socials__description { display: none; }
#modal_auth.av2 .v-modal__auth-footer { display: none; }
#modal_auth.av2 .auth_socials > .flex { display: flex; gap: 5px; }
#modal_auth.av2 .auth_socials .v-btn {
  flex: 1 1 0; height: 42px; padding: 0 24px; border-radius: 14px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  background: #172233; border: 1px solid #232f47; color: #dfe5ef;
  font-size: 14px; font-weight: 600; text-decoration: none; transition: background .15s ease;
}
#modal_auth.av2 .auth_socials .v-btn:hover { background: #1f2b42; }
#modal_auth.av2 .auth_socials .v-btn .av2-soc-ic { width: 20px; height: 20px; object-fit: contain; }

/* ============ ВОССТАНОВЛЕНИЕ ПАРОЛЯ (#modal_auth2.av2r) — одна панель ============ */
#modal_auth2.av2r .modal-base__wrapper,
#modal_auth2.av2r .modal-base { all: unset; }
#modal_auth2.av2r .modal-content { padding: 16px; }
#modal_auth2.av2r .av2r-shell {
  width: min(420px, 94vw);
  background: #0B111E; border: 1px solid #1e2740; border-radius: 22px;
  padding: 22px 24px 24px; box-shadow: 0 24px 80px -20px rgba(0,0,0,.7);
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
}
#modal_auth2.av2r .av2r-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
#modal_auth2.av2r .av2r-back {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 14px 0 10px;
  background: #172233; border: 1px solid #232f47; border-radius: 11px;
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s ease;
}
#modal_auth2.av2r .av2r-back:hover { background: #1f2b42; }
#modal_auth2.av2r .av2r-close {
  width: 38px; height: 38px; border-radius: 11px; background: #172233; border: 1px solid #232f47;
  display: flex; align-items: center; justify-content: center; cursor: pointer; transition: background .15s ease;
}
#modal_auth2.av2r .av2r-close:hover { background: #1f2b42; }
#modal_auth2.av2r .av2r-close img { width: 15px; }
#modal_auth2.av2r .av2r-title { font-size: 22px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: -.01em; line-height: 1.1; margin-bottom: 3px; }
/* Подзаголовок меняется по шагу: step1 = "Restore access", step2 (emailcodenotice)
   = "A code to reset..." — тем же приглушённым стилем (НЕ синим). Виден только один. */
#modal_auth2.av2r .av2r-sub { font-size: 13px; color: #9aa4b6; line-height: 1.4; margin: 0 0 16px; }
#modal_auth2.av2r .av2r-sub.emailcodenotice { display: none; }
#modal_auth2.av2r .av2r-form { display: flex; flex-direction: column; gap: 14px; }
/* внутренние отступы шагов через margin (не gap), чтобы работало и когда jQuery
   .show() ставит display:block вместо flex. step2 скрыт до перехода. */
#modal_auth2.av2r .step1 > * + *,
#modal_auth2.av2r .step2 > * + * { margin-top: 14px; }
#modal_auth2.av2r .step2 { display: none; }
#modal_auth2.av2r .av2r-field { display: flex; flex-direction: column; gap: 8px; }
#modal_auth2.av2r .av2r-lbl { font-size: 13px; color: #9aa4b6; font-weight: 500; }
#modal_auth2.av2r .av2r-input .v-input__wrapper {
  display: flex; align-items: center; gap: 0; background: #172233; border: 1px solid #232f47;
  border-radius: 10px; padding: 0 5px; height: 50px; transition: border-color .15s ease;
}
#modal_auth2.av2r .av2r-input .v-input__wrapper:focus-within { border-color: #4b5f8c; }
#modal_auth2.av2r .av2r-input .v-input__prefix,
#modal_auth2.av2r .av2r-input .v-input__suffix { display: flex; align-items: center; }
#modal_auth2.av2r .av2r-input .v-input__prefix-btn img { width: 20px; height: 20px; }
#modal_auth2.av2r .av2r-input .v-input__element {
  flex: 1 1 auto; min-width: 0; background: none; border: none; outline: none; color: #fff;
  font-size: 14px; font-weight: 600; font-family: inherit; height: 100%; margin: 0 5px 0 0;
}
#modal_auth2.av2r .av2r-input .v-input__element::placeholder { color: #5f6a7d; font-weight: 600; }
#modal_auth2.av2r .av2r-input .v-input__border { display: none; }
#modal_auth2.av2r .av2r-input .password-show { background: none; border: none; cursor: pointer; display: flex; padding: 0; }
#modal_auth2.av2r .av2r-input .password-show__ico { display: block; width: 20px; height: 20px; opacity: .8; background: url('/templates/redesign/img/auth/eye.svg') center/contain no-repeat; }
#modal_auth2.av2r .av2r-info {
  display: flex; align-items: flex-start; gap: 10px; background: #172233; border: 1px solid #232f47;
  border-radius: 10px; padding: 12px 14px; font-size: 13px; color: #c3cad6; line-height: 1.4;
}
#modal_auth2.av2r .av2r-info__ic { flex: none; width: 16px; height: 16px; margin-top: 2px; }
/* step2: уведомление о коде — синим подчёркнутым текстом (как в макете) */
#modal_auth2.av2r .av2r-notice {
  font-size: 14px; font-weight: 600; color: #35ABFF; text-decoration: underline;
  text-underline-offset: 2px; line-height: 1.35;
}
#modal_auth2.av2r .av2r-cta {
  height: 50px; border: none; border-radius: 12px; cursor: pointer; margin-top: 2px;
  background: linear-gradient(90deg, #7C3AED 0%, #B44BFF 100%);
  color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase;
  transition: filter .15s ease;
}
#modal_auth2.av2r .av2r-cta:hover { filter: brightness(1.08); }

/* ---------- адаптив: < 900px — одна колонка (арт-полоса + бонусы + форма) ----------
   Двухпанель показываем только когда signup (975) реально влезает. Ниже 900 —
   стек: сверху арт-полоса (только активный слой) + бонус-карты В ПОТОКЕ, снизу форма. */
@media (max-width: 900px) {
  #modal_auth.av2 .modal-overlay__wrapper { align-items: flex-start !important; }
  #modal_auth.av2 .modal-content { padding: 12px; }
  #modal_auth.av2 .av2-head__title { font-size: 18px; }
  #modal_auth.av2 .av2-input .v-input__wrapper { height: 40px; }
  #modal_auth.av2 .av2-cta { height: 40px; }
  #modal_auth.av2 .av2-shell { padding: 16px; }
  #modal_auth.av2.av2--signup .av2-shell,
  #modal_auth.av2.av2--login  .av2-shell {
    flex-direction: column;
    width: min(460px, 94vw);
    border-radius: 18px;
  }
  /* левая панель — скрыта на мобильном */
  #modal_auth.av2 .av2-left,
  #modal_auth.av2.av2--login .av2-left { display: none; }
  /* бонус-карты — в потоке под артом (не абсолютом поверх формы) */
  #modal_auth.av2 .av2-bonus { position: static; inset: auto; opacity: 1; pointer-events: auto; padding: 12px; }
  #modal_auth.av2.av2--login .av2-bonus { display: none; }
  #modal_auth.av2 .av2-right { flex: 1 1 auto; padding: 16px 16px 20px; }
}

/* ============================================================
   Модалка отмены регистрации (#modal_auth_exit) — под стиль редизайна (av2).
   Только CSS: старую разметку modal-base не трогаем (2 копии в modals.php и
   footer.php), JS-хуки .js-exit-close / .js-back-to-register остаются.
   ============================================================ */
#modal_auth_exit .modal-overlay__wrapper { background: rgba(6,9,18,.78) !important; backdrop-filter: blur(4px); }
#modal_auth_exit .modal-content { padding: 16px; }
#modal_auth_exit .modal-base__wrapper { all: unset; }
#modal_auth_exit .modal-base {
  all: unset; box-sizing: border-box; display: block; position: relative;
  width: min(420px, 92vw);
  background: #0B111E; border: 1px solid #1e2740; border-radius: 22px;
  box-shadow: 0 24px 80px -20px rgba(0,0,0,.7);
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  padding: 22px 22px 24px;
}
#modal_auth_exit .modal-base * { box-sizing: border-box; }
#modal_auth_exit .scroll { display: block; }
#modal_auth_exit .modal-base__header { position: static; margin: 0 0 4px; background: transparent !important; border: none !important; padding: 0 !important; }
#modal_auth_exit .modal-base__header-title {
  color: #fff; font-size: 20px; font-weight: 800; line-height: 1.18;
  text-align: center; padding: 0 30px; text-wrap: balance; margin: 0;
}
#modal_auth_exit .modal-base__header-close {
  position: absolute; top: 16px; right: 16px;
  width: 34px; height: 34px; padding: 0; min-width: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: #172233; border: 1px solid #232f47; border-radius: 11px; cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
#modal_auth_exit .modal-base__header-close:hover { background: #1f2b42; border-color: #33405d; }
#modal_auth_exit .modal-base__header-close img { width: 13px; }
#modal_auth_exit .for_after { margin: 10px 0 6px; }
/* БЕЗ большого drop-shadow — его фиолетовое свечение ложилось «туманом» на текст
   ниже и делало его нечитаемым. Лёгкая тень строго вниз, не достаёт до текста. */
#modal_auth_exit .for_after img { width: 104px; height: auto; margin: 0 auto; display: block;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,.5)); }
#modal_auth_exit .bonus-text,
#modal_auth_exit .auth_socials__description {
  display: block !important; position: relative; z-index: 1; /* поверх любого свечения */
  color: #c8d0de; font-size: 13.5px; font-weight: 500;
  line-height: 1.45; margin: 4px 0 18px; text-align: center;
}
#modal_auth_exit .js-back-to-register {
  position: relative; overflow: hidden; width: 100%;
  height: 54px; border: none; border-radius: 14px; cursor: pointer;
  background: linear-gradient(90deg, #7C3AED 0%, #B44BFF 100%);
  color: #fff; font-weight: 700;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  transition: filter .15s ease;
}
#modal_auth_exit .js-back-to-register:hover { filter: brightness(1.08); }
#modal_auth_exit .js-back-to-register { font-size: 15px; }
#modal_auth_exit .base-btn__accent {
  background: #FFC93C !important; color: #2a1d00 !important; /* тёмный текст на золоте — читаемо */
  font-size: 11px !important; font-weight: 800 !important; letter-spacing: .01em;
  padding: 3px 12px !important; border-radius: 999px !important;
  display: inline-flex; align-items: center; gap: 5px; width: auto;
}
