/* ============================================================
 * 批 V17 V17-U0 公共零件（改法清单 #254，审核方 11-15 19:00 通过）：界面规范第 1 版的 token 和零件样式
 *   规范：分支 rv/V17-designs 的 docs/样稿/V17-设计稿/规范/（设计系统说明.md、tokens.json、ds-*.html）
 *   · token 全部加前缀 --u-（值照 tokens.json）；app.css 顶上的老变量一个值都不动，也不定义 --line（老代码有 14 处在用没定义的 --line）
 *   · 零件的类名全部 .u- 开头，里面只用 --u- 变量；这个文件不写裸标签选择器，每条规则都以 .u- 的类（或 :root）起头——碰不到没换的老页面
 *   · 重做的页面在最外层加 u-page，它开的抽屉是 .drawer.u-drawer（Core.U.drawer）；零件的 HTML 由 public/js/ui-kit.js 的 Core.U 出
 *   · 样例页 #/ui-kit（public/js/pages-uikit.js，只在 VKU_DEV=1 的服务上能开）
 * ============================================================ */
:root {
  /* 颜色（27 个） */
  --u-ground: #f5f7fa;
  --u-surface: #ffffff;
  --u-surface-head: #fafbfc;
  --u-line: #e4e8ee;
  --u-line-dot: #cdd5df;
  --u-control: #8992a3;
  --u-ink: #101828;
  --u-ink-2: #475467;
  --u-ink-3: #5d6b82;
  --u-brand: #1e40af;
  --u-brand-hover: #1e3a8a;
  --u-brand-soft: #eef3ff;
  --u-brand-line: #c9d6f7;
  /* 侧栏五个色（批 V21 V21-5，Mike 11-20 00:12 定方案 B：淡蓝灰底、当前页白卡蓝字；规范第 3 版，审核方 #510 11-20 01:1x 通过）：
   *   名字还叫 navy、只换值（原来是深蓝 #0f2547 那一套）。muted 稿里是 #8090a8，在侧栏底上只有 2.89:1，色相不变调暗到 #57677f（侧栏底 5.12、用户框 4.71）；对比度由用例 6892 按公式核 */
  --u-navy: #eef2f8;
  --u-navy-active: #ffffff;
  --u-navy-card: #e3e9f2;
  --u-navy-ink: #3f4c63;
  --u-navy-muted: #57677f;
  --u-danger: #b42318;
  --u-danger-soft: #fef3f2;
  --u-alert: #d92d20;
  --u-warning: #b54708;
  --u-warning-soft: #fffaeb;
  --u-success: #067647;
  --u-success-soft: #ecfdf3;
  --u-neutral-soft: #f2f4f7;
  --u-neutral-ink: #344054;
  /* 字（6 档：字号 / 行高 / 字重） */
  --u-font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  --u-fs-caption: 12px; --u-lh-caption: 18px; --u-fw-caption: 400;
  --u-fs-body: 14px; --u-lh-body: 22px; --u-fw-body: 400;
  --u-fs-body-strong: 14px; --u-lh-body-strong: 22px; --u-fw-body-strong: 600;
  --u-fs-title: 16px; --u-lh-title: 24px; --u-fw-title: 600;
  --u-fs-page-title: 20px; --u-lh-page-title: 28px; --u-fw-page-title: 600;
  --u-fs-number: 24px; --u-lh-number: 28px; --u-fw-number: 600;
  /* 间距（6 档） */
  --u-space-1: 4px;
  --u-space-2: 8px;
  --u-space-3: 12px;
  --u-space-4: 16px;
  --u-space-6: 24px;
  --u-space-8: 32px;
  /* 圆角（4 种） */
  --u-radius-sm: 6px;
  --u-radius-md: 8px;
  --u-radius-lg: 12px;
  --u-radius-pill: 999px;
  /* 阴影（2 种） */
  --u-shadow-seg: 0 1px 2px rgba(16,24,40,0.10);
  --u-shadow-pop: 0 12px 32px rgba(16,24,40,0.14);
  /* 批 V18 V18-33 公共件（V18-25 定稿，Mike 11-17 18:36；审核方 #365 18:45）：规范第 2 版——图表数据色 6 个（填充只用这六个；绿、红只用在文字、箭头、标签上） */
  --u-data-1: #3451d1;
  --u-data-2: #8ea2f4;
  --u-data-3: #cfd8fb;
  --u-data-0: #d4d9e2;
  --u-data-track: #e9ecf1;
  --u-data-warn: #e8940c;
  /* 动效（只给经营总览、经营指标和图表组件；系统设了「减少动态效果」全关，总开关在 app.css 末尾）：缓动 + 四档时长（悬停 / 页签滑动 / 数字数上去 / 条长出来） */
  --u-ease: cubic-bezier(.2, .7, .2, 1);
  --u-dur-1: .15s;
  --u-dur-2: .28s;
  --u-dur-3: .7s;
  --u-dur-4: .9s;
  --u-i: 0;   /* 进场时柱子是第几根（每根晚 60 毫秒）；画柱子的地方在元素上写 style="--u-i:N"，这里是默认 */
}

