/* ============================================================
   徐大侠 · 视觉重设计层（Theme）
   
   加载顺序：tokens.css → styles.css → theme.css
   职责分工：
     tokens.css  设计令牌单一来源（颜色/字号/间距/圆角/阴影/动效）
     styles.css  布局骨架与结构（网格、三栏、断点、DOM 相关规则）
     theme.css   视觉语言（本文件）：层次、质感、状态、动效、无障碍
   
   设计原则：
     1. v3 云白简 Indigo —— 品牌主色 #4F46E5，深色 rail 导航，琥珀点缀
     2. 层次靠光影 —— 用阴影分级与描边弱化替代重色块，界面更透气
     3. 状态可感知 —— 悬停/聚焦/选中/禁用均有明确视觉反馈
     4. 无障碍内建 —— 对比度 AA+、焦点环可见、触控 ≥44px、尊重减少动效
     5. 令牌驱动 —— 不出现任何硬编码颜色字面量，深浅色自动适配
   ============================================================ */

/* ============================================================
   1. 基础层：排版 / 链接 / 焦点 / 选区 / 滚动条
   ============================================================ */

body {
  font-family: var(--font-sans);
  font-size: var(--fs-md);
  line-height: var(--lh-snug);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  letter-spacing: .005em;
  font-feature-settings: "tnum" 0;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: var(--fs-md);
  color: inherit;
}

/* 标题：收紧字距，建立清晰层级 */
h1, h2, h3, h4, h5, h6 {
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: -.012em;
  color: var(--text);
}

/* 链接：主色 + 下划线过渡，不用颜色单独承载信息 */
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-hover); text-decoration: underline; text-underline-offset: 2px; }

code, pre, kbd { font-family: var(--font-mono); font-size: .92em; }

/* 统计数字统一等宽，避免数值变化时布局抖动 */
.dash-num, .wb-card-val, .kpi .n, .rec-time, .qw-stats b,
.fw-stat-cards b, .fst-num, .plat-score-num, .done-ticket-code {
  font-variant-numeric: var(--num);
  font-feature-settings: "tnum" 1;
  letter-spacing: -.015em;
}

/* ---------- 全局焦点可见性（WCAG 2.4.7 / 2.4.11） ----------
   仅键盘导航时显示焦点环，鼠标点击不干扰视觉 */
:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--border-focus);
  outline-offset: 2px;
  border-radius: var(--radius-xs);
}
/* 输入类控件用内描边 + 光晕，避免 outline 裁切 */
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring);
}

/* ---------- 文本选区：品牌色淡底 ---------- */
::selection { background: var(--primary-200); color: var(--neutral-900); }
[data-theme='dark'] ::selection { background: rgba(129, 140, 248, .32); color: var(--text); }

/* ---------- 滚动条：细、低调、悬停加深 ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: var(--radius-pill);
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); background-clip: content-box; }
::-webkit-scrollbar-corner { background: transparent; }
* { scrollbar-width: thin; scrollbar-color: var(--scrollbar-thumb) transparent; }

/* ---------- 页头统一节奏 ---------- */
.page-head { margin-bottom: var(--sp-8); }
.page-head h2 { font-size: var(--fs-2xl); margin: 0 0 var(--sp-2); }
.page-sub { font-size: var(--fs-sm); color: var(--text-mute); line-height: var(--lh-normal); }

/* ---------- 空态：虚线框 + 居中引导，不画插画 ---------- */
.wb-empty, .qw-empty, .api-empty, .dash-empty, .dz-empty,
.dz-prop-empty, .qw-empty-mini, .fst-empty, .qw-table-empty {
  color: var(--text-mute);
  font-size: var(--fs-sm);
  line-height: var(--lh-relax);
}
.wb-empty, .qw-empty {
  padding: var(--sp-24) var(--sp-10);
  gap: var(--sp-5);
}
.qw-empty-title, .dz-empty-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  color: var(--text-sub);
}
.qw-empty-sub, .dz-empty-sub { font-size: var(--fs-sm); max-width: 520px; }

/* ---------- 加载态：呼吸动画，避免死屏 ---------- */
.api-loading, .dash-loading, .relay-loading, .dash-error, .api-error {
  padding: var(--sp-20);
  text-align: center;
  font-size: var(--fs-md);
}
.dash-loading, .api-loading, .relay-loading {
  color: var(--text-mute);
  animation: yj-pulse 1.6s var(--ease) infinite;
}
.dash-error, .api-error { color: var(--danger); font-weight: var(--fw-medium); }

@keyframes yj-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }

/* ============================================================
   2. 顶栏与导航
   ============================================================ */

.topbar {
  height: var(--topbar-h);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--sp-12);
  gap: var(--sp-10);
  box-shadow: var(--shadow-xs);
  /* 刘海屏安全区 */
  padding-top: var(--sat);
  height: calc(var(--topbar-h) + var(--sat));
}

/* 品牌区：标识加渐变质感，字重拉开层次 */
.topbar-brand { gap: var(--sp-4); }
.logo {
  width: 26px; height: 26px;
  border-radius: var(--radius-sm);
  background: var(--primary-grad);
  color: var(--text-inv);
  box-shadow: 0 1px 3px rgba(79, 70, 229, .32), var(--shadow-inset);
  transition: transform var(--t-base) var(--ease-spring), box-shadow var(--t-base) var(--ease);
}
.logo:hover { transform: scale(1.06) rotate(-3deg); box-shadow: var(--shadow-primary); }
.brand-text {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  letter-spacing: -.02em;
  background: linear-gradient(135deg, var(--text) 30%, var(--primary-600));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme='dark'] .brand-text {
  background: linear-gradient(135deg, var(--text) 30%, var(--primary));
  -webkit-background-clip: text;
  background-clip: text;
}
.brand-sub {
  font-size: var(--fs-xs);
  color: var(--text-mute);
  padding-left: var(--sp-4);
  border-left: 1px solid var(--border);
}

/* 导航按钮：提高点击区，选中态加底部指示条 */
.nav-btn {
  position: relative;
  color: var(--text-sub);
  padding: var(--sp-4) var(--sp-6);
  min-height: 34px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav-btn:hover { background: var(--hover); color: var(--text); }
.nav-btn:active { background: var(--active); }
.nav-btn.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: var(--fw-semibold);
}
/* 选中态底部指示条，位置感更强 */
.nav-btn.is-active::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 2px;
  transform: translateX(-50%);
  width: 16px; height: 2px;
  border-radius: var(--radius-pill);
  background: var(--primary);
}

.caret { font-size: 9px; opacity: .6; transition: transform var(--t-base) var(--ease); }
.nav-group-btn[aria-expanded='true'] .caret { transform: rotate(180deg); }
.nav-group-btn[aria-expanded='true'] { background: var(--hover); color: var(--text); }

/* 下拉菜单：加阴影与内边距，入场微动画 */
.nav-menu {
  min-width: 172px;
  padding: var(--sp-2);
  gap: 1px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  animation: yj-menu-in var(--t-base) var(--ease-out);
}
@keyframes yj-menu-in {
  from { opacity: 0; transform: translateY(-4px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.nav-menu-item {
  padding: var(--sp-4) var(--sp-5);
  min-height: 36px;
  display: flex;
  align-items: center;
  border-radius: var(--radius-xs);
  font-size: var(--fs-sm);
  color: var(--text-sub);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav-menu-item:hover { background: var(--hover); color: var(--text); }
.nav-menu-item.is-active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: var(--fw-semibold);
}
.nav-menu-sep {
  margin: var(--sp-2) var(--sp-2) var(--sp-1);
  padding: var(--sp-3) var(--sp-4) var(--sp-1);
  border-top: 1px solid var(--border);
  font-size: var(--fs-2xs);
  color: var(--text-mute);
  line-height: var(--lh-snug);
}

/* 主题切换按钮：加图标语义，明确当前动作 */
.theme-toggle {
  min-width: 52px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  color: var(--text-sub);
  font-size: var(--fs-xs);
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-softer); }

/* 用户信息区 */
.user-name { font-size: var(--fs-sm); color: var(--text-sub); font-weight: var(--fw-medium); }
.badge-note {
  font-size: var(--fs-xs);
  color: var(--text-mute);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  padding: var(--sp-2) var(--sp-6);
  border-radius: var(--radius-pill);
}

/* ============================================================
   站点页脚（品牌区 + 5 列导航 + 法务条）
   参考稿：左品牌 / 右多列链接 / 底部备案与协议。
   说明：styles.css 里旧版为 position:fixed 的单行备案条，
   这里用双类选择器覆盖为常规文档流，备案信息仍位于页面最底部。
   ============================================================ */
.site-footer {
  background: var(--glass-footer);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--border);
  color: var(--text-mute);
  font-size: var(--fs-xs);
  padding: var(--sp-3) var(--sp-6) calc(var(--sp-3) + var(--sab));
}
.site-beian { color: var(--text-mute); }
.site-beian:hover { color: var(--primary); text-decoration: none; }
.site-footer-notice { color: var(--warning); }

.site-footer.site-footer-rich {
  position: static;
  display: block;
  margin-top: clamp(24px, 5vw, 56px);
  padding: clamp(32px, 4vw, 52px) var(--sp-16) 0;
  background: var(--bg-sunken);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  font-size: var(--fs-sm);
  line-height: 1.6;
}
.sf-wrap { max-width: 1200px; margin: 0 auto; }
.sf-main {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(5, minmax(0, 1fr));
  gap: var(--sp-16);
}
.sf-brand { min-width: 0; }
.sf-brand-row {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-5);
  color: var(--text);
  text-decoration: none;
}
.sf-brand-row:hover { text-decoration: none; }
.sf-logo {
  display: inline-flex;
  width: 34px;
  height: 34px;
  color: var(--primary);
}
.sf-logo svg { width: 100%; height: 100%; }
.sf-brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.sf-brand-text strong { font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.sf-brand-text em {
  font-style: normal;
  font-size: var(--fs-2xs);
  letter-spacing: .08em;
  color: var(--text-mute);
}
.sf-tagline {
  margin: var(--sp-8) 0 0;
  font-size: var(--fs-sm);
  color: var(--text-mute);
  line-height: 1.8;
}
.sf-badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3) var(--sp-5);
  margin-top: var(--sp-8);
}
.sf-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: 3px 9px 3px 7px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--panel);
  font-size: var(--fs-2xs);
  color: var(--text-mute);
  white-space: nowrap;
}
.sf-badge svg { width: 13px; height: 13px; }
.sf-col { min-width: 0; }
.sf-col-title {
  margin-bottom: var(--sp-6);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text);
  letter-spacing: .02em;
}
.sf-link {
  display: block;
  padding: 3px 0;
  font-size: var(--fs-sm);
  color: var(--text-mute);
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
a.sf-link:hover { color: var(--primary); text-decoration: none; }
.sf-link.is-muted { opacity: .55; cursor: default; }
.sf-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5) var(--sp-10);
  margin-top: clamp(28px, 4vw, 44px);
  padding: var(--sp-8) 0;
  border-top: 1px solid var(--border);
  font-size: var(--fs-xs);
}
.sf-legal,
.sf-legal-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-4) var(--sp-8);
}
.sf-legal .site-beian { color: var(--text-mute); }
.sf-legal-links .sf-link { display: inline; padding: 0; }

@media (max-width: 1200px) {
  .sf-main { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-12); }
  .sf-brand { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  .site-footer.site-footer-rich { padding: 28px var(--sp-8) 0; }
  .sf-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-10) var(--sp-8); }
  .sf-bottom { flex-direction: column; align-items: flex-start; }
}

/* 个人备案合规模式：隐藏受限入口（后端已硬拦截，前端只做入口收敛） */
body.personal-mode [data-personal-hide] { display: none !important; }

/* ============================================================
   3. 按钮系统：五级层次 + 完整状态
   ============================================================ */

/* 次按钮基线：描边 + 中性底。
   注意：本层需在未加载 styles.css 的页面（看板/入组）也能独立成立，
   故 display / cursor / 对齐等基础行为在此声明完整。
   顺序约束：基线必须先于 .btn-primary，否则同特异度下白底会盖掉主色渐变。 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  cursor: pointer;
  user-select: none;
  text-decoration: none;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  padding: var(--sp-4) var(--sp-8);
  min-height: 34px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: var(--shadow-xs);
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease);
}
/* .btn 的 display:inline-flex 优先级高于浏览器对 [hidden] 的默认 display:none，
   作者样式一律压过 UA 样式 —— 任何 .btn 想用 hidden 隐藏都会失效，这里显式恢复 */
.btn[hidden] { display: none; }
.btn:hover { text-decoration: none; }
.btn:hover:not(:disabled) {
  border-color: var(--primary-300);
  color: var(--primary);
  background: var(--primary-softer);
  box-shadow: var(--shadow-sm);
}
.btn:active:not(:disabled) { transform: translateY(1px); box-shadow: var(--shadow-xs); }

/* 主按钮：品牌渐变 + 主色投影，最高视觉权重。
   必须位于 .btn 基线之后，保证同特异度下主色生效。 */
.btn-primary {
  background: var(--primary-grad);
  color: var(--text-inv);
  border: none;
  font-weight: var(--fw-semibold);
  box-shadow: 0 1px 2px rgba(20, 24, 31, .12), var(--shadow-primary);
}
.btn-primary:hover:not(:disabled) {
  background: var(--primary-hover);
  color: var(--text-inv);
  box-shadow: 0 2px 6px rgba(20, 24, 31, .14), var(--shadow-primary-lg);
  transform: translateY(-1px);
}
.btn-primary:active:not(:disabled) {
  background: var(--primary-active);
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(20, 24, 31, .16);
}

/* 危险按钮：默认中性，悬停才转红，避免误触心理压迫 */
.btn-danger:hover:not(:disabled) {
  border-color: var(--danger);
  color: var(--danger);
  background: var(--danger-soft);
}

/* 幽灵按钮：无边框，最轻量，用于图标操作 */
.btn-ghost {
  border: none;
  background: transparent;
  color: var(--text-mute);
  min-width: var(--tap-sm);
  min-height: var(--tap-sm);
  border-radius: var(--radius-sm);
}
.btn-ghost:hover:not(:disabled) { background: var(--hover); color: var(--text); }

/* 迷你按钮：表格行内操作，保证触控可点 */
.btn-mini {
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text-sub);
  padding: var(--sp-2) var(--sp-6);
  min-height: 28px;
  border-radius: var(--radius-xs);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  transition: all var(--t-fast) var(--ease);
}
.btn-mini:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-softer);
}
.btn-mini.is-danger { color: var(--danger); border-color: var(--danger); }
.btn-mini.is-danger:hover:not(:disabled) { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }

.btn-block { width: 100%; padding: var(--sp-6); min-height: 42px; font-size: var(--fs-md); }

/* 统一禁用态：降透明度 + 禁用光标，保留可辨识 */
.btn:disabled, .btn-mini:disabled, .btn-ghost:disabled,
.btn[aria-disabled='true'], .btn-primary:disabled {
  opacity: .5;
  cursor: not-allowed;
  pointer-events: none;
  box-shadow: none;
  transform: none;
}

/* 移动端：所有按钮提到 44px 触控标准（WCAG 2.5.8） */
@media (max-width: 760px) {
  .btn, .btn-primary { min-height: var(--tap); padding: var(--sp-4) var(--sp-8); }
  .btn-mini { min-height: var(--tap-sm); }
  .btn-block { min-height: 48px; }
}

/* ============================================================
   4. 卡片与面板：统一层次语言
   ============================================================ */

/* 所有卡片类共用基础质感：白底、细描边、柔和阴影、大圆角 */
.wb-panel, .wb-card, .dash-card, .dash-chart-box, .tpl-card, .rl-card,
.plat-group, .fst-block, .create-box, .create-feat, .create-side,
.create-existing, .create-result-inner, .ocr-config-card, .ocr-test-card,
.qrgen-panel, .qrgen-preview, .qw-side, .qw-mini, .qw-code-panel,
.qw-libs, .qw-form-card, .qw-settings-main, .qw-data, .qw-comp, .qw-empty,
.fw-side, .fw-design-main, .qw-cover-edit, .rec-act, .rec-qr-card,
.tpl-search, .relay-list, .done-ticket {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* 可点击卡片：悬停抬升 + 描边转主色，暗示可交互 */
.wb-card, .tpl-card, .dash-card, .rl-card, .rec-qr-card,
.create-side-item, .qw-record-card, .dz-card {
  transition: border-color var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              transform var(--t-base) var(--ease);
}
.wb-card:hover, .tpl-card:hover, .dash-card:hover, .rl-card:hover,
.rec-qr-card:hover, .dz-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

/* 主功能入口卡：品牌渐变描边，视觉焦点 */
.wb-primary-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, var(--panel) 0%, var(--primary-softer) 130%);
  box-shadow: var(--shadow-sm);
  padding: var(--sp-10) var(--sp-10);
  position: relative;
  overflow: hidden;
}
/* 右上角装饰性光晕，增加设计感而不干扰阅读 */
.wb-primary-card::before {
  content: '';
  position: absolute;
  top: -40%; right: -12%;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-soft) 0%, transparent 70%);
  opacity: .7;
  pointer-events: none;
  transition: transform var(--t-slow) var(--ease), opacity var(--t-slow) var(--ease);
}
.wb-primary-card:hover {
  border-color: var(--primary-300);
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}
.wb-primary-card:hover::before { transform: scale(1.25); opacity: 1; }
.wb-primary-card > * { position: relative; z-index: 1; }

.wb-primary-eyebrow {
  font-size: var(--fs-2xs);
  font-weight: var(--fw-bold);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--primary);
  background: var(--primary-soft);
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--radius-pill);
}
.wb-primary-title { font-size: var(--fs-xl); font-weight: var(--fw-bold); letter-spacing: -.02em; }
.wb-primary-sub { font-size: var(--fs-xs); color: var(--text-mute); line-height: var(--lh-normal); }
.wb-primary-link {
  font-size: var(--fs-sm);
  color: var(--primary);
  font-weight: var(--fw-semibold);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  transition: transform var(--t-base) var(--ease);
}
/* 标记自带箭头（进入 →），悬停时整条链接位移以强化「可进入」暗示，不追加额外箭头 */
.wb-primary-card:hover .wb-primary-link { transform: translateX(4px); }

/* 深色 CTA 卡：保留深色调，与浅色卡片形成对比 */
.wb-card-cta {
  background: linear-gradient(135deg, #2b3242 0%, #1b2130 100%);
  border-color: transparent;
  color: var(--neutral-0);
  box-shadow: 0 4px 12px rgba(20, 24, 31, .2);
}
.wb-card-cta:hover {
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(20, 24, 31, .28);
  transform: translateY(-2px);
}
.wb-card-cta-title { font-size: var(--fs-lg); font-weight: var(--fw-semibold); }
.wb-card-cta-sub, .wb-card-cta-link { font-size: var(--fs-xs); opacity: .82; }
[data-theme='dark'] .wb-card-cta {
  background: linear-gradient(135deg, var(--primary-800) 0%, #131a2c 100%);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
}

/* 数据卡片：数值放大，标签弱化，形成强对比 */
.wb-card { padding: var(--sp-10); min-height: 120px; }
.wb-card-label {
  font-size: var(--fs-xs);
  color: var(--text-mute);
  font-weight: var(--fw-medium);
  letter-spacing: .02em;
}
.wb-card-val {
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  line-height: 1.1;
  letter-spacing: -.03em;
  color: var(--text);
}
.wb-card-sub { font-size: var(--fs-xs); color: var(--text-mute); }

.dash-card { padding: var(--sp-10); }
.dash-num { font-size: var(--fs-4xl); font-weight: var(--fw-bold); letter-spacing: -.03em; color: var(--text); }
.dash-label { font-size: var(--fs-sm); color: var(--text-sub); margin-top: var(--sp-2); }

/* 区块标题：左侧主色竖条，统一段落起始视觉 */
.dash-chart-box h3, .fst-title, .create-side-title, .qw-panel-title,
.rec-act-title, .ocr-test-card h3, .qrgen-panel h3 {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  letter-spacing: -.01em;
}
.dash-chart-box h3, .ocr-test-card h3, .qrgen-panel h3 {
  margin: 0 0 var(--sp-8);
  padding-left: var(--sp-6);
  border-left: 3px solid var(--primary);
  line-height: 1.2;
}

/* 面板内的次级标题 */
.plat-h3, .fw-sum-group, .qw-group-title, .qw-lib-group, .dz-sec-title, .tpl-side-group {
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  color: var(--text-mute);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.plat-h3 {
  font-size: var(--fs-sm);
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-sub);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-6);
}

/* 提示框：主色淡底 + 左侧强调条 */
.plat-hint, .dz-visitor-hint, .dz-scan-range, .ocr-readonly {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary-300);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  color: var(--text-sub);
  line-height: var(--lh-relax);
}
.plat-hint code {
  background: var(--panel);
  border: 1px solid var(--border);
  padding: 1px var(--sp-3);
  border-radius: var(--radius-xs);
  font-size: var(--fs-2xs);
  color: var(--primary-700);
}
[data-theme='dark'] .plat-hint code { color: var(--primary); }

/* ============================================================
   5. 表单控件：统一描边、聚焦光晕、错误态
   ============================================================ */

/* 输入类基线：白底、细描边、10px 圆角、聚焦主色光晕 */
.f-input, .f-textarea, .f-select, .bz-in, .rec-search, .rec-date,
.dz-field input, .dz-field select, .dz-field textarea,
.dz-list-row input, .plat-item input[type=text], .plat-item input[type=number],
.plat-item textarea, .wb-search, .wb-scope, .qw-data-kw .f-input,
.rl-bar select, .dz-title-input, .dz-scan-range input[type=number],
.create-text, .f-input-sm, .f-select-sm {
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  caret-color: var(--primary);
  font-size: var(--fs-sm);
  transition: border-color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease),
              background var(--t-fast) var(--ease);
}
.f-input, .f-textarea, .f-select, .bz-in {
  padding: var(--sp-5) var(--sp-6);
  font-size: var(--fs-md);
}
.f-textarea { resize: vertical; min-height: 88px; line-height: var(--lh-relax); }

/* 悬停：描边微加深，给出可交互暗示 */
.f-input:hover:not(:disabled), .f-textarea:hover:not(:disabled),
.f-select:hover:not(:disabled), .bz-in:hover:not(:disabled) {
  border-color: var(--neutral-300);
}

/* 聚焦：主色描边 + 三层光晕，焦点清晰可辨 */
.f-input:focus, .f-textarea:focus, .f-select:focus, .bz-in:focus,
.rec-search:focus, .rec-date:focus, .wb-search:focus, .wb-scope:focus,
.dz-field input:focus, .dz-field select:focus, .dz-field textarea:focus,
.dz-list-row input:focus, .plat-item input:focus, .plat-item textarea:focus,
.dz-title-input:focus, .dz-scan-range input[type=number]:focus, .create-text:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: var(--ring);
  background: var(--panel);
}

/* 禁用与只读：淡底 + 虚线描边，与可编辑态明确区分 */
.f-input:disabled, .f-textarea:disabled, .f-select:disabled,
.bz-in:disabled, input[readonly], textarea[readonly] {
  background: var(--bg-sunken);
  color: var(--text-mute);
  cursor: not-allowed;
  border-style: dashed;
}

/* 错误态：红描边 + 红色光晕 + 错误文字（同时用图标，不单靠颜色） */
.f-item.has-error .f-input, .f-item.has-error .f-textarea,
.f-item.has-error .f-select, .f-item.has-error .bz-in,
input[aria-invalid='true'], textarea[aria-invalid='true'], select[aria-invalid='true'] {
  border-color: var(--danger);
  background: var(--danger-soft);
}
.f-item.has-error .f-input:focus, .f-item.has-error .f-textarea:focus,
.f-item.has-error .f-select:focus,
input[aria-invalid='true']:focus, textarea[aria-invalid='true']:focus {
  box-shadow: var(--ring-danger);
  background: var(--panel);
}
.err-item, .create-err, .f-ocr-status.is-err {
  color: var(--danger);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  line-height: var(--lh-snug);
}
/* 错误文案前置警示符号，色觉障碍用户也能识别。
   常驻的空错误容器（如登录弹窗的 #lgErr）不渲染符号，避免视觉残留。 */
.err-item:not(:empty)::before { content: '⚠ '; font-size: 11px; }

/* 字段标签与说明：建立三级文字层次 */
.f-label {
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  color: var(--text);
  margin-bottom: var(--sp-2);
  letter-spacing: -.005em;
}
.f-desc, .dz-hint, .plat-item-desc, .create-hint, .qw-hint, .page-sub {
  font-size: var(--fs-xs);
  color: var(--text-mute);
  line-height: var(--lh-relax);
}
.req-star { color: var(--danger); font-weight: var(--fw-bold); }

/* 复选与单选：主色强调，扩大点击区 */
.dz-check, .f-opt, .qw-radio, .f-check-row {
  font-size: var(--fs-sm);
  color: var(--text-sub);
  cursor: pointer;
  border-radius: var(--radius-xs);
  transition: color var(--t-fast) var(--ease);
}
.dz-check:hover, .f-opt:hover, .qw-radio:hover { color: var(--text); }
input[type=checkbox], input[type=radio] {
  accent-color: var(--primary);
  cursor: pointer;
  width: 16px; height: 16px;
}
/* 移动端放大到 20px，便于点按 */
@media (max-width: 760px) {
  input[type=checkbox], input[type=radio] { width: 20px; height: 20px; }
}
input[type=color] {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: none;
  cursor: pointer;
  padding: 0;
}

