/* =========================================================
   统一五色体系（2026-09-06 视觉改版，参考华为开发者文档站）
   白/绿/蓝/黑/红 全局收敛，页面底色改为中性浅灰留白
   1) --crm-white  页面底 / 卡片底
   2) --crm-green  品牌绿：导航高亮、成功类元素、待办成功态
   3) --crm-blue   交互蓝：按钮、链接、输入聚焦、待办主流程
   4) --crm-ink    墨黑（深黑蓝）：正文 / 标题 / 主数字
   5) --crm-red    警示红：登出、删除、未读角标、逾期告警
   6) 中性辅助色：--crm-bg(页面浅灰底) / 边框 / 次要文字
   ========================================================= */
:root {
  color-scheme: light;
  --crm-white: #ffffff;
  --crm-green: #16a34a;        /* 主绿 */
  --crm-green-deep: #15803d;   /* 绿 hover */
  --crm-green-soft: #f0fdf4;   /* 绿浅底 */
  --crm-blue: #2563eb;         /* 主蓝 */
  --crm-blue-deep: #1d4ed8;    /* 蓝 hover */
  --crm-blue-soft: #eff6ff;    /* 蓝浅底 */
  --crm-ink: #0f172a;          /* 墨黑正文 */
  --crm-ink-2: #334155;        /* 次级文字 */
  --crm-red: #dc3545;          /* 警示红 */
  --crm-red-soft: #fef2f2;     /* 红浅底 */
  --crm-bg: #f5f7fa;           /* 页面浅灰底 */
  --crm-border: #e5e9f0;       /* 通用浅边框 */
}
body { background: var(--crm-bg); color: var(--crm-ink); }
.navbar-brand { font-weight: 600; }
/* 白卡片 + 柔和阴影（华为风格：弱边框、轻投影、大圆角） */
.card {
  border: 1px solid var(--crm-border);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
  border-radius: 10px;
}
.table th { white-space: nowrap; }

/* 表格统一规范（2026-09-04）：
   列宽不可拖动（base_table.js 默认不再挂拖拽手柄，也不再恢复 localStorage 历史宽度）；
   行高依据内容自动适应：数据单元格允许换行、顶端对齐，避免单行截断 */
.table td { white-space: normal; vertical-align: top; }
.table th { vertical-align: middle; }
.progress-bar { border-radius:0; }

/* =========================================================
   输入框可视性增强（2026-08-20）
   统一所有文本/选择类输入框：清晰边框 + 白底对比 + 明显聚焦态
   覆盖 form-control / form-select 及其 -sm 变体
   ========================================================= */
.form-control,
.form-select {
  color: var(--crm-ink);                                   /* 填写文字深色，保证可读 */
  background-color: #ffffff;                         /* 纯白填充，与浅灰背景形成对比 */
  border: 1px solid #b3bccb;                         /* 比 Bootstrap 默认 #ced4da 更深，边框更清晰 */
  border-radius: 6px;
  font-size: 13px;                                   /* 主表单 13px：清晰且紧凑 */
  padding: 0.42rem 0.7rem;
  line-height: 1.4;
  transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out, background-color .15s ease-in-out;
}
.form-control::placeholder { color: #97a0ad; opacity: 1; }

/* 聚焦态：明显蓝色边框 + 外发光，当前输入位置一目了然 */
.form-control:focus,
.form-select:focus {
  border-color: #2563eb;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .20);
  outline: 0;
}

/* 禁用 / 只读态：淡灰填充 + 灰字，明确区分不可编辑 */
.form-control:disabled,
.form-control[readonly],
.form-select:disabled {
  background-color: #eef1f6;
  color: #828c9b;
  border-color: #dfe3ea;
  opacity: 1;
}

/* 表格内小控件：12 号字（≈12px），符合文档要求，紧凑但不失清晰 */
.form-select-sm,
.form-control-sm {
  font-size: 12px;
  padding: 0.3rem 0.55rem;
  border-radius: 5px;
}

/* 下拉选项文字（部分浏览器默认偏淡） */
.form-select option { color: var(--crm-ink); }

/* 文件选择 / 日期选择：统一边框与内边距 */
input[type="file"].form-control { padding: 0.3rem 0.5rem; }
input[type="date"].form-control { line-height: 1.4; }

/* 复选 / 单选框：聚焦可见，避免“看不见是否选中” */
.form-check-input:focus {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .20);
  border-color: #2563eb;
}

