/**
 * 客户版网站样式。
 *
 * 取值来源：《客户版设计基准 V1》（从内部工作台 5177 提取）。所有颜色/字号/间距/圆角/阴影
 * 一律引用 styles/tokens.css 里的变量，本文件不出现十六进制色值（可用 `npm run check:design` 自查）。
 *
 * 类名沿用客户版既有命名（.card / .btn / .badge …），取值按基准对应条目：
 *   .card      ← 基准 §3.2 页面面板 .section（待办样式:2026-2035）
 *   .btn       ← 基准 §2.1（外壳样式:899-918 + 焦点/禁用按 §6 C3/C4 收敛）
 *   .badge     ← 基准 §2.5 状态胶囊
 *
 * 2026-10-01：复刻 5177 的板块内容缩放（业务方实机反馈"报价合同字体太大"）：
 *   :root 默认 --workbench-section-scale: 0.70（待办样式:32），
 *   作用根 = `main > .view > .card > *`（对应 5177 `main > .section > *`，待办样式:2037-2039），
 *   当前视图的档位由 public/app/ui/workbench-scale.js 写在 .view 元素上。
 */

/* ============================================================
 * 0. 基础层（基准 §1.2 排版、§1.1 背景、§1.3 滚动条）
 * ============================================================ */

/* 板块内容缩放档位（2026-10-01 照 5177 搬回；业务方实机对照拍板）。
 * 默认 100% ↔ 0.70（5177 待办样式:32、app.js:174-179/5230-5232），
 * 变量本身定义在 tokens.css（客户版的唯一常量源）；
 * 当前视图的档位由 ui/workbench-scale.js 以行内变量写在 .view 上。 */

/* 板块内容缩放：5177 是 `main > .section > * { zoom: var(--workbench-section-scale) }`
 * （待办样式:2037-2039）。客户版的面板是 .card（基准 §3.2 的 .section 对应物），
 * 所以作用根 = 视图下每张卡片的内容；卡片外壳（边框/内边距/最大宽度）不缩放，
 * 与 5177 的 section 外壳口径一致。
 * 副作用与补偿（逐处）：
 *   · 卡片内容里的 position:fixed 菜单/弹窗要 `zoom: calc(1 / var(--workbench-section-scale, 1))`
 *     （5177 同款，见 发票样式:2697/6212、素材库样式:716）——
 *     否则尺寸和指针坐标都会被缩 0.70；补偿清单写在各模块样式文件里；
 *   · 拖拽改尺寸（列宽/行高/树宽）的指针位移要除以本变量（见 workbench-scale.js
 *     的 sectionScaleFor 与各面板的 pointermove 实现）；
 *   · 打印沿用当前档位（5177 也没有打印专用的反向缩放）。 */
main > .view > .card > * {
  zoom: var(--workbench-section-scale);
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  color: var(--wb-text-primary);
  background: var(--wb-bg);
}

body {
  margin: 0;
  font-family: var(--wb-font-family);
  font-size: var(--wb-fs-13);
  line-height: var(--wb-font-line-height);
  color: var(--wb-text-primary);
  background: var(--wb-page-bg); /* 基准 §1.1 */
}

/* 文字选中：全站统一用主色实底 + 白字（浅色底上原来的浅蓝几乎看不见） */
::selection {
  background: var(--wb-accent);
  color: var(--wb-btn-primary-ink);
}

/* 滚动条（基准 §1.3 · 待办样式:76-99） */
* { scrollbar-color: var(--wb-scroll-thumb) var(--wb-scroll-track); }
::-webkit-scrollbar { width: var(--wb-scroll-size); height: var(--wb-scroll-size); }
::-webkit-scrollbar-track { background: var(--wb-scroll-track); }
::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: var(--wb-radius-pill);
  background: var(--wb-scroll-thumb);
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--wb-scroll-thumb-hover); background-clip: padding-box; }
::-webkit-scrollbar-thumb:active { background: var(--wb-scroll-thumb-active); background-clip: padding-box; }

/* 焦点：基准 §6 C4 要求客户版必须让键盘焦点可见（旧项目侧栏不可见）。
 * [data-sg-state] 是样式总览页的静态状态钩子：与真实伪类共用同一段声明，避免出现两套样式。 */
:focus-visible,
[data-sg-state="focus"] {
  outline: var(--wb-focus-outline);
  outline-offset: var(--wb-focus-outline-offset);
}

h1, h2, h3, h4 { margin: 0 0 var(--wb-space-2); line-height: 1.35; }
h1 { font-size: var(--wb-fs-22); }
h2 { font-size: var(--wb-fs-24); font-weight: var(--wb-fw-850); color: var(--wb-page-ink); }
h3 { font-size: var(--wb-fs-15); }
h4 { font-size: var(--wb-fs-14); }

p { margin: 0 0 var(--wb-space-2); }

a { color: var(--wb-link); text-decoration: none; }
a:hover, a:focus-visible { color: var(--wb-page-link-hover-ink); text-decoration: underline; }

code {
  padding: 1px 5px;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-fill-soft);
  font-family: var(--wb-font-mono);
  font-size: var(--wb-fs-12);
}

input::placeholder, textarea::placeholder { color: var(--wb-text-placeholder); }
input, textarea, select { caret-color: var(--wb-caret); }

/* 工具类 */
.muted { color: var(--wb-text-secondary); }
.small { font-size: var(--wb-fs-12); }
.subhead { margin: var(--wb-space-7) 0 var(--wb-space-2); font-size: var(--wb-fs-15); }
.warn-line { margin: var(--wb-space-3) 0 0; color: var(--wb-warning); font-size: var(--wb-fs-13); }
.error-line { margin: var(--wb-space-3) 0 0; color: var(--wb-danger); font-size: var(--wb-fs-13); }
.ok-line { color: var(--wb-success); }
.visually-hidden { /* 基准 §7C · 08-quote-library.css:1525-1545 */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* 数字与业务显示（基准 §4）：等宽数字 + 右对齐，用于金额/数量/编号/天数 */
.num, .num-right {
  font-variant-numeric: tabular-nums;
}
.num-right { text-align: right; }
.num-mono { font-family: var(--wb-font-mono); }
.code-text { font-weight: var(--wb-fw-700); text-transform: uppercase; }

/* ============================================================
 * 1. 左侧导航（基准 §3.1）
 * ============================================================ */

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: var(--wb-z-sidebar);
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: var(--wb-sidebar-gap);
  width: var(--wb-sidebar-width);
  padding: var(--wb-sidebar-padding-y) var(--wb-sidebar-padding-x);
  overflow: auto;
  color: var(--wb-sidebar-ink);
  background: var(--wb-sidebar-bg);
  border-right: 1px solid var(--wb-sidebar-border);
  box-shadow: var(--wb-sidebar-shadow);
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 48px;
  padding: var(--wb-space-1) 0;
}
.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}
.sidebar-brand .brand-mark {
  display: none;
}
/* 眉题（保留 Workbench 英文小字，基准 §1.2：11px/850/.08em/uppercase） */
.sidebar-brand .eyebrow {
  margin: 0;
  color: var(--wb-sidebar-eyebrow-ink);
  font-size: var(--wb-fs-11);
  font-weight: var(--wb-fw-850);
  letter-spacing: var(--wb-tracking-wide);
  text-transform: uppercase;
  line-height: 1.2;
}
.sidebar-brand h1 {
  margin: 2px 0 0;
  color: var(--wb-sidebar-brand-ink);
  font-size: var(--wb-fs-22);
  font-weight: var(--wb-fw-850);
  line-height: 1.25;
  letter-spacing: 0;
  white-space: nowrap;
  word-break: keep-all;
  overflow: visible;
}

/* 工作台名字：点一下就地改，Enter/失焦保存，Esc 取消（2026-10-22 他拍板的小巧思） */
.workbench-brand-name {
  cursor: pointer;
}

.workbench-brand-name:hover,
.workbench-brand-name:focus-visible {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
}

.workbench-brand-name-input {
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 2px 0 0;
  border: 1px solid var(--wb-sidebar-item-active-border);
  border-radius: 4px;
  background: transparent;
  color: var(--wb-sidebar-brand-ink);
  font: inherit;
  font-size: inherit;
  font-weight: var(--wb-fw-850);
  padding: 0 4px;
}

/* 右键菜单：重命名 / 打开本地文件夹 */
.workbench-brand-menu {
  position: fixed;
  z-index: calc(var(--wb-z-modal) + 10);
  display: grid;
  gap: 2px;
  min-width: 180px;
  border: 1px solid var(--wb-border);
  border-radius: 8px;
  background: var(--wb-panel-bg);
  box-shadow: var(--wb-shadow-modal);
  padding: 6px;
}

.workbench-brand-menu button {
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--wb-text-primary);
  font: inherit;
  font-size: var(--wb-fs-13);
  font-weight: var(--wb-fw-700);
  padding: 8px 10px;
  text-align: left;
  cursor: pointer;
}

.workbench-brand-menu button:hover {
  background: var(--wb-accent-soft);
}

.workbench-brand-menu button:disabled {
  opacity: var(--wb-disabled-opacity);
  cursor: default;
}
.sidebar-brand p {
  margin: var(--wb-space-1) 0 0;
  color: var(--wb-sidebar-note-ink);
  font-size: var(--wb-fs-11);
}

.nav { display: grid; gap: var(--wb-space-3); }
.nav-footer { gap: var(--wb-space-1); }

.sidebar-footer {
  display: grid;
  gap: var(--wb-space-3);
  margin-top: auto;
  padding: var(--wb-space-5) var(--wb-space-2) 0;
  border-top: 1px solid var(--wb-sidebar-divider);
}

/* 「页面大小」控件（2026-10-01 照 5177 搬回；待办样式:1477-1525）：
 * 侧栏导航项之后、底部区之前；浅色按钮三枚 － / 100% / ＋，默认显示 100%。 */
.workbench-scale-panel {
  display: grid;
  gap: var(--wb-space-3);
  border-top: 1px solid var(--wb-sidebar-divider);
  padding: var(--wb-space-5) var(--wb-space-2) 0;
}

.workbench-scale-panel > span {
  color: var(--wb-sidebar-eyebrow-ink);
  font-size: 10px;                    /* 待办样式:1487 分组标题档 */
  font-weight: var(--wb-fw-800);
  letter-spacing: var(--wb-tracking-wide);
  text-transform: uppercase;
}

.workbench-scale-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--wb-space-1);             /* 待办样式:1495 */
}

.workbench-scale-controls button {
  min-height: 36px;                   /* 待办样式:1499 */
  border: 1px solid var(--wb-scale-btn-border);
  border-radius: var(--wb-radius-button);
  background: var(--wb-scale-btn-bg);
  color: var(--wb-scale-btn-ink);
  cursor: pointer;
  font: inherit;
  font-size: var(--wb-fs-12);
  font-weight: var(--wb-fw-800);
  box-shadow: var(--wb-shadow-control);
}

.workbench-scale-controls button:hover,
.workbench-scale-controls button:focus-visible {
  border-color: var(--wb-scale-btn-hover-border);
  color: var(--wb-accent-ink);
  outline: 0;
}

.workbench-scale-controls button:disabled {
  cursor: default;
  opacity: var(--wb-disabled-opacity);
}

.workbench-scale-controls [data-workbench-scale="reset"] {
  color: var(--wb-scale-reset-ink);
  font-size: var(--wb-fs-11);         /* 待办样式:1524-1526 */
}

/* 导航项：默认 / 悬停 / 选中 / 键盘焦点 / 拖动中（2026-10-27 业务方：模块可拖动改顺序） */
.nav-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--wb-space-2);
  align-items: center;
  min-height: var(--wb-control-height-nav);
  padding: 2px 3px;
  border: 1px solid transparent;
  border-radius: var(--wb-radius-button);
  background: transparent;
  color: var(--wb-sidebar-item-ink);
  font-family: inherit;
  min-width: 0;
  padding: 2px var(--wb-space-2);
  font-size: var(--wb-fs-15);
  font-weight: var(--wb-fw-700);
  text-align: left;
  cursor: grab;
  user-select: none;
  touch-action: none;
  transition: background-color var(--wb-transition-fast), border-color var(--wb-transition-fast), box-shadow var(--wb-transition-fast);
}
.nav-item:hover, .nav-item[data-sg-state="hover"] { color: var(--wb-sidebar-item-ink-hover); background: transparent; }
.nav-item.is-active {
  border-color: var(--wb-sidebar-item-active-border);
  background: var(--wb-sidebar-item-active-bg);
  box-shadow: var(--wb-sidebar-item-active-inset);
  color: var(--wb-sidebar-item-ink-active);
  font-weight: var(--wb-fw-800);
}
.nav-item.is-active:hover { color: var(--wb-sidebar-item-ink-active); }
.nav-item:disabled { opacity: var(--wb-disabled-opacity); cursor: not-allowed; }
.nav-item-danger { color: var(--wb-sidebar-item-ink); }
.nav-item-danger:hover { color: var(--wb-sidebar-item-ink-hover); }

/* 拖动中：跟手的项半透明，其余项不跑过渡，避免换位时抖动 */
.nav.is-reordering .nav-item { transition: none; }
.nav-item.is-dragging {
  border-color: var(--wb-sidebar-item-active-border);
  background: var(--wb-sidebar-item-active-bg);
  box-shadow: var(--wb-sidebar-item-active-inset);
  opacity: .65;
  cursor: grabbing;
}

.sidebar-account {
  display: grid;
  gap: var(--wb-space-1);
  margin: 0;
  padding: var(--wb-space-2) var(--wb-space-2) 0;
  color: var(--wb-sidebar-note-ink);
  font-size: var(--wb-fs-11);
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.sidebar-account-logout { width: 100%; }
.sidebar-account-label { padding: 0 var(--wb-space-2); }

/* ============================================================
 * 2. 主内容区（基准 §3.2）
 * ============================================================ */

.main {
  margin-left: var(--wb-sidebar-width);
  padding: var(--wb-main-padding);
  min-width: 0;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wb-space-5);
  align-items: center;
  justify-content: space-between;
  max-width: var(--wb-panel-max-width);
  margin: 0 auto var(--wb-space-4);
  min-height: 34px;
}
.topbar h1 { margin: 0; font-size: var(--wb-fs-24); font-weight: var(--wb-fw-850); color: var(--wb-page-ink); }
/* 定制服务是独立页：顶栏给一个明确的返回首页入口（只在该页显示）。
   用 id 提高优先级，避免被后面的 .btn { display: inline-flex } 覆盖。 */
.topbar-title { display: flex; align-items: center; gap: var(--wb-space-4); min-width: 0; }
#customizationBack { display: none; }
body[data-view="customization"] #customizationBack { display: inline-flex; }
/* 2026-10-13：模块页顶栏标题隐藏后，账号区靠 margin 留在右侧（只剩一个子项时 space-between 会把它推到左边）。 */
.account-area { margin-left: auto; color: var(--wb-text-secondary); font-size: var(--wb-fs-13); }
.account-area strong { color: var(--wb-text-primary); }

.banner-area { max-width: var(--wb-panel-max-width); margin: 0 auto var(--wb-space-4); }

/* 2026-10-13：模块页与垃圾篓页的顶栏整条撤除——卡片里有自己的标题，顶栏只剩账号区
   也算占一条空带（业务方两次要求"顶部不留空白"）。账号与「退出登录」入口保留在
   首页 / 设置 / 帮助的顶栏上；内容从主区内边距处直接铺满。 */
body[data-view="product-knowledge"] .topbar,
body[data-view="price-list"] .topbar,
body[data-view="quote-contract"] .topbar,
body[data-view="quote-basic-info"] .topbar,
body[data-view="order-archive"] .topbar,
body[data-view="customers"] .topbar,
body[data-view="trash"] .topbar {
  display: none;
}

/* 模块视图不挂页脚（对齐 5177：卡片占满工作区高度，不被页脚顶起与分心） */
body[data-view="product-knowledge"] .site-footer,
body[data-view="price-list"] .site-footer,
body[data-view="quote-contract"] .site-footer,
body[data-view="quote-basic-info"] .site-footer,
body[data-view="order-archive"] .site-footer,
body[data-view="customers"] .site-footer,
body[data-view="trash"] .site-footer {
  display: none;
}

/* 模块长开发说明隐藏（对齐 5177：卡片内直接开始业务操作区，不留冗余段落） */
#pkWorkbenchNote,
#orderArchiveBoundaryNote {
  display: none;
}

#orderArchiveSection .section-heading,
#customersSection .section-heading {
  padding-bottom: var(--wb-space-3);
  margin-bottom: var(--wb-space-3);
}

body[data-view="order-archive"] .card,
body[data-view="customers"] .card {
  margin-bottom: var(--wb-space-4);
}

.view { display: grid; gap: var(--wb-space-6); }

/* 网格项默认 min-width:auto 会被内部宽表（财务表）顶大，导致整张卡片撑出屏幕；
   这里允许卡片收缩，让内部的横向滚动区自己滚（2026-10-27）。 */
.view > .card { min-width: 0; }

/* 页面面板：基准 §3.2 `.section`（待办样式:2026-2035） */
.card {
  width: 100%;
  max-width: var(--wb-panel-max-width);
  margin: 0 auto var(--wb-space-10);
  padding: var(--wb-panel-padding);
  border: 1px solid var(--wb-panel-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-section-bg);
  box-shadow: var(--wb-shadow-panel);
}

/* 标题行：基准 §3.2 `.section-heading`（订单档案样式:216-228） */
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-6);
  padding-bottom: var(--wb-space-5);
  margin-bottom: var(--wb-space-5);
  border-bottom: 1px solid var(--wb-heading-divider);
  min-height: 54px;
  box-sizing: border-box;
}

.section-heading-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  margin: 0;
  flex: 0 0 auto;
}

.eyebrow {
  display: block;
  margin: 0 0 2px;
  color: var(--wb-invoice-eyebrow-ink);
  font-size: var(--wb-fs-12);
  font-weight: var(--wb-fw-850);
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.2;
}

.section-heading > :first-child { min-width: 0; }
.section-heading h2 { margin: 0; }

