:root {
  --auth-navy: #092f57;
  --auth-blue: #0879c9;
  --auth-cyan: #19b5ef;
  --auth-ice: #eef6fc;
  --auth-ink: #14243a;
  --auth-muted: #61758e;
  --auth-line: #cfdeeb;
}

.login-wrap {
  min-height: calc(100vh - 96px);
  padding: 168px 24px 72px;
  background: linear-gradient(135deg, #eaf4fb 0%, #f8fbfd 56%, #eaf7fc 100%);
}

.auth-stage {
  position: relative;
  z-index: 1;
  width: min(100%, 920px);
  height: 670px;
  overflow: hidden;
  border: 1px solid rgba(177, 204, 224, .86);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(9, 47, 87, .14);
  transition: height .72s cubic-bezier(.22, 1, .36, 1);
}

.auth-stage::before {
  content: "";
  position: absolute;
  z-index: 6;
  top: -10%;
  right: 48%;
  width: 1900px;
  height: 1900px;
  border-radius: 50%;
  transform: translateY(-50%);
  background:
    radial-gradient(circle at 70% 67%, rgba(150, 230, 255, .44), transparent 18%),
    linear-gradient(-45deg, var(--auth-navy) 8%, var(--auth-blue) 58%, var(--auth-cyan) 100%);
  box-shadow: inset -30px -35px 90px rgba(4, 29, 61, .2);
  transition: transform 1.35s cubic-bezier(.76, 0, .24, 1), right 1.35s cubic-bezier(.76, 0, .24, 1);
}

.auth-stage.sign-up-mode::before {
  right: 52%;
  transform: translate(100%, -50%);
}

.auth-stage__forms,
.auth-stage__panels {
  position: absolute;
  inset: 0;
}

.auth-stage__track {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: 75%;
  display: grid;
  width: 50%;
  grid-template-columns: 1fr;
  transform: translate(-50%, -50%);
  transition: left .92s .5s cubic-bezier(.65, 0, .35, 1);
}

.auth-stage.sign-up-mode .auth-stage__track { left: 25%; }

.auth-form {
  grid-column: 1;
  grid-row: 1;
  display: flex;
  width: 100%;
  max-height: 650px;
  flex-direction: column;
  justify-content: center;
  padding: 30px 58px;
  overflow: hidden;
  transition: opacity .22s .48s ease, transform .72s .42s cubic-bezier(.22, 1, .36, 1);
}

.auth-form--signin { z-index: 2; opacity: 1; transform: translateX(0); }
.auth-form--signup { z-index: 1; opacity: 0; transform: translateX(28px); pointer-events: none; }
.auth-stage.sign-up-mode .auth-form--signin { z-index: 1; opacity: 0; transform: translateX(-28px); pointer-events: none; }
.auth-stage.sign-up-mode .auth-form--signup { z-index: 2; opacity: 1; transform: translateX(0); pointer-events: auto; }

.auth-form__title {
  margin: 0 0 6px;
  color: var(--auth-ink);
  font-family: "Commissioner Local", Commissioner, Manrope, Arial, sans-serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -.02em;
}

.auth-form__copy {
  margin: 0 0 24px;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.55;
}

.auth-form .login-field { margin-bottom: 14px; }
.auth-form .login-label { font-size: 11px; font-weight: 550; letter-spacing: .04em; }
.auth-form .login-input { min-height: 47px; border-radius: 8px; background: #f7fafc; }
.auth-form .login-input:focus { border-color: var(--auth-blue); box-shadow: 0 0 0 3px rgba(8, 121, 201, .12); }
.auth-form .login-btn { margin-top: 18px; background: linear-gradient(100deg, var(--auth-navy), var(--auth-blue)); box-shadow: 0 8px 20px rgba(8, 82, 139, .23); }
.auth-form .login-btn:hover { background: linear-gradient(100deg, #062747, #076aae); box-shadow: 0 10px 24px rgba(8, 82, 139, .3); }
.auth-form .login-forgot { color: var(--auth-blue); }
.auth-form .login-remember { margin-bottom: 4px; }
.auth-form .login-remember input { accent-color: var(--auth-blue); }

.auth-form__hint {
  margin: -5px 0 0;
  color: var(--auth-muted);
  font-size: 11px;
  line-height: 1.45;
}

.auth-consent {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin-top: 11px;
  color: var(--auth-muted);
  font-size: 11px;
  line-height: 1.4;
  cursor: pointer;
}

.auth-consent input {
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: var(--auth-blue);
}

.auth-consent a { color: var(--auth-blue); text-underline-offset: 2px; }
.auth-consent small { font: inherit; color: #7b8da1; }

.auth-form__status {
  display: none;
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.4;
}

.auth-form__status.is-visible { display: block; }
.auth-form__status.is-error { color: #8b2020; background: #fff0f0; border: 1px solid #f1c6c6; }
.auth-form__status.is-success { color: #09527a; background: #edf8fe; border: 1px solid #b8e2f6; }

.auth-stage__panels {
  z-index: 7;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  pointer-events: none;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  text-align: center;
}

.auth-panel--left { align-items: flex-start; padding: 48px 17% 48px 7%; pointer-events: auto; }
.auth-panel--right { align-items: flex-end; padding: 48px 7% 48px 17%; pointer-events: none; }

.auth-panel__content {
  width: 100%;
  transition: transform .78s .42s cubic-bezier(.22, 1, .36, 1), opacity .3s .42s ease;
}

.auth-panel--right .auth-panel__content { opacity: 0; transform: translateX(120%); }
.auth-stage.sign-up-mode .auth-panel--left { pointer-events: none; }
.auth-stage.sign-up-mode .auth-panel--right { pointer-events: auto; }
.auth-stage.sign-up-mode .auth-panel--left .auth-panel__content { opacity: 0; transform: translateX(-120%); }
.auth-stage.sign-up-mode .auth-panel--right .auth-panel__content { opacity: 1; transform: translateX(0); }

.auth-panel__brand {
  display: block;
  width: min(100%, 245px);
  margin: 0 auto 42px;
  filter: brightness(0) invert(1);
}

.auth-panel h2 { margin: 0 0 10px; font-size: 25px; font-weight: 500; line-height: 1.15; }
.auth-panel p { max-width: 310px; margin: 0 auto 22px; font-size: 13px; line-height: 1.6; opacity: .88; }

.auth-panel__button {
  min-width: 158px;
  min-height: 44px;
  padding: 10px 22px;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 999px;
  background: transparent;
  color: #fff;
  font: 500 13px/1 "Commissioner Local", Commissioner, Manrope, Arial, sans-serif;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}

.auth-panel__button:hover { background: rgba(255, 255, 255, .13); transform: translateY(-1px); }
.auth-panel__button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
  margin: 0 0 24px;
  padding: 4px;
  border: 1px solid var(--auth-line);
  border-radius: 11px;
  background: var(--auth-ice);
}

.auth-switch__item {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 7px;
  color: var(--auth-ink);
  font: 450 14px/1.2 "Commissioner Local", Commissioner, Manrope, Arial, sans-serif;
  text-decoration: none;
}

.auth-switch__item[aria-current="page"] { color: #fff; background: linear-gradient(100deg, var(--auth-navy), var(--auth-blue)); box-shadow: 0 4px 12px rgba(8, 82, 139, .22); }

@media (max-width: 870px) {
  .login-wrap { padding: 118px 16px 56px; align-items: flex-start; }
  .auth-stage { height: 960px; max-width: 610px; border-radius: 14px; }
  .auth-stage.sign-up-mode { height: 1100px; }
  .auth-stage::before {
    left: 30%;
    right: auto;
    top: auto;
    bottom: 68%;
    width: 1500px;
    height: 1500px;
    transform: translateX(-50%);
    transition: transform 1.35s cubic-bezier(.76, 0, .24, 1), bottom 1.35s cubic-bezier(.76, 0, .24, 1);
  }
  .auth-stage.sign-up-mode::before { right: auto; bottom: 31%; transform: translate(-50%, 100%); }
  .auth-stage__track,
  .auth-stage.sign-up-mode .auth-stage__track { left: 50%; width: 100%; }
  .auth-stage__track { top: 96%; transform: translate(-50%, -100%); transition: top .92s .5s cubic-bezier(.65, 0, .35, 1); }
  .auth-stage.sign-up-mode .auth-stage__track { top: 4%; transform: translate(-50%, 0); }
  .auth-form { max-height: 720px; padding: 28px 12%; }
  .auth-stage__panels { grid-template-columns: 1fr; grid-template-rows: 1fr 2fr 1fr; }
  .auth-panel { align-items: center; padding: 24px 10%; }
  .auth-panel--left { grid-row: 1; }
  .auth-panel--right { grid-row: 3; }
  .auth-panel__brand { display: none; }
  .auth-panel h2 { font-size: 21px; }
  .auth-panel p { margin-bottom: 14px; font-size: 12px; }
  .auth-panel--right .auth-panel__content { transform: translateY(220px); }
  .auth-stage.sign-up-mode .auth-panel--left .auth-panel__content { transform: translateY(-220px); }
}

@media (max-width: 570px) {
  .login-wrap { padding: 92px 10px 48px; }
  .auth-stage { height: 930px; border-radius: 12px; }
  .auth-stage.sign-up-mode { height: 1080px; }
  .auth-form { padding: 24px 24px; }
  .auth-form__title { font-size: 27px; text-align: center; }
  .auth-form__copy { text-align: center; }
  .auth-panel { padding-inline: 22px; }
  .auth-panel h2 { font-size: 19px; }
  .auth-panel p { max-width: 270px; }

  .auth-page .ai-assistant {
    right: 14px;
    width: 58px;
    height: 58px;
  }

  .auth-page .ai-assistant.is-cookie-visible:not(.is-open) {
    opacity: 0;
    pointer-events: none;
  }

  .auth-page .ai-assistant__mascot-button {
    width: 56px;
    height: 56px;
    border: 1px solid rgba(255, 255, 255, .72);
    background: linear-gradient(145deg, var(--auth-navy), var(--auth-blue));
    box-shadow: 0 10px 24px rgba(9, 47, 87, .24);
    filter: none;
  }

  .auth-page .ai-assistant__mascot-button::before {
    content: "?";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 22px;
    font-weight: 650;
  }

  .auth-page .ai-assistant__mascot-button::after,
  .auth-page .ai-assistant__mascot-stage,
  .auth-page .ai-assistant__invite { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-stage::before,
  .auth-stage__track,
  .auth-form,
  .auth-panel__content { transition-duration: .01ms; transition-delay: 0ms; }
}
