body.crm-character-auth {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: #050505;
  color: #f4f4f4;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

body.crm-character-auth *,
body.crm-character-auth *::before,
body.crm-character-auth *::after {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.character-login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  background: #050505;
}

.character-login__art {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: clamp(32px, 5vw, 58px);
  color: #171717;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, 0.94), transparent 34%),
    linear-gradient(145deg, #f3f3f1 0%, #eeeeec 52%, #e8e8e5 100%);
  isolation: isolate;
}

.character-login__brand,
.character-login__mobile-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  letter-spacing: 0;
}

.character-login__brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 8px;
  background: #dfdfda;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.character-login__brand-mark img {
  max-width: 26px;
  max-height: 26px;
  display: block;
}

.character-login__brand-mark svg {
  width: 18px;
  height: 18px;
}

.character-login__character-wrap {
  min-height: 520px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px 0 34px;
}

.character-stage {
  position: relative;
  width: 550px;
  height: 400px;
  max-width: 100%;
  transform: scale(1.12);
  transform-origin: center bottom;
}

.character {
  position: absolute;
  bottom: 0;
  transform: skewX(calc(var(--body-skew, 0deg) + var(--extra-skew, 0deg))) translateX(var(--body-shift, 0px));
  transform-origin: bottom center;
  transition:
    height 620ms cubic-bezier(0.22, 0.85, 0.26, 1),
    transform 620ms cubic-bezier(0.22, 0.85, 0.26, 1);
  will-change: transform;
}

.character--purple {
  left: 70px;
  z-index: 1;
  width: 180px;
  height: 400px;
  border-radius: 10px 10px 0 0;
  background: #6c3ff5;
}

.character--black {
  left: 240px;
  z-index: 2;
  width: 120px;
  height: 310px;
  border-radius: 8px 8px 0 0;
  background: #2d2d2d;
}

.character--orange {
  left: 0;
  z-index: 3;
  width: 240px;
  height: 200px;
  border-radius: 120px 120px 0 0;
  background: #ff9b6b;
}

.character--yellow {
  left: 310px;
  z-index: 4;
  width: 140px;
  height: 230px;
  border-radius: 70px 70px 0 0;
  background: #e8d754;
}

.character-stage.is-password-private .character--purple {
  height: 440px;
  --body-shift: 40px;
  --extra-skew: -12deg;
}

.character-stage.is-password-private .character--black {
  --extra-skew: 2deg;
}

.character-stage.is-looking:not(.is-password-visible) .character--black {
  --body-shift: 20px;
  --extra-skew: 10deg;
}

.character-stage.has-password.is-password-visible .character {
  --body-skew: 0deg !important;
  --extra-skew: 0deg;
  --body-shift: 0px;
}

.character-eyes {
  position: absolute;
  display: flex;
  align-items: center;
  transition:
    left 620ms cubic-bezier(0.22, 0.85, 0.26, 1),
    top 620ms cubic-bezier(0.22, 0.85, 0.26, 1);
}

.character--purple .character-eyes {
  left: calc(45px + var(--face-x, 0px));
  top: calc(40px + var(--face-y, 0px));
  gap: 32px;
}

.character--black .character-eyes {
  left: calc(26px + var(--face-x, 0px));
  top: calc(32px + var(--face-y, 0px));
  gap: 24px;
}

.character--orange .character-eyes {
  left: calc(82px + var(--face-x, 0px));
  top: calc(90px + var(--face-y, 0px));
  gap: 32px;
}

.character--yellow .character-eyes {
  left: calc(52px + var(--face-x, 0px));
  top: calc(40px + var(--face-y, 0px));
  gap: 24px;
}

.character-stage.is-looking:not(.is-password-visible) .character--purple .character-eyes {
  left: 55px;
  top: 65px;
}

.character-stage.is-looking:not(.is-password-visible) .character--black .character-eyes {
  left: 32px;
  top: 12px;
}

.character-stage.has-password.is-password-visible .character--purple .character-eyes {
  left: 20px;
  top: 35px;
}

.character-stage.has-password.is-password-visible .character--black .character-eyes {
  left: 10px;
  top: 28px;
}

.character-stage.has-password.is-password-visible .character--orange .character-eyes {
  left: 50px;
  top: 85px;
}

.character-stage.has-password.is-password-visible .character--yellow .character-eyes {
  left: 20px;
  top: 35px;
}