/* 点标题开本地文件夹的无框按钮（shared/folder-title.js；产品知识/价目表/订单档案/垃圾篓共用）。
 * 外观必须和原来的 `<h2>` 一致，只加 hover/focus 的链接式反馈——参照 quote-contract.css 的同型按钮。 */
.section-heading > .section-heading-folder-button { min-width: 0; }
.section-heading-folder-button {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.section-heading-folder-button h2 { margin: 0; }
/* 能打开本地文件夹的标题：常态就带一条淡下划线（2026-10-26），悬停加深变蓝。
   以前只在悬停时出现，客户看不出标题可以点。 */
.section-heading-folder-button h2 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}
.section-heading-folder-button:hover h2,
.section-heading-folder-button:focus-visible h2 {
  color: var(--wb-link);
  text-decoration-color: currentColor;
}

/* 「点一下打开/定位本地文件夹」的统一提示：文字常态带淡下划线，悬停加深。
   只加在真正打开文件夹的入口上（打开具体文件的按钮不加，避免两种语义混在一起）。 */
.wb-folder-link,
.wb-folder-link strong,
.wb-folder-link h2 {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, currentColor 35%, transparent);
}
.wb-folder-link:hover,
.wb-folder-link:hover strong,
.wb-folder-link:hover h2,
.wb-folder-link:focus-visible,
.wb-folder-link:focus-visible strong,
.wb-folder-link:focus-visible h2 {
  text-decoration-color: currentColor;
}
.wb-folder-link:disabled,
.wb-folder-link:disabled strong {
  text-decoration: none;
  cursor: default;
}
.heading-actions { /* 基准 §3.2 `.heading-actions` 外壳样式:712-718 */
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--wb-space-4);
  justify-content: flex-end;
}

/* 工具条：基准 §3.2（旧项目无全局 .toolbar，取 外壳样式:805-816 范式） */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-5);
  margin-bottom: var(--wb-space-5);
}
.toolbar-inline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--wb-space-4);
  padding-top: var(--wb-space-3);
  border-top: 1px dashed var(--wb-border);
}

/* ============================================================
 * 3. 按钮（基准 §2.1；禁用按 §6 C3 收敛、焦点按 §6 C4）
 * ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--wb-space-1);
  min-height: var(--wb-control-height);
  padding: var(--wb-space-4) var(--wb-space-5);
  border: 1px solid var(--wb-btn-border);
  border-radius: var(--wb-radius-button);
  background: var(--wb-btn-bg);
  color: var(--wb-btn-ink);
  font-family: inherit;
  font-size: var(--wb-fs-13);
  font-weight: var(--wb-fw-700);
  cursor: pointer;
  box-shadow: var(--wb-shadow-control);
  transition: background-color var(--wb-transition-fast), background var(--wb-transition-fast),
    border-color var(--wb-transition-fast), box-shadow var(--wb-transition-fast), color var(--wb-transition-fast);
}
.btn:hover:not(:disabled),
.btn[data-sg-state="hover"] {
  border-color: var(--wb-btn-hover-border);
  background: var(--wb-btn-hover-bg);
  color: var(--wb-btn-hover-ink);
  box-shadow: var(--wb-btn-hover-shadow);
}
/* 激活/按下：基准 §2.1 注明"无全局规则"，由客户版补齐（保持同色系、按下更实） */
.btn:active:not(:disabled),
.btn[data-sg-state="active"] {
  border-color: var(--wb-accent-strong);
  background: var(--wb-accent-soft);
  color: var(--wb-accent-ink);
  box-shadow: var(--wb-focus-ring);
}
.btn:disabled { opacity: var(--wb-disabled-opacity); cursor: not-allowed; }

.btn-primary {
  border-color: var(--wb-btn-primary-border);
  background: var(--wb-btn-primary-bg);
  color: var(--wb-btn-primary-ink);
}
/* 悬停：基准 §6 C2 指出旧项目主按钮悬停会掉渐变（落到通用 hover），
   客户版补一条"深一档同色系"的渐变（新增规则，已记入偏差清单）。 */
.btn-primary:hover:not(:disabled),
.btn-primary[data-sg-state="hover"] {
  border-color: var(--wb-accent-strong);
  background: var(--wb-btn-primary-hover-bg);
  color: var(--wb-btn-primary-ink);
  box-shadow: var(--wb-btn-hover-shadow);
}
.btn-primary:active:not(:disabled),
.btn-primary[data-sg-state="active"] {
  border-color: var(--wb-accent-strong);
  background: var(--wb-accent-strong);
  color: var(--wb-btn-primary-ink);
}

.btn-danger { /* 基准 §2.1 描边危险（推荐套） */
  min-height: var(--wb-control-height-sm);
  padding: 7px var(--wb-space-6);
  border-color: var(--wb-btn-danger-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface);
  color: var(--wb-btn-danger-ink);
  box-shadow: none;
}
.btn-danger:hover:not(:disabled),
.btn-danger[data-sg-state="hover"] {
  border-color: var(--wb-btn-danger-border);
  background: var(--wb-btn-danger-hover-bg);
  color: var(--wb-btn-danger-ink);
  box-shadow: none;
}

.btn-text { /* 基准 §2.1 文字按钮（右键菜单项范式） */
  min-height: var(--wb-control-height-nav);
  padding: var(--wb-space-3) var(--wb-space-4);
  border-color: transparent;
  border-radius: var(--wb-radius-button);
  background: transparent;
  color: var(--wb-btn-text-ink);
  box-shadow: none;
}
.btn-text:hover:not(:disabled),
.btn-text[data-sg-state="hover"] {
  border-color: transparent;
  background: var(--wb-btn-text-hover-bg);
  color: var(--wb-btn-text-ink);
  box-shadow: none;
}

.btn-sm { min-height: var(--wb-control-height-sm); padding: var(--wb-space-1) var(--wb-space-4); font-size: var(--wb-fs-12); }

.actions { display: flex; flex-wrap: wrap; gap: var(--wb-space-3); align-items: center; margin: var(--wb-space-4) 0 var(--wb-space-1); }

/* ============================================================
 * 4. 输入类（基准 §2.2）
 * ============================================================ */

.field { display: block; margin: var(--wb-space-3) 0; }
.field > span {
  display: block;
  margin-bottom: var(--wb-space-2);
  color: var(--wb-text-primary);
  font-size: var(--wb-fs-13);
  font-weight: var(--wb-fw-700);
}

.input, .field input[type="text"], .field input[type="email"], .field input[type="password"],
.field input[type="number"], .field input[type="date"], .field input[type="search"], .field select {
  width: 100%;
  min-height: var(--wb-input-height);
  padding: var(--wb-space-5);
  border: 1px solid var(--wb-input-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-input-bg);
  color: var(--wb-input-ink);
  font-family: inherit;
  font-size: var(--wb-fs-13);
  font-weight: 500;
  box-shadow: var(--wb-input-shadow);
  transition: border-color var(--wb-transition-fast), box-shadow var(--wb-transition-fast);
}
.input:focus, .field input:focus, .field select:focus,
.input[data-sg-state="focus"], [data-sg-state="focus"].field input {
  border-color: var(--wb-input-focus-border);
  outline: 0;
  box-shadow: var(--wb-input-focus-shadow);
}
.input:read-only, .field input:read-only { background: var(--wb-input-readonly-bg); }
.input:disabled, .field input:disabled, .field select:disabled {
  background: var(--wb-input-disabled-bg);
  color: var(--wb-input-disabled-ink);
  cursor: not-allowed;
}

.field textarea, textarea.input {
  width: 100%;
  min-height: var(--wb-textarea-min-68);
  padding: var(--wb-space-5);
  border: 1px solid var(--wb-input-border);
  border-radius: var(--wb-radius-button);
  background: var(--wb-input-bg);
  color: var(--wb-input-ink);
  font-family: inherit;
  font-size: var(--wb-fs-13);
  font-weight: 500;
  line-height: 1.6;
  resize: vertical;
  box-shadow: var(--wb-input-shadow);
  transition: border-color var(--wb-transition-fast), box-shadow var(--wb-transition-fast);
}
.field textarea:focus, textarea.input:focus,
textarea.input[data-sg-state="focus"] {
  border-color: var(--wb-input-focus-border);
  outline: 0;
  box-shadow: var(--wb-input-focus-shadow);
}
.field textarea:disabled { background: var(--wb-input-disabled-bg); color: var(--wb-input-disabled-ink); cursor: not-allowed; }
/* 文本域三档高度（基准 §6 C8：旧项目基线 220px 对"单行备注"过高） */
textarea.rows-note { min-height: var(--wb-textarea-min-68); }
textarea.rows-terms { min-height: var(--wb-textarea-min-120); }
textarea.rows-long { min-height: var(--wb-textarea-min-220); }

/* 勾选/单选：基准 §6 C7 要求显式定尺寸（旧项目被全局 input{width:100%} 命中） */
input[type="checkbox"], input[type="radio"] {
  width: 16px;
  height: 16px;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--wb-accent);
  cursor: pointer;
}
input[type="checkbox"] { border-radius: var(--wb-radius-check); }

/* 数字输入去 spinner（基准 §2.2 · 待办样式:384-392） */
input[type="number"] { -webkit-appearance: none; -moz-appearance: textfield; appearance: textfield; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.form-block { display: grid; gap: var(--wb-space-3); }
.form-block .actions { margin: var(--wb-space-1) 0 0; }
.form-grid { display: grid; gap: var(--wb-space-5); }
.verify-block {
  margin-top: var(--wb-space-5);
  padding: var(--wb-space-5);
  border: 1px dashed var(--wb-empty-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-panel-bg-soft);
}
.dev-token {
  margin-top: var(--wb-space-3);
  padding: var(--wb-space-3) var(--wb-space-4);
  border: 1px solid var(--wb-pill-warn-border);
  border-radius: var(--wb-radius-button);
  background: var(--wb-pill-warn-bg);
  color: var(--wb-pill-warn-ink);
  font-size: var(--wb-fs-12);
  overflow-wrap: anywhere;
}

/* ============================================================
 * 5. 页签（基准 §2.4 下划线式，基准 §6 C12 建议选这一套）
 * ============================================================ */

.tabs {
  display: flex;
  width: max-content;
  max-width: 100%;
  gap: var(--wb-space-6);
  margin: var(--wb-space-4) 0 var(--wb-space-5);
  border-bottom: 1px solid var(--wb-border);
}
.tab {
  min-height: 34px;
  padding: var(--wb-space-2) 3px var(--wb-space-1);
  border: 0;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--wb-tab-ink);
  font-family: inherit;
  font-size: var(--wb-fs-14);
  font-weight: var(--wb-fw-900);
  cursor: pointer;
}
.tab:hover, .tab[data-sg-state="hover"] { color: var(--wb-tab-active-ink); }
.tab.is-active {
  border-bottom-color: var(--wb-tab-active-border);
  color: var(--wb-tab-active-ink);
}
.tab:disabled { color: var(--wb-text-disabled); opacity: var(--wb-disabled-opacity); cursor: not-allowed; }

/* ============================================================
 * 6. 胶囊 / 标签 / chip（基准 §2.5）
 * ============================================================ */

.badge { /* 状态胶囊：主色（默认） */
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-1);
  padding: 7px var(--wb-space-5);
  border: 1px solid var(--wb-pill-border);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-pill-bg);
  color: var(--wb-pill-ink);
  font-size: var(--wb-fs-13);
  font-weight: var(--wb-fw-850);
  white-space: nowrap;
}

/* 客户版状态 → 色调映射（纯 CSS，不改 JS 逻辑）。
   目的：本地工作区四种状态一眼可分（基准 §5「本地工作区状态区」）。 */
.badge[data-state="ready"] { border-color: var(--wb-pill-ok-bg); background: var(--wb-pill-ok-bg); color: var(--wb-pill-ok-ink); }
.badge[data-state="read-only"] { border-color: var(--wb-pill-warn-border); background: var(--wb-pill-warn-bg); color: var(--wb-pill-warn-ink); }
.badge[data-state="needs-authorization"] { border-color: var(--wb-pill-info-border); background: var(--wb-pill-info-bg); color: var(--wb-pill-info-ink); }
.badge[data-state="denied"],
.badge[data-state="missing"],
.badge[data-state="incompatible"],
.badge[data-state="corrupt"],
.badge[data-state="error"],
.badge[data-state="unsupported"] { border-color: var(--wb-pill-danger-border); background: var(--wb-pill-danger-bg); color: var(--wb-pill-danger-ink); }
.badge[data-state="no-workspace"],
.badge[data-state="folder-without-workspace"],
.badge[data-state=""] { border-color: var(--wb-pill-neutral-border); background: var(--wb-pill-neutral-bg); color: var(--wb-pill-neutral-ink); }

.pill { /* 通用胶囊（会员状态等） */
  display: inline-flex;
  align-items: center;
  padding: 7px var(--wb-space-5);
  border: 1px solid var(--wb-pill-border);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-pill-bg);
  color: var(--wb-pill-ink);
  font-size: var(--wb-fs-13);
  font-weight: var(--wb-fw-850);
  white-space: nowrap;
}
.pill-ok { border-color: var(--wb-pill-ok-bg); background: var(--wb-pill-ok-bg); color: var(--wb-pill-ok-ink); }
.pill-warn { border-color: var(--wb-pill-warn-border); background: var(--wb-pill-warn-bg); color: var(--wb-pill-warn-ink); }
.pill-info { border-color: var(--wb-pill-info-border); background: var(--wb-pill-info-bg); color: var(--wb-pill-info-ink); }
.pill-danger { border-color: var(--wb-pill-danger-border); background: var(--wb-pill-danger-bg); color: var(--wb-pill-danger-ink); }
.pill-neutral { border-color: var(--wb-pill-neutral-border); background: var(--wb-pill-neutral-bg); color: var(--wb-pill-neutral-ink); }

.chip { /* 中性 chip（模块可用性三枚并排，基准 §5） */
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 7px;
  border: 1px solid var(--wb-chip-border);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-chip-bg);
  color: var(--wb-chip-ink);
  font-size: var(--wb-fs-12);
}
.chip-ok { border-color: var(--wb-pill-ok-bg); background: var(--wb-pill-ok-bg); color: var(--wb-pill-ok-ink); }
.chip-muted { border-color: var(--wb-pill-neutral-border); background: var(--wb-pill-neutral-bg); color: var(--wb-pill-neutral-ink); }
.chip-row { display: flex; flex-wrap: wrap; gap: var(--wb-space-4); }

.tag-example { /* 示例 / 参考标记（基准 §2.5 绿标签，基准 §5 推荐给示例库） */
  display: inline-flex;
  align-items: center;
  padding: 2px var(--wb-space-3);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-pill-ok-bg);
  color: var(--wb-pill-ok-ink);
  font-size: var(--wb-fs-11);
  font-weight: 500;
}
.tag-warn { /* 小标签（基准 §2.5） */
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 7px;
  border-radius: var(--wb-radius-control);
  background: var(--wb-tag-warn-bg);
  color: var(--wb-tag-warn-ink);
  font-size: var(--wb-fs-12);
  font-weight: var(--wb-fw-700);
}
.chip-removable { /* 可删 chip（基准 §2.5） */
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 160px;
  padding: 3px 22px 3px 9px;
  border: 1px solid var(--wb-chip-removable-border);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-chip-removable-bg);
  color: var(--wb-chip-removable-ink);
  font-size: var(--wb-fs-12);
  font-weight: var(--wb-fw-850);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
 * 7. 提示条（基准 §2.6）：行内提示盒 / 横幅 / toast
 * ============================================================ */

.message { /* 行内提示盒 */
  margin: var(--wb-space-3) 0;
  padding: var(--wb-space-5);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-button);
  background: var(--wb-fill-soft);
  line-height: 1.6;
}
.message[data-tone="ok"] { border-color: var(--wb-success-bg); background: var(--wb-success-bg); color: var(--wb-success); }
.message[data-tone="error"] { border-color: var(--wb-toast-error-border); background: var(--wb-toast-error-bg); color: var(--wb-toast-error-ink); }

.notice-line { /* 行内说明条（模块开通状态等） */
  margin-top: var(--wb-space-4);
  padding: var(--wb-space-4) var(--wb-space-5);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-button);
  background: var(--wb-fill-soft);
  font-size: var(--wb-fs-13);
}
.notice-line:empty,
.notice-line[hidden] {
  display: none;
}
.notice-line[data-tone="ok"] { border-color: var(--wb-success-bg); background: var(--wb-success-bg); color: var(--wb-success); }
.notice-line[data-tone="warn"] { border-color: var(--wb-pill-warn-border); background: var(--wb-pill-warn-bg); color: var(--wb-pill-warn-ink); }
.notice-line[data-tone="info"] { border-color: var(--wb-banner-info-border); background: var(--wb-banner-info-bg); color: var(--wb-banner-info-ink); }

.banner { /* 横幅 */
  margin: 0 0 var(--wb-space-3);
  padding: var(--wb-space-4) var(--wb-space-5);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-button);
  font-size: var(--wb-fs-13);
  font-weight: var(--wb-fw-700);
  line-height: 1.6;
}
.banner-info { border-color: var(--wb-banner-info-border); background: var(--wb-banner-info-bg); color: var(--wb-banner-info-ink); }
.banner-warn { border-color: var(--wb-banner-warn-border); background: var(--wb-banner-warn-bg); color: var(--wb-banner-warn-ink); }
.banner-error { border-color: var(--wb-banner-danger-border); background: var(--wb-banner-danger-bg); color: var(--wb-banner-danger-ink); }
/* 横幅里的行内链接（2026-10-27：小助手有新版本 → 去更新） */
.banner-link { margin-left: var(--wb-space-2); color: inherit; font-weight: var(--wb-fw-800); text-decoration: underline; white-space: nowrap; }
/* 小助手更新弹窗：复用 .helper-guide 的壳，只补两处排版 */
dialog.helper-update .actions { gap: var(--wb-space-3); }
dialog.helper-update .actions .btn-primary { text-decoration: none; }
/* 到期只读横幅：黄横幅 + 左侧色条（基准 §5） */
.banner-read-only {
  border-color: var(--wb-banner-warn-border);
  border-left: 4px solid var(--wb-banner-bar-readonly);
  background: var(--wb-banner-warn-bg);
  color: var(--wb-banner-warn-ink);
}

