:root {
  --bg: #f6f3ec;
  --panel: #fffdf8;
  --ink: #20242b;
  --muted: #71767f;
  --accent: #b4552d;
  --accent-2: #8f3f1f;
  --accent-soft: #f4e4d9;
  --green: #2f5d50;
  --line: #e8e1d5;
  --serif: "Songti SC", "STSong", "SimSun", Georgia, serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background:
    radial-gradient(900px 500px at 8% 0%, #f1e4d3 0%, transparent 55%),
    radial-gradient(700px 500px at 100% 100%, #e9e2d2 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }

::selection { background: var(--accent-soft); }

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 18px;
}

.auth-shell {
  width: min(1060px, 100%);
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(45, 37, 26, .14);
}

/* ---------- 左侧品牌 ---------- */
.auth-brand {
  position: relative;
  padding: 42px 44px;
  color: #f6f0e4;
  background:
    radial-gradient(600px 400px at 100% 0%, rgba(180, 85, 45, .35) 0%, transparent 60%),
    linear-gradient(150deg, #2c5147 0%, #223d35 55%, #1b302a 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.auth-brand::after {
  content: "安";
  position: absolute;
  right: -28px;
  bottom: -70px;
  font-family: var(--serif);
  font-size: 300px;
  line-height: 1;
  color: rgba(255, 250, 240, .045);
  pointer-events: none;
}

.brand-top {
  display: flex;
  align-items: center;
  gap: 13px;
  position: relative;
  z-index: 1;
}

.logo {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #c56a3f, #d98a5f);
  color: #fff;
  font-family: var(--serif);
  font-size: 24px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .18);
}

.brand-top b {
  display: block;
  font-family: var(--serif);
  font-size: 19px;
  letter-spacing: 1px;
  line-height: 1.3;
}

.brand-top small {
  display: block;
  font-size: 10.5px;
  letter-spacing: 2.4px;
  color: rgba(246, 240, 228, .6);
}

.auth-brand h1 {
  position: relative;
  z-index: 1;
  margin: 64px 0 18px;
  font-family: var(--serif);
  font-size: clamp(36px, 4.4vw, 52px);
  line-height: 1.25;
  letter-spacing: 2px;
  font-weight: 700;
}

.auth-brand > p {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: 380px;
  color: rgba(246, 240, 228, .72);
  font-size: 14px;
  line-height: 1.9;
}

.features {
  position: relative;
  z-index: 1;
  list-style: none;
  padding: 0;
  margin: 34px 0 0;
  display: grid;
  gap: 11px;
}

.features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: rgba(246, 240, 228, .82);
}

.features i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .14);
  font-style: normal;
  font-size: 11px;
  color: #e8b28f;
}

.brand-foot {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 30px;
  font-size: 11.5px;
  letter-spacing: 1.4px;
  color: rgba(246, 240, 228, .45);
}

/* ---------- 右侧表单 ---------- */
.auth-panel {
  padding: 40px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background:
    radial-gradient(500px 300px at 100% 0%, #fdf3e7 0%, transparent 60%),
    var(--panel);
}

.auth-card {
  width: min(360px, 100%);
}

.eyebrow {
  font-size: 10.5px;
  letter-spacing: 3px;
  color: var(--accent);
  font-weight: 700;
}

.auth-card h2 {
  margin: 9px 0 6px;
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: 1px;
  line-height: 1.35;
}

.auth-card .sub {
  margin: 0 0 26px;
  color: var(--muted);
  font-size: 12.8px;
}

.field {
  display: block;
  margin: 0 0 15px;
}

.field > span {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  color: #666258;
  letter-spacing: .4px;
}

.field input {
  width: 100%;
  height: 44px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffdf9;
  outline: none;
  font-size: 14px;
  transition: .18s;
}

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

.field input:focus {
  border-color: #d5b19a;
  box-shadow: 0 0 0 3px rgba(180, 85, 45, .09);
  background: #fff;
}

.pwd { position: relative; }
.pwd input { padding-right: 58px; }
.pwd button {
  position: absolute;
  right: 6px;
  top: 6px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #9a8f7c;
  font-size: 11.5px;
}
.pwd button:hover { background: #f4efe5; color: var(--accent); }

.cap-row {
  display: grid;
  grid-template-columns: 1fr 132px 34px;
  gap: 8px;
  align-items: center;
}

.cap-row input {
  height: 44px;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 600;
}

#captcha-img {
  width: 132px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #faf7f0;
  cursor: pointer;
  display: block;
  object-fit: cover;
}

.cap-row button {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbf8f1;
  color: #8a7f6d;
  font-size: 17px;
  transition: .18s;
}
.cap-row button:hover { border-color: #d5b19a; color: var(--accent); transform: rotate(90deg); }

.msg {
  min-height: 20px;
  margin: 4px 0 10px;
  font-size: 12.5px;
  color: #b23a22;
  line-height: 1.6;
}

.msg.ok { color: var(--green); }

.submit {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), #c96f45);
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 3px;
  transition: .18s;
  box-shadow: 0 10px 22px rgba(180, 85, 45, .22);
}

.submit:hover { background: linear-gradient(135deg, var(--accent-2), #b4552d); transform: translateY(-1px); }
.submit:disabled { opacity: .62; cursor: default; transform: none; box-shadow: none; }

.hint {
  margin: 18px 0 0;
  font-size: 11.5px;
  color: #a49a88;
  line-height: 1.75;
}

.hint b { color: #7c6f5b; font-weight: 600; }

.copyright {
  margin: 26px 0 0;
  font-size: 10.5px;
  letter-spacing: 1.2px;
  color: #b0a795;
}

/* ---------- 账号页 ---------- */
.account-info {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin: 0 0 22px;
  background: #f7f2e8;
  border: 1px solid var(--line);
  border-radius: 11px;
  font-size: 13px;
}

.account-info .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--green);
  color: #fff;
  font-family: var(--serif);
  font-size: 16px;
  flex: 0 0 auto;
}

.account-info b { display: block; font-size: 13.5px; }
.account-info span { display: block; font-size: 10.5px; color: var(--muted); }

.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
}

.link {
  border: 0;
  background: none;
  padding: 0;
  color: #8a7f6d;
  font-size: 12.5px;
  transition: .18s;
}
.link:hover { color: var(--accent); }
.link.danger:hover { color: #b23a22; }

/* ---------- 响应式 ---------- */
@media (max-width: 860px) {
  .auth-page { padding: 0; align-items: stretch; }
  .auth-shell {
    display: block;
    border-radius: 0;
    border: 0;
    min-height: 100vh;
    box-shadow: none;
  }
  .auth-brand { padding: 26px 24px 24px; }
  .auth-brand h1, .auth-brand > p, .features, .brand-foot { display: none; }
  .auth-panel { padding: 34px 22px 44px; min-height: calc(100vh - 96px); justify-content: flex-start; }
  .auth-card { margin: 0 auto; }
}

@media (max-width: 400px) {
  .cap-row { grid-template-columns: 1fr 112px 32px; }
  #captcha-img { width: 112px; }
  .auth-card h2 { font-size: 26px; }
}