/* ---------- 页面底子：重做的页面最外层加 u-page ---------- */
.u-page { font-family: var(--u-font); font-size: var(--u-fs-body); line-height: var(--u-lh-body); color: var(--u-ink); display: flex; flex-direction: column; gap: var(--u-space-4); }
.u-page a.u-link, .u-drawer a.u-link, .u-link { color: var(--u-brand); text-decoration: none; cursor: pointer; }
.u-link:hover { color: var(--u-brand-hover); }
.u-link:focus-visible { outline: 2px solid var(--u-brand); outline-offset: 2px; border-radius: 2px; }
.u-num { font-variant-numeric: tabular-nums; }
.u-card { background: var(--u-surface); border: 1px solid var(--u-line); border-radius: var(--u-radius-lg); overflow: hidden; }
.u-card.pop { overflow: visible; }   /* 卡里有「⋯」菜单时用：不裁掉弹出来的菜单，表头两个角自己圆 */
.u-card.pop > .u-tbl > thead > tr > th:first-child { border-top-left-radius: 11px; }
.u-card.pop > .u-tbl > thead > tr > th:last-child { border-top-right-radius: 11px; }
.u-ic { flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.u-ic.b2 { stroke-width: 2; }
.u-ic.b3 { stroke-width: 2.8; }
.u-t-danger { color: var(--u-danger); }
.u-t-warning { color: var(--u-warning); }
.u-t-success { color: var(--u-success); }
.u-t-muted { color: var(--u-ink-3); }
.u-t-strong { font-weight: 600; }
.u-sr { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- 按钮：主 / 次（默认）/ 轻 / 危险；一屏一个主按钮 ---------- */
.u-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--u-radius-md); font-size: 14px; font-weight: 500; font-family: inherit; line-height: 22px; white-space: nowrap; text-decoration: none; cursor: pointer; box-sizing: border-box; background: var(--u-surface); color: var(--u-ink); border: 1px solid var(--u-control); }
.u-btn:hover { background: var(--u-ground); }
.u-btn:focus-visible { outline: 2px solid var(--u-brand); outline-offset: 2px; }
.u-btn.primary { background: var(--u-brand); color: var(--u-surface); border-color: var(--u-brand); font-weight: 600; }
.u-btn.primary:hover { background: var(--u-brand-hover); border-color: var(--u-brand-hover); }
.u-btn.ghost { background: none; color: var(--u-ink-2); border-color: transparent; }
.u-btn.ghost:hover { background: var(--u-neutral-soft); color: var(--u-ink); }
.u-btn.danger { background: var(--u-surface); color: var(--u-danger); border-color: var(--u-danger); }
.u-btn.danger:hover { background: var(--u-danger-soft); }
.u-btn.sm { height: 32px; padding: 0 12px; }
.u-btn.icon { width: 36px; padding: 0; flex: none; color: var(--u-ink-2); }
.u-btn.icon.sm { width: 32px; }
.u-btn:disabled, .u-btn.primary:disabled, .u-btn.ghost:disabled, .u-btn.danger:disabled, .u-btn[aria-disabled="true"] { background: var(--u-neutral-soft); color: var(--u-ink-3); border-color: var(--u-neutral-soft); cursor: not-allowed; }
/* ---------- 批 V18 V18-33 A（审核方 #365 ★1–★9 18:45，Mike 19:08 同意设计稿）：四种 × 三个尺寸——大 44（.lg）/ 中 36（默认）/ 小 32（.sm，照旧不动）
 *   补「文字」（.txt：无底无边、主色字）；不能点一律灰（文字按钮只灰字、没有底）；加载中（[aria-busy]：原宽、字隐去、转圈、不能再点，Core.U.busy）；
 *   表格行内一排动作（Core.U.actions(list, { row: true })）：.u-row-acts 靠右、放不下整个按钮换行；一行只有一个删除时是垃圾桶小图标按钮 .u-del（悬停变红）；
 *   手机（≤ 767）小号视觉变中号 36，透明外扩让点按区上下够 44。老的 .btn / .btn.sm / .btn.xs 是这一套的别名（app.css 就地改，数值一致由用例 6047 核） */
