:root {
  --ink: #172033;
  --muted: #687184;
  --paper: #fffaf6;
  --paper-deep: #f7efe8;
  --white: #ffffff;
  --line: rgba(23, 32, 51, 0.13);
  --accent: #ff6a2a;
  --accent-light: #ffbd95;
  --error: #a63c2f;
  --success: #176f55;
}

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

html {
  color-scheme: light;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "MiSans", "HarmonyOS Sans SC", "Microsoft YaHei UI", "PingFang SC", "Segoe UI", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

svg {
  display: block;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: var(--white);
  background: var(--ink);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.auth-header {
  position: absolute;
  z-index: 20;
  top: 0;
  right: 0;
  left: 0;
  height: 86px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 34px;
  color: var(--white);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand img {
  width: 38px;
  height: 38px;
}

.brand > .brand-lockup {
  display: grid;
  gap: 3px;
}

.brand strong {
  font-size: 15px;
  font-weight: 760;
  letter-spacing: -0.02em;
}

.brand small {
  color: rgba(255, 255, 255, 0.48);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.brand > .brand-lockup {
  width: max-content;
  display: grid;
  align-content: center;
  gap: 3px;
}

.brand .brand-name {
  width: 100%;
  display: block;
  white-space: nowrap;
}

.brand .brand-en {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 0.4em;
  font-size: 6.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.back-link {
  position: absolute;
  z-index: 8;
  top: 25px;
  left: clamp(28px, 4vw, 58px);
  min-height: 39px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 15px 0 12px;
  color: var(--ink);
  border: 1px solid rgba(255, 106, 42, 0.36);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow:
    0 10px 28px rgba(23, 32, 51, 0.09),
    inset 0 0 18px rgba(255, 106, 42, 0.035);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  transition:
    color 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease,
    transform 0.2s ease;
}

.back-link svg {
  width: 15px;
  height: 15px;
  color: var(--accent);
}

.back-link:hover {
  color: var(--white);
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 13px 32px rgba(255, 106, 42, 0.24);
  transform: translateY(-1px);
}

.back-link:hover svg {
  color: var(--white);
}

.auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(450px, 0.9fr);
}

.auth-visual {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 65% 38%, rgba(15, 140, 134, 0.2), transparent 30%),
    radial-gradient(circle at 15% 78%, rgba(255, 106, 42, 0.13), transparent 27%),
    #071216;
}

.auth-visual::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 48%;
  width: 520px;
  height: 520px;
  border: 1px solid rgba(98, 255, 214, 0.11);
  border-radius: 50%;
  box-shadow:
    0 0 0 64px rgba(98, 255, 214, 0.025),
    0 0 0 136px rgba(255, 106, 42, 0.018);
  transform: translate(-50%, -50%);
}

.auth-visual::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(90deg, black, transparent 92%);
}

.auth-visual-overlay {
  position: absolute;
  z-index: 2;
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(12, 121, 118, 0.18), transparent 34%),
    linear-gradient(180deg, rgba(3, 11, 15, 0.5) 0%, rgba(3, 11, 15, 0.1) 35%, rgba(3, 11, 15, 0.82) 100%),
    linear-gradient(90deg, rgba(3, 11, 15, 0.67), rgba(3, 11, 15, 0.2) 65%, rgba(255, 106, 42, 0.07));
}

