:root {
  --auth-paper: #fbfaf7;
  --auth-surface: #ffffff;
  --auth-ink: #111a2b;
  --auth-muted: #68717d;
  --auth-line: #dfe2e5;
  --auth-blue: #1d4f9f;
  --auth-red: #b3172f;
  --auth-radius-panel: 14px;
  --auth-radius-control: 8px;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  background: var(--auth-paper);
  color: var(--auth-ink);
  font-family: var(--body);
  overflow-x: hidden;
}

.auth-preview-bar {
  position: fixed;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  height: 26px;
  padding: 6px 14px;
  background: #111a2b;
  color: rgba(255, 255, 255, 0.66);
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.07em;
  text-align: center;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(460px, 0.92fr) minmax(500px, 1.08fr);
  gap: 24px;
  min-height: 100vh;
  padding: 46px 24px 24px;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 70px);
  padding: 12px 44px 6px;
}

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

.auth-brand {
  color: var(--auth-ink);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 620;
  letter-spacing: -0.04em;
}

.auth-header-meta {
  display: flex;
  gap: 20px;
  align-items: center;
  color: #757d87;
  font-size: 11px;
}

.auth-header-meta a:hover {
  color: var(--auth-blue);
}

.auth-language-picker {
  position: relative;
}

.auth-language-picker summary {
  display: flex;
  justify-content: center;
  gap: 3px;
  align-items: center;
  width: 48px;
  height: 28px;
  border: 1px solid #d8dcdf;
  border-radius: var(--auth-radius-control);
  color: var(--auth-ink);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 8px;
  list-style: none;
}

.auth-language-picker summary::-webkit-details-marker {
  display: none;
}

.auth-language-picker[open] summary,
.auth-language-picker summary:hover {
  border-color: var(--auth-blue);
  color: var(--auth-blue);
}

.auth-language-picker > div {
  position: absolute;
  z-index: 10;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  width: 158px;
  padding: 7px;
  border: 1px solid #d8dcdf;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 16px 40px rgba(24, 36, 58, 0.12);
}

.auth-language-picker > div a {
  padding: 8px 10px;
  border-radius: 6px;
  font-family: var(--display);
  font-size: 12px;
}

.auth-language-picker > div a:hover,
.auth-language-picker > div a[aria-current="true"] {
  background: #eef3f7;
  color: var(--auth-blue);
}

.auth-content {
  width: min(430px, 100%);
  margin: auto;
  padding: 50px 0;
}

.auth-intro {
  text-align: center;
}

.auth-eyebrow {
  display: block;
  margin-bottom: 14px;
  color: #6f7a85;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.07em;
}

.auth-intro h1 {
  margin: 0;
  color: #141c29;
  font-family: var(--display);
  font-size: clamp(48px, 4.5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.058em;
  line-height: 0.98;
}

html[lang="zh"] .auth-intro h1 {
  font-size: clamp(44px, 4.2vw, 58px);
  letter-spacing: -0.07em;
}

.auth-intro p {
  margin: 16px auto 0;
  color: #6b7480;
  font-size: 14px;
  line-height: 1.6;
}

.auth-card {
  margin-top: 28px;
  padding: 20px;
  border: 1px solid #e0e2e4;
  border-radius: var(--auth-radius-panel);
  background: var(--auth-surface);
  box-shadow: 0 12px 34px rgba(24, 36, 58, 0.06);
}

.auth-provider {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 44px;
  margin-bottom: 9px;
  border: 1px solid #dfe2e5;
  border-radius: var(--auth-radius-control);
  background: #f5f6f7;
  color: #273141;
  cursor: pointer;
  font-size: 13px;
  font-weight: 540;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.auth-provider:hover {
  border-color: #bfc7d2;
  background: #f8f9fa;
}

.auth-provider:disabled {
  border-color: #e5e7e9;
  background: #fafafa;
  color: #949aa2;
  cursor: not-allowed;
  opacity: 0.72;
}

.auth-provider-note {
  margin: 3px 2px 13px;
  color: #8a929b;
  font-size: 9px;
  line-height: 1.55;
  text-align: center;
}

.provider-mark {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
}

.provider-mark svg {
  width: 17px;
  height: 17px;
}

.apple-mark {
  color: #111;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: #969ca5;
  font-size: 10px;
}

.auth-divider::before,
.auth-divider::after {
  height: 1px;
  flex: 1;
  background: #e7e9eb;
  content: "";
}

.auth-form {
  display: flex;
  flex-direction: column;
}

.auth-form label,
.auth-form legend {
  margin-bottom: 7px;
  color: #616b77;
  font-size: 11px;
  font-weight: 550;
}

.auth-form input,
.auth-form select {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #d8dce1;
  border-radius: var(--auth-radius-control);
  outline: none;
  background: #fff;
  color: var(--auth-ink);
  font: inherit;
  font-size: 13px;
}

.auth-form input:focus,
.auth-form select:focus {
  border-color: var(--auth-blue);
  box-shadow: 0 0 0 3px rgba(29, 79, 159, 0.1);
}

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

.auth-error {
  min-height: 17px;
  margin: 5px 0 5px;
  color: var(--auth-red);
  font-size: 10px;
}

.auth-submit {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  min-height: 44px;
  padding: 11px 15px;
  border: 0;
  border-radius: var(--auth-radius-control);
  background: #1a202a;
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 570;
  transition: background 0.2s ease;
}

.auth-submit:hover {
  background: #273140;
}

.auth-submit:disabled {
  cursor: wait;
  opacity: 0.68;
}

.auth-legal {
  margin: 14px 0 0;
  color: #969ca5;
  font-size: 9px;
  line-height: 1.55;
  text-align: center;
}

.auth-legal a,
.auth-account-switch a,
.auth-text-link {
  color: var(--auth-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-account-switch {
  margin: 18px 0 0;
  color: #747d88;
  font-size: 11px;
  text-align: center;
}

.auth-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  padding-top: 17px;
  border-top: 1px solid #e0e2e4;
  color: #9198a0;
  font-family: var(--mono);
  font-size: 7px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.auth-footer-links {
  display: flex;
  gap: 15px;
}

.auth-router-panel {
  min-height: 100vh;
  padding: 42px 10vw;
}

.auth-router-links {
  display: grid;
  gap: 10px;
  margin-top: 30px;
}

.auth-router-links .auth-submit:last-child {
  background: var(--auth-blue);
}

.auth-footer a:hover {
  color: var(--auth-blue);
}

.auth-visual {
  position: relative;
  min-height: calc(100vh - 70px);
  overflow: hidden;
  border-radius: var(--auth-radius-panel);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.42), transparent 42%),
    #dbe7f3;
}

.auth-visual-grid {
  position: absolute;
  inset: 0;
  opacity: 0.6;
  background-image:
    linear-gradient(rgba(29, 79, 159, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 79, 159, 0.12) 1px, transparent 1px);
  background-size: 92px 92px;
}

.auth-visual-caption {
  position: absolute;
  z-index: 2;
  top: 30px;
  right: 32px;
  left: 32px;
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #61758b;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.055em;
}

.auth-visual-caption span:last-child {
  display: flex;
  align-items: center;
  gap: 7px;
}

.auth-visual-caption i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--auth-red);
}

