:root {
  --brand: #1f4e8c;
  --brand-2: #2f6fb5;
  --brand-soft: #e8f0fa;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #d9e1ec;
  --bg: #f4f6fa;
  --panel: #ffffff;
  --danger: #c62828;
  --ok: #1b7f3b;
  --warn: #b26a00;
  --radius: 6px;
  --shadow: 0 8px 28px rgba(15, 35, 70, .12);
  font-size: 13px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font-family: inherit; font-size: 13px; }
a { color: var(--brand-2); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }

/* ---------- 登录 ---------- */
.login-wrap {
  position: fixed; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(130deg, #0f2c52 0%, #1f4e8c 45%, #3a7bc0 100%);
  z-index: 50;
}
.login-card {
  width: 380px; background: #fff; border-radius: 10px; padding: 34px 32px 28px;
  box-shadow: 0 24px 64px rgba(4, 20, 45, .4);
}
.login-card .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.login-card .logo {
  width: 38px; height: 38px; border-radius: 9px; background: linear-gradient(135deg, var(--brand), #4b8ed6);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
}
.login-card h2 { font-size: 20px; letter-spacing: .5px; }
.login-card p.sub { color: var(--muted); margin: 4px 0 22px; font-size: 12px; }
.login-card label { display: block; color: #45536a; margin: 0 0 6px; font-size: 12px; }
.login-card input {
  width: 100%; height: 38px; border: 1px solid var(--line); border-radius: 5px; padding: 0 11px; margin-bottom: 14px;
  outline: none; background: #fbfcfe;
}
.login-card input:focus { border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 3px rgba(47,111,181,.12); }
.login-card .btn-primary { width: 100%; height: 40px; font-size: 14px; }
.login-card .foot { margin-top: 16px; color: #8a94a4; font-size: 11px; text-align: center; }
.login-err { color: var(--danger); font-size: 12px; min-height: 18px; margin-bottom: 6px; }

/* ---------- 布局 ---------- */
.app { display: none; flex-direction: column; height: 100vh; }
.app.on { display: flex; }
.topbar {
  height: 48px; background: linear-gradient(90deg, #173e70, var(--brand)); color: #eaf2fb;
  display: flex; align-items: center; padding: 0 14px; gap: 14px; flex: 0 0 48px;
}
.topbar .logo {
  width: 28px; height: 28px; border-radius: 7px; background: rgba(255,255,255,.16);
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.topbar .title { font-size: 15px; font-weight: 600; letter-spacing: .5px; }
.topbar .project-name { color: #bcd3ec; font-size: 12px; margin-left: 2px; }
.topbar .spacer { flex: 1; }
.topbar button {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); color: #eaf2fb;
  height: 28px; padding: 0 10px; border-radius: 4px; cursor: pointer;
}
.topbar button:hover { background: rgba(255,255,255,.2); }
.topbar .user { font-size: 12px; color: #cfe2f6; display: flex; align-items: center; gap: 8px; }

.body { flex: 1; display: flex; min-height: 0; }
.sidebar {
  width: 268px; flex: 0 0 268px; background: #fbfcfe; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0;
}
.sidebar-head {
  height: 38px; display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px; border-bottom: 1px solid var(--line); color: #45536a; font-weight: 600; font-size: 12px;
}
.sidebar-head .tools { display: flex; gap: 4px; }
.icon-btn {
  width: 24px; height: 24px; border: 1px solid transparent; background: transparent; border-radius: 4px;
  cursor: pointer; color: #45536a; display: inline-flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--brand-soft); border-color: #cfe0f5; }
.tree { flex: 1; overflow: auto; padding: 6px 4px 16px; }
.tree ul { list-style: none; margin: 0; padding-left: 14px; }
.tree > ul { padding-left: 2px; }
.tree li { position: relative; }
.tree .node {
  display: flex; align-items: center; gap: 5px; height: 28px; padding: 0 6px; border-radius: 4px;
  cursor: pointer; color: #2a3547; white-space: nowrap; overflow: hidden;
}
.tree .node:hover { background: #eef4fc; }
.tree .node.active { background: #dbe9fa; color: #123a6b; font-weight: 600; }
.tree .caret { width: 14px; text-align: center; color: #7b8798; font-size: 10px; transition: transform .15s; }
.tree .caret.open { transform: rotate(90deg); }
.tree .dot { width: 8px; height: 8px; border-radius: 2px; background: #7fa7d4; flex: 0 0 8px; }
.tree .dot.cat { background: #d2a24a; }
.tree .dot.proj { background: #4c8f57; }
.tree .name { overflow: hidden; text-overflow: ellipsis; }
.tree .badge { margin-left: auto; font-size: 10px; color: #8a94a4; }
.sidebar-foot { padding: 8px 10px; border-top: 1px solid var(--line); font-size: 11px; color: #8a94a4; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; background: var(--bg); }
.crumbs {
  height: 34px; flex: 0 0 34px; display: flex; align-items: center; gap: 8px; padding: 0 14px;
  background: #fff; border-bottom: 1px solid var(--line); color: #5b6577; font-size: 12px; overflow: hidden;
}
.crumbs .path { color: #8a94a4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabs { display: flex; gap: 2px; padding: 0 10px; background: #fff; border-bottom: 1px solid var(--line); overflow-x: auto; flex: 0 0 40px; align-items: flex-end; }
.tab {
  height: 34px; padding: 0 14px; border: 1px solid transparent; border-bottom: none; background: transparent;
  color: #4b5563; cursor: pointer; border-radius: 6px 6px 0 0; white-space: nowrap;
}
.tab:hover { color: var(--brand-2); background: #f2f7fd; }
.tab.active { background: var(--bg); border-color: var(--line); color: var(--brand); font-weight: 600; margin-bottom: -1px; }
.content { flex: 1; min-height: 0; overflow: auto; padding: 12px; }

/* ---------- 通用组件 ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.card + .card { margin-top: 10px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-bottom: 1px solid var(--line); background: #fafcff;
}
.card-head h3 { font-size: 13px; color: #26364d; }
.card-body { padding: 12px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.toolbar .sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.btn {
  height: 28px; padding: 0 11px; border: 1px solid #cbd7e6; background: #fff; color: #2c3b52;
  border-radius: 4px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.btn:hover { border-color: var(--brand-2); color: var(--brand); background: #f5f9ff; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #173e70; color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--danger); border-color: #eccfcf; background: #fff7f7; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { height: 24px; padding: 0 8px; font-size: 12px; }
.input, .select, textarea.input {
  height: 28px; border: 1px solid #cbd7e6; border-radius: 4px; padding: 0 8px; background: #fff; color: var(--ink); outline: none;
}
textarea.input { height: auto; padding: 6px 8px; resize: vertical; }
.input:focus, .select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 2px rgba(47,111,181,.12); }
.field { display: flex; flex-direction: column; gap: 4px; }
.field label { font-size: 11px; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

.table-wrap { overflow: auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
table.grid { border-collapse: collapse; width: 100%; font-size: 12px; }
table.grid th, table.grid td { border-right: 1px solid #e8eef6; border-bottom: 1px solid #eef2f7; padding: 5px 7px; text-align: left; white-space: nowrap; }
table.grid th { background: #f1f5fb; color: #40506a; font-weight: 600; position: sticky; top: 0; z-index: 2; }
table.grid tr:hover td { background: #f8fbff; }
table.grid tr.selected td { background: #e6f0fd; }
table.grid td.num, table.grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.grid td.center, table.grid th.center { text-align: center; }
table.grid tr.group td { background: #f6f9fd; font-weight: 600; color: #304768; }
table.grid tr.total td { background: #eef4fc; font-weight: 700; }
table.grid td .link { color: var(--brand-2); cursor: pointer; }
tr.dim td { color: #98a2b3; text-decoration: line-through; }

.stat-row { display: flex; gap: 10px; flex-wrap: wrap; }
.stat {
  flex: 1 1 140px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px 12px;
}
.stat .k { font-size: 11px; color: var(--muted); }
.stat .v { font-size: 18px; font-weight: 700; color: #14375f; margin-top: 3px; font-variant-numeric: tabular-nums; }

.empty { padding: 40px 10px; text-align: center; color: #9aa4b2; font-size: 12px; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.7; }
.badge-pill { display: inline-block; padding: 1px 7px; border-radius: 9px; background: #eef4fc; color: #3a6a9e; font-size: 11px; }
.tag-warn { color: #a15c00; background: #fff4e5; border: 1px solid #f3d9b0; padding: 1px 6px; border-radius: 3px; font-size: 11px; }
.tag-ok { color: #17663a; background: #e9f7ef; border: 1px solid #bfe6cd; padding: 1px 6px; border-radius: 3px; font-size: 11px; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(12, 24, 44, .42); display: flex; align-items: center; justify-content: center;
  z-index: 30; padding: 20px;
}
.modal {
  width: 640px; max-width: 96vw; max-height: 92vh; background: #fff; border-radius: 8px; box-shadow: var(--shadow);
  display: flex; flex-direction: column; overflow: hidden;
}
.modal.wide { width: 1080px; }
.modal.xwide { width: 1360px; }
.modal-head {
  height: 44px; flex: 0 0 44px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between;
  background: #f6f9fd; border-bottom: 1px solid var(--line);
}
.modal-head h3 { font-size: 14px; color: #223a5c; }
.modal-body { padding: 14px 16px; overflow: auto; }
.modal-foot { padding: 10px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; background: #fbfcfe; }
.close-x { border: none; background: transparent; font-size: 18px; color: #7b8798; cursor: pointer; line-height: 1; }
.close-x:hover { color: var(--danger); }
.modal .table-wrap { max-height: 46vh; }

.toast-wrap { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 60; }
.toast {
  min-width: 220px; max-width: 420px; background: #223a5c; color: #fff; padding: 9px 13px; border-radius: 5px;
  box-shadow: 0 8px 24px rgba(10, 25, 50, .25); font-size: 12px; animation: in .2s ease;
}
.toast.err { background: #8f2222; }
.toast.ok { background: #17663a; }
.toast.warn { background: #8a5a00; }
@keyframes in { from { transform: translateY(8px); opacity: 0; } }

/* ---------- 项目列表 ---------- */
.projects-page { padding: 18px; }
.projects-hero { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.projects-hero h2 { font-size: 20px; color: #173e70; }
.projects-hero p { color: var(--muted); margin: 5px 0 0; font-size: 12px; }
.project-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.project-card {
  background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 14px; cursor: pointer;
  transition: box-shadow .15s, border-color .15s; position: relative;
}
.project-card:hover { border-color: #b7cdea; box-shadow: 0 6px 18px rgba(31,78,140,.1); }
.project-card .pc-name { font-size: 15px; font-weight: 600; color: #1c3557; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.project-card .pc-no { color: #8a94a4; font-size: 11px; margin-top: 3px; }
.project-card .pc-meta { display: flex; gap: 14px; margin-top: 12px; color: #5b6577; font-size: 11px; }
.project-card .pc-meta b { color: #223a5c; font-size: 13px; }
.project-card .pc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; color: #8a94a4; font-size: 11px; }
.project-card .pc-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .15s; }
.project-card:hover .pc-actions { opacity: 1; }

/* ---------- 表单/明细 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 14px; }
.form-grid .span2 { grid-column: span 2; }
.form-grid .span3 { grid-column: span 3; }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.kv { background: #f7f9fd; border: 1px solid #e8eef6; border-radius: 4; padding: 7px 9px; }
.kv .k { color: #7b8798; font-size: 11px; }
.kv .v { color: #1c3557; font-weight: 600; margin-top: 2px; font-size: 13px; }
.section-title { font-size: 12px; font-weight: 600; color: #40506a; margin: 14px 0 8px; display: flex; align-items: center; gap: 6px; }
.section-title::before { content: ""; width: 3px; height: 12px; background: var(--brand-2); border-radius: 2px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid #cbd7e6; background: #fff; border-radius: 12px; padding: 2px 10px; font-size: 11px; cursor: pointer; color: #45536a; }
.chip.on { background: var(--brand); color: #fff; border-color: var(--brand); }

.split { display: flex; gap: 10px; align-items: stretch; }
.split .left { flex: 0 0 320px; }
.split .right { flex: 1; min-width: 0; }
.list-panel { border: 1px solid var(--line); border-radius: 4px; overflow: auto; max-height: 52vh; }
.list-item { padding: 6px 10px; cursor: pointer; font-size: 12px; border-bottom: 1px solid #f1f4f9; }
.list-item:hover { background: #f5f9ff; }
.list-item.active { background: #dbe9fa; color: #123a6b; font-weight: 600; }

.tree-picker { border: 1px solid var(--line); border-radius: 4px; padding: 6px; max-height: 44vh; overflow: auto; font-size: 12px; }
.tree-picker .tp-node { padding: 4px 6px; cursor: pointer; border-radius: 3px; }
.tree-picker .tp-node:hover { background: #f2f7fd; }
.tree-picker .tp-node.active { background: #dbe9fa; color: #123a6b; }

.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.report-card { border: 1px solid var(--line); border-radius: 6px; padding: 12px; background: #fff; }
.report-card h4 { font-size: 13px; color: #223a5c; margin-bottom: 4px; }
.report-card p { color: var(--muted); font-size: 11px; min-height: 30px; margin: 0 0 10px; }
.report-card .actions { display: flex; gap: 6px; }

.tab-strip { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tab-strip button { border: none; background: transparent; padding: 7px 12px; cursor: pointer; color: #5b6577; border-bottom: 2px solid transparent; }
.tab-strip button.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.mono { font-family: Consolas, "Courier New", monospace; }
.danger-text { color: var(--danger); }
.ok-text { color: var(--ok); }
.muted { color: var(--muted); }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.flex { display: flex; }
.gap6 { gap: 6px; }
.gap10 { gap: 10px; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.w100 { width: 100%; }

/* ---------- 在线版补充样式 ---------- */
.btn.sm { height: 24px; padding: 0 8px; font-size: 12px; }
.btn.xs { height: 22px; padding: 0 6px; font-size: 11px; }
.toolbar.sub { margin-top: 8px; padding: 6px 8px; background: #fff; border: 1px solid var(--line); border-radius: 4px; }
.toolbar.wrap { flex-wrap: wrap; }
.chk { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: #45536a; }
.chk.block { display: flex; padding: 5px 0; }
.spacer { flex: 1; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.page-head h2 { font-size: 20px; color: #173e70; }
.page-head .muted { margin-top: 4px; font-size: 12px; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; margin-top: 12px; }
.project-card { background: #fff; border: 1px solid var(--line); border-radius: 7px; padding: 14px; cursor: pointer; }
.project-card:hover { border-color: #b7cdea; box-shadow: 0 6px 18px rgba(31,78,140,.1); }
.pc-head { display: flex; align-items: center; gap: 8px; }
.pc-name { font-size: 15px; font-weight: 600; color: #1c3557; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-stats { display: flex; gap: 18px; margin-top: 12px; }
.pc-stat { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: #8a94a4; }
.pc-stat b { font-size: 13px; color: #223a5c; font-weight: 600; }
.pc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 11px; }
.card-actions { display: flex; gap: 4px; }
.pill { display: inline-block; padding: 1px 7px; border-radius: 9px; background: #eef4fc; color: #3a6a9e; font-size: 11px; line-height: 17px; }
.pill.ok { background: #e9f7ef; color: #17663a; }
.pill.warn { background: #fff4e5; color: #a15c00; }
.pill.danger { background: #fdecec; color: #b02a2a; }
.dropdown { background: #fff; border: 1px solid var(--line); border-radius: 5px; box-shadow: var(--shadow); padding: 4px; min-width: 150px; z-index: 45; }
.drop-item { display: block; width: 100%; border: none; background: transparent; text-align: left; padding: 7px 10px; font-size: 12px; cursor: pointer; border-radius: 3px; color: #2c3b52; }
.drop-item:hover { background: #f2f7fd; }
.drop-item.danger { color: var(--danger); }
.upload-mask { position: fixed; inset: 0; background: rgba(12,24,44,.42); display: flex; align-items: center; justify-content: center; z-index: 55; }
.upload-box { background: #fff; padding: 26px 34px; border-radius: 8px; display: flex; align-items: center; gap: 14px; box-shadow: var(--shadow); font-size: 13px; }
.spinner { width: 22px; height: 22px; border: 3px solid #d8e3f0; border-top-color: var(--brand); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tree-row { display: flex; align-items: center; gap: 5px; height: 27px; padding-right: 6px; border-radius: 4px; cursor: pointer; color: #2a3547; white-space: nowrap; font-size: 12px; }
.tree-row:hover { background: #eef4fc; }
.tree-row.active { background: #dbe9fa; color: #123a6b; font-weight: 600; }
.tree-row .twisty { width: 12px; text-align: center; color: #7b8798; font-size: 10px; flex: 0 0 12px; }
.tree-row .ico { flex: 0 0 16px; text-align: center; font-size: 12px; }
.tree-row .nm { overflow: hidden; text-overflow: ellipsis; }
.tree-row .dot { width: 7px; height: 7px; border-radius: 2px; margin-left: auto; }
.tree-row.root { font-weight: 600; }
.tree-row.category { color: #304768; }
.stat-cards { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.stat-card { flex: 1 1 150px; background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px 13px; }
.stat-label { font-size: 11px; color: var(--muted); }
.stat-value { font-size: 19px; font-weight: 700; color: #14375f; margin-top: 3px; font-variant-numeric: tabular-nums; }
.stat-value.small { font-size: 13px; font-weight: 600; line-height: 28px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-unit { font-size: 10px; color: #9aa4b2; }
.section-head { display: flex; align-items: center; gap: 8px; margin: 14px 0 8px; }
.section-title { margin: 0; }
.totals-box { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 10px 13px; margin-top: 12px; }
table.grid.compact th, table.grid.compact td { padding: 4px 8px; }
table.grid tr.strong td { background: #eef4fc; font-weight: 700; color: #173e70; }
.totals-line { margin-top: 8px; padding-top: 8px; border-top: 1px solid #eef2f7; text-align: right; font-size: 13px; font-weight: 700; color: #173e70; }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 10px; padding: 10px 12px; }
.detail-grid.six { grid-template-columns: repeat(3, 1fr); }
.detail-item label { display: block; font-size: 11px; color: #7b8798; margin-bottom: 2px; }
.detail-item .value { font-size: 13px; color: #1c3557; font-weight: 600; word-break: break-all; }
.meta-line { padding: 8px 2px; font-size: 11px; }
.expr { color: #3a6a9e; font-size: 11px; }
.two-col { display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; margin-top: 12px; align-items: start; }
.two-col .card { margin-top: 0; }
.report-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.report-card { border: 1px solid var(--line); border-radius: 6px; padding: 12px; background: #fff; display: flex; flex-direction: column; gap: 6px; }
.rc-title { font-size: 13px; font-weight: 600; color: #223a5c; }
.rc-desc { color: var(--muted); font-size: 11px; min-height: 28px; }
.rc-actions { display: flex; gap: 6px; }
.quota-picker .table-wrap { max-height: 52vh; }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; }
.row-ops { display: flex; gap: 4px; }
.mini-btn { height: 21px; padding: 0 6px; border: 1px solid #cbd7e6; background: #fff; border-radius: 3px; font-size: 11px; color: #2c3b52; cursor: pointer; }
.mini-btn:hover { border-color: var(--brand-2); color: var(--brand); background: #f5f9ff; }
.mini-btn.danger { color: var(--danger); border-color: #eccfcf; }
.mini-btn.danger:hover { background: #fff2f2; }
.empty.small { padding: 18px 10px; }
.loading { padding: 40px; text-align: center; color: #8a94a4; font-size: 12px; }
.spec-text { display: inline-block; max-width: 360px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.bill-name { display: inline-flex; align-items: center; gap: 5px; }
.input.mini { width: 100%; height: 24px; padding: 0 5px; font-size: 12px; }
.detail-head { display: flex; align-items: flex-start; gap: 18px; background: #f7f9fd; border: 1px solid var(--line); border-radius: 6px; padding: 10px 13px; }
.detail-head .dh-main { flex: 1; min-width: 0; }
.dh-code { font-family: Consolas, monospace; color: #3a6a9e; font-size: 12px; }
.dh-name { font-size: 15px; font-weight: 600; color: #173e70; margin-top: 2px; }
.dh-spec { color: var(--muted); font-size: 11px; margin-top: 3px; }
.dh-stats { display: flex; gap: 16px; }
.dh-stat { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: #8a94a4; }
.dh-stat b { font-size: 15px; color: #173e70; }
.dh-actions { display: flex; align-items: center; }
.section-block { margin-top: 8px; }
.lib-split { display: flex; gap: 10px; min-height: 0; }
.lib-split .lib-tree { flex: 0 0 280px; border: 1px solid var(--line); border-radius: 4px; overflow: auto; max-height: 58vh; padding: 4px; background: #fbfcfe; }
.lib-split .lib-table { flex: 1; min-width: 0; }
.lib-split > div:last-child { flex: 1; min-width: 0; }
.tree-row.spec { padding-left: 8px; font-weight: 600; color: #304768; }
.tree-row.vol { padding-left: 18px; font-size: 11px; color: #5b6577; }
.tree-row.chapter { padding-left: 30px; font-size: 11px; color: #8a94a4; }
.tree-row.section { padding-left: 42px; font-size: 11px; color: #98a1af; }