/* 浏览器自动填充：保持主题一致，避免蓝底突兀 */
input:-webkit-autofill, input:-webkit-autofill:hover,
input:-webkit-autofill:focus, textarea:-webkit-autofill {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  transition: background-color 9999s ease-in-out 0s;
}

/* 下拉箭头美化 */
.f-select, .dz-field select, .wb-scope, .rl-bar select, .plat-item select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='%23626d7d' d='M0 0h10L5 6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px !important;
}

/* ---------- 上传拖拽区 ---------- */
.f-upload, .create-drop {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: var(--sp-10);
  text-align: center;
  transition: border-color var(--t-base) var(--ease),
              background var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.f-upload:hover, .create-drop:hover {
  border-color: var(--primary);
  background: var(--primary-softer);
}
.create-drop.is-drag {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: var(--ring);
  transform: scale(1.01);
}
.create-drop-icon { color: var(--primary); }
.create-drop-text { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--text); }
.create-drop-sub, .f-upload-tip { font-size: var(--fs-xs); color: var(--text-mute); }

/* 已上传文件条目 */
.f-upload-item, .create-file-item {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  padding: var(--sp-4) var(--sp-5);
  transition: border-color var(--t-fast) var(--ease);
}
.f-upload-item:hover, .create-file-item:hover { border-color: var(--border-strong); }
.f-upload-item.is-error, .create-file-item.is-error {
  border-color: var(--danger);
  background: var(--danger-soft);
  color: var(--danger);
}
.f-upload-item[data-uploading='1'] { opacity: .55; }
.f-upload-thumb, .create-file-item.is-thumb img {
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  object-fit: cover;
}
.f-upload-del, .create-file-del {
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-mute);
  border-radius: var(--radius-xs);
  min-width: 24px; min-height: 24px;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.f-upload-del:hover, .create-file-del:hover {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger-100);
}
.create-file-name { color: var(--text-sub); font-weight: var(--fw-medium); }
.create-file-size, .f-upload-size { color: var(--text-mute); }
/* 上传失败原因：手机上也要能完整看到（长文案换行，不截断） */
.f-upload-size.is-error-text {
  color: var(--danger);
  white-space: normal;
  line-height: 1.45;
  word-break: break-word;
  flex: 1 1 100%;
}

/* 签名画布 */
.f-sign-canvas {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--panel);
  touch-action: none;
}
.f-sign-canvas:focus-visible { box-shadow: var(--ring); }

/* ============================================================
   6. 标签页与分段控件：三种形态，语义一致
   ============================================================ */

/* 形态 A · 下划线式（记录页、平台管理、API） */
.rec-tabs, .plat-tabs, .api-tabs {
  gap: var(--sp-2);
  border-bottom: 1px solid var(--border);
}
.rec-tab, .plat-tab, .api-tab, .fw-dtab {
  position: relative;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: var(--sp-6) var(--sp-7);
  min-height: var(--tap-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-mute);
  cursor: pointer;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.rec-tab:hover, .plat-tab:hover, .api-tab:hover, .fw-dtab:hover { color: var(--text); }
.rec-tab.is-on, .plat-tab.is-active, .api-tab.is-active, .fw-dtab.is-on {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: var(--fw-semibold);
}
/* 计数徽标 */
.wb-tab i, .qw-tab i, .fw-dtab i {
  font-style: normal;
  font-size: var(--fs-2xs);
  color: var(--text-mute);
  background: var(--bg-sunken);
  padding: 0 var(--sp-3);
  border-radius: var(--radius-pill);
  margin-left: var(--sp-2);
  font-variant-numeric: var(--num);
}
.rec-tab.is-on i, .wb-tab.is-active i, .qw-tab.is-on i, .fw-dtab.is-on i {
  color: var(--text-inv);
  background: var(--primary);
}

/* 形态 B · 胶囊分段（工作台周期、活码页签） */
.wb-period, .qw-tabs, .seg, .qw-view-toggle {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 3px;
  gap: 2px;
}
.wb-period button, .qw-tab, .seg button, .qw-view-toggle button {
  border: none;
  background: transparent;
  color: var(--text-sub);
  padding: var(--sp-3) var(--sp-7);
  min-height: 30px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--t-fast) var(--ease),
              color var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease);
}
.wb-period button:hover, .qw-tab:hover, .seg button:hover,
.qw-view-toggle button:hover { color: var(--text); }
/* 选中项浮起为白底胶囊，带投影，层次分明 */
.wb-period button.is-on, .qw-tab.is-on, .seg button.on, .qw-view-toggle button.is-on {
  background: var(--panel);
  color: var(--primary);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-sm);
}
.seg button + button, .qw-view-toggle button + button { border-left: none; }

/* 形态 C · 主色填充（内容生成页类型切换） */
.create-tab {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-sub);
  padding: var(--sp-4) var(--sp-8);
  min-height: 34px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  box-shadow: var(--shadow-xs);
  transition: all var(--t-fast) var(--ease);
}
.create-tab:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-softer); }
.create-tab.is-on {
  background: var(--primary-grad);
  border-color: transparent;
  color: var(--text-inv);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-primary);
}
/* 内容类型入口条上的胶囊 */
.wb-chip {
  border: 1px solid var(--border);
  background: var(--bg-elev);
  padding: var(--sp-4) var(--sp-8);
  min-height: 36px;
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-sub);
  box-shadow: var(--shadow-xs);
  transition: all var(--t-fast) var(--ease);
}
.wb-chip:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-softer);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.wb-chip-icon { color: var(--text-mute); }
.wb-chip:hover .wb-chip-icon { color: var(--primary); }

/* 工作台面板页签：加底部分隔与背景 */
.wb-tabs {
  background: var(--bg-elev);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--sp-7);
  gap: var(--sp-1);
}
.wb-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: var(--sp-7) var(--sp-7);
  font-size: var(--fs-md);
  font-weight: var(--fw-medium);
  color: var(--text-mute);
  cursor: pointer;
  margin-bottom: -1px;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}
.wb-tab:hover { color: var(--text); }
.wb-tab.is-active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: var(--fw-semibold);
}

/* 设计器顶部页签 */
.dz-formtabs {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--sp-10);
  height: 52px;
}
.dz-formtabs-title { font-size: var(--fs-xl); font-weight: var(--fw-bold); letter-spacing: -.02em; }
.dz-formtab {
  border: none;
  background: transparent;
  color: var(--text-mute);
  padding: var(--sp-4) var(--sp-7);
  min-height: var(--tap-sm);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  transition: all var(--t-fast) var(--ease);
}
.dz-formtab:hover { color: var(--text); background: var(--hover); }
.dz-formtab.is-active {
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: var(--fw-semibold);
}

/* 设置面板左侧二级导航 */
.dz-setnav {
  background: var(--bg-elev);
  border-right: 1px solid var(--border);
  padding: var(--sp-7) var(--sp-5);
}
.dz-setnav-gtitle { font-size: var(--fs-2xs); color: var(--text-mute); font-weight: var(--fw-semibold); letter-spacing: .06em; text-transform: uppercase; }
.dz-setnav-item {
  width: 100%;
  text-align: left;
  border: none;
  background: none;
  padding: var(--sp-4) var(--sp-5);
  min-height: var(--tap-sm);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-sub);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.dz-setnav-item:hover { background: var(--hover); color: var(--text); }
.dz-setnav-item.is-on {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: var(--fw-semibold);
  box-shadow: inset 2px 0 0 var(--primary);
}
.qw-menu-item {
  border: none;
  background: none;
  text-align: left;
  padding: var(--sp-5) var(--sp-6);
  min-height: var(--tap-sm);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-sub);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.qw-menu-item:hover { background: var(--hover); color: var(--text); }
.qw-menu-item.is-on { background: var(--primary-soft); color: var(--primary); font-weight: var(--fw-semibold); }
.qw-settings-menu { padding: var(--sp-3); gap: 2px; }

/* 模板库左侧分类 */
.tpl-side { gap: var(--sp-1); }
.tpl-cat {
  border: none;
  background: none;
  padding: var(--sp-4) var(--sp-5);
  min-height: var(--tap-sm);
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  color: var(--text-sub);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.tpl-cat:hover { background: var(--hover); color: var(--text); }
.tpl-cat.is-on { background: var(--primary-soft); color: var(--primary); font-weight: var(--fw-semibold); }
.tpl-cat-n { font-size: var(--fs-2xs); color: var(--text-mute); font-variant-numeric: var(--num); }
.tpl-cat.is-on .tpl-cat-n { color: var(--primary); }
.tpl-hot-tag {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-pill);
  padding: var(--sp-2) var(--sp-5);
  font-size: var(--fs-xs);
  color: var(--text-sub);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.tpl-hot-tag:hover { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-300); }
.tpl-sec-title { font-size: var(--fs-xl); font-weight: var(--fw-bold); letter-spacing: -.02em; }
.tpl-sec-title span { font-size: var(--fs-xs); color: var(--text-mute); font-weight: var(--fw-regular); }
.tpl-new {
  border: 1.5px dashed var(--border-strong);
  background: var(--bg-elev);
  border-radius: var(--radius-lg);
  min-height: 148px;
  transition: all var(--t-base) var(--ease);
}
.tpl-new:hover { border-color: var(--primary); background: var(--primary-softer); transform: translateY(-2px); }
.tpl-new-plus { font-size: 32px; color: var(--primary); line-height: 1; font-weight: var(--fw-regular); }
.tpl-new-text { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--primary); }
.tpl-title { font-size: var(--fs-lg); font-weight: var(--fw-semibold); letter-spacing: -.01em; }
.tpl-desc { font-size: var(--fs-xs); color: var(--text-mute); line-height: var(--lh-normal); }

/* ============================================================
   7. 标签、徽章与状态：颜色 + 图标双通道编码
   ============================================================ */

/* 通用胶囊标签 */
.wb-tag, .dz-badge, .rec-status, .api-status, .plat-scope,
.plat-tag, .plat-req, .ocr-chip, .dz-status-tag, .dash-status,
.st-chip, .f-step, .tag {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  line-height: 18px;
  padding: 1px var(--sp-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-sunken);
  color: var(--text-sub);
  white-space: nowrap;
  letter-spacing: .01em;
}

/* 启用/正常：绿色系 */
.wb-tag.is-on, .rec-status.is-green, .api-status.active,
.dz-status-tag.is-pub, .dash-status.is-pub, .tag.ok, .ocr-chip.is-on {
  color: var(--success);
  background: var(--success-soft);
  border-color: var(--success-100);
  font-weight: var(--fw-semibold);
}
/* 停用/吊销：红灰系 */
.wb-tag.is-off, .rec-status.is-red, .api-status.revoked, .tag.bad {
  color: var(--danger);
  background: var(--danger-soft);
  border-color: var(--danger-100);
}
/* 主色标记 */
.rec-status.is-blue, .plat-scope, .dz-badge {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: var(--primary-200);
}
/* 待处理/警示：琥珀系 */
.rec-status.is-orange, .plat-tag, .plat-req, .site-footer-notice {
  color: var(--warning);
  background: var(--warning-soft);
  border-color: var(--warning-100);
}
/* 深色下软底改用半透明，避免过亮 */
[data-theme='dark'] .wb-tag.is-on, [data-theme='dark'] .rec-status.is-green,
[data-theme='dark'] .api-status.active, [data-theme='dark'] .tag.ok {
  background: var(--success-soft);
  border-color: rgba(74, 222, 128, .28);
}
[data-theme='dark'] .wb-tag.is-off, [data-theme='dark'] .rec-status.is-red,
[data-theme='dark'] .api-status.revoked, [data-theme='dark'] .tag.bad {
  background: var(--danger-soft);
  border-color: rgba(248, 113, 113, .28);
}
[data-theme='dark'] .rec-status.is-orange, [data-theme='dark'] .plat-tag,
[data-theme='dark'] .plat-req {
  background: var(--warning-soft);
  border-color: rgba(251, 191, 36, .28);
}
[data-theme='dark'] .rec-status.is-blue, [data-theme='dark'] .plat-scope,
[data-theme='dark'] .dz-badge {
  background: var(--primary-soft);
  border-color: rgba(129, 140, 248, .28);
}

/* 可点选的状态胶囊 */
.st-chip { cursor: pointer; user-select: none; transition: all var(--t-fast) var(--ease); }
.st-chip:hover { border-color: var(--primary-300); color: var(--primary); }
.st-chip.is-on {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: var(--fw-semibold);
}
/* 选中项前置对勾，非仅靠颜色区分 */
.st-chip.is-on::before { content: '✓'; font-size: 10px; font-weight: var(--fw-bold); }

/* 分页填写步骤胶囊 */
.f-step { padding: var(--sp-2) var(--sp-5); }
.f-step.is-on {
  color: var(--text-inv);
  background: var(--primary-grad);
  border-color: transparent;
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-primary);
}
.f-step.is-done { color: var(--primary); border-color: var(--primary-300); background: var(--primary-softer); }
.f-step.is-done::before { content: '✓ '; font-size: 10px; }
.f-step-sep { color: var(--text-mute); }
.f-page-title {
  font-size: var(--fs-lg);
  font-weight: var(--fw-semibold);
  padding-left: var(--sp-5);
  border-left: 3px solid var(--primary);
  line-height: 1.3;
}
.f-page-break {
  font-size: var(--fs-xs);
  color: var(--text-mute);
  background: var(--bg-sunken);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

/* 表单/记录/活码卡片上的小标签组 */
.dz-card-opts span, .tpl-fields span, .qw-form-tags span,
.create-existing-item {
  font-size: var(--fs-2xs);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  padding: var(--sp-1) var(--sp-4);
  border-radius: var(--radius-pill);
  color: var(--text-sub);
}
.create-existing-item svg { color: var(--text-mute); }

/* 键值对展示 */
.kv { border-bottom: 1px solid var(--border); font-size: var(--fs-sm); padding: var(--sp-4) 0; }
.kv .k { color: var(--text-mute); font-weight: var(--fw-medium); }
.kv .v { color: var(--text); }
.kv-file {
  color: var(--primary);
  border-bottom: 1px solid var(--primary-200);
  text-decoration: none;
}
.kv-file:hover { border-bottom-color: var(--primary); color: var(--primary-hover); }

/* 代码块：深色终端质感 */
.api-docs pre, .plat-key-plain {
  background: var(--neutral-900);
  color: var(--neutral-100);
  border-radius: var(--radius-sm);
  padding: var(--sp-7) var(--sp-8);
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  line-height: var(--lh-normal);
  border: 1px solid var(--neutral-800);
}
[data-theme='dark'] .api-docs pre, [data-theme='dark'] .plat-key-plain {
  background: var(--bg-sunken);
  border-color: var(--border);
}
.api-docs h3 {
  font-size: var(--fs-lg);
  border-left: 3px solid var(--primary);
  padding-left: var(--sp-5);
  margin: var(--sp-12) 0 var(--sp-4);
}
.api-docs p { font-size: var(--fs-sm); color: var(--text-sub); line-height: var(--lh-relax); }
.api-key-display {
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-sm);
  padding: var(--sp-5) var(--sp-7);
}
.api-key-display code { color: var(--primary); font-weight: var(--fw-semibold); }

/* ============================================================
   8. 表格：斑马弱化、悬停高亮、表头分层
   ============================================================ */

.rec-table, .api-table, .dz-table, .qw-table, .fw-field-table, .fw-stats-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: var(--fs-sm);
  background: var(--panel);
}
.rec-table, .api-table {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
/* 表头：淡底 + 加粗小字 + 大写间距，与数据行明确分层 */
.rec-table th, .api-table th, .dz-table th, .qw-table th,
.fw-field-table th, .fw-stats-table th, table th {
  background: var(--bg-elev);
  color: var(--text-mute);
  font-size: var(--fs-xs);
  font-weight: var(--fw-semibold);
  letter-spacing: .04em;
  text-align: left;
  padding: var(--sp-5) var(--sp-8);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.rec-table td, .api-table td, .dz-table td, .qw-table td,
.fw-field-table td, .fw-stats-table td, table td {
  padding: var(--sp-6) var(--sp-8);
  border-bottom: 1px solid var(--border);
  color: var(--text-sub);
  vertical-align: middle;
}
.rec-table tbody tr:last-child td, .api-table tr:last-child td,
.dz-table tr:last-child td, .qw-table tr:last-child td, table tbody tr:last-child td {
  border-bottom: none;
}
/* 行悬停：淡蓝底 + 左侧主色指示条 */
.rec-table tbody tr, .api-table tr, .dz-table tr, .qw-table tbody tr, table tbody tr {
  transition: background var(--t-fast) var(--ease);
}
.rec-table tbody tr:hover td, .api-table tr:hover td,
.dz-table tr:hover td, .qw-table tbody tr:hover td, table tbody tr:hover td {
  background: var(--row-hover);
}
.rec-table tbody tr:hover td:first-child, .api-table tr:hover td:first-child,
.qw-table tbody tr:hover td:first-child {
  box-shadow: inset 3px 0 0 var(--primary);
}
/* 已吊销行：整体弱化 */
tr.is-revoked td { opacity: .5; text-decoration: line-through; }
.qw-table td { max-width: 220px; word-break: break-word; }
.qw-num { color: var(--text-mute); font-variant-numeric: var(--num); }
.qw-cell-sub { font-size: var(--fs-2xs); color: var(--text-mute); }
.fw-stats-table th b { font-weight: var(--fw-semibold); color: var(--text-sub); }
.fw-stats-table th em { font-style: normal; font-size: var(--fs-2xs); color: var(--text-mute); font-weight: var(--fw-regular); }

/* 分页器 */
.pager, .qw-pager {
  font-size: var(--fs-xs);
  color: var(--text-mute);
  gap: var(--sp-5);
  padding-top: var(--sp-6);
}
.qw-pager { border-top: 1px solid var(--border); padding: var(--sp-6) var(--sp-8); }

/* 工具栏 */
.toolbar, .wb-toolbar, .qw-data-toolbar, .fw-stats-bar, .rl-bar {
  gap: var(--sp-5);
  padding: var(--sp-6) var(--sp-8);
}
.wb-toolbar, .qw-data-toolbar { border-bottom: 1px solid var(--border); }
.toolbar { padding: var(--sp-5) 0; }

/* ============================================================
   9. 弹窗、抽屉与提示
   ============================================================ */

/* 遮罩：加重暗度 + 模糊，聚焦注意力 */
/* 遮罩：加重暗度 + 模糊，聚焦注意力。
   全站弹窗统一由 app.js 以 dz-preview-mask / scan-mask 创建。 */
.dz-preview-mask, .scan-mask {
  background: var(--mask);
  backdrop-filter: blur(8px) saturate(1.1);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  animation: yj-fade-in var(--t-base) var(--ease-out);
  /* 移动端避让键盘与安全区 */
  padding: calc(var(--sp-12) + var(--sat)) var(--sp-8) calc(var(--sp-12) + var(--sab));
}
@keyframes yj-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* 弹窗主体：大圆角 + 强阴影 + 入场缩放 */
.dz-preview, .scan-box, .modal-box, .rec-recycle {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: yj-modal-in var(--t-slow) var(--ease-spring);
}
@keyframes yj-modal-in {
  from { opacity: 0; transform: translateY(12px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.dz-preview-head, .scan-head {
  padding: var(--sp-7) var(--sp-10);
  border-bottom: 1px solid var(--border);
  background: var(--bg-elev);
}
.dz-preview-title, .scan-title { font-size: var(--fs-lg); font-weight: var(--fw-semibold); letter-spacing: -.01em; }
.dz-preview-sub { font-size: var(--fs-xs); color: var(--text-mute); }
.dz-preview-body { padding: var(--sp-10); }
.scan-close {
  border: none;
  background: transparent;
  color: var(--text-mute);
  width: var(--tap-sm); height: var(--tap-sm);
  border-radius: var(--radius-sm);
  font-size: 20px;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.scan-close:hover { background: var(--hover); color: var(--text); }

/* 扫码取景框：主色描边 + 扫描线动画 */
.scan-stage { background: var(--neutral-950); border-radius: 0; }
.scan-frame {
  border: 2px solid var(--primary);
  border-radius: var(--radius);
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .42), var(--shadow-primary-lg);
  animation: yj-scan-pulse 2s var(--ease) infinite;
}
@keyframes yj-scan-pulse {
  0%, 100% { border-color: var(--primary); }
  50% { border-color: var(--primary-300); }
}
.scan-tip {
  color: var(--neutral-0);
  background: rgba(0, 0, 0, .48);
  backdrop-filter: blur(4px);
  border-radius: var(--radius-pill);
  font-size: var(--fs-xs);
  padding: var(--sp-3) var(--sp-7);
}
.scan-foot { padding: var(--sp-7) var(--sp-10); }

/* 吐司提示：深色胶囊 + 阴影 + 滑入 */
.wb-toast, .dz-toast {
  background: var(--neutral-900);
  color: var(--neutral-0);
  padding: var(--sp-5) var(--sp-10);
  border-radius: var(--radius-pill);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--neutral-800);
  max-width: min(80vw, 420px);
  text-align: center;
  bottom: calc(30px + var(--sab));
  transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease-spring);
}
[data-theme='dark'] .wb-toast, [data-theme='dark'] .dz-toast {
  background: var(--bg-elev);
  color: var(--text);
  border-color: var(--border-strong);
}
.wb-toast.show, .dz-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 二维码弹窗 */
.qrform-url {
  font-size: var(--fs-xs);
  color: var(--text-sub);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-4) var(--sp-5);
  font-family: var(--font-mono);
  word-break: break-all;
}
/* 二维码必须白底才能保证可扫，深色模式下也保持 */
.qrform-qr, .qrgen-preview img, .rl-qr img, .bz-qr canvas,
.create-result-qr, .qw-code-img img, .qw-form-qr img {
  background: var(--neutral-0);
  border-radius: var(--radius-xs);
}
.qw-code-img { background: var(--neutral-0); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--sp-6); }
.qw-code-url { font-size: var(--fs-2xs); color: var(--text-mute); font-family: var(--font-mono); }

/* 回收中心弹窗 */
.rec-recycle-row { border-bottom: 1px solid var(--border); padding: var(--sp-6) 0; }
.rec-recycle-row:last-child { border-bottom: none; }
.rec-recycle-title { font-weight: var(--fw-semibold); font-size: var(--fs-md); }
.rec-recycle-meta { font-size: var(--fs-xs); color: var(--text-mute); }

/* 浮层菜单（富文本添加字段等） */
.fw-act-menu, .fw-field-menu {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: var(--sp-2);
  animation: yj-menu-in var(--t-base) var(--ease-out);
}
.fw-act-menu button {
  border: none;
  background: none;
  padding: var(--sp-4) var(--sp-5);
  min-height: var(--tap-sm);
  font-size: var(--fs-sm);
  border-radius: var(--radius-xs);
  color: var(--text-sub);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.fw-act-menu button:hover:not([disabled]) { background: var(--hover); color: var(--text); }
.fw-act-menu button[disabled] { opacity: .4; cursor: not-allowed; }

/* 帮助气泡标记 */
.fw-q {
  width: 15px; height: 15px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--text-mute);
  font-size: 10px;
  cursor: help;
  transition: all var(--t-fast) var(--ease);
}
.fw-q:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-softer); }

/* ============================================================
   10. 填写端与公开页：移动端优先，触控友好
   ============================================================ */

.public-body { background: var(--bg); }
.filler { max-width: var(--content-narrow); padding: var(--sp-12) var(--sp-8) calc(var(--sp-32) + var(--sab)); }
.filler-head { margin-bottom: var(--sp-10); }
.filler-title { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: -.02em; margin: 0 0 var(--sp-3); }
.filler-desc { font-size: var(--fs-sm); color: var(--text-sub); line-height: var(--lh-relax); }
.filler-body {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-10);
  box-shadow: var(--shadow-sm);
}
.filler-banner {
  width: calc(100% + 32px);
  margin: -24px -16px var(--sp-8);
  max-height: 220px;
  object-fit: cover;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.f-item { padding: var(--sp-7) 0; border-bottom: 1px solid var(--border); }
.f-item:last-of-type { border-bottom: none; }
.f-item.is-locked .f-control input,
.f-item.is-locked .f-control textarea,
.f-item.is-locked .f-control select {
  background: var(--bg-sunken);
  color: var(--text-sub);
  border-style: dashed;
}
.f-locked-tip { color: var(--success); font-size: var(--fs-2xs); font-weight: var(--fw-medium); }
.f-locked-tip::before { content: '✓ '; }

/* 选项：移动端整行提到 44px 可点标准 */
.f-opt { padding: var(--sp-4) var(--sp-2); gap: var(--sp-5); font-size: var(--fs-md); min-height: 36px; }
.f-opt:hover { background: var(--hover); }
@media (max-width: 760px) {
  .f-opt { min-height: var(--tap); padding: var(--sp-5) var(--sp-3); font-size: var(--fs-lg); }
  /* 16px 防止 iOS Safari 聚焦输入框时自动放大页面 */
  .f-input, .f-textarea, .f-select { font-size: 16px; padding: var(--sp-6); }
}

/* 评分星星 */
.f-rate-star span { font-size: 28px; color: var(--neutral-300); transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease-spring); }
/* 评分星星专用色（评分场景通用金色，非品牌色，不影响换肤） */
.f-rate-star { --star-color: #e8a33d; }
.f-rate-star:hover span, .f-rate-star:hover ~ .f-rate-star span { color: var(--star-color); transform: scale(1.08); }
.f-rate-star:has(input:checked) span, .f-rate-star:has(input:checked) ~ .f-rate-star span { color: var(--star-color); }

/* NPS */
.f-nps { gap: var(--sp-3); flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--sp-2); }
.f-nps-btn { flex: none; }
.f-nps-btn span {
  width: 44px; height: 44px;
  border-radius: var(--radius-sm);
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  background: var(--panel);
  border: 1px solid var(--border-strong);
  color: var(--text-sub);
  transition: all var(--t-fast) var(--ease);
}
.f-nps-btn:hover span { border-color: var(--primary); color: var(--primary); background: var(--primary-softer); transform: translateY(-1px); }
.f-nps-btn:has(input:checked) span {
  background: var(--primary-grad);
  border-color: transparent;
  color: var(--text-inv);
  box-shadow: var(--shadow-primary);
}
.f-nps-labels { font-size: var(--fs-xs); color: var(--text-mute); }

