:root {
  --login-bg: #f6f7fb;
  --login-border: #e1e6ee;
  --login-muted: #667085;
  --login-text: #172033;
}

* {
  box-sizing: border-box;
}

body {
  align-items: center;
  background: var(--login-bg);
  color: var(--login-text);
  display: flex;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  justify-content: center;
  margin: 0;
  min-height: 100vh;
  padding: 24px;
}

body::before {
  background: #0d6efd;
  content: "";
  height: 4px;
  left: 0;
  position: fixed;
  right: 0;
  top: 0;
}

.login-shell {
  width: min(400px, 100%);
}

.login-shell--with-guide {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(360px, 400px) 286px;
  width: min(702px, 100%);
}

.login-shell--with-tour {
  align-items: stretch;
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(480px, 600px) minmax(360px, 400px);
  width: min(1016px, 100%);
}

.login-shell--with-tour .public-legal-footer {
  grid-column: 1 / -1;
}

.login-product-tour {
  background: #fff;
  border: 1px solid var(--login-border);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(23, 32, 51, .07);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 22px;
}

.login-product-tour__mobile-bar,
.login-product-tour-trigger {
  display: none;
}

.login-product-tour__head > span {
  color: #0d6efd;
  display: block;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .08em;
  margin-bottom: 5px;
}

.login-product-tour__head h1 {
  color: #172033;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.35;
  margin: 0;
}

.login-product-tour__head p {
  color: #667085;
  font-size: .76rem;
  line-height: 1.55;
  margin: 5px 0 14px;
}

