/* ================= 智+ 视觉规范（版式参照原版 AI+） ================= */
:root {
  /* ---- 主题色阶：由 html[data-theme="xx"] 覆盖（默认「经典蓝」） ---- */
  --blue-900: #12457e;
  --blue-800: #17548f;
  --blue-700: #1b62a5;
  --blue-600: #2376bd;
  --blue-500: #2e86cf;
  --blue-050: #eaf2fb;
  --blue-100: #d6e6f7;
  /* 顶栏渐变 / 浅色底 / 选中底 / 表头底：跟随主题 */
  --top-a: #1b62a5;
  --top-b: #143f74;
  --top-fg: #d8e8f7;
  --tint: #eef4fb;
  --tint-2: #e9f0f8;
  --sel: #e2eefa;
  --rows-hover: #eef6fd;
  --rows-sel: #dcecfa;
  --thead: #eef3f9;
  --tile-head-a: #eef4fb;
  --tile-head-b: #e4eef9;
  /* ---- 表格密度：由「表格字体行高设置」覆盖 ---- */
  --grid-fs: 12.5px;
  --grid-row-h: 30px;
  --grid-head-h: 30px;
  --line: #d5dce4;
  --line-2: #e6ebf1;
  --bg: #f2f4f7;
  --text: #24303c;
  --text-2: #5c6b7a;
  --text-3: #8b98a6;
  --orange: #e8892b;
  --green: #1a9e63;
  --red: #d94b4b;
  --radius: 3px;
  --font: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", "Segoe UI", sans-serif;
}