.auth-tech-art {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.tech-brand-mark {
  position: absolute;
  top: 10%;
  right: -8%;
  width: min(44vw, 470px);
  height: min(48vw, 510px);
  object-fit: contain;
  opacity: 0.075;
  filter: saturate(0) brightness(2.2) drop-shadow(0 0 44px rgba(89, 255, 214, 0.24));
  transform: rotate(-8deg);
  animation: tech-brand-float 9s ease-in-out infinite;
}

.tech-grid {
  position: absolute;
  inset: -12%;
  opacity: 0.45;
  background-image:
    linear-gradient(rgba(88, 255, 215, 0.095) 1px, transparent 1px),
    linear-gradient(90deg, rgba(88, 255, 215, 0.095) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(620px) rotateX(58deg) translateY(22%);
  transform-origin: center bottom;
  animation: tech-grid-drift 10s linear infinite;
}

.tech-scan {
  position: absolute;
  top: -20%;
  bottom: -20%;
  left: -16%;
  width: 12%;
  background: linear-gradient(90deg, transparent, rgba(99, 255, 215, 0.15), transparent);
  filter: blur(3px);
  transform: skewX(-9deg);
  animation: auth-scan 8s linear infinite;
}

.tech-network {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.82;
}

.tech-network path {
  fill: none;
  stroke: rgba(86, 255, 211, 0.36);
  stroke-width: 1.2;
  stroke-dasharray: 22 260;
  vector-effect: non-scaling-stroke;
  animation: auth-data-flow 6.5s linear infinite;
}

.tech-network path:nth-child(2) {
  stroke: rgba(255, 148, 95, 0.32);
  animation-delay: -1.6s;
}

.tech-network path:nth-child(3) {
  animation-delay: -3.1s;
}

.tech-network path:nth-child(4) {
  stroke: rgba(255, 148, 95, 0.25);
  animation-delay: -4.5s;
}

.tech-node {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid rgba(112, 255, 219, 0.65);
  border-radius: 50%;
  background: rgba(79, 255, 207, 0.22);
  box-shadow:
    0 0 0 5px rgba(79, 255, 207, 0.045),
    0 0 18px rgba(79, 255, 207, 0.35);
  animation: tech-node-pulse 2.8s ease-in-out infinite;
}

.node-a {
  top: 34%;
  right: 27%;
}

.node-b {
  top: 58%;
  right: 44%;
  animation-delay: -0.9s;
}

.node-c {
  top: 72%;
  left: 19%;
  border-color: rgba(255, 157, 112, 0.7);
  background: rgba(255, 106, 42, 0.2);
  box-shadow:
    0 0 0 5px rgba(255, 106, 42, 0.04),
    0 0 18px rgba(255, 106, 42, 0.32);
  animation-delay: -1.7s;
}

.node-d {
  top: 22%;
  left: 39%;
  animation-delay: -2.3s;
}

@keyframes tech-grid-drift {
  to {
    background-position: 0 46px, 46px 0;
  }
}

@keyframes auth-scan {
  to {
    left: 112%;
  }
}

@keyframes auth-data-flow {
  to {
    stroke-dashoffset: -282;
  }
}

@keyframes tech-node-pulse {
  50% {
    opacity: 0.42;
    transform: scale(0.72);
  }
}

@keyframes tech-brand-float {
  50% {
    transform: translateY(-14px) rotate(-5deg);
  }
}

.auth-visual-copy {
  position: absolute;
  z-index: 5;
  top: 50%;
  left: clamp(34px, 5vw, 82px);
  width: min(540px, calc(100% - 68px));
  color: var(--white);
  transform: translateY(-48%);
}

.auth-visual-copy > span {
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.2em;
}

.auth-visual-copy h1 {
  margin: 0;
  font-family: inherit;
  font-size: clamp(48px, 5.4vw, 82px);
  font-weight: 850;
  line-height: 1.02;
  letter-spacing: -0.055em;
}

.auth-visual-copy h1 em {
  color: var(--accent-light);
  font-style: normal;
}

.auth-visual-copy p {
  max-width: 380px;
  margin: 0;
  color: rgba(255, 255, 255, 0.63);
  font-size: 13px;
  line-height: 1.85;
}

.auth-visual-meta {
  position: absolute;
  z-index: 5;
  right: 42px;
  bottom: 34px;
  left: 42px;
  display: flex;
  justify-content: space-between;
  gap: 15px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  color: rgba(255, 255, 255, 0.48);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.auth-panel {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px clamp(28px, 5vw, 78px) 50px;
  background:
    radial-gradient(circle at 88% 8%, rgba(244, 106, 42, 0.07), transparent 28%),
    linear-gradient(90deg, rgba(23, 32, 51, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 84px 100%;
}

.auth-panel-inner {
  width: min(100%, 470px);
}

.overline {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--accent);
  font-size: 8px;
  font-weight: 780;
  letter-spacing: 0.19em;
}

.overline::before {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
}

.auth-intro h2 {
  margin: 17px 0 10px;
  font-family: inherit;
  font-size: clamp(36px, 3.2vw, 49px);
  font-weight: 840;
  line-height: 1.12;
  letter-spacing: -0.05em;
}

.auth-intro p {
  max-width: 400px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 35px;
  border-bottom: 1px solid var(--line);
}

.auth-tabs button {
  position: relative;
  padding: 13px 5px;
  border: 0;
  color: #8a8982;
  background: transparent;
  font-size: 12px;
  font-weight: 680;
  cursor: pointer;
}

.auth-tabs button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--ink);
  opacity: 0;
  transform: scaleX(0.25);
  transition:
    opacity 0.2s ease,
    transform 0.25s ease;
}

.auth-tabs button.active {
  color: var(--ink);
}

.auth-tabs button.active::after {
  opacity: 1;
  transform: scaleX(1);
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 27px;
}

.auth-form[hidden],
.account-view[hidden],
.auth-note[hidden],
.auth-tabs[hidden] {
  display: none;
}

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

.field > span:first-child {
  color: var(--muted);
  font-size: 9px;
  font-weight: 680;
}

.field input {
  width: 100%;
  height: 49px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.42);
  outline: none;
  font-size: 13px;
  transition:
    border-color 0.2s ease,
    background 0.2s ease;
}

.field input::placeholder {
  color: #a3a19a;
}

.field input:focus {
  border-color: var(--accent);
  background: rgba(255, 255, 255, 0.72);
}

.password-field,
.code-field {
  position: relative;
  display: flex;
}

.password-field input {
  padding-right: 58px;
}

.password-field > button {
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 54px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.code-field {
  gap: 7px;
}

.code-field input {
  min-width: 0;
}

.send-code {
  min-width: 108px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  color: var(--white);
  background: var(--ink);
  font-size: 10px;
  font-weight: 660;
  cursor: pointer;
}

.send-code:disabled {
  color: #99968f;
  border-color: var(--line);
  background: transparent;
  cursor: default;
}

.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #9a9891;
  font-size: 9px;
}

.text-button,
.form-footnote button,
.inline-legal {
  padding: 0;
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: inherit;
  font-weight: 660;
  cursor: pointer;
}

.form-message {
  display: none;
  min-height: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  font-size: 10px;
  line-height: 1.65;
}

.form-message.error,
.form-message.success,
.form-message.info {
  display: block;
}

.form-message.error {
  color: var(--error);
  border-color: rgba(166, 60, 47, 0.25);
  background: rgba(166, 60, 47, 0.055);
}

.form-message.success {
  color: var(--success);
  border-color: rgba(23, 111, 85, 0.22);
  background: rgba(23, 111, 85, 0.055);
}

.form-message.info {
  color: #5f665f;
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.36);
}