/* ============ 登出按纽强调标识（#21） ============ */
.logout-link {
  border: 1px solid #dc3545;
  border-radius: 5px;
  color: #ff8f8f;
  padding: .25rem .75rem;
  font-weight: 600;
}
.logout-link:hover { background: #dc3545; color: #fff; }

/* ============ 仪表盘待办审批卡片 ============ */
.pending-card {
  border-left: 5px solid #ccc;
  transition: box-shadow .15s ease-in-out, transform .15s ease-in-out;
}
.pending-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); transform: translateY(-2px); }
.pending-num {
  font-size: 2.4rem;
  font-weight: 700;
  line-height: 1;
  min-width: 64px;
  text-align: center;
  color: var(--crm-ink);
}
.pending-title { font-size: 1.05rem; font-weight: 600; color: var(--crm-ink); }
.pending-sub { color: #97a0ad; font-size: .85rem; }
/* 待办分类色收敛进五色体系：蓝=周计划流程、绿=周报流程、红=月报/告警、墨黑=快捷写入 */
.pcard-weekly { border-left-color: var(--crm-blue); }
.pcard-report { border-left-color: var(--crm-green); }
.pcard-monthly { border-left-color: var(--crm-red); }
.pcard-weekly .pending-num { color: var(--crm-blue); }
.pcard-report .pending-num { color: var(--crm-green); }
.pcard-monthly .pending-num { color: var(--crm-red); }
.pcard-write { border-left-color: var(--crm-ink); }
.pcard-write .pending-num { color: var(--crm-ink); }
.pcard-disabled { border-left-color: #cbd5e1; background: #f1f5f9; opacity: .7; }
.pcard-disabled .pending-num { color: #94a3b8; }
.pcard-disabled .pending-title { color: #64748b; }
.pcard-disabled:hover { box-shadow: none; transform: none; }

/* 仪表盘上部统计卡片：数字/文字大小对齐待办审批卡片 */
.stat-card { border: 1px solid var(--crm-border); box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.stat-card:hover { box-shadow: 0 4px 12px rgba(15, 23, 42, .10); }
.stat-num { font-size: 2.4rem; font-weight: 700; line-height: 1; color: var(--crm-ink); }
.stat-label { font-size: 1.05rem; font-weight: 600; color: var(--crm-ink); margin-top: .35rem; }
.stat-card .card-body { padding: .9rem .4rem; }

/* ============ 登录页（login.html 已引用 .login-body，此前未定义） ============ */
.login-body {
  background: linear-gradient(135deg, #eef2f8, #e1e8f2);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-box { width: 360px; max-width: 92vw; border: none; border-radius: 12px; }
.login-box .card-body { padding: 2rem; }
.login-box .form-control { font-size: 14px; padding: 0.55rem 0.75rem; }

/* ============ 固定浅色主题：不再跟随系统深色模式（2026-09-05 需求） ============ */

/* =========================================================
   页面返回按钮缩小 + 全局字号收敛（2026-08-20）
   1) 各页面顶部返回按钮整体缩小至约 70%，字体同比缩小
   2) 非工作台页面（body.page-app）字号收敛：
      页标题 14px / 卡片标题 12px 加粗 / 表头 12px 加粗
      其余原大于 12px 的文字统一为 12px，小于 12px 的不动
   工作台上的卡片、主菜单不调整（body.page-dashboard 整页豁免）
   ========================================================= */
.back-btn { font-size: 12px; padding: .26rem .525rem; line-height: 1.2; }
.back-btn.btn-sm { padding: .175rem .35rem; }

/* 2.0 统一字号基准：正文 13px（与 base.css 一致，消除此前 12px/13px 双基准冲突） */
.page-app { font-size: 13px; }
.page-app .navbar { font-size: 1rem; }                    /* 主菜单保持原样 */
.page-app h1, .page-app h2, .page-app h3, .page-app h4,
.page-app h5, .page-app h6 { font-size: 14px; font-weight: 700; }  /* 页标题 */
.page-app .card-header { font-size: 13px; font-weight: 700; }     /* 卡片标题加粗 */
.page-app .table thead th { font-size: 13px; font-weight: 700; }  /* 表头加粗 */
.page-app .btn { font-size: 13px; }
.page-app .form-control,
.page-app .form-select { font-size: 13px; }

/* =========================================================
   明细编辑表格（周报/周计划）：简洁无内框 + 左侧冻结列
   1) 单元格内的输入控件常态无边框，聚焦才显形，行高更紧凑
   2) 前 4 列（# / 日期 / 时段 / 客户）横向滚动时常驻，右侧滚动查看
   3) 整体最小宽度撑开，列宽优先保证内容可见
   ========================================================= */
/* 表格总宽按各列宽度之和撑开，列宽优先保证内容可见（客户名称列最宽） */
.tbl-plain { min-width: 2344px; font-size: 12px; }
.tbl-plain td, .tbl-plain th { font-size: 12px; }
/* 横向滚动条：常显加粗，鼠标可直接拖动查看右侧列 */
.table-responsive.tbl-scroll { padding-bottom: 6px; scrollbar-width: auto; scrollbar-color: #98a2b3 #e9edf3; }
.table-responsive.tbl-scroll::-webkit-scrollbar { height: 14px; }
.table-responsive.tbl-scroll::-webkit-scrollbar-track { background: #e9edf3; border-radius: 7px; }
.table-responsive.tbl-scroll::-webkit-scrollbar-thumb {
  background: #98a2b3; border-radius: 7px; border: 3px solid #e9edf3;
}
.table-responsive.tbl-scroll::-webkit-scrollbar-thumb:hover { background: #6b7684; }
.tbl-plain > thead > tr > th {
  background: #f8fafc;
  border-bottom: 2px solid #dfe3ea;
}
/* 单元格控件：常态透明无框 */
.tbl-plain .cell-field {
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 4px;
  font-size: 12px;
  padding: .2rem .35rem;
  line-height: 1.35;
  transition: border-color .12s ease-in-out, box-shadow .12s ease-in-out, background-color .12s ease-in-out;
}
.tbl-plain .cell-field:hover { border-color: #dfe3ea; background: #fff; }
.tbl-plain .cell-field:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, .16);
  outline: 0;
}
.tbl-plain .cell-field[readonly] { color: #5b6472; background: transparent; }
.tbl-plain .cell-field[readonly]:hover { border-color: #e6eaf0; background: #f8fafc; }
.tbl-plain td, .tbl-plain th { padding: .15rem .35rem !important; }
/* 多行字段：默认单行高度，聚焦时展开，兼顾紧凑与可写 */
.tbl-plain textarea.cell-field { resize: vertical; min-height: 26px; overflow: hidden; }
.tbl-plain textarea.cell-field:focus { min-height: 84px; overflow: auto; }
/* 冻结列：# / 日期 / 时段 / 客户（客户列加宽，保证名称完整可见） */
.tbl-plain th:nth-child(-n+4),
.tbl-plain td:nth-child(-n+4) {
  position: sticky;
  z-index: 2;
  background: #fff;
}
.tbl-plain th:nth-child(-n+4) { z-index: 4; background: #f8fafc; }
.tbl-plain th:nth-child(1),  .tbl-plain td:nth-child(1)  { left: 0;    width: 44px;  min-width: 44px; }
.tbl-plain th:nth-child(2),  .tbl-plain td:nth-child(2)  { left: 44px;  width: 130px; min-width: 130px; }
.tbl-plain th:nth-child(3),  .tbl-plain td:nth-child(3)  { left: 174px; width: 80px;  min-width: 80px; }
/* 客户名称：最宽一列，保证长名称完整显示 */
.tbl-plain th:nth-child(4),  .tbl-plain td:nth-child(4)  { left: 254px; width: 300px; min-width: 300px; }
/* 冻结区右边界：分隔线 + 投影，滚动时层次清晰 */
.tbl-plain th:nth-child(4), .tbl-plain td:nth-child(4) { box-shadow: 3px 0 0 rgba(15, 23, 42, .10); }
.tbl-plain th:nth-child(5),  .tbl-plain td:nth-child(5)  { width: 120px; min-width: 120px; }
.tbl-plain th:nth-child(6),  .tbl-plain td:nth-child(6)  { width: 110px; min-width: 110px; }
.tbl-plain th:nth-child(7),  .tbl-plain td:nth-child(7)  { width: 200px; min-width: 200px; }
.tbl-plain th:nth-child(8),  .tbl-plain td:nth-child(8)  { width: 120px; min-width: 120px; }
.tbl-plain th:nth-child(9),  .tbl-plain td:nth-child(9)  { width: 200px; min-width: 200px; }
.tbl-plain th:nth-child(10), .tbl-plain td:nth-child(10) { width: 280px; min-width: 280px; }
.tbl-plain th:nth-child(11), .tbl-plain td:nth-child(11) { width: 240px; min-width: 240px; }
.tbl-plain th:nth-child(12), .tbl-plain td:nth-child(12) { width: 240px; min-width: 240px; }
.tbl-plain th:nth-child(13), .tbl-plain td:nth-child(13) { width: 220px; min-width: 220px; }
.tbl-plain th:nth-child(14), .tbl-plain td:nth-child(14) { width: 60px;  min-width: 60px; }
/* 冻结区内的控件不换行，长名称以省略号收尾，避免撑破冻结列 */
.tbl-plain td:nth-child(-n+4) .cell-field { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 周计划审批表（10 列，列序与周报不同）：复用 .tbl-plain 的冻结/无框样式，
   但按自身列宽重算宽度与总宽，避免出现大段右侧空白 */
.tbl-plan { min-width: 1364px; }
.tbl-plan th:nth-child(1),  .tbl-plan td:nth-child(1)  { width: 44px;  min-width: 44px; }
.tbl-plan th:nth-child(2),  .tbl-plan td:nth-child(2)  { width: 130px; min-width: 130px; }
.tbl-plan th:nth-child(3),  .tbl-plan td:nth-child(3)  { width: 80px;  min-width: 80px; }
.tbl-plan th:nth-child(4),  .tbl-plan td:nth-child(4)  { width: 300px; min-width: 300px; }
.tbl-plan th:nth-child(5),  .tbl-plan td:nth-child(5)  { width: 120px; min-width: 120px; }
.tbl-plan th:nth-child(6),  .tbl-plan td:nth-child(6)  { width: 110px; min-width: 110px; }
.tbl-plan th:nth-child(7),  .tbl-plan td:nth-child(7)  { width: 120px; min-width: 120px; }
.tbl-plan th:nth-child(8),  .tbl-plan td:nth-child(8)  { width: 200px; min-width: 200px; }
.tbl-plan th:nth-child(9),  .tbl-plan td:nth-child(9)  { width: 200px; min-width: 200px; }
.tbl-plan th:nth-child(10), .tbl-plan td:nth-child(10) { width: 60px;  min-width: 60px; }

/* 周计划新建/编辑表（10 列，列序与周报前 10 列一致：客户/联系人/职位/计划内容/拜访类别/关联商机）：
   直接复用 .tbl-plain 的各列宽度，仅需把总宽收到 1364px（10 列之和），避免右侧留白 */
.tbl-plan-edit { min-width: 1364px; }

/* 固定浅色主题：原 tbl-plain 深色模式适配已移除（2026-09-05） */

/* 2.0 KPI 明细表（11 列）：窄屏不挤成一团，改为横向滚动查看 */
.tbl-kpi-edit { min-width: 1100px; table-layout: auto !important; }
@media (max-width: 767.98px) {
  .tbl-kpi-edit { min-width: 1100px; }
  .tbl-kpi-edit td, .tbl-kpi-edit th { font-size: 13px; white-space: nowrap; }
}

/* 列宽拖拽手柄：表头右侧细条，按住拖动调整列宽（宽度持久化到 localStorage） */
.table thead th { position: relative; }
.col-resize-handle {
  position: absolute; top: 0; right: -3px;
  width: 7px; height: 100%;
  cursor: col-resize; z-index: 6;
  background: transparent;
  touch-action: none;
}
.col-resize-handle:hover { background: rgba(37, 99, 235, .35); }
.table thead th:hover .col-resize-handle { background: rgba(37, 99, 235, .18); }
/* 列宽被用户拖拽锁定后，冻结列左偏移由 JS 内联 style.left 接管，此处不重复定义 */

/* =========================================================
   移动端输入响应优化（2026-09-06 性能修复）
   问题：手机端点击任意输入框或新建表单都会卡死
   1) 输入控件硬件加速：transform: translateZ(0) 触发 GPU 层，避免聚焦/失焦时整体重排
   2) 软键盘弹出时 body 不滚动：保持表单位置稳定，避免点击输入框时键盘弹起导致页面跳动
   3) 消除 iOS Safari 输入框聚焦时的 200~300ms 闪烁延迟
   4) pc-menu 候选面板在移动端的视觉降级（更窄、更紧凑，避免挡住软键盘）
   ========================================================= */
@media (max-width: 991.98px) {
  /* 输入/选择/按钮硬件加速 + 防止聚焦缩放 */
  body.page-app .form-control,
  body.page-app .form-select,
  body.page-app .btn,
  body.page-app .card,
  body.page-app .pc-wrap,
  body.page-app .pc-wrap .form-control {
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
  }
  /* 输入框字体 ≥16px 防止 iOS 自动缩放（聚焦时浏览器会强行放大页面） */
  body.page-app input.form-control,
  body.page-app input.cell-field,
  body.page-app textarea.form-control,
  body.page-app select.form-select {
    font-size: 16px !important;
  }
  /* PC 候选面板：mobile 端宽度撑满，避免 fixed 定位飘到屏幕外 */
  body.page-app .pc-menu {
    left: 6px !important;
    right: 6px !important;
    width: auto !important;
    max-height: 38vh !important;
  }
  /* 软键盘弹出时 body 滚动锁定，防止点击输入框的瞬间页面跳动 */
  body.page-app.is-keyboard-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
  }
  /* 客户档案行 (arch-locked) 等 readonly 控件在 mobile 上禁用 hover 高亮（防止 hover 状态黏住） */
  body.page-app .tbl-plain .cell-field:hover { border-color: transparent; background: transparent; }
}

/* =========================================================
   列表页顶部工具行 / 批量操作条（customers、products 等共用）
   目标：桌面与手机统一美观、按钮同高不竖排
   ========================================================= */
/* 工具行（文件选择导入 / 导出 / 模板 / 新建）：按钮统一等高 34px，
   手机端文件框占满一行、按钮换行右对齐 */
body.page-app .crm-import-tools{ display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
body.page-app .crm-import-tools .form-control,
body.page-app .crm-import-tools input[type=file]{ width:min(300px,58vw); height:34px; padding:.25rem .6rem; font-size:13px; }
body.page-app .crm-import-tools .btn{ height:34px; display:inline-flex; align-items:center; justify-content:center; padding:.2rem .7rem; font-size:13px; }
@media (max-width:575.98px){
  body.page-app .crm-import-tools{ width:100%; }
  body.page-app .crm-import-tools .form-control,
  body.page-app .crm-import-tools input[type=file]{ width:100%; }
}
/* 批量操作条：三行布局（标题行左对齐 / 输入行 / 按钮行右对齐） */
body.page-app .crm-batch{ display:grid; grid-template-columns:1fr; gap:8px; padding:10px 12px; background:#f8fafc; border-bottom:1px solid var(--crm-border); }
body.page-app .crm-batch .batch-hd{ display:flex; align-items:center; gap:8px; min-height:24px; }
body.page-app .crm-batch .batch-hd .batch-title{ font-size:13px; font-weight:600; color:#334155; margin:0; white-space:nowrap; }
body.page-app .crm-batch .batch-hd .form-check-input{ width:1.05em; height:1.05em; margin:0; }
body.page-app .crm-batch .batch-hd .form-check-label{ font-size:13px; margin:0; cursor:pointer; }
body.page-app .crm-batch .batch-owner{ width:100%; }
body.page-app .crm-batch .batch-btns{ display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; }
body.page-app .crm-batch .batch-btns form{ display:inline-flex; margin:0; }
body.page-app .crm-batch .batch-btns .btn{ height:32px; display:inline-flex; align-items:center; white-space:nowrap; }
@media (min-width:768px){
  body.page-app .crm-batch .batch-owner{ max-width:360px; }
}

/* 搜索栏统一一行横排：输入框弹性收缩，搜索等按纽与输入框同行不换行 */
.title-search-wrap{flex:1 1 auto;min-width:0}
.title-search-wrap .compact-bar{flex-wrap:nowrap !important}
.title-search-wrap .compact-bar .form-control{flex:1 1 auto;min-width:0;width:auto !important}



/* =========================================================
 移动端表格卡片化 - 通用渲染（<768px 由 base_ui.js 自动加 .table-carded）
 卡片规则：表头隐藏，每行 = 一张白卡；数据格 = label + 值；
 编辑格(cell-input) = label 上行、控件下行；按钮格(cell-actions) = 整行按钮。
 ========================================================= */
@media (max-width: 767.98px){
  body.page-app .table-carded thead{ display:none; }
  body.page-app .table-carded{ display:block; width:100% !important; max-width:100% !important; min-width:0 !important; table-layout:auto !important; border:0 !important; background:transparent !important; }
  body.page-app .table-carded > tbody{ display:block; width:100%; }
  body.page-app .table-carded > tbody > tr{ display:block; position:relative; width:100%; background:#fff; border:1px solid var(--crm-border, #e2e8f0) !important; border-radius:10px; box-shadow:0 1px 3px rgba(15,23,42,.05); padding:4px 10px 6px; margin:0 0 10px !important; }
  body.page-app .table-carded > tbody > tr > th{ display:grid; grid-template-columns:minmax(82px, 34%) 1fr; gap:2px 10px; align-items:center; width:100% !important; min-width:0 !important; max-width:none !important; box-shadow:none !important; position:static !important; left:auto !important; right:auto !important; top:auto !important; border:0 !important; border-bottom:1px dashed #eef2f7 !important; padding:5px 2px !important; margin:0 !important; text-align:left; white-space:normal !important; overflow-wrap:break-word; word-break:break-word; }
  body.page-app .table-carded > tbody > tr > td{ display:grid; grid-template-columns:minmax(82px, 34%) 1fr; gap:2px 10px; align-items:center; width:100% !important; min-width:0 !important; max-width:none !important; box-shadow:none !important; position:static !important; left:auto !important; right:auto !important; top:auto !important; border:0 !important; border-bottom:1px dashed #eef2f7 !important; padding:5px 2px !important; margin:0 !important; text-align:right; white-space:normal !important; overflow-wrap:break-word; word-break:break-word; }
  body.page-app .table-carded > tbody > tr > td:last-child,
  body.page-app .table-carded > tbody > tr > th:last-child{ border-bottom:0 !important; }
  body.page-app .table-carded td::before,
  body.page-app .table-carded th::before{ content:attr(data-label); display:block; text-align:left; font-size:11px; line-height:1.35; font-weight:600; color:#64748b; white-space:normal; }
  body.page-app .table-carded td[data-label='']::before,
  body.page-app .table-carded td:not([data-label])::before{ display:none; }
  /* 空 label 格（勾选列等）：占整行、内容靠左 */
  body.page-app .table-carded td[data-label='']{ display:flex; align-items:center; }
  /* 编辑格（含输入控件）：label 上行、控件整行下行，便于触屏输入 */
  body.page-app .table-carded td.cell-input{ display:block; border-bottom:1px dashed #eef2f7 !important; padding:5px 2px !important; }
  body.page-app .table-carded td.cell-input::before{ display:block; margin-bottom:3px; }
  body.page-app .table-carded td.cell-input .form-control,
  body.page-app .table-carded td.cell-input .form-select,
  body.page-app .table-carded td.cell-input input,
  body.page-app .table-carded td.cell-input select,
  body.page-app .table-carded td.cell-input textarea{ width:100% !important; min-width:0 !important; max-width:100% !important; }
  /* 拼音组合框(.pc-wrap)/输入组(.input-group)：与输入框同宽，撑满整行，避免出现窄条 */
  body.page-app .table-carded td.cell-input .pc-wrap,
  body.page-app .table-carded td.cell-input .pc-wrap .form-control,
  body.page-app .table-carded td.cell-input .pc-wrap .pc-input,
  body.page-app .table-carded td.cell-input .input-group,
  body.page-app .table-carded td .pc-wrap,
  body.page-app .table-carded td .pc-wrap .form-control,
  body.page-app .table-carded td .pc-wrap .pc-input,
  body.page-app .table-carded td .input-group{ width:100% !important; min-width:0 !important; max-width:100% !important; }
  /* 按钮格：label 可省，按钮组换行平铺 */
  body.page-app .table-carded td.cell-actions{ display:block; border-bottom:0 !important; padding:6px 2px 2px !important; text-align:left; }
  body.page-app .table-carded td.cell-actions::before{ display:block; margin-bottom:3px; }
  body.page-app .table-carded td.cell-actions form{ display:inline-block; margin:0; vertical-align:top; }
  body.page-app .table-carded td.cell-actions .btn,
  body.page-app .table-carded td.cell-actions .btn-group,
  body.page-app .table-carded td.cell-actions a.btn{ margin:.15rem .35rem .15rem 0; }
  /* 空态/整行合并格 */
  body.page-app .table-carded td[colspan]{ display:block !important; text-align:center !important; }
  body.page-app .table-carded td[colspan]::before{ content:none; }
  /* 明细/编辑表（超宽表）卡片化时取消冻结与最小宽度 */
  body.page-app .table-carded.tbl-plain,
  body.page-app .table-carded.tbl-plan,
  body.page-app .table-carded.tbl-plan-edit,
  body.page-app .table-carded.tbl-frozen{ width:100% !important; max-width:100% !important; min-width:0 !important; }
  /* 卡片化后冻结列底色/层级失效兜底 */
  body.page-app .table-carded th.fc,
  body.page-app .table-carded td.fc,
  body.page-app .table-carded td.cell-field{ background:transparent !important; }
  /* 分页控件：窄屏下可换行，避免溢出 */
  body.page-app .pagination{ flex-wrap:wrap; row-gap:4px; }
}
