:root {
  --login-brand: #2878f0;
  --login-brand-hot: #1764d8;
  --login-ink: #12141a;
  --login-muted: #0000008a;
  --login-border: #e2e5ec;
  --login-card-border: #edf0f5f0;
  --font-sans: Lato, "Helvetica Neue", Arial, Helvetica, "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
html:has(.login-v2-root), body:has(.login-v2-root) {
  height: 100%;
  overflow: hidden;
  scrollbar-width: none;
}
body {
  font-family: var(--font-sans);
  color: var(--login-ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

.login-v2-root {
  height: 100dvh;
  max-height: 100dvh;
  color: var(--login-ink);
  background: #fff;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.login-v2-bg {
  z-index: 0;
  pointer-events: none;
  background: #fff;
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.login-v2-bg-grid { position: absolute; inset: 0; overflow: hidden; }
.login-v2-bg-grid-img {
  pointer-events: none;
  user-select: none;
  max-width: none;
  position: absolute;
  object-fit: fill;
  width: max(100%, 192dvh);
  height: max(100%, 52.0833vw);
  top: 50%;
  transform: translate(-50%, -50%);
}
.login-v2-bg-grid-img--desktop { display: none; left: 50%; }
.login-v2-bg-grid-img--mobile { display: block; left: 42.3077%; }

.login-v2-beams {
  z-index: 15;
  pointer-events: none;
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-v2-beams span {
  position: absolute;
  top: 80px;
  left: 0;
  width: 2px;
  height: 7rem;
  border-radius: 0;
  opacity: 1;
  background-image: linear-gradient(to top, var(--login-brand) 0%, #6aa4ff 50%, color-mix(in srgb, var(--login-brand) 0%, transparent) 100%);
}

.login-v2-header {
  z-index: 20;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 20px 12px 8px 8px;
  background: transparent;
  flex-shrink: 0;
}
.login-v2-brand {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 10px;
  color: #12141a;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
}
.login-v2-brand img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: contain;
}

.login-v2-lang-wrap { position: relative; }
.login-v2-lang {
  appearance: none;
  display: flex;
  min-width: 69px;
  height: calc(3.5rem * 2 / 3);
  align-items: center;
  justify-content: space-between;
  gap: 2px;
  padding: 0 6px;
  border-radius: 4px;
  border: 1px solid #e3e6eb;
  background: transparent;
  color: #8b919b;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
}
.login-v2-lang[aria-expanded="true"],
.login-v2-lang:hover {
  border-color: var(--login-brand);
  color: var(--login-brand);
  background: transparent;
}
.login-v2-lang .lang-long { display: none; }
.login-v2-lang .lang-short { display: inline; }
.lang-chevron {
  width: 10px;
  height: 10px;
  opacity: .7;
  flex-shrink: 0;
  transition: transform .2s cubic-bezier(.16,1,.3,1);
}
.login-v2-lang[aria-expanded="true"] .lang-chevron { transform: rotate(180deg); }

.login-v2-lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 132px;
  padding: 6px;
  background: #fff;
  border: 1px solid #edf0f5;
  border-radius: 10px;
  box-shadow: 0 18px 40px rgba(63, 75, 98, .14);
  z-index: 40;
}
.login-v2-lang-menu button {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 14px;
  color: #12141a;
}
.login-v2-lang-menu button:hover,
.login-v2-lang-menu button[aria-current="true"] {
  background: #f4f6fa;
  color: var(--login-brand);
}

.login-v2-main {
  z-index: 10;
  position: relative;
  flex: auto;
  min-height: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 16px calc(88px + env(safe-area-inset-bottom, 0px));
  overflow: hidden auto;
  scrollbar-width: none;
}
.login-v2-main::-webkit-scrollbar { display: none; }

.login-v2-hero { display: none; }

.login-v2-panel {
  width: 100%;
  max-width: 390px;
}
.login-card-wrap, .login-card { width: 100%; }
.login-card-inner {
  position: relative;
  isolation: isolate;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--login-card-border);
  border-radius: 21px;
  padding: 24px 36px 36px;
  box-shadow: 0 30px 80px #3f4b621f;
}
.login-sparkles {
  pointer-events: none;
  position: absolute;
  top: -8px;
  left: -24px;
  width: 90px;
  height: 70px;
  background-image:
    radial-gradient(circle, #6aa4ff 1.1px, transparent 1.3px),
    radial-gradient(circle, var(--login-brand) 1.4px, transparent 1.6px),
    radial-gradient(circle, #9dc4ff 1px, transparent 1.2px),
    radial-gradient(circle, var(--login-brand-hot) .9px, transparent 1.1px),
    radial-gradient(circle, #4aa3ff 1.2px, transparent 1.4px);
  background-size: 90px 70px;
  background-position: 12px 18px, 28px 8px, 44px 22px, 18px 40px, 52px 38px;
  opacity: .85;
}
.login-card-title {
  margin: 0;
  color: #000000de;
  font-size: 27px;
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
}
.login-form { margin-top: 28px; }
.login-v2-root:not(.login-v2-root--register) .login-form > .login-v2-submit {
  margin-top: clamp(16px, 6dvh, 140px);
  height: 52px;
  border-radius: 8px;
  font-size: 16px;
}
.semi-form-field { margin-bottom: 24px; }
.login-v2-password-field { margin-bottom: 24px; }
.semi-form-field-label {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 10px;
  color: #000000de;
  font-size: 14px;
  font-weight: 700;
  line-height: 14px;
}
.semi-form-field-label::before {
  content: "*";
  color: var(--login-brand-hot);
  font-weight: 700;
}
.semi-input-wrapper {
  display: flex;
  align-items: center;
  height: 48px;
  min-height: 48px;
  border-radius: 8px;
  background: #fff !important;
  border: 1px solid transparent !important;
  box-shadow: 0 0 0 1px var(--login-border) !important;
  overflow: hidden;
  position: relative;
}
.semi-input-wrapper:hover { box-shadow: 0 0 0 1px #cfd5e0 !important; }
.semi-input-wrapper:focus-within { box-shadow: 0 0 0 1.5px var(--login-brand) !important; }
.semi-input-wrapper input {
  flex: auto;
  min-width: 0;
  width: 100%;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  padding: 0 16px;
  font-size: 14px;
  color: #000000de;
  box-shadow: none;
}
.semi-input-wrapper input::placeholder { color: #00000042; }
.semi-input-suffix {
  margin-right: 16px;
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #979797;
  padding: 0;
  flex-shrink: 0;
}

.login-v2-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  min-height: 24px;
}
.login-v2-agree {
  cursor: pointer;
  color: #808794;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 12px;
  line-height: 1.4;
}
.login-v2-agree input {
  appearance: none;
  width: 1em;
  height: 1em;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  background: #fff;
  border: 1px solid #d7dce5;
  border-radius: .2em;
}
.login-v2-agree input:checked {
  border-color: var(--login-brand);
  background-color: var(--login-brand);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.5 8.2L6.4 11.1L12.5 4.5' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: 50%;
  background-repeat: no-repeat;
  background-size: .75em .75em;
}
.login-v2-agree-link {
  color: var(--login-brand);
  font: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}
.login-v2-agree-link:hover { text-decoration: underline; }
.login-v2-forgot {
  color: var(--login-brand);
  flex-shrink: 0;
  font-size: 12px;
  line-height: 1.4;
  text-decoration: none;
}
.login-v2-forgot:hover { text-decoration: underline; }

.login-err {
  color: #d92d20;
  font-size: 13px;
  line-height: 1.4;
  margin: 8px 0 0;
}

.login-v2-submit {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 44px;
  margin-top: 28px;
  border: 0;
  border-radius: 6px;
  background: var(--login-brand) !important;
  color: #fff !important;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10.5px 22px color-mix(in srgb, var(--login-brand) 28%, transparent);
}
.login-v2-submit:hover { filter: brightness(1.04); }
.login-v2-submit:disabled { opacity: .5; cursor: not-allowed; }
.submit-fill {
  pointer-events: none;
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: -1;
  width: 160%;
  aspect-ratio: 1;
  border-radius: 999px;
  background: #101114;
  transform: translate(-50%, -50%) scale(0);
  transition: top .5s cubic-bezier(.22,1,.36,1), transform .5s cubic-bezier(.22,1,.36,1);
}
.login-v2-submit:hover .submit-fill,
.login-v2-submit:focus-visible .submit-fill {
  top: 50%;
  transform: translate(-50%, -50%) scale(1);
}

.login-v2-register {
  margin-top: 24px;
  text-align: center;
  color: #0000008a;
  font-size: 15px;
  line-height: 20px;
}
.register-link {
  color: var(--login-brand);
  margin-inline-start: .35em;
  font-weight: 400;
}
.register-link:hover { text-decoration: underline; }

.login-v2-divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  margin-top: 28px;
  color: var(--login-muted);
  font-size: 12px;
  white-space: nowrap;
}
.login-v2-divider::before,
.login-v2-divider::after {
  content: "";
  background: #e5e8ee;
  height: 1px;
}

.third-icons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  width: 100%;
  margin-top: 20px;
  margin-bottom: 0;
}
.third-btn {
  --third-fill-from: #f3f8ff;
  --third-fill-to: #dceaff;
  --third-shadow: color-mix(in srgb, var(--login-brand) 36%, transparent);
  position: relative;
  isolation: isolate;
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border-radius: 14px;
  border: 1px solid #e4e7ee !important;
  background: transparent;
  overflow: visible;
}
.third-btn::before {
  content: "";
  z-index: -1;
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, var(--third-fill-from) 0%, var(--third-fill-to) 100%);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .35s cubic-bezier(.22,1,.36,1);
}
.third-btn:hover {
  box-shadow: 0 8px 18px -6px var(--third-shadow);
  border-color: color-mix(in srgb, var(--login-brand) 45%, transparent) !important;
}
.third-btn:hover::before { transform: scaleY(1); }
.third-btn svg { width: 28px; height: 28px; }
.third-btn[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(-50%, 6px) scale(.92);
  background: #1e1e1e;
  color: #fff;
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 30;
}
.third-btn[data-tip]:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%) scale(1);
}

.pwd-hints {
  margin: 8px 0 0;
  color: #808794;
  font-size: 12px;
  line-height: 1.4;
}
.login-v2-back {
  display: inline-block;
  margin: 8px 0 0 auto;
  color: var(--login-brand);
  font-size: 13px;
}
.reset-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}
.reset-steps li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #0000008a;
  font-size: 12px;
  line-height: 24px;
}
.reset-steps li span {
  width: 24px;
  height: 24px;
  border-radius: 12px;
  background: #f7f7f7;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.reset-steps li.is-current { color: #000000de; font-weight: 700; }
.reset-steps li.is-current span {
  background: var(--login-brand);
  color: #fff;
}
.reset-desc {
  color: #0000008a;
  margin: 16px 0 0;
  font-size: 14px;
  line-height: 1.5;
}

.terms-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(18, 20, 26, .28);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.terms-modal[hidden] { display: none; }
.terms-dialog {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 16px;
  padding: 28px 24px 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .18);
}
.terms-dialog h3 { margin: 0; font-size: 20px; }
.terms-dialog p { color: #0000008a; font-size: 14px; line-height: 1.7; }

@media (min-width: 1280px) {
  .login-v2-bg-grid-img--desktop { display: block; }
  .login-v2-bg-grid-img--mobile { display: none; }
  .login-v2-header { padding: 20px 24px 8px; }
  .login-v2-lang {
    height: 24px;
    min-width: 72px;
    gap: 4px;
    padding: 0 8px;
  }
  .login-v2-lang .lang-short { display: none; }
  .login-v2-lang .lang-long { display: inline; }
  .lang-chevron { width: 12px; height: 12px; }

  .login-v2-main {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: center;
    padding: 0 4vw 32px;
    overflow: hidden;
  }
  .login-v2-stage,
  .login-v2-stage-slot,
  .login-v2-stage-scaled {
    display: contents;
  }
  .login-v2-stage-board {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: clamp(48px, 8vw, 160px);
    width: min(1480px, 100%);
    margin: auto;
    padding: 0 clamp(24px, 4vw, 80px);
  }
  .login-v2-hero {
    display: flex;
    flex-direction: column;
    flex: 1 1 520px;
    align-self: stretch;
    width: auto;
    min-width: 0;
    max-width: 620px;
    height: auto;
    min-height: 560px;
    padding: 12px 0 8px;
  }
  .login-v2-hero-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    height: 48px;
    margin-top: 24px;
    padding: 0 21px;
    color: var(--login-brand);
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--login-brand) 55%, transparent);
    border-radius: 999px;
    font-size: clamp(14px, 1.2vw, 18px);
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 10px 18px #373e4c0d;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .login-v2-hero-title {
    margin: clamp(48px, 8vh, 96px) 0 0;
    font-size: clamp(48px, 5.4vw, 80px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.04em;
    color: var(--login-ink);
  }
  .login-v2-hero-line { display: block; }
  .login-v2-hero-muted { color: #000000de; }
  .login-v2-hero-accent { color: var(--login-brand); }
  .login-v2-hero-trust {
    margin-top: auto;
    margin-bottom: 8px;
    color: #000;
    opacity: .54;
    font-size: 16px;
    font-weight: 700;
    white-space: nowrap;
  }
  .login-v2-panel {
    flex: 0 0 390px;
    align-self: center;
    width: 390px;
    min-width: 390px;
    max-width: 390px;
  }
  .login-card-inner {
    border-radius: 16px;
    padding: 47px;
  }
  .login-card-title {
    font-size: 36px;
    line-height: 46px;
  }
  .login-form { margin-top: 54px; }
  .semi-form-field { margin-bottom: 42px; }
  .login-v2-password-field { margin-bottom: 24px; }
  .semi-form-field-label {
    margin-bottom: 12px;
    font-size: 14px;
    line-height: 14px;
  }
  .login-v2-forgot { font-size: 16px; line-height: 20px; }
  .login-v2-root:not(.login-v2-root--register) .login-form > .login-v2-submit,
  .login-v2-submit {
    height: 58px !important;
    margin-top: 72px !important;
    border-radius: 8px !important;
    font-size: 18px;
    box-shadow: 0 14px 30px color-mix(in srgb, var(--login-brand) 28%, transparent);
  }
  .login-form--register .login-v2-submit,
  .login-form--reset .login-v2-submit {
    margin-top: 36px !important;
  }
  .login-v2-register {
    margin-top: 32px;
    font-size: 16px;
    line-height: 20px;
  }
  .login-v2-divider {
    margin-top: 40px;
    font-size: 15px;
    line-height: 19px;
  }
  .third-icons { margin-top: 36px; }
  .third-btn { border-radius: 12px; }
}
