/* == css/app/workspace.css · PC 端工作台布局（Ardot 设计稿 V1）==
 *
 * 骨架：左侧固定侧边栏 + 右侧主工作区（顶栏 / 页面头 / 统计条 / 数据表格）
 * 设计取向：冷静专业、高密度。低饱和白底、克制描边、无阴影堆叠、圆角收敛。
 * 命名空间统一 ws- 前缀，与既有 .site-header / .t-card 等老类名零冲突；
 * 所有规则均限定在 body:not(.mobile-body) 内，移动端分支完全不受影响。
 *
 * 【自适应策略】—— 本文件不使用任何写死的画布尺寸，全部随视口流动：
 *   1. 侧边栏三态：完整(≥1200) → 图标栏(880–1199) → 隐藏(<880，由顶栏接管品牌)
 *   2. 表格列宽用百分比 + minmax 下限，随容器自动重分配；窄屏按优先级逐列退场
 *   3. 统计条 grid auto-fit，容器变窄自动 4→3→2→1 列，无需媒体查询
 *   4. 内容区 max-width 封顶，超宽屏居中不拉伸（阅读行长可控）
 *   5. 字号/间距用 clamp() 在小屏平滑降级，避免"缩小版桌面"观感
 * ========================================================================== */

/* ========== 布局骨架 ========== */
/* 应用壳：视口高度锁定，滚动发生在内容区内部（表格列表区）而非整页。
   高度锁定只在「内容确实放得下」时启用，故走 100vh + 内部滚动，
   短内容页（docs/agreement）内容不足时由 .ws-shell 自身不产生滚动。 */
body.workspace-body {
  height: 100vh;
  overflow: hidden;
}
body.workspace-body .ws-shell {
  display: flex;
  align-items: stretch;
  height: 100%;
  background: #fff;
}
/* 内容极少的页面（协议/规范）：解除高度锁定，回到整页滚动 */
body.workspace-body .mvc-main.is-short { flex: 0 0 auto; overflow: visible; }
body.workspace-body:has(.mvc-main.is-short) { height: auto; overflow: visible; min-height: 100vh; }
body.workspace-body:has(.mvc-main.is-short) .ws-shell { height: auto; min-height: 100vh; }

/* 长表单页（提交反馈等）：内容必然超过一屏，不能锁 body。
   shell 显式限高 100vh，滚动交给 .mvc-main —— 侧边栏/顶栏因此保持 sticky 不动。 */
body.workspace-body:has(.mvc-main.is-form) {
  height: 100vh;
  overflow: hidden;
}
body.workspace-body:has(.mvc-main.is-form) .ws-shell {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}
body.workspace-body .mvc-main.is-form {
  overflow-y: auto;
  min-height: 0;
}

