/* ============================================================
   审批中心 · UI v3 设计系统 ·「墨青 · 纸感」
   —— 30 年经验级重构:
     ① 品牌面 = 墨青海军(hero: 登录/欢迎/详情), 操作面 = 品牌蓝;
     ② 中性色暖纸灰(冷湿滑 → 纸感), 次级文本真降权(--text-2 ≠ --text);
     ③ 信息层级做深: 统计卡桥接 hero 边缘 / 首卡视觉加权 / tabular-nums;
     ④ 无障碍: :focus-visible 全局焦点环(修复 outline:none 裸奔);
     ⑤ 纪律: 8pt 网格 / 字阶 12-24 / 圆角 10·14·20 / 阴影三级 /
             触控 ≥44px / CSP 全外置零内联样式(本次根治残留 style=)
   分层: 1 tokens → 2 base → 3 chrome(顶栏/底栏) → 4 通用组件
         5 页面组件 → 6 动效 → 7 工具类 → 8 桌面适配 → 9-12 业务区
   ============================================================ */

/* ========== 1. DESIGN TOKENS ========== */
:root {
  /* —— 应用列宽(≥768px 桌面收敛为居中应用列) —— */
  --app-max: 720px;

  /* —— 主色 #2B6FFF 全阶(50-700): 操作/强调面 —— */
  --p50: #eef4ff; --p100: #d9e6ff; --p200: #b8d0ff; --p300: #8db1ff;
  --p400: #5c92ff; --p500: #2b6fff; --p600: #1f57d6; --p700: #17419f;
  --brand: var(--p600); --brand-strong: var(--p700);

  /* —— 墨青海军(品牌面: 登录/欢迎/详情 hero) —— */
  --ink-950: #0a1c3d;
  --ink-900: #0d2348;
  --ink-800: #123063;
  --ink-700: #1a3f7e;
  --ink-glow: rgba(84, 128, 220, 0.38); /* hero 顶部柔光 */

  /* —— 语义色 各 100/600/700 —— */
  --ok100: #dcfce9;   --ok600: #16a34a;   --ok700: #15803d;
  --warn100: #fef3c7; --warn600: #d97706;  --warn700: #b45309;
  --dgr100: #fee2e2;  --dgr600: #dc2626;  --dgr700: #b91c1c;
  --info100: #e0f2fe; --info600: #0284c7;

  /* —— 中性 9 阶(暖纸灰: 去蓝冷, 纸感) —— */
  --n0: #ffffff; --n1: #fafaf7; --n2: #f3f3ee; --n3: #e6e5df;
  --n4: #cbc9c0; --n5: #96948a; --n6: #6b6960; --n7: #3a3933; --n8: #1c1b17;

  /* —— 模板彩色圆底(10 模板各配色) —— */
  --blue50:#eef4ff;  --blue600:#2563eb;
  --violet50:#f1effe;--violet600:#7c3aed;
  --cyan50:#e0f7fa;  --cyan600:#0e7490;
  --teal50:#e6faf5;  --teal600:#0d9488;
  --amber50:#fdf3df; --amber600:#d97706;
  --orange50:#fff0e6;--orange600:#ea580c;
  --rose50:#fdeef2;  --rose600:#e11d48;
  --indigo50:#eaf0fe;--indigo600:#4f46e5;
  --sky50:#e8f5fd;   --sky600:#0284c7;
  --green50:#e8f9ef; --green600:#16a34a;

  /* —— 间距(8pt 网格) —— */
  --s1: 4px; --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 20px; --s6: 24px; --s8: 32px; --s10: 40px; --s12: 48px;

  /* —— 字阶 —— */
  --f12: 12px; --f13: 13px; --f15: 15px; --f17: 17px; --f20: 20px; --f24: 24px;

  /* —— 圆角体系 —— */
  --r-ctl: 10px; --r-card: 14px; --r-pop: 20px;
  --r-xs: 6px; --r-sm: 8px; --r-pill: 999px;

  /* —— 阴影三级 elevation(暖色底影) —— */
  --e1: 0 1px 2px rgba(28, 27, 23, 0.05); /* 扁平化: 单层阴影 */
  --e2: 0 1px 3px rgba(28, 27, 23, 0.07);
  --e3: 0 2px 8px rgba(28, 27, 23, 0.12);

  /* —— 过渡 —— */
  --t-fast: 0.15s ease; --t-mid: 0.25s ease;

  /* —— 语义 token —— */
  --bg: var(--n2); --card: var(--n0);
  --text: var(--n8); --text-2: var(--n7);
  --muted: var(--n6); --faint: var(--n5);
  --line: var(--n3); --line-strong: var(--n4);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-btm: env(safe-area-inset-bottom, 0px);
  --tabbar-h: 56px;
}

/* ========== 2. BASE ========== */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  /* [v67 老板令 第三次"毫无变化" 根治] 之前 6% 太淡肉眼看不见, 这次加重:
     ① 顶部品牌蓝径向光晕 15%(肉眼可见的柔光) + 顶到底自然衰减
     ② 左上角额外加一抹青绿光晕(品牌双色调, OpenClaw 设计哲学: 品牌面=墨青, 操作面=品牌蓝)
     ③ 右下加极淡暖纸纹路(纸张纤维质感)
     —— 毛玻璃这下有"显式可见"的内容可折射, 用户必看见变化 */
  background:
    radial-gradient(110% 55% at 50% -8%, rgba(43, 111, 255, 0.15), transparent 55%),
    radial-gradient(60% 45% at 8% 0%, rgba(13, 148, 136, 0.07), transparent 60%),
    radial-gradient(70% 50% at 92% 100%, rgba(184, 152, 96, 0.05), transparent 60%),
    var(--bg);
  background-attachment: fixed, fixed, fixed, auto;
  color: var(--text);
  font-size: var(--f15); line-height: 1.55;
  /* 数字一律等宽: 统计/金额跳动不抖, CJK 不受影响 */
  font-variant-numeric: tabular-nums;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-btm));
  overscroll-behavior-y: none;
  overflow-x: clip;
}
#app { max-width: var(--app-max); margin: 0 auto; min-height: 100vh; }
a { color: inherit; }
button { font: inherit; } /* Firefox 原生 button 默认 10pt，统一继承上下文字体 */
img { max-width: 100%; }
:focus { outline: none; }
/* 键盘/辅助技术导航可见焦点环(修复全局裸奔)——触屏点击不打扰 */
:focus-visible { outline: 2px solid var(--p500); outline-offset: 2px; border-radius: 4px; }

/* ========== 3. CHROME: 顶栏(毛玻璃) ========== */
/* [v67 老板令 第三次"毫无变化" 根治] 顶栏透明度 0.88→0.65: 之前 0.88 几乎不透, 等于无玻璃; 现在肉眼可见半透; 配合 v67 body 径向渐变, 顶栏下面有"东西"折射, 玻璃效果立等可见 */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: var(--s3);
  padding: calc(var(--s2) + var(--safe-top)) var(--s4) var(--s2);
  background: rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: blur(18px) saturate(1.8);
  backdrop-filter: blur(18px) saturate(1.8);
  color: var(--text);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 1px 0 rgba(43, 111, 255, 0.04);
}
.topbar .title {
  font-size: var(--f17); font-weight: 600; flex: 1; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  letter-spacing: 0.2px;
}
.iconbtn {
  position: relative; width: 44px; height: 44px; flex-shrink: 0;
  border: none; border-radius: 50%; cursor: pointer;
  background: var(--n2); color: var(--n6);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), transform var(--t-fast), color var(--t-fast);
}
.iconbtn:active { background: var(--n3); color: var(--n7); transform: scale(0.94); }
.iconbtn .badge {
  position: absolute; top: -2px; right: -4px; min-width: 16px; height: 16px;
  padding: 0 4px; background: var(--dgr700); color: #fff;
  border-radius: var(--r-pill); font-size: var(--f12); line-height: 16px;
  font-weight: 600; box-shadow: 0 0 0 2px var(--n0);
}
.topbar .avatar-mini {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--p600); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--f13); font-weight: 600; cursor: pointer;
  box-shadow: var(--e1);
}

/* ========== 3. CHROME: 底部导航(活动药丸) ========== */
/* [v67] 底栏透明度 0.96→0.72: 之前几乎实心白, 现在肉眼可见半透 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: flex; max-width: var(--app-max); margin: 0 auto;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.8);
  backdrop-filter: blur(18px) saturate(1.8);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  padding-bottom: var(--safe-btm);
}
.tabbar a {
  flex: 1; min-height: var(--tabbar-h);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--n5); text-decoration: none; font-size: var(--f12);
  position: relative; transition: color var(--t-fast);
}
.tabbar a .ico { display: flex; transition: all var(--t-fast); border-radius: var(--r-sm); padding: 2px 10px; }
.tabbar a.active { color: var(--brand); font-weight: 600; }
.tabbar a.active .ico { background: var(--p50); }
.tabbar a .dot {
  position: absolute; top: calc(var(--s1) + 2px); left: calc(50% + 8px);
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--dgr700); border-radius: var(--r-pill);
  color: #fff; font-size: var(--f12); line-height: 16px; font-weight: 600;
  box-shadow: 0 0 0 2px #fff;
  font-variant-numeric: tabular-nums;
}

/* ========== 4. 通用: 布局/卡片 ========== */
.page { padding: var(--s4) var(--s4) var(--s6); }
/* [v67 老板令 第三次"毫无变化" 根治] card 0.94→0.82 + blur 6→10px: 之前 0.94 几乎不透, 玻璃等于无; 现在肉眼可见半透, 顶栏玻璃能看见卡片边缘色 */
.card {
  background: rgba(255, 255, 255, 0.82);
  -webkit-backdrop-filter: blur(10px) saturate(1.4);
  backdrop-filter: blur(10px) saturate(1.4);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--r-card);
  padding: var(--s4); margin-bottom: var(--s3);
  box-shadow: var(--e1);
}
.card.pad-s { padding: var(--s3); }
.card h3 {
  margin: 0 0 var(--s3); font-size: var(--f15); font-weight: 600;
  display: flex; align-items: center; gap: var(--s2); color: var(--text);
}
.card h3 .h-ico { color: var(--brand); display: flex; }
.section-title {
  font-size: var(--f13); color: var(--muted); font-weight: 600;
  margin: var(--s5) var(--s1) var(--s2);
  display: flex; align-items: center; gap: var(--s2);
}
/* 分区标题右端"全部 ›"式文字链: 列表收敛后提供完整入口 */
.section-title .more {
  margin-left: auto; font-size: var(--f12); font-weight: 500;
  color: var(--p600); text-decoration: none; display: inline-flex; align-items: center; gap: 2px;
}
.section-title .more:active { opacity: 0.6; }
.section-title::before {
  content: ''; width: 3px; height: 12px; border-radius: 2px;
  background: var(--brand); display: inline-block;
}
.section-plain::before { display: none; }

