/* ============================================================
   登录 / 注册
   ============================================================ */
@font-face {
  font-family: 'Manrope';
  src: url('/assets/fonts/manrope-latin.woff2') format('woff2');
  font-weight: 300 800;
  font-display: swap;
}
@font-face {
  font-family: 'JetBrains Mono';
  src: url('/assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --orange: #f26722;
  --orange-2: #ff8a3d;
  --orange-deep: #c24d12;
  --ink: #15171c;
  --ink-2: #343841;
  --muted: #857f75;
  --line: #e6e0d5;
  --paper: #f3f0ea;
  --card: #fff;
  --mono: 'JetBrains Mono', Consolas, monospace;
  --font: 'Manrope', 'PingFang SC', 'Microsoft YaHei', 'Source Han Sans SC', sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: var(--font);
  background: var(--paper);
  color: var(--ink-2);
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button, input, select { font-family: inherit; font-size: inherit; }
h1, h2, h3, p { margin: 0; }

.auth-shell { display: flex; min-height: 100vh; }

/* ---------- brand side ---------- */
.auth-visual {
  width: 56%;
  flex: 0 0 56%;
  position: relative;
  background: #101115;
  color: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 38px 46px 30px;
}
.auth-visual .bg {
  position: absolute;
  inset: 0;
  background-image: url('/assets/img/login-hero.svg');
  background-size: cover;
  background-position: center;
  opacity: .9;
  filter: saturate(.95) contrast(1.02);
  transform: scale(1.02);
}
.auth-visual .veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(13, 14, 18, .82) 0%, rgba(13, 14, 18, .38) 38%, rgba(13, 14, 18, .88) 100%),
    radial-gradient(700px 420px at 12% 30%, rgba(242, 103, 34, .22), transparent 65%),
    linear-gradient(90deg, rgba(13, 14, 18, .9), rgba(13, 14, 18, .28));
}
.auth-visual .grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, .85), transparent 78%);
}
.auth-visual .corner-tape {
  position: absolute;
  right: 46px; top: 0;
  width: 1px; height: 140px;
  background: linear-gradient(180deg, rgba(242, 103, 34, .9), transparent);
}
.auth-visual .corner-tape::before {
  content: '';
  position: absolute;
  top: 0; left: -3px;
  width: 7px; height: 7px;
  background: var(--orange);
  transform: rotate(45deg);
}
.auth-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 12px; }
.auth-brand .mark { width: 40px; height: 40px; }
.auth-brand .mark svg { width: 100%; height: 100%; }
.auth-brand .nm { font-size: 18px; font-weight: 800; letter-spacing: .07em; color: #fff; }
.auth-brand .nm em { font-style: normal; color: var(--orange-2); }
.auth-brand .sub { font-family: var(--mono); font-size: 9px; color: #8e8a82; letter-spacing: .18em; margin-top: 4px; }
.auth-brand .stamp {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: #8e8a82;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 5px;
  padding: 5px 8px;
  display: inline-flex; align-items: center; gap: 6px;
}
.auth-brand .stamp i { width: 5px; height: 5px; border-radius: 50%; background: #43c08b; box-shadow: 0 0 0 3px rgba(67, 192, 139, .14); }

.auth-copy { position: relative; z-index: 2; margin-top: auto; padding-bottom: 26px; max-width: 560px; }
.auth-copy .tag-line {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: 9.5px; letter-spacing: .16em;
  color: #c9a086;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.auth-copy .tag-line i { width: 26px; height: 1px; background: var(--orange); }
.auth-copy h1 {
  font-size: clamp(30px, 3.4vw, 48px);
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -.03em;
  color: #fff;
  text-wrap: balance;
}
.auth-copy h1 span { color: var(--orange-2); }
.auth-copy p {
  margin-top: 16px;
  font-size: 12.5px;
  color: #a5a199;
  line-height: 1.9;
  max-width: 440px;
}
.auth-metrics {
  display: flex;
  gap: 26px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .10);
  flex-wrap: wrap;
}
.auth-metrics div label { display: block; font-size: 9.5px; color: #85827b; letter-spacing: .04em; }
.auth-metrics div b { font-family: var(--mono); font-size: 20px; font-weight: 500; color: #fff; letter-spacing: -.03em; }
.auth-metrics div b small { font-size: 10px; color: var(--orange-3, #ffb27a); font-family: var(--font); margin-left: 3px; }
.auth-metrics div em { font-style: normal; display: block; font-size: 8.5px; color: #676a70; font-family: var(--mono); margin-top: 3px; letter-spacing: .04em; }
.auth-flow { display: flex; align-items: center; gap: 0; margin-top: 22px; position: relative; z-index: 2; flex-wrap: wrap; }
.auth-flow span { font-size: 9px; color: #8c8880; padding: 4px 0; letter-spacing: .03em; }
.auth-flow i { width: 22px; height: 1px; background: rgba(255, 255, 255, .18); margin: 0 7px; }
.auth-foot { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; font-size: 9px; color: #66686e; font-family: var(--mono); letter-spacing: .05em; padding-top: 20px; }
.auth-foot span { display: flex; gap: 12px; }

/* ---------- form side ---------- */
.auth-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  background:
    radial-gradient(600px 300px at 100% 0%, rgba(242, 103, 34, .07), transparent 70%),
    var(--paper-2, #faf8f4);
  position: relative;
}
.auth-panel::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(rgba(21, 23, 28, .02) 1px, transparent 1px), linear-gradient(90deg, rgba(21, 23, 28, .02) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(500px 400px at 60% 40%, #000, transparent 80%);
}
.auth-form-wrap { width: min(400px, 100%); position: relative; z-index: 2; }
.auth-form-head .eyebrow { font-family: var(--mono); font-size: 9px; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; display: flex; align-items: center; gap: 8px; }
.auth-form-head .eyebrow i { width: 18px; height: 1px; background: #cfc7ba; }
.auth-form-head h2 { font-size: 26px; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin-top: 10px; }
.auth-form-head p { font-size: 11.5px; color: var(--muted); margin-top: 7px; line-height: 1.7; }
.auth-form { margin-top: 28px; }
.f-item { margin-bottom: 15px; }
.f-item label { display: flex; align-items: center; justify-content: space-between; font-size: 10.5px; color: var(--ink-2); font-weight: 600; margin-bottom: 6px; }
.f-item label span { font-weight: 400; color: var(--muted); font-size: 9.5px; }
.f-ctrl { position: relative; }
.f-ctrl .ico { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: #a9a298; pointer-events: none; }
.f-ctrl input {
  width: 100%; height: 44px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 9px;
  padding: 0 12px 0 38px;
  font-size: 12.5px;
  color: var(--ink);
  outline: none;
  transition: border .16s, box-shadow .16s;
}
.f-ctrl input::placeholder { color: #b3aca1; }
.f-ctrl input:focus { border-color: rgba(242, 103, 34, .6); box-shadow: 0 0 0 3px rgba(242, 103, 34, .10); }
.f-ctrl .eye {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: 0; background: none; border-radius: 6px;
  color: #a9a298; display: inline-flex; align-items: center; justify-content: center;
}
.f-ctrl .eye:hover { background: #f7f3ec; color: var(--ink); }
.f-ctrl .eye .ico { position: static; transform: none; width: 15px; height: 15px; }
.f-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 4px 0 18px; }
.f-check { display: inline-flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--muted); cursor: pointer; }
.f-check input { width: 14px; height: 14px; accent-color: var(--orange); }
.f-link { font-size: 10.5px; color: var(--orange-deep); font-weight: 600; }
.f-link:hover { text-decoration: underline; }
.btn-auth {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--orange-2), var(--orange) 55%, #df520f);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .04em;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 14px 28px -14px rgba(242, 103, 34, .8), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .12s, box-shadow .18s;
  position: relative;
  overflow: hidden;
}
.btn-auth:hover { box-shadow: 0 18px 34px -14px rgba(242, 103, 34, .9), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-auth:active { transform: translateY(1px); }
.btn-auth .ico { width: 16px; height: 16px; }
.btn-auth.loading { pointer-events: none; opacity: .8; }
.btn-auth.loading::after {
  content: ''; width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite;
}
.auth-alt { margin-top: 18px; display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--muted); justify-content: center; }
.auth-alt a { color: var(--orange-deep); font-weight: 600; }
.auth-alt a:hover { text-decoration: underline; }
.auth-note {
  margin-top: 22px;
  display: flex; gap: 9px; align-items: flex-start;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  font-size: 9.5px;
  color: var(--muted);
  line-height: 1.65;
  background: rgba(255, 255, 255, .55);
}
.auth-note .ico { width: 14px; height: 14px; flex: 0 0 14px; color: var(--orange); margin-top: 1px; }
.auth-error {
  display: none;
  margin-bottom: 13px;
  padding: 9px 11px;
  border-radius: 7px;
  background: #fbeaea;
  border: 1px solid #efd2d2;
  color: #a63333;
  font-size: 10.5px;
  line-height: 1.5;
}
.auth-error.show { display: flex; gap: 7px; align-items: center; animation: shake .3s; }
.auth-error .ico { width: 14px; height: 14px; flex: 0 0 14px; }
.auth-copyright { margin-top: 26px; font-size: 9px; color: #a9a298; font-family: var(--mono); text-align: center; line-height: 1.8; letter-spacing: .03em; }
.auth-copyright b { font-weight: 500; color: #8c857a; }
.auth-copyright .reg { display: block; font-family: var(--font); font-size: 8.5px; letter-spacing: 0; color: #b3aca1; margin-top: 3px; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.reg-progress { display: flex; gap: 4px; margin-top: 4px; }
.reg-progress i { flex: 1; height: 3px; border-radius: 2px; background: #e9e2d7; }
.reg-progress i.on { background: var(--orange); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

@media (max-width: 1024px) {
  .auth-visual { width: 46%; flex-basis: 46%; padding: 30px; }
  .auth-copy h1 { font-size: 30px; }
  .auth-metrics { gap: 18px; }
}
@media (max-width: 820px) {
  .auth-shell { flex-direction: column; }
  .auth-visual { width: 100%; flex: 0 0 auto; min-height: 300px; padding: 24px 22px 22px; }
  .auth-copy { margin-top: 28px; }
  .auth-copy h1 { font-size: 27px; }
  .auth-copy p { font-size: 11px; }
  .auth-metrics { margin-top: 18px; padding-top: 16px; }
  .auth-flow, .auth-foot { display: none; }
  .auth-brand .stamp { display: none; }
  .auth-panel { padding: 30px 20px 40px; align-items: flex-start; }
  .auth-form-wrap { width: 100%; max-width: 440px; margin: 0 auto; }
}
@media (max-width: 480px) {
  .auth-visual { min-height: 240px; }
  .auth-copy h1 { font-size: 23px; }
  .auth-metrics div b { font-size: 16px; }
  .form-grid-2 { grid-template-columns: 1fr; }
}