.wb-toast { /* 右上提示（基准 §2.6） */
  position: fixed;
  top: var(--wb-space-8);
  right: var(--wb-space-8);
  z-index: var(--wb-z-toast);
  max-width: min(430px, calc(100vw - 36px));
  padding: var(--wb-space-5) var(--wb-space-6);
  border: 1px solid var(--wb-toast-info-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-toast-info-bg);
  color: var(--wb-toast-info-ink);
  font-size: var(--wb-fs-13);
  font-weight: var(--wb-fw-700);
  line-height: 1.45;
  box-shadow: var(--wb-shadow-toast);
}
.wb-toast[data-tone="success"] { border-color: var(--wb-toast-success-border); background: var(--wb-toast-success-bg); color: var(--wb-toast-success-ink); }
.wb-toast[data-tone="error"] { border-color: var(--wb-toast-error-border); background: var(--wb-toast-error-bg); color: var(--wb-toast-error-ink); }

/* ============================================================
 * 8. 空态（基准 §2.7，基准 §6 C13：只写一条）
 * ============================================================ */

.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: var(--wb-space-8);
  border: 1px dashed var(--wb-empty-border);
  border-radius: var(--wb-radius-button);
  background: var(--wb-empty-bg);
  color: var(--wb-empty-ink);
  text-align: center;
}
.empty-state-plain { /* 纯文字空态变体（基准 §2.7 其他变体） */
  min-height: 0;
  padding: var(--wb-space-5) 0;
  border: 0;
  background: transparent;
  text-align: left;
}
.empty { color: var(--wb-text-secondary); }

/* 拖放区：空态变体的虚线框（基准 §5「示例库标记」同源做法） */
.drop-zone {
  margin-top: var(--wb-space-5);
  padding: var(--wb-space-6);
  border: 1px dashed var(--wb-empty-border);
  border-radius: var(--wb-radius-button);
  background: var(--wb-panel-bg-soft);
  text-align: center;
}
.drop-zone.is-over { border-color: var(--wb-accent); background: var(--wb-accent-soft); }
.drop-zone p { margin: 0 0 var(--wb-space-2); }
.drop-hint { min-height: 20px; margin: 0; color: var(--wb-text-secondary); font-size: var(--wb-fs-12); }

/* ============================================================
 * 9. 表格（基准 §2.3，按建议取"报价排列表"那套：四边边框 + 密集行高，无斑马纹）
 * ============================================================ */

.wb-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--wb-table-container-border);
  background: var(--wb-surface);
}
.wb-table {
  width: 100%;
  margin: 0;
  border-collapse: collapse;
  font-size: var(--wb-fs-12);
}
.wb-table th, .wb-table td {
  padding: var(--wb-space-3) var(--wb-space-3);
  height: var(--wb-table-row-height);
  border: 1px solid var(--wb-table-border);
  text-align: left;
  vertical-align: middle;
}
.wb-table thead th {
  position: sticky;
  top: 0;
  z-index: 4;
  background: var(--wb-table-head-bg);
  color: var(--wb-table-head-ink);
  font-size: var(--wb-fs-13);
  font-weight: var(--wb-fw-900);
}
.wb-table tbody tr:hover > td,
.wb-table tbody tr[data-sg-state="hover"] > td { background: var(--wb-table-row-hover-bg); }
.wb-table tbody tr.is-selected > td { background: var(--wb-table-row-selected-bg); }
.wb-table tfoot td, .wb-table tr.is-total > td {
  background: var(--wb-surface);
  color: var(--wb-table-total-ink);
  font-weight: var(--wb-fw-900);
}
.wb-table td.is-num, .wb-table th.is-num { text-align: right; font-variant-numeric: tabular-nums; }

/* 可编辑单元格（基准 §2.3，取财务/报价那套：常驻透明、聚焦出框） */
.wb-cell-input {
  width: 100%;
  min-height: 26px;
  padding: 3px var(--wb-space-1);
  border: 1px solid transparent;
  border-radius: var(--wb-radius-check);
  background: transparent;
  color: var(--wb-text-primary);
  font: inherit;
}
.wb-cell-input:focus,
.wb-cell-input[data-sg-state="focus"] {
  border-color: var(--wb-table-cell-focus-border);
  outline: none;
  background: var(--wb-surface);
  box-shadow: 0 0 0 2px var(--wb-table-cell-focus-ring);
}

/* 分页（基准 §2.9） */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--wb-space-4);
  padding: 2px 0 var(--wb-space-2);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
  font-weight: var(--wb-fw-850);
}
.pagination button {
  min-height: var(--wb-control-height-sm);
  padding: var(--wb-space-1) var(--wb-space-4);
  border: 1px solid var(--wb-pagination-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface);
  color: var(--wb-text-primary);
  font: inherit;
  cursor: pointer;
}
.pagination button:hover:not(:disabled),
.pagination button[data-sg-state="hover"] { border-color: var(--wb-accent); background: var(--wb-accent-soft); color: var(--wb-accent-ink); }
.pagination button:disabled { color: var(--wb-pagination-disabled-ink); opacity: var(--wb-disabled-opacity); cursor: not-allowed; }

/* ============================================================
 * 10. 弹窗 / 浮层（基准 §2.8；遮罩统一取一种，基准 §5）
 * ============================================================ */

.wb-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--wb-z-modal);
  display: grid;
  place-items: center;
  padding: var(--wb-space-10);
  background: var(--wb-overlay-bg);
}
.wb-modal {
  display: grid;
  gap: var(--wb-space-6);
  width: min(440px, 100%);
  padding: var(--wb-space-8);
  border: 1px solid var(--wb-modal-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-surface);
  box-shadow: var(--wb-shadow-modal);
}
.wb-modal h2, .wb-modal h3 { color: var(--wb-modal-ink); font-size: var(--wb-fs-19); }
.wb-modal-actions { display: flex; justify-content: flex-end; gap: var(--wb-space-4); }

/* ---------------- 基础弹窗拖拽抓手与光标（模块特定类名在各模块 CSS 里） ---------------- */
[data-dialog-drag-handle],
.mindo-image-preview-top,
.mindo-video-preview-top,
.feature-intro-head,
.wb-modal > h2:first-child,
.wb-modal > h3:first-child,
.wb-modal > h4:first-child {
  cursor: grab;
  user-select: none;
}

.feature-intro-head button,
.wb-modal button {
  cursor: pointer;
  user-select: auto;
}

/* 正在拖拽中的全局光标锁定 */
html body.is-dialog-dragging,
html body.is-dialog-dragging * {
  cursor: grabbing;
  user-select: none;
}

.wb-modal.is-dragging,
[role="dialog"].is-dragging,
dialog.is-dragging {
  opacity: 0.98;
}

/* ---------------- 全站弹窗四个角自由缩放改大小（Corner Resizers） ---------------- */
.wb-dialog-corner-handle {
  position: absolute;
  width: 18px;
  height: 18px;
  z-index: 99;
  background: transparent;
  border: none;
  padding: 0;
  opacity: 0;
  transition: opacity .15s ease;
  pointer-events: auto;
}

dialog:hover > .wb-dialog-corner-handle,
[role="dialog"]:hover > .wb-dialog-corner-handle,
.wb-modal:hover > .wb-dialog-corner-handle,
.customers-modal-dialog:hover > .wb-dialog-corner-handle,
.oa-dialog:hover > .wb-dialog-corner-handle,
.quote-move-dialog:hover > .wb-dialog-corner-handle,
.mindo-image-preview-dialog:hover > .wb-dialog-corner-handle,
.mindo-video-preview-dialog:hover > .wb-dialog-corner-handle,
.wb-dialog-corner-handle.is-resizing {
  opacity: 1;
}

.wb-dialog-corner-handle.corner-se {
  right: 0;
  bottom: 0;
  cursor: nwse-resize;
  border-right: 3px solid var(--wb-accent);
  border-bottom: 3px solid var(--wb-accent);
  border-bottom-right-radius: var(--wb-radius-panel);
}

.wb-dialog-corner-handle.corner-sw {
  left: 0;
  bottom: 0;
  cursor: nesw-resize;
  border-left: 3px solid var(--wb-accent);
  border-bottom: 3px solid var(--wb-accent);
  border-bottom-left-radius: var(--wb-radius-panel);
}

.wb-dialog-corner-handle.corner-ne {
  right: 0;
  top: 0;
  cursor: nesw-resize;
  border-right: 3px solid var(--wb-accent);
  border-top: 3px solid var(--wb-accent);
  border-top-right-radius: var(--wb-radius-panel);
}

.wb-dialog-corner-handle.corner-nw {
  left: 0;
  top: 0;
  cursor: nwse-resize;
  border-left: 3px solid var(--wb-accent);
  border-top: 3px solid var(--wb-accent);
  border-top-left-radius: var(--wb-radius-panel);
}

html body.is-dialog-resizing-nwse,
html body.is-dialog-resizing-nwse * {
  cursor: nwse-resize;
  user-select: none;
}

html body.is-dialog-resizing-nesw,
html body.is-dialog-resizing-nesw * {
  cursor: nesw-resize;
  user-select: none;
}

.wb-menu { /* 右键 / 下拉菜单 */
  position: fixed;
  z-index: var(--wb-z-menu);
  min-width: 224px;
  max-width: min(320px, calc(100vw - 16px));
  margin: 0;
  padding: var(--wb-space-2);
  border: 1px solid var(--wb-menu-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-menu-bg);
  box-shadow: var(--wb-shadow-menu);
  list-style: none;
}
.wb-menu li {
  padding: var(--wb-space-4) var(--wb-space-4);
  border-radius: 7px;
  font-size: var(--wb-fs-13);
  font-weight: var(--wb-fw-800);
  cursor: pointer;
}
.wb-menu li:hover { background: var(--wb-btn-text-hover-bg); }
.wb-menu li[aria-disabled="true"] { color: var(--wb-text-disabled); cursor: not-allowed; }

/* ============================================================
 * 11. 业务内容块（客户版既有结构）
 * ============================================================ */

.meta { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 2px var(--wb-space-5); margin: var(--wb-space-4) 0; }
.meta dt { color: var(--wb-text-secondary); font-size: var(--wb-fs-13); }
.meta dd { margin: 0; font-size: var(--wb-fs-13); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.status-row { display: flex; flex-wrap: wrap; gap: var(--wb-space-4); align-items: center; margin: var(--wb-space-4) 0 var(--wb-space-2); }

.structure-box { margin: var(--wb-space-5) 0 var(--wb-space-1); }
.structure-box > summary {
  cursor: pointer;
  font-size: var(--wb-fs-13);
  font-weight: var(--wb-fw-800);
  color: var(--wb-link);
}
/* 配对令牌补粘块（2026-11-04 bug 清单①）：不再收进折叠条，输入框一步可见可点；
 * 与结构列表同一套虚线分隔语言，颜色全走令牌。 */
.helper-pair-box {
  margin: var(--wb-space-4) 0 0;
  padding-top: var(--wb-space-3);
  border-top: 1px dashed var(--wb-border);
}
.structure-list, .kv-list { margin: var(--wb-space-3) 0 0; padding: 0; list-style: none; }
.structure-list li, .kv-list li {
  display: grid;
  grid-template-columns: 150px 90px minmax(0, 1fr);
  gap: var(--wb-space-3);
  padding: var(--wb-space-1) 0;
  border-bottom: 1px dashed var(--wb-border);
  font-size: var(--wb-fs-13);
}
.structure-list .k, .kv-list .k { color: var(--wb-text-secondary); }
.structure-list .why { color: var(--wb-text-secondary); font-size: var(--wb-fs-12); }
.structure-list li.ok .v { color: var(--wb-success); font-weight: var(--wb-fw-700); }
.kv-list li { grid-template-columns: 220px minmax(0, 1fr); }

/* 「更新包含在年费里」（2026-10-28 业务方要求）：帮助页顶部一句，比正文小字重一点 */
.help-update-promise {
  margin: 0 0 var(--wb-space-2);
  padding: var(--wb-space-3) var(--wb-space-4);
  border-left: 3px solid var(--wb-accent);
  border-radius: var(--wb-radius-button);
  background: var(--wb-accent-soft);
  color: var(--wb-accent-ink);
  font-size: var(--wb-fs-13);
  font-weight: var(--wb-fw-700);
}

.module-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--wb-space-5); margin-top: var(--wb-space-4); }
.module-grid > p { grid-column: 1 / -1; margin: 0; }
.module-card {
  padding: var(--wb-panel-padding);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-panel);
  background: linear-gradient(180deg, var(--wb-panel-bg), var(--wb-panel-bg-soft)); /* 基准 §3.2 内部卡片范式 B */
  box-shadow: var(--wb-shadow-soft);
}
.module-card h3 { margin-bottom: var(--wb-space-1); font-size: var(--wb-fs-18); font-weight: var(--wb-fw-850); }
.module-card p { margin: var(--wb-space-1) 0; font-size: var(--wb-fs-13); }
.module-state { margin-top: var(--wb-space-3); font-weight: var(--wb-fw-700); }
.module-state[data-tone="ok"] { color: var(--wb-success); }
.module-state[data-tone="warn"] { color: var(--wb-warning); }
.module-state[data-tone="info"] { color: var(--wb-text-secondary); }

.plain-list { margin: var(--wb-space-2) 0 var(--wb-space-4); padding-left: var(--wb-space-8); font-size: var(--wb-fs-13); }
.steps { margin: var(--wb-space-2) 0; padding-left: var(--wb-space-8); font-size: var(--wb-fs-13); }
.steps li { margin: 2px 0; }

/* 首次引导步骤（基准 §5）：内部卡片 + 序号，不发明连接线 */
.guide-steps { display: grid; gap: var(--wb-space-5); }
.guide-step {
  padding: var(--wb-panel-padding);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-panel);
  background: linear-gradient(180deg, var(--wb-panel-bg), var(--wb-panel-bg-soft));
  box-shadow: var(--wb-shadow-soft);
}
.guide-step .step-index {
  display: block;
  margin-bottom: var(--wb-space-1);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
  font-weight: var(--wb-fw-800);
  letter-spacing: var(--wb-tracking-wide);
  text-transform: uppercase;
}
.guide-step h3 { font-size: var(--wb-fs-18); font-weight: var(--wb-fw-850); }
.guide-step p { font-size: var(--wb-fs-13); color: var(--wb-text-secondary); }
.guide-step .actions { margin-top: var(--wb-space-3); }

.write-result .ok-line, .write-result p { margin: var(--wb-space-3) 0 0; }
.next-step { color: var(--wb-warning); font-weight: var(--wb-fw-700); }
.protocol-notice { margin-top: var(--wb-space-4); }

.site-footer {
  max-width: var(--wb-panel-max-width);
  margin: 0 auto var(--wb-space-10);
  padding: var(--wb-space-2) var(--wb-space-2) 0;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
}

.site-footer-icp { margin-top: var(--wb-space-2); text-align: center; }
.site-footer-icp a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* 未登录首页：备案号在登录页最底部正中（左右分栏后仍横跨全宽，靠 grid 行压到底）。 */
.login-footer.site-footer {
  position: static;
  width: 100%;
  margin: 0 auto var(--wb-space-5);
  padding: 0 var(--wb-space-6);
  max-width: none;
  text-align: center;
}

/* ---------- 目录（V2）面板 ---------- */
.catalog-upgrade {
  margin: var(--wb-space-4) 0;
  padding: var(--wb-space-5);
  border: 1px solid var(--wb-pill-warn-border);
  border-radius: var(--wb-radius-button);
  background: var(--wb-pill-warn-bg);
}
.catalog-tree { display: grid; gap: var(--wb-space-2); }
.catalog-row { padding: var(--wb-space-2) 0; border-bottom: 1px dashed var(--wb-border); }
.catalog-row > .toolbar-inline { align-items: center; gap: var(--wb-space-3); }
.catalog-row select { max-width: 260px; }
.catalog-styles { display: grid; gap: var(--wb-space-2); margin: var(--wb-space-3) 0 0; padding-left: var(--wb-space-9); list-style: none; }
.catalog-styles li { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wb-space-3); }
.catalog-problems { display: grid; gap: var(--wb-space-3); margin: var(--wb-space-3) 0 0; padding: 0; list-style: none; }
.catalog-problem {
  display: grid;
  gap: var(--wb-space-2);
  padding: var(--wb-space-5);
  border: 1px solid var(--wb-pill-warn-border);
  border-left: 4px solid var(--wb-pill-warn-ink);
  border-radius: var(--wb-radius-button);
  background: var(--wb-pill-warn-bg);
}
.catalog-problem-head { display: flex; flex-wrap: wrap; gap: var(--wb-space-3); align-items: baseline; }
.catalog-problem p { margin: 0; }
.catalog-problem select { max-width: 320px; }
.inline-form { display: grid; gap: var(--wb-space-2); margin-top: var(--wb-space-2); }
.inline-form .toolbar-inline { padding-top: var(--wb-space-2); border-top: 1px dashed var(--wb-border); }

/* ============================================================
 * 13. 产品知识工作台（对齐 5177 的卡片形态）
 *     左侧产品结构树 + 右侧款式卡片（卡头入口 + 卡体内联素材框）
 *     只用既有令牌；颜色/字号/间距全部取自 tokens.css
 * ============================================================ */