/* ========== 4. 通用: 按钮 ========== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s1);
  min-height: 44px; border: none; border-radius: var(--r-ctl);
  padding: 0 var(--s5); font-size: var(--f15); font-weight: 600;
  background: var(--brand); color: #fff; cursor: pointer;
  box-shadow: 0 1px 3px rgba(31, 87, 214, 0.3);
  transition: transform var(--t-fast), box-shadow var(--t-fast), opacity var(--t-fast), background var(--t-fast);
  position: relative; text-decoration: none;
}
.btn:active { transform: scale(0.97); background: var(--brand-strong); }
.btn.block { display: flex; width: 100%; }
.btn.ghost {
  background: var(--n0); color: var(--brand);
  border: 1px solid var(--p200); box-shadow: var(--e1);
}
.btn.ghost:active { background: var(--p50); }
.btn.danger { background: var(--dgr600); box-shadow: 0 2px 8px rgba(220, 38, 38, 0.24); }
.btn.danger-o { background: var(--n0); color: var(--dgr600); border: 1.5px solid var(--dgr600); box-shadow: none; }
.btn.ok { background: var(--ok700); } /* 白字 5.0:1 */
.btn.warn { background: var(--warn700); } /* 白字 5.0:1 */
.btn.plain { background: var(--n2); color: var(--text-2); box-shadow: none; }
.btn.sm { min-height: 44px; padding: 0 var(--s4); font-size: var(--f13); border-radius: var(--r-sm); box-shadow: none; }
.btn[disabled] { opacity: 0.55; pointer-events: none; }
.btn .spin {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4); border-top-color: #fff;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btnrow { display: flex; gap: var(--s2); flex-wrap: wrap; }
.btnrow .btn { flex: 1; min-width: 100px; }

/* ========== 4. 通用: 图标 ========== */
.ico-svg { display: inline-flex; vertical-align: middle; flex-shrink: 0; }
.ico-svg svg { display: block; }

/* 彩色圆底模板图标(色彩预算纪律: 蓝/琥珀复用品牌与语义色桶, 青/紫为仅有的两个专属色桶) */
.tpl-ico {
  width: 44px; height: 44px; border-radius: var(--r-ctl);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  background: var(--tbg, var(--p50)); color: var(--tc, var(--brand));
  transition: transform var(--t-fast), filter var(--t-fast);
}
.tpl-ico.lg { width: 54px; height: 54px; border-radius: var(--r-card); }
.tpl-ico.sm { width: 36px; height: 36px; border-radius: var(--r-sm); }
.c-blue   { --tbg: var(--p50);     --tc: var(--p600); }
.c-amber  { --tbg: var(--warn100); --tc: var(--warn700); }
.c-teal   { --tbg: var(--teal50);  --tc: var(--teal600); }
.c-violet { --tbg: var(--violet50);--tc: var(--violet600); }

/* 头像圈 */
.avatar-c {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--f13); font-weight: 600; color: #fff;
  background: var(--p600);
}
.avatar-c.sm { width: 32px; height: 32px; font-size: var(--f12); }
.avatar-c.gray { background: var(--n6); }
.avatar-c.green { background: var(--ok700); }
.avatar-c.red { background: var(--dgr700); }
.avatar-c.amber { background: var(--warn700); }

/* ========== 4. 通用: 状态 chips(圆点+文字) ========== */
.st-chip {
  white-space: nowrap;
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--f12); font-weight: 600; line-height: 1;
  padding: 5px 10px; border-radius: var(--r-pill);
}
  font-variant-numeric: tabular-nums;
}
.st-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-approving, .st-submitted { background: var(--p50); color: var(--p600); }
.st-approved { background: var(--ok100); color: var(--ok700); }
.st-rejected { background: var(--dgr100); color: var(--dgr700); }
.st-returned { background: var(--warn100); color: var(--warn700); }
.st-draft, .st-withdrawn { background: var(--n2); color: var(--n6); }
.overdue-flag {
  display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
  background: var(--dgr100); color: var(--dgr700);
  font-size: var(--f12); font-weight: 600; padding: 2px 8px;
  border-radius: var(--r-xs);
}
.chip {
  display: inline-flex; align-items: center; gap: var(--s1); white-space: nowrap;
  background: var(--n2); color: var(--text-2);
  border-radius: var(--r-xs); padding: 3px 8px;
  font-size: var(--f12); margin: 0 var(--s1) var(--s1) 0; font-weight: 500;
}
.chip.p { background: var(--p50); color: var(--p600); }
.chip.ok { background: var(--ok100); color: var(--ok700); }
.chip.warn { background: var(--warn100); color: var(--warn700); }
.chip.dgr { background: var(--dgr100); color: var(--dgr700); }

/* ========== 4. 通用: 分段 tab + 筛选 ========== */
.seg {
  display: flex; background: var(--n2); border-radius: var(--r-ctl);
  padding: 3px; margin-bottom: var(--s3); gap: 2px;
}
.seg button {
  flex: 1; min-height: 44px; border: none; border-radius: var(--r-sm);
  background: transparent; color: var(--muted); font-size: var(--f13);
  font-weight: 500; cursor: pointer; font-family: inherit;
  transition: all var(--t-fast); white-space: nowrap; padding: 0 var(--s2);
}
.seg button.active {
  background: var(--card); color: var(--brand); font-weight: 600; box-shadow: var(--e1);
}
.fchips { display: flex; gap: var(--s2); overflow-x: auto; margin-bottom: var(--s3); scrollbar-width: none; }
.fchips::-webkit-scrollbar { display: none; }
.fchips button {
  min-height: 40px; padding: 0 var(--s4); border-radius: var(--r-pill);
  border: 1px solid var(--line); background: var(--card); color: var(--muted);
  font-size: var(--f12); font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: all var(--t-fast); font-family: inherit;
}
.fchips button.active { background: var(--p50); border-color: var(--p200); color: var(--p600); font-weight: 600; }

/* ========== 4. 通用: 表单 ========== */
.field { margin-bottom: var(--s4); }
.field label {
  display: flex; align-items: center; gap: 5px;
  font-size: var(--f13); color: var(--text-2); font-weight: 600; margin-bottom: var(--s2);
}
.field label .f-ico { color: var(--n5); display: flex; }
.field label .req { color: var(--dgr600); margin-left: 2px; font-weight: 700; }
.field input[type=text], .field input[type=number], .field input[type=password],
.field input[type=tel], .field input[type=email], .field input[type=search],
.field input[type=date], .field input[type=datetime-local], .field select, .field textarea {
  /* v0.3.9 老板令: 输入框整体收紧一档 44→40px(触控仍安全), 全站统一同规格; 字号保持16px(iOS红线) */
  width: 100%; min-height: 40px; border: 1.5px solid var(--line);
  border-radius: var(--r-ctl); padding: var(--s2) var(--s3);
  /* 16px 是 iOS 平台强制线: <16px 时 WebKit 聚焦输入框会放大整页(2026-09-09 老板 iPhone 排版错乱根因), 不属设计字阶 */
  font-size: 16px; background: var(--n1); color: var(--text);
  font-family: inherit; transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.field textarea { min-height: 84px; resize: vertical; padding-top: var(--s2); }
/* [v0.3.11] iOS 日期框原生样式归一: WebKit 给 type=date 套原生外观(自带高度/内边距, iPhone 上比文字框高一头) — 关原生外观, 强制与全站输入框同规格 40px */
.field input[type=date], .field input[type=datetime-local] {
  -webkit-appearance: none; appearance: none;
  height: 40px; min-height: 40px; line-height: 40px;
  padding: 0 var(--s3); display: block;
}
.field input[type=date]:focus, .field input[type=datetime-local]:focus { line-height: 40px; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); background: var(--card);
  box-shadow: 0 0 0 3px rgba(43, 111, 255, 0.14);
}
.field .hint { font-size: var(--f12); color: var(--faint); margin-top: var(--s1); display: flex; align-items: center; gap: 4px; }
.row2 { display: flex; gap: var(--s2); flex-wrap: wrap; }
.row2 .field { flex: 1 1 150px; min-width: 0; }
.jsonbox {
  width: 100%; min-height: 160px; border: 1.5px solid var(--line);
  border-radius: var(--r-ctl); padding: var(--s2) var(--s3);
  font-size: var(--f12); font-family: ui-monospace, Menlo, Consolas, monospace;
  background: var(--n1); color: var(--text); line-height: 1.6;
}
.upload-btn { display: flex; align-items: center; gap: var(--s2); }
.upload-ok { color: var(--ok600); font-size: var(--f12); display: inline-flex; align-items: center; gap: 4px; }

/* 开关(toggle) — 固定轨道+命中去耦: 44px 命中区, 26px 视觉轨道经 ::before/::after 绝对定位自居中,
 * 不依赖父行 align-items 兜底; 轨道/把手中心与行中心严格重合 */
