/* ============================================================
   民主绘赋能中心 · 设计系统 v2
   品牌基因：藏青 #1B3A5C × 朱砂红 #B54334 × 米白 #F5F2EC（源自民主绘LOGO）
   设计语言：庄重现代 · 层次分明 · 微光质感 · 全程动效
   ============================================================ */
:root {
  /* 主色阶 */
  --navy: #1B3A5C; --navy-2: #16304E; --navy-3: #0D1F33; --navy-4: #091624;
  --red: #B54334; --red-2: #9A382B; --red-glow: rgba(181,67,52,.35);
  --teal: #2E7D74; --teal-soft: #E6F1EF;
  --gold: #C9A063; --amber: #B8860B; --amber-soft: #FBF3E0;
  --red-soft: #F6E8E5;
  /* 中性 */
  --bg: #F4F1EA; --card: #FFFFFF; --ink: #26313B; --ink-2: #5C6B78; --ink-3: #8A96A1;
  --line: #E6E0D2; --line-2: #EFEAE0;
  /* 阴影体系 */
  --sh-1: 0 1px 2px rgba(13,31,51,.06), 0 2px 8px -2px rgba(13,31,51,.08);
  --sh-2: 0 2px 6px rgba(13,31,51,.07), 0 10px 32px -12px rgba(13,31,51,.20);
  --sh-3: 0 4px 12px rgba(13,31,51,.10), 0 24px 56px -16px rgba(13,31,51,.28);
  --radius: 14px; --radius-s: 9px;
  /* 组件中性色（明暗主题各自覆盖） */
  --comp-bg: #FDFDFB; --comp-head: linear-gradient(180deg, #FAF8F3, #F5F2EA);
  --comp-pill: #EDF1F5; --comp-pill-line: #D8E1EA; --comp-track: #E8E2D4;
  --topbar-bg: rgba(255,255,255,.82);
  font-size: 15px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
  background:
    radial-gradient(1400px 600px at 85% -200px, rgba(27,58,92,.05), transparent),
    radial-gradient(900px 500px at -100px 110%, rgba(181,67,52,.04), transparent),
    var(--bg);
  color: var(--ink); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a { color: var(--navy); text-decoration: none; transition: color .15s; }
a:hover { color: var(--red); }
button { font-family: inherit; cursor: pointer; }
::selection { background: rgba(181,67,52,.18); }
/* 精致滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #CFC7B4; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #B8AE97; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 布局骨架 ---------- */
.shell { display: flex; min-height: 100vh; }
.side {
  width: 244px; flex: none; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30;
  background: linear-gradient(168deg, #1E4066 0%, var(--navy) 34%, var(--navy-3) 100%);
  color: #D9E2EC;
  box-shadow: inset -1px 0 0 rgba(255,255,255,.06), 4px 0 24px -8px rgba(13,31,51,.35);
}
.side::after { /* 侧边栏顶部微光装饰 */
  content: ""; position: absolute; top: -60px; left: -40px; width: 220px; height: 220px; pointer-events: none;
  background: radial-gradient(circle, rgba(201,160,99,.14), transparent 70%);
}
.side .brand { display: flex; align-items: center; gap: 12px; padding: 20px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); position: relative; }
.side .brand img {
  width: 46px; height: 46px; border-radius: 12px; background: #F5F2EC;
  box-shadow: 0 0 0 1px rgba(255,255,255,.25), 0 0 22px rgba(201,160,99,.35);
}
.side .brand .t1 { font-weight: 700; font-size: 16.5px; color: #fff; letter-spacing: 1.5px; }
.side .brand .t2 { font-size: 10.5px; color: #8FA6BC; margin-top: 3px; letter-spacing: 1.2px; }
.nav { padding: 14px 12px; flex: 1; }
.nav .sec { font-size: 11px; color: #6E859C; padding: 16px 10px 7px; letter-spacing: 3px; font-weight: 600; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 10px 13px; margin: 3px 0; border-radius: 10px;
  color: #C3D0DD; font-size: 14px; position: relative; transition: all .18s ease;
}
.nav a:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(2px); }
.nav a.on {
  background: linear-gradient(92deg, rgba(181,67,52,.95), rgba(181,67,52,.75));
  color: #fff; font-weight: 600; box-shadow: 0 4px 14px -2px var(--red-glow), inset 0 1px 0 rgba(255,255,255,.15);
}
.nav a.on::before { content: ""; position: absolute; left: -12px; top: 20%; bottom: 20%; width: 3.5px; border-radius: 3px; background: #E8A79C; box-shadow: 0 0 10px var(--red-glow); }
.nav a .ico { width: 19px; height: 19px; display: inline-flex; align-items: center; justify-content: center; flex: none; opacity: .92; }
.nav a .ico svg { width: 17px; height: 17px; }
.side .foot { padding: 15px 18px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11px; color: #6E859C; line-height: 1.9; letter-spacing: .5px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 62px; display: flex; align-items: center; justify-content: space-between; padding: 0 30px;
  position: sticky; top: 0; z-index: 20;
  background: var(--topbar-bg); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(230,224,210,.8);
}
.topbar .crumb { font-size: 16.5px; font-weight: 700; color: var(--navy); letter-spacing: .5px; display: flex; align-items: center; gap: 10px; }
.topbar .crumb::before { content: ""; width: 5px; height: 18px; border-radius: 3px; background: linear-gradient(180deg, var(--red), var(--gold)); box-shadow: 0 0 8px var(--red-glow); }
.topbar .user { display: flex; align-items: center; gap: 12px; }
.topbar .user .badge {
  font-size: 12.5px; color: var(--navy); background: linear-gradient(180deg, #F2F5F8, #E9EEF3);
  padding: 5px 14px; border-radius: 20px; border: 1px solid #DFE6EC; font-weight: 500;
}
.topbar .user button {
  background: none; border: 1px solid var(--line); border-radius: 9px; padding: 6px 14px;
  font-size: 13px; color: var(--ink-2); transition: all .18s;
}
.topbar .user button:hover { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 3px rgba(181,67,52,.08); }
.content { padding: 28px 32px 72px; max-width: 1280px; width: 100%; margin: 0 auto; }

/* ---------- 卡片 ---------- */
.card {
  background: var(--card); border: 1px solid rgba(230,224,210,.9); border-radius: var(--radius);
  box-shadow: var(--sh-1); padding: 22px 24px; margin-bottom: 20px; position: relative;
  transition: box-shadow .25s ease, transform .25s ease;
}
.card:hover { box-shadow: var(--sh-2); }
.card h3 { font-size: 15.5px; color: var(--navy); margin-bottom: 16px; display: flex; align-items: center; gap: 9px; font-weight: 700; letter-spacing: .3px; }
.card h3::before {
  content: ""; width: 4.5px; height: 17px; border-radius: 3px; display: inline-block;
  background: linear-gradient(180deg, var(--red), var(--gold)); box-shadow: 0 0 6px var(--red-glow);
}
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(2, 1fr); }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1080px) { .g4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } }

/* 统计卡 */
.stat {
  background: linear-gradient(180deg, #FFFFFF, #FCFBF7); border: 1px solid rgba(230,224,210,.9);
  border-radius: var(--radius); padding: 18px 20px 16px; box-shadow: var(--sh-1);
  position: relative; overflow: hidden; transition: all .25s ease; animation: fadeUp .45s ease both;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--sh-2); }
.stat::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--navy), var(--teal)); opacity: .85; }
.stat.red::after { background: linear-gradient(90deg, var(--red), var(--gold)); }
.stat .k { font-size: 12.5px; color: var(--ink-2); margin-bottom: 8px; font-weight: 500; letter-spacing: .5px; }
.stat .v { font-size: 30px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.stat .v small { font-size: 12px; font-weight: 400; color: var(--ink-2); margin-left: 5px; }
.stat .sub { font-size: 12px; margin-top: 6px; color: var(--teal); font-weight: 500; }

/* ---------- 表格 ---------- */
.tbl-wrap { border: 1px solid var(--line-2); border-radius: 12px; overflow: hidden; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th {
  text-align: left; font-weight: 600; color: var(--ink-2); padding: 11px 14px;
  background: var(--comp-head); border-bottom: 1.5px solid var(--line);
  white-space: nowrap; font-size: 12.5px; letter-spacing: .8px;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: top; background: var(--card); }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover td { background: var(--comp-pill); }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl .num { font-variant-numeric: tabular-nums; }

/* ---------- 标签 ---------- */
.tag { display: inline-block; font-size: 12px; padding: 3px 11px; border-radius: 20px; white-space: nowrap; font-weight: 500; border: 1px solid transparent; }
.tag.navy { background: var(--comp-pill); color: var(--navy); border-color: var(--comp-pill-line); }
.tag.green { background: var(--teal-soft); color: #1F655E; border-color: #C6E0DC; }
.tag.red { background: var(--red-soft); color: var(--red-2); border-color: #EBCFC9; }
.tag.amber { background: var(--amber-soft); color: #7A5A0B; border-color: #EAD9AE; }
.tag.gray { background: #F0F0EE; color: #666; border-color: #E2E2E0; }

/* ---------- 按钮 ---------- */
.btn {
  border: none; border-radius: 10px; padding: 9px 18px; font-size: 13.5px; font-weight: 600; letter-spacing: .3px;
  background: linear-gradient(180deg, #24476E, var(--navy)); color: #fff; transition: all .18s ease;
  box-shadow: 0 2px 6px rgba(27,58,92,.25), inset 0 1px 0 rgba(255,255,255,.12);
}
.btn:hover { background: linear-gradient(180deg, #2A5280, #1F4066); box-shadow: 0 4px 14px rgba(27,58,92,.32); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); box-shadow: 0 1px 3px rgba(27,58,92,.25); }
.btn.red {
  background: linear-gradient(180deg, #C44C3C, var(--red));
  box-shadow: 0 2px 8px var(--red-glow), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn.red:hover { background: linear-gradient(180deg, #CE5443, var(--red-2)); box-shadow: 0 4px 16px var(--red-glow); }
.btn.ghost { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); box-shadow: none; }
.btn.ghost:hover { background: rgba(27,58,92,.06); }
.btn.sm { padding: 5px 12px; font-size: 12.5px; border-radius: 8px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; }

/* ---------- 表单 ---------- */
input[type=text], input[type=password], input[type=number], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  font-family: inherit; font-size: 13.5px; color: var(--ink); background: var(--comp-bg);
  transition: border-color .18s, box-shadow .18s;
}
input:hover, select:hover, textarea:hover { border-color: #CFC7B4; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--navy);
  box-shadow: 0 0 0 3.5px rgba(27,58,92,.12), 0 0 12px rgba(27,58,92,.06);
  background: #fff;
}
textarea { min-height: 88px; resize: vertical; }
label.f { display: block; font-size: 12.5px; color: var(--ink-2); margin: 12px 0 6px; font-weight: 600; letter-spacing: .3px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; align-items: flex-end; }
.row > * { flex: 1; min-width: 140px; }

/* ---------- 提示条 ---------- */
.notice { border-radius: 12px; padding: 12px 16px; font-size: 13px; margin: 12px 0; line-height: 1.75; border: 1px solid transparent; animation: fadeUp .3s ease both; }
.notice.info { background: var(--comp-pill); color: var(--navy); border-color: var(--comp-pill-line); }
.notice.warn { background: var(--amber-soft); color: #7A5A0B; border-color: #EAD9AE; }
.notice.danger { background: var(--red-soft); color: var(--red-2); border-color: #EBCFC9; }
.notice.ok { background: var(--teal-soft); color: #1F655E; border-color: #C6E0DC; }

/* ============================================================
   ★ 全流程步骤条（大号 stepper · 七节点）
   ============================================================ */
.stepper { display: flex; margin: 8px 0 20px; }
.step2 { flex: 1; text-align: center; position: relative; padding-top: 0; min-width: 0; }
.step2 .node {
  width: 34px; height: 34px; border-radius: 50%; margin: 0 auto 9px; position: relative; z-index: 2;
  background: var(--comp-track); color: var(--ink-3); font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; transition: all .25s ease;
  border: 2px solid transparent;
}
.step2 .lbl { font-size: 12.5px; color: var(--ink-3); font-weight: 500; letter-spacing: .5px; transition: color .2s; }
.step2 .sub { font-size: 11px; color: #A8B2BC; margin-top: 2px; }
.step2::before, .step2::after { /* 连接线 */
  content: ""; position: absolute; top: 16px; height: 3px; border-radius: 3px; background: var(--comp-track); z-index: 1;
}
.step2::before { left: 0; width: calc(50% - 20px); }
.step2::after { right: 0; width: calc(50% - 20px); }
.step2:first-child::before, .step2:last-child::after { display: none; }
/* 已完成 */
.step2.done .node { background: linear-gradient(180deg, #379188, var(--teal)); color: #fff; box-shadow: 0 2px 10px rgba(46,125,116,.35); }
.step2.done .node::after { content: "✓"; position: absolute; font-size: 15px; }
.step2.done .node { font-size: 0; }
.step2.done .lbl { color: var(--teal); font-weight: 600; }
.step2.done::before, .step2.done::after { background: linear-gradient(90deg, #8CC5BE, var(--teal)); }
/* 当前（脉冲发光） */
.step2.cur .node {
  background: linear-gradient(180deg, #C44C3C, var(--red)); color: #fff; font-size: 13px;
  box-shadow: 0 0 0 5px rgba(181,67,52,.16), 0 2px 14px var(--red-glow);
  animation: pulse 2.2s ease-in-out infinite;
}
.step2.cur .lbl { color: var(--red); font-weight: 700; }
.step2.cur .sub { color: var(--red-2); opacity: .75; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 5px rgba(181,67,52,.16), 0 2px 14px var(--red-glow); }
  50% { box-shadow: 0 0 0 9px rgba(181,67,52,.08), 0 2px 20px var(--red-glow); }
}

/* 迷你进度条（列表行内） */
.mini-flow { display: inline-flex; align-items: center; gap: 4px; }
.mini-flow i { width: 14px; height: 5px; border-radius: 3px; background: var(--comp-track); transition: background .2s; }
.mini-flow i.d { background: var(--teal); }
.mini-flow i.c { background: var(--red); box-shadow: 0 0 5px var(--red-glow); width: 18px; }
.mini-flow b { font-size: 11px; color: var(--ink-3); margin-left: 5px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 2px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; }
.tabs button {
  background: none; border: none; padding: 11px 18px; font-size: 14px; color: var(--ink-2);
  border-bottom: 2.5px solid transparent; margin-bottom: -2px; font-weight: 500; border-radius: 8px 8px 0 0;
  transition: all .18s;
}
.tabs button:hover { color: var(--navy); background: rgba(27,58,92,.05); }
.tabs button.on { color: var(--red); font-weight: 700; border-color: var(--red); background: linear-gradient(180deg, rgba(181,67,52,.06), transparent); }

/* ---------- 校验面板 ---------- */
.chk { display: flex; align-items: flex-start; gap: 11px; padding: 11px 14px; border-radius: 10px; margin: 7px 0; font-size: 13px; line-height: 1.65; border: 1px solid transparent; }
.chk .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 6px; box-shadow: 0 0 0 3px rgba(0,0,0,.04); }
.chk.green { background: var(--teal-soft); border-color: #D2E7E3; } .chk.green .dot { background: var(--teal); }
.chk.red { background: var(--red-soft); border-color: #EBCFC9; } .chk.red .dot { background: var(--red); box-shadow: 0 0 6px var(--red-glow); }
.chk.yellow { background: var(--amber-soft); border-color: #EAD9AE; } .chk.yellow .dot { background: var(--amber); }
.chk b { display: block; margin-bottom: 2px; }

/* ---------- 登录页（左右分栏品牌叙事） ---------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 30px;
  background:
    radial-gradient(1200px 600px at 15% -10%, rgba(201,160,99,.10), transparent),
    radial-gradient(1000px 500px at 95% 110%, rgba(181,67,52,.09), transparent),
    linear-gradient(155deg, #F7F4EE 0%, var(--bg) 55%, #EFEAE0 100%);
}
.login-card {
  width: 900px; max-width: 100%; min-height: 520px; display: flex; overflow: hidden;
  background: var(--card); border-radius: 22px; box-shadow: var(--sh-3); border: 1px solid rgba(230,224,210,.8);
}
.login-hero {
  flex: 1.1; padding: 44px 40px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #24507E 0%, var(--navy) 45%, var(--navy-4) 100%); color: #DCE6F0;
}
.login-hero::before {
  content: ""; position: absolute; top: -80px; right: -80px; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,160,99,.22), transparent 70%);
}
.login-hero::after {
  content: ""; position: absolute; bottom: -100px; left: -60px; width: 280px; height: 280px; border-radius: 50%;
  background: radial-gradient(circle, rgba(181,67,52,.20), transparent 70%);
}
.login-hero .ht1 { font-size: 24px; font-weight: 800; color: #fff; letter-spacing: 2px; line-height: 1.5; margin-top: 26px; position: relative; z-index: 1; }
.login-hero .ht1 em { font-style: normal; color: var(--gold); }
.login-hero .ht2 { font-size: 13px; line-height: 2; opacity: .82; margin-top: 14px; position: relative; z-index: 1; }
.login-hero .feat { position: relative; z-index: 1; font-size: 12.5px; line-height: 2.2; }
.login-hero .feat div { display: flex; align-items: center; gap: 9px; }
.login-hero .feat i {
  width: 17px; height: 17px; border-radius: 50%; flex: none; font-style: normal; font-size: 10px;
  background: rgba(201,160,99,.25); color: var(--gold); display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(201,160,99,.5);
}
.login-form { flex: 1; padding: 46px 44px 36px; display: flex; flex-direction: column; justify-content: center; }
.login-form .brandline { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.login-form .brandline img { width: 52px; height: 52px; border-radius: 13px; box-shadow: 0 0 0 1px var(--line), 0 4px 14px rgba(27,58,92,.15); }
.login-form .brandline .t1 { font-size: 20px; font-weight: 800; color: var(--navy); letter-spacing: 1.5px; }
.login-form .brandline .t2 { font-size: 11px; color: var(--ink-3); letter-spacing: 1px; margin-top: 3px; }
.login-form .err { color: var(--red); font-size: 13px; min-height: 20px; margin: 6px 0; }
.login-form .demo {
  margin-top: 20px; text-align: left; background: var(--comp-pill);
  border: 1px dashed #D8D0BC; border-radius: 12px; padding: 13px 16px; font-size: 12px; color: var(--ink-2); line-height: 2.05;
}
.login-form .demo b { color: var(--navy); font-family: Consolas, monospace; }
@media (max-width: 860px) { .login-hero { display: none; } }

/* ---------- Toast ---------- */
#toast-wrap { position: fixed; top: 22px; right: 22px; z-index: 999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  position: relative; overflow: hidden; background: linear-gradient(180deg, #16304E, var(--navy-3)); color: #fff;
  padding: 13px 20px 15px; border-radius: 12px; font-size: 13.5px; line-height: 1.6; max-width: 430px;
  box-shadow: 0 10px 34px rgba(9,22,36,.4), inset 0 1px 0 rgba(255,255,255,.08);
  animation: slideIn .3s cubic-bezier(.2,.9,.3,1.2);
}
.toast::after { content: ""; position: absolute; bottom: 0; left: 0; height: 2.5px; width: 100%; background: rgba(255,255,255,.35); animation: shrink 3.4s linear forwards; }
.toast.err { background: linear-gradient(180deg, #C44C3C, var(--red-2)); }
.toast.err::after { background: rgba(255,255,255,.5); }
.toast.ok { background: linear-gradient(180deg, #379188, #24655E); }
@keyframes slideIn { from { transform: translateX(46px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes shrink { from { width: 100%; } to { width: 0; } }

/* ---------- 弹窗 ---------- */
.mask { position: fixed; inset: 0; background: rgba(9,22,36,.5); backdrop-filter: blur(3px); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; animation: fade .2s; }
.modal {
  background: var(--card); border-radius: 18px; width: 580px; max-width: 100%; max-height: 86vh; overflow-y: auto;
  padding: 26px 28px; box-shadow: var(--sh-3); animation: fadeUp .28s cubic-bezier(.2,.9,.3,1.15) both;
}
.modal h3 { font-size: 16.5px; color: var(--navy); margin-bottom: 18px; }
.modal .close { float: right; background: none; border: none; font-size: 20px; color: var(--ink-3); }
.modal .close:hover { color: var(--red); }

/* ---------- 杂项 ---------- */
.svg-wrap { display: flex; justify-content: center; padding: 10px 0; }
.muted { color: var(--ink-2); font-size: 12.5px; }
.mono { font-family: Consolas, monospace; font-size: 12px; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 7px; line-height: 1.7; }
.empty { text-align: center; color: var(--ink-3); padding: 40px 0; font-size: 13px; }
.empty::before { content: "◎"; display: block; font-size: 26px; margin-bottom: 10px; opacity: .5; }
.flexb { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mt { margin-top: 14px; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ============================================================
   ★ BI 数据大屏（暗色大屏风 · 独立于主题，固定深色视觉）
   ============================================================ */
.bi {
  --bi-bg: #0A101D; --bi-card: #101A2C; --bi-line: #1D2B45; --bi-ink: #E6EDF6;
  --bi-sub: #7E93A9; --bi-glow: rgba(62,142,208,.18);
  background:
    radial-gradient(900px 420px at 12% -80px, rgba(62,142,208,.14), transparent),
    radial-gradient(760px 380px at 95% 110%, rgba(201,88,74,.10), transparent),
    linear-gradient(170deg, #0C1322, var(--bi-bg));
  border: 1px solid var(--bi-line); border-radius: 18px; padding: 24px 26px 26px; margin-bottom: 20px;
  box-shadow: 0 8px 40px -12px rgba(0,0,0,.5);
}
.bi-head { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; position: relative; }
.bi-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: -8px; height: 2px;
  background: linear-gradient(90deg, rgba(62,142,208,.7), rgba(201,88,74,.5), transparent); }
.bi-title { font-size: 21px; font-weight: 800; color: var(--bi-ink); letter-spacing: 2.5px;
  text-shadow: 0 0 24px rgba(62,142,208,.55); display: flex; align-items: center; gap: 10px; }
.bi-ico { color: #3E8ED0; font-size: 18px; }
.bi-clock { font-family: Consolas, monospace; font-size: 20px; font-weight: 700; color: #3BAFA3;
  letter-spacing: 2px; text-shadow: 0 0 14px rgba(59,175,163,.5); }
.bi-sub { font-size: 12px; color: var(--bi-sub); letter-spacing: 1px; margin-left: auto; }
.bi-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
@media (max-width: 980px) { .bi-cards { grid-template-columns: repeat(2, 1fr); } }
.bi-card {
  background: linear-gradient(160deg, rgba(62,142,208,.10), rgba(16,26,44,.9) 55%), var(--bi-card);
  border: 1px solid var(--bi-line); border-radius: 12px; padding: 14px 16px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 4px 18px -8px rgba(0,0,0,.5);
  position: relative; overflow: hidden; transition: transform .2s, border-color .2s;
}
.bi-card:hover { transform: translateY(-3px); border-color: rgba(62,142,208,.5); }
.bi-card::before { content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: 2px;
  background: linear-gradient(90deg, #3E8ED0, transparent); border-radius: 2px; opacity: .8; }
.bi-card .k { font-size: 12px; color: var(--bi-sub); letter-spacing: 1.5px; }
.bi-card .v { font-size: 27px; font-weight: 800; color: #EAF2FB; margin: 5px 0 3px;
  font-variant-numeric: tabular-nums; text-shadow: 0 0 16px rgba(62,142,208,.35); }
.bi-card .v small { font-size: 11.5px; font-weight: 400; color: var(--bi-sub); margin-left: 4px; }
.bi-card .s { font-size: 11.5px; color: #3BAFA3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bi-grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px; margin-bottom: 14px; }
@media (max-width: 980px) { .bi-grid > .bi-panel { grid-column: span 12 !important; } }
.bi-panel {
  background: var(--bi-card); border: 1px solid var(--bi-line); border-radius: 14px; padding: 16px 18px 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03); min-width: 0;
}
.bi-panel .ph { font-size: 13.5px; font-weight: 700; color: var(--bi-ink); letter-spacing: 1px; margin-bottom: 8px;
  padding-left: 10px; border-left: 3px solid #3E8ED0; line-height: 1.4; }
.bi-panel .chart { height: 250px; }
.bi-chks { max-height: 270px; overflow-y: auto; padding-right: 4px; }
.bi-chks .chk { background: rgba(59,175,163,.08); border-color: rgba(59,175,163,.25); }
.bi-chks .chk b { color: #D9E6F2; }
.bi-chks .chk.red { background: rgba(201,88,74,.10); border-color: rgba(201,88,74,.3); }
.bi-list { max-height: 270px; overflow-y: auto; }
.bi-item { padding: 10px 4px; border-bottom: 1px solid var(--bi-line); }
.bi-item:last-child { border-bottom: none; }
.bi-item .t { font-size: 13px; color: #D9E6F2; font-weight: 600; margin-bottom: 5px; }
.bi-item .m { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--bi-sub); }
.bi-item .m a { color: #3E8ED0; margin-left: auto; }

/* 亮色主题下的 topbar 主题按钮 */
#btn-theme { font-size: 15px; padding: 5px 10px !important; line-height: 1; }

/* ============================================================
   ★ 移动端适配（抽屉导航 + 分层密度优化）
   ============================================================ */
.topbar .tb-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar .hamburger { display: none; background: none; border: none; color: var(--navy); width: 36px; height: 36px; padding: 6px; border-radius: 9px; }
.topbar .hamburger:hover { background: rgba(27,58,92,.08); }
.topbar .hamburger svg { width: 22px; height: 22px; }
#nav-mask { display: none; position: fixed; inset: 0; background: rgba(9,22,36,.5); z-index: 55; backdrop-filter: blur(2px); }

/* 平板 ≤1080px：BI 卡 2 列（已有）+ 图表降高 */
@media (max-width: 1080px) {
  .bi-panel .chart { height: 230px; }
}

/* 移动端 ≤860px：侧边栏变抽屉 + 汉堡按钮 */
@media (max-width: 860px) {
  .side {
    position: fixed; left: 0; top: 0; bottom: 0; height: 100dvh; width: 258px;
    transform: translateX(-105%); transition: transform .28s cubic-bezier(.2,.9,.3,1);
    z-index: 60; box-shadow: 12px 0 40px -12px rgba(0,0,0,.5);
  }
  body.nav-open .side { transform: none; }
  body.nav-open #nav-mask { display: block; }
  .topbar .hamburger { display: inline-flex; }
  .topbar { padding: 0 14px; }
  .topbar .badge { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .content { padding: 18px 14px 60px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .row > * { min-width: 120px; }
  .bi { padding: 16px 14px 18px; border-radius: 14px; }
  .bi-head { gap: 8px; margin-bottom: 14px; }
  .bi-title { font-size: 16.5px; letter-spacing: 1px; width: 100%; }
  .bi-clock { font-size: 16px; order: 2; }
  .bi-sub { width: 100%; order: 3; margin-left: 0; font-size: 11px; }
  .bi-cards { gap: 9px; }
  .bi-card { padding: 11px 12px 10px; }
  .bi-card .v { font-size: 21px; }
  .bi-grid { gap: 10px; }
  .bi-panel { padding: 13px 13px 9px; }
  .bi-panel .chart { height: 215px; }
  .login-card { min-height: 0; }
  .login-form { padding: 32px 24px 26px; }
}

/* 手机 ≤600px：进一步收紧 */
@media (max-width: 600px) {
  :root { font-size: 14.5px; }
  .topbar { height: 54px; }
  .topbar .crumb { font-size: 15px; }
  .topbar .badge { font-size: 11px; padding: 4px 9px; max-width: 104px; }
  .topbar .bd-role { display: none; } /* 窄屏只显姓名 */
  .topbar .user button { padding: 5px 9px; font-size: 12px; }
  .content { padding: 14px 11px 56px; }
  .card { padding: 15px 14px; border-radius: 12px; }
  .card h3 { font-size: 14.5px; }
  .stat .v { font-size: 23px; }
  /* 表格横向滚动（不挤压） */
  .card { overflow-x: auto; }
  table.tbl { min-width: 640px; }
  .tbl th, .tbl td { padding: 9px 10px; font-size: 12.5px; }
  .notice { font-size: 12.5px; }
  .row { gap: 9px; }
  .row > * { min-width: 110px; }
  .modal { width: 94vw; padding: 20px 16px; }
  .toast { max-width: calc(100vw - 26px); }
  /* 步骤条紧凑化（不逐字换行） */
  .stepper { overflow-x: auto; padding-bottom: 4px; }
  .step2 { min-width: 64px; }
  .step2 .node { width: 28px; height: 28px; font-size: 12px; }
  .step2 .lbl { font-size: 10.5px; letter-spacing: 0; }
  .step2 .sub { font-size: 10px; }
  .mini-flow b { font-size: 10px; }
  .bi-cards { grid-template-columns: repeat(2, 1fr); }
  .bi-card .v { font-size: 19px; }
  .bi-card .k { font-size: 11px; letter-spacing: .3px; }
  .bi-title { font-size: 15px; }
  .bi-clock { font-size: 14.5px; }
  .bi-panel .chart { height: 200px; }
  .btn { padding: 9px 14px; font-size: 13px; }
  .btn.sm { padding: 5px 9px; font-size: 11.5px; white-space: nowrap; }
  .tabs button { padding: 9px 12px; font-size: 13px; }
  .login-wrap { padding: 14px; }
  .login-form { padding: 26px 18px 22px; }
  .login-form .brandline .t1 { font-size: 17px; }
  .empty { padding: 26px 0; }
}
/* 超窄屏 ≤380px：BI 卡单列 */
@media (max-width: 380px) {
  .bi-cards { grid-template-columns: 1fr; }
  .topbar .badge { max-width: 84px; }
}

