.auth-page {
  --auth-text: #f6f8fc;
  --auth-muted: #98a4b8;
  --auth-line: rgba(255, 255, 255, 0.11);
  --auth-line-strong: rgba(143, 122, 255, 0.44);
  isolation: isolate;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--auth-text);
  background:
    linear-gradient(rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.022) 1px, transparent 1px),
    linear-gradient(135deg, #07090f 0%, #101522 48%, #070a11 100%);
  background-size: 48px 48px, 48px 48px, auto;
}

.auth-page::before {
  display: none;
}

.auth-topbar {
  position: fixed;
  z-index: 100;
  top: 16px;
  left: 50%;
  width: min(calc(100% - 32px), 1120px);
  min-height: 64px;
  padding: 8px 10px 8px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--auth-line);
  border-radius: 999px;
  background: rgba(7, 10, 17, 0.76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 18px 50px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(26px) saturate(145%);
  transform: translateX(-50%);
}

.auth-topbar .brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #f6f8fc;
  font-size: 16px;
  font-weight: 800;
  white-space: nowrap;
}

.auth-topbar .brand-mark {
  width: 34px;
  height: 34px;
}

.auth-topbar .brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.auth-back-link {
  min-width: 88px;
  min-height: 44px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  color: #c8d0de;
  background: rgba(255, 255, 255, 0.04);
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.auth-back-link:hover,
.auth-back-link:focus-visible {
  color: #fff;
  border-color: rgba(143, 122, 255, 0.36);
  background: rgba(143, 122, 255, 0.11);
  outline: none;
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 40px), 560px);
  min-height: 100svh;
  margin: 0 auto;
  padding: 108px 0 38px;
  display: grid;
  place-items: center;
}