.auth-submit {
  width: 100%;
  min-height: 51px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 17px;
  border: 1px solid var(--ink);
  color: var(--white);
  background: var(--ink);
  font-size: 12px;
  font-weight: 680;
  cursor: pointer;
  transition:
    background 0.2s ease,
    border-color 0.2s ease;
}

.auth-submit:hover {
  border-color: var(--accent);
  background: var(--accent);
}

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

.auth-submit svg {
  width: 17px;
  height: 17px;
}

.form-footnote {
  margin: 1px 0 0;
  color: #8d8b84;
  font-size: 10px;
  text-align: center;
}

.consent-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: #77766f;
  font-size: 9px;
  line-height: 1.65;
}

.consent-field input {
  width: 14px;
  height: 14px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.form-back {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.form-back svg {
  width: 14px;
  height: 14px;
}

.auth-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 26px 0 0;
  color: #98968f;
  font-size: 8.5px;
}

.auth-note svg {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.account-view {
  margin-top: 31px;
}

.account-head {
  display: grid;
  grid-template-columns: 49px 1fr auto;
  align-items: center;
  gap: 13px;
}

.account-avatar {
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--white);
  background: var(--ink);
  font-family: Georgia, serif;
  font-size: 19px;
}

.account-head > div:nth-child(2) {
  min-width: 0;
}

.account-head span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.account-head h3 {
  overflow: hidden;
  margin: 3px 0 0;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-license {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 28px;
  padding: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.36);
}

.account-license.active {
  border-color: rgba(12, 116, 104, 0.24);
  background: rgba(12, 116, 104, 0.055);
}

.account-license div {
  display: grid;
  gap: 5px;
}

.account-license span {
  color: var(--muted);
  font-size: 8px;
  letter-spacing: 0.13em;
}

.account-license strong {
  font-size: 14px;
  font-weight: 680;
}

.license-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #aaa59b;
  box-shadow: 0 0 0 5px rgba(120, 116, 107, 0.09);
}