.u-btn.lg { height: 44px; padding: 0 20px; font-size: 15px; }
.u-btn.txt { background: none; color: var(--u-brand); border-color: transparent; padding: 0 8px; }
.u-btn.txt:hover { background: var(--u-brand-soft); }
.u-btn.sm.txt { padding: 0 6px; }
.u-btn.txt:disabled, .u-btn.txt[aria-disabled="true"] { background: none; color: var(--u-ink-3); border-color: transparent; }
.u-btn.u-del:hover { background: var(--u-danger-soft); color: var(--u-danger); }
.u-btn[aria-busy="true"]:not(.u-exp) { position: relative; color: transparent; pointer-events: none; }
.u-btn[aria-busy="true"]:not(.u-exp)::after { content: ""; position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; margin: -7px 0 0 -7px; box-sizing: border-box; border: 2px solid var(--u-line-dot); border-top-color: var(--u-brand); border-radius: var(--u-radius-pill); animation: u-spin .8s linear infinite; }
.u-btn.primary[aria-busy="true"]:not(.u-exp)::after { border-color: rgba(255,255,255,0.35); border-top-color: var(--u-surface); }
.u-row-acts { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px 8px; max-width: 100%; vertical-align: middle; }
@media (min-width: 768px) { .u-row-acts { flex-wrap: nowrap; } }   /* 批 V18 V18-33 C：电脑上一排最多两个按钮 + ⋯，不在窄列里一个摞一个（表格自己变宽）；手机上放不下照样整个按钮换行 */
@media (max-width: 767px) {
  .u-btn.sm { height: 36px; padding: 0 14px; }
  .u-btn.icon.sm { width: 36px; padding: 0; }
  .u-btn { position: relative; }
  .u-btn::before { content: ""; position: absolute; left: 0; right: 0; top: -4px; bottom: -4px; }
}

