/* Страница входа и регистрации. Остальной сайт не затрагивается. */
body.auth-page,
html:has(body.auth-page) { background: #ede7fa !important; }
body.auth-page::before { content: none !important; }
body.auth-page .sidebar,
body.auth-page .main-wrapper,
body.auth-page #noris-rotate-device-overlay { display: none !important; }

.auth-story-panel { display: none; }
.auth-form-heading { display: none; }

body.auth-page #auth-modal {
  display: flex !important;
  align-items: center;
  justify-content: center;
  position: fixed !important;
  inset: 0 !important;
  min-height: 100dvh;
  padding: 22px !important;
  box-sizing: border-box;
  background: #ede7fa !important;
  backdrop-filter: none !important;
  overflow: auto;
}
body.auth-page #auth-modal .modal-card {
  position: relative !important;
  inset: auto !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  width: min(940px, 100%) !important;
  max-width: none !important;
  height: min(570px, calc(100dvh - 44px)) !important;
  min-height: 500px;
  max-height: none !important;
  display: block !important;
  overflow: hidden !important;
  border: 1px solid #d8cbea !important;
  border-radius: 15px !important;
  background: #f3eeff !important;
  box-shadow: 0 22px 55px #34196525 !important;
  color: #291d44 !important;
  animation: none !important;
  transition: none !important;
}
body.auth-page #auth-modal .auth-story-panel {
  position: absolute;
  display: flex;
  inset: 0 auto 0 0;
  z-index: 2;
  width: 50%;
  background: #673ab7;
  color: #fff;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: transform .5s cubic-bezier(.22,.7,.2,1);
}
body.auth-page:not(.auth-register) #auth-modal .auth-story-panel { transform: translateX(100%); }
body.auth-page #auth-modal .auth-story-content { width: 100%; max-width: 365px; padding: 32px; box-sizing: border-box; }
body.auth-page #auth-modal .auth-story-content h1 { margin: 0 0 18px; color: #fff !important; font-size: clamp(32px, 3vw, 44px); line-height: 1.1; font-weight: 750; }
body.auth-page #auth-modal .auth-story-lead { margin: 0; color: #fff !important; font-size: 17px; line-height: 1.5; }
body.auth-page #auth-modal .auth-facts { min-height: 110px; margin-top: 30px; }
body.auth-page #auth-modal .auth-fact { min-height: 24px; margin: 0 0 14px; color: #fff !important; font-size: 14px; line-height: 1.4; opacity: 1; transition: opacity .2s ease; }
body.auth-page #auth-modal .auth-fact.is-fading { opacity: 0; }
body.auth-page #auth-modal .auth-facts-hint { margin: 0; color: #eee4ff !important; font-size: 12px; line-height: 1.4; }
body.auth-page #auth-modal .auth-story-action { min-width: 165px; margin-top: 12px; padding: 12px 26px; border: 2px solid #fff !important; border-radius: 8px; background: transparent !important; color: #fff !important; font: inherit; font-weight: 700; cursor: pointer; transition: background .18s ease, color .18s ease; }
body.auth-page #auth-modal .auth-story-action:hover,
body.auth-page #auth-modal .auth-story-action:focus-visible { background: #fff !important; color: #673ab7 !important; }
body.auth-page #auth-modal .modal-header {
  position: absolute;
  right: 12px;
  top: 10px;
  z-index: 4;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}