.tgl {
  /* 44px 命中区元素(审计≥44), 26px 视觉轨道居中——开关类控件的标准做法 */
  position: relative; display: inline-block; width: 52px; height: 44px;
  background: transparent; border: none; cursor: pointer; flex-shrink: 0; padding: 0; margin: 0;
  line-height: 44px; vertical-align: middle;
}
.tgl::before {
  content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 26px;
  transform: translateY(-50%); border-radius: var(--r-pill); background: var(--n4);
  transition: background var(--t-mid);
}
.tgl::after {
  content: ''; position: absolute; left: 3px; top: 50%; width: 20px; height: 20px;
  transform: translateY(-50%); border-radius: 50%; background: #fff; box-shadow: var(--e1);
  transition: transform var(--t-mid);
}
.tgl.on::before { background: var(--ok600); }
.tgl.on::after { transform: translateY(-50%) translateX(26px); }

/* ========== 4. 通用: 骨架屏(shimmer) ========== */
.skl {
  position: relative; overflow: hidden;
  background: var(--n2); border-radius: var(--r-sm);
}
.skl::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, 0.75) 50%, transparent 70%);
  animation: shimmer 1.3s ease-in-out infinite;
  transform: translateX(-100%);
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skl-card {
  background: var(--card); border-radius: var(--r-card); box-shadow: var(--e1);
  padding: var(--s4); margin-bottom: var(--s3); display: flex; gap: var(--s3);
}
.skl-card .col { flex: 1; }
.skl-t { height: 17px; margin-bottom: var(--s2); width: 62%; }
.skl-m { height: 13px; margin-bottom: var(--s2); width: 84%; }
.skl-s { height: 13px; width: 46%; }

/* ========== 4. 通用: 空态 / 错误态 ========== */
.empty {
  text-align: center; padding: var(--s12) var(--s6); color: var(--muted);
}
.empty.flush { padding: var(--s6); } /* 卡片内紧凑空态(原内联 style 治理) */
.empty .e-svg { display: flex; justify-content: center; margin-bottom: var(--s4); color: var(--n4); }
.empty .e-t { font-size: var(--f15); font-weight: 600; color: var(--text-2); margin-bottom: var(--s1); }
.empty .e-d { font-size: var(--f13); color: var(--faint); margin-bottom: var(--s4); }
.err-view { text-align: center; padding: var(--s12) var(--s6); }
.err-view .e-svg { display: flex; justify-content: center; margin-bottom: var(--s4); color: var(--warn600); }
.err-view .e-t { font-size: var(--f17); font-weight: 600; margin-bottom: var(--s2); }

/* ========== 4. 通用: toast ========== */
.toast-wrap {
  position: fixed; top: calc(var(--s8) + var(--safe-top)); left: 50%;
  transform: translateX(-50%); z-index: 99;
  display: flex; flex-direction: column; gap: var(--s2); align-items: center;
  width: max-content; max-width: 86vw; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: var(--s2);
  /* [v65 老板令] toast 改毛玻璃(Tier 2): 与 topbar 一族, blur(14px) saturate(1.5) + webkit 前缀; 背景透到 0.62 仍保 WCAG 白字对比; 补全小胖设计系统 */
  background: rgba(12, 20, 38, 0.62); color: #fff;
  padding: var(--s2) var(--s4); border-radius: var(--r-ctl);
  font-size: var(--f13); box-shadow: var(--e3);
  -webkit-backdrop-filter: blur(14px) saturate(1.5);
  backdrop-filter: blur(14px) saturate(1.5);
  animation: toast-in 0.22s ease; max-width: 86vw;
}
.toast.err { background: rgba(129, 24, 24, 0.68); }
.toast .t-ico { display: flex; color: #8ec2ff; flex-shrink: 0; }
.toast.err .t-ico { color: #fca5a5; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px) scale(0.96); } }

/* ========== 4. 通用: 弹层(半屏抽屉/居中) ========== */
.mask {
  position: fixed; inset: 0; background: rgba(10, 28, 61, 0.32);
  /* [v67] mask 加深毛玻璃: 0.42→0.32 蒙层更透, blur 6→10 让下层明显模糊可见 */
  -webkit-backdrop-filter: blur(10px) saturate(1.5);
  backdrop-filter: blur(10px) saturate(1.5);
  z-index: 60; display: flex; align-items: flex-end; justify-content: center;
  animation: fade-in 0.2s ease;
}
@keyframes fade-in { from { opacity: 0; } }
/* [v67] sheet 0.82→0.65 半透更明显 */
.sheet {
  position: relative;
  background: rgba(255, 255, 255, 0.65);
  -webkit-backdrop-filter: blur(18px) saturate(1.8);
  backdrop-filter: blur(18px) saturate(1.8);
  width: 100%; max-width: var(--app-max);
  border-radius: var(--r-pop) var(--r-pop) 0 0;
  padding: var(--s2) var(--s4) calc(var(--s4) + var(--safe-btm));
  max-height: 82vh; overflow-y: auto;
  animation: sheet-up var(--t-mid) ease;
  box-shadow: var(--e3);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
}
@keyframes sheet-up { from { transform: translateY(40%); opacity: 0.6; } }
.sheet .grabber {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--n4); margin: var(--s1) auto var(--s3);
}
.sheet h3 {
  margin: 0 0 var(--s3); font-size: var(--f17); font-weight: 700;
  display: flex; align-items: center; gap: var(--s2);
}

/* ========== 5. 登录页 ==========
   「品牌时刻」: 墨青全幅底(柔光+同心弧线纹理, 纯CSS无图) →
   品牌块(公司名 字距拉开 → 产品名大字 → 定位句) → 白卡表单 →
   演示环境隔离区(2×2, 与正式表单物理分离) → 页脚。
   桌面 ≥768px: 墨青底全视野(突破 app 列), 内容仍居中 460。 */
.login-wrap {
  min-height: 100vh;
  /* 抵消 body 的底栏 padding(登录页无 tabbar) */
  margin-bottom: calc((var(--tabbar-h) + var(--safe-btm)) * -1);
  background: var(--ink-950); /* 扁平化: 纯色品牌面 */
  display: flex; flex-direction: column;
  padding: calc(var(--s10) + var(--safe-top)) var(--s4) calc(var(--s5) + var(--safe-btm));
}
.login-brand { text-align: center; color: #fff; padding: var(--s2) 0 var(--s6); }
.login-brand .lb-ico {
  width: 68px; height: 68px; margin: 0 auto var(--s5);
  border-radius: 18px; background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), var(--e3);
}
.login-brand .lb-co {
  font-size: var(--f12); font-weight: 500;
  letter-spacing: 0.28em; color: rgba(255, 255, 255, 0.72);
  text-indent: 0.28em; /* 抵消末字距的视觉偏移 */
}
.login-brand .lb-name {
  font-size: 30px; font-weight: 800; margin: var(--s2) 0 var(--s2);
  letter-spacing: 3px; text-indent: 3px; line-height: 1.3;
}
.login-brand .lb-sub { font-size: var(--f13); color: rgba(255, 255, 255, 0.60); letter-spacing: 0.5px; }
.login-card {
  background: var(--n0); border-radius: var(--r-pop); box-shadow: var(--e3);
  padding: var(--s6) var(--s5) var(--s5);
}
.login-card .field { margin-bottom: var(--s4); }
.login-btn-input-ico { color: var(--n5); }
/* 演示环境隔离区: 在卡片之下的独立半透明容器, 与正式表单物理分离 */
.demo-zone {
  margin-top: var(--s4);
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--r-card);
  padding: var(--s3) var(--s4) var(--s4);
}
.demo-zone .dz-lbl {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--f12); color: rgba(255, 255, 255, 0.72);
  margin-bottom: var(--s3);
}
.demo-zone .dz-lbl .dz-ico { display: flex; color: rgba(255, 255, 255, 0.55); }
.demo-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s2); }
.demo-chip {
  min-height: 44px; border: 1px solid rgba(255, 255, 255, 0.20);
  background: rgba(255, 255, 255, 0.09); color: rgba(255, 255, 255, 0.92);
  border-radius: var(--r-ctl); font-size: var(--f12);
  padding: 0 var(--s3); cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; justify-content: flex-start;
  transition: all var(--t-fast); font-family: inherit; white-space: nowrap; overflow: hidden;
}
.demo-chip:active { background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.36); transform: scale(0.97); }
.login-foot {
  text-align: center; color: rgba(255, 255, 255, 0.55);
  font-size: var(--f12); padding-top: var(--s5); letter-spacing: 0.2px;
}

/* ========== 5. 工作台: 墨青欢迎带 + 桥接统计卡 ========== */
/* 工作台问候区(v31 轻墙): 纸面白底替代墨青整幅深墙——深色只留给登录/详情 hero;
 * 品牌锚点收敛到头像一枚墨青圆, 页面整体与 --bg 纸感同频 */