/* ---------- 状态标签（全圆五档）、代号小块、头像 ---------- */
.u-tag { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: var(--u-radius-pill); font-size: 12px; font-weight: 500; line-height: 18px; white-space: nowrap; flex: none; background: var(--u-neutral-soft); color: var(--u-neutral-ink); }
.u-tag.brand { background: var(--u-brand-soft); color: var(--u-brand); }
.u-tag.danger { background: var(--u-danger-soft); color: var(--u-danger); }
.u-tag.warning { background: var(--u-warning-soft); color: var(--u-warning); }
.u-tag.success { background: var(--u-success-soft); color: var(--u-success); }
.u-tag.neutral { background: var(--u-neutral-soft); color: var(--u-neutral-ink); }
.u-code { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 20px; padding: 0 6px; border-radius: var(--u-radius-sm); background: var(--u-neutral-soft); color: var(--u-neutral-ink); font-size: 12px; font-weight: 600; line-height: 18px; white-space: nowrap; flex: none; font-variant-numeric: tabular-nums; box-sizing: border-box; }
.u-ava { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: var(--u-radius-pill); background: var(--u-brand-soft); color: var(--u-brand); font-size: 12px; font-weight: 600; line-height: 1; flex: none; }
.u-who { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.u-who .nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 数字条：一行最多 6 格，点了就是筛选 ---------- */
.u-stat { display: flex; flex-wrap: wrap; background: var(--u-surface); border: 1px solid var(--u-line); border-radius: var(--u-radius-lg); overflow: hidden; }
.u-stat-i { flex: 1 1 150px; display: flex; flex-direction: column; gap: 2px; padding: 14px 20px; text-decoration: none; color: var(--u-ink); box-sizing: border-box; border: 0; border-right: 1px solid var(--u-line); background: none; font-family: inherit; text-align: left; cursor: pointer; min-width: 0; }
.u-stat-i:last-child { border-right: 0; }
.u-stat-i.static { cursor: default; }
.u-stat-i:hover:not(.static) { background: var(--u-surface-head); }
.u-stat-i:focus-visible { outline: 2px solid var(--u-brand); outline-offset: -2px; }
.u-stat-i .lb { font-size: 12px; line-height: 18px; color: var(--u-ink-2); font-weight: 400; }
.u-stat-i .vl { font-size: var(--u-fs-number); line-height: var(--u-lh-number); font-weight: 600; color: var(--u-ink); font-variant-numeric: tabular-nums; }
.u-stat-i .vl.danger { color: var(--u-danger); }
.u-stat-i .vl.warning { color: var(--u-warning); }
.u-stat-i .vl.success { color: var(--u-success); }
.u-stat-i .vl.zero { color: var(--u-ink-3); }
.u-stat-i .sub { font-size: 12px; line-height: 18px; color: var(--u-ink-3); }
.u-stat-i .sub.danger { color: var(--u-danger); }
.u-stat-i .sub.warning { color: var(--u-warning); }
.u-stat-i .sub.success { color: var(--u-success); }
.u-stat-i > .u-bar { margin: 6px 0 4px; }
.u-stat-i.on { box-shadow: inset 0 -2px 0 var(--u-brand); }
.u-stat-i.on .lb { color: var(--u-brand); font-weight: 600; }

/* ---------- 步骤带：一个流程一行；有人的步骤是胶囊，0 的缩成小点 ---------- */
.u-pipe { background: var(--u-surface); border: 1px solid var(--u-line); border-radius: var(--u-radius-lg); padding: 8px 0; }
.u-pipe-row { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 20px; padding: 6px 20px; }
.u-pipe-hd { flex: 0 0 204px; display: flex; align-items: center; gap: 8px; min-height: 32px; min-width: 0; }
.u-pipe-hd .gap { width: 22px; flex: none; }
.u-pipe-hd .nm { flex: 1; min-width: 0; font-size: 14px; line-height: 18px; color: var(--u-ink); }
.u-pipe-hd .tot { font-size: 14px; font-weight: 600; color: var(--u-ink-2); font-variant-numeric: tabular-nums; }
.u-pipe-steps { flex: 1 1 320px; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 4px; }
.u-pipe-dot { display: inline-flex; align-items: center; justify-content: center; width: 10px; height: 32px; flex: none; }
.u-pipe-dot > i { width: 6px; height: 6px; border-radius: var(--u-radius-pill); background: var(--u-line-dot); display: block; }
.u-pipe-step { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 8px; border-radius: var(--u-radius-md); background: var(--u-brand-soft); color: var(--u-ink); text-decoration: none; white-space: nowrap; font-size: 13px; line-height: 18px; flex: none; box-sizing: border-box; border: 0; font-family: inherit; cursor: pointer; }
.u-pipe-step.static { cursor: default; }
.u-pipe-step:focus-visible { outline: 2px solid var(--u-brand); outline-offset: 2px; }
.u-pipe-step .no { font-size: 12px; color: var(--u-ink-3); font-variant-numeric: tabular-nums; }
.u-pipe-step .n { font-size: 14px; font-weight: 600; color: var(--u-brand); font-variant-numeric: tabular-nums; }
.u-pipe-step.on { background: var(--u-brand); color: var(--u-surface); }
.u-pipe-step.on .no { color: var(--u-brand-line); }
.u-pipe-step.on .n { color: var(--u-surface); }
.u-pipe-late { display: inline-flex; align-items: center; gap: 3px; height: 20px; padding: 0 6px; border-radius: var(--u-radius-pill); background: var(--u-danger-soft); color: var(--u-danger); font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- 筛选条：分段开关 + 下拉 + 搜索 + 导出图标，一行放完 ---------- */
.u-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 12px 16px; }
.u-toolbar.boxed { background: var(--u-surface); border: 1px solid var(--u-line); border-radius: var(--u-radius-lg); }
.u-toolbar-r { margin-left: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.u-seg { display: inline-flex; padding: 2px; background: var(--u-neutral-soft); border-radius: var(--u-radius-md); flex: none; max-width: 100%; }
.u-seg-i { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: var(--u-radius-sm); font-size: 13px; line-height: 18px; text-decoration: none; white-space: nowrap; color: var(--u-ink-2); background: none; border: 0; font-family: inherit; cursor: pointer; }
.u-seg-i .c { color: var(--u-ink-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.u-seg-i.on { background: var(--u-surface); color: var(--u-ink); font-weight: 600; box-shadow: var(--u-shadow-seg); }
.u-seg-i:focus-visible { outline: 2px solid var(--u-brand); outline-offset: 1px; }
.u-filter { position: relative; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--u-control); border-radius: var(--u-radius-md); background: var(--u-surface); font-size: 13px; line-height: 18px; color: var(--u-ink-2); cursor: pointer; white-space: nowrap; box-sizing: border-box; max-width: 100%; }
.u-filter .v { color: var(--u-ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.u-filter > select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 13px; border: 0; margin: 0; padding: 0; appearance: none; -webkit-appearance: none; }
.u-filter:focus-within { outline: 2px solid var(--u-brand); outline-offset: 2px; }
.u-search { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--u-control); border-radius: var(--u-radius-md); background: var(--u-surface); color: var(--u-ink-3); width: 260px; max-width: 100%; box-sizing: border-box; }
/* 老样式里有一条全站的输入框规则（input:not(...) 六个 :not，优先级很高），新零件里的输入框照样写这一串才压得住；老规则本身不动 */
.u-search > input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not(.search-ipt), .u-search > input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not(.search-ipt):hover, .u-search > input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not(.search-ipt):focus { border: 0; outline: 0; border-radius: 0; line-height: 28px; transition: none; flex: 1; min-width: 0; height: 28px; padding: 0; font-size: 13px; font-family: inherit; background: none; color: var(--u-ink); box-shadow: none; }
.u-search:focus-within { outline: 2px solid var(--u-brand); outline-offset: 2px; }

/* ---------- 表格：每格两行（上面结论、下面出处）；行尾小箭头；细进度条 ---------- */
.u-tbl { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 22px; color: var(--u-ink); }
.u-tbl.fixed { table-layout: fixed; }
.u-tbl > thead > tr > th { text-align: left; font-size: 12px; line-height: 18px; font-weight: 500; color: var(--u-ink-3); padding: 10px 16px; background: var(--u-surface-head); border-bottom: 1px solid var(--u-line); white-space: nowrap; }
.u-tbl > tbody > tr > td { padding: 10px 16px; border-bottom: 1px solid var(--u-line); vertical-align: middle; text-align: left; }
.u-tbl > tbody > tr:last-child > td { border-bottom: 0; }
.u-tbl > tbody > tr.click { cursor: pointer; }
.u-tbl > tbody > tr.click:hover > td { background: var(--u-surface-head); }
.u-tbl > tbody > tr.click:focus-visible { outline: 2px solid var(--u-brand); outline-offset: -2px; }
.u-tbl > tbody > tr > td.go, .u-tbl > thead > tr > th.go { width: 40px; padding: 0 12px 0 0; text-align: right; color: var(--u-ink-3); }
.u-tbl .num { text-align: right; font-variant-numeric: tabular-nums; }
.u-cell { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.u-cell .m { min-width: 0; display: flex; align-items: center; gap: 4px; }
.u-cell .m.cut, .u-cell .s.cut { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-cell .s { display: flex; align-items: center; gap: 6px; font-size: 12px; line-height: 18px; color: var(--u-ink-3); min-width: 0; }
.u-bar { display: inline-block; width: 48px; height: 4px; border-radius: 2px; background: var(--u-data-track); overflow: hidden; flex: none; vertical-align: middle; }
/* 批 V18 V18-33 公共件（审核方 #365 ★12）：进度条只有两种渐变——正常靛蓝、落后琥珀；不再有绿色填充（success 照旧能传，样子同正常，「完成了」靠旁边的字说） */
.u-bar > i { display: block; height: 4px; border-radius: 2px; background: linear-gradient(90deg, var(--u-data-1), #6f86ee); }
.u-bar.wide { width: 100%; }
.u-bar.success > i { background: linear-gradient(90deg, var(--u-data-1), #6f86ee); }
.u-bar.warn > i { background: linear-gradient(90deg, #f0b34a, var(--u-data-warn)); }
.u-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 32px 16px; color: var(--u-ink-2); font-size: 14px; line-height: 22px; text-align: center; }
.u-empty .sub { font-size: 12px; line-height: 18px; color: var(--u-ink-3); }

/* ---------- 分页条：左「共 N 件」，右「上一页 · 1 / 4 · 下一页」 ---------- */
.u-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--u-line); font-size: 13px; line-height: 20px; color: var(--u-ink-2); font-variant-numeric: tabular-nums; }
.u-pager-nav { display: flex; align-items: center; gap: 8px; }
.u-pager .pg { padding: 0 4px; }

/* ---------- 字段区：只显示填了的；没填的折成一行 ---------- */
.u-sec { display: flex; flex-direction: column; gap: 12px; }
.u-sec-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.u-sec-hd > h3 { margin: 0; font-size: var(--u-fs-title); line-height: var(--u-lh-title); font-weight: 600; color: var(--u-ink); }
.u-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 24px; }
.u-fields.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.u-fields.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.u-field { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.u-field .k { font-size: 12px; line-height: 18px; color: var(--u-ink-3); }
.u-field .v { font-size: 14px; line-height: 22px; color: var(--u-ink); overflow-wrap: anywhere; }
.u-note { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border-radius: var(--u-radius-md); background: var(--u-ground); font-size: 13px; line-height: 20px; color: var(--u-ink-2); }
.u-note .u-link { font-weight: 500; white-space: nowrap; }

/* ---------- 表单控件（「现在要做」卡里用） ---------- */
.u-label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.u-label > .k { font-size: 12px; line-height: 18px; color: var(--u-ink-2); }
.u-label > .k .req { color: var(--u-danger); }
.u-input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not(.search-ipt) { height: 36px; padding: 0 10px; line-height: 22px; box-shadow: none; border: 1px solid var(--u-control); border-radius: var(--u-radius-md); font-size: 14px; font-family: inherit; color: var(--u-ink); background: var(--u-surface); width: 100%; min-width: 0; box-sizing: border-box; font-variant-numeric: tabular-nums; }
.u-input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not(.search-ipt):hover { border-color: var(--u-control); }
.u-input:not([type=checkbox]):not([type=radio]):not([type=file]):not([type=range]):not([type=color]):not(.search-ipt):focus { outline: 2px solid var(--u-brand); outline-offset: 1px; border-color: var(--u-control); box-shadow: none; }

/* ---------- 「⋯」菜单（结构沿用 V17-4 的 <details>；同时只开一个、点外面 / Esc 收起由 ui-kit.js 全站绑一次） ---------- */
.u-more { position: relative; display: inline-flex; flex: none; }
.u-more > summary { list-style: none; }
.u-more > summary::-webkit-details-marker { display: none; }
.u-more[open] > summary.u-btn.ghost { background: var(--u-neutral-soft); color: var(--u-ink); }
.u-more-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 176px; max-width: 320px; background: var(--u-surface); border: 1px solid var(--u-line); border-radius: var(--u-radius-md); box-shadow: var(--u-shadow-pop); padding: 4px; display: flex; flex-direction: column; }
.u-more.drop-up > .u-more-menu { top: auto; bottom: calc(100% + 4px); }
.u-more.drop-start > .u-more-menu { right: auto; left: 0; }
.u-more-menu > a, .u-more-menu > button { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: var(--u-radius-sm); font-size: 14px; line-height: 22px; color: var(--u-ink); cursor: pointer; white-space: nowrap; text-decoration: none; background: none; border: 0; font-family: inherit; text-align: left; }
.u-more-menu > a:hover, .u-more-menu > button:hover, .u-more-menu > a:focus-visible, .u-more-menu > button:focus-visible { background: var(--u-neutral-soft); outline: none; }
.u-more-menu > .danger { color: var(--u-danger); }
.u-more-menu > .danger:hover, .u-more-menu > .danger:focus-visible { background: var(--u-danger-soft); }

/* ---------- 抽屉（Core.U.drawer）：头部、进度、「现在要做」、页签、底部动作栏。开合、遮罩、定位沿用老的 .drawer ---------- */
.u-drawer { font-family: var(--u-font); font-size: 14px; line-height: 22px; color: var(--u-ink); background: var(--u-surface); }
.u-drawer > .drawer-hd { display: none; }
/* 外壳贴边以后（Mike 11-15 19:04 定），新抽屉也照规范稿贴右边、通栏、左边一条描边；老抽屉（没有 u-drawer 的）照旧悬浮。手机（≤767）照 app.css 那一套铺满 */
@media (min-width: 768px) {
  .u-drawer.drawer { top: 0; right: 0; bottom: 0; max-width: 100vw; border: 0; border-left: 1px solid var(--u-line); border-radius: 0; box-shadow: var(--u-shadow-pop); }
}
.u-drawer > .drawer-bd { padding: 0; background: var(--u-surface); display: flex; flex-direction: column; }
.u-drawer > .drawer-ft { display: flex; align-items: center; justify-content: flex-start; gap: 8px; padding: 12px 24px; border-top: 1px solid var(--u-line); background: var(--u-surface); }
.u-drawer > .drawer-ft > .sp { margin-left: auto; flex: none; }
.u-dh { padding: 20px 24px 16px; display: flex; flex-direction: column; gap: 6px; flex: none; }
.u-dh-t { display: flex; align-items: center; gap: 10px; min-width: 0; }
.u-dh-t > h2 { margin: 0; font-size: var(--u-fs-page-title); line-height: var(--u-lh-page-title); font-weight: 600; color: var(--u-ink); min-width: 0; overflow-wrap: anywhere; }
.u-dh-t > .sub { font-size: 14px; color: var(--u-ink-3); white-space: nowrap; }
.u-dh-tags { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
.u-dh-x { margin-left: auto; display: inline-flex; gap: 4px; flex: none; align-self: flex-start; }
.u-dh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 16px; font-size: 13px; line-height: 20px; color: var(--u-ink-2); }
.u-steps { padding: 0 24px 16px; display: flex; flex-direction: column; gap: 8px; flex: none; }
.u-steps-bar { display: flex; gap: 3px; }
.u-steps-bar > i { flex: 1; height: 6px; border-radius: 3px; background: var(--u-line); overflow: hidden; display: block; }
.u-steps-bar > i.done { background: var(--u-brand); }
.u-steps-bar > i.now { background: var(--u-brand-line); }
.u-steps-bar > i.now > b { display: block; width: 50%; height: 6px; background: var(--u-brand); }
.u-steps-cap { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; line-height: 18px; color: var(--u-ink-3); }
.u-now { margin: 0 24px; padding: 16px; border: 1px solid var(--u-brand-line); border-radius: var(--u-radius-lg); display: flex; flex-direction: column; gap: 12px; flex: none; }
.u-now-hd { display: flex; flex-direction: column; gap: 2px; }
.u-now-hd > .k { font-size: 12px; line-height: 18px; font-weight: 600; color: var(--u-brand); }
.u-now-hd > .t { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.u-now-hd > .t > h3 { margin: 0; font-size: var(--u-fs-title); line-height: var(--u-lh-title); font-weight: 600; color: var(--u-ink); }
.u-now-hd > .t > .u-who { font-size: 13px; color: var(--u-ink-2); }
.u-now-late { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 20px; font-weight: 500; color: var(--u-danger); }
.u-now-late.warning { color: var(--u-warning); }
.u-now-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.u-now-done { font-size: 13px; line-height: 20px; color: var(--u-ink-2); }
.u-tabs { display: flex; flex-wrap: wrap; gap: 0 24px; padding: 0 24px; margin-top: 20px; border-bottom: 1px solid var(--u-line); flex: none; }
.u-tabs.flat { padding: 0; margin-top: 0; }
.u-tab { display: inline-flex; align-items: center; gap: 6px; padding: 10px 0; font-size: 14px; line-height: 22px; text-decoration: none; color: var(--u-ink-2); background: none; border: 0; font-family: inherit; cursor: pointer; white-space: nowrap; }
.u-tab .c { color: var(--u-ink-3); font-weight: 400; font-variant-numeric: tabular-nums; }
.u-tab.on { color: var(--u-ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--u-brand); }
.u-tab:focus-visible { outline: 2px solid var(--u-brand); outline-offset: -2px; }
.u-dbody { flex: 1 0 auto; display: flex; flex-direction: column; gap: 24px; padding: 20px 24px 24px; min-width: 0; }

/* ---------- 顶栏页面按钮位（Core.U.pageActions）：没有页面用时不占地方 ---------- */
.u-top-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.u-top-actions:empty { display: none; }
.u-top-actions::after { content: ""; width: 1px; height: 20px; margin: 0 6px; background: var(--u-line); }

/* ---------- 导出图标按钮（Core.U.exportBtn）：导出中只转圈 ---------- */
.u-exp.busy { font-size: 0; }
.u-exp.busy::after { content: ""; width: 14px; height: 14px; border: 2px solid var(--u-line-dot); border-top-color: var(--u-brand); border-radius: var(--u-radius-pill); animation: u-spin .8s linear infinite; box-sizing: border-box; }
@keyframes u-spin { to { transform: rotate(360deg); } }

/* ---------- 样例页 #/ui-kit ---------- */
.u-kit { max-width: 1180px; }
.u-kit-sec { display: flex; flex-direction: column; gap: 12px; }
.u-kit-sec > .cap { font-size: 12px; line-height: 18px; color: var(--u-ink-3); }
.u-kit-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.u-kit-sw { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.u-kit-sw > div { display: flex; flex-direction: column; gap: 4px; font-size: 12px; line-height: 18px; color: var(--u-ink-2); }
.u-kit-sw > div > i { display: block; height: 40px; border-radius: var(--u-radius-md); border: 1px solid var(--u-line); }
/* 批 V18 V18-33 A：样例页「按钮规范」一节（四种 × 三尺寸的格子、六条用法） */
.u-kit-pad { padding: 20px 24px; }
.u-kit-mx { display: grid; grid-template-columns: 170px repeat(4, minmax(0, 1fr)); gap: 16px; align-items: center; }
.u-kit-mx .lb { font-size: 12px; line-height: 18px; color: var(--u-ink-3); }
.u-kit-mx .k { font-size: 13px; line-height: 20px; color: var(--u-ink-2); }
.u-kit-mx .k b { display: block; color: var(--u-ink); font-weight: 600; }
.u-kit-rules { margin: 0; padding-left: 18px; font-size: 14px; line-height: 24px; color: var(--u-ink); }

/* ---------- 批 V18 V18-33 公共件（审核方 #365 18:45；样子照 V18-25 交互和动效稿）：进场动效、跳转前的轻提示 ----------
 *   进场：容器加 .u-enter（Core.U.enter 加、到点自己摘），里面标了的元素从 0 长到位——.u-gx 横条从左边长出来、.u-gy 柱子从底下升起（--u-i = 第几根，每根晚 60 毫秒；
 *   负数柱再加 .u-neg 从上往下长）、.u-gl 折线画出来（path 要带 pathLength="1"）、.u-fade 淡入上移 8px。只给经营总览、经营指标和图表组件用（★13） */
@keyframes u-gx { from { transform: scaleX(0); } }
@keyframes u-gy { from { transform: scaleY(0); } }
@keyframes u-gl { from { stroke-dashoffset: 1; } }
@keyframes u-fade { from { opacity: 0; transform: translateY(8px); } }
.u-enter .u-gx { transform-box: fill-box; transform-origin: 0 50%; animation: u-gx var(--u-dur-4) var(--u-ease) both; }
.u-enter .u-gy { transform-box: fill-box; transform-origin: 50% 100%; animation: u-gy var(--u-dur-3) var(--u-ease) both; animation-delay: calc(var(--u-i, 0) * 60ms); }
.u-enter .u-gy.u-neg { transform-origin: 50% 0; }
.u-enter .u-gl { stroke-dasharray: 1; animation: u-gl var(--u-dur-4) var(--u-ease) both; }
.u-enter .u-fade { animation: u-fade .32s var(--u-ease) both; }
/* 跳转前的轻提示（Core.navHint）：深色胶囊、底部居中、2.6 秒自己消失、同时只有一条；成功 / 失败的 toast 照旧在顶上 */
.u-navhint { position: fixed; left: 50%; bottom: 28px; z-index: 400; display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px); padding: 10px 16px 10px 12px; box-sizing: border-box; border-radius: var(--u-radius-pill); background: var(--u-ink); color: var(--u-surface); font-family: var(--u-font); font-size: 13px; line-height: 20px; box-shadow: 0 12px 32px rgba(16,24,40,0.28); transform: translate(-50%, 24px); opacity: 0; pointer-events: none; transition: transform var(--u-dur-2) var(--u-ease), opacity .2s; }
.u-navhint.on { transform: translate(-50%, 0); opacity: 1; }
.u-navhint > i { flex: none; width: 14px; height: 14px; box-sizing: border-box; border-radius: var(--u-radius-pill); border: 2px solid rgba(255,255,255,0.35); border-top-color: var(--u-surface); animation: u-spin .7s linear infinite; }
.u-navhint > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-navhint em { font-style: normal; color: var(--u-control); }   /* 批 V21 V21-5：原来借侧栏的 --u-navy-muted，侧栏换浅色后在深色胶囊上不够亮，改用 --u-control（5.67:1），不再跟侧栏连着变 */
@media (prefers-reduced-motion: reduce) {
  .u-enter .u-gx, .u-enter .u-gy, .u-enter .u-gl, .u-enter .u-fade { animation: none; }
  .u-navhint { transition: none; }
  .u-navhint > i { animation: none; }
}

/* ---------- 窄屏：保证不坏、能换行的换行 ---------- */
@media (max-width: 768px) {
  .u-fields, .u-fields.c4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .u-pipe-hd { flex: 1 1 100%; }
  .u-toolbar-r { margin-left: 0; width: 100%; }
  .u-search { width: 100%; }
  .u-now-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .u-fields, .u-fields.c2, .u-fields.c4 { grid-template-columns: minmax(0, 1fr); }
  .u-stat-i { flex-basis: 50%; }
}

/* ---------- 批 V19 V19-11（#432 ★11，设计稿第 2 版）：弹窗件的两个变体——上班打卡那张卡（Core.modal opt.locked：关不掉）、下班打卡
 *   Core.modal(…, { cls }) 把 u-modal-card / u-modal-alarm 加在 .modal-box 上；locked 时遮罩多一个 u-mask-locked（本文件只许 .u- 起头的选择器，用例 5530 / 6099）
 *   .u-modal-card  普通卡（早上好 / 下班打卡）：大标题 + 一行小字，底栏按钮整行
 *   .u-modal-alarm 红头（昨天有 N 件事没完成）：红底白字 + 叹号 */
.u-mask-locked { background: rgba(15, 23, 42, .62); }
.u-modal-card, .u-modal-alarm { width: 600px; border-radius: 16px; overflow: hidden; box-shadow: var(--u-shadow-pop); }
.u-modal-card > .drawer-hd { padding: 20px 22px 10px; background: var(--u-surface); border-bottom: 0; }
.u-modal-card > .drawer-hd h3 { margin: 0; font-size: 20px; line-height: 28px; font-weight: 700; color: var(--u-ink); }
.u-mc-tx, .u-ma-tx { display: flex; flex-direction: column; min-width: 0; }
.u-mc-sub { margin-top: 4px; font-size: 14px; line-height: 22px; font-weight: 400; color: var(--u-ink-2); }
.u-modal-alarm > .drawer-hd { padding: 20px 22px; background: var(--u-danger); border-bottom: 0; }
.u-modal-alarm > .drawer-hd h3 { display: flex; align-items: center; gap: 14px; margin: 0; color: #fff; }
.u-ma-ic { width: 44px; height: 44px; border-radius: 50%; background: rgba(255, 255, 255, .18); display: flex; align-items: center; justify-content: center; flex: none; }
.u-ma-ic .u-ic { stroke: #fff; color: #fff; }
.u-ma-t { font-size: 22px; line-height: 30px; font-weight: 700; color: #fff; }
.u-ma-sub { font-size: 14px; line-height: 22px; font-weight: 400; color: rgba(255, 255, 255, .92); }
.u-modal-card > .drawer-bd, .u-modal-alarm > .drawer-bd { background: var(--u-surface); padding: 4px 22px 8px; }
.u-modal-card > .drawer-ft, .u-modal-alarm > .drawer-ft { border-top: 0; background: none; padding: 12px 22px 18px; }
.u-modal-card[data-mkey="eod-start"] > .drawer-ft .u-btn, .u-modal-alarm > .drawer-ft .u-btn { flex: 1; }
@media (max-width: 600px) {
  .u-modal-card, .u-modal-alarm { width: auto; border-radius: 14px; }
  .u-ma-t { font-size: 20px; line-height: 28px; }
  .u-modal-card > .drawer-ft, .u-modal-alarm > .drawer-ft { flex-wrap: wrap; }
}
