:root {
  --auth-bg: #eef5ff;
  --auth-panel: #ffffff;
  --auth-panel-soft: #f8fbff;
  --auth-text: #172033;
  --auth-muted: #64748b;
  --auth-line: #dbe8f7;
  --auth-blue: #2478ff;
  --auth-cyan: #13b8c8;
  --auth-shadow: 0 22px 58px rgba(30, 64, 175, .13);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--auth-bg);
}

body.auth-modern-page {
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  color: var(--auth-text);
  background:
    linear-gradient(135deg, rgba(36,120,255,.08) 0 25%, transparent 25% 50%, rgba(19,184,200,.07) 50% 75%, transparent 75%) 0 0 / 36px 36px,
    linear-gradient(180deg, #f7fbff 0%, #eef5ff 58%, #f8fbff 100%);
  font: 14px/1.6 Inter, "Microsoft YaHei", "PingFang SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.auth-modern-page a {
  color: inherit;
  text-decoration: none;
}

body.auth-modern-page button,
body.auth-modern-page input,
body.auth-modern-page textarea {
  font: inherit;
}

.auth-shell {
  width: min(430px, calc(100% - 18px));
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) max(0px, env(safe-area-inset-right)) max(26px, env(safe-area-inset-bottom)) max(0px, env(safe-area-inset-left));
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
}

.auth-logo-slot {
  display: flex;
  min-width: 0;
  overflow: visible;
}

.auth-logo-slot .auth-brand.logo {
  display: inline-flex;
  max-width: min(620px, 72vw);
  min-height: 58px;
  overflow: visible;
}

.auth-logo-slot .logo-text {
  max-width: 100%;
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: var(--auth-blue);
  font-weight: 900;
}

.auth-brand-mark {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--auth-blue), var(--auth-cyan));
  box-shadow: 0 12px 24px rgba(36,120,255,.22);
  font-size: 16px;
}

.auth-brand-text {
  min-width: 0;
  max-width: 230px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--member-logo-size, 22px);
  line-height: 1.15;
}

.auth-top-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--auth-line);
  border-radius: 999px;
  color: #315a85;
  background: rgba(255,255,255,.82);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.auth-phone {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid rgba(205,221,240,.92);
  border-radius: 34px;
  background: #172033;
  box-shadow: var(--auth-shadow);
}

.auth-screen {
  min-height: 640px;
  padding: 18px;
  border-radius: 26px;
  background: var(--auth-panel-soft);
  overflow: hidden;
}

.auth-mobile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.auth-mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-top: 18px;
  padding: 6px;
  border: 1px solid var(--auth-line);
  border-radius: 18px;
  background: #edf5ff;
  isolation: isolate;
  position: relative;
  z-index: 10;
}

.auth-mode-tabs a {
  display: grid;
  place-items: center;
  min-height: 44px;
  border-radius: 13px;
  color: #527092;
  cursor: pointer;
  font-weight: 900;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

.auth-mode-tabs a.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--auth-blue), var(--auth-cyan));
  box-shadow: 0 10px 20px rgba(36,120,255,.22);
}

.auth-card {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--auth-line);
  border-radius: 22px;
  background: var(--auth-panel);
  box-shadow: 0 18px 44px rgba(30,64,175,.10);
}

.auth-title {
  margin: 0;
  color: #101828;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: 0;
}

.auth-subtitle {
  margin: 8px 0 0;
  color: var(--auth-muted);
  font-size: 13px;
  line-height: 1.75;
}

.auth-form {
  display: grid;
  gap: 13px;
  margin-top: 18px;
}

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

.auth-field label {
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.auth-field input,
.auth-field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid #d7e5f5;
  border-radius: 15px;
  color: var(--auth-text);
  outline: 0;
  background: #fbfdff;
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.auth-field textarea {
  min-height: 82px;
  padding-top: 12px;
  resize: vertical;
}

.auth-field input:focus,
.auth-field textarea:focus {
  border-color: rgba(36,120,255,.7);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(36,120,255,.12);
}

.auth-field-note {
  margin: 0;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.65;
}

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

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.65;
}

.auth-check input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--auth-blue);
}