.pk-workbench {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: var(--wb-space-6);
  margin-top: var(--wb-space-5);
  align-items: start;
}
/* 左树右侧的拖拽调宽把手（5177 的左树可以拖宽；把手贴在树面板右边缘） */
.pk-tree-resizer {
  position: absolute;
  top: var(--wb-space-2);
  bottom: var(--wb-space-2);
  right: calc(-1 * var(--wb-space-3));
  width: var(--wb-space-3);
  cursor: col-resize;
  border-radius: var(--wb-radius-pill);
  background: transparent;
  touch-action: none;
}
.pk-tree-resizer:hover,
.pk-tree-resizer:focus-visible { background: var(--wb-accent-soft); outline: none; }
.pk-tree {
  position: relative;
  display: grid;
  gap: var(--wb-space-3);
  padding: var(--wb-space-4);
  background: var(--wb-panel-bg-soft);
  border: 1px solid var(--wb-panel-border);
  border-radius: var(--wb-radius-panel);
  align-content: start;
}
.pk-search { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--wb-space-2); }
.pk-tree-scroll {
  max-height: 62vh;
  overflow: auto;
  padding-right: var(--wb-space-1);
  scrollbar-width: thin;
  scrollbar-color: var(--wb-scroll-thumb) var(--wb-scroll-track);
}
.pk-tree-scroll::-webkit-scrollbar { width: var(--wb-scroll-size); }
.pk-tree-scroll::-webkit-scrollbar-track { background: var(--wb-scroll-track); }
.pk-tree-scroll::-webkit-scrollbar-thumb { background: var(--wb-scroll-thumb); }
.pk-tree-branch { display: block; }
.pk-tree-row {
  display: flex;
  align-items: center;
  gap: var(--wb-space-1);
  position: relative;
  border-radius: var(--wb-radius-control);
  border-top: 2px solid transparent;
  border-bottom: 2px solid transparent;
}
.pk-tree-row:hover { background: var(--wb-btn-hover-bg); }
.pk-tree-row.is-active { background: var(--wb-sidebar-item-active-bg); border-color: var(--wb-sidebar-item-active-border); }
.pk-tree-row.is-example .pk-tree-label { color: var(--wb-text-secondary); }
.pk-tree-row.is-drop-before { border-top-color: var(--wb-accent); }
.pk-tree-row.is-drop-after { border-bottom-color: var(--wb-accent); }
.pk-tree-row.is-drop-inside { background: var(--wb-accent-soft); box-shadow: inset 0 0 0 1px var(--wb-accent); }
.pk-tree-toggle { min-width: var(--wb-control-height-sm); padding: 0 var(--wb-space-1); color: var(--wb-text-secondary); }
.pk-tree-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  padding: var(--wb-space-1) var(--wb-space-2);
  background: none;
  border: 0;
  border-radius: var(--wb-radius-control);
  color: var(--wb-text-primary);
  font: inherit;
  cursor: pointer;
}
.pk-tree-label:hover { color: var(--wb-link); }
.pk-tree-row.is-active .pk-tree-label { font-weight: var(--wb-fw-700); color: var(--wb-sidebar-item-ink-active); }
.pk-tree-actions { display: none; align-items: center; gap: var(--wb-space-1); }
.pk-tree-row:hover .pk-tree-actions,
.pk-tree-row:focus-within .pk-tree-actions { display: flex; }
.pk-tree-grip { color: var(--wb-text-disabled); cursor: grab; user-select: none; }
.pk-search-results { list-style: none; margin: 0; padding: var(--wb-space-2) 0 0; display: grid; gap: var(--wb-space-1); }
.pk-search-item {
  width: 100%;
  text-align: left;
  padding: var(--wb-space-2);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  color: var(--wb-text-primary);
  font: inherit;
  cursor: pointer;
}
.pk-search-item:hover { border-color: var(--wb-btn-hover-border); background: var(--wb-btn-hover-bg); }
.pk-search-item mark { background: var(--wb-tag-warn-bg); color: var(--wb-tag-warn-ink); border-radius: var(--wb-radius-check); padding: 0 2px; }
.pk-search-pager { display: flex; align-items: center; justify-content: space-between; gap: var(--wb-space-2); padding-top: var(--wb-space-2); }
.pk-tree-extras { display: grid; gap: var(--wb-space-2); padding-top: var(--wb-space-3); border-top: 1px dashed var(--wb-border); }
.pk-extra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-2);
  padding: var(--wb-space-2) var(--wb-space-3);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  color: var(--wb-text-primary);
  font: inherit;
  cursor: pointer;
}
.pk-extra:hover { background: var(--wb-btn-hover-bg); border-color: var(--wb-btn-hover-border); }
.pk-extra.is-active { border-color: var(--wb-sidebar-item-active-border); background: var(--wb-sidebar-item-active-bg); font-weight: var(--wb-fw-700); }

/* ---- 右侧：类目头 + 卡片列表 ---- */
.pk-detail { display: grid; gap: var(--wb-space-5); min-width: 0; }
.pk-detail-head { display: grid; gap: var(--wb-space-2); padding-bottom: var(--wb-space-3); border-bottom: 1px solid var(--wb-heading-divider); }
.pk-detail-head .subhead, .pk-detail-head h3 { margin: 0; }
.pk-card-list { display: grid; gap: var(--wb-space-4); }
.pk-card {
  display: grid;
  gap: var(--wb-space-3);
  padding: var(--wb-space-4);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-panel);
}
.pk-card.is-example { border-style: dashed; background: var(--wb-panel-bg-soft); }
.pk-card.is-compact { padding: var(--wb-space-3) var(--wb-space-4); }
/* 卡片拖拽排序：可拖的卡片显示抓手光标，拖动时给出落点提示 */
.pk-card[draggable="true"] { cursor: grab; }
.pk-card[draggable="true"]:active { cursor: grabbing; }
.pk-card.is-drop-before { border-top: 3px solid var(--wb-accent); }
.pk-card.is-drop-after { border-bottom: 3px solid var(--wb-accent); }
.pk-card-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: var(--wb-space-4);
  align-items: start;
}
.pk-card-cover {
  position: relative;
  width: 76px;
  /* 2026-10-27 业务方选方案 A：封面改成正方形 + 图片完整显示（对齐 5177 的 40×40 contain）。
     尺寸沿用我们卡片的 76px，只把比例改成 1:1。 */
  height: 76px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--wb-panel-bg);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  cursor: pointer;
  padding: 0;
}
.pk-card-cover img { width: 100%; height: 100%; object-fit: contain; }
.pk-card-cover-placeholder { color: var(--wb-text-secondary); font-size: var(--wb-fs-12); }
.pk-card-chevron { position: absolute; right: 2px; bottom: 0; color: var(--wb-text-secondary); font-size: var(--wb-fs-12); }
.pk-card-title-block { display: grid; gap: 2px; min-width: 0; }
.pk-card-name { max-width: 340px; font-weight: var(--wb-fw-700); }
.pk-card-note {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  color: var(--wb-text-secondary);
  font: inherit;
  font-size: var(--wb-fs-12);
  cursor: text;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pk-card-note:hover { color: var(--wb-link); }
.pk-card-entries { display: flex; flex-wrap: wrap; gap: var(--wb-space-2); align-items: center; }
.pk-entry {
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-2);
  padding: var(--wb-space-1) var(--wb-space-3);
  background: var(--wb-btn-bg);
  border: 1px solid var(--wb-btn-border);
  border-radius: var(--wb-radius-pill);
  color: var(--wb-btn-ink);
  font: inherit;
  font-size: var(--wb-fs-13);
  cursor: pointer;
}
.pk-entry:hover { background: var(--wb-btn-hover-bg); color: var(--wb-btn-hover-ink); border-color: var(--wb-btn-hover-border); }
.pk-entry.is-active { background: var(--wb-accent-soft); border-color: var(--wb-accent); color: var(--wb-accent-ink); font-weight: var(--wb-fw-700); }
.pk-entry-dot { width: 6px; height: 6px; border-radius: var(--wb-radius-pill); background: var(--wb-border-strong); }
.pk-entry-dot.is-on { background: var(--wb-success); }
.pk-card-commands { justify-content: flex-end; }
.pk-card-example-note { margin: 0; }

/* ---- 卡体：素材框 ---- */
.pk-material-box {
  display: grid;
  gap: var(--wb-space-3);
  padding-top: var(--wb-space-3);
  border-top: 1px dashed var(--wb-border);
}
.pk-material-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wb-space-3); }
.pk-selection { padding: var(--wb-space-1) var(--wb-space-2); background: var(--wb-accent-soft); border-radius: var(--wb-radius-control); }
.pk-group {
  display: grid;
  gap: var(--wb-space-3);
  padding: var(--wb-space-3) var(--wb-space-4);
  background: var(--wb-panel-bg-soft);
  border: 1px solid var(--wb-panel-border);
  border-radius: var(--wb-radius-control);
}
.pk-group-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wb-space-3); }
.pk-group-toggle {
  background: none;
  border: 0;
  padding: 0;
  color: var(--wb-text-primary);
  font: inherit;
  font-weight: var(--wb-fw-700);
  cursor: pointer;
}
.pk-group-toggle:hover { color: var(--wb-link); }
.pk-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: var(--wb-space-3);
}
.pk-tile {
  position: relative;
  display: grid;
  gap: var(--wb-space-1);
  margin: 0;
  padding: var(--wb-space-2);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
}
.pk-tile:hover { border-color: var(--wb-border-strong); }
.pk-tile.is-selected { border-color: var(--wb-accent); background: var(--wb-accent-soft); }
.pk-tile.is-main { box-shadow: inset 0 0 0 1px var(--wb-success); }
.pk-tile-pick { position: absolute; top: var(--wb-space-2); left: var(--wb-space-2); z-index: 1; accent-color: var(--wb-accent); }
.pk-tile-preview {
  display: grid;
  place-items: center;
  gap: 2px;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  overflow: hidden;
  background: var(--wb-fill-soft);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-check);
  color: var(--wb-text-secondary);
  cursor: pointer;
}
.pk-tile-preview:hover { border-color: var(--wb-btn-hover-border); }
.pk-tile-img { width: 100%; height: 100%; object-fit: contain; }
.pk-tile-icon { font-size: var(--wb-fs-18); color: var(--wb-text-secondary); }
.pk-tile-kind { font-size: var(--wb-fs-11); letter-spacing: var(--wb-tracking-wide); color: var(--wb-text-secondary); }
.pk-tile-placeholder { font-size: var(--wb-fs-12); color: var(--wb-text-secondary); }
.pk-tile-caption { display: grid; gap: 2px; }
.pk-tile-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--wb-fs-12); }
.pk-tile-actions { display: flex; flex-wrap: wrap; gap: var(--wb-space-1); }
.pk-tile-actions .btn { padding: 0 var(--wb-space-2); }
.pk-tile-main { position: absolute; top: var(--wb-space-2); right: var(--wb-space-2); }
.pk-drop-sm { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wb-space-2); justify-items: start; padding: var(--wb-space-2) var(--wb-space-3); }
.pk-drop-sm p { margin: 0; }
.pk-talks-wrap { display: grid; gap: var(--wb-space-2); }
.pk-talks { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--wb-space-2); }
.pk-talk {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--wb-space-3);
  align-items: start;
  padding: var(--wb-space-2) var(--wb-space-3);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
}
.pk-talk-text { margin: 0; white-space: pre-wrap; word-break: break-word; }
.pk-talk-add { display: grid; gap: var(--wb-space-2); }
.pk-talk-add textarea { min-height: var(--wb-textarea-min-68); }
.pk-script-library-wrap {
  display: grid;
  gap: var(--wb-space-2);
  padding: var(--wb-space-3) var(--wb-space-4);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
}
.pk-block-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wb-space-3); }
.pk-block-head h4 { margin: 0; font-size: var(--wb-fs-15); }
.pk-script-library { min-height: var(--wb-textarea-min-120); }
.pk-preview { display: grid; gap: var(--wb-space-3); max-width: min(860px, 90vw); }
.pk-preview-media { max-width: 100%; max-height: 70vh; background: var(--wb-fill-soft); border-radius: var(--wb-radius-control); }
.pk-preview h3 { margin: 0; word-break: break-all; }
.pk-unavailable { display: grid; gap: var(--wb-space-3); }

@media (max-width: 920px) {
  .pk-workbench { grid-template-columns: 1fr; }
  .pk-tree-scroll { max-height: none; }
  .pk-card-head { grid-template-columns: auto minmax(0, 1fr); }
  .pk-card-commands { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ============================================================
 * 14. 报价合同工作台（QC1–QC13）：单据编辑器、明细表、签章、管理弹窗
 *     只用既有令牌；颜色/字号/间距全部取自 tokens.css
 * ============================================================ */

.qk-block {
  display: grid;
  gap: var(--wb-space-4);
  padding: var(--wb-space-4);
  margin-top: var(--wb-space-5);
  background: var(--wb-panel-bg-soft);
  border: 1px solid var(--wb-panel-border);
  border-radius: var(--wb-radius-panel);
}
.qk-block-head { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wb-space-3); }
.qk-block-head h3, .qk-block-head h4 { margin: 0; }
.qk-block-head h4 { color: var(--wb-text-primary); font-size: var(--wb-fs-15); }
.qk-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--wb-space-4); }
.qk-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.qk-parties { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--wb-space-5); }
.qk-party {
  display: grid;
  gap: var(--wb-space-3);
  padding: var(--wb-space-4);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
}
.qk-lines { margin: 0; }
.qk-lines caption { text-align: left; padding: var(--wb-space-3) 0 0; }
.qk-lines .wb-cell-input { width: 100%; }
.qk-lines td .heading-actions { justify-content: flex-start; }

/* ============================================================
 * 报价工作台：与 5177 对应板块对齐的三块结构
 *   .qk-command-row        ← 5177 .invoice-quote-command-row（命令带）
 *   .qk-workarea-inner     ← 5177 .invoice-product-workarea-inner（左表 + 右利润侧栏）
 *   .qk-lines              ← 5177 .invoice-product-table.quote-style-table（密集表格）
 *   .qk-recent-card        ← 5177 .invoice-recent-card（最近报价卡片）
 * 颜色一律走设计令牌（基准 §1），不引入旧项目的黑框与 zoom 补偿。
 * ============================================================ */

.qk-command-row {
  flex-wrap: wrap;
  align-items: center;
  gap: var(--wb-space-3);
  margin-bottom: var(--wb-space-3);
  padding: var(--wb-space-2) var(--wb-space-3);
  background: var(--wb-panel-bg-soft);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
}
.qk-command-row .btn-sm, .qk-command-row button { min-height: var(--wb-control-height-sm); }

.qk-workarea-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: var(--wb-space-5);
  align-items: start;
}
.qk-main-pane { display: grid; gap: var(--wb-space-4); min-width: 0; }
.qk-lines-wrap { overflow-x: auto; border: 1px solid var(--wb-border-strong); border-radius: var(--wb-radius-control); }
.qk-lines { width: 100%; min-width: 720px; table-layout: fixed; border-collapse: collapse; }
.qk-lines th, .qk-lines td { padding: 4px 6px; border: 1px solid var(--wb-border); vertical-align: middle; }
.qk-lines thead th { background: var(--wb-fill-soft); font-size: var(--wb-fs-13); white-space: nowrap; }
.qk-lines th:nth-child(1), .qk-lines td:nth-child(1) { width: 42px; text-align: center; }
.qk-lines th:nth-child(2), .qk-lines td:nth-child(2) { width: auto; }
.qk-lines th:nth-child(3), .qk-lines td:nth-child(3) { width: 110px; }
.qk-lines th:nth-child(4), .qk-lines td:nth-child(4) { width: 90px; }
.qk-lines th:nth-child(5), .qk-lines td:nth-child(5) { width: 80px; }
.qk-lines th:nth-child(6), .qk-lines td:nth-child(6) { width: 90px; }
.qk-lines th:nth-child(7), .qk-lines td:nth-child(7) { width: 110px; }
.qk-lines th:nth-child(8), .qk-lines td:nth-child(8) { width: 130px; }
.qk-lines .wb-cell-input { padding: 4px 5px; min-height: var(--wb-control-height-sm); font-size: var(--wb-fs-13); }

/* 逐行利润侧栏（5177 .invoice-side-profit-panel） */
.qk-profit {
  display: grid;
  gap: var(--wb-space-3);
  min-width: 0;
  padding: var(--wb-space-4);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
}
.qk-profit-head { display: flex; align-items: center; justify-content: space-between; gap: var(--wb-space-3); }
.qk-profit-head h4 { margin: 0; font-size: var(--wb-fs-14); }
.qk-profit-lines { display: grid; gap: var(--wb-space-2); max-height: 320px; overflow: auto; }
.qk-profit-line { display: grid; grid-template-columns: 34px minmax(0, 1fr) 92px minmax(0, 1fr); align-items: center; gap: var(--wb-space-2); }
.qk-profit-line-profit { text-align: right; color: var(--wb-text-secondary); font-size: var(--wb-fs-12); font-variant-numeric: tabular-nums; }
.qk-profit-index { color: var(--wb-text-secondary); font-size: var(--wb-fs-12); }
.qk-profit-amount { text-align: right; font-size: var(--wb-fs-12); font-variant-numeric: tabular-nums; }
.qk-profit-line .input, .qk-profit-other .input { min-height: var(--wb-control-height-sm); font-size: var(--wb-fs-13); }
.qk-profit-summary { display: grid; gap: var(--wb-space-2); margin: 0; padding-top: var(--wb-space-3); border-top: 1px solid var(--wb-border); }
.qk-profit-summary > div { display: flex; justify-content: space-between; gap: var(--wb-space-3); }
.qk-profit-summary dt { color: var(--wb-text-secondary); font-size: var(--wb-fs-13); }
.qk-profit-summary dd { margin: 0; font-size: var(--wb-fs-13); font-variant-numeric: tabular-nums; }
.qk-profit-summary dd.qk-profit-pending { color: var(--wb-text-secondary); }
.qk-profit-other { margin: 0; }
.qk-profit .qk-profit-pending + .muted, .qk-profit p.muted { margin: 0; }

