Browse Source

design(family-workbench): 家庭工作台重设计规范三件套

- 语义色彩/字号/间距/圆角/阴影/动效 token: cfc-web/src/styles/family-workbench.tokens.css
- 交互设计规格 v2 (14节): docs/design/2026-11-27-family-workbench-redesign-v2.md
- 方向A交互预览页: docs/design/previews/2026-11-27-family-workbench-direction-a.html

对应管理后台家庭工作台重设计(方向A 左竖向导航)。
单文件入库: 仅上述3路径, 未触碰主 index 其余 WIP。
Agnes Agent 2 hours ago
parent
commit
5ce4e8b86b

+ 105 - 0
cfc-web/src/styles/family-workbench.tokens.css

@@ -0,0 +1,105 @@
+/* ============================================================
+   家庭工作台(FamilyWorkbench)设计令牌层 · ui-spec-engine v2.1
+   ------------------------------------------------------------
+   适用范围:/family-workbench 单家庭工作台(方向 A:左竖向导航工作台)
+            及其连带页面(Families.vue 家庭列表、各模块面板、被钻取管理页)
+   单一事实源:色值与 admin-tokens.css §1 同源同值,仅两处 scoped fix 已标注;
+            若 admin-tokens.css §1 调整色值,必须同步本文件并重跑:
+              python scripts/contrast.py --file 本文件路径
+   硬性纪律:本作用域组件样式禁止出现 --adm-* 与 --color-* 之外的第三种色值写法;
+            结构尺寸一律取 --wb-* 令牌,禁止裸 px 魔法数。
+   ============================================================ */
+
+:root {
+  /* ---------- ① 色彩 · 语义令牌(contrast.py --file 可校验)----------
+     与 admin-tokens.css §1 的对应:
+       --bg           = --color-bg-page      #F0F2F5
+       --surface      = --adm-bg-container   #FFFFFF
+       --surface-2    = --adm-bg-header      #FAFAFA
+       --primary      = --adm-primary        #0B5FCC(加深满足 AA)
+     scoped fix 1:--fg / --fg-muted 取实色(替代全局 rgba 体系),
+       理由 = alpha 合成后可精确校验;#262626 与全局 rgba(0,0,0,.88)
+       在白底上视觉一致(合成值 #1F1F1F)。
+     scoped fix 2:--fg-muted = #6B6B6B。
+       全局 rgba(0,0,0,.45) 在白卡上合成为 #8C8C8C(3.56:1)、
+       在页面底 #F0F2F5 上约 2.85:1,均不达 AA 4.5:1;
+       提实为 #6B6B6B 后:对 --surface 5.33:1、对 --bg 4.75:1。
+     --accent 不设:B 端后台克制原则,强调由 --primary 独占,
+       状态提示由语义色承担(色族 = 主色 + 语义状态色 + 中性)。 */
+  --bg: #F0F2F5;
+  --surface: #FFFFFF;
+  --surface-2: #FAFAFA;
+  --fg: #262626;               /* 主文字;对 --bg 13.5:1、对 --surface 15.4:1(实测) */
+  --fg-muted: #6B6B6B;         /* 次要文字;对 --bg 4.75:1、对 --surface 5.33:1(实测) */
+  --border: #F0F0F0;           /* 装饰分割线(WCAG 豁免) */
+  --border-strong: #8A8A8A;    /* 输入框/图形边框;对 --bg 3.08:1、对 --surface 3.45:1(实测) */
+  --primary: #0B5FCC;
+  --primary-hover: #0958D9;    /* hover = 同色相加深一档 */
+  --primary-active: #003EB3;   /* active = 三态最深 */
+  --on-primary: #FFFFFF;       /* 主色上的文字;对 --primary 5.61:1(实测) */
+
+  /* ---------- ①b 语义状态色(不计入色族;文字用深色变体,浅底作标签底)----------
+     text 变体均已用 contrast.py 两色模式实测对各自 bg 通过 AA(见规范文档 §2 表)。 */
+  --success: #52C41A;  --success-text: #237804;  --success-bg: #F6FFED;  --success-border: #B7EB8F;
+  --warning: #FAAD14;  --warning-text: #AD4E00;  --warning-bg: #FFFBE6;  --warning-border: #FFE58F;
+  --danger:  #FF4D4F;  --danger-text:  #A8071A;  --danger-bg:  #FFF1F0;  --danger-border:  #FFCCC7;
+  --info:    #0B5FCC;  --info-text:    #0958D9;  --info-bg:    #E6F4FF;  --info-border:    #91CAFF;
+
+  /* ---------- ② 字体 ---------- */
+  --font-sans: "Helvetica Neue", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
+  --weight-regular: 400;
+  --weight-medium: 500;
+  --weight-semibold: 600;
+
+  /* ---------- ③ 字号阶梯(5 级;13px = 表格密度档,对齐 admin-tokens §8 全局密度)---------- */
+  --text-caption: 12px; --text-caption-lh: 18px;   /* 标签 / 角标 / 辅助说明 */
+  --text-table: 13px;   --text-table-lh: 20px;     /* 表格 / 列表正文(密度档) */
+  --text-body: 14px;    --text-body-lh: 22px;      /* 正文基线 / 按钮 / 表单 */
+  --text-title: 16px;   --text-title-lh: 24px;     /* 页面标题 / 区块标题 */
+  --text-kpi: 20px;     --text-kpi-lh: 28px;       /* KPI 数值(tabular-nums) */
+  --leading-tight: 1.25;
+  --leading-normal: 1.5;
+
+  /* ---------- ④ 间距(4px 基准;对齐项目 8px 基准 + 4px 微档)---------- */
+  --space-1: 4px;  --space-2: 8px;  --space-3: 12px;  --space-4: 16px;
+  --space-6: 24px; --space-8: 32px; --space-12: 48px;
+
+  /* ---------- ⑤ 圆角 / 阴影 / 层级 / 动效 ---------- */
+  --radius-sm: 2px;        /* 标签、徽标 */
+  --radius-md: 4px;        /* 输入框、表格内层 */
+  --radius-control: 6px;   /* 按钮 */
+  --radius-card: 8px;      /* 卡片、面板、弹窗 */
+  --shadow-e0: none;
+  --shadow-card: 0 1px 2px 0 rgba(0, 0, 0, 0.03), 0 1px 6px -1px rgba(0, 0, 0, 0.02);
+  --shadow-popup: 0 6px 16px 0 rgba(0, 0, 0, 0.08), 0 3px 6px -4px rgba(0, 0, 0, 0.12);
+  --z-base: 0; --z-sticky: 10; --z-dropdown: 20; --z-overlay: 30; --z-drawer: 50; --z-toast: 100;
+  /* 注:el-drawer / el-dialog / el-dropdown 等 Element portal 组件由 Element 自身
+     z-index 体系(≥2000)管理;--z-* 仅用于工作台自定义浮层的内部相对分层。 */
+  --dur-fast: 150ms; --dur-base: 200ms; --dur-slow: 300ms; --dur-page: 400ms;
+  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
+  --ease-out: cubic-bezier(0, 0, 0.2, 1);
+  --ease-in: cubic-bezier(0.3, 0, 1, 1);
+
+  /* ---------- ⑥ 工作台结构令牌(方向 A 布局骨架)---------- */
+  --wb-header-h: 56px;        /* 页头区高度(返回 + 家庭名 + 邀请码 + 成员数 + 主操作) */
+  --wb-kpi-h: 52px;           /* KPI 条高度:纯数字条,无图标无图表 */
+  --wb-kpi-gap: 24px;         /* KPI 项间距 */
+  --wb-kpi-value-size: var(--text-kpi);
+  --wb-kpi-label-size: var(--text-caption);
+  --wb-nav-w: 208px;         /* 左竖向导航宽(默认档) */
+  --wb-nav-w-compact: 160px; /* 768–1023 档收窄 */
+  --wb-nav-item-h: 36px;     /* 导航项高(桌面指针密度档) */
+  --wb-nav-bar-w: 3px;       /* 选中态左侧主色条宽 */
+  --wb-panel-gap: 16px;      /* 面板间距 */
+  --wb-panel-pad: 16px;      /* 面板内边距 */
+  --wb-panel-head-h: 44px;   /* 面板头(标题 + 主操作 + 曲线容器) */
+  --wb-curve-h: 120px;       /* 模块面板内 30 天指标曲线高(ECharts) */
+  --wb-form-w: 520px;        /* 表单抽屉宽(仅新增/编辑表单,不承载列表) */
+}
+
+/* 减弱动效:全局生效(QA 第 20 项) */
+@media (prefers-reduced-motion: reduce) {
+  :root {
+    --dur-fast: 0ms; --dur-base: 0ms; --dur-slow: 0ms; --dur-page: 0ms;
+  }
+}

