:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #292333;
  background: #f8f5fb;
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 8%, rgba(174, 132, 255, .24), transparent 34%),
    radial-gradient(circle at 90% 88%, rgba(73, 220, 171, .18), transparent 32%),
    #f8f5fb;
}

button, input { font: inherit; }
a { color: inherit; text-decoration: none; }

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, .92fr) minmax(480px, 1.08fr);
}

.auth-visual {
  position: relative;
  overflow: hidden;
  padding: 34px clamp(34px, 5vw, 78px) 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: #fff;
  background:
    linear-gradient(150deg, rgba(74, 48, 123, .98), rgba(118, 82, 185, .94)),
    #65489f;
}

.auth-visual::before,
.auth-visual::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-visual::before {
  width: 420px;
  height: 420px;
  top: -190px;
  right: -180px;
  border: 70px solid rgba(255, 255, 255, .07);
}

.auth-visual::after {
  width: 320px;
  height: 320px;
  left: -130px;
  bottom: -190px;
  background: rgba(101, 226, 186, .12);
}

.back-link {
  position: absolute;
  z-index: 2;
  top: 26px;
  left: 28px;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: rgba(255, 255, 255, .1);
  backdrop-filter: blur(12px);
}

.brand-wrap {
  position: absolute;
  z-index: 1;
  top: 18px;
  right: 24px;
  width: 112px;
  height: 82px;
  display: grid;
  place-items: center;
}

.brand-wrap img {
  width: 122px;
  height: 122px;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(28, 14, 57, .24));
}

.visual-copy,
.profile-preview,
.benefits { position: relative; z-index: 1; }

.visual-copy { max-width: 540px; }

.kicker,
.step {
  margin: 0 0 16px;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .16em;
}