/* 最近单据卡片（5177 .invoice-recent-list / .invoice-recent-card） */
.qk-recent-list { display: grid; gap: var(--wb-space-3); }
.qk-recent-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--wb-space-4);
  align-items: center;
  padding: var(--wb-space-4);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
}
.qk-recent-card.is-issued { border-left: 3px solid var(--wb-accent); }
.qk-recent-card:hover { border-color: var(--wb-accent); }
.qk-recent-summary { display: grid; gap: var(--wb-space-2); min-width: 0; }
.qk-recent-title { display: flex; align-items: center; gap: var(--wb-space-3); min-width: 0; }
.qk-recent-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qk-recent-summary p { margin: 0; overflow-wrap: anywhere; }
.qk-recent-card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wb-space-2); }
.qk-fees { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--wb-space-4); max-width: 520px; }
.qk-totals {
  display: grid;
  gap: var(--wb-space-2);
  margin-left: auto;
  width: min(380px, 100%);
  padding: var(--wb-space-3) var(--wb-space-4);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
}
.qk-totals > div { display: flex; justify-content: space-between; gap: var(--wb-space-4); }
.qk-total-row {
  border-top: 1px solid var(--wb-border-strong);
  margin-top: var(--wb-space-2);
  padding-top: var(--wb-space-2);
  font-weight: var(--wb-fw-700);
  font-size: var(--wb-fs-16);
  color: var(--wb-table-total-ink);
}
.qk-sign-sheet {
  position: relative;
  min-height: 160px;
  background: var(--wb-surface);
  border: 1px dashed var(--wb-border-strong);
  border-radius: var(--wb-radius-control);
}
.qk-sign-chip {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 72px;
  min-height: 40px;
  padding: var(--wb-space-1) var(--wb-space-2);
  background: var(--wb-accent-soft);
  border: 1px solid var(--wb-accent);
  border-radius: var(--wb-radius-control);
  color: var(--wb-accent-ink);
  font-size: var(--wb-fs-11);
  text-align: center;
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.qk-sign-chip:active { cursor: grabbing; }
/* 签章（2026-10-01 起走小助手）：章图 + 信息行 + 右键菜单 */
.qk-sign-block { display: grid; gap: var(--wb-space-4); }
.qk-seal-figure {
  display: grid;
  gap: var(--wb-space-2);
  margin: 0;
  padding: var(--wb-space-4);
  width: min(320px, 100%);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
}
.qk-seal-figure figcaption {
  display: flex;
  align-items: center;
  gap: var(--wb-space-3);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
  overflow-wrap: anywhere;
}
.qk-seal-image {
  display: block;
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
}
.qk-seal-figure .qk-seal-image { cursor: context-menu; }
.qk-seal-menu {
  position: fixed;
  z-index: var(--wb-z-menu);
  display: grid;
  min-width: 180px;
  padding: var(--wb-space-1);
  background: var(--wb-menu-bg);
  border: 1px solid var(--wb-menu-border);
  border-radius: var(--wb-radius-control);
  box-shadow: var(--wb-shadow-menu);
  /* 反向补偿（2026-10-01 板块缩放）：签章右键菜单挂在设置页卡片（缩放区）里，
   * fixed 的尺寸与指针坐标都会被缩 0.70；照 5177 的除算（发票样式:2697）。 */
  zoom: calc(1 / var(--workbench-section-scale, 1));
}
.qk-seal-menu .btn { justify-content: flex-start; }
.qk-footer-block { background: var(--wb-panel-bg); }
.qk-footer { flex-wrap: wrap; }
.qk-export-note { display: grid; gap: var(--wb-space-2); }
.qk-empty { display: grid; gap: var(--wb-space-3); }
.qk-manage { display: grid; gap: var(--wb-space-4); width: min(720px, 92vw); max-height: 80vh; overflow: auto; }
.pk-manage-list { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--wb-space-3); }
.pk-manage-row {
  display: grid;
  gap: var(--wb-space-2);
  padding: var(--wb-space-3);
  background: var(--wb-surface);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
}
.pk-manage-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--wb-space-3); }
.pk-manage-row textarea { min-height: var(--wb-textarea-min-68); }

/* 基础信息页（2026-10-23）：公司中英文资料 / 银行账户 / 编号 / 印章位置 */
.base-info-bank-list { display: grid; gap: var(--wb-space-4); }
.base-info-bank {
  display: grid;
  gap: var(--wb-space-3);
  padding: var(--wb-space-5);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-button);
  background: var(--wb-fill-soft);
}
.base-info-bank-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-3);
}
.base-info-bank-default {
  display: flex;
  align-items: center;
  gap: var(--wb-space-2);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-13);
}
.base-info-bank-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--wb-space-4);
}
.base-info-bank-grid .field { margin: 0; }
.base-info-paper {
  position: relative;
  min-height: 320px;
  border: 1px dashed var(--wb-border);
  border-radius: var(--wb-radius-button);
  background: var(--wb-fill-soft);
  overflow: hidden;
  touch-action: none;
}
.base-info-seal-box {
  position: absolute;
  display: grid;
  place-items: center;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--wb-accent);
  background: var(--wb-section-bg);
  cursor: grab;
  touch-action: none;
}
.base-info-seal-box:active { cursor: grabbing; }
.base-info-seal-box img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

@media (max-width: 920px) {
  .qk-grid, .qk-grid-2, .qk-parties, .qk-fees { grid-template-columns: 1fr; }
  .pk-manage-fields { grid-template-columns: 1fr; }
  .base-info-bank-grid { grid-template-columns: 1fr; }
}

/* ============================================================
 * 12. 响应式（基准 §3.2：客户版自定断点，沿用旧值 920px）
 * ============================================================ */

@media (max-width: 920px) {
  .sidebar { position: static; width: auto; flex-direction: column; }
  .main { margin-left: 0; padding: var(--wb-space-8); }
  .section-heading { flex-direction: column; align-items: flex-start; gap: var(--wb-space-5); }
  .heading-actions { justify-content: flex-start; }
  .meta { grid-template-columns: 1fr; }
  .structure-list li, .kv-list li { grid-template-columns: 1fr; }
}

/* ==========================================================================
   2026-10-05 业务方要求：打开板块不留左右空白。
   照 5177 的整幅宽口径（待办样式:2042-2057：产品结构 / 报价库 / 单据生成器 /
   价目表工作台 / 财务 / 订单档案 / 垃圾篓等工作台板块
   `max-width: none; width: 100%; margin-left/right: 0`）。板块视图（产品知识 /
   价目表 / 报价合同 / 订单档案 / 垃圾篓）激活时卡片撑满；页头、横幅与页脚由
   main.js 挂的 `is-module-view` 同步撑满。
   2026-10-13：首页也并入全幅（业务方验收要求"内容撑满页面"）；设置 / 帮助保持 1120 居中。
   ========================================================================== */
main.is-module-view > .topbar,
main.is-module-view > .banner-area,
main.is-module-view > .site-footer {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

main.is-module-view > .view > .card {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}


/* ==========================================================================
   2026-10-23 业务方选定：登录页左右分栏深色版（左品牌叙事 / 右真实账号表单）。
   登录门：未登录整屏登录页、登录后显示工作台外壳（main.js 按 body[data-auth] 切换）。
   本段样式全部走设计令牌（check:design 扫描）；深色令牌见 tokens.css 第 10 节。
   ========================================================================== */
body[data-auth="out"] .sidebar,
body[data-auth="out"] .main { display: none; }
body[data-auth="in"] #loginScreen { display: none; }

#loginScreen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  grid-template-rows: 1fr auto;
  color: var(--wb-login-ink);
  background: var(--wb-login-bg);
  color-scheme: dark;
}

#loginScreen :focus-visible { outline-color: var(--wb-login-focus-outline); }

/* 左：品牌 + 本地优先叙事 */
.login-aside {
  grid-column: 1;
  grid-row: 1;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: 30px 38px 34px;
  overflow: hidden;
  background:
    linear-gradient(180deg,
      var(--wb-login-overlay-top) 0%,
      var(--wb-login-overlay-mid) 40%,
      var(--wb-login-overlay-bottom) 80%,
      var(--wb-login-overlay-strong) 100%),
    radial-gradient(ellipse at 10% 6%, var(--wb-login-aurora-a), transparent 62%),
    radial-gradient(ellipse at 88% 30%, var(--wb-login-aurora-b), transparent 64%),
    radial-gradient(ellipse at 22% 96%, var(--wb-login-aurora-c), transparent 62%),
    var(--wb-login-left-bg);
}

.login-aside .sidebar-brand { justify-content: flex-start; text-align: left; }
.login-brand { gap: 13px; padding: 0; }

.login-brand .brand-mark {
  width: var(--wb-login-mark-size);
  height: var(--wb-login-mark-size);
  border: 1px solid var(--wb-login-mark-border);
  border-radius: var(--wb-login-mark-radius);
  background: linear-gradient(145deg,
    var(--wb-login-mark-top) 0%,
    var(--wb-login-mark-mid) 46%,
    var(--wb-login-mark-bottom) 100%);
  color: var(--wb-login-mark-ink);
  font-size: var(--wb-fs-19);
  font-weight: var(--wb-fw-600);
  box-shadow: var(--wb-login-mark-inset), var(--wb-login-mark-shadow);
}

.login-brand .eyebrow {
  margin: 0 0 2px;
  color: var(--wb-login-eyebrow-ink);
  font-size: 9.5px;
  font-weight: var(--wb-fw-500);
  letter-spacing: .17em;
  text-transform: uppercase;
}

.login-brand h1 {
  margin: 0;
  color: var(--wb-login-ink);
  font-size: 23px;
  font-weight: var(--wb-fw-600);
  line-height: 1.18;
  letter-spacing: -.012em;
}

.login-brand p {
  margin: 1px 0 0;
  color: var(--wb-login-tagline-ink);
  font-size: 11.5px;
  line-height: 1.4;
}

.login-hero { max-width: 460px; }

.login-headline {
  margin: 0;
  color: var(--wb-login-headline-ink);
  font-size: clamp(32px, 3.6vw, 42px);
  font-weight: var(--wb-fw-500);
  line-height: 1.16;
  letter-spacing: -.035em;
}

.login-lead {
  max-width: 460px;
  margin: 15px 0 0;
  color: var(--wb-login-muted);
  font-size: 12.5px;
  line-height: 1.8;
}

.login-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-2);
  width: fit-content;
  height: 30px;
  margin-top: var(--wb-space-9);
  padding: 0 var(--wb-space-5);
  border: 1px solid var(--wb-login-chip-border);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-login-chip-bg);
  color: var(--wb-login-chip-ink);
  font-size: 10.5px;
  line-height: 1;
  letter-spacing: .03em;
  backdrop-filter: blur(8px);
}

.login-chip svg { width: 14px; height: 14px; color: var(--wb-login-chip-icon-ink); }

/* 右：真实账号表单（账号组件见 app/ui/account-panel.js） */
.login-main {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 44px 34px 30px;
  border-left: 1px solid var(--wb-login-divider);
  background:
    radial-gradient(90% 40% at 50% 0%, var(--wb-login-panel-glow), transparent 70%),
    var(--wb-login-panel-bg);
}

.login-card {
  width: min(var(--wb-login-card-width), 100%);
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--wb-login-ink);
  box-shadow: none;
}

.login-card-head { text-align: left; margin: 0 0 22px; }

.login-card-head h2 {
  margin: 0;
  color: var(--wb-login-title-ink);
  font-size: 26px;
  font-weight: var(--wb-fw-500);
  line-height: 1.22;
  letter-spacing: -.01em;
}

.login-card-head p {
  margin: 7px 0 0;
  color: var(--wb-login-faint-ink);
  font-size: 12.5px;
  line-height: 1.55;
}

.login-card .tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  width: 100%;
  max-width: 100%;
  margin: 0 0 18px;
  padding: 3px;
  border: 1px solid var(--wb-login-tab-border);
  border-radius: var(--wb-login-radius);
  background: var(--wb-login-tab-bg);
}

.login-card .tab {
  min-height: 31px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--wb-login-tab-ink);
  font-family: inherit;
  font-size: 12px;
  font-weight: var(--wb-fw-500);
}

.login-card .tab:hover { color: var(--wb-login-tab-active-ink); }

.login-card .tab.is-active {
  background: var(--wb-login-tab-active-bg);
  color: var(--wb-login-tab-active-ink);
}

.login-card .form-block { gap: 15px; }
.login-card .field { margin: 0; }

.login-card .field > span {
  margin-bottom: 6px;
  color: var(--wb-login-label-ink);
  font-size: 11.5px;
  font-weight: var(--wb-fw-500);
}

.login-card .input,
.login-card .field input {
  min-height: var(--wb-login-input-height);
  padding: 0 13px;
  border: 1px solid var(--wb-login-input-border);
  border-radius: var(--wb-login-radius);
  background: var(--wb-login-input-bg);
  color: var(--wb-login-input-ink);
  font-size: 13.5px;
  font-weight: var(--wb-fw-500);
  box-shadow: none;
}

.login-card .input::placeholder { color: var(--wb-login-placeholder-ink); }

.login-card .input:focus,
.login-card .field input:focus {
  border-color: var(--wb-login-input-focus-border);
  outline: 0;
  background: var(--wb-login-input-focus-bg);
  box-shadow: var(--wb-login-focus-shadow);
}

.login-card .input:disabled {
  background: var(--wb-login-input-bg);
  color: var(--wb-login-muted);
}

/* 密码显示/隐藏：按钮叠在输入框右侧，不改变输入框的密码语义 */
.login-card .password-field { position: relative; }
.login-card .password-field .input { padding-right: 66px; }
.login-card .password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  min-height: 0;
  padding: 4px 6px;
  border: 0;
  border-radius: var(--wb-radius-control);
  background: transparent;
  color: var(--wb-login-muted);
  font-size: 11.5px;
  font-weight: var(--wb-fw-500);
  box-shadow: none;
  cursor: pointer;
}
.login-card .password-toggle:hover:not(:disabled) {
  background: transparent;
  color: var(--wb-login-ink);
}
.login-card .password-toggle:focus-visible {
  outline: 2px solid var(--wb-login-input-focus-border);
  outline-offset: 1px;
}
.login-card .password-toggle[aria-pressed="true"] { color: var(--wb-login-ink); }

/* 邮箱验证码 + 发送按钮 */
.login-card .code-row { display: flex; gap: 8px; }
.login-card .code-row .input { flex: 1 1 auto; min-width: 0; }
.login-card .code-row .btn { flex: 0 0 auto; padding: 0 12px; }

.login-card .actions { margin: 2px 0 0; }

.login-card .actions .btn-primary { width: 100%; }

.login-card .btn {
  min-height: var(--wb-login-input-height);
  border: 1px solid var(--wb-login-btn-border);
  border-radius: var(--wb-login-radius);
  background: var(--wb-login-btn-bg);
  color: var(--wb-login-btn-ink);
  font-size: 13.5px;
  font-weight: var(--wb-fw-500);
  box-shadow: none;
}

.login-card .btn:hover:not(:disabled) {
  border-color: var(--wb-login-btn-hover-border);
  background: var(--wb-login-btn-hover-bg);
  color: var(--wb-login-ink);
  box-shadow: none;
}

.login-card .btn-primary {
  border-color: var(--wb-login-primary-border);
  background: var(--wb-login-primary-bg);
  color: var(--wb-login-primary-ink);
  box-shadow: var(--wb-login-primary-shadow);
}

.login-card .btn-primary:hover:not(:disabled),
.login-card .btn-primary:active:not(:disabled) {
  border-color: var(--wb-login-primary-border);
  background: var(--wb-login-primary-hover-bg);
  color: var(--wb-login-primary-ink);
  box-shadow: var(--wb-login-primary-shadow);
}

.login-card .btn:disabled { opacity: var(--wb-disabled-opacity); }

.login-card .message {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--wb-login-notice-border);
  border-radius: var(--wb-login-radius);
  background: var(--wb-login-notice-bg);
  color: var(--wb-login-notice-ink);
  font-size: 12px;
  line-height: 1.6;
}

.login-card .message[data-tone="error"] {
  border-color: var(--wb-login-error-border);
  background: var(--wb-login-error-bg);
  color: var(--wb-login-error-ink);
}

.login-card .error-line {
  color: var(--wb-login-error-ink);
  font-size: 12px;
  line-height: 1.6;
}

.login-card .muted { color: var(--wb-login-muted); }
.login-card .small { font-size: 11.5px; line-height: 1.7; }

.login-card .verify-block {
  margin-top: 0;
  padding: 14px;
  border: 1px dashed var(--wb-login-verify-border);
  border-radius: var(--wb-login-radius);
  background: var(--wb-login-verify-bg);
}

.login-card .verify-block h4 { color: var(--wb-login-ink); font-size: var(--wb-fs-14); }

.login-card .dev-token {
  border-color: var(--wb-login-warn-border);
  background: var(--wb-login-warn-bg);
  color: var(--wb-login-warn-ink);
}

.login-card .warn-line { color: var(--wb-login-warn-ink); }

.login-card code {
  border-color: var(--wb-login-input-border);
  background: var(--wb-login-input-bg);
  color: var(--wb-login-ink);
}

.login-card a,
.login-forgot a { color: var(--wb-login-link); }

.login-card a:hover,
.login-forgot a:hover { color: var(--wb-login-link-hover); }

.login-forgot {
  margin: 15px 0 0;
  text-align: right;
  font-size: 11.5px;
}

/* 页脚：横跨两栏，压到页面最底部；备案号仍在整页正中 */
.login-footer.site-footer {
  position: static;
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 14px 24px 16px;
  border-top: 1px solid var(--wb-login-divider);
  background: var(--wb-login-footer-bg);
  color: var(--wb-login-footer-ink);
  text-align: center;
}

.login-footer .login-privacy {
  max-width: 760px;
  margin: 0 auto 8px;
  color: var(--wb-login-footer-ink);
  font-size: 11px;
  line-height: 1.6;
}

.login-footer .site-footer-icp {
  margin: 0 0 4px;
  color: var(--wb-login-footer-ink);
  font-size: 10.5px;
  line-height: 1.6;
}

.login-footer .site-footer-icp:last-child { margin-bottom: 0; }

.login-footer a { color: var(--wb-login-footer-link-ink); }
.login-footer a:hover { color: var(--wb-login-link-hover); }