/* 矩阵题 */
.f-matrix { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.f-matrix th, .f-matrix td { border: 1px solid var(--border); padding: var(--sp-4) var(--sp-5); font-size: var(--fs-sm); }
.f-matrix th { background: var(--bg-elev); font-weight: var(--fw-semibold); color: var(--text-sub); }

/* OCR 识别结果 */
.f-ocr-result {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: var(--sp-5) var(--sp-6);
}
.f-ocr-kv { font-size: var(--fs-sm); }
.f-ocr-kv span { color: var(--text-mute); }
.f-ocr-kv b { font-weight: var(--fw-semibold); color: var(--text); }
.f-ocr-status { font-size: var(--fs-sm); color: var(--text-mute); }
.f-ocr-status.is-warn { color: var(--warning); font-weight: var(--fw-medium); }
.f-hint-img { border-radius: var(--radius-sm); border: 1px solid var(--border); }

/* 扫码填空按钮 */
.f-scan-btn {
  width: var(--tap-sm); height: var(--tap-sm);
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: var(--radius-xs);
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.f-scan-btn:hover { background: var(--primary); color: var(--text-inv); }
@media (max-width: 760px) { .f-scan-btn { width: 44px; height: 44px; } }

/* 访客识别提示条 */
.visitor-banner {
  border-radius: var(--radius);
  padding: var(--sp-5) var(--sp-7);
  font-size: var(--fs-sm);
  line-height: var(--lh-normal);
  border: 1px solid var(--border);
  background: var(--bg-sunken);
  color: var(--text-sub);
}
.visitor-banner.is-new { background: var(--primary-softer); border-color: var(--primary-200); color: var(--primary-700); }
.visitor-banner.is-new .visitor-banner-icon { background: var(--primary); color: var(--text-inv); }
.visitor-banner.is-recognized { background: var(--success-soft); border-color: var(--success-100); color: var(--success-600); }
.visitor-banner.is-recognized .visitor-banner-icon { background: var(--success); color: var(--text-inv); }
[data-theme="dark"] .visitor-banner.is-new { color: var(--primary); }
[data-theme="dark"] .visitor-banner.is-recognized { color: var(--success); }
.visitor-banner-icon { width: 18px; height: 18px; border-radius: 50%; font-size: 11px; font-weight: var(--fw-bold); }

/* 接龙名单 */
.relay-list { border-radius: var(--radius-lg); overflow: hidden; }
.relay-head { background: var(--bg-elev); font-size: var(--fs-sm); color: var(--text-sub); padding: var(--sp-5) var(--sp-7); }
.relay-head b { color: var(--primary); font-variant-numeric: var(--num); }
.relay-row { border-bottom: 1px solid var(--border); padding: var(--sp-4) var(--sp-7); font-size: var(--fs-sm); }
.relay-row:last-child { border-bottom: none; }
.relay-row:hover { background: var(--row-hover); }
.relay-no { color: var(--text-mute); font-variant-numeric: var(--num); }
.relay-name { font-weight: var(--fw-semibold); color: var(--text); }
.relay-summary { color: var(--text-sub); }
.relay-time { color: var(--text-mute); font-variant-numeric: var(--num); }

/* 字段统计分布条 */
.fst-block { padding: var(--sp-10); }
.fst-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.fst-title span { font-size: var(--fs-xs); color: var(--text-mute); font-weight: var(--fw-regular); }
.fst-label { color: var(--text-sub); font-size: var(--fs-sm); }
.fst-bar { height: 8px; background: var(--bg-sunken); border-radius: var(--radius-pill); overflow: hidden; }
.fst-bar i {
  display: block; height: 100%;
  background: var(--primary-grad);
  border-radius: var(--radius-pill);
  transition: width var(--t-slow) var(--ease-out);
}
.fst-num { font-size: var(--fs-xs); color: var(--text); font-variant-numeric: var(--num); }
.fst-num em { font-style: normal; color: var(--text-mute); }
.fst-legend-row { font-size: var(--fs-xs); }
.fst-legend-label { color: var(--text-sub); }
.fst-legend-num { color: var(--text); font-variant-numeric: var(--num); }
.fst-trend { border-top: 1px dashed var(--border); }
.fst-trend-title { font-size: var(--fs-xs); color: var(--text-mute); }

/* ---------- 提交成功页（统一原双重定义冲突：取 64px 实心图标方案） ---------- */
.filler-done { text-align: center; padding: var(--sp-20) var(--sp-10); }
.done-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--success);
  color: var(--text-inv);
  font-size: 34px;
  line-height: 64px;
  margin: 0 auto var(--sp-8);
  box-shadow: 0 6px 20px rgba(26, 127, 69, .26);
  animation: yj-pop-in var(--t-slow) var(--ease-spring);
}
@keyframes yj-pop-in {
  from { opacity: 0; transform: scale(.5); }
  to   { opacity: 1; transform: scale(1); }
}
/* 勾选动画形态：容器透明，由 SVG 描边呈现 */
.filler-done.is-check .done-icon { background: transparent; box-shadow: none; }
.done-check { stroke: var(--success); fill: none; stroke-width: 3; }
.done-title { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: -.02em; color: var(--text); margin-bottom: var(--sp-3); }
.done-sub { font-size: var(--fs-md); color: var(--text-mute); line-height: var(--lh-relax); }
.done-rich { font-size: var(--fs-md); color: var(--text-sub); line-height: var(--lh-relax); text-align: left; }
.done-rich img { border-radius: var(--radius-sm); }
.done-actions { gap: var(--sp-5); margin-top: var(--sp-12); }
.done-tip {
  background: var(--success-soft);
  border: 1px solid var(--success-100);
  color: var(--success-600);
  border-radius: var(--radius-sm);
  font-size: var(--fs-xs);
  padding: var(--sp-4) var(--sp-6);
}
[data-theme="dark"] .done-tip { color: var(--success); }
/* 核销码：等宽大字，便于人工核对 */
.done-ticket {
  background: var(--bg-sunken);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  padding: var(--sp-10);
}
.done-ticket-label { font-size: var(--fs-xs); color: var(--text-mute); }
.done-ticket-code {
  font-size: var(--fs-3xl);
  font-weight: var(--fw-bold);
  letter-spacing: .12em;
  font-family: var(--font-mono);
  color: var(--primary);
}
.done-ticket-tip { font-size: var(--fs-xs); color: var(--text-mute); }

/* ============================================================
   11. 记录列表与工作台列表行
   ============================================================ */

.rec { max-width: 1000px; padding: var(--sp-12) var(--sp-8) calc(var(--sp-32) + var(--sab)); }
.rec-head h2 { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: -.02em; }
.rec-count { font-size: var(--fs-sm); color: var(--text-mute); font-variant-numeric: var(--num); }
.rec-list { border-radius: var(--radius-lg); overflow: hidden; }
.rec-item {
  padding: var(--sp-7) var(--sp-10);
  min-height: 64px;
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.rec-item:last-child { border-bottom: none; }
.rec-item:hover { background: var(--row-hover); box-shadow: inset 3px 0 0 var(--primary); }
.rec-submitter { font-weight: var(--fw-semibold); font-size: var(--fs-md); }
.rec-time { font-size: var(--fs-xs); color: var(--text-mute); font-variant-numeric: var(--num); }
.rec-item-body { font-size: var(--fs-sm); color: var(--text-sub); line-height: var(--lh-relax); }
.rec-empty { color: var(--text-mute); font-size: var(--fs-xs); }
.rec-field { font-size: var(--fs-sm); line-height: var(--lh-relax); }
.rec-field-k { color: var(--text-mute); }
.rec-field-v { color: var(--text-sub); }
.rec-field-v.is-hl { font-weight: var(--fw-semibold); color: var(--text); }
.rec-field-more { font-size: var(--fs-xs); color: var(--text-mute); }
.rec-img {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.rec-img:hover { transform: scale(1.04); box-shadow: var(--shadow); }
.rec-img img { width: 100%; height: 100%; object-fit: cover; }
.rec-bulk { font-size: var(--fs-sm); color: var(--text-sub); }
.rec-date-sep { font-size: var(--fs-xs); color: var(--text-mute); }

/* 工作台列表行：图标 + 主信息 + 统计 + 操作 */
.wb-row {
  padding: var(--sp-7) var(--sp-10);
  min-height: 68px;
  border-bottom: 1px solid var(--border);
  gap: var(--sp-8);
  transition: background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.wb-row:last-child { border-bottom: none; }
.wb-row:hover, .wb-row:focus-within { background: var(--row-hover); box-shadow: inset 3px 0 0 var(--primary); }
.wb-row-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius);
  background: var(--primary-softer);
  border: 1px solid var(--primary-100);
  color: var(--primary);
  transition: all var(--t-base) var(--ease);
}
.wb-row:hover .wb-row-icon { background: var(--primary-soft); border-color: var(--primary-200); transform: scale(1.05); }
[data-theme="dark"] .wb-row-icon { background: var(--primary-soft); border-color: var(--border); }
.wb-row-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); color: var(--text); letter-spacing: -.005em; }
.wb-row-meta { font-size: var(--fs-xs); color: var(--text-mute); }
.wb-row-stats { font-size: var(--fs-xs); color: var(--text-mute); font-variant-numeric: var(--num); }
.wb-row-stats b { color: var(--text); font-weight: var(--fw-bold); font-size: var(--fs-sm); }
.wb-row-label { font-size: var(--fs-2xs); color: var(--text-mute); letter-spacing: .02em; }
.wb-row-value { font-size: var(--fs-xs); color: var(--text-sub); }
.wb-list { min-height: 120px; }

/* 行内操作默认弱化，悬停行时显现，降低视觉噪音 */
.wb-row-ops { gap: var(--sp-3); opacity: .55; transition: opacity var(--t-fast) var(--ease); }
.wb-row:hover .wb-row-ops, .wb-row:focus-within .wb-row-ops { opacity: 1; }
/* 触屏无悬停态，操作按钮常驻可见 */
@media (hover: none) { .wb-row-ops { opacity: 1; } }

/* 关联活码卡片 */
.rl-card { padding: var(--sp-10); gap: var(--sp-10); }
.rl-qr img { border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--neutral-0); }
.rl-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); letter-spacing: -.005em; }
.rl-meta { font-size: var(--fs-xs); color: var(--text-mute); line-height: var(--lh-relax); }
.rl-dyn { border-top: 1px dashed var(--border); }
.rl-dyn-item { font-size: var(--fs-xs); color: var(--text-sub); }
.rl-dyn-item b { color: var(--text); font-weight: var(--fw-semibold); }
.rl-dyn-all { font-size: var(--fs-xs); color: var(--primary); font-weight: var(--fw-medium); background: none; border: none; cursor: pointer; }
.rl-dyn-all:hover { text-decoration: underline; }
.rl-op {
  width: var(--tap-sm); height: var(--tap-sm);
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-sm);
  color: var(--text-sub);
  transition: all var(--t-fast) var(--ease);
}
.rl-op:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-softer); }
.rl-pick-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-5) var(--sp-6);
  background: var(--panel);
  font-size: var(--fs-sm);
  transition: all var(--t-fast) var(--ease);
}
.rl-pick-item:hover { border-color: var(--primary); background: var(--primary-softer); }
.rl-pick-meta { font-size: var(--fs-2xs); color: var(--text-mute); }
.rl-end { font-size: var(--fs-xs); color: var(--text-mute); }

/* 注册用户状态文字：颜色 + 符号双通道 */
.ru-status-on { color: var(--success); font-size: var(--fs-xs); font-weight: var(--fw-medium); }
.ru-status-on::before { content: '● '; font-size: 8px; }
.ru-status-off { color: var(--text-mute); font-size: var(--fs-xs); }
.ru-status-off::before { content: '○ '; font-size: 8px; }

/* ============================================================
   12. 表单设计器：三栏工作区
   ============================================================ */

.dz-lib, .dz-prop { background: var(--panel); }
.dz-lib { border-right: 1px solid var(--border); }
.dz-prop { border-left: 1px solid var(--border); }
.dz-lib-head { padding: var(--sp-7) var(--sp-8) var(--sp-5); border-bottom: 1px solid var(--border); background: var(--bg-elev); }
.dz-title-input { padding: var(--sp-4) var(--sp-5); font-weight: var(--fw-semibold); font-size: var(--fs-md); width: 100%; }
.dz-sub { font-size: var(--fs-xs); color: var(--text-mute); }

.dz-cat-title {
  font-size: var(--fs-2xs);
  color: var(--text-mute);
  font-weight: var(--fw-semibold);
  letter-spacing: .06em;
  text-transform: uppercase;
  background: var(--panel);
  padding: var(--sp-4) var(--sp-8) var(--sp-3);
}
.dz-comp {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--panel);
  padding: var(--sp-5) var(--sp-3);
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease),
              box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.dz-comp:hover { border-color: var(--primary-300); background: var(--primary-softer); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.dz-comp:active { cursor: grabbing; transform: scale(.97); }
.dz-comp-icon { color: var(--text-mute); }
.dz-comp:hover .dz-comp-icon { color: var(--primary); }
.dz-comp-label { font-size: var(--fs-xs); color: var(--text-sub); }
.dz-comp:hover .dz-comp-label { color: var(--primary); font-weight: var(--fw-medium); }
.dz-card-icon { color: var(--text-mute); }

.dz-canvas { background: var(--bg); }
.dz-canvas-head { background: var(--panel); border-bottom: 1px solid var(--border); padding: 0 var(--sp-8); box-shadow: var(--shadow-xs); }
.dz-count { font-size: var(--fs-sm); color: var(--text-mute); font-variant-numeric: var(--num); }
.dz-status-tag {
  font-size: var(--fs-2xs);
  color: var(--text-mute);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 1px var(--sp-4);
}
.dz-status-tag.is-pub { color: var(--success); background: var(--success-soft); border-color: var(--success-100); }
.dz-empty { border: 2px dashed var(--border-strong); border-radius: var(--radius-lg); padding: var(--sp-32) var(--sp-10); }

/* 画布字段卡：选中态主色描边 + 光晕 */
.dz-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-xs); margin-bottom: var(--sp-6); overflow: hidden; }
.dz-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.dz-card.is-selected { border-color: var(--primary); box-shadow: var(--ring), var(--shadow-sm); }
.dz-card-bar { background: var(--bg-elev); border-bottom: 1px solid var(--border); padding: var(--sp-4) var(--sp-7); }
.dz-card.is-selected .dz-card-bar { background: var(--primary-softer); }
.dz-card-type { font-size: var(--fs-xs); color: var(--text-mute); font-weight: var(--fw-medium); }
.dz-card-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.dz-card-desc { font-size: var(--fs-xs); color: var(--text-mute); }
.dz-card-body { padding: var(--sp-6); }
.dz-children { border-left: 2px solid var(--border); padding-left: var(--sp-6); }
.dz-card-ops { gap: var(--sp-2); opacity: 0; transition: opacity var(--t-fast) var(--ease); }
.dz-op {
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: var(--radius-xs);
  width: 24px; height: 24px;
  color: var(--text-sub);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.dz-op:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-softer); }
.dz-op-del:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }
@media (hover: none) { .dz-card-ops { opacity: 1; } }

/* 属性面板 */
.dz-prop-head { border-bottom: 1px solid var(--border); background: var(--bg-elev); font-size: var(--fs-md); font-weight: var(--fw-semibold); padding: 0 var(--sp-8); height: 48px; }
.dz-prop-sec { padding: var(--sp-7) var(--sp-8); border-bottom: 1px solid var(--border); }
.dz-prop-empty { padding: var(--sp-20) var(--sp-10); font-size: var(--fs-sm); line-height: var(--lh-relax); }
.dz-field { gap: var(--sp-4); margin-bottom: var(--sp-5); }
.dz-field > span { font-size: var(--fs-sm); color: var(--text-sub); font-weight: var(--fw-medium); flex: 0 0 66px; }
.dz-field input:not([type=radio]):not([type=checkbox]):not(.dz-input-fixed), .dz-field select, .dz-field textarea { padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); flex: 1; min-width: 0; }
/* 单选/复选保持控件自身尺寸，不被 flex:1 撑满整行（否则圆点在行中间、文案飘到最右） */
.dz-field input[type=radio], .dz-field input[type=checkbox] { flex: none; }
/* 行内定宽输入（次数、上限等）：按内联 width 定宽，不拉满整行 */
.dz-field > input.dz-input-fixed { flex: 0 0 auto; }
.dz-list-row input { flex: 1; padding: var(--sp-3) var(--sp-4); font-size: var(--fs-sm); min-width: 0; }
.dz-field-select-list { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--sp-4); background: var(--bg-elev); }
.dz-hintimg-preview { border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--neutral-0); }
.dz-hintimg-empty { font-size: var(--fs-xs); color: var(--text-mute); }

/* 设置面板分组卡 */
.dz-setgroup { border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; background: var(--panel); box-shadow: var(--shadow-xs); }
.dz-setgroup-head { background: var(--bg-elev); padding: var(--sp-6) var(--sp-8); }
.dz-setgroup-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
/* 设置面板的字段标签按内容占宽：66px 固定宽会把「每人每天次数」这类中文标签挤成两行 */
.dz-setrow-body .dz-field > span { flex: 0 0 auto; min-width: 66px; white-space: nowrap; }
.dz-setrow { padding: var(--sp-7) var(--sp-8); border-top: 1px solid var(--border); }
.dz-setrow:first-child { border-top: none; }
.dz-setrow-label { font-size: var(--fs-md); color: var(--text); font-weight: var(--fw-medium); }
.dz-setrow-state {
  padding: 1px var(--sp-5);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-medium);
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  color: var(--text-mute);
  border: 1px solid var(--border);
}
.dz-setrow-state.is-on { background: var(--primary-soft); color: var(--primary); border-color: var(--primary-200); font-weight: var(--fw-semibold); }
.dz-settings-foot { border-top: 1px solid var(--border); background: var(--bg-elev); padding: var(--sp-7) var(--sp-12); }
.dz-setmain-top { border-bottom: 1px solid var(--border); background: var(--panel); padding: var(--sp-6) var(--sp-12); }
.dz-setmain-title { font-size: var(--fs-lg); font-weight: var(--fw-semibold); letter-spacing: -.01em; }

/* 手机预览外壳 */
.dz-phone { background: var(--neutral-900); border-radius: 38px; padding: 10px; box-shadow: var(--shadow-lg); }
.dz-phone-bar { color: var(--neutral-0); font-size: var(--fs-xs); }
.dz-phone > .filler { border-radius: 28px; background: var(--fill-bg, var(--bg)); }
.dz-prev-label { font-size: var(--fs-sm); color: var(--text-mute); font-weight: var(--fw-medium); }

/* ============================================================
   13. 平台管理 / API / OCR / 批量活码
   ============================================================ */

.plat { padding: var(--sp-10) var(--sp-12); max-width: 1100px; }
.plat-body { padding-bottom: var(--sp-20); }
.plat-group { padding: var(--sp-8) var(--sp-10); }
.plat-item-head { gap: var(--sp-4); }
.plat-item-label { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text); }
.plat-item-key {
  font-size: var(--fs-2xs);
  color: var(--text-mute);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  padding: 1px var(--sp-4);
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
}
.plat-item input[type=text], .plat-item input[type=number], .plat-item textarea { width: 100%; padding: var(--sp-4) var(--sp-5); }
.plat-item textarea { font-family: var(--font-mono); font-size: var(--fs-xs); line-height: var(--lh-normal); }
.plat-actions { gap: var(--sp-4); }
/* 未保存标记：琥珀色 + 前置圆点，避免仅靠文字 */
.plat-dirty { font-size: var(--fs-xs); color: var(--warning); font-weight: var(--fw-semibold); }
.plat-dirty::before { content: '● '; font-size: 9px; }

/* 合规体检评分卡：通过/未通过用语义色块 + 图标 */
.plat-score { padding: var(--sp-10); border-radius: var(--radius-lg); gap: var(--sp-10); }
.plat-score.is-pass { background: var(--success-soft); border-color: var(--success-100); }
.plat-score.is-fail { background: var(--danger-soft); border-color: var(--danger-100); }
.plat-score-num { font-size: var(--fs-5xl); font-weight: var(--fw-bold); letter-spacing: -.04em; line-height: 1; }
.plat-score.is-pass .plat-score-num { color: var(--success); }
.plat-score.is-fail .plat-score-num { color: var(--danger); }
.plat-score-title { font-size: var(--fs-lg); font-weight: var(--fw-bold); letter-spacing: -.01em; }
.plat-score.is-pass .plat-score-title::before { content: '✓ '; color: var(--success); }
.plat-score.is-fail .plat-score-title::before { content: '✕ '; color: var(--danger); }
.plat-score-sub { font-size: var(--fs-xs); color: var(--text-mute); }
.plat-ok { color: var(--success); font-weight: var(--fw-bold); }
.plat-bad { color: var(--danger); font-weight: var(--fw-bold); }
.plat-detail { font-size: var(--fs-xs); color: var(--text-mute); word-break: break-all; }

/* 违规项：左侧强调条 + 语义软底 */
.plat-violation { padding: var(--sp-5) var(--sp-6); border-radius: var(--radius-sm); border-left: 3px solid; }
.plat-violation.is-error { background: var(--danger-soft); border-color: var(--danger); }
.plat-violation.is-warning { background: var(--warning-soft); border-color: var(--warning); }
.plat-violation-msg { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.plat-violation.is-error .plat-violation-msg { color: var(--danger); }
.plat-violation.is-warning .plat-violation-msg { color: var(--warning); }
.plat-violation-msg::before { font-size: var(--fs-xs); margin-right: var(--sp-2); }
.plat-violation.is-error .plat-violation-msg::before { content: '✕'; }
.plat-violation.is-warning .plat-violation-msg::before { content: '⚠'; }
.plat-violation-fix { font-size: var(--fs-xs); color: var(--text-sub); line-height: var(--lh-normal); }

.plat-feature { font-size: var(--fs-sm); padding: var(--sp-4) 0; border-bottom: 1px dashed var(--border); }
.plat-feature:last-child { border-bottom: none; }
.plat-feature-status { font-size: var(--fs-xs); color: var(--text-mute); }

/* OCR 服务商选择卡 */
.ocr-provider {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--panel);
  padding: var(--sp-5) var(--sp-6);
  transition: all var(--t-fast) var(--ease);
}
.ocr-provider:hover:not(:disabled) { border-color: var(--primary-300); background: var(--primary-softer); }
.ocr-provider b { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.ocr-provider span { font-size: var(--fs-2xs); color: var(--text-mute); line-height: var(--lh-snug); }
.ocr-provider.is-on { border-color: var(--primary); background: var(--primary-softer); box-shadow: var(--ring); }
.ocr-provider.is-on b { color: var(--primary); }
.ocr-provider:disabled { opacity: .55; cursor: not-allowed; }
.ocr-config-card, .ocr-test-card { padding: var(--sp-10); }
.ocr-actions, .ocr-test-area { gap: var(--sp-5); }

/* 批量活码 */
.bz-form { gap: var(--sp-5); font-size: var(--fs-sm); }
.bz-form label { color: var(--text-sub); font-weight: var(--fw-medium); gap: var(--sp-2); }
.bz-qr canvas { border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--neutral-0); }
.bz-fields .btn-mini[disabled] { opacity: .35; pointer-events: none; }

/* 二维码生成页 */
.qrgen { gap: var(--sp-10); }
.qrgen-panel { padding: var(--sp-10); }
.qrgen-panel h3 { font-size: var(--fs-lg); }
.qrgen-preview { padding: var(--sp-10); background: var(--panel); }
.qrgen-preview img { image-rendering: pixelated; }

/* 数据看板柱条 */
.dash-bar-label { font-size: var(--fs-sm); color: var(--text-sub); }
.dash-bar-track { height: 22px; background: var(--bg-sunken); border-radius: var(--radius-xs); overflow: hidden; }
.dash-bar-fill { background: var(--primary-grad); border-radius: var(--radius-xs); transition: width var(--t-slow) var(--ease-out); }
.dash-bar-value { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--text); font-variant-numeric: var(--num); }
.dash-stat { background: var(--bg-sunken); border-radius: var(--radius); padding: var(--sp-6); }
.dash-stat-label { font-size: var(--fs-xs); color: var(--text-mute); }
.dash-stat-value { font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--text); font-variant-numeric: var(--num); letter-spacing: -.02em; }