.kicker { color: #c9f7e8; }

.visual-copy h1 {
  margin: 0;
  max-width: 520px;
  font-size: clamp(36px, 4.2vw, 64px);
  line-height: .98;
  letter-spacing: -.055em;
}

.visual-copy > p:last-child {
  margin: 24px 0 0;
  max-width: 520px;
  color: rgba(255, 255, 255, .78);
  font-size: 17px;
  line-height: 1.55;
}

.profile-preview {
  margin-top: 38px;
  max-width: 520px;
  padding: 17px 18px;
  display: grid;
  grid-template-columns: 56px 1fr 36px;
  gap: 14px;
  align-items: center;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 22px;
  background: rgba(255, 255, 255, .12);
  box-shadow: 0 22px 46px rgba(25, 12, 57, .14);
  backdrop-filter: blur(18px);
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: #65489f;
  font-size: 25px;
  background: linear-gradient(145deg, #f4edff, #d8fff2);
}

.profile-preview div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-preview small { color: rgba(255, 255, 255, .65); }
.profile-preview strong { font-size: 20px; }
.profile-preview div span { color: #d3f9ed; font-size: 14px; }

.profile-preview > b {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #295f4c;
  background: #75e6bd;
}

.benefits {
  margin: 27px 0 0;
  padding: 0;
  display: grid;
  gap: 11px;
  list-style: none;
  color: rgba(255, 255, 255, .86);
  font-size: 14px;
}

.benefits span {
  margin-right: 9px;
  color: #75e6bd;
  font-weight: 900;
}

.auth-panel {
  padding: 38px clamp(26px, 6vw, 92px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.auth-card {
  width: min(100%, 470px);
}

.step { color: #8b64cf; }

.auth-card h2 {
  margin: 0;
  font-size: clamp(34px, 4vw, 48px);
  line-height: 1;
  letter-spacing: -.045em;
}

.subtitle {
  margin: 12px 0 28px;
  color: #7f778a;
  line-height: 1.5;
}

.auth-alert {
  margin: -10px 0 18px;
  padding: 12px 14px;
  border-radius: 14px;
  color: #8a3d48;
  background: #fff0f2;
  font-size: 14px;
  line-height: 1.45;
}

.auth-alert.is-info {
  color: #564279;
  background: #f0e9ff;
}

.current-account {
  margin-top: 8px;
  padding: 18px;
  border: 1px solid #ded4ee;
  border-radius: 20px;
  background: linear-gradient(145deg, #fbf8ff, #f3edff);
}

.current-account-row {
  margin-bottom: 17px;
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  align-items: center;
}

.current-account-row > span {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #245e48;
  font-weight: 900;
  background: #75e6bd;
}

.current-account-row p {
  min-width: 0;
  margin: 0;
  display: grid;
  gap: 3px;
}

.current-account-row small { color: #81788b; }
.current-account-row strong { overflow-wrap: anywhere; }

.account-switch {
  width: 100%;
  margin-top: 9px;
  padding: 10px;
  border: 0;
  color: #7552ac;
  font-size: 13px;
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.social-buttons { display: grid; gap: 12px; }
.social-buttons[hidden],
.divider[hidden] { display: none; }

.social-button {
  min-height: 56px;
  padding: 0 20px;
  border: 1px solid #ded9e4;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 750;
  background: #fff;
  box-shadow: 0 7px 18px rgba(54, 40, 78, .05);
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.social-button:hover {
  transform: translateY(-1px);
  border-color: #bca7df;
  box-shadow: 0 10px 24px rgba(64, 43, 97, .1);
}

.social-button svg { width: 22px; height: 22px; }
.social-button.is-unavailable { opacity: .62; }

.divider {
  margin: 22px 0;
  display: flex;
  align-items: center;
  gap: 14px;
  color: #9a92a3;
  font-size: 12px;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  flex: 1;
  background: #e5e0e9;
}

form { display: grid; gap: 9px; }

label {
  color: #4d4556;
  font-size: 13px;
  font-weight: 760;
}

input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: 1px solid #dcd6e2;
  border-radius: 14px;
  color: #2d2734;
  outline: none;
  background: #fff;
  transition: border-color .18s ease, box-shadow .18s ease;
}

input:focus {
  border-color: #966bd8;
  box-shadow: 0 0 0 4px rgba(150, 107, 216, .12);
}

.password-wrap {
  position: relative;
  margin-bottom: 8px;
}

.password-wrap input { padding-right: 92px; }

.password-wrap button {
  position: absolute;
  top: 50%;
  right: 8px;
  padding: 8px 9px;
  border: 0;
  transform: translateY(-50%);
  color: #8061ae;
  font-size: 12px;
  font-weight: 800;
  background: transparent;
  cursor: pointer;
}

.email-button {
  min-height: 58px;
  padding: 0 21px;
  border: 0;
  border-radius: 17px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #fff;
  font-weight: 820;
  font-size: 16px;
  background: linear-gradient(135deg, #8a5fd0, #6a48ad);
  box-shadow: 0 14px 28px rgba(105, 71, 173, .24);
  cursor: pointer;
}

.email-button:disabled { opacity: .65; cursor: wait; }
.email-button b { font-size: 21px; }

.account-note,
.legal-note {
  text-align: center;
  line-height: 1.45;
}

.registration-consent {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 9px;
  align-items: start;
  color: #6f6678;
  font-size: 12px;
  line-height: 1.4;
}
.registration-consent input { width: 17px; height: 17px; margin: 1px 0 0; accent-color: #7041ca; }
.registration-consent a { color: #6334bd; font-weight: 750; }

.account-note {
  margin: 17px 0 0;
  color: #6f6678;
  font-size: 12px;
}

.legal-note {
  margin: 9px auto 0;
  max-width: 390px;
  color: #a19aa8;
  font-size: 11px;
}

@media (max-width: 840px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-visual {
    min-height: 330px;
    padding: 100px 24px 30px;
    justify-content: flex-end;
  }
  .visual-copy h1 { font-size: clamp(34px, 10vw, 48px); }
  .visual-copy > p:last-child,
  .benefits { display: none; }
  .profile-preview { margin-top: 25px; }
  .auth-panel { padding: 34px 20px 44px; }
  .brand-wrap { width: 94px; right: 14px; }
  .brand-wrap img { width: 105px; height: 105px; }
}

@media (max-width: 460px) {
  .auth-visual { min-height: 300px; }
  .profile-preview { grid-template-columns: 48px 1fr 30px; padding: 14px; }
  .profile-avatar { width: 48px; height: 48px; }
  .auth-card h2 { font-size: 36px; }
  .social-button { min-height: 54px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
.forgot-password-link {
  display: block;
  width: max-content;
  margin: 9px 0 18px auto;
  color: #6d42bf;
  font-size: .86rem;
  font-weight: 800;
  text-decoration: none;
}
.forgot-password-link:hover { text-decoration: underline; }
.forgot-password-link.is-highlighted {
  outline: 3px solid rgba(232, 83, 157, .2);
  border-radius: 8px;
  color: #d33d8d;
}