.auth-paper {
  position: absolute;
  border: 1px solid rgba(29, 79, 159, 0.18);
  border-radius: var(--auth-radius-panel);
  background: rgba(255, 255, 255, 0.66);
}

.auth-paper-back {
  top: 18%;
  right: 12%;
  width: 62%;
  height: 60%;
  transform: rotate(7deg);
}

.auth-paper-middle {
  top: 16%;
  left: 11%;
  width: 67%;
  height: 65%;
  transform: rotate(-5deg);
}

.auth-task-preview {
  position: absolute;
  z-index: 3;
  top: 20%;
  left: 50%;
  width: min(520px, 78%);
  padding: 24px;
  border: 1px solid #d8dfe7;
  border-radius: var(--auth-radius-panel);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 30px 80px rgba(31, 65, 104, 0.18);
  transform: translateX(-50%);
}

.auth-task-top {
  display: flex;
  justify-content: space-between;
  color: #85909c;
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.06em;
}

.auth-task-preview h2 {
  margin: 26px 0 8px;
  color: #182333;
  font-family: var(--display);
  font-size: 29px;
  font-weight: 540;
  letter-spacing: -0.04em;
}

.auth-task-preview > p {
  max-width: 430px;
  margin: 0;
  color: #6f7985;
  font-size: 12px;
  line-height: 1.55;
}

.auth-task-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 22px;
  padding: 17px 0;
  border-top: 1px solid #e2e5e8;
  border-bottom: 1px solid #e2e5e8;
}

.auth-task-metrics span {
  display: block;
  color: #8a939d;
  font-size: 9px;
}

.auth-task-metrics strong {
  display: block;
  margin-top: 4px;
  color: #273244;
  font-size: 12px;
  font-weight: 600;
}

.auth-task-checkpoint {
  display: grid;
  grid-template-columns: 31px 1fr;
  gap: 13px;
  margin-top: 20px;
}

.auth-task-checkpoint > span {
  display: grid;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--auth-red);
  color: #fff;
  font-family: var(--mono);
  font-size: 8px;
  place-items: center;
}

.auth-task-checkpoint strong {
  color: #263142;
  font-size: 12px;
  font-weight: 600;
}

.auth-task-checkpoint p {
  margin: 4px 0 0;
  color: #77818c;
  font-size: 10px;
  line-height: 1.45;
}

.auth-task-button {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 20px;
  padding: 10px 12px;
  border: 1px solid #d7dde4;
  border-radius: var(--auth-radius-control);
  background: #f7f9fb;
  color: var(--auth-blue);
  cursor: default;
  font-size: 10px;
  font-weight: 600;
}