/* ---------- 富文本编辑器（成功页内容） ---------- */
.fw-rich { border: 1px solid var(--border-strong); border-radius: var(--radius); overflow: hidden; background: var(--panel); }
.fw-rich-bar { background: var(--bg-elev); border-bottom: 1px solid var(--border); padding: var(--sp-3) var(--sp-4); gap: 2px; }
.fw-rich-bar button {
  min-width: 28px; height: 28px;
  border: none; background: none;
  border-radius: var(--radius-xs);
  font-size: var(--fs-xs);
  color: var(--text-sub);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.fw-rich-bar button:hover { background: var(--hover); color: var(--text); }
.fw-rich-sep { width: 1px; height: 14px; background: var(--border); margin: 0 var(--sp-2); }
.fw-rich-body {
  min-height: 110px;
  padding: var(--sp-6);
  font-size: var(--fs-md);
  line-height: var(--lh-relax);
}
.fw-rich-body:empty::before { content: attr(data-placeholder); color: var(--text-mute); }
.fw-rich-body:focus { outline: none; background: var(--panel); box-shadow: inset 0 0 0 2px var(--primary-200); }
.fw-rich-body img { border-radius: var(--radius-sm); }
.fw-rich-size {
  height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--panel);
  font-size: var(--fs-xs);
  color: var(--text-sub);
  padding: 0 var(--sp-2);
}
.fw-rich-field-btn { color: var(--primary) !important; font-weight: var(--fw-semibold); }

/* ---------- 成功页形态选择卡 ---------- */
.fw-choice-list { gap: var(--sp-4); }
.fw-choice {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  padding: var(--sp-5) var(--sp-6);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
.fw-choice:hover { border-color: var(--primary-300); background: var(--primary-softer); }
.fw-choice.is-on { border-color: var(--primary); background: var(--primary-soft); box-shadow: var(--ring); }
.fw-choice input { accent-color: var(--primary); }
.fw-choice b { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.fw-choice i { font-style: normal; font-size: var(--fs-xs); color: var(--text-mute); }

/* ---------- 后续动作行与筛选胶囊 ---------- */
.fw-act-list { gap: var(--sp-4); }
.fw-act-row {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elev);
  padding: var(--sp-4) var(--sp-5);
}
.fw-act-type { font-size: var(--fs-xs); color: var(--text-mute); }
.fw-act-count { font-size: var(--fs-2xs); color: var(--text-mute); font-variant-numeric: var(--num); }
.fw-act-btn {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-sub);
  border-radius: var(--radius-xs);
  font-size: var(--fs-xs);
  padding: var(--sp-2) var(--sp-4);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.fw-act-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-softer); }
.fw-pills { gap: var(--sp-3); }
.fw-pills.is-off { opacity: .45; pointer-events: none; }
.fw-pill {
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text-sub);
  border-radius: var(--radius-pill);
  padding: var(--sp-3) var(--sp-6);
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.fw-pill:hover { border-color: var(--primary-300); color: var(--primary); background: var(--primary-softer); }
.fw-pill.is-on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); font-weight: var(--fw-semibold); }
.fw-phone-label { font-size: var(--fs-sm); color: var(--text-mute); font-weight: var(--fw-medium); }
.fw-phone-label .btn-mini { padding: 1px var(--sp-4); font-size: var(--fs-xs); }

/* ---------- 内容生成页主视觉 ---------- */
.create-hero { gap: var(--sp-7); }
.create-hero-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-lg);
  background: var(--primary-soft);
  color: var(--primary);
  border: 1px solid var(--primary-200);
  box-shadow: var(--shadow-xs);
}
.create-title { font-size: var(--fs-2xl); font-weight: var(--fw-bold); letter-spacing: -.02em; margin: 0 0 var(--sp-2); }
.create-hint { font-size: var(--fs-sm); color: var(--text-mute); }
.create-box { padding: var(--sp-10); }
.create-existing { padding: var(--sp-6) var(--sp-8); }
.create-existing-label { font-size: var(--fs-xs); color: var(--text-mute); font-weight: var(--fw-medium); margin-bottom: var(--sp-4); }
.create-result-inner { padding: var(--sp-10); gap: var(--sp-10); }
.create-result-qr { border: 1px solid var(--border); border-radius: var(--radius-sm); }
.create-result-title { font-size: var(--fs-lg); font-weight: var(--fw-semibold); letter-spacing: -.01em; }
.create-result-url { font-size: var(--fs-sm); color: var(--primary); font-family: var(--font-mono); word-break: break-all; }
.create-feat { padding: var(--sp-7) var(--sp-8); transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease), transform var(--t-base) var(--ease); }
.create-feat:hover { border-color: var(--border-strong); box-shadow: var(--shadow); transform: translateY(-2px); }
.create-feat b { font-size: var(--fs-sm); font-weight: var(--fw-semibold); display: block; margin-bottom: var(--sp-2); }
.create-feat span { font-size: var(--fs-xs); color: var(--text-mute); line-height: var(--lh-relax); }
.create-side { padding: var(--sp-8); }
.create-side-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); margin-bottom: var(--sp-5); }
.create-side-list { gap: var(--sp-4); }
.create-side-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: var(--sp-5) var(--sp-6);
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.create-side-item:hover { border-color: var(--primary); background: var(--primary-softer); }
.create-side-item b { font-size: var(--fs-sm); font-weight: var(--fw-semibold); display: block; margin-bottom: 2px; }
.create-side-item span { font-size: var(--fs-xs); color: var(--text-mute); }
.create-media { border-radius: var(--radius-xs); background: var(--neutral-950); }
audio.create-media { background: none; }
.create-file-meta { font-size: var(--fs-sm); }
.create-go { margin-top: var(--sp-8); }

/* 活码工作台手机预览 */
.qw-phone { border-radius: var(--radius-lg); box-shadow: var(--shadow); }
.qw-phone-cover { background: var(--primary-soft); padding: var(--sp-14) var(--sp-10) var(--sp-10); border-bottom: 1px solid var(--border); }
.qw-phone-title { font-size: var(--fs-xl); font-weight: var(--fw-bold); letter-spacing: -.02em; }
.qw-phone-desc { font-size: var(--fs-xs); color: var(--text-sub); line-height: var(--lh-relax); }
.qw-phone-body { padding: var(--sp-7); gap: var(--sp-5); }
.qw-phone-none { font-size: var(--fs-xs); color: var(--text-mute); }
.qw-phone-foot { padding: var(--sp-6) var(--sp-7) var(--sp-8); border-top: 1px solid var(--border); }
.qw-phone-btn {
  background: var(--primary-grad);
  color: var(--text-inv);
  border-radius: var(--radius);
  padding: var(--sp-6);
  font-size: var(--fs-md);
  font-weight: var(--fw-semibold);
  box-shadow: var(--shadow-primary);
}
.qw-phone-tip { font-size: var(--fs-2xs); color: var(--text-mute); }
.qw-mini { padding: var(--sp-7); }
.qw-mini-label { font-size: var(--fs-2xs); color: var(--text-mute); letter-spacing: .06em; text-transform: uppercase; font-weight: var(--fw-semibold); }
.qw-mini-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.qw-mini-sub { font-size: var(--fs-xs); color: var(--text-mute); }
.qw-stats > div { padding: var(--sp-5) var(--sp-3); border-radius: var(--radius-sm); }
.qw-stats b { font-size: var(--fs-xl); font-weight: var(--fw-bold); letter-spacing: -.02em; font-variant-numeric: var(--num); }
.qw-stats span { font-size: var(--fs-2xs); color: var(--text-mute); }
.qw-c { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--sp-5) var(--sp-6); font-size: var(--fs-sm); }
.qw-c-form { background: var(--primary-soft); border-color: var(--primary-200); color: var(--primary); font-weight: var(--fw-semibold); }
.qw-c-link { color: var(--primary); }
.qw-c-img, .qw-c-media { border-radius: var(--radius-sm); }
.qw-code-panel { padding: var(--sp-7); }
.qw-comp-head { background: var(--bg-elev); padding: var(--sp-4) var(--sp-6); }
.qw-comp-type { font-size: var(--fs-xs); color: var(--text-sub); font-weight: var(--fw-medium); }
.qw-comp-body { padding: var(--sp-6); }
.qw-comp-note { font-size: var(--fs-sm); color: var(--text-sub); }
.qw-comp-media img { border-radius: var(--radius-sm); border: 1px solid var(--border); }
.qw-comp-name { font-size: var(--fs-xs); color: var(--text-mute); }
.qw-lib { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: var(--sp-4) var(--sp-5); font-size: var(--fs-sm); color: var(--text-sub); background: var(--panel); transition: all var(--t-fast) var(--ease); }
.qw-lib:hover:not([disabled]) { border-color: var(--primary); color: var(--primary); background: var(--primary-softer); }
.qw-lib[disabled] { opacity: .5; cursor: not-allowed; }
.qw-field > span { font-size: var(--fs-xs); color: var(--text-sub); font-weight: var(--fw-medium); }
.qw-form-card { padding: var(--sp-10); }
.qw-form-name { font-size: var(--fs-xl); font-weight: var(--fw-bold); letter-spacing: -.02em; }
.qw-form-desc { font-size: var(--fs-sm); color: var(--text-mute); line-height: var(--lh-relax); }
.qw-form-meta { font-size: var(--fs-xs); color: var(--text-mute); }
.qw-form-meta b { color: var(--text); font-weight: var(--fw-bold); font-variant-numeric: var(--num); }
.qw-atts img, .qw-record-atts img { border-radius: var(--radius-xs); border: 1px solid var(--border); }
.qw-att-file { font-size: var(--fs-2xs); color: var(--primary); }
.qw-record-card { padding: var(--sp-6); border-radius: var(--radius); }
.qw-record-head { font-size: var(--fs-sm); font-weight: var(--fw-semibold); }
.qw-record-head time { font-size: var(--fs-2xs); color: var(--text-mute); font-weight: var(--fw-regular); }
.qw-record-vals > div { font-size: var(--fs-xs); }
.qw-record-vals b { color: var(--text-mute); font-weight: var(--fw-medium); }
.qw-record-vals span { color: var(--text-sub); }
.qw-head { padding-bottom: var(--sp-7); }
.qw-back { border: 1px solid var(--border); background: var(--panel); color: var(--text-sub); border-radius: var(--radius-sm); padding: var(--sp-4) var(--sp-5); font-size: var(--fs-sm); transition: all var(--t-fast) var(--ease); }
.qw-back:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-softer); }
.qw-title { font-size: var(--fs-xl); font-weight: var(--fw-bold); letter-spacing: -.02em; }
.qw-sub { font-size: var(--fs-xs); color: var(--text-mute); }
.qw-date { font-size: var(--fs-xs); color: var(--text-mute); }
.qw-data-meta { font-size: var(--fs-xs); color: var(--text-mute); }

/* ============================================================
   14. 移动端与微信 H5：安全区 + 动态视口高度
   ============================================================ */

/* 用 dvh 替代 vh，避免移动端地址栏收放导致的高度跳变与内容被裁。
   --mobnav-h = 底部菜单占位（仅 ≤1023px 有值，桌面回退 0）：
   按视口算高度的视图必须扣掉它，否则最底部会被底部菜单压住。 */
@supports (height: 100dvh) {
  .view { height: calc(100dvh - var(--topbar-h) - var(--mobnav-h, 0px)); }
  #view-designer.is-active { height: calc(100dvh - var(--topbar-h) - var(--mobnav-h, 0px)); }
  #view-filler.is-active, #view-records.is-active, #view-templates.is-active,
  #view-dashboard.is-active, #view-status.is-active, #view-qrcode.is-active,
  #view-batch.is-active, #view-dashboard2.is-active, #view-qrwork.is-active,
  #view-platform.is-active, #view-api.is-active, #view-ocr.is-active {
    min-height: calc(100dvh - var(--topbar-h) - var(--mobnav-h, 0px));
  }
}

/* 底部固定操作条避让 home 条 */
.dz-settings-foot, .scan-foot, .f-page-nav, .done-actions {
  padding-bottom: calc(var(--sp-7) + var(--sab));
}
.site-footer { padding-bottom: calc(var(--sp-3) + var(--sab)); }

/* 弹窗在移动端贴底呈现，键盘弹出时不被顶飞 */
@media (max-width: 640px) {
  .dz-preview-mask, .scan-mask {
    align-items: flex-end;
    padding: 0;
  }
  .dz-preview, .scan-box {
    max-width: 100%;
    width: 100%;
    max-height: 92dvh;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    animation: yj-sheet-in var(--t-slow) var(--ease-out);
    padding-bottom: var(--sab);
  }
  @keyframes yj-sheet-in {
    from { opacity: 0; transform: translateY(100%); }
    to   { opacity: 1; transform: translateY(0); }
  }
}

@media (max-width: 760px) {
  .topbar {
    height: auto;
    min-height: var(--topbar-h-mobile);
    padding: var(--sp-4) var(--sp-6);
    padding-top: calc(var(--sp-4) + var(--sat));
    gap: var(--sp-4) var(--sp-7);
  }
  .brand-sub { display: none; }
  .brand-text { font-size: var(--fs-md); }
  .nav-btn { padding: var(--sp-3) var(--sp-5); font-size: var(--fs-sm); min-height: var(--tap-sm); }
  /* 选中指示条在紧凑顶栏下改为背景块，避免拥挤 */
  .nav-btn.is-active::after { display: none; }
  .wb { padding: var(--sp-7) var(--sp-6) calc(var(--sp-20) + var(--sab)); gap: var(--sp-6); }
  .wb-cards { gap: var(--sp-5); }
  .wb-card { min-height: 96px; padding: var(--sp-7) var(--sp-8); }
  .wb-card-val { font-size: var(--fs-3xl); }
  .wb-toolbar { flex-wrap: wrap; padding: var(--sp-5) var(--sp-7); }
  .wb-row { padding: var(--sp-6) var(--sp-7); }
  .wb-row-icon { width: 44px; height: 44px; }
  .rec { padding: var(--sp-7) var(--sp-6) calc(var(--sp-20) + var(--sab)); }
  .rec-item { padding: var(--sp-6) var(--sp-7); }
  .filler { padding: var(--sp-8) var(--sp-6) calc(var(--sp-24) + var(--sab)); }
  .filler-body { padding: var(--sp-8); }
  .filler-title { font-size: var(--fs-xl); }
  .plat { padding: var(--sp-7) var(--sp-6); }
  .plat-score { flex-direction: column; align-items: flex-start; gap: var(--sp-5); }
  .ocr-provider-row { grid-template-columns: 1fr; }
  .dash-selector { flex-wrap: wrap; }
  .create { padding: var(--sp-7) var(--sp-6) calc(var(--sp-24) + var(--sab)); }
  .qw { padding: var(--sp-7) var(--sp-6) calc(var(--sp-24) + var(--sab)); }
  .tpl { padding: var(--sp-7) var(--sp-6) calc(var(--sp-24) + var(--sab)); }
  /* 表格在小屏改为横向滚动而非压缩变形 */
  .rec-table, .dz-table, .api-table, .qw-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}

/* 微信内置浏览器 */
.is-mobile .topbar { padding-top: calc(var(--sp-4) + var(--sat)); }
.is-wechat .topbar { padding-top: calc(var(--sp-4) + var(--sat)); }
.is-wechat .scan-stage { aspect-ratio: 3 / 4; }
.is-mobile .dash-stat-grid { grid-template-columns: repeat(2, 1fr); }

/* 打印：去背景色、去阴影，保证纸质可读 */
@media print {
  .topbar, .site-footer, .wb-row-ops, .rec-ops, .dz-card-ops, .theme-toggle { display: none !important; }
  body { background: #fff; color: #000; }
  .wb-panel, .wb-card, .rec-list, .api-table, .card { box-shadow: none; border-color: #ccc; }
}


/* ============================================================
   v2 落地层（2026-11-08）· 工业秩序 · 有序汇聚

   作用域：仅 body.app-shell（主站 index.html）。
   stats.html / join.html / fill.html 不加该类，维持原横向布局，仅通过
   tokens.css 自动换装新配色。
   结构变更：横向顶栏 → 深色左侧导航 rail（「工厂控制台」识别核心），
   全部复用既有 DOM 与 id，不改任何 JS 逻辑；≤1023px 收为抽屉。
   ============================================================ */

/* ---------- 桌面（≥1024px）：rail 常驻 ---------- */
@media (min-width: 1024px) {
  body.app-shell { padding-left: var(--rail-w); }

  .app-shell .topbar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: var(--rail-w);
    height: 100vh;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-4);
    padding: calc(var(--sp-10) + var(--sat)) var(--sp-6) calc(var(--sp-8) + var(--sab));
    background: var(--rail-bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    border-right: 1px solid var(--rail-border);
    box-shadow: var(--shadow-lg);
  }

  /* 品牌区：rail 顶端，白字保持识别 */
  .app-shell .topbar-brand {
    display: flex; align-items: center; gap: var(--sp-3);
    padding: 0 var(--sp-2) var(--sp-4);
    border-bottom: 1px solid var(--rail-border);
    margin-bottom: var(--sp-4);
  }
  .app-shell .brand-text {
    background: none;
    -webkit-text-fill-color: currentColor;
    color: var(--text-on-rail);
    font-size: var(--fs-xl);
  }
  .app-shell .brand-sub {
    display: block;
    color: var(--rail-text);
    font-size: var(--fs-2xs);
    border-left-color: var(--rail-border);
    padding-left: var(--sp-3);
  }

  /* 导航：纵向列表 */
  .app-shell .topbar-nav {
    display: flex; flex-direction: column; gap: var(--sp-2);
    overflow: visible;
  }

  /* 导航项：rail 文字色与选中渐变 */
  .app-shell .nav-btn {
    display: flex; align-items: center;
    width: 100%;
    justify-content: flex-start;
    text-align: left;
    min-height: 40px;
    padding: var(--sp-5) var(--sp-6);
    border-radius: var(--radius-sm);
    font-size: var(--fs-md);
    color: var(--rail-text);
    background: transparent;
  }
  .app-shell .nav-btn:hover { background: var(--rail-bg-hover); color: var(--text-on-rail); }
  .app-shell .nav-btn:active { background: var(--rail-bg-hover); }
  .app-shell .nav-btn.is-active {
    background: var(--primary-grad);
    color: var(--text-on-rail);
    font-weight: var(--fw-semibold);
    box-shadow: var(--shadow-primary);
  }
  .app-shell .nav-btn.is-active::after { display: none; }

  /* 分组按钮：展开箭头右对齐 */
  .app-shell .nav-group-btn { justify-content: space-between; width: 100%; }
  .app-shell .nav-group-btn[aria-expanded='true'] {
    background: var(--rail-bg-hover);
    color: var(--text-on-rail);
  }

  /* 下拉菜单：改为向右飞出 */
  .app-shell .nav-menu {
    left: calc(100% + 10px);
    top: -6px;
    min-width: 208px;
  }

  /* 主题切换与用户区：固定在 rail 底部 */
  .app-shell .theme-toggle {
    width: 100%;
    justify-content: center;
    background: transparent;
    border-color: var(--rail-border);
    color: var(--rail-text);
  }
  .app-shell .theme-toggle:hover { background: var(--rail-bg-hover); color: var(--text-on-rail); }
  .app-shell .topbar-right { margin-top: auto; }
  .app-shell .topbar-right .nav-btn {
    display: flex; width: 100%; justify-content: center;
    color: var(--rail-text);
    border: 1px solid var(--rail-border);
    min-height: 38px;
  }
  .app-shell .topbar-right .nav-btn:hover { background: var(--rail-bg-hover); color: var(--text-on-rail); }

  /* 内容区：整页滚动，占满视口高 */
  .app-shell .view { height: auto; min-height: 100vh; }
}

/* ---------- 汉堡按钮与遮罩（仅 ≤1023px 可见） ---------- */
.rail-toggle {
  display: none;
  position: fixed;
  top: calc(var(--sp-4) + var(--sat));
  left: var(--sp-4);
  z-index: 70;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.rail-toggle svg { display: block; }
.rail-overlay {
  display: none;
  position: fixed; inset: 0;
  z-index: 60;
  background: var(--mask);
}
body.rail-open .rail-overlay { display: block; }

@media (max-width: 1023px) {
  .rail-toggle { display: flex; }

  body.app-shell { padding-left: 0; }
  .app-shell .topbar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: min(280px, 84vw);
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    align-items: stretch;
    gap: var(--sp-3);
    padding: calc(var(--sp-8) + var(--sat)) var(--sp-5) calc(var(--sp-8) + var(--sab));
    background: var(--rail-bg);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    border-right: 1px solid var(--rail-border);
    box-shadow: var(--shadow-lg);
    transform: translateX(-102%);
    transition: transform var(--t-slow) var(--ease-out);
    z-index: 65;
    overflow-y: auto;
  }
  body.rail-open .app-shell .topbar,
  body.rail-open .topbar { transform: translateX(0); }

  .app-shell .topbar-brand {
    padding: 0 var(--sp-2) var(--sp-4);
    border-bottom: 1px solid var(--rail-border);
    margin-bottom: var(--sp-3);
  }
  .app-shell .brand-text {
    background: none; -webkit-text-fill-color: currentColor;
    color: var(--text-on-rail);
  }
  .app-shell .brand-sub { color: var(--rail-text); border-left-color: var(--rail-border); }

  .app-shell .topbar-nav { display: flex; flex-direction: column; gap: var(--sp-2); overflow: visible; }
  .app-shell .nav-btn {
    display: flex; width: 100%; justify-content: flex-start; text-align: left;
    min-height: 44px; padding: var(--sp-5) var(--sp-6);
    font-size: var(--fs-md); color: var(--rail-text); background: transparent;
  }
  .app-shell .nav-btn:hover { background: var(--rail-bg-hover); color: var(--text-on-rail); }
  .app-shell .nav-btn.is-active {
    background: var(--primary-grad); color: var(--text-on-rail);
    font-weight: var(--fw-semibold); box-shadow: var(--shadow-primary);
  }
  .app-shell .nav-btn.is-active::after { display: none; }

  .app-shell .nav-group-btn { justify-content: space-between; width: 100%; }

  /* 抽屉内下拉就地展开，不向右飞出 */
  .app-shell .nav-menu {
    position: static;
    min-width: 0;
    margin: var(--sp-1) 0 var(--sp-2);
    background: var(--rail-bg-hover);
    border-color: var(--rail-border);
    box-shadow: none;
    animation: none;
  }
  .app-shell .nav-menu-item { color: var(--rail-text); min-height: 40px; }
  .app-shell .nav-menu-item:hover { background: rgba(199, 210, 254, .10); color: var(--text-on-rail); }
  .app-shell .nav-menu-item.is-active { background: rgba(79, 70, 229, .28); color: var(--text-on-rail); }
  .app-shell .nav-menu-sep { border-top-color: var(--rail-border); color: var(--rail-text); }

  .app-shell .theme-toggle {
    width: 100%; justify-content: center;
    background: transparent; border-color: var(--rail-border); color: var(--rail-text);
  }
  .app-shell .topbar-right { margin-top: auto; }
  .app-shell .topbar-right .nav-btn {
    display: flex; width: 100%; justify-content: center;
    color: var(--rail-text); border: 1px solid var(--rail-border);
  }

  /* 内容区避让汉堡按钮 */
  .app-shell .wb, .app-shell .rec, .app-shell .create, .app-shell .qw, .app-shell .tpl, .app-shell .plat {
    padding-top: calc(var(--sp-14) + var(--sat));
  }
  .app-shell .view { height: auto; min-height: calc(100dvh - var(--topbar-h) - var(--mobnav-h, 0px)); }

  /* 微信内滚动容器的旧横向导航覆盖全部失效 */
  .is-mobile .app-shell .topbar-nav,
  .is-wechat .app-shell .topbar-nav { overflow: visible; }
}

/* ============================================================
   移动端底部菜单（≤1023px）
   桌面用左侧 rail；手机上 rail 收进抽屉，常用入口沉到底部，
   拇指可达（每项 ≥44px 高），并让出刘海屏安全区。
   ============================================================ */
.mob-tabbar { display: none; }

@media (max-width: 1023px) {
  body.app-shell {
    --mobtab-h: 58px;
    /* 移动端顶栏是 52px（sticky 在流内），同步口径让视图高度算式统一 */
    --topbar-h: var(--topbar-h-mobile);
    /* 底部菜单占位：正文与整屏视图统一按这个高度避让 */
    --mobnav-h: calc(var(--mobtab-h) + var(--sab));
    padding-bottom: var(--mobnav-h);
  }

  /* ≤1023px 设计器是单列堆叠（组件库 / 画布 / 属性面板依次展开），
     整页滚动；高度不能再按整屏锁死，否则工具条会溢出到菜单下面 */
  body.app-shell #view-designer.is-active {
    height: auto;
    min-height: calc(100vh - var(--topbar-h) - var(--mobnav-h));
    min-height: calc(100dvh - var(--topbar-h) - var(--mobnav-h));
  }

  .mob-tabbar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    display: flex;
    align-items: stretch;
    background: var(--panel);
    border-top: 1px solid var(--border);
    padding-bottom: var(--sab);
    box-shadow: 0 -2px 12px rgba(20, 26, 32, .06);
  }
  .mob-tab {
    flex: 1 1 0; min-width: 0;
    height: var(--mobtab-h);
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    background: none; border: 0; cursor: pointer;
    font-size: var(--fs-2xs); color: var(--text-mute);
    -webkit-tap-highlight-color: transparent;
  }
  /* 图标基础尺寸在 .app-shell .ic 里，这里加权覆盖成底部菜单尺寸 */
  body.app-shell .mob-tab .ic { width: 22px; height: 22px; }
  body.app-shell .mob-tab[hidden] { display: none; }
  .mob-tab.is-active { color: var(--primary); font-weight: var(--fw-semibold); }
  .mob-tab.is-locked { opacity: .55; }
  .mob-tab:active { background: var(--primary-softer); }

  /* 备案页脚上移到菜单之上，法规要求的备案号仍完整可见 */
  body.app-shell .site-footer { bottom: calc(var(--mobtab-h) + var(--sab)); }
  /* 轻提示抬到菜单上方，别被底部菜单压住文字 */
  body.app-shell .wb-toast { bottom: calc(var(--mobtab-h) + var(--sab) + 14px); }
}