@media (max-width: 920px) {
  #loginScreen {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
  }

  .login-aside {
    grid-column: 1;
    grid-row: 1;
    align-items: center;
    justify-content: flex-start;
    gap: var(--wb-space-7);
    padding: 28px 24px;
    text-align: center;
  }

  .login-aside .sidebar-brand { justify-content: center; text-align: left; }
  .login-hero { max-width: 560px; }
  .login-headline, .login-chip { display: none; }

  .login-lead {
    max-width: 540px;
    margin: 12px auto 0;
    font-size: 12px;
    text-align: center;
  }

  .login-main {
    grid-column: 1;
    grid-row: 2;
    padding: 24px 24px 30px;
    border-top: 1px solid var(--wb-login-divider);
    border-left: 0;
  }

  #loginScreen .login-footer.site-footer { grid-column: 1; grid-row: 3; }
}

@media (max-width: 560px) {
  .login-aside { padding: 24px 18px; }
  .login-main { padding: 20px 18px 26px; }
  .login-card-head h2 { font-size: 24px; }
  .login-card .input,
  .login-card .field input { font-size: 16px; }
  .login-footer { padding: 12px 16px 14px; }
}

/* ---------------- 首页头图（2026-10-24 业务方要求：账号与会员合并，右侧空着预留广告位） ---------------- */
.home-head-layout {
  display: flex;
  align-items: center;
}

.home-head-account-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--wb-space-3);
  padding: var(--wb-space-5) var(--wb-space-6);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-panel-bg-soft);
  border: 1px solid var(--wb-border);
  width: min(560px, 100%);
}

.home-head-account-top {
  display: flex;
  align-items: center;
  gap: var(--wb-space-3);
  flex-wrap: wrap;
}

.home-head-account-top .head-value {
  margin: 0;
  font-size: var(--wb-fs-20);
  font-weight: var(--wb-fw-850);
  color: var(--wb-text-primary);
}

.home-head-meta {
  margin: 0;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
  line-height: 1.6;
}

/* 广告 / 推荐位（预留给外贸广告） */
.home-head-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-5);
  padding: var(--wb-space-5) var(--wb-space-6);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-panel-bg-soft);
  border: 1px dashed var(--wb-border-strong);
}

.home-promo-content {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-1);
  min-width: 0;
}

.home-promo-badge {
  font-size: var(--wb-fs-11);
  font-weight: var(--wb-fw-850);
  color: var(--wb-accent-ink);
  letter-spacing: .05em;
}

.home-promo-title {
  font-size: var(--wb-fs-15);
  font-weight: var(--wb-fw-850);
  color: var(--wb-text-primary);
  line-height: 1.35;
}

.home-promo-desc {
  margin: 0;
  font-size: var(--wb-fs-12);
  color: var(--wb-text-secondary);
  line-height: 1.5;
}

.home-promo-btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

@media (max-width: 880px) {
  .home-head-layout {
    grid-template-columns: 1fr;
  }
}

/* 一体化头图：账号 ｜ 会员时间 ｜ 本地保存地址 */
.head-grid { display: grid; grid-template-columns: 1.1fr 1fr 1.2fr; }
.head-seg {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-2);
  min-width: 0;
  padding: var(--wb-space-4) var(--wb-space-7);
}
.head-seg + .head-seg { border-left: 1px solid var(--wb-heading-divider); }
.head-seg-top { display: flex; align-items: center; justify-content: space-between; gap: var(--wb-space-4); }
.head-seg-label { margin: 0; color: var(--wb-text-secondary); font-size: var(--wb-fs-12); letter-spacing: .03em; }
.head-value {
  margin: 0;
  font-size: var(--wb-fs-20);
  font-weight: var(--wb-fw-850);
  color: var(--wb-text-primary);
  overflow-wrap: anywhere;
}
.head-foot { margin: var(--wb-space-4) 0 0; padding-top: var(--wb-space-4); border-top: 1px solid var(--wb-heading-divider); }
.head-foot + .head-foot { margin-top: var(--wb-space-2); padding-top: 0; border-top: 0; }
#homeHeadWorkspace .meta-line strong { font-size: var(--wb-fs-18); }

/* 开始工作：四个模块各一行 */
.home-module-rows { display: grid; }
.home-module-row {
  display: grid;
  /* 左侧是状态/动作位（进入 / 未开通），后面跟图标与名称说明。 */
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: var(--wb-space-5);
  align-items: center;
  padding: var(--wb-space-4) var(--wb-space-2);
}
.home-module-row + .home-module-row { border-top: 1px solid var(--wb-heading-divider); }
/* 「进入」与「未开通」共用一个宽高，保证两个状态的小框一样大 */
.home-module-slot { width: 68px; height: 40px; padding-left: 0; padding-right: 0; }
.home-module-status {
  border-color: var(--wb-btn-border);
  background: var(--wb-surface);
  color: var(--wb-text-primary);
  box-shadow: var(--wb-shadow-control);
  cursor: pointer;
}
.home-module-status:hover:not(:disabled) {
  border-color: var(--wb-accent);
  background: var(--wb-accent-soft);
  color: var(--wb-accent-ink);
}
.home-module-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--wb-radius-button);
  background: var(--wb-accent-soft);
  color: var(--wb-accent-ink);
}
.home-module-icon svg { width: 18px; height: 18px; }
.home-module-text { display: grid; gap: 2px; min-width: 0; }
.home-module-title { display: flex; flex-wrap: wrap; align-items: center; gap: var(--wb-space-3); }
.home-module-text strong { font-size: var(--wb-fs-15); }
.home-module-text span { font-size: var(--wb-fs-12); }

/* 公告 */
.ann-list { list-style: none; margin: 0; padding: 0; }
.ann-list li { display: flex; gap: var(--wb-space-5); padding: var(--wb-space-3) 0; border-top: 1px solid var(--wb-heading-divider); }
.ann-list li:first-child { border-top: 0; }
.ann-list .ann-date { flex: none; color: var(--wb-text-secondary); font-size: var(--wb-fs-12); font-variant-numeric: tabular-nums; }

@media (max-width: 920px) {
  /* 登录页在 920px 以下切为上下；这里只处理头图网格。 */
  .head-grid { grid-template-columns: 1fr; }
  .head-seg + .head-seg { border-left: 0; border-top: 1px solid var(--wb-heading-divider); }
  /* 窄屏：状态/动作位与图标一行，名称与说明换到下一行铺满 */
  .home-module-row { grid-template-columns: auto auto minmax(0, 1fr); }
  .home-module-text { grid-column: 1 / -1; }
}

/* ============================================================
 * 首页 2026-10-22 精简版：三步引导 / 未开通模块介绍 / 定制服务入口
 * ============================================================ */

.home-guide {
  display: flex;
  /* 2026-11-04 令牌位置 1：步骤条 + 内联配对行改为上下排，窄屏也不挤 */
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  border-color: var(--wb-border);
  background: var(--wb-panel-bg-soft);
}

/* 首页步骤条内联配对（未连接展开输入；已连接收起显示位置名＋管理设置） */
.home-guide-connect,
.home-guide-connected {
  border-top: 1px dashed var(--wb-border);
  padding-top: 10px;
}
.home-guide-connect-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.home-guide-connect-row .input { flex: 1 1 280px; min-width: 220px; }
.home-guide-connected {
  display: flex;
  align-items: center;
  /* 2026-11-04 22:4x 方案 A：一行左对齐——状态读完即操作，按钮不甩到右边。 */
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}
.home-guide-connected .btn { flex: 0 0 auto; }
.home-guide-connected-text { margin-right: 4px; }
.home-guide-connected-text {
  font-size: var(--wb-fs-13);
  color: var(--wb-text-primary);
  font-weight: var(--wb-fw-700);
}
.home-guide-actions { justify-content: flex-end; }
.home-guide-blocked {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px dashed var(--wb-border);
  padding-top: 10px;
}
.home-guide-blocked-text {
  color: var(--wb-danger);
  font-size: var(--wb-fs-13);
  font-weight: var(--wb-fw-700);
}
.home-guide-blocked p { flex: 1 1 100%; margin: 0; }
/* 2026-11-04 23:0x：首页「管理设置」弹窗（内容复用 helperGate） */
dialog.workspace-manage-dialog { width: min(560px, calc(100vw - 32px)); }
.workspace-manage-dialog #helperGateHost { margin-top: 10px; }
.home-guide-place {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px dashed var(--wb-border);
  padding-top: 10px;
}

.home-guide-steps {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.home-guide-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-13);
}

.home-guide-step + .home-guide-step::before {
  content: "";
  width: 34px;
  height: 1px;
  background: var(--wb-border);
  margin-right: 2px;
}

.home-guide-dot {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1px solid var(--wb-border-strong);
  background: var(--wb-panel-bg);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
  font-weight: var(--wb-fw-900);
}

.home-guide-step.is-done {
  color: var(--wb-success, var(--wb-text-secondary));
}

.home-guide-step.is-done .home-guide-dot {
  border-color: var(--wb-border-strong);
  background: var(--wb-panel-bg);
  color: var(--wb-success);
}

.home-guide-step.is-current {
  color: var(--wb-text-primary);
  font-weight: var(--wb-fw-800);
}

.home-guide-step.is-current .home-guide-dot {
  border-color: var(--wb-accent-ink);
  background: var(--wb-accent-ink);
  color: var(--wb-panel-bg);
}

.home-guide-actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

/* 未开通的模块行：可点，打开模块介绍弹窗（不是死胡同） */
.home-module-row.is-locked {
  cursor: pointer;
}

.home-module-row.is-locked:hover {
  background: var(--wb-panel-bg-soft);
}

/* 定制服务强调卡：这是主打售卖服务，不再用一行小字，改成深色卡 + 大标题 + 主按钮。
   颜色全部走 tokens.css 的 --wb-custom-*。 */
.home-customize {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-9);
  margin-top: var(--wb-space-7);
  padding: var(--wb-space-8) var(--wb-space-9);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-custom-panel-bg);
  color: var(--wb-custom-panel-ink);
  box-shadow: var(--wb-shadow-soft);
}

.home-customize-body { min-width: 0; }
.home-customize-eyebrow {
  margin: 0 0 var(--wb-space-3);
  color: var(--wb-custom-panel-eyebrow);
  font-size: var(--wb-fs-12);
  font-weight: var(--wb-fw-800);
  letter-spacing: .08em;
}
.home-customize-title {
  margin: 0;
  color: var(--wb-custom-panel-ink);
  font-size: var(--wb-fs-22);
  font-weight: var(--wb-fw-850);
  line-height: 1.35;
}
.home-customize-lead {
  margin: var(--wb-space-3) 0 0;
  max-width: 760px;
  color: var(--wb-custom-panel-muted);
  font-size: var(--wb-fs-14);
  line-height: 1.7;
}
.home-customize-points {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wb-space-3);
  margin: var(--wb-space-5) 0 0;
  padding: 0;
  list-style: none;
}
.home-customize-points li {
  padding: 2px var(--wb-space-3);
  border: 1px solid var(--wb-custom-panel-border);
  border-radius: var(--wb-radius-pill);
  color: var(--wb-custom-panel-muted);
  font-size: var(--wb-fs-12);
}
.home-customize-action {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--wb-space-2);
}
.home-customize-cta {
  min-height: calc(var(--wb-control-height) + 6px);
  padding: var(--wb-space-5) var(--wb-space-8);
  border-color: var(--wb-surface);
  background: var(--wb-surface);
  color: var(--wb-accent-ink);
  font-size: var(--wb-fs-15);
  font-weight: var(--wb-fw-850);
  box-shadow: none;
}
.home-customize-cta:hover:not(:disabled) {
  border-color: var(--wb-accent-soft);
  background: var(--wb-accent-soft);
  color: var(--wb-accent-ink);
  box-shadow: none;
}
.home-customize-note { color: var(--wb-custom-panel-muted); font-size: var(--wb-fs-12); }

@media (max-width: 920px) {
  .home-customize { flex-direction: column; align-items: stretch; }
  .home-customize-action { align-items: flex-start; }
}

/* 引导条高亮「本地保存地址」那格 */
.head-seg.is-guide-target {
  outline: 2px solid var(--wb-accent-ink);
  outline-offset: 4px;
  border-radius: var(--wb-radius-control);
}

/* 管理设置：默认收起，点开才是更换/忘记/重新配对 */
.helper-gate-manage {
  margin-top: 6px;
}

.helper-gate-manage > summary {
  color: var(--wb-accent-ink);
  font-size: var(--wb-fs-12);
  font-weight: var(--wb-fw-700);
  cursor: pointer;
  list-style: none;
}

.helper-gate-manage > summary::-webkit-details-marker {
  display: none;
}

.helper-gate-manage .actions {
  margin-top: 6px;
  flex-wrap: wrap;
}

/* 未开通模块介绍弹窗 */
.module-intro-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--wb-z-modal);
  display: grid;
  place-items: center;
  background: var(--wb-overlay-bg);
  padding: 24px;
}

.module-intro {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-lg);
  background: var(--wb-panel-bg);
  box-shadow: var(--wb-shadow-modal);
  padding: 18px 20px 16px;
}

.module-intro-head {
  display: flex;
  align-items: center;
  gap: 10px;
}

.module-intro-head h3 {
  margin: 0;
  flex: 1 1 auto;
  font-size: var(--wb-fs-17);
}

.module-intro-close {
  border: 0;
  background: transparent;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-18);
  line-height: 1;
  cursor: pointer;
}

.module-intro-lead {
  margin: 12px 0 10px;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-13);
}

.module-intro-points {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--wb-text-primary);
  font-size: var(--wb-fs-13);
}

.module-intro-price {
  margin: 14px 0 0;
  padding: 8px 10px;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-panel-bg-soft);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
}

.module-intro-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

/* 内测工具：模拟模块授权（2026-10-23；只有开了 mindoBetaTools 的本机才显示） */
.beta-tool-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wb-space-5);
  margin: var(--wb-space-4) 0;
}

.beta-tool-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-2);
  font-size: var(--wb-fs-13);
  color: var(--wb-text-primary);
  cursor: pointer;
}

.beta-tool-toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--wb-accent-ink);
}

/* 模块未开通：只显示一句说明（产品知识 / 价目表共用同一套语气） */
.module-unavailable-note {
  margin: var(--wb-space-4) 0 0;
  padding: var(--wb-space-6);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-panel-bg-soft);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-14);
  line-height: 1.7;
}

/* ============================================================
 * 模块介绍（2026-10-23）：未购买的模块侧栏字体略不同；已购买的模块标题右边挂「功能介绍」
 * ============================================================ */

.nav-item.is-locked {
  color: var(--wb-sidebar-note-ink);
  font-weight: 500;
}

/* 模块标题规范：统一金色英文眉题 + 大标题 38.4px，各板块对齐定死 */
#pkWorkbenchModule .section-heading,
#priceListModule .section-heading,
#quoteSection .section-heading,
#orderArchiveSection .section-heading {
  justify-content: flex-start;
  gap: var(--wb-space-4);
}

#pkWorkbenchModule .section-heading h2,
#priceListModule .section-heading h2,
#quoteSection .section-heading h2,
#orderArchiveSection .section-heading h2 {
  font-size: var(--wb-fs-38);
  font-weight: 900;
  line-height: 1.2;
  margin: 0;
}

#pkWorkbenchModule .section-heading .heading-actions,
#priceListModule .section-heading .heading-actions,
#quoteSection .section-heading .heading-actions,
#companySection .section-heading .heading-actions,
#orderArchiveSection .section-heading .heading-actions,
#customersSection .section-heading .heading-actions,
#todoSection .section-heading .heading-actions {
  margin-left: auto;
}

#companySection .section-heading,
#customersSection .section-heading,
#todoSection .section-heading {
  justify-content: flex-start;
  gap: var(--wb-space-4);
}

/* 订单档案（2026-10-27 业务方）：操作组不再靠最右，紧跟「功能介绍」，留约 5 个字宽 */
#orderArchiveSection .section-heading .heading-actions {
  margin-left: 60px;
}

/* 产品知识卡片标题统计小标签（照 5177 quoteLibrarySummaryGrid） */
.pk-heading-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: var(--wb-space-3);
  min-width: 0;
}

.pk-heading-chip {
  display: flex;
  flex-direction: column;
  gap: var(--wb-space-1);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-panel-bg-soft);
  padding: var(--wb-space-2) var(--wb-space-3);
  min-width: 64px;
}

.pk-heading-chip span {
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
  white-space: nowrap;
  line-height: 1.2;
}

.pk-heading-chip strong {
  color: var(--wb-text-primary);
  font-size: var(--wb-fs-15);
  font-weight: var(--wb-fw-850);
  line-height: 1.2;
}

.module-intro-link {
  align-self: flex-end;
  margin-bottom: 2px;
  border: 0;
  background: transparent;
  color: var(--wb-text-secondary);
  font: inherit;
  font-size: var(--wb-fs-15);
  font-weight: var(--wb-fw-700);
  text-decoration: underline;
  text-decoration-style: dotted;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 0;
}

.module-intro-link:hover,
.module-intro-link:focus-visible {
  color: var(--wb-accent-ink);
}

/* 功能介绍弹窗：左问题、右视频/截图 */
.feature-intro-backdrop {
  position: fixed;
  inset: 0;
  z-index: calc(var(--wb-z-modal) + 4);
  display: grid;
  place-items: center;
  background: var(--wb-overlay-bg);
  padding: 24px;
}

.feature-intro {
  display: flex;
  flex-direction: column;
  width: min(1080px, calc(100vw - 32px));
  height: min(720px, calc(100vh - 48px));
  min-width: min(760px, calc(100vw - 32px));
  min-height: 520px;
  max-height: calc(100vh - 48px);
  resize: both;
  overflow: hidden;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-lg);
  background: var(--wb-panel-bg);
  box-shadow: var(--wb-shadow-modal);
}

.feature-intro-head {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--wb-space-3);
  padding: 12px 18px;
  border-bottom: 1px solid var(--wb-heading-divider);
  white-space: nowrap;
}