.login-product-tour__viewport {
  background: #eef4fc;
  border: 1px solid #dce7f7;
  border-radius: 10px;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.login-product-tour__slide {
  display: none;
  height: 100%;
  min-height: 356px;
}

.login-product-tour__slide.is-active {
  display: flex;
  flex-direction: column;
}

.login-product-tour__slide picture {
  align-items: center;
  background: #e7eef9;
  display: flex;
  flex: 1;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
}

.login-product-tour__slide img {
  display: block;
  height: 100%;
  max-height: 292px;
  object-fit: contain;
  width: 100%;
}

.login-product-tour__slide > div {
  background: #fff;
  border-top: 1px solid #dce7f7;
  padding: 10px 12px;
}

.login-product-tour__slide strong {
  color: #172033;
  display: block;
  font-size: .85rem;
  font-weight: 800;
}

.login-product-tour__slide p {
  color: #667085;
  font-size: .7rem;
  line-height: 1.45;
  margin: 3px 0 0;
}

.login-product-tour__controls {
  align-items: center;
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.login-product-tour__controls > button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #667085;
  display: inline-flex;
  height: 28px;
  justify-content: center;
  width: 28px;
}

.login-product-tour__controls > button:hover { background: #eef4ff; color: #0d6efd; }
.login-product-tour__controls > div { align-items: center; display: flex; gap: 6px; margin: 0 7px; }
.login-product-tour__controls [data-product-tour-dot] { background: #cbd5e1; border: 0; border-radius: 999px; height: 6px; padding: 0; transition: width .2s ease, background .2s ease; width: 6px; }
.login-product-tour__controls [data-product-tour-dot].is-active { background: #0d6efd; width: 18px; }

.login-product-tour__actions {
  align-items: center;
  display: flex;
  font-size: .74rem;
  font-weight: 800;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 8px;
}

.login-product-tour__actions a { border-radius: 7px; padding: 6px 9px; text-decoration: none; }
.login-product-tour__register { background: #0d6efd; color: #fff; }
.login-product-tour__register:hover { background: #0b5ed7; color: #fff; }
.login-shell--with-tour .login-official-account-trigger { display: flex; }

.login-shell--with-guide .public-legal-footer {
  grid-column: 1 / -1;
}

.login-official-account-card {
  align-items: center;
  background: linear-gradient(180deg, #f3fbf6, #fff);
  border: 1px solid #cdebd8;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(23, 32, 51, .06);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 20px;
  text-align: center;
}

.login-official-account-card__icon {
  align-items: center;
  background: #dcf7e5;
  border-radius: 12px;
  color: #15803d;
  display: flex;
  font-size: 1.18rem;
  height: 44px;
  justify-content: center;
  width: 44px;
}

.login-official-account-card h2 {
  color: #172033;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.4;
  margin: 12px 0 5px;
}

.login-official-account-card > p {
  color: #667085;
  font-size: .76rem;
  line-height: 1.5;
  margin: 0 0 12px;
}

.login-official-account-card__qr {
  background: #fff;
  border: 1px solid #dce4ee;
  border-radius: 11px;
  padding: 6px;
}

.login-official-account-card__qr img {
  display: block;
  height: 164px;
  width: 164px;
}

.login-official-account-card > strong {
  color: #172033;
  font-size: .84rem;
  margin-top: 8px;
}

.login-official-account-card > small {
  color: #667085;
  font-size: .7rem;
  margin-top: 2px;
}

.login-official-account-card__note {
  align-items: flex-start;
  background: rgba(255,255,255,.72);
  border: 1px solid #dce9e1;
  border-radius: 8px;
  color: #52635a;
  display: grid;
  font-size: .68rem;
  gap: 6px;
  grid-template-columns: 15px minmax(0,1fr);
  line-height: 1.45;
  margin-top: 12px;
  padding: 7px 8px;
  text-align: left;
}

.login-official-account-card__note i { color: #15803d; }

.login-official-account-trigger {
  align-items: center;
  background: #f3faf5;
  border: 1px solid #d4eadb;
  border-radius: 8px;
  color: #25603a;
  display: none;
  font-size: .76rem;
  font-weight: 700;
  gap: 8px;
  justify-content: flex-start;
  margin-top: 12px;
  padding: 9px 10px;
  width: 100%;
}

.login-official-account-trigger span { flex: 1; text-align: left; }
.login-official-account-trigger i:first-child { color: #15803d; font-size: 1rem; }
.login-shell.is-mfa .login-official-account-card { display: none; }
.login-shell.is-mfa .login-product-tour { display: none; }
.login-shell.is-mfa .login-product-tour-trigger { display: none; }
.login-shell.is-mfa .login-official-account-trigger { display: none; }
.login-shell.is-mfa { grid-template-columns: minmax(360px, 400px); width: min(400px, 100%); }

.public-legal-footer {
  color: var(--login-muted);
  display: flex;
  flex-direction: column;
  font-size: .68rem;
  gap: 4px;
  line-height: 1.5;
  margin: 14px auto 0;
  max-width: 380px;
  text-align: center;
}

.public-legal-footer__filings {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  justify-content: center;
}

.login-card {
  background: #fff;
  border: 1px solid var(--login-border);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(23, 32, 51, .08);
  padding: 26px;
  width: 100%;
}

.login-card-nav {
  align-items: center;
  display: flex;
  margin: -7px 0 17px;
}

.login-card-nav a {
  align-items: center;
  border-radius: 7px;
  color: #526177;
  display: inline-flex;
  font-size: .76rem;
  font-weight: 700;
  gap: 5px;
  margin-left: -5px;
  padding: 5px;
  text-decoration: none;
  transition: background-color .16s ease, color .16s ease;
}

.login-card-nav a:hover {
  background: #edf4ff;
  color: #0d6efd;
}

.login-card-nav a:focus-visible,
.login-brand:focus-visible {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, .16);
  outline: 0;
}

.login-brand {
  align-items: center;
  border-radius: 9px;
  color: inherit;
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  text-decoration: none;
}

.login-brand:hover {
  color: inherit;
}

.login-brand:hover .login-brand-icon {
  background: #deebff;
  border-color: #c5dcff;
}

.login-brand-icon {
  align-items: center;
  background: #eaf2ff;
  border: 1px solid #d6e6ff;
  border-radius: 8px;
  color: #0d6efd;
  display: inline-flex;
  flex: 0 0 42px;
  font-size: 1.15rem;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.login-brand-icon svg {
  fill: none;
  height: 25px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
  width: 25px;
}

.login-title {
  color: var(--login-text);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.3;
}

.login-subtitle {
  color: var(--login-muted);
  font-size: .8rem;
  font-weight: 600;
  line-height: 1.45;
  margin-top: 3px;
}

.login-card .form-label {
  color: #344054;
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 6px;
}

.login-input-wrap {
  position: relative;
}

.login-input-wrap > i {
  color: #98a2b3;
  font-size: 1rem;
  left: 12px;
  pointer-events: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
}

.login-input-wrap .form-control {
  border-color: #d8e0ec;
  border-radius: 8px;
  color: var(--login-text);
  font-size: .88rem;
  min-height: 42px;
  padding-left: 38px;
}

.login-input-wrap .form-control:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, .12);
}

.login-input-wrap--password .form-control {
  padding-right: 44px;
}

.login-password-toggle {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #667085;
  display: inline-flex;
  height: 34px;
  justify-content: center;
  padding: 0;
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  z-index: 3;
}

.login-password-toggle:hover {
  background: #f2f4f7;
  color: #0d6efd;
}

.login-password-toggle:focus-visible,
.auth-back-button:focus-visible,
.login-options a:focus-visible {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, .16);
  outline: 0;
}

.login-card .form-control[aria-invalid="true"] {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, .1);
}

.login-card .form-text {
  color: var(--login-muted);
  font-size: .72rem;
  margin-top: 5px;
}

.login-card .form-check-label {
  color: var(--login-muted);
  font-size: .78rem;
  font-weight: 600;
}

.login-card .form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(13, 110, 253, .12);
}

.login-card .btn-primary {
  align-items: center;
  border-radius: 8px;
  display: flex;
  font-size: .9rem;
  font-weight: 700;
  gap: 7px;
  justify-content: center;
  min-height: 42px;
}

.login-card .alert {
  border-radius: 8px;
  font-size: .8rem;
}

.auth-form-feedback {
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.45;
  margin-bottom: 12px;
  padding: 9px 11px;
}

.auth-form-feedback.is-error {
  background: #fff5f5;
  border-color: #fecaca;
  color: #b42318;
}

.auth-form-feedback.is-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #157f3d;
}

.auth-form-feedback:empty {
  display: none;
}

.login-options {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.login-options a {
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.auth-back-button {
  align-items: center;
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: #475467;
  display: inline-flex;
  font-size: .78rem;
  font-weight: 700;
  gap: 5px;
  margin: -3px 0 14px;
  padding: 4px 2px;
}

.auth-back-button:hover {
  color: #0d6efd;
}

.login-secondary-action {
  color: var(--login-muted);
  display: flex;
  font-size: .8rem;
  gap: 6px;
  justify-content: center;
  margin-top: 16px;
}

.login-secondary-action a {
  font-weight: 700;
  text-decoration: none;
}

.login-secondary-action-compact {
  margin-top: 6px;
}

.registration-code-row {
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
}

.registration-code-row .btn {
  min-width: 108px;
}

.registration-note {
  color: var(--login-muted);
  font-size: .75rem;
  line-height: 1.55;
  margin-top: 14px;
}

.registration-consent {
  align-items: flex-start;
  display: flex;
  gap: 2px;
}

.registration-consent .form-check-input {
  flex: 0 0 auto;
  margin-top: .17rem;
}

.registration-consent a {
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 480px), (max-height: 640px) {
  body {
    align-items: flex-start;
    padding: max(28px, env(safe-area-inset-top)) 14px max(16px, env(safe-area-inset-bottom));
  }

  .login-card {
    box-shadow: none;
    padding: 22px 18px 18px;
  }

  .login-brand {
    margin-bottom: 20px;
  }
}

@media (max-width: 720px) {
  .login-shell--with-guide { display: block; width: min(400px, 100%); }
  .login-shell--with-tour { display: block; width: min(400px, 100%); }

  .login-product-tour {
    border: 0;
    border-radius: 0;
    bottom: 0;
    box-shadow: none;
    display: none;
    height: 100dvh;
    left: 0;
    overflow-y: auto;
    padding: max(10px, env(safe-area-inset-top)) 14px max(12px, env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    top: 0;
    z-index: 1080;
  }

  .login-product-tour.is-mobile-open { display: flex; }

  .login-product-tour__mobile-bar {
    align-items: center;
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: minmax(82px, 1fr) auto minmax(82px, 1fr);
    margin-bottom: 12px;
    min-height: 38px;
  }

  .login-product-tour__mobile-bar button {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: #344054;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 700;
    gap: 5px;
    justify-self: start;
    padding: 8px 5px;
  }

  .login-product-tour__mobile-bar button:focus-visible,
  .login-product-tour-trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(13, 110, 253, .16);
    outline: 0;
  }

  .login-product-tour__mobile-bar > strong {
    color: #172033;
    font-size: .9rem;
  }

  .login-product-tour__head h1 { font-size: 1rem; }
  .login-product-tour__head p { margin-bottom: 10px; }

  .login-product-tour__viewport {
    flex: 1 0 min(58dvh, 560px);
    min-height: 300px;
  }

  .login-product-tour__slide,
  .login-product-tour__slide.is-active { min-height: 100%; }
  .login-product-tour__slide img { max-height: none; }
  .login-product-tour__actions { flex: 0 0 auto; justify-content: center; }

  .login-product-tour-trigger {
    align-items: center;
    background: #f5f8ff;
    border: 1px solid #d9e6fb;
    border-radius: 9px;
    color: #344054;
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding: 10px;
    text-align: left;
    width: 100%;
  }

  .login-product-tour-trigger > span:nth-child(2) {
    display: flex;
    flex: 1;
    flex-direction: column;
    min-width: 0;
  }

  .login-product-tour-trigger strong { font-size: .78rem; }
  .login-product-tour-trigger small { color: #667085; font-size: .67rem; line-height: 1.4; margin-top: 2px; }
  .login-product-tour-trigger > .bi-chevron-right { color: #7c8aa0; font-size: .8rem; }

  .login-product-tour-trigger__icon {
    align-items: center;
    background: #e5efff;
    border-radius: 8px;
    color: #0d6efd;
    display: inline-flex;
    flex: 0 0 34px;
    height: 34px;
    justify-content: center;
  }

  body.login-product-tour-open { overflow: hidden; }
  .login-official-account-card { display: none; }
  .login-official-account-trigger { display: flex; }
}