/* ============================================================
   v3 IA 落地层：工作台对齐重设计原型 §3.1
   问候行 / 统计卡行 / 我的表单 + 快捷入口双列
   ============================================================ */

.wb.wb3 { display: flex; flex-direction: column; gap: var(--sp-10); }

/* --- 欢迎行：问候语 + 副文 / 周期切换 + 新建入口 --- */
.wb3-welcome { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--sp-8); flex-wrap: wrap; }
.wb3-greet h2 { margin: 0 0 var(--sp-2); font-size: var(--fs-3xl); font-weight: var(--fw-bold); letter-spacing: -.02em; }
.wb3-greet .dz-hint { max-width: 52ch; }
.wb3-welcome-ops { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.wb3-welcome-ops .wb-period { margin-right: var(--sp-2); }

/* --- 统计卡行：4 张白卡，大数字 --- */
.wb3-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-6); }
.wb3-stats .wb-card { min-height: 116px; }

/* --- 双列主区：我的表单 + 快捷入口 --- */
.wb3-main { display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: var(--sp-8); align-items: start; }
.wb3-forms { min-width: 0; }
.wb3-sec-head { display: flex; align-items: baseline; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.wb3-sec-head h3 { margin: 0; font-size: var(--fs-xl); font-weight: var(--fw-semibold); letter-spacing: -.01em; }
.wb3-sec-sub { font-size: var(--fs-xs); color: var(--text-mute); }

/* --- 表单卡：图标 / 标题 + 状态 Tag / meta / 操作 --- */
.wb3-fcard {
  display: flex; align-items: center; gap: var(--sp-5);
  padding: var(--sp-5) var(--sp-6);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-bottom: var(--sp-4);
  cursor: pointer;
  transition: border-color var(--ease-out) 80ms, box-shadow var(--ease-out) 80ms, transform var(--ease-out) 80ms;
}
.wb3-fcard:hover { border-color: var(--primary-soft); box-shadow: var(--shadow); transform: translateY(-1px); }
.wb3-fcard-ic {
  width: 40px; height: 40px; flex: none;
  display: grid; place-items: center;
  border-radius: var(--radius);
  background: var(--primary-softer); color: var(--primary);
}
.wb3-fcard-main { flex: 1; min-width: 0; }
.wb3-fcard-title {
  display: flex; align-items: center; gap: var(--sp-3);
  font-size: var(--fs-md); font-weight: var(--fw-semibold);
  white-space: nowrap; overflow: hidden;
}
.wb3-fcard-title .wb-tag { flex: none; }
.wb3-fcard-title > span:not(.wb-tag) { overflow: hidden; text-overflow: ellipsis; }
.wb3-fcard-meta { margin-top: var(--sp-1); font-size: var(--fs-xs); color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb3-fcard-ops { display: flex; gap: var(--sp-3); flex: none; opacity: .62; transition: opacity var(--ease-out) 80ms; }
.wb3-fcard:hover .wb3-fcard-ops, .wb3-fcard:focus-within .wb3-fcard-ops { opacity: 1; }

/* --- 空状态 --- */
.wb3-empty {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-3);
  padding: var(--sp-20) var(--sp-10);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-mute); text-align: center;
}
.wb3-empty svg { opacity: .45; }
.wb3-empty-title { font-size: var(--fs-lg); font-weight: var(--fw-semibold); color: var(--text-sub); }
.wb3-empty-sub { font-size: var(--fs-sm); }
.wb3-empty .btn { margin-top: var(--sp-3); }

/* --- 右侧栏：快捷入口 + 快速建码 --- */
.wb3-side {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-6);
  position: sticky; top: var(--sp-6);
}
.wb3-side-title { font-size: var(--fs-md); font-weight: var(--fw-semibold); margin: var(--sp-2) var(--sp-2) var(--sp-5); }
.wb3-quick {
  display: flex; align-items: center; gap: var(--sp-4);
  width: 100%;
  padding: var(--sp-4) var(--sp-4);
  margin-bottom: var(--sp-3);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: var(--fs-sm); font-weight: var(--fw-medium);
  color: var(--text-sub);
  cursor: pointer;
  transition: background var(--ease-out) 80ms, color var(--ease-out) 80ms;
}
.wb3-quick:hover { background: var(--primary-softer); color: var(--primary); }
.wb3-quick-ic { display: grid; place-items: center; color: var(--text-mute); }
.wb3-quick:hover .wb3-quick-ic { color: var(--primary); }
.wb3-side-group {
  margin: var(--sp-6) var(--sp-2) var(--sp-4);
  font-size: var(--fs-2xs); font-weight: var(--fw-semibold);
  letter-spacing: .08em; text-transform: uppercase;
  color: var(--text-mute);
}
.wb3-chips { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); }
.wb3-chips .wb-chip { justify-content: flex-start; }

/* --- 响应式：窄屏单列堆叠 --- */
@media (max-width: 1279px) {
  .wb3-main { grid-template-columns: minmax(0, 1fr) 252px; }
}
@media (max-width: 1023px) {
  .wb3-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wb3-main { grid-template-columns: minmax(0, 1fr); }
  .wb3-side { position: static; }
  .wb3-fcard-ops { opacity: 1; }
  .wb3-greet h2 { font-size: var(--fs-2xl); }
}
@media (max-width: 479px) {
  .wb3-stats { grid-template-columns: minmax(0, 1fr); }
  .wb3-fcard { flex-wrap: wrap; }
  .wb3-fcard-ops { width: 100%; justify-content: flex-end; }
}

/* ============================================================
   填写端品牌渐变头部（原型 §3.4）
   ============================================================ */
.filler-head {
  background: var(--primary-grad);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: var(--sp-10) var(--sp-8);
  margin-bottom: var(--sp-8);
  box-shadow: var(--shadow-primary);
}
.filler-head .filler-title { color: #fff; margin: 0 0 var(--sp-2); }
.filler-head .filler-desc { color: rgba(255, 255, 255, .82); }
[data-theme='dark'] .filler-head { box-shadow: var(--shadow-lg); }

/* 修复原有缺陷：styles.css 的 .filler-done{display:flex} 会覆盖 [hidden] 属性，
   导致「提交成功」态在填写页常驻可见；此规则恢复 hidden 语义（设计器预览同样受益）。 */
.filler-done[hidden] { display: none; }

/* ============================================================
   v4 外壳对齐层（2026-11-08）
   对照《徐大侠 Yunji UI 重设计原型》：浅色顶栏 + 深色 rail 细节 +
   工作台 §3.1 版式（统计卡 / 填报节奏 / 我的表单 / 快捷入口 / 活码）
   ============================================================ */

/* ---------- 线性图标 ---------- */
.app-shell .ic {
  width: 18px; height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.app-shell .ic-sm { width: 15px; height: 15px; }

/* ---------- 浅色顶栏：面包屑 / 视图页签 / 主题分段 ---------- */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  height: var(--topbar-h);
  padding: 0 var(--sp-10);
  background: var(--glass);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.app-topbar .topbar-title {
  display: flex; align-items: center; gap: 7px;
  font-size: var(--fs-sm);
  color: var(--text-mute);
  white-space: nowrap;
}
.app-topbar .topbar-title > span:first-child { color: var(--text-mute); }
.app-topbar .topbar-title .sep { color: var(--border-strong); font-size: 11px; }
.app-topbar .topbar-title b { color: var(--text); font-weight: var(--fw-semibold); }

.app-topbar .theme-toggle {
  display: flex; align-items: center; gap: 2px;
  margin-left: auto;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
}
.app-topbar .theme-opt {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--text-mute);
  cursor: pointer;
}
.app-topbar .theme-opt:hover { color: var(--text); }
.app-topbar .theme-opt[aria-pressed='true'] {
  background: var(--panel); color: var(--primary); box-shadow: var(--shadow-xs);
}
.app-topbar .theme-opt .ic { width: 14px; height: 14px; }

/* ---------- rail 细节：分组标签 / 图标 / 状态 / 主题 / 用户 ---------- */
.app-shell .topbar .rail-label {
  margin: var(--sp-4) 0 var(--sp-1);
  padding: 0 var(--sp-5);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: var(--fw-semibold);
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #6B6B7B;
}
.app-shell .topbar .rail-label-sys { margin-top: var(--sp-8); }

.app-shell .topbar-nav .nav-btn {
  gap: var(--sp-5);
  padding: var(--sp-4) var(--sp-5);
  min-height: 40px;
  font-size: var(--fs-sm);
}
.app-shell .topbar-nav .nav-btn .ic { width: 17px; height: 17px; opacity: .72; }
.app-shell .topbar-nav .nav-btn:hover .ic,
.app-shell .topbar-nav .nav-btn.is-active .ic { opacity: 1; }
.app-shell .topbar-nav .nav-btn .caret {
  margin-left: auto;
  font-size: 10px;
  opacity: .55;
}
.app-shell .topbar-nav .nav-group-btn[aria-expanded='true'] .caret { transform: rotate(180deg); }

/* 品牌：图标块 + 两行文字（徐大侠 Yunji / COLLECT） */
.app-shell .topbar-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: var(--sp-6);
  row-gap: 1px;
  align-items: center;
}
.app-shell .topbar-brand .logo {
  grid-row: 1 / span 2;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--radius);
  background: var(--primary-grad);
  color: #fff;
  box-shadow: var(--shadow-primary);
}
.app-shell .topbar-brand .logo svg { width: 19px; height: 19px; }
.app-shell .topbar-brand .brand-text {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  letter-spacing: .01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-shell .topbar-brand .brand-sub {
  display: block;
  border-left: 0;
  padding-left: 0;
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: .12em;
  line-height: 1.2;
  color: var(--rail-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rail-spacer { flex: 1 1 auto; min-height: var(--sp-4); }
.rail-status {
  display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius-sm);
  border: 1px solid var(--rail-border);
  background: rgba(199, 210, 254, .04);
  font-size: 10.5px;
  color: #8A8A9C;
}
.rail-status .dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #3DD6A6;
  box-shadow: 0 0 0 3px rgba(61, 214, 166, .14);
}
.rail-theme {
  display: flex; align-items: center; gap: var(--sp-2);
  margin-bottom: var(--sp-3);
  padding: 0 var(--sp-1);
}
.rail-icon-btn {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--rail-text);
  cursor: pointer;
  flex: none;
}
.rail-icon-btn:hover { background: var(--rail-bg-hover); color: var(--text-on-rail); }
.rail-icon-btn .ic { width: 16px; height: 16px; }
.rail-theme-label {
  display: flex; flex-direction: column; line-height: 1.25;
  font-size: 9px; color: #6B6B7B;
}
.rail-theme-label b {
  font-family: var(--font-mono);
  font-size: 9.5px; font-weight: var(--fw-semibold);
  letter-spacing: .06em;
}
.rail-theme-label span { font-size: 10px; color: #9494A4; }

.app-shell .topbar-right {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  margin-top: 0;
}
.app-shell .rail-user {
  display: flex; align-items: center; gap: var(--sp-4);
  flex: 1 1 auto; min-width: 0;
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--radius);
  border: 1px solid var(--rail-border);
  background: rgba(199, 210, 254, .05);
}
.app-shell .rail-user .avatar {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(79, 70, 229, .32);
  color: #E0E7FF;
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
  flex: none;
}
.app-shell .rail-user-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.app-shell .rail-user-name {
  font-size: var(--fs-xs); font-weight: var(--fw-semibold); color: var(--text-on-rail);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-shell .rail-user-role {
  font-family: var(--font-mono);
  font-size: 9.5px; color: #8A8A9C;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.app-shell .rail-login {
  width: 100%;
  justify-content: center;
  min-height: 40px;
  border-radius: var(--radius-sm);
  background: var(--primary-grad);
  color: var(--text-on-rail);
  font-weight: var(--fw-semibold);
}

/* 内容区高度：扣除顶栏，避免整页多出一屏 */
@media (min-width: 1024px) {
  .app-shell .view { min-height: calc(100dvh - var(--topbar-h)); }
}

/* ---------- 工作台 §3.1 ---------- */
.wb.wb4 { display: flex; flex-direction: column; gap: var(--sp-8); }

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--sp-8); flex-wrap: wrap;
}
.page-head .grow { min-width: 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: var(--sp-2);
}
.page-head .page-title {
  margin: 0 0 var(--sp-2);
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  letter-spacing: -.02em;
  line-height: 1.15;
  color: var(--text);
}
.page-head .page-sub { margin: 0; font-size: var(--fs-sm); color: var(--text-mute); }
.page-head .page-sub b { color: var(--primary-600); font-weight: var(--fw-bold); font-variant-numeric: var(--num); }
.page-actions { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }

.wb-period {
  display: inline-flex; padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
}
.wb-period button {
  height: 28px; padding: 0 var(--sp-6);
  border: 0; border-radius: var(--radius-pill);
  background: transparent; color: var(--text-mute);
  font-size: var(--fs-xs); cursor: pointer;
}
.wb-period button.is-on {
  background: var(--panel); color: var(--text);
  font-weight: var(--fw-semibold); box-shadow: var(--shadow-xs);
}

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-6); }
.stat {
  padding: var(--sp-6) var(--sp-7);
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--border);
  min-width: 0;
  cursor: pointer;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.stat:hover, .stat:focus-visible {
  border-color: var(--primary-200);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.stat-label { font-size: 11px; letter-spacing: .03em; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-ic {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  background: var(--primary-softer);
  color: var(--primary);
  flex: none;
}
.stat-ic .ic { width: 15px; height: 15px; }
.stat-num {
  font-family: var(--font-mono);
  font-size: var(--fs-4xl);
  font-weight: var(--fw-bold);
  line-height: 1;
  letter-spacing: -.02em;
  color: var(--text);
  font-variant-numeric: var(--num);
}
.stat-num em {
  margin-left: var(--sp-2);
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 11px;
  font-weight: var(--fw-medium);
  letter-spacing: .02em;
  color: var(--text-mute);
}
.stat-foot { display: flex; align-items: center; gap: var(--sp-3); margin-top: var(--sp-4); font-size: 11px; color: var(--text-mute); }
.delta { padding: 1px 6px; border-radius: var(--radius-pill); font-weight: var(--fw-semibold); }
.delta.up { background: var(--success-soft); color: var(--success); }
.muted { color: var(--text-mute); }

/* 签名元素：填报节奏刻度 */
.rhythm {
  padding: var(--sp-6) var(--sp-8) var(--sp-5);
  border-radius: var(--radius-lg);
  background: var(--panel);
  border: 1px solid var(--border);
}
.rhythm-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-5); }
.rhythm-title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text); }
.rhythm-note { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .14em; color: var(--text-mute); }
.rhythm-plot {
  display: flex; align-items: flex-end; gap: 3px;
  height: 88px; padding-bottom: var(--sp-2);
  border-bottom: 1px solid var(--border);
}
.rhythm-bar { flex: 1 1 0; display: flex; align-items: flex-end; height: 100%; min-width: 0; }
.rhythm-bar i {
  display: block; width: 100%;
  border-radius: 3px 3px 0 0;
  background: var(--primary-200);
  transition: height var(--t-base) var(--ease), background var(--t-fast) var(--ease);
}
.rhythm-bar:hover i { background: var(--primary-400); }
.rhythm-bar.is-peak i { background: var(--primary); }
.rhythm-empty { align-self: center; font-size: var(--fs-xs); color: var(--text-mute); }
.rhythm-legend { display: flex; gap: var(--sp-6); margin-top: var(--sp-4); font-size: 11px; color: var(--text-mute); }
.rhythm-legend b { margin-left: var(--sp-1); color: var(--text); font-family: var(--font-mono); font-weight: var(--fw-semibold); }

/* 双列：我的表单 + 快捷入口 / 活码 */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: var(--sp-8); align-items: start; }
.side-stack { display: flex; flex-direction: column; gap: var(--sp-8); min-width: 0; }
.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  min-width: 0;
}
.panel-head { display: flex; align-items: center; gap: var(--sp-4); padding: var(--sp-5) var(--sp-7); border-bottom: 1px solid var(--border); }
.panel-head h2 { margin: 0; font-size: var(--fs-sm); font-weight: var(--fw-semibold); letter-spacing: .01em; color: var(--text); }
.count-pill {
  font-family: var(--font-mono);
  font-size: 10px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: var(--bg-sunken);
  border: 1px solid var(--border);
  color: var(--text-mute);
}
.panel-tools { margin-left: auto; display: flex; align-items: center; gap: var(--sp-2); }
.link-btn {
  display: inline-flex; align-items: center; gap: 2px;
  padding: var(--sp-1) var(--sp-1);
  border: 0; background: transparent;
  color: var(--text-mute);
  font-size: 11.5px; cursor: pointer;
}
.link-btn:hover { color: var(--primary); }
.link-btn .ic { width: 12px; height: 12px; }

.frow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto auto;
  align-items: center;
  gap: var(--sp-6);
  padding: var(--sp-5) var(--sp-7);
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.frow:last-child { border-bottom: 0; }
.frow:hover, .frow:focus-visible { background: var(--row-hover); }
.frow-main { min-width: 0; }
.frow-title { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frow-meta { margin-top: 2px; font-size: 11px; color: var(--text-mute); }
.frow-time { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); white-space: nowrap; }
.tag {
  display: inline-flex; align-items: center;
  height: 21px; padding: 0 var(--sp-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 10.5px; white-space: nowrap;
}
.tag-on { background: var(--primary-softer); border-color: var(--primary-200); color: var(--primary-600); }
.tag-draft { background: var(--bg-sunken); color: var(--text-mute); }
.icon-btn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--panel);
  color: var(--text-mute);
  cursor: pointer;
}
.icon-btn:hover { color: var(--primary); border-color: var(--primary-200); background: var(--primary-softer); }
.icon-btn .ic { width: 14px; height: 14px; }

.panel-empty {
  padding: var(--sp-12) var(--sp-8);
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-1);
  text-align: center; color: var(--text-mute);
}
.panel-empty .ic { width: 30px; height: 30px; color: var(--primary-300); margin-bottom: var(--sp-2); }
.panel-empty-title { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-sub); }
.panel-empty-sub { font-size: var(--fs-xs); }
.panel-empty .btn { margin-top: var(--sp-4); }

.shortcut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); }
.shortcut {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  padding: var(--sp-6) var(--sp-5);
  border: 0; background: var(--panel);
  text-align: left; cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.shortcut:hover { background: var(--primary-softer); }
.shortcut .ic { width: 17px; height: 17px; color: var(--text-mute); }
.shortcut:hover .ic { color: var(--primary); }
.shortcut span { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text); }
.shortcut small { font-family: var(--font-mono); font-size: 8.5px; letter-spacing: .08em; color: var(--text-mute); }

.code-list { padding: var(--sp-1) 0; }
.code-row {
  display: flex; align-items: center; gap: var(--sp-5);
  width: 100%;
  padding: var(--sp-3) var(--sp-7);
  border: 0; background: transparent;
  text-align: left; cursor: pointer;
}
.code-row:hover { background: var(--row-hover); }
.dot { width: 6px; height: 6px; border-radius: 50%; flex: none; }
.dot.is-on { background: var(--success); }
.dot.is-off { background: var(--text-mute); opacity: .5; }
.code-row-main { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
.code-row-main b { font-size: var(--fs-xs); font-weight: var(--fw-medium); color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-row-main small { font-size: 10.5px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.code-row-num { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }

.wb.wb4 .wb-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--panel);
  overflow: hidden;
}

/* ---------- 数据记录：页头 / 筛选栏 / 扁平行 ---------- */
.rec { max-width: none; padding: var(--sp-7) var(--sp-8) calc(var(--sp-24) + var(--sab)); }
.rec-head { display: flex; align-items: flex-end; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-6); }
.rec-head h2 { margin: 0; font-size: var(--fs-3xl); letter-spacing: -.02em; }
.rec-ops {
  display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap;
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--panel);
  margin: var(--sp-6) 0 var(--sp-5);
}
.rec-list { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--panel); }
.rec-item { padding: var(--sp-5) var(--sp-7); }
.rec-item-head { gap: var(--sp-4); }

/* ---------- 表单设计器：纸面画布与组件库 ---------- */
.dz-canvas { background: var(--bg-sunken); }
.dz-canvas-scroll { padding: var(--sp-10); }
.dz-comp { border-color: transparent; background: transparent; box-shadow: none; }
.dz-comp:hover { border-color: transparent; background: var(--primary-softer); box-shadow: none; transform: none; }
.dz-lib-head, .dz-prop-head { font-size: var(--fs-sm); }

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .dash-grid { grid-template-columns: minmax(0, 1fr) 280px; }
}
@media (max-width: 1023px) {
  .app-topbar {
    position: sticky;
    height: var(--topbar-h-mobile);
    padding: 0 var(--sp-4) 0 60px;
    gap: var(--sp-2);
  }
  .app-topbar .theme-toggle { display: none; }
  .rail-toggle { top: calc(var(--sp-1) + var(--sat)); left: var(--sp-2); width: 40px; height: 40px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .page-head .page-title { font-size: var(--fs-3xl); }
}
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .frow { grid-template-columns: minmax(0, 1fr) auto; }
  .frow-time, .frow > .icon-btn { display: none; }
  .rhythm-plot { gap: 2px; height: 72px; }
}

/* 顶栏主题分段：覆盖旧版 .app-shell .theme-toggle 的整行撑满规则 */
.app-shell .app-topbar .theme-toggle {
  width: auto;
  justify-content: flex-start;
  margin-top: 0;
  padding: 3px;
  border: 1px solid var(--border);
  background: var(--bg-sunken);
}
.app-shell .app-topbar .theme-toggle .ic { width: 14px; height: 14px; }

/* 视图与顶栏之间留出呼吸空间（各页内部 padding 不一，统一兜底） */
@media (min-width: 1024px) {
  .app-shell .view { padding-top: var(--sp-4); }
  .app-shell #view-designer { padding-top: 0; }
}

/* rail 分组徽标 */
.app-shell .nav-badge {
  margin-left: auto;
  min-width: 17px; height: 17px;
  padding: 0 5px;
  display: grid; place-items: center;
  border-radius: var(--radius-pill);
  background: rgba(199, 210, 254, .14);
  color: #E0E7FF;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: var(--fw-semibold);
  line-height: 1;
}
.app-shell .nav-badge[hidden] { display: none; }
.app-shell .nav-btn .nav-badge + .caret { margin-left: 6px; }

/* ============================================================
   v5 精确对齐层（2026-11-08）
   逐项按《徐大侠 Yunji UI 重设计原型》index.html 内的 CSS 数值重写，
   覆盖 v4 的近似值（圆角 10 / 字号 / 间距 / 36px 节奏条 / 6 列表单行）。
   ============================================================ */

