/* ================= 设计变量 ================= */
:root {
  --bg: #f4f6fb;
  --panel: #ffffff;
  --line: #e6eaf2;
  --line-2: #eef1f7;
  --text: #1c2536;
  --text-2: #5b6478;
  --muted: #8a93a6;
  --primary: #2563eb;
  --primary-600: #1d4ed8;
  --primary-soft: #eaf1ff;
  --green: #0f9d58;
  --green-soft: #e6f6ee;
  --amber: #c47f0a;
  --amber-soft: #fdf3e2;
  --red: #d64545;
  --red-soft: #fdecec;
  --teal: #0e8f8f;
  --teal-soft: #e5f5f5;
  --violet: #6d4bd6;
  --violet-soft: #f0ecfd;
  --side-bg: #0f172a;
  --side-bg-2: #131d33;
  --side-text: #97a3bb;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 8px 24px -12px rgba(16, 24, 40, .18);
  --shadow-lg: 0 24px 64px -24px rgba(15, 23, 42, .35);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
/* 上面这条是给图标用的，会被图表里的 <text> 继承，导致刻度数字带黑描边、糊成一团；
   文字一律不描边，图形元素自身显式声明的 stroke 不受影响 */
svg text { stroke: none; stroke-width: 0; }
.chart svg text { font-weight: 400; }
.hidden { display: none !important; }
a { color: var(--primary); text-decoration: none; }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cdd4e2; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #b5bed1; }
::-webkit-scrollbar-track { background: transparent; }

/* ================= 登录 ================= */
.login-page { display: flex; min-height: 100vh; background: #fff; }
.login-visual {
  flex: 1.15; position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(120% 120% at 0% 0%, #1b3fa8 0%, #12235c 45%, #0b1226 100%);
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 56px 60px;
}
.lv-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(80% 70% at 30% 30%, #000 40%, transparent 100%);
}
.lv-content { position: relative; max-width: 480px; }
.lv-badge {
  display: inline-block; font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: #9cb6ff; border: 1px solid rgba(156,182,255,.35); border-radius: 999px; padding: 6px 14px; margin-bottom: 28px;
}
.lv-content h1 { font-size: 42px; line-height: 1.25; margin: 0 0 20px; letter-spacing: 1px; font-weight: 700; }
.lv-content p { color: #b6c3e0; line-height: 1.9; margin: 0 0 28px; font-size: 14px; }
.lv-points { list-style: none; padding: 0; margin: 0; }
.lv-points li { display: flex; align-items: center; gap: 10px; color: #cfd9ee; margin-bottom: 14px; font-size: 13.5px; }
.lv-points span { width: 6px; height: 6px; border-radius: 50%; background: #4d8dff; box-shadow: 0 0 0 4px rgba(77,141,255,.16); }
.lv-foot { position: relative; color: #64748b; font-size: 12px; letter-spacing: .05em; }
.login-form-wrap { flex: 1; display: flex; align-items: center; justify-content: center; position: relative; padding: 40px 40px 70px; }
.login-card { width: 100%; max-width: 380px; }
.logo-row { display: flex; align-items: center; gap: 12px; margin-bottom: 44px; }
.logo-mark {
  width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #2f6bff, #1b45c9); color: #fff; box-shadow: 0 8px 18px -8px rgba(37,99,235,.9);
}
.logo-mark svg { width: 22px; height: 22px; stroke-width: 2.4; }
.logo-mark.small { width: 34px; height: 34px; border-radius: 10px; }
.logo-mark.small svg { width: 18px; height: 18px; }
.logo-name { font-weight: 700; font-size: 15px; letter-spacing: .04em; }
.logo-sub { color: var(--muted); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; }
.login-card h2 { font-size: 26px; margin: 0 0 8px; letter-spacing: .5px; }
.login-tip { color: var(--muted); margin: 0 0 32px; font-size: 13px; }
.field { display: block; margin-bottom: 18px; }
.field > span { display: block; font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; font-size: 14px; color: var(--text);
  background: #fbfcfe; border: 1px solid var(--line); border-radius: 10px; outline: none;
  transition: border-color .16s, box-shadow .16s, background .16s; font-family: inherit;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: #8fb2ff; background: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.1);
}
.login-err { color: var(--red); font-size: 12.5px; min-height: 18px; margin-bottom: 10px; }
.login-hint { margin-top: 22px; font-size: 11.5px; color: var(--muted); line-height: 1.9; text-align: center; }

/* ================= 按钮 ================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 15px; font-size: 13.5px; font-family: inherit;
  border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; color: var(--text);
  cursor: pointer; transition: all .16s; white-space: nowrap; font-weight: 500;
}
.btn:hover { border-color: #cdd6e6; background: #fafbfe; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 6px 14px -8px rgba(37,99,235,.9); }
.btn-primary:hover { background: var(--primary-600); border-color: var(--primary-600); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: #f1f4fa; }
.btn-danger { color: var(--red); border-color: #f3d3d3; background: #fff; }
.btn-danger:hover { background: var(--red-soft); border-color: #eebdbd; }
.btn-sm { height: 30px; padding: 0 11px; font-size: 12.5px; border-radius: 7px; }
.btn-block { width: 100%; height: 44px; font-size: 15px; letter-spacing: .2em; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.icon-btn {
  width: 34px; height: 34px; display: inline-grid; place-items: center; border-radius: 9px;
  border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; transition: all .16s;
}
.icon-btn:hover { background: #eef2f9; color: var(--text); }
.icon-btn.ghost { color: var(--side-text); }
.icon-btn.ghost:hover { background: rgba(255,255,255,.09); color: #fff; }
.menu-toggle { display: none; }

/* ================= 框架 ================= */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 234px; flex: 0 0 234px; background: linear-gradient(180deg, var(--side-bg) 0%, var(--side-bg-2) 100%);
  color: #fff; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 18px; }
.brand-text strong { display: block; font-size: 14.5px; letter-spacing: .05em; }
.brand-text small { display: block; color: #6f7d99; font-size: 10.5px; letter-spacing: .12em; margin-top: 2px; }
.nav { flex: 1; overflow-y: auto; padding: 4px 12px 16px; }
.nav::-webkit-scrollbar { width: 4px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); }
.nav-item {
  display: flex; align-items: center; gap: 10px; height: 40px; padding: 0 12px; margin-bottom: 2px;
  color: var(--side-text); border-radius: 9px; cursor: pointer; font-size: 13.5px; user-select: none;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.06); color: #e6ebf7; }
.nav-item.active { background: rgba(64,116,255,.18); color: #fff; font-weight: 500; }
.nav-item.active::before {
  content: ""; position: absolute; left: 0; width: 3px; height: 18px; border-radius: 0 3px 3px 0; background: #4d8dff;
}
.nav-item { position: relative; }
.nav-item svg { width: 17px; height: 17px; flex: 0 0 17px; opacity: .9; }
.nav-item .chev { margin-left: auto; width: 14px; height: 14px; transition: transform .2s; opacity: .6; }
.nav-item.open .chev { transform: rotate(90deg); }
.nav-sub { overflow: hidden; }
.nav-child {
  display: block; padding: 8px 12px 8px 44px; font-size: 13px; color: #8592ab; border-radius: 8px; cursor: pointer;
  transition: color .15s, background .15s;
}
.nav-child:hover { color: #dfe6f5; background: rgba(255,255,255,.05); }
.nav-child.active { color: #fff; background: rgba(64,116,255,.16); }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); }
.me { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px;
  background: linear-gradient(135deg, #3b6ef5, #6a3df0); color: #fff; flex: 0 0 32px;
}
.me-info { flex: 1; min-width: 0; }
.me-info strong { display: block; font-size: 12.5px; font-weight: 500; color: #e8edf8; }
.me-info small { display: block; font-size: 11px; color: #6f7d99; margin-top: 1px; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; display: flex; align-items: center; gap: 14px; padding: 0 26px;
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.crumb strong { color: var(--text); font-weight: 500; }
.crumb i { font-style: normal; color: #cbd3e1; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.clock { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.view { padding: 22px 26px 40px; flex: 1; }

/* ================= ICP 备案号 ================= */
.icp-bar { text-align: center; font-size: 11.5px; line-height: 1.7; color: #98a2b6; }
.icp-bar a { color: #5b6478; text-decoration: none; }
.icp-bar a:hover { color: #2563eb; text-decoration: underline; }
.icp-sep { margin: 0 7px; color: #c3cad8; }
.icp-bar-login { position: absolute; bottom: 16px; left: 0; right: 0; }
.icp-bar-app { padding: 0 26px 14px; }
.icp-line { margin-top: 6px; }
.icp-line a { color: #9cb6ff; text-decoration: none; }
.icp-line a:hover { color: #fff; text-decoration: underline; }

/* ================= 通用块 ================= */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { font-size: 20px; font-weight: 600; margin: 0 0 5px; letter-spacing: .2px; }
.page-desc { color: var(--muted); font-size: 12.5px; margin: 0; }
.page-actions { display: flex; gap: 9px; flex-wrap: wrap; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line-2); gap: 12px; }
.card-title { font-size: 14.5px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 8px; }
.card-sub { font-size: 12px; color: var(--muted); margin: 3px 0 0; }
.card-body { padding: 18px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-2-1 { grid-template-columns: 1.55fr 1fr; }
.grid-1-2 { grid-template-columns: 1fr 1.55fr; }

/* 统计卡片 */
.stat { padding: 18px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden; }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-ico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; }
.stat-ico svg { width: 16px; height: 16px; }
/* 中文字体没有 650 字重，会被合成为 Bold 伪粗体；用 500 落到 Regular，数字更清楚 */
.stat-val { font-size: 26px; font-weight: 500; letter-spacing: -.4px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat-val small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 4px; }
.stat-foot { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.trend-up { color: var(--green); font-weight: 600; }
.trend-down { color: var(--red); font-weight: 600; }
.tint-blue { background: var(--primary-soft); color: var(--primary); }
.tint-green { background: var(--green-soft); color: var(--green); }
.tint-amber { background: var(--amber-soft); color: var(--amber); }
.tint-teal { background: var(--teal-soft); color: var(--teal); }
.tint-violet { background: var(--violet-soft); color: var(--violet); }
.tint-red { background: var(--red-soft); color: var(--red); }

/* ================= 表格 ================= */
.table-wrap { overflow: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tb th {
  text-align: left; font-weight: 500; color: var(--text-2); background: #f8fafd;
  padding: 11px 14px; border-bottom: 1px solid var(--line-2); white-space: nowrap; font-size: 12.5px;
}
table.tb td { padding: 12px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.tb tbody tr:hover { background: #f9fbff; }
table.tb tbody tr:last-child td { border-bottom: none; }
table.tb td.num, table.tb th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-main { font-weight: 500; }
.cell-sub { color: var(--muted); font-size: 12px; margin-top: 3px; }
.ops { display: flex; gap: 4px; align-items: center; white-space: nowrap; }
.link-op { color: var(--primary); cursor: pointer; font-size: 12.5px; padding: 3px 6px; border-radius: 5px; }
.link-op:hover { background: var(--primary-soft); }
.link-op.danger { color: var(--red); }
.link-op.danger:hover { background: var(--red-soft); }
.link-op.mute { color: var(--text-2); }
.link-op.mute:hover { background: #eef2f9; }
.empty { padding: 48px 20px; text-align: center; color: var(--muted); font-size: 13px; }
.empty svg { width: 34px; height: 34px; opacity: .35; margin-bottom: 10px; }

/* 状态标签 */
.tag { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.tag-gray { background: #f1f3f8; color: #64708a; }
.tag-amber { background: var(--amber-soft); color: var(--amber); }
.tag-blue { background: var(--primary-soft); color: var(--primary); }
.tag-indigo { background: var(--violet-soft); color: var(--violet); }
.tag-teal { background: var(--teal-soft); color: var(--teal); }
.tag-green { background: var(--green-soft); color: var(--green); }
.tag-red { background: var(--red-soft); color: var(--red); }

/* 工具条 */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.search-box { position: relative; }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--muted); }
.search-box input {
  height: 36px; width: 230px; padding: 0 12px 0 33px; border: 1px solid var(--line); border-radius: 9px;
  font-size: 13px; background: #fbfcfe; outline: none; font-family: inherit; transition: all .16s;
}
.search-box input:focus { background: #fff; border-color: #8fb2ff; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
select.ctl, input.ctl {
  height: 36px; padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcfe;
  font-size: 13px; color: var(--text); outline: none; font-family: inherit; min-width: 118px;
}
select.ctl:focus, input.ctl:focus { border-color: #8fb2ff; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.spacer { flex: 1; }
.pager { display: flex; align-items: center; gap: 10px; padding: 13px 18px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--muted); }
.pager .pages { display: flex; gap: 4px; margin-left: auto; }
.page-btn { min-width: 30px; height: 30px; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.page-btn:hover { border-color: #cdd6e6; }
.page-btn.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ================= 表单 ================= */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.form-item { display: flex; flex-direction: column; gap: 7px; }
.form-item.full, .form-grid > .full { grid-column: 1 / -1; }
.form-item > label { font-size: 12.5px; color: var(--text-2); }
.form-item .req { color: var(--red); margin-left: 2px; }
.form-item input, .form-item select, .form-item textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; font-size: 13.5px;
  background: #fbfcfe; outline: none; font-family: inherit; color: var(--text); transition: all .16s;
}
.form-item textarea { min-height: 78px; resize: vertical; line-height: 1.7; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus {
  border-color: #8fb2ff; background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-item .help { font-size: 11.5px; color: var(--muted); }
.form-section { grid-column: 1 / -1; font-size: 13px; font-weight: 600; color: var(--text); padding-top: 6px; border-top: 1px dashed var(--line); margin-top: 4px; }
.form-section:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.perms-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 14px; max-height: 320px; overflow: auto; padding: 4px; }
.perm-row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; padding: 6px 8px; border-radius: 7px; }
.perm-row:hover { background: #f7f9fd; }
.perm-row strong { min-width: 78px; font-weight: 500; }
.perm-checks { display: flex; gap: 8px; flex-wrap: wrap; }
.perm-checks label { display: inline-flex; align-items: center; gap: 4px; color: var(--text-2); cursor: pointer; }
input[type="checkbox"] { accent-color: var(--primary); width: 14px; height: 14px; }

/* ================= 弹层 ================= */
.overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,.42); backdrop-filter: blur(2px);
  display: flex; align-items: flex-start; justify-content: center; z-index: 100; padding: 6vh 20px 40px; overflow: auto;
  animation: fadeIn .16s ease;
}
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.99) } to { opacity: 1; transform: none } }
.modal { background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: 560px; max-width: 100%; animation: popIn .18s ease; }
.modal.wide { width: 860px; }
.modal.narrow { width: 420px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { margin: 0; font-size: 15.5px; font-weight: 600; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 20px 22px; max-height: 74vh; overflow: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 9px; padding: 14px 22px; border-top: 1px solid var(--line-2); background: #fbfcfe; border-radius: 0 0 14px 14px; }
.confirm-text { font-size: 13.5px; line-height: 1.8; color: var(--text-2); }
.confirm-text b { color: var(--text); }

/* 抽屉 */
.drawer-wrap { position: fixed; inset: 0; background: rgba(15,23,42,.36); z-index: 90; display: flex; justify-content: flex-end; animation: fadeIn .16s; }
.drawer { width: 780px; max-width: 100%; background: var(--bg); height: 100%; display: flex; flex-direction: column; animation: slideIn .22s ease; }
@keyframes slideIn { from { transform: translateX(30px); opacity: .6 } to { transform: none; opacity: 1 } }
.drawer-head { background: #fff; padding: 18px 24px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.drawer-head h3 { margin: 0; font-size: 16px; }
.drawer-body { flex: 1; overflow: auto; padding: 18px 24px 32px; }
.drawer-foot { background: #fff; border-top: 1px solid var(--line); padding: 12px 24px; display: flex; gap: 9px; justify-content: flex-end; }

/* ================= 提示 ================= */
.toast-root { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #1f2937; color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 13px;
  box-shadow: 0 12px 30px -12px rgba(0,0,0,.5); animation: toastIn .2s ease; display: flex; align-items: center; gap: 8px;
}
.toast.ok { background: #0f7b48; }
.toast.err { background: #b43333; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px) } to { opacity: 1; transform: none } }

/* ================= 图表 ================= */
.chart { width: 100%; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); margin-top: 12px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-row { display: grid; grid-template-columns: 120px 1fr 92px; gap: 12px; align-items: center; font-size: 12.5px; }
.bar-name { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 8px; background: #f0f3f9; border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #4d8dff, #2563eb); transition: width .5s ease; }
.bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 500; }

/* 进度环 */
.ring-row { display: flex; gap: 18px; justify-content: space-between; flex-wrap: wrap; }
.ring { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ring-label { font-size: 12.5px; color: var(--muted); }
.ring-val { font-size: 12px; color: var(--text-2); }

/* 时间线 */
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 16px; font-size: 12.5px; }
.tl-item::before { content: ""; position: absolute; left: -18px; top: 4px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 2px solid #c8d3e6; }
.tl-item.done::before { border-color: var(--primary); background: var(--primary); }
.tl-item strong { display: block; font-weight: 500; color: var(--text); }
.tl-item small { color: var(--muted); }

/* 详情网格 */
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 20px; }
.kv > div { min-width: 0; }
.kv .full-kv { grid-column: 1 / -1; }
.kv dt { font-size: 11.5px; color: var(--muted); margin-bottom: 5px; }
.kv dd { margin: 0; font-size: 13.5px; color: var(--text); word-break: break-all; }
.section-title { font-size: 13px; font-weight: 600; margin: 22px 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ""; width: 3px; height: 13px; border-radius: 2px; background: var(--primary); }

/* 文件 */
.upload-zone {
  border: 1.5px dashed #ccd6e8; border-radius: 12px; padding: 26px; text-align: center; color: var(--muted);
  background: #fbfcff; cursor: pointer; transition: all .16s; font-size: 13px;
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.upload-zone svg { width: 26px; height: 26px; margin-bottom: 8px; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.file-card { border: 1px solid var(--line); border-radius: 10px; padding: 13px; display: flex; gap: 11px; align-items: flex-start; background: #fff; transition: all .16s; }
.file-card:hover { border-color: #c9d6ee; box-shadow: 0 8px 18px -14px rgba(16,24,40,.4); }
.file-ext { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; flex: 0 0 36px; letter-spacing: .03em; }
.file-meta { min-width: 0; flex: 1; }
.file-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-sub { font-size: 11.5px; color: var(--muted); margin-top: 4px; }

/* 商品/明细编辑 */
.items-editor { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.items-head, .items-row { display: grid; grid-template-columns: 2.2fr .8fr .9fr 1fr 34px; gap: 8px; align-items: center; padding: 9px 12px; }
.items-head { background: #f8fafd; font-size: 12px; color: var(--text-2); border-bottom: 1px solid var(--line-2); }
.items-row { border-bottom: 1px solid var(--line-2); }
.items-row:last-child { border-bottom: none; }
.items-row select, .items-row input { height: 32px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 12.5px; background: #fff; outline: none; font-family: inherit; width: 100%; }
.items-row .amt { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
.items-row .amt .price-src { display: block; font-size: 10.5px; line-height: 1.5; color: var(--muted); }
.price-src.is-hosp { color: #2563eb; }
.price-src.is-edit { color: #d97706; }
.price-note { font-size: 11.5px; color: var(--muted); padding: 7px 13px 0; line-height: 1.6; }
.items-foot { display: flex; justify-content: flex-end; gap: 26px; padding: 12px 14px; background: #fbfcfe; font-size: 13px; }
.items-foot b { font-size: 16px; color: var(--primary); font-variant-numeric: tabular-nums; }
.row-del { width: 28px; height: 28px; border-radius: 6px; border: none; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.row-del:hover { background: var(--red-soft); color: var(--red); }
.row-del svg { width: 14px; height: 14px; }

/* 技巧：滚动条细 */
.tabs { display: flex; gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--line-2); overflow-x: auto; }
.tab { padding: 12px 14px; font-size: 13px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }
.tab .cnt { font-size: 11.5px; color: var(--muted); margin-left: 5px; }

.alert-item { display: flex; gap: 10px; padding: 11px 0; border-bottom: 1px dashed var(--line-2); font-size: 12.5px; }
.alert-item:last-child { border-bottom: none; }
.alert-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); margin-top: 6px; flex: 0 0 7px; }
.alert-dot.red { background: var(--red); }
.alert-item .t { color: var(--text); }
.alert-item .s { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.quick-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.quick-btn {
  display: flex; align-items: center; gap: 10px; padding: 13px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; font-size: 13px; color: var(--text); transition: all .16s; text-align: left; font-family: inherit;
}
.quick-btn:hover { border-color: #b9cdf3; background: #f8fbff; transform: translateY(-1px); }
.quick-btn .qi { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; }

/* 响应式 */
@media (max-width: 1200px) {
  .grid-4, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .login-visual { display: none; }
  .sidebar { position: fixed; left: 0; top: 0; transform: translateX(-100%); transition: transform .22s; }
  .sidebar.open { transform: none; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .menu-toggle { display: inline-grid; }
  .grid-5, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .view { padding: 16px 14px 32px; }
  .icp-bar-app { padding: 0 14px 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .drawer { width: 100%; }
  .kv { grid-template-columns: 1fr 1fr; }
  .clock { display: none; }
}

/* 尊重"减少动效"偏好（也让无头截图更稳定） */
@media (prefers-reduced-motion: reduce) {
  .overlay, .modal, .drawer-wrap, .drawer, .toast { animation: none !important; }
  .bar-fill, .quick-btn { transition: none !important; }
}

/* ---------------- 审核提醒 ---------------- */
.topbar-right { position: relative; }
.bell-btn { position: relative; }
.bell-badge {
  position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 9px; background: var(--primary); color: #fff; font-size: 10.5px; line-height: 16px;
  text-align: center; font-weight: 600; box-shadow: 0 0 0 2px #fff;
}
.bell-badge.warn { background: var(--red); }
.bell-badge.hidden { display: none; }
.remind-pop {
  position: absolute; top: 46px; right: 96px; width: 380px; max-height: 460px; overflow: hidden;
  background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(15,23,42,.14);
  display: none; z-index: 60; font-size: 12.5px;
}
.remind-pop.open { display: block; }
.remind-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px 10px; border-bottom: 1px solid var(--line-2);
}
.remind-head strong { font-size: 13px; color: var(--text); }
.remind-head span { color: var(--muted); font-size: 11.5px; }
.remind-head .over, .remind-item em.over { color: var(--red); }
.remind-list { max-height: 340px; overflow-y: auto; }
.remind-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--line-2); color: inherit; text-decoration: none;
}
.remind-item:hover { background: var(--primary-soft); }
.ri-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ri-main b { font-size: 12.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.ri-main small { color: var(--muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-side { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; white-space: nowrap; }
.ri-side span { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.ri-side em { font-style: normal; color: var(--muted); font-size: 11px; }
.remind-empty { padding: 26px 14px; text-align: center; color: var(--muted); }
.remind-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; background: #fafbfe; border-top: 1px solid var(--line-2);
}
.remind-foot a { color: var(--primary); text-decoration: none; font-weight: 500; }
.remind-foot a:hover { text-decoration: underline; }
.remind-foot .muted { color: var(--muted); font-size: 11px; }

/* ================= 数据范围（归属医院） ================= */
.scope-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--text-2);
  font-size: 12px; cursor: pointer; white-space: nowrap; transition: all .15s;
}
.scope-chip svg { width: 15px; height: 15px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.scope-chip:hover { border-color: #c7d3ea; color: var(--text); }
.scope-chip.limited { background: var(--primary-soft); border-color: #c9dbff; color: var(--primary-600); font-weight: 600; }

.scope-note {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 11px 14px;
  background: var(--primary-soft); border: 1px solid #d5e2ff; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 12.5px;
}
.scope-note > svg { width: 18px; height: 18px; flex: none; stroke: var(--primary); fill: none; stroke-width: 1.6; }
.scope-note div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.scope-note b { color: var(--primary-600); font-size: 12.5px; }
.scope-note span { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scope-note em { margin-left: auto; font-style: normal; color: var(--primary-600); font-size: 11.5px; white-space: nowrap; }

.scope-dialog { font-size: 13px; }
.sd-row { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line-2); }
.sd-row span { color: var(--muted); }
.sd-hosp { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0 4px; }
.sd-tag { padding: 4px 10px; background: var(--primary-soft); color: var(--primary-600); border-radius: 999px; font-size: 12px; }
.sd-tip { margin: 10px 0 0; color: var(--muted); font-size: 11.5px; line-height: 1.7; }
@media (max-width: 720px) {
  .scope-chip #scopeText { max-width: 84px; overflow: hidden; text-overflow: ellipsis; }
  .scope-note em { display: none; }
}
