/* ============ 设计令牌 ============ */
:root {
  --brand: #00509e;          /* 太保蓝 */
  --brand-deep: #003f80;
  --brand-dark: #002f61;
  --brand-ink: #06264a;      /* 侧栏底色 */
  --brand-tint: #f0f5fb;
  --brand-border: #cfdff2;
  --gold: #ffd166;
  --ink: #1f2328;
  --ink-2: #57606a;
  --ink-3: #8b949e;
  --line: #d8dee4;
  --line-soft: #eaeef2;
  --bg: #f5f6f8;
  --card: #ffffff;
  --thead: #f6f9fc;
  --ok-bg: #f0f9f2; --ok-bd: #b7e2c0; --ok-tx: #1a7f37;
  --err-bg: #fdf1f0; --err-bd: #f5c6c3; --err-tx: #a40e26;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(31,35,40,.06), 0 1px 6px rgba(31,35,40,.05);
  --shadow-lg: 0 8px 32px rgba(0,47,97,.18);
  --side-w: 218px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
}

/* ============ 侧栏布局 ============ */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--side-w); flex: none;
  background: linear-gradient(180deg, var(--brand-dark) 0%, var(--brand-ink) 100%);
  color: #fff; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.10);
}
.side-brand .t1 { font-weight: 700; font-size: 15px; letter-spacing: 1px; line-height: 1.3; }
.side-brand .t2 { font-size: 11.5px; color: rgba(255,255,255,.55); letter-spacing: 2px; }