.dash-greet {
  position: relative; overflow: hidden;
  background: var(--n0);
  color: var(--text);
  margin: calc(var(--s4) * -1) calc(var(--s4) * -1) 0;
  padding: calc(var(--s5) + var(--safe-top)) var(--s4) var(--s4);
  border-radius: 0 0 var(--r-pop) var(--r-pop);
  border-bottom: 1px solid var(--n3);
}
.dash-greet .dg-row { display: flex; align-items: center; gap: var(--s3); }
.dash-greet .dg-ava {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: var(--ink-800); /* 扁平化: 纯色 */
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: var(--f17); font-weight: 700;
}
.dash-greet .dg-info { flex: 1; min-width: 0; }
.dash-greet .hi { font-size: var(--f20); font-weight: 800; margin: 0 0 3px; color: var(--text); letter-spacing: 0.4px; }
.dash-greet .sub {
  font-size: var(--f13); color: var(--n6);
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.dash-greet .sub .role-pill {
  display: inline-flex; align-items: center;
  font-size: var(--f12); font-weight: 500;
  background: var(--n2);
  border: 1px solid var(--n3);
  border-radius: var(--r-pill); padding: 1px 8px; color: var(--n7);
}
/* 问候行右端紧凑入口(通讯录): 44px 触控, 替代原先整张入口卡 */
.dash-greet .dg-act {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  background: var(--n2); border: 1px solid var(--n3); color: var(--n7);
  display: flex; align-items: center; justify-content: center; text-decoration: none;
}
.dash-greet .dg-act:active { transform: scale(0.94); background: var(--n3); }
/* 轻墙下统计卡不再桥接深色 hero 边缘 */
.stat-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s2);
  position: relative; z-index: 2;
  margin: var(--s3) var(--s1) var(--s4);
}
.stat-card {
  background: var(--card); border-radius: var(--r-card);
  padding: var(--s4) var(--s2); text-align: center;
  box-shadow: var(--e2);
  transition: transform var(--t-fast), box-shadow var(--t-fast);
}
.stat-card:active { transform: scale(0.97); }
.stat-card .num { font-size: var(--f24); font-weight: 800; line-height: 1.15; letter-spacing: -0.5px; }
.stat-card .lbl { font-size: var(--f12); color: var(--muted); margin-top: 3px; font-weight: 500; }
.stat-card .n-ico { display: flex; justify-content: center; margin-bottom: var(--s2); }
.stat-card.n-blue .num { color: var(--p600); }
.stat-card.n-green .num { color: var(--ok600); }
.stat-card.n-amber .num { color: var(--warn600); }
.stat-card.n-red .num { color: var(--dgr600); }
.stat-card.n-red .n-ico { color: var(--dgr600); }
/* 首卡(待我处理): 墨青→品牌蓝 渐变底 + 白色数据(升维靠表面与字重, 字号守 12-24 刻度) */
.stat-card:first-child { background: var(--ink-800); }
.stat-card:first-child .num { color: #fff; font-weight: 800; letter-spacing: -0.5px; }
.stat-card:first-child .lbl { color: rgba(255, 255, 255, 0.78); }
.stat-card:first-child .n-ico { color: rgba(255, 255, 255, 0.85); }

/* 模板快捷入口(白卡内 4 列彩色圆底图标网格——2号人事部式"彩色图标卡"心智) */
.tpl-grid4 {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s1);
}
.tpl-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--s2);
  text-decoration: none; color: var(--text); cursor: pointer;
  transition: transform var(--t-fast); border: none; background: none;
  font-family: inherit; padding: var(--s2) 0; min-height: 64px; border-radius: var(--r-sm);
}
.tpl-item:active { transform: scale(0.95); background: var(--n1); }
.tpl-item .nm { font-size: var(--f12); color: var(--text-2); white-space: nowrap; font-weight: 500; }
.tpl-item.disabled { opacity: 0.38; pointer-events: none; }
.card-h-more { position: relative; margin-left: 8px; font-size: var(--f12); font-weight: 500; color: var(--muted); text-decoration: none; display: inline-flex; align-items: center; gap: 2px; }
.card-h-ops { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; }
.mini-btn { font-size: var(--f12); color: var(--brand); background: rgba(43,111,255,.08); border: none; border-radius: 12px; padding: 4px 10px; display: inline-flex; align-items: center; gap: 2px; font-family: inherit; cursor: pointer; -webkit-appearance: none; }
.mini-btn:active { background: rgba(43,111,255,.16); }
.card-h-more:active { opacity: .6; }

/* ========== 5. 列表卡(待办/记录) ========== */
.inst-card {
  background: var(--card); border-radius: var(--r-card);
  padding: var(--s3) var(--s4); margin-bottom: var(--s3); cursor: pointer;
  display: flex; gap: var(--s3); align-items: flex-start;
  transition: box-shadow var(--t-fast), transform var(--t-fast);
  position: relative; box-shadow: var(--e1);
}
.inst-card:active { box-shadow: var(--e2); transform: scale(0.99); }
.inst-card .body { flex: 1; min-width: 0; }
.inst-card .t {
  font-weight: 600; font-size: var(--f15); color: var(--text);
  padding-right: var(--s2); margin-bottom: var(--s1);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.inst-card .m { color: var(--muted); font-size: var(--f12); display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }
.inst-card .side {
  display: flex; flex-direction: column; align-items: flex-end; gap: var(--s2); flex-shrink: 0;
}
.inst-card .dwell {
  color: var(--n6); white-space: nowrap;
  font-size: var(--f12); font-weight: 500;
  display: inline-flex; align-items: center; gap: 3px;
}
.inst-card .hl {
  color: var(--p600); font-weight: 700; font-size: var(--f15);
  display: inline-flex; align-items: baseline; gap: 2px;
}
.inst-card .hl small { font-size: var(--f12); font-weight: 600; }
.inst-card .morebtn {
  width: 32px; height: 32px; border: none; border-radius: 50%;
  background: transparent; color: var(--n5); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background var(--t-fast); flex-shrink: 0; align-self: center;
}
.inst-card .morebtn:active { background: var(--n2); }
.cur-node {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: var(--f12); color: var(--p600); background: var(--p50);
  padding: 2px 8px; border-radius: var(--r-xs); font-weight: 500;
}

/* ========== 5. 详情页 ========== */
.detail-hero {
  position: relative; overflow: hidden;
  background: var(--ink-900); /* 扁平化: 纯色品牌面 */
  color: #fff;
  border-radius: var(--r-card); margin-bottom: var(--s4);
  padding: var(--s5) var(--s4) var(--s4);
  box-shadow: var(--e2);
}
.detail-hero .row1 { display: flex; align-items: flex-start; gap: var(--s3); }
.detail-hero h2 { font-size: var(--f20); margin: 0 0 var(--s2); line-height: 1.35; font-weight: 700; }
.detail-hero .meta { font-size: var(--f12); color: rgba(255, 255, 255, 0.82); display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; margin-top: var(--s1); }
.detail-hero .st-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--f12); font-weight: 600; background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32); border-radius: var(--r-pill);
  padding: 4px 10px; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.detail-hero .st-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