/* ---------- 1. rail：品牌 / 分组 / 导航项 / 状态 / 主题 / 用户 ---------- */
body.app-shell { line-height: 1.55; letter-spacing: normal; font-variant-numeric: tabular-nums; }
@media (min-width: 1024px) {
  body.app-shell { padding-left: 232px; }
  /* 主题切换在浅色顶栏已有分段控件，rail 内不再重复一份 */
  .app-shell .topbar .rail-themerow.rail-themerow { display: none; }
  .app-shell .topbar {
    width: 232px;
    padding: 18px 14px 16px;
    gap: 0;
    background: var(--rail-bg);
    border-right: 1px solid rgba(255, 255, 255, .04);
  }
}
.app-shell .topbar-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 10px;
  row-gap: 1px;
  align-items: center;
  padding: 2px 6px 22px;
  margin: 0;
  border-bottom: 0;
}
.app-shell .topbar-brand .logo {
  grid-row: 1 / span 2;
  width: 32px; height: 32px;
  border-radius: 8px;
  display: grid; place-items: center;
  background: var(--primary-grad);
  color: #fff;
  box-shadow: 0 2px 10px rgba(79, 70, 229, .35);
}
.app-shell .topbar-brand .logo:hover { transform: none; }
.app-shell .topbar-brand .logo svg { width: 20px; height: 20px; stroke-width: 1.6; }
.app-shell .topbar-brand .brand-text {
  font-size: 15px; font-weight: 600; letter-spacing: .01em; line-height: 1.2;
  color: #fff;
  background: none;
  -webkit-text-fill-color: currentColor;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-shell .topbar-brand .brand-sub {
  margin-top: 2px; padding: 0; border: 0;
  font-family: var(--font-mono);
  font-size: 9px; letter-spacing: .16em; line-height: 1.2;
  color: #6B6B7B;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-shell .topbar .rail-label,
.app-shell .topbar .rail-label-sys {
  margin: 6px 0 8px;
  padding: 0 12px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 400;
  letter-spacing: .14em;
  text-transform: none;
  color: #5E5E70;
}
.app-shell .topbar .rail-label-sys { margin-top: 18px; }

.app-shell .topbar-nav { display: flex; flex-direction: column; gap: 2px; overflow: visible; }
.app-shell .topbar-nav .nav-btn {
  display: flex; align-items: center; justify-content: flex-start;
  gap: 10px;
  width: 100%; height: 40px; min-height: 40px;
  padding: 0 12px;
  border-radius: 6px;
  font-size: 13.5px; font-weight: 500;
  line-height: 1.55;
  color: #A5A5B5;
  background: transparent;
  text-align: left;
  transition: background .16s ease-out, color .16s ease-out;
}
.app-shell .topbar-nav .nav-btn .ic { width: 17px; height: 17px; opacity: .85; }
.app-shell .topbar-nav .nav-btn:hover { background: var(--rail-bg-hover); color: #E4E4F0; }
.app-shell .topbar-nav .nav-btn:hover .ic,
.app-shell .topbar-nav .nav-btn.is-active .ic { opacity: 1; }
.app-shell .topbar-nav .nav-btn.is-active,
.app-shell .topbar-nav .nav-group-btn.is-active {
  background: var(--primary-grad);
  color: #fff;
  box-shadow: 0 2px 10px rgba(79, 70, 229, .35);
}
.app-shell .topbar-nav .nav-btn.is-active::after { display: none; }
.app-shell .topbar-nav .nav-group-btn[aria-expanded='true'] { background: var(--rail-bg-hover); color: #E4E4F0; }
.app-shell .topbar-nav .nav-group-btn[aria-expanded='true'].is-active {
  background: var(--primary-grad);
  color: #fff;
}
.app-shell .topbar-nav .caret { margin-left: 0; font-size: 9px; opacity: .6; }
.app-shell .nav-badge {
  margin-left: auto;
  min-width: 0; height: auto;
  padding: 1px 6px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .1);
  color: #D7D7E4;
  font-family: var(--font-mono);
  font-size: 10.5px; font-weight: 600;
  line-height: 1.4;
}

.app-shell .rail-spacer { flex: 1 1 auto; min-height: 0; }
.app-shell .rail-status {
  display: flex; align-items: center; gap: 7px;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 0;
  border-radius: 6px;
  background: rgba(255, 255, 255, .035);
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: .04em;
  color: #8A8A9C;
}
.app-shell .rail-status .dot {
  width: 5px; height: 5px;
  background: #818CF8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, .16);
}
.app-shell .rail-theme {
  display: flex; align-items: center; gap: 4px;
  margin-bottom: 8px;
  padding: 0 2px;
}
.app-shell .rail-icon-btn,
.app-shell .topbar .rail-icon-btn {
  width: 32px; height: 32px;
  border: 0;
  border-radius: 6px;
  display: grid; place-items: center;
  background: transparent;
  color: #9393A5;
  flex: none;
}
.app-shell .rail-icon-btn:hover { background: var(--rail-bg-hover); color: #fff; }
.app-shell .rail-icon-btn .ic { width: 16px; height: 16px; }
.app-shell .rail-theme-label {
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: .06em;
  color: #6B6B7B;
}

.app-shell .topbar-right,
.app-shell .rail-foot {
  display: flex; align-items: center; gap: 8px;
  margin-left: 0; margin-top: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .07);
}
.app-shell .rail-user {
  display: flex; align-items: center; gap: 9px;
  flex: 1 1 auto; min-width: 0;
  padding: 4px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  text-align: left;
  line-height: normal;
}
.app-shell .rail-user:hover { background: var(--rail-bg-hover); }
.app-shell .rail-user .avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary-grad);
  color: #fff;
  font-size: 11.5px; font-weight: 600;
  line-height: normal;
  flex: none;
}
.app-shell .rail-user-meta { display: block; min-width: 0; }
.app-shell .rail-user-name { display: block; font-size: 12.5px; font-weight: 500; line-height: 1.25; color: #EAEAF2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-shell .rail-user-role { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .06em; color: #707085; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-shell .rail-login {
  width: 100%; height: 40px; min-height: 40px;
  justify-content: center;
  border: 0; border-radius: 6px;
  background: var(--primary-grad);
  color: #fff; font-weight: 600;
}

/* ---------- 2. 浅色顶栏 ---------- */
.app-shell .app-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
  padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
}
.app-shell .app-topbar .topbar-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-sub); white-space: nowrap;
}
.app-shell .app-topbar .topbar-title .sep { color: #B9C1CA; font-size: 13px; }
.app-shell .app-topbar .topbar-title b { color: var(--text); font-weight: 600; }
.app-shell .app-topbar .theme-toggle {
  display: flex; align-items: center; gap: 2px;
  margin-left: auto; margin-top: 0;
  width: auto;
  padding: 3px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--panel);
  justify-content: flex-start;
}
.app-shell .app-topbar .theme-opt {
  width: 26px; height: 22px;
  padding: 0;
  border: 0; border-radius: 20px;
  display: grid; place-items: center;
  background: transparent;
  color: var(--text-mute);
  cursor: pointer;
  transition: background .16s, color .16s;
}
.app-shell .app-topbar .theme-opt .ic { width: 14px; height: 14px; }
.app-shell .app-topbar .theme-opt[aria-pressed='true'] {
  background: var(--primary-soft);
  color: var(--primary-600);
  box-shadow: none;
}
.app-shell .app-topbar .hamburger {
  display: none;
  width: 44px; height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-sub);
  flex: none;
}
/* ---------- 3. 页面容器：28/24/56，内容宽 1280 ---------- */
.app-shell #view-designer,
.app-shell #view-records { padding: 0; }
.app-shell #view-dashboard { padding: 28px 24px 56px; }
.app-shell .wb.wb4 {
  display: block;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0;
}

/* ---------- 4. 工作台 §3.1 ---------- */
.app-shell .page-head {
  display: flex; align-items: flex-end; gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.app-shell .page-head .grow { flex: 1 1 auto; min-width: 240px; }
.app-shell .eyebrow {
  margin: 0;
  font-size: 12px; font-weight: 400;
  color: var(--text-mute);
}
.app-shell .page-head .page-title {
  margin: 6px 0 0;
  font-size: 24px; font-weight: 600;
  letter-spacing: -.015em; line-height: 1.25;
  color: var(--text);
  text-wrap: balance;
}
.app-shell .page-head .page-sub { margin: 5px 0 0; font-size: 13px; line-height: 1.55; color: var(--text-mute); }
.app-shell .page-head .page-sub b { color: var(--primary-600); font-weight: 600; }
.app-shell .page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.app-shell .page-actions .btn {
  display: inline-flex; align-items: center; gap: 6px;
  height: 36px; padding: 0 14px;
  border-radius: 6px;
  font-size: 13px; font-weight: 500; line-height: 1;
}
.app-shell .page-actions .btn-ghost { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-sub); }
.app-shell .page-actions .btn-ghost:hover { border-color: var(--gray-300); background: var(--surface-2); color: var(--text); box-shadow: none; }
.app-shell .page-actions .ic { width: 15px; height: 15px; }
.app-shell .rec-ops .btn-mini,
.app-shell .rec-ops .btn-primary {
  display: inline-flex; align-items: center; gap: 5px;
  height: 30px; padding: 0 10px;
  border-radius: 6px;
  font-size: 12px; font-weight: 500; line-height: 1;
}

.app-shell .stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.app-shell .stat {
  padding: 15px 16px 14px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  min-width: 0;
  cursor: pointer;
  transition: box-shadow .18s ease-out, border-color .18s ease-out;
}
.app-shell .stat:hover, .app-shell .stat:focus-visible {
  box-shadow: 0 2px 8px rgba(20, 26, 32, .07);
  border-color: var(--border-strong);
  transform: none;
}
.app-shell .stat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.app-shell .stat-label { font-size: 12.5px; font-weight: 500; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-shell .stat-icon {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--text-mute);
  flex: none;
}
.app-shell .stat-icon .ic { width: 15px; height: 15px; }
.app-shell .stat-num {
  font-family: var(--font-sans);
  font-size: 32px; font-weight: 600;
  line-height: 1.1; letter-spacing: -.02em;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.app-shell .stat-num em {
  margin-left: 3px;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 12px; font-weight: 400;
  letter-spacing: 0;
  color: var(--text-mute);
}
.app-shell .stat-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 11.5px; color: var(--text-mute); }
.app-shell .delta {
  display: inline-flex; align-items: center; gap: 2px;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 11.5px; font-weight: 600;
}
.app-shell .delta.up { color: var(--success); background: var(--success-soft); }
.app-shell .delta.down { color: var(--danger); background: var(--danger-soft); }
.app-shell .delta.flat { color: var(--text-mute); background: var(--bg-sunken); }
.app-shell .muted { color: var(--text-mute); }

/* 签名元素：36px 高汇聚刻度 */
.app-shell .rhythm {
  margin-top: 12px;
  padding: 13px 18px 12px;
  border-radius: 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
}
.app-shell .rhythm-head { min-width: 156px; margin: 0; display: block; }
.app-shell .rhythm-title { font-size: 12.5px; font-weight: 600; color: var(--text); }
.app-shell .rhythm-note { margin-top: 2px; font-size: 11px; color: var(--text-mute); }
.app-shell .rhythm-plot-wrap { flex: 1 1 auto; min-width: 280px; display: flex; flex-direction: column; gap: 4px; }
.app-shell .rhythm-plot {
  display: flex; align-items: flex-end; gap: 3px;
  height: 48px;
  padding: 0 0 5px;
  border: 0;
  border-bottom: 1px solid var(--border);
}
.app-shell .rhythm-axis {
  display: flex; justify-content: space-between;
  font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .04em;
  color: var(--text-mute);
}
.app-shell .rhythm-bar {
  flex: 1 1 0;
  min-width: 0; min-height: 3px;
  border-radius: 2px 2px 0 0;
  background: var(--primary-300);
  transition: background .15s ease-out;
}
.app-shell .rhythm-bar[data-zero='1'] { background: transparent; }
.app-shell .rhythm-bar[data-peak='1'] { background: var(--primary-600); }
.app-shell .rhythm-bar[data-today='1'] { background: var(--primary-700); }
.app-shell .rhythm-bar:hover { background: var(--primary-700); }
html[data-theme='dark'] .app-shell .rhythm-bar { background: rgba(129, 140, 248, .34); }
html[data-theme='dark'] .app-shell .rhythm-bar[data-zero='1'] { background: transparent; }
html[data-theme='dark'] .app-shell .rhythm-bar[data-peak='1'] { background: var(--primary-400); }
html[data-theme='dark'] .app-shell .rhythm-bar[data-today='1'] { background: var(--primary-300); }
.app-shell .rhythm-empty { align-self: center; font-size: 11.5px; color: var(--text-mute); }
.app-shell .rhythm-legend { display: flex; align-items: center; gap: 14px; margin: 0; font-family: var(--font-mono); font-size: 10px; color: var(--text-mute); }
.app-shell .rhythm-legend b { margin-left: 0; font-family: var(--font-mono); font-weight: 500; color: var(--text-sub); }