.side-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }
.side-group {
  font-size: 11px; color: rgba(255,255,255,.38); letter-spacing: 2px;
  padding: 14px 10px 6px;
}
.side-nav a {
  display: flex; align-items: center; gap: 10px;
  color: rgba(255,255,255,.78); text-decoration: none;
  padding: 9px 12px; border-radius: 8px; font-size: 13.5px;
  margin-bottom: 2px; position: relative;
  transition: background .2s, color .2s;
}
.side-nav a svg { flex: none; opacity: .85; }
.side-nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.side-nav a.active { background: rgba(255,255,255,.13); color: #fff; font-weight: 600; }
.side-nav a.active::before {
  content: ""; position: absolute; left: -10px; top: 7px; bottom: 7px;
  width: 3px; border-radius: 2px; background: var(--gold);
}

.side-user {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; border-top: 1px solid rgba(255,255,255,.10);
}
.side-user .avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: linear-gradient(135deg, #2f6fb5, var(--brand));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; color: #fff;
}
.side-user .info { flex: 1; min-width: 0; }
.side-user .name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-user .role { font-size: 11.5px; color: rgba(255,255,255,.5); }
.side-user > a { color: rgba(255,255,255,.6); display: flex; padding: 6px; border-radius: 6px; transition: background .2s, color .2s; }
.side-user > a:hover { color: #fff; background: rgba(255,255,255,.10); }

main.content { flex: 1; min-width: 0; padding: 26px 30px 48px; max-width: 1920px; margin: 0 auto; }

@media (max-width: 860px) {
  .layout { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  .side-nav { display: flex; flex-wrap: wrap; padding: 8px; }
  .side-group { display: none; }
  .side-nav a { padding: 8px 12px; }
  main.content { padding: 18px 14px 40px; }
}

/* ============ 卡片与标题 ============ */
.card { background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 22px 26px; margin-bottom: 20px; box-shadow: var(--shadow); }
h1 { font-size: 19px; margin: 0 0 16px; font-weight: 700; letter-spacing: .3px; }
h1 .muted { font-weight: 400; font-size: 14px; }
h2 { font-size: 15px; margin: 0 0 12px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
h2::before { content: ""; width: 3px; height: 14px; background: var(--brand); border-radius: 2px; }
.muted { color: var(--ink-2); font-size: 13px; }

/* ============ 表单 ============ */
form.inline { display: flex; gap: 14px; align-items: end; flex-wrap: wrap; }
label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 5px; }
input, select {
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-family: inherit; color: var(--ink); background: #fff;
  transition: border-color .2s, box-shadow .2s; min-height: 38px;
}
input:hover, select:hover { border-color: #b6bec7; }
input:focus, select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,80,158,.13); }
::placeholder { color: var(--ink-3); }

button, .btn {
  background: var(--brand); color: #fff; border: 1px solid var(--brand);
  padding: 8px 20px; border-radius: 8px; font-size: 14px; font-family: inherit;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
  min-height: 38px; transition: background .2s, border-color .2s, box-shadow .2s;
}
button:hover, .btn:hover { background: var(--brand-deep); border-color: var(--brand-deep); box-shadow: 0 2px 8px rgba(0,80,158,.25); }
button:focus-visible, .btn:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
button:active, .btn:active { background: var(--brand-dark); }
.btn.ghost { background: #fff; color: var(--brand); border: 1px solid var(--brand-border); }
.btn.ghost:hover { background: var(--brand-tint); border-color: var(--brand); box-shadow: none; }

/* ============ 表格 ============ */
.scroll { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: 8px; }
table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
th, td { padding: 8px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--line-soft); font-variant-numeric: tabular-nums; }
th { background: var(--thead); color: var(--ink-2); font-weight: 600; text-align: center; font-size: 12.5px; letter-spacing: .3px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
td.l, th.l { text-align: left; }
td.c { text-align: center; }
tbody tr:hover td, table tr:hover td { background: var(--brand-tint); }
tr:last-child td { border-bottom: none; }
.scroll.tall { max-height: 64vh; overflow-y: auto; }
.total-row td { background: var(--thead) !important; font-weight: 600; border-top: 2px solid var(--brand-border); }

/* ============ 提示条 ============ */
.error, .ok { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 8px; margin-bottom: 16px; font-size: 13.5px; }
.error { background: var(--err-bg); border: 1px solid var(--err-bd); color: var(--err-tx); }
.ok { background: var(--ok-bg); border: 1px solid var(--ok-bd); color: var(--ok-tx); }
.error svg, .ok svg { flex: none; margin-top: 2px; }
.error ul { margin: 4px 0 0 16px; padding: 0; }

/* ============ 看板 KPI ============ */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi {
  background: var(--card); border: 1px solid var(--line-soft); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--brand), #5b8fd4); }
.kpi .head { display: flex; align-items: center; justify-content: space-between; color: var(--ink-2); font-size: 12.5px; }
.kpi .head svg { color: var(--brand); opacity: .8; }
.kpi .n { font-size: 30px; font-weight: 700; color: var(--ink); margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.kpi .sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ============ 登录页（分栏 · 宝蓝×鎏金） ============ */
@font-face {
  font-family: "LuxSerif";
  src: url("/static/fonts/LuxSerif.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}
body.auth {
  --champ: #d9b878;
  --champ-hi: #ecd9a8;
  --champ-dp: #b28f52;
  --ivory: #f4efe2;
  --paper: #f7f3ea;
  --serif: "LuxSerif", "Noto Serif SC", "Source Han Serif SC", "STZhongsong", "SimSun", serif;
  margin: 0; background: #081228;
}
.auth-split { display: flex; min-height: 100vh; }

/* ---- 左侧：品牌主视觉 ---- */
.auth-hero {
  flex: 1.15; position: relative; overflow: hidden; color: var(--ivory);
  display: flex; align-items: center;
  background:
    radial-gradient(1050px 700px at 84% -12%, rgba(52,92,190,.5), transparent 64%),
    radial-gradient(820px 520px at 0% 108%, rgba(24,52,120,.42), transparent 58%),
    linear-gradient(158deg, #1b2c66 0%, #101d47 46%, #081228 100%);
}
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; }
.lux-grain {
  position: absolute; inset: 0; pointer-events: none; opacity: .05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='140' height='140' filter='url(%23n)' opacity='.7'/></svg>");
}

.auth-mark {
  position: absolute; top: 36px; left: 60px; display: flex; align-items: center; gap: 12px;
  font-size: 13px; letter-spacing: 4px; color: rgba(244,239,226,.66);
}

.auth-hero-body { position: relative; padding: 0 40px 60px 92px; max-width: 680px; }
.auth-hero-body > * { opacity: 0; transform: translateY(16px); animation: lux-in .9s cubic-bezier(.22,.7,.3,1) forwards; }
.lux-title  { animation-delay: .12s; }
.auth-rule  { animation-delay: .34s; }
.auth-slogan{ animation-delay: .46s; }
@keyframes lux-in { to { opacity: 1; transform: none; } }

.lux-title {
  margin: 0 0 34px;
  font-family: var(--serif);
  font-size: clamp(40px, 4.5vw, 58px); font-weight: 800; line-height: 1.42; letter-spacing: 9px;
  background: linear-gradient(180deg, #f6e7c2 22%, #e0bf82 78%, #cda45f 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 0 56px rgba(217,184,120,.2);
}
.auth-rule {
  position: relative; width: 340px; max-width: 76%; height: 1px; margin-bottom: 30px;
  background: linear-gradient(90deg, rgba(217,184,120,.9), rgba(217,184,120,.04));
}
.auth-rule::after {
  content: ""; position: absolute; left: 116px; top: -2.5px; width: 6px; height: 6px;
  border-radius: 50%; background: var(--champ-hi);
  box-shadow: 0 0 10px 2px rgba(236,217,168,.75);
}
.auth-slogan { margin: 0; font-size: 15px; letter-spacing: 6px; color: rgba(244,239,226,.62); }

.auth-foot {
  position: absolute; left: 92px; bottom: 30px;
  font-size: 10.5px; letter-spacing: 5px; color: rgba(217,184,120,.4);
}

/* ---- 右侧：象牙纸面板 ---- */
.auth-panel {
  flex: 1; position: relative; display: flex; align-items: center; justify-content: center;
  padding: 48px 44px;
  background:
    radial-gradient(760px 500px at 50% -14%, rgba(217,184,120,.12), transparent 62%),
    linear-gradient(180deg, #fbf8f1 0%, var(--paper) 55%, #f0e8d8 100%);
}
.auth-panel::before {
  content: ""; position: absolute; inset: 20px; pointer-events: none;
  border: 1px solid rgba(178,143,82,.32);
}
.auth-corner { position: absolute; width: 14px; height: 14px; pointer-events: none; }
.auth-corner::before, .auth-corner::after { content: ""; position: absolute; background: rgba(178,143,82,.85); }
.auth-corner::before { width: 14px; height: 1px; }
.auth-corner::after { width: 1px; height: 14px; }
.auth-corner.tl { top: 14px; left: 14px; }
.auth-corner.tr { top: 14px; right: 14px; transform: scaleX(-1); }
.auth-corner.bl { bottom: 14px; left: 14px; transform: scaleY(-1); }
.auth-corner.br { bottom: 14px; right: 14px; transform: scale(-1); }

.auth-form { width: 356px; max-width: 100%; position: relative; }
.auth-form > *, .auth-form form > * { opacity: 0; transform: translateY(12px); animation: lux-in .8s cubic-bezier(.22,.7,.3,1) forwards; }
.auth-overline { animation-delay: .3s; }
.auth-form h2  { animation-delay: .38s; }
.auth-form .lux-rule { animation-delay: .46s; }
.auth-form .lux-error { animation-delay: .5s; }
.auth-form form > .lux-field:nth-of-type(1) { animation-delay: .54s; }
.auth-form form > .lux-field:nth-of-type(2) { animation-delay: .62s; }
.auth-form form > .lux-submit { animation-delay: .72s; }
.auth-note { animation-delay: .85s; }

.auth-overline { text-align: center; font-size: 11px; letter-spacing: 8px; text-indent: 8px; color: var(--champ-dp); margin-bottom: 12px; }
.auth-form h2 {
  text-align: center; margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 34px; font-weight: 700; letter-spacing: 16px; text-indent: 16px; color: #1e2a4a;
}
.auth-form h2::before { display: none; }
.lux-rule { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 42px; }
.lux-rule i { width: 66px; height: 1px; background: linear-gradient(90deg, transparent, rgba(178,143,82,.7)); }
.lux-rule i:last-child { transform: scaleX(-1); }

.lux-field { margin-bottom: 24px; }
.lux-field label { display: block; font-size: 13.5px; letter-spacing: 2px; color: #33405c; margin-bottom: 8px; }
.lux-field input {
  width: 100%; box-sizing: border-box;
  border: 1px solid #dbcfae; border-radius: 8px;
  background: #fffdf8; color: var(--ink);
  padding: 0 16px; min-height: 52px; font-size: 15px; letter-spacing: .5px;
  transition: border-color .25s, box-shadow .25s, background .25s;
  caret-color: var(--champ-dp);
}
.lux-field input:hover { border-color: #c6b184; }
.lux-field input:focus {
  outline: none; border-color: var(--champ-dp); background: #fff;
  box-shadow: 0 0 0 3px rgba(178,143,82,.16);
}
.lux-field input:-webkit-autofill {
  -webkit-box-shadow: 0 0 0 60px #fffdf8 inset;
  -webkit-text-fill-color: var(--ink);
  transition: background-color 99999s;
}
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; }
.pw-eye {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  border: none; background: none; cursor: pointer; padding: 10px;
  color: #b8a678; display: flex; align-items: center;
}
.pw-eye:hover { color: var(--champ-dp); }

.lux-submit {
  position: relative; overflow: hidden; width: 100%; margin-top: 18px;
  min-height: 54px; border: none; border-radius: 8px; cursor: pointer;
  font-size: 15px; font-weight: 600; letter-spacing: 8px; text-indent: 8px;
  color: #241a0c;
  background: linear-gradient(135deg, #ecd39c 0%, #d4af6e 55%, #bd965a 100%);
  box-shadow: 0 16px 32px -14px rgba(150,115,60,.6);
  transition: transform .25s, box-shadow .25s, filter .25s;
}
.lux-submit span { position: relative; z-index: 1; }
.lux-submit::after {
  content: ""; position: absolute; top: 0; bottom: 0; left: -70%; width: 44%;
  background: linear-gradient(105deg, transparent, rgba(255,252,240,.6), transparent);
  transform: skewX(-18deg); transition: left .6s ease;
}
.lux-submit:hover { transform: translateY(-1px); filter: brightness(1.04); box-shadow: 0 20px 38px -14px rgba(150,115,60,.7); }
.lux-submit:hover::after { left: 130%; }
.lux-submit:active { transform: translateY(0); }

.lux-error {
  display: flex; gap: 9px; align-items: flex-start;
  border: 1px solid #e3b3aa; background: #f9e9e5; color: #8c2f28;
  font-size: 13px; line-height: 1.5; padding: 10px 13px; margin-bottom: 24px;
  border-radius: 8px;
}
.lux-error svg { flex: none; margin-top: 2px; }

.auth-note { margin: 30px 0 0; text-align: center; font-size: 12px; letter-spacing: 2px; color: #a99e86; }

@media (max-width: 900px) {
  .auth-split { flex-direction: column; }
  .auth-hero { min-height: 46vh; align-items: flex-end; }
  .auth-mark { left: 28px; top: 24px; }
  .auth-hero-body { padding: 110px 28px 46px; }
  .lux-title { font-size: 32px; letter-spacing: 6px; margin-bottom: 20px; }
  .auth-rule { margin-bottom: 20px; }
  .auth-slogan { letter-spacing: 3px; font-size: 13.5px; }
  .auth-foot { display: none; }
  .auth-panel { padding: 40px 24px 56px; }
  .auth-panel::before { inset: 12px; }
  .auth-corner { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .auth-hero-body > *, .auth-form > *, .auth-form form > * { animation: none !important; opacity: 1 !important; transform: none !important; }
}

/* ============ 登录页 · 方案2（主视觉大图 × 象牙卡片） ============ */
/* 与方案1共用 body.auth 的色号变量与 .auth-form / .lux-* 表单组件, 此处只改版式与配色 */
body.auth-v2 { background: #14264a; }
.v2-split { display: flex; min-height: 100vh; }

/* ---- 左侧: 主视觉大图(标题/标语/LOGO 已烘焙在图内) ---- */
/* 图 1030×941, 内容几乎顶到边: LOGO 在 y=51, 标语收在 y=842, 上下总共只有 150px 余量。
   固定 66% 宽 + cover 会把图撑到比视口高, 上下各裁掉约 99px, 正好削掉 LOGO。
   改为按视口高度锁定图片比例(宽 = 高 × 1030/941), 整幅完整显示、一点不裁;
   右侧深蓝面板 grow 吃掉剩余宽度。窗口过窄把 hero 压缩时, contain 自动留白而不是裁 LOGO。 */
.v2-hero {
  flex: 0 1 calc(100vh * 1030 / 941); min-width: 0;
  background: #cfdcec url("/static/login-hero.jpg?v=1") center center / contain no-repeat;
}

/* ---- 右侧: 深蓝底 + 卡片(向左压住大图边缘) ---- */
.v2-side {
  flex: 1 0 auto; position: relative;
  display: flex; align-items: center; justify-content: flex-end;
  padding: 28px 7.6vw 28px 0;
  background: linear-gradient(180deg, #1b2f57 0%, #14264a 55%, #0f1d3a 100%);
}
.v2-arc {
  position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.v2-arc::before, .v2-arc::after {
  content: ""; position: absolute; border-radius: 50%;
  border: 1px solid rgba(217,184,120,.16);
}
.v2-arc::before { width: 620px; height: 620px; top: -290px; right: -240px; }
.v2-arc::after  { width: 900px; height: 900px; bottom: -520px; right: -380px; border-color: rgba(217,184,120,.09); }

.v2-card {
  position: relative; z-index: 1; flex: none;
  width: 30.5vw; min-width: 400px; max-width: 540px;
  /* 高度取「84vh 与内容实高」的大者: 屏幕矮或出报错条时卡片自己长高, 不裁内容 */
  height: auto; min-height: min(84vh, 860px);
  margin: auto 0;  /* 竖直居中; 内容超出视口时靠自动外边距让页面正常滚动, 不会吃掉上半截 */
  display: flex; align-items: center; justify-content: center;
  padding: 40px 44px; box-sizing: border-box;
  border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, #fbf8f2 0%, var(--paper) 60%, #f2ece0 100%);
  box-shadow: 0 40px 90px -30px rgba(4,10,26,.55), 0 2px 0 rgba(255,255,255,.6) inset;
}
/* 卡片右上角装饰弧线 */
.v2-card-arc {
  position: absolute; top: -120px; right: -120px; width: 300px; height: 300px;
  border: 1px solid rgba(178,143,82,.28); border-radius: 50%; pointer-events: none;
}

.auth-v2 .auth-form { width: 340px; }
.auth-v2 .auth-form > *, .auth-v2 .auth-form form > * { animation-duration: .7s; }

.v2-welcome {
  text-align: center; margin-bottom: 10px;
  font-family: "Segoe Script", "Brush Script MT", "Lucida Handwriting", cursive;
  font-style: italic; font-size: 34px; letter-spacing: 2px; color: var(--champ-dp);
  animation-delay: .3s;
}
.auth-v2 .auth-form h2 {
  font-size: 30px; letter-spacing: 6px; text-indent: 6px; color: #1c2b52; margin-bottom: 14px;
}
.auth-v2 .lux-rule { margin-bottom: 38px; }

/* 方案2 表单走中性冷灰边框, 与图内卡片一致; 金色只留给按钮与分隔 */
.auth-v2 .lux-field label { color: #2c3a5c; letter-spacing: 1px; }
.auth-v2 .lux-field input {
  border: 1px solid #e0e4ec; border-radius: 6px; background: #fff;
  min-height: 54px; caret-color: #2c3a5c;
}
.auth-v2 .lux-field input::placeholder { color: #b3bac8; letter-spacing: 0; }
.auth-v2 .lux-field input:hover { border-color: #c8cedb; }
.auth-v2 .lux-field input:focus {
  border-color: var(--champ-dp); box-shadow: 0 0 0 3px rgba(178,143,82,.14);
}
.auth-v2 .lux-field input:-webkit-autofill { -webkit-box-shadow: 0 0 0 60px #fff inset; }
.auth-v2 .pw-eye { color: #b3bac8; }
.auth-v2 .pw-eye:hover { color: var(--champ-dp); }
.auth-v2 .lux-submit {
  margin-top: 30px; border-radius: 6px; letter-spacing: 10px; text-indent: 10px; color: #fff;
  background: linear-gradient(135deg, #ddb055 0%, #cd9a37 55%, #c08d2e 100%);
  text-shadow: 0 1px 1px rgba(120,85,20,.35);
}

/* 1366×768 之类的笔记本, 去掉浏览器边框后可视高度仅 600 出头: 压紧留白, 保证整卡不出现滚动 */
@media (min-width: 1101px) and (max-height: 800px) {
  .v2-card { padding: 32px 40px; }
  .v2-welcome { font-size: 28px; margin-bottom: 6px; }
  .auth-v2 .auth-form h2 { font-size: 26px; margin-bottom: 10px; }
  .auth-v2 .lux-rule { margin-bottom: 24px; }
  .auth-v2 .lux-field { margin-bottom: 16px; }
  .auth-v2 .lux-field input { min-height: 48px; }
  .auth-v2 .lux-error { margin-bottom: 16px; }
  .auth-v2 .lux-submit { margin-top: 22px; min-height: 50px; }
  .auth-v2 .auth-note { margin-top: 18px; }
}

@media (max-width: 1100px) {
  .v2-split { flex-direction: column; }
  /* 竖排时同样按图片比例给高度, 整幅完整(手机上 ≈ 42vh, 与原先视觉高度相当) */
  .v2-hero { flex: none; width: 100%; height: auto; aspect-ratio: 1030 / 941; background-size: cover; }
  .v2-side {
    flex: 1; justify-content: center; padding: 40px 24px 56px;
  }
  .v2-card {
    width: 100%; min-width: 0; max-width: 460px;
    min-height: 0;              /* 手机上卡片按内容高, 不再撑到 84vh */
    margin: -60px 0 0; padding: 40px 28px;
  }
}

/* ============ 摘要带 / 工具条 / 徽章 ============ */
.summary {
  display: flex; gap: 10px 32px; flex-wrap: wrap; margin-bottom: 16px;
  background: var(--brand-tint); border: 1px solid var(--brand-border);
  border-radius: 8px; padding: 12px 18px; font-size: 13.5px;
}
.summary b { color: var(--brand); font-variant-numeric: tabular-nums; }

.toolbar { display: flex; gap: 10px; margin-bottom: 18px; align-items: center; flex-wrap: wrap; }
.toolbar h1 { margin: 0; flex: 1; }

.actions { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.actions form { display: inline-flex; gap: 6px; align-items: center; }
.actions input { min-height: 32px; padding: 4px 10px; font-size: 13px; }
.actions button, .actions .btn { min-height: 32px; padding: 4px 14px; font-size: 13px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.badge.on { background: var(--ok-bg); color: var(--ok-tx); border: 1px solid var(--ok-bd); }
.badge.off { background: #f2f4f6; color: var(--ink-3); border: 1px solid var(--line); }
.badge.role { background: var(--brand-tint); color: var(--brand); border: 1px solid var(--brand-border); }

.pager { display: flex; gap: 12px; align-items: center; margin-top: 14px; }

/* ============ 看板筛选与图表 ============ */
.filters { padding: 14px 20px; }
.filters form { align-items: center; justify-content: space-between; }
.preset-row { display: flex; gap: 8px; flex-wrap: wrap; }
.custom-range { display: flex; gap: 10px; align-items: end; flex-wrap: wrap; }
.custom-range input[type=date] { min-height: 34px; padding: 4px 8px; font-size: 13px; }
.custom-range label { margin-bottom: 3px; }
.custom-range button { min-height: 34px; padding: 5px 16px; font-size: 13px; }

.chart-wrap { width: 100%; overflow: hidden; }
.chart-wrap svg { display: block; }
.chart-legend { display: flex; gap: 18px; flex-wrap: wrap; margin: 2px 0 12px; font-size: 12.5px; color: var(--ink-2); }
.lg-item { display: inline-flex; align-items: center; gap: 7px; }
.lg-line { width: 16px; height: 2px; border-radius: 1px; display: inline-block; }
.lg-rect { width: 11px; height: 11px; border-radius: 3px; display: inline-block; }

.chart-tip {
  display: none; position: fixed; z-index: 100; pointer-events: none;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(31,35,40,.14); padding: 8px 12px; font-size: 12.5px;
  min-width: 120px;
}
.chart-tip .tt-title { color: var(--ink-2); margin-bottom: 4px; font-size: 12px; }
.chart-tip .tt-row { display: flex; align-items: center; gap: 8px; padding: 1px 0; }
.chart-tip .tt-key { width: 12px; height: 3px; border-radius: 1.5px; flex: none; }
.chart-tip .tt-row b { font-variant-numeric: tabular-nums; min-width: 2ch; }
.chart-tip .tt-name { color: var(--ink-2); }

/* ============ 导入步骤 ============ */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin-top: 6px; }
.step { display: flex; gap: 12px; background: #fafbfc; border: 1px solid var(--line-soft); border-radius: 8px; padding: 16px 18px; }
.step-no {
  flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; margin-top: 2px;
}
.step-title { font-weight: 600; font-size: 14px; }

/* ============ 防拍照水印 ============ */
/* 底图(含文字/浓度/字号)由后端按设置生成并行内注入; 此处只管铺满与倾斜。
   scale(1.8) 是为了旋转后仍盖住视口四角; pointer-events:none 保证不影响任何点击。 */
.watermark {
  position: fixed; inset: 0; z-index: 9999;
  pointer-events: none; user-select: none;
  background-repeat: repeat;
  transform: rotate(-24deg) scale(1.8);
}

/* ============ 弹窗 ============ */
.modal-mask {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(15, 25, 45, .42);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-mask[hidden] { display: none; }
.modal {
  background: var(--card); border-radius: var(--radius); padding: 22px 26px 20px;
  width: 440px; max-width: 100%; box-shadow: 0 16px 48px rgba(15, 25, 45, .28);
}
.modal h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 10px; font-size: 16px; color: #b4690e; }
.modal p { margin: 0; font-size: 14px; line-height: 1.75; white-space: pre-wrap; }
.modal-act { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

/* ============ 安全设置 ============ */
.settings { max-width: 640px; }
.set-item { padding: 18px 0; border-top: 1px solid var(--line-soft); }
.set-item .muted { margin: 8px 0 0; font-size: 13px; }
.set-item textarea {
  width: 100%; margin-top: 4px; padding: 8px 10px; resize: vertical;
  font: inherit; font-size: 13.5px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px;
}
.set-item textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.set-item label[for] { display: block; margin: 14px 0 0; font-size: 12.5px; color: var(--ink-2); }
.set-title { font-size: 14.5px; font-weight: 600; }
.tune {
  display: grid; grid-template-columns: auto 1fr 52px; align-items: center;
  gap: 12px 14px; margin-top: 16px; max-width: 460px;
}
.tune label { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.tune output { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--brand); font-weight: 600; }
.tune input[type=range] { width: 100%; accent-color: var(--brand); cursor: pointer; }

.theme-pick { display: flex; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.theme-opt { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.theme-opt input { accent-color: var(--brand); cursor: pointer; }
.theme-body {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line-soft); border-radius: 8px; padding: 10px 14px;
  transition: border-color .2s, background .2s;
}
.theme-opt:hover .theme-body { border-color: var(--brand); }
.theme-opt input:checked + .theme-body { border-color: var(--brand); background: var(--brand-tint); }
.theme-name { font-size: 13.5px; }
.theme-prev { font-size: 12.5px; color: var(--brand); text-decoration: none; }
.theme-prev:hover { text-decoration: underline; }
.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track {
  flex: none; width: 40px; height: 22px; border-radius: 11px; background: #c9d1d9;
  position: relative; transition: background .2s;
}
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; transition: transform .2s;
}
.switch input:checked + .track { background: var(--brand); }
.switch input:checked + .track::after { transform: translateX(18px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--brand-tint); }

/* ============ 动效可及性 ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============ 打印 ============ */
.print-only { display: none; }
@media print {
  .no-print { display: none !important; }
  .print-only { display: block; }
  body { background: #fff; font-size: 11px; }
  .layout { display: block; }
  main.content { max-width: none; margin: 0; padding: 0; }
  .card { box-shadow: none; border: none; padding: 0; margin: 0 0 10px; }
  .scroll, .scroll.tall { overflow: visible; max-height: none; border: none; }
  th { position: static; }
  th, td { padding: 3px 6px; font-size: 10px; border-bottom: 1px solid #bbb; }
  .summary { border: 1px solid #999; background: #fff; padding: 6px 10px; }
  .summary b { color: #000; }
}