/* 大号状态戳(旋转描边章) */
.stamp {
  position: absolute; top: var(--s4); right: var(--s4); z-index: 2;
  transform: rotate(-12deg);
  border: 2.5px solid currentColor; border-radius: var(--r-sm);
  padding: var(--s1) var(--s2); font-size: var(--f17); font-weight: 800;
  letter-spacing: 3px; opacity: 0.92; line-height: 1.3;
  background: rgba(255, 255, 255, 0.08); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
}
.stamp.ok { color: #6ee7a0; box-shadow: inset 0 0 0 1.5px rgba(110, 231, 160, 0.4); }
.stamp.no { color: #fda4a4; box-shadow: inset 0 0 0 1.5px rgba(253, 164, 164, 0.4); }

/* 发起人卡 */
.who-card { display: flex; align-items: center; gap: var(--s3); }
.who-card .info { flex: 1; min-width: 0; }
.who-card .nm { font-size: var(--f15); font-weight: 600; }
.who-card .dept { font-size: var(--f12); color: var(--muted); margin-top: 2px; }

/* 表单信息 label:value 对齐 */
.kv { display: flex; font-size: var(--f13); padding: var(--s2) 0; border-bottom: 1px dashed var(--line); gap: var(--s2); }
.kv:last-child { border-bottom: none; }
.kv .k { width: 96px; color: var(--muted); flex-shrink: 0; }
.kv .v { flex: 1; word-break: break-all; color: var(--text); text-align: right; }
.kv .v a { color: var(--brand); text-decoration: none; font-weight: 500; }
.kv .v.amount { font-size: var(--f17); font-weight: 700; color: var(--p600); }

/* ========== 5. AI 初审报告 ========== */
.ai-card { position: relative; overflow: hidden; }
.ai-card .riskband { position: absolute; left: 0; top: 0; bottom: 0; width: 4px; }
.ai-card.risk-pass .riskband { background: var(--ok600); }
.ai-card.risk-warn .riskband { background: var(--warn600); }
.ai-card.risk-fail .riskband { background: var(--dgr600); }
.ai-card.risk-warn { background: #fffdf4; }
.ai-card.risk-fail { background: #fff5f5; }
.v-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--f12); font-weight: 700; border-radius: var(--r-sm);
  padding: 3px 8px;
}
.v-pass { background: var(--ok100); color: var(--ok700); }
.v-warn { background: var(--warn100); color: var(--warn700); }
.v-fail { background: var(--dgr100); color: var(--dgr700); }
.finding { display: flex; gap: var(--s2); padding: var(--s2) 0; border-bottom: 1px dashed var(--line); font-size: var(--f13); align-items: flex-start; }
.finding:last-child { border-bottom: none; }
.finding .f-ico { display: flex; margin-top: 1px; flex-shrink: 0; }
.finding .f-ico.sev-error { color: var(--dgr600); }
.finding .f-ico.sev-warn { color: var(--warn600); }
.finding .f-ico.sev-info { color: var(--n5); }
.finding .f-msg { color: var(--text); }
.finding .f-meta { color: var(--faint); font-size: var(--f12); margin-top: 1px; }
.finding .rid {
  font-family: ui-monospace, Menlo, Consolas, monospace; font-size: var(--f12);
  border-radius: var(--r-xs); padding: 1px 6px; flex-shrink: 0; margin-top: 1px; font-weight: 600;
}
.sev-error { background: var(--dgr100); color: var(--dgr700); }
.sev-warn { background: var(--warn100); color: var(--warn700); }
.sev-info { background: var(--n2); color: var(--n6); }
.ai-dsh {
  margin-top: var(--s3); background: var(--n1);
  border: 1px solid var(--line); border-radius: var(--r-ctl);
  padding: var(--s3); font-size: var(--f13);
}
.ai-dsh .dsh-h { display: flex; align-items: center; gap: var(--s2); font-weight: 600; margin-bottom: var(--s1); }
.ai-dsh .bar-pulse {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand); animation: pulse 1s infinite; margin-left: var(--s1);
}
@keyframes pulse { 0%, 100% { opacity: 0.25; } 50% { opacity: 1; } }
.ai-note-err { color: var(--dgr600); font-size: var(--f12); margin-top: var(--s2); display: flex; gap: 4px; align-items: flex-start; }
.ai-note-warn { color: var(--warn700); font-size: var(--f12); margin-top: var(--s2); display: flex; gap: 4px; align-items: flex-start; }

/* ========== 5. 审批时间线(竖向连接线) ========== */
.flow { position: relative; padding-left: var(--s5); }
.flow::before {
  content: ''; position: absolute; left: 15px; top: var(--s4); bottom: var(--s4);
  width: 2px; background: var(--line); border-radius: 1px;
}
.fnode { position: relative; padding: 0 0 var(--s4); }
.fnode:last-child { padding-bottom: 0; }
.fnode .ndot {
  position: absolute; left: -26px; top: 2px; width: 24px; height: 24px;
  border-radius: 50%; background: var(--n2); border: 2px solid var(--n4);
  display: flex; align-items: center; justify-content: center; color: var(--n5);
  box-sizing: border-box; z-index: 1;
}
.fnode.st-approved .ndot { background: var(--ok100); border-color: var(--ok600); color: var(--ok600); }
.fnode.st-rejected .ndot { background: var(--dgr100); border-color: var(--dgr600); color: var(--dgr600); }
.fnode.st-returned .ndot { background: var(--warn100); border-color: var(--warn600); color: var(--warn600); }
.fnode.st-pending .ndot { background: var(--p50); border-color: var(--p500); color: var(--p500); box-shadow: 0 0 0 4px rgba(43, 111, 255, 0.12); }
.fnode .name { font-weight: 600; font-size: var(--f13); display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }
.fnode .mode {
  font-size: var(--f12); color: var(--muted); border: 1px solid var(--line);
  border-radius: var(--r-xs); padding: 0 4px; font-weight: 500;
}
.fnode .who { color: var(--muted); font-size: var(--f12); margin-top: 2px; display: flex; align-items: center; gap: var(--s1); flex-wrap: wrap; }
.fnode .sla-red { color: var(--dgr600); font-size: var(--f12); font-weight: 600; }
.fnode .ops { font-size: var(--f12); color: var(--faint); margin-top: 2px; }
.cmt-bubble {
  background: var(--n1); border-radius: 2px var(--r-sm) var(--r-sm) var(--r-sm);
  padding: var(--s1) var(--s2); margin-top: var(--s1); font-size: var(--f12);
  color: var(--text-2); display: inline-flex; gap: 4px; align-items: flex-start; max-width: 100%;
}

/* 完整时间线(事件流) */
.tl-wrap { position: relative; padding-left: var(--s5); }
.tl-wrap::before { content: ''; position: absolute; left: 15px; top: var(--s2); bottom: var(--s2); width: 2px; background: var(--line); }
.tl-item { position: relative; padding-bottom: var(--s3); }
.tl-item .tdot {
  position: absolute; left: -26px; top: 0; width: 24px; height: 24px;
  border-radius: 50%; background: var(--n2); border: 2px solid var(--n4);
  display: flex; align-items: center; justify-content: center; color: var(--n5);
  box-sizing: border-box; z-index: 1;
}
.tl-item.act-submit .tdot, .tl-item.act-resubmit .tdot { background: var(--p50); border-color: var(--p500); color: var(--p500); }
.tl-item.act-approve .tdot { background: var(--ok100); border-color: var(--ok600); color: var(--ok600); }
.tl-item.act-reject .tdot { background: var(--dgr100); border-color: var(--dgr600); color: var(--dgr600); }
.tl-item.act-ai_review .tdot { background: var(--indigo50); border-color: var(--indigo600); color: var(--indigo600); }
.tl-item .meta { font-size: var(--f12); color: var(--muted); }
.tl-item .meta b { color: var(--text-2); font-weight: 600; }
.tl-item .body { font-size: var(--f13); margin-top: 1px; color: var(--text); }

/* ========== 5. 底部固定操作条 ========== */
.actionbar-wrap { padding-bottom: calc(84px + var(--safe-btm)); }
/* [v67] 操作条透明度 0.96→0.72 */
.actionbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  display: flex; gap: var(--s2); align-items: center;
  max-width: var(--app-max); margin: 0 auto;
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(18px) saturate(1.8);
  backdrop-filter: blur(18px) saturate(1.8);
  border-top: 1px solid rgba(255, 255, 255, 0.5);
  padding: var(--s2) var(--s4) calc(var(--s2) + var(--safe-btm));
  box-shadow: 0 -2px 12px rgba(15, 23, 42, 0.06);
}
.actionbar .btn { flex: 1; min-height: 48px; }
.actionbar .btn.icon-only { flex: 0 0 48px; padding: 0; }
.more-sheet-item {
  display: flex; align-items: center; gap: var(--s3);
  min-height: 52px; padding: var(--s2) var(--s1); border: none;
  background: none; width: 100%; text-align: left; cursor: pointer;
  font-size: var(--f15); color: var(--text); border-bottom: 1px solid var(--n2);
  font-family: inherit; border-radius: var(--r-sm);
}
.more-sheet-item:last-child { border-bottom: none; }
.more-sheet-item:active { background: var(--n1); }
.more-sheet-item .m-ico {
  width: 36px; height: 36px; border-radius: var(--r-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; background: var(--n2); color: var(--text-2);
}
.more-sheet-item.dgr { color: var(--dgr700); }
.more-sheet-item.dgr .m-ico { background: var(--dgr100); color: var(--dgr600); }
.more-sheet-item.warn { color: var(--warn700); }
.more-sheet-item.warn .m-ico { background: var(--warn100); color: var(--warn600); }
.more-sheet-item.p .m-ico { background: var(--p50); color: var(--p600); }

/* ========== 5. 统计页(SVG/CSS 图表) ========== */
.chart-card { overflow: hidden; }
.donut-wrap { display: flex; align-items: center; gap: var(--s4); padding: var(--s2) 0; }
.donut-legend { flex: 1; }
.donut-legend .lg { display: flex; align-items: center; gap: var(--s2); font-size: var(--f13); color: var(--text-2); padding: var(--s1) 0; }
.donut-legend .swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.bars { padding: var(--s2) 0; }
.bar-row { display: flex; align-items: center; gap: var(--s2); padding: var(--s1) 0; }
.bar-row .bl { width: 74px; font-size: var(--f12); color: var(--text-2); text-align: right; flex-shrink: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .btrack { flex: 1; height: 18px; background: var(--n2); border-radius: var(--r-xs); overflow: hidden; }
.bar-row .bfill { height: 100%; border-radius: var(--r-xs); background: var(--p500); transition: width 0.4s ease; }
.bar-row .bv { width: 44px; font-size: var(--f12); color: var(--muted); flex-shrink: 0; font-weight: 600; }
.rank-item { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) 0; border-bottom: 1px dashed var(--line); font-size: var(--f13); }
.rank-item:last-child { border-bottom: none; }
.rank-item .rank {
  width: 22px; height: 22px; border-radius: var(--r-xs); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--f12); font-weight: 700; background: var(--n2); color: var(--muted);
}
.rank-item .rank.r1 { background: var(--dgr100); color: var(--dgr600); }
.rank-item .rank.r2 { background: var(--warn100); color: var(--warn600); }
.rank-item .rank.r3 { background: var(--p50); color: var(--p600); }
.rank-item .rn { flex: 1; min-width: 0; }
.rank-item .rn b { font-size: var(--f13); }
.rank-item .rn .rd { font-size: var(--f12); color: var(--faint); }
.rank-item .cnt { font-weight: 700; color: var(--text); }
.mlist { display: flex; align-items: center; gap: var(--s2); padding: var(--s2) 0; border-bottom: 1px dashed var(--line); font-size: var(--f13); }
.mlist:last-child { border-bottom: none; }
.mlist .ml { flex: 1; min-width: 0; overflow-wrap: anywhere; color: var(--muted); display: flex; align-items: center; gap: var(--s1); }
.mlist .mv { font-weight: 600; color: var(--text); flex-shrink: 0; }

/* ========== 5. 通知 ========== */
.notif {
  display: flex; gap: var(--s3); padding: var(--s3) var(--s1);
  border-bottom: 1px solid var(--n2); cursor: pointer; align-items: flex-start;
  border-radius: var(--r-sm); transition: background var(--t-fast);
}
.notif:active { background: var(--n1); }
.notif.unread { background: var(--p50); margin: 0 calc(var(--s1) * -1); padding-left: var(--s2); padding-right: var(--s2); }
.notif .n-ico {
  width: 36px; height: 36px; border-radius: var(--r-sm); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; background: var(--p50); color: var(--p600);
}
.notif .n-ico.ok { background: var(--ok100); color: var(--ok600); }
.notif .n-ico.warn { background: var(--warn100); color: var(--warn600); }
.notif .tt { font-weight: 600; font-size: var(--f13); }
.notif .bb { color: var(--muted); font-size: var(--f12); margin-top: 1px; }