/* ============ 主题配色（右上角「主题换肤」） ============ */
/* 高端商务：石墨灰 */
html[data-theme="graphite"] {
  --blue-900: #262d36; --blue-800: #333c47; --blue-700: #46505e; --blue-600: #55616f;
  --blue-500: #68757f; --blue-050: #f1f3f6; --blue-100: #dfe4ea;
  --top-a: #4a5568; --top-b: #2f3946; --top-fg: #dfe5ec;
  --tint: #f0f2f5; --tint-2: #eaedf1; --sel: #e3e7ec;
  --rows-hover: #f3f5f8; --rows-sel: #e1e6ec; --thead: #eceff3;
  --tile-head-a: #f1f3f6; --tile-head-b: #e6eaef;
}
/* 绿意盎然：森林绿 */
html[data-theme="green"] {
  --blue-900: #1b5330; --blue-800: #246842; --blue-700: #2e7d4f; --blue-600: #3a915e;
  --blue-500: #4aa470; --blue-050: #ecf7f0; --blue-100: #d5ecdf;
  --top-a: #2e7d4f; --top-b: #1c5836; --top-fg: #dff0e6;
  --tint: #eff8f2; --tint-2: #e8f4ec; --sel: #dcf0e4;
  --rows-hover: #f1faf4; --rows-sel: #daf0e2; --thead: #eaf4ee;
  --tile-head-a: #eff8f2; --tile-head-b: #e2f2e8;
}
/* 桃运亨通：胭脂粉 */
html[data-theme="pink"] {
  --blue-900: #8a2749; --blue-800: #a4325a; --blue-700: #bb3e6b; --blue-600: #cd517d;
  --blue-500: #db6b92; --blue-050: #fdefF4; --blue-100: #fadce7;
  --top-a: #bb3e6b; --top-b: #8a2749; --top-fg: #fbe0ea;
  --tint: #fdf1f5; --tint-2: #fae9f0; --sel: #fbdfea;
  --rows-hover: #fef5f8; --rows-sel: #fadfe9; --thead: #fbeef3;
  --tile-head-a: #fdf1f5; --tile-head-b: #fae4ed;
}
/* 智领未来：深海蓝 */
html[data-theme="navy"] {
  --blue-900: #0b3f70; --blue-800: #0f4c86; --blue-700: #145c9c; --blue-600: #1b6db2;
  --blue-500: #2781c6; --blue-050: #eaf3fb; --blue-100: #d4e7f7;
  --top-a: #145c9c; --top-b: #0a3a68; --top-fg: #d6e8f7;
  --tint: #edf5fc; --tint-2: #e6f0fa; --sel: #dbeaf9;
  --rows-hover: #eff7fe; --rows-sel: #d9eafa; --thead: #e9f2fb;
  --tile-head-a: #edf5fc; --tile-head-b: #e0eefb;
}
/* 紫气东来：紫罗兰 */
html[data-theme="purple"] {
  --blue-900: #4b2d8e; --blue-800: #5b39a4; --blue-700: #6b45b8; --blue-600: #7d58c9;
  --blue-500: #9171d6; --blue-050: #f3effc; --blue-100: #e5dcf8;
  --top-a: #6b45b8; --top-b: #472a85; --top-fg: #e7ddfb;
  --tint: #f4f0fd; --tint-2: #efe8fb; --sel: #e6dcf9;
  --rows-hover: #f7f4fe; --rows-sel: #e5dbf9; --thead: #f0ebfc;
  --tile-head-a: #f4f0fd; --tile-head-b: #eae1f9;
}
/* 红火生财：中国红 */
html[data-theme="red"] {
  --blue-900: #8d2723; --blue-800: #a5302b; --blue-700: #bc3a34; --blue-600: #cc4c45;
  --blue-500: #da625b; --blue-050: #fdeeed; --blue-100: #fadbd8;
  --top-a: #bc3a34; --top-b: #8a2521; --top-fg: #fbdcd9;
  --tint: #fdf1f0; --tint-2: #fbe9e7; --sel: #fbdfdc;
  --rows-hover: #fef5f4; --rows-sel: #fadfdb; --thead: #fbecea;
  --tile-head-a: #fdf1f0; --tile-head-b: #fae3e0;
}
/* 简约大气：清透蓝 */
html[data-theme="light"] {
  --blue-900: #2f6b9e; --blue-800: #3a7baf; --blue-700: #4789bd; --blue-600: #5698ca;
  --blue-500: #6aa8d5; --blue-050: #f4f9fd; --blue-100: #e2effa;
  --top-a: #6ba3d0; --top-b: #4d87b8; --top-fg: #f0f7fd;
  --tint: #f6fafd; --tint-2: #eff6fc; --sel: #e6f1fb;
  --rows-hover: #f6fbfe; --rows-sel: #e4f0fb; --thead: #eef6fc;
  --tile-head-a: #f6fafd; --tile-head-b: #e8f2fb;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 13px; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-700); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: 13px; color: var(--text); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c3ccd6; border-radius: 6px; border: 2px solid #f2f4f7; }
::-webkit-scrollbar-thumb:hover { background: #a8b4c1; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------- 登录页 ------------------------------- */
.login-wrap {
  height: 100vh; display: flex; align-items: stretch;
  background: linear-gradient(135deg, #0d3563 0%, #17548f 45%, #2e86cf 100%);
  position: relative; overflow: auto;
}
.login-wrap::after {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 18px 18px; pointer-events: none;
}
.login-left { flex: 1; padding: 64px 72px; color: #fff; position: relative; z-index: 1; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; }
/* 融合版：容器不再有白色底板/白框，透明底 logo 直接贴在蓝色渐变背景上 */
.brand-logo {
  width: 54px; height: 54px; flex: none; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 0; padding: 0;
}
.brand-logo img { width: 100%; height: 100%; display: block; object-fit: contain; }
.brand-name { font-size: 22px; font-weight: 600; letter-spacing: .5px; }
.brand-sub { font-size: 12px; opacity: .7; margin-top: 2px; letter-spacing: 1px; }
.login-slogan { margin-top: auto; margin-bottom: 8vh; }
.login-slogan h1 { font-size: 40px; line-height: 1.25; margin: 0 0 18px; font-weight: 600; letter-spacing: 1px; }
.login-slogan p { font-size: 14px; opacity: .78; line-height: 1.9; margin: 0; max-width: 480px; }
.login-feats { display: flex; gap: 28px; margin-top: 26px; font-size: 12px; opacity: .8; }
.login-feats span::before { content: "▪ "; color: #7fc0ff; }

.login-right {
  width: min(430px, 100%); flex: none; background: #fff; position: relative; z-index: 1;
  display: flex; flex-direction: column; padding: 0 46px;
  box-shadow: -8px 0 40px rgba(3, 25, 51, .28);
}
.login-box { margin-top: 12vh; }
.login-box h2 { font-size: 20px; margin: 0 0 6px; font-weight: 600; }
.login-box .sub { color: var(--text-3); font-size: 12px; margin-bottom: 26px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fbfcfe; outline: none; transition: .15s;
}
.field input:focus, .field select:focus { border-color: var(--blue-500); background: #fff; box-shadow: 0 0 0 3px rgba(46,134,207,.12); }
.field-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.field-row > .field:first-child { flex: 1 1 160px; min-width: 140px; }
.field-row > .field:last-child { flex: 0 0 118px; }
.btn-login {
  width: 100%; height: 42px; margin-top: 8px; border: 0; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--blue-500), var(--blue-700)); color: #fff; font-size: 15px; letter-spacing: 4px;
  cursor: pointer; transition: .15s;
}
.btn-login:hover:not(:disabled) { filter: brightness(1.06); }
.btn-login:active:not(:disabled) { transform: translateY(1px); }
.btn-login:disabled { opacity: .62; cursor: not-allowed; filter: none; }
.login-msg { min-height: 20px; color: var(--red); font-size: 12px; margin-top: 10px; }
.login-foot { margin-top: auto; padding: 22px 0; color: var(--text-3); font-size: 11px; line-height: 1.8; }
.login-foot .ver { color: var(--text-2); }
.login-tabs { display: flex; gap: 0; margin-bottom: 18px; border-bottom: 1px solid #e3e9f0; }
.login-tabs button {
  flex: 1; height: 40px; border: 0; background: none; cursor: pointer; font-size: 14px;
  color: #6b7c8f; font-family: inherit; border-bottom: 2px solid transparent; transition: all .15s;
}
.login-tabs button.on { color: #17548f; font-weight: 600; border-bottom-color: #17548f; }
.login-tabs button:hover { color: #17548f; }
.sys-note {
  font-size: 11.5px; color: #8b98a6; line-height: 1.7; background: #f5f8fb; border: 1px solid #e6edf4;
  border-radius: 3px; padding: 9px 11px; margin-top: 4px;
}
#code { text-transform: uppercase; font-weight: 600; letter-spacing: 2px; font-family: Consolas, Monaco, monospace; }
.login-code-img {
  height: 40px; border: 1px solid #d5dce4; border-radius: var(--radius); display: flex; align-items: center;
  justify-content: center; font-size: 19px; letter-spacing: 6px; font-weight: 600; color: #17548f;
  background: linear-gradient(135deg, #eef4fb, #dfeaf7); cursor: pointer; user-select: none; font-style: italic;
}
.login-code-img:hover { border-color: #8cb8e0; }
.step-back {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px 0 6px; margin-bottom: 12px;
  font-size: 12px; color: #17548f; background: #f2f7fc; border: 1px solid #e2ecf6; border-radius: 3px; cursor: pointer;
}
.step-back:hover { background: #e8f1fa; }
.acc-sub { color: #6b7c8f; font-size: 12px; line-height: 1.7; margin: 0 0 16px; }
.acc-sub b { color: #1f2d3d; }
.acc-list { max-height: calc(100vh - 300px); overflow: auto; margin: 0 -6px 0 0; padding-right: 4px; }
.acc-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin-bottom: 8px;
  border: 1px solid #dfe7f0; border-radius: 4px; background: #fbfcfe; cursor: pointer; transition: all .15s;
}
.acc-item:hover { border-color: #8cb8e0; background: #f4f9ff; box-shadow: 0 2px 8px rgba(23,84,143,.08); }
.acc-item:hover .acc-go { color: #17548f; }
.acc-item.off { cursor: not-allowed; background: #f7f8fa; border-color: #e8ebef; opacity: .82; }
.acc-item.off:hover { box-shadow: none; border-color: #e8ebef; background: #f7f8fa; }
.acc-main { flex: 1; min-width: 0; }
.acc-title { display: flex; align-items: baseline; gap: 7px; font-size: 13.5px; color: #1f2d3d; }
.acc-title b { font-family: Consolas, monospace; font-size: 13px; color: #17548f; flex: none; }
.acc-title span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acc-meta { font-size: 11.5px; color: #8b98a6; margin-top: 3px; }
.acc-block { font-size: 11.5px; color: #c0392b; margin-top: 3px; }
.acc-right { flex: none; min-width: 72px; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.acc-days { font-size: 11px; color: #6b7c8f; white-space: nowrap; }
.acc-days.warn { color: #b0741a; }
.acc-days.over { color: #c0392b; }
.acc-go { font-size: 12px; color: #9aa7b4; white-space: nowrap; }
.acc-empty {
  padding: 22px 16px; border: 1px dashed #e0e7ef; border-radius: 4px; background: #fafcfe;
  color: #8b98a6; font-size: 12px; line-height: 1.9; text-align: center;
}

/* 窄屏：左侧标语会把表单挤出视口，账套卡片右侧「进入」被裁掉 */
@media (max-width: 1180px) {
  .login-left { padding: 36px 28px; min-width: 0; }
  .brand-name { font-size: 18px; }
  .login-slogan h1 { font-size: 28px; }
  .login-feats { flex-wrap: wrap; gap: 8px 16px; }
  .login-feats span { white-space: nowrap; }
}
@media (max-width: 980px) {
  .login-left { display: none; }
  .login-wrap { overflow: auto; justify-content: center; background: #eef3f8; }
  .login-wrap::after { display: none; }
  .login-right {
    width: min(460px, 100%); padding: 0 24px; box-shadow: none; background: #fff;
  }
}

/* ------------------------------- 主框架 ------------------------------- */
.app { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }

.topbar {
  height: 48px; flex: none; display: flex; align-items: center; padding: 0 14px;
  background: linear-gradient(180deg, var(--top-a), var(--top-b)); color: #fff;
}
.topbar .logo { display: flex; align-items: center; gap: 9px; padding-right: 16px; }
/* 融合版：顶栏是深色渐变（8 套主题皆然），去掉白色方块，图形与背景连成一体 */
.topbar .logo .mark {
  width: 32px; height: 32px; flex: none; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 0; padding: 0;
}
.topbar .logo .mark img { width: 100%; height: 100%; display: block; object-fit: contain; }
.topbar .logo .title { font-size: 15px; font-weight: 600; letter-spacing: .5px; }
.topbar .logo .title small { font-weight: 400; font-size: 11px; opacity: .65; margin-left: 6px; letter-spacing: 0; }
.topbar .acc {
  font-size: 12px; padding: 4px 10px; border-radius: 2px; background: rgba(255,255,255,.12); color: #dbeaf8;
  max-width: min(38vw, 380px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 1; min-width: 0;
  cursor: pointer;
}
.topbar .acc:hover { background: rgba(255,255,255,.2); }
.topbar .spacer { flex: 1; }
.topbar .tb-btn {
  height: 28px; padding: 0 10px; margin-left: 6px; border: 0; border-radius: 2px; background: transparent;
  color: #d8e8f7; cursor: pointer; font-size: 12px;
}
.topbar .tb-btn:hover { background: rgba(255,255,255,.14); color: #fff; }
.topbar .who { font-size: 12px; color: #cfe3f6; margin-left: 10px; }
.topbar .who b { font-weight: 600; color: #fff; }

.actionbar {
  height: 40px; flex: none; display: flex; align-items: center; gap: 2px; padding: 0 10px;
  background: #fbfcfe; border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgba(20,50,80,.04);
  overflow-x: auto;
}
.act {
  height: 28px; padding: 0 11px; border: 1px solid transparent; border-radius: 2px; background: transparent;
  color: #33475b; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px;
}
.act:hover { background: var(--tint); border-color: var(--blue-100); color: var(--blue-700); }
.act:disabled { color: #b3bdc8; cursor: not-allowed; background: transparent; border-color: transparent; }
.act.primary { background: var(--blue-050); border-color: var(--blue-100); color: var(--blue-700); font-weight: 600; }
.act .ic { font-size: 13px; opacity: .85; }
.act-sep { width: 1px; height: 18px; background: var(--line); margin: 0 6px; }

.main { flex: 1; display: flex; min-height: 0; }

/* 左侧菜单 */
.sidebar {
  width: 208px; flex: none; background: #f7f9fb; border-right: 1px solid var(--line);
  display: flex; flex-direction: column; min-height: 0;
}
.sidebar-head {
  height: 32px; flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 0 10px; font-size: 12px; color: var(--text-2); border-bottom: 1px solid var(--line-2);
  background: var(--tint-2); letter-spacing: .5px;
}
.sidebar-head .fold { cursor: pointer; color: var(--text-3); font-size: 14px; }
.tree { flex: 1; overflow: auto; padding: 8px 6px 20px; }
.tree-group { user-select: none; margin-bottom: 2px; }
.tree-l1 {
  display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; cursor: pointer;
  color: #3a4a5a; font-size: 13px; border-radius: 6px; transition: background .12s, color .12s;
}
.tree-l1:hover { background: var(--tint-2); color: var(--blue-700); }
.tree-l1 .mi {
  width: 20px; height: 20px; flex: none; display: inline-flex; align-items: center; justify-content: center;
  color: #6b7c8d;
}
.tree-l1 .mi .ico { display: block; }
.tree-l1 .mt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-l1 .mchev { color: #b0bbc6; font-size: 14px; line-height: 1; flex: none; }
.tree-l1 .arrow { width: 12px; font-size: 9px; color: #8494a5; transition: transform .15s; margin-left: auto; flex: none; }
.tree-l1 .arrow.open { transform: rotate(90deg); }
.tree-l1 .dot { display: none; }
.tree-l1.active {
  background: var(--blue-050); color: var(--blue-700); font-weight: 600;
  box-shadow: inset 3px 0 0 var(--blue-600);
}
.tree-l1.active .mi, .tree-l1.active .mchev { color: var(--blue-600); }
.tree-l1:hover .mi { color: var(--blue-600); }
.tree-sub { display: none; padding: 2px 0 4px; }
.tree-sub.open { display: block; }
.tree-l2 {
  height: 32px; display: flex; align-items: center; gap: 8px; padding: 0 10px 0 36px; cursor: pointer;
  color: #45596c; font-size: 12.5px; border-radius: 6px;
}
.tree-l2 .mi { width: 16px; height: 16px; flex: none; color: #9aa8b6; display: inline-flex; align-items: center; justify-content: center; }
.tree-l2 .mi.sm .ico { display: block; }
.tree-l2 .mt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-l2:hover { background: var(--tint); color: var(--blue-700); }
.tree-l2:hover .mi { color: var(--blue-600); }
.tree-l2.active { background: var(--blue-050); color: var(--blue-700); font-weight: 600; box-shadow: inset 2px 0 0 var(--blue-600); }
.tree-l2.active .mi { color: var(--blue-600); }
/* 兼容旧 gicon */
.tree-l1 .gicon { display: inline-flex; align-items: center; justify-content: center; color: #6b7c8d; }

/* ---------------------------- 平铺式菜单（业务导航） ---------------------------- */
.tile-menu {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 0; row-gap: 16px; min-height: 420px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 4px 26px;
}
.tile-col { flex: 1 1 240px; min-width: 0; padding: 0 16px; border-right: 1px dashed #e4eaf1; }
.tile-col:last-child { border-right: 0; }
.tile-head {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 12px;
  background: linear-gradient(180deg, var(--tile-head-a), var(--tile-head-b)); border-radius: 6px;
  color: var(--blue-700); font-size: 15px; font-weight: 600; letter-spacing: .5px;
}
.tile-head .ti {
  width: 34px; height: 34px; flex: none; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .72); color: var(--blue-600);
  box-shadow: inset 0 0 0 1px rgba(35, 118, 189, .12);
}
.tile-head .ti .ico { display: block; }
.tile-head .tt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-list { padding-top: 8px; }
.tile-row {
  display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; border-radius: 4px;
  color: #2c3e50; font-size: 13px; cursor: pointer; transition: .12s;
}
.tile-row:hover { background: var(--rows-hover); color: var(--blue-700); }
.tile-row .tr-ico {
  width: 16px; height: 16px; flex: none; color: #9aa8b6;
  display: inline-flex; align-items: center; justify-content: center;
}
.tile-row:hover .tr-ico { color: var(--blue-600); }
.tile-row .tr-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tile-row .tr-hist {
  flex: none; margin-left: 10px; padding-left: 10px; border-left: 1px solid #dde3e9;
  color: var(--text-3); font-size: 12px;
}
.tile-row:hover .tr-hist { color: var(--blue-600); }
.tile-row .tr-hist:hover { text-decoration: underline; }
.tile-row.todo { color: #a9b6c4; }
.tile-row.todo:hover { background: #f7f9fb; color: #8b98a6; }
.tile-row .tr-tag {
  font-style: normal; font-size: 10px; line-height: 15px; padding: 0 5px; margin-left: 6px;
  color: #93a1b0; border: 1px solid #e0e7ee; border-radius: 8px; background: #f8fafc;
}
/* 新功能标记（对应 AI+ 菜单里的红色 NEW） */
/* ============================================= 业务流程 BPM */
.bpm-page .bpm-top { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bpm-page .bpm-top .page-title { margin: 0; font-size: 18px; font-weight: 600; }
.bpm-top-acts { margin-left: auto; display: flex; gap: 8px; }
.bpm-body { display: flex; gap: 0; min-height: calc(100vh - 160px); border: 1px solid var(--line); border-radius: 6px; background: #fff; overflow: hidden; }
.bpm-side { width: 200px; border-right: 1px solid var(--line); background: #fafbfd; flex: none; display: flex; flex-direction: column; }
.bpm-side.collapsed { width: 0; overflow: hidden; border: 0; }
.bpm-side-hd { display: flex; align-items: center; gap: 6px; padding: 10px 10px; font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--line); }
.bpm-side-hd span { flex: 1; }
.bpm-side-list { padding: 8px; overflow: auto; flex: 1; }
.bpm-cat { padding: 8px 10px; border-radius: 4px; cursor: pointer; font-size: 12.5px; margin-bottom: 2px; }
.bpm-cat:hover { background: #fff4ec; }
.bpm-cat.on { background: #ffe8d9; color: #c45f12; font-weight: 600; }
.bpm-cat .code { color: var(--text-3); margin-right: 4px; }
.bpm-main { flex: 1; min-width: 0; padding: 12px; display: flex; flex-direction: column; gap: 10px; }

.bpm-editor { position: relative; }
.bpm-ed-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.bpm-ed-hd .bpm-name { border: none; border-bottom: 1px dashed #e07020; font-size: 16px; font-weight: 600; padding: 4px 6px; min-width: 220px; color: #333; background: transparent; }
.bpm-ed-hd .bpm-name:focus { outline: none; border-bottom-color: #c45f12; }
.bpm-ed-pen { color: #e07020; }
.bpm-ed-tools { position: absolute; left: 8px; top: 56px; display: flex; flex-direction: column; gap: 4px; z-index: 2;
  background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 4px; box-shadow: 0 2px 8px rgba(0,0,0,.06); }
.bpm-canvas-wrap { overflow: auto; min-height: calc(100vh - 180px); background: #fafbfc;
  border: 1px solid var(--line); border-radius: 6px; padding: 28px 16px 48px; }
.bpm-canvas { display: flex; flex-direction: column; align-items: center; gap: 0; width: max-content; min-width: 100%; margin: 0 auto; }
.bpm-start { display: flex; flex-direction: column; align-items: center; gap: 6px; color: #3b82f6; font-size: 12.5px; }
.bpm-start i { width: 36px; height: 36px; border-radius: 50%; background: #3b82f6; display: block;
  box-shadow: inset 0 0 0 6px #93c5fd; }
.bpm-arrow { width: 2px; height: 22px; background: #d0d7de; }
.bpm-node { width: 320px; background: #fff; border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 2px 8px rgba(15,23,42,.06); overflow: hidden; }
.bpm-node.form .bpm-node-hd .tag { color: #7c3aed; background: #f3e8ff; }
.bpm-node.doc .bpm-node-hd .tag { color: #c45f12; background: #fff4ec; }
.bpm-node-hd { display: flex; align-items: center; padding: 8px 10px; border-bottom: 1px solid #f0f2f5; gap: 8px; }
.bpm-node-hd .tag { font-size: 12px; padding: 2px 8px; border-radius: 3px; font-weight: 600; }
.bpm-node-hd .btn { margin-left: auto; }
.bpm-node-bd { padding: 12px 12px 14px; }
.bpm-node-bd select { width: 100%; height: 32px; border: 1px solid var(--line); border-radius: 4px; padding: 0 8px; font-size: 12.5px; }
.bpm-between { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 0 4px; min-height: 48px; }
.bpm-plus { width: 28px; height: 28px; border-radius: 50%; border: none; background: #3b82f6; color: #fff;
  font-size: 18px; line-height: 1; cursor: pointer; box-shadow: 0 2px 6px rgba(59,130,246,.35); }
.bpm-plus:hover { background: #2563eb; }
.bpm-rule-link { font-size: 12.5px; color: #3b82f6; cursor: pointer; text-decoration: none; }
.bpm-rule-link:hover { text-decoration: underline; }

.bpm-rule-banner { background: #eff6ff; color: #1e40af; padding: 10px 14px; border-radius: 4px; margin-bottom: 12px; font-size: 13px; }
.bpm-rule-banner .arr { margin: 0 10px; color: #60a5fa; }
.bpm-steps { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 14px; flex-wrap: wrap; }
.bpm-steps a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; font-size: 12.5px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.bpm-steps a.on { color: #e07020; border-bottom-color: #e07020; font-weight: 600; }
.bpm-steps a i { width: 18px; height: 18px; border-radius: 50%; background: #eef2f7; color: var(--text-3); display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 11px; }
.bpm-steps a.on i { background: #ffe8d9; color: #c45f12; }
.bpm-gen-cards { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.bpm-gen-card { flex: 1; min-width: 200px; border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.bpm-gen-card:has(input:checked) { border-color: #e07020; background: #fff7f0; }
.bpm-radio { display: flex; align-items: flex-start; gap: 8px; padding: 6px 0; font-size: 12.5px; }
.bpm-map-tabs { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--line); }
.bpm-map-tabs a { padding: 8px 4px; font-size: 12.5px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.bpm-map-tabs a.on { color: #e07020; border-bottom-color: #e07020; font-weight: 600; }
.bpm-map-table select, .bpm-map-table input { width: 100%; height: 28px; border: 1px solid var(--line); border-radius: 2px; padding: 0 6px; font-size: 12.5px; box-sizing: border-box; }

/* 应用中心：橙色栏头（对齐好业财应用中心） */
.apps-center .tile-menu { border-color: #f3d9c4; }
.apps-center .tile-head {
  background: linear-gradient(180deg, #fff4ec, #ffe8d9);
  color: #e07020;
  border: 1px solid #f3d0b5;
}
.apps-center .tile-head .ti { color: #e07020; background: rgba(224, 112, 32, .1); }
.apps-center .tile-row:hover { background: #fff7f0; color: #c45f12; }
.apps-center .tile-row .tr-name { padding-left: 4px; }
.apps-center .page-title { color: #c45f12; }

.tile-row .tr-new {
  font-style: normal; font-size: 9px; line-height: 15px; padding: 0 4px; margin-left: 5px;
  color: #fff; background: #e0403a; border-radius: 3px; letter-spacing: .3px; vertical-align: 1px;
}

/* ---------------------------- 菜单配置页 ---------------------------- */
.mc-block { margin-bottom: 12px; }
.mc-head { display: flex; align-items: center; gap: 12px; font-weight: 400; }
.mc-head .mc-note { font-weight: 400; }
.mc-text {
  height: 26px; padding: 0 7px; border: 1px solid var(--line); border-radius: 2px;
  background: #fff; outline: none; width: 200px;
}
.mc-text:focus { border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(46,134,207,.10); }
.mc-text:disabled { background: #f7f9fb; color: var(--text-2); }
.mc-gname { width: 220px; font-weight: 600; }
.mc-code { color: #b0bcc9; font-size: 11px; margin-left: 8px; font-family: Consolas, Monaco, monospace; }
.mc-key { color: #2c3e50; }
.mc-note { color: var(--text-3); font-size: 12px; }
.mc-eye { display: flex; align-items: center; gap: 5px; color: var(--text-2); font-size: 12px; cursor: pointer; }
.mc-table td { white-space: nowrap; }
.mc-table tbody tr.mc-sub td { background: #f7fafd; }
.mc-collab { color: var(--text-3); font-size: 12px; margin-right: 6px; }
.mc-order button {
  width: 24px; height: 24px; margin: 0 1px; border: 1px solid var(--line); border-radius: 2px;
  background: #fff; color: #5c6b7a; cursor: pointer; line-height: 1;
}
.mc-order button:hover:not(:disabled) { border-color: var(--blue-500); color: var(--blue-700); }
.mc-order button:disabled { color: #c9d2dc; cursor: not-allowed; }

/* 右侧工作区 */
.workspace { flex: 1; display: flex; flex-direction: column; min-width: 0; background: #fff; }
.tabs {
  height: 34px; flex: none; display: flex; align-items: flex-end; gap: 2px; padding: 0 6px;
  background: var(--tint-2); border-bottom: 1px solid var(--line); overflow-x: auto; overflow-y: hidden;
}
.tab {
  height: 29px; display: inline-flex; align-items: center; gap: 8px; padding: 0 10px 0 12px;
  background: #e2e8ef; border: 1px solid var(--line); border-bottom: 0; border-radius: 3px 3px 0 0;
  color: #40566b; font-size: 12.5px; cursor: pointer; white-space: nowrap; position: relative; top: 1px;
}
.tab:hover { background: #e9eff6; }
.tab.active { background: #fff; color: var(--blue-700); font-weight: 600; border-color: var(--line); top: 1px; }
.tab .x { color: #9aa8b6; font-size: 13px; width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; border-radius: 2px; }
.tab .x:hover { background: #f0d5d5; color: var(--red); }
.content { flex: 1; overflow: auto; padding: 0; position: relative; background: #f4f7fb; }

/* ------------------------------- 通用组件 ------------------------------- */
.page { padding: 12px 14px 40px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.page-title { font-size: 15px; font-weight: 600; color: #1e2c3a; display: flex; align-items: center; gap: 8px; }
.page-title::before { content: ""; width: 3px; height: 14px; background: var(--blue-600); border-radius: 2px; }
.page-desc { color: var(--text-3); font-size: 12px; }
/* 页面内页签（如「部门员工」里的部门 / 职员） */
.page.no-head { padding-top: 0; }
.subtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 2px 0 10px; }
.subtab {
  height: 30px; padding: 0 16px; border: 0; background: none; cursor: pointer;
  font-size: 13px; color: var(--text-2); border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.subtab:hover { color: var(--blue-700); }
.subtab.active { color: var(--blue-700); font-weight: 600; border-bottom-color: var(--blue-600); }

.filterbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 10px 12px;
  background: #f8fafc; border: 1px solid var(--line-2); border-radius: var(--radius); margin-bottom: 10px;
}
.filterbar label { color: var(--text-2); font-size: 12px; }
.filterbar input, .filterbar select {
  height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 2px; background: #fff; outline: none;
}
.filterbar input:focus, .filterbar select:focus { border-color: var(--blue-500); }
.filterbar .combo input { height: 28px; border-radius: 2px; }
.filterbar .grow { flex: 1; }

/* 总账账簿（畅捷通式：三行汇总 + 右侧期间） */
.page-gledger .gledger-body {
  display: flex; align-items: stretch; gap: 0; min-height: 320px;
}
.page-gledger .gledger-main { flex: 1; min-width: 0; overflow: hidden; display: flex; flex-direction: column; }
.gl-period-rail {
  flex: 0 0 52px; border-left: 1px solid var(--line-2); background: #fafbfc;
  display: flex; flex-direction: column; align-items: center; padding: 8px 4px;
  user-select: none;
}
.gl-period-rail .gl-period-year {
  font-size: 13px; font-weight: 600; color: var(--blue-700); margin-bottom: 6px;
  display: flex; align-items: center; gap: 2px;
}
.gl-period-rail .gl-period-year button {
  border: none; background: transparent; color: var(--text-3); cursor: pointer; padding: 0 2px; font-size: 11px;
}
.gl-period-rail .gl-period-year button:hover { color: var(--blue-600); }
.gl-period-mon {
  width: 42px; height: 28px; margin: 2px 0; border: 1px solid transparent; border-radius: 14px;
  background: transparent; font-size: 11px; color: var(--text-2); cursor: pointer;
}
.gl-period-mon:hover { background: var(--tint); color: var(--blue-700); }
.gl-period-mon.active {
  background: var(--blue-600); color: #fff; border-color: var(--blue-600); font-weight: 600;
}
.page-gledger table.grid tbody tr.gl-row-alt td { background: #f7fafd; }
.page-gledger table.grid tbody tr.gl-row-sel td { background: var(--rows-sel); }
.gledger-toolbar .combo { min-width: 260px; }
.page-gledger .gledger-main > .grid-box { flex: 1; min-height: 0; height: auto; }
.page-gledger .gledger-main .grid-wrap { max-height: none !important; flex: 1; min-height: 0; }

.grid-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: auto; }
/* 权限查询矩阵：行=权限项，列=操作员 */
.pq-wrap { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: auto; }
table.pq-table { width: 100%; table-layout: fixed; font-size: var(--grid-fs); }
table.pq-table td { height: var(--grid-row-h); }
table.pq-table thead th { height: var(--grid-head-h); }
table.pq-table thead th { white-space: nowrap; }
table.pq-table .pq-key { position: sticky; left: 0; background: #fff; z-index: 1; }
table.pq-table thead th.pq-key { background: var(--thead); z-index: 3; }
table.pq-table tr.pq-group td {
  background: #f6f9fc; color: #4a5b6b; font-weight: 600; font-size: 12px; height: 26px;
}
table.pq-table td.center, table.pq-table th.center { text-align: center; width: 92px; }
table.pq-table tr:hover td { background: var(--rows-hover); }
table.pq-table tr.pq-group:hover td { background: #f6f9fc; }
.pq-yes { color: #1f9d55; font-weight: 700; }
.pq-no { color: #cbd5df; }
table.grid { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; font-size: var(--grid-fs); }
table.grid thead th {
  position: sticky; top: 0; z-index: 2; background: var(--thead); color: #34495e; font-weight: 600;
  height: var(--grid-head-h); padding: 0 8px; text-align: left; border-bottom: 1px solid var(--line);
  border-right: 1px solid #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
table.grid tbody td {
  height: var(--grid-row-h); padding: 0 8px; border-bottom: 1px solid var(--line-2); border-right: 1px solid #f2f5f8;
  white-space: nowrap; color: #2c3e50; overflow: hidden; text-overflow: ellipsis;
}
table.grid tbody tr:nth-child(even) td { background: #fbfcfe; }
table.grid tbody tr:hover td { background: var(--rows-hover); }
table.grid tbody tr.selected td { background: var(--rows-sel); }
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 tfoot td { height: calc(var(--grid-row-h) + 2px); background: #f4f8fc; font-weight: 600; border-top: 1px solid var(--line); }
.grid-empty { padding: 46px; text-align: center; color: var(--text-3); font-size: 13px; }
.grid-none-msg { padding: 40px; text-align: center; color: var(--text-3); font-size: 13px; }
.rownum { color: #a9b6c4; width: 38px; text-align: center !important; background: #f7f9fb !important; }

/* 表头筛选（列过滤） */
.grid-box { display: flex; flex-direction: column; min-width: 0; }
table.grid thead th .th-in { display: inline-flex; align-items: center; gap: 4px; max-width: calc(100% - 18px); overflow: hidden; }
table.grid thead th .th-drag {
  display: inline-flex; align-items: center; justify-content: center;
  width: 12px; margin-right: 2px; font-size: 10px; letter-spacing: -1px; line-height: 1;
  color: #b7c4d2; cursor: grab; flex: none; user-select: none;
}
table.grid thead th:hover .th-drag { color: var(--blue-600); }
table.grid thead th .th-filter {
  display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px;
  padding: 0; border: 0; border-radius: 2px; background: transparent; color: #a3b3c4; cursor: pointer; flex: none;
}
table.grid thead th .th-filter:hover { background: #dbe8f6; color: var(--blue-700); }
table.grid thead th .th-filter.on { background: var(--blue-600); color: #fff; }
table.grid thead th.filtered { background: #e0eefb; box-shadow: inset 0 -2px 0 var(--blue-500); }
table.grid thead th[data-col] { cursor: grab; }
/* 列宽拖动手柄：贴在列头右边线 */
table.grid thead th .th-resize {
  position: absolute; right: -3px; top: 0; width: 7px; height: 100%;
  cursor: col-resize; z-index: 3; background: transparent;
}
table.grid thead th .th-resize:hover,
table.grid thead th .th-resize.on { background: rgba(37, 99, 160, .28); }
table.grid thead th.th-dragging { opacity: .55; background: #e8f1fb !important; }
table.grid thead th.th-drag-over { box-shadow: inset 3px 0 0 var(--blue-600); background: #eef5fc !important; }
body.col-resizing { cursor: col-resize !important; user-select: none !important; }
body.col-resizing * { cursor: col-resize !important; user-select: none !important; }
body.col-reordering { cursor: grabbing !important; user-select: none !important; }
body.col-reordering * { cursor: grabbing !important; user-select: none !important; }
table.grid col.col-off { display: none; }
.grid-info { display: flex; align-items: center; gap: 10px; height: 26px; padding: 0 2px; font-size: 12px; color: var(--text-3); }
.grid-info .gi-filtered { color: var(--blue-700); }
.grid-info .gi-clear { color: var(--blue-600); cursor: pointer; }
.grid-info .gi-clear:hover { text-decoration: underline; }
.grid-info .gi-tip { margin-left: auto; color: #b3bfcc; }
.grid-info .gi-cfg { color: var(--blue-600); cursor: pointer; margin-left: 12px; }
.grid-info .gi-cfg:hover { text-decoration: underline; }
.col-off { display: none !important; }

.cfg-pop {
  position: fixed; z-index: 3000; width: 210px; background: #fff; border: 1px solid #cfd9e4; border-radius: 4px;
  box-shadow: 0 10px 30px rgba(15, 35, 60, .18); font-size: 12px; display: flex; flex-direction: column;
}
.cfg-pop.cfg-pop-w { width: 280px; }
.cfg-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 7px 10px; border-bottom: 1px solid var(--line-2); background: #f7fafd; font-weight: 600; color: #2c3e50;
}
.cfg-head span { font-weight: 400; font-size: 11px; color: var(--text-3); }
.cfg-list { padding: 5px 0; max-height: 300px; overflow: auto; }
.cfg-item { display: flex; align-items: center; gap: 6px; padding: 3px 10px; color: #33475b; }
.cfg-item:hover { background: #f0f6fc; }
.cfg-item.cfg-dragging { opacity: .45; }
.cfg-item.cfg-drag-over { box-shadow: inset 0 2px 0 var(--blue-600); background: #eef5fc; }
.cfg-item .cfg-drag {
  cursor: grab; color: #b7c4d2; font-size: 11px; letter-spacing: -1px; user-select: none; flex: none; width: 14px; text-align: center;
}
.cfg-item .cfg-drag:active { cursor: grabbing; }
.cfg-item .cfg-check { display: flex; align-items: center; gap: 6px; flex: 1; min-width: 0; cursor: pointer; }
.cfg-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-item .cfg-w {
  width: 58px; height: 24px; padding: 0 4px; border: 1px solid var(--line); border-radius: 2px;
  font-size: 12px; color: var(--text-1); background: #fff; flex: none; text-align: right;
}
.cfg-item .cfg-w:focus { outline: none; border-color: var(--blue-500); }
.cfg-foot { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-top: 1px solid var(--line-2); background: #fafcfe; }
.cfg-foot .cfg-all { display: flex; align-items: center; gap: 4px; cursor: pointer; color: var(--text-2); }
.cfg-foot .cfg-reset { color: var(--blue-600); cursor: pointer; }
.cfg-foot .cfg-reset:hover { text-decoration: underline; }
.cfg-foot .grow { flex: 1; }
.cfg-foot .btn { height: 26px; padding: 0 10px; }

.flt-pop {
  position: fixed; z-index: 3000; width: 252px; background: #fff; border: 1px solid #cfd9e4; border-radius: 4px;
  box-shadow: 0 10px 30px rgba(15, 35, 60, .18); font-size: 12px; display: flex; flex-direction: column;
}
.flt-head { padding: 7px 10px; border-bottom: 1px solid var(--line-2); background: #f7fafd; font-weight: 600; color: #2c3e50; }
.flt-body { padding: 9px 10px; display: flex; flex-direction: column; gap: 8px; }
.flt-body input[type="text"], .flt-body input[type="number"], .flt-body input[type="date"], .flt-body input:not([type]) {
  height: 26px; padding: 0 6px; border: 1px solid var(--line); border-radius: 2px; outline: none; width: 100%;
}
.flt-body input:focus { border-color: var(--blue-500); }
.flt-range { display: flex; align-items: center; gap: 6px; }
.flt-range span { color: var(--text-3); }
.flt-vhead { display: flex; align-items: center; justify-content: space-between; color: var(--text-2); margin-bottom: 4px; }
.flt-vhead label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.flt-vhead span { color: var(--text-3); }
.flt-list { max-height: 158px; overflow: auto; border: 1px solid var(--line-2); border-radius: 2px; padding: 2px 0; }
.flt-item { display: flex; align-items: center; gap: 6px; padding: 3px 8px; cursor: pointer; }
.flt-item:hover { background: #f0f6fc; }
.flt-item span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flt-foot { display: flex; align-items: center; gap: 6px; padding: 7px 10px; border-top: 1px solid var(--line-2); background: #fafcfe; }
.flt-foot .grow { flex: 1; }
.flt-foot .btn { height: 26px; padding: 0 10px; }

.tag { display: inline-block; padding: 1px 7px; border-radius: 10px; font-size: 11px; line-height: 17px; }
.tag.pending { background: #fdf1e2; color: #c4761c; border: 1px solid #f6ddbd; }
.tag.audited { background: #e8f7ef; color: #178355; border: 1px solid #c5e9d7; }
.tag.closed { background: #eef1f4; color: #707f8d; border: 1px solid #dde3e9; }
.tag.in { background: var(--blue-050); color: var(--blue-700); border: 1px solid var(--blue-100); }

.pager { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 8px 4px 0; color: var(--text-2); font-size: 12px; }
.pager button { height: 26px; min-width: 26px; border: 1px solid var(--line); background: #fff; border-radius: 2px; cursor: pointer; }
.pager button:hover:not(:disabled) { border-color: var(--blue-500); color: var(--blue-700); }
.pager button.on { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.pager button:disabled { color: #c2cbd4; cursor: default; }

/* 表单 / 单据卡片 */
.form-card {
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
  box-shadow: 0 1px 4px rgba(16, 42, 74, .06);
}
.form-card.is-audited { border-color: #c5e9d7; }
.form-card.is-audited .form-head { background: linear-gradient(180deg, #f4fbf7 0%, #eef8f2 100%); }
.form-card.is-draft .form-head { background: linear-gradient(180deg, #fffdf9 0%, #f7fafd 100%); }
.form-head {
  display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 10px 16px;
  padding: 10px 14px; background: #f7fafd; border-bottom: 1px solid var(--line-2);
}
.doc-head-main { flex: 1 1 260px; min-width: 0; }
.doc-code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.doc-code { font-size: 15px; font-weight: 600; color: var(--blue-700); letter-spacing: .3px; font-variant-numeric: tabular-nums; }
.doc-type-label { font-size: 12px; color: var(--text-3); font-weight: 400; padding: 1px 8px; border-radius: 10px; background: rgba(255,255,255,.65); border: 1px solid var(--line-2); }
.doc-meta { color: var(--text-3); font-size: 12px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px 14px; line-height: 1.5; }
/* 单据头右侧：状态徽标 + 制单/审核信息 */
.doc-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: 1 1 200px; max-width: 100%; min-width: 0; }
.doc-flags { display: flex; align-items: center; justify-content: flex-end; gap: 5px; flex-wrap: wrap; max-width: 100%; }
.doc-flag {
  display: inline-flex; align-items: center; gap: 4px; height: 19px; padding: 0 8px;
  border-radius: 10px; font-size: 11px; line-height: 1; white-space: nowrap;
  border: 1px solid; font-variant-numeric: tabular-nums;
}
.doc-flag i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .8; }
.doc-flag.ok { background: #eaf7f0; border-color: #bfe6d3; color: #178355; }
.doc-flag.warn { background: #fdf2e2; border-color: #f3d9b4; color: #b9761a; }
.doc-flag.info { background: var(--blue-050); border-color: var(--blue-100); color: var(--blue-700); }
.doc-flag.muted { background: #f2f4f7; border-color: #e0e5eb; color: #8394a5; }
/* 表单内的小工具按钮（表头设置 / 明细列设置） */
.icon-btn {
  display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px;
  border: 1px solid var(--line); border-radius: 11px; background: #fff;
  color: var(--text-2); font-size: 11.5px; line-height: 1; cursor: pointer;
}
.icon-btn:hover { border-color: var(--blue-500); color: var(--blue-700); background: var(--blue-050); }
.icon-btn svg { width: 12px; height: 12px; }
.head-bar {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px;
  padding: 6px 10px; background: #f8fafc; border: 1px solid var(--line-2); border-radius: 3px;
}
.head-bar > b { font-size: 12.5px; color: #34495e; font-weight: 600; letter-spacing: .3px; }
.sub-title .sub-tools { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
/* 字段设置对话框的页签 */
.fd-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin: 4px 0 8px; }
.fd-tabs a {
  padding: 6px 16px; font-size: 12.5px; color: var(--text-2); cursor: pointer;
  border: 1px solid transparent; border-bottom: 0; border-radius: 3px 3px 0 0; margin-bottom: -1px;
}
.fd-tabs a:hover { color: var(--blue-700); }
.fd-tabs a.on { background: #fff; border-color: var(--line); color: var(--blue-700); font-weight: 600; }
.form-body { padding: 14px 16px 6px; }
/* 表头布局：flex 换行 —— 每个字段的宽度与先后顺序可在「单据字段设置」里调整。
   未设置宽度时按 span 语义（span2 = 半行、span4 = 整行），其余字段在行内均分。 */
.form-row, .form-grid { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-bottom: 10px; }
.form-item { display: flex; flex-direction: column; gap: 5px; flex: 1 1 220px; min-width: 0; }
.form-item.span2 { flex: 1 1 calc(50% - 9px); }
.form-item.span4 { flex: 1 1 100%; }
.form-item label { font-size: 12px; color: var(--text-2); }
.form-item label i { color: var(--red); font-style: normal; margin-left: 2px; }
.form-item input, .form-item select, .form-item textarea {
  height: 30px; padding: 0 8px; border: 1px solid var(--line); border-radius: 2px; background: #fff; outline: none; width: 100%;
}
.form-item textarea { height: 56px; padding: 6px 8px; resize: vertical; }
/* 复选框 / 单选框跟着文字走，不能被上面那条的 width:100% / height:30px 撑开 */
.form-item input[type="checkbox"], .form-item input[type="radio"] { width: auto; height: auto; padding: 0; margin: 0; }
.form-item input:focus, .form-item select:focus, .form-item textarea:focus { border-color: var(--blue-500); box-shadow: 0 0 0 2px rgba(46,134,207,.1); }
.form-item input[readonly] { background: #f6f8fa; color: var(--text-2); }
/* 档案编辑表单内的分组小标题（type:'section'） */
.form-section-title { flex: 1 1 100%; width: 100%; margin: 12px 0 2px; padding: 6px 10px; font-size: 12.5px; font-weight: 600; color: var(--text-1); background: var(--bg-2, #f3f5f8); border-left: 3px solid var(--blue-500, #2e86cf); border-radius: 3px; }

/* 建账「科目预览」面板：制度切换即拉取预置科目，支持搜索 / 只看末级 */
.std-prev { border: 1px solid var(--line); border-radius: 3px; background: #fff; overflow: hidden; }
.std-prev-bar {
  display: flex; align-items: center; gap: 10px; padding: 6px 8px;
  background: var(--thead); border-bottom: 1px solid var(--line);
}
.std-prev-bar input[type="text"], .std-prev-bar input:not([type]) {
  height: 26px; width: 240px; flex: none; padding: 0 8px; font-size: 12px;
  border: 1px solid var(--line); border-radius: 2px; background: #fff; outline: none;
}
.std-prev-bar input:focus { border-color: var(--blue-500); box-shadow: 0 0 0 2px rgba(46,134,207,.1); }
.std-prev-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); white-space: nowrap; cursor: pointer; }
.std-prev-chk input { width: auto; height: auto; margin: 0; }
.std-prev-body { max-height: 260px; overflow: auto; }
.std-prev-tb { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12px; }
.std-prev-tb thead th {
  position: sticky; top: 0; z-index: 1; height: 24px; padding: 0 8px; text-align: left;
  background: #f7f9fb; border-bottom: 1px solid var(--line-2); font-weight: 600; color: #4a5b6c; white-space: nowrap;
}
.std-prev-tb tbody td { height: 24px; padding: 0 8px; border-bottom: 1px solid #f0f4f8; color: #33475b; white-space: nowrap; }
.std-prev-tb tbody tr:hover td { background: var(--rows-hover, #f4f9ff); }
.std-prev-tb td.mono { font-family: Consolas, "Courier New", monospace; color: #3a6b8f; }
.std-prev-tb td.c { text-align: center; color: var(--text-2); }
.std-prev-tb tr.is-parent td { color: #2b3d4f; font-weight: 600; background: #fbfcfe; }
.std-prev-name { display: inline-block; }
.std-prev-tag {
  display: inline-block; margin-left: 6px; padding: 0 4px; height: 15px; line-height: 15px;
  font-size: 10.5px; font-style: normal; border-radius: 2px; border: 1px solid #dbe3ec;
  background: #f4f6f9; color: #7b8a9a; vertical-align: 1px;
}
.std-prev-tag.cash { border-color: #f2d6a8; background: #fdf6e8; color: #a9772a; }
.std-prev-tag.bank { border-color: #bcd9ef; background: #eef7fe; color: #2b7bb0; }
.std-prev-kind {
  display: inline-block; margin-left: 6px; padding: 0 5px; font-size: 11px; font-style: normal;
  border-radius: 8px; background: #eef3f8; color: #4a6b87;
}
.std-prev-tip { padding: 18px 10px; text-align: center; color: var(--text-3); font-size: 12px; }

.sub-title { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin: 10px 0 8px; }
.sub-title h4 { margin: 0; font-size: 13px; font-weight: 600; color: #2b3d4f; flex: none; }
.sub-title .hint { font-size: 11.5px; color: var(--text-3); line-height: 1.55; flex: 1 1 220px; min-width: 0; max-width: 100%; white-space: normal; }

/* 单据明细表：限高滚动，表头与行号列固定 */
.form-card .grid-wrap.entry-wrap {
  max-height: min(52vh, 440px); overflow: auto; border-color: var(--line-2);
}
.form-card .entry-wrap table.entry thead th { position: sticky; top: 0; z-index: 2; }
.form-card .entry-wrap table.entry thead th:first-child,
.form-card .entry-wrap table.entry tbody td:first-child {
  position: sticky; left: 0; z-index: 1; background: #fff; box-shadow: 1px 0 0 var(--line-2);
}
.form-card .entry-wrap table.entry thead th:first-child { z-index: 3; background: var(--thead); }
.form-card .entry-wrap table.entry tbody tr:hover td:first-child { background: var(--rows-hover); }
.entry-total { flex-wrap: wrap; gap: 8px 22px; row-gap: 6px; }

table.entry.resizable { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; table-layout: fixed; }
.entry.resizable thead th .entry-resize { position: absolute; right: 0; top: 0; width: 6px; height: 100%; cursor: col-resize; z-index: 4; }
.entry.resizable thead th .entry-resize:hover, .entry.resizable thead th .entry-resize.on { background: rgba(64,132,200,.20); }
body.col-resizing { cursor: col-resize !important; user-select: none; }
table.entry th { background: var(--thead); height: 28px; padding: 0 6px; border-bottom: 1px solid var(--line); border-right: 1px solid #e3e9f0; font-weight: 600; color: #34495e; white-space: nowrap; }
table.entry td { height: 30px; padding: 0 4px; border-bottom: 1px solid var(--line-2); border-right: 1px solid #f2f5f8; }
table.entry td input, table.entry td select {
  width: 100%; height: 26px; border: 1px solid transparent; background: transparent; padding: 0 5px; outline: none; border-radius: 2px;
}
table.entry td input:hover, table.entry td select:hover { border-color: #dbe3ec; background: #fff; }
table.entry td input:focus, table.entry td select:focus { border-color: var(--blue-500); background: #fff; }
table.entry td.num input { text-align: right; }
table.entry td.calc { text-align: right; padding-right: 8px; color: #33475b; font-variant-numeric: tabular-nums; }
table.entry tfoot td { background: #f6f9fc; font-weight: 600; height: 32px; }
.entry-total { display: flex; justify-content: flex-end; gap: 26px; padding: 10px 12px; background: #f7fafd; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 3px 3px; font-size: 12.5px; }
.entry-total b { font-size: 15px; color: var(--blue-700); font-variant-numeric: tabular-nums; }
.del-line { color: #b9c4cf; cursor: pointer; font-size: 14px; }
.del-line:hover { color: var(--red); }

/* 首页 */
.dash { padding: 14px; }
.dash-hero {
  background: linear-gradient(120deg, var(--blue-700), var(--blue-500)); color: #fff; border-radius: 6px;
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px;
}
.dash-hero h3 { margin: 0 0 4px; font-size: 17px; font-weight: 600; }
.dash-hero p { margin: 0; font-size: 12px; opacity: .82; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: 5px; padding: 13px 15px;
  position: relative; overflow: hidden;
}
.card .k { color: var(--text-2); font-size: 12px; }
.card .v { font-size: 24px; font-weight: 600; margin-top: 6px; color: #1c2b38; font-variant-numeric: tabular-nums; }
.card .v small { font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: 4px; }
.card .bar { position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--blue-600); }
.card.o .bar { background: var(--orange); }
.card.g .bar { background: var(--green); }
.card.r .bar { background: #b47ad4; }
.panels { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.panel-head { height: 36px; display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--line-2); font-weight: 600; color: #2b3d4f; font-size: 13px; }
.panel-body { padding: 12px; }
.legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--text-2); font-weight: 400; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.dash-hero-side { text-align: right; flex: none; }
.dash-hero-stat-k { font-size: 12px; opacity: .82; }
.dash-hero-stat-v { font-size: 26px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.dash-hero-stat-v small { font-size: 13px; font-weight: 400; }
.dash-trend { display: flex; gap: 10px; align-items: flex-end; min-height: 150px; }
.dash-trend-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.dash-trend-bars { display: flex; align-items: flex-end; gap: 4px; height: 130px; }
.dash-bar { width: 14px; border-radius: 2px 2px 0 0; min-height: 2px; transition: height .2s ease; }
.dash-bar.sale { background: linear-gradient(180deg, var(--blue-500), var(--blue-600)); }
.dash-bar.purchase { background: linear-gradient(180deg, #f0a95c, #e8892b); }
.dash-trend-date { font-size: 11px; color: #8b98a6; }
.dash-top-table { width: 100%; font-size: 12.5px; border-collapse: collapse; }
.dash-top-table th { text-align: left; padding: 6px; font-weight: 500; color: #5c6b7a; border-bottom: 1px solid var(--line-2); }
.dash-top-table th.num, .dash-top-table td.num { text-align: right; }
.dash-top-table td { padding: 7px 6px; border-bottom: 1px solid #eef2f6; }
.dash-todo-body { display: flex; gap: 12px 18px; flex-wrap: wrap; padding: 10px 14px; }
.dash-todo-item {
  display: inline-flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 10px; border-radius: 4px;
  border: 1px solid transparent; transition: background .12s, border-color .12s;
}
a.dash-todo-item { color: inherit; text-decoration: none; }
a.dash-todo-item:hover { background: var(--tint); border-color: var(--blue-100); color: var(--blue-700); }
.dash-todo-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.dash-todo-dot.alert { background: #d6493f; }
.dash-todo-dot.warn { background: #e8892b; }
.dash-todo-dot.ok { background: #2f9e5e; }
@media (max-width: 1280px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .panels { grid-template-columns: 1fr; }
  .dash-hero { flex-direction: column; align-items: flex-start; gap: 10px; }
  .dash-hero-side { text-align: left; width: 100%; }
  .topbar .logo .title small { display: none; }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .card .v { font-size: 21px; }
  .dash { padding: 10px; }
}

/* 弹窗 */
.mask { position: fixed; inset: 0; background: rgba(16, 32, 51, .38); display: flex; align-items: center; justify-content: center; z-index: 100; }
.dialog { background: #fff; border-radius: 5px; box-shadow: 0 12px 40px rgba(10,30,50,.28); width: 560px; max-width: 94vw; max-height: 88vh; display: flex; flex-direction: column; overflow: hidden; }
.dialog-head { height: 42px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; background: #f4f8fc; border-bottom: 1px solid var(--line); font-weight: 600; }
.dialog-head .x { cursor: pointer; color: #93a1af; font-size: 16px; }
.dialog-head .x:hover { color: var(--red); }
.dialog-body { padding: 14px 16px; overflow: auto; }
.dialog-foot { flex: none; padding: 10px 14px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; background: #fbfcfe; }
.dialog .form-row { grid-template-columns: repeat(2, 1fr); }
.dialog .form-item.span2 { grid-column: span 2; }

.btn { height: 30px; padding: 0 16px; border-radius: 2px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: #33475b; }
.btn:hover { border-color: var(--blue-500); color: var(--blue-700); }
.btn.primary { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.btn.primary:hover { background: var(--blue-700); }
.btn.danger { color: var(--red); border-color: #eccaca; }
.btn.danger:hover { background: #fdf3f3; }

.toast {
  position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 300;
  background: rgba(28, 42, 56, .93); color: #fff; padding: 9px 18px; border-radius: 3px; font-size: 13px;
  box-shadow: 0 6px 22px rgba(10, 25, 40, .28); animation: tin .18s ease-out;
}
.toast.err { background: rgba(190, 55, 55, .95); }
.toast.ok { background: rgba(22, 130, 88, .95); }
@keyframes tin { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; transform: translate(-50%, 0); } }

.loading { padding: 60px; text-align: center; color: var(--text-3); }
.muted { color: var(--text-3); }
.mono { font-variant-numeric: tabular-nums; }

/* ------------------- 档案分类面板 ------------------- */
.link { color: var(--blue-500); cursor: pointer; font-size: 12px; }
.link:hover { text-decoration: underline; }
.link.danger { color: #d6493f; }
.with-cats .meta-body { display: flex; gap: 12px; align-items: stretch; }
.cat-side {
  width: 176px; flex: none; background: #fff; border: 1px solid var(--line);
  border-radius: 6px; align-self: flex-start; overflow: hidden;
}
.cat-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 12px; border-bottom: 1px solid var(--line); background: #f7f9fb;
}
.cat-head b { font-size: 12.5px; color: var(--text-1); }
.cat-list { padding: 6px 0; max-height: 560px; overflow: auto; }
.cat-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 14px; font-size: 13px; color: var(--text-1); cursor: pointer;
}
.cat-item:hover { background: #f2f6fa; }
.cat-item.active { background: #e8f1fb; color: var(--blue-600); font-weight: 600; }
.cat-item i { font-style: normal; color: var(--text-3); font-size: 12px; }
.cat-item.active i { color: var(--blue-600); }
.meta-main { flex: 1; min-width: 0; }
.cat-mgr-add { display: flex; gap: 8px; align-items: center; }
.cat-mgr-add input {
  height: 30px; border: 1px solid var(--line); border-radius: 4px;
  padding: 0 8px; font-size: 13px;
}
.cat-mgr-add input:focus { border-color: var(--blue-500); outline: none; }

/* ------------------- 档案参照（模糊搜索） ------------------- */
.combo { position: relative; }
.combo input {
  width: 100%; height: 30px; border: 1px solid var(--line); border-radius: 4px;
  padding: 0 8px; font-size: 13px; background: #fff; box-sizing: border-box;
}
.combo input:focus { border-color: var(--blue-500); outline: none; box-shadow: 0 0 0 2px rgba(30,110,215,.12); }
.combo input:disabled { background: #f5f6f7; color: var(--text-3); }
.combo-list {
  display: none; position: absolute; top: 32px; left: 0; z-index: 60;
  min-width: 100%; width: max-content; max-width: 420px; max-height: 300px; overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 8px 24px rgba(16,36,64,.16);
}
.combo-item {
  display: flex; align-items: center; gap: 8px; padding: 6px 10px;
  font-size: 13px; cursor: pointer; white-space: nowrap;
}
.combo-item:hover, .combo-item.act { background: #e8f1fb; }
.ci-code { color: var(--text-3); font-variant-numeric: tabular-nums; min-width: 52px; }
.ci-name { color: var(--text-1); }
.ci-extra { color: var(--text-3); font-size: 12px; margin-left: 4px; }
.combo-foot {
  padding: 5px 10px; font-size: 12px; color: var(--text-3);
  border-top: 1px solid var(--line); background: #fafbfc; position: sticky; bottom: 0;
}

/* ------------------- 执行情况（选单生单 / 订单执行表） ------------------- */
.src-badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  background: #eef5fd; color: var(--blue-600); font-size: 11.5px; border: 1px solid #d5e6f8;
}
.line-hint { margin-top: 3px; font-size: 11px; color: var(--text-3); white-space: nowrap; }
.rate { display: inline-block; width: 62px; height: 6px; border-radius: 3px; background: #edf1f5; overflow: hidden; vertical-align: middle; }
.rate span { display: block; height: 100%; border-radius: 3px; }
.rate + em { font-style: normal; font-size: 11.5px; color: var(--text-2); margin-left: 6px; }

/* ------------------- 加工单工序进度（执行表） ------------------- */
.mo-proc-cell { min-width: 280px; padding: 10px 12px !important; vertical-align: middle; }
.mo-proc-track {
  position: relative; display: flex; align-items: flex-start; gap: 0;
  padding: 2px 4px 0; min-height: 52px;
}
.mo-proc-track::before {
  content: ''; position: absolute; left: 28px; right: 28px; top: 14px;
  height: 2px; background: #e5ebf2; z-index: 0; border-radius: 1px;
}
.mo-proc-step {
  position: relative; z-index: 1; flex: 1 1 0; min-width: 72px; max-width: 120px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.mo-proc-pct {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; height: 24px; padding: 0 10px;
  border-radius: 12px; font-size: 12px; font-weight: 600;
  font-variant-numeric: tabular-nums; color: #fff; box-shadow: 0 1px 2px rgba(15, 40, 80, .08);
}
.mo-proc-step.done .mo-proc-pct { background: #52c41a; }
.mo-proc-step.doing .mo-proc-pct { background: #1890ff; }
.mo-proc-step.pending .mo-proc-pct { background: #bfc7d4; color: #fff; }
.mo-proc-name {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-2); line-height: 1.2; white-space: nowrap;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.mo-proc-name i {
  flex: 0 0 auto; width: 16px; height: 16px; border-radius: 50%;
  background: #eef3f9; color: var(--text-2); font-style: normal;
  font-size: 10px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
}
.mo-proc-step.done .mo-proc-name i { background: #e8f8df; color: #389e0d; }
.mo-proc-step.doing .mo-proc-name i { background: #e6f4ff; color: #1677ff; }
.mo-proc-table .grid td { vertical-align: middle; }
.mo-proc-exec-page .qpanel { margin-bottom: 12px; }

/* ------------------- 加工单联查（材料领用 / 入库 / 工序汇报） ------------------- */
.mo-rel-head { margin-bottom: 8px; }
.mo-rel-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); }
.mo-rel-tabs .subtab { border: 0; background: transparent; padding: 8px 14px; cursor: pointer; color: var(--text-2); border-bottom: 2px solid transparent; font-size: 13px; }
.mo-rel-tabs .subtab:hover { color: var(--blue-700); }
.mo-rel-tabs .subtab.active { color: var(--blue-700); font-weight: 600; border-bottom-color: var(--blue-600); }
.mo-rel-kpi {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px;
  margin-bottom: 4px;
}
.mo-rel-kpi > div {
  background: #f7fafc; border: 1px solid var(--line); border-radius: 6px;
  padding: 10px 12px;
}
.mo-rel-kpi span { display: block; font-size: 12px; color: var(--text-2); }
.mo-rel-kpi b { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; margin-top: 4px; font-weight: 600; }

/* ------------------- 单据号穿透 ------------------- */
.doc-link {
  color: var(--blue-600, #1c62ad); text-decoration: none; cursor: pointer;
  border-bottom: 1px dashed rgba(28,98,173,.45); padding-bottom: 1px;
  font-variant-numeric: tabular-nums;
}
.doc-link:hover { color: #0d4c8f; border-bottom-style: solid; background: #eef5fd; }
.doc-link::after { content: '↗'; font-size: 10px; margin-left: 2px; opacity: .65; }

/* ------------------- 库存台账 ------------------- */
.open-row td { background: #f5f9fd; }
.open-row td b { color: var(--text-1); }
.grid thead th[colspan] { text-align: center; background: #f3f7fb; }

/* ------------------- 库龄分布 ------------------- */
.age-bar-wrap { margin: 0 0 10px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.age-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #eef2f6; }
.age-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 9px; font-size: 12px; color: var(--text-2); }
.age-legend span { display: flex; align-items: center; gap: 6px; }
.age-legend i { width: 9px; height: 9px; border-radius: 2px; display: inline-block; }
.age-legend b { color: var(--text-1); font-variant-numeric: tabular-nums; }
a.src-badge { cursor: pointer; }
a.src-badge:hover { background: #e2effc; border-color: #b7d5f2; }
.ref-line { margin-top: 6px; font-size: 12px; color: var(--text-2); line-height: 1.55; word-break: break-word; }
.ref-line .doc-link { font-size: 12px; }

@media (max-width: 900px) {
  .doc-head-right { align-items: flex-start; }
  .doc-flags, .doc-meta { justify-content: flex-start; }
  .sub-title { flex-direction: column; align-items: stretch; }
  .sub-title .sub-tools { justify-content: flex-start; }
}

/* ------------------- 单据字段设置（显示名称 / 自定义项） ------------------- */
.btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }
.chk-inline { display: flex; align-items: center; gap: 6px; height: 30px; font-size: 13px; color: var(--text-1); }
.fd-top { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.fd-top label { font-size: 12px; color: var(--text-2); }
.fd-top select { height: 28px; border: 1px solid var(--line); border-radius: 2px; padding: 0 6px; font-size: 12.5px; }
.fd-top .hint { font-size: 11.5px; color: var(--text-3); }
.fd-wrap { display: flex; flex-direction: column; gap: 16px; }
.fd-sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.fd-sec-head b { font-size: 13px; color: var(--text-1); }
.fd-sec-head .hint { font-size: 11.5px; color: var(--text-3); flex: 1; }
table.fd-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.fd-table th { background: #f1f6fb; height: 28px; font-weight: 600; color: #34495e; border: 1px solid var(--line); white-space: nowrap; }
table.fd-table td { height: 32px; padding: 0 6px; border: 1px solid var(--line-2); }
table.fd-table input[type="text"], table.fd-table input[type="number"], table.fd-table select {
  width: 100%; height: 24px; border: 1px solid #dbe3ec; border-radius: 2px; padding: 0 6px; font-size: 12.5px; background: #fff;
}
table.fd-table input[type="text"]:focus, table.fd-table input[type="number"]:focus, table.fd-table select:focus { border-color: var(--blue-500); }
table.fd-table input[disabled], table.fd-table select[disabled] { background: #f6f8fa; color: #9aa8b6; }
.fd-tag { display: inline-block; margin-left: 6px; padding: 0 5px; height: 16px; line-height: 16px; font-size: 10.5px; border-radius: 2px; background: var(--thead); color: #7d8fa1; }
.fd-tag.custom { background: #e8f4ea; color: #3d8a52; }
.fd-mv, .fd-del { color: var(--blue-600, #1f6fb2); cursor: pointer; margin: 0 3px; font-size: 12px; user-select: none; }
.fd-del { color: var(--red, #d6493f); }
.fd-w { text-align: right; }
.nowrap { white-space: nowrap; }

/* ------------------- 操作员 / 功能权限 / 产品订阅 ------------------- */
.topbar .who .who-tag {
  margin-left: 6px; padding: 0 5px; height: 16px; line-height: 16px; font-size: 10.5px;
  border-radius: 2px; background: rgba(255, 255, 255, .18); color: #eaf4ff;
}
.op-head { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.op-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; color: var(--text-2); }
.op-meta b { color: var(--text-1); }
.op-meta b.over { color: #c0392b; }
.op-table { border: 1px solid var(--line-2); }
.op-table th, .op-table td { height: 36px; }
.op-table .btn.sm { margin-right: 4px; }
/* 操作员行有 6 个操作按钮：表格是 fixed 布局且 td 默认 nowrap+overflow:hidden，
   这里单独放开操作列，让按钮在单元格内自动换行，避免「禁用 / 删除 / 取消授权」被裁掉 */
.op-table td.op-actions {
  white-space: normal; overflow: visible; text-overflow: clip;
  height: auto; padding-top: 5px; padding-bottom: 5px; vertical-align: middle;
}
.op-table td.op-actions .btn.sm { margin: 0 4px 3px 0; }
.op-perms { font-size: 12px; color: var(--text-2); }
.acc-chip {
  display: inline-block; margin: 0 4px 2px 0; padding: 0 6px; height: 20px; line-height: 20px;
  font-size: 11.5px; border-radius: 2px; background: var(--tint); color: var(--blue-800); border: 1px solid #dbe8f5;
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
}
.acc-chip b { font-family: Consolas, monospace; font-weight: 600; }
.acc-chip.off { background: #f4f5f7; color: #98a2ad; border-color: #e6e9ee; }
/* 权限树 */
.perm-top { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.perm-top label { font-size: 12px; color: var(--text-2); }
.perm-top select { height: 28px; border: 1px solid var(--line); border-radius: 2px; padding: 0 6px; font-size: 12.5px; max-width: 320px; }
.perm-link { color: #1f6fb2; font-size: 12px; cursor: pointer; user-select: none; }
.perm-link:hover { text-decoration: underline; }
.perm-count { margin-left: auto; font-size: 12px; color: var(--text-3); }
.perm-wrap { max-height: 56vh; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px; padding-right: 4px; }
.perm-group { border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; break-inside: avoid; }
.perm-ghead {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  background: #f2f7fc; padding: 6px 9px; font-size: 12.5px; font-weight: 600; color: #34495e;
}
.perm-ghead label { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.perm-ghead .muted { font-weight: 400; font-size: 11px; }
.perm-items { display: grid; grid-template-columns: 1fr 1fr; gap: 0; padding: 5px 9px 8px; }
.perm-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-1); height: 24px; cursor: pointer; }
.perm-item input, .perm-ghead input { accent-color: #2376bd; cursor: pointer; }
.perm-section { margin: 10px 0 6px; }
.perm-section-title { font-size: 12.5px; font-weight: 600; color: var(--text-1); margin: 0 0 8px; padding-left: 2px; border-left: 3px solid #2376bd; line-height: 1.2; }
.perm-doc-wrap { border: 1px solid var(--line-2); border-radius: 3px; padding: 8px 10px 10px; margin-bottom: 10px; max-height: 42vh; overflow: auto; background: #fafbfc; }
.perm-doc-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.perm-doc-top input { height: 28px; border: 1px solid var(--line); border-radius: 2px; padding: 0 8px; font-size: 12.5px; flex: 1; min-width: 140px; max-width: 240px; }
.perm-doc-top .muted { font-size: 11.5px; line-height: 1.45; flex: 1; min-width: 200px; }
.perm-doc-layout { display: flex; gap: 10px; min-height: 200px; }
.perm-doc-nav { width: 118px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px; }
.perm-doc-nav-btn {
  text-align: left; border: 1px solid var(--line-2); background: #fff; border-radius: 2px;
  padding: 6px 8px; font-size: 12px; cursor: pointer; color: var(--text-1);
}
.perm-doc-nav-btn.on { background: #e8f2fb; border-color: #9ec5e8; color: #1f6fb2; font-weight: 600; }
.perm-doc-body { flex: 1; min-width: 0; overflow: auto; }
.perm-doc-table { font-size: 12px; }
.perm-doc-table th, .perm-doc-table td { padding: 4px 6px; vertical-align: middle; }
.perm-doc-table thead th { background: #eef4fa; font-weight: 600; white-space: nowrap; }
.perm-doc-table tbody tr:nth-child(even) { background: #f7fbff; }
.perm-doc-name label { display: flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.perm-doc-cell { text-align: center; }
.perm-doc-cell label { display: inline-flex; justify-content: center; cursor: pointer; }
.perm-doc-act label { display: flex; align-items: center; justify-content: center; gap: 3px; font-weight: 600; cursor: pointer; white-space: nowrap; }
/* 订阅卡片 */
.lic-card { max-width: 620px; border: 1px solid var(--line-2); border-radius: 3px; background: #fff; }
.lic-row { display: flex; justify-content: space-between; gap: 16px; padding: 10px 16px; border-bottom: 1px solid #eef2f6; font-size: 13px; }
.lic-row:last-child { border-bottom: 0; }
.lic-row > span { color: var(--text-2); }
.lic-row > b { color: var(--text-1); font-weight: 600; }
.lic-row > b.warn { color: #b0741a; }
.lic-row > b.over { color: #c0392b; }
.lic-alert { padding: 7px 10px; font-size: 12.5px; border-radius: 2px; margin-bottom: 6px; }
.lic-alert.warn { background: #fdf6e8; color: #a86a12; border: 1px solid #f5e2c0; }
.lic-alert.over { background: #fdecea; color: #b3352a; border: 1px solid #f5cdc8; }

/* ===================== 主题换肤面板（右上角） ===================== */
/* 右上角入口按钮 */
.topbar .tb-ico { display: inline-flex; align-items: center; gap: 5px; }
.topbar .tb-ico svg { display: block; }
.topbar .tb-btn.on { background: rgba(255,255,255,.22); color: #fff; }

/* 表格布局开关（html 上的全局类） */
html.g-no-rownum table.grid .rownum { display: none; }
html.g-no-stripe table.grid tbody tr:nth-child(even) td { background: #fff; }
html.g-head-wrap table.grid thead th {
  white-space: normal; line-height: 1.25; height: auto; padding: 6px 8px; vertical-align: middle;
}

/* 遮罩 + 抽屉 */
.th-mask {
  position: fixed; inset: 0; background: rgba(15, 32, 51, .32); z-index: 900;
  opacity: 0; pointer-events: none; transition: opacity .16s;
}
.th-mask.open { opacity: 1; pointer-events: auto; }
.th-panel {
  position: fixed; top: 0; right: 0; bottom: 0; width: 760px; max-width: 96vw; z-index: 901;
  background: #fff; box-shadow: -8px 0 30px rgba(10, 30, 55, .18);
  display: flex; flex-direction: column; transform: translateX(100%); transition: transform .2s ease;
}
.th-panel.open { transform: translateX(0); }
.th-head {
  height: 48px; flex: none; display: flex; align-items: center; padding: 0 6px 0 18px;
  background: linear-gradient(180deg, var(--blue-050), var(--blue-100));
  border-bottom: 1px solid var(--blue-100);
}
.th-head .th-title {
  font-size: 15px; font-weight: 600; color: #22303f; letter-spacing: .5px;
  padding-left: 10px; border-left: 3px solid var(--blue-600); line-height: 1.1;
}
.th-head .th-x {
  margin-left: auto; width: 40px; height: 48px; border: 0; background: none; cursor: pointer;
  color: #7b8a99; font-size: 17px; line-height: 1;
}
.th-head .th-x:hover { color: var(--blue-700); background: rgba(255,255,255,.5); }
.th-body { flex: 1; display: flex; min-height: 0; }
.th-nav {
  width: 108px; flex: none; border-right: 1px solid var(--line-2); background: #fcfdfe;
  padding-top: 16px; display: flex; flex-direction: column; gap: 4px;
}
.th-nav .tn {
  border: 0; background: none; cursor: pointer; padding: 10px 6px 9px; color: #5b6a79;
  display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 12px; line-height: 1.35;
  border-left: 2px solid transparent;
}
.th-nav .tn svg { color: #7d8b99; }
.th-nav .tn:hover { color: var(--blue-700); background: var(--tint); }
.th-nav .tn.active { color: var(--blue-700); font-weight: 600; background: var(--tint); border-left-color: var(--blue-600); }
.th-nav .tn.active svg { color: var(--blue-600); }
.th-nav .tn span { text-align: center; }
.th-main { flex: 1; overflow: auto; padding: 18px 22px 30px; }
.th-pane { display: none; }
.th-pane.active { display: block; }

/* 主题卡片 */
.th-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px 18px; }
.th-card {
  border: 1px solid #e6ebf1; border-radius: 3px; background: #fff; cursor: pointer;
  padding: 8px 8px 0; transition: .14s; position: relative;
}
.th-card:hover { border-color: var(--blue-500); box-shadow: 0 3px 12px rgba(30, 80, 130, .12); }
.th-card.on { border-color: var(--blue-500); box-shadow: 0 0 0 1px var(--blue-500) inset; }
.th-thumb {
  height: 104px; background: #fff; border: 1px solid #eef1f5; border-radius: 2px;
  position: relative; overflow: hidden; display: flex; gap: 8px; padding: 12px 10px;
}
.th-thumb .tp-side { width: 15px; flex: none; border-radius: 1px; background: var(--tp-bar); }
.th-thumb .tp-main { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.th-thumb .tp-top { height: 7px; border-radius: 1px; background: var(--tp-bar); opacity: .55; }
.th-thumb .tp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.th-thumb .tp-grid i { height: 14px; border-radius: 1px; background: var(--tp-block); }
.th-thumb .tp-lines { display: flex; flex-direction: column; gap: 5px; }
.th-thumb .tp-lines i { height: 6px; border-radius: 1px; background: #f2f4f7; }
.th-thumb .tp-lines i:nth-child(2) { width: 82%; }
.th-thumb .tp-lines i:nth-child(3) { width: 60%; }
.th-foot { display: flex; align-items: center; gap: 8px; height: 42px; }
.th-foot .tp-name { font-size: 13px; color: #2c3e50; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-card.on .tp-name { font-weight: 600; color: var(--blue-700); }
.th-use {
  flex: none; height: 24px; padding: 0 9px; border: 1px solid var(--blue-500); border-radius: 2px;
  background: #fff; color: var(--blue-700); font-size: 12px; cursor: pointer;
}
.th-use:hover { background: var(--blue-050); }
.th-card.on .th-use { cursor: default; color: var(--text-3); border-color: #dfe5ec; background: #f7f9fb; }

/* 表格字体 / 行高设置 */
.th-row { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.th-row > label:not(.th-chk) { width: 88px; flex: none; font-size: 12.5px; color: var(--text-2); }
.th-range { flex: 1; max-width: 300px; accent-color: var(--blue-600); }
.th-val {
  width: 62px; text-align: center; font-size: 12px; color: var(--blue-700); font-weight: 600;
  background: var(--blue-050); border-radius: 2px; padding: 2px 0;
}
.th-seg { display: flex; border: 1px solid var(--line); border-radius: 2px; overflow: hidden; }
.th-seg button {
  height: 26px; padding: 0 13px; border: 0; border-right: 1px solid var(--line); background: #fff;
  color: var(--text-2); cursor: pointer; font-size: 12px;
}
.th-seg button:last-child { border-right: 0; }
.th-seg button:hover { background: var(--tint); }
.th-seg button.on { background: var(--blue-600); color: #fff; }
.th-preview {
  margin-top: 6px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden;
}
.th-preview .pv-bar {
  height: 30px; display: flex; align-items: center; padding: 0 10px; font-size: 12px;
  background: var(--thead); color: #34495e; border-bottom: 1px solid var(--line); font-weight: 600;
}
.th-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: var(--grid-fs); }
.th-table thead th {
  height: var(--grid-head-h); background: var(--thead); color: #34495e; font-weight: 600;
  text-align: left; padding: 0 8px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.th-table thead th.num { text-align: right; }
.th-table tbody td {
  height: var(--grid-row-h); padding: 0 8px; border-bottom: 1px solid var(--line-2); color: #2c3e50;
}
.th-table tbody tr:nth-child(even) td { background: #fbfcfe; }
.th-table tbody tr:hover td { background: var(--rows-hover); }
.th-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.th-table .rownum { width: 34px; text-align: center; color: #a9b6c4; background: #f7f9fb; }
.th-tip { margin-top: 12px; font-size: 12px; color: var(--text-3); line-height: 1.9; }
.th-tip b { color: var(--text-2); font-weight: 600; }
.th-footbar {
  margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--line);
  display: flex; align-items: center; gap: 10px;
}
.th-footbar .grow { flex: 1; }
.th-btn {
  height: 28px; padding: 0 14px; border: 1px solid var(--line); border-radius: 2px;
  background: #fff; color: var(--text-2); cursor: pointer; font-size: 12.5px;
}
.th-btn:hover { border-color: var(--blue-500); color: var(--blue-700); }
.th-btn.primary { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.th-btn.primary:hover { filter: brightness(1.07); color: #fff; }
.th-chk { display: flex; align-items: flex-start; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; flex: 1; min-width: 0; line-height: 1.7; }
.th-chk input { accent-color: var(--blue-600); cursor: pointer; margin: 3px 0 0; flex: none; }
.th-chk span { min-width: 0; }
@media (max-width: 1180px) {
  .th-panel { width: 660px; }
  .th-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .th-panel { width: 100vw; max-width: 100vw; }
  .th-nav { width: 92px; }
  .th-main { padding: 14px 14px 24px; }
}

/* ===================== 打印模板设计器 ===================== */
.pd-page { padding: 0; height: 100%; display: flex; flex-direction: column; background: #fff; min-height: 0; }

/* ---- 顶部：模板信息 ---- */
.pd-top { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pd-name {
  width: 214px; height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 2px;
  font-size: 13px; font-weight: 600; color: #1e2c3a; outline: none; background: #fff;
}
.pd-name:focus { border-color: var(--blue-500); box-shadow: 0 0 0 2px rgba(30, 110, 215, .1); }
.pd-top select { height: 28px; padding: 0 6px; border: 1px solid var(--line); border-radius: 2px; font-size: 12.5px; background: #fff; outline: none; max-width: 168px; }
.pd-top .grow { flex: 1; }
.pd-def { font-size: 12px; }
.pd-badge {
  display: inline-block; height: 20px; line-height: 20px; padding: 0 8px; border-radius: 10px;
  background: var(--blue-050); color: var(--blue-700); font-size: 11.5px; border: 1px solid var(--blue-100);
}
.pd-badge.gray { background: #f4f6f8; color: var(--text-3); border-color: var(--line-2); }

/* ---- 第二行：元素工具条 ---- */
.pd-tool {
  display: flex; align-items: center; gap: 10px; padding: 4px 10px; flex-wrap: wrap;
  border-bottom: 1px solid var(--line); background: #fafbfd;
}
.pd-tg { display: flex; align-items: center; gap: 2px; padding-right: 9px; border-right: 1px solid var(--line-2); }
.pd-tb {
  min-width: 26px; height: 26px; padding: 0 6px; border: 1px solid transparent; border-radius: 2px;
  background: none; cursor: pointer; font-size: 12px; color: var(--text-2); line-height: 1;
}
.pd-tb:hover { background: #fff; border-color: var(--line); color: var(--blue-700); }
.pd-tb.on { background: var(--blue-050); border-color: var(--blue-100); color: var(--blue-700); font-weight: 600; }
.pd-tb.bold { font-weight: 700; }
.pd-tb.italic { font-style: italic; font-family: Georgia, serif; }
.pd-tb.under { text-decoration: underline; }
.pd-sel { height: 26px; padding: 0 4px; border: 1px solid var(--line); border-radius: 2px; font-size: 11.5px; background: #fff; max-width: 132px; }
.pd-num { width: 54px; height: 26px; padding: 0 4px; border: 1px solid var(--line); border-radius: 2px; font-size: 12px; background: #fff; text-align: center; }
.pd-color { width: 28px; height: 26px; padding: 0; border: 1px solid var(--line); border-radius: 2px; background: #fff; cursor: pointer; }
.pd-zoomnote { font-size: 11.5px; color: var(--text-3); min-width: 40px; text-align: right; }
.pd-tool .grow { flex: 1; }

/* ---- 主体三栏 ---- */
.pd-main { flex: 1; display: flex; min-height: 0; }

.pd-left { width: 228px; flex: none; border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #fff; }
.pd-ltabs { display: flex; border-bottom: 1px solid var(--line-2); }
.pd-ltabs button {
  flex: 1; height: 32px; border: 0; background: none; font-size: 12.5px; color: var(--text-2);
  cursor: pointer; border-bottom: 2px solid transparent;
}
.pd-ltabs button.on { color: var(--blue-700); font-weight: 600; border-bottom-color: var(--blue-600); background: var(--tint); }
.pd-search { padding: 7px 9px; border-bottom: 1px solid var(--line-2); }
.pd-search input {
  width: 100%; height: 26px; padding: 0 8px; border: 1px solid var(--line); border-radius: 13px;
  font-size: 12px; outline: none; background: #fafbfd;
}
.pd-search input:focus { border-color: var(--blue-500); background: #fff; }
.pd-tree { flex: 1; overflow: auto; padding-bottom: 28px; }

.pd-group-h {
  display: flex; align-items: center; gap: 4px; padding: 6px 10px; font-size: 12px; font-weight: 600;
  color: #2c3e50; cursor: pointer; background: #f7f9fc; border-top: 1px solid var(--line-2); user-select: none;
}
.pd-group-h:hover { background: var(--tint); }
.pd-caret { font-size: 10px; color: var(--text-3); }
.pd-gcount { margin-left: auto; font-weight: 400; font-size: 10.5px; color: var(--text-3); }
.pd-item {
  padding: 5px 10px 5px 22px; font-size: 12px; color: var(--text-2); cursor: pointer;
  border-left: 2px solid transparent; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pd-item:hover { background: var(--tint); color: var(--blue-700); border-left-color: var(--blue-500); }
.pd-item.sub { padding-left: 30px; font-size: 11.5px; color: var(--text-3); }
.pd-empty { padding: 22px 14px; text-align: center; font-size: 12px; color: var(--text-3); line-height: 1.8; }

.pd-el-list { padding: 4px 0; }
.pd-elrow { display: flex; align-items: center; gap: 6px; padding: 5px 10px; font-size: 12px; cursor: pointer; border-left: 2px solid transparent; }
.pd-elrow:hover { background: var(--tint); }
.pd-elrow.on { background: var(--sel); border-left-color: var(--blue-600); }
.pd-elrow-i { flex: none; font-size: 10.5px; color: var(--text-3); background: #eef2f6; border-radius: 2px; padding: 0 4px; }
.pd-elrow-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #2c3e50; }
.pd-elrow-x { flex: none; font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* ---- 画布 ---- */
.pd-center { flex: 1; min-width: 0; display: flex; overflow: hidden; }
.pd-scroll { flex: 1; min-width: 0; overflow: auto; padding: 20px; background: #e7ebf0; }
.pd-hold { margin: 0 auto; position: relative; }
.pd-paper {
  position: absolute; top: 0; left: 0; background: #fff; box-sizing: border-box;
  transform-origin: top left; box-shadow: 0 4px 18px rgba(20, 40, 70, .18);
}
.pd-sheet { position: relative; background: #fff; box-sizing: border-box; outline: none; }
.pd-sheet.pd-grid {
  background-image: radial-gradient(circle, #dbe3ec 1px, transparent 1px);
  background-size: 5mm 5mm;
}
.pd-sheet [data-id] { cursor: move; }
.pd-sheet [data-id]:hover { outline: 1px dashed #7ba7d6; outline-offset: 0; }
.pd-sel { position: absolute; border: 1px solid var(--blue-600); box-sizing: border-box; z-index: 9; }
.pd-h {
  position: absolute; width: 7px; height: 7px; background: #fff; border: 1px solid var(--blue-600);
  border-radius: 1px; z-index: 10;
}
.pd-h[data-h="nw"] { left: -4px; top: -4px; cursor: nwse-resize; }
.pd-h[data-h="n"] { left: calc(50% - 3.5px); top: -4px; cursor: ns-resize; }
.pd-h[data-h="ne"] { right: -4px; top: -4px; cursor: nesw-resize; }
.pd-h[data-h="e"] { right: -4px; top: calc(50% - 3.5px); cursor: ew-resize; }
.pd-h[data-h="se"] { right: -4px; bottom: -4px; cursor: nwse-resize; }
.pd-h[data-h="s"] { left: calc(50% - 3.5px); bottom: -4px; cursor: ns-resize; }
.pd-h[data-h="sw"] { left: -4px; bottom: -4px; cursor: nesw-resize; }
.pd-h[data-h="w"] { left: -4px; top: calc(50% - 3.5px); cursor: ew-resize; }
.pd-sel-tag {
  position: absolute; left: -1px; top: -17px; height: 16px; line-height: 16px; padding: 0 6px;
  background: var(--blue-600); color: #fff; font-size: 10.5px; white-space: nowrap; border-radius: 2px 2px 0 0;
}
.pd-guide { display: none; }

/* ---- 右侧属性面板 ---- */
.pd-right { width: 276px; flex: none; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: #fff; }
.pd-rtabs { display: flex; border-bottom: 1px solid var(--line-2); }
.pd-rtabs button {
  flex: 1; height: 32px; border: 0; background: none; font-size: 12px; color: var(--text-2);
  cursor: pointer; border-bottom: 2px solid transparent; padding: 0 2px;
}
.pd-rtabs button.on { color: var(--blue-700); font-weight: 600; border-bottom-color: var(--blue-600); background: var(--tint); }
.pd-rbody { flex: 1; overflow: auto; padding-bottom: 26px; }

.pd-sec { border-bottom: 1px solid var(--line-2); }
.pd-sec-h {
  display: flex; align-items: center; gap: 6px; padding: 7px 12px; background: var(--tint-2);
  font-size: 12px; font-weight: 600; color: #2c3e50; border-bottom: 1px solid var(--line-2);
}
.pd-more { margin-left: auto; font-weight: 400; font-size: 10.5px; color: var(--text-3); }
.pd-sec-b { padding: 10px 12px 12px; }

.pd-f { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; font-size: 11.5px; color: var(--text-3); }
.pd-f > span { width: 66px; flex: none; }
.pd-f input[type="number"], .pd-f input[type="text"], .pd-f select {
  flex: 1; min-width: 0; height: 26px; padding: 0 6px; border: 1px solid var(--line);
  border-radius: 2px; font-size: 12px; background: #fff; outline: none; color: #2c3e50;
}
.pd-f input:focus, .pd-f select:focus { border-color: var(--blue-500); }
.pd-f em { font-style: normal; font-size: 10.5px; color: var(--text-3); }
.pd-f.col { flex-direction: column; align-items: stretch; }
.pd-f.col > span { width: auto; margin-bottom: 4px; }
.pd-f textarea {
  width: 100%; padding: 6px; border: 1px solid var(--line); border-radius: 2px;
  font-size: 12px; resize: vertical; font-family: inherit; outline: none; color: #2c3e50;
}
.pd-f textarea:focus { border-color: var(--blue-500); }
.pd-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.pd-g2 .pd-f > span { width: 46px; }
.pd-g4 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 8px; }
.pd-g4 .pd-f > span { width: 46px; }
.pd-c { display: flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--text-2); cursor: pointer; margin-bottom: 6px; }
.pd-c input { accent-color: var(--blue-600); margin: 0; }
.pd-cwrap { display: flex; flex-wrap: wrap; gap: 2px 12px; margin: 2px 0 2px; }
.pd-tip { margin-top: 6px; font-size: 11px; line-height: 1.7; color: var(--text-3); }
.pd-tip b { color: var(--blue-700); font-weight: 600; }
.pd-colorwrap { display: flex; align-items: center; gap: 5px; flex: 1; }
.pd-colorwrap input[type="color"] { width: 34px; height: 24px; padding: 0; border: 1px solid var(--line); border-radius: 2px; background: #fff; cursor: pointer; }
.pd-colorwrap b { width: 16px; height: 16px; border-radius: 2px; border: 1px solid var(--line); }
.pd-btnrow { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.pd-btnrow .btn { height: 26px; padding: 0 10px; font-size: 12px; }

.pd-collist { display: flex; flex-direction: column; gap: 5px; margin-bottom: 9px; }
.pd-col { border: 1px solid var(--line-2); border-radius: 2px; padding: 3px 4px 4px; background: #fcfdfe; }
.pd-col:hover { border-color: var(--blue-100); background: #fff; }
.pd-col-h { display: flex; align-items: center; gap: 3px; }
.pd-col-ix { width: 14px; flex: none; font-size: 10px; color: var(--text-3); text-align: center; }
.pd-col-lab { flex: 1; min-width: 0; height: 23px; padding: 0 5px; border: 1px solid transparent; border-radius: 2px; font-size: 12px; color: #2c3e50; background: transparent; outline: none; }
.pd-col-lab:hover { border-color: var(--line); background: #fff; }
.pd-col-lab:focus { border-color: var(--blue-500); background: #fff; }
.pd-col-b { display: flex; align-items: center; gap: 4px; margin: 2px 0 0 17px; }
.pd-col-w { width: 50px; height: 22px; padding: 0 3px; border: 1px solid var(--line); border-radius: 2px; font-size: 11px; text-align: right; outline: none; }
.pd-col-b em { font-style: normal; font-size: 10px; color: var(--text-3); margin-left: -2px; }
.pd-col-al { flex: 1; min-width: 0; height: 22px; border: 1px solid var(--line); border-radius: 2px; font-size: 11px; outline: none; background: #fff; }
.pd-sum { display: flex; align-items: center; gap: 2px; font-size: 10.5px; color: var(--text-3); white-space: nowrap; }
.pd-sum input { accent-color: var(--blue-600); margin: 0; }
.pd-col-btn {
  width: 24px; height: 24px; border: 1px solid transparent; background: none; color: #9aa7b4;
  cursor: pointer; border-radius: 2px; font-size: 11px; line-height: 1; padding: 0;
}
.pd-col-btn:hover { background: #fff; border-color: var(--line); color: var(--blue-700); }
.pd-col.on { border-color: var(--blue-500); background: var(--sel); box-shadow: inset 0 0 0 1px var(--blue-100); }
.pd-col-key { flex: 1; min-width: 0; height: 22px; border: 1px solid var(--line); border-radius: 2px; font-size: 11px; outline: none; background: #fff; }
.pd-colops { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.pd-colops .btn { height: 26px; padding: 0 8px; font-size: 11.5px; }

/* 画布明细列：选中高亮 / 拖入落点 / 右键菜单 */
.pd-sheet .pd-design-tb .pd-tcol { cursor: cell; position: relative; }
.pd-sheet .pd-design-tb .pd-tcol:hover { background: rgba(30, 110, 215, .08) !important; }
.pd-sheet .pd-design-tb .pd-tcol.pd-col-on {
  background: rgba(30, 110, 215, .16) !important;
  box-shadow: inset 0 0 0 1.2px var(--blue-600);
}
.pd-sheet .pd-design-tb .pd-tcol.pd-col-drop-before::before,
.pd-sheet .pd-design-tb .pd-tcol.pd-col-drop-after::after {
  content: ''; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--blue-600); z-index: 2;
}
.pd-sheet .pd-design-tb .pd-tcol.pd-col-drop-before::before { left: 0; }
.pd-sheet .pd-design-tb .pd-tcol.pd-col-drop-after::after { right: 0; }
.pd-item-col { color: var(--blue-700); }

.pd-colmenu {
  position: fixed; z-index: 12000; min-width: 168px; padding: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 4px;
  box-shadow: 0 8px 24px rgba(20, 40, 70, .18);
}
.pd-colmenu button {
  display: block; width: 100%; text-align: left; border: 0; background: none;
  padding: 7px 12px; font-size: 12.5px; color: #2c3e50; cursor: pointer; border-radius: 2px;
}
.pd-colmenu button:hover { background: var(--tint); color: var(--blue-700); }
.pd-colmenu button:disabled { color: #b0bac4; cursor: default; }
.pd-colmenu button:disabled:hover { background: none; }
.pd-colmenu-sep { height: 1px; background: var(--line-2); margin: 4px 6px; }

.pd-picklist { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow: auto; padding: 4px 2px; }
.pd-pick {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  width: 100%; text-align: left; border: 1px solid var(--line); background: #fff;
  border-radius: 3px; padding: 8px 10px; font-size: 12.5px; color: #2c3e50; cursor: pointer;
}
.pd-pick:hover { border-color: var(--blue-500); background: var(--sel); color: var(--blue-700); }
.pd-pageset { padding: 6px 4px 2px; }
.pd-pageset .pd-f { margin-bottom: 8px; }
.pd-pageset .pd-g2, .pd-pageset .pd-g4 { gap: 0 10px; }

@media (max-width: 1180px) {
  .pd-left { width: 196px; }
  .pd-right { width: 248px; }
}

/* ---------------------------- 期初（初始化） ---------------------------- */
/* 库存 / 往来 / 现金银行期初都是「表格里直接改」，行高按输入框走 */
.init-grid tbody td { height: auto; padding: 3px 5px; }
.init-grid input, .init-grid .combo input {
  height: 28px; border: 1px solid var(--line); border-radius: 3px; padding: 0 7px;
  font-size: 13px; background: #fff; box-sizing: border-box; width: 100%;
}
.init-grid input:focus, .init-grid .combo input:focus {
  border-color: var(--blue-500); outline: none; box-shadow: 0 0 0 2px rgba(30,110,215,.1);
}
.init-grid input.in-num { text-align: right; font-variant-numeric: tabular-nums; }
.init-grid .combo { min-width: 0; }
.init-grid td .muted { color: var(--text-3); }

.init-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.init-card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 12px 14px; }
.init-card .ic-t { color: var(--text-3); font-size: 12px; }
.init-card .ic-v { font-size: 21px; font-weight: 600; color: #1e2c3a; margin: 5px 0 3px; font-variant-numeric: tabular-nums; }
.init-card .ic-v.ok { color: #2f9e5e; }
.init-card .ic-v.warn { color: #d6493f; }
.init-card .ic-s { color: var(--text-3); font-size: 12px; line-height: 1.65; }
.init-ok { color: #2f9e5e; }
.init-warn { color: #d6493f; font-weight: 600; }
.init-note { color: var(--text-3); font-size: 11.5px; white-space: normal; line-height: 1.5; margin-top: 2px; }

/* ---------------------------------------------------------------- 复制单据弹窗 */
.copy-src { background: var(--tint); border: 1px solid var(--blue-100); border-radius: var(--radius); padding: 10px 12px; margin-bottom: 14px; }
.copy-src-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.copy-src-type { background: #fff; border: 1px solid var(--blue-100); color: var(--blue-700); border-radius: 2px; padding: 0 6px; line-height: 20px; font-size: 12px; }
.copy-src-top b { font-size: 14px; color: #1e2c3a; letter-spacing: .2px; }
.copy-src-bot { display: flex; align-items: center; gap: 14px; margin-top: 6px; font-size: 12.5px; color: var(--text-2); }
.copy-src-amt { margin-left: auto; font-weight: 600; color: #b3541e; font-variant-numeric: tabular-nums; }
.copy-cap { font-size: 12.5px; color: var(--text-2); margin-bottom: 8px; font-weight: 600; }
.copy-groups { display: flex; flex-direction: column; gap: 10px; max-height: 310px; overflow: auto; padding-right: 2px; }
.copy-group-head { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.copy-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 6px; }
.copy-item { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-height: 56px; border: 1px solid var(--line); border-radius: var(--radius); padding: 7px 9px; cursor: pointer; background: #fff; min-width: 0; }
.copy-item input { display: none; }
.copy-item:hover { border-color: var(--blue-500); background: #fafcff; }
.copy-item.on { border-color: var(--blue-600); background: var(--sel); box-shadow: inset 0 0 0 1px var(--blue-100); }
.copy-item-name { font-size: 12.5px; color: #1e2c3a; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.copy-item-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.copy-item-tags em { font-style: normal; font-size: 10.5px; line-height: 15px; padding: 0 5px; border-radius: 2px; background: #f2f6fb; color: var(--text-2); border: 1px solid #e3eaf3; white-space: nowrap; }
.copy-item.on .copy-item-tags em { background: #fff; border-color: var(--blue-100); color: var(--blue-700); }
.copy-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.copy-opt { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.copy-opt input[type="date"] { height: 28px; border: 1px solid var(--line); border-radius: 3px; padding: 0 6px; font-size: 12.5px; }
.copy-opt .btn { height: 28px; padding: 0 8px; font-size: 12px; }
.copy-chk { display: flex; align-items: center; gap: 5px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
/* 统一功能清单（新建账套 / 修改账套共用） */
.feat-form > label { margin-bottom: 4px; }
.feat-list { display: flex; flex-wrap: wrap; gap: 10px; }
.feat-group { flex: 1 1 240px; min-width: 220px; border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 11px 10px; background: #fbfcfe; }
.feat-group-t { font-size: 12px; font-weight: 600; color: var(--blue-600, #17548f); padding-bottom: 6px; margin-bottom: 7px; border-bottom: 1px dashed var(--line); }
.feat-group-items { display: flex; flex-direction: column; gap: 9px; }
.feat-item { align-items: flex-start; line-height: 1.5; flex-wrap: wrap; }
.feat-item input[type="checkbox"] { margin-top: 1px; flex: 0 0 auto; }
.feat-item b { white-space: nowrap; }
.feat-item .feat-desc { color: var(--text-3); font-size: 11px; margin-left: 2px; }
.copy-tip { margin-top: 10px; background: #fdf8ee; border: 1px solid #f3e1c4; color: #8a5a1d; border-radius: var(--radius); padding: 8px 10px; font-size: 12px; line-height: 1.6; }
.copy-tip:empty { display: none; }

/* ---------------------------------------------------------------- 选项设置 */
.opt-wrap { display: flex; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; min-height: 540px; }
.opt-side { width: 172px; flex: 0 0 172px; background: #f7f9fc; border-right: 1px solid var(--line); padding: 8px 0; }
.opt-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 9px 16px; font-size: 13px; color: var(--text-2); cursor: pointer; border-left: 3px solid transparent; }
.opt-item:hover { background: var(--tint); color: var(--blue-700); }
.opt-item.active { background: #fff; color: var(--blue-700); font-weight: 600; border-left-color: var(--blue-600); }
.opt-item.off { color: #9aa7b4; }
.opt-item.off i { font-style: normal; font-size: 10.5px; line-height: 15px; color: #9aa7b4; background: #eef2f6; border-radius: 2px; padding: 0 4px; }
.opt-main { flex: 1; min-width: 0; padding: 16px 26px 26px; }
.opt-sec { padding: 16px 0; border-bottom: 1px dashed var(--line-2); }
.opt-sec:first-of-type { padding-top: 4px; }
.opt-sec:last-child { border-bottom: 0; }
.opt-title { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; font-weight: 600; color: #1e2c3a; margin-bottom: 6px; }
.opt-title em { font-style: normal; font-size: 12px; font-weight: 400; color: #c47a1a; }
.opt-hint { font-size: 12px; color: var(--text-3); line-height: 1.7; }
.opt-row { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin-top: 10px; }
.opt-sub { margin-top: 14px; background: #fafcff; border: 1px solid #e8eef6; border-radius: var(--radius); padding: 10px 12px; }
.opt-sub-title { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.opt-tag { font-size: 11.5px; line-height: 20px; padding: 0 8px; border-radius: 10px; background: #eef2f6; color: var(--text-3); }
.opt-tag.on { background: #e8f6ee; color: #1a7f37; }
.opt-note { background: #eefaf1; border: 1px dashed #a8d9b8; color: #1a7f37; border-radius: var(--radius); padding: 10px 14px; font-size: 12.5px; margin-bottom: 8px; }
.opt-tip { margin-top: 12px; background: #fdf8ee; border: 1px solid #f3e1c4; color: #8a5a1d; border-radius: var(--radius); padding: 8px 11px; font-size: 12px; line-height: 1.65; }
.opt-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(226px, 1fr)); gap: 10px; margin-top: 12px; }
.opt-method { border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; background: #fff; }
.opt-method:hover { border-color: var(--blue-500); background: #fafcff; }
.opt-method.on { border-color: var(--blue-600); background: var(--sel); box-shadow: inset 0 0 0 1px var(--blue-100); }
.opt-method input { display: none; }
.opt-method-name { font-size: 13px; font-weight: 600; color: #1e2c3a; margin-bottom: 4px; }
.opt-method-desc { font-size: 11.5px; color: var(--text-3); line-height: 1.6; }
.opt-empty { padding: 90px 20px; text-align: center; }
.opt-empty-title { font-size: 15px; font-weight: 600; color: #1e2c3a; margin-bottom: 8px; }
.opt-savebar { display: flex; align-items: center; gap: 14px; padding: 16px 0 6px; }
.opt-dirty { color: var(--orange); font-size: 12.5px; }
.opt-dirty.hide { display: none; }

/* 采购设置 - 业务控制 6 项（对齐 AI+「选项设置 - 采购设置」：标题 + 注 + 是/否 单选 + 虚线分隔） */
.opt-policy-head { font-size: 12px; color: var(--text-3); line-height: 1.7; padding: 2px 0 4px; }
.opt-policy-note { font-size: 12px; color: var(--text-3); line-height: 1.7; margin-top: 8px; }
.opt-policy-row { display: flex; align-items: center; gap: 8px 26px; flex-wrap: wrap; margin-top: 14px; }
.opt-policy-row .copy-chk { font-size: 13px; color: var(--text-2); }
.opt-policy-row input[type="radio"] { accent-color: var(--blue-600); }
.opt-policy-tip { font-size: 11.5px; color: var(--text-3); line-height: 1.65; margin-top: 9px; }

/* 采购设置 - 业务控制第二组（自定义单选项标签 / 橙色标题说明 / 选项括号说明 / 虚线分隔） */
.opt-p2-group { border-top: 1px dashed var(--line); margin-top: 6px; padding-top: 4px; }
.opt-p2-title { font-size: 14px; font-weight: 600; color: #1e2c3a; line-height: 1.65; }
.opt-p2-title em { font-style: normal; font-size: 12px; font-weight: 400; color: var(--text-3); margin-left: 4px; }
.opt-p2-head { font-size: 12px; color: #e8721c; line-height: 1.7; margin-top: 4px; }
.opt-p2-badge { display: inline-flex; align-items: center; justify-content: center; width: 15px; height: 15px;
  margin-left: 5px; border-radius: 50%; background: #eef2f6; color: var(--text-3); font-size: 10px; vertical-align: 1px; }
.opt-p2-note { font-size: 12px; color: var(--text-3); line-height: 1.7; margin-top: 10px; }
.opt-p2-row { display: flex; align-items: flex-start; gap: 8px 26px; flex-wrap: wrap; margin-top: 14px; }
.opt-p2-opt { display: inline-flex; align-items: flex-start; gap: 6px; font-size: 13px; color: var(--text-2); }
.opt-p2-opt input[type="radio"] { accent-color: var(--blue-600); margin-top: 3px; }
.opt-p2-opt-note { font-size: 11.5px; color: var(--text-3); line-height: 1.6; }
.opt-p2-tip { font-size: 11.5px; color: var(--text-3); line-height: 1.65; margin-top: 10px; }
/* 单据明细：单价变化上下箭头（选项「采购单价格变化后显示上下箭头」为「是」时出现） */
.price-arrow { font-size: 12px; font-weight: 700; margin-left: 4px; line-height: 1; }
.price-arrow.up { color: #d03050; }
.price-arrow.down { color: #17a06a; }
.price-arrow.flat { color: var(--text-3); }

/* ========================================================== 智能补货（三步向导） */
.rp-steps { display: flex; align-items: center; gap: 8px; margin: 4px 0 14px; }
.rp-step { flex: 1; display: flex; align-items: center; gap: 9px; padding: 9px 14px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius); color: var(--text-3); }
.rp-step .rp-no { width: 22px; height: 22px; border-radius: 50%; background: #eef2f6; color: var(--text-3);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; flex: none; }
.rp-step .rp-t { font-size: 13px; font-weight: 600; }
.rp-step.on { border-color: var(--blue-500); background: var(--sel); color: var(--blue-700); }
.rp-step.on .rp-no { background: var(--blue-600); color: #fff; }
.rp-step.done { border-color: #bfe3cd; background: #f2fbf5; color: #1a7f37; }
.rp-step.done .rp-no { background: #1a7f37; color: #fff; }
.rp-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; margin-bottom: 12px; }
.rp-sum-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px; }
.rp-sum-item span { display: block; font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.rp-sum-item b { font-size: 17px; color: #1e2c3a; }
.rp-sum-item b.rp-sum-txt { font-size: 12.5px; font-weight: 500; color: var(--text-2); }

/* 物料档案的计价方式标签 */
.cm-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; line-height: 18px; padding: 0 7px; border-radius: 2px; background: #f2f6fb; color: var(--text-2); border: 1px solid #e3eaf3; }
.cm-tag.on { background: #eef4ff; color: var(--blue-700); border-color: var(--blue-100); }
.cm-tag i { font-style: normal; font-size: 10px; color: var(--text-3); }

/* ========================================================== 查历史（查询工作台） */
/* 顶部查询面板：日期快捷 + 自定义区间 + 条件网格 + 右上查询/设置/显示明细 */
.qpanel {
  padding: 10px 12px 6px; margin-bottom: 10px;
  background: #f8fafc; border: 1px solid var(--line-2); border-radius: var(--radius);
}
.qp-head { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px dashed var(--line-2); }
.qp-dates { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qp-dates > label { color: var(--text-2); font-size: 12px; }
.qp-dates input[type="date"] { height: 26px; padding: 0 6px; border: 1px solid var(--line); border-radius: 2px; background: #fff; font-size: 12px; }
.qp-sep { color: var(--text-3); font-size: 12px; }
.qp-quick { display: flex; align-items: center; gap: 1px; padding: 1px; background: #eef3f9; border: 1px solid var(--line); border-radius: 2px; }
.qp-quick button {
  height: 24px; padding: 0 9px; border: 0; background: none; border-radius: 2px;
  color: var(--text-2); font-size: 12px; cursor: pointer; white-space: nowrap;
}
.qp-quick button:hover { background: #fff; color: var(--blue-700); }
.qp-quick button.on { background: var(--blue-600); color: #fff; }
.qp-more { position: relative; }
.qp-more-list {
  display: none; position: absolute; top: 28px; left: 0; z-index: 40; min-width: 96px; padding: 4px;
  background: #fff; border: 1px solid var(--line); border-radius: 3px; box-shadow: 0 6px 18px rgba(20, 40, 70, .14);
}
.qp-more.open .qp-more-list { display: block; }
.qp-more-list a { display: block; padding: 5px 10px; font-size: 12px; color: var(--text); border-radius: 2px; cursor: pointer; }
.qp-more-list a:hover { background: var(--blue-050); color: var(--blue-700); }
.qp-acts { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.qp-acts .btn { height: 28px; }
.qp-lines { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); font-size: 12px; cursor: pointer; user-select: none; }
.qp-lines input { margin: 0; }

.q-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px 20px; padding: 9px 0 2px; }
.q-item { display: grid; grid-template-columns: 74px minmax(0, 1fr); align-items: center; gap: 8px; }
.q-item > label { color: var(--text-2); font-size: 12px; text-align: right; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-item input, .q-item select {
  width: 100%; height: 26px; padding: 0 7px; box-sizing: border-box; font-size: 12px;
  border: 1px solid var(--line); border-radius: 2px; background: #fff; outline: none;
}
.q-item input:focus, .q-item select:focus { border-color: var(--blue-500); }
.q-item .combo { width: 100%; }
.q-range { display: flex; align-items: center; gap: 4px; min-width: 0; }
.q-range input { width: auto; flex: 1 1 0; min-width: 34px; }
.q-range span { color: var(--text-3); font-size: 12px; }
.q-range em { font-style: normal; color: var(--text-3); font-size: 12px; }
.q-none { grid-column: 1 / -1; padding: 2px 0; color: var(--text-3); font-size: 12px; }
.q-more-row { text-align: center; padding-top: 6px; }
.q-more-row a { color: var(--blue-700); font-size: 12px; cursor: pointer; }
.q-more-row a:hover { text-decoration: underline; }

/* 分页条 */
.h-pager { display: flex; align-items: center; gap: 6px; padding: 8px 2px 0; font-size: 12px; color: var(--text-2); }
.h-pager .grow { flex: 1; }
.h-pager .btn { height: 26px; padding: 0 10px; }
.h-pager .btn[disabled] { color: #b9c4d0; cursor: not-allowed; border-color: var(--line-2); }
.h-pager b { color: var(--blue-700); }
.hp-size select { height: 26px; min-width: 58px; margin: 0 3px; padding: 0 4px; border: 1px solid var(--line); border-radius: 2px; background: #fff; font-size: 12px; }

/* 单据编号 */
a.h-code { color: var(--blue-700); cursor: pointer; }
a.h-code:hover { text-decoration: underline; }

/* 明细子行（勾选「显示明细」后展开） */
table.grid tr.grid-sub td { background: #f7fafd; border-bottom: 1px solid var(--line-2); }
table.grid tr.grid-sub:hover td { background: #eef6fd; }
table.grid tr.grid-sub td.sub-indent { padding: 0; color: #a7b8c9; text-align: center; font-size: 12px; }
table.grid tr.grid-sub td.sub-cell { padding: 0 10px; font-size: 12px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-seq { display: inline-block; min-width: 16px; color: #a7b8c9; }
.sb-inv { color: var(--text); }
.sb-dim { color: var(--text-3); }
.sb-batch { padding: 0 4px; border: 1px solid #f0e0b8; border-radius: 2px; background: #fdf8ec; color: #8a6a2b; }
.sb-num { color: var(--text-2); }
.sb-num b { color: var(--text); }
.sb-sep { display: inline-block; width: 1px; height: 11px; margin: 0 9px; background: #dbe3ec; vertical-align: -1px; }

/* 查询设置弹窗 */
.hs-sec { padding-bottom: 10px; margin-bottom: 10px; border-bottom: 1px dashed var(--line-2); }
.hs-sec:last-of-type { border-bottom: 0; }
.hs-t { font-weight: 600; color: #1e2c3a; margin-bottom: 3px; }
.hs-hint { margin-bottom: 8px; color: var(--text-3); font-size: 12px; }
.hs-conds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 10px; }
.hs-cond { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); cursor: pointer; }
.hs-cond input { margin: 0; }
.hs-row { display: flex; align-items: center; gap: 10px; margin: 7px 0; font-size: 12.5px; }
.hs-row > label { width: 76px; text-align: right; color: var(--text-2); }
.hs-row select { height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 2px; background: #fff; }
.hs-row > label.hs-chk { width: auto; text-align: left; }
.hs-chk { display: inline-flex; align-items: flex-start; gap: 6px; color: var(--text); line-height: 1.55; cursor: pointer; }
.hs-chk input { margin: 3px 0 0; }
.hs-all { display: inline-flex; align-items: center; gap: 6px; color: var(--blue-700); font-size: 12.5px; cursor: pointer; }
.dialog-foot .grow { flex: 1; }

/* 窄屏时条件网格退成两列 / 一列 */
@media (max-width: 1180px) { .q-grid, .hs-conds { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) { .q-grid, .hs-conds { grid-template-columns: 1fr; } .qp-acts { margin-left: 0; } }

/* ---------------------------------------------- 查历史：勾选列 + 批量操作条 */
table.grid th.selcol, table.grid td.selcol { width: 34px; min-width: 34px; padding: 0 2px; text-align: center; }
table.grid th.selcol { background: #f7f9fb; }
table.grid td.selcol { background: #fbfcfe; }
table.grid tbody tr.selected td.selcol { background: #eef6fd; }
table.grid .selcol input { margin: 0; cursor: pointer; vertical-align: -2px; }

.h-bulk {
  display: flex; align-items: center; gap: 8px; height: 38px; margin-bottom: 8px; padding: 0 12px;
  background: #f8fafc; border: 1px solid var(--line-2); border-radius: var(--radius);
  font-size: 12px; color: var(--text-2); transition: background .15s, border-color .15s;
}
.h-bulk.on { background: #eef4ff; border-color: #bcd3f2; }
.h-bulk .hb-ck { color: #c3cedb; font-size: 13px; }
.h-bulk.on .hb-ck { color: var(--blue-600); }
.h-bulk .hb-hint { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-bulk .hb-n { display: none; }
.h-bulk.on .hb-hint { display: none; }
.h-bulk.on .hb-n { display: inline; color: var(--text); }
.h-bulk .hb-n b { color: var(--blue-700); font-size: 13px; }
.h-bulk .grow { flex: 1; }
.h-bulk .hb-sep { width: 1px; height: 16px; background: var(--line); }
.h-bulk .btn { height: 26px; padding: 0 10px; }
.h-bulk .btn[disabled] { color: #c3cedb; background: #fbfcfd; border-color: var(--line-2); cursor: not-allowed; }
.h-bulk .hb-clear { color: var(--blue-700); cursor: pointer; }
.h-bulk .hb-clear:hover { text-decoration: underline; }

/* 批量收付款 / 批量生单确认弹窗 */
.bs-head { display: flex; gap: 10px; margin-bottom: 10px; }
.bs-head > div {
  flex: 1; padding: 8px 12px; background: #f8fafc; border: 1px solid var(--line-2); border-radius: 2px;
  font-size: 12px; color: var(--text-3); display: flex; flex-direction: column; gap: 2px;
}
.bs-head b { font-size: 15px; color: var(--text); font-weight: 600; }
.bs-head span { color: var(--text-3); }
.bs-head b.bs-amt { color: var(--blue-700); }
.bs-chks { display: flex; flex-direction: column; gap: 5px; padding-top: 3px; }
.bs-list { max-height: 190px; overflow: auto; border: 1px solid var(--line-2); border-radius: 2px; }
.bs-row { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line-2); font-size: 12px; }
.bs-row:last-child { border-bottom: 0; }
.bs-row .bs-p { width: 160px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-row .bs-d { flex: 1; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-row b { color: var(--text); }
.bs-note { margin: 9px 0 4px; color: var(--text-2); font-size: 12px; line-height: 1.6; }
.bs-note b { color: var(--text); }
.bs-tip { margin-top: 8px; padding: 6px 10px; background: #f8fafc; border-left: 2px solid var(--blue-100); color: var(--text-3); font-size: 12px; line-height: 1.6; }
.bs .form-item { margin-bottom: 0; }


/* ========================================================== 批次：录入 / 选批 / 生成方案 */
input.batch-in, select.batch-sel {
  width: 100%; height: 24px; padding: 0 6px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 2px; background: #fff;
  color: var(--text); font-size: 12px; outline: none;
}
input.batch-in:focus, select.batch-sel:focus { border-color: var(--blue-500); }
input.batch-in.need, select.batch-sel.need { border-color: #e5b64a; background: #fffdf4; }
input.batch-in.need::placeholder { color: #b98a13; }
.batch-tag {
  padding: 0 5px; border: 1px solid #f0e0b8; border-radius: 2px;
  background: #fdf8ec; color: #8a6a2b; font-size: 12px;
}
.line-hint.err { color: var(--red); }
.opt-rule { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 8px 0 2px; color: var(--text-2); font-size: 12px; }
.opt-rule .opt-link { color: var(--blue-700); cursor: pointer; }
.opt-rule .opt-link:hover { text-decoration: underline; }
.opt-rule-text b { color: var(--text); letter-spacing: .5px; }

/* 批次生成方案弹窗 */
.bp { font-size: 12.5px; }
.bp-hint { margin-bottom: 10px; color: var(--text-3); }
.bp-hint b { color: var(--text-2); }
.bp-cards { display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; background: #f8fafc; border: 1px solid var(--line-2); border-radius: var(--radius); }
.bp-card { min-width: 150px; padding: 8px 14px; background: #fff; border: 1px solid var(--line); border-radius: 3px; cursor: pointer; }
.bp-card:hover { border-color: var(--blue-500); }
.bp-card.on { border-color: var(--blue-500); box-shadow: 0 0 0 2px rgba(46, 134, 207, .14); }
.bp-card-t { margin-bottom: 3px; color: var(--text-2); font-size: 12px; }
.bp-card-v { color: var(--text); font-weight: 600; }
.bp-add { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px dashed var(--line); border-radius: 3px; background: #fff; color: var(--blue-700); cursor: pointer; }
.bp-add:hover { border-color: var(--blue-500); background: var(--blue-050); }
.bp-plus { font-size: 16px; line-height: 1; }
.bp-add-hint { color: var(--text-3); font-size: 11.5px; }
.bp-edit { margin-top: 14px; padding: 12px; background: #f8fafc; border: 1px solid var(--line-2); border-radius: var(--radius); }
.bp-edit-t { margin-bottom: 8px; font-weight: 600; }
.bp-edit-row { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }
.bp-edit-row > label { color: var(--text-2); }
.bp-edit-row select, .bp-edit-row input { height: 26px; padding: 0 6px; border: 1px solid var(--line); border-radius: 2px; background: #fff; font-size: 12.5px; }
.bp-edit-row input#bpLen { width: 64px; }
.bp-del { margin-left: auto; color: var(--red); cursor: pointer; }
.bp-del:hover { text-decoration: underline; }
.bp-prev { margin-top: 10px; color: var(--text-2); }
.bp-prev b { margin: 0 4px; color: var(--blue-700); font-size: 15px; letter-spacing: .5px; }
.bp-prev span { margin-left: 6px; color: var(--text-3); font-size: 12px; }

/* 单据表体：批次列显示开关 + 必填星号 */
.sub-title .col-chk {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px;
  border: 1px solid var(--line); border-radius: 2px; background: #fff;
  color: var(--text-2); font-size: 12px; cursor: pointer; user-select: none;
}
.sub-title .col-chk:hover { border-color: var(--blue-500); color: var(--blue-700); }
.sub-title .col-chk input { margin: 0; }
table.entry th i { color: var(--red); font-style: normal; margin-left: 2px; }
table.entry.hide-batch th.batch, table.entry.hide-batch td.batch { display: none; }

/* ===================== 费用分摊单（T+ 两页签样式：费用单明细 / 采购进货明细） ===================== */
.share-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 10px 14px 8px; background: #f7fafd; border-bottom: 1px solid var(--line-2); }
.share-head-main { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.share-hline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-hline .combo { width: 180px; }
.share-k { font-size: 12px; color: var(--text-2); white-space: nowrap; }
.share-k .req { color: var(--red); font-style: normal; margin-right: 2px; }
.share-doctype { font-size: 13px; font-weight: 600; color: var(--blue-700); }
.share-date { height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; font-size: 12.5px; background: #fff; }
.share-head-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.share-methodbar { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; background: #fff; }
.share-method-sel { height: 28px; min-width: 120px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; font-size: 12.5px; background: #fff; }
.share-hint { font-size: 11.5px; color: var(--text-3); }
.share-remark { height: 28px; width: 220px; padding: 0 8px; border: 1px solid var(--line); border-radius: 4px; font-size: 12.5px; background: #fff; }
.share-tabs { display: flex; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--line); background: #fff; }
.share-tablist { display: flex; gap: 2px; }
.share-tab { height: 34px; padding: 0 16px; border: 0; background: none; color: #4a5b6c; font-size: 12.5px; cursor: pointer; border-bottom: 2px solid transparent; }
.share-tab:hover { color: var(--blue-700); }
.share-tab.active { color: var(--blue-700); font-weight: 600; border-bottom-color: var(--blue-600); }
.share-tabtools { display: flex; gap: 8px; align-items: center; }
.share-panel { background: #fff; }
.grid-wrap.share-grid { border: 0; border-radius: 0; max-height: 46vh; overflow: auto; }
.share-subtools { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; background: #fafcfe; border-bottom: 1px solid var(--line-2); }
.share-foot { display: flex; justify-content: center; gap: 10px; padding: 12px; border-top: 1px solid var(--line); background: #fbfcfe; }

/* ===================== 核销向导（往来冲销单：让出来源 → 待冲单据） ===================== */
.wiz-sum { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 9px 14px; margin-top: 4px; background: #f7fafd; border: 1px solid var(--line-2); border-radius: 4px; font-size: 12.5px; color: var(--text-2); }
.wiz-sum span { white-space: nowrap; }
.wiz-sum b { color: var(--text-1, #2b3a4a); font-weight: 600; margin-left: 4px; }
.form-foot { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-top: 1px solid var(--line); background: #fbfcfe; }
table.entry td select { width: 100%; height: 28px; padding: 0 6px; border: 1px solid var(--line); border-radius: 4px; font-size: 12.5px; background: #fff; }
table.entry td select:disabled { background: #f5f7fa; color: #6b7b8c; }

/* ===================== 往来账本 / 超期查询 / 收付款统计 ===================== */
.rpt-sum { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 9px 14px; background: #f7fafd; border-bottom: 1px solid var(--line-2); font-size: 12.5px; color: var(--text-2); }
.rpt-sum > span { white-space: nowrap; }
.rpt-sum b { color: #2b3a4a; font-weight: 600; margin-left: 5px; }
.rpt-sum .warn b { color: #d6493f; }
.rpt-sum.buckets { gap: 10px; padding: 8px 14px; background: #fbfcfe; border-bottom: 0; }
.rpt-sum.buckets .ovd-chip { padding: 2px 9px; font-size: 12px; }
.rpt-sum .grow { flex: 1 1 auto; }
.ovd-chip { display: inline-flex; align-items: baseline; gap: 6px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.ovd-chip.on { border-color: #f0c4bf; background: #fdf4f3; }
.ovd-chip.on b { color: #d6493f; }
.ovd-chip i { font-style: normal; font-size: 11px; color: #8a97a5; }
.ovd-tag { display: inline-block; min-width: 44px; padding: 1px 7px; border-radius: 9px; background: #fdeceb; color: #c0392b; font-size: 11.5px; font-weight: 600; }
.rbar { display: flex; align-items: center; gap: 6px; }
.rbar .track { flex: 1 1 auto; height: 8px; border-radius: 4px; background: #eef2f7; overflow: hidden; }
.rbar .track i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #79a8e8, #3d7dd4); }
.rbar .pct { flex: none; min-width: 38px; text-align: right; font-size: 11px; color: #4a5b6c; font-variant-numeric: tabular-nums; }

/* ===================== 客户 / 供应商对账单 ===================== */
.stmt-sheet { max-width: 1080px; margin: 14px auto 30px; padding: 22px 26px 26px; background: #fff; border: 1px solid var(--line-2); border-radius: 6px; box-shadow: 0 2px 10px rgba(28, 46, 66, .05); }
.stmt-head { text-align: center; margin-bottom: 12px; }
.stmt-title { font-size: 21px; font-weight: 700; letter-spacing: 5px; color: #1f2a37; }
.stmt-sub { margin-top: 5px; font-size: 11.5px; color: #6b7c8f; }
.stmt-meta { width: 100%; border-collapse: collapse; margin-bottom: 10px; font-size: 12.5px; }
.stmt-meta th { width: 90px; padding: 4px 8px 4px 0; text-align: right; font-weight: 400; color: #6b7c8f; }
.stmt-meta td { padding: 4px 10px 4px 0; border-bottom: 1px dotted #d8e0e9; color: #24303d; }
.stmt-kpis { display: flex; border: 1px solid #cfd9e4; border-radius: 4px; overflow: hidden; margin: 10px 0 14px; }
.stmt-kpis > div { flex: 1; padding: 7px 8px; border-left: 1px solid #e5ebf2; text-align: center; }
.stmt-kpis > div:first-child { border-left: 0; }
.stmt-kpis i { display: block; font-style: normal; font-size: 10.5px; color: #6b7c8f; margin-bottom: 1px; }
.stmt-kpis b { font-size: 13px; color: #1f2a37; font-variant-numeric: tabular-nums; }
.stmt-kpis .hl { background: #f4f8fd; }
.stmt-kpis .warn b { color: #c0392b; }
.stmt-sec { margin: 14px 0 6px; font-weight: 600; font-size: 12.5px; color: #2b3a4a; }
.stmt-tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.stmt-tbl th { background: #f2f6fb; border: 1px solid #cfd9e4; padding: 6px 7px; font-weight: 600; color: #33465a; text-align: left; }
.stmt-tbl td { border: 1px solid #dde5ee; padding: 4px 7px; color: #24303d; }
.stmt-tbl tbody tr:hover td { background: #fafcff; }
.stmt-tbl tfoot td { background: #fafcfe; font-weight: 600; }
.stmt-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.stmt-tbl .c { text-align: center; }
.stmt-tbl .r { text-align: right; }
.stmt-tbl .od { color: #c0392b; font-weight: 600; }
.stmt-note { margin-top: 14px; padding: 9px 11px; background: #fafcfe; border: 1px dashed #cfd9e4; font-size: 11.5px; line-height: 1.75; color: #40525f; }
.stmt-sign { display: flex; gap: 26px; margin-top: 24px; font-size: 11.5px; color: #40525f; }
.stmt-sign > div { flex: 1; }

/* ===================== 往来资金预测表 ===================== */
.fc-cell { display: flex; align-items: center; gap: 8px; }
.fc-cell b { flex: none; min-width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
.fc-bar { flex: 1 1 auto; height: 8px; border-radius: 4px; background: #eef2f7; overflow: hidden; }
.fc-bar i { display: block; height: 100%; border-radius: 4px; }
.rpt-sum i { font-style: normal; font-size: 11px; color: #8a97a5; margin-left: 2px; }

/* ===================== 单据联查（上下游追溯 + 生单关系图） ===================== */
.tr-page { padding-bottom: 46px; }
/* 单据摘要条 */
.tr-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 10px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.tr-code { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; color: var(--blue-700); letter-spacing: .3px; }
.tr-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 5px; font-size: 12px; color: var(--text-3); }
.tr-kpis { display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tr-kpi {
  min-width: 108px; padding: 6px 11px; border: 1px solid var(--line-2); border-radius: var(--radius);
  background: #f9fbfd; display: flex; flex-direction: column; gap: 2px;
}
.tr-kpi span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.tr-kpi b { font-size: 14px; color: #22303d; font-variant-numeric: tabular-nums; }
.tr-kpi.ok { background: #f3fbf7; border-color: #d3ecdf; }
.tr-kpi.ok b { color: #178355; }
.tr-kpi.warn { background: #fdf5f4; border-color: #f4d8d5; }
.tr-kpi.warn b { color: #c0392b; }

/* 分块 */
.tr-sec { margin-top: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.tr-sec-t {
  display: flex; align-items: baseline; gap: 10px; padding: 8px 13px; background: #f7fafd;
  border-bottom: 1px solid var(--line-2); font-size: 12.5px; font-weight: 600; color: #2b3a4a;
}
.tr-sec-t::before { content: ""; width: 3px; height: 12px; border-radius: 2px; background: var(--blue-600); align-self: center; }
.tr-sub { font-weight: 400; font-size: 11.5px; color: var(--text-3); }
.tr-none { padding: 22px 12px !important; text-align: center; color: var(--text-3); font-size: 12.5px; }

/* 上游来源链 */
.tr-chain { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 13px; }
.tr-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 10px; border: 1px solid var(--line);
  border-radius: 14px; background: #fbfcfe; font-size: 12px;
}
.tr-chip i { font-style: normal; font-size: 11px; color: var(--text-3); }
.tr-chip.on { background: var(--blue-050); border-color: var(--blue-100); }
.tr-chip.on { color: var(--blue-800); }
.tr-arrow { color: #b3c1ce; font-size: 13px; }

/* 执行进度 */
.tr-prog { padding: 10px 13px 12px; display: flex; flex-direction: column; gap: 9px; }
.tr-prow { display: flex; align-items: center; gap: 10px; font-size: 12px; }
.tr-pl { flex: none; width: 84px; color: var(--text-2); }
.tr-prow .fc-bar { flex: 0 1 260px; height: 9px; }
.tr-pv { flex: none; min-width: 132px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.tr-pv b { color: #22303d; }
.tr-pv i { font-style: normal; color: var(--blue-700); margin-left: 4px; }
.tr-pn { color: var(--text-3); font-size: 11.5px; }

/* 生单关系图 */
.tr-graph { padding: 10px 8px; overflow-x: auto; overflow-y: hidden; background:
  linear-gradient(90deg, #fbfcfe 1px, transparent 1px) 0 0 / 22px 22px; }
.tg-wrap { position: relative; }
.tg-svg { position: absolute; left: 0; top: 0; pointer-events: none; }
.tg-edge { fill: none; stroke: #b9c8d6; stroke-width: 1.3; }
.tg-edge.settle { stroke: #e2b25f; stroke-dasharray: 4 3; }
.tg-node {
  position: absolute; box-sizing: border-box; padding: 6px 9px; cursor: pointer;
  background: #fff; border: 1px solid #d6e0ea; border-left: 3px solid #9db4c9; border-radius: 4px;
  box-shadow: 0 1px 2px rgba(35, 60, 90, .06); transition: box-shadow .12s, border-color .12s, transform .12s;
  display: flex; flex-direction: column; justify-content: space-between;
}
.tg-node:hover { box-shadow: 0 3px 10px rgba(35, 60, 90, .14); border-color: var(--blue-500); transform: translateY(-1px); }
.tg-node.up { border-left-color: #8fb0cc; background: #fbfdff; }
.tg-node.self { border-left-color: var(--blue-600); background: var(--blue-050); box-shadow: 0 2px 8px rgba(35, 118, 189, .18); }
.tg-node.cash { border-left-color: #e2b25f; background: #fffdf7; }
.tg-code { font-size: 12.5px; font-weight: 600; color: #1f3b57; letter-spacing: .2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-node.self .tg-code { color: var(--blue-800); }
.tg-sub { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 11px; color: var(--text-3); }
.tg-type { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tg-date { flex: none; font-variant-numeric: tabular-nums; }
.tg-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tg-amt { font-size: 11.5px; color: #2c3e50; font-variant-numeric: tabular-nums; }
.tg-dot { width: 6px; height: 6px; border-radius: 50%; background: #c2ccd6; }
.tg-dot.audited { background: #2fae74; }
.tg-dot.pending { background: #e6a23c; }
.tg-dot.closed { background: #a7b2bd; }
.tr-empty { padding: 26px; text-align: center; color: var(--text-3); font-size: 12.5px; }
/* 联查里的小表格：表头不吸顶，行更紧凑 */
.tr-tb thead th { position: static; height: 28px; }
.tr-tb tbody td { height: 28px; }

/* ===================== 选单生单：可配置过滤条件区 ===================== */
.fp-top { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; background: var(--bg-sub, #f9fafb); }
.fp-row { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.fp-row + .fp-row { margin-top: 8px; }
.fp-lb { width: 58px; text-align: right; color: var(--text-2); font-size: 12px; flex: none; }
.fp-ctl { height: 26px; padding: 0 6px; border: 1px solid var(--line); border-radius: 2px; font-size: 12px; color: var(--text); background: #fff; width: 130px; }
.fp-ctl:focus { border-color: var(--blue-500); outline: none; }
.fp-cell { display: inline-flex; gap: 6px; align-items: center; }
.fp-quick { display: inline-flex; gap: 2px; }
.fp-quick a { font-size: 12px; padding: 2px 7px; border-radius: 10px; cursor: pointer; color: var(--text-2); }
.fp-quick a:hover { color: var(--blue-700); background: var(--blue-050, #eef4ff); }
.fp-quick a.on { color: var(--blue-700); background: var(--blue-050, #eef4ff); font-weight: 600; }
#pk-more.fold .fp-cell { display: none; }
.fp-btns { display: flex; flex-direction: column; gap: 6px; flex: none; padding-top: 2px; }
.fp-btns .btn { width: 64px; }

/* ===================== 统计方案（自定义统计表） ===================== */
.stat-wrap { display: flex; gap: 12px; align-items: flex-start; }
.stat-side { width: 226px; flex: none; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; overflow: hidden; }
.stat-side-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; font-size: 12.5px; font-weight: 600; color: #1e2c3a; background: var(--bg-sub, #f7f9fb); border-bottom: 1px solid var(--line); }
.stat-add { width: 22px; height: 22px; line-height: 20px; padding: 0; border: 1px dashed var(--blue-500); border-radius: 4px; background: #fff; color: var(--blue-700); font-size: 14px; cursor: pointer; }
.stat-add:hover { background: var(--blue-050); }
.stat-tree { padding: 6px 6px 10px; max-height: 560px; overflow: auto; }
.stat-g { margin-top: 6px; }
.stat-g-t { font-size: 11.5px; color: var(--text-3); padding: 4px 8px; }
.stat-it { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 4px; cursor: pointer; font-size: 12.5px; color: var(--text); }
.stat-it:hover { background: #f2f6fb; }
.stat-it.on { background: var(--sel, #e8f1fb); color: var(--blue-700); font-weight: 600; }
.stat-it .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-it .nm .pub { color: var(--orange); font-style: normal; margin-right: 2px; }
.stat-it .ops { display: none; gap: 4px; flex: none; }
.stat-it:hover .ops { display: inline-flex; }
.stat-it .ops a { cursor: pointer; color: var(--text-3); font-size: 12px; }
.stat-it .ops a:hover { color: var(--blue-700); }
.stat-it .tpl { flex: none; font-size: 10.5px; color: var(--text-3); }
.stat-main { flex: 1; min-width: 0; }
.stat-empty { padding: 110px 20px; text-align: center; color: var(--text-3); font-size: 13px; line-height: 2; }
.stat-none { padding: 14px 8px; color: var(--text-3); font-size: 12px; text-align: center; }
.fs-sec { margin-bottom: 14px; }
.fs-t { font-size: 12.5px; font-weight: 600; color: #1e2c3a; margin-bottom: 8px; }
.fs-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.fs-row label { font-size: 12px; color: var(--text-2); }
.fs-row select { height: 26px; border: 1px solid var(--line); border-radius: 2px; }

/* ============================================= 商品成本重算（三步向导） */
.cr-tip { border: 1px dashed #7fc9a0; background: #f2fbf5; color: #1a7f37; font-size: 12.5px;
  line-height: 1.9; padding: 12px 16px; border-radius: 4px; margin-bottom: 18px; }
.cr-form { border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 4px 16px 14px; }
.cr-row { display: grid; grid-template-columns: 88px 1fr 88px 1fr; align-items: center; gap: 10px 12px;
  padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cr-row:last-child { border-bottom: 0; }
.cr-lab { font-size: 12.5px; color: var(--text-2); text-align: right; }
.cr-lab.req::before { content: '*'; color: #d6493f; margin-right: 3px; }
.cr-row input[type=date], .cr-row select { height: 30px; border: 1px solid var(--line); border-radius: 2px;
  padding: 0 8px; font-size: 12.5px; background: #fff; min-width: 0; }
.cr-row select[multiple] { height: auto; padding: 4px; }
.cr-row select[multiple] option { padding: 2px 4px; }
.cr-order { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cr-order span { font-size: 12.5px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cr-order button { flex: none; color: var(--blue-700); border-color: var(--blue-100); background: var(--blue-050); }
.cr-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 0 10px; }
.cr-note { font-size: 12px; color: var(--text-3); }
.cr-calc { display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 90px 20px; gap: 12px; }
.cr-spinner { width: 34px; height: 34px; border: 3px solid var(--blue-100); border-top-color: var(--blue-600);
  border-radius: 50%; animation: cr-spin .9s linear infinite; }
@keyframes cr-spin { to { transform: rotate(360deg); } }
.cr-calc-title { font-size: 14px; font-weight: 600; color: var(--text); }
.cr-calc-sub { font-size: 12.5px; color: var(--text-3); }
.cr-result { border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 14px 16px; }
.cr-kpi { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cr-kpi-item { flex: 1; min-width: 120px; border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px;
  display: flex; flex-direction: column; gap: 4px; background: #fbfcfe; }
.cr-kpi-item .k { font-size: 11.5px; color: var(--text-3); }
.cr-kpi-item .v { font-size: 19px; font-weight: 600; color: var(--text); }
.cr-sum-line { font-size: 12.5px; color: var(--text-2); padding: 8px 2px 12px; border-bottom: 1px solid var(--line); }
.cr-tabs { display: flex; gap: 2px; padding: 10px 0 8px; }
.cr-tab { height: 28px; padding: 0 14px; border: 1px solid transparent; border-radius: 2px; background: transparent;
  color: var(--text-2); cursor: pointer; font-size: 12.5px; }
.cr-tab:hover { background: var(--tint); }
.cr-tab.on { background: var(--sel, #e8f1fb); color: var(--blue-700); font-weight: 600; }
.cr-order-tips { font-size: 12.5px; color: var(--text-2); line-height: 1.8; margin-bottom: 12px; }
.cr-order-list { border: 1px solid var(--line); border-radius: 4px; max-height: 320px; overflow: auto; }
.cr-order-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.cr-order-row:last-child { border-bottom: 0; }
.cr-order-idx { width: 22px; height: 22px; border-radius: 50%; background: var(--blue-050); color: var(--blue-700);
  display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; font-weight: 600; flex: none; }
.cr-order-name { flex: 1; font-size: 12.5px; }
.cr-order-ops { display: flex; gap: 4px; }
.cr-order-add { margin-top: 10px; }
.cr-tip2 { font-size: 11.5px; color: var(--text-3); margin-top: 6px; line-height: 1.7; }

/* ============================================= 产品成本维护 */
.cp-bar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px 14px; border: 1px solid var(--line); border-radius: 4px; background: #fff; margin-bottom: 12px; }
.cp-bar-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.cp-bar-item label { color: var(--text-2); white-space: nowrap; }
.cp-bar-item .cp-val { color: var(--text); font-weight: 600; min-width: 64px; }
.cp-bar-item input[type=number] { height: 28px; width: 140px; border: 1px solid var(--line); border-radius: 2px;
  padding: 0 8px; text-align: right; font-size: 12.5px; }
.cp-bar-sum { margin-left: auto; font-size: 12.5px; color: var(--text-2); }
.cp-bar-sum b { color: var(--text); margin: 0 2px; }
.cp-amt { width: 100%; max-width: 110px; height: 26px; border: 1px solid var(--line); border-radius: 2px;
  padding: 0 6px; text-align: right; font-size: 12.5px; background: #fffdf5; }
.cp-amt:focus { outline: none; border-color: var(--blue-500, #3b82f6); background: #fff; }
.cp-q { padding: 4px 2px 2px; }
.cp-q-row { display: grid; grid-template-columns: 88px 1fr; align-items: center; gap: 10px; padding: 9px 0;
  border-bottom: 1px dashed var(--line); }
.cp-q-row:last-of-type { border-bottom: 0; }
.cp-q-row > label { font-size: 12.5px; color: var(--text-2); text-align: right; }
.cp-q-row > label.req::before { content: '*'; color: #d6493f; margin-right: 3px; }
.cp-q-row select { height: 30px; border: 1px solid var(--line); border-radius: 2px; padding: 0 8px;
  font-size: 12.5px; background: #fff; width: 100%; }
.cp-q-range { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cp-q-range > div { flex: 1; min-width: 0; }
.cp-q-sep { color: var(--text-3); flex: none; }
.cp-q-check { padding: 14px 0 4px 88px; font-size: 12.5px; color: var(--text); }
.cp-q-check label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.cp-q-check input { margin: 0; }

/* ============================================= 客户管理（CRM） */
.crm-kpi { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.crm-kpi-item { flex: 1; min-width: 140px; border: 1px solid var(--line); border-radius: 4px; padding: 12px 14px;
  background: #fff; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.crm-kpi-item:hover { border-color: var(--blue-200, #bfdbfe); background: #f8fbff; }
.crm-kpi-item .k { font-size: 12px; color: var(--text-3); }
.crm-kpi-item .v { font-size: 22px; font-weight: 600; color: var(--text); }
.crm-kpi-item .s { font-size: 12px; color: var(--text-2); }
.crm-board-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.crm-panel { border: 1px solid var(--line); border-radius: 4px; background: #fff; overflow: hidden; }
.crm-panel-wide { grid-column: 1 / -1; }
.crm-panel-hd { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 600; background: #fafbfd; }
.crm-funnel { padding: 10px 14px 14px; }
.crm-funnel-row { display: grid; grid-template-columns: 72px 1fr 36px 90px; align-items: center; gap: 8px;
  padding: 6px 0; cursor: pointer; font-size: 12.5px; }
.crm-funnel-row:hover .n { color: var(--blue-700); }
.crm-funnel-row .bar { height: 10px; background: #eef2f7; border-radius: 5px; overflow: hidden; }
.crm-funnel-row .bar i { display: block; height: 100%; background: linear-gradient(90deg, #5b8def, #3b82f6); border-radius: 5px; }
.crm-funnel-row .a { text-align: right; color: var(--text-2); }
.crm-stat-nav { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-bottom: 14px; }
.crm-stat-card { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 4px; background: #fff; text-decoration: none; color: inherit; cursor: pointer; }
.crm-stat-card:hover { border-color: var(--blue-300, #93c5fd); background: #f8fbff; }
.crm-stat-card b { font-size: 13.5px; color: var(--blue-700, #1d4ed8); }
.crm-stat-card span { font-size: 12px; color: var(--text-3); line-height: 1.4; }
.crm-tabs { display: flex; flex-wrap: wrap; gap: 6px; }
.crm-todo { max-height: 280px; overflow: auto; }
.crm-todo-row { display: grid; grid-template-columns: 52px 1fr 90px 70px 40px; gap: 8px; align-items: center;
  padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.crm-todo-row:last-child { border-bottom: 0; }
.crm-todo-row .d { color: #d6493f; }
.crm-todo-row .o { color: var(--text-3); }
.crm-filter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.crm-filter input, .crm-filter select { height: 30px; border: 1px solid var(--line); border-radius: 2px; padding: 0 8px; font-size: 12.5px; }
.crm-filter input { min-width: 220px; }
.crm-view { margin-left: auto; display: flex; gap: 4px; }
.crm-form { padding: 4px 2px; }
.crm-f-row { display: grid; grid-template-columns: 88px 1fr; gap: 10px; align-items: start; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.crm-f-row:last-child { border-bottom: 0; }
.crm-f-row > label { font-size: 12.5px; color: var(--text-2); text-align: right; padding-top: 6px; }
.crm-f-row > label.req::before { content: '*'; color: #d6493f; margin-right: 3px; }
.crm-f-ctl input, .crm-f-ctl select, .crm-f-ctl textarea { width: 100%; border: 1px solid var(--line); border-radius: 2px;
  padding: 6px 8px; font-size: 12.5px; background: #fff; box-sizing: border-box; }
.crm-f-ctl textarea { resize: vertical; min-height: 56px; }
.crm-tip { font-size: 12.5px; color: var(--text-2); background: #f2f7ff; border: 1px dashed #9db7e8; border-radius: 4px;
  padding: 10px 12px; margin-bottom: 10px; line-height: 1.7; }
.crm-check { padding: 10px 0 4px 88px; font-size: 12.5px; }
.crm-kanban { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 8px; min-height: 360px; }
.crm-kanban.mfg-kanban .crm-col { flex: 0 0 260px; }
.crm-col { flex: 0 0 220px; background: #f4f6f9; border-radius: 4px; border: 1px solid var(--line); display: flex; flex-direction: column; max-height: calc(100vh - 240px); }
.crm-col-hd { padding: 10px 12px; font-size: 12.5px; font-weight: 600; border-bottom: 1px solid var(--line); }
.crm-col-hd b { color: var(--text-3); font-weight: 500; margin-left: 4px; }
.crm-col-bd { padding: 8px; overflow: auto; flex: 1; }
.crm-card { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 10px; margin-bottom: 8px; cursor: pointer; }
.crm-card:hover { border-color: var(--blue-300, #93c5fd); box-shadow: 0 1px 4px rgba(59,130,246,.12); }
.crm-card .t { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.crm-card .p, .crm-card .o { font-size: 12px; color: var(--text-3); }
.crm-card .m { font-size: 12.5px; color: var(--text-2); margin: 4px 0; }
a.doc-link.danger { color: #d6493f; }
.crm-lines { margin-top: 12px; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.crm-lines-hd { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: #fafbfd;
  border-bottom: 1px solid var(--line); font-size: 12.5px; }
.crm-lines-tb { margin: 0; }
.crm-lines-tb input { width: 100%; height: 28px; border: 1px solid var(--line); border-radius: 2px;
  padding: 0 6px; text-align: right; font-size: 12.5px; box-sizing: border-box; }
.crm-lines-tb td { vertical-align: middle; }
.tg-node.crm { background: #f5f9ff; border-color: #9db7e8; }
.tg-node.self { box-shadow: 0 0 0 2px var(--blue-400, #60a5fa); }
@media (max-width: 960px) {
  .crm-board-grid { grid-template-columns: 1fr; }
}

/* ============================================= 自定义表单设计器 */
.cform-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px;
  padding: 10px 12px; background: #fff; border: 1px solid var(--line); border-radius: 4px; font-size: 12.5px; }
.cform-toolbar label { color: var(--text-3); }
.cform-toolbar input, .cform-toolbar select { height: 30px; border: 1px solid var(--line); border-radius: 2px; padding: 0 8px; }
.cform-layout { display: grid; grid-template-columns: 168px 1fr 240px; gap: 10px; min-height: calc(100vh - 220px); }
.cform-palette, .cform-props { background: #fff; border: 1px solid var(--line); border-radius: 4px; overflow: auto; }
.cform-pal-hd { padding: 10px 12px; font-weight: 600; font-size: 13px; border-bottom: 1px solid var(--line); background: #fafbfd; }
.cform-pal-item { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid #f0f2f5;
  cursor: grab; font-size: 12.5px; user-select: none; }
.cform-pal-item:hover { background: #f5f9ff; color: var(--blue-700, #1d4ed8); }
.cform-pal-item i { width: 22px; height: 22px; border-radius: 3px; background: #eef3fb; color: #3b6db5;
  display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; }
.cform-canvas { background: #f4f6f9; border: 1px dashed #c5ced9; border-radius: 4px; padding: 14px;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; min-height: 420px; }
.cform-canvas.drag-over { border-color: #3b82f6; background: #eef5ff; }
.cform-empty { grid-column: 1 / -1; text-align: center; color: var(--text-3); padding: 80px 20px; font-size: 13px; }
.cform-field { background: #fff; border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; cursor: pointer;
  min-height: 64px; }
.cform-field.span-2, .cform-section { grid-column: 1 / -1; }
.cform-field:hover { border-color: #93c5fd; }
.cform-field.on { border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,.18); }
.cform-field.dragging { opacity: .45; }
.cform-field > label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.cform-field > label i { color: #d6493f; margin-left: 2px; font-style: normal; }
.cform-preview input, .cform-preview select, .cform-preview textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 2px; padding: 6px 8px; font-size: 12.5px;
  background: #fafbfd; box-sizing: border-box; }
.cform-section { background: transparent; border: none; border-bottom: 1px solid var(--line); border-radius: 0;
  padding: 8px 4px; min-height: auto; }
.cform-section b { font-size: 13.5px; }
.cform-fill-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; padding: 4px; }
.cform-fill-item { display: flex; flex-direction: column; gap: 4px; }
.cform-fill-item.span-2, .cform-fill-sec { grid-column: 1 / -1; }
.cform-fill-item label { font-size: 12.5px; color: var(--text-2); }
.cform-fill-item label i { color: #d6493f; font-style: normal; }
.cform-fill-item input, .cform-fill-item select, .cform-fill-item textarea {
  border: 1px solid var(--line); border-radius: 2px; padding: 6px 8px; font-size: 12.5px; width: 100%; box-sizing: border-box; }
.cform-fill-sec { font-weight: 600; font-size: 13.5px; padding: 6px 0; border-bottom: 1px solid var(--line); margin-top: 4px; }
@media (max-width: 1100px) {
  .cform-layout { grid-template-columns: 1fr; }
  .cform-palette { display: flex; flex-wrap: wrap; }
  .cform-pal-hd { width: 100%; }
}

/* ============================================= 账套备份 / 账套恢复 */
.bk-form { border: 1px solid var(--line); border-radius: 4px; background: #fff; padding: 4px 16px 14px; margin-bottom: 18px; }
.bk-row { display: grid; grid-template-columns: 96px 1fr 96px 1fr; align-items: center; gap: 10px 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.bk-row:last-of-type { border-bottom: 0; }
.bk-lab { font-size: 12.5px; color: var(--text-2); text-align: right; }
.bk-lab i { color: #d6493f; font-style: normal; margin-right: 3px; }
.bk-ctl { min-width: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bk-ctl input[type=text], .bk-ctl input:not([type]), .bk-ctl input[type=number], .bk-ctl select {
  height: 30px; border: 1px solid var(--line); border-radius: 2px; padding: 0 8px; font-size: 12.5px; background: #fff; min-width: 0; flex: 1; }
.bk-ctl input[type=file] { font-size: 12.5px; color: var(--text-2); }
.bk-scopes { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 14px; }
.bk-scope { display: flex; align-items: baseline; gap: 6px; cursor: pointer; }
.bk-sc-lab { font-size: 12.5px; color: var(--text); white-space: nowrap; }
.bk-sc-desc { font-size: 11.5px; color: var(--text-3); }
.bk-actions { display: flex; align-items: center; gap: 12px; padding: 14px 0 4px; }
.bk-list { border: 1px solid var(--line); border-radius: 4px; background: #fff; overflow: hidden; margin-bottom: 18px; }
.bk-list-head { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: #fafbfd; font-size: 13px; font-weight: 600; color: var(--text); }
.bk-list .grid { margin: 0; }
.bk-ops { display: flex; gap: 12px; justify-content: center; }
.bk-ops .doc-link { cursor: pointer; }
.bk-radio { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text); cursor: pointer; }
.bk-warn { border: 1px solid #f0c36d; background: #fff9ec; color: #a35b00; font-size: 12.5px; line-height: 1.8;
  padding: 10px 14px; border-radius: 4px; margin: 6px 0 2px; }
.rs-kpi { display: flex; gap: 10px; flex-wrap: wrap; padding: 14px; border-bottom: 1px dashed var(--line); }
.rs-kpi-item { flex: 1; min-width: 150px; border: 1px solid var(--line); border-radius: 4px; padding: 9px 12px;
  display: flex; flex-direction: column; gap: 3px; background: #fbfcfe; }
.rs-kpi-item .k { font-size: 11.5px; color: var(--text-3); }
.rs-kpi-item .v { font-size: 15px; font-weight: 600; color: var(--text); }
.rs-cnt { display: flex; gap: 18px; flex-wrap: wrap; padding: 12px 14px; font-size: 12.5px; color: var(--text-2); }
.rs-cnt b { color: var(--text); font-weight: 600; margin-left: 3px; }

/* ============================================= 首页待审核单据穿透 */
.card.clickable { cursor: pointer; display: block; text-decoration: none; transition: box-shadow .15s, border-color .15s, transform .15s; }
.card.clickable:hover { box-shadow: 0 3px 12px rgba(16, 42, 74, .12); border-color: var(--blue-200); transform: translateY(-1px); }
.card.clickable:active { transform: translateY(0); }
.card-sub { margin-top: 6px; font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card.clickable:hover .card-sub { color: var(--blue-600); }
.dash-todo-panel { margin-top: 12px; }
.pd-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 0 10px; }
.pd-tab { height: 28px; padding: 0 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff;
  cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.pd-tab:hover { background: var(--tint); border-color: var(--blue-100); }
.pd-tab b { font-weight: 600; color: var(--text); margin-left: 2px; }
.pd-tab.on { background: var(--blue-050, #e8f1fb); border-color: var(--blue-200); color: var(--blue-700); font-weight: 600; }
.pd-tab.on b { color: var(--blue-700); }

/* ============================================ 单据字段设置：拖拽调整位置 */
.fd-drag { cursor: grab; color: #b6c2ce; user-select: none; font-size: 13px; line-height: 1; }
.fd-drag:active { cursor: grabbing; }
table.fd-table tbody tr.fd-dragging { opacity: .45; background: #f2f7fc; }
table.fd-table tbody tr.fd-over td { border-top: 2px solid var(--blue-500); }
table.fd-table tbody tr.fd-under td { border-bottom: 2px solid var(--blue-500); }

/* ------------------------------------------- 权限设置：分段控件 / 角色 / 数据范围 / 敏感权限 */
/* 分段控件（Tab 切换） */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; background: #fff; }
.seg-btn {
  height: 30px; padding: 0 14px; border: 0; border-right: 1px solid var(--line);
  background: #fff; color: var(--text-2); font-size: 12.5px; cursor: pointer;
}
.seg-btn:last-child { border-right: 0; }
.seg-btn:hover { background: #f2f7fc; color: var(--blue-700); }
.seg-btn.on { background: var(--blue-500); color: #fff; }
.seg-btn.on:hover { background: var(--blue-600); color: #fff; }

/* 角色面板 */
.role-panel .grid td { vertical-align: middle; }

/* 业务数据权限面板 */
.scope-panel .grid td { vertical-align: middle; }
.scope-panel input[type="date"] { border: 1px solid var(--line); border-radius: 2px; padding: 0 4px; font-size: 12px; }
.scope-panel select { border: 1px solid var(--line); border-radius: 2px; padding: 0 4px; font-size: 12.5px; }

/* 敏感数据权限面板 */
.sens-panel .grid td { vertical-align: middle; }
.sens-panel .grid td.center { text-align: center; }
.sens-panel .perm-item { gap: 4px; }

/* ------------------------------------------- 报表分页条（对齐截图样式） */
.rpt-pager {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 10px 4px 8px; margin-top: 4px; font-size: 12px; color: var(--text-2);
  border-top: 1px solid var(--line-2, #e8edf2); background: transparent;
}
.page > .rpt-pager,
.page > #rptPager.rpt-pager {
  /* 报表统一挂在 .page 最下方，与表格、侧栏分栏脱开 */
  flex: none; width: 100%; box-sizing: border-box;
}
.rpt-size { display: inline-flex; align-items: center; gap: 6px; }
.rpt-size select {
  height: 28px; min-width: 72px; border: 1px solid var(--line); border-radius: 2px;
  padding: 0 6px; font-size: 12.5px; background: #fff; color: var(--text-1); cursor: pointer;
}
.rpt-nav { display: inline-flex; align-items: center; gap: 4px; }
.rpt-btn {
  width: 26px; height: 26px; border: 1px solid var(--line); background: #fff;
  border-radius: 2px; cursor: pointer; color: var(--text-2); font-size: 13px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.rpt-btn:hover:not(:disabled) { border-color: var(--blue-500); color: var(--blue-700); background: #f2f7fc; }
.rpt-btn:disabled { color: #c2cbd4; cursor: default; background: #f7f9fb; }
.rpt-cur { color: var(--text-2); }
.rpt-input {
  width: 44px; height: 26px; border: 1px solid var(--line); border-radius: 2px;
  text-align: center; font-size: 12.5px; color: var(--text-1); background: #fff;
}
.rpt-input:focus { outline: none; border-color: var(--blue-500); }
.rpt-info { color: var(--text-3); }
#rptPager:empty { display: none; }
.rpt-export { margin-left: auto; }
.rpt-btn-wide {
  height: 26px; padding: 0 12px; border: 1px solid var(--line); background: #fff;
  border-radius: 2px; cursor: pointer; color: var(--text-2); font-size: 12px;
}
.rpt-btn-wide:hover { border-color: var(--blue-500); color: var(--blue-700); background: #f2f7fc; }

/* ------------------------------------------- 记账凭证（填制凭证） */
.vch-page { padding: 0 8px 16px; max-width: 1280px; }
.vch-layout { display: flex; gap: 0; align-items: stretch; min-height: 520px; }
.vch-attach {
  width: 148px; flex-shrink: 0; border: 1px solid #c5d4e4; border-right: 0;
  background: linear-gradient(180deg, #f8fbfe 0%, #eef4fa 100%);
  display: flex; flex-direction: column;
}
.vch-attach-hd {
  padding: 10px 8px; font-size: 12px; font-weight: 600; color: #3a5a7a;
  border-bottom: 1px solid #d8e3ef; text-align: center;
}
.vch-attach-body.dragover { background: #e8f4ff; outline: 2px dashed var(--blue-400); }
.vch-attach-item {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 4px 6px; margin: 4px 0; background: #f4f8fc; border-radius: 4px; font-size: 11px;
}
.vch-attach-item a { color: var(--blue-600); cursor: pointer; }
.vch-attach-body {
  flex: 1; margin: 10px 8px; border: 1px dashed #b8c9dc; border-radius: 4px;
  background: #fff; min-height: 200px; font-size: 11px; color: #9aabb8;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 8px;
}
.vch-attach-ft { padding: 8px; text-align: center; border-top: 1px solid #d8e3ef; }
.vch-attach-ft .btn { width: 100%; height: 30px; font-size: 12px; }
.vch-main { flex: 1; border: 1px solid #c5d4e4; background: #fff; display: flex; flex-direction: column; }
.vch-toolbar {
  display: flex; align-items: center; justify-content: flex-end; gap: 12px;
  padding: 6px 12px; border-bottom: 1px solid #e8eef4; font-size: 12px; color: #5a7a9a;
}
.vch-toolbar .vch-view-src { margin-right: auto; }
.vch-fs-ctrl {
  display: inline-flex; align-items: center; gap: 2px; color: #5a7a9a; user-select: none;
}
.vch-fs-ctrl .vch-fs-lab { margin-right: 2px; }
.vch-fs-ctrl .vch-fs-val {
  min-width: 32px; text-align: center; font-variant-numeric: tabular-nums; color: #2a4058;
}
.vch-fs-ctrl .linkish { min-width: 18px; font-size: 14px; line-height: 1; }
.vch-toolbar a, .vch-toolbar button.linkish {
  border: 0; background: none; color: #5a7a9a; cursor: pointer; font-size: 12px; padding: 0;
}
.vch-toolbar a:hover, .vch-toolbar button.linkish:hover { color: var(--blue-600); }
.vch-title-row {
  text-align: center; padding: 12px 16px 8px; position: relative;
}
.vch-title-row h2 {
  margin: 0; font-size: 22px; font-weight: 600; letter-spacing: 6px; color: #2a4058;
}
.vch-meta {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px 24px;
  padding: 0 16px 10px; font-size: 13px; color: #3a4c5e;
}
.vch-meta select, .vch-meta input[type="date"], .vch-meta input[type="number"], .vch-meta input[type="text"] {
  height: 28px; border: 1px solid #c5d4e4; border-radius: 2px; padding: 0 6px; font-size: 13px;
}
.vch-meta .vch-no { font-weight: 600; color: #2a4058; }
.vch-meta .vch-no input { width: 52px; text-align: center; }
.vch-sheet-wrap { flex: 1; overflow: auto; padding: 0 10px 8px; }
.vch-sheet-tools {
  display: flex; justify-content: flex-end; align-items: center; gap: 14px; padding: 4px 2px 6px; font-size: 12px;
}
.vch-col-tip { margin-right: auto; color: #9aabb8; font-size: 12px; }
.vch-sheet-tools .linkish {
  border: 0; background: none; color: #5a7a9a; cursor: pointer; font-size: 12px; padding: 0;
}
.vch-sheet-tools .linkish:hover { color: var(--blue-600); }
table.vch-sheet {
  width: 100%; border-collapse: collapse; table-layout: fixed;
  font-size: var(--vch-fs, 12.5px);
}
table.vch-sheet tbody tr.is-active { background: #f3f8fd; }
table.vch-sheet th, table.vch-sheet td { border: 1px solid #9eb6cc; padding: 0; vertical-align: middle; }
table.vch-sheet thead th {
  position: relative; overflow: visible;
  background: #f0f6fc; font-weight: 600; color: #3a5a7a; text-align: center;
  height: auto; min-height: 28px; font-size: 1em;
}
table.vch-sheet .vch-th-lab { display: inline-block; padding: 4px 10px; line-height: 1.3; }
table.vch-sheet .vch-habit-btn { margin-left: 6px; font-size: 0.86em; font-weight: 400; }
table.vch-sheet thead th .vch-col-resize {
  position: absolute; right: -3px; top: 0; width: 7px; height: 100%;
  cursor: col-resize; z-index: 4; background: transparent;
}
table.vch-sheet thead tr:first-child th.col-amt .vch-col-resize { height: 200%; }
table.vch-sheet thead th .vch-col-resize:hover,
table.vch-sheet thead th .vch-col-resize.on { background: rgba(37, 99, 160, .28); }
table.vch-sheet .col-seq { text-align: center; }
table.vch-sheet .col-op { text-align: center; }
table.vch-sheet td.col-aux {
  padding: 4px 8px; vertical-align: middle; font-size: 1em; color: #2a4058;
  word-break: break-all; line-height: 1.45;
}
table.vch-sheet td.col-aux.has-aux { cursor: pointer; background: #fbfcfe; }
table.vch-sheet td.col-aux.has-aux:hover { background: #eef5fc; outline: 1px solid var(--blue-100); outline-offset: -1px; }
table.vch-sheet td.col-aux.need-aux .vch-aux-disp.placeholder { color: var(--blue-600); }
.vch-aux-disp { word-break: break-all; line-height: 1.45; font-size: 1em; }
.vch-aux-disp.placeholder { color: #8aa0b5; }
.vch-aux-empty { display: block; text-align: center; color: #9aa7b4; }
.vch-aux-dlg-form { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px; }
.vch-aux-dlg-row {
  display: flex; align-items: center; gap: 10px; margin: 0; font-size: 13px; color: #3a4c5e;
}
.vch-aux-dlg-row > span { width: 72px; flex: none; text-align: right; }
.vch-aux-dlg-row .v-aux-dlg-combo { flex: 1; min-width: 0; }
.vch-aux-dlg-row .v-aux-dlg-combo .combo { width: 100%; }
.vch-aux-dlg-row .v-aux-dlg-num {
  flex: 1; height: 30px; border: 1px solid var(--line); border-radius: 3px;
  padding: 0 8px; font-size: 13px; background: #fff; outline: none;
}
.vch-aux-dlg-row .v-aux-dlg-num:focus { border-color: var(--blue-500); box-shadow: 0 0 0 2px rgba(30,110,215,.12); }

/* 科目辅助项批量补录 */
.aux-bf-batch {
  border: 1px solid #d5e3f0; border-radius: 4px; background: #f7fafd; padding: 8px 10px 10px;
}
.aux-bf-batch-hd {
  display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; font-size: 13px; color: #2a4058;
}
.aux-bf-batch-fields {
  display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: flex-end;
}
.aux-bf-batch-item {
  display: flex; flex-direction: column; gap: 3px; margin: 0; min-width: 150px; flex: 1 1 150px; max-width: 220px;
  font-size: 12px; color: #5a6d80;
}
.aux-bf-batch-item > span { line-height: 1.2; }
.aux-bf-batch-combo .combo { width: 100%; }
.aux-bf-batch-combo .combo input { height: 28px; font-size: 12.5px; }
.aux-bf-batch-num {
  height: 28px; border: 1px solid var(--line); border-radius: 4px; padding: 0 8px;
  font-size: 12.5px; background: #fff; outline: none;
}
.aux-bf-batch-num:focus { border-color: var(--blue-500); }
.aux-bf-batch-acts {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; align-items: center;
}
.aux-bf-batch-acts .btn { height: 28px; font-size: 12.5px; }
.aux-bf-grid th, .aux-bf-grid td { vertical-align: middle; }
.vch-amt-head {
  display: flex; border-bottom: 1px solid #9eb6cc; position: relative;
  --vch-u: calc(100% / 11);
  background-image:
    repeating-linear-gradient(to right, transparent 0, transparent calc(var(--vch-u) - 1px), #d8e2ec calc(var(--vch-u) - 1px), #d8e2ec var(--vch-u)),
    linear-gradient(to right, transparent calc(8 * var(--vch-u) - 0.5px), #c4b4b4 calc(8 * var(--vch-u) - 0.5px), #c4b4b4 calc(8 * var(--vch-u) + 0.5px), transparent calc(8 * var(--vch-u) + 0.5px)),
    linear-gradient(to right, transparent calc(9 * var(--vch-u) - 0.5px), #c4b4b4 calc(9 * var(--vch-u) - 0.5px), #c4b4b4 calc(9 * var(--vch-u) + 0.5px), transparent calc(9 * var(--vch-u) + 0.5px)),
    linear-gradient(to right, transparent calc(10 * var(--vch-u) - 0.5px), #c4b4b4 calc(10 * var(--vch-u) - 0.5px), #c4b4b4 calc(10 * var(--vch-u) + 0.5px), transparent calc(10 * var(--vch-u) + 0.5px));
}
.vch-amt-head span {
  flex: 1; text-align: center; font-size: 0.8em; font-weight: 500; color: #5a7088;
  line-height: 1.7; min-width: 0; border: 0; background: transparent;
}
.vch-amt-head span.yuan { color: #8a5c5c; font-weight: 700; }
table.vch-sheet tbody td input.vch-in {
  width: 100%; border: 0; background: transparent; height: 2.6em; min-height: 30px; padding: 0 6px;
  font-size: 1em; outline: none;
}
table.vch-sheet tbody td input.vch-in:focus { background: #fffde7; box-shadow: inset 0 0 0 1px var(--blue-400); }
/* 凭证科目模糊搜索：用自绘 combo，去掉原生 datalist / 默认边框黑边 */
table.vch-sheet .vch-subj-combo { width: 100%; height: 100%; }
table.vch-sheet .vch-subj-combo > input.vch-in {
  width: 100%; height: 2.6em; min-height: 30px; border: 0 !important; border-radius: 0; background: transparent;
  padding: 0 6px; font-size: 1em; outline: none !important; box-shadow: none;
}
table.vch-sheet .vch-subj-combo > input.vch-in:focus {
  background: #fffde7; box-shadow: inset 0 0 0 1px var(--blue-400) !important; outline: none !important;
}
table.vch-sheet .vch-subj-combo .combo-list {
  border: 1px solid #c5d4e4; border-radius: 4px;
  box-shadow: 0 8px 22px rgba(16, 42, 74, .14);
  background: #fff;
}
.vch-amt-block {
  position: relative; height: 2.6em; min-height: 30px; cursor: text; display: flex; align-items: stretch;
}
.vch-amt-cells {
  display: flex; flex: 1; height: 100%; pointer-events: none; position: relative;
  --vch-u: calc(100% / 11);
  background-image:
    repeating-linear-gradient(to right, transparent 0, transparent calc(var(--vch-u) - 1px), #d8e2ec calc(var(--vch-u) - 1px), #d8e2ec var(--vch-u)),
    linear-gradient(to right, transparent calc(8 * var(--vch-u) - 0.5px), #c4b4b4 calc(8 * var(--vch-u) - 0.5px), #c4b4b4 calc(8 * var(--vch-u) + 0.5px), transparent calc(8 * var(--vch-u) + 0.5px)),
    linear-gradient(to right, transparent calc(9 * var(--vch-u) - 0.5px), #c4b4b4 calc(9 * var(--vch-u) - 0.5px), #c4b4b4 calc(9 * var(--vch-u) + 0.5px), transparent calc(9 * var(--vch-u) + 0.5px)),
    linear-gradient(to right, transparent calc(10 * var(--vch-u) - 0.5px), #c4b4b4 calc(10 * var(--vch-u) - 0.5px), #c4b4b4 calc(10 * var(--vch-u) + 0.5px), transparent calc(10 * var(--vch-u) + 0.5px));
}
.vch-amt-cells .vch-cell {
  flex: 1; display: flex; align-items: center; justify-content: center;
  border: 0; font-size: 1.05em; font-weight: 600; color: #2a4058; min-width: 0; background: transparent;
  overflow: hidden;
}
.vch-amt-cells .vch-cell.yuan { color: #2a4058; }
.vch-amt-in {
  position: absolute; inset: 0; z-index: 2; width: 100%; height: 100%; cursor: text;
  font-size: 1.05em; border: 0; outline: none; background: transparent;
  text-align: right; padding: 0 10px; color: #2a4058;
  opacity: 0; caret-color: transparent;
}
.vch-amt-block:focus-within { background: #fffef5; }
.vch-amt-block:focus-within .vch-amt-in {
  opacity: 1;
  caret-color: #1f6fb2;
  background: rgba(255, 253, 231, 0.94);
  box-shadow: inset 0 0 0 1px var(--blue-400);
}
.vch-amt-block:focus-within .vch-amt-cells { opacity: 0.28; }
.vch-row-op { display: flex; flex-direction: column; gap: 2px; align-items: center; padding: 2px 0; }
.vch-row-op button {
  border: 0; background: none; color: #7a8fa3; cursor: pointer; font-size: 11px; line-height: 1; padding: 1px 3px;
}
.vch-row-op button:hover { color: var(--blue-600); }
.vch-add-row {
  width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--blue-500); color: #fff;
  cursor: pointer; font-size: 16px; line-height: 1; margin: 4px auto; display: block;
}
.vch-add-row:hover { background: var(--blue-600); }
table.vch-sheet tfoot td { background: #fff9e6; font-weight: 600; }
table.vch-sheet tfoot .vch-total-label { text-align: center; color: #3a4c5e; padding: 6px 8px; }
table.vch-sheet tfoot .vch-total-cn { text-align: left; padding: 6px 10px; font-size: 1.05em; color: #2a4058; }
.vch-foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  padding: 10px 14px; border-top: 1px solid #e8eef4; font-size: 12.5px; color: #5a7088;
}
.vch-foot-audit span { margin-right: 18px; }
.vch-foot-audit b { color: #2a4058; font-weight: 500; }
.vch-foot-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.vch-foot-btns .btn { height: 32px; padding: 0 16px; font-size: 13px; }
.vch-foot-btns .btn.primary { background: var(--blue-500); color: #fff; border-color: var(--blue-500); }
/* ------------------------------------------- 会计科目 */
.subj-kind-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px;
  padding: 8px 10px; background: #f7fafc; border: 1px solid var(--line-2); border-radius: 3px;
}
.subj-kind-btn {
  border: 1px solid transparent; background: transparent; cursor: pointer; padding: 6px 14px;
  border-radius: 2px; font-size: 13px; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px;
}
.subj-kind-btn:hover { background: #eef4fa; color: var(--blue-600); }
.subj-kind-btn.on { background: #fff; border-color: var(--blue-400); color: var(--blue-600); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.subj-kind-cnt { font-size: 11px; color: var(--text-3); font-weight: 400; }
table.subj-grid tbody tr.selected { background: #e8f2fb; }
.subj-aux-tag {
  display: inline-block; margin: 1px 4px 1px 0; padding: 0 6px; font-size: 11.5px; line-height: 20px;
  border-radius: 2px; background: #e8f2fb; color: #1f6fb2; border: 1px solid #b8d4ef;
}
.subj-aux-chks { display: flex; flex-wrap: wrap; gap: 8px 14px; padding: 4px 0; }
.subj-aux-chk { font-size: 12.5px; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
.subj-aux-chk.is-locked { color: #6a7a8a; cursor: default; }
.subj-aux-chk.is-locked input { cursor: not-allowed; }
.subj-aux-lock {
  font-size: 10.5px; color: #c0392b; background: #fdecea; border-radius: 2px;
  padding: 0 4px; line-height: 16px; margin-left: 2px;
}
.subj-tree-btn { border: 0; background: none; cursor: pointer; color: #5a7088; font-size: 12px; padding: 0 4px; }
.subj-row-op button { border: 0; background: none; cursor: pointer; color: #7a8fa3; margin: 0 2px; font-size: 13px; }
.subj-row-op button:hover { color: var(--blue-600); }
.subj-aux-group { margin-top: 2px; }
.subj-aux-opt-grid td { padding: 6px 8px; font-size: 12.5px; }
/* 科目表列宽拖拽：手柄贴在列头右边线（th 自身是 sticky 定位，overflow:hidden 内不越界） */
table.subj-grid thead th .subj-col-resize {
  position: absolute; right: 0; top: 0; width: 8px; height: 100%;
  cursor: col-resize; z-index: 4; background: transparent;
}
table.subj-grid thead th .subj-col-resize:hover,
table.subj-grid thead th .subj-col-resize.on { background: rgba(37, 99, 160, .28); }
.subj-rule-tip {
  margin-bottom: 10px; padding: 8px 10px; font-size: 12.5px; line-height: 1.7;
  background: #f2f8fd; border: 1px solid #cfe3f5; border-radius: 3px; color: #31536f;
}
/* ------------------------------------------- 新增资产表单 */
.fa-asset-page { padding: 0 12px 80px; max-width: 1180px; }
.fa-asset-page .page-head { margin-bottom: 8px; }
.fa-section {
  border: 1px solid var(--line, #d8e3ef); background: #fff; margin-bottom: 12px; border-radius: 2px;
}
.fa-section-hd {
  padding: 8px 14px; font-size: 13px; font-weight: 600; color: #3a5a7a;
  background: linear-gradient(180deg, #f4f8fc 0%, #eef4fa 100%);
  border-bottom: 1px solid #dce6f0;
}
.fa-section-bd { padding: 12px 14px 6px; }
.fa-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 16px;
}
@media (max-width: 1100px) { .fa-grid { grid-template-columns: repeat(2, 1fr); } }
.fa-item label {
  display: block; font-size: 12px; color: #5a7088; margin-bottom: 4px;
}
.fa-item label i.req { color: #e74c3c; font-style: normal; margin-right: 2px; }
.fa-item input, .fa-item select, .fa-item textarea {
  width: 100%; height: 30px; border: 1px solid #c5d4e4; border-radius: 2px;
  padding: 0 8px; font-size: 12.5px; box-sizing: border-box;
}
.fa-item textarea { height: 56px; padding: 6px 8px; resize: vertical; }
.fa-item.span2 { grid-column: span 2; }
.fa-item.span4 { grid-column: 1 / -1; }
.fa-item .err { color: #e74c3c; font-size: 11px; margin-top: 2px; display: none; }
.fa-item.invalid input, .fa-item.invalid select { border-color: #e74c3c; }
.fa-item.invalid .err { display: block; }
.fa-attach-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 14px;
  border: 1px solid var(--line); background: #fafbfc; margin-bottom: 12px;
}
.fa-foot-bar {
  position: sticky; bottom: 0; z-index: 5; display: flex; justify-content: flex-end; gap: 10px;
  padding: 12px 16px; background: #fff; border-top: 1px solid var(--line);
  box-shadow: 0 -2px 8px rgba(0,0,0,.04);
}
.fa-foot-bar .btn.primary { background: var(--blue-500); color: #fff; border-color: var(--blue-500); }
.fa-foot-bar .btn.outline { color: var(--blue-600); border-color: var(--blue-400); background: #fff; }

.dialog-body.vch-dlg-body { padding: 0; }
.vch-view-embed { padding: 0; }
.vch-view-embed .vch-layout { min-height: 400px; }
.vch-view-embed .vch-main { border: 0; border-radius: 0; }
.vch-view-embed .vch-attach { border-radius: 0; }
.vch-meta-ro { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 18px; padding: 8px 12px 10px; border-bottom: 1px solid #d8e3ef; }
.vch-meta-ro span { font-size: 13px; color: #3a4c5e; }
.vch-meta-ro b { color: #2a4058; font-weight: 600; }
.vch-view-src { font-size: 12px; color: #5a6b7c; }
.vch-view-src .doc-link { font-weight: 500; }
.vch-ro-text { padding: 5px 7px; min-height: 2.4em; font-size: 1em; line-height: 1.35; color: #2a4058; word-break: break-word; }
table.vch-sheet-view tbody td.col-seq { text-align: center; vertical-align: middle; color: #5a6b7c; }
.vch-amt-block.is-ro { min-height: 30px; }
.vch-amt-block.is-ro .vch-amt-cells { min-height: 28px; }
.vch-ro-empty { text-align: center; padding: 16px !important; }
.vch-attach-view { min-height: 120px; }

@media print {
  body.vch-printing .vch-attach, body.vch-printing .vch-toolbar, body.vch-printing .vch-foot-btns,
  body.vch-printing .topbar, body.vch-printing .sidebar, body.vch-printing .tabbar,
  body.vch-printing .actionbar, body.vch-printing .vch-row-op, body.vch-printing .col-op { display: none !important; }
  body.vch-printing .vch-layout { display: block; }
  body.vch-printing .vch-main { border: 0; box-shadow: none; }
  body.vch-printing .vch-page { max-width: none; padding: 0; }
  body.vch-printing .vch-amt-in { opacity: 0; position: absolute; pointer-events: none; }
  body.vch-printing .vch-col-resize, body.vch-printing .vch-fs-ctrl,
  body.vch-printing .vch-col-tip, body.vch-printing [data-vch-col-reset] { display: none !important; }
  body.vch-printing table.vch-sheet { width: 100% !important; min-width: 0 !important; }
}

/* ================= 界面细化（借鉴 RuoYi Office Vben / Ant Design 列表页，保留 AI+ 配色） ================= */
:root {
  --radius: 4px;
  --radius-card: 8px;
  --shadow: 0 1px 2px rgba(20, 40, 70, .06);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .03), 0 1px 6px rgba(0, 0, 0, .04);
  --content-bg: #f0f2f5;
}
body { background: var(--content-bg); }
.topbar { box-shadow: 0 1px 4px rgba(0, 21, 41, .08); }
.topbar .logo .mark { border-radius: 6px; box-shadow: 0 1px 0 rgba(0, 0, 0, .08); }
.topbar .acc { border-radius: 12px; }
.topbar .tb-btn { border-radius: 4px; }
.actionbar { background: #fff; height: 42px; border-bottom: 1px solid #eef0f3; }
.act { border-radius: 4px; transition: background .12s, border-color .12s, color .12s; }
.act.primary { box-shadow: inset 0 0 0 1px var(--blue-100); }
.sidebar { background: #fff; width: 220px; border-right: 1px solid #eef0f3; }
.sidebar-head { background: #fafbfc; height: 36px; font-weight: 600; letter-spacing: .2px; }
.tree-l1.active { box-shadow: inset 3px 0 0 var(--blue-600); background: var(--blue-050); }
.tree-l2.active { background: var(--blue-050); }
.tabs {
  background: #fff; height: 38px; border-bottom: 1px solid #eef0f3;
  padding: 0 8px; gap: 2px;
}
.tab {
  border-radius: 4px 4px 0 0; background: transparent; color: var(--text-2);
  transition: color .12s, background .12s; margin-top: 6px; height: 32px;
}
.tab:hover { color: var(--blue-600); background: #f5f7fa; }
.tab.active {
  background: #fff; color: var(--blue-600); font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--blue-600);
}
.content { background: var(--content-bg); }
.page { padding: 12px 14px 18px; }
.page-list .page-head { margin-bottom: 10px; }
.page-title { letter-spacing: .2px; font-size: 16px; font-weight: 600; color: #1e2c3a; }
.page-desc { margin-top: 4px; color: var(--text-3); font-size: 12px; line-height: 1.5; max-width: 720px; }

/* Vben DocAlert：列表页顶部说明条 */
.page-alert {
  display: flex; align-items: center; gap: 8px;
  min-height: 34px; margin: 0 0 12px; padding: 6px 12px;
  border: 1px solid var(--blue-100); border-radius: 6px;
  background: rgba(46, 134, 207, .08); color: var(--blue-700); font-size: 13px;
}
.page-alert .pa-ico { flex: none; font-size: 15px; opacity: .9; }
.page-alert .pa-body { flex: 1; min-width: 0; line-height: 1.45; }
.page-alert .pa-body b { font-weight: 600; margin-right: 4px; }
.page-alert .pa-close {
  flex: none; border: 0; background: transparent; color: var(--blue-600);
  font-size: 16px; line-height: 1; cursor: pointer; padding: 2px 4px; border-radius: 4px;
}
.page-alert .pa-close:hover { color: var(--red); background: rgba(217, 75, 75, .08); }

/* 筛选区：白底卡片 + 字段组 + 右侧操作（Vben Search Form） */
.filterbar, .qpanel {
  background: #fff; border: 1px solid #eef0f3; border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
}
.filterbar.filter-card {
  display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap;
  gap: 10px 16px; padding: 14px 16px 12px; margin-bottom: 12px;
}
.filterbar.filter-card.collapsed {
  padding: 8px 16px; align-items: center;
}
.filterbar.filter-card.collapsed .filter-fields { display: none; }
.filterbar.filter-card.collapsed .filter-acts .btn:not(.linkish) { display: none; }
.filter-fields { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: flex-end; flex: 1; min-width: 0; }
.filter-fields .ff { display: flex; flex-direction: column; gap: 5px; }
.filter-fields .ff > label {
  font-size: 12px; color: var(--text-2); font-weight: 500; line-height: 1;
}
.filter-fields .ff input,
.filter-fields .ff select {
  height: 32px; border: 1px solid #d9dee6; border-radius: 6px; padding: 0 10px;
  background: #fff; color: #2b3d4f; min-width: 120px; transition: border-color .15s, box-shadow .15s;
}
.ff-range { display: flex; align-items: center; gap: 6px; }
.ff-range span { color: var(--text-3); font-size: 12px; }
/* 列表页日期范围快捷切换：本月 / 近三月 / 本年 / 全部（补录历史单据时列表默认只筛本月） */
.ff-chips { display: inline-flex; align-items: center; gap: 4px; margin-left: 8px; }
.ff-chips .btn.chip {
  height: 24px; padding: 0 10px; font-size: 12px; border-radius: 12px;
  background: #fff; color: var(--text-2); border: 1px solid var(--line);
}
.ff-chips .btn.chip:hover { border-color: var(--blue-400); color: var(--blue-600); background: #f2f7ff; }
/* 列表查不到单据时的日期范围提示 */
.range-tip {
  margin: 8px 0 0; padding: 9px 12px; border-radius: 6px;
  background: #fff8e6; border: 1px solid #f0d9a4; color: #6b5316; font-size: 12px; line-height: 1.7;
}
.range-tip b { color: #8a6a1a; }
.range-tip span { display: block; color: #7a6a45; }
.filter-acts { display: flex; align-items: center; gap: 8px; flex: none; padding-bottom: 1px; }
.filter-acts .btn { height: 32px; padding: 0 14px; border-radius: 6px; }

/* 列表面板：工具条 + 表格同一卡片（Vben VxeGrid） */
.list-panel {
  background: #fff; border: 1px solid #eef0f3; border-radius: var(--radius-card);
  box-shadow: var(--shadow-card); overflow: hidden;
}
.list-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  min-height: 48px; padding: 8px 14px; border-bottom: 1px solid #f0f2f5;
  background: #fff;
}
.lt-left { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; min-width: 0; }
.lt-title { font-size: 14px; font-weight: 600; color: #1f2d3d; }
.lt-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lt-tools { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.list-panel > .grid-box,
.list-panel #gridBox > .grid-box {
  border: 0; border-radius: 0; box-shadow: none; background: transparent;
}
.list-panel .grid-info {
  border-top: 1px solid #f0f2f5; background: #fafbfc; padding: 8px 14px;
}

.grid-box { background: #fff; border: 1px solid #eef0f3; border-radius: var(--radius-card); box-shadow: var(--shadow-card); overflow: hidden; }
.grid-wrap { border: 0; }
table.grid thead th { background: #fafbfc; font-weight: 600; color: #3a4d5f; border-bottom-color: #eef0f3; }
table.grid tbody tr:hover { background: #f5f9fd; }
table.grid tbody tr:hover td { background: #f5f9fd; }
table.grid tbody tr.selected { background: #e8f2fb; }
table.grid tbody tr.selected td { background: #e8f2fb; }
.btn { border-radius: 6px; transition: background .12s, border-color .12s, color .12s, box-shadow .12s; }
.btn.primary { box-shadow: 0 1px 0 rgba(0, 0, 0, .04); }
.btn.ghost {
  background: transparent; border-color: transparent; color: var(--text-2); padding: 0 10px; min-width: 32px;
}
.btn.ghost:hover { background: #f5f7fa; color: var(--blue-700); border-color: transparent; }
.btn.ghost.ico { width: 32px; height: 32px; padding: 0; font-size: 15px; }
.btn.linkish {
  background: transparent; border-color: transparent; color: var(--blue-600); padding: 0 6px;
  height: 32px; box-shadow: none;
}
.btn.linkish:hover { color: var(--blue-700); background: transparent; border-color: transparent; }

/* 行内操作链（Vben TableAction link） */
.op-links { display: inline-flex; align-items: center; gap: 0; white-space: nowrap; }
.op-link {
  color: var(--blue-600); text-decoration: none; font-size: 12.5px; padding: 0 4px;
  border-radius: 2px;
}
.op-link:hover { color: var(--blue-700); text-decoration: underline; }
.op-link.danger { color: var(--red); }
.op-sep {
  display: inline-block; width: 1px; height: 12px; background: #e4e8ee; margin: 0 2px;
  vertical-align: middle;
}

/* Tag：Ant Design 轻量徽标 */
.tag {
  display: inline-block; padding: 0 8px; border-radius: 4px; font-size: 12px; line-height: 20px;
  border: 0 !important;
}
.tag.pending { background: #fff7e6; color: #d48806; }
.tag.audited { background: #f6ffed; color: #389e0d; }
.tag.closed { background: #f5f5f5; color: #8c8c8c; }
.tag.in { background: var(--blue-050); color: var(--blue-700); }

/* 空状态 */
.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 24px; text-align: center; color: var(--text-3);
}
.empty-state.compact { padding: 28px 16px; }
.empty-ico {
  width: 64px; height: 48px; margin-bottom: 12px; border-radius: 8px;
  background: linear-gradient(180deg, #f0f2f5 0%, #e4e8ee 100%);
  position: relative; box-shadow: inset 0 0 0 1px #d9dee6;
}
.empty-ico::before {
  content: ''; position: absolute; left: 12px; right: 12px; top: 12px; height: 7px;
  border-radius: 2px; background: #c9d0d9;
}
.empty-ico::after {
  content: ''; position: absolute; left: 12px; width: 24px; bottom: 12px; height: 7px;
  border-radius: 2px; background: #b8c0cb;
}
.empty-title { font-size: 14px; font-weight: 500; color: #8b98a6; margin-bottom: 4px; }
.empty-sub { font-size: 12px; color: #a8b2bd; max-width: 280px; line-height: 1.5; }
.grid-empty.empty-state { padding: 64px 24px; }

/* 首页卡片：更接近 Vben 工作台 */
.dash { padding: 14px; }
.dash-hero {
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 18px 22px;
}
.cards { gap: 14px; }
.card {
  border-radius: var(--radius-card); border-color: #eef0f3;
  box-shadow: var(--shadow-card); padding: 14px 16px;
}
.card .bar { width: 3px; border-radius: 0 2px 2px 0; }
.panel { border-radius: var(--radius-card); border-color: #eef0f3; box-shadow: var(--shadow-card); }
.panel-head { height: 40px; padding: 0 14px; }

.dialog { border-radius: 8px; box-shadow: 0 16px 48px rgba(12, 28, 48, .22); }
.dialog-head { border-radius: 8px 8px 0 0; }
.filterbar input:focus, .filterbar select:focus, .qpanel input:focus, .qpanel select:focus,
.form-item input:focus, .form-item select:focus, .form-item textarea:focus,
.field input:focus, .field select:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px rgba(46, 134, 207, .12);
}
.tile-menu { border-radius: 8px; box-shadow: var(--shadow); }
.toast { border-radius: 6px; box-shadow: 0 8px 24px rgba(20, 40, 70, .16); }

@media (max-width: 900px) {
  .filterbar.filter-card { flex-direction: column; align-items: stretch; }
  .filter-acts { justify-content: flex-end; }
  .list-toolbar { flex-direction: column; align-items: stretch; }
  .lt-left { flex-direction: column; align-items: flex-start; }
  .lt-tools { margin-left: 0; }
}

/* ---- SVG 图标 / 统计图表（借鉴 Vben SvgIcon + EchartsUI） ---- */
.ico { display: inline-block; vertical-align: -3px; flex: none; }
.panel-head .ico { margin-right: 4px; color: var(--blue-600); }

.ov-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 14px;
}
.ov-card {
  display: block; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid #eef0f3; border-radius: 8px;
  box-shadow: var(--shadow-card); padding: 14px 16px 12px;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.ov-card:hover { border-color: var(--blue-100); box-shadow: 0 4px 14px rgba(20, 50, 90, .08); transform: translateY(-1px); }
.ov-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ov-title { font-size: 14px; font-weight: 600; color: #2b3d4f; }
.ov-ico {
  width: 40px; height: 40px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.ov-card .ov-ico { background: var(--blue-050); color: var(--blue-600); }
.ov-card.tone-cyan .ov-ico { background: #e6f7ff; color: #0891b2; }
.ov-card.tone-orange .ov-ico { background: #fff7e6; color: #d48806; }
.ov-card.tone-green .ov-ico { background: #f6ffed; color: #389e0d; }
.ov-value {
  font-size: 22px; font-weight: 700; color: #1c2b38; margin: 10px 0 12px;
  font-variant-numeric: tabular-nums; letter-spacing: -.3px;
}
.ov-foot {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 10px; border-top: 1px solid #f0f2f5;
  font-size: 12px; color: var(--text-3);
}
.ov-foot b { color: #2b3d4f; font-weight: 600; font-variant-numeric: tabular-nums; }

.ov-mini {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px;
}
.ov-mini-card {
  display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid #eef0f3; border-radius: 8px;
  box-shadow: var(--shadow-card); padding: 12px 14px;
  transition: border-color .15s, box-shadow .15s;
}
.ov-mini-card:hover { border-color: var(--blue-100); }
.ov-mini-card .k { font-size: 12px; color: var(--text-2); }
.ov-mini-card .v { font-size: 18px; font-weight: 700; color: #1c2b38; margin-top: 2px; font-variant-numeric: tabular-nums; }
.ov-mini-card .v small { font-size: 12px; font-weight: 400; color: var(--text-3); }
.ov-mini-card .ov-ico {
  width: 36px; height: 36px; border-radius: 9px;
}
.ov-ico.tone-blue { background: var(--blue-050); color: var(--blue-600); }
.ov-ico.tone-orange { background: #fff7e6; color: #d48806; }
.ov-ico.tone-green { background: #f6ffed; color: #389e0d; }
.ov-ico.tone-purple { background: #f9f0ff; color: #722ed1; }

.chart-panels { grid-template-columns: 1fr 1fr; }
.chart-body { padding: 8px 10px 12px !important; }
.chart-box { width: 100%; }
.chart-svg { width: 100%; height: 220px; display: block; }
.ch-grid { stroke: #eef0f3; stroke-width: 1; }
.ch-axis { fill: #8b98a6; font-size: 11px; font-family: inherit; }

.hbar-chart { display: flex; flex-direction: column; gap: 8px; padding: 4px 2px 8px; }
.hbar-row { display: grid; grid-template-columns: 140px 1fr 88px; gap: 10px; align-items: center; }
.hbar-lab { font-size: 12px; color: #3a4d5f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar-track { height: 10px; background: #f0f2f5; border-radius: 5px; overflow: hidden; }
.hbar-track i { display: block; height: 100%; border-radius: 5px; min-width: 2px; }
.hbar-val { font-size: 12px; text-align: right; color: #2b3d4f; font-variant-numeric: tabular-nums; }

.stat-viewbar { display: flex; gap: 6px; margin-bottom: 10px; }
.btn.sm { height: 28px; padding: 0 12px; font-size: 12px; border-radius: 4px; }
.btn.sm.on { background: var(--blue-600); border-color: var(--blue-600); color: #fff; }
.stat-chart-wrap { background: #fff; border: 1px solid #eef0f3; border-radius: 8px; padding: 12px 14px; }
.stat-chart-tip { font-size: 12px; color: var(--text-3); margin-bottom: 10px; }

@media (max-width: 1100px) {
  .ov-grid, .ov-mini { grid-template-columns: repeat(2, 1fr); }
  .chart-panels { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ov-grid, .ov-mini { grid-template-columns: 1fr; }
  .hbar-row { grid-template-columns: 90px 1fr 72px; }
}

/* 打印管理 */
.print-manage-page .pm-grid td.pm-mod {
  font-weight: 600; color: #1e2c3a; background: var(--bg-sub, #f9fafb);
  vertical-align: middle; text-align: center;
}
.print-manage-page .pm-grid tbody tr:hover { background: #f0f7ff; }
.print-manage-page .pm-grid input[type="number"]:disabled { background: #f3f5f8; color: #9aa4b2; }

/* 智能凭证中心 */
.sv-cards { display: flex; gap: 20px; flex-wrap: wrap; margin-top: 8px; }
.sv-card {
  flex: 1 1 360px; max-width: 480px; background: #fff; border: 1px solid var(--line);
  border-radius: 8px; box-shadow: var(--shadow); padding: 20px 20px 14px; position: relative;
}
.sv-ico {
  width: 48px; height: 48px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 18px; color: #fff; margin-bottom: 12px;
}
.sv-ico-cal { background: linear-gradient(135deg, #3db8d0, #2a9bb0); }
.sv-ico-doc { background: linear-gradient(135deg, #4aa3e0, #2f7fbf); }
.sv-title { font-size: 16px; font-weight: 700; color: #1e2c3a; margin-bottom: 6px; }
.sv-sub { font-weight: 500; color: #5a6a7a; font-size: 14px; }
.sv-stat { font-size: 13px; color: #5a6a7a; margin-bottom: 14px; }
.sv-stat b { color: #1e2c3a; font-size: 15px; }
.sv-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.sv-foot { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12px; color: #8a96a3; line-height: 1.5; }
.sv-gen { display: flex; gap: 0; min-height: calc(100vh - 220px); background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.sv-side {
  width: 200px; flex: none; border-right: 1px solid var(--line); background: #f7f9fc;
  overflow: auto; padding: 8px 0;
}
.sv-side .sv-t {
  padding: 7px 14px; cursor: pointer; font-size: 13px; color: #3a4a5a;
}
.sv-side .sv-t:hover { background: #eef3f9; }
.sv-side .sv-t.on { background: #e3f0fb; color: var(--blue-700); font-weight: 600; box-shadow: inset 3px 0 0 var(--blue-600); }
.sv-g-t { padding: 10px 14px 4px; font-size: 12px; color: #8a96a3; font-weight: 600; }
.sv-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sv-main .subtabs { padding: 0 12px; border-bottom: 1px solid var(--line); }
.sv-main .filterbar { margin: 0; border: 0; border-radius: 0; box-shadow: none; border-bottom: 1px solid var(--line); }
.sv-main #sv-grid { flex: 1; overflow: auto; padding: 10px 12px; }

/* ============ 辅助余额表（对齐畅捷通 T+ 版式） ============ */
.auxbal-page { display: flex; flex-direction: column; }
.auxbal-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--line); margin-bottom: 10px; min-height: 34px;
}
.auxbal-tabs { display: flex; align-items: stretch; gap: 2px; flex-wrap: wrap; }
.auxbal-tab {
  border: 0; background: transparent; cursor: pointer; padding: 7px 14px 9px;
  font: 600 13px/1 var(--font); color: var(--text-2); position: relative; white-space: nowrap;
}
.auxbal-tab:hover { color: var(--blue-600); }
.auxbal-tab.on { color: var(--blue-700); }
.auxbal-tab.on::after {
  content: ""; position: absolute; left: 8px; right: 8px; bottom: 0; height: 3px;
  background: var(--blue-600); border-radius: 2px 2px 0 0;
}
.auxbal-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.auxbal-tool-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.auxbal-tbtn {
  border: 0; background: transparent; cursor: pointer; font-size: 12px; color: var(--text-2);
  padding: 4px 6px; border-radius: 3px; white-space: nowrap;
}
.auxbal-tbtn:hover { background: var(--tint); color: var(--blue-600); }

.auxbal-main { display: flex; gap: 10px; align-items: flex-start; }
.auxbal-left { flex: 1; min-width: 0; }
.auxbal-period {
  width: 104px; flex: none; border: 1px solid var(--line); border-radius: 4px;
  background: #fff; padding: 8px 6px; box-shadow: 0 1px 2px rgba(20, 40, 70, .04);
}
.auxbal-period-hd { font-size: 12px; font-weight: 600; color: var(--text); text-align: center; padding-bottom: 8px; border-bottom: 1px solid var(--line-2); margin-bottom: 8px; }
.auxbal-period-year { display: flex; align-items: center; justify-content: space-between; gap: 2px; margin-bottom: 8px; }
.auxbal-period-year button { border: 0; background: transparent; cursor: pointer; color: var(--text-2); font-size: 14px; padding: 0 2px; }
.auxbal-period-year button:hover { color: var(--blue-600); }
.auxbal-period-year input { width: 56px; border: 1px solid var(--line); border-radius: 3px; font-size: 12px; text-align: center; padding: 2px 0; color: var(--text); background: #fff; }
.auxbal-period-months { display: flex; flex-direction: column; gap: 2px; max-height: calc(100vh - 260px); overflow: auto; }
.auxbal-month {
  border: 0; background: transparent; cursor: pointer; font-size: 12px; color: var(--text-2);
  padding: 4px 8px; border-radius: 12px; text-align: center;
}
.auxbal-month:hover { background: var(--tint); color: var(--blue-600); }
.auxbal-month.on { background: var(--blue-600); color: #fff; font-weight: 600; }

.auxbal-filter {
  border: 1px solid var(--line); border-radius: 4px; background: #fff;
  padding: 8px 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 7px;
  box-shadow: 0 1px 2px rgba(20, 40, 70, .04);
}
.auxbal-frow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 26px; }
.auxbal-lb { font-size: 12px; color: var(--text-2); white-space: nowrap; min-width: 52px; }
.auxbal-lb#lb-aux2 { min-width: auto; }
.auxbal-sel, .auxbal-inp {
  height: 24px; border: 1px solid var(--line); border-radius: 3px; background: #fff;
  font-size: 12px; color: var(--text); padding: 0 6px; min-width: 110px;
}
.auxbal-sel:focus, .auxbal-inp:focus { outline: none; border-color: var(--blue-500); }
.auxbal-sel-aux { min-width: 170px; }
.auxbal-sel-sm { min-width: 76px; }
.auxbal-dash { color: var(--text-3); font-size: 12px; padding: 0 2px; }
.auxbal-fill { flex: 1; min-width: 8px; }
.auxbal-flat { font-size: 12px; color: var(--text-2); border: 1px solid var(--line); border-radius: 3px; padding: 3px 10px; background: #fafbfd; }
.auxbal-ico { color: var(--text-3); font-size: 13px; cursor: default; }
.auxbal-query, .auxbal-reset { height: 24px !important; padding: 0 14px !important; }
.auxbal-settings { border-top: 1px dashed var(--line-2); padding-top: 7px; }
.auxbal-set { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.auxbal-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.auxbal-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.auxbal-sw { width: 30px; height: 16px; border-radius: 9px; background: #c9d2dc; position: relative; transition: background .15s; flex: none; }
.auxbal-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left .15s; }
.auxbal-switch input:checked + .auxbal-sw { background: var(--green); }
.auxbal-switch input:checked + .auxbal-sw::after { left: 16px; }

.auxbal-grid-wrap { border: 1px solid var(--line); border-radius: 4px; background: #fff; overflow: auto; max-height: calc(100vh - 300px); }
.auxbal-grid { width: 100%; min-width: 1080px; }
.auxbal-grid thead th { text-align: center; white-space: nowrap; }
.auxbal-grid thead th[rowspan] { vertical-align: middle; background: var(--thead); }
.auxbal-grid thead tr:nth-child(2) th { background: #f7fafd; font-weight: 500; }
.auxbal-grid td.num, .auxbal-grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
.auxbal-gear { width: 34px; text-align: center; color: var(--text-3); }
.auxbal-c-aux { min-width: 180px; }
.auxbal-c-sub { min-width: 170px; }
.auxbal-exp { border: 0; background: transparent; cursor: pointer; color: var(--blue-600); font-size: 12px; padding: 2px 4px; }
.auxbal-exp:hover { color: var(--blue-800); }
.auxbal-parent td { background: var(--tint); font-weight: 600; }
.auxbal-parent:hover td { background: var(--tint-2); }
.auxbal-child td { background: #fff; }
.auxbal-child:hover td { background: var(--rows-hover); }
.auxbal-indent { padding-left: 22px !important; }
.auxbal-total td { font-weight: 600; background: #f4f8fc; }
.auxbal-grid tfoot td { border-top: 2px solid var(--line); }

/* ============ 余额表「显示辅助核算」（对齐畅捷通 T+ 余额表版式） ============ */
.balaux-page { display: flex; flex-direction: column; }
.balaux-top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-bottom: 1px solid var(--line); margin-bottom: 10px; min-height: 34px;
}
.balaux-top-left { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.balaux-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.balaux-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.balaux-tbtn {
  border: 0; background: transparent; cursor: pointer; font-size: 12px; color: var(--text-2);
  padding: 4px 6px; border-radius: 3px; white-space: nowrap;
}
.balaux-tbtn:hover { background: var(--tint); color: var(--blue-600); }
.balaux-switch { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.balaux-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.balaux-sw { width: 30px; height: 16px; border-radius: 9px; background: #c9d2dc; position: relative; transition: background .15s; flex: none; }
.balaux-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: left .15s; }
.balaux-switch input:checked + .balaux-sw { background: var(--green); }
.balaux-switch input:checked + .balaux-sw::after { left: 16px; }

.balaux-filter {
  border: 1px solid var(--line); border-radius: 4px; background: #fff;
  padding: 8px 12px; margin-bottom: 10px; display: flex; flex-direction: column; gap: 7px;
  box-shadow: 0 1px 2px rgba(20, 40, 70, .04);
}
.balaux-frow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; min-height: 26px; }
.balaux-lb { font-size: 12px; color: var(--text-2); white-space: nowrap; min-width: 52px; }
.balaux-sel, .balaux-inp {
  height: 24px; border: 1px solid var(--line); border-radius: 3px; background: #fff;
  font-size: 12px; color: var(--text); padding: 0 6px; min-width: 110px;
}
.balaux-sel:focus, .balaux-inp:focus { outline: none; border-color: var(--blue-500); }
.balaux-sel-sm { min-width: 82px; }
.balaux-inp-num { min-width: 84px; width: 84px; }
.balaux-dash { color: var(--text-3); font-size: 12px; padding: 0 2px; }
.balaux-fill { flex: 1; min-width: 8px; }
.balaux-flat { font-size: 12px; color: var(--text-2); border: 1px solid var(--line); border-radius: 3px; padding: 3px 10px; background: #fafbfd; }
.balaux-ico { color: var(--text-3); font-size: 13px; cursor: default; }
.balaux-query, .balaux-reset { height: 24px !important; padding: 0 14px !important; }
.balaux-more { border: 0; background: transparent; cursor: pointer; color: var(--blue-600); font-size: 12px; white-space: nowrap; }
.balaux-more:hover { color: var(--blue-800); text-decoration: underline; }
.balaux-settings { border-top: 1px dashed var(--line-2); padding-top: 7px; }
.balaux-set { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); cursor: pointer; white-space: nowrap; }

.balaux-grid-wrap { border: 1px solid var(--line); border-radius: 4px; background: #fff; overflow: auto; max-height: calc(100vh - 300px); }
.balaux-grid { width: 100%; min-width: 940px; }
.balaux-grid thead th { text-align: center; white-space: nowrap; }
.balaux-grid thead th[rowspan] { vertical-align: middle; background: var(--thead); }
.balaux-grid thead tr:nth-child(2) th { background: #f7fafd; font-weight: 500; }
.balaux-grid td.num, .balaux-grid th.num { text-align: right; font-variant-numeric: tabular-nums; }
.balaux-gear { width: 34px; text-align: center; color: var(--text-3); }
.balaux-c-code { min-width: 96px; }
.balaux-c-name { min-width: 190px; }
.balaux-c-dir { min-width: 48px; text-align: center; }
.balaux-exp { border: 0; background: transparent; cursor: pointer; color: var(--blue-600); font-size: 12px; padding: 2px 4px; }
.balaux-exp:hover { color: var(--blue-800); }
.balaux-aux-tag { margin-left: 6px; font-size: 11px; font-weight: 400; color: var(--blue-600); background: var(--tint); border: 1px solid var(--line-2); border-radius: 3px; padding: 0 5px; }
/* 账表科目级次标记：随主题继承文字色，浅色 / 深色都可读 */
.balaux-lv { margin-left: 6px; font-size: 11px; font-weight: 400; opacity: .72; background: var(--tint); border: 1px solid var(--line-2); border-radius: 3px; padding: 0 5px; white-space: nowrap; }
.balaux-parent td { background: var(--tint); font-weight: 600; }
.balaux-parent:hover td { background: var(--tint-2); }
.balaux-child td { background: #fff; font-weight: 400; }
.balaux-child:hover td { background: var(--rows-hover); }
.balaux-indent { padding-left: 24px !important; color: var(--text-2); }
.balaux-total td { font-weight: 600; background: #f4f8fc; }
.balaux-grid tfoot td { border-top: 2px solid var(--line); }

/* --------------------------- 「智+」品牌展示（关于本系统） --------------------------- */
.about-brand { display: flex; align-items: center; gap: 20px; padding: 6px 0 16px; margin-bottom: 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.about-brand .about-logo { width: 240px; max-width: 100%; height: auto; display: block; flex: none; }
.about-brand .about-brand-txt { font-size: 12px; line-height: 2; color: var(--text-2); }
.about-brand .about-brand-txt b { color: var(--text, #2a3a4a); font-size: 13px; }

/* --------------------------- 右上角「更多操作」下拉菜单 --------------------------- */
.act-menu {
  position: fixed; z-index: 4500; min-width: 178px; padding: 6px 0;
  background: #fff; border: 1px solid var(--line, #dfe5ec); border-radius: 6px;
  box-shadow: 0 8px 26px rgba(24, 48, 78, .18); font-size: 13px;
}
.act-menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; box-sizing: border-box;
  padding: 8px 18px; border: 0; background: transparent; text-align: left;
  color: var(--text, #2a3a4a); cursor: pointer; white-space: nowrap;
}
.act-menu-item .ami-ic { width: 15px; text-align: center; color: var(--text-3, #8794a3); font-size: 13px; }
.act-menu-item:hover { background: var(--tint, #f2f7fd); color: var(--blue-700, #1f5e9e); }
.act-menu-item.danger { color: #c0392b; }
.act-menu-item.danger .ami-ic { color: #c0392b; }
.act-menu-item.danger:hover { background: #fdf1ef; }
.act-menu-item:disabled { color: var(--text-3, #9aa5b1); cursor: not-allowed; background: transparent; }
.act-menu-sep { height: 1px; margin: 6px 10px; background: var(--line-2, #e9edf2); }

/* --------------------------- 科目档案：批量勾选 / 停用标记 --------------------------- */
.subj-ck-cell { white-space: nowrap; }
.subj-ck-cell input[type=checkbox], .subj-grid thead th input[type=checkbox] { width: auto; height: auto; margin: 0 4px 0 0; vertical-align: middle; cursor: pointer; }
.subj-off-tag { margin-left: 6px; font-size: 11px; font-weight: 400; color: #a15b16; background: #fdf3e5; border: 1px solid #f3dfc0; border-radius: 3px; padding: 0 5px; }
.subj-grid tr.is-off td { color: var(--text-3, #9aa5b1); }
.subj-picked { display: inline-flex; align-items: center; font-size: 12px; color: var(--blue-700, #1f5e9e); white-space: nowrap; }

/* --------------------------- 科目编码设置 / 辅助核算管理 --------------------------- */
.subj-rule-dlg .form-row { margin: 0; }
.subj-rule-lens { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.subj-rule-lens input[type=number] { width: 62px; height: 30px; text-align: center; border: 1px solid var(--line, #d5dce4); border-radius: 3px; font-size: 13px; }
.subj-rule-lens .sr-dash { color: var(--text-3, #9aa5b1); font-style: normal; margin: 0 2px; }
.subj-rule-example { display: flex; flex-wrap: wrap; gap: 8px; font-family: Consolas, Menlo, monospace; font-size: 14px; letter-spacing: .5px; color: var(--text, #2a3a4a); }
.subj-rule-example span { background: var(--tint, #f2f7fd); border: 1px solid var(--line-2, #e3eaf2); border-radius: 3px; padding: 3px 8px; }
.subj-rule-warn { margin-top: 10px; padding: 8px 10px; border-radius: 4px; background: #f8fafc; color: var(--text-2, #5c6b7a); font-size: 12px; line-height: 1.7; }
.subj-aux-fixed-row { display: flex; flex-wrap: wrap; gap: 6px; }
.subj-aux-fixed { font-size: 12px; color: var(--text-2, #5c6b7a); background: var(--tint, #f2f7fd); border: 1px solid var(--line-2, #e3eaf2); border-radius: 3px; padding: 3px 9px; }
.subj-aux-slots { max-height: 340px; overflow: auto; border: 1px solid var(--line-2, #e9edf2); border-radius: 4px; }
.subj-aux-slot { display: flex; align-items: center; gap: 10px; padding: 6px 10px; border-bottom: 1px solid var(--line-2, #eef1f5); }
.subj-aux-slot:last-child { border-bottom: 0; }
.subj-aux-slot-en { width: 108px; flex: none; font-size: 12.5px; cursor: pointer; white-space: nowrap; }
.subj-aux-slot-en input { width: auto; height: auto; }
.subj-aux-slot input[type=text] { flex: 1; max-width: 220px; height: 27px; }
.subj-io-cols { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; }
.subj-io-cols span { font-size: 12px; color: var(--blue-700, #1f5e9e); background: var(--tint, #f2f7fd); border: 1px solid var(--line-2, #e3eaf2); border-radius: 3px; padding: 3px 9px; }
.subj-io-btns { display: flex; gap: 10px; margin-top: 12px; }

/* --------------------------- 科目档案：双击编辑期初余额 / 试算平衡 --------------------------- */
.subj-begin-dlg .sbj-head {
  padding: 9px 12px; margin-bottom: 14px; border-radius: 4px;
  background: var(--tint, #f2f7fd); border: 1px solid var(--line-2, #e3eaf2);
  font-size: 12.5px; color: var(--text-2, #5c6b7a); line-height: 1.8;
}
.subj-begin-dlg .sbj-head b { color: var(--text, #2a3a4a); }
.subj-begin-dlg .form-row { margin: 0; }
.subj-begin-dlg .sbj-calc {
  margin-top: 12px; padding: 9px 12px; border-radius: 4px;
  background: #f8fafc; border: 1px solid var(--line-2, #e9edf2);
  font-size: 12.5px; color: var(--text-2, #5c6b7a);
}
.subj-begin-dlg .sbj-calc b { font-size: 16px; color: var(--blue-700, #1f5e9e); margin-left: 6px; }
.subj-trial-dlg .tb-status { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.subj-trial-dlg .tb-status.ok { color: #1a7f37; }
.subj-trial-dlg .tb-status.bad { color: #c0392b; }
.subj-trial-dlg .tb-meta { font-size: 12px; color: var(--text-2, #5c6b7a); line-height: 1.9; margin-bottom: 10px; }
.subj-trial-dlg .tb-meta b { color: var(--text, #2a3a4a); }
.tb-grid td.num, .tb-grid th.num { text-align: right; }
.tb-grid .tb-ok { color: #1a7f37; }
.tb-grid .tb-bad { color: #c0392b; font-weight: 600; }
.tb-grid tr.tb-kind td { color: var(--text-3, #8794a3); font-size: 12px; background: #fbfcfe; }

/* --------------------------- 系统重建（初始化 → 系统重建） --------------------------- */
.rb-page .page-desc { line-height: 1.8; }
.rb-accbar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 18px;
  padding: 10px 14px; margin: 12px 0 16px; border: 1px solid var(--line-2, #e3eaf2);
  border-radius: 4px; background: var(--tint, #f7fafd); font-size: 12.5px; color: var(--text-2, #5c6b7a);
}
.rb-accbar b { color: var(--text, #2a3a4a); }
.rb-accbar .grow { flex: 1; }

.rb-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 20px; }
.rb-card {
  min-height: 232px; padding: 26px 20px 18px; text-align: center;
  border: 1px solid var(--line-2, #e6ebf1); border-radius: 5px; background: #fff;
}
.rb-card-custom { background: linear-gradient(180deg, #fbfdff 0%, #fff 62%); }
.rb-card-all { background: linear-gradient(180deg, #fff7f6 0%, #fff 62%); border-color: #f4dedb; }
.rb-card-title { font-size: 19px; font-weight: 700; color: var(--text, #2a3a4a); letter-spacing: .5px; }
.rb-card-sub { margin-top: 10px; font-size: 13px; color: #c4761c; }
.rb-card-all .rb-card-sub { color: #d05a4a; }
.rb-card-hint { margin-top: 5px; font-size: 12px; color: var(--text-3, #8794a3); }
.rb-btn {
  min-width: 148px; height: 38px; margin-top: 22px; padding: 0 22px;
  border: 1px solid transparent; border-radius: 3px; color: #fff; font-size: 14px;
  cursor: pointer; letter-spacing: .5px;
}
.rb-btn:hover { opacity: .9; }
.rb-btn-primary { background: #4a67d6; border-color: #4a67d6; }
.rb-btn-danger { background: #e8544b; border-color: #e8544b; }
.rb-card-foot { margin-top: 14px; font-size: 12.5px; color: var(--text-3, #8794a3); line-height: 1.7; }
.rb-card-foot b { color: var(--text, #2a3a4a); }
.btn.rb-btn-danger { background: #e8544b; border-color: #e8544b; color: #fff; }

.rb-detail { border: 1px solid var(--line-2, #e6ebf1); border-radius: 5px; background: #fff; padding: 18px 20px 16px; margin-bottom: 18px; }
.rb-detail-title { font-size: 15px; font-weight: 700; color: var(--text, #2a3a4a); margin-bottom: 14px; }
.rb-detail-cols { display: grid; grid-template-columns: 1fr 1.25fr .8fr; gap: 26px; }
.rb-detail-col h4 { margin: 0 0 10px; font-size: 13px; font-weight: 700; color: var(--text, #2a3a4a); }
.rb-detail-col ul { margin: 0; padding-left: 16px; }
.rb-detail-col li { font-size: 12.5px; line-height: 1.95; color: var(--text-2, #5c6b7a); }
.rb-detail-note { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2, #e6ebf1); font-size: 12px; line-height: 1.8; color: var(--text-3, #8794a3); }

.rb-panel { border: 1px solid var(--line-2, #e6ebf1); border-radius: 5px; background: #fff; margin-bottom: 18px; }
.rb-panel-hd { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--line-2, #e6ebf1); font-size: 13px; }
.rb-panel-hd b { color: var(--text, #2a3a4a); }
.rb-panel-hd span { font-size: 12px; color: var(--text-3, #8794a3); }
.rb-panel .grid { margin: 0; }
.rb-panel td { font-size: 12.5px; }

/* 选择数据弹窗 */
.dialog-body.rb-pick-body { max-height: 62vh; overflow-y: auto; padding: 14px 18px; }
.rb-warn { padding: 9px 12px; margin-bottom: 14px; border-radius: 3px; background: #fff8ec; border: 1px solid #f3e0bd; font-size: 12.5px; line-height: 1.8; color: #8a6322; }
.rb-warn b { color: #b8531b; }
.rb-pick-cat { margin-bottom: 16px; }
.rb-pick-cat-hd { display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: var(--tint, #f4f8fc); border: 1px solid var(--line-2, #e6ebf1); border-radius: 3px; }
.rb-pick-cat-hd b { font-size: 13px; color: var(--text, #2a3a4a); }
.rb-pick-cat-hd > span { flex: 1; font-size: 12px; color: var(--text-3, #8794a3); }
.rb-pick-all { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2, #5c6b7a); white-space: nowrap; cursor: pointer; }
.rb-pick-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px; padding: 6px 2px 0; }
.rb-pick-item { display: flex; align-items: flex-start; gap: 8px; padding: 7px 8px; border-radius: 3px; cursor: pointer; }
.rb-pick-item:hover { background: #f7fafd; }
.rb-pick-item > input { margin-top: 3px; flex: none; }
.rb-pick-main { flex: 1; min-width: 0; }
.rb-pick-main b { display: block; font-size: 12.5px; font-weight: 600; color: var(--text, #2a3a4a); }
.rb-pick-main i { display: block; font-style: normal; font-size: 11.5px; line-height: 1.6; color: var(--text-3, #8794a3); }
.rb-pick-num { flex: none; font-size: 11.5px; color: var(--text-3, #8794a3); white-space: nowrap; padding-top: 2px; }
.rb-pick-sum { position: sticky; bottom: -14px; padding: 10px 12px; margin: 4px -18px -14px; border-top: 1px solid var(--line-2, #e6ebf1); background: #fafcff; font-size: 12.5px; color: var(--text-2, #5c6b7a); }
.rb-pick-sum b { color: #c0392b; font-size: 14px; }

/* 密码 / 危险确认 / 结果弹窗 */
.rb-pwd-body { padding: 4px 2px; }
.rb-pwd-tip { padding: 10px 12px; margin-bottom: 14px; border-radius: 3px; background: var(--tint, #f4f8fc); border: 1px solid var(--line-2, #e6ebf1); font-size: 12.5px; line-height: 1.9; color: var(--text-2, #5c6b7a); }
.rb-pwd-note { margin-top: 10px; font-size: 11.5px; line-height: 1.7; color: var(--text-3, #8794a3); }
.rb-pwd-body .form-row { margin: 0; }
.rb-danger-body { display: flex; gap: 12px; align-items: flex-start; padding: 6px 2px; }
.rb-danger-ic { width: 24px; height: 24px; flex: none; border-radius: 50%; background: #fdecea; color: #c0392b; font-weight: 700; text-align: center; line-height: 24px; }
.rb-danger-text { flex: 1; white-space: pre-line; font-size: 13px; line-height: 1.9; color: #6a403a; }
.rb-result { display: flex; gap: 14px; align-items: flex-start; padding: 8px 2px; }
.rb-result-ic { width: 28px; height: 28px; flex: none; border-radius: 50%; background: #e8f5ec; color: #1a7f37; font-size: 17px; font-weight: 700; text-align: center; line-height: 28px; }
.rb-result-lines { flex: 1; font-size: 12.5px; line-height: 2; color: var(--text-2, #5c6b7a); word-break: break-all; }
.rb-result-lines b { color: #c0392b; font-size: 15px; }
.rb-result-tip { margin-top: 10px; padding: 9px 11px; border-radius: 3px; background: #f7fafd; font-size: 12px; line-height: 1.8; color: var(--text-3, #8794a3); }
.rb-result { flex-wrap: wrap; }
.rb-result-tip { flex-basis: 100%; margin-left: 42px; }

/* ---------------------------------------------------------------- 质量管理 / 设备管理 */
.qe-kpi { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.qe-card { padding: 12px 14px; }
.qe-card[data-go] { cursor: pointer; }
.qe-card[data-go]:hover { border-color: var(--primary, #2f7de1); }
.qe-num { font-size: 22px; font-weight: 600; margin: 4px 0; color: var(--text, #1f2b38); }
.qe-panels { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.qe-panel { padding: 12px 14px; }
.qe-panel-h { font-weight: 600; font-size: 13px; margin: 0 0 8px; color: var(--text, #1f2b38); }
.qe-simple { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.qe-simple th, .qe-simple td { padding: 5px 6px; border-bottom: 1px solid var(--line, #e6e9ee); text-align: left; }
.qe-simple th { color: var(--text-3, #8794a3); font-weight: 500; }
.qe-simple td.num, .qe-simple th.num { text-align: right; }
.qe-simple tr[data-go] { cursor: pointer; }
.qe-simple tr[data-go]:hover { background: #f5f9ff; }
.qe-lines-box { margin-top: 12px; }
.qe-lines-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; font-size: 13px; }
.qe-lines { width: 100%; border-collapse: collapse; font-size: 12px; }
.qe-lines th, .qe-lines td { border: 1px solid var(--line, #d8dce4); padding: 3px 4px; }
.qe-lines th { background: #f7f9fc; color: var(--text-2, #5c6b7a); font-weight: 500; white-space: nowrap; }
.qe-lines input, .qe-lines select { width: 100%; min-width: 60px; height: 26px; padding: 2px 4px; font-size: 12px;
  border: 1px solid var(--line, #d8dce4); border-radius: 2px; box-sizing: border-box; }
.qe-lines td.center { text-align: center; }
.qe-page .form-item textarea { min-height: 46px; width: 100%; box-sizing: border-box; }

/* ---------------------------------------------------------------- 会计期间 */
.apr-page .pd-page { display: flex; flex-direction: column; }
.apr-page .pd-toolbar {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; margin-bottom: 10px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.apr-page .pd-toolbar .grow { flex: 1; }
.apr-page .pd-search { position: relative; width: 190px; flex: none; }
.apr-page .pd-search input {
  width: 100%; height: 28px; padding: 0 26px 0 8px; box-sizing: border-box;
  border: 1px solid var(--line); border-radius: 4px; font-size: 12.5px;
}
.apr-page .pd-search-ico { position: absolute; right: 7px; top: 1px; font-size: 18px; color: var(--text-3); cursor: pointer; }
.apr-page .pd-begin { margin-left: 6px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.apr-page .pd-begin b { color: var(--blue-700); font-weight: 600; }
.apr-page .pd-ghost { display: inline-flex; align-items: center; gap: 4px; }
.apr-page .pd-ico { width: 13px; height: 13px; flex: none; }
.apr-page .pd-body { display: flex; align-items: stretch; gap: 10px; min-height: 420px; }
.apr-page .pd-tree {
  width: 132px; flex: none; padding: 6px 0; font-size: 12.5px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
}
.apr-page .pd-tree-all {
  display: flex; align-items: center; gap: 8px; padding: 6px 12px;
  font-weight: 600; color: var(--text); cursor: pointer;
}
.apr-page .pd-tree-all:hover, .apr-page .pd-tree-list li:hover { background: var(--rows-hover); }
.apr-page .pd-tree-all.active, .apr-page .pd-tree-list li.active { background: var(--sel); color: var(--blue-700); }
.apr-page .pd-grid-icon { display: grid; grid-template-columns: repeat(2, 4px); gap: 2px; flex: none; }
.apr-page .pd-grid-icon i { display: block; width: 4px; height: 4px; background: currentColor; }
.apr-page .pd-tree-list { list-style: none; margin: 4px 0 0; padding: 0; }
.apr-page .pd-tree-list li { padding: 5px 12px 5px 30px; color: var(--text-2); cursor: pointer; }
.apr-page .pd-tree-list li.pd-tree-none { padding-left: 12px; color: var(--text-3); cursor: default; }
.apr-page .pd-main { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.apr-page .pd-grid { flex: 1; max-height: calc(100vh - 260px); }
.apr-page .pd-table td { font-variant-numeric: tabular-nums; }
.apr-page .pd-table td.center, .apr-page .pd-table th.center { text-align: center; }
.apr-page .pd-info {
  display: inline-block; width: 12px; height: 12px; line-height: 11px; margin-left: 2px;
  border: 1px solid var(--line); border-radius: 50%; font-size: 9px; font-style: normal;
  color: var(--text-3); cursor: help;
}
.apr-page .pd-tag {
  display: inline-block; height: 16px; line-height: 15px; padding: 0 5px; margin-left: 6px;
  border-radius: 8px; font-size: 10px; background: var(--blue-050); color: var(--blue-700);
}
.apr-page .pd-tag.closed { background: #f0f1f3; color: #7a8796; }
.apr-page .pd-empty { padding: 40px; text-align: center; color: var(--text-3); }
.apr-page .pd-foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 8px 2px 0; font-size: 12px; color: var(--text-3);
}
.apr-page .pd-foot b { color: var(--text-2); font-weight: 600; }
.apr-page .pd-foot-tip { margin-left: auto; }
.apr-page .pd-confirm p { margin: 0 0 10px; font-size: 13px; line-height: 1.7; }
.apr-page .pd-confirm b { color: var(--blue-700); }
.apr-page .pd-confirm .pd-warn {
  padding: 8px 10px; border: 1px solid #f5d9c4; border-radius: 4px;
  background: #fff7f2; color: #96613a; font-size: 12px;
}
.apr-page .pd-set-row { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.apr-page .pd-set-row label { width: 100px; flex: none; font-size: 12.5px; color: var(--text-2); }
.apr-page .pd-set-row select, .apr-page .pd-set-row input {
  height: 28px; min-width: 220px; padding: 0 6px;
  border: 1px solid var(--line); border-radius: 4px; font-size: 12.5px;
}
.apr-page .pd-set-row input[type="number"] { min-width: 80px; }
.apr-page .pd-set-row select:disabled, .apr-page .pd-set-row input:disabled { background: #f4f5f7; color: var(--text-3); }
.apr-page .pd-set-hint { font-size: 11.5px; color: var(--text-3); }
.apr-page .pd-set-note {
  padding: 8px 10px; border: 1px solid var(--blue-100); border-radius: 4px;
  background: var(--blue-050); color: var(--blue-800); font-size: 12px; line-height: 1.6;
}
.apr-page .pd-set-preview-head { margin: 12px 0 6px; font-size: 12.5px; font-weight: 600; }
.apr-page .pd-set-preview { overflow: hidden; border: 1px solid var(--line); border-radius: 4px; }
.apr-page .pd-preview-table td { text-align: center; }
.apr-page .pd-set-current { margin-top: 10px; font-size: 12px; color: var(--text-3); }

/* ===================== 业务月结（系统管理 → 期末处理 → 业务月结） ===================== */
.mc-note {
  margin: 0 0 12px; padding: 9px 12px; font-size: 12.5px; line-height: 1.7;
  color: var(--text-3); background: #f6f8fa; border: 1px solid var(--line); border-radius: 4px;
}
.mc-cfg { margin-left: 18px; }
.mc-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); cursor: pointer; }
.mc-check input { width: 15px; height: 15px; cursor: pointer; }
.mc-total { margin-bottom: 12px; font-size: 13px; color: var(--text-2); line-height: 1.9; }
.mc-total b { color: var(--text-1); font-weight: 600; }
.mc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.mc-card {
  display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px;
  overflow: hidden; background: #fff; min-height: 168px;
}
.mc-top {
  background: linear-gradient(180deg, #eaf2fb, #dcebfa); color: #1c4f86;
  font-weight: 700; font-size: 26px; text-align: center; padding: 12px 0 10px; letter-spacing: 1px;
  border-bottom: 1px solid var(--line);
}
.mc-top .mc-unit { font-size: 13px; font-weight: 600; margin-left: 2px; color: #4a78a8; }
.mc-lock { text-align: center; padding: 12px 0 6px; }
.mc-stat { text-align: center; font-size: 12px; color: var(--text-2); padding: 0 8px; line-height: 1.5; }
.mc-foot { text-align: center; font-size: 11.5px; color: var(--text-3); padding: 6px 8px 10px; flex: 1; }
.mc-card .mc-btn { margin: 0 10px 10px; width: calc(100% - 20px); }
.mc-card.mc-next { border-color: var(--blue-300); box-shadow: 0 0 0 2px rgba(35, 118, 189, .12); }
.mc-card.mc-next .mc-foot { color: var(--blue-700); font-weight: 600; }
.mc-card.mc-closed { background: #f3faf4; border-color: #cfe9d4; }
.mc-card.mc-closed .mc-top { background: linear-gradient(180deg, #e4f4e8, #d3edd9); color: #2e7d4f; }
.mc-card.mc-wait { opacity: .72; }
.mc-card.mc-wait .mc-top { background: #eef1f4; color: #9aa3ad; }
/* 期间锁账按钮：对齐 T+ 截图的紫色 */
.mc-card .mc-btn.primary { background: linear-gradient(180deg, #7d58c9, #6b45b8); border-color: #5b39a4; color: #fff; }
.mc-card .mc-btn.primary:hover { background: linear-gradient(180deg, #6b45b8, #5b39a4); }
.mc-card .mc-btn.mc-unclose { background: #fff; border-color: var(--line-2); color: #c0392b; }
.mc-card .mc-btn.mc-unclose:hover { background: #fff5f4; border-color: #e0a89f; }
.mc-card .mc-btn:disabled { background: #f1f3f5; border-color: var(--line); color: var(--text-3); cursor: not-allowed; }

/* 业务日结日历卡片网格（复用 .mc-btn 配色，仅把容器换为 .dc-cell） */
.dc-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 0 0 8px; }
.dc-week span { text-align: center; font-size: 12px; color: var(--text-3); padding: 4px 0; background: #f6f8fa; border: 1px solid var(--line); border-radius: 4px; }
.dc-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.dc-cell { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #fff; min-height: 138px; }
.dc-cell.dc-empty { border: 0; background: transparent; min-height: 0; }
.dc-top { background: linear-gradient(180deg, #eaf2fb, #dcebfa); color: #1c4f86; font-weight: 700; font-size: 18px; text-align: center; padding: 7px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: center; gap: 6px; }
.dc-top .dc-dow { font-size: 11px; font-weight: 500; color: #5b7da3; }
.dc-lock { text-align: center; padding: 8px 0 4px; }
.dc-stat { text-align: center; font-size: 11.5px; color: var(--text-2); padding: 0 6px; line-height: 1.5; }
.dc-od { text-align: center; font-size: 10.5px; color: #c0392b; padding: 0 6px 2px; }
.dc-foot { text-align: center; font-size: 11px; color: var(--text-3); padding: 6px 6px 8px; flex: 1; }
.dc-cell .mc-btn { margin: 0 8px 8px; width: calc(100% - 16px); }
.dc-cell.dc-next { border-color: var(--blue-300); box-shadow: 0 0 0 2px rgba(35, 118, 189, .12); }
.dc-cell.dc-next .dc-foot { color: var(--blue-700); font-weight: 600; }
.dc-cell.dc-closed { background: #f3faf4; border-color: #cfe9d4; }
.dc-cell.dc-closed .dc-top { background: linear-gradient(180deg, #e4f4e8, #d3edd9); color: #2e7d4f; }
.dc-cell.dc-wait { opacity: .72; }
.dc-cell.dc-wait .dc-top { background: #eef1f4; color: #9aa3ad; }
.dc-cell.dc-future { opacity: .5; background: #fafbfc; }
.dc-cell.dc-future .dc-top { background: #f1f3f5; color: #b6bfc9; }
.dc-cell.dc-today .dc-top { box-shadow: inset 0 -3px 0 var(--blue-500); }
/* 日结锁账按钮：与月结一致，紫色渐变 */
.dc-cell .mc-btn.primary { background: linear-gradient(180deg, #7d58c9, #6b45b8); border-color: #5b39a4; color: #fff; }
.dc-cell .mc-btn.primary:hover { background: linear-gradient(180deg, #6b45b8, #5b39a4); }
.dc-cell .mc-btn.mc-unclose { background: #fff; border-color: var(--line-2); color: #c0392b; }
.dc-cell .mc-btn.mc-unclose:hover { background: #fff5f4; border-color: #e0a89f; }
.dc-cell .mc-btn:disabled { background: #f1f3f5; border-color: var(--line); color: var(--text-3); cursor: not-allowed; }

/* 合同管理列表：双击整行打开只读合同详情 */
.ct-list-box table.grid tbody tr[data-id] { cursor: pointer; }

/* 账套上下文信息条：权限设置（当前账套）/ 账套授权（目标账套） */
.accbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 12px;
  margin: 0 0 10px; border: 1px solid #c9dcf7; border-left: 3px solid var(--blue-500);
  border-radius: 3px; background: linear-gradient(180deg, #f5f9ff, #eaf2ff); }
.accbar-auth { border-color: #f0dcae; border-left-color: #d99a2b;
  background: linear-gradient(180deg, #fffbf2, #fff5e2); }
.accbar-badge { flex: none; padding: 2px 7px; border-radius: 2px; background: var(--blue-500);
  color: #fff; font-size: 11px; font-weight: 600; letter-spacing: .2px; }
.accbar-auth .accbar-badge { background: #c98a20; }
.accbar-code { flex: none; color: var(--blue-700); font: 600 14px/1.2 Consolas, monospace; }
.accbar-name { flex: none; color: #2b3643; font-size: 13px; font-weight: 600; }
.accbar-year { flex: none; color: #7b8896; font-size: 11.5px; }
.accbar-tip { margin-left: auto; color: #7b8896; font-size: 11.5px; line-height: 1.5; text-align: right; }
.accbar-note { margin: 0 0 10px; padding: 6px 10px; border-left: 3px solid #d99a2b;
  background: #fffaf0; color: #8a6420; font-size: 11.5px; line-height: 1.6; }
.accbar-guide { padding: 26px 16px; line-height: 1.9; }
@media (max-width: 1100px) { .accbar-tip { flex-basis: 100%; margin-left: 0; text-align: left; } }

/* ================================================================
 * 全局界面打磨层（来自 polish.css，合并以减少一次网络往返）
 * ================================================================ */
/* =====================================================================
 * 全局界面打磨层 · Polish Layer
 * ---------------------------------------------------------------------
 * 目标（依据 ui-ux-pro-max / web-design-guidelines / frontend-design）：
 *   1) 交互状态清晰：hover / active / focus-visible / disabled 四态可辨
 *   2) 焦点可见：键盘导航有 2px 焦点环，且不被 sticky 元素遮挡
 *   3) 动作栏层级：主操作唯一，其余次级化，图标与文字对齐
 *   4) 数字可读：金额 / 数量 / 页码用等宽数字，避免跳动
 *   5) 动效克制：仅在状态反馈时使用，且尊重 prefers-reduced-motion
 *   6) 命中区达标：可点击目标 ≥ 24px（桌面 ERP 密度，不套移动端 44px）
 * 全部沿用既有主题变量，7 套换肤自动跟随。
 * ===================================================================== */

/* --------------------------------------------------- 焦点可见（键盘可达） */
:where(button, a, input, select, textarea, [tabindex]):focus-visible {
  outline: 2px solid var(--blue-500);
  outline-offset: 2px;
  border-radius: 4px;
}
/* 输入类控件已有内阴影焦点态，避免与 outline 叠加成双环 */
.filterbar input:focus-visible,
.filterbar select:focus-visible,
.form-item input:focus-visible,
.form-item select:focus-visible,
.form-item textarea:focus-visible,
.qpanel input:focus-visible,
.qpanel select:focus-visible,
.field input:focus-visible,
.field select:focus-visible {
  outline: none;
  border-color: var(--blue-500);
  box-shadow: 0 0 0 3px rgba(46, 134, 207, .14);
}

/* --------------------------------------------------- 按钮：四态可辨 */
.btn {
  transition: background .13s var(--fb-ease, ease), border-color .13s, color .13s, box-shadow .13s, transform .08s;
}
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled,
.btn[disabled] {
  opacity: .45; cursor: not-allowed; pointer-events: none;
}
.btn.primary:active:not(:disabled) { background: var(--blue-800); box-shadow: none; }
.btn.danger:hover { background: #fdf3f3; border-color: #e5b4b4; }

/* 动作栏：主操作唯一，其余弱化 */
.act {
  transition: background .13s, color .13s, border-color .13s;
}
.act:active:not(:disabled) { background: var(--blue-100); }
.act .ic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px; flex: none; opacity: .9;
}
.act.primary { position: relative; }
.act.primary::after {
  content: ''; position: absolute; right: 5px; top: 50%; margin-top: -1px;
  width: 4px; height: 4px; border-radius: 50%; background: var(--blue-500);
}

/* 顶栏按钮：命中区放大到 28px 高 + 明确 hover */
.topbar .tb-btn {
  transition: background .13s, color .13s;
  min-width: 32px;
}
.topbar .tb-btn:active { background: rgba(255, 255, 255, .22); }

/* --------------------------------------------------- 标签页：当前页更明确 */
.tab {
  transition: background .13s, color .13s, box-shadow .13s;
  max-width: 220px;
}
.tab > :first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab.active {
  box-shadow: inset 0 2px 0 var(--blue-600);
  color: var(--blue-800);
}

/* --------------------------------------------------- 面板与卡片层次 */
.panel, .card, .grid-box {
  transition: border-color .15s, box-shadow .15s;
}
.panel-head {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600;
}
.panel-head > span:first-child { color: var(--text); }

/* --------------------------------------------------- 数据区：等宽数字 */
table.grid td.num, table.grid td[style*="text-align:right"],
table.grid td[style*="text-align: right"],
.grid .num, .money-cell, .amt {
  font-variant-numeric: tabular-nums;
}
table.grid thead th {
  position: sticky; top: 0; z-index: 2;
  font-variant-numeric: tabular-nums;
}

/* 图表文字摘要：屏幕阅读器可读，视觉上隐藏 */
.chart-sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.chart-box { position: relative; }

/* --------------------------------------------------- 状态标签：色块 + 文字双编码 */
.tag { border-radius: 4px; font-weight: 500; letter-spacing: .2px; }
.tag::before {
  content: ''; display: inline-block; width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; margin-right: 5px; vertical-align: 1px; opacity: .75;
}
.tag:empty::before { display: none; }

/* --------------------------------------------------- 空状态：给出下一步动作 */
.empty-state .empty-ico { opacity: .85; }
.empty-title { color: var(--text-2); }

/* --------------------------------------------------- 表格行悬停与选中 */
table.grid tbody tr { transition: background .1s; }
table.grid tbody tr:focus-within { background: var(--rows-sel); }

/* --------------------------------------------------- 尊重减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------- 打印页专用：隐藏交互元素 */
@media print {
  .topbar, .actionbar, .sidebar, .tabs, .toast, .mask { display: none !important; }
  .content { overflow: visible !important; background: #fff !important; }
  .panel, .card, .grid-box { box-shadow: none !important; border-color: #ddd !important; }
}

/* ===================== 键盘可达性补充（2026-11-19） ===================== */
/* 跳转到主内容：默认移出视口，Tab 聚焦后出现在左上角 */
.skip-link {
  position: fixed; left: 12px; top: -64px; z-index: 9999;
  padding: 9px 14px; border-radius: 8px;
  background: #fff; color: var(--text);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .18);
  font-size: 13px; text-decoration: none;
  transition: top .16s ease;
}
.skip-link:focus, .skip-link:focus-visible { top: 10px; outline: 2px solid var(--blue-600); outline-offset: 2px; }
/* 主内容区用 tabindex="-1" 接收「跳到主内容」的焦点，不显示边框 */
#content:focus { outline: none; }
/* 键盘聚焦滚动到容器顶部时留出余量，避免焦点被固定工具条遮住（WCAG 2.2 focus-not-obscured） */
.content { scroll-padding-top: 16px; }
@media (prefers-reduced-motion: reduce) { .skip-link { transition: none; } }
@media print { .skip-link { display: none !important; } }

/* ===================== 自定义表单 2.0（2026-11-19） ===================== */
.cform-help { display: inline-flex; width: 14px; height: 14px; margin-left: 4px; border-radius: 50%; background: #e8f0f9; color: #4a7aa8; font-size: 10px; align-items: center; justify-content: center; vertical-align: middle; cursor: help; }
.cform-cond { margin-top: 4px; font-size: 11px; color: #b37a1e; background: #fdf6e9; border: 1px dashed #eed9b0; border-radius: 4px; padding: 2px 6px; }
.cform-preview-opts { display: flex; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--text-3); }
.cform-preview-opts label { display: inline-flex; align-items: center; gap: 3px; }
.cform-cond-editor { display: grid; grid-template-columns: 1fr 80px 1fr; gap: 5px; }
.cform-cond-editor select, .cform-cond-editor input { height: 28px; border: 1px solid var(--line); border-radius: 5px; padding: 0 6px; font-size: 12px; min-width: 0; }
.cform-opts { display: flex; flex-wrap: wrap; gap: 10px; font-size: 12.5px; color: var(--text-2); padding-top: 5px; }
.cform-opts label { display: inline-flex; align-items: center; gap: 4px; }
.cform-hint { margin-top: 4px; font-size: 11px; color: var(--text-3); line-height: 1.6; }
.cform-err { min-height: 0; margin-top: 3px; font-size: 11px; color: var(--red); line-height: 1.5; }
.cform-fill-item .cform-err:empty { display: none; }

/* 自定义表单：错误汇总 / 只读字段 / 悬浮提示 */
.cform-err-sum { margin: 0 0 10px; padding: 9px 12px; border: 1px solid #f0c8c8; background: #fdf2f2; color: #a33; border-radius: 8px; font-size: 12px; line-height: 1.7; }
.cform-err-sum b { display: block; margin-bottom: 3px; }
.cform-err-sum ul { margin: 0; padding-left: 18px; }
.cform-err-sum a { color: #a33; text-decoration: underline; }
.cform-fill-item input:disabled, .cform-fill-item select:disabled, .cform-fill-item textarea:disabled { background: #f3f5f8; color: #7b8a99; cursor: not-allowed; }

/* AI 助手：DeepSeek 接口设置（2026-11-20） */
.ai-head-acts { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.ai-gear { width: 26px; height: 26px; border: 0; background: transparent; color: var(--text-3); font-size: 15px; line-height: 1; border-radius: 6px; cursor: pointer; }
.ai-gear:hover { background: #eef4fb; color: var(--blue-600); }
.ai-engine.on { color: #137a52; background: #e8f8f0; }
.ai-llm-err { margin-top: 6px; font-size: 11px; color: #9a6412; background: #fff8e8; border: 1px solid #f2dfb6; border-radius: 6px; padding: 4px 7px; line-height: 1.6; }
.ai-cfg-status { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 9px 11px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 8px; background: #f8fbfe; font-size: 12px; color: var(--text-2); }
.ai-cfg-status i { font-style: normal; color: var(--text-3); font-size: 11px; margin-left: auto; }
.ai-cfg-dot { width: 8px; height: 8px; border-radius: 50%; background: #c9d3de; flex: 0 0 auto; }
.ai-cfg-dot.on { background: #21a56b; box-shadow: 0 0 0 3px rgba(33, 165, 107, .14); }
.ai-cfg-result { min-height: 20px; margin: 4px 0 8px; font-size: 12px; line-height: 1.6; }
.ai-cfg-result.ok { color: #137a52; }
.ai-cfg-result.err { color: #b3261e; }
.ai-cfg-acts { display: flex; gap: 8px; }

/* AI 算力值（账套级） */
.ai-cfg-quota { margin: 2px 0 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fbfdff; }
.ai-cfg-quota-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--text-2); }
.ai-cfg-quota-h b { color: var(--text); font-size: 12.5px; }
.ai-cfg-quota-h span { color: var(--text-3); font-size: 11px; text-align: right; line-height: 1.5; }
.ai-cfg-quota-row { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.ai-cfg-quota-row input { width: 150px; height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; font-size: 12px; }
.ai-cfg-quota-row > span { font-size: 11.5px; color: var(--text-3); }
.ai-cfg-quota-row .btn { margin-left: auto; }
.ai-cfg-bar { height: 6px; background: #e8eef5; border-radius: 4px; overflow: hidden; margin: 9px 0 5px; }
.ai-cfg-bar i { display: block; height: 100%; background: linear-gradient(90deg, #4da3ff, #21a56b); border-radius: 4px; transition: width .2s; }
.ai-cfg-usage-t { font-size: 11.5px; color: var(--text-3); line-height: 1.6; }
.ai-cfg-usage-t b { color: var(--text); font-weight: 600; }

/* 生产加工单工作台 */
.wb-tools { display:flex; flex-wrap:wrap; gap:6px; align-items:center; justify-content:flex-end; }
.wb-tools .btn { height:26px; padding:0 8px; font-size:12px; }
.wb-tabs { display:flex; gap:24px; border-bottom:1px solid var(--line); margin:4px 0 8px; padding:0 2px; }
.wb-tabs .subtab { background:none; border:0; border-bottom:2px solid transparent; border-radius:0; padding:8px 2px; color:var(--text-2); cursor:pointer; font-size:13px; }
.wb-tabs .subtab.active { color:var(--blue-700); font-weight:600; border-bottom-color:var(--blue-600); }
.wb-tabs .subtab b { font-weight:400; color:var(--text-2); }
.wb-filter { display:flex; align-items:center; flex-wrap:wrap; gap:10px; padding:8px 2px; border-bottom:1px solid var(--line); font-size:12px; }
.wb-filter label { display:flex; align-items:center; gap:4px; }
.wb-range { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.wb-range .link { background:none; border:0; cursor:pointer; color:var(--text-2); padding:2px 3px; font-size:12px; }
.wb-range .link.active { color:#fff; background:var(--blue-600); border-radius:3px; }
.wb-more { display:flex; flex-wrap:wrap; gap:12px; align-items:center; padding:8px 2px; border-bottom:1px solid var(--line); font-size:12px; }
.wb-more label { display:flex; align-items:center; gap:4px; }
.wb-grid-hd { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:8px 2px 6px; font-size:12px; }
.wb-row-acts { display:flex; gap:4px; flex-wrap:wrap; }
.wb-row-acts .btn { height:24px; padding:0 7px; font-size:12px; }
.wb-grid-hd + .grid-wrap th { background:#eef2fb; font-weight:600; }
.wb-mat-hd { display:flex; align-items:center; justify-content:space-between; padding:4px 2px 8px; }
.wb-mat-hd .link { cursor:pointer; }

/* 明细表复选框：表格通用 input 规则会把复选框拉成满格，这里统一收小 */
table.entry td input[type="checkbox"],
table.entry td input[type="radio"],
#mo-mat td input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-width: 14px;
  min-height: 14px;
  padding: 0;
  margin: 0 auto;
  border: 0;
  border-radius: 2px;
  background: transparent;
  vertical-align: middle;
  display: inline-block;
  cursor: pointer;
  accent-color: var(--blue-600, #2f6fed);
}

/* 项目合同模块 */
.pc-page { padding: 0 2px 16px; }
.pc-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; margin: 12px 0; }
.pc-kpi { background: #fff; border: 1px solid #e5eaf0; border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.pc-kpi span { color: #6b7280; font-size: 12px; }
.pc-kpi b { font-size: 20px; color: #1b62a5; font-weight: 600; }
.pc-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pc-form .form-item { min-width: 180px; }
.pc-lines-hd { display: flex; align-items: center; gap: 10px; margin: 14px 0 6px; }
.pc-lines-hd b { flex: 1; }
.pc-lines { margin-bottom: 8px; }
.pc-lines td { padding: 4px 6px; }
.pc-lines input, .pc-lines select { width: 100%; box-sizing: border-box; }
.pc-total { text-align: right; font-size: 14px; margin: 6px 0; }
.pc-total b { color: #1b62a5; font-size: 17px; }
.red { color: #b91c1c; }
@media (max-width: 900px) { .pc-two { grid-template-columns: 1fr; } }

/* HTTPS 证书设置 */
.ssl-current { background: #f8fafc; border: 1px solid #e5eaf0; border-radius: 8px; padding: 14px 16px; margin: 12px 0; line-height: 1.9; }
.ssl-line b { color: #374151; font-weight: 600; }
.ssl-sep { color: #cbd5e1; margin: 0 8px; }
.ssl-badge { display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 10px; font-size: 12px; }
.ssl-badge.audited { background: #dcfce7; color: #15803d; }
.ssl-badge.closed { background: #fee2e2; color: #b91c1c; }
.ssl-fp { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: #6b7280; word-break: break-all; }
.ssl-warn { margin: 10px 0; padding: 10px 14px; border-radius: 6px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 13px; }
.ssl-note { margin: 12px 0; color: #6b7280; }
.ssl-form .form-row { margin-top: 8px; }
.ssl-file-row { margin: 12px 0; display: flex; flex-direction: column; gap: 5px; }
.ssl-file-row > label { font-weight: 600; color: #374151; font-size: 13px; }
.ssl-file-row textarea { width: 100%; box-sizing: border-box; font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; resize: vertical; }
.ssl-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }

/* 系统管理控制台 → 服务器配置 */
.sys-config-panel .panel-body { padding: 10px 14px 14px; }
.sys-config-row { display: flex; align-items: stretch; gap: 24px; }
.sys-config-label { width: 110px; flex: 0 0 110px; display: flex; align-items: center; font-weight: 600; color: #374151; }
.sys-config-tiles { display: flex; gap: 14px; flex-wrap: wrap; }
.sys-config-tile { width: 190px; min-height: 104px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 10px 14px; background: #fbfdff; border: 1px solid #d7e2ed; border-radius: 8px; cursor: pointer; font-family: inherit; }
.sys-config-tile:hover { border-color: #2f80c0; background: #f2f8ff; box-shadow: 0 2px 8px rgba(27,98,165,.12); }
.sys-config-icon { font-size: 28px; line-height: 1.1; }
.sys-config-name { color: #1b62a5; font-weight: 600; font-size: 14px; }
.sys-config-sub { color: #6b7280; font-size: 11.5px; text-align: center; line-height: 1.5; }

/* 供应商证照 */
.meta-license-box { margin-top: 12px; border-top: 1px dashed #d7e0ea; padding-top: 10px; }
.meta-license-head { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.meta-license-head b { color: #374151; }
.meta-license-head .hint { flex: 1; font-size: 11.5px; color: #6b7280; }
.meta-license-table input, .meta-license-table select { width: 100%; box-sizing: border-box; }
.meta-license-table td { padding: 3px 5px; }

/* 业务单据 ↔ 会计凭证 双向联查 */
.doc-voucher-links { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-left: 3px; padding: 2px 7px; border: 1px solid #cfe0f5; border-radius: 9px; background: #f2f8ff; color: #657a92; font-size: 11px; line-height: 17px; }
.doc-voucher-links .doc-voucher-link { font-weight: 600; }
.doc-flags .doc-voucher-links { margin-left: 4px; }