.feature-intro-head h3 {
  margin: 0;
  font-size: var(--wb-fs-20);
  font-weight: var(--wb-fw-850);
  white-space: nowrap;
  flex: none;
}

.feature-intro-head .pill {
  flex: none;
  white-space: nowrap;
}

.feature-intro-close {
  flex: none;
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-18);
  line-height: 1;
  cursor: pointer;
}
.feature-intro-close:hover {
  color: var(--wb-text-primary);
}

/* 弹窗顶部两大套餐介绍：放在「未开通」正右侧同一行，禁止折行 */
.feature-intro-plans {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: var(--wb-space-2);
  margin-left: var(--wb-space-2);
  font-size: var(--wb-fs-12);
  white-space: nowrap;
}
.feature-intro-plan-item {
  display: inline-flex;
  align-items: center;
  gap: var(--wb-space-1);
  padding: 2px 8px;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-panel-bg-soft);
  color: var(--wb-text-secondary);
  white-space: nowrap;
  flex: none;
}
.feature-intro-plan-item.is-pro {
  border-color: var(--wb-accent);
  background: var(--wb-accent-soft);
  color: var(--wb-accent-ink);
}
.feature-intro-plan-item strong {
  color: var(--wb-text-primary);
  font-size: var(--wb-fs-12);
}
.feature-intro-plan-item.is-pro strong {
  color: var(--wb-accent-ink);
}
.feature-intro-plan-tag {
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
}
.feature-intro-plan-item.is-pro .feature-intro-plan-tag {
  color: var(--wb-accent-ink);
  font-weight: 700;
}

.feature-intro-body {
  display: grid;
  /* 左边问题栏固定宽度；拉大弹窗只放大右边图片 */
  grid-template-columns: 400px minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 0;
  gap: var(--wb-space-7);
  padding: 20px;
  overflow: hidden;
}

.feature-intro-left { min-width: 0; overflow: auto; }

.feature-intro-right {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
}

.feature-intro-left-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--wb-space-3);
  margin-bottom: var(--wb-space-4);
}

.feature-intro-left h4 {
  margin: 0;
  font-size: var(--wb-fs-15);
  font-weight: var(--wb-fw-850);
}

.feature-intro-hint { color: var(--wb-text-secondary); font-size: var(--wb-fs-12); }

.feature-intro-list { display: grid; gap: var(--wb-space-3); }

.feature-intro-q {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--wb-space-3);
  width: 100%;
  padding: var(--wb-space-4);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color var(--wb-transition-fast), background var(--wb-transition-fast), box-shadow var(--wb-transition-fast);
}

.feature-intro-q:hover {
  border-color: var(--wb-accent);
  background: var(--wb-accent-soft);
}

.feature-intro-q.is-active {
  border-color: var(--wb-accent);
  background: var(--wb-accent-soft);
  box-shadow: inset 3px 0 0 var(--wb-accent);
}

.feature-intro-q-index {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--wb-radius-pill);
  background: var(--wb-surface-muted);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
  font-weight: var(--wb-fw-900);
}

.feature-intro-q.is-active .feature-intro-q-index {
  background: var(--wb-accent);
  color: var(--wb-btn-primary-ink);
}

.feature-intro-q-copy { min-width: 0; }

.feature-intro-q strong {
  display: block;
  color: var(--wb-text-primary);
  font-size: var(--wb-fs-14);
}

.feature-intro-q p {
  margin: 4px 0 0;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-13);
  line-height: 1.65;
}

.feature-intro-media {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-surface);
}

.feature-intro-shot {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: var(--wb-space-3);
  overflow: hidden;
}

.feature-intro-shot img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.feature-intro-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--wb-canvas);
}

.feature-intro-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-13);
}

.feature-intro-caption {
  margin: var(--wb-space-2) 0 0;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
  text-align: center;
}

.feature-intro-status {
  margin: 0 20px var(--wb-space-3);
  padding: var(--wb-space-3) var(--wb-space-4);
  border-radius: var(--wb-radius-control);
  background: var(--wb-surface-muted);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-13);
}
.feature-intro-status[data-tone="error"] {
  background: var(--wb-pill-danger-bg);
  color: var(--wb-danger);
}
.feature-intro-status[data-tone="ok"] {
  background: var(--wb-success-bg);
  color: var(--wb-success);
}

.feature-intro-foot {
  display: flex;
  align-items: center;
  gap: var(--wb-space-3);
  padding: 14px 20px;
  border-top: 1px solid var(--wb-heading-divider);
}

.feature-intro-note {
  margin-right: auto;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
}

/* 模块自己的口径说明（目前只有报价合同）：放在演示区下面、脚注上面，不挤占右栏图片 */
.feature-intro-module-note {
  margin: 0;
  padding: 0 20px 14px;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
  line-height: 1.6;
}

@media (max-width: 760px) {
  .feature-intro {
    width: calc(100vw - 32px);
    height: calc(100vh - 48px);
    min-width: 0;
  }
  .feature-intro-body {
    grid-template-columns: minmax(0, 1fr);
    overflow: auto;
  }
  .feature-intro-media { height: 240px; min-height: 0; }
}

/* 功能介绍弹窗：右侧边缘可横向拖拽（左栏固定，图片变宽）；关闭只认右上角按钮 */
.feature-intro {
  position: relative;
}

.feature-intro-resize {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  width: 8px;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}

.feature-intro-resize:hover,
.feature-intro-resize:active {
  background: var(--wb-accent-soft);
}

/* ============================================================
 * 汇率沿用提示条（2026-10-26）：本月汇率没设、正在沿用旧月时，
 * 在模块标题下方挂一行小提示，点「去设置」跳到基础信息 → 汇率。
 * ============================================================ */
.rate-carry-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--wb-space-3);
  margin: 0 0 var(--wb-space-4);
  padding: var(--wb-space-2) var(--wb-space-4);
  border: 1px solid var(--wb-pill-warn-border);
  border-radius: var(--wb-radius-control);
  background: var(--wb-pill-warn-bg);
  color: var(--wb-pill-warn-ink);
  font-size: var(--wb-fs-13);
  line-height: 1.5;
}

.rate-carry-banner[hidden] { display: none; }

.rate-carry-banner-text { min-width: 0; }

.rate-carry-banner-link {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--wb-accent-ink);
  font: inherit;
  font-weight: var(--wb-fw-850);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}


/* 小助手未运行时的启动引导弹窗 */
dialog.helper-guide {
  width: min(560px, calc(100vw - 32px));
  margin: auto;
  padding: 24px;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-surface);
  color: var(--wb-text-primary);
  box-shadow: var(--wb-shadow-modal);
}
dialog.helper-guide::backdrop {
  background: color-mix(in srgb, var(--wb-text-primary) 42%, transparent);
}
dialog.helper-guide h3 { margin: 0 0 8px; font-size: 18px; }
dialog.helper-guide .helper-guide-steps { margin: 14px 0; padding-left: 20px; }
dialog.helper-guide .helper-guide-steps li { margin: 8px 0; }
dialog.helper-guide .actions { justify-content: flex-end; margin-top: 16px; }

/* 模块「使用说明」弹窗（2026-10-27）：左边操作步骤、右边配图（和功能介绍同一套双栏语言）。
   壳复用 .helper-guide 的边框/圆角/阴影，这里只改尺寸与内部排版。 */
dialog.usage-guide {
  width: min(980px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  padding: 0;
  overflow: hidden;
}
/* 只在打开时改成 flex：直接写 display:flex 会让关掉的 dialog 也显示出来 */
dialog.usage-guide[open] {
  display: flex;
  flex-direction: column;
}
/* 没有配图的模块（待办 / 客户跟进）：单栏，弹窗收窄一点，别让一行字拉太宽 */
dialog.usage-guide[data-layout="single"] { width: min(720px, calc(100vw - 32px)); }
dialog.usage-guide .usage-guide-head {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--wb-heading-divider);
}
dialog.usage-guide .usage-guide-head h3 { margin: 0 0 4px; font-size: 18px; }
dialog.usage-guide .usage-guide-head p { margin: 0; }

dialog.usage-guide .usage-guide-body {
  display: grid;
  /* 左边步骤栏固定宽度；拉大弹窗只放大右边图 */
  grid-template-columns: 380px minmax(0, 1fr);
  flex: 1 1 auto;
  min-height: 0;
  gap: var(--wb-space-5);
  padding: 18px 22px;
  overflow: hidden;
}
dialog.usage-guide[data-layout="single"] .usage-guide-body { grid-template-columns: minmax(0, 1fr); }

dialog.usage-guide .usage-guide-left { display: grid; gap: var(--wb-space-2); align-content: start; min-width: 0; overflow: auto; }
dialog.usage-guide .usage-guide-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--wb-space-3);
  width: 100%;
  padding: var(--wb-space-3) var(--wb-space-4);
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-button);
  background: var(--wb-surface);
  color: inherit;
  font: inherit;
  font-size: var(--wb-fs-13);
  line-height: 1.55;
  text-align: left;
  cursor: pointer;
}
dialog.usage-guide .usage-guide-step:hover { border-color: var(--wb-accent); background: var(--wb-accent-soft); }
dialog.usage-guide .usage-guide-step.is-active {
  border-color: var(--wb-accent);
  background: var(--wb-accent-soft);
  box-shadow: inset 3px 0 0 var(--wb-accent);
}
dialog.usage-guide .usage-guide-step-index {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: var(--wb-radius-pill);
  background: var(--wb-surface-muted);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
  font-weight: var(--wb-fw-900);
}
dialog.usage-guide .usage-guide-step.is-active .usage-guide-step-index {
  background: var(--wb-accent);
  color: var(--wb-btn-primary-ink);
}

dialog.usage-guide .usage-guide-right {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: var(--wb-space-2);
  min-width: 0;
  min-height: 0;
}
dialog.usage-guide .usage-guide-stage {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: var(--wb-space-3);
  border: 1px solid var(--wb-heading-divider);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-panel-bg-soft);
  overflow: hidden;
}
dialog.usage-guide .usage-guide-media {
  /* 2026-10-28：原来封了 min(52vh, 420px)，客户把弹窗拉大图也不跟着变大——
     而"拉大弹窗"的唯一目的就是看清截图。改成跟着舞台走，拉多大图就多大。
     还嫌小可以点一下进全屏预览（滚轮缩放）。 */
  max-width: 100%;
  max-height: 100%;
  border-radius: var(--wb-radius-button);
  object-fit: contain;
  cursor: zoom-in;
}
dialog.usage-guide .usage-guide-caption { margin: 0; text-align: center; }

dialog.usage-guide .usage-guide-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--wb-space-5);
  padding: 14px 22px 18px;
  border-top: 1px solid var(--wb-heading-divider);
}
/* 按钮永远靠右：有价格条时价格条在左，没有时也不会跑偏 */
dialog.usage-guide .usage-guide-foot .actions { flex: 0 0 auto; justify-content: flex-end; margin: 0 0 0 auto; gap: var(--wb-space-3); }
dialog.usage-guide .usage-guide-foot .actions a.btn { text-decoration: none; }

/* 未开通才出现的那一条：价格 + 试用状态（2026-10-29 合并功能介绍后从那边搬过来） */
dialog.usage-guide .usage-guide-plan { display: grid; gap: 2px; min-width: 0; }
dialog.usage-guide .usage-guide-plan-text {
  margin: 0;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
  font-weight: var(--wb-fw-700);
}
dialog.usage-guide .usage-guide-plan-status { margin: 0; font-size: var(--wb-fs-11); color: var(--wb-text-secondary); }
dialog.usage-guide .usage-guide-plan-status:empty { display: none; }
dialog.usage-guide .usage-guide-plan-status[data-tone="ok"] { color: var(--wb-success); }
dialog.usage-guide .usage-guide-plan-status[data-tone="error"] { color: var(--wb-danger); }

/* 全局状态区（2026-10-26）：左侧栏「页面大小」与底部菜单之间。
   所有模块的进度 / 完成 / 错误提示统一写这里；新消息闪一下，成功 3 秒淡出，错误常驻。 */
.global-status-bar {
  flex: 0 0 auto;
  display: grid;
  gap: 6px;
  min-height: 44px;
  margin: 10px 0 4px;
  border-radius: var(--wb-radius-control);
  padding: 6px 8px;
  color: var(--wb-sidebar-item-ink);
  transition: background-color .25s ease;
}

.global-status-bar.is-flashing {
  background: var(--wb-status-flash-bg);
}

.global-status-bar.is-error .global-status-text {
  color: var(--wb-status-error-ink);
  font-weight: var(--wb-fw-850);
}

.global-status-bar.is-ok .global-status-text {
  color: var(--wb-status-ok-ink);
}

.global-status-text {
  margin: 0;
  font-size: var(--wb-fs-12);
  line-height: 1.45;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.global-status-progress {
  display: block;
  height: 3px;
  border-radius: var(--wb-radius-pill);
  background: var(--wb-status-track-bg);
  overflow: hidden;
}

.global-status-progress[hidden] {
  display: none;
}

.global-status-progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--wb-accent);
  transition: width .2s ease;
}

/* ============================================================
 * 首页「我的订阅」（2026-10-27 业务方定稿）
 *   账号一行 / 模块到期表 / 套餐价格表 / 底部账单信息
 * ============================================================ */
.home-account-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--wb-space-5);
  width: 100%;
  max-width: var(--wb-panel-max-width);
  margin: 0 auto var(--wb-space-4);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
}
.home-account-line {
  display: flex;
  align-items: center;
  gap: var(--wb-space-3);
  flex-wrap: wrap;
  min-width: 0;
}
.home-account-name {
  color: var(--wb-text-primary);
  font-size: var(--wb-fs-15);
  font-weight: var(--wb-fw-850);
}
.home-account-meta { color: var(--wb-text-secondary); font-size: var(--wb-fs-12); }
.home-account-role { color: var(--wb-text-secondary); font-size: var(--wb-fs-12); font-weight: var(--wb-fw-800); }
.home-account-role.is-paid { color: var(--wb-accent-ink); }
.home-account-local { flex: none; color: var(--wb-text-secondary); font-size: var(--wb-fs-11); }

/* 2026-10-27 业务方定稿·方案 A：一整块卡片，里面两个区域紧贴、中间一条可拖的线
   （照订单档案的语言：同一个面板里分区，区域之间只有一条线，不是两张各自飘着的卡）。
   左区宽度由 --home-sub-modules-width 控制（拖动时只改这一个变量），右区吃掉剩余宽度。 */
.home-sub-card { padding: 0; overflow: hidden; }
.home-sub-account {
  display: flex;
  align-items: center;
  gap: var(--wb-space-3);
  padding: 13px var(--wb-space-5);
  border-bottom: 1px solid var(--wb-heading-divider);
}
.home-sub-account .home-account-local { margin-left: auto; }
.home-sub-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: var(--wb-space-1);
  max-width: 860px;
  /* 2026-10-27：左右内边距交给 .home-sub-region，这里不能再加，
     否则「我的订阅」标题会比账号行往右缩 6px（真机量出来的）。 */
  padding: 0 0 var(--wb-space-3);
}
.home-sub-head .section-heading-group { display: grid; gap: 1px; }
.home-sub-head h2 { margin: 0; font-size: var(--wb-fs-22); font-weight: var(--wb-fw-850); color: var(--wb-text-primary); }
.home-sub-note { color: var(--wb-text-secondary); font-size: var(--wb-fs-12); padding-bottom: 2px; }
/* 标题右边那一列：上面是模块汇总，下面是原来在页脚的那句隐私说明 */
.home-sub-head-side { display: grid; justify-items: start; gap: 3px; text-align: left; }
.home-sub-privacy { color: var(--wb-text-secondary); font-size: var(--wb-fs-11); line-height: 1.35; }

/* 套餐表下面那块空白：定制服务的说明文字（原来在首页底部整块）。
   字号和行距按这块的宽度压过一轮，别把右区撑得比左边高。 */
.home-plans-customize {
  margin-top: auto;
  padding: var(--wb-space-5) var(--wb-space-6);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-custom-panel-bg);
  color: var(--wb-custom-panel-ink);
  box-shadow: var(--wb-shadow-soft);
}
.home-plans-customize-eyebrow { margin: 0 0 6px; color: var(--wb-custom-panel-eyebrow); font-size: var(--wb-fs-11); font-weight: var(--wb-fw-800); letter-spacing: .08em; }
.home-plans-customize-title { margin: 0; color: var(--wb-custom-panel-ink); font-size: var(--wb-fs-14); font-weight: var(--wb-fw-850); line-height: 1.45; }
.home-plans-customize-lead { margin: 6px 0 0; color: var(--wb-custom-panel-muted); font-size: var(--wb-fs-12); line-height: 1.65; }
.home-plans-customize-link {
  margin-top: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--wb-custom-panel-ink);
  font: inherit;
  font-size: var(--wb-fs-12);
  font-weight: var(--wb-fw-700);
  cursor: pointer;
}
.home-plans-customize-link:hover { color: var(--wb-custom-panel-ink); text-decoration: underline; }
.home-sub-split {
  display: flex;
  align-items: stretch;
  --home-sub-modules-width: 500px;
}
.home-sub-region {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: var(--wb-space-4) var(--wb-space-5) var(--wb-space-4);
}
/* 两个区域的底栏都贴到卡片底部：内容少的那个也把「最近订单 / 退款说明」压到底，
   这样左右两区的底边和分隔线能对齐（真机上一高一低会很显眼）。 */