/* ========== 5. 管理页 ========== */
.adm-row {
  flex-wrap: wrap;
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s3) 0; border-bottom: 1px dashed var(--line);
}
.adm-row:last-child { border-bottom: none; }
.adm-row .info { flex: 1 1 140px; min-width: 0; }
.adm-row .nm { font-size: var(--f13); font-weight: 600; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.adm-row .ds { font-size: var(--f12); color: var(--faint); margin-top: 2px; }
.tbl { width: 100%; border-collapse: collapse; font-size: var(--f12); }
.tbl th, .tbl td { padding: var(--s2) var(--s1); text-align: left; border-bottom: 1px solid var(--n2); }
.tbl th { color: var(--faint); font-weight: 600; white-space: nowrap; }
.tbl tr:last-child td { border-bottom: none; }

/* ========== 6. 动效 ========== */
.fade-in { animation: fade-up 0.25s ease; }
@keyframes fade-up { from { opacity: 0; transform: translateY(6px); } }
.press-check { animation: press-pop 0.3s ease; }
@keyframes press-pop { 50% { transform: scale(1.08); } }

/* ========== 7. 工具类 ========== */
.muted { color: var(--muted); }
.small { font-size: var(--f12); }
.c-main { color: var(--brand); }
.c-ok { color: var(--ok600); }
.c-warn { color: var(--warn600); }
.c-dgr { color: var(--dgr600); }
.c-text2 { color: var(--text-2); }
.fw4 { font-weight: 400; }
.lh18 { line-height: 1.8; }
.gap4 { gap: 4px; }
.gap6 { gap: 6px; }
.shrink0 { flex-shrink: 0; }
.mt4 { margin-top: var(--s1); } .mt8 { margin-top: var(--s2); } .mt12 { margin-top: var(--s3); }
.mb12 { margin-bottom: var(--s3); }
.mb0 { margin-bottom: 0; }
.subnote { margin: -6px 0 8px; }
.tight { margin: -6px 0 6px; }
.flex { display: flex; align-items: center; gap: var(--s2); }
.flex1 { flex: 1; min-width: 0; }
.right { justify-content: flex-end; }
.wrap { flex-wrap: wrap; }
.tc { text-align: center; }
.nowrap { white-space: nowrap; }
.link { color: var(--brand); text-decoration: none; font-weight: 500; }
.hide { display: none !important; }
/* 骨架补充件 */
.skl-ava { width: 44px; height: 44px; border-radius: var(--r-ctl); flex-shrink: 0; }
.stat-num { width: 40px; height: 26px; margin: 0 auto 4px; }
a.stat-card { text-decoration: none; }
.btn-plainlink { background: none; box-shadow: none; border: none; color: var(--muted); font-size: var(--f13); font-weight: 500; }
.btn-plainlink:active, .btn-plainlink:hover { color: var(--brand); }
/* 管理页开关组 */
.toggles { display: flex; gap: var(--s4); align-items: center; flex-shrink: 0; }
.toggles .tc { text-align: center; display: flex; flex-direction: column; align-items: center; gap: var(--s1); }
/* 快捷操作图标色 */
.m-ico.p { background: var(--p50); color: var(--p600); }
.m-ico.ok { background: var(--ok100); color: var(--ok600); }
.m-ico.dgr { background: var(--dgr100); color: var(--dgr600); }
.m-ico.warn { background: var(--warn100); color: var(--warn600); }

/* ========== 8. 桌面/宽屏适配(≥768px)：居中应用列 + 登录全幅墨青 ========== */
/* 手机 H5 审批在桌面浏览器的标准呈现（钉钉/企微同款）：内容收敛为居中窄列，
   而非把手机布局横向拉伸——720px 拉宽的分段控件/九宫格在桌面是不可用的。 */
@media (min-width: 768px) {
  :root { --app-max: 460px; }
  body { background: var(--n2); }
  #app {
    box-shadow: 0 0 0 1px var(--n3), 0 0 32px rgba(28, 27, 23, 0.08);
  }
  /* 登录页: 墨青底突破 app 列铺满视口, 内容居中 460(仅改横向, 保留基准负 margin-bottom) */
  .login-wrap {
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    padding: calc(var(--s10) + var(--safe-top)) calc(50vw - 230px) calc(var(--s5) + var(--safe-btm));
  }
}

/* 指针精确设备(桌面)的悬停反馈——触屏无 hover 不受影响 */
@media (hover: hover) {
  .btn:hover { filter: brightness(1.05); }
  .btn.ghost:hover { background: var(--p50); border-color: var(--p300); }
  .btn.danger-o:hover { background: var(--dgr100); }
  .btn.plain:hover { background: var(--n2); }
  .inst-card:hover { box-shadow: var(--e2); transform: translateY(-1px); }
  .tpl-item:hover { transform: translateY(-1px); }
  .tpl-ico:hover { filter: saturate(1.06); }
  .stat-card:hover { box-shadow: var(--e3); }
  .notif:hover { background: var(--n1); }
  .more-sheet-item:hover { background: var(--n1); }
  .fchips button:hover { border-color: var(--p200); color: var(--p600); }
  a.link:hover, .kv .v a:hover { text-decoration: underline; }
  .demo-chip:hover { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.32); }
}

/* 无障碍：系统要求减少动效时关闭装饰动画 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ========== 9. 通讯录 / 批量审批 / 假期额度(2026-09-07 老板令) ========== */
.dir-group.collapsed .dir-body { display: none; }
.dir-group.collapsed .dir-chev { transform: rotate(-90deg); }
.dir-h { cursor: pointer; user-select: none; }
.dir-chev { transition: transform var(--t-fast); color: var(--n6); }
.dir-body { margin-top: var(--s2); }
.dir-sub { margin: var(--s2) 0 var(--s3); }
.dir-emps { display: flex; flex-direction: column; }
.dir-emp {
  display: flex; align-items: center; gap: var(--s3);
  padding: var(--s2) 0; border-bottom: 1px dashed var(--line); min-height: 56px;
}
.dir-emp:last-child { border-bottom: none; }
.dir-emp .nm { font-size: var(--f13); font-weight: 600; display: flex; align-items: center; gap: var(--s2); flex-wrap: wrap; }
.dir-emp .ds { margin-top: 2px; }
.dir-entry { cursor: pointer; }
.hidden { display: none !important; }
/* 批量审批 */
.inst-card.picked { outline: 2px solid var(--ok600); outline-offset: -2px; }
.batch-check {
  width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--n4);
  flex-shrink: 0; align-self: center; display: flex; align-items: center; justify-content: center;
  color: #fff; background: var(--n0);
}
.inst-card.picked .batch-check { background: var(--ok700); border-color: var(--ok700); }
#bCount { min-width: 90px; }
/* 假期额度输入 */
.bal-input {
  width: 110px; min-height: 40px; border: 1.5px solid var(--line); border-radius: var(--r-ctl);
  padding: var(--s1) var(--s2); font-size: 16px; /* iOS 聚焦缩放线 */ background: var(--n1); text-align: right;
}
.bal-input:focus { border-color: var(--brand); background: var(--n0); box-shadow: 0 0 0 3px rgba(43, 111, 255, 0.14); }

/* 批次二补充 */
.pwd-show { padding: var(--s4); border: 1.5px dashed var(--n4); border-radius: var(--r-ctl); font-size: var(--f17); letter-spacing: 1px; }
.paid-pill { background: var(--ok100); color: var(--ok700); border-color: var(--ok700); }
.fw6 { font-weight: 600; }
.bg-dgr { background: var(--dgr600) !important; }

/* ========== 10. 通讯录活起来(批次三) ========== */
.dir-actions { display: flex; gap: var(--s1); flex-shrink: 0; align-items: center; }
.dir-act {
  width: 36px; height: 36px; border-radius: 50%; border: none; background: var(--n2);
  color: var(--n6); display: flex; align-items: center; justify-content: center;
  text-decoration: none; cursor: pointer; transition: all var(--t-fast); padding: 0;
}
.dir-act:active { background: var(--p50); color: var(--p600); transform: scale(0.92); }
.dir-expand.open { background: var(--p50); color: var(--p600); transform: rotate(90deg); }
.dir-chain { margin-top: var(--s1); padding-top: var(--s1); border-top: 1px dashed var(--line); }
.chain-lbl { margin-bottom: var(--s1); }
.chain-arrow { color: var(--n5); margin: 0 2px; }
.empno-copy { cursor: pointer; }
.agent-card { border: 1.5px solid var(--teal50); }
/* 统一选人器 */
.pk-list { max-height: 52vh; overflow-y: auto; }
.pk-group { margin-bottom: var(--s2); }
.pk-item {
  display: flex; align-items: center; gap: var(--s2); width: 100%; text-align: left;
  min-height: 52px; padding: var(--s1) var(--s2); border: none; background: none;
  border-radius: var(--r-sm); cursor: pointer; font-family: inherit;
}
.pk-item:active, .pk-item:hover { background: var(--n1); }
.pk-item .nm { font-size: var(--f13); font-weight: 600; }

/* ========== 11. 流程编辑器(批次五) ========== */
.tpl-preview-card { border-left: 4px solid var(--brand); }
.tpl-preview-line { font-size: var(--f13); line-height: 1.8; word-break: break-all; }
.ed-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2); padding: var(--s2) 0; border-bottom: 1px dashed var(--line); }
.ed-row:last-child { border-bottom: none; }
.ed-editor { flex-basis: 100%; background: var(--n1); border-radius: var(--r-ctl); padding: var(--s3); margin-top: var(--s2); }
.ed-editor .field { margin-bottom: var(--s2); }
.cond-sel { min-height: 40px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--n0); font-size: 16px; /* iOS 聚焦缩放线 */ padding: 0 var(--s2); max-width: 40%; }
.cond-inp { min-height: 40px; border: 1.5px solid var(--line); border-radius: var(--r-sm); background: var(--n0); font-size: 16px; /* iOS 聚焦缩放线 */ padding: 0 var(--s2); width: 110px; }
.cond-inp.w140 { width: 140px; } /* 沙盘阈值输入(原内联 style 治理) */
.cond-row { margin-bottom: var(--s1); }

/* ========== 12. 决策驾驶舱 + 沙盘(批次六) ========== */
.cockpit-strategy { border-left: 4px solid var(--brand); }
.strategy-head { font-size: var(--f17); font-weight: 700; }
.advice-item { padding: var(--s2) 0; border-bottom: 1px dashed var(--line); }
.advice-item:last-child { border-bottom: none; }
.evi-list { margin-top: var(--s2); background: var(--n1); border-radius: var(--r-sm); padding: var(--s2); }
.evi-row { display: block; padding: var(--s1) 0; font-size: var(--f12); color: var(--text-2); text-decoration: none; border-bottom: 1px dashed var(--n3); }
.evi-row:last-child { border-bottom: none; }
.evi-row:hover { color: var(--brand); }

/* ========== 13. 移动端管理后台排版修复(2026-09-08 三查整改) ==========
   体检实测三 P0: delegations sw=483(datetime 固有宽撑爆 row2) /
   audit sw=440(CJK 无空格 flex 不收缩, 时间戳被顶出界) / org sw=390(6列表格)。
   其余: #admSeg 七 tab 各 45px 挤压裁剪 / .tgl 26px 触控不达标 /
   模板行 toggles 挤在首行把标题压竖排 / 统计表同样受 .tbl 之苦。 */

/* 13.1 管理七 Tab → 横向滚动的胶囊栏(不再均分挤压) */
#admSeg { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
#admSeg::-webkit-scrollbar { display: none; }
#admSeg button { flex: 0 0 auto; padding: 0 var(--s3); min-height: 44px; }