/* :has() 不可用时（老浏览器）的静态兜底：整页滚动，功能不丢 */
@supports not selector(:has(*)) {
  body.workspace-body { height: auto; overflow: visible; min-height: 100vh; }
  body.workspace-body .ws-shell { height: auto; min-height: 100vh; }
  body.workspace-body .ws-table-scroll { overflow-x: auto; overflow-y: visible; }
  body.workspace-body .ws-table-card { flex: 0 0 auto; }
}
/* 接管 mvc.css 的 sticky footer 规则：工作台为定高应用壳，页面自身不滚屏 */
body:not(.mobile-body) .ws-shell .mvc-main {
  flex: 1;
  min-width: 0;      /* 关键：允许 flex 子项收缩，否则表格撑破容器 */
  min-height: 0;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
}
/* 主区列：min-width:0 防止长内容撑破 */
.ws-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* ========== 侧边栏 ========== */
.ws-side {
  width: var(--ws-sidebar-w);
  flex: none;
  background: #fafafa;
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}
.ws-side-brand {
  height: var(--ws-topbar-h);
  flex: none;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 16px;
  min-width: 0;
}
.ws-side-logo {
  width: 28px;
  height: 28px;
  flex: none;
  border-radius: 7px;
  background: var(--blue);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ws-side-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ws-side-logo svg { display: block; }
.ws-side-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.ws-side-nav {
  padding: 6px 8px 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;          /* 菜单多时不撑破侧栏 */
  min-height: 0;
}
.ws-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 34px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--gray-1);
  white-space: nowrap;
  transition: background 0.12s, color 0.12s;
}
.ws-nav-item:hover { background: var(--fill); color: var(--black); }
.ws-nav-item.active { background: var(--blue-50); color: var(--blue); font-weight: 500; }
.ws-nav-item svg { flex: none; width: 16px; height: 16px; }
.ws-nav-item > span:not(.ws-nav-badge) {
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.ws-nav-item .ws-nav-badge {
  margin-left: auto;
  flex: none;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 5px;
  background: var(--fill);
  color: var(--gray-2);
  font-size: 11px;
  line-height: 18px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.ws-nav-item.active .ws-nav-badge { background: #fff; color: var(--blue); }
.ws-nav-item .ws-nav-badge.is-alert { background: var(--ws-amber-bg); color: var(--ws-amber-text); }
.ws-side-spacer { flex: 1; min-height: 16px; }
.ws-side-foot {
  border-top: 1px solid var(--border-light);
  padding: 10px 12px;
  flex: none;
}
/* 登录态挂载点：JS（features/nav.js）注入 .nav-user 结构，此处给侧边栏形态。
   注入后的结构是：[按钮（头像 + 昵称 + 箭头）] [消息铃铛]。
   两者必须排在同一行：按钮是块级 flex 容器，若沿用 width:100%（整行占满），
   后面的铃铛会被挤到第二行，表现为侧边栏左下角「用户行下面多出一个铃铛」的错位。
   因此 .nav-user 改为横向 flex，按钮 flex:1 自适应剩余宽度。
   铃铛本身的尺寸/角标样式在核心层 components.css（.nav-bell/.nav-badge）。 */
.ws-side-user .nav-user {
  position: relative;
  display: flex;
  align-items: center;
  gap: 4px;
}
.ws-side-user .nav-user-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  width: auto;
  padding: 6px 8px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--black);
  text-align: left;
  transition: background 0.12s;
}
.ws-side-user .nav-user-btn:hover,
.ws-side-user .nav-user.open .nav-user-btn { background: var(--fill); }
.ws-side-user .nav-avatar { width: 30px; height: 30px; flex: none; font-size: 13px; }
.ws-side-user .nav-user-name {
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
/* 侧边栏里下拉菜单向上弹出，避免被视口底部裁切 */
.ws-side-user .nav-user-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: auto;
  bottom: calc(100% + 6px);
  min-width: 0;
}
.ws-side-user .btn { width: 100%; padding: 9px 0; font-size: 14px; border-radius: 9px; }

/* ========== 顶栏 ========== */
.ws-topbar {
  height: var(--ws-topbar-h);
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 var(--ws-content-pad);
  border-bottom: 1px solid var(--border-light);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 20;
}
.ws-crumbs {
  font-size: 13px;
  color: var(--gray-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.ws-crumbs b { color: var(--black); font-weight: 500; }
/* 顶栏品牌：宽屏由侧边栏承载，此处隐藏；<880px 侧边栏消失时补回 */
.ws-topbar-brand { display: none; }
.ws-topbar-spacer { flex: 1; min-width: 8px; }
/* 搜索框宽度随视口收缩：240 → 160，clamp 平滑过渡 */
.ws-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: clamp(160px, 18vw, 260px);
  height: 32px;
  padding: 0 12px 0 10px;
  border: 1px solid var(--border-light);
  border-radius: 8px;
  background: #f4f4f5;
  color: var(--gray-3);
  font-size: 13px;
  text-decoration: none;
  flex: none;
  min-width: 0;
  transition: border-color 0.12s, background 0.12s;
}
.ws-search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-search:hover { border-color: var(--gray-3); background: #fff; }
.ws-search svg { flex: none; }
/* 注：原 .ws-icon-btn / .ws-icon-btn .ws-dot（顶栏图标按钮 + 未读红点）全站未使用
   —— 顶栏实际使用的是 .ws-search / .ws-topbar-link。已删除。 */
.ws-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  flex: none;
  transition: background 0.12s, border-color 0.12s, color 0.12s;
}
.ws-btn-primary { background: var(--blue); color: #fff; }
.ws-btn-primary:hover { background: var(--blue-hover); }
.ws-btn-ghost { background: #fff; color: var(--gray-1); border: 1px solid var(--border-light); }
.ws-btn-ghost:hover { border-color: var(--gray-3); color: var(--black); }
.ws-btn-sm { height: 28px; padding: 0 11px; font-size: 12px; border-radius: 7px; }
/* 按钮文字在极窄容器下可隐藏，保留图标维持可点击性 */
.ws-btn .ws-btn-text { overflow: hidden; text-overflow: ellipsis; }

/* ========== 页面头 ========== */
/* 内容区：撑满主区剩余高度，并把最后的表格卡片作为可伸缩项 */
.ws-page {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 20px var(--ws-content-pad) 24px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}
.ws-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;          /* 空间不足时操作区自动换行，不挤压标题 */
  min-width: 0;
}
.ws-page-head > div:first-child { min-width: 0; flex: 1 1 260px; }
.ws-page-title {
  font-size: clamp(19px, 1.5vw, 22px);
  font-weight: 700;
  color: var(--black);
  line-height: 1.3;
}
.ws-page-sub {
  margin-top: 5px;
  font-size: 13px;
  color: var(--gray-3);
  overflow-wrap: anywhere;   /* 长文案不撑破容器 */
}
.ws-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
  flex-wrap: wrap;
}

/* ========== 统计条 ========== */
/* 显式 4 列 → 2 列 → 1 列：避免 auto-fit 在卡片数与列数不等时留下空轨道
   （首页 4 张卡、未登录态 4 张，用 auto-fit 时 1920 宽会算出 8 列只填 4 个） */
.ws-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.ws-stat {
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--border-light);
  border-radius: var(--ws-radius);
  background: #fff;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.12s, background 0.12s;
}
a.ws-stat:hover { border-color: var(--gray-3); }
.ws-stat-label {
  font-size: 12px;
  color: var(--gray-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-stat-row { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.ws-stat-value {
  font-size: clamp(18px, 1.4vw, 20px);
  font-weight: 700;
  color: var(--black);
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  flex: none;
}
.ws-stat-note {
  font-size: 11px;
  color: var(--gray-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.ws-stat.is-blue { background: #f8faff; border-color: var(--blue-100); }
.ws-stat.is-blue .ws-stat-value { color: var(--blue); }
.ws-stat.is-blue .ws-stat-note { color: var(--blue); }
.ws-stat.is-green { background: #f7fdf9; border-color: #d1fae5; }
.ws-stat.is-green .ws-stat-value { color: var(--green); }
.ws-stat.is-green .ws-stat-note { color: var(--green); }
.ws-stat.is-amber { background: #fffcf5; border-color: #fde68a; }
.ws-stat.is-amber .ws-stat-value { color: var(--ws-amber-text); }
.ws-stat.is-amber .ws-stat-note { color: var(--ws-amber-text); }

/* ========== 数据表格 ========== */
/* flex:1 + min-height:0 —— 表格卡片吃掉页面剩余高度；
   内容超出时由内部 .ws-table-scroll 滚动，页面不产生纵向滚动条 */
.ws-table-card {
  flex: 1 1 auto;
  min-height: 220px;        /* 内容少时也保留一个体面的最小高度 */
  border: 1px solid var(--border-light);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ws-table-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-light);
  flex-wrap: wrap;
  min-width: 0;
}
/* 筛选 Tab：可横向滚动而非换行挤压 */
.ws-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  min-width: 0;
  -ms-overflow-style: none;
}
.ws-tabs::-webkit-scrollbar { display: none; }
.ws-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--gray-1);
  white-space: nowrap;
  flex: none;
  transition: background 0.12s, color 0.12s;
}
.ws-tab:hover { background: var(--fill); color: var(--black); }
.ws-tab.active { background: var(--blue-50); color: var(--blue); font-weight: 500; }
.ws-tab-count { font-size: 11px; color: var(--gray-3); font-variant-numeric: tabular-nums; }
.ws-tab.active .ws-tab-count { color: var(--blue); }
.ws-tab-count.is-alert { color: var(--ws-amber-text); }
.ws-table-bar-spacer { flex: 1; min-width: 8px; }
.ws-mini-search {
  display: flex;
  align-items: center;
  gap: 7px;
  width: clamp(140px, 16vw, 200px);
  height: 28px;
  padding: 0 10px 0 9px;
  border: 1px solid var(--border-light);
  border-radius: 7px;
  background: #fafafa;
  color: var(--gray-3);
  font-size: 12px;
  text-decoration: none;
  flex: none;
  min-width: 0;
}
.ws-mini-search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws-mini-search:hover { border-color: var(--gray-3); background: #fff; }
.ws-mini-search svg { flex: none; }

/* 表格容器：窄屏允许横向滚动表格本体，而不是撑破页面；
   flex:1 + min-height:0 让它吃掉卡片剩余高度并独立纵向滚动 */
.ws-table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
/* table-layout:fixed + 百分比列宽 = 容器变化时列宽自动重分配 */
.ws-table {
  width: 100%;
  min-width: 640px;         /* 低于此宽度交给容器横向滚动 */
  border-collapse: collapse;
  table-layout: fixed;
}
.ws-table thead th {
  height: 34px;
  padding: 0 16px;
  background: #fafafa;
  border-bottom: 1px solid var(--border-light);
  font-size: 12px;
  font-weight: 500;
  color: var(--gray-2);
  text-align: left;
  white-space: nowrap;
}
.ws-table tbody td {
  /* 行高由内容（13px 标题 + 5px gap + 11px 副信息 ≈ 40px）+ 上下 padding 决定，
     不写死 height —— 内容变长时行自然增高，不会像固定 height 那样裁切 */
  padding: 8px 16px;
  border-bottom: 1px solid #f1f1f4;
  vertical-align: middle;
}
.ws-table tbody tr { transition: background 0.1s; }
.ws-table tbody tr:hover { background: var(--ws-hover); }
.ws-table tbody tr:last-child td { border-bottom: none; }
/* 选中行：左侧 3px 指示条（inset shadow 不影响布局，宽度无需补偿） */
.ws-table tbody tr.is-selected { background: var(--ws-selected); }
.ws-table tbody tr.is-selected td:first-child { box-shadow: inset 3px 0 0 var(--blue); }

/* 列宽：百分比基准，随容器自动伸缩；仅状态列锁固定像素保证标签不折行 */
.ws-col-ticket   { width: auto; }
.ws-col-progress { width: 26%; }
.ws-col-status   { width: 116px; }
.ws-col-owner    { width: 108px; }
.ws-col-time     { width: 96px; }

/* 单元格内的纵向文字组：显式 flex（作为 <a>/table-cell 子元素时 UA 样式不会自动建立） */
.ws-cell-main {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  max-width: 100%;
}
.ws-cell-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--black);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-cell-meta {
  font-size: 11px;
  color: var(--gray-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-cell-progress {
  font-size: 12px;
  color: var(--gray-1);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ws-cell-owner { font-size: 12px; color: var(--gray-1); }
.ws-cell-time { font-size: 12px; color: var(--gray-3); white-space: nowrap; }
.ws-row-link {
  color: inherit;
  text-decoration: none;
  display: flex;            /* <a> 默认 inline，必须显式转 flex 才能让内部纵向排列生效 */
  flex-direction: column;
  min-width: 0;
  max-width: 100%;
}
.ws-table tbody tr:hover .ws-cell-title { color: var(--blue); }

/* 空状态：文案与操作分层，按钮独立成行（不再与文案同行） */
.ws-empty {
  padding: 52px 16px;
  text-align: center;
  color: var(--gray-3);
  font-size: 13px;
  line-height: 1.6;
}
.ws-empty-text { display: block; max-width: 420px; margin: 0 auto; }
.ws-empty-text b {
  display: block;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--black);
  line-height: 1.4;
}
/* 操作区：独立成行、居中，与上方文案保持 18px 间距 */
.ws-empty-act {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
}
/* 空状态内的次要说明（按钮下方的补充信息） */
.ws-empty-note {
  display: block;
  margin-top: 12px;
  font-size: 12px;
  color: var(--gray-3);
}
.ws-empty-note a { color: var(--blue); }
.ws-empty-note a:hover { text-decoration: underline; }

.ws-table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--border-light);
  font-size: 12px;
  color: var(--gray-3);
  flex-wrap: wrap;
  min-width: 0;
}

/* ========== 工作台内的既有组件微调 ========== */
.ws-page .mvc-narrow { max-width: none; padding: 0; }
.ws-page .pager { margin-top: 0; }
.ws-page .detail-grid { grid-template-columns: 1fr 320px; }
/* 分页嵌在表格底栏：去掉自身上下边距，保持与左侧说明同一基线 */
.ws-table-foot .pager { margin: 0; }
.ws-table-foot .pager a,
.ws-table-foot .pager span { font-size: 12px; }
/* 工作台壳内不再需要旧 sticky footer 补偿 */
body:not(.mobile-body) .ws-shell + .mvc-tabbar { display: none; }

/* ==========================================================================
   自适应断点阶梯（自宽向窄，每级只做必要退化，不跳变）
   ========================================================================== */

/* —— 1200–1439px：侧边栏收窄，释放内容空间 —— */
@media (max-width: 1439px) {
  body:not(.mobile-body) { --ws-sidebar-w: 208px; --ws-content-pad: 20px; }
}

/* —— 1000–1199px：侧边栏进一步收窄（176px），仍保留文字，避免突降为图标栏 —— */
@media (max-width: 1199px) {
  body:not(.mobile-body) { --ws-sidebar-w: 176px; --ws-content-pad: 18px; }
  .ws-side-brand { padding: 0 12px; }
  .ws-side-nav { padding-left: 6px; padding-right: 6px; }
  .ws-nav-item { padding: 0 8px; gap: 8px; }
  .ws-side-foot { padding: 10px; }
}

/* —— 880–999px：侧边栏变图标栏（56px），文字隐藏但保留 title 提示 —— */
@media (max-width: 999px) {
  body:not(.mobile-body) { --ws-sidebar-w: 56px; --ws-content-pad: 18px; }
  .ws-side-brand { justify-content: center; padding: 0; }
  .ws-side-name { display: none; }
  .ws-nav-item { justify-content: center; padding: 0; position: relative; }
  .ws-nav-item > span { display: none; }        /* 文字整体隐藏，含角标 */
  .ws-nav-item .ws-nav-badge {
    position: absolute;
    margin: 0;
    transform: translate(9px, -9px);
    min-width: 14px;
    height: 14px;
    line-height: 14px;
    font-size: 9px;
    padding: 0 3px;
  }
  .ws-side-foot { padding: 10px 8px; }
  .ws-side-user .nav-user-btn { justify-content: center; padding: 6px 0; }
  .ws-side-user .nav-user-name,
  .ws-side-user .nav-caret { display: none; }
  /* 图标栏仅 56px 宽，同一行放不下「头像 + 铃铛」；保留头像入口，隐藏铃铛 */
  .ws-side-user .nav-bell { display: none; }
  .ws-side-user .nav-user-menu { left: calc(100% + 8px); right: auto; bottom: 0; top: auto; width: 168px; }
}

/* —— 640–879px：侧边栏隐藏，顶栏接管品牌；表格隐去次要列 —— */
@media (max-width: 879px) {
  body:not(.mobile-body) .ws-side { display: none; }
  body:not(.mobile-body) { --ws-content-pad: 16px; }
  .ws-topbar { padding-left: 16px; padding-right: 16px; }
  /* 侧边栏的品牌在顶栏补回（真实站点名，非硬编码），避免窄窗丢失入口 */
  .ws-topbar-brand {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: var(--black);
    flex: none;
    white-space: nowrap;
  }
  .ws-page { padding: 16px; gap: 16px; }
  /* 统计条 4 → 2 列（879px 以下每张卡仍有 ~200px 可读宽度） */
  .ws-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* 列优先级：进展 → 负责 依次退场，保住工单标题与状态 */
  .ws-col-progress { display: none; }
  .ws-col-owner { display: none; }
  .ws-table { min-width: 420px; }
}

/* —— <640px：仅保留工单 + 状态 + 更新，表格本体横向滚动 —— */
@media (max-width: 639px) {
  body:not(.mobile-body) { --ws-content-pad: 12px; }
  .ws-page { padding: 12px; }
  .ws-search { display: none; }
  .ws-col-time { display: none; }
  .ws-table { min-width: 320px; }
  .ws-table thead th,
  .ws-table tbody td { padding: 0 12px; }
  .ws-table-bar { padding: 10px 12px; }
  .ws-stat { padding: 12px 13px; }
  /* 统计卡改单列（auto-fit 的下限再抬高一档即可触发） */
  .ws-stats { grid-template-columns: 1fr; }
  .ws-page-actions { width: 100%; }
  .ws-page-actions .ws-btn { flex: 1; }
  .ws-empty { padding: 40px 12px; }
}