.home-sub-region .home-bill-strip { margin-top: auto; }
.home-sub-region--sub { flex: 0 0 auto; width: var(--home-sub-modules-width); }
.home-sub-region--plans { flex: 1 1 auto; min-width: 280px; }
.home-sub-resize {
  flex: 0 0 6px;
  position: relative;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: col-resize;
  touch-action: none;
}
.home-sub-resize::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  margin-left: -0.5px;
  border-radius: 1px;
  /* 平时就看得见一条细线（两区紧贴，没有线会分不清是一块还是两块）；
     悬停/拖动时加宽加深，提示这里能拖。 */
  background: var(--wb-heading-divider);
  transition: background 120ms ease, width 120ms ease;
}
.home-sub-resize:hover::before,
.home-sub-resize.is-resizing::before {
  width: 3px;
  margin-left: -1.5px;
  background: var(--wb-accent);
}
.home-sub-modules { min-width: 0; max-width: 860px; padding: var(--wb-space-1) 0 0; }
.home-sub-module-head,
.home-sub-module-row {
  display: grid;
  /* 2026-10-27 业务方定：模块名下带一句基础介绍（原来那一种），所以名字这一列
     改回吃剩余宽度——介绍文字会把这一列填满，不会再出现"名字和日期之间一大片空白"。
     列：图标 / 名字+介绍 / 到期时间 / 使用说明 */
  grid-template-columns: 28px minmax(0, 1fr) 104px 58px;
  gap: var(--wb-space-3);
  align-items: center;
}
.home-sub-module-head {
  min-height: 24px;
  padding: 0 var(--wb-space-2);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
  font-weight: var(--wb-fw-700);
  border-bottom: 1px solid var(--wb-heading-divider);
}
.home-sub-module-row {
  /* 2026-10-27：介绍最多两行，行高统一按两行算——一行和两行的行混在一起会参差。 */
  min-height: 66px;
  padding: var(--wb-space-1) var(--wb-space-2);
  border-bottom: 1px solid var(--wb-heading-divider);
}
.home-sub-module-row:last-child { border-bottom: 0; }
/* 2026-10-27：模块行不再可点（进模块只走左侧导航），去掉悬停高亮，免得看起来像能点。 */
.home-sub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-button);
  background: var(--wb-accent-soft);
  color: var(--wb-accent-ink);
}
.home-sub-icon svg { width: 14px; height: 14px; }
.home-sub-name-cell { display: grid; gap: 2px; min-width: 0; }
.home-sub-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--wb-text-primary); font-size: var(--wb-fs-15); font-weight: var(--wb-fw-800); }
/* 名字下面那句基础介绍（文案来自 content/modules.js 的 purpose）。
   最多两行、超出截断：介绍长短不一，行高不统一整张表会显得参差。
   Chrome 146 把 -webkit-box 改算 flow-root，line-clamp 不可靠，用 max-height 兜。 */
.home-sub-desc {
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
  font-weight: var(--wb-fw-500);
  line-height: 1.35;
  max-height: calc(1.35em * 2);
  overflow: hidden;
}
/* 急务②（2026-11-04 老板反馈「标题颜色与开通状态对不上」）：锁态行的标题原来用
   --wb-text-secondary，和已开通行的介绍文字同灰度，看着像能用。现在锁态标题降到
   --wb-text-disabled，与右侧「未开通/已到期」同一灰度；图标同时去激活底色，
   整行一眼读出「不可用」。颜色全部走令牌。 */
.home-sub-module-row.is-locked .home-sub-name { color: var(--wb-text-disabled); }
.home-sub-module-row.is-locked .home-sub-desc { color: var(--wb-text-disabled); }
.home-sub-module-row.is-locked .home-sub-icon {
  border-color: var(--wb-border);
  background: transparent;
  color: var(--wb-text-disabled);
}
.home-sub-expiry {
  display: flex;
  flex-direction: column;
  gap: 1px;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
  font-weight: var(--wb-fw-600);
  white-space: nowrap;
}
.home-sub-expiry.is-off { color: var(--wb-text-disabled); font-weight: var(--wb-fw-500); }
.home-sub-expiry.is-expired { color: var(--wb-danger); font-weight: var(--wb-fw-700); }
.home-sub-renew { color: var(--wb-link); font-size: var(--wb-fs-11); font-weight: var(--wb-fw-700); line-height: 1.1; text-decoration: none; }
.home-sub-guide {
  justify-self: end;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--wb-link);
  font: inherit;
  font-size: var(--wb-fs-11);
  font-weight: var(--wb-fw-700);
  white-space: nowrap;
  cursor: pointer;
}
.home-sub-guide:hover { color: var(--wb-accent-ink); text-decoration: underline; }

.home-price-panel { display: flex; flex-direction: column; min-width: 0; padding-left: 0; }
.home-price-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--wb-space-3); min-height: 24px; }
.home-price-head strong { color: var(--wb-text-secondary); font-size: var(--wb-fs-12); font-weight: var(--wb-fw-800); }
.home-price-table { width: 100%; height: 100%; border-collapse: collapse; table-layout: fixed; font-size: var(--wb-fs-11); }
.home-price-table th {
  padding: var(--wb-space-1) 3px;
  border-top: 1px solid var(--wb-heading-divider);
  border-bottom: 1px solid var(--wb-heading-divider);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-11);
  font-weight: var(--wb-fw-700);
  text-align: right;
}
.home-price-table th:first-child { width: 52%; text-align: left; }
.home-price-table th:nth-child(2) { width: 24%; }
.home-price-table th:last-child { width: 24%; color: var(--wb-success); }
.home-price-table td {
  padding: var(--wb-space-3) 3px;
  border-bottom: 1px solid var(--wb-heading-divider);
  vertical-align: middle;
  text-align: right;
}
.home-price-table td:first-child { text-align: left; }
.home-price-table tr:last-child td { border-bottom: 0; }
.home-plan-line { display: flex; align-items: baseline; justify-content: space-between; gap: var(--wb-space-2); min-width: 0; }
.home-plan-name { color: var(--wb-text-primary); font-size: var(--wb-fs-12); font-weight: var(--wb-fw-800); white-space: nowrap; }
.home-plan-name em { display: inline-flex; margin-left: 2px; padding: 1px 3px; border-radius: 3px; background: var(--wb-accent-soft); color: var(--wb-accent-ink); font-size: var(--wb-fs-11); font-style: normal; font-weight: var(--wb-fw-700); vertical-align: 1px; }
.home-plan-action { flex: none; color: var(--wb-link); font-size: var(--wb-fs-11); font-weight: var(--wb-fw-700); line-height: 1.2; text-decoration: none; white-space: nowrap; }
.home-plan-action.is-muted { color: var(--wb-text-disabled); font-weight: var(--wb-fw-500); }
.home-plan-desc { display: block; margin-top: 2px; overflow: hidden; color: var(--wb-text-secondary); font-size: var(--wb-fs-11); font-weight: var(--wb-fw-500); line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.home-price { color: var(--wb-text-primary); font-size: var(--wb-fs-18); font-weight: var(--wb-fw-850); line-height: 1; letter-spacing: -.02em; white-space: nowrap; }
.home-price small { color: var(--wb-text-secondary); font-size: var(--wb-fs-11); font-weight: var(--wb-fw-500); letter-spacing: 0; }
.home-price-note { margin: auto 0 0; padding-top: var(--wb-space-2); border-top: 1px solid var(--wb-heading-divider); color: var(--wb-text-secondary); font-size: var(--wb-fs-11); line-height: 1.35; }

.home-bill-strip {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: var(--wb-space-3);
  border-top: 1px solid var(--wb-heading-divider);
  border-radius: 0 0 var(--wb-radius-button) var(--wb-radius-button);
  background: var(--wb-panel-bg-soft);
  overflow: hidden;
}
.home-bill-group { display: flex; align-items: baseline; gap: var(--wb-space-2); min-width: 0; padding: 7px 12px; border-left: 1px solid var(--wb-heading-divider); color: var(--wb-text-secondary); font-size: var(--wb-fs-11); line-height: 1.3; white-space: nowrap; }
.home-bill-group:first-child { flex: 1 1 auto; border-left: 0; }
.home-bill-group:nth-child(2), .home-bill-group:nth-child(3) { flex: none; }
.home-bill-label { color: var(--wb-text-secondary); font-weight: var(--wb-fw-700); }
.home-bill-text { overflow: hidden; text-overflow: ellipsis; }
.home-bill-link { color: var(--wb-link); font-weight: var(--wb-fw-600); text-decoration: none; }
.home-bill-status { display: inline-flex; padding: 1px 5px; border-radius: var(--wb-radius-pill); background: var(--wb-success-bg); color: var(--wb-success); font-size: var(--wb-fs-11); font-weight: var(--wb-fw-700); }
.home-bill-status.is-待支付,
.home-bill-status.is-退款处理中 { background: var(--wb-warning-bg); color: var(--wb-warning); }
.home-bill-status.is-已关闭, .home-bill-status.is-已退款 { background: var(--wb-fill-soft); color: var(--wb-text-secondary); }
/* 套餐价格卡片底部：退款说明 / 发票上下排——右卡比原来窄，横排会挤成一团。 */
.home-bill-strip--plans { flex-direction: column; align-items: stretch; }
.home-bill-strip--plans .home-bill-group { flex: 0 0 auto; border-left: 0; border-top: 1px solid var(--wb-heading-divider); white-space: normal; }
.home-bill-strip--plans .home-bill-group:first-child { border-top: 0; }

.site-footer-link-button { padding: 0; border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; }

@media (max-width: 980px) {
  /* 窄屏不再左右分栏：两个区域上下叠，拖拽把手藏起来（宽度变量作废）。 */
  .home-sub-split { flex-direction: column; }
  .home-sub-region--sub { width: auto; }
  .home-sub-region--plans { border-top: 1px solid var(--wb-heading-divider); }
  .home-sub-resize { display: none; }
  .home-sub-modules { padding: 0 0 var(--wb-space-2); }
  .home-bill-strip { flex-wrap: wrap; }
  .home-bill-group { flex: 1 1 100%; border-left: 0; border-top: 1px solid var(--wb-heading-divider); }
  .home-bill-group:first-child { border-top: 0; }
}

@media (max-width: 760px) {
  .home-account-strip { flex-direction: column; align-items: flex-start; gap: var(--wb-space-1); }
  .home-sub-card { padding: var(--wb-space-4) var(--wb-space-3); }
  .home-sub-module-head, .home-sub-module-row { grid-template-columns: 28px minmax(0, 1fr) 92px 54px; }
  .home-sub-head { align-items: flex-start; flex-direction: column; gap: var(--wb-space-1); }
}

/* ============================================================
 * 2026-10-27：首页痛点区（价格页首屏搬到首页）+ 全局右上角入口
 * ============================================================ */

.home-value {
  display: grid;
  gap: var(--wb-space-3);
  padding: var(--wb-space-6) var(--wb-space-7);
}
.home-value-account {
  display: flex;
  align-items: center;
  gap: var(--wb-space-3);
  padding-bottom: var(--wb-space-2);
  border-bottom: 1px solid var(--wb-heading-divider);
}
.home-value .eyebrow { margin: 0; }
.home-value-title {
  margin: var(--wb-space-1) 0 0;
  color: var(--wb-text-primary);
  font-size: var(--wb-fs-20);
  font-weight: var(--wb-fw-850);
  line-height: 1.3;
}
.home-value-title span { color: var(--wb-text-secondary); }
.home-value-lead {
  margin: 0;
  max-width: 980px;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-13);
  line-height: 1.75;
}
.home-value-actions { display: flex; flex-wrap: wrap; gap: var(--wb-space-3); }
.home-value-points {
  display: flex;
  flex-wrap: wrap;
  gap: var(--wb-space-2) var(--wb-space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12);
}
.home-value-points li::before { content: '✓'; margin-right: 4px; color: var(--wb-accent-ink); font-weight: var(--wb-fw-900); }

.global-utility-nav {
  position: fixed;
  top: 0;
  right: var(--wb-space-5);
  z-index: var(--wb-z-sidebar);
  display: flex;
  align-items: center;
  gap: var(--wb-space-5);
  font-size: var(--wb-fs-14);
}

/* 有顶栏的页面：和「退出登录」同一行，左侧字幕自然融进背景 */
body[data-view="home"] .global-utility-nav,
body[data-view="customization"] .global-utility-nav,
body[data-view="settings"] .global-utility-nav,
body[data-view="help"] .global-utility-nav {
  top: 28px;
  right: var(--wb-space-5);
}
.global-utility-nav a,
.global-utility-nav button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--wb-text-secondary);
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: color var(--wb-transition-fast);
}
.global-utility-nav a:hover,
.global-utility-nav button:hover { color: var(--wb-accent-ink); }

@media (max-width: 920px) {
  .global-utility-nav { display: none; }
}

/* 2026-10-27：首页去掉套餐价格后，订阅区独占整张卡片宽度 */
.home-sub-split { display: block; }
.home-sub-region--sub { width: auto; }

/* 2026-10-28 业务方修订：设置 / 定制服务 / 帮助按首页的全宽口径。
 * 保留首页同样的主区内边距、卡片边框/圆角/阴影、卡片上下间距；
 * 只去掉卡片的 max-width 与左右 auto 外边距，不再出现居中大留白。
 * 不覆盖 .main 的 padding，窄屏继续沿用现有 18px 规则。 */
body[data-view="settings"] .topbar,
body[data-view="help"] .topbar,
body[data-view="customization"] .topbar,
body[data-view="settings"] .banner-area,
body[data-view="help"] .banner-area,
body[data-view="customization"] .banner-area {
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

body[data-view="settings"] .view > .card,
body[data-view="help"] .view > .card,
body[data-view="customization"] .view > .card {
  width: 100%;
  max-width: none;
  margin-left: 0;
  margin-right: 0;
}

/* 退款申请弹窗（2026-11-04 网页自助拍板）：订单摘要＋方式＋原因四选一。壳沿用弹窗语言。 */
dialog.refund-dialog {
  width: min(560px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  margin: auto;
  padding: 20px 22px;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-panel);
  background: var(--wb-surface);
  color: var(--wb-text-primary);
  box-shadow: var(--wb-shadow-modal);
}
dialog.refund-dialog::backdrop {
  background: color-mix(in srgb, var(--wb-text-primary) 42%, transparent);
}
.refund-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.refund-head h3 { margin: 0; font-size: 18px; }
.refund-close,
.refund-cancel {
  border: 1px solid var(--wb-btn-border);
  border-radius: var(--wb-radius-control, 8px);
  background: var(--wb-btn-bg);
  color: var(--wb-btn-ink);
  padding: 4px 10px;
  cursor: pointer;
}
.refund-body h4 {
  margin: 16px 0 8px;
  font-size: 13px;
  color: var(--wb-text-secondary);
}
.refund-order-option,
.refund-mode,
.refund-reason {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
  cursor: pointer;
}
.refund-order-option input,
.refund-mode input,
.refund-reason input { margin-top: 3px; }
.refund-summary {
  margin-top: 8px;
  padding: 10px 12px;
  border: 1px dashed var(--wb-border);
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.7;
  word-break: break-all;
}
.refund-muted { margin: 0; color: var(--wb-text-secondary); font-size: 12.5px; line-height: 1.6; }
.refund-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  font-size: 13.5px;
}
.refund-keep {
  min-height: 30px;
  border: 1px solid var(--wb-input-border);
  border-radius: 8px;
  background: var(--wb-input-bg);
  color: var(--wb-input-ink);
  padding: 2px 8px;
}
.refund-reason-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
}
.refund-note {
  width: 100%;
  box-sizing: border-box;
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid var(--wb-input-border);
  border-radius: 8px;
  background: var(--wb-input-bg);
  color: var(--wb-input-ink);
  font: inherit;
  resize: vertical;
}
.refund-message { min-height: 18px; margin: 10px 0 0; font-size: 13px; color: var(--wb-text-secondary); }
.refund-message[data-tone='error'] { color: var(--wb-danger); }
.refund-message[data-tone='ok'] { color: var(--wb-accent-strong, var(--wb-accent)); }
.refund-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
}
.refund-submit {
  border: 1px solid var(--wb-btn-primary-border);
  border-radius: 8px;
  background: var(--wb-btn-primary-bg);
  color: var(--wb-btn-primary-ink);
  padding: 7px 16px;
  cursor: pointer;
}
.refund-submit:disabled { cursor: default; opacity: var(--wb-disabled-opacity); }
.home-refund-entry {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.home-bill-note { font-size: var(--wb-fs-12, 12px); color: var(--wb-text-secondary); }
/* 2026-11-04：模块顶部「基础信息默认汇率」chip（轻量，不抢业务） */
.exchange-rate-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: var(--wb-space-3, 8px);
  padding: 2px 8px;
  border: 1px solid var(--wb-border);
  border-radius: var(--wb-radius-pill);
  background: var(--wb-panel-bg-soft);
  color: var(--wb-text-secondary);
  font-size: var(--wb-fs-12, 12px);
  font-weight: var(--wb-fw-500, 500);
  cursor: pointer;
  white-space: nowrap;
}
.exchange-rate-chip:hover { border-color: var(--wb-border-strong); color: var(--wb-text-primary); }
.exchange-rate-chip[data-state="missing"] { color: var(--wb-warning, var(--wb-text-secondary)); }
/* 2026-11-04：chip 独立槽位——面板重画 #pkSummaryChips / .heading-actions 不会把它清掉 */
.exchange-rate-chip-slot {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  margin-left: auto;
}
@media (max-width: 1024px) {
  .exchange-rate-chip { margin-left: 0; }
}
/* 2026-11-04 23:0x：模块视图右上角入口与内容留呼吸区（原来贴顶） */
body[data-view="product-knowledge"] .main,
body[data-view="price-list"] .main,
body[data-view="quote-contract"] .main,
body[data-view="order-archive"] .main,
body[data-view="customers"] .main,
body[data-view="base-info"] .main,
body[data-view="todo"] .main,
body[data-view="trash"] .main {
  padding-top: 64px;
}
body[data-view="product-knowledge"] .global-utility-nav,
body[data-view="price-list"] .global-utility-nav,
body[data-view="quote-contract"] .global-utility-nav,
body[data-view="order-archive"] .global-utility-nav,
body[data-view="customers"] .global-utility-nav,
body[data-view="base-info"] .global-utility-nav,
body[data-view="todo"] .global-utility-nav,
body[data-view="trash"] .global-utility-nav {
  top: 20px;
}
@media (max-width: 1024px) {
  .global-utility-nav {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: var(--wb-space-3);
    font-size: var(--wb-fs-13);
    right: var(--wb-space-3);
    top: 16px;
    max-width: calc(100vw - 24px);
  }
}