/* 13.2 行式管理列表: 允许换行; 开关组整行移到第二行(标题不再被压竖排) */
.adm-row > .toggles { flex-basis: 100%; padding-left: 48px; justify-content: flex-start; gap: var(--s6); }
.adm-row > .toggles .tc { align-items: flex-start; }

/* 13.3 开关触控达标: 命中区由 .tgl 自身 52×44 承担(≥44 达标), 不再用 ::before inset 扩层。
 *    铁律: .tgl::before/::after 全文件各仅此一处(L354 区), 任何"命中区扩展"改 .tgl 的 padding/尺寸,
 *    绝不再加第二条同选择器规则 —— 会层叠覆盖 top:50% 把轨道拽离轴心(v2 css_dup/tgl_axis 检测把守) */

/* 13.4 长文行不挤爆兄弟(审计时间戳/银行流水等): CJK 任意断行 + 右侧缩减禁止 */

/* 13.5 row2 双列在窄屏放行(datetime-local 固有 min-width 曾撑爆 483px) */

/* 13.6 移动端表格卡片化: 表头转标签, 行转卡片流(tbl-emp 组织 / tbl-stat 统计) */
.tbl-emp, .tbl-stat { border: none; }
.tbl-emp thead, .tbl-stat thead { display: none; }
.tbl-emp tbody, .tbl-stat tbody { display: block; }
.tbl-emp tr, .tbl-stat tr { display: block; padding: var(--s2) 0 var(--s3); border-bottom: 1px dashed var(--line); }
.tbl-emp tbody tr:last-child, .tbl-stat tbody tr:last-child { border-bottom: none; }
.tbl-emp td, .tbl-stat td { display: inline-block; border: none; padding: 0; margin-right: var(--s3); vertical-align: baseline; }
.tbl-emp td:last-child, .tbl-stat td:last-child { display: block; margin: var(--s2) 0 0; }
.tbl-emp td:nth-child(1)::before, .tbl-emp td:nth-child(2)::before, .tbl-emp td:nth-child(3)::before,
.tbl-emp td:nth-child(4)::before, .tbl-emp td:nth-child(5)::before,
.tbl-stat td:nth-child(1)::before, .tbl-stat td:nth-child(2)::before,
.tbl-stat td:nth-child(3)::before, .tbl-stat td:nth-child(4)::before {
  content: attr(data-label);
  color: var(--muted); margin-right: 4px; font-size: var(--f12);
}
.tbl-emp td:nth-child(1)::before { content: '工号'; }
.tbl-emp td:nth-child(2)::before { content: '姓名'; }
.tbl-emp td:nth-child(3)::before { content: '部门'; }
.tbl-emp td:nth-child(4)::before { content: '角色'; }
.tbl-emp td:nth-child(5)::before { content: '状态'; }
.tbl-stat td:nth-child(1)::before { content: '部门'; }
.tbl-stat td:nth-child(2)::before { content: '总数'; }
.tbl-stat td:nth-child(3)::before { content: '通过/拒绝'; }
.tbl-stat td:nth-child(4)::before { content: '平均时长'; }

/* 13.7 卡片头部「全部→」链接: 命中区扩大到 44px, 视觉零位移 */
.card-h-more::before { content: ''; position: absolute; inset: -14px -8px; border-radius: var(--r-sm); }

/* 13.8 编辑器节点行: 元信息文本允许换行且不被按钮挤压 */
.ed-row .flex.gap4 > span:last-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }


/* ========== 13. 管理后台统一版式(批次八) ========== */
.admin-section { display: flex; align-items: center; gap: var(--s2); margin: var(--s5) 0 var(--s3); }
.adm-card { background: var(--card); border-radius: var(--r-card); padding: var(--s4); margin-bottom: var(--s3); }
.adm-head { display: flex; align-items: center; gap: var(--s3); margin-bottom: var(--s2); }
.adm-title { font-size: var(--f17); font-weight: 700; } /* 字阶 17(硬规范无16) */
.adm-status { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s2); }
.adm-policy { background: var(--n1); border-radius: var(--r-ctl); padding: var(--s1) 0; }
/* B2: 开关右缘与卡内容右缘(=.adm-ops/.adm-status 按钮)一致 —— rowline 右无内边距, 左保留呼吸感 */
.adm-policy .adm-rowline { padding-left: var(--s3); padding-right: 0; }
.adm-policy-h { display: flex; align-items: center; gap: var(--s2); padding: 0 var(--s3); font-size: var(--f13); font-weight: 600; color: var(--text-2); min-height: 40px; }
.adm-rowline { display: flex; align-items: center; gap: var(--s2); min-height: 48px; }
.adm-rowline .tgl { margin-right: 0; }
.adm-rowline .lbl { flex: 1; font-size: var(--f13); color: var(--text-2); line-height: 1.4; display: flex; align-items: center; gap: var(--s1); }
.adm-ops { display: flex; gap: var(--s2); flex-wrap: wrap; margin-top: var(--s2); }
.adm-ops .btn { min-height: 44px; }
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl-scroll table { min-width: 520px; }
.adm-muted { color: var(--muted); font-size: var(--f12); margin-top: 2px; }
.tpl-card .disabled-mask { opacity: 0; }
.tpl-card.is-disabled { opacity: 0.62; }
.tpl-card .off-badge { position: absolute; top: var(--s2); right: var(--s2); }
.tpl-card { position: relative; }

/* ========== 14. 编辑器字段/节点卡片(第八批补充) ========== */
.ed-row.ed-field-card, .ed-row.ed-node-card {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s2);
  min-height: 56px; padding: var(--s2) 0; border-bottom: 1px dashed var(--line); margin-bottom: var(--s3);
}
.ed-row.ed-field-card:last-child, .ed-row.ed-node-card:last-child { border-bottom: none; }
.ed-title { font-size: var(--f15); font-weight: 600; display: flex; align-items: center; gap: var(--s1); flex-wrap: nowrap; white-space: nowrap; overflow: hidden; }
.ed-sub { font-size: var(--f12); color: var(--muted); margin-top: 2px; }
.ed-ops { display: flex; gap: var(--s1); flex-shrink: 0; align-items: stretch; }
.ed-ops .btn { min-height: 44px; height: 44px; padding: 0 var(--s2); }

/* ========== 15. 移动端弹层底部按钮规范(批次八补充) ========== */
.sheet-close {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px;
  border: none; border-radius: 50%; background: var(--n2); color: var(--n6);
  display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 2;
}
.sheet-actions { display: flex; flex-direction: column; gap: var(--s3); margin-top: var(--s3); }
.sheet-actions .btn { min-height: 48px; }

/* ===== [2026-09-09 老板反馈: 管理后台手机只显示一半] 手机端全宽兜底 ===== */
@media (max-width: 767px) {
  :root { --app-max: 100%; }
  #app { max-width: 100%; }
  .topbar, .tabbar { max-width: 100%; }
}

/* ===== [2026-09-09 老板反馈: 管理后台手机只显示一半] 根治: 任何视口都全宽 + 不横溢 ===== */
html, body { overflow-x: hidden; max-width: 100%; }
#app, .topbar, .tabbar, .page { max-width: 100%; }
/* 管理后台表格若没被 tbl-scroll 包住, 也强制不撑破视口 */
#viewRoot table { max-width: 100%; }
#viewRoot .tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
#viewRoot .tbl-scroll table { min-width: 0; max-width: 100%; }
/* 手机(<768)无论视口多宽都钉 full */
@media (max-width: 1023px) {
  :root { --app-max: 100% !important; }
  #app { max-width: 100%; }
}

/* ===== [2026-09-09 老板反馈: 编辑资料页排版乱] 信息卡: 标签+值分行清晰 ===== */
.info-card { background: var(--n1); border-radius: var(--r-ctl); padding: var(--s1) var(--s3); }
.info-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2); padding: var(--s2) 0; border-bottom: 1px dashed var(--line); }
.info-row:last-child { border-bottom: none; }
.info-row .k { font-size: var(--f13); color: var(--muted); flex: 0 0 120px; }
.info-row .v { font-size: var(--f14); color: var(--text); font-weight: 600; flex: 1; min-width: 0; overflow-wrap: anywhere; }

/* [2026-09-09 老板令: 顶栏+问候区合成一块] 工作台 hero 头图 */
.dash-greet.hero { background: linear-gradient(150deg, var(--ink-900) 0%, var(--ink-700) 100%); color: #fff; position: relative; }
.dash-greet.hero .hero-clip { position: absolute; inset: 0; background: radial-gradient(120% 90% at 100% 0%, rgba(84,128,220,.35), transparent 55%); pointer-events: none; }
.dash-greet.hero .dg-row { position: relative; z-index: 2; }
.dash-greet.hero .dg-ava { background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25); cursor: pointer; }
.dash-greet.hero .hi { color: #fff; }
.dash-greet.hero .sub { color: rgba(255,255,255,.85); }
.dash-greet.hero .sub .role-pill { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.25); color: #fff; }
.dash-greet.hero .hero-btn { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.25); color: #fff; display: flex; align-items: center; justify-content: center; position: relative; }
.dash-greet.hero .hero-btn:active { transform: scale(.94); background: rgba(255,255,255,.26); }
.dash-greet.hero .hero-meta { position: relative; z-index: 2; display: flex; justify-content: flex-end; margin-top: var(--s2); }
.dash-greet.hero .hero-meta .buildbadge { color: rgba(255,255,255,.75); border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.10); }

/* [2026-09-09 老板令: 问候区 hi+sub 合成一行] */
/* [2026-09-09 老板令: 问候区合成一节] 强制单行, 不再自动折行 */
.dash-greet .dg-line { display: flex; align-items: center; gap: var(--s2); flex-wrap: nowrap; white-space: nowrap; min-width: 0; }
.dash-greet .dg-line .hi { margin: 0; font-size: var(--f16) !important; line-height: 1.2; }
.dash-greet .dg-line .sub { display: inline-flex; align-items: center; gap: 5px; min-width: 0; }
.dash-greet .dg-line .sub .role-pill { white-space: nowrap; }
.dash-greet .dg-line .buildbadge { font-size: 10px; color: var(--n6); padding: 2px 6px; border: 1px solid var(--n3); border-radius: 6px; white-space: nowrap; }
.dash-greet.hero .dg-line .sub { color: rgba(255,255,255,.85); }
.dash-greet.hero .dg-line .buildbadge { color: rgba(255,255,255,.8); border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.10); }

