.login-page {
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% 12%, rgba(22, 119, 255, 0.13), transparent 27rem),
    radial-gradient(circle at 8% 88%, rgba(240, 68, 68, 0.08), transparent 26rem),
    #07090d;
}

.login-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid rgba(38, 50, 68, 0.66);
  background: rgba(7, 9, 13, 0.84);
  backdrop-filter: blur(20px);
}

.login-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
}

.back-home {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  transition: color 160ms ease;
}

.back-home:hover {
  color: var(--text);
}

.login-main {
  display: grid;
  min-height: calc(100vh - 137px);
  padding: 44px 0 30px;
  place-items: center;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.72fr);
  min-height: 650px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(13, 18, 27, 0.94);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.38);
}

.login-visual {
  position: relative;
  min-height: 650px;
  overflow: hidden;
  background: #090d14;
}

.login-visual > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 63% center;
  filter: saturate(0.78) contrast(1.06);
}

.login-visual-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(5, 7, 10, 0.96) 0%, rgba(5, 7, 10, 0.68) 53%, rgba(5, 7, 10, 0.2)),
    linear-gradient(0deg, rgba(5, 7, 10, 0.82), transparent 48%);
}

.login-visual-lines {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(112deg, transparent 48%, rgba(22, 119, 255, 0.34) 48.15%, transparent 48.3%),
    linear-gradient(70deg, transparent 49%, rgba(240, 68, 68, 0.25) 49.15%, transparent 49.3%);
  opacity: 0.68;
}

.login-visual-copy {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  flex-direction: column;
  max-width: 540px;
  min-height: 650px;
  padding: 64px;
}

.login-visual-copy h1 {
  margin: 13px 0 20px;
  font-size: clamp(42px, 4.1vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.065em;
}

.login-visual-copy h1 span {
  display: block;
  white-space: nowrap;
}

.login-visual-copy > p {
  max-width: 490px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.85;
}

.login-benefits {
  display: grid;
  margin-top: 35px;
  gap: 14px;
}

.login-benefits span {
  display: flex;
  align-items: center;
  color: #d8e1ee;
  gap: 10px;
  font-size: 13px;
}

.login-benefits svg {
  color: var(--blue-light);
}

.login-visual-tag {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: 24px;
  left: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 19px;
  border: 1px solid rgba(84, 112, 154, 0.3);
  border-radius: 14px;
  background: rgba(9, 13, 20, 0.72);
  backdrop-filter: blur(12px);
}

.login-visual-tag strong {
  color: var(--blue-light);
  font-size: 11px;
  letter-spacing: 0.12em;
}

.login-visual-tag span {
  color: var(--muted);
  font-size: 11px;
}

.auth-card {
  display: flex;
  min-width: 0;
  padding: 48px;
  flex-direction: column;
  background:
    radial-gradient(circle at 100% 0, rgba(22, 119, 255, 0.1), transparent 18rem),
    var(--surface);
}

.auth-heading h2 {
  margin: 9px 0 8px;
  font-size: 34px;
  letter-spacing: -0.05em;
}

.auth-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 30px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a0e15;
}

.auth-tab {
  position: relative;
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--weak);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.auth-tab.active {
  background: var(--card-high);
  color: var(--text);
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.25);
}

.auth-tab.active::after {
  position: absolute;
  right: 22%;
  bottom: -5px;
  left: 22%;
  height: 2px;
  background: var(--blue);
  content: "";
}

.auth-panel {
  display: none;
  margin-top: 27px;
}

.auth-panel.active {
  display: block;
}

.account-form {
  display: grid;
  gap: 19px;
}

.field {
  display: grid;
  color: #dbe3ef;
  gap: 8px;
  font-size: 12px;
  font-weight: 750;
}

