:root {
  --page: #151615;
  --surface: #20211f;
  --surface-soft: #292a27;
  --ink: #f2f3ee;
  --muted: #a9aca4;
  --line: #3a3c37;
  --line-strong: #555850;
  --accent: #3568f4;
  --accent-soft: #202f57;
  --dark-panel: #111210;
  --dark-ink: #f4f4ef;
  --dark-muted: #a5a79f;
  --shadow: 0 28px 70px rgba(0, 0, 0, .3);
  --radius-panel: 22px;
  --radius-control: 10px;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  color: var(--ink);
  background: var(--page);
  font-family: "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

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

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

button {
  border: 0;
  cursor: pointer;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(53, 104, 244, .32);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: #fff;
  background: var(--dark-panel);
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

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

.login-shell {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
  padding: 22px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1450px, 100%);
  height: 62px;
  margin: 0 auto;
  padding: 0 4px;
}

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

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 9px;
  color: #191a18;
  background: #f2f3ee;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -.05em;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-copy strong {
  overflow: hidden;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-copy small {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: .02em;
}

.header-note {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.login-main {
  display: grid;
  flex: 1;
  min-width: 0;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  width: min(1450px, 100%);
  min-height: min(760px, calc(100dvh - 106px));
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(214, 215, 211, .9);
  border-radius: var(--radius-panel);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.intro-panel {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 650px;
  overflow: hidden;
  color: var(--dark-ink);
  background: linear-gradient(90deg, var(--dark-panel) 0, var(--dark-panel) calc(100% - 38px), #191b19 100%);
  isolation: isolate;
}

.intro-panel::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, transparent calc(100% - 38px), #191b19 100%),
    radial-gradient(circle at 90% 6%, rgba(53, 104, 244, .52), transparent 28%),
    radial-gradient(circle at 8% 82%, rgba(255, 255, 255, .07), transparent 22%);
  content: "";
}

.intro-grid {
  position: absolute;
  inset: 0;
  opacity: .46;
  background-image: radial-gradient(rgba(255, 255, 255, .11) .6px, transparent .7px);
  background-size: 8px 8px;
  mask-image: linear-gradient(135deg, rgba(0, 0, 0, .82), transparent 76%);
}

.intro-orbit {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 50%;
  transform: rotate(-20deg);
}

.orbit-one {
  top: -20%;
  right: -12%;
  width: 75%;
  aspect-ratio: 1;
}

.orbit-two {
  top: 0;
  right: -20%;
  width: 78%;
  aspect-ratio: .58;
  border-color: rgba(53, 104, 244, .48);
}

.intro-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex: 1;
  width: 100%;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  max-width: 650px;
  padding: clamp(44px, 8vw, 104px);
}

.eyebrow {
  margin: 0 0 22px;
  color: #aebfff;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.intro-content h1 {
  max-width: 560px;
  margin: 0;
  color: var(--dark-ink);
  font-size: clamp(42px, 5.4vw, 76px);
  font-weight: 700;
  letter-spacing: -.075em;
  line-height: .99;
  text-wrap: balance;
}

.intro-content h1 em {
  color: #92a9ff;
  font-style: normal;
}

.intro-copy {
  max-width: 360px;
  margin: 25px 0 0;
  color: var(--dark-muted);
  font-size: 15px;
  line-height: 1.7;
}

.signal-card {
  width: 100%;
  max-width: 360px;
  margin-top: 60px;
  padding: 17px 18px 15px;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 14px;
  background: rgba(255, 255, 255, .055);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  backdrop-filter: blur(12px);
}

.signal-card-head,
.signal-axis {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #b9bbb5;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.signal-live { color: #a9baff; }

.signal-bars {
  display: flex;
  align-items: end;
  gap: 8px;
  height: 92px;
  margin: 18px 2px 10px;
  padding-bottom: 1px;
  border-bottom: 1px solid rgba(255, 255, 255, .14);
}

.signal-bars span {
  display: block;
  flex: 1;
  min-height: 11px;
  height: var(--bar);
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(180deg, #7f9aff 0%, #4268ea 100%);
  opacity: .92;
  transform-origin: bottom;
  animation: bar-rise 850ms cubic-bezier(.16, 1, .3, 1) both;
}

.signal-bars span:nth-child(2) { animation-delay: 70ms; }
.signal-bars span:nth-child(3) { animation-delay: 140ms; }
.signal-bars span:nth-child(4) { animation-delay: 210ms; }
.signal-bars span:nth-child(5) { animation-delay: 280ms; }
.signal-bars span:nth-child(6) { animation-delay: 350ms; }
.signal-bars span:nth-child(7) { animation-delay: 420ms; }
.signal-bars span:nth-child(8) { animation-delay: 490ms; }

.intro-footer {
  position: absolute;
  right: 34px;
  bottom: 28px;
  left: 34px;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  color: #8b8e87;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.form-panel {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: clamp(42px, 7vw, 94px) clamp(32px, 7vw, 108px) 27px;
  background: linear-gradient(90deg, #191b19 0, var(--surface) 38px, var(--surface) 100%);
}

.form-wrap {
  width: min(100%, 420px);
  margin: auto;
}

.form-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 7px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 12px;
  font-weight: 700;
}

.form-heading h2 {
  margin: 28px 0 8px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 700;
  letter-spacing: -.07em;
  line-height: 1;
  text-wrap: balance;
}

.form-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

form { margin-top: 47px; }

.field-group {
  display: grid;
  gap: 9px;
  margin-bottom: 23px;
}

.field-group label,
.label-row label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.field-group input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  outline: none;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 15px;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.field-group input::placeholder { color: #a1a39e; }
.field-group input:hover { border-color: var(--line-strong); }

.field-group input:focus {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 4px rgba(53, 104, 244, .12);
}

.field-group input:-webkit-autofill,
.field-group input:-webkit-autofill:hover,
.field-group input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--surface-soft) inset;
  caret-color: var(--ink);
}

.field-group.is-error input {
  border-color: #c53c45;
  box-shadow: 0 0 0 4px rgba(197, 60, 69, .1);
}

.field-error {
  min-height: 16px;
  margin: -2px 0 0;
  color: #b12d38;
  font-size: 12px;
  line-height: 1.35;
}

.text-button {
  padding: 0;
  color: var(--accent);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  transition: color 180ms ease, opacity 180ms ease;
}

.text-button:hover { color: #1d4fd8; }
.text-button:active { opacity: .65; }

.form-options,
.remember-option,
.form-footnote {
  display: flex;
  align-items: center;
}

.form-options {
  justify-content: space-between;
  gap: 14px;
  margin-top: -1px;
}

.remember-option {
  position: relative;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  user-select: none;
}

.remember-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.checkmark {
  display: inline-grid;
  width: 16px;
  height: 16px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
}

.remember-option input:checked + .checkmark {
  border-color: var(--ink);
  background: var(--ink);
}

.remember-option input:checked + .checkmark::after {
  width: 7px;
  height: 4px;
  border-bottom: 1.5px solid #191a18;
  border-left: 1.5px solid #191a18;
  content: "";
  transform: translateY(-1px) rotate(-45deg);
}

.form-message {
  min-height: 18px;
  margin: 20px 0 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.form-message[data-tone="error"] { color: #b12d38; }
.form-message[data-tone="info"] { color: var(--accent); }

.submit-button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 56px;
  padding: 0 52px;
  border-radius: var(--radius-control);
  color: #191a18;
  background: #f2f3ee;
  font-size: 14px;
  font-weight: 700;
  transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.submit-button:hover {
  background: #fff;
  box-shadow: 0 10px 22px rgba(0, 0, 0, .28);
  transform: translateY(-1px);
}

.submit-button:active { transform: translateY(1px) scale(.99); }

.submit-button:disabled {
  cursor: wait;
  opacity: .78;
  transform: none;
}

.button-arrow {
  position: absolute;
  right: 19px;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.button-loading {
  display: none;
  gap: 4px;
}

.button-loading i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #191a18;
  animation: loading-pulse 900ms ease-in-out infinite;
}

.button-loading i:nth-child(2) { animation-delay: 120ms; }
.button-loading i:nth-child(3) { animation-delay: 240ms; }

.submit-button.is-loading .button-label,
.submit-button.is-loading .button-arrow { display: none; }
.submit-button.is-loading .button-loading { display: inline-flex; }

.form-footnote {
  gap: 5px;
  margin-top: 27px;
  color: var(--muted);
  font-size: 12px;
}

.form-meta {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  color: #9b9d98;
  font-size: 10px;
}

@keyframes bar-rise {
  from { opacity: 0; transform: scaleY(.15); }
  to { opacity: .92; transform: scaleY(1); }
}

@keyframes loading-pulse {
  0%, 100% { opacity: .32; transform: scale(.8); }
  50% { opacity: 1; transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@media (max-width: 900px) {
  .login-shell { padding: 12px; }
  .site-header { height: 54px; }
  .login-main { grid-template-columns: 1fr; }
  .intro-panel {
    min-height: 500px;
    background: var(--dark-panel);
  }
  .intro-panel::after {
    background:
      radial-gradient(circle at 90% 6%, rgba(53, 104, 244, .52), transparent 28%),
      radial-gradient(circle at 8% 82%, rgba(255, 255, 255, .07), transparent 22%);
  }
  .intro-content { padding: 56px clamp(28px, 9vw, 76px); }
  .signal-card { margin-top: 42px; }
  .form-panel {
    min-height: 620px;
    padding: 62px clamp(28px, 9vw, 76px) 24px;
    background: var(--surface);
  }
}

@media (max-width: 560px) {
  .brand-copy strong {
    max-width: 180px;
    font-size: 14px;
  }
  .brand-copy small,
  .header-note { display: none; }
  .login-main { border-radius: 16px; }
  .intro-panel { min-height: 430px; }
  .intro-content {
    justify-content: flex-start;
    padding: 48px 25px 78px;
  }
  .intro-content h1 { font-size: clamp(38px, 13vw, 58px); }
  .intro-copy {
    max-width: 300px;
    margin-top: 20px;
    font-size: 14px;
  }
  .signal-card { margin-top: 34px; }
  .intro-footer {
    right: 25px;
    bottom: 22px;
    left: 25px;
  }
  .form-panel {
    min-height: 600px;
    padding: 48px 25px 22px;
  }
  form { margin-top: 38px; }
  .form-meta {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }
}