.character-eye {
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 999px;
  background: #fff;
  transition: height 140ms ease, transform 140ms ease;
}

.character-eye--purple {
  width: 18px;
  height: 18px;
}

.character-eye--black {
  width: 16px;
  height: 16px;
}

.character.is-blinking .character-eye {
  height: 2px;
}

.character-pupil {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #2d2d2d;
  transform: translate(var(--pupil-x, 0px), var(--pupil-y, 0px));
  transition: transform 90ms ease-out;
}

.character-eye--black .character-pupil {
  width: 6px;
  height: 6px;
}

.character-pupil--solo {
  width: 12px;
  height: 12px;
}

.character-mouth {
  position: absolute;
  left: calc(40px + var(--face-x, 0px));
  top: calc(88px + var(--face-y, 0px));
  width: 80px;
  height: 4px;
  border-radius: 999px;
  background: #2d2d2d;
  transition:
    left 200ms ease-out,
    top 200ms ease-out,
    transform 200ms ease-out;
}

.character-stage.has-password.is-password-visible .character-mouth {
  left: 10px;
  top: 88px;
}

.character-login__art-footer {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  color: #747474;
  font-size: 13px;
  font-weight: 700;
}

.character-login__art-footer a {
  color: inherit;
  text-decoration: none;
  transition: color 160ms ease;
}

.character-login__art-footer a:hover,
.character-login__art-footer a:focus-visible {
  color: #171717;
}

.character-login__form-panel {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(30px, 6vw, 72px);
  background: #050505;
  color: #f4f4f4;
}

.character-login__form-wrap {
  width: min(100%, 480px);
}

.character-login__mobile-brand {
  display: none;
  justify-content: center;
  margin-bottom: 44px;
  color: #f4f4f4;
}

.character-login__mobile-brand .character-login__brand-mark {
  color: #050505;
  background: #f1f1f1;
  box-shadow: none;
}

.character-login__forms {
  position: relative;
  align-items: start;
  min-height: 355px;
  overflow: hidden;
  transition: min-height 360ms cubic-bezier(0.22, 0.85, 0.26, 1);
}

.character-login.is-register-mode .character-login__forms {
  min-height: 420px;
}

.character-login__panel {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(42px);
  visibility: hidden;
  transition: opacity 260ms ease, transform 420ms cubic-bezier(0.22, 0.85, 0.26, 1);
}

.character-login__panel--login {
  transform: translateX(-42px);
}

.character-login.is-login-mode .character-login__panel--login,
.character-login.is-register-mode .character-login__panel--register {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
  visibility: visible;
}

.character-login__header {
  margin-bottom: 34px;
  text-align: center;
}

.character-login__header h1 {
  margin: 0 0 10px;
  color: #f5f5f5;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 850;
  letter-spacing: 0;
}

.character-login__header p {
  margin: 0;
  color: #8f8f8f;
  font-size: 16px;
  line-height: 1.55;
}

.character-login__form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.character-login__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.character-login__field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.character-login__field label,
.character-login__check span {
  color: #ededed;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.2;
}

.character-login__input-wrap {
  position: relative;
}

.character-login__input {
  width: 100%;
  height: 54px;
  border: 1px solid #1d1d1d;
  border-radius: 8px;
  padding: 0 14px;
  background: #050505;
  color: #f4f4f4;
  font: 650 15px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  outline: 0;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.character-login__input::placeholder {
  color: #737373;
}

.character-login__input:focus {
  border-color: #333;
  background: #090909;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.04);
}

.character-login__input--password {
  padding-right: 48px;
}

.character-login__password-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #8b8b8b;
  cursor: pointer;
  transform: translateY(-50%);
  transition: color 160ms ease, background-color 160ms ease;
}

.character-login__password-toggle:hover,
.character-login__password-toggle:focus-visible {
  color: #f2f2f2;
  background: #171717;
}

.character-login__password-toggle svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.character-login__password-toggle [data-icon-hide] {
  display: none;
}

.character-login__password-toggle.is-visible [data-icon-show] {
  display: none;
}

.character-login__password-toggle.is-visible [data-icon-hide] {
  display: block;
}

.character-login__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: -2px;
}

.character-login__check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  cursor: pointer;
}

.character-login__check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #f2f2f2;
}