.auth-panel {
  width: 100%;
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  color: var(--auth-text);
  background: linear-gradient(145deg, rgba(21, 27, 42, 0.92), rgba(8, 11, 18, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 28px 80px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(28px) saturate(145%);
  animation: auth-panel-in 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.auth-panel-compact {
  max-width: 560px;
}

.auth-brand-block {
  display: grid;
  justify-items: center;
  gap: 7px;
  text-align: center;
}

.auth-brand-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
}

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

.auth-brand-block > strong {
  color: #f8f9fd;
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: 0;
}

.auth-status {
  min-height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid rgba(86, 215, 236, 0.16);
  border-radius: 999px;
  color: #a8dfe8;
  background: rgba(86, 215, 236, 0.055);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.auth-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #56d7ec;
  box-shadow: 0 0 12px rgba(86, 215, 236, 0.72);
}

.auth-tabs {
  margin-top: 22px;
  padding: 4px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.auth-tabs a {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  color: #8f9aae;
  font-size: 14px;
  font-weight: 760;
  white-space: nowrap;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.auth-tabs a:hover,
.auth-tabs a:focus-visible {
  color: #eef1f7;
  background: rgba(255, 255, 255, 0.045);
  outline: none;
}

.auth-tabs a.is-active {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.14);
  background: linear-gradient(110deg, rgba(120, 96, 255, 0.3), rgba(69, 142, 199, 0.2));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.09);
}

.auth-panel-header {
  margin: 22px 0 17px;
  text-align: center;
}

.auth-panel-header h1 {
  margin: 0;
  color: #fff;
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: 0;
}

.auth-panel-header p {
  margin: 8px 0 0;
  color: var(--auth-muted);
  font-size: 14px;
  line-height: 1.55;
}

.auth-product-context {
  min-height: 42px;
  margin-bottom: 17px;
  padding: 0 2px;
  display: flex;
  align-items: center;
  gap: 9px;
  overflow: hidden;
  color: #eef1f7;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  border-bottom: 1px solid rgba(255, 255, 255, 0.075);
}

.auth-product-context > span {
  flex: 0 0 auto;
  color: var(--auth-product-accent, #8b6cff);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.auth-product-context strong {
  min-width: 0;
  overflow: hidden;
  color: #edf0f6;
  font-size: 13px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-product-context small {
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
  color: #7f8a9e;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

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

.auth-field label,
.auth-check span {
  color: #cbd2df;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.auth-input-wrap {
  min-height: 52px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.auth-input-wrap:hover {
  border-color: rgba(255, 255, 255, 0.17);
}

.auth-input-wrap:focus-within {
  border-color: rgba(139, 108, 255, 0.62);
  background: rgba(255, 255, 255, 0.065);
  box-shadow: 0 0 0 4px rgba(139, 108, 255, 0.12);
}

.auth-input-wrap svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: #778398;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.auth-input-wrap:focus-within svg {
  stroke: #a997ff;
}

.auth-input-wrap input {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0;
  border: 0;
  outline: 0;
  color: #f5f7fb;
  background: transparent;
  font: inherit;
  font-size: 16px;
}

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

.auth-input-wrap input:-webkit-autofill,
.auth-input-wrap input:-webkit-autofill:hover,
.auth-input-wrap input:-webkit-autofill:focus {
  -webkit-text-fill-color: #f5f7fb;
  transition: background-color 9999s ease-out;
}

/* 手机验证码字段：输入框内嵌“获取验证码”按钮 */
.auth-code-wrap {
  padding-right: 6px;
}

.auth-send-code {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(139, 108, 255, 0.4);
  border-radius: 8px;
  color: #cdbfff;
  background: rgba(139, 108, 255, 0.14);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.auth-send-code:hover:not(:disabled),
.auth-send-code:focus-visible {
  border-color: rgba(139, 108, 255, 0.7);
  background: rgba(139, 108, 255, 0.24);
  color: #fff;
  outline: none;
}

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

.auth-ghost-button {
  min-width: 48px;
  min-height: 44px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  color: #9ba6b8;
  background: transparent;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.auth-ghost-button:hover,
.auth-ghost-button:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  outline: none;
}

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

.auth-check {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--auth-muted);
  font-size: 13px;
  cursor: pointer;
}

.auth-check input {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  accent-color: #7c63f4;
}

.auth-text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  color: #a997ff;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.auth-text-link:hover,
.auth-text-link:focus-visible {
  color: #d6ceff;
  outline: none;
}

.auth-submit {
  min-height: 52px;
  margin-top: 1px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(110deg, #7359e8, #4e74de 58%, #278da9);
  box-shadow: 0 14px 34px rgba(70, 79, 195, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: filter 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.auth-submit:hover,
.auth-submit:focus-visible {
  filter: brightness(1.1);
  box-shadow: 0 17px 38px rgba(70, 79, 195, 0.36), 0 0 0 4px rgba(123, 98, 238, 0.12);
  outline: none;
}

.auth-submit:active {
  transform: scale(0.985);
}

.auth-submit[aria-busy="true"] {
  cursor: wait;
  opacity: 0.78;
}

.auth-message {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(86, 215, 236, 0.16);
  border-radius: 8px;
  color: #a8dfe8;
  background: rgba(86, 215, 236, 0.055);
  font-size: 13px;
  line-height: 1.5;
}

.auth-message:empty {
  display: none;
}

.auth-message.is-error {
  color: #ffb4ae;
  border-color: rgba(255, 102, 92, 0.24);
  background: rgba(255, 102, 92, 0.07);
}

.auth-message.is-success {
  color: #8ce8c8;
  border-color: rgba(54, 215, 170, 0.2);
  background: rgba(54, 215, 170, 0.07);
}

.auth-service-note {
  margin: 16px 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #7f8a9e;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.auth-service-note > span {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #6f7a8f;
}

.auth-panel:has(.auth-message:not(:empty)) .auth-service-note {
  display: none;
}

.auth-footer-links {
  margin-top: 16px;
  padding-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.075);
}

.auth-footer-links a {
  min-height: 44px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #99a5b8;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.auth-footer-links a:hover,
.auth-footer-links a:focus-visible {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
  outline: none;
}

.auth-page .support-assistant {
  display: none;
}

.auth-check a {
  margin-left: 4px;
  color: #b8aaff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-policy-shell {
  width: min(calc(100% - 40px), 880px);
  place-items: start center;
}

.account-policy {
  display: grid;
  gap: 22px;
}

.account-policy header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--auth-line);
}

.account-policy h1,
.account-policy h2,
.account-policy p,
.account-policy ul {
  margin-top: 0;
}

.account-policy h1 {
  margin-bottom: 8px;
  font-size: clamp(28px, 5vw, 42px);
}

.account-policy h2 {
  margin-bottom: 10px;
  color: #f4f6fb;
  font-size: 20px;
}

.account-policy p,
.account-policy li {
  color: var(--auth-muted);
  font-size: 15px;
  line-height: 1.8;
}

.account-policy ul {
  margin-bottom: 0;
  padding-left: 20px;
}

.account-policy a {
  color: #b8aaff;
}

@keyframes auth-panel-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 600px) {
  .auth-topbar {
    top: 10px;
    width: calc(100% - 20px);
    min-height: 58px;
    padding: 6px 7px 6px 12px;
  }

  .auth-topbar .brand-mark {
    width: 32px;
    height: 32px;
  }

  .auth-back-link {
    min-width: 78px;
    padding: 0 12px;
  }

  .auth-shell {
    width: calc(100% - 24px);
    padding: 84px 0 20px;
  }

  .auth-panel {
    padding: 23px 20px;
  }

  .auth-brand-mark {
    width: 56px;
    height: 56px;
  }

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

  .auth-panel-header {
    margin: 18px 0 15px;
  }

  .auth-panel-header h1 {
    font-size: 27px;
  }

  .auth-product-context small {
    display: none;
  }

  .auth-row {
    gap: 8px;
  }

  .auth-field label,
  .auth-check span {
    font-size: 13px;
  }
}

@media (max-width: 370px) {
  .auth-panel {
    padding-right: 16px;
    padding-left: 16px;
  }

  .auth-service-note {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-panel {
    animation: none;
  }

  .auth-back-link,
  .auth-tabs a,
  .auth-input-wrap,
  .auth-submit {
    transition: none;
  }
}