.app-shell .dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  margin-top: 16px;
  align-items: start;
}
.app-shell .side-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.app-shell .panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  min-width: 0;
}
.app-shell .panel-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--border); }
.app-shell .panel-head h2 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: 0; line-height: 1.55; color: var(--text); }
.app-shell .count-pill {
  padding: 1px 7px;
  border: 0;
  border-radius: 20px;
  background: #F4F4F5;
  font-family: var(--font-mono);
  font-size: 10.5px; color: var(--text-mute);
}
html[data-theme='dark'] .app-shell .count-pill { background: #1B2428; }
.app-shell .panel-tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.app-shell .panel-tools .btn-ghost {
  height: auto; padding: 0;
  border: 0; background: transparent;
  color: var(--primary-600);
  font-size: 12px; font-weight: 500; line-height: 1.4;
}
.app-shell .panel-tools .btn-ghost:hover {
  background: transparent;
  color: var(--primary-700);
  text-decoration: underline; text-underline-offset: 2px;
  box-shadow: none;
}
.app-shell .link-btn {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 0; border: 0; background: transparent;
  color: var(--primary-600);
  font-size: 12px; font-weight: 500;
  justify-self: end;
}
.app-shell .link-btn:hover { color: var(--primary-700); text-decoration: underline; text-underline-offset: 2px; }
.app-shell .link-btn .ic { width: 12px; height: 12px; }

/* 我的表单：7 列扁平行（名称 / 状态 / 提交数 / 更新时间 / 编辑 / 活码 / 查看） */
.app-shell .frow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px 62px 88px auto 32px 72px;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .14s ease-out;
}
.app-shell .frow:last-child { border-bottom: 0; }
.app-shell .frow:hover, .app-shell .frow:focus-visible { background: #FBFCFD; }
.app-shell .stat:focus-visible,
.app-shell .frow:focus-visible {
  outline: 2px solid var(--primary-400);
  outline-offset: -2px;
}
html[data-theme='dark'] .app-shell .frow:hover { background: var(--surface-2); }
.app-shell .frow-main { min-width: 0; }
.app-shell .frow-title { font-size: 13.5px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-shell .frow-meta { margin-top: 2px; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .02em; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-shell .frow .form-num { font-size: 13px; font-weight: 500; color: var(--text-sub); }
.app-shell .frow .form-num small { display: block; font-family: var(--font-mono); font-size: 9px; font-weight: 400; letter-spacing: .05em; color: var(--text-mute); }
.app-shell .frow-time { font-family: var(--font-sans); font-size: 12px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-shell .frow .icon-btn,
.app-shell .frow .qr-btn {
  width: 28px; height: 28px;
  padding: 0;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #FFF8EB;
  color: #B45309;
  transition: transform .16s, box-shadow .16s;
}
.app-shell .frow .icon-btn:hover { transform: scale(1.06); box-shadow: 0 1px 2px rgba(20, 26, 32, .05); color: #B45309; background: #FFF8EB; }
.app-shell .frow .icon-btn .ic { width: 15px; height: 15px; }
html[data-theme='dark'] .app-shell .frow .icon-btn { background: rgba(240, 180, 41, .12); color: #F0B429; }
/* 我的表单删除按钮：默认低调、hover 转危险色，与其他 icon-btn 区分 */
.app-shell .frow .icon-btn.is-danger { color: var(--text-mute); background: transparent; }
.app-shell .frow .icon-btn.is-danger:hover { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
html[data-theme='dark'] .app-shell .frow .icon-btn.is-danger { color: var(--text-mute); background: transparent; }
html[data-theme='dark'] .app-shell .frow .icon-btn.is-danger:hover { color: var(--danger); background: var(--danger-soft); }
.app-shell .tag {
  display: inline-flex; align-items: center; gap: 5px;
  justify-self: start;
  width: fit-content;
  height: 22px; padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 20px;
  font-size: 11.5px; font-weight: 500; line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}
.app-shell .tag .dot { width: 5px; height: 5px; border-radius: 50%; box-shadow: none; background: currentColor; }
.app-shell .tag-on,
.app-shell .tag-success { background: var(--success-soft); color: var(--success); }
.app-shell .tag-draft,
.app-shell .tag-muted { background: var(--bg-sunken); color: var(--text-mute); }

/* 快捷入口：2×2 带边框磁贴 */
.app-shell .shortcut-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 14px; background: transparent; }
.app-shell .shortcut {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  text-align: left;
  transition: border-color .16s, transform .16s, box-shadow .16s;
}
.app-shell .shortcut:hover { border-color: var(--primary-300); transform: translateY(-1px); box-shadow: 0 1px 2px rgba(20, 26, 32, .05); background: var(--surface-2); }
.app-shell .shortcut .ic { width: 18px; height: 18px; color: var(--primary-600); }
.app-shell .shortcut:hover .ic { color: var(--primary-600); }
.app-shell .shortcut span { font-size: 12.5px; font-weight: 500; color: var(--text); }
.app-shell .shortcut small { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .02em; color: var(--text-mute); }
/* 奇数个磁贴时最后一格横向铺满，避免右下留空 */
.app-shell .shortcut-grid > .shortcut:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
.app-shell .shortcut-grid > .shortcut:last-child:nth-child(odd) small { margin-left: auto; }

/* 活码列表：琥珀色缩略图标 + 扫码次数 */
.app-shell .code-list { display: flex; flex-direction: column; padding: 0; }
.app-shell .code-row {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: 0; border-bottom: 1px solid var(--border);
  background: transparent;
  text-align: left; cursor: pointer;
  line-height: 1.55;
}
.app-shell .code-row:last-child { border-bottom: 0; }
.app-shell .code-row:hover { background: #FBFCFD; }
html[data-theme='dark'] .app-shell .code-row:hover { background: var(--surface-2); }
.app-shell .code-thumb,
.app-shell .code-row .dot {
  width: 30px; height: 30px;
  border-radius: 5px;
  display: grid; place-items: center;
  flex: none;
  background: #FFF8EB;
  color: #B45309;
  border: 1px solid rgba(180, 83, 9, .18);
}
.app-shell .code-thumb .ic { width: 16px; height: 16px; }
html[data-theme='dark'] .app-shell .code-thumb { background: rgba(240, 180, 41, .12); color: #F0B429; border-color: rgba(240, 180, 41, .22); }
.app-shell .code-row-main { display: block; flex: 1 1 auto; min-width: 0; font-size: 12.5px; }
.app-shell .code-row-main b { display: block; font-size: 12.5px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-shell .code-row-main small { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-shell .code-row-num { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
.app-shell .code-row .icon-btn.is-danger { color: var(--text-mute); background: transparent; }
.app-shell .code-row .icon-btn.is-danger:hover { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
html[data-theme='dark'] .app-shell .code-row .icon-btn.is-danger { color: var(--text-mute); background: transparent; }
html[data-theme='dark'] .app-shell .code-row .icon-btn.is-danger:hover { color: var(--danger); background: var(--danger-soft); }

/* ---------- 5. 数据记录：筛选栏 + 扁平表格 ---------- */
.app-shell .rec {
  max-width: 1280px;
  margin: 0 auto;
  padding: 28px 24px 56px;
}
.app-shell .rec-head {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.app-shell .rec-head h2 { margin: 0; font-size: 20px; font-weight: 600; letter-spacing: -.01em; }
.app-shell .rec-count { font-size: 11.5px; color: var(--text-mute); }
.app-shell .rec-ops {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
}
.app-shell .rec-ops .f-input,
.app-shell .rec-ops .f-select { width: auto; min-width: 120px; }
.app-shell .rec-ops .rec-search { flex: 1; min-width: 180px; max-width: 280px; }
.app-shell .record-panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.app-shell .rec-tabs {
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none;
  margin: 0;
  padding: 0 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.app-shell .rec-tabs::-webkit-scrollbar { display: none; }
.app-shell .rec-tab {
  padding: 9px 12px;
  border: 0; border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  font-size: 13px; font-weight: 500; color: var(--text-mute);
  white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.app-shell .rec-tab:hover { color: var(--text); }
.app-shell .rec-tab.is-on { color: var(--primary-600); border-color: var(--primary-500); background: transparent; font-weight: 500; }
.app-shell .rec-pane { min-height: 120px; }
.app-shell .rec-bulk {
  display: flex; align-items: center; gap: 10px;
  margin: 0;
  padding: 9px 14px;
  background: var(--primary-soft);
  border-bottom: 1px solid var(--primary-200);
  font-size: 12.5px; color: var(--primary-700);
}
.app-shell .rec-bulk #recSelCount:empty { display: none; }
.app-shell .rec-table {
  width: 100%; min-width: 720px;
  border-collapse: collapse;
  font-size: 12.5px;
}
.app-shell .rec-table th {
  text-align: left; white-space: nowrap;
  padding: 9px 12px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 11.5px; font-weight: 500; color: var(--text-mute);
  letter-spacing: 0;
  position: sticky; top: 0; z-index: 2;
}
.app-shell .rec-table thead th:first-child { width: 36px; }
.app-shell .rec-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-sub);
  vertical-align: middle;
}
.app-shell .rec-table tbody tr { transition: background .12s; }
.app-shell .rec-table tbody tr:hover { background: #FBFCFD; }
html[data-theme='dark'] .app-shell .rec-table tbody tr:hover { background: var(--surface-2); }
.app-shell .rec-table tbody tr:last-child td { border-bottom: 0; }
.app-shell .rec-table .cell-main { color: var(--text); font-weight: 500; }
.app-shell .rec-table .cell-desc { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-mute); }
.app-shell .rec-table .row-actions { display: flex; gap: 4px; justify-content: flex-end; }
.app-shell .rec-status {
  display: inline-flex; align-items: center;
  height: 22px; padding: 0 8px;
  border-radius: 20px;
  font-size: 11.5px; font-weight: 500; line-height: 1;
  letter-spacing: 0;
}
.app-shell .rec-status.is-blue { color: var(--primary-700); background: var(--primary-soft); }
.app-shell .rec-status.is-green { color: var(--success); background: var(--success-soft); }
.app-shell .rec-status.is-red { color: var(--danger); background: var(--danger-soft); }
.app-shell .rec-status.is-orange { color: var(--warning); background: var(--warning-soft); }
.app-shell .rec-scroll { overflow-x: auto; }
.app-shell .rec-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-mute);
}
.app-shell .rec-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.app-shell .rec-head { align-items: center; }
.app-shell .rec-head-main { flex: 1 1 auto; min-width: 240px; }
.app-shell .rec-head .eyebrow { margin-bottom: 0; }
.app-shell .rec-head h2.rec-title {
  display: block;
  margin: 4px 0 0;
  font-size: 20px; font-weight: 600;
  letter-spacing: -.01em; line-height: 1.55;
}
.app-shell .rec-head-main .tag { margin-top: 6px; }
.app-shell .rec-stats { display: flex; align-items: flex-end; gap: 22px; }
.app-shell .rec-stats div { font-size: 11.5px; }
.app-shell .rec-stats b {
  display: block;
  font-size: 18px; font-weight: 600;
  letter-spacing: -.01em;
  color: var(--text);
  line-height: 1.55;
}
.app-shell .rec-stats span { font-size: 11.5px; color: var(--text-mute); }
.app-shell .rec-ops-spacer { flex: 1 1 auto; }
.app-shell .rec-ops .btn .ic { width: 13px; height: 13px; }
.app-shell .row-link {
  display: inline-flex; align-items: center; justify-content: center;
  height: 30px; padding: 0 10px;
  border: 1px solid var(--border); border-radius: 6px;
  background: var(--panel);
  color: var(--primary-600);
  font-size: 12px; font-weight: 500;
  white-space: nowrap;
}
.app-shell .row-link:hover { border-color: var(--border-strong); background: var(--surface-2); }
.app-shell .pager { margin-left: auto; display: flex; align-items: center; gap: 4px; padding: 0; }
.app-shell .pg-btn {
  min-width: 26px; height: 26px; padding: 0 7px;
  display: grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--panel);
  color: var(--text-sub);
  font-family: var(--font-mono); font-size: 11.5px;
}
.app-shell .pg-btn.is-on { background: var(--primary-500); border-color: var(--primary-500); color: #fff; font-weight: 600; }
.app-shell .pg-btn:disabled { opacity: .45; }
.app-shell .pg-btn .ic { width: 12px; height: 12px; }
.app-shell .rec-ops .f-input { height: 32px; }
.app-shell .rec-ops .rec-date { width: 134px; min-width: 134px; }
.app-shell .rec-date-sep { font-size: 12px; color: var(--text-mute); }
.app-shell .rec-bulk {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  color: var(--text-sub);
  justify-content: flex-start;
}
.app-shell .rec-bulk .rec-count { margin-left: 0; font-size: 12px; }
.app-shell .rec-table .row-actions .icon-btn {
  width: 26px; height: 26px; padding: 0;
  display: inline-grid; place-items: center;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--panel);
  color: var(--text-mute);
  transition: all .14s;
}
.app-shell .rec-table .row-actions .icon-btn .ic { width: 13px; height: 13px; }
.app-shell .rec-table .row-actions .icon-btn:hover { border-color: var(--primary-300); color: var(--primary-600); background: var(--primary-soft); }
.app-shell .rec-table .row-actions .icon-btn.is-danger:hover { border-color: var(--danger); color: var(--danger); background: var(--danger-soft); }

/* ---------- 6. 表单设计器：头部条 / 236-1fr-304 三栏 / 点阵纸面 ---------- */
.app-shell .dz-shell { background: var(--bg); }
.app-shell .dz-formtabs {
  height: auto;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 20px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
}
.app-shell .dz-head-main { flex: 1 1 auto; min-width: 220px; }
.app-shell .dz-head-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.app-shell .dz-head-main .tag { justify-self: auto; }
.app-shell .dz-head-sub {
  margin-top: 2px;
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .06em;
  color: var(--text-mute);
}
.app-shell .dz-formtabs-title { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.app-shell .dz-head-main .dz-title-input {
  width: auto;
  min-width: 96px;
  max-width: 440px;
  field-sizing: content;
  height: 24px;
  margin-left: 0;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px; font-weight: 600; letter-spacing: -.01em;
  line-height: 1.55;
}
.app-shell .dz-head-main .dz-title-input:hover { background: var(--surface-2); }
.app-shell .dz-head-main .dz-title-input:focus {
  outline: none;
  background: var(--panel);
  border-color: var(--primary-300);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.app-shell .dz-formtabs-bar { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.app-shell .dz-formtab {
  height: 30px; padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text-sub);
  font-size: 12px; font-weight: 500;
}
.app-shell .dz-formtab:hover { border-color: #B9C1CA; color: var(--text); background: var(--surface-2); }
.app-shell .dz-formtab.is-active { background: var(--primary-soft); border-color: var(--primary-300); color: var(--primary-700); }
.app-shell .dz-lib-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text); }
.app-shell .dz { grid-template-columns: 236px minmax(0, 1fr) 304px; height: auto; align-items: start; }
/* 设计器：三栏随内容自然增高，由外层视图统一滚动。
   之前组件库/属性面板各自 sticky + 固定高度，父级 .dz-tabpane 又是 overflow:hidden，
   导致最后的分组（问卷题型）被裁掉且无法滚动看到。 */
.app-shell #view-designer.is-active { height: calc(100vh - 52px); overflow-y: auto; }
.app-shell .dz-tabpane.is-active { overflow: visible; }
.app-shell .dz-lib {
  padding: 14px 10px 96px; /* 底部留白：让最后一个分组滚到固定页脚上方 */
  position: static;
  height: auto;
  overflow: visible;
  display: block;
}
.app-shell .dz-lib-scroll { overflow: visible; flex: none; }
.app-shell .dz-lib-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 8px; margin-bottom: 10px;
  border-bottom: 0;
}
.app-shell .dz-lib-title {
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.app-shell .dz-prop {
  position: static;
  height: auto;
  overflow: visible;
  display: block;
  padding-bottom: 96px;
}
.app-shell .dz-prop-body { overflow: visible; flex: none; }
.app-shell .dz-title-input { height: 32px; padding: 0 9px; font-size: 13px; border-radius: 6px; }
.app-shell .dz-sub { margin-top: 6px; font-size: 11px; }
.app-shell .dz-lib-scroll { padding: 0 0 20px; }
.app-shell .dz-cat-title {
  padding: 7px 8px 5px; margin-bottom: 2px;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-mute); font-weight: 500; background: var(--panel);
}
.app-shell .dz-cat-items { gap: 2px; padding: 0; }
.app-shell .dz-comp {
  padding: 9px 4px 7px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  gap: 5px;
}
.app-shell .dz-comp:hover { background: var(--primary-soft); border-color: var(--primary-200); color: var(--primary-700); transform: translateY(-1px); box-shadow: none; }
.app-shell .dz-comp-icon { height: 17px; color: var(--text-mute); }
.app-shell .dz-comp:hover .dz-comp-icon { color: var(--primary-600); }
.app-shell .dz-comp-label { font-size: 11.5px; color: var(--text-sub); }
.app-shell .dz-canvas { background: radial-gradient(circle at 1px 1px, var(--border-strong) 1px, transparent 0) 0 0/22px 22px, var(--bg); padding: 22px; }
.app-shell .dz-canvas-head {
  height: auto;
  max-width: 720px; margin: 0 auto 12px;
  padding: 0; gap: 8px;
  background: transparent; border: 0;
}
.app-shell .dz-count { font-family: var(--font-mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--text-mute); }
.app-shell .dz-canvas-head .dz-actions { margin-left: auto; display: flex; gap: 6px; }
.app-shell .dz-canvas-head .btn { height: 30px; min-height: 30px; padding: 0 10px; font-size: 12px; gap: 5px; }
.app-shell .dz-canvas-scroll { padding: 0; overflow: visible; flex: none; }
.app-shell #dzCanvas {
  width: 100%;
  max-width: 720px; margin: 0 auto;
  min-height: 520px;
  padding: 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(20, 26, 32, .07);
}
.app-shell .dz-sheet-head { padding: 24px 26px 18px; border-bottom: 1px solid var(--border); }
.app-shell .dz-sheet-head h2 { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; }
.app-shell .dz-sheet-head p { margin: 4px 0 0; font-size: 12.5px; color: var(--text-mute); }
/* 纸面大标题可直接编辑：hover 提示可点、聚焦给描边、空值显示占位 */
.app-shell .dz-sheet-head h2.dz-sheet-title {
  margin-left: -6px; padding: 2px 6px; border-radius: 6px; outline: none;
  cursor: text; transition: background .15s ease, box-shadow .15s ease;
}
.app-shell .dz-sheet-head h2.dz-sheet-title:hover { background: var(--panel); }
.app-shell .dz-sheet-head h2.dz-sheet-title:focus { background: var(--panel); box-shadow: 0 0 0 2px var(--primary-soft); }
.app-shell .dz-sheet-head h2.dz-sheet-title:empty::before { content: attr(data-placeholder); color: var(--text-mute); }
.app-shell .dz-head-new { margin-left: auto; }
.app-shell .dz-sheet-fields { padding: 16px 18px 24px; }
.app-shell .dz-card {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
}
.app-shell .dz-card:hover { border-color: var(--border-strong); background: #FBFCFD; box-shadow: none; }
html[data-theme='dark'] .app-shell .dz-card:hover { background: var(--surface-2); }
.app-shell .dz-card.is-selected { border-color: var(--primary-500); background: var(--primary-soft); box-shadow: 0 0 0 1px var(--primary-500) inset; }
.app-shell .dz-card-bar { padding: 0 0 6px; border: 0; background: transparent; border-radius: 0; }
.app-shell .dz-card-type { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: .04em; }
.app-shell .dz-card-body { padding: 0; }
.app-shell .dz-card-title { font-size: 12.5px; font-weight: 500; }
.app-shell .dz-op { width: 22px; height: 20px; border-radius: 3px; border-color: var(--border-strong); }
.app-shell .dz-prop { padding: 16px; }
.app-shell .dz-prop-head {
  height: auto;
  padding: 0 8px; margin-bottom: 10px;
  border-bottom: 0;
  font-family: var(--font-mono);
  font-size: 11px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-mute);
}
.app-shell .dz-prop-body { padding: 14px 0 24px; }

/* ---------- 7. 响应式（对齐原型断点 1180 / 1023 / 720） ---------- */
@media (max-width: 1180px) {
  .app-shell .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-shell .dash-grid { grid-template-columns: minmax(0, 1fr) 280px; }
  .app-shell .dz { grid-template-columns: 212px minmax(0, 1fr) 280px; }
}
@media (max-width: 1023px) {
  body.app-shell { padding-left: 0; }
  .app-shell .app-topbar { height: 52px; padding: 0 14px; gap: 8px; }
  .app-shell .app-topbar .hamburger { display: grid; }
  .app-shell .app-topbar .topbar-title { display: none; }
  .app-shell .app-topbar .theme-toggle { display: none; }
  .app-shell #view-dashboard,
  .app-shell .rec { padding: 20px 14px 48px; }
  .app-shell .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .app-shell .dz { grid-template-columns: minmax(0, 1fr); }
  .app-shell .dz-lib { padding: 12px; border-right: 0; border-bottom: 1px solid var(--border); position: static; height: auto; overflow: visible; }
  .app-shell .dz-cat-items { grid-template-columns: repeat(4, 1fr); }
  .app-shell .dz-prop { border-left: 0; border-top: 1px solid var(--border); position: static; height: auto; overflow: visible; }
  .app-shell .dz-canvas { padding: 16px 12px; }
  .app-shell .dz-canvas-scroll { padding: 0; }
}
@media (max-width: 720px) {
  .app-shell .stat-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .app-shell .frow { grid-template-columns: minmax(0, 1fr) auto 32px auto; }
  .app-shell .link-btn { white-space: nowrap; }
  .app-shell .stat { padding: 12px; }
  .app-shell .stat-num { font-size: 24px; }
  .app-shell .frow { gap: 8px; padding: 12px 14px; }
  .app-shell .frow .tag,
  .app-shell .frow-time,
  .app-shell .frow .form-num { display: none; }
  .app-shell .page-head .page-title { font-size: 20px; }
  .app-shell .rhythm { padding: 12px; }
  .app-shell .rhythm-head { min-width: 100%; }
  .app-shell .rhythm-plot-wrap { order: 3; min-width: 100%; }
  .app-shell .rhythm-legend { display: none; }
  .app-shell .shortcut-grid { padding: 10px; }
}

/* ============================================================
   8. 一线填写端（公开页 /f/<id>）原型精确对齐层
   原型：index.html「一线填写端」区块（.m-* 样式）
   只作用于 body.public-body，不影响管理端内嵌填写器
   ============================================================ */

/* ---- 页面骨架：灰底、整页 flex，头部全宽渐变 ---- */
body.public-body { background: var(--bg); }
body.public-body .filler {
  max-width: 460px;
  margin: 0 auto;
  padding: 0 0 24px;
  /* 内容自适应高度：不再强制 min-height:100dvh，避免短表单底部出现大片空白 */
  min-height: auto;
  display: flex;
  flex-direction: column;
  background: var(--bg);
}

/* ---- 头部卡：编号 kicker / 标题 / 副题 / 进度条（去 AI 味：纯色，无渐变与装饰圆环） ---- */
body.public-body .filler-head {
  position: relative;
  margin: 0;
  padding: 22px 20px 18px;
  background: var(--primary-800);
  color: #fff;
}
body.public-body .m-kicker {
  font-size: 11px;
  opacity: .8; margin-bottom: 4px;
  position: relative;
}
body.public-body .filler-title {
  font-size: 18px; font-weight: 600;
  line-height: 1.3; letter-spacing: -.01em;
  margin: 0; position: relative;
}
body.public-body .filler-desc {
  font-size: 11.5px; opacity: .78;
  margin-top: 4px; line-height: 1.45;
  position: relative; max-width: 260px;
  color: #fff;
}
body.public-body .m-progress {
  display: flex; align-items: center; gap: 8px;
  margin-top: 14px; position: relative;
}
body.public-body .m-prog-track {
  flex: 1; height: 4px; border-radius: 4px;
  background: rgba(255, 255, 255, .22); overflow: hidden;
}
body.public-body .m-prog-fill {
  display: block; height: 100%;
  background: #fff; border-radius: 4px;
  transition: width .35s ease-out;
}
body.public-body .m-prog-text {
  font-family: var(--font-mono); font-size: 10px;
  opacity: .85; white-space: nowrap;
}

/* ---- 表单体：透明底 + 字段白卡 ---- */
body.public-body .filler-body {
  flex: 1;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
body.public-body .f-item {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
}
body.public-body .f-item.is-locked { background: var(--surface-2); }
body.public-body .f-label {
  display: flex;
  align-items: baseline;
  font-size: 12.5px; font-weight: 500;
  color: var(--text);
  margin-bottom: 7px;
}
/* 必填星号跟随标题之后（原型：发现工序 / 产线*） */
body.public-body .f-label .req-star { order: 2; margin-right: 0; margin-left: 2px; }
body.public-body .f-desc { font-size: 11.5px; color: var(--text-mute); margin: -3px 0 7px; line-height: 1.5; }

/* ---- 大控件：44px 高、16px 字号（防 iOS 聚焦放大） ---- */
body.public-body .f-input,
body.public-body .f-select {
  width: 100%;
  height: 44px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--panel);
  font-size: 16px;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
body.public-body .f-input-wrap .f-input { padding-right: 40px; }
body.public-body .f-textarea {
  width: 100%;
  min-height: 78px;
  padding: 10px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 16px;
  line-height: 1.5;
  background: var(--panel);
  color: var(--text);
  resize: none;
}
body.public-body .f-input:focus,
body.public-body .f-select:focus,
body.public-body .f-textarea:focus {
  outline: none;
  border-color: var(--primary-500);
  box-shadow: var(--ring);
}
body.public-body .f-inline { align-items: center; }
body.public-body .f-unit { font-size: 12px; color: var(--text-mute); }
body.public-body .f-select { appearance: auto; }
body.public-body .f-scan-btn { height: 32px; }

/* ---- 单选 / 多选：两列大按钮瓦片（44px 触控高） ---- */
body.public-body .f-item[data-type="radio"] .f-control,
body.public-body .f-item[data-type="checkbox"] .f-control {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
body.public-body .f-item[data-type="radio"] .f-opt,
body.public-body .f-item[data-type="checkbox"] .f-opt {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 9px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-sub);
  cursor: pointer;
  min-height: 44px;
  transition: border-color .14s, background .14s, color .14s;
}
body.public-body .f-item[data-type="radio"] .f-opt:has(input:checked),
body.public-body .f-item[data-type="checkbox"] .f-opt:has(input:checked) {
  border-color: var(--primary-500);
  background: var(--primary-50);
  color: var(--primary-700);
  font-weight: 500;
}
html[data-theme="dark"] body.public-body .f-item[data-type="radio"] .f-opt:has(input:checked),
html[data-theme="dark"] body.public-body .f-item[data-type="checkbox"] .f-opt:has(input:checked) {
  background: var(--primary-soft);
  color: var(--primary-600);
}
body.public-body .f-item[data-type="radio"] .f-opt input,
body.public-body .f-item[data-type="checkbox"] .f-opt input {
  width: 15px; height: 15px; flex: none; margin: 0;
}
/* 选项超过 4 个或文案偏长时仍保持两列；长文案自动换行不撑破 */
body.public-body .f-item[data-type="radio"] .f-opt span,
body.public-body .f-item[data-type="checkbox"] .f-opt span { min-width: 0; word-break: break-all; }

/* 点检清单行：标签不压字，下拉固定宽度 */
body.public-body .f-check-row { align-items: center; gap: 10px; }
body.public-body .f-check-row .f-opt { flex: 1 1 auto; min-width: 0; }
body.public-body .f-check-row .f-opt span { flex: 1; word-break: keep-all; }
body.public-body .f-check-row .f-select { flex: 0 0 108px; width: 108px; height: 40px; font-size: 14px; }

/* ---- 错误态：红描边 + 淡红晕 + 行内提示 ---- */
body.public-body .f-item.has-error .f-input,
body.public-body .f-item.has-error .f-textarea,
body.public-body .f-item.has-error .f-select {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--danger) 14%, transparent);
}
body.public-body .f-item.has-error .f-opt { border-color: color-mix(in srgb, var(--danger) 55%, var(--border-strong)); }
body.public-body .filler-errors { margin: 0; }
body.public-body .filler-errors .err-item {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--danger);
  padding: 2px 0;
}

/* ---- 底部提交栏：白底 + 顶部分隔线 + 46px 主按钮（sticky） ---- */
body.public-body .filler-body > .btn-block {
  position: sticky;
  bottom: 0;
  z-index: 5;
  height: 46px;
  min-height: 46px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: var(--primary-500);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  margin-top: 2px;
}
body.public-body .filler-body > .btn-block::before {
  content: "";
  position: absolute;
  inset: -10px -16px -16px;
  background: var(--panel);
  border-top: 1px solid var(--border);
  z-index: -1;
}
body.public-body .filler-body > .btn-block:hover { background: var(--primary-600); color: #fff; }
/* 分页表单的底部导航同样贴底 */
body.public-body .f-page-nav {
  position: sticky;
  bottom: 0;
  z-index: 5;
  margin: 2px -16px -16px;
  padding: 10px 16px 16px;
  background: var(--panel);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
body.public-body .f-page-nav .btn { height: 40px; border-radius: 6px; }
body.public-body .f-page-nav .btn-primary { background: var(--primary-500); color: #fff; border-color: var(--primary-500); }
body.public-body .f-page-indicator { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }

/* ---- 手机端：提交按钮固定为底部操作栏 ----
   长表单里 sticky 在部分微信内置浏览器会失效，导致用户滚到底也看不到「提交」。
   手机上直接固定到视口底部，保证任何滚动位置都能提交。
   注意：主按钮必须保持 primary 配色，不能被底部栏底色覆盖（否则白底白字＝看不见）。 */
@media (max-width: 719px) {
  body.public-body .filler-body > .btn-block {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    height: 52px;
    min-height: 52px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: var(--primary-500);
    color: #fff;
    box-shadow: 0 -6px 18px rgba(10, 26, 25, .12);
    z-index: 60;
  }
  body.public-body .filler-body > .btn-block::before { display: none; }
  body.public-body .f-page-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    border-radius: 0;
    border-top: 1px solid var(--border);
    background: var(--panel);
    box-shadow: 0 -6px 18px rgba(10, 26, 25, .06);
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    z-index: 60;
  }
  /* 给固定底栏留出空间，避免遮住最后一个字段 */
  body.public-body .filler-body { padding-bottom: 96px; }
  body.public-body .filler-done { padding-bottom: 110px; }
}

/* ---- 分页步骤条 / 接龙名单 / 访客提示条：统一卡片化 ---- */
body.public-body .f-steps {
  margin: 12px 16px 0;
  padding: 10px 12px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
  flex-wrap: wrap;
  row-gap: 6px;
}
body.public-body .relay-list {
  margin: 12px 16px 0;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 11px 12px;
}
body.public-body .visitor-banner {
  margin: 12px 16px 0;
  border-radius: 8px;
  font-size: 12px;
}
/* 提示条 + 表单顶部间距收紧（表单自身 padding-top 14px） */
body.public-body .visitor-banner + .filler-body { padding-top: 10px; }

/* ---- 上传组件：虚线大按钮（原型 uploader），去掉外层旧虚线框 ---- */
body.public-body .f-upload { border: none; padding: 0; }
body.public-body .f-upload-tip { font-size: 12px; color: var(--text-mute); margin-bottom: 6px; }
body.public-body .f-upload .btn-mini {
  width: 100%;
  min-height: 72px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 6px;
  background: var(--bg);
  color: var(--text-mute);
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
body.public-body .f-upload .btn-mini:hover { border-color: var(--primary-400); color: var(--primary-600); }

/* ---- 签名画布与评分等保持卡片内对齐 ---- */
body.public-body .f-sign-canvas { width: 100%; border-radius: 6px; }

/* ---- 提交成功页：居中 + 大圆对勾 ---- */
body.public-body .filler-done {
  flex: 1;
  padding: 48px 24px;
  background: var(--bg);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
/* 上面 display:flex 优先级高于 [hidden]，需显式恢复，否则扫码打开即显示「提交成功」 */
body.public-body .filler-done[hidden] { display: none; }
body.public-body .done-icon {
  width: 76px; height: 76px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--primary-50);
  color: var(--primary-500);
  font-size: 34px;
  margin-bottom: 18px;
  animation: pubPop .42s cubic-bezier(.2, .9, .3, 1.2);
}
html[data-theme="dark"] body.public-body .done-icon { background: var(--primary-soft); }
@keyframes pubPop { 0% { transform: scale(.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
body.public-body .done-title { font-size: 19px; font-weight: 600; }
body.public-body .done-sub { font-size: 12.5px; color: var(--text-mute); margin-top: 6px; line-height: 1.6; }
body.public-body .done-actions { margin-top: 20px; width: 100%; display: flex; flex-direction: column; gap: 8px; }
body.public-body .done-actions .btn { height: 46px; border-radius: 6px; font-size: 15px; }

/* ---- 宽屏兜底：桌面访问时保持手机版式居中 ---- */
@media (min-width: 720px) {
  body.public-body .filler {
    margin: 24px auto;
    min-height: calc(100vh - 48px);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(10, 26, 25, .12);
  }
}

/* ============================================================
   9. 外壳原型精确对齐层（rail + 顶栏页签，严格按原型 §2）
   原型：proto index.html L103-194 + L1024-1085
   ============================================================ */

/* ---- 深色 rail：扁平单层导航 ---- */
.app-shell .topbar .rail-nav { display: flex; flex-direction: column; gap: 2px; }
.app-shell .topbar .rail-label {
  font-family: var(--font-mono);
  font-size: 10px; letter-spacing: .14em;
  color: #5E5E70;
  padding: 0 12px; margin: 6px 0 8px;
}
.app-shell .topbar .nav-btn.rail-item {
  display: flex; align-items: center; gap: 10px;
  height: 40px; padding: 0 12px;
  border: 0; border-radius: 6px;
  background: transparent;
  color: #A5A5B5;
  font-size: 13.5px; font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background .14s, color .14s;
  width: 100%;
}
.app-shell .topbar .nav-btn.rail-item .ic { width: 17px; height: 17px; opacity: .85; flex: none; }
.app-shell .topbar .nav-btn.rail-item:hover { background: var(--rail-bg-hover); color: #E4E4F0; }
.app-shell .topbar .nav-btn.rail-item.is-active {
  background: var(--primary-grad);
  color: #fff;
  box-shadow: 0 2px 10px rgba(79, 70, 229, .35);
}
.app-shell .topbar .nav-btn.rail-item.is-active .ic { opacity: 1; }
.app-shell .topbar .rail-item .badge {
  margin-left: auto;
  font-size: 10.5px; font-weight: 600;
  padding: 1px 6px; border-radius: 20px;
  background: rgba(255, 255, 255, .1);
  color: #D7D7E4;
}
.app-shell .topbar .rail-item.is-active .badge { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---- rail 底部：状态盒 / 主题行 / 用户卡 ---- */
.app-shell .topbar .rail-status {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, .035);
  font-family: var(--font-mono);
  font-size: 10.5px; letter-spacing: .04em;
  color: #8A8A9C;
  margin-bottom: 10px;
}
.app-shell .topbar .rail-status .dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: #818CF8;
  box-shadow: 0 0 0 3px rgba(129, 140, 248, .18);
}
.app-shell .topbar .rail-themerow { display: flex; align-items: center; gap: 4px; margin-bottom: 8px; padding: 0 2px; }
.app-shell .topbar .rail-icon-btn {
  width: 32px; height: 32px; border-radius: 6px;
  border: 0; background: transparent;
  display: grid; place-items: center;
  color: #9393A5; cursor: pointer;
  transition: background .14s, color .14s;
}
.app-shell .topbar .rail-icon-btn:hover { background: var(--rail-bg-hover); color: #E4E4F0; }
.app-shell .topbar .rail-icon-btn .ic { width: 17px; height: 17px; }
.app-shell .topbar .rail-theme-label {
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: .06em;
  color: #6B6B7B;
}
.app-shell .topbar .rail-foot {
  border-top: 1px solid rgba(255, 255, 255, .07);
  padding-top: 12px;
  display: flex; align-items: center; gap: 8px;
  align-self: stretch;
  margin-left: 0;
}
.app-shell .rail-foot .rail-user {
  flex: 1; display: flex; align-items: center; gap: 9px;
  padding: 6px; margin-left: -6px;
  border-radius: 6px; min-width: 0;
}
.app-shell .rail-foot .rail-user .avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--primary-grad);
  display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; color: #fff;
  flex: none;
}
.app-shell .rail-foot .rail-user-meta { min-width: 0; display: flex; flex-direction: column; }
.app-shell .rail-foot .rail-user-name {
  font-size: 12.5px; font-weight: 500; color: #EAEAF2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-shell .rail-foot .rail-user-role {
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: .06em;
  color: #707085;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.app-shell .rail-foot .rail-user[data-profile-btn] {
  cursor: pointer; transition: background .15s;
}
.app-shell .rail-foot .rail-user[data-profile-btn]:hover,
.app-shell .rail-foot .rail-user[data-profile-btn]:focus-visible {
  background: rgba(255,255,255,.07);
  outline: none;
}
.app-shell .rail-foot .rail-user[data-profile-btn] .rail-user-arrow {
  width: 14px; height: 14px; flex: none; color: #707085;
  opacity: .55; transition: transform .15s, opacity .15s;
}
.app-shell .rail-foot .rail-user[data-profile-btn]:hover .rail-user-arrow { opacity: 1; transform: translateY(1px); }

/* ---- 浅色顶栏：面包屑 + 视图页签 + 主题分段（原型精确值） ---- */
.app-shell .app-topbar { gap: 16px; }
.app-shell .app-topbar .view-tabs {
  display: flex; align-items: center; gap: 2px;
  margin-left: auto;
  padding: 3px;
  border: 0;
  border-radius: 8px;
  background: #F4F4F5;
}
.app-shell .app-topbar .view-tab {
  height: 28px;
  padding: 0 12px;
  border: 0; border-radius: 6px;
  background: transparent;
  color: var(--text-sub);
  font-size: 12.5px; font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background .16s, color .16s, box-shadow .16s;
}
.app-shell .app-topbar .view-tab:hover { color: var(--text); }
.app-shell .app-topbar .view-tab.is-active {
  background: var(--panel);
  color: var(--text);
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(20, 26, 32, .05);
}
.app-shell .app-topbar .theme-toggle {
  display: flex;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--panel);
}
.app-shell .app-topbar .theme-opt {
  width: 26px; height: 22px;
  border: 0; border-radius: 20px;
  background: transparent;
  display: grid; place-items: center;
  color: var(--text-mute);
  cursor: pointer;
}
.app-shell .app-topbar .theme-opt .ic { width: 14px; height: 14px; }
.app-shell .app-topbar .theme-opt.is-active { background: var(--primary-soft); color: var(--primary-600); }
html[data-theme='dark'] .app-shell .app-topbar .view-tabs { background: #1B2428; }

/* 窄屏：页签横向滚动，不挤压面包屑 */
@media (max-width: 1023px) {
  .app-shell .app-topbar .view-tabs { flex: 1 1 auto; margin-left: 0; overflow-x: auto; scrollbar-width: none; }
  .app-shell .app-topbar .view-tabs::-webkit-scrollbar { display: none; }
}

/* ============================================================
   10. 设计规范页（原型 §10 spec-* 全量移植）
   ============================================================ */
.spec-nav { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 16px; }
.spec-nav a {
  font-family: var(--font-mono); font-size: 11px;
  padding: 5px 10px; border-radius: 6px;
  color: var(--text-sub); text-decoration: none;
  border: 1px solid var(--border); background: var(--panel);
  transition: border-color .14s, color .14s;
}
.spec-nav a:hover { border-color: var(--primary-400); color: var(--primary-600); }
.spec-section { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 24px 26px; margin-bottom: 14px; }
.spec-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.spec-section-head h2 { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; margin: 0; }
.spec-section-head .idx { font-family: var(--font-mono); font-size: 11px; color: var(--primary-500); letter-spacing: .08em; }
.spec-section-head .desc { font-size: 12.5px; color: var(--text-sub); margin-top: 2px; }
.swatch-groups { display: flex; flex-direction: column; gap: 20px; }
.swatch-group-title { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .08em; color: var(--text-mute); margin-bottom: 8px; }
.swatch-row { display: flex; flex-wrap: wrap; gap: 8px; }
.sw { width: 76px; }
.sw .c { height: 42px; border-radius: 8px; border: 1px solid rgba(0, 0, 0, .05); }
.sw .n { display: block; font-size: 10px; color: var(--text-mute); margin-top: 4px; }
.sw .h { display: block; font-family: var(--font-mono); font-size: 9.5px; color: var(--text-sub); }
.type-table { width: 100%; border-collapse: collapse; }
.type-table th, .type-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.type-table th { font-family: var(--font-mono); font-size: 10px; letter-spacing: .06em; color: var(--text-mute); font-weight: 400; }
.type-table td.lv { font-size: 12px; color: var(--text-sub); }
.type-table td.sp { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-mute); }
.notes-card { background: var(--bg); border: 1px dashed var(--border-strong); border-radius: 10px; padding: 16px 18px; margin-top: 14px; }
.notes-card .t { font-weight: 600; font-size: 12.5px; margin-bottom: 8px; }
.notes-card ul { margin: 0; padding-left: 18px; }
.notes-card li { font-size: 12px; color: var(--text-sub); line-height: 1.8; }
.space-scale { display: flex; align-items: flex-end; gap: 12px; padding: 18px; background: var(--bg); border-radius: 10px; border: 1px dashed var(--border-strong); flex-wrap: wrap; }
.space-item { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.space-bar { background: var(--primary-grad); border-radius: 2px; }
.space-cap { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-mute); }
.demo-tiles { display: flex; gap: 12px; flex-wrap: wrap; }
.demo-tile { flex: 1; min-width: 180px; border: 1px solid var(--border); border-radius: 10px; padding: 18px; }
.demo-tile .radius-demo, .demo-tile .shadow-demo { height: 46px; background: var(--panel); border: 1px solid var(--border); margin-bottom: 10px; }
.demo-tile .lab { font-family: var(--font-mono); font-size: 10px; color: var(--text-mute); line-height: 1.5; }
.spec-two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.state-matrix { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.matrix-cell { border: 1px solid var(--border); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.matrix-cell .cap { font-family: var(--font-mono); font-size: 9.5px; color: var(--text-mute); letter-spacing: .04em; }
@media (max-width: 900px) { .spec-two { grid-template-columns: 1fr; } }

/* ---- 规范页依赖的基础组件（原型 §基础组件，全局可用） ---- */
.input {
  width: 100%; height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-strong, #D4D4D8);
  border-radius: 4px;
  font-size: 13px;
  background: var(--panel); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--primary-500); box-shadow: 0 0 0 3px var(--primary-soft, #E0E7FF); }
.tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px; border-radius: 4px;
  font-size: 10.5px; font-weight: 500;
  letter-spacing: .02em;
}
.tag-success { background: var(--success-soft, #E7F6EC); color: var(--success, #16794A); }
.tag-warning { background: var(--warning-soft, #FBEEDC); color: var(--warning, #D97706); }
.tag-danger { background: var(--danger-soft, #FBE7E9); color: var(--danger, #C22F3C); }
.tag-muted { background: var(--bg-sunken, #F4F4F5); color: var(--text-sub, #3F3F46); }
.switch { width: 30px; height: 18px; border-radius: var(--radius-pill); background: var(--border-strong); position: relative; cursor: pointer; transition: background var(--t-fast) var(--ease); display: inline-block; flex: none; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--neutral-0); transition: left var(--t-fast) var(--ease); box-shadow: var(--shadow-xs); }
.switch.on { background: var(--primary); }
.switch.on::after { left: 14px; }

/* ---------------- 能力未开通：导航置灰引导（P1-2） ----------------
   菜单保持稳定：能力关闭时入口不再隐藏，改为置灰 + 「未开通」标注，
   点击给出开通引导提示（toast），接口层仍独立拦截。 */
/* 恢复 hidden 语义：.rail-item 的 display:flex 会覆盖 hidden 属性（同 .filler-done 缺陷），
   否则「系统管理 / 设计规范」在未登录或无权限时仍可见。 */
.app-shell .topbar .nav-btn.rail-item[hidden] { display: none; }
.rail-item.is-locked { opacity: .55; }
.rail-item.is-locked:hover { opacity: .75; }
.rail-lock { display: none; margin-left: auto; flex: none; font-size: 10px; line-height: 1; padding: 3px 6px; border-radius: var(--radius-pill); background: var(--warning-soft); color: var(--warning); font-weight: 600; letter-spacing: .02em; }
.rail-item.is-locked .rail-lock { display: inline-block; }

/* ---------------- 面包屑层级化（P2） ----------------
   子视图显示「父级 / 当前页」，父级为可点击按钮，返回对应 rail 视图。 */
.crumb-parent { background: none; border: 0; padding: 0; font: inherit; font-weight: 400; color: var(--text-mute); cursor: pointer; }
.crumb-parent:hover { color: var(--primary); text-decoration: underline; }
.spinner {
  width: 12px; height: 12px;
  border: 2px solid rgba(255, 255, 255, .3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: specSpin .7s linear infinite;
  display: inline-block;
}
@keyframes specSpin { to { transform: rotate(360deg); } }
.btn.is-loading { pointer-events: none; opacity: .85; }
.btn .ic { width: 14px; height: 14px; }

/* ---------------- 班组管理 v2：四页签工作区 ---------------- */
.team-v2 { width: 100%; max-width: 1600px; }
.team-v2 .team-tabs { overflow-x: auto; scrollbar-width: thin; }
.team-v2 .team-tabs > .plat-tab { flex: none; }
.team-v2 .team-tabs .plat-actions { flex: none; padding: var(--sp-2) 0; }
.team-context { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; }
.team-context .dz-field { margin: 0; min-width: min(320px, 100%); }
.team-context > .plat-detail { margin-left: auto; }
.team-inline-form { display: flex; align-items: flex-end; gap: var(--sp-4); flex-wrap: wrap; margin-top: var(--sp-4); }
.team-inline-form .dz-field { margin-bottom: 0; }
.team-inline-form .dz-field input, .team-inline-form .dz-field select { min-width: 120px; }
.team-actions, .team-export-actions, .team-toolbar { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; }
.team-section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); margin-bottom: var(--sp-4); }
.team-section-head .plat-h3 { margin-bottom: var(--sp-1); }
.team-section-head h4 { margin: 0 0 var(--sp-1); font-size: var(--fs-md); }
.team-dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-4); }
.team-dashboard-grid > div { display: flex; flex-direction: column; gap: var(--sp-4); min-width: 0; }
.team-chart-scroll { max-width: 100%; overflow-x: auto; }
.team-my-rank { margin-bottom: var(--sp-3); color: var(--primary-600); font-size: var(--fs-sm); }
.team-leader-row { flex-wrap: wrap; padding: var(--sp-2); border-radius: var(--radius-sm); }
.team-leader-row .top-name { width: 110px; }
.team-leader-row .top-val { width: 56px; }
.team-leader-meta { flex: 0 0 100%; padding-left: 28px; color: var(--text-mute); font-size: var(--fs-xs); }
.team-todo-list { display: grid; gap: var(--sp-2); }
.team-todo { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--sp-4); width: 100%; padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel); color: var(--text); text-align: left; cursor: pointer; }
.team-todo:hover { border-color: var(--primary-300); background: var(--primary-softer); }
.team-todo-kind { padding: var(--sp-1) var(--sp-3); border-radius: var(--radius-pill); background: var(--warning-soft); color: var(--warning); font-size: var(--fs-xs); white-space: nowrap; }
.team-empty { padding: var(--sp-8); color: var(--text-mute); text-align: center; }

/* 导出入口共用日期、成员、表单和工具口径。 */
.team-export-bar, .team-filter-bar { display: flex; align-items: flex-end; gap: var(--sp-3); flex-wrap: wrap; margin: var(--sp-4) 0; }
.team-export-bar { padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-sunken); }
.team-export-bar > label, .team-filter-bar > label { display: flex; flex-direction: column; gap: var(--sp-1); color: var(--text-mute); font-size: var(--fs-xs); }
.team-export-bar input, .team-export-bar select, .team-filter-bar input, .team-filter-bar select,
.team-field input, .team-field select, .team-field textarea,
.team-fish-cat-head input, .team-cause-row input, .team-cause-row select,
.team-section-head input[type='month'] {
  min-height: 36px; padding: var(--sp-2) var(--sp-3); border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm); background: var(--panel); color: var(--text); font: inherit; font-size: var(--fs-sm);
}
.team-export-bar input:focus-visible, .team-export-bar select:focus-visible,
.team-filter-bar input:focus-visible, .team-filter-bar select:focus-visible,
.team-field input:focus-visible, .team-field select:focus-visible, .team-field textarea:focus-visible,
.team-fish-cat-head input:focus-visible, .team-cause-row input:focus-visible, .team-cause-row select:focus-visible {
  outline: 2px solid var(--border-focus); outline-offset: 1px;
}
.team-export-actions { margin-left: auto; align-self: flex-end; }
.team-table-scroll { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.team-table-scroll .dz-table { min-width: 760px; }
.team-link { padding: 0; border: 0; background: none; color: var(--primary-600); font: inherit; cursor: pointer; text-align: left; }
.team-link:hover { text-decoration: underline; }
.team-link.is-danger, .team-danger { color: var(--danger); }
.team-warning { color: var(--warning); }
.team-subtitle { margin: var(--sp-6) 0 var(--sp-3); font-size: var(--fs-sm); color: var(--text-sub); }
.team-checkboxes { display: flex; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-4); }

/* 问题档案与全链路状态。 */
.team-issue-list, .team-analysis-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.team-issue-card { padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--bg-elev); }
.team-issue-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); }
.team-issue-title { display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-md); font-weight: var(--fw-semibold); }
.team-issue-meta, .team-related { margin-top: var(--sp-1); color: var(--text-mute); font-size: var(--fs-xs); }
.team-issue-summary { margin-top: var(--sp-3); color: var(--text-sub); font-size: var(--fs-sm); white-space: pre-wrap; }
.team-analysis-list { margin: var(--sp-4) 0; padding-top: var(--sp-3); border-top: 1px dashed var(--border-strong); }
.team-analysis-row { display: flex; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-3); border-radius: var(--radius-sm); background: var(--panel); }
.team-closure-line { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding-top: var(--sp-3); border-top: 1px solid var(--border); color: var(--text-sub); font-size: var(--fs-xs); }
.team-status { display: inline-flex; align-items: center; width: fit-content; padding: var(--sp-1) var(--sp-3); border-radius: var(--radius-pill); background: var(--bg-sunken); color: var(--text-sub); font-size: var(--fs-2xs); font-weight: var(--fw-medium); white-space: nowrap; }
.team-status.is-closed, .team-status.is-normal { background: var(--success-soft); color: var(--success); }
.team-status.is-processing { background: var(--primary-soft); color: var(--primary-700); }
.team-status.is-open { background: var(--warning-soft); color: var(--warning); }
.team-status.is-abnormal { background: var(--danger-soft); color: var(--danger); }
.team-tags { display: flex; gap: var(--sp-2); flex-wrap: wrap; margin-top: var(--sp-2); }
.team-tags > span { padding: var(--sp-1) var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-pill); background: var(--panel); color: var(--text-sub); font-size: var(--fs-xs); }

/* 抽屉与结构化分析编辑器。 */
.team-overlay-open { overflow: hidden; }
.team-mask { position: fixed; inset: 0; z-index: 1800; display: flex; justify-content: flex-end; background: rgba(20, 26, 32, .46); }
.team-drawer { display: flex; flex-direction: column; width: min(680px, 100vw); height: 100%; border: 0; border-left: 1px solid var(--border); background: var(--bg-elev); box-shadow: var(--shadow-lg); outline: none; }
.team-drawer.team-editor { width: min(920px, 100vw); }
.team-drawer-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--sp-4); padding: var(--sp-5) var(--sp-6); border-bottom: 1px solid var(--border); background: var(--panel); }
.team-drawer-head h3 { margin: 0; font-size: var(--fs-xl); }
.team-drawer-head span { color: var(--text-mute); font-size: var(--fs-xs); }
.team-drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: var(--sp-5) var(--sp-6) calc(var(--sp-6) + var(--mobnav-h, 0px)); }
.team-drawer-foot { display: flex; justify-content: flex-end; gap: var(--sp-3); padding: var(--sp-4) var(--sp-6) calc(var(--sp-4) + var(--mobnav-h, 0px)); border-top: 1px solid var(--border); background: var(--panel); }
.team-context-card { margin-bottom: var(--sp-4); padding: var(--sp-4); border-left: 3px solid var(--primary); border-radius: var(--radius-sm); background: var(--primary-softer); color: var(--text-sub); font-size: var(--fs-sm); }
.team-context-card p { margin: var(--sp-2) 0; white-space: pre-wrap; }
.team-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--sp-3); }
.team-field { display: flex; flex-direction: column; gap: var(--sp-1); margin-bottom: var(--sp-3); color: var(--text-sub); font-size: var(--fs-xs); }
.team-field textarea { min-height: 76px; resize: vertical; }
.team-field select[multiple] { min-height: 76px; }
.team-span-2 { grid-column: span 2; }
.team-subhead { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin: var(--sp-4) 0 var(--sp-3); }
.team-subhead h4 { margin: 0; font-size: var(--fs-md); }
.team-why-layers { display: grid; gap: var(--sp-3); }
.team-why-layer { padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel); }
.team-layer-title, .team-fish-cat-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); margin-bottom: var(--sp-2); font-weight: var(--fw-semibold); }
.team-fish-svg { max-width: 100%; margin: var(--sp-4) 0; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); overscroll-behavior-x: contain; }
.team-fish-svg svg { display: block; width: 100%; min-width: 860px; height: auto; }
.fish-main, .fish-bone { stroke: var(--neutral-500); stroke-width: 3; fill: none; }
.fish-bone { stroke-width: 2; }
.fish-head { fill: var(--primary-soft); stroke: var(--primary-600); stroke-width: 2; }
.fish-issue { fill: var(--primary-800); font-size: 15px; font-weight: 600; }
.fish-cat { fill: var(--text); font-size: 17px; font-weight: 600; }
.fish-cause { fill: var(--text-sub); font-size: 12px; }
.fish-cause.is-confirmed, .fish-cause.is-resolved { fill: var(--success); }
.fish-cause.is-excluded { fill: var(--text-mute); text-decoration: line-through; }
.team-fish-cats { display: grid; gap: var(--sp-3); }
.team-fish-cat { padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel); }
.team-fish-cat-head input { flex: 1; font-weight: var(--fw-semibold); }
.team-cause-row { display: grid; grid-template-columns: minmax(180px, 1fr) 110px 150px auto; align-items: center; gap: var(--sp-2); margin-bottom: var(--sp-2); }