body.auth-page #auth-modal #auth-tabs-toggle,
body.auth-page #auth-modal .auth-form-switch-link { display: none !important; }
body.auth-page #auth-modal .modal-close-btn { width: 34px; height: 34px; color: #fff !important; background: #673ab7 !important; border: 0 !important; border-radius: 8px !important; }
body.auth-page:not(.auth-register) #auth-modal .modal-close-btn { background: #f3eeff !important; color: #673ab7 !important; }
body.auth-page #auth-modal .modal-body {
  position: absolute;
  left: 50%;
  top: 0;
  width: 50%;
  height: 100%;
  padding: 42px 48px !important;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  overflow-y: auto;
  background: #f3eeff !important;
  transition: left .5s cubic-bezier(.22,.7,.2,1);
}
body.auth-page:not(.auth-register) #auth-modal .modal-body { left: 0; }
body.auth-page #auth-modal #auth-guest-view { width: 100%; }
body.auth-page #auth-modal .auth-form-heading { display: block; margin: 0 0 28px; color: #291d44 !important; text-align: center; font-size: 28px; line-height: 1.2; }
body.auth-page #auth-modal #login-form,
body.auth-page #auth-modal #register-form { animation: auth-form-in .5s ease both; }
body.auth-page #auth-modal :is(label,.modal-title) { color: #342452 !important; }
body.auth-page #auth-modal .form-group label { display: block; margin-bottom: 6px; font-size: 13px; font-weight: 700; }
body.auth-page #auth-modal input {
  width: 100%;
  min-height: 46px;
  box-sizing: border-box;
  padding: 10px 13px;
  border: 1px solid #cdbce8 !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: #291d44 !important;
}
body.auth-page #auth-modal input::placeholder { color: #76658f; opacity: 1; }
body.auth-page #auth-modal input:focus-visible { outline: 2px solid #673ab7 !important; outline-offset: 1px; }
body.auth-page #auth-modal .btn-primary { min-height: 46px; border: 0 !important; border-radius: 8px !important; background: #673ab7 !important; color: #fff !important; box-shadow: none !important; font-weight: 700; }
body.auth-page #auth-modal .btn-primary:hover { background: #552e9d !important; }
body.auth-page #auth-modal a,
body.auth-page #auth-modal #register-form .form-group span { color: #5930a6 !important; }
body.auth-page #auth-modal :is(#reg-error-msg,#login-error-msg) { color: #512783 !important; background: #e8ddfb !important; border: 1px solid #a989dc !important; }
body.auth-page #auth-modal .modal-icon-badge { color: #673ab7 !important; background: #e9def9 !important; }
body.auth-page #auth-modal :is(#auth-forgot-view,#auth-reset-view,#auth-otp-view) :is(h4,p,span) { color: #342452 !important; }
body.auth-page #auth-modal .btn-secondary { background: #e5d9f8 !important; color: #392362 !important; border-color: #bda7e3 !important; }
body.auth-page #auth-modal:has(#auth-forgot-view[style*="block"]) .auth-form-heading,
body.auth-page #auth-modal:has(#auth-reset-view[style*="block"]) .auth-form-heading,
body.auth-page #auth-modal:has(#auth-otp-view[style*="block"]) .auth-form-heading { display: none; }
@keyframes auth-form-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 700px) {
  body.auth-page #auth-modal { padding: 10px !important; align-items: flex-start; }
  body.auth-page #auth-modal .modal-card {
    width: 100% !important;
    height: auto !important;
    min-height: calc(100dvh - 20px);
    max-height: none !important;
    overflow: visible !important;
  }
  body.auth-page #auth-modal .auth-story-panel {
    position: relative;
    inset: auto;
    width: 100%;
    min-height: 250px;
    transform: none !important;
    transition: none;
  }
  body.auth-page #auth-modal .auth-story-content { padding: 27px 22px 20px; }
  body.auth-page #auth-modal .auth-story-content h1 { font-size: 30px; margin-bottom: 10px; }
  body.auth-page #auth-modal .auth-story-lead { font-size: 14px; }
  body.auth-page #auth-modal .auth-facts { min-height: 0; margin-top: 15px; }
  body.auth-page #auth-modal .auth-fact { margin-bottom: 7px; font-size: 12px; }
  body.auth-page #auth-modal .auth-facts-hint { font-size: 11px; }
  body.auth-page #auth-modal .auth-story-action { margin-top: 15px; padding: 8px 18px; }
  body.auth-page #auth-modal .modal-body {
    position: relative;
    inset: auto !important;
    width: 100%;
    height: auto;
    min-height: 340px;
    padding: 30px 25px 35px !important;
    transition: none;
  }
  body.auth-page:not(.auth-register) #auth-modal .auth-story-panel { order: 2; }
  body.auth-page:not(.auth-register) #auth-modal .modal-body { order: 1; }
  body.auth-page #auth-modal .modal-card { display: flex !important; flex-direction: column !important; }
  body.auth-page #auth-modal .auth-form-heading { margin-bottom: 22px; font-size: 24px; }
  body.auth-page #auth-modal .modal-header { right: 10px; top: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  body.auth-page #auth-modal :is(.auth-story-panel,.modal-body,.auth-fact) { transition-duration: .01ms !important; }
  body.auth-page #auth-modal :is(#login-form,#register-form) { animation-duration: .01ms !important; }
}
