.auth-page {
  display: flex;
  min-height: 100svh;
  flex-direction: column;
}

.auth-page .site-header {
  min-height: 64px;
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
}

.auth-page .site-header__inner {
  min-height: 64px;
}

.auth-page .desktop-nav {
  gap: 26px;
}

.auth-page .desktop-nav a,
.auth-page .header-login {
  font-size: 12px;
  font-weight: 580;
}

.auth-page .brand__mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.auth-page .brand__name {
  font-size: 16px;
}

.auth-page .theme-toggle,
.auth-page .menu-toggle {
  width: 36px;
  height: 36px;
  border-radius: 8px;
}

.auth-main,
.auth-footer {
  position: relative;
  z-index: 1;
}

.auth-main {
  display: grid;
  flex: 1 0 auto;
  align-items: center;
  padding: clamp(52px, 6vw, 78px) 0;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 470px);
  align-items: center;
  gap: clamp(58px, 7vw, 92px);
}

.auth-intro {
  max-width: 610px;
}

.auth-kicker,
.auth-card__eyebrow {
  color: var(--primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .095em;
  line-height: 1.3;
  text-transform: uppercase;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid rgba(var(--primary-rgb), .24);
  border-radius: 8px;
  background: var(--primary-soft);
}

.auth-kicker::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(var(--primary-rgb), .11);
  content: "";
}

.auth-intro h1 {
  max-width: 620px;
  margin: 24px 0 18px;
  font-size: clamp(43px, 4vw, 57px);
  font-weight: 610;
  letter-spacing: -.052em;
  line-height: 1.02;
}

.auth-intro h1 span {
  color: var(--primary);
  background: linear-gradient(110deg, var(--text) 8%, color-mix(in srgb, var(--text) 55%, var(--primary)) 88%);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-intro > p {
  max-width: 520px;
  margin: 0;
  color: var(--text-soft);
  font-size: 16px;
  line-height: 1.65;
}

.auth-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
}

.auth-benefits li {
  display: grid;
  min-width: 0;
  min-height: 92px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-solid) 78%, transparent);
  grid-template-columns: 24px minmax(0, 1fr);
  align-content: start;
  align-items: start;
  gap: 9px;
}

.auth-benefits li > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(64, 214, 162, .2);
  border-radius: 7px;
  background: rgba(64, 214, 162, .09);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.auth-benefits b,
.auth-benefits small,
.auth-trust b,
.auth-trust small {
  display: block;
}

.auth-benefits b {
  font-size: 11.5px;
  line-height: 1.35;
}

.auth-benefits small {
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 10px;
  line-height: 1.4;
}

.auth-workspace-preview {
  position: relative;
  overflow: hidden;
  max-width: 560px;
  margin-top: 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0d0e10;
  box-shadow: 0 24px 70px rgba(0,0,0,.24);
}

.auth-workspace-preview::after {
  position: absolute;
  right: -80px;
  bottom: -100px;
  width: 230px;
  height: 230px;
  border-radius: 50%;
  background: rgba(var(--primary-rgb), .16);
  content: "";
  filter: blur(60px);
  pointer-events: none;
}

.auth-workspace-preview__bar {
  display: grid;
  min-height: 38px;
  padding: 0 12px;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid rgba(255,255,255,.075);
  background: #121316;
  color: #73757d;
}

