.auth-body {
  background: #f4f8ff;
}

.auth-body > .toast.toast--sms {
  z-index: 2147483647;
  top: 50%;
  bottom: auto;
  width: max-content;
  max-width: calc(100% - 32px);
  transform: translate(-50%, -50%);
  overflow-wrap: anywhere;
  transition-property: opacity;
}

.auth-main {
  position: relative;
  isolation: isolate;
  min-height: 720px;
  overflow: hidden;
  padding: 68px 24px 76px;
  background:
    radial-gradient(circle at 78% 22%, rgba(107, 72, 238, .13), transparent 29%),
    linear-gradient(135deg, #f5f9ff 0%, #eef5ff 52%, #f8f5ff 100%);
}

.auth-main::before {
  position: absolute;
  inset: 0;
  z-index: -2;
  background: url("assets/about-trust-city-v1.png") left bottom / cover no-repeat;
  opacity: .3;
  content: "";
}

.auth-main::after {
  position: absolute;
  right: -220px;
  bottom: -250px;
  z-index: -1;
  width: 720px;
  height: 520px;
  border: 1px solid rgba(83, 112, 242, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 70px rgba(76, 128, 245, .035), 0 0 0 140px rgba(114, 78, 233, .026);
  content: "";
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  width: min(1200px, 100%);
  min-height: 590px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(211, 223, 245, .9);
  border-radius: 16px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 18px 46px rgba(43, 83, 145, .10);
}

.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  padding: 64px 56px;
  border-right: 1px solid rgba(210, 224, 248, .85);
  background: linear-gradient(145deg, rgba(239, 247, 255, .78), rgba(242, 239, 255, .65));
}

.auth-story::after {
  position: absolute;
  right: -82px;
  bottom: -90px;
  width: 350px;
  height: 350px;
  border: 1px solid rgba(51, 123, 241, .13);
  border-radius: 50%;
  box-shadow: 0 0 0 42px rgba(85, 113, 242, .04), 0 0 0 84px rgba(112, 74, 234, .025);
  content: "";
}

.auth-story-kicker {
  display: inline-flex;
  width: max-content;
  height: 34px;
  align-items: center;
  gap: 8px;
  padding: 0 15px;
  border: 1px solid rgba(67, 118, 239, .2);
  border-radius: 17px;
  background: rgba(255, 255, 255, .68);
  color: #3577e9;
  font-size: 14px;
  font-weight: 700;
}

.auth-story-kicker i {
  font-size: 18px;
}

.auth-story h1 {
  max-width: none;
  margin: 0 0 17px;
  color: #091426;
  font-size: 36px;
  line-height: 1.3;
  font-weight: 850;
  letter-spacing: -.7px;
  white-space: normal;
}

.auth-story h1 em {
  background: linear-gradient(100deg, #197cf5, #6a45ec);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-style: normal;
}

.auth-story--login { container-type: inline-size; }

.auth-story.auth-story--login > h1 {
  font-size: clamp(14px, 7cqi, 36px);
  white-space: nowrap;
}

.auth-story > p {
  max-width: 540px;
  margin: 0;
  color: #566984;
  font-size: 15px;
  line-height: 1.95;
}

.auth-benefits {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 15px 22px;
  margin-top: 34px;
}

.auth-benefits span {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #2d425f;
  font-size: 14px;
  font-weight: 700;
}

.auth-benefits i {
  display: inline-flex;
  width: 29px;
  height: 29px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: linear-gradient(145deg, #e6f2ff, #eee8ff);
  color: #3979ef;
  font-size: 17px;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 46px 54px;
  background: #fff;
}

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

.auth-card-head {
  margin-bottom: 28px;
}

.auth-card-head h2 {
  margin: 0;
  color: #111f38;
  font-size: 32px;
  line-height: 1.35;
  font-weight: 800;
}

.auth-card-head p {
  margin: 9px 0 0;
  color: #7b899d;
  font-size: 14px;
  line-height: 1.65;
}

.auth-login-tabs {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: -4px 0 24px;
  border-bottom: 1px solid #e3eaf5;
}

.auth-login-tabs button {
  position: relative;
  height: 45px;
  border: 0;
  background: transparent;
  color: #77869c;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  transition: color .2s ease;
}

.auth-login-tabs button::after {
  position: absolute;
  right: 24%;
  bottom: -1px;
  left: 24%;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, #237df4, #6947ec);
  opacity: 0;
  transform: scaleX(.45);
  transition: opacity .2s ease, transform .2s ease;
  content: "";
}

.auth-login-tabs button:hover,
.auth-login-tabs button.is-active {
  color: #176feb;
}

.auth-login-tabs button.is-active::after {
  opacity: 1;
  transform: scaleX(1);
}

.auth-form {
  display: grid;
  gap: 17px;
}

.auth-login-panel {
  display: grid;
  gap: 17px;
}

.auth-login-panel[hidden] {
  display: none;
}

.auth-field[hidden],
.auth-submit[hidden] {
  display: none;
}

.auth-wechat-panel {
  min-height: 284px;
  align-items: center;
}

.auth-wechat-login {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.auth-wechat-code {
  width: 174px;
  height: 174px;
  padding: 9px;
  border: 1px solid #dce7f6;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(44, 84, 145, .09);
}

.auth-wechat-code img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-wechat-login strong {
  margin-top: 14px;
  color: #20324d;
  font-size: 17px;
  line-height: 1.4;
}

.auth-wechat-login p {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 5px 0 0;
  color: #7a899e;
  font-size: 13px;
  line-height: 1.5;
}

.auth-wechat-login p i {
  color: #16b76a;
  font-size: 17px;
}

.auth-field {
  display: grid;
  gap: 8px;
}

.auth-field > label {
  color: #293b57;
  font-size: 14px;
  font-weight: 700;
}

.auth-input-wrap {
  position: relative;
  display: flex;
  height: 50px;
  align-items: center;
  border: 1px solid #dce5f3;
  border-radius: 10px;
  background: #fbfdff;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-input-wrap:focus-within {
  border-color: #4d84f4;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(55, 126, 245, .1);
}

.auth-input-wrap > i {
  width: 44px;
  color: #7690b4;
  font-size: 20px;
  text-align: center;
}

.auth-input-wrap input {
  min-width: 0;
  flex: 1;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #15243b;
  font: inherit;
  font-size: 15px;
}

.auth-input-wrap input::placeholder {
  color: #a7b2c3;
}

.password-toggle {
  display: inline-flex;
  width: 44px;
  height: 100%;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #7b8ca7;
  font-size: 20px;
}

.auth-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 112px;
  gap: 10px;
}

.send-code {
  border: 1px solid #bfd3fb;
  border-radius: 10px;
  background: #f2f7ff;
  color: #2c73e8;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
}

.send-code:disabled {
  cursor: not-allowed;
  opacity: .58;
}

.auth-code-tip {
  margin: 0;
  color: #7a899f;
  font-size: 13px;
  line-height: 1.55;
}

.auth-options {
  display: flex;
  min-height: 24px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #718098;
  font-size: 14px;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.auth-check input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #397bf3;
}

.auth-options a,
.auth-agreement a,
.auth-switch a {
  color: #2675ed;
  font-weight: 700;
}

.auth-submit {
  display: inline-flex;
  width: 100%;
  height: 50px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: linear-gradient(105deg, #6f3beb, #167ef7);
  box-shadow: 0 12px 26px rgba(64, 90, 232, .24);
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 750;
  transition: transform .22s ease, box-shadow .22s ease;
}

.auth-submit:hover,
.auth-submit:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(64, 90, 232, .3);
}

.auth-agreement {
  margin: -2px 0 0;
  color: #7a889e;
  font-size: 13px;
  line-height: 1.65;
}

.auth-switch {
  margin: 22px 0 0;
  color: #7a889d;
  font-size: 14px;
  text-align: center;
}

.auth-tip {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 14px;
  border-radius: 9px;
  background: #f3f7ff;
  color: #687993;
  font-size: 13px;
  line-height: 1.65;
}

.auth-tip i {
  margin-top: 1px;
  color: #387bf1;
  font-size: 17px;
}

.auth-error {
  display: none;
  color: #e04c5a;
  font-size: 13px;
  line-height: 1.4;
}

.auth-field.has-error .auth-input-wrap {
  border-color: #ec8d96;
  box-shadow: 0 0 0 3px rgba(224, 76, 90, .08);
}

.auth-field.has-error .auth-error {
  display: block;
}

@media (max-width: 1100px) {
  .auth-shell {
    grid-template-columns: minmax(0, .9fr) minmax(410px, 1.1fr);
  }

  .auth-story {
    padding-inline: 46px;
  }

  .auth-story h1 {
    font-size: 30px;
    letter-spacing: -.4px;
  }

  .auth-benefits {
    gap: 13px 16px;
  }
}

@media (max-width: 820px) {
  .auth-main {
    padding: 36px 18px 52px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-story {
    min-height: 310px;
    padding: 48px 40px;
    border-right: 0;
    border-bottom: 1px solid rgba(210, 224, 248, .85);
  }

  .auth-story h1 {
    max-width: 620px;
    margin-block: 18px 12px;
    font-size: 32px;
  }

  .auth-benefits {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 24px;
  }

  .auth-panel {
    padding: 42px 30px 48px;
  }
}

@media (max-width: 560px) {
  .auth-main {
    padding-inline: 12px;
  }

  .auth-shell {
    border-radius: 16px;
  }

  .auth-story {
    min-height: 280px;
    padding: 36px 24px;
  }

  .auth-story h1 {
    font-size: 29px;
    white-space: normal;
  }

  .auth-story > p {
    font-size: 14px;
  }

  .auth-benefits {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .auth-panel {
    padding: 34px 22px 40px;
  }

  .auth-card-head h2 {
    font-size: 26px;
  }

  .auth-code-row {
    grid-template-columns: minmax(0, 1fr) 98px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-input-wrap,
  .auth-submit,
  .password-toggle,
  .auth-login-tabs button,
  .auth-login-tabs button::after {
    transition: none;
  }
}