+ 306 - 0
docs/design/2026-11-27-family-workbench-redesign-v2.md

@@ -0,0 +1,306 @@
+# 家庭工作台重设计 · 交互设计说明(方向 A 定稿)
+
+> 编号:FAMILY-WB-2026-11-27-V2 | 日期:2026-11-27 | 状态:规范定稿,待开发会话实现
+> 触发:2026-11-27 管理端体验反馈——「统计数字太大占地方;点数字从右边滑出抽屉、下方又有 tab,两套导航打架;页面规范性差;要补管理能力」
+> 范围:`/family-workbench` 单家庭工作台为主,连带 `Families.vue` 家庭列表与各模块面板(用户已确认「连带相关管理页」)
+> 令牌文件:`cfc-web/src/styles/family-workbench.tokens.css`(contrast.py 实测全 ✓,见 §2)
+> 术语口径:本规范统一用「能登录用户/不能登录用户」,不再出现「孩子」表述(AGENTS.md 用户模型统一口径);「家庭工作台」= 单家庭视角,「家庭运营工作台」= /families 跨家庭列表页
+
+---
+
+## 1. 方向声明
+
+| 项 | 结论 |
+|---|---|
+| 选定方向 | **A · 左竖向导航工作台**(2026-11-27 用户确认) |
+| 被否方向 | B(顶 tab + 紧凑 KPI,模块 >9 后拥挤)、C(中转台跳管理页,多一次跳转、依赖各页加 familyId 过滤) |
+| 核心手术 | ① 8 张大统计卡 → **52px 纯数字 KPI 条**(无图标无图表);② **列表全部出抽屉**,抽屉只留新增/编辑表单;③ 单一导航轴 = 左竖向导航,KPI 点击 = 切换导航选中项;④ 30 天指标曲线**从卡片迁入各模块面板顶部**(后端 card.series 数据已在,不丢「指标曲线」诉求) |
+| 参照来源 | 21st.dev 外部参照源本环境不可达(.md 404、无 MCP),按 skill 降级链回退:以项目既有 `admin-tokens.css`(Ant Design 5 语义企业后台令牌)+ Element UI 约定为**项目级参照**,在其上修结构,不另造色板 |
+| 设计原则 | 数据可读性 > 操作效率 > 视觉美观 > 个性化效果(继承 admin-tokens.css 头部宣言) |
+
+---
+
+## 2. 色彩 token(contrast.py 实测,禁止口算)
+
+语义色与 `admin-tokens.css` §1 同源同值,仅两处 scoped fix(均已脚本验证):
+
+| Token | 值 | 用途 | 实测对比度(contrast.py) |
+|---|---|---|---|
+| `--bg` | #F0F2F5 | 页面底 | — |
+| `--surface` | #FFFFFF | 卡片/面板/表格底 | — |
+| `--surface-2` | #FAFAFA | 嵌套分区/hover 底 | — |
+| `--fg` | #262626 | 主文字 | on --bg **13.49:1 AAA**;on --surface **15.13:1 AAA** |
+| `--fg-muted` | #6B6B6B | 次要文字 | on --bg **4.75:1 AA**;on --surface **5.33:1 AA** |
+| `--border` | #F0F0F0 | 装饰分割线 | WCAG 豁免 |
+| `--border-strong` | #8A8A8A | 输入框/图形边框 | on --bg **3.08:1**;on --surface **3.45:1**(图形阈值 AA) |
+| `--primary` | #0B5FCC | 主操作/链接/选中 | on --bg **5.31:1 AA**;on --surface **5.96:1 AA** |
+| `--primary-hover` / `--primary-active` | #0958D9 / #003EB3 | hover / active 三态 | — |
+| `--on-primary` | #FFFFFF | 主色上文字 | on --primary **5.96:1 AA** |
+| `--success-text` | #237804 | 成功状态文字 | on --success-bg **5.44:1 AA** |
+| `--warning-text` | #AD4E00 | 警告/待审文字 | on --warning-bg **5.22:1 AA** |
+| `--danger-text` | #A8071A | 危险/失败文字 | on --danger-bg **7.04:1 AAA** |
+| `--info-text` | #0958D9 | 信息状态文字 | on --info-bg **5.50:1 AA** |
+| 状态浅底/边框 | #F6FFED/#FFFBE6/#FFF1F0/#E6F4FF · #B7EB8F/#FFE58F/#FFCCC7/#91CAFF | 标签底/边框 | 边框对各自底色 1.20–1.55:1(不达 3:1)→ **见下方 scoped fix 3 |
+
+**scoped fix 1(文字实色化)**:`--fg`/`--fg-muted` 取实色替代全局 rgba 体系(#262626 与全局 rgba(0,0,0,.88) 白底视觉一致;实色便于精确校验)。
+
+**scoped fix 2(次要文字提深)**:全局 `rgba(0,0,0,.45)` 在白卡上合成 #8C8C8C(3.56:1)、在页面底约 2.85:1,均不达 AA。本作用域提实为 **#6B6B6B**(4.75–5.33:1)。全局 `--adm-text-45` 不动,是否全局提深另案评估(待确认项 ⑥)。
+
+**scoped fix 3(取消状态标签边框)**:状态标签边框对各自浅底 1.20–1.55:1,低于图形阈值且本就近乎不可见。规范:**工作台内状态表达三件套 = 状态深字(AA)+ 状态浅底 + text 同色 6px 圆点**,标签边框取消(`border-color` 取 bg 同色或 transparent)。状态语义由文字承载,边框属冗余线索。
+
+**色族纪律**:主色(蓝)+ 中性(灰阶)+ 语义状态色(不计入色族)= 3 族;**不设 `--accent` 第二强调色**,强调一律 `--primary` 小面积使用,禁止品牌色铺大面积背景或渐变。
+
+---
+
+## 3. 字体与字号阶梯(5 级,布局强制)
+
+| Token | 值 | 字重 | 用途 |
+|---|---|---|---|
+| `--text-caption` / `--text-caption-lh` | 12px / 18px | 400/500 | 标签、角标、辅助说明 |
+| `--text-table` / `--text-table-lh` | 13px / 20px | 400 | 表格/列表正文(密度档,对齐 admin-tokens §8 全局密度) |
+| `--text-body` / `--text-body-lh` | 14px / 22px | 400 | 正文基线、按钮、表单 |
+| `--text-title` / `--text-title-lh` | 16px / 24px | 600(页题)/500(区块题) | 页面标题、面板标题 |
+| `--text-kpi` / `--text-kpi-lh` | 20px / 28px | 600 | KPI 数值(tabular-nums) |
+
+- 字号与行高分立两个令牌(`font-size` / `line-height` 可直接引用,不走 `font:` 简写,避免合并值只能用于简写的坑)。
+- 字体家族:`--font-sans` 单族(Helvetica Neue / PingFang SC / Microsoft YaHei 栈,同项目全局),靠 400/500/600 字重分层,**禁第二字体**。
+- 数值一律 `font-variant-numeric: tabular-nums`(KPI、表格数值列、金额、CF 值)。
+
+---
+
+## 4. 间距 / 栅格 / 断点
+
+- 间距:4px 基准 7 档 `--space-1..12`(4/8/12/16/24/32/48),全部 4 的倍数;布局只用这些档,禁裸 px。
+- 工作台骨架令牌:`--wb-header-h 56px`(页头)、`--wb-kpi-h 52px`(KPI 条)、`--wb-nav-w 208px`(左导航)、`--wb-nav-item-h 36px`(导航项高)、`--wb-panel-gap 16px`、`--wb-panel-pad 16px`、`--wb-curve-h 120px`(曲线区)、`--wb-form-w 520px`(表单抽屉)。
+- 断点五档(与 skill 基线一致):
+
+| 档 | 宽度 | 布局 |
+|---|---|---|
+| XL | ≥1440 | 导航 208 + 内容 flex-1 |
+| L | 1024–1439 | 同 XL |
+| M | 768–1023 | 导航收窄 `--wb-nav-w-compact 160px`;KPI 条允许两行(高度自适应) |
+| S | 480–767 | 左导航 → 顶部横向滚动 chips(高 36px、间距 8px);面板单列 |
+| XS | <480 | 同 S;表格横向滚动由 `.adm-table-wrap` 承担,页面禁横向滚动 |
+
+---
+
+## 5. 圆角 / 阴影 / 层级 / 动效
+
+- 圆角 4 档全站复用:`--radius-sm 2px`(标签/徽标)/`--radius-md 4px`(输入框/表格内层)/`--radius-control 6px`(按钮)/`--radius-card 8px`(卡片/面板/弹窗)。
+- 阴影 3 档:`--shadow-e0 none`(平板卡片以 1px 描边 + 留白分区)/`--shadow-card`(卡片常驻,透明度 ≤0.03)/`--shadow-popup`(浮层,0.08/0.12,≤0.12 达标);禁堆叠超过 2 层。
+- z-index 六阶 `--z-base..toast 0/10/20/30/50/100`,仅用于工作台**自定义**浮层;el-drawer/el-dialog/el-dropdown 由 Element 自身 z 体系(≥2000)管理,不得用 999/9999。
+- 动效:`--dur-fast 150 / base 200 / slow 300 / page 400ms`;曲线 `--ease-standard/out/in` 三条;**只动 transform/opacity**;`prefers-reduced-motion: reduce` 时全部归零(tokens.css 末尾已内置)。
+
+---
+
+## 6. 组件六态矩阵
+
+### 6.1 KPI 条项(`.wb-kpi-item`,高 52px,纯数字)
+| 状态 | 表现 |
+|---|---|
+| default | label 12px `--fg-muted` + value 20px/600 `--fg`;无边框无底(页面底上直接排布,项间 24px 间距) |
+| hover | value → `--primary`;cursor pointer;150ms 仅变色 |
+| active(对应模块被选中) | value `--primary` + 底部 2px `--primary` 指示条(transform: scaleX 动画) |
+| focus-visible | 2px `--primary-active` outline,offset 2px |
+| loading | value 位 76×20px 骨架块(`--surface-2` + shimmer 仅 opacity);label 不变 |
+| 空数据 | value 显示 `-`(`--fg-muted`),不可点击(cursor default) |
+| disabled | 无权限模块:整项 `--fg-muted` + opacity .5,禁指针 |
+
+### 6.2 左导航项(`.wb-nav-item`,高 36px,宽 208px)
+| 状态 | 表现 |
+|---|---|
+| default | 文字 14px `--fg-muted`,无底 |
+| hover | 底 `--surface-2`,文字 `--fg` |
+| active | 底 `--info-bg` + 左侧 3px `--primary` 竖条(`--wb-nav-bar-w`)+ 文字 `--primary` 500 |
+| focus-visible | 2px `--primary-active` outline offset 2px |
+| disabled | 无权限:不渲染该项(权限后端控),或文字 `--fg-muted` 禁指针 |
+| loading | 导航本身不加载(模块数据加载在右面板内) |
+| 角标 | 方案/任务/报告有待办时,文字后跟 6px `--warning` 圆点(非数字红点,避免与大数字打架) |
+
+### 6.3 模块面板(`.wb-panel`,右内容区容器)
+| 状态 | 表现 |
+|---|---|
+| default | `--surface` 底 + 1px `--border` + `--radius-card` + `--shadow-card`;面板头 44px(标题 16/500 + 右侧主操作 + 曲线入口);body 16px 内距 |
+| hover | 卡片无位移(B 端克制,hover 只给可交互元素) |
+| 加载中 | 表格区骨架屏(表头保留 + 5 行 shimmer 行,高 40px/行);曲线区 120px 骨架 |
+| 空数据 | `el-empty`(`--fg-muted` 描述 + 操作引导按钮,如「暂无报告,去代传」) |
+| 错误 | 面板内 40px 错误条(`--danger-bg` + `--danger-text` + 「重试」文字按钮),不清空已渲染表格 |
+| 无权限 | 面板区显示 `el-empty` + 「无权限查看该家庭数据」+ 联系管理员说明 |
+
+### 6.4 表单抽屉(`.wb-form-drawer`,520px,仅新增/编辑)
+| 状态 | 表现 |
+|---|---|
+| default | el-drawer 生态;标题 16/500;表单 label 14 `--fg-muted`;底部操作条右对齐(取消 default + 保存 primary) |
+| 提交中 | 保存按钮 loading spinner + 宽度锁定 + 禁重复提交(`:loading`) |
+| 校验错误 | 错误提示就近字段下方(el-form-item-error,`--danger-text`),不弹全局 message |
+| 成功 | 关闭抽屉 + `$message.success` + 面板列表刷新(调用现有 load 方法) |
+| 关闭 | 右上关闭按钮保留可用(不因 loading 禁用) |
+| 键盘 | Esc 可关;焦点陷阱在抽屉内;Tab 顺序 = 视觉顺序 |
+
+### 6.5 状态标签(六态外的统一形态,scoped fix 3 落地)
+- 形态:浅底 + 深字 + 6px 同色圆点,`--radius-sm 2px`,12px;**无边框**(`border-color` = bg 同色)。
+- 映射:待处理=warning / 已完成·已审核=success / 解析中·进行中=info / 失败=danger / 未知=default(`--surface-2` 底 + `--fg-muted` 字)。
+
+### 6.6 指标曲线(面板内 120px ECharts)
+- 数据:`card.series`(30 天日粒度,后端已在);线 `--primary` 1.5px,面积渐变到 `rgba(11,95,204,0.08)`(仅 opacity 动画);无坐标轴(sparkline 风格,网格 4px);hover 显示 tooltip(`--shadow-popup`)。
+- 无数据:120px 空态条(`--surface-2` + 居中「近 30 天暂无数据」12px `--fg-muted`),不渲染canvas。
+- 模块切换时 `chart.dispose()`(现有 beforeDestroy 逻辑改到面板 watch)。
+
+---
+
+## 7. 页面结构(ui-flow 产出:路径 ≤3 步、层级 ≤3 层)
+
+### 7.1 布局骨架(自上而下)
+```
+页头 56px    [返回家庭列表]  家庭工作台 · {name} · 邀请码 {inviteCode} · 成员 {n} 人        [代传报告]
+KPI 条 52px  报告12 | 方案3● | 任务28● | CF值1,280 | 消息5 | 优惠券6        ← 点击 = 切左导航选中项
+─────────────────────────────────────────────────────────────────────────
+主体 flex     左导航 208px             │  右内容区 flex-1(.wb-panel)
+              ① 孩子管理              │   面板头:标题 + 主操作 + 曲线入口
+              ② 报告 ●                │   曲线区 120px(30 天)
+              ③ 方案 ●                │   工具栏:筛选(状态/成员)+ 刷新
+              ④ 任务                  │   表格(密度档 13px)
+              ⑤ CF值                  │   分页(右下)
+              ⑥ 积分记录              │
+              ⑦ 心愿                  │
+              ⑧ 奖励                  │
+              ⑨ 优惠券                │
+              ⑩ 收益                  │
+              ⑪ 消息                  │
+```
+(● = 有待办角标的模块)
+
+### 7.2 KPI ↔ 导航映射(后端 6 卡,1:1 真实对应)
+| KPI 项 | card.key | 点击去向 | 模块内曲线 |
+|---|---|---|---|
+| 报告 | reports | ② 报告面板 | reportDailySeries |
+| 方案 | plans | ③ 方案面板 | planDailySeries |
+| 任务 | tasks | ④ 任务面板 | taskDailySeries |
+| CF值 | cf | ⑤ CF值面板 | cfDailySeries |
+| 消息 | messages | ⑪ 消息面板 | conversationDailySeries |
+| 优惠券 | coupons | ⑨ 优惠券面板 | couponDailySeries |
+
+其余 5 个模块(孩子管理/积分记录/心愿/奖励/收益)无对应统计卡,仅导航直达。角标数据源:方案待审(planSummary.byStatus.pending_review)、任务待办(taskSummary.pending)、报告待解析(reportSummary.byStatus.pending)——字段名以现有 `getFamilyOverview` 返回为准,缺则首版只显总数(待确认项 ②)。
+
+### 7.3 模块清单与数据源(严格对现状,零新增功能)
+| # | 导航项 | 数据源(现有接口) | 从现状哪里搬来 |
+|---|---|---|---|
+| ① | 孩子管理 | ChildrenPanel(familyId 锁定) | 现有 tab,原样迁入 |
+| ② | 报告 | getFamilyWorkbench.cards + getFamilyOverview.reports + reportSummary;代传=proxyParseReport/proxyConfirmReport + reportMembers 下拉 | **抽屉 → 面板**(上传表单+解析预览+列表同面板) |
+| ③ | 方案 | overview.plans + planSummary | **抽屉 → 面板** |
+| ④ | 任务 | getFamilyTasks 分页 + taskSummary + create/updateFamilyTask | **抽屉 → 面板**(表单收 520px 抽屉) |
+| ⑤ | CF值 | getFamilyCfSummary + getFamilyCfLogs 分页 + cfSummary | **抽屉 → 面板** |
+| ⑥ | 积分记录 | PointsPanel | 现有 tab 原样 |
+| ⑦ | 心愿 | WishesPanel | 现有 tab 原样 |
+| ⑧ | 奖励 | RewardsPanel | 现有 tab 原样 |
+| ⑨ | 优惠券 | FamilyCouponPanel | 现有 tab 原样 |
+| ⑩ | 收益 | FamilyEarningsPanel | 现有 tab 原样 |
+| ⑪ | 消息 | getFamilyMessages 分页 + getConversationMessages | **抽屉 → 面板**(会话列表→消息两级,保留只读) |
+
+### 7.4 高频任务路径(≤3 步核验)
+- 代传报告(最高频):/families【进入工作台】→ ② 报告面板【代传报告】→ 选成员+传 PDF → 预览【确认入库】= **工作台内 3 步** ✓
+- 方案审核:KPI【方案】→ 面板内审核 = 2 步 ✓
+- 查 CF 流水:KPI【CF值】= 1 步 ✓
+- 创建任务:导航【任务】→【创建任务】抽屉 = 2 步 ✓
+- 层级:L1 工作台页 / L2 模块面板(页内切换,keep-alive 保各模块翻页与筛选状态)/ L3 表单抽屉(仅新增编辑)= **3 层** ✓
+
+---
+
+## 8. 五态定义(每个数据展示区,缺态即未完成)
+
+| 数据展示区 | 加载中 | 空数据 | 有数据 | 错误 | 无权限 |
+|---|---|---|---|---|---|
+| KPI 条(首屏) | 每项 value 位骨架块 | `-` 且禁点 | 数字+tab-nums | 该项 `-`+tooltip「加载失败,点击重试」 | 整条隐藏(role 校验失败时) |
+| 模块面板表格 | 表头+5 行 shimmer 骨架 | el-empty+操作引导 | 密度档表格+分页 | 40px danger 错误条+重试 | el-empty+「无权限查看」 |
+| 指标曲线 | 120px 骨架 | 「近 30 天暂无数据」空态条 | sparkline+tooltip | 空态条+重试入口 | 同左 |
+| 表单抽屉 | 保存按钮 loading+禁重复 | — | 预填编辑值 | 字段级就近错误 | 抽屉不开放 |
+| 消息面板 | 会话列表骨架 | 「暂无咨询」 | 会话列表→消息时间线 | 错误条+重试 | 只读降级提示 |
+
+---
+
+## 9. 连带页面一致性(不重造色板的硬约束)
+
+| 页面/组件 | 本期动作 |
+|---|---|
+| `Families.vue`(家庭运营工作台) | 结构不动(S1 精简结论保持);页头/筛选/表格样式与本规范 §2-§5 对齐(消除与工作台的观感断裂);「进入工作台」跳转不变 |
+| 6 个既有 panel(Children/Points/Wishes/Rewards/FamilyCoupon/FamilyEarnings) | 只做样式对齐(表格密度、状态标签三件套、分页位置),**不动 props/数据字段/接口** |
+| 被钻取管理页(/cf-value、/tasks、/rewards、/wishes 等) | 不重构;仅要求不引入第四种色值写法(沿用 admin-tokens.css) |
+| tokens 引入方式 | `family-workbench.tokens.css` 在 `main.js` 中于 `admin-tokens.css` 之后 import(或工作台视图内 import),全管理端生效,避免作用域分裂 |
+
+---
+
+## 10. 对 FamilyWorkbench.vue 的落地手术清单(给开发会话的明确指令)
+
+**删除**:统计卡片带 `el-row/.wb-card/.wb-col`(8 张大卡);`statsCollapsed/stats-toggle`(52px 条无需收起);`cardStaticClass/chartRef/renderCharts` 卡片图表逻辑(迁面板);`openModule` 的**列表抽屉分发**(tasks/plans/reports/cf/messages 的 5 个列表抽屉整体搬成面板)。
+
+**保留**:6 个 panel 组件与 tab 数据流(改挂载点到右内容区);报告代传全流程(上传→解析预览→确认入库,搬进 ② 面板);任务/方案表单(`el-dialog` → 520px `el-drawer` 形态,逻辑不动);CF 流水、消息两级逻辑(搬面板)。
+
+**新增**:`.wb-shell`(flex 骨架:页头 + KPI 条 + 左导航 + 右内容区);`.wb-kpi/.wb-nav/.wb-panel`;`activeModule` 取代 `activeTab`(单一导航状态源);右内容区 `<keep-alive>` 包裹 11 个模块;曲线区按模块挂 `card.series`(watch activeModule  dispose/init)。
+
+** Families.vue**:无功能改动,样式对齐(见 §9)。
+
+**纪律**:改动走独立 worktree + 分支提交,禁 `add -A`/`checkout`/`stash`/`reset --hard`;`git diff --cached --name-only | wc -l` 硬校验;前端 `npm run lint` 通过;本页无后端改动(cards/series/overview 接口均已在)。
+
+---
+
+## 11. QA 清单(20 项,交付前逐项判定)
+
+| # | 检查项 | 判定 |
+|---|---|---|
+| 1 | 正文对比度 | ✓ contrast.py --file 全 ✓:--fg 13.49/15.13、--fg-muted 4.75/5.33、--primary 5.31/5.96;状态 text 对各自 bg 5.22–7.04 |
+| 2 | 非文本对比度 | ✓ --border-strong 3.08(bg)/3.45(surface);状态标签边框取消(scoped fix 3);焦点环 2px --primary-active |
+| 3 | 触控目标 | ✓ 桌面指针口径:按钮 32/28/24(项目全局密度四期档)、文字按钮 min 24×24、导航项 36px 高;触屏大屏场景另议(B 端管理端不以触控为首要输入) |
+| 4 | 移动端正文 | ✓ 管理端桌面为主;正文基线 14px(全局 §8 密度既定口径,非移动 C 端页) |
+| 5 | 行高 | ✓ 正文 1.5(14/22、16/24、20/28) |
+| 6 | 行宽 | ✓ 正文不超 75ch;表格/表单由栅格与面板宽约束 |
+| 7 | 字体家族 | ✓ 单族 --font-sans,字重 400/500/600 分层 |
+| 8 | 字号阶梯 | ✓ 5 级 12/13/14/16/20 固定刻度,最大/最小 1.67,各层用途写死 |
+| 9 | 间距 | ✓ 全部 4 的倍数(--space-1..12) |
+| 10 | 圆角 | ✓ 4 档(2/4/6/8)全站复用 |
+| 11 | 阴影 | ✓ 3 档(e0/card/popup),透明度 ≤0.12,不堆叠 |
+| 12 | z-index | ✓ 六阶 0–100;Element portal 由自身体系管理;无 999/9999 |
+| 13 | 动效时长 | ✓ 150/200/300/400ms 四档 |
+| 14 | 动效属性 | ✓ 只动 transform/opacity |
+| 15 | 焦点态 | ✓ 所有可交互元素 :focus-visible 2px outline offset 2px |
+| 16 | 表单 | ✓ el-form label 关联;错误就近字段下方;提交中禁重复 |
+| 17 | 图标 | ✓ SVG/Element 图标字体,禁 emoji 代图标 |
+| 18 | 响应式 | ✓ 五档断点;页面 overflow-x hidden;表格横向滚动由 .adm-table-wrap 承担 |
+| 19 | 加载态 | ✓ 骨架屏(KPI/表格/曲线)+ 按钮防重复提交 |
+| 20 | 减弱动效 | ✓ tokens.css 内置 prefers-reduced-motion 归零 |
+
+---
+
+## 12. 待确认项(不阻塞本期开发,标注后推进)
+
+1. **成员数**:后端 `getFamilyWorkbench` 的 family 对象是否返回成员数字段;无则页头去掉或改调 `getFamilyMemberList` 计数。
+2. **角标字段名**:planSummary.byStatus.pending_review / taskSummary.pending / reportSummary.byStatus.pending 需按现有 `getFamilyOverview` 实际返回校准;缺则首版只显总数。
+3. **消息模块形态**:保留「会话列表 → 消息时间线」两级(现状),或折叠为单栏只读时间线——建议保留现状两级,工作量最小。
+4. **5 个既有 panel 内部字段**:本期只做样式对齐;若面板内有自定义色值/圆角漂移,随样式对齐一并收敛到令牌。
+5. **dark 模式**:管理端无深色需求,本期不做;如未来需要按 starter 的 `[data-theme="dark"]` 段扩展(仅反转明度不动色相)。
+6. **全局次要文字**:`--adm-text-45` 的 AA 问题是否全局提深(本规范已在工作台作用域修复),涉及全部后台页面,需另行评估后统一。
+
+---
+
+## 13. 质量自审(Step 6 五维,0–10)
+
+| 维度 | 分 | 判据 |
+|---|---|---|
+| 可读性 Readability | 9 | 表格/正文 13–14px(B 端密度口径)+ 行高 1.5–1.55 + 全部文字对比度脚本实测 AA 以上;扣 0.5:13px 表格档低于通用 16px 正文基线,属 B 端显式取舍 |
+| 层级 Hierarchy | 9 | 一屏唯一最大字号 = KPI 20px;12/13/14/16/20 五级 + 400/500/600 字重双轴分层;扣 1:左导航与 KPI 双入口共存,靠 active 联动收敛 |
+| 比例 Proportion | 10 | 间距全 4 倍数(7 档)、圆角 4 档全站复用、阴影 3 档、结构尺寸全部令牌化 |
+| 节奏 Rhythm | 9 | 区块 56(页头)/52(KPI)/44(面板头)/36(导航项)递减递进;扣 1:右下分页与左上工具栏的呼吸依赖面板内距,无第三档节奏点 |
+| 对比 Contrast | 9 | 色族 3(主色+中性+语义状态);7 组规范名色对 + 4 组状态色对 + 3 组边框全部脚本实测;扣 1:hover 态与 default 仅靠明度一档差,另有描边/位移补偿 |
+
+**交付前修正记录**:字号令牌原为合并值(`12px/18px`),会导致 `font-size: var(--text-caption)` 拿到非法值——已拆为 size/lh 双令牌并复跑 contrast.py(仍全 ✓)。
+
+---
+
+## 14. 交付物清单
+
+| 文件 | 说明 |
+|---|---|
+| `cfc-web/src/styles/family-workbench.tokens.css` | 设计令牌层(语义令牌 + 结构令牌,contrast.py 实测全 ✓) |
+| `docs/design/2026-11-27-family-workbench-redesign-v2.md` | 本规范(含 IA、五态、六态矩阵、手术清单、QA 20 项) |
+| `docs/design/previews/2026-11-27-family-workbench-direction-a.html` | 单页示例(可交互:切模块 / 看五态 / 开表单抽屉;全部颜色走令牌变量) |
+
+**落地顺序建议**:① main.js 引入 tokens(admin-tokens.css 之后)→ ② 按 §10 手术清单改 FamilyWorkbench.vue → ③ Families.vue 样式对齐 → ④ lint + 五态逐项验收。本页无后端改动(cards/series/overview 接口均已在)。

+ 455 - 0
docs/design/previews/2026-11-27-family-workbench-direction-a.html

@@ -0,0 +1,455 @@
+<!DOCTYPE html>
+<html lang="zh-CN">
+<head>
+<meta charset="UTF-8">
+<meta name="viewport" content="width=device-width, initial-scale=1.0">
+<title>家庭工作台 · 方向 A 预览(2026-11-27)</title>
+<link rel="stylesheet" href="../../cfc-web/src/styles/family-workbench.tokens.css">
+<style>
+  /* ===== 基础(全部引用 tokens,禁硬编码色值)===== */
+  * { margin: 0; padding: 0; box-sizing: border-box; }
+  body {
+    background: var(--bg); color: var(--fg);
+    font-family: var(--font-sans); font-size: var(--text-body); line-height: var(--text-body-lh); line-height: var(--leading-normal);
+  }
+  button { font-family: inherit; cursor: pointer; }
+  :focus-visible { outline: 2px solid var(--primary-active); outline-offset: 2px; }
+
+  /* ===== 演示控制条(仅预览用,非产品元素)===== */
+  .demo-bar {
+    display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
+    padding: var(--space-2) var(--space-4); background: var(--surface-2);
+    border-bottom: 1px solid var(--border); font-size: var(--text-caption); line-height: var(--text-caption-lh); color: var(--fg-muted);
+  }
+  .demo-bar b { color: var(--fg); font-weight: var(--weight-medium); }
+  .demo-bar .demo-btn {
+    border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg);
+    border-radius: var(--radius-control); padding: 2px 10px; font-size: var(--text-caption); line-height: var(--text-caption-lh);
+  }
+  .demo-bar .demo-btn.is-on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
+
+  /* ===== 页头 56px ===== */
+  .wb-header {
+    height: var(--wb-header-h); display: flex; align-items: center; justify-content: space-between;
+    padding: 0 var(--space-6); background: var(--surface); border-bottom: 1px solid var(--border);
+  }
+  .wb-header-left { display: flex; align-items: center; gap: var(--space-4); min-width: 0; }
+  .wb-back {
+    display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border-strong);
+    background: var(--surface); color: var(--fg); border-radius: var(--radius-control);
+    height: 32px; padding: 0 12px; font-size: var(--text-body); line-height: var(--text-body-lh);
+  }
+  .wb-back:hover { color: var(--primary-hover); border-color: var(--primary-hover); }
+  .wb-title { font-size: var(--text-title); line-height: var(--text-title-lh); font-weight: var(--weight-semibold); }
+  .wb-sub { font-size: var(--text-caption); line-height: var(--text-caption-lh); color: var(--fg-muted); }
+  .wb-sub .adm-num { font-variant-numeric: tabular-nums; }
+
+  /* ===== 按钮 ===== */
+  .btn {
+    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
+    height: 32px; padding: 0 15px; border-radius: var(--radius-control); font-size: var(--text-body); line-height: var(--text-body-lh);
+    border: 1px solid var(--border-strong); background: var(--surface); color: var(--fg);
+    transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
+  }
+  .btn:hover { color: var(--primary-hover); border-color: var(--primary-hover); }
+  .btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
+  .btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--on-primary); }
+  .btn-sm { height: 28px; padding: 0 12px; font-size: var(--text-caption); line-height: var(--text-caption-lh); }
+  .btn-text { border: none; background: none; color: var(--primary); padding: 0 2px; min-height: 24px; min-width: 24px; }
+  .btn-text:hover { color: var(--primary-hover); background: none; }
+
+  /* ===== KPI 条 52px ===== */
+  .wb-kpi {
+    min-height: var(--wb-kpi-h); display: flex; align-items: center; gap: var(--wb-kpi-gap);
+    padding: 0 var(--space-6); background: var(--bg); overflow-x: auto;
+  }
+  .wb-kpi-item {
+    display: flex; flex-direction: column; justify-content: center; gap: 2px;
+    border: none; background: none; text-align: left; padding: var(--space-1) 0;
+    position: relative; flex: 0 0 auto;
+  }
+  .wb-kpi-item .k-label { font-size: var(--wb-kpi-label-size); color: var(--fg-muted); line-height: 18px; }
+  .wb-kpi-item .k-value {
+    font-size: var(--wb-kpi-value-size); font-weight: var(--weight-semibold); color: var(--fg);
+    line-height: 28px; font-variant-numeric: tabular-nums;
+    transition: color var(--dur-fast) var(--ease-standard);
+  }
+  .wb-kpi-item:hover .k-value { color: var(--primary); }
+  .wb-kpi-item.is-active .k-value { color: var(--primary); }
+  .wb-kpi-item.is-active::after {
+    content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--primary);
+  }
+  .wb-kpi-item .k-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warning); display: inline-block; margin-left: 4px; vertical-align: 4px; }
+
+  /* ===== 主体:左导航 + 右内容 ===== */
+  .wb-shell { display: flex; gap: var(--space-4); padding: var(--space-4) var(--space-6); align-items: flex-start; }
+  .wb-nav {
+    width: var(--wb-nav-w); flex: 0 0 auto; background: var(--surface);
+    border: 1px solid var(--border); border-radius: var(--radius-card); box-shadow: var(--shadow-card);
+    padding: var(--space-2); position: sticky; top: var(--space-4);
+  }
+  .wb-nav-group { font-size: var(--text-caption); line-height: var(--text-caption-lh); color: var(--fg-muted); padding: var(--space-2) var(--space-3) var(--space-1); }
+  .wb-nav-item {
+    display: flex; align-items: center; gap: var(--space-2); width: 100%;
+    height: var(--wb-nav-item-h); padding: 0 var(--space-3); border: none; background: none;
+    border-radius: var(--radius-md); color: var(--fg-muted); font-size: var(--text-body); line-height: var(--text-body-lh); text-align: left;
+    position: relative;
+    transition: background var(--dur-fast) var(--ease-standard), color var(--dur-fast) var(--ease-standard);
+  }
+  .wb-nav-item:hover { background: var(--surface-2); color: var(--fg); }
+  .wb-nav-item.is-active { background: var(--info-bg); color: var(--primary); font-weight: var(--weight-medium); }
+  .wb-nav-item.is-active::before {
+    content: ""; position: absolute; left: 0; top: 6px; bottom: 6px; width: var(--wb-nav-bar-w);
+    background: var(--primary); border-radius: 0 2px 2px 0;
+  }
+  .wb-nav-item .n-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--warning); flex: 0 0 auto; }
+  .wb-nav-item .n-count { margin-left: auto; font-size: var(--text-caption); line-height: var(--text-caption-lh); color: var(--fg-muted); font-variant-numeric: tabular-nums; }
+
+  .wb-main { flex: 1 1 auto; min-width: 0; }
+  .wb-panel {
+    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-card);
+    box-shadow: var(--shadow-card); overflow: hidden;
+  }
+  .wb-panel-head {
+    min-height: var(--wb-panel-head-h); display: flex; align-items: center; justify-content: space-between;
+    gap: var(--space-3); padding: var(--space-2) var(--wb-panel-pad); border-bottom: 1px solid var(--border);
+  }
+  .wb-panel-title { font-size: var(--text-title); line-height: var(--text-title-lh); font-weight: var(--weight-medium); }
+  .wb-panel-head .head-actions { display: flex; align-items: center; gap: var(--space-2); }
+
+  /* 曲线区 120px */
+  .wb-curve { height: var(--wb-curve-h); padding: var(--space-2) var(--wb-panel-pad); border-bottom: 1px solid var(--border); }
+  .wb-curve svg { display: block; width: 100%; height: 100%; }
+  .curve-empty {
+    height: 100%; display: flex; align-items: center; justify-content: center;
+    background: var(--surface-2); border-radius: var(--radius-md);
+    font-size: var(--text-caption); line-height: var(--text-caption-lh); color: var(--fg-muted);
+  }
+  .curve-tip { font-size: var(--text-caption); line-height: var(--text-caption-lh); color: var(--fg-muted); margin-bottom: 2px; }
+
+  /* 工具栏 */
+  .wb-toolbar {
+    display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap;
+    padding: var(--space-3) var(--wb-panel-pad); border-bottom: 1px solid var(--border);
+  }
+  .wb-toolbar .t-right { margin-left: auto; display: flex; gap: var(--space-2); }
+  .sel {
+    height: 32px; border: 1px solid var(--border-strong); border-radius: var(--radius-md);
+    background: var(--surface); color: var(--fg); font-size: var(--text-body); line-height: var(--text-body-lh); padding: 0 var(--space-2);
+  }
+  .sel:hover { border-color: var(--primary-hover); }
+
+  /* 表格 */
+  .wb-table { width: 100%; border-collapse: collapse; font-size: var(--text-table); line-height: var(--text-table-lh); }
+  .wb-table th {
+    background: var(--surface-2); color: var(--fg); font-weight: var(--weight-medium);
+    height: 36px; padding: 0 var(--space-2); text-align: left; border-bottom: 1px solid var(--border);
+    white-space: nowrap;
+  }
+  .wb-table td { padding: 6px var(--space-2); border-bottom: 1px solid var(--border); color: var(--fg); }
+  .wb-table tbody tr:hover { background: var(--surface-2); }
+  .wb-table .num { text-align: right; font-variant-numeric: tabular-nums; }
+  .wb-pager { display: flex; justify-content: flex-end; gap: var(--space-1); padding: var(--space-3) var(--wb-panel-pad); }
+  .pg {
+    min-width: 28px; height: 28px; border: 1px solid var(--border); background: var(--surface);
+    border-radius: var(--radius-md); font-size: var(--text-caption); line-height: var(--text-caption-lh); color: var(--fg-muted);
+  }
+  .pg.is-active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
+  .pg:hover:not(.is-active) { color: var(--primary); border-color: var(--primary-hover); }
+
+  /* 状态三件套标签(无边框,scoped fix 3)*/
+  .adm-status {
+    display: inline-flex; align-items: center; gap: 6px; padding: 2px 8px; font-size: var(--text-caption); line-height: var(--text-caption-lh);
+    line-height: 20px; border-radius: var(--radius-sm); white-space: nowrap; border: 1px solid transparent;
+  }
+  .adm-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
+  .adm-status--success { background: var(--success-bg); color: var(--success-text); }
+  .adm-status--warning { background: var(--warning-bg); color: var(--warning-text); }
+  .adm-status--info { background: var(--info-bg); color: var(--info-text); }
+  .adm-status--danger { background: var(--danger-bg); color: var(--danger-text); }
+  .adm-status--default { background: var(--surface-2); color: var(--fg-muted); }
+
+  /* 五态 */
+  .state-loading { padding: var(--wb-panel-pad); }
+  .sk { background: var(--surface-2); border-radius: var(--radius-md); animation: skpulse 1.2s var(--ease-standard) infinite; }
+  @keyframes skpulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }
+  .sk-row { height: 40px; margin-bottom: var(--space-2); }
+  .state-empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-3); padding: var(--space-12) 0; color: var(--fg-muted); }
+  .state-error {
+    display: flex; align-items: center; gap: var(--space-3); margin: var(--wb-panel-pad);
+    padding: var(--space-3); background: var(--danger-bg); color: var(--danger-text);
+    border-radius: var(--radius-md); font-size: var(--text-body); line-height: var(--text-body-lh);
+  }
+
+  /* 表单抽屉(520px,仅表单)*/
+  .drawer-mask {
+    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: var(--z-overlay);
+    display: none; opacity: 0; transition: opacity var(--dur-base) var(--ease-standard);
+  }
+  .drawer-mask.is-open { display: block; opacity: 1; }
+  .wb-drawer {
+    position: fixed; top: 0; right: 0; bottom: 0; width: var(--wb-form-w); max-width: 92vw;
+    background: var(--surface); box-shadow: var(--shadow-popup); z-index: var(--z-drawer);
+    transform: translateX(100%); transition: transform var(--dur-slow) var(--ease-standard);
+    display: flex; flex-direction: column;
+  }
+  .wb-drawer.is-open { transform: translateX(0); }
+  .drawer-head {
+    display: flex; align-items: center; justify-content: space-between;
+    padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border);
+  }
+  .drawer-title { font-size: var(--text-title); line-height: var(--text-title-lh); font-weight: var(--weight-medium); }
+  .drawer-close { border: none; background: none; color: var(--fg-muted); font-size: 18px; line-height: 1; padding: 4px; }
+  .drawer-close:hover { color: var(--primary); }
+  .drawer-body { flex: 1 1 auto; overflow: auto; padding: var(--space-4); }
+  .form-item { margin-bottom: var(--space-4); }
+  .form-item label { display: block; font-size: var(--text-body); line-height: var(--text-body-lh); color: var(--fg-muted); font-weight: var(--weight-medium); margin-bottom: var(--space-1); }
+  .form-item .inp {
+    width: 100%; height: 32px; border: 1px solid var(--border-strong); border-radius: var(--radius-md);
+    padding: 0 var(--space-2); font-size: var(--text-body); line-height: var(--text-body-lh); color: var(--fg); font-family: inherit;
+  }
+  .form-item .inp:focus { border-color: var(--primary); }
+  .form-item .inp::placeholder { color: var(--fg-muted); }
+  .form-item .err { font-size: var(--text-caption); line-height: var(--text-caption-lh); color: var(--danger-text); margin-top: var(--space-1); }
+  .drawer-foot { display: flex; justify-content: flex-end; gap: var(--space-2); padding: var(--space-3) var(--space-4); border-top: 1px solid var(--border); }
+
+  /* ===== 响应式(五档断点)===== */
+  @media (max-width: 1023px) { .wb-nav { width: var(--wb-nav-w-compact); } }
+  @media (max-width: 767px) {
+    .wb-shell { flex-direction: column; }
+    .wb-nav { width: 100%; position: static; display: flex; overflow-x: auto; gap: var(--space-2); padding: var(--space-2); }
+    .wb-nav-group { display: none; }
+    .wb-nav-item { flex: 0 0 auto; }
+    .wb-nav-item.is-active::before { display: none; }
+    .wb-kpi { flex-wrap: wrap; height: auto; }
+    .wb-header { flex-wrap: wrap; height: auto; padding: var(--space-3) var(--space-4); gap: var(--space-2); }
+  }
+  @media (max-width: 479px) { .wb-toolbar .t-right { margin-left: 0; } }
+  @media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
+</style>
+</head>
+<body>
+
+<!-- 演示控制条(非产品元素,用于查看五态与抽屉) -->
+<div class="demo-bar">
+  <b>演示控制</b>
+  <span>面板状态:</span>
+  <button class="demo-btn is-on" data-state="data">有数据</button>
+  <button class="demo-btn" data-state="loading">加载中</button>
+  <button class="demo-btn" data-state="empty">空数据</button>
+  <button class="demo-btn" data-state="error">错误</button>
+  <button class="demo-btn" id="drawerToggle">打开表单抽屉</button>
+  <span>(导航项 / KPI 可点击切换模块)</span>
+</div>
+
+<!-- 页头 56px -->
+<header class="wb-header">
+  <div class="wb-header-left">
+    <button class="wb-back" type="button">
+      <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><polyline points="15 18 9 12 15 6"></polyline></svg>
+      返回家庭列表
+    </button>
+    <span class="wb-title">家庭工作台</span>
+    <span class="wb-sub">张三家(邀请码 <span class="adm-num">FAM-8F2K</span>)· 成员 <span class="adm-num">4</span> 人 · 创建于 <span class="adm-num">2026-03-12</span></span>
+  </div>
+  <div class="head-actions">
+    <button class="btn btn-primary" type="button" onclick="document.getElementById('drawerToggle').click()">
+      <svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>
+      新增任务
+    </button>
+  </div>
+</header>
+
+<!-- KPI 条 52px(后端 6 卡 1:1;点击 = 切换左导航) -->
+<div class="wb-kpi" id="kpiStrip" role="tablist" aria-label="家庭统计">
+  <button class="wb-kpi-item is-active" data-module="reports" role="tab" aria-selected="true"><span class="k-label">报告</span><span class="k-value">12</span></button>
+  <button class="wb-kpi-item" data-module="plans" role="tab" aria-selected="false"><span class="k-label">方案</span><span class="k-value">3</span><span class="k-dot" title="2 个待审核"></span></button>
+  <button class="wb-kpi-item" data-module="tasks" role="tab" aria-selected="false"><span class="k-label">任务</span><span class="k-value">28</span><span class="k-dot" title="5 个待办"></span></button>
+  <button class="wb-kpi-item" data-module="cf" role="tab" aria-selected="false"><span class="k-label">CF值</span><span class="k-value">1,280</span></button>
+  <button class="wb-kpi-item" data-module="messages" role="tab" aria-selected="false"><span class="k-label">消息</span><span class="k-value">5</span></button>
+  <button class="wb-kpi-item" data-module="coupons" role="tab" aria-selected="false"><span class="k-label">优惠券</span><span class="k-value">6</span></button>
+</div>
+
+<div class="wb-shell">
+  <!-- 左竖向导航(单一导航轴;● = 有待办) -->
+  <nav class="wb-nav" id="wbNav" aria-label="家庭模块">
+    <div class="wb-nav-group">健康与方案</div>
+    <button class="wb-nav-item is-active" data-module="reports"><span class="n-dot"></span>报告</button>
+    <button class="wb-nav-item" data-module="plans"><span class="n-dot"></span>方案</button>
+    <button class="wb-nav-item" data-module="tasks">任务</button>
+    <button class="wb-nav-item" data-module="cf">CF值</button>
+    <div class="wb-nav-group">成长与激励</div>
+    <button class="wb-nav-item" data-module="children">孩子管理</button>
+    <button class="wb-nav-item" data-module="points">积分记录</button>
+    <button class="wb-nav-item" data-module="wishes">心愿</button>
+    <button class="wb-nav-item" data-module="rewards">奖励</button>
+    <div class="wb-nav-group">资产与沟通</div>
+    <button class="wb-nav-item" data-module="coupons">优惠券<span class="n-count">6</span></button>
+    <button class="wb-nav-item" data-module="earnings">收益</button>
+    <button class="wb-nav-item" data-module="messages">消息<span class="n-count">5</span></button>
+  </nav>
+
+  <!-- 右内容区 -->
+  <main class="wb-main">
+    <section class="wb-panel" id="panel">
+      <div class="wb-panel-head">
+        <span class="wb-panel-title" id="panelTitle">报告</span>
+        <div class="head-actions">
+          <button class="btn btn-sm btn-primary" type="button">代传报告</button>
+        </div>
+      </div>
+
+      <!-- 指标曲线 120px(card.series 30 天,迁自原统计卡) -->
+      <div class="wb-curve" id="curveBox">
+        <div class="curve-tip">近 30 天趋势(数据源:卡片 series)</div>
+        <svg viewBox="0 0 600 96" preserveAspectRatio="none" role="img" aria-label="近 30 天报告数量趋势">
+          <defs>
+            <linearGradient id="areaGrad" x1="0" y1="0" x2="0" y2="1">
+              <stop offset="0%" stop-color="var(--primary)" stop-opacity="0.10"/>
+              <stop offset="100%" stop-color="var(--primary)" stop-opacity="0.01"/>
+            </linearGradient>
+          </defs>
+          <path d="M0,80 L40,74 L80,78 L120,62 L160,66 L200,52 L240,58 L280,44 L320,50 L360,38 L400,42 L440,30 L480,36 L520,26 L560,32 L600,22 L600,96 L0,96 Z" fill="url(#areaGrad)"/>
+          <path d="M0,80 L40,74 L80,78 L120,62 L160,66 L200,52 L240,58 L280,44 L320,50 L360,38 L400,42 L440,30 L480,36 L520,26 L560,32 L600,22" fill="none" stroke="var(--primary)" stroke-width="1.5" vector-effect="non-scaling-stroke"/>
+        </svg>
+      </div>
+
+      <!-- 工具栏 -->
+      <div class="wb-toolbar">
+        <select class="sel" aria-label="状态筛选"><option>全部状态</option><option>已完成</option><option>解析中</option><option>待处理</option><option>失败</option></select>
+        <select class="sel" aria-label="成员筛选"><option>全部成员</option><option>张三</option><option>李四</option></select>
+        <div class="t-right">
+          <button class="btn btn-sm" type="button">刷新</button>
+          <button class="btn btn-sm" type="button">导出</button>
+        </div>
+      </div>
+
+      <!-- 五态容器:有数据 / 加载中 / 空 / 错误 -->
+      <div id="stateData">
+        <table class="wb-table">
+          <thead><tr><th>日期</th><th>成员</th><th>类型</th><th class="num">综合分</th><th>状态</th><th>操作</th></tr></thead>
+          <tbody>
+            <tr><td class="adm-num">2026-11-20</td><td>张三</td><td>肠道菌群检测</td><td class="num">82</td><td><span class="adm-status adm-status--success">已完成</span></td><td><button class="btn-text" type="button">查看</button></td></tr>
+            <tr><td class="adm-num">2026-11-18</td><td>李四</td><td>肠道菌群检测</td><td class="num">76</td><td><span class="adm-status adm-status--success">已完成</span></td><td><button class="btn-text" type="button">查看</button></td></tr>
+            <tr><td class="adm-num">2026-11-15</td><td>张三</td><td>DAN 心理测评</td><td class="num">—</td><td><span class="adm-status adm-status--info">解析中</span></td><td><button class="btn-text" type="button">查看</button></td></tr>
+            <tr><td class="adm-num">2026-11-12</td><td>王五</td><td>肠道菌群检测</td><td class="num">—</td><td><span class="adm-status adm-status--warning">待处理</span></td><td><button class="btn-text" type="button">查看</button></td></tr>
+            <tr><td class="adm-num">2026-11-08</td><td>张三</td><td>年度体检</td><td class="num">65</td><td><span class="adm-status adm-status--danger">失败</span></td><td><button class="btn-text" type="button">重试</button></td></tr>
+          </tbody>
+        </table>
+        <div class="wb-pager">
+          <button class="pg" type="button" aria-label="上一页">‹</button>
+          <button class="pg is-active" type="button">1</button>
+          <button class="pg" type="button">2</button>
+          <button class="pg" type="button">3</button>
+          <button class="pg" type="button" aria-label="下一页">›</button>
+        </div>
+      </div>
+
+      <div id="stateLoading" class="state-loading" hidden>
+        <div class="sk sk-row"></div><div class="sk sk-row"></div><div class="sk sk-row"></div><div class="sk sk-row"></div><div class="sk sk-row"></div>
+      </div>
+
+      <div id="stateEmpty" class="state-empty" hidden>
+        <svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" aria-hidden="true"><path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"/><polyline points="14 2 14 8 20 8"/><line x1="9" y1="15" x2="15" y2="15"/></svg>
+        <span>暂无报告,可通过上方「代传报告」上传</span>
+        <button class="btn btn-sm btn-primary" type="button">去代传报告</button>
+      </div>
+
+      <div id="stateError" class="state-error" hidden>
+        <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" aria-hidden="true"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>
+        <span>加载失败,请稍后重试</span>
+        <button class="btn-text" type="button" style="color: var(--danger-text); text-decoration: underline;">重试</button>
+      </div>
+    </section>
+  </main>
+</div>
+
+<!-- 表单抽屉(520px,仅新增/编辑表单;列表已全部出抽屉) -->
+<div class="drawer-mask" id="drawerMask"></div>
+<aside class="wb-drawer" id="wbDrawer" role="dialog" aria-modal="true" aria-label="新增任务">
+  <div class="drawer-head">
+    <span class="drawer-title">新增任务</span>
+    <button class="drawer-close" id="drawerClose" type="button" aria-label="关闭">✕</button>
+  </div>
+  <div class="drawer-body">
+    <div class="form-item">
+      <label for="f-title">标题</label>
+      <input class="inp" id="f-title" type="text" placeholder="请输入任务标题">
+    </div>
+    <div class="form-item">
+      <label for="f-points">积分</label>
+      <input class="inp" id="f-points" type="number" min="0" value="10">
+    </div>
+    <div class="form-item">
+      <label for="f-type">类型</label>
+      <select class="sel" id="f-type" style="width:100%"><option>一次性</option><option>循环</option></select>
+    </div>
+    <div class="form-item">
+      <label for="f-desc">描述</label>
+      <input class="inp" id="f-desc" type="text" placeholder="选填">
+      <div class="err">示例:校验错误就近显示在字段下方</div>
+    </div>
+  </div>
+  <div class="drawer-foot">
+    <button class="btn" id="drawerCancel" type="button">取消</button>
+    <button class="btn btn-primary" type="button">保存</button>
+  </div>
+</aside>
+
+<script>
+  // 模块清单(与规范 §7.3 一致)
+  var MODULES = {
+    reports:  { title: '报告',   note: '代传上传 + 解析预览 + 列表 + 曲线(原抽屉改为面板)' },
+    plans:    { title: '方案',   note: '方案列表 + 待审角标 + 审核入口(原抽屉改为面板)' },
+    tasks:    { title: '任务',   note: '任务列表 + 执行率统计 + 创建任务(表单收 520px 抽屉)' },
+    cf:       { title: 'CF值',   note: '成员余额表 + 合计 + 流水(原抽屉改为面板)' },
+    messages: { title: '消息',   note: '会话列表 → 消息时间线两级(只读,原抽屉改为面板)' },
+    children: { title: '孩子管理', note: '复用既有 ChildrenPanel 组件(familyId 锁定),本期仅样式对齐' },
+    points:   { title: '积分记录', note: '复用既有 PointsPanel 组件,本期仅样式对齐' },
+    wishes:   { title: '心愿',   note: '复用既有 WishesPanel 组件,本期仅样式对齐' },
+    rewards:  { title: '奖励',   note: '复用既有 RewardsPanel 组件,本期仅样式对齐' },
+    coupons:  { title: '优惠券', note: '复用既有 FamilyCouponPanel 组件,本期仅样式对齐' },
+    earnings: { title: '收益',   note: '复用既有 FamilyEarningsPanel 组件,本期仅样式对齐' }
+  };
+  var panelTitle = document.getElementById('panelTitle');
+  var kpiItems = document.querySelectorAll('.wb-kpi-item');
+  var navItems = document.querySelectorAll('.wb-nav-item');
+
+  function activate(module) {
+    kpiItems.forEach(function (el) {
+      var on = el.getAttribute('data-module') === module;
+      el.classList.toggle('is-active', on);
+      el.setAttribute('aria-selected', on ? 'true' : 'false');
+    });
+    navItems.forEach(function (el) {
+      el.classList.toggle('is-active', el.getAttribute('data-module') === module);
+    });
+    panelTitle.textContent = MODULES[module].title + '(' + MODULES[module].note + ')';
+  }
+  kpiItems.forEach(function (el) { el.addEventListener('click', function () { activate(el.getAttribute('data-module')); }); });
+  navItems.forEach(function (el) { el.addEventListener('click', function () { activate(el.getAttribute('data-module')); }); });
+
+  // 五态演示
+  var stateBtns = document.querySelectorAll('.demo-btn[data-state]');
+  var states = { data: document.getElementById('stateData'), loading: document.getElementById('stateLoading'), empty: document.getElementById('stateEmpty'), error: document.getElementById('stateError') };
+  stateBtns.forEach(function (btn) {
+    btn.addEventListener('click', function () {
+      stateBtns.forEach(function (b) { b.classList.remove('is-on'); });
+      btn.classList.add('is-on');
+      Object.keys(states).forEach(function (k) { states[k].hidden = (k !== btn.getAttribute('data-state')); });
+    });
+  });
+
+  // 表单抽屉
+  var mask = document.getElementById('drawerMask');
+  var drawer = document.getElementById('wbDrawer');
+  function openDrawer() { mask.classList.add('is-open'); drawer.classList.add('is-open'); }
+  function closeDrawer() { mask.classList.remove('is-open'); drawer.classList.remove('is-open'); }
+  document.getElementById('drawerToggle').addEventListener('click', openDrawer);
+  document.getElementById('drawerClose').addEventListener('click', closeDrawer);
+  document.getElementById('drawerCancel').addEventListener('click', closeDrawer);
+  mask.addEventListener('click', closeDrawer);
+  document.addEventListener('keydown', function (e) { if (e.key === 'Escape') closeDrawer(); });
+</script>
+</body>
+</html>