.auth-proof-note {
  position: absolute;
  z-index: 4;
  right: 9%;
  bottom: 13%;
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 195px;
  padding: 13px 15px;
  border: 1px solid rgba(29, 79, 159, 0.19);
  border-radius: var(--auth-radius-panel);
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 30px rgba(31, 65, 104, 0.1);
}

.auth-proof-note > span {
  display: grid;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #e3eee9;
  color: #316e59;
  place-items: center;
}

.auth-proof-note strong,
.auth-proof-note small {
  display: block;
}

.auth-proof-note strong {
  color: #2b3748;
  font-size: 11px;
}

.auth-proof-note small {
  margin-top: 2px;
  color: #7d8793;
  font-size: 8px;
}

.auth-intro-centered {
  max-width: 440px;
  margin: 0 auto;
}

.auth-status-card {
  text-align: center;
}

.auth-mail-line {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 0 auto 22px;
  border: 1px solid #d9dee5;
  border-radius: 50%;
  color: var(--auth-blue);
  font-size: 22px;
  place-items: center;
}

.auth-status-card h2 {
  max-width: 320px;
  margin: 0 auto 24px;
  color: #283345;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.55;
}

.auth-secondary {
  width: 100%;
  min-height: 44px;
  border: 1px solid #d7dce2;
  border-radius: var(--auth-radius-control);
  background: #fff;
  color: #263143;
  cursor: pointer;
  font-size: 12px;
  font-weight: 550;
}

.auth-text-link {
  display: inline-block;
  margin-top: 17px;
  font-size: 11px;
}

.auth-profile-form {
  gap: 0;
}

.auth-profile-form input + label,
.auth-profile-form select + fieldset {
  margin-top: 16px;
}

.auth-profile-form fieldset {
  margin: 16px 0 0;
  padding: 0;
  border: 0;
}

.auth-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.auth-choices label {
  position: relative;
  margin: 0;
}

.auth-choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.auth-choices span {
  display: grid;
  min-height: 40px;
  padding: 8px;
  border: 1px solid #d9dde2;
  border-radius: var(--auth-radius-control);
  color: #69727d;
  cursor: pointer;
  font-size: 10px;
  font-weight: 400;
  place-items: center;
  text-align: center;
}

.auth-choices input:checked + span {
  border-color: var(--auth-blue);
  background: #edf3fb;
  color: var(--auth-blue);
}

.auth-start-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 26px;
}

.auth-start-option {
  min-height: 150px;
  padding: 17px;
  border: 1px solid #dde2e6;
  border-radius: var(--auth-radius-panel);
  background: #fff;
  color: var(--auth-ink);
  cursor: pointer;
  text-align: left;
}

.auth-start-option.selected {
  border-color: var(--auth-blue);
  box-shadow: inset 0 0 0 1px var(--auth-blue);
}

.auth-start-option > span {
  color: var(--auth-red);
  font-family: var(--mono);
  font-size: 8px;
}

.auth-start-option strong {
  display: block;
  margin-top: 24px;
  font-size: 13px;
}

.auth-start-option p {
  margin: 7px 0 0;
  color: #747d88;
  font-size: 10px;
  line-height: 1.5;
}

.auth-start-action {
  margin-top: 12px;
}

.auth-legal-page section {
  padding: 19px 0;
  border-bottom: 1px solid #e0e3e5;
}

.auth-legal-page section:first-child {
  border-top: 1px solid #e0e3e5;
}

.auth-legal-page h2 {
  margin: 0 0 8px;
  font-family: var(--body);
  font-size: 13px;
}

.auth-legal-page p {
  margin: 0;
  color: #6d7682;
  font-size: 12px;
  line-height: 1.65;
}

.legal-intro {
  text-align: left;
}

.auth-toast {
  position: fixed;
  z-index: 50;
  right: 20px;
  bottom: 20px;
  max-width: 360px;
  padding: 13px 16px;
  border: 1px solid #d5dce5;
  border-radius: var(--auth-radius-control);
  background: #fff;
  color: #4e5966;
  box-shadow: 0 15px 40px rgba(24, 36, 58, 0.13);
  font-size: 11px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.auth-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1000px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    min-height: calc(100vh - 70px);
  }

  .auth-visual {
    display: none;
  }
}

@media (max-width: 580px) {
  .auth-preview-bar {
    height: auto;
    min-height: 34px;
    padding: 8px 12px;
    line-height: 1.4;
  }

  .auth-shell {
    min-height: 100vh;
    padding: 44px 14px 14px;
  }

  .auth-panel {
    min-height: calc(100vh - 58px);
    padding: 8px 4px 4px;
  }

  .auth-header-meta > a:first-child {
    display: none;
  }

  .auth-content {
    padding: 52px 0 35px;
  }

  .auth-intro h1 {
    font-size: clamp(48px, 15vw, 62px);
  }

  .auth-card {
    padding: 17px;
    border-radius: 15px;
  }

  .auth-footer {
    align-items: flex-start;
  }

  .auth-start-grid {
    grid-template-columns: 1fr;
  }

  .auth-start-option {
    min-height: 115px;
  }

  .auth-router-panel {
    padding: 30px 18px;
  }
}