.auth-workspace-preview__bar > span { display: flex; gap: 4px; }
.auth-workspace-preview__bar > span i { width: 5px; height: 5px; border-radius: 50%; background: #45474e; }
.auth-workspace-preview__bar > b { font-size: 8px; font-weight: 600; letter-spacing: .04em; }
.auth-workspace-preview__bar > em { display: inline-flex; justify-self: end; align-items: center; gap: 5px; font-size: 8px; font-style: normal; }
.auth-workspace-preview__bar > em i { width: 5px; height: 5px; border-radius: 50%; background: #67c99a; box-shadow: 0 0 8px rgba(103,201,154,.55); }

.auth-workspace-preview__body {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 128px;
  padding: 20px;
  grid-template-columns: 42px minmax(0,1fr);
  align-items: start;
  gap: 14px;
  background: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), #0d0e10;
  background-size: 100% 44px;
}

.auth-workspace-preview__mark { display: grid; width: 42px; height: 42px; place-items: center; border: 1px solid rgba(145,151,255,.3); border-radius: 11px; background: rgba(94,106,210,.16); color: #d7d9ff; font-size: 15px; font-weight: 780; }
.auth-workspace-preview__body small { display: block; color: #777980; font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.auth-workspace-preview__body b { display: block; margin-top: 3px; color: #eef0f4; font-size: 12px; font-weight: 620; }
.auth-workspace-preview__body p { display: flex; max-width: 400px; align-items: center; gap: 7px; margin: 13px 0 0; padding: 9px 10px; border: 1px solid rgba(255,255,255,.075); border-radius: 8px; background: #151619; color: #999ba2; font-size: 9px; line-height: 1.45; }
.auth-workspace-preview__body p i { color: #aeb2ff; font-style: normal; }

.auth-trust {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 11px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.auth-trust > svg {
  width: 24px;
  height: 24px;
  color: var(--primary);
}

.auth-trust b {
  font-size: 11px;
  line-height: 1.35;
}

.auth-trust small {
  margin-top: 2px;
  color: var(--text-faint);
  font-size: 10px;
  line-height: 1.4;
}

.auth-card {
  position: relative;
  width: 100%;
  padding: clamp(28px, 3vw, 34px);
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: color-mix(in srgb, var(--surface-solid) 94%, transparent);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .28), inset 0 1px rgba(255, 255, 255, .025);
  backdrop-filter: blur(18px) saturate(120%);
  -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.auth-card::before {
  position: absolute;
  z-index: -1;
  top: -55px;
  right: -35px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(var(--primary-rgb), .1);
  content: "";
  filter: blur(64px);
  pointer-events: none;
}

.auth-card__header {
  margin-bottom: 25px;
}

.auth-card__header h2 {
  margin: 9px 0 8px;
  font-size: clamp(29px, 3vw, 34px);
  font-weight: 620;
  letter-spacing: -.042em;
  line-height: 1.12;
}

.auth-card__header p {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.6;
}

.auth-signup-bonus {
  display: grid;
  margin: -7px 0 18px;
  padding: 12px 13px;
  border: 1px solid color-mix(in srgb, var(--green) 32%, var(--line));
  border-radius: 12px;
  background: color-mix(in srgb, var(--green) 9%, var(--surface-solid));
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}
.auth-signup-bonus > strong {
  display: grid;
  min-width: 58px;
  min-height: 40px;
  padding: 0 9px;
  border-radius: 9px;
  background: rgba(64, 214, 162, .12);
  place-items: center;
  color: var(--green);
  font-size: 18px;
  letter-spacing: -.025em;
}
.auth-signup-bonus b,
.auth-signup-bonus small { display: block; }
.auth-signup-bonus b { font-size: 13px; line-height: 1.35; }
.auth-signup-bonus small { margin-top: 2px; color: var(--text-faint); font-size: 11px; line-height: 1.45; }

.auth-alert {
  display: grid;
  margin-bottom: 17px;
  padding: 12px 13px;
  border-radius: 12px;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: start;
  gap: 9px;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

.auth-alert > svg {
  width: 19px;
  height: 19px;
  margin-top: 1px;
}

.auth-alert--error {
  border: 1px solid rgba(255, 107, 122, .26);
  background: rgba(255, 107, 122, .08);
  color: var(--danger);
}

.auth-provider {
  display: grid;
  width: 100%;
  min-height: 52px;
  padding: 9px 13px;
  border: 1px solid transparent;
  border-radius: 9px;
  grid-template-columns: 30px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 750;
  line-height: 1.25;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.auth-provider:hover {
  transform: translateY(-2px);
}

.auth-provider > svg {
  width: 18px;
  height: 18px;
  justify-self: end;
  opacity: .55;
  transition: opacity 160ms ease, transform 160ms ease;
}

.auth-provider:hover > svg {
  opacity: 1;
  transform: translateX(2px);
}

.auth-provider--yandex {
  border-color: rgba(255, 255, 255, .82);
  background: #fff;
  color: #141414;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .16);
}

.auth-provider--yandex:hover {
  border-color: #fff;
  background: #f7f7f7;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .22);
}

html.theme-light .auth-provider--yandex {
  border-color: rgba(22, 37, 65, .14);
  box-shadow: 0 12px 30px rgba(30, 54, 90, .1);
}

.auth-provider__icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 7px;
  background: #fc3f1d;
  color: #fff;
  font-size: 17px;
  font-weight: 850;
}

.auth-provider-note {
  margin: 10px 4px 0;
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.auth-oauth-form {
  display: grid;
  gap: 11px;
}

.auth-oauth-form .auth-provider {
  appearance: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
}

.auth-consents {
  display: grid;
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--surface-soft);
}

.auth-consent {
  display: grid;
  grid-template-columns: 17px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  color: var(--text-soft);
  font-size: 10.5px;
  line-height: 1.48;
  cursor: pointer;
}

.auth-consent input {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
  accent-color: var(--primary);
}

.auth-consent a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 2px;
}

.auth-consent a:hover {
  color: var(--primary);
}

.auth-telegram {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 11px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface-soft);
}

.auth-telegram__copy {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
}

.auth-telegram__icon {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 10px;
  background: #2aabee;
  color: #fff;
}

.auth-telegram__icon svg {
  width: 19px;
  height: 19px;
}

.auth-telegram__copy b,
.auth-telegram__copy small {
  display: block;
  line-height: 1.3;
}

.auth-telegram__copy b { font-size: 12px; }
.auth-telegram__copy small { margin-top: 3px; color: var(--text-faint); font-size: 10px; }
.auth-telegram__widget { min-width: 130px; min-height: 40px; overflow: hidden; }
.auth-telegram__widget iframe { max-width: 100%; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--text-faint);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  background: var(--line);
  content: "";
  flex: 1;
}

.auth-divider span {
  flex: 0 1 auto;
  text-align: center;
}

.auth-form {
  display: grid;
  gap: 15px;
}

.auth-field {
  display: grid;
  gap: 7px;
}

.auth-field > label {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 720;
  line-height: 1.35;
}

.auth-input-wrap {
  position: relative;
  display: block;
}

.auth-input-wrap > svg {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 13px;
  width: 18px;
  height: 18px;
  color: var(--text-faint);
  pointer-events: none;
  transform: translateY(-50%);
  transition: color 160ms ease;
}

.auth-input-wrap:focus-within > svg {
  color: var(--primary);
}

.auth-input-wrap input {
  width: 100%;
  height: 50px;
  padding: 0 14px 0 42px;
  border: 1px solid var(--line);
  border-radius: 9px;
  outline: none;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 14px;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.auth-input-wrap--password input {
  padding-right: 48px;
}

.auth-input-wrap input::placeholder {
  color: var(--text-faint);
  opacity: .7;
}

.auth-input-wrap input:hover {
  border-color: var(--line-strong);
}

.auth-input-wrap input:focus {
  border-color: rgba(var(--primary-rgb), .72);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb), .12);
}

.auth-input-wrap input:-webkit-autofill,
.auth-input-wrap input:-webkit-autofill:hover,
.auth-input-wrap input:-webkit-autofill:focus {
  border-color: rgba(var(--primary-rgb), .45);
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px var(--surface-solid) inset;
  transition: background-color 9999s ease-in-out 0s;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  width: 36px;
  height: 36px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-faint);
  transform: translateY(-50%);
  transition: background 160ms ease, color 160ms ease;
}

.password-toggle:hover {
  background: var(--surface-soft);
  color: var(--text);
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.password-toggle__hide { display: none; }
.password-toggle.is-visible .password-toggle__show { display: none; }
.password-toggle.is-visible .password-toggle__hide { display: block; }

.auth-field__hint {
  color: var(--text-faint);
  font-size: 11px;
  line-height: 1.5;
}

.auth-password-meter { display: flex; min-height: 18px; align-items: center; justify-content: space-between; gap: 12px; }
.auth-password-meter > span { display: grid; min-width: 118px; flex: 1 1 auto; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 4px; }
.auth-password-meter > span i { height: 3px; border-radius: 999px; background: var(--line-strong); transition: background-color .18s ease, transform .18s ease; }
.auth-password-meter small { flex: 0 0 auto; color: var(--text-faint); font-size: 9px; line-height: 1.35; }
.auth-password-meter[data-score="1"] > span i:nth-child(-n+1) { background: var(--danger); }
.auth-password-meter[data-score="2"] > span i:nth-child(-n+2) { background: #e5a84b; }
.auth-password-meter[data-score="3"] > span i:nth-child(-n+3) { background: #71b7e6; }
.auth-password-meter[data-score="4"] > span i:nth-child(-n+4) { background: var(--green); }
.auth-password-meter[data-score]:not([data-score="0"]) > span i { transform: scaleY(1.35); }

.auth-submit {
  position: relative;
  margin-top: 3px;
  border-radius: 9px;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: .76;
  transform: none;
}

.auth-spinner {
  display: none;
  width: 17px;
  height: 17px;
  border: 2px solid rgba(255, 255, 255, .42);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin .7s linear infinite;
}

.auth-submit.is-loading .auth-spinner { display: block; }

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-legal {
  margin: 17px 5px 0;
  color: var(--text-faint);
  font-size: 10px;
  line-height: 1.55;
  text-align: center;
}

.auth-legal a {
  color: var(--text-soft);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: 2px;
}

.auth-legal a:hover { color: var(--text); }

.auth-switch {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--text-soft);
  font-size: 12px;
}

.auth-switch a {
  color: var(--primary);
  font-weight: 760;
}

.auth-switch a:hover { color: var(--primary-hover); }

.auth-footer {
  flex: 0 0 auto;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg-elevated) 44%, transparent);
}

.auth-footer__inner {
  display: flex;
  min-height: 66px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--text-faint);
  font-size: 11px;
}

.auth-footer nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
}

.auth-footer a { transition: color 160ms ease; }
.auth-footer a:hover { color: var(--text); }

@media (max-width: 1040px) {
  .auth-layout {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 460px);
    gap: 54px;
  }

  .auth-intro h1 { font-size: 44px; }
}

@media (max-width: 860px) {
  .auth-main { padding: 46px 0 64px; }

  .auth-layout {
    width: min(calc(100% - 40px), 560px);
    grid-template-columns: 1fr;
  }

  .auth-intro { display: none; }
}

@media (max-width: 520px) {
  .auth-main { align-items: start; padding: 26px 0 42px; }

  .auth-layout { width: min(calc(100% - 24px), 500px); }

  .auth-card {
    padding: 25px 20px;
    border-radius: 20px;
  }

  .auth-card__header { margin-bottom: 22px; }
  .auth-card__header h2 { font-size: 29px; }

  .auth-telegram {
    align-items: stretch;
    flex-direction: column;
  }

  .auth-telegram__widget { width: 100%; }

  .auth-footer__inner {
    align-items: flex-start;
    padding-block: 20px;
    flex-direction: column;
  }

  .auth-footer nav {
    align-items: flex-start;
    gap: 8px;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-spinner { animation-duration: 1.5s !important; }
}