/* 月历仅在自身容器横向滚动，避免整页被 31 天撑宽。 */
.team-calendar-legend { display: flex; align-items: center; gap: var(--sp-4); flex-wrap: wrap; margin-bottom: var(--sp-3); color: var(--text-mute); font-size: var(--fs-xs); }
.team-calendar-legend span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.team-calendar-legend i { width: 12px; height: 12px; border-radius: 3px; }
.team-calendar-legend i.is-normal { background: var(--success); }
.team-calendar-legend i.is-abnormal { background: var(--danger); }
.team-calendar-legend i.is-missing { background: var(--neutral-300); }
.team-calendar-wrap, .team-member-check { min-width: 0; max-width: 100%; }
.team-member-check { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.team-calendar-scroll { width: 100%; max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch; }
.team-calendar { width: max-content; min-width: 100%; border-collapse: separate; border-spacing: 2px; font-size: var(--fs-xs); }
.team-calendar th { padding: var(--sp-1); background: var(--bg-sunken); color: var(--text-mute); text-align: center; white-space: nowrap; }
.team-calendar td { padding: 0; text-align: center; }
.team-calendar .team-tool-col { position: sticky; left: 0; z-index: 2; min-width: 156px; max-width: 156px; padding: var(--sp-2) var(--sp-3); background: var(--panel); text-align: left; box-shadow: 2px 0 0 var(--border); }
.team-calendar thead .team-tool-col { z-index: 3; background: var(--bg-sunken); }
.team-tool-col b, .team-tool-col span { display: block; overflow: hidden; text-overflow: ellipsis; }
.team-tool-col span { color: var(--text-mute); font-size: var(--fs-2xs); font-weight: var(--fw-regular); }
.team-day { width: 30px; height: 30px; padding: 0; border: 1px solid transparent; border-radius: var(--radius-xs); cursor: pointer; font-weight: var(--fw-bold); }
.team-day.is-normal { background: var(--success-soft); color: var(--success); border-color: var(--success-100); }
.team-day.is-abnormal { background: var(--danger-soft); color: var(--danger); border-color: var(--danger-100); }
.team-day.is-missing { background: var(--bg-sunken); color: var(--text-mute); border-color: var(--border); }
.team-day:hover, .team-day:focus-visible { outline: 2px solid var(--border-focus); outline-offset: 0; }
.team-retention-warning { margin: var(--sp-3) 0; padding: var(--sp-4); border: 1px solid var(--warning-100); border-left: 3px solid var(--warning); border-radius: var(--radius-sm); background: var(--warning-soft); color: var(--warning); font-size: var(--fs-sm); }
.team-unmatched-list { display: grid; gap: var(--sp-2); }
.team-unmatched-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-3); border: 1px dashed var(--warning); border-radius: var(--radius-sm); }

/* 点检时间线、每日档案与照片墙。 */
.team-history { display: grid; gap: var(--sp-3); }
.team-check-record { padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.team-check-record-head { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); }
.team-check-record-head > div { display: flex; align-items: center; gap: var(--sp-3); }
.team-check-record-head > span { color: var(--text-mute); font-size: var(--fs-xs); }
.team-check-note { margin: var(--sp-3) 0; color: var(--text-sub); font-size: var(--fs-sm); white-space: pre-wrap; }
.team-photo-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: var(--sp-3); margin: var(--sp-3) 0; }
.team-photo-wall button { min-width: 0; padding: var(--sp-1); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-elev); color: var(--text-mute); cursor: zoom-in; }
.team-photo-wall img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius-xs); background: var(--bg-sunken); }
.team-photo-wall span { display: block; padding: var(--sp-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-2xs); }
.team-no-photo { display: grid; place-items: center; min-height: 84px; margin: var(--sp-3) 0; border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); background: var(--bg-sunken); color: var(--text-mute); font-size: var(--fs-sm); }
.team-photo-mask { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--sp-4); padding: var(--sp-5) var(--sp-5) calc(var(--sp-5) + var(--mobnav-h, 0px)); background: rgba(15, 20, 25, .88); }
.team-photo-mask img { max-width: 100%; max-height: calc(100dvh - 100px - var(--mobnav-h, 0px)); object-fit: contain; }
.team-photo-mask .btn { align-self: flex-end; }

/* 成员质量画像。 */
.team-profile-basic { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; padding: var(--sp-4); border-radius: var(--radius); background: var(--primary-softer); }
.team-profile-basic b { font-size: var(--fs-xl); }
.team-profile-basic span { color: var(--text-sub); font-size: var(--fs-sm); }
.team-profile-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--sp-2); margin: var(--sp-4) 0; }
.team-profile-metrics > div { padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--panel); text-align: center; }
.team-profile-metrics b, .team-profile-metrics span { display: block; }
.team-profile-metrics b { font-size: var(--fs-xl); }
.team-profile-metrics span { color: var(--text-mute); font-size: var(--fs-xs); }
.team-profile-section { margin-top: var(--sp-4); padding-top: var(--sp-4); border-top: 1px solid var(--border); }
.team-profile-section h4 { margin: 0 0 var(--sp-3); }
.team-profile-row { display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3); padding: var(--sp-2) 0; border-bottom: 1px dashed var(--border); font-size: var(--fs-sm); }

@media (max-width: 1023px) {
  .team-v2 { padding: var(--sp-4) var(--sp-4) calc(var(--sp-8) + var(--mobnav-h, 0px)); }
  .team-v2 .plat-body { padding-bottom: var(--mobnav-h, 0px); }
  .team-dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .team-context > .plat-detail { margin-left: 0; }
  .team-drawer-body { padding-bottom: calc(var(--sp-8) + var(--mobnav-h, 0px)); }
  .team-drawer-foot { padding-bottom: calc(var(--sp-5) + var(--mobnav-h, 0px)); }
}

@media (max-width: 760px) {
  .team-v2 .team-tabs { flex-wrap: wrap; overflow: visible; }
  .team-v2 .team-tabs > .plat-tab { flex: 1 1 0; padding: var(--sp-3) var(--sp-2); font-size: var(--fs-xs); }
  .team-v2 .team-tabs .plat-actions { width: 100%; margin-left: 0; justify-content: flex-end; border-top: 1px solid var(--border); }
  .team-v2 .team-tabs .plat-actions .btn { min-height: 36px; }
  .team-section-head, .team-issue-head, .team-analysis-row, .team-closure-line { flex-direction: column; }
  .team-section-head .team-actions, .team-issue-head .team-actions { width: 100%; }
  .team-inline-form { align-items: stretch; }
  .team-inline-form .dz-field { width: 100%; }
  .team-inline-form .dz-field > span { flex-basis: 76px; }
  .team-export-bar > label, .team-filter-bar > label { flex: 1 1 calc(50% - var(--sp-3)); min-width: 132px; }
  .team-export-bar input, .team-export-bar select, .team-filter-bar input, .team-filter-bar select { width: 100%; min-height: 44px; }
  .team-export-actions { width: 100%; margin-left: 0; }
  .team-export-actions .btn { flex: 1 1 auto; }
  .team-filter-bar .seg { width: 100%; }
  .team-filter-bar .seg button { flex: 1; min-height: 44px; }
  .team-form-grid { grid-template-columns: minmax(0, 1fr); }
  .team-span-2 { grid-column: auto; }
  .team-field input, .team-field select, .team-fish-cat-head input, .team-cause-row input, .team-cause-row select { min-height: 44px; }
  .team-cause-row { grid-template-columns: minmax(0, 1fr); }
  .team-cause-row .team-link { min-height: 36px; }
  .team-drawer, .team-drawer.team-editor { width: 100vw; border-left: 0; }
  .team-drawer-head { padding: var(--sp-4); }
  .team-drawer-body { padding: var(--sp-4) var(--sp-4) calc(var(--sp-8) + var(--mobnav-h, 0px)); }
  .team-drawer-foot { padding: var(--sp-3) var(--sp-4) calc(var(--sp-4) + var(--mobnav-h, 0px)); }
  .team-drawer-foot .btn { flex: 1; }
  .team-day { width: 44px; height: 44px; }
  .team-calendar .team-tool-col { min-width: 126px; max-width: 126px; }
  .team-photo-wall { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-photo-wall button { min-height: 44px; }
  .team-profile-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .team-check-record-head { align-items: flex-start; flex-direction: column; }
  .team-photo-mask { padding-bottom: calc(var(--sp-6) + var(--mobnav-h, 0px)); }
  .team-v2 .dz-toast { bottom: calc(var(--mobnav-h, 0px) + var(--sp-5)); }
}

@media (prefers-reduced-motion: reduce) {
  .team-v2 *, .team-v2 *::before, .team-v2 *::after { scroll-behavior: auto !important; transition: none !important; }
}


/* ============================================================
   工作台主页：我的表单 / 我的活码 双主板块（升级活码层级）
   ============================================================ */
/* 两个主板块等宽并排，取代原「左主 1fr + 右窄 320px」 */
.app-shell .dash-grid--main,
.dash-grid--main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.app-shell .dash-grid--main > .panel,
.dash-grid--main > .panel { align-self: stretch; }

/* 快捷入口：从边栏移出后全宽铺开，磁贴一行排列 */
.app-shell .panel--quick { margin-top: 16px; }
.app-shell .shortcut-grid--wide,
.shortcut-grid--wide { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.app-shell .shortcut-grid--wide > .shortcut,
.shortcut-grid--wide > .shortcut:last-child:nth-child(odd) { grid-column: auto; flex-direction: column; align-items: flex-start; gap: 8px; }
.app-shell .shortcut-grid--wide > .shortcut small { margin-left: 0; }

/* 活码行升级：扫码次数 + 查看按钮 */
.app-shell .code-row--full .code-row-num,
.code-row--full .code-row-num { display: inline-flex; flex-direction: column; align-items: flex-end; line-height: 1.25; flex: none; }
.app-shell .code-row--full .code-row-num small,
.code-row--full .code-row-num small { font-size: 9.5px; color: var(--text-mute); }
.app-shell .code-row--full .link-btn,
.code-row--full .link-btn { flex: none; white-space: nowrap; }

@media (max-width: 1180px) {
  .app-shell .shortcut-grid--wide,
  .shortcut-grid--wide { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1023px) {
  .app-shell .dash-grid--main,
  .dash-grid--main { grid-template-columns: minmax(0, 1fr); }
  .app-shell .shortcut-grid--wide,
  .shortcut-grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .app-shell .shortcut-grid--wide,
  .shortcut-grid--wide { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 明细数据：单条记录处理进度下拉 */
.fw-progress-sel { max-width: 110px; padding: 3px 6px; font-size: 12px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text); cursor: pointer; }
.fw-progress-sel:focus { outline: 2px solid var(--primary-200); border-color: var(--primary); }