.auth-check a,
.auth-link {
  color: var(--auth-blue);
  font-weight: 900;
}

.auth-check a {
  white-space: nowrap;
}

.auth-link {
  align-items: center;
  display: inline-flex;
  font-size: 13px;
  min-height: 44px;
}

.auth-primary,
.auth-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 900;
}

.auth-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--auth-blue), var(--auth-cyan));
  box-shadow: 0 16px 28px rgba(36,120,255,.22);
}

.auth-secondary {
  border: 1px solid var(--auth-line);
  color: #315a85;
  background: #fff;
}

.auth-quick-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.auth-quick-actions a,
.auth-quick-actions span {
  display: grid;
  place-items: center;
  min-height: 66px;
  padding: 8px;
  border: 1px solid var(--auth-line);
  border-radius: 18px;
  color: var(--auth-blue);
  background: #fff;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.auth-help {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--auth-line);
  border-radius: 18px;
  color: #405977;
  background: #fff;
  font-size: 12px;
  line-height: 1.75;
}

.auth-qrcode-row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
}

.auth-qrcode-row img {
  width: 92px;
  height: 92px;
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  background: #fff;
  object-fit: cover;
}

#mycode {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  margin-top: 8px;
}

.auth-captcha-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.auth-captcha-image {
  display: block;
  width: 120px;
  height: 44px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
  object-fit: contain;
}

.auth-captcha-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--auth-line);
  border-radius: 8px;
  color: #315a85;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
}

.auth-footer {
  padding: 18px 10px 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.75;
  text-align: center;
}

.auth-footer a {
  align-items: center;
  display: inline-flex;
  min-height: 44px;
  min-width: 44px;
}

@media (min-width: 880px) {
  .auth-shell {
    width: min(980px, calc(100% - 40px));
    padding-top: 30px;
  }

  .auth-phone {
    width: 430px;
    margin-right: auto;
    margin-left: auto;
  }
}

@media (max-width: 420px) {
  .auth-shell {
    width: calc(100% - 12px);
    padding-top: 10px;
  }

  .auth-phone {
    padding: 0;
    border: 0;
    border-radius: 24px;
    background: transparent;
    box-shadow: none;
  }

  .auth-screen {
    min-height: auto;
    padding: 14px;
    border-radius: 22px;
  }

  .auth-brand-text {
    max-width: 190px;
    font-size: min(var(--member-logo-size, 22px), 22px);
  }

  .auth-logo-slot .auth-brand.logo {
    max-width: calc(100vw - 116px);
    min-height: 46px;
  }

  .auth-card {
    padding: 18px;
  }

  .auth-row {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Login page: focused desktop workspace with a compact mobile form. */
body.auth-mode-login {
  background: #edf2f7;
}

.auth-mode-login .auth-shell {
  width: min(1080px, calc(100% - 40px));
  padding-top: 24px;
}

.auth-mode-login .auth-phone {
  width: 100%;
  margin-top: 20px;
  padding: 0;
  border: 1px solid #dce5f0;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 60px rgba(20, 42, 74, .12);
  overflow: hidden;
}

.auth-mode-login .auth-screen {
  min-height: 610px;
  padding: 24px;
  border-radius: 0;
  background: #f7f9fc;
  overflow: visible;
}

.auth-mode-login .auth-mobile-head {
  display: none;
}

.auth-mode-login .auth-mode-tabs {
  width: 430px;
  margin: 0 0 18px auto;
  border-radius: 8px;
  background: #edf2f8;
}

.auth-mode-login .auth-mode-tabs a {
  min-height: 44px;
  border-radius: 6px;
}

.auth-mode-login .auth-mode-tabs a.is-active {
  background: #246fe5;
  box-shadow: 0 6px 16px rgba(36, 111, 229, .18);
}

.auth-login-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  gap: 24px;
}

.auth-login-aside {
  display: flex;
  flex-direction: column;
  min-height: 500px;
  padding: 38px;
  border-radius: 8px;
  color: #fff;
  background: #172033;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.auth-login-aside-head {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #dbeafe;
  font-size: 14px;
  font-weight: 900;
}

.auth-login-aside-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: #fff;
  background: #2478ff;
  font-size: 14px;
}