/* ===== v0.2 左滑归档 ===== */
.inst-card { overflow: visible; }
.inst-card.swiped { transform: translateX(-76px); transition: transform .18s ease; }
.arc-flag { position: absolute; top: var(--s2); right: var(--s3); z-index: 2; }
@media (hover: hover) {
}
/* v0.2 AI 卡两段式 */
.ai-expand { margin-top: var(--s2); border-top: 1px dashed var(--n3); padding-top: var(--s2); }
.ai-expand summary { cursor: pointer; font-size: var(--f13); color: var(--p600); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; min-height: 44px; }
.ai-expand[open] summary svg { transform: rotate(90deg); }
.ai-expand .finding { margin-top: var(--s1); }

/* ===== [2026-09-10 v0.3.1 左滑归档仿 iOS 删除 UI(wrapper 结构, 按钮藏卡片背后)] ===== */
.swipe-wrap { position: relative; margin-bottom: var(--s3); }
.swipe-wrap .inst-card { margin-bottom: 0; position: relative; z-index: 1; transition: transform .25s ease, opacity .22s ease; }
.swipe-ios-btn {
  position: absolute; top: 0; right: 0; bottom: 0; width: 80px; margin: 0; padding: 0;
  background: #ff3b30; color: #fff; border: none; outline: none; z-index: 0;
  border-radius: 0 var(--r-card) var(--r-card) 0;
  font-size: 15px; font-weight: 600; letter-spacing: 1px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; -webkit-appearance: none; appearance: none;
}
.swipe-ios-btn.restore { background: #34c759; }
.swipe-ios-btn:active { filter: brightness(.92); }
.arc-flag { position: absolute; top: 6px; left: 6px; z-index: 3; }
.arc-flag .chip { background: rgba(142,142,147,.22); color: #8e8e93; border: 1px solid rgba(142,142,147,.3); }

/* [v0.3.3] 归档操作提示条 */
.arc-hint { display:flex; align-items:center; gap:6px; font-size:12px; color:var(--muted); background:rgba(142,142,147,.08); border:1px dashed rgba(142,142,147,.35); border-radius:8px; padding:8px 10px; margin:0 0 var(--s3); }

/* [v0.3.4] toast 内动作按钮(去恢复直达) */
.toast-act { flex:none; margin-left:10px; padding:5px 12px; border:none; border-radius:14px; background:rgba(59,130,246,.16); color:#2563eb; font-size:13px; font-weight:600; cursor:pointer; -webkit-appearance:none; appearance:none; }
.toast-act:active { background:rgba(59,130,246,.3); }

/* [v0.3.5] 修复: toast-wrap pointer-events:none 吞掉按钮点击 —— 仅带动作按钮的 toast 重开点击 */
.toast.has-act { pointer-events: auto; }
.toast-act { padding: 8px 14px; }

/* [v0.3.6] 记录页顶部固定「已归档」入口(不随筛选滚动, 永远可见) */
.seg .seg-arc { flex: 0 0 auto; padding: 0 var(--s3); display: flex; align-items: center; gap: 3px; }
.seg .seg-arc.active { background: var(--card); color: var(--brand); font-weight: 600; box-shadow: var(--e1); }

/* [2026-09-11] 候选人看板 */
.kb { display:flex; gap:var(--s2); overflow-x:auto; padding-bottom:var(--s2); -webkit-overflow-scrolling:touch; }
.kb-col { flex:0 0 200px; background:var(--n1); border-radius:var(--r-ctl); padding:var(--s2); }
.kb-h { font-size:var(--f13); font-weight:600; margin-bottom:var(--s2); display:flex; align-items:center; gap:6px; }
.kb-card { background:var(--card); border-radius:var(--r-sm); padding:var(--s2); margin-bottom:var(--s2); box-shadow:var(--e1); }
.kb-card b { font-size:var(--f13); }
.kb-ops { margin-top:6px; }
.kb-ops select { width:100%; min-height:36px; border:1px solid var(--line); border-radius:var(--r-sm); background:var(--n0); font-size:14px; padding:0 6px; }

/* [2026-09-11] 问卷结果条形图 */
.rp-row { display:flex; align-items:center; gap:var(--s2); margin-bottom:6px; font-size:var(--f12); }
.rp-lb { flex:0 0 5.5em; color:var(--text-2); }
.rp-bar { flex:1; height:14px; background:var(--n2); border-radius:7px; overflow:hidden; }
.rp-bar i { display:block; height:100%; background:linear-gradient(90deg,#4b7bec,#2b6fff); border-radius:7px; transition:width .4s ease; }
.rp-n { flex:0 0 auto; color:var(--muted); min-width:5.5em; text-align:right; }
.opt { display:flex; align-items:center; gap:8px; min-height:40px; font-size:var(--f13); }
.opt input { width:18px; height:18px; }
.chips-inline { display:flex; gap:var(--s2); flex-wrap:wrap; }
.chk { display:inline-flex; align-items:center; gap:4px; font-size:var(--f13); }

/* [2026-09-11 老板令] 公司公告 */
.ann-card h3 { display:flex; align-items:center; gap:var(--s1); }
.ann-item { padding:var(--s2) 0; border-bottom:1px solid var(--line); }
.ann-item:last-child { border-bottom:none; }
.ann-t { font-size:var(--f14); font-weight:600; color:var(--text); }
.ann-b { font-size:var(--f13); color:var(--text-2); margin-top:4px; line-height:1.5; }
.ann-m { font-size:var(--f12); color:var(--muted); margin-top:4px; }

/* [2026-09-11] 公告交互 v2 */
.ann-row { display:flex; align-items:center; gap:var(--s2); }
.ann-row .ann-t { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ann-chev { color:var(--muted); transition:transform .2s ease; display:flex; }
.ann-item.open .ann-chev { transform:rotate(90deg); }
.ann-body.hidden { display:none; }
.ann-item { cursor:pointer; }
.ann-card h3 { gap:var(--s1); }


/* ============ DESKTOP-NAV-V1 [2026-09-11 老板令] 桌面适配 ≥1024px: 左侧导航 + 宽内容 ============ */
@media (min-width: 1024px) {
  :root { --app-max: 1180px; }
  body { padding-bottom: 0; background: var(--n2); }
  #app { max-width: 1180px !important; box-shadow: 0 0 0 1px var(--n3), 0 0 40px rgba(28,27,23,.07); }
  .topbar { max-width: none !important; margin-left: 188px; padding-left: 28px; padding-right: 28px; }
  .tabbar {
    left: calc(50% - 590px) !important; right: auto !important; top: 0 !important; bottom: 0 !important;
    width: 188px !important; max-width: 188px !important;
    flex-direction: column !important; align-items: stretch !important; justify-content: flex-start !important; gap: 4px !important;
    padding: 18px 12px !important; border-top: none !important; border-right: 1px solid var(--line);
    background: #fff !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
  }
  .tabbar a {
    flex: 0 0 auto !important; flex-direction: row !important; justify-content: flex-start !important;
    gap: 10px !important; padding: 11px 14px !important; border-radius: 10px !important; min-height: 46px !important;
    font-size: var(--f14) !important; font-weight: 500; color: var(--text-2);
  }
  .tabbar a .ico { padding: 0 !important; }
  .tabbar a.active { background: var(--p50); color: var(--brand); font-weight: 600; }
  .tabbar a.active .ico { background: transparent !important; }
  .tabbar a .dot { position: static !important; margin-left: auto; }
  .page { max-width: none !important; margin-left: 188px; padding: 24px 28px 48px; }
  #viewRoot .stat-strip { grid-template-columns: repeat(3, 1fr) !important; gap: var(--s3); }
  #viewRoot #listBody { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s3); align-items: start; }
  #viewRoot #listBody .swipe-wrap { margin-bottom: 0; }
  #viewRoot .tpl-grid4 { grid-template-columns: repeat(8, 1fr) !important; }
  .login-wrap {
    margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw);
    padding: 72px calc(50vw - 230px) 72px;
  }
}

/* [2026-09-11 员工体验] 待办卡内联操作条 */
.todo-acts { display:flex; gap:8px; margin: -4px 0 var(--s3); padding: 0 2px; }
.todo-acts .btn { flex:1; min-height:40px; }
.todo-acts .btn.plain { flex: 0 0 auto; }

/* [2026-09-11 员工体验] 审批进度预期卡 */
.progress-card { background: var(--card); border-radius: var(--r-card); padding: var(--s3) var(--s4); margin-bottom: var(--s3); box-shadow: var(--e1); }
.pg-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:8px; }
.pg-label { font-size: var(--f13); color: var(--text-2); font-weight:600; }
.pg-num { font-size: var(--f12); color: var(--brand); font-weight:700; }
.pg-bar { height:7px; background: var(--n2); border-radius:4px; overflow:hidden; }
.pg-bar i { display:block; height:100%; background: linear-gradient(90deg,#4b7bec,#2b6fff); border-radius:4px; transition: width .4s ease; }
.pg-line { display:flex; align-items:center; gap:6px; margin-top:10px; font-size: var(--f13); color: var(--text); }
.pg-ico { display:flex; color: var(--brand); }
.pg-status { flex:1; min-width:0; }
.pg-eta { color: var(--p600); font-size: var(--f12); font-weight:600; white-space:nowrap; }
.pg-sub { font-size: var(--f12); color: var(--muted); margin-top:4px; }

/* [v65 老板令] 打印兜底: 弹层/toast/mask 强制实底白卡, 不让打印机磨砂全黑(已含 sheet+toast 毛玻璃化, 必须补这一段) */
@media print {
  .topbar, .tabbar, .actionbar, .sheet, .toast, .mask {
    background: #fff !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: #000 !important;
    box-shadow: none !important;
  }
  .toast { color: #000 !important; }
  .mask { display: none !important; }
}