.field > input,
.password-field {
  width: 100%;
  height: 50px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #0a0e15;
  color: var(--text);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.field > input {
  padding: 0 15px;
  outline: 0;
}

.field > input:focus,
.password-field:focus-within {
  border-color: rgba(45, 140, 255, 0.82);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.field.invalid > input,
.field.invalid .password-field {
  border-color: rgba(240, 68, 68, 0.78);
}

.field input::placeholder {
  color: #526075;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  overflow: hidden;
}

.password-field input {
  width: 100%;
  height: 100%;
  padding: 0 8px 0 15px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.password-toggle {
  height: 34px;
  margin-right: 8px;
  padding: 0 9px;
  border: 0;
  border-radius: 7px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
}

.field-error {
  min-height: 14px;
  color: #ff7777;
  font-size: 10px;
  font-weight: 600;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.check-option,
.agreement {
  display: flex;
  align-items: flex-start;
  color: var(--muted);
  gap: 8px;
  font-size: 11px;
  line-height: 1.6;
}

.check-option input,
.agreement input {
  width: 15px;
  height: 15px;
  flex: none;
  margin: 1px 0 0;
  accent-color: var(--blue);
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--blue-light);
  cursor: pointer;
  font-size: 11px;
}

.primary-login-button,
.official-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, #1677ff, #1f64df);
  color: white;
  cursor: pointer;
  gap: 9px;
  font-size: 14px;
  font-weight: 850;
  box-shadow: 0 12px 28px rgba(22, 119, 255, 0.25);
}

.primary-login-button:hover,
.official-login-button:hover {
  filter: brightness(1.08);
}

.register-line {
  margin: 22px 0 0;
  color: var(--weak);
  font-size: 11px;
  text-align: center;
}

.wechat-mode-tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}

.wechat-mode {
  position: relative;
  padding: 0 0 13px;
  border: 0;
  background: none;
  color: var(--weak);
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.wechat-mode.active {
  color: var(--text);
}

.wechat-mode.active::after {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: #22b66e;
  content: "";
}

.wechat-view {
  display: none;
}

.wechat-view.active {
  display: block;
}

.wechat-view[data-wechat-view="qr"] {
  padding-top: 24px;
  text-align: center;
}

.qr-frame {
  position: relative;
  width: 174px;
  height: 174px;
  margin: 0 auto;
  padding: 10px;
  overflow: hidden;
  border: 1px solid rgba(34, 182, 110, 0.42);
  border-radius: 16px;
  background: white;
  box-shadow: 0 15px 38px rgba(0, 0, 0, 0.3);
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-refresh-layer {
  position: absolute;
  inset: 0;
  display: grid;
  visibility: hidden;
  place-items: center;
  background: rgba(7, 9, 13, 0.82);
  color: white;
  opacity: 0;
  font-size: 12px;
  transition: opacity 180ms ease;
}

.qr-frame.refreshed .qr-refresh-layer {
  visibility: visible;
  opacity: 1;
}

.wechat-view h3 {
  margin: 18px 0 7px;
  font-size: 18px;
}

.wechat-view > p {
  margin: 0 auto;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.qr-refresh {
  margin-top: 15px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
}

.qr-validity {
  display: block;
  margin-top: 10px;
  color: var(--weak);
  font-size: 9px;
}

.qr-validity b {
  color: #78daa8;
}

.wechat-view[data-wechat-view="official"] {
  padding-top: 22px;
}

.official-status {
  padding: 18px;
  border: 1px solid rgba(34, 182, 110, 0.24);
  border-radius: 13px;
  background: rgba(34, 182, 110, 0.07);
}

.official-badge {
  display: inline-block;
  margin-bottom: 10px;
  padding: 4px 8px;
  border-radius: 6px;
  background: #22b66e;
  color: white;
  font-size: 9px;
  font-weight: 850;
}

.official-status strong {
  display: block;
  font-size: 15px;
}

.official-status p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.65;
}

.official-steps {
  margin: 16px 0;
  padding: 0;
  list-style: none;
}

.official-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  min-height: 47px;
  border-bottom: 1px solid var(--line);
  color: #d6deea;
  gap: 10px;
  font-size: 11px;
}

.official-steps b {
  color: #45cc88;
  font-size: 9px;
  font-style: italic;
}

.wechat-environment {
  display: flex;
  align-items: center;
  margin-bottom: 13px;
  color: var(--muted);
  gap: 8px;
  font-size: 10px;
}

.environment-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(244, 183, 64, 0.1);
}

.wechat-environment.detected .environment-dot {
  background: #22b66e;
  box-shadow: 0 0 0 4px rgba(34, 182, 110, 0.1);
}

.official-login-button {
  background: linear-gradient(135deg, #22b66e, #168f56);
  box-shadow: 0 12px 28px rgba(34, 182, 110, 0.2);
}

.agreement {
  margin-top: auto;
  padding-top: 22px;
}

.agreement a {
  color: var(--blue-light);
}

.login-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 61px;
  color: var(--weak);
  font-size: 10px;
}

.login-footer nav {
  display: flex;
  gap: 20px;
}

.login-toast {
  position: fixed;
  z-index: 50;
  bottom: 28px;
  left: 50%;
  visibility: hidden;
  max-width: calc(100% - 32px);
  padding: 12px 17px;
  border: 1px solid rgba(39, 194, 129, 0.35);
  border-radius: 10px;
  background: rgba(12, 34, 28, 0.96);
  color: #8de2bc;
  opacity: 0;
  font-size: 12px;
  transform: translate(-50%, 10px);
  transition: 180ms ease;
}

.login-toast.show {
  visibility: visible;
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 980px) {
  .login-shell {
    grid-template-columns: minmax(0, 0.85fr) minmax(400px, 1fr);
  }

  .login-visual-copy {
    padding: 44px;
  }

  .login-visual-copy h1 {
    font-size: 44px;
  }

  .login-visual-tag {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }
}

@media (max-width: 760px) {
  .login-page {
    padding-bottom: 0;
  }

  .login-header-inner {
    min-height: 64px;
  }

  .login-header .brand-logo {
    height: 40px;
  }

  .login-header .brand-name {
    font-size: 19px;
  }

  .back-home {
    font-size: 11px;
  }

  .login-main {
    display: block;
    min-height: auto;
    padding: 20px 0 28px;
  }

  .login-shell {
    display: block;
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }

  .login-visual {
    min-height: 176px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
    border-radius: 18px;
  }

  .login-visual > img {
    object-position: 65% 31%;
  }

  .login-visual-shade {
    background:
      linear-gradient(90deg, rgba(5, 7, 10, 0.9), rgba(5, 7, 10, 0.2)),
      linear-gradient(0deg, rgba(5, 7, 10, 0.72), transparent 60%);
  }

  .login-visual-copy {
    justify-content: flex-end;
    min-height: 176px;
    padding: 20px;
  }

  .login-visual-copy h1 {
    margin: 6px 0 0;
    font-size: 29px;
    line-height: 1.08;
  }

  .login-visual-copy > p,
  .login-benefits,
  .login-visual-tag {
    display: none;
  }

  .auth-card {
    min-height: 600px;
    padding: 25px 20px 22px;
    border: 1px solid var(--line);
    border-radius: 18px;
  }

  .auth-heading h2 {
    font-size: 28px;
  }

  .auth-tabs {
    margin-top: 23px;
  }

  .agreement {
    margin-top: 27px;
  }

  .login-footer {
    align-items: flex-start;
    min-height: auto;
    padding-bottom: 26px;
    flex-direction: column;
    gap: 12px;
  }

  .login-footer nav {
    gap: 16px;
  }
}

@media (max-width: 380px) {
  .login-header .brand-logo {
    height: 36px;
  }

  .login-header .brand-name {
    font-size: 17px;
  }

  .auth-card {
    padding-right: 16px;
    padding-left: 16px;
  }

  .wechat-mode-tabs {
    gap: 17px;
  }
}