.account-license.active .license-dot {
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(12, 116, 104, 0.1);
}

.account-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-top: 10px;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.account-grid > div {
  display: grid;
  gap: 5px;
  min-height: 77px;
  padding: 16px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.account-grid span {
  color: var(--muted);
  font-size: 8px;
}

.account-grid strong {
  font-size: 12px;
  font-weight: 660;
}

.account-actions {
  display: grid;
  gap: 9px;
  margin-top: 20px;
}

.link-button {
  text-align: left;
}

.secondary-action {
  min-height: 47px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  font-size: 10px;
}

.account-note {
  margin: 19px 0 0;
  color: #95938c;
  font-size: 8.5px;
  line-height: 1.7;
}

.legal-dialog {
  width: min(92vw, 520px);
  padding: 35px;
  border: 0;
  color: var(--ink);
  background: var(--white);
  box-shadow: 0 35px 100px rgba(0, 0, 0, 0.3);
}

.legal-dialog::backdrop {
  background: rgba(5, 7, 6, 0.65);
  backdrop-filter: blur(7px);
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  border: 0;
  color: var(--muted);
  background: transparent;
  font-size: 9px;
  cursor: pointer;
}

.legal-dialog h2 {
  margin: 16px 0 17px;
  font-family: "Iowan Old Style", "Baskerville", "Times New Roman", "STSong", "SimSun", serif;
  font-size: 30px;
  font-weight: 400;
}

.legal-dialog p {
  margin: 0 0 13px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.85;
}

.auth-toast {
  position: fixed;
  z-index: 50;
  bottom: 22px;
  left: 50%;
  padding: 11px 15px;
  color: var(--white);
  background: var(--ink);
  font-size: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 12px);
  transition:
    opacity 0.2s ease,
    transform 0.2s ease;
}

.auth-toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

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

  .auth-visual {
    min-height: 380px;
  }

  .auth-visual-copy {
    top: 54%;
    left: 28px;
    width: min(540px, calc(100% - 56px));
  }

  .auth-visual-copy h1 {
    margin: 15px 0 14px;
    font-size: clamp(39px, 8vw, 62px);
  }

  .auth-visual-copy p {
    display: none;
  }

  .auth-visual-meta {
    right: 28px;
    bottom: 20px;
    left: 28px;
    font-size: 7px;
  }

  .auth-panel {
    min-height: auto;
    padding: 70px 28px 60px;
  }
}

@media (max-width: 620px) {
  .auth-header {
    height: 70px;
    padding: 0 18px;
  }

  .brand img {
    width: 34px;
    height: 34px;
  }

  .brand strong {
    font-size: 13px;
  }

  .back-link {
    font-size: 9px;
  }

  .auth-visual {
    min-height: 340px;
  }

  .auth-visual-copy {
    left: 20px;
    width: calc(100% - 40px);
  }

  .auth-visual-copy h1 {
    font-size: 43px;
  }

  .auth-visual-meta {
    right: 20px;
    left: 20px;
  }

  .auth-visual-meta span:nth-child(2) {
    display: none;
  }

  .auth-panel {
    padding: 55px 20px 48px;
  }

  .auth-intro h2 {
    font-size: 39px;
  }

  .form-options {
    align-items: flex-start;
  }

  .form-options span {
    max-width: 230px;
  }

  .legal-dialog {
    padding: 30px 22px;
  }
}