.auth-login-aside h2 {
  margin: 58px 0 8px;
  font-size: 34px;
  line-height: 1.2;
}

.auth-login-aside > p {
  margin: 0;
  color: #a9bad0;
  font-size: 14px;
}

.auth-login-features {
  display: grid;
  gap: 12px;
  margin-top: 34px;
}

.auth-login-features > div {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  min-height: 66px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
}

.auth-login-features i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 7px;
  color: #8cc8ff;
  background: rgba(36, 120, 255, .15);
  font-size: 15px;
}

.auth-login-features span,
.auth-login-features b,
.auth-login-features small {
  display: block;
}

.auth-login-features b {
  color: #fff;
  font-size: 14px;
}

.auth-login-features small {
  margin-top: 2px;
  color: #93a4bd;
  font-size: 11px;
}

.auth-login-secure {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: #9ee2bd;
  font-size: 12px;
}

.auth-login-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.auth-mode-login .auth-card {
  margin: 0;
  padding: 30px;
  border: 1px solid #dce5f0;
  border-radius: 8px;
  box-shadow: none;
}

.auth-login-kicker {
  display: block;
  margin-bottom: 7px;
  color: #237166;
  font-size: 11px;
  font-weight: 900;
}

.auth-mode-login .auth-title {
  font-size: 28px;
}

.auth-mode-login .auth-subtitle {
  margin-top: 6px;
}

.auth-mode-login .auth-form {
  gap: 15px;
  margin-top: 24px;
}

.auth-mode-login .auth-field input {
  min-height: 50px;
  border-radius: 7px;
  background: #fff;
}

.auth-password-wrap {
  position: relative;
}

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

.auth-password-toggle {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #60758f;
  background: transparent;
  cursor: pointer;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
  color: #246fe5;
  background: #edf4ff;
}

.auth-mode-login .auth-primary {
  gap: 9px;
  min-height: 50px;
  border-radius: 7px;
  background: #246fe5;
  box-shadow: 0 10px 22px rgba(36, 111, 229, .20);
}

.auth-mode-login .auth-primary:hover {
  background: #1d5fc7;
}

.auth-mode-login .auth-quick-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}

.auth-mode-login .auth-quick-actions a,
.auth-mode-login .auth-quick-actions span {
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.auth-mode-login .auth-quick-actions span {
  color: #7a8798;
  font-weight: 400;
}

.auth-mode-login .auth-quick-actions a + a {
  padding-left: 14px;
  border-left: 1px solid #d7e0eb;
}

.auth-mode-login .auth-errors,
.auth-mode-login .auth-status {
  width: 430px;
  margin: 0 0 14px auto;
  border-radius: 7px;
}

@media (max-width: 760px) {
  .auth-mode-login .auth-shell {
    width: min(100% - 20px, 520px);
    padding-top: 12px;
  }

  .auth-mode-login .auth-phone {
    margin-top: 12px;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .auth-mode-login .auth-screen {
    min-height: auto;
    padding: 0;
    background: transparent;
  }

  .auth-mode-login .auth-mode-tabs,
  .auth-mode-login .auth-errors,
  .auth-mode-login .auth-status {
    width: 100%;
  }

  .auth-login-grid {
    display: block;
  }

  .auth-login-aside {
    display: none;
  }

  .auth-mode-login .auth-card {
    padding: 24px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(20, 42, 74, .09);
  }

  .auth-mode-login .auth-row {
    align-items: center;
    flex-direction: row;
  }
}

@media (max-width: 420px) {
  .auth-mode-login .auth-shell {
    width: calc(100% - 16px);
  }

  .auth-mode-login .auth-top {
    padding: 0 4px;
  }

  .auth-mode-login .auth-card {
    padding: 22px 18px;
  }

  .auth-mode-login .auth-title {
    font-size: 25px;
  }

  .auth-mode-login .auth-quick-actions {
    flex-wrap: wrap;
  }
}

@media (hover: none), (pointer: coarse) {
  .auth-password-toggle:hover,
  .auth-mode-login .auth-primary:hover {
    transform: none;
  }
}