.character-login__link {
  color: #dedede;
  font-size: 14px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.character-login__link:hover,
.character-login__link:focus-visible {
  text-decoration: underline;
}

.character-login__submit {
  width: 100%;
  height: 56px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  background: #f0f0ee;
  color: #161616;
  font: 800 15px/1 Inter, ui-sans-serif, system-ui, sans-serif;
  cursor: pointer;
  box-shadow: none;
  transition: background-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}

.character-login__submit:hover,
.character-login__submit:focus-visible {
  background: #fff;
  box-shadow: 0 14px 34px rgba(255, 255, 255, 0.08);
}

.character-login__submit:active {
  transform: translateY(1px);
}

.character-login__submit[disabled] {
  cursor: wait;
  opacity: 0.74;
}

.character-login__secondary {
  margin-top: 26px;
  color: #a0a0a0;
  font-size: 14px;
  line-height: 1.5;
  text-align: center;
}

.character-login__secondary a {
  color: #f4f4f4;
  font-weight: 800;
  text-decoration: none;
}

.character-login.is-register-mode .character-login__secondary {
  margin-top: 18px;
  color: #bdbdbd;
  font-weight: 650;
}

.character-login.is-register-mode .character-login__secondary a {
  color: #fff;
  font-weight: 850;
}

.character-login__secondary a:hover,
.character-login__secondary a:focus-visible {
  text-decoration: underline;
}

.character-login__alert {
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.45;
  margin-bottom: 18px;
}

.character-login__alert--danger {
  color: #ffb4bd;
  border-color: rgba(255, 108, 122, 0.24);
  background: rgba(111, 25, 36, 0.28);
}

.character-login__alert--success {
  color: #b7f5d2;
  border-color: rgba(86, 203, 137, 0.24);
  background: rgba(23, 91, 55, 0.28);
}

.character-login__notice {
  border: 1px solid #242424;
  border-radius: 8px;
  padding: 11px 13px;
  color: #bdbdbd;
  background: #0d0d0d;
  font-size: 13px;
  line-height: 1.45;
}

.character-login__language {
  margin-top: 30px;
  display: flex;
  justify-content: center;
}

.crm-character-auth .language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid #242424;
  border-radius: 999px;
  background: #0b0b0b;
}

.crm-character-auth .language-switcher__item {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-radius: 999px;
  color: #878787;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

.crm-character-auth .language-switcher__item small {
  color: inherit;
  font-size: 11px;
  font-weight: 700;
}

.crm-character-auth .language-switcher__item.is-active {
  color: #101010;
  background: #f0f0ee;
}

.crm-character-auth .language-switcher__item:not(.is-active):hover,
.crm-character-auth .language-switcher__item:not(.is-active):focus-visible {
  color: #f4f4f4;
  background: #171717;
}

@media (max-width: 980px) {
  .character-login {
    grid-template-columns: 1fr;
  }

  .character-login__art {
    min-height: 360px;
    padding: 24px;
  }

  .character-login__brand {
    align-self: flex-start;
  }

  .character-login__character-wrap {
    min-height: 250px;
    padding: 0;
  }

  .character-stage {
    width: 550px;
    max-width: none;
    transform: scale(0.62);
    transform-origin: center bottom;
    margin: -110px 0 -10px;
  }

  .character-login__art-footer {
    display: none;
  }

  .character-login__form-panel {
    min-height: auto;
    padding: 42px 24px 54px;
  }
}

@media (min-width: 981px) {
  .character-login.is-register-mode .character-login__form-wrap {
    transform: none;
  }

  .character-login.is-register-mode .character-login__forms {
    min-height: 420px;
  }

  .character-login.is-register-mode .character-login__header {
    margin-bottom: 28px;
  }

  .character-login.is-register-mode .character-login__form {
    gap: 14px;
  }

  .character-login.is-register-mode .character-login__input {
    height: 50px;
  }

  .character-login.is-register-mode .character-login__language {
    margin-top: 18px;
  }
}

@media (max-width: 560px) {
  .character-login__art {
    display: none;
  }

  .character-login__form-panel {
    min-height: 100vh;
    padding: 30px 20px;
  }

  .character-login__mobile-brand {
    display: inline-flex;
    width: 100%;
  }

  .character-login__header h1 {
    font-size: 28px;
  }

  .character-login__actions {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .crm-character-auth *,
  .crm-character-auth *::before,
  .crm-character-auth *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
