:root {
  color-scheme: dark;
  font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  --auth-bg: #050505;
  --auth-surface: #11110f;
  --auth-surface-raised: #171613;
  --auth-text: #f7f5f2;
  --auth-muted: #9d9992;
  --auth-faint: #68645e;
  --auth-line: #292722;
  --auth-line-strong: #51483d;
  --auth-accent: #f97316;
  --auth-accent-strong: #ea580c;
  --auth-accent-soft: rgba(249, 115, 22, .14);
  --auth-positive: #62c391;
  --auth-positive-soft: #1e3a2d;
  --auth-negative: #ff8a80;
  --auth-negative-soft: #3b211e;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--auth-bg);
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  color: var(--auth-text);
  background: var(--auth-bg);
  font-size: 15px;
  line-height: 1.6;
}

button,
input { font: inherit; }

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

.auth-backdrop {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-backdrop::before {
  content: "";
  position: absolute;
  inset: 30% -12% -20%;
  background: radial-gradient(ellipse at 50% 100%, rgba(249, 115, 22, .2), rgba(249, 115, 22, .035) 46%, transparent 72%);
}

.auth-backdrop::after {
  content: "";
  position: absolute;
  inset: 46% 0 0;
  opacity: .14;
  background: repeating-linear-gradient(90deg, transparent 0 43px, rgba(249, 115, 22, .2) 44px, transparent 45px);
  mask-image: linear-gradient(to bottom, transparent, black 34%, transparent);
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(1180px, 100%);
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(380px, 460px);
  align-items: center;
  gap: clamp(64px, 10vw, 148px);
  margin: 0 auto;
  padding: 56px 32px;
}

.auth-intro {
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

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

.auth-brand-logo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: block;
  object-fit: contain;
  border-radius: 13px;
  box-shadow: 0 0 24px rgba(249, 115, 22, .22);
}

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

.auth-brand strong {
  color: var(--auth-text);
  font-size: 15px;
  letter-spacing: .01em;
}

.auth-brand small {
  margin-top: 2px;
  color: var(--auth-muted);
  font-size: 12px;
}

.auth-intro-copy {
  max-width: 600px;
  margin: auto 0;
}

.auth-intro-copy p {
  margin: 0 0 18px;
  color: var(--auth-accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

.auth-intro-copy h1 {
  max-width: 580px;
  margin: 0;
  color: var(--auth-text);
  font-size: clamp(42px, 5vw, 66px);
  line-height: 1.12;
  letter-spacing: -.055em;
}

.auth-access-note {
  margin: 0;
  color: var(--auth-faint);
  font-size: 12px;
}

.auth-card {
  width: 100%;
  padding: 34px;
  background: color-mix(in srgb, var(--auth-surface) 94%, transparent);
  border: 1px solid var(--auth-line);
  border-radius: 19px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, .36), 0 0 44px rgba(249, 115, 22, .04);
  backdrop-filter: blur(18px);
}

.auth-card-header { margin-bottom: 26px; }

.auth-card-header h2 {
  margin: 0;
  color: var(--auth-text);
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -.04em;
}

.auth-message {
  display: grid;
  gap: 2px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid;
  border-radius: 11px;
  font-size: 13px;
}

.auth-message strong { font-size: 13px; }
.auth-message span { color: inherit; opacity: .9; }

.auth-message.is-error {
  color: var(--auth-negative);
  background: var(--auth-negative-soft);
  border-color: color-mix(in srgb, var(--auth-negative) 34%, var(--auth-line));
}

.auth-message.is-success {
  color: var(--auth-positive);
  background: var(--auth-positive-soft);
  border-color: color-mix(in srgb, var(--auth-positive) 32%, var(--auth-line));
}

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

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

.auth-field > span {
  color: var(--auth-muted);
  font-size: 13px;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  min-height: 50px;
  padding: 11px 14px;
  color: var(--auth-text);
  background: var(--auth-surface-raised);
  border: 1px solid var(--auth-line-strong);
  border-radius: 11px;
  outline: none;
  font-size: 16px;
  caret-color: var(--auth-accent);
  transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.auth-field input::placeholder { color: var(--auth-faint); }

.auth-field input:focus-visible {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px var(--auth-accent-soft);
}

.auth-field input[aria-invalid="true"] { border-color: var(--auth-negative); }

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

.auth-submit {
  width: 100%;
  min-height: 50px;
  margin-top: 6px;
  padding: 11px 16px;
  color: #fff;
  background: linear-gradient(110deg, var(--auth-accent-strong), var(--auth-accent));
  border: 1px solid transparent;
  border-radius: 11px;
  box-shadow: 0 14px 32px rgba(249, 115, 22, .18);
  cursor: pointer;
  font-weight: 800;
  transition: transform .16s ease, box-shadow .16s ease, opacity .16s ease;
}

.auth-submit:focus-visible,
.auth-card-footer a:focus-visible {
  outline: 2px solid var(--auth-accent);
  outline-offset: 3px;
}

.auth-submit:active { transform: translateY(1px); }

.auth-card-footer {
  margin: 24px 0 0;
  padding-top: 20px;
  color: var(--auth-faint);
  border-top: 1px solid var(--auth-line);
  font-size: 12px;
  text-align: center;
}

.auth-card-footer a {
  color: var(--auth-accent);
  font-weight: 700;
  text-decoration: none;
}

@media (hover: hover) {
  .auth-field input:hover { border-color: color-mix(in srgb, var(--auth-text) 46%, var(--auth-line-strong)); }

  .auth-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 18px 38px rgba(249, 115, 22, .26);
  }

  .auth-card-footer a:hover { text-decoration: underline; }
}

@media (max-width: 880px) {
  .auth-shell {
    width: min(560px, 100%);
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 38px 24px 52px;
  }

  .auth-intro { min-height: 0; }
  .auth-intro-copy { margin: 64px 0 0; }

  .auth-intro-copy h1 {
    max-width: 500px;
    font-size: clamp(36px, 8vw, 52px);
  }

  .auth-access-note { display: none; }
}

@media (max-width: 520px) {
  .auth-shell { gap: 28px; padding: 24px 16px 36px; }
  .auth-intro-copy { margin-top: 42px; }
  .auth-intro-copy p { margin-bottom: 12px; }
  .auth-intro-copy h1 { font-size: 36px; }
  .auth-card { padding: 26px 20px; border-radius: 17px; }
  .auth-card-header h2 { font-size: 27px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-field input,
  .auth-submit { transition: none; }
}

@media (forced-colors: active) {
  .auth-submit { border: 1px solid ButtonText; }

  .auth-submit:focus-visible,
  .auth-card-footer a:focus-visible,
  .auth-field input:focus-visible { outline-color: Highlight; }
}
