* { box-sizing: border-box; }
:root {
  --gold: #d8b25e;
  --gold-2: #e9ce83;
  --gold-soft: rgba(216, 178, 94, .22);
  --ink: #0a0908;
  --bg-deep: #0a0908;
  --panel: #0d0c0a;
  --line: #2b2823;
  --text: #ece5d6;
  --mute: #9b9487;
  --faint: #6b655b;
  --danger: #ff8a8a;
  --font-serif: "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC", "Songti SC", "STZhongsong", STSong, SimSun, serif;
  --font-mono: ui-monospace, Consolas, "Courier New", monospace;
}
html, body { margin: 0; min-height: 100%; }
body.auth-body {
  background: var(--bg-deep); color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }

.auth-shell {
  display: grid;
  grid-template-columns: minmax(480px, 52%) minmax(420px, 48%);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg-deep);
}

/* ---------------- 左侧品牌区 ---------------- */
.brand-pane {
  position: relative; overflow: hidden; display: flex; flex-direction: column;
  padding: 44px 56px 40px;
  color: #f8ebc8;
  background:
    radial-gradient(120% 90% at 80% 0%, rgba(190, 140, 55, .30), transparent 55%),
    radial-gradient(100% 80% at 10% 100%, rgba(120, 45, 30, .28), transparent 60%),
    linear-gradient(150deg, #2a1d0e 0%, #1b1208 42%, #120c06 100%);
}
.brand-pane::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 60%, rgba(0, 0, 0, .35));
  pointer-events: none;
}
.brand-art { position: absolute; inset: 0; pointer-events: none; opacity: .9; }
.brand-art .grid-lines {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(201, 169, 97, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 169, 97, .10) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(70% 70% at 60% 40%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(70% 70% at 60% 40%, #000 30%, transparent 78%);
}
.brand-art .radar {
  position: absolute; width: 560px; height: 560px;
  right: -60px; top: 50%; transform: translateY(-52%); opacity: .55;
}
.brand-art .wave {
  position: absolute; left: 0; right: 0; bottom: 0; height: 230px; opacity: .8;
}
.brand-art .corner-meta {
  position: absolute; top: 26px; right: 32px;
  font-family: var(--font-mono); font-size: 9.5px; line-height: 1.9;
  letter-spacing: .16em; color: rgba(232, 210, 154, .40);
  text-align: right; text-transform: uppercase;
}

.brand-head { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 48px; height: 48px; display: grid; place-items: center; flex: none;
  border-radius: 12px; color: #e9ce83;
  border: 1px solid rgba(217, 183, 103, .38);
  background: linear-gradient(150deg, #2c2010, #17110a);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .07), 0 8px 22px -14px rgba(217, 183, 103, .7);
  font: 600 23px/1 var(--font-serif);
}
.brand-name b { display: block; font: 700 18px/1.2 var(--font-serif); letter-spacing: .01em; color: #f8ebc8; }
.brand-name i { display: block; margin-top: 4px; font: 9.5px/1.2 var(--font-mono); letter-spacing: .24em; color: rgba(232, 210, 154, .5); font-style: normal; }

.brand-hero { position: relative; z-index: 2; margin-top: auto; margin-bottom: auto; padding: 28px 0 20px; }
.kicker {
  display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font: 11px/1.4 var(--font-mono); letter-spacing: .18em; color: rgba(232, 210, 154, .72);
}
.kicker::before {
  content: ""; width: 34px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232, 210, 154, .8));
}
.brand-title {
  margin: 0 0 22px; font-family: var(--font-serif); font-weight: 600;
  font-size: clamp(44px, 5.2vw, 76px); line-height: 1.02; letter-spacing: .02em;
  white-space: nowrap;
  background: linear-gradient(96deg, #8b6118 0%, #d6b459 26%, #f7edcb 52%, #d6b459 76%, #8b6118 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-subline {
  font-family: var(--font-serif); font-size: 16px; font-weight: 500; letter-spacing: .46em;
  color: rgba(246, 236, 214, .6); text-transform: uppercase; margin: -12px 0 24px;
}
.brand-tagline { margin: 0 0 28px; font-size: 15px; line-height: 1.85; letter-spacing: .04em; color: rgba(246, 236, 214, .72); }
.brand-pills { display: flex; flex-wrap: wrap; gap: 10px; max-width: 520px; }
.feature-pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px;
  font-size: 12px; color: rgba(246, 236, 214, .74);
  border: 1px solid rgba(232, 210, 154, .20); border-radius: 99px;
  background: rgba(232, 210, 154, .045); backdrop-filter: blur(4px);
}
.feature-pill .dot { width: 4px; height: 4px; border-radius: 50%; background: #d9b767; box-shadow: 0 0 8px #d9b767; }

/* ---------------- 右侧表单区 ---------------- */
.form-pane {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 48px 40px; overflow-y: auto;
  background:
    radial-gradient(110% 90% at 100% 0%, rgba(223, 185, 106, .06), transparent 58%),
    var(--panel);
  border-left: 1px solid #171512;
}
.form-pane::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image: radial-gradient(circle at 1px 1px, rgba(223, 185, 106, .10) 1px, transparent 0);
  background-size: 26px 26px;
}
.auth-card { position: relative; z-index: 1; width: min(388px, 100%); margin: auto 0; animation: auth-in .55s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes auth-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.auth-title { margin: 0; font-family: var(--font-serif); font-size: 30px; font-weight: 600; letter-spacing: .01em; color: #f3ead7; }
.auth-subtitle { margin: 8px 0 26px; font-size: 13px; line-height: 1.7; color: #8d8577; }

.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  border-radius: 10px; background: #171512; border: 1px solid #24211c;
  margin-bottom: 22px;
}
.auth-tab {
  height: 38px; border: 0; border-radius: 7px; background: transparent; cursor: pointer;
  color: #8d8577; font-size: 13px; letter-spacing: .08em; transition: .2s;
}
.auth-tab.on {
  background: #2d2921; color: #f0e5cc; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 1px 2px rgba(0, 0, 0, .35);
}

.fld { display: block; margin: 0 0 13px; }
.fld > span { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 6px; font-size: 12px; color: #b7ad9a; }
.fld > span i { font-style: normal; font-size: 10px; color: #6f685c; text-align: right; }
.fld input, .fld select {
  width: 100%; height: 44px; padding: 0 13px; color: #eee4d1;
  background: #141210; border: 1px solid #302c25; border-radius: 9px;
  font-size: 13.5px; outline: none; transition: border-color .15s, box-shadow .15s;
}
.fld input::placeholder { color: #5f594e; }
.fld input:focus, .fld select:focus { border-color: rgba(216, 178, 94, .65); box-shadow: 0 0 0 3px rgba(216, 178, 94, .09); }
.fld select { height: 42px; color: #d9cdb8; }
.hint { color: #9e9078; font-size: 10.5px; text-decoration: none; font-style: normal; }
.hint:hover { color: var(--gold); }

.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 44px; }
.eye {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  width: 34px; height: 34px; border: 0; background: transparent; cursor: pointer;
  color: #777062; border-radius: 6px; display: grid; place-items: center; font-size: 14px;
}
.eye:hover { color: var(--gold); background: rgba(216, 178, 94, .06); }

.err { min-height: 16px; margin: 6px 0 4px; font-size: 11.5px; color: var(--danger); }
.gold-btn {
  width: 100%; height: 46px; margin-top: 8px; border: 0; border-radius: 9px; cursor: pointer;
  background: linear-gradient(180deg, #e5c77f, #cfa952); color: #241a08;
  font-size: 14px; font-weight: 600; letter-spacing: .18em;
  box-shadow: 0 10px 24px rgba(207, 169, 82, .14);
  transition: .2s;
}
.gold-btn:hover { filter: brightness(1.04); transform: translateY(-1px); }
.gold-btn:active { transform: none; }
.gold-btn:disabled { opacity: .55; cursor: not-allowed; }
.ghost-btn {
  width: 100%; height: 42px; margin-top: 10px; border-radius: 9px;
  border: 1px solid #332f28; background: transparent; color: #a79d8b; cursor: pointer; font-size: 12.5px;
}
.ghost-btn:hover { border-color: rgba(216, 178, 94, .4); color: #d9c9a9; }
.ghost-btn:disabled { opacity: .45; cursor: not-allowed; }

.switch { margin: 16px 0 0; font-size: 11.5px; color: #7f786b; text-align: right; }
.switch a { color: #cfb47c; text-decoration: none; }
.switch a:hover { color: var(--gold); }

.auth-hint {
  margin-top: 24px; padding: 13px 15px; border: 1px dashed #302c25; border-radius: 10px;
  background: rgba(255, 255, 255, .015); font-size: 11.5px; line-height: 1.7; color: #7a7265;
}
.auth-hint b { display: block; color: #b8a887; font-weight: 600; margin-bottom: 2px; }
.auth-hint span { display: block; }

.agree { display: flex; align-items: flex-start; gap: 8px; margin: 6px 0 2px; font-size: 11px; line-height: 1.6; color: #8f8778; }
.agree input { accent-color: #c7a253; width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; }
.agree span { flex: 1; }
.agree-wide { margin: 8px 0 2px; }
.agree a { color: #c7a253; text-decoration: none; }
.agree a:hover { text-decoration: underline; }
.agree-note { margin: 3px 0 2px 22px; font-size: 10.5px; line-height: 1.55; color: #766f62; }
.agree-note a { color: #a58a52; text-decoration: none; }
.agree-note a:hover { text-decoration: underline; }

.role-pill {
  margin-left: 8px; font-size: 10px; color: var(--gold);
  border: 1px solid var(--gold-soft); border-radius: 999px; padding: 1px 8px;
}
.account-line { display: flex; align-items: center; margin: 0 0 16px; font-size: 15px; color: #e8dcc2; }
.account-line b { font-weight: 500; }
.code-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.code-row .ghost-btn { width: auto; height: 40px; margin: 0; white-space: nowrap; padding: 0 14px; }
.dev-code { margin: 4px 0 8px; font: 11px/1.5 var(--font-mono); color: #d9c191; }

.legal { margin: 24px 0 0; text-align: center; font-size: 9.5px; line-height: 1.8; color: #5f594e; }
.legal a { color: #8d8068; text-decoration: none; }
.legal a:hover { color: var(--gold); }

@media (max-height: 780px) {
  .form-pane { align-items: flex-start; padding-top: 30px; padding-bottom: 30px; }
}
@media (max-width: 980px) {
  .auth-shell { grid-template-columns: 1fr; }
  .brand-pane { display: none; }
  .form-pane { border-left: 0; min-height: 100vh; min-height: 100dvh; padding: 40px 24px; }
  .auth-card { width: min(400px, 100%); }
}
@media (max-width: 520px) {
  .form-pane { padding: 30px 20px; }
  .auth-title { font-size: 26px; }
  .auth-subtitle { margin-bottom: 20px; }
}
