:root {
  --paper: #f8f4ea;
  --paper-2: #fffdf6;
  --ink: #14212b;
  --muted: #6f6a5f;
  --line: #ddd2bf;
  --accent: #c2412d;
  --accent-2: #0f766e;
  --gold: #c88a12;
  --soft: #f7dfd4;
  --danger: #b91c1c;
  --board: #0f3d34;
  --shadow: 0 22px 60px rgba(39, 33, 24, .16);
  --font: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  --serif: "Noto Serif SC", "Songti SC", "SimSun", serif;
}
* { box-sizing: border-box; }
html { background: var(--paper); }
body.login-page {
  margin: 0; min-height: 100vh; color: var(--ink);
  font-family: var(--font); -webkit-font-smoothing: antialiased;
  display: flex; align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(800px 500px at 92% -8%, rgba(194,65,45,.15), transparent 60%),
    radial-gradient(900px 560px at 4% 100%, rgba(15,118,110,.14), transparent 62%),
    linear-gradient(180deg, #fdf9f0 0%, var(--paper) 50%, #f0e8da 100%);
}
body.login-page::before {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 20;
  background: linear-gradient(90deg, var(--accent-2), var(--gold) 45%, var(--accent) 78%, #7c3aed);
}
.login-shell {
  width: min(1040px, 100%); display: grid; grid-template-columns: 1.08fr .92fr;
  border-radius: 24px; overflow: hidden; box-shadow: var(--shadow);
  border: 1px solid rgba(221,210,191,.7); background: var(--paper-2);
}
.login-aside {
  position: relative; overflow: hidden; padding: 40px 38px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 26px;
  background:
    radial-gradient(320px 220px at 92% 8%, rgba(255,138,101,.3), transparent 65%),
    radial-gradient(300px 220px at 4% 100%, rgba(94,234,212,.2), transparent 70%),
    linear-gradient(145deg, #0a3a32 0%, #0d4a40 58%, #34241f 100%);
  color: #f8f1e1;
}
.login-aside::after {
  content: "语"; position: absolute; right: -16px; bottom: -54px;
  font-family: var(--serif); font-size: 230px; line-height: 1; color: rgba(255,255,255,.055);
  pointer-events: none;
}
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; color: #f8f1e1; text-decoration: none; font-family: var(--serif); font-size: 18px; font-weight: 700; }
.login-brand-mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(145deg, #0f766e, #c2412d); color: #fff4d8; font-size: 21px;
}
.login-aside-copy { position: relative; z-index: 1; }
.eyebrow { margin: 0 0 12px; font-size: 11px; letter-spacing: .18em; color: #ffb39d; }
.login-aside h1 { margin: 0 0 12px; font-family: var(--serif); font-size: clamp(28px, 3.1vw, 40px); line-height: 1.3; }
.login-aside h1 em { font-style: normal; color: #ffd166; }
.login-aside-copy > p:last-child { margin: 0; color: #d7d0be; font-size: 13px; }
.login-features { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.login-features li { display: flex; align-items: center; gap: 10px; font-size: 13px; color: #e5ddca; }
.login-features span {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: rgba(255,255,255,.09); color: #ffd166; font-size: 10px; font-weight: 800;
}
.login-aside-note { position: relative; z-index: 1; margin: 0; color: #bfb7a4; font-size: 11px; }
.login-card {
  width: 100%; padding: 42px 38px; background: var(--paper-2);
  display: flex; flex-direction: column; justify-content: center; text-align: left;
}
.login-icon { font-size: 34px; margin-bottom: 10px; display: inline-block; }
.login-title { margin: 0 0 6px; font-family: var(--serif); font-size: 30px; letter-spacing: -.02em; color: var(--ink); }
.login-subtitle { margin: 0 0 24px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.login-form { text-align: left; }
.form-group { margin-bottom: 15px; }
.form-label { display: block; font-size: 12px; font-weight: 800; color: var(--muted); margin-bottom: 6px; padding-left: 2px; }
.form-input {
  width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 11px; font-size: 15px; font-family: inherit; background: var(--paper-2);
  color: var(--ink); outline: none; transition: border-color .15s, box-shadow .15s;
}
.form-input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(15,118,110,.11); }
.form-input::placeholder { color: #a59e90; }
.captcha-row { display: flex; gap: 8px; align-items: stretch; }
.captcha-img-wrap {
  flex: 0 0 124px; height: 48px; border: 1px solid var(--line); border-radius: 11px;
  background: #f1eadf; display: flex; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden;
}
.captcha-img-wrap:hover { border-color: var(--accent-2); }
.captcha-img-wrap svg { display: block; width: 100%; height: 100%; }
.captcha-img-wrap.loading { opacity: .45; pointer-events: none; }
.captcha-input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 2px; font-family: monospace; font-weight: 700; text-align: center; }
.captcha-refresh {
  flex: 0 0 48px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--paper-2); cursor: pointer; font-size: 18px; color: var(--muted);
}
.captcha-refresh:hover { border-color: var(--accent); color: var(--accent); }
.captcha-hint { margin-top: 4px; font-size: 10px; color: var(--muted); padding-left: 2px; }
.captcha-section { display: none; animation: fadeIn .25s; }
.captcha-section.show { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
.form-row-extras { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 14px; }
.remember-check { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; }
.remember-check input { width: 16px; height: 16px; accent-color: var(--accent-2); }
.fail-hint { font-size: 11px; color: var(--muted); }
.fail-hint.warn { color: var(--gold); }
.fail-hint.danger { color: var(--danger); font-weight: 700; }
.login-btn {
  width: 100%; min-height: 48px; border: 0; border-radius: 11px; cursor: pointer;
  background: linear-gradient(135deg, #0f766e 0%, #0d5a51 55%, #c2412d 145%);
  color: #fff6e6; font-size: 15px; font-weight: 800; letter-spacing: .04em;
  box-shadow: 0 10px 22px rgba(15,118,110,.2); transition: transform .15s, box-shadow .15s;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(194,65,45,.2); }
.login-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.login-btn .btn-spinner {
  display: none; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite;
  margin: 0 auto;
}
.login-btn.loading .btn-spinner { display: inline-block; vertical-align: middle; margin-right: 6px; }
.login-btn.loading .btn-text { display: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.error-msg {
  display: none; margin-bottom: 14px; padding: 10px 12px; border-radius: 9px;
  background: #fbe5e1; border: 1px solid #efc1b9; color: #a52a1b; font-size: 12px; line-height: 1.5;
}
.error-msg.show { display: block; animation: shake .35s; }
@keyframes shake { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.hint-box {
  margin-top: 18px; padding: 10px 12px; border-radius: 9px;
  background: #f3eee3; color: var(--muted); font-size: 11px; line-height: 1.6;
}
.hint-box strong { color: var(--accent-2); }
.login-footer { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 10px; color: var(--muted); line-height: 1.8; }
.login-footer a { color: var(--muted); text-decoration: none; }
.login-footer a:hover { color: var(--accent); text-decoration: underline; }
.login-footer img { vertical-align: -2px; margin-right: 3px; }
@media (prefers-color-scheme: dark) {
  :root { --paper: #0b1115; --paper-2: #111c21; --ink: #f0eadf; --muted: #a9a596; --line: #2d3f46; --danger: #ff8a80; }
  body.login-page {
    background:
      radial-gradient(800px 500px at 92% -8%, rgba(255,138,101,.14), transparent 60%),
      radial-gradient(900px 560px at 4% 100%, rgba(94,234,212,.11), transparent 62%),
      linear-gradient(180deg, #0e171b 0%, var(--paper) 50%, #080d10 100%);
  }
  .login-card { background: var(--paper-2); }
  .login-title { color: var(--ink); }
  .captcha-img-wrap { filter: invert(.9) hue-rotate(180deg); background: #0d1713; }
  .hint-box { background: #17251e; }
  .error-msg { background: #3a1d1a; border-color: #6b2b26; color: #ffb4a8; }
  .form-input { background: #0d1713; }
}
@media (max-width: 820px) {
  body.login-page { padding: 12px; align-items: flex-start; }
  .login-shell { grid-template-columns: 1fr; border-radius: 18px; }
  .login-aside { padding: 24px 22px 22px; gap: 16px; border-radius: 0; }
  .login-aside h1 { font-size: 28px; }
  .login-features { display: none; }
  .login-aside-note { display: none; }
  .login-card { padding: 28px 22px 24px; }
  .login-title { font-size: 26px; }
}
