/* NEWLIFE_CABINET_AUTH_FLOW_V21 */
body.cabinet-auth-flow-v2{
  min-height:100vh;
  background:
    radial-gradient(circle at 13% 16%,rgba(132,84,255,.15),transparent 31rem),
    radial-gradient(circle at 77% 62%,rgba(70,162,255,.075),transparent 27rem),
    linear-gradient(180deg,#080a11 0%,#07090e 100%);
}
body.cabinet-auth-flow-v2::before{
  content:"";
  position:fixed; inset:0; z-index:-3; pointer-events:none; opacity:.27;
  background-image:
    linear-gradient(rgba(255,255,255,.024) 1px,transparent 1px),
    linear-gradient(90deg,rgba(255,255,255,.024) 1px,transparent 1px);
  background-size:58px 58px;
  mask-image:linear-gradient(to bottom,rgba(0,0,0,.92),transparent 92%);
}
body.cabinet-auth-flow-v2 .wrapper{
  width:min(1180px,calc(100% - 48px)); min-height:100vh;
  display:grid; grid-template-rows:auto 1fr auto;
  margin:0 auto; padding:28px 0 22px;
}
body.cabinet-auth-flow-v2 .topbar{
  position:relative; top:auto; z-index:30;
  display:flex; align-items:center; justify-content:space-between; gap:28px;
  padding:0; border:0; border-radius:0; background:transparent;
  box-shadow:none; backdrop-filter:none;
}
body.cabinet-auth-flow-v2 .brand-mark{
  width:46px;height:46px;flex-basis:46px;border-radius:15px;
  background:linear-gradient(145deg,#9a6dff 0%,#706ef5 52%,#56b9f8 100%);
  box-shadow:0 14px 34px rgba(112,86,242,.26),inset 0 1px 0 rgba(255,255,255,.32)
}
body.cabinet-auth-flow-v2 .brand-copy strong{font-size:18px}
body.cabinet-auth-flow-v2 .brand-copy small{color:#778293;font-size:11px}
body.cabinet-auth-flow-v2 .topbar-actions{display:none}
body.cabinet-auth-flow-v2 .nav{margin-left:auto;gap:5px}
body.cabinet-auth-flow-v2 .nav a{
  min-height:36px;padding:7px 11px;border-radius:11px;
  color:#8e98a8;font-size:12px;font-weight:700
}
body.cabinet-auth-flow-v2 .nav a:hover{
  color:#fff;background:rgba(255,255,255,.04);transform:none
}
body.cabinet-auth-flow-v2 .grid{
  position:relative; display:grid;
  grid-template-columns:minmax(0,1fr) minmax(410px,520px);
  gap:72px; align-items:center;
  min-height:calc(100vh - 150px); margin:0
}
body.cabinet-auth-flow-v2 .grid::before{
  white-space:pre-line; grid-column:1; grid-row:1; align-self:center;
  max-width:650px; padding:0 0 112px 4px;
  color:#f7f8fc; font-size:clamp(49px,5.2vw,74px);
  line-height:.98; letter-spacing:-.062em; font-weight:900;
}
body.auth-register-v2 .grid::before{content:"СОЗДАЙ АККАУНТ.\A ИГРАЙ.\A РАЗВИВАЙСЯ."}
body.auth-forgot-v2 .grid::before,
body.auth-reset-v2 .grid::before{content:"ВЕРНЁМ ДОСТУП.\A БЕЗ ЛИШНИХ\A ШАГОВ."}
body.cabinet-auth-flow-v2 .grid::after{
  position:absolute; left:6px; top:calc(50% + 112px);
  color:#737f90; font-size:11px; font-weight:800; letter-spacing:.13em
}
body.auth-register-v2 .grid::after{
  content:"ПРОФИЛЬ   •   СТАТИСТИКА   •   VIP   •   НАГРАДЫ   •   ПОДДЕРЖКА"
}
body.auth-forgot-v2 .grid::after,
body.auth-reset-v2 .grid::after{
  content:"БЕЗОПАСНОСТЬ   •   ДОСТУП   •   ИСТОРИЯ ВХОДОВ"
}
body.cabinet-auth-flow-v2 .grid > .card,
body.cabinet-auth-flow-v2 .grid > .card.half,
body.cabinet-auth-flow-v2 .grid > .card.third{
  grid-column:2; grid-row:1; width:100%; max-width:520px; justify-self:end;
  margin:0; padding:32px; overflow:hidden;
  border:1px solid rgba(255,255,255,.10); border-radius:28px;
  background:linear-gradient(180deg,rgba(22,26,38,.96),rgba(11,14,21,.94));
  box-shadow:0 34px 90px rgba(0,0,0,.46),inset 0 1px 0 rgba(255,255,255,.025);
}
body.cabinet-auth-flow-v2 .card h1,
body.cabinet-auth-flow-v2 .card h2{
  margin:0 0 22px; font-size:29px; line-height:1.08; letter-spacing:-.045em
}
body.auth-register-v2 .card h1::after,
body.auth-register-v2 .card h2::after{
  content:"Один аккаунт для профиля, статистики и возможностей NewLife."
}
body.auth-forgot-v2 .card h1::after,
body.auth-forgot-v2 .card h2::after{
  content:"Укажи почту аккаунта — мы отправим инструкции для восстановления."
}
body.auth-reset-v2 .card h1::after,
body.auth-reset-v2 .card h2::after{
  content:"Задай новый пароль для своего аккаунта NewLife."
}
body.cabinet-auth-flow-v2 .card h1::after,
body.cabinet-auth-flow-v2 .card h2::after{
  display:block; margin-top:8px; color:#788394;
  font-size:12px; line-height:1.5; letter-spacing:0; font-weight:500
}
body.cabinet-auth-flow-v2 .form-grid{
  grid-template-columns:1fr; gap:15px
}
body.auth-register-v2 .form-grid{
  grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px
}
body.auth-register-v2 .form-grid > .checkbox-line,
body.auth-register-v2 .form-grid > .btn,
body.auth-register-v2 .form-grid > button,
body.auth-register-v2 .form-grid > .form-actions{
  grid-column:1 / -1
}
body.cabinet-auth-flow-v2 .field input,
body.cabinet-auth-flow-v2 .field textarea,
body.cabinet-auth-flow-v2 .field select{
  min-height:50px; padding:13px 14px;
  border:1px solid rgba(255,255,255,.16); border-radius:15px;
  background:#0b0e15; color:#f7f8fc; font-size:14px
}
body.cabinet-auth-flow-v2 .field input:focus,
body.cabinet-auth-flow-v2 .field textarea:focus,
body.cabinet-auth-flow-v2 .field select:focus{
  border-color:rgba(156,114,255,.66);
  background:#0e121a;
  box-shadow:0 0 0 3px rgba(156,114,255,.09)
}
body.cabinet-auth-flow-v2 .btn,
body.cabinet-auth-flow-v2 button[type="submit"]{
  min-height:50px; border-radius:15px; font-size:13px; font-weight:850
}
body.cabinet-auth-flow-v2 .btn:not(.ghost),
body.cabinet-auth-flow-v2 button[type="submit"]{
  background:linear-gradient(135deg,#9768f7 0%,#7770f5 52%,#5d8cf3 100%);
  box-shadow:0 15px 32px rgba(101,80,235,.24),inset 0 1px 0 rgba(255,255,255,.18)
}
body.cabinet-auth-flow-v2 .footer{
  margin:0; padding:0; border:0; background:transparent;
  color:#545e6d; font-size:10px
}
@media(max-width:940px){
  body.cabinet-auth-flow-v2 .wrapper{width:min(720px,calc(100% - 34px))}
  body.cabinet-auth-flow-v2 .grid{
    grid-template-columns:1fr; gap:26px; min-height:auto; padding:64px 0 54px
  }
  body.cabinet-auth-flow-v2 .grid::before{
    grid-column:1; grid-row:auto; padding:0; text-align:center;
    font-size:clamp(42px,8.5vw,62px)
  }
  body.cabinet-auth-flow-v2 .grid::after{display:none}
  body.cabinet-auth-flow-v2 .grid > .card,
  body.cabinet-auth-flow-v2 .grid > .card.half,
  body.cabinet-auth-flow-v2 .grid > .card.third{
    grid-column:1; grid-row:auto; justify-self:center
  }
}
@media(max-width:620px){
  body.cabinet-auth-flow-v2 .wrapper{width:min(100% - 24px,500px);padding:17px 0 18px}
  body.cabinet-auth-flow-v2 .nav a{display:none}
  body.cabinet-auth-flow-v2 .nav a:first-child,
  body.cabinet-auth-flow-v2 .nav a:last-child{display:inline-flex}
  body.cabinet-auth-flow-v2 .grid{padding:48px 0 36px;gap:22px}
  body.auth-register-v2 .grid::before{content:"РЕГИСТРАЦИЯ"}
  body.auth-forgot-v2 .grid::before,
  body.auth-reset-v2 .grid::before{content:"ВОССТАНОВЛЕНИЕ"}
  body.cabinet-auth-flow-v2 .grid::before{
    font-size:39px;
    background:linear-gradient(90deg,#b79cff,#75c2ff);
    -webkit-background-clip:text;background-clip:text;color:transparent
  }
  body.auth-register-v2 .form-grid{grid-template-columns:1fr}
  body.auth-register-v2 .form-grid > *{grid-column:1!important}
  body.cabinet-auth-flow-v2 .field input,
  body.cabinet-auth-flow-v2 .field textarea,
  body.cabinet-auth-flow-v2 .field select{font-size:16px}
}
/* NEWLIFE_CABINET_AUTH_FLOW_V211
   Registration layout hotfix:
   the original register page has two direct .card blocks.
   V2.1 forced every card into grid-row:1, which made the info card overlap
   the registration form. Keep them in the same right column, but let the
   browser auto-place each card on its own row. */

body.auth-register-v2 .grid{
  grid-template-rows:auto auto;
  align-content:center;
  row-gap:16px;
}

body.auth-register-v2 .grid::before{
  grid-row:1 / span 2;
  align-self:center;
}

body.auth-register-v2 .grid > .card,
body.auth-register-v2 .grid > .card.half,
body.auth-register-v2 .grid > .card.third{
  grid-column:2 !important;
  grid-row:auto !important;
  align-self:start;
}

/* The second card is contextual help, not a second primary form.
   Make it visually quieter and more compact. */
body.auth-register-v2 .grid > .card ~ .card{
  padding:22px 24px;
  border-radius:21px;
  background:linear-gradient(180deg,rgba(17,21,31,.93),rgba(10,13,20,.91));
  box-shadow:0 20px 56px rgba(0,0,0,.30),inset 0 1px 0 rgba(255,255,255,.02);
}

body.auth-register-v2 .grid > .card ~ .card h1,
body.auth-register-v2 .grid > .card ~ .card h2{
  margin-bottom:13px;
  font-size:16px;
  line-height:1.25;
  letter-spacing:-.02em;
}

body.auth-register-v2 .grid > .card ~ .card h1::after,
body.auth-register-v2 .grid > .card ~ .card h2::after{
  display:none;
}

body.auth-register-v2 .grid > .card ~ .card p{
  margin:0;
  color:#9aa5b5;
  font-size:12px;
  line-height:1.65;
}

/* If the existing helper contains an inner notice/dashed block, make it
   fit inside the helper card instead of looking like another full panel. */
body.auth-register-v2 .grid > .card ~ .card .notice,
body.auth-register-v2 .grid > .card ~ .card .hint,
body.auth-register-v2 .grid > .card ~ .card .info,
body.auth-register-v2 .grid > .card ~ .card .muted-box{
  margin:0;
  padding:14px 16px;
  border-radius:14px;
  background:rgba(255,255,255,.018);
}

/* Registration form should remain the dominant block. */
body.auth-register-v2 .grid > .card:first-child{
  z-index:2;
}

@media(max-width:940px){
  body.auth-register-v2 .grid{
    grid-template-rows:auto;
    row-gap:18px;
  }

  body.auth-register-v2 .grid::before{
    grid-row:auto;
  }

  body.auth-register-v2 .grid > .card,
  body.auth-register-v2 .grid > .card.half,
  body.auth-register-v2 .grid > .card.third{
    grid-column:1 !important;
    grid-row:auto !important;
    justify-self:center;
  }

  body.auth-register-v2 .grid > .card ~ .card{
    margin-top:0;
  }
}

@media(max-width:620px){
  body.auth-register-v2 .grid > .card ~ .card{
    padding:18px;
    border-radius:18px;
  }
}

/* NEWLIFE_AUTH_CHECKBOXES_FLOW_V22
   Global checkbox redesign for register / forgot / reset auth flow screens. */

body.cabinet-auth-flow-v2 .checkbox-line{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:22px;
  color:#a4aebe;
  font-size:12px;
  line-height:1.45;
}

body.cabinet-auth-flow-v2 .checkbox-line input[type="checkbox"]{
  -webkit-appearance:none !important;
  appearance:none !important;

  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  min-height:18px !important;
  max-width:18px !important;
  max-height:18px !important;
  flex:0 0 18px !important;

  margin:0 !important;
  padding:0 !important;

  border:1px solid rgba(255,255,255,.22) !important;
  border-radius:5px !important;
  outline:none !important;

  background:#0b0e15 !important;
  background-image:none !important;
  box-shadow:none !important;

  cursor:pointer;
  vertical-align:middle;
  transition:
    border-color .16s ease,
    background .16s ease,
    box-shadow .16s ease,
    transform .12s ease;
}

body.cabinet-auth-flow-v2 .checkbox-line input[type="checkbox"]:hover{
  border-color:rgba(157,115,255,.60) !important;
}

body.cabinet-auth-flow-v2 .checkbox-line input[type="checkbox"]:focus-visible{
  border-color:#9d73ff !important;
  box-shadow:0 0 0 3px rgba(157,115,255,.14) !important;
}

body.cabinet-auth-flow-v2 .checkbox-line input[type="checkbox"]:checked{
  border-color:#9367f7 !important;
  background-color:#8e63f1 !important;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M4.1 9.2 7.3 12.3 14 5.8' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat:no-repeat !important;
  background-position:center !important;
  background-size:15px 15px !important;
  box-shadow:0 7px 18px rgba(116,79,222,.20) !important;
}

body.cabinet-auth-flow-v2 .checkbox-line input[type="checkbox"]:active{
  transform:scale(.97);
}

body.cabinet-auth-flow-v2 .checkbox-line label,
body.cabinet-auth-flow-v2 .checkbox-line span{
  color:#a4aebe;
  line-height:1.45;
}

body.cabinet-auth-flow-v2 .checkbox-line a{
  color:#b59cff;
  text-decoration:none;
}

body.cabinet-auth-flow-v2 .checkbox-line a:hover{
  color:#d3c5ff;
}

@media(max-width:620px){
  body.cabinet-auth-flow-v2 .checkbox-line{
    gap:9px;
    font-size:12px;
  }
}


/* NEWLIFE_AUTH_CONTROLS_FLOW_V23
   Radio / select / toggle redesign for register / forgot / reset. */

body.cabinet-auth-flow-v2 input[type="radio"]{
  -webkit-appearance:none !important;
  appearance:none !important;
  width:18px !important;
  height:18px !important;
  min-width:18px !important;
  min-height:18px !important;
  max-width:18px !important;
  max-height:18px !important;
  flex:0 0 18px !important;
  margin:0 !important;
  padding:0 !important;
  border:1px solid rgba(255,255,255,.23) !important;
  border-radius:50% !important;
  background:#0b0e15 !important;
  box-shadow:none !important;
  outline:none !important;
  cursor:pointer;
  transition:border-color .16s ease,box-shadow .16s ease,background .16s ease;
}

body.cabinet-auth-flow-v2 input[type="radio"]:hover{
  border-color:rgba(157,115,255,.62) !important;
}

body.cabinet-auth-flow-v2 input[type="radio"]:focus-visible{
  border-color:#9d73ff !important;
  box-shadow:0 0 0 3px rgba(157,115,255,.14) !important;
}

body.cabinet-auth-flow-v2 input[type="radio"]:checked{
  border-color:#9367f7 !important;
  background:
    radial-gradient(circle at center,#fff 0 3px,transparent 3.5px),
    linear-gradient(145deg,#9d70f9,#6e7af2) !important;
  box-shadow:0 7px 18px rgba(116,79,222,.18) !important;
}

body.cabinet-auth-flow-v2 select{
  -webkit-appearance:none !important;
  appearance:none !important;
  padding-right:42px !important;
  background-color:#0b0e15 !important;
  background-image:
    linear-gradient(45deg,transparent 50%,#8f9aaa 50%),
    linear-gradient(135deg,#8f9aaa 50%,transparent 50%) !important;
  background-position:
    calc(100% - 18px) calc(50% - 2px),
    calc(100% - 13px) calc(50% - 2px) !important;
  background-size:5px 5px,5px 5px !important;
  background-repeat:no-repeat !important;
  cursor:pointer;
}

body.cabinet-auth-flow-v2 select:hover{
  border-color:rgba(255,255,255,.23) !important;
}

body.cabinet-auth-flow-v2 select:focus{
  border-color:rgba(156,114,255,.66) !important;
  box-shadow:0 0 0 3px rgba(156,114,255,.09) !important;
}

body.cabinet-auth-flow-v2 :is(.switch,.toggle,.toggle-switch,[data-toggle]) input[type="checkbox"]{
  -webkit-appearance:none !important;
  appearance:none !important;
  width:38px !important;
  height:22px !important;
  min-width:38px !important;
  min-height:22px !important;
  max-width:38px !important;
  max-height:22px !important;
  flex:0 0 38px !important;
  margin:0 !important;
  padding:0 !important;
  border:1px solid rgba(255,255,255,.18) !important;
  border-radius:999px !important;
  background:#151a24 !important;
  background-image:none !important;
  box-shadow:inset 0 1px 2px rgba(0,0,0,.36) !important;
  cursor:pointer;
  position:relative;
  transition:background .16s ease,border-color .16s ease,box-shadow .16s ease;
}

body.cabinet-auth-flow-v2 :is(.switch,.toggle,.toggle-switch,[data-toggle]) input[type="checkbox"]::before{
  content:"";
  position:absolute;
  width:16px;
  height:16px;
  top:2px;
  left:2px;
  border-radius:50%;
  background:#d9deea;
  box-shadow:0 2px 6px rgba(0,0,0,.28);
  transition:transform .16s ease,background .16s ease;
}

body.cabinet-auth-flow-v2 :is(.switch,.toggle,.toggle-switch,[data-toggle]) input[type="checkbox"]:checked{
  border-color:rgba(147,103,247,.72) !important;
  background:linear-gradient(135deg,#8f63f1,#657af0) !important;
  box-shadow:0 7px 18px rgba(116,79,222,.18) !important;
}

body.cabinet-auth-flow-v2 :is(.switch,.toggle,.toggle-switch,[data-toggle]) input[type="checkbox"]:checked::before{
  transform:translateX(16px);
  background:#fff;
}

body.cabinet-auth-flow-v2 :is(.switch,.toggle,.toggle-switch,[data-toggle]) input[type="checkbox"]:focus-visible{
  box-shadow:0 0 0 3px rgba(157,115,255,.14) !important;
}
