:root {
  color-scheme: light;
  --ink: #172033;
  --muted: #6c7890;
  --soft: #8d9aaf;
  --line: rgba(36, 57, 92, 0.12);
  --line-strong: rgba(36, 57, 92, 0.24);
  --blue: #6bc6f4;
  --blue-strong: #229fe7;
  --blue-soft: #edf8ff;
  --danger: #e75464;
  --success: #11a37f;
  --paper: rgba(255, 255, 255, 0.96);
  --field: #fbfdff;
  --shadow: 0 24px 56px rgba(48, 65, 96, 0.18);
  --shadow-soft: 0 10px 26px rgba(48, 65, 96, 0.12);
  --radius-lg: 8px;
  --radius-md: 8px;
  --radius-sm: 6px;
  --font-sans: "Alibaba PuHuiTi 3.0", "HarmonyOS Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  font-family: var(--font-sans);
  color: var(--ink);
  background-color: #d9f7ff;
  background-image:
    linear-gradient(134deg, rgba(225, 248, 255, 0.96) 0%, rgba(151, 226, 235, 0.9) 22%, rgba(215, 234, 178, 0.86) 40%, rgba(249, 212, 151, 0.86) 58%, rgba(118, 106, 194, 0.9) 76%, rgba(34, 30, 88, 0.98) 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  pointer-events: none;
  background-image:
    linear-gradient(30deg, rgba(35, 31, 92, 0.84) 0%, rgba(80, 72, 164, 0.68) 32%, rgba(255, 255, 255, 0) 33%),
    linear-gradient(205deg, rgba(255, 255, 255, 0.7) 0%, rgba(255, 255, 255, 0.18) 36%, rgba(255, 255, 255, 0) 37%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0));
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.auth-page {
  position: relative;
  width: min(1160px, calc(100% - 56px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 32px 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 386px);
  gap: 96px;
  align-items: center;
}

.auth-hero {
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  color: #ffffff;
}

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

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 1px 12px rgba(18, 28, 64, 0.24);
}

.brand-mark {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: #3c63c9;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 22px rgba(20, 31, 72, 0.14);
  font-size: 15px;
  font-weight: 950;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-actions a {
  min-height: 34px;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: var(--radius-md);
  color: rgba(34, 45, 76, 0.72);
  text-decoration: none;
  font-size: 13px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.42);
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.topbar-actions a:hover {
  color: var(--ink);
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.68);
}

.hero-copy {
  max-width: 560px;
  margin-top: auto;
  margin-bottom: 30px;
}

.eyebrow {
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-copy h1 {
  margin: 0;
  max-width: 560px;
  color: #ffffff;
  font-size: 42px;
  line-height: 1.2;
  letter-spacing: 0;
  text-shadow: 0 18px 38px rgba(17, 21, 52, 0.24);
}

.hero-copy h1 span {
  display: block;
}

.hero-copy p:not(.eyebrow) {
  max-width: 520px;
  margin: 20px 0 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: 16px;
  line-height: 1.8;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 20px;
}

.hero-metrics article {
  display: grid;
  grid-template-columns: auto;
  gap: 4px;
  min-width: 124px;
  padding-left: 14px;
  color: #ffffff;
  border-left: 2px solid rgba(255, 255, 255, 0.72);
}

.hero-metrics strong {
  display: block;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0;
}

.hero-metrics p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  line-height: 1.5;
}

.auth-footer {
  margin-top: auto;
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.auth-footer a {
  color: rgba(255, 255, 255, 0.64);
  text-decoration: none;
}

.auth-footer a:hover {
  color: #ffffff;
}

.auth-card {
  width: 100%;
  max-height: calc(100vh - 64px);
  padding: 38px;
  overflow-y: auto;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.card-heading {
  margin-bottom: 24px;
}

.card-heading h2,
.reset-heading h3 {
  margin: 0;
  color: var(--ink);
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: 0;
}

.card-heading p,
.reset-heading p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.auth-tabs,
.login-method-tabs {
  display: grid;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #f4f7fb;
}

.auth-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.login-method-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 18px;
}

.auth-tab,
.login-method-tab {
  min-height: 38px;
  border: 0;
  border-radius: var(--radius-sm);
  color: var(--muted);
  background: transparent;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  transition: color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.auth-tab:hover,
.login-method-tab:hover {
  color: var(--ink);
}

.auth-tab.is-active,
.login-method-tab.is-active {
  color: var(--ink);
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(48, 65, 96, 0.12);
}

.auth-form-panel,
.auth-method-form {
  display: none;
}

.auth-form-panel.is-active,
.auth-method-form.is-active {
  display: block;
}

.auth-form .field {
  display: block;
  margin-bottom: 14px;
}

.auth-form .field span {
  display: block;
  margin-bottom: 7px;
  color: #2d3b52;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.auth-form input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: none;
  color: var(--ink);
  background: var(--field);
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.auth-form input::placeholder {
  color: #a0abba;
}

.auth-form input:hover {
  border-color: var(--line-strong);
  background: #ffffff;
}

.auth-form input:focus {
  border-color: rgba(34, 159, 231, 0.58);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(107, 198, 244, 0.22);
}

.double-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.form-row {
  margin: 2px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.checkline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
}

.checkline input {
  width: 16px;
  height: 16px;
  accent-color: var(--blue-strong);
}

.consent-line {
  margin: 2px 0 16px;
}

.inline-link {
  color: var(--blue-strong);
  font-size: 13px;
  font-weight: 900;
  text-decoration: none;
}

.inline-link:hover {
  color: #0879be;
  text-decoration: underline;
}

.submit-button {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: var(--radius-md);
  color: #ffffff;
  background: var(--blue);
  font-size: 14px;
  font-weight: 950;
  letter-spacing: 0;
  box-shadow: 0 12px 22px rgba(34, 159, 231, 0.24);
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.submit-button:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--blue-strong);
  box-shadow: 0 16px 28px rgba(34, 159, 231, 0.3);
}

.submit-button:disabled,
.inline-action-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
}

.form-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.form-status {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: #f7faff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.55;
}

.form-status.is-error {
  color: #b62535;
  border-color: rgba(231, 84, 100, 0.24);
  background: rgba(231, 84, 100, 0.08);
}

.form-status.is-success {
  color: #0b7c66;
  border-color: rgba(17, 163, 127, 0.24);
  background: rgba(17, 163, 127, 0.08);
}

.auth-inline-notice {
  margin: 18px 0;
  padding: 13px 14px;
  border: 1px solid rgba(34, 159, 231, 0.16);
  border-radius: var(--radius-md);
  background: var(--blue-soft);
}

.auth-inline-notice strong {
  display: block;
  margin-bottom: 4px;
  color: #117fca;
  font-size: 13px;
  letter-spacing: 0;
}

.auth-inline-notice p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.inline-input-group {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.inline-action-button {
  min-width: 112px;
  height: 44px;
  padding: 0 13px;
  border: 1px solid rgba(34, 159, 231, 0.22);
  border-radius: var(--radius-md);
  color: #117fca;
  background: #f1f9ff;
  font-size: 13px;
  font-weight: 900;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.inline-action-button:hover:not(:disabled) {
  color: #ffffff;
  border-color: var(--blue-strong);
  background: var(--blue-strong);
}

.reset-heading {
  margin-bottom: 18px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(107, 198, 244, 0.38);
  outline-offset: 2px;
}

@media (max-width: 1040px) {
  .auth-page {
    width: min(720px, calc(100% - 40px));
    grid-template-columns: 1fr;
    gap: 34px;
    align-items: start;
  }

  .auth-hero {
    min-height: auto;
  }

  .hero-copy {
    margin-top: 88px;
    margin-bottom: 24px;
  }

  .auth-footer {
    margin-top: 36px;
  }

  .auth-card {
    max-width: 420px;
    max-height: none;
    justify-self: center;
  }
}

@media (max-width: 640px) {
  .auth-page {
    width: min(100% - 24px, 480px);
    padding: 18px 0 28px;
    gap: 26px;
  }

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

  .topbar-actions {
    width: 100%;
  }

  .topbar-actions a {
    flex: 1;
  }

  .hero-copy {
    margin-top: 44px;
    margin-bottom: 18px;
  }

  .hero-copy h1 {
    font-size: 28px;
    line-height: 1.26;
  }

  .hero-copy p:not(.eyebrow) {
    font-size: 15px;
  }

  .hero-metrics {
    display: none;
  }

  .auth-footer {
    margin-top: 24px;
  }

  .auth-card {
    padding: 24px;
    padding-bottom: 86px;
  }

  .card-heading h2,
  .reset-heading h3 {
    font-size: 26px;
  }

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

  .inline-input-group {
    grid-template-columns: 1fr;
  }

  .inline-action-button {
    width: 100%;
  }
}
