/* ==========================================================
 * 集美 CASTING · CRM 系统样式表 v3
 * ========================================================== */

:root {
  --brand:        #2b5cff;
  --brand-dark:   #1e46d4;
  --brand-light:  #eef3ff;
  --bg:           #f5f7fa;
  --panel:        #ffffff;
  --border:       #e3e8ef;
  --border-dark:  #cdd5e0;
  --text:         #1a2233;
  --text-sub:     #5c6880;
  --text-mute:    #94a1b8;
  --success:      #12b76a;
  --success-bg:   #e7f8f0;
  --warn:         #f79009;
  --warn-bg:      #fef4e6;
  --danger:       #f04438;
  --danger-bg:    #feeceb;
  --info:         #6941c6;
  --info-bg:      #f3eeff;
  --radius:       8px;
  --shadow:       0 1px 3px rgba(16,24,40,.06), 0 1px 2px rgba(16,24,40,.04);
  --shadow-lg:    0 12px 32px rgba(16,24,40,.14);
  --sidebar-w:    218px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; overflow: hidden; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ============ 布局 ============ */
.layout { display: flex; height: 100vh; overflow: hidden; }

/* m200：启动遮罩 —— 会话/权限判定完成前不把界面画出来。
   index.html 是静态 HTML，侧栏里的姓名/角色/菜单项都是写死的默认值，
   浏览器在 app.js（最后一个脚本）跑完前就会先画一帧「吕威威 · 管理员」，
   员工刷新时就会看到管理员界面一闪而过。用 visibility（不是 display）隐藏，
   保证 bindTableHeightAuto 等量高度逻辑仍能取到真实尺寸。 */
body.booting .layout { visibility: hidden; }

/* ---- 侧边栏 ---- */
.sidebar {
  width: var(--sidebar-w);
  background: #101828;
  color: #cdd5e0;
  display: flex; flex-direction: column;
  position: fixed; top: 0; bottom: 0; left: 0;
  z-index: 100;
}
.logo {
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.logo h1 { font-size: 15px; color: #fff; letter-spacing: .5px; font-weight: 600; }
/* m458：左上角 LOGO 可点击回官网 —— 只给 pointer 手感，不加动画 */
.logo-link { display: block; color: inherit; text-decoration: none; cursor: pointer; }
.logo-link:hover { text-decoration: none; }
/* m453：全局唯一品牌 LOGO（左上角）—— 等比 contain，不拉伸；高 DPI 清晰
 * m458：显示尺寸缩小一档：46px → 30px（400×170 原图等比 → 70.6×30，落在 28~32px 区间）。
 *       只改顶栏这一处的显示尺寸，不动用户上传的原图，也不动报价单模板里的 logo 规则。 */
.brand-logo-header { display: block; max-width: 110px; max-height: 30px; width: auto; height: auto; object-fit: contain; object-position: left center; image-rendering: auto; }
.brand-logo-header.hide { display: none; }
#brand-logo-text.hide { display: none; }
/* m453：公司维护里的唯一上传区（拖拽 + 点选） */
.mc-logo-drop { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 10px; border: 1px dashed #cfd5df; border-radius: 8px; background: #fafbfc; cursor: pointer; }
.mc-logo-drop.on { border-color: #2b5cff; background: #f0f7ff; }
.mc-logo-prev { min-width: 120px; min-height: 48px; display: flex; align-items: center; justify-content: center; }
.mc-logo-prev img { max-width: 220px; max-height: 64px; object-fit: contain; display: block; }
.logo span { font-size: 11px; color: #6c7a94; display: block; margin-top: 2px; letter-spacing: 1.5px; }

.nav { flex: 1; padding: 10px 8px; overflow-y: auto; }
.nav-group-title {
  font-size: 10px; color: #5a6884; padding: 12px 12px 6px;
  letter-spacing: 1px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 12px; margin-bottom: 2px;
  border-radius: 6px; cursor: pointer;
  font-size: 13px; color: #b7c1d4;
  transition: background .15s, color .15s;
  user-select: none;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.active { background: var(--brand); color: #fff; font-weight: 500; }
.nav-item .ico { width: 16px; text-align: center; font-size: 14px; }
/* m158：侧栏数字徽章回归 —— 口径与 m68 时代的全站大总数不同：只挂
 * 「和我有关的待跟进」「我负责的项目」这类有行动价值的小数字（用户点名要求） */
.nav-badge {
  margin-left: auto;
  background: #e0533d; color: #fff;
  font-size: 11px; line-height: 1;
  padding: 3px 7px; border-radius: 9px;
  font-weight: 600; min-width: 18px; text-align: center;
  flex-shrink: 0;
}
.nav-badge.b-grey { background: rgba(255,255,255,.18); color: #e7ecf3; }

/* m68 + m68.2：页面顶部统计条（项目页 m68.2 已删除，pages3.js 我的提成页仍在用）
 * 数据多时横向 flex 换行，卡片式 KPI，与数据看板 .kpi 视觉同源但更紧凑 */
.pj-stat {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-bottom: 12px; min-width: 0;
}
.pj-stat-item {
  flex: 1 1 140px; min-width: 140px; max-width: 260px;
  background: var(--panel, #fff);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 10px 14px;
  display: flex; flex-direction: column; gap: 2px;
}
.pj-stat-item b {
  font-size: 20px; font-weight: 700; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pj-stat-item span { font-size: 11.5px; color: var(--text-sub); }
.pj-stat-item.pj-stat-gold { border-color: #e0b24c; background: #fdf8ec; }
.pj-stat-item.pj-stat-gold b { color: #b8860b; }

/* ---- 用户切换 ---- */
.user-box {
  padding: 12px;
  display: flex; align-items: center; gap: 9px;
}
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; flex-shrink: 0;
}
.user-meta { flex: 1; min-width: 0; }
.user-meta b { font-size: 12px; color: #fff; display: block; font-weight: 500; }
.user-meta small { font-size: 10px; color: #6c7a94; }
.user-box select {
  background: rgba(255,255,255,.1); color: #fff; border: 0;
  border-radius: 4px; padding: 3px; font-size: 11px; cursor: pointer;
  width: 100%; margin-top: 4px;
}
.user-box select option { background: #101828; }
/* m455：侧栏宽度只有 218px，三个操作链接排一行必溢出（截图里「退出登录」压到主内容区）。
   允许换行 + 每个链接自己 nowrap，保证文字完整可见、不压到别处。 */
.user-actions { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; }
.user-actions .btn-link { font-size: 10px; line-height: 16px; color: #8fa3c4; cursor: pointer; white-space: nowrap; }
.user-actions .btn-link:hover { color: #fff; text-decoration: underline; }

/* ---- 登录遮罩 ---- */
.login-mask {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, #0f1b33 0%, #16264a 55%, #1b3a6b 100%);
  display: flex; align-items: center; justify-content: center;
}
.login-mask.hide { display: none; }
.login-box {
  width: 360px; max-width: calc(100vw - 40px);
  background: #fff; border-radius: 14px; padding: 34px 34px 24px;
  box-shadow: 0 24px 60px rgba(0,0,0,.4);
  text-align: center;
}
.login-logo { display: flex; justify-content: center; margin-bottom: 10px; }
.avatar-lg { width: 56px; height: 56px; font-size: 24px; }
.login-box h1 { font-size: 22px; margin: 0 0 4px; color: #101828; }
.login-sub { font-size: 12px; color: #667085; margin: 0 0 22px; }
.login-field { display: block; text-align: left; margin-bottom: 14px; }
.login-field span { display: block; font-size: 12px; color: #475467; margin-bottom: 5px; font-weight: 500; }
.login-field input {
  width: 100%; box-sizing: border-box; padding: 10px 12px;
  border: 1px solid #d0d5dd; border-radius: 8px; font-size: 14px; outline: none;
}
.login-field input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(59,91,219,.12); }

/* 密码框 + 眼睛图标 */
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 40px; }
.pwd-eye {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border: none; background: transparent;
  font-size: 16px; line-height: 1; cursor: pointer; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  color: #667085; padding: 0; transition: background .15s;
}
.pwd-eye:hover { background: #f2f4f7; color: var(--brand); }
.pwd-eye.on { color: var(--brand); }

/* 360天免密登录勾选 */
.login-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: #475467; cursor: pointer;
  margin: -4px 0 14px; user-select: none;
}
.login-remember input[type="checkbox"] {
  width: 15px; height: 15px; cursor: pointer;
  accent-color: var(--brand);
}
.login-remember:hover { color: var(--brand); }
.login-btn { width: 100%; padding: 11px; font-size: 15px; margin-top: 4px; }
.login-tip { font-size: 11px; color: #98a2b3; line-height: 1.7; margin: 14px 0 0; text-align: center; }
.login-tip b { color: #d92d20; }
/* m164：登录失败原因常驻红字（显示在密码框下方，重新输入自动消失） */
.login-err { font-size: 12px; color: #d92d20; line-height: 1.6; margin: 2px 0 6px; padding: 8px 10px; background: #fef3f2; border: 1px solid #fecdca; border-radius: 8px; text-align: left; }

/* ===== m44: 登录失败反馈（抖动 + 红框）与找回密码入口 ===== */
@keyframes loginShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-9px); }
  40% { transform: translateX(8px); }
  60% { transform: translateX(-6px); }
  80% { transform: translateX(4px); }
}
.login-box.err-shake { animation: loginShake .5s ease; }
.login-box input.input-err {
  border-color: #d92d20 !important;
  box-shadow: 0 0 0 3px rgba(217, 45, 32, .12);
}
.login-help { margin: 10px 0 0; text-align: center; }
.login-help a { color: #667085; font-size: 12px; cursor: pointer; text-decoration: underline; }
.login-help a:hover { color: #d92d20; }

/* ---- 主区域 ---- */
.main {
  flex: 1; margin-left: var(--sidebar-w);
  display: flex; flex-direction: column; min-width: 0;
  height: 100vh;
}
.topbar {
  background: var(--panel); border-bottom: 1px solid var(--border);
  padding: 0 22px; height: 54px;
  display: flex; align-items: center; gap: 14px;
  position: sticky; top: 0; z-index: 50;
  flex-shrink: 0;
}
.topbar h2 { font-size: 16px; font-weight: 600; }
/* m455：顶栏右侧「云已同步 / 日期」曾经被挤出可视区。
   sub 可收缩并用省略号收尾；徽标与日期自己不收缩，保证右端文字完整。 */
.topbar .sub { font-size: 12px; color: var(--text-mute); min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar #pg-title { flex: 0 0 auto; }
.topbar .sync-badge, .topbar #today { flex: 0 0 auto; }
@media (max-width: 1100px) { .topbar #pg-sub { display: none; } }
/* m276（2026-10-13 用户「这里要显示总数量」）：标题旁的总数量胶囊（演员模特库） */
.count-badge {
  font-size: 12px; font-weight: 600;
  color: var(--brand); background: var(--brand-light);
  padding: 2px 9px; border-radius: 9px;
  white-space: nowrap; flex-shrink: 0;
}
.count-badge.hide { display: none; }
.topbar .spacer { flex: 1; }

/* m91：云同步状态徽标（顶栏常驻） */
.sync-badge {
  font-size: 12px; padding: 3px 10px; border-radius: 20px; cursor: pointer;
  border: 1px solid transparent; white-space: nowrap; user-select: none;
}
.sync-badge.sync-ok   { color: #16a34a; background: #f0fdf4; border-color: #bbf7d0; }
.sync-badge.sync-warn { color: #d97706; background: #fffbeb; border-color: #fde68a; }
.sync-badge.sync-off  { color: #dc2626; background: #fef2f2; border-color: #fecaca; font-weight: 600; }
@media (max-width: 720px) { .sync-badge { font-size: 11px; padding: 2px 7px; } }

/* m389：同步进度条（右上角浮层）
   用户反馈「为什么每次都要等下载」，光一个转圈徽标说不清在下什么。
   这里把「第几张表 / 表名 / 已下条数 / 总条数」摊开显示，拉完自动消失。
   pointer-events:none —— 它是纯展示，绝不允许挡住底下的按钮点击。 */
.sync-progress {
  position: fixed; top: 56px; right: 16px; z-index: 60;
  width: 236px; padding: 10px 12px 8px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .12);
  font-size: 12px; color: #334155; pointer-events: none;
}
.sync-progress .sp-head {
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 600; color: #0f172a; margin-bottom: 7px;
}
.sync-progress .sp-head b { font-weight: 600; color: #2563eb; font-size: 11px; }
.sync-progress .sp-bar {
  height: 4px; border-radius: 3px; background: #eef2f7; overflow: hidden; margin-bottom: 8px;
}
.sync-progress .sp-bar i {
  display: block; height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  transition: width .35s ease;
}
.sync-progress .sp-line {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 4px;
}
.sync-progress .sp-line b { color: #0f172a; font-variant-numeric: tabular-nums; }
.sync-progress .sp-foot { color: #94a3b8; font-size: 11px; }
@media (max-width: 720px) {
  .sync-progress { right: 8px; top: 50px; width: 190px; padding: 8px 10px 6px; }
}

/* .content 作为 flex column：工具栏 + 批量栏自然高度，唯一的 .table-wrap 自动 flex:1 填满剩余空间
   关键：
   1) flex item 内 position:sticky 在规范里行为不一致，所以 .content 不再 overflow-y:auto，
      改由 .table-wrap 自己 overflow:auto；工具栏 / 批量栏在 .content 不滚动时一直可见，无须 sticky；
   2) min-height:0 是 flex 子项可收缩的前提，否则 .table-wrap 会被内容撑大、.content 出现滚动条；
   3) :empty 的 .table-wrap（如 #c-mapping 字段映射占位）不占行，避免把 #c-table 挤到中间。 */
.content {
  /* m427（用户反对无意义留白）：全站最外层统一收紧到紧凑四档里的「标准 8px」，
     底部 padding 比上/左右略大（避免列表最后一行贴边），但从 40px 砍到 24px */
  padding: 12px 16px 24px;
  flex: 1; min-width: 0; min-height: 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
.content > .toolbar { flex: 0 0 auto; }
.content > .batch-bar { flex: 0 0 auto; }
.content > .table-wrap {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
}
.content > .set-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow: auto;
}
/* m130：数据看板整页滚动容器（坑117：.content overflow:hidden 架构下非表格页必须自带滚动） */
.content > .dash-scroll {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
}

/* m350（用户 2026-10-21：「无法下滑」——收集表设计器（52 个题目时内容高 8868px））：
 * #view 是 .content（overflow:hidden 的 flex 列），设计器的两段内容不在 .table-wrap/.set-scroll/
 * .dash-scroll 里，没有滚动容器 → 整页被裁死、滚不动。这里让设计器页面自己成为滚动容器。
 * 注意必须保留 flex 列布局（.form-designer 是三栏 grid，顶栏 sticky），只把 overflow 打开；
 * 子项 flex:none 让它按内容自然增高、不压缩，父级才有东西可滚。 */
.content:has(> .fd-page-bar) { overflow-y: auto; -webkit-overflow-scrolling: touch; }
.content:has(> .fd-page-bar) > .fd-page-bar,
.content:has(> .fd-page-bar) > .fd-tab-pane { flex: none; }
/* m130：收集表动态列表 */
.form-feed { display: flex; flex-direction: column; gap: 6px; }
.form-feed .feed-row {
  display: flex; align-items: center; gap: 12px;
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel); cursor: pointer; transition: background .15s;
}
.form-feed .feed-row:hover { background: var(--brand-light, #eef3ff); }
.form-feed .feed-form { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.form-feed .feed-who { color: var(--muted); flex-shrink: 0; }
.form-feed .feed-n { margin-left: auto; flex-shrink: 0; }
.form-feed .feed-n b { color: var(--brand); font-size: 15px; }
.content > .table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.content > .set-scroll {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
}
.set-scroll::-webkit-scrollbar { height: 10px; width: 10px; }
.set-scroll::-webkit-scrollbar-thumb { background: #c8cdd8; border-radius: 5px; }
.set-scroll::-webkit-scrollbar-thumb:hover { background: #a0a8b8; }
.set-scroll::-webkit-scrollbar-track { background: #f1f3f7; }
.content > .table-wrap:empty { display: none; }
/* m48：项目管理页 #pj-mapping（导入字段映射占位，默认空）若不折叠会撑出 320px 空白
   只精确折叠 #pj-mapping / #pj-table 这类占位容器，不影响其他空 div */
#pj-mapping:empty { display: none; }

/* 数据表格（高度由 flex:1 自动撑满，不再用 JS 计算） */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  width: 100%; min-width: 0;
  min-height: 320px;
}
.table-wrap::-webkit-scrollbar { height: 14px; width: 14px; }
.table-wrap::-webkit-scrollbar-thumb { background: #6b89c8; border-radius: 7px; border: 3px solid transparent; background-clip: padding-box; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: #4a6ba6; background-clip: padding-box; border: 3px solid transparent; }
.table-wrap::-webkit-scrollbar-track { background: #e3e9f3; border-radius: 7px; }

/* m63：非 .table-wrap 的 overflow:auto 容器补 14px 品牌蓝滚动条（默认 webkit 太细，用户感觉"溢出"未修） */
.staff-table-wrap::-webkit-scrollbar,
#sec-claim::-webkit-scrollbar,
.photo-preview-body::-webkit-scrollbar,
.resume-preview-wrap::-webkit-scrollbar {
  height: 14px; width: 14px;
}
.staff-table-wrap::-webkit-scrollbar-thumb,
#sec-claim::-webkit-scrollbar-thumb,
.photo-preview-body::-webkit-scrollbar-thumb,
.resume-preview-wrap::-webkit-scrollbar-thumb {
  background: #6b89c8; border-radius: 7px; border: 3px solid transparent; background-clip: padding-box;
}
.staff-table-wrap::-webkit-scrollbar-thumb:hover,
#sec-claim::-webkit-scrollbar-thumb:hover,
.photo-preview-body::-webkit-scrollbar-thumb:hover,
.resume-preview-wrap::-webkit-scrollbar-thumb:hover {
  background: #4a6ba6; background-clip: padding-box; border: 3px solid transparent;
}
.staff-table-wrap::-webkit-scrollbar-track,
#sec-claim::-webkit-scrollbar-track,
.photo-preview-body::-webkit-scrollbar-track,
.resume-preview-wrap::-webkit-scrollbar-track {
  background: #e3e9f3; border-radius: 7px;
}

/* ============ 通用组件 ============ */
/* m427：全站卡片统一用「放松 12px」内边距；h4/p 下方 margin 砍半
   —— 原来 16px padding + h4 10px + p 12px，叠起来每卡头部就吃掉 ~38px，视觉上全是空白 */
.card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 12px;
}
.card h4 { font-size: 14px; margin-bottom: 6px; }
.card p { font-size: 12px; color: var(--text-sub); margin-bottom: 8px; }

.btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 13px; border-radius: 6px;
  border: 1px solid var(--border-dark); background: #fff;
  color: var(--text); font-size: 12.5px; cursor: pointer;
  font-family: inherit; white-space: nowrap;
  transition: all .15s;
}
.btn:hover { background: #f6f8fb; border-color: var(--text-mute); }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn-danger { background: #fff; border-color: #f5b5b0; color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-warn { background: #fff; border-color: #f3d18a; color: #8a5a00; }
.btn-warn:hover { background: #fff7e6; }
.btn-sm { padding: 3px 9px; font-size: 11.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn .ico { font-size: 13px; }
.btn .btn-ic { font-size: 13px; line-height: 1; }
label.btn { position: relative; overflow: hidden; }

input[type=text], input[type=date], input[type=number], input[type=search], input[type=email], input[type=tel], input[type=file],
select, textarea {
  padding: 7px 10px; border: 1px solid var(--border-dark);
  border-radius: 6px; font-size: 12.5px; font-family: inherit;
  color: var(--text); background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
  width: 100%;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43,92,255,.1);
}
textarea { resize: vertical; min-height: 62px; line-height: 1.55; }
label.fld { display: block; margin-bottom: 14px; width: 100%; }
label.fld > span { display: block; font-size: 11.5px; color: var(--text-sub); margin-bottom: 5px; font-weight: 500; }
label.fld > span i { color: var(--danger); font-style: normal; }
/* m369（用户「是否外部经纪人推荐…是的话要填经纪公司或经纪人的联系方式」）：字段下方的条件必填说明 */
.fld-hint { font-size: 11px; color: #98a2b3; margin: -8px 0 12px; line-height: 1.5; }
label.check { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: 12.5px; margin-right: 12px; margin-bottom: 8px; }
label.check input { accent-color: var(--brand); }

/* ---- 徽章 ---- */
.tag {
  display: inline-block; padding: 1px 7px; border-radius: 4px;
  font-size: 11px; line-height: 1.7; white-space: nowrap;
  background: #eef1f6; color: var(--text-sub);
}
.tag-blue   { background: var(--brand-light); color: var(--brand); }
.tag-green  { background: var(--success-bg);  color: var(--success); }
.tag-orange { background: var(--warn-bg);     color: var(--warn); }
.tag-red    { background: var(--danger-bg);   color: var(--danger); }
.tag-purple { background: var(--info-bg);     color: var(--info); }
.tag-gray   { background: #eef1f6;            color: var(--text-mute); }
.tag-cyan   { background: #e0f7fa;            color: #00838f; }
/* m141：新片场认证标识（醒目橙色，区别于普通等级 tag） */
.tag-xpc     { background: linear-gradient(90deg,#fff1de,#ffe2c0); color: #c8590a; border: 1px solid #ffcf99; font-weight: 600; }
.tag-teal   { background: #e0f2f1;            color: #00695c; }
.tag-pink   { background: #fce4ec;            color: #c2185b; }
.tag-indigo { background: #e8eaf6;            color: #303f9f; }
.tag-lime   { background: #f9fbe7;            color: #827717; }

/* ============ 演员模特库 ============ */
/* m337（需求1：用户「图片为什么要显示这么小，在有限的高度完全可以最大化利用，还有正面照片，
 * 留一点点空隙就行了，不用留这么多，上下」）：
 * 正面照/模卡缩略图不再写死小尺寸，而是「高度跟着行高走」——
 *   高度 = 行高 - 6px（上下各 3px 呼吸位），宽度按 3:4 竖版人像比例自动推出来，
 *   行高拖大多少，照片就长多少，行内空间被完整用满。
 * 同时 background-size 用 contain：整张照片完整显示，头部不再被裁。 */
/* m339（用户：「图片为什么要显示这么小，在有限的高度完全可以最大化」「正面照片显示全，
 * 现在都把头给裁掉了，显示长方形就行」）——
 * 原来宽 = (行高-6)/0.75（3:4 竖版），行高 28px 时宽只有 29px；行高拉大后又被 max-width:150px 卡住。
 * 改成 4:3 长方形：高度用满整行（上下只留 2px），宽度 = 高度 ×4/3，上限跟着行高走。
 * m344（用户：「图片为什么要显示这么小，在有限的高度完全可以最大利用化，还有正面照片，
 * 留1点点空隙就行了，不用留这么多，上下，不要这种外面有框给他框住」）——
 *   ① 图片列 td 不再吃通用 (行高-18)/2 的内边距，上下只留 1px（见 .dt-photo td）；
 *   ② 照片高度 = 行高 - 2px（上下各 1px），宽度按 4:3 推，行高 28 时也能到 26px；
 *   ③ 去掉图片外部那圈 border，只保留圆角裁切。 */
.dt-photo[data-key], td.dt-photo { padding-top: 1px !important; padding-bottom: 1px !important; line-height: 0; }
/* m351（用户 2026-10-21 截图：「我拉窄了，为什么图片不居中对齐，反而是固定的」）：
 * 表格是 table-layout:fixed，列被拖窄后 td 比缩略图还窄，而 .data-table.dt-fixed td 是 overflow:hidden，
 * 图片贴左被裁一刀 → 看着就是「没居中、卡在固定位置」。
 * ① 图片列内容居中（inline-flex 的 span 在比它窄的 td 里不会自己居中，显式给 text-align）；
 * ② 列本身用 min-width 兜底：最小 = 缩略图宽 + 左右各 3px，拖不到这一步就不会裁图。 */
.dt-photo[data-key] { text-align: center; min-width: calc((var(--row-h, 28px) - 2px) * 4 / 3 + 8px); }
.model-avatar {
  height: calc(var(--row-h, 28px) - 2px);
  width: calc((var(--row-h, 28px) - 2px) * 4 / 3);
  min-width: 22px; max-width: none;
  border-radius: 0; object-fit: contain;
  /* m349（用户 2026-10-21 截图：「不要这种带灰色的框啊」）：图片被 contain 完整塞进 4:3 框里，
   * 左右/上下必然留白，原来兜底色是淡蓝 --brand-light，看着就是一圈灰蓝框。
   * 改为透明——没图时显示首字（下面 .model-avatar--txt 给个浅蓝底），有图时只剩图片本身。 */
  background: transparent; background-size: contain; background-position: center; background-repeat: no-repeat;
  border: 0; box-sizing: border-box;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--brand); font-weight: 600; flex-shrink: 0;
  vertical-align: middle;
}
.model-avatar--click { cursor: zoom-in; }
/* m349：没有照片时显示姓名首字的方块（保留浅蓝底，否则透明底上只剩一个孤零零的字） */
.model-avatar--txt { background: var(--brand-light); }
.model-avatar--click:hover { box-shadow: 0 0 0 2px var(--brand); }
.model-avatar.sm { width: calc((var(--row-h, 28px) - 4px) * 4 / 3); height: calc(var(--row-h, 28px) - 4px); border-radius: 0; font-size: 11px; }
/* m317b：「模卡」列缩略图（数据表里显示演员的摩卡照片，点开看原图）
 * m339：同正面照口径 —— 4:3 长方形、高度用满行高，不再被 max-width:92px 压成小方块。 */
.model-thumbs { display: inline-flex; gap: 3px; align-items: center; justify-content: center; }
.model-thumb {
  width: calc((var(--row-h, 28px) - 2px) * 4 / 3); height: calc(var(--row-h, 28px) - 2px);
  /* 同上：m349 缩略图无图/加载中不再显示淡蓝底块 */
  border-radius: 0; background: transparent center/contain no-repeat;
  border: 0; box-sizing: border-box; cursor: zoom-in; flex-shrink: 0;
}
.model-thumb:hover { box-shadow: 0 0 0 2px var(--brand); }
.model-thumb-more { font-size: 11px; color: var(--text-mute); margin-left: 1px; }
.model-gallery {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px; margin: 10px 0 6px;
}
.model-gallery img {
  width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top; border-radius: 0;
  border: 0; cursor: zoom-in; background: #f1f3f7;
  transition: transform .12s ease, box-shadow .12s ease;
}
.model-gallery img:hover { transform: translateY(-2px); box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.model-gallery .g-empty { color: var(--text-mute); font-size: 12px; grid-column: 1 / -1; padding: 14px 0; text-align: center; }
.model-photo-main {
  width: 100%; aspect-ratio: 3 / 4; border-radius: 0; background-size: cover;
  background-position: center top; border: 0; cursor: zoom-in;
  position: relative; overflow: hidden; margin-bottom: 10px; background-color: transparent;
}
.model-photo-main .mpp-hint {
  position: absolute; bottom: 12px; right: 12px; background: rgba(0,0,0,.5); color: #fff;
  font-size: 12px; padding: 5px 10px; border-radius: 20px; opacity: 0; transition: opacity .2s ease;
}
.model-photo-main:hover .mpp-hint { opacity: 1; }

/* m286（2026-10-15 用户「工具栏下拉都是全部不知道是什么功能，加个筛选按钮，每个字段都能筛选」）：
   演员模特库工具栏：城市/价格两个下拉 + 「⚙ 筛选」按钮 → 右侧抽屉里按任意字段组合筛选。 */
.m-filter-n {
  margin-left: 6px; background: #fff; color: var(--brand); font-size: 11px; font-weight: 700;
  border-radius: 10px; padding: 1px 7px; line-height: 16px;
}
.m-filter-n:empty { display: none; }
.mf-panel { padding: 14px 20px 8px; }
.mf-tip { margin: 0 0 12px; font-size: 12px; color: var(--text-mute); line-height: 1.6; }
.mf-row { display: flex; align-items: center; gap: 10px; margin-bottom: 9px; }
.mf-row > label { width: 104px; flex-shrink: 0; font-size: 13px; color: var(--text-sub); text-align: right; }
/* m371（用户：「选浙江，如果需要搜市，就出来浙江省的市级搜索条件」）：城市 = 省份 + 市 两级并排 */
.mf-city2 { flex: 1 1 auto; display: flex; gap: 8px; min-width: 0; }
.mf-city2 .mf-in { flex: 1 1 0; min-width: 0; }
/* m371：筛选抽屉窄版（原来 900px 太宽）；管理员「设置排序」按钮贴标题右侧 */
.drawer.drawer-slim { width: 480px; }
.drawer-slim .mf-panel { padding: 14px 16px 8px; }
.drawer-slim .mf-row > label { width: 74px; }
.drawer-slim .drawer-head .btn-sm,
.drawer-head .btn-sm { margin-left: auto; margin-right: 12px; font-size: 12px; padding: 4px 10px; }
.mf-row .mf-in {
  flex: 1 1 auto; min-width: 0; padding: 7px 10px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 13px; background: var(--panel); color: inherit;
}
.mf-range { flex: 1 1 auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.mf-range .mf-in { flex: 1 1 0; min-width: 0; }
.mf-range > span { color: var(--text-mute); }
.mf-foot { display: flex; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--panel); }
.mf-foot .btn { flex: 1; }

/* 视图分段切换 */
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 9px; overflow: hidden; background: var(--panel); }
.seg-btn { border: none; background: transparent; padding: 7px 13px; font-size: 13px; color: var(--text-sub); cursor: pointer; line-height: 1; }
.seg-btn:hover { background: var(--brand-light); }
.seg-btn.active { background: var(--brand); color: #fff; }
.seg-btn.active:hover { background: var(--brand); }

/* 演员模特 卡片网格（模特经纪式照片墙） */
/* m69（v1.17）：卡片改 3:4 竖版 + 网格加密（minmax 240→180，贴近华谊 5 列观感），封面图顶部对齐防切头 */
/* m71（v1.21）：名字浮层从"占满整宽 + 大渐变 + 身高三围一长串"改成"左下角紧凑 + 文字阴影"，
              参考模特经纪官网的封面排版（一张卡 = 一个演员的头肩肖像 + 名字），去掉左上角性别徽标 */
/* m281（2026-10-14 用户「还是无法显示，图片为什么显示不了啊」）：
   ⚠️ 卡片墙被压扁的根因 = 下方 m265 那条「卡片墙自己的滚动容器」（flex:1 1 0 / min-height:0 / overflow:auto）。
   它把网格容器的【高度】变成确定值后，网格里 auto 尺寸的行轨会被一起压缩 ——
   实测卡片只剩 173×2px（照片被挤成一条 2px 缝隙、姓名首字完全看不见），
   用户看到的就是「一片空白 / 图片根本看不了」。
   修法：给行轨钉上 max-content —— 行高按内容（.model-card-photo 的 3:4 aspect-ratio）算，
   容器高度仍由 flex 决定、超出部分照旧滚动，m265 的「手机可下滑」不受影响。
   实测：加这一条前卡片高 2px，加完 127px（3:4 正常）。 */
/* m365（2026-10-24 用户「演员模特库展示参考 huayibrothersfashion，间距特别小，而且不是圆角」）：
   照参考站做成紧贴的照片墙 —— 间距基本为零（只留 2px 呼吸缝）、直角、无边框、无卡片底色，
   照片铺满格子。列宽仍 112px（手机 96px），一屏尽量多铺。 */
.model-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); grid-auto-rows: max-content; gap: 2px; padding: 0; }
/* m367（2026-10-24 用户「每行中间的间距也要 2px，名字呢，名字也要啊，和图片一样」）：
 *   行/列间距统一 2px。m368 起姓名条压在照片底部内侧，不再额外占行高，
 *   行距就是 grid 的 2px gap。 */
/* m265（2026-10-12 用户「手机无法下滑」）：卡片墙自己的滚动容器。
   .content 是 overflow:hidden 的 flex 列，全站只有 .table-wrap / .set-scroll / .dash-scroll
   三个类自带 overflow:auto —— .model-card-grid 不在其中。以前库里只有两三条没事，
   导入 8600+ 条后卡片一屏铺不下，被 .content 直接裁掉，手机和桌面都滑不动。 */
.content > .model-card-grid { flex: 1 1 0; min-height: 0; overflow: auto; -webkit-overflow-scrolling: touch; }
/* m363（2026-10-24 用户「数据还是显示一条，你自己访问浏览器看看」——浏览器实测：
 *   .content 有 4 个 flex 子项：toolbar / batch-bar / #m-cards / #m-table，
 *   两个 .table-wrap 都带 flex:1 1 0 抢同一份剩余高度 → #m-cards 被压成 414px，
 *   且 .content 本身 overflow:hidden，滚不到下面的卡片，页面上永远只见第一排。
 *   卡片视图下隐藏的 #m-table 不该占 flex 份额；卡片网格按内容整体滚动（不要独立小滚动框，
 *   否则「加载更多」在手机端永远触不到）。 */
.content > .table-wrap:not(:empty) { flex: 1 1 0; }
.content:has(> .model-card-grid:not([style*="none"])) { overflow-y: auto; }
.content:has(> .model-card-grid:not([style*="none"])) > .model-card-grid {
  flex: none; min-height: 0; overflow: visible; -webkit-overflow-scrolling: touch;
}
/* m380（用户 2026-10-24：「批量导入演员模特展开和收起，下面的怎么又无法下滑，已经 20 多次了」）：
   ⚠️ 演员模特库「能不能下滑」的唯一开关，对应的 JS 是 Model._fixScroll()，改这里或改它都要两边一起看。
   · 卡片/列表切换不再写内联 display:none（会污染上面的 :has 判断），改用 .model-hidden；
   · 导入面板展开时 .content 加 .import-open：整页滚动，卡片墙不抢高度、也不自己套一层滚动条。
     这条必须放在上面 :has 规则之后（同权重、后写生效）。 */
.model-card-grid.model-hidden { display: none !important; }
.content.import-open { overflow-y: auto !important; -webkit-overflow-scrolling: touch; }
.content.import-open > .model-card-grid,
.content.import-open > .table-wrap { flex: none; min-height: 0; overflow: visible; }
/* m381（用户：「点击批量导入……下面的数据先隐藏掉，我上传的模特直接出现在下方的数据预览里」）：
   导入面板展开时，演员模特库自己的那份数据（卡片墙 / 列表 / 筛选条 / 批量条 / AI 条 / 字段映射）
   全部隐藏，页面上下只剩「导入表单 + 预览表」，不会出现两套表叠在一起。
   只用 CSS 控制、不加内联 display —— 收起时删掉 .import-open 就自动还原，不用 JS 记状态。
   #m-import 自己不能隐藏（它就是导入面板）。 */
.content.import-open > .model-card-grid,
.content.import-open > #m-table,
.content.import-open > #m-fbar,
.content.import-open > #m-batch,
.content.import-open > #m-aibar,
.content.import-open > #m-mapping { display: none !important; }
/* m268（2026-10-13 用户「没有信息」）：导入映射面板默认是空盒子，却因 .table-wrap 规则
   抢走一半高度，把卡片墙压扁。空的时候直接不占位，卡片墙拿满高度。 */
#m-mapping:empty { display: none; }
/* m365：直角、无边框、无卡片底色 —— 照片本身就是卡片 */
.model-card { cursor: pointer; background: transparent; border: 0; border-radius: 0; overflow: hidden; transition: opacity .2s ease; position: relative; }
.model-card:hover { opacity: .88; }
.model-card:hover .model-card-photo { transform: none; }
/* m374（用户截图：有的卡底部多出一条空白、整排底边不齐）：
   卡片墙是一行多列，一张图没有「按比例撑高整行」的资格 —— 它是被 grid 拉伸到行高的，
   剩余高度会落到 name（absolute bottom:0）下面，看起来就是「照片没铺满，底部一条空白」。
   修法：卡片撑满格子高度（height:100%），照片块撑满卡片、名字条贴最底。 */
.model-card-photo {
  position: relative; width: 100%; height: 100%; aspect-ratio: 2 / 3; background: linear-gradient(135deg, #eef1f6, #dfe4ec);
  background-size: cover; background-position: center top; display: flex; align-items: flex-end;
  transition: transform .35s ease;
}
.model-card-photo.no-photo { background: var(--brand-light); }
/* m352（用户：「正面照片数据显示全，现在都把头给裁掉了，显示长方形就行」）：
   当时给正面照卡改成 contain，结果竖构图照片两侧/上下留大片浅灰底，
   用户 m374 反馈「正面照片没有覆盖全部，底部有空白，不是说好了 2px 吗」。
   → 照片墙一律 cover 铺满格子，缝隙只由 grid 的 2px gap 提供；
     这里保留空规则说明，避免再次误加 contain。 */
/* m366（2026-10-24 用户「样式不对，还有名字后面有透明栏」；参考站实测：
 *   模特照片 340×600 长竖图、间距仅 4px、直角、无边框无底色，照片上不叠任何文字/渐变。
 *   这里：比例改 2:3 长竖版；照片上的名字浮层与底部渐变遮罩全部去掉；间距 2px。 */
.model-card-photo::after { content: none; }
/* 无照片的卡片：浅底上再压一层品牌色底纹，别让整张卡白得看不见 */
.model-card-photo.no-photo::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 42%, rgba(43, 92, 255, .16), rgba(43, 92, 255, 0) 62%);
}
.model-card-init { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: 34px; font-weight: 700; color: var(--brand); }
/* m366：参考站照片上不叠名字（只在 title 里）。有照片的卡把名字浮层隐藏，
   无照片的灰底卡把名字改成深色小字直接排在格子底部（否则浅底白字看不见）。 */
/* m367（用户「名字呢，名字也要啊，和图片一样」；对照参考图）：
 *   姓名改回照片正下方的一条浅灰细条（深灰小字「中文名 English Name」，单行省略），
 *   不再浮在照片上、也不再依赖 title 悬停。名字条是卡片的一部分，会自己撑出行高。
 *   所有卡（含无照片卡）都走这条，行高因此统一。 */
/* m368（用户「名字是直接盖在图片上的，不是在图片的最下面」）：
 *   参考图里姓名条压在照片底部内侧（照片延伸到名字条后面），不是照片下方的另一块。
 *   改回 absolute 定位贴住照片底边，浅灰底 + 深灰字，高度算进照片内。 */
.model-card-name {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; pointer-events: auto; cursor: pointer;
  display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 6px;
  background: rgba(242, 243, 245, .62); color: var(--text-sub); line-height: 22px;
  white-space: nowrap; overflow: hidden;
}
.model-card-photo.no-photo .model-card-name { display: flex; color: var(--text-sub); }
.model-card-name .mcn-main { font-size: 10.5px; font-weight: 500; letter-spacing: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: none; color: var(--text-sub); flex: 0 1 auto; min-width: 0; }
.model-card-name .mcn-en    { font-size: 9.5px; margin-top: 0; color: #8a92a0; letter-spacing: .2px; text-transform: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: none; flex: 0 1 auto; min-width: 0; }
.model-card-photo.no-photo .model-card-name .mcn-main,
.model-card-photo.no-photo .model-card-name .mcn-en { color: var(--text-sub); text-shadow: none; }
.model-card .mc-gender { position: absolute; top: 10px; left: 10px; background: rgba(0,0,0,.5); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 20px; z-index: 2; }
.model-card .mc-zoom {
  position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%;
  border: none; background: rgba(0,0,0,.45); color: #fff; font-size: 14px; cursor: zoom-in;
  display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s ease; z-index: 3;
}
.model-card:hover .mc-zoom { opacity: 1; }
.model-card .mc-zoom:hover { background: rgba(0,0,0,.7); }
/* m328（2026-10-20 用户「卡片模式下为什么不能多选」）：多选模式下卡片左上角勾选框 */
.model-card .mc-cb { position: absolute; top: 8px; left: 8px; z-index: 4; display: flex; cursor: pointer;
  padding: 3px; border-radius: 6px; background: rgba(255,255,255,.9); box-shadow: 0 1px 4px rgba(0,0,0,.25); }
.model-card .mc-cb input { width: 16px; height: 16px; cursor: pointer; margin: 0; }
.model-card.sel { outline: 3px solid var(--brand); outline-offset: -3px; }
/* m328：工具栏「新增演员模特」合并入口——图标大一些，靠右醒目 */
/* m329：「＋ 新增演员模特」按钮：图标与文字同一行、不换行 */
.btn-add-model { font-weight: 600; padding: 6px 16px; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.btn-add-model .btn-ic.big { font-size: 17px; font-weight: 700; }
/* m329：点按钮就地弹出的小菜单（不用弹窗）；项里图标 + 文字同一行 */
.add-menu-pop { position: fixed; z-index: 600; min-width: 186px; padding: 6px; background: #fff;
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 26px rgba(15,23,42,.16);
  display: flex; flex-direction: column; gap: 2px; }
.add-menu-pop .add-menu-item { display: flex; flex-direction: row; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: 7px; cursor: pointer; font-size: 14px; color: var(--text);
  text-align: left; white-space: nowrap; transition: background .15s; }
.add-menu-pop .add-menu-item:hover { background: var(--brand-light); }
.add-menu-pop .ami-ic { font-size: 17px; line-height: 1; }
.add-menu-pop .ami-t { font-weight: 600; }
/* m328：批量修改弹窗「文字自动识别标签」识别后临时高亮，方便查看哪些被自动填入 */
.bfe-hl { background: #fff3c4 !important; box-shadow: 0 0 0 2px #ffd591; transition: background .5s ease, box-shadow .5s ease; }
.bfe-smart { border-color: #bccdff; background: linear-gradient(#f6f9ff, #fff 62%); }
.bfe-smart .form-section-head { color: #1d3fa8; }
.bfe-smart textarea { width: 100%; box-sizing: border-box; font-size: 13.5px; line-height: 1.7; padding: 9px 10px;
  border: 1.5px solid #b9c7e6; border-radius: 8px; resize: vertical; }
.empty { padding: 48px 16px; text-align: center; color: var(--text-mute); font-size: 14px; }

/* ============ 数据表格 ============ */
/* 基础样式：无 .content:has() 上下文时，table-wrap 使用自适应高度 */
.table-wrap {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--panel);
  width: 100%;
  min-width: 0;
}
.table-wrap::-webkit-scrollbar { height: 14px; width: 14px; }
.table-wrap::-webkit-scrollbar-thumb { background: #6b89c8; border-radius: 7px; border: 3px solid transparent; background-clip: padding-box; }
.table-wrap::-webkit-scrollbar-thumb:hover { background: #4a6ba6; background-clip: padding-box; border: 3px solid transparent; }
.table-wrap::-webkit-scrollbar-track { background: #e3e9f3; border-radius: 7px; }

/* 批量操作栏（紧贴在工具栏下方，flex item 顺序排列；.content 不再滚动所以不需要 sticky） */
.batch-bar { display: flex; align-items: center; gap: 10px; background: var(--brand-light); border: 1px solid var(--brand); color: var(--text-sub); padding: 8px 14px; border-radius: var(--radius); margin-bottom: 10px; font-size: 13px; animation: fadeIn .15s ease; }
.batch-bar.hide { display: none; }
.batch-bar .batch-count { font-weight: 600; }
.batch-bar .batch-count b { color: var(--brand); font-size: 14px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-mute); padding: 5px 8px; }
.btn.ghost:hover { background: rgba(0,0,0,.05); border-color: transparent; }
.data-table { width: max-content; border-collapse: separate; border-spacing: 0; font-size: 12.5px; table-layout: auto; }
/* m75b：DataTable 渲染的表格改 fixed 布局（只影响带 colgroup 的组件表，不影响手工 .data-table）
 * auto 布局下：① 长内容（如「对接中/已存在好友」标签）把列撑得比 colgroup 宽 → 列间距被顶开；
 *              ② 总宽被 table width 锁死，内容列多吃、别的列被挤 → 拖拽往窄拖「没反应」。
 * fixed 布局：列宽 = colgroup，超长内容省略号截断（要看全可拖宽列，拖拽已修复像素级精确）。 */
.data-table.dt-fixed { table-layout: fixed; }
/* m333（需求8：用户「数据表拉窄了不要显示 3 个点，直接和下面数据正常显示就行了」）：
 * td 不再加 text-overflow: ellipsis（会出「…」），文字与下面数据左对齐正常显示、超出部分直接裁掉；
 * 表头同样不省略，超出部分由 th 裁掉。 */
.data-table.dt-fixed td { overflow: hidden; }
/* m336：th 不能 overflow:hidden —— ▾ 筛选按钮是 th 的绝对定位兄弟节点，会被整块裁掉；
 * 列名溢出改由 .th-text 自己裁（见下），表格横向溢出由 .table-wrap 滚动。 */
/* m336（需求1：用户「所有数据居中对齐，数据列之间不要空那么多」）：
 * 组件表格统一居中；列间距从 10px 收到 6px，横向不再空一大截。 */
/* m346（用户 2026-10-21：「薪酬管理画线的地方为啥这么多空白」）：上面这条 6px 一直没生效 ——
 * 659 行 `.data-table:not(.log-table) td/th` 的特异性（0,2,3）高于 `.data-table.dt-fixed td`（0,2,2），
 * 10px 反压回来，单元格左右各 10px、两列之间实际空 20px。这里补上 :not(.log-table) 并集，
 * 让 6px 真正生效；日志表相关页面保持原样不受影响。 */
.data-table.dt-fixed:not(.log-table) td,
.data-table.dt-fixed:not(.log-table) th { padding-left: 6px; padding-right: 6px; }
/* 列名与 ▾ 按钮各占固定份额：列拉窄时两者一起按比例收，不再由 ▾ 把列名顶到只剩省略号 */
.data-table.dt-fixed th .th-text { display: inline-block; max-width: calc(100% - 20px); overflow: hidden; vertical-align: middle; }
.data-table.dt-fixed th .th-filter { margin-left: 2px; }
/* m336（需求8）：▾ 不参与收缩，列再窄也保留点击区；列名先被压缩 */
.data-table.dt-fixed th .th-filter { flex: 0 0 auto; }
/* 文本较长的表格里居中也照样可读：不换行、超宽直接裁切（不出省略号） */
.data-table.dt-fixed td { white-space: nowrap; }
/* m459c（用户 2026-11-05：「所有字段要居中」「表头和值不在一条中线」）：
 * 根因 —— ▾ 筛选按钮原来是 inline-block 跟在列名后面，th 的 text-align:center 居中的是
 * 「列名 + ▾」这一整组，列名因此被左推半个按钮宽（线上实测 14.58px）；列名接近列宽时整组超宽，
 * 还会退化成从最左边排（另一种偏移）。
 * 处置 —— ▾ 改成绝对定位贴在右边缘（右侧留 8px 给列宽拖拽把手），不参与行内排版：
 * th 的居中线只由列名决定 → 列名中心 = 列中心 = 单元格内容中心（表头与值同一列中线）。
 * 按钮视觉收窄后点击区不能跟着变小，用 ::after 向左/上下扩点击热区（不往右压到拖拽把手）。 */
.data-table.dt-fixed th .th-filter {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  display: block; margin: 0; padding: 0; width: 12px;
  font-size: 9px; line-height: 15px; text-align: center; border-radius: 3px;
}
.data-table.dt-fixed th .th-filter::after { content: ''; position: absolute; top: -4px; bottom: -4px; left: -4px; right: 0; }
/* m333（需求8）：th-text 不做 overflow:auto（th 内的 ▾ 筛选按钮与拖宽把手是绝对定位，
 * 一旦 th-text 成为滚动容器会错位）。 */


/* m163：手写列表表格统一加 dt-fixed 对齐（用户：「所有多条数据都要对齐，客户管理做的很好」）
 * 组件表格的宽度由 inline style width:XXXXpx 指定（优先级更高不受影响）；
 * 手写 dt-fixed 表格没有 inline 宽度 → width:100% 撑满容器，与客户管理同款观感：
 * 列宽 = th 上定义的 width，长内容单行省略号，不再被内容撑得忽宽忽窄。 */
.data-table.dt-fixed { width: 100%; }
/* m54b：行间距（行高）可拖动 —— 用 CSS 变量集中控制
 * 教训：表格里 `tr/td { height: var(--row-h) }` 完全不生效——
 *        td 内容（如 .row-act 按钮 padding 3px 9px + font-size 12.5px = ~25.5px）
 *        会强制撑高 td/tr，CSS 变量没法对抗 min-content。
 * 改用方案：把 --row-h 转换为 td padding-block，让行间距随变量变化；
 *        接受 tr 高度 = max(padding+line-height, padding+content-height)，
 *        用户拖动时能感觉到行间距明显放大。 */
.data-table { --row-h: 28px; }
/* base 文字 line-height 18px；m333 需求6 默认行高 28 → padding = (28 - 18) / 2 = 5px */
.data-table:not(.log-table) td,
.data-table:not(.log-table) th {
  padding-top: max(2px, calc((var(--row-h) - 18px) / 2));
  padding-bottom: max(2px, calc((var(--row-h) - 18px) / 2));
  padding-left: 10px;
  padding-right: 10px;
  line-height: 18px;
  vertical-align: middle;
  box-sizing: border-box;
  text-align: center;
}
/* 行高拖动把手视觉提示：hover 时 tr 底部 3px 出现淡蓝色线，鼠标落到底边 5px 变 row-resize 手型 */
.data-table tbody tr:hover { box-shadow: inset 0 -3px 0 rgba(30, 64, 175, .35); }
.data-table tbody tr.rh-hover { cursor: row-resize; }
.data-table th {
  background: #f8fafc; text-align: center; font-weight: 600;
  /* m337（需求6：用户「列表数据高度太高，上下都有很多间隙」）：表头原来写死 9px 上下内边距，
   * 把 --row-h 算出来的紧凑值顶回去，表头比别人高一截。删掉后由上面统一公式计算。 */
  padding: 3px 10px; color: var(--text-sub); font-size: 12.5px;
  border-bottom: 1px solid var(--border); white-space: nowrap;
  position: sticky; top: 0; z-index: 10;
  user-select: none;
}
.data-table td {
  padding: 3px 10px; border-bottom: 1px solid #f0f3f7;
  vertical-align: middle; white-space: nowrap;
  overflow: visible;
  text-align: center;
}
/* m336（需求6）：组件表格（带 dt-fixed）的单元格上下内边距统一交给 --row-h 计算，
 * 不再被上面 .data-table td 的 8px 顶回来（两组选择器特异性相同，靠书写顺序覆盖，必须放在后面） */
.data-table.dt-fixed td { padding-top: max(2px, calc((var(--row-h) - 18px) / 2)); padding-bottom: max(2px, calc((var(--row-h) - 18px) / 2)); }
/* m336（需求1）：长文本列宽有限时，左对齐反而在两侧空出大块，居中后文字与列宽贴合 */
.data-table td .cell-edit { text-align: center; }
/* m50：粘性表头需要不透明背景，否则后面的 tbody 行会从字缝漏出来 */
.data-table thead th { background: linear-gradient(180deg, #f3f7fc, #e7eef7); }
/* m50：固定列（操作/复选）同时垂直 sticky —— 防止 inline style 只设 left 把 top:0 覆盖掉 */
.data-table th.th-fixed {
  top: 0 !important;
  z-index: 11 !important;
}
.data-table tbody tr:hover { background: #fafbfd; }
.data-table tbody tr:hover .cell-edit { background: #fff; border-color: var(--brand-light); }
.data-table .small { font-size: 11.5px; }
.data-table .link { color: var(--brand); cursor: pointer; font-weight: 500; }
.data-table .link:hover { text-decoration: underline; }
.data-table .muted { color: var(--text-mute); }
/* 表格内文字大小统一：标签/操作按钮/链接都和正文一致 */
.data-table .tag { font-size: 12px; padding: 1px 8px; }
.data-table .row-act { font-size: 12.5px; padding: 3px 9px; }
.data-table .row-act .row-act-ic { font-size: 12.5px; }

/* 日志表格：详情列允许换行、不截断 */
.log-table { table-layout: auto; width: 100%; }
.log-table th, .log-table td { white-space: normal; word-break: break-all; overflow: visible; }
.log-table .log-detail { line-height: 1.6; min-width: 240px; }
.log-table td { vertical-align: top; padding: 10px; }
.data-table .icon { background: transparent; border: 0; cursor: pointer; color: var(--text-sub); font-size: 14px; padding: 2px 6px; border-radius: 4px; }
.data-table .icon:hover { color: var(--brand); background: var(--brand-light); }
/* m427：空状态之前 padding 56px —— 在列表页里显得像被撑满了、页面断了一截；
   统一砍到「放松 32px」，仍够看但不占地方 */
.data-table .empty { text-align: center; padding: 32px 20px; color: var(--text-mute); }

/* 字段管理表格（FieldMgr · 客户/项目/演员模特字段）—— v2.3.5 对齐修复
 * 根因：dt-fixed（table-layout:fixed）下「列宽只认 th 的 width，min-width 直接被忽略」，
 *       而各列 width 之和（690px）又大于弹窗内容宽（默认 720px 弹窗 − 40 padding = 680px），
 *       fixed 布局会把所有列按比例压窄 → ①「下拉选项 / 字典」列被压成 0 宽整列消失；
 *       ② 单元格里写死的 px 控件（150/110/100px）比压窄后的列还宽 → 每列都被裁切。
 * 处置：弹窗改 wide（980px）给足宽度 + 列宽全部用 width 显式声明 +
 *       单元格内控件一律 width:100% 跟着列走（窄屏也不会溢出）。 */
.fm-table td input[type="text"], .fm-table td select { width: 100%; }
.fm-table .fm-ord { white-space: nowrap; }
.fm-table .fm-ord .icon { padding: 2px 3px; font-size: 13px; }
.fm-table .fm-ellip { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* m204：字典选项编辑器（DictMgr 弹窗）——列宽显式声明 + 单元格控件 100% 跟随列宽 */
.dm-table td input[type="text"] { width: 100%; }
.dm-table .dm-ord { white-space: nowrap; }
.dm-table .dm-ord .icon { padding: 2px 3px; font-size: 13px; }
.dm-table .dm-lock {
  display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; padding: 3px 6px; border-radius: 4px;
  background: #f3f4f6; color: var(--text-sub); font-size: 12.5px;
}

/* ============ 固定列（操作列/复选列冻结在左侧，避免每次右滑） ============ */
.data-table th.th-fixed,
.data-table td.col-sticky {
  background: var(--panel);
  z-index: 3;
  box-shadow: 2px 0 6px rgba(16,24,40,.06);
}
.data-table tbody tr:hover td.col-sticky { background: #fafbfd; }  /* 行 hover 时跟着变浅灰 */

/* ============ 行操作按钮（详情 / 跟进，固定列内） ============ */
/* 按钮间留 6px 间距；vertical-align: middle 强制在 td 中心垂直对齐（避免 inline-flex baseline 错位） */
.row-act {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 8px; margin-right: 6px;
  border: 1px solid var(--border);
  background: #fff; color: var(--text-sub);
  border-radius: 5px; font-size: 12.5px;
  cursor: pointer; line-height: 1.4;
  vertical-align: middle;
  transition: all .15s;
  white-space: nowrap;
}
.row-act:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.row-act .row-act-ic { font-size: 12px; }
.row-act.row-act-blue { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.row-act.row-act-blue:hover { background: var(--brand); color: #fff; }
/* m225：行内删除按钮（管理员专属）——红边红字，hover 反白 */
.row-act.row-act-danger { border-color: #f0c2c2; color: var(--danger); }
.row-act.row-act-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
/* m231（2026-10-06 用户）：「删除按钮右边的间距太宽，和左边详情左边的间距不一致」。
 * 每个 .row-act 都带 margin-right:6px，最后一个按钮后面就多出 6px ——
 * 右侧留白 = 6 + td padding 10 = 16px，左侧只有 10px，肉眼能看出不对称。
 * 去掉最后一个按钮的右间距，左右就一致了（顺带让「贴边列宽」精确到 1px，不会被这 6px 顶溢出）。 */
.data-table td .row-act:last-child { margin-right: 0; }

/* m234（2026-10-06 用户）：「直接收窄，我想要删除的时候自己拉宽，垃圾桶自己会出来」。
 * 操作列默认只放「主按钮」（跟进/详情/编辑），列宽按主按钮实测贴边；
 * 删除按钮（.row-act-del）默认 display:none —— 不占位、不会被 text-overflow 换成「…」。
 * 把列拖宽到容器 ≥176px（≈ 列宽 196px）时，删除按钮自动出现。
 * 注意：容器查询规则必须写在基础规则之后、且同选择器权重，否则会被 display:none 覆盖。
 * 实测（Chrome，devicePixelRatio=1）：容器宽 = 列宽 - td 左右内边距 20px。 */
.data-table td > .act-cell {
  display: flex; align-items: center; gap: 6px;
  container-type: inline-size;
}
.data-table td > .act-cell .row-act { margin-right: 0; }
.data-table .act-cell .row-act-del { display: none; }
/* 两个主按钮（公司管理「详情+编辑」/ 客户管理「跟进+详情」）：
 * 实测需容器 163.7 / 168.4px → 阈值 176px（≈ 列宽 196px）留 ~8px 余量。 */
@container (min-width: 176px) { .data-table .act-cell .row-act-del { display: inline-flex; } }
/* m236（2026-10-06 用户）：「项目管理拉宽这么大垃圾桶还是不出来，要拉特别宽才出来」。
 * 根因：上面 176px 是按「两个文字按钮」定的，项目页只有「详情」一个主按钮，
 *       实测「✎详情 + 🗑」容器只需 96.2px（≈ 列宽 116px），却被 176px 卡着要多拉 80px。
 * 处置：项目页的 .act-cell 加 .act-1，单主按钮走 104px 阈值（≈ 列宽 124px，留 ~8px 余量）。
 * 选择器多一个类（权重更高），与上面的 176px 规则不冲突。 */
@container (min-width: 104px) { .data-table .act-cell.act-1 .row-act-del { display: inline-flex; } }

/* ============ 联系方式列：电话/微信 图标按钮 ============ */
.contact-cell {
  display: inline-flex; align-items: center; gap: 6px;
  white-space: nowrap; max-width: 100%;
}
.contact-val {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.ic-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px;
  padding: 0;
  border: 1px solid var(--border);
  background: #fff; color: var(--text-sub);
  border-radius: 5px; font-size: 12px; line-height: 1;
  cursor: pointer; text-decoration: none;
  transition: all .15s;
}
.ic-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.ic-btn:active { transform: scale(0.92); }
.ic-btn-call { color: #16a34a; border-color: #bbf7d0; background: #f0fdf4; }
.ic-btn-call:hover { color: #fff; background: #16a34a; border-color: #16a34a; }
.ic-btn-copy { color: var(--brand); border-color: #c7d2fe; background: var(--brand-light); }
.ic-btn-copy:hover { color: #fff; background: var(--brand); border-color: var(--brand); }
/* m455：好友状态未建立联系时微信只显示这句短提示，不留半截文本/灰色占位 */
.wx-locked {
  display: inline-block; max-width: 100%; white-space: nowrap;
  font-size: 11.5px; color: var(--text-mute);
}

/* ============ 公司简称 + 官网链接（简称下方一行小号链接） ============ */
/*
  m52c：放弃 m52 的 display:flex 布局，改用 display:contents 让 cell-name 子元素直接参与 cell-edit 布局
  根因：cell-edit{display:inline-block; width:100%; white-space:nowrap; overflow:hidden} 三件套包裹了
  　 　cell-name 后，子 div 的 display:flex 在 inline-block 父里宽度计算异常，
  　 　flex:1 1 auto 的 cell-txt 无法真正撑满父级 = 文字贴左 + 右侧大片空白
  修复：display:contents 让 cell-name 子元素（row-cb + cell-txt + cell-website）直接进入 cell-edit 流式布局，
  　 　用 inline-block + max-width calc(100% - row-cb 宽度) 自然适配 cell-edit 宽度
*/
.cell-name {
  display: contents;
}
.cell-name .row-cb,
.cell-name .row-pb,
.cell-name .row-co {
  display: inline-block;
  flex: 0 0 auto;
  width: 14px; height: 14px;
  margin: 0 6px 0 0;
  vertical-align: middle;
  cursor: pointer;
}
/* m235：公司名称列塞了勾选框后，给 .co-name 让出勾选框的宽度，避免名字把勾选框挤出可视区 */
.cell-name:not(.no-cb) .co-name { max-width: calc(100% - 20px); }
/* 客户名称/项目名称/公海名 文字：用 max-width 让它自动适配 cell-edit 剩余宽度，
   并省略号截断 —— column 变窄时不会换行（截断即可） */
.cell-name .cell-txt {
  display: inline-block;
  vertical-align: middle;
  max-width: calc(100% - 26px);  /* 减去 row-cb 14px + gap 6px + 余量 */
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* m70：未勾选任何行时行内 checkbox 整个消失（cbHtml 为空），26px 的预留就白留了 ——
   这种情况把宽度还给文字，否则「（待补全）JM250531Y」这类稍长的兜底文案会被截断。 */
.cell-name.no-cb .cell-txt { max-width: 100%; }
/* m218：客户名称列的「🏢 + 公司简称」按钮（点击进公司编辑窗）——
   原 .ic-btn 固定 22×22 只能放图标，这里放开宽度容纳文字；公司简称超长省略号截断。
   带该按钮时给客户名字（.cell-txt）预留宽度，避免名字占满把按钮/徽章挤出可视区。 */
.cell-name .ic-btn-co {
  width: auto;
  max-width: 110px;
  padding: 0 6px;
  gap: 3px;
  font-size: 11px;
  vertical-align: middle;
}
.cell-name .ic-btn-co .co-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* m218：按尾随元素给客户名字（.cell-txt）预留宽度，避免名字占满把按钮/徽章挤出可视区 */
.cell-name.has-co .cell-txt        { max-width: calc(100% - 34px); }  /* 🏢 图标 */
.cell-name.has-co.has-xpc .cell-txt { max-width: calc(100% - 110px); } /* 🏢 + 新片场徽章 */
.cell-name.has-co-label .cell-txt        { max-width: calc(100% - 96px); }  /* 🏢+简称 */
.cell-name.has-co-label.has-xpc .cell-txt { max-width: calc(100% - 152px); } /* 🏢+简称 + 徽章 */
/* m70：导入的占位行 —— 没有项目名称，用「（待补全）编号」兜底，橙底虚线框一眼可辨
   ⚠️ max-width 用 100%，不要再减 26px：父级 .cell-txt 已经减过一次，
      这里再减会让 9 位编号（JM250531Y）在默认 180px 列宽下就被截断成省略号。 */
.cell-name .cell-pending {
  display: inline-block;
  vertical-align: middle;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-style: normal;
  color: #a15c00;
  background: #fff4e0;
  border: 1px dashed #f0b37e;
  border-radius: 4px;
  padding: 0 5px;
  font-weight: 400;
}
/* 官网链接：单独占一行（display:block 在 inline-block 父里会强制换行） */
.cell-name .cell-website {
  display: flex; align-items: center; gap: 3px;
  width: 100%;
  margin-top: 2px;
  font-size: 11px; color: var(--brand);
  text-decoration: none; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.cell-name .cell-website:hover { text-decoration: underline; }
.cell-name .cell-website .cell-web-ic { font-size: 10px; opacity: .8; flex: 0 0 auto; }
.cell-name .cell-web-text { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }

/* 表头 checkbox 容器：跟列头文字水平间距 10px，垂直居中 */
.th-cb {
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 10px; vertical-align: middle;
}
.th-cb input { width: 14px; height: 14px; margin: 0; flex: 0 0 auto; }

/* 列宽拖拽手柄（m75：6px→8px 更好抓；hover 表头时先给淡蓝提示，让用户能找到把手） */
.th-resizer {
  position: absolute; right: 0; top: 0; bottom: 0;
  width: 8px; cursor: col-resize; z-index: 12;
  transition: background .15s;
}
.data-table th:hover .th-resizer { background: rgba(37,99,235,.22); }
.th-resizer:hover, .th-resizer.resizing { background: var(--brand); }

/* 列头筛选 */
/* m221：筛选按钮常显 + 点击区加大（用户反馈「筛选按钮 UI 很难用」——原来 10px 无边框，
   不悬停几乎看不见、难点中） */
.th-filter {
  display: inline-block; margin-left: 4px; cursor: pointer;
  color: var(--text-sub); font-size: 11px; padding: 1px 6px; line-height: 1.5;
  border: 1px solid var(--border); border-radius: 4px; vertical-align: middle;
  background: #fff;
}
.th-filter:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-light); }
.th-filter.on { color: #fff; font-weight: 700; background: var(--brand); border-color: var(--brand); border-radius: 4px; }
/* m324（用户 2026-10-19：「筛选后都有UI样式表示已筛选」）——筛选中的列整列高亮：
   ▾ 图标本身已是蓝底（.on），再给整个 th 淡蓝底 + 列名染蓝加粗，扫一眼就知道哪列在筛、全站表格通用 */
.data-table th:has(.th-filter.on) { background: var(--brand-light); }
.data-table th:has(.th-filter.on) .th-text { color: var(--brand); font-weight: 700; }

/* m108：列头筛选状态条（筛选生效时表格上方常驻提示，防"以为数据就只有这些"）
 * m333（需求7）：改为整行宽，「清除全部筛选」同一行最右加「展开/收起」。 */
.dt-filter-bar {
  position: sticky; left: 0; z-index: 5;
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 6px 10px; margin-bottom: 6px;
  background: #fff7e6; border: 1px solid #ffd591; border-radius: 8px;
  font-size: 12px; color: #ad4e00; width: 100%; max-width: 100%; box-sizing: border-box;
}
.dt-filter-lead { font-weight: 700; }
.dt-filter-chip {
  background: #fff; border: 1px solid #ffd591; border-radius: 10px;
  padding: 1px 6px 1px 8px; display: inline-flex; align-items: center; gap: 4px;
  max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.dt-filter-x { cursor: pointer; color: #cf1322; font-weight: 700; padding: 0 2px; }
.dt-filter-x:hover { color: #a8071a; }
.dt-filter-count { font-weight: 700; margin-left: 2px; }
.dt-filter-clear {
  border: 1px solid #ffa940; background: #fff; color: #d46b08;
  border-radius: 6px; padding: 2px 10px; font-size: 12px; cursor: pointer;
}
.dt-filter-clear:hover { background: #fff1d6; }
/* m333（需求7）：筛选条最右「展开/收起」——展开后表格按内容全宽显示（横向滚动看全），收起恢复常规高度 */
.dt-filter-spacer { flex: 1 1 auto; }
.dt-filter-expand {
  border: 1px solid #ffa940; background: #fff; color: #d46b08;
  border-radius: 6px; padding: 2px 10px; font-size: 12px; cursor: pointer; flex: 0 0 auto;
}
.dt-filter-expand:hover { background: #fff1d6; }
.dt-filter-expand.on { background: #d46b08; color: #fff; }
/* m340（用户：「清除全部筛选 同一行最右边加一个展开，点击后数据可显示全，收起时恢复正常高度的数据表」）：
 * 展开态让整张表按内容全宽铺开、单元格不再被列宽截断（横向滚动看全）。 */
.dt-expanded .data-table { width: max-content; min-width: 100%; }
.dt-expanded .data-table th,
.dt-expanded .data-table td { white-space: nowrap; overflow: visible; }
/* 无筛选时的极简工具条：只留最右「展开」，不抢数据区视觉 */
.dt-filter-bar.dt-filter-bar-empty {
  background: transparent; border-color: transparent; padding: 0 0 4px; margin-bottom: 2px;
}
/* 展开态：表格放开高度限制、按内容全宽铺开（横向滚动看全），收起时恢复常规高度。
 * m333（需求7）：用 .dt-expanded 同时命中 .content > .table-wrap 与独立 .table-wrap。
 * 注意：展开时取消弹窗式横向滚动容器定位（含 sticky 表头/固定列），避免异常偏移。 */
.table-wrap.dt-expanded { max-height: none !important; min-height: 0; overflow: auto !important; }
.content > .table-wrap.dt-expanded { flex: 0 0 auto; max-height: none !important; }
.table-wrap.dt-expanded .data-table thead th { position: static; }
.table-wrap.dt-expanded .data-table td.col-sticky { position: static; box-shadow: none; }

/* m460（用户：「展开之前一列有什么，就有什么……不是所有数据都挤在一行里」）：
 * 只有声明 expandStack 的表（工资条列表）在展开态走竖向明细：列名在前、值在后，
 * 每个字段单独一行、行距正常；值的宽度不够时自动换行（不裁切、不出省略号）。
 * 常态表格、以及其它页面的「展开=按内容全宽横向铺开」都保持 2.4.225 原样，不动列宽/居中。 */
.data-table.dt-fixed td.dt-exp-cell { white-space: normal; overflow: visible; text-align: left; padding: 8px 12px; vertical-align: top; }
.dt-exp-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-bottom: 6px; margin-bottom: 8px; border-bottom: 1px dashed var(--border-dark); }
.dt-stack-title { color: var(--text-sub); font-weight: 500; text-align: left; }
.dt-exp-kv { display: flex; flex-direction: column; gap: 4px; }
.dt-exp-item { display: flex; align-items: flex-start; gap: 10px; line-height: 21px; font-size: 12.5px; }
.dt-exp-item > b { flex: 0 0 auto; width: 96px; text-align: right; font-weight: 500; font-size: 12px; color: var(--text-sub); }
.dt-exp-item > span { flex: 1 1 auto; min-width: 0; white-space: normal; overflow-wrap: anywhere; word-break: break-word; text-align: left; color: var(--text); }
/* 展开态里值必须紧跟在标签后面靠左排（常态表格仍用 m459 的居中，不动） */
.dt-exp-item > span > * { text-align: left !important; }

/* m373（用户需求5：筛选要像股票工作台那样「可清除 / 条数 / 保存筛选 / 撤销 / 多选 / 展开」）：
 * 全站统一筛选状态条 .fbar（由 ui.js 的 FBar.html 渲染）。 */
.fbar { margin: 0 0 8px; }
.fbar-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding: 6px 10px; background: #fff7e6; border: 1px solid #ffd591; border-radius: 8px;
  font-size: 12px; color: #ad4e00;
}
.fbar-idle .fbar-row {
  background: transparent; border-color: transparent; padding: 0 0 6px;
}
.fbar-lead { font-weight: 700; }
.fbar-lead-idle { color: var(--text-mute); font-weight: 400; }
.fbar-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: #fff; border: 1px solid #ffd591; border-radius: 10px; padding: 1px 6px 1px 8px;
  max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fbar-x { cursor: pointer; color: #cf1322; font-weight: 700; padding: 0 2px; font-style: normal; }
.fbar-x:hover { color: #a8071a; }
.fbar-count { font-weight: 700; }
.fbar-sp { flex: 1 1 auto; }
.fbar-btn {
  border: 1px solid #ffa940; background: #fff; color: #d46b08;
  border-radius: 6px; padding: 2px 10px; font-size: 12px; cursor: pointer; flex: 0 0 auto;
}
.fbar-btn:hover { background: #fff1d6; }
.fbar-btn.on { background: #d46b08; color: #fff; border-color: #d46b08; }
.fbar-btn:disabled, .fbar-btn.disabled { opacity: .45; cursor: default; background: #fff; }
.fbar-clear { border-color: #cf1322; color: #cf1322; }
.fbar-clear:hover:not(:disabled) { background: #fff1f0; }
.fbar-sel {
  border: 1px solid #ffa940; border-radius: 6px; background: #fff; color: #d46b08;
  font-size: 12px; padding: 2px 6px; max-width: 170px;
}
.fbar-sel-n { font-weight: 700; }
.fbar-del { color: #cf1322; border-color: #ffa39e; }
/* 展开态：卡片/表格不再被高度与列宽限制，按内容铺开 */
.fbar-expanded { max-height: none !important; overflow: visible !important; }

/* m373（用户需求4：「形象AI匹配选角 / 形象AI描述选角 不要弹窗，点按钮在底部出来搜索框，
 * 搜索后直接在原列表筛选」）：演员模特库的内联搜索条 .aibar */
.aibar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  padding: 8px 10px; margin: 0 0 8px; font-size: 12px;
  background: var(--brand-light, #f0f5ff); border: 1px solid #adc6ff; border-radius: 8px; color: var(--text-sub);
}
.aibar.hide { display: none; }
.aibar-tag {
  font-weight: 700; color: var(--brand); background: #fff; border: 1px solid #adc6ff;
  border-radius: 10px; padding: 2px 8px; flex: 0 0 auto;
}
.aibar-in {
  flex: 1 1 240px; min-width: 180px; height: 30px; padding: 0 10px;
  border: 1px solid #adc6ff; border-radius: 6px; font-size: 13px; outline: none; background: #fff;
}
.aibar-in:focus { border-color: var(--brand); box-shadow: 0 0 0 2px rgba(22, 93, 255, .12); }
.aibar-stat { color: var(--brand); font-weight: 700; min-width: 0; }
.aibar-hint { color: var(--text-mute); }
.aibar-pv { width: 34px; height: 34px; border-radius: 6px; object-fit: cover; border: 1px solid #adc6ff; }
.aibar-btn {
  border: 1px solid var(--brand); background: #fff; color: var(--brand);
  border-radius: 6px; padding: 3px 12px; font-size: 12px; cursor: pointer;
}
.aibar-btn:hover { background: var(--brand-light, #f0f5ff); }
.aibar-btn.ghost { border-color: var(--border-dark); color: var(--text-sub); }

/* m108：分批渲染的「加载更多」行 */
.dt-more-row td {
  text-align: center; padding: 10px 8px !important; background: #f7f9ff;
  border-top: 1px dashed var(--border-dark);
}
.dt-more-txt { color: var(--text-mute); font-size: 12px; margin-right: 10px; }
.dt-more-btn, .dt-all-btn {
  border: 1px solid var(--brand); background: #fff; color: var(--brand);
  border-radius: 6px; padding: 3px 12px; font-size: 12px; cursor: pointer; margin: 0 3px;
}
.dt-more-btn:hover, .dt-all-btn:hover { background: var(--brand-light); }
.dt-all-btn { border-color: var(--border-dark); color: var(--text-sub); }
/* m154：分页按钮禁用态（首页/末页越界方向） */
.dt-more-btn:disabled { opacity: .4; cursor: default; background: #fff; }
.th-filter-panel {
  position: fixed; z-index: 300;
  min-width: 170px; max-width: 240px;
  background: #fff; border: 1px solid var(--border-dark);
  border-radius: 8px; box-shadow: var(--shadow-lg);
  padding: 8px; font-weight: 400;
}
.th-filter-panel .tf-list { max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; }
.th-filter-panel .tf-item { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 4px; font-size: 12px; cursor: pointer; white-space: normal; }
.th-filter-panel .tf-item:hover { background: var(--bg); }
/* m116：枚举筛选改「点值即筛」——整行可点，点一下立刻筛选并关窗，已选值高亮 */
.th-filter-panel .tf-pick { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 6px; font-size: 13px; cursor: pointer; white-space: normal; line-height: 1.4; }
.th-filter-panel .tf-pick:hover { background: var(--brand-bg, #eef2ff); color: var(--brand); }
.th-filter-panel .tf-pick.on { background: var(--brand-bg, #eef2ff); color: var(--brand); font-weight: 600; }
.th-filter-panel .tf-pick .tf-pick-tick { font-size: 12px; font-weight: 700; }
.th-filter-panel .tf-kw { width: 100%; margin-bottom: 6px; }
.th-filter-panel .tf-foot { display: flex; gap: 6px; align-items: center; justify-content: flex-end; margin-top: 8px; border-top: 1px solid var(--border); padding-top: 8px; }
/* m221：面板底部操作提示（单击即筛 / Shift 多选） */
.th-filter-panel .tf-hint { flex: 1; text-align: left; color: var(--text-mute); font-size: 11px; line-height: 1.3; }
/* m112：枚举筛选搜索框（选项 >8 时出现） */
.th-filter-panel .tf-search { width: 100%; margin-bottom: 6px; }
/* m112：日历日期筛选面板（跟进时间等日期列，点日期直接筛） */
.th-filter-panel.tf-date-panel { max-width: 268px; }
.tf-quick { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 8px; }
.tf-chip { border: 1px solid var(--border-dark); background: #fff; border-radius: 12px; padding: 2px 9px; font-size: 12px; cursor: pointer; color: var(--text); }
.tf-chip:hover { border-color: var(--brand); color: var(--brand); }
.tf-chip-clear { color: var(--danger, #dc2626); }
.tf-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; font-size: 13px; }
.tf-cal-nav { border: none; background: none; font-size: 16px; line-height: 1; cursor: pointer; padding: 2px 10px; color: var(--text-sub); border-radius: 4px; }
.tf-cal-nav:hover { background: var(--bg); color: var(--brand); }
.tf-cal-grid { display: grid; grid-template-columns: repeat(7, 34px); gap: 2px; }
.tf-cal-w { text-align: center; font-size: 11px; color: var(--text-sub); padding: 2px 0; }
.tf-cal-day { position: relative; text-align: center; font-size: 12px; padding: 5px 0; border-radius: 6px; color: #cbd5e1; }
.tf-cal-day.empty { background: none; }
.tf-cal-day.has-data { color: var(--text); cursor: pointer; font-weight: 600; }
.tf-cal-day.has-data:hover { background: #eff6ff; }
.tf-cal-day.is-today { box-shadow: inset 0 0 0 1px var(--brand); }
.tf-cal-day.sel { background: var(--brand) !important; color: #fff !important; }
.tf-cal-day i { position: absolute; top: -3px; right: -2px; font-style: normal; font-size: 9px; line-height: 1.4; background: #f59e0b; color: #fff; border-radius: 8px; padding: 0 4px; }
.tf-cal-tip { margin-top: 6px; font-size: 11px; color: var(--text-sub); }
/* m112：看板可点击 KPI 卡（今日跟进客户等） */
.dash-grid .kpi[onclick], .dash-grid .kpi.kpi-click { cursor: pointer; transition: box-shadow .15s, transform .15s; }
.dash-grid .kpi[onclick]:hover, .dash-grid .kpi.kpi-click:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.dash-grid .kpi small { display: block; margin-top: 4px; font-size: 11px; color: var(--brand); }


/* 可搜索选择框 */
.ss-panel {
  position: fixed; z-index: 99999;
  background: #fff; border: 1px solid var(--border-dark);
  border-radius: 8px; box-shadow: var(--shadow-lg);
  max-height: 240px; overflow-y: auto; padding: 4px;
}
.ss-item { padding: 7px 10px; border-radius: 5px; cursor: pointer; font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-item:hover { background: var(--brand-light); color: var(--brand); }
.ss-empty { padding: 12px; color: var(--text-mute); font-size: 12px; text-align: center; }

/* m432：多值严格下拉（职业/城市/特长/语言…）——已选值 chips + 只筛选不落值的搜索框 */
.cm-wrap { display: block; }
.form-compact label.fld > .cm-wrap { flex: 1 1 auto; min-width: 0; }
.cm-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px;
  padding: 5px 7px; min-height: 36px; background: #fff;
  border: 1px solid var(--border-dark); border-radius: 6px; cursor: text;
}
.cm-box:focus-within { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-light); }
.cm-chip {
  display: inline-flex; align-items: center; gap: 3px; max-width: 100%;
  padding: 2px 6px; border-radius: 4px; font-size: 12px; line-height: 1.6;
  background: var(--brand-light); color: var(--brand);
}
.cm-chip.cm-out { background: #f3f4f6; color: #8a8f99; }
input.cm-hist { color: #8a8f99; }
em.hist-tag { font-style: normal; font-size: 11px; color: #8a8f99; background: #f3f4f6; border-radius: 3px; padding: 0 4px; margin-left: 4px; }
.cm-chip > i.cm-x { cursor: pointer; font-style: normal; opacity: .6; }
.cm-chip > i.cm-x:hover { opacity: 1; }
.cm-box .cm-search {
  flex: 1 1 120px; min-width: 120px; width: auto; border: 0; outline: none;
  padding: 2px; margin: 0; background: transparent; box-shadow: none; font-size: 13px;
}

/* 行内编辑单元格
 * m209：展示态必须与普通单元格「同高同缩进」——否则同一张表里
 *   ① 可编辑行比只读行高 8.9px（td padding 上下各 10px 之上，再叠 3+3 padding + 1+1 border）
 *   ② 可编辑单元格文字比表头/只读单元格右移 7px（1 border + 6 padding）
 *   项目列表「能改的行」和「不能改的行」混排 → 高矮参差、列内文字左右不齐（用户两次反馈「每列不整齐」）。
 *   做法：纵向 padding/border 归零（高度交给内容自身，与只读一致）；
 *        横向也归零并保持 width:100%（文字左缘=td padding-left 10px，与表头对齐）。
 *   hover/focus 的边框改用 inset box-shadow 表达 —— 同样可见，但完全不占布局高度。
 *   ⚠️ 下拉面板(.cell-sel)/文本域(.cell-ta) 各自显式声明 padding/border，不受此处影响。 */
.cell-edit {
  display: inline-block; min-width: 40px; width: 100%;
  padding: 0; border: 0; border-radius: 4px; vertical-align: middle;
  cursor: text; background: transparent; color: inherit;
  font-size: inherit; font-family: inherit;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  text-align: center;
}
/* m336（需求8）：表格内不出省略号——超宽直接裁切，和下方数据一起「正常显示」 */
.data-table .cell-edit,
.data-table .cell-name .cell-txt,
.data-table .cell-name .cell-web-text { text-overflow: clip; }
.cell-edit:hover { background: #fff; box-shadow: inset 0 0 0 1px var(--border-dark); }
.cell-edit:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 2px var(--brand); }
/* m114：布尔勾选列（新片场/视频号/分类完成）—— 单元格内可点复选框
 * m209：纵向 padding 归零（原 3px 会把勾选行顶高 6px，与普通行不等高）；横向保留 6px 扩大点击区，勾选框居中不受影响。 */
.cell-check { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-width: 40px; padding: 0 6px; cursor: pointer; border-radius: 4px; }
.cell-check:hover { background: #eff6ff; }
/* m115：全自定义复选框——勾/未勾同尺寸同视觉重量（原生 unchecked 灰边在品牌色勾旁边显得「变小」） */
.cell-check input,
.fld-check input { appearance: none; -webkit-appearance: none; margin: 0; flex: 0 0 auto;
  width: 16px; height: 16px; border: 1.5px solid #94a3b8; border-radius: 4px; background: #fff;
  cursor: pointer; position: relative; }
.cell-check input { pointer-events: none; }
.cell-check input:checked,
.fld-check input:checked { background: var(--brand); border-color: var(--brand); }
.cell-check input:checked::after,
.fld-check input:checked::after { content: ''; position: absolute; left: 4.5px; top: 1.5px;
  width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.cell-check input:disabled { cursor: default; opacity: .55; }
.cell-check.readonly { cursor: default; }
.cell-check.readonly:hover { background: transparent; }
/* m114：表单里的布尔勾选字段 */
.fld-check { display: flex; flex-direction: row !important; align-items: center; gap: 10px; }
.fld-check input { width: 17px; height: 17px; }
.fld-check input:checked::after { left: 5px; top: 2px; }
.cell-edit.cell-sel,
.cell-edit.cell-sel-panel {
  padding: 4px 0;
  border: 1px solid var(--brand);
  border-radius: 5px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(16,24,40,.14);
  color: var(--text);
  font-size: 12.5px;
}
.cell-sel-list {
  max-height: 320px;
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 4px 0;
}
.cell-sel-list::-webkit-scrollbar { width: 10px; }
.cell-sel-list::-webkit-scrollbar-thumb { background: #b0b8c8; border-radius: 5px; border: 2px solid #fff; }
.cell-sel-list::-webkit-scrollbar-thumb:hover { background: #8b95a8; }
.cell-sel-list::-webkit-scrollbar-track { background: #f1f3f7; }
.cell-sel-item {
  padding: 5px 12px;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
  line-height: 1.4;
}
.cell-sel-item:hover { background: #eef2ff; color: var(--brand); }
.cell-sel-item.on { background: var(--brand); color: #fff; font-weight: 600; }
.cell-sel-item.on:hover { background: var(--brand); color: #fff; }
/* m436：下拉顶部搜索框 + 键盘高亮项（↑↓ 选择，Enter 确认） */
.cell-sel-item.active { background: #e8eeff; color: var(--brand); }
.cell-edit.cell-ta {
  padding: 6px 10px;
  border: 1px solid var(--brand);
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(16,24,40,.16);
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.55;
  resize: vertical;
}

/* ---- 工具条（flex item 自动贴在 .content 顶部，.content 不滚动所以无须 sticky） ---- */
.toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 22px; margin: -18px -22px 12px;
  flex-wrap: wrap;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.toolbar .spacer { flex: 1; }
.toolbar input[type=search] { width: 210px; }
.toolbar select { width: auto; min-width: 104px; }
/* m371（用户：「城市筛选框宽度小一些，和筛选宽度一样」）：演员库下拉固定成和「⚙ 筛选」按钮同宽，
   过长省份名截断（title 里仍有全名），避免把后面的按钮挤走 */
/* m378（用户：「省级不要在里面滑下拉菜单，并且是多选的，下面弹个页面出来就行，就是展开和收起的方式来多选城市」）：
   省份 = 按钮 + 下方展开面板，格子式多选 */
.m-prov-wrap { position: relative; }
.m-prov-btn { display: inline-flex; align-items: center; gap: 6px; min-width: 116px; justify-content: space-between; }
.m-prov-btn.on { border-color: #2b5cff; color: #2b5cff; background: #eef3ff; }
.m-prov-caret { font-size: 10px; opacity: .6; }
.m-prov-pop { position: absolute; z-index: 60; left: 0; top: calc(100% + 6px); width: 380px; background: #fff;
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 12px 32px rgba(16,24,40,.16); padding: 10px 12px 8px; }
.m-prov-hd { font-size: 12px; color: #667085; margin-bottom: 8px; }
.m-prov-grid { display: flex; flex-wrap: wrap; gap: 6px; max-height: 210px; overflow: auto; }
.m-prov-item { border: 1px solid #e4e7ec; background: #fff; color: #344054; border-radius: 14px; padding: 3px 11px;
  font-size: 12.5px; cursor: pointer; font-family: inherit; line-height: 20px; }
.m-prov-item:hover { border-color: #b9c7e6; background: #f7faff; }
.m-prov-item.on { background: #2b5cff; border-color: #2b5cff; color: #fff; }
.m-prov-ft { display: flex; gap: 8px; justify-content: flex-end; margin-top: 10px; padding-top: 8px; border-top: 1px solid #f1f3f6; }
.toolbar select.m-flt-sel { width: 116px; min-width: 116px; max-width: 116px; text-overflow: ellipsis; }
/* m377：市级下拉（选省份后出现），与省份同宽 */
.toolbar select#m-city2 { width: 116px; min-width: 116px; max-width: 116px; text-overflow: ellipsis; }
#m-filter-btn { min-width: 116px; justify-content: center; }
/* m377（用户：「价格的筛选不要下拉，2个价格框，一个最小，一个最大」）：1天8h 日价区间 */
.m-price-range { display: inline-flex; align-items: center; gap: 6px; }
.m-price-range .m-pr-lb { font-size: 12px; color: var(--text-sub); white-space: nowrap; }
.m-price-range .m-pr-in { width: 72px; padding: 6px 8px; }
.m-price-range .m-pr-dash { color: var(--text-mute); }
/* m271：项目状态筛选器（位于「新片场客户」按钮左侧，带文字标签） */
.toolbar .pj-flt { display: inline-flex; align-items: center; gap: 6px; }
.toolbar .pj-flt > span { color: var(--text-sub); font-size: 13px; white-space: nowrap; }

/* m291（2026-10-16 用户「只要一个切换开关：选角中/全部，和新片场开关一样，UI 特效的那种」）：
   项目状态筛选 = 一个带滑块动画的开关（开 = 只看「选角中」，关 = 看「全部」）。 */
.pj-switch { display: inline-flex; align-items: center; gap: 8px; }
.pj-sw-txt { font-size: 13px; color: var(--text-mute); transition: color .18s ease, font-weight .18s ease; }
.pj-sw-txt.on { color: #0b6b4f; font-weight: 700; }
.pj-sw {
  width: 46px; height: 25px; border-radius: 13px; border: none; cursor: pointer; position: relative;
  background: #cfd8e3; padding: 0; transition: background .25s ease, box-shadow .2s ease;
  box-shadow: inset 0 1px 2px rgba(16,24,40,.18);
}
.pj-sw:hover { box-shadow: inset 0 1px 2px rgba(16,24,40,.18), 0 0 0 4px rgba(16,185,129,.12); }
.pj-sw.on { background: linear-gradient(135deg, #10b981, #059669); }
.pj-sw-knob {
  position: absolute; top: 2px; left: 2px; width: 21px; height: 21px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(16,24,40,.35);
  transition: left .25s cubic-bezier(.34,1.56,.64,1), width .15s ease;
}
.pj-sw.on .pj-sw-knob { left: 23px; }
.pj-sw:active .pj-sw-knob { width: 24px; }

/* ============ 看板 ============ */
.dash-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px; margin-bottom: 20px;
}
.dash-grid .kpi {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow); text-align: center;
}
/* m358（用户：「不要把数字溢出卡片」）：长金额在窄卡片里不再撑破边框；
   优先由 ui.js fitTextInBox 缩字号显示完整数字，实在缩不下才省略。 */
.dash-grid .kpi b { display: block; font-size: 24px; font-weight: 700; color: var(--text);
  max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-grid .kpi span { font-size: 12px; color: var(--text-sub); }
.dash-grid .kpi.kpi-warn { border-color: var(--warn); }
.dash-grid .kpi.kpi-warn b { color: var(--warn); }
.dash-grid .kpi.kpi-danger { border-color: var(--danger); }
.dash-grid .kpi.kpi-danger b { color: var(--danger); }
/* m68.2：金色高亮（待结算提成）—— 与 m68 .pj-stat-gold 同款配色 */
.dash-grid .kpi.kpi-gold { border-color: #e0b24c; background: #fdf8ec; }
.dash-grid .kpi.kpi-gold b { color: #b8860b; }
/* m68.2：项目总览区项目总数 kpi 可点击 */
.dash-grid .kpi[role="button"] { cursor: pointer; transition: all .15s; }
.dash-grid .kpi[role="button"]:hover { border-color: var(--brand); transform: translateY(-1px); }
.dash-grid .kpi small { display: block; font-size: 11px; color: var(--text-sub); margin-top: 4px; }

/* 待跟进提醒：可点击的简洁卡片（替代原先的详细列表） */
.reminder-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.reminder-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 22px; box-shadow: var(--shadow);
  cursor: pointer; transition: all .15s ease;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  text-align: center;
}
.reminder-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(16,24,40,.12); }
.reminder-card b { display: block; font-size: 36px; font-weight: 700; line-height: 1.2; color: var(--text); }
.reminder-card span { font-size: 13px; color: var(--text-sub); }
.reminder-card small { font-size: 12px; color: var(--text-mute); margin-top: 4px; }
.reminder-card.kpi-warn { border-color: var(--warn); }
.reminder-card.kpi-warn b { color: var(--warn); }
.reminder-card.kpi-danger { border-color: var(--danger); }
.reminder-card.kpi-danger b { color: var(--danger); }
.reminder-card.kpi-warn:hover, .reminder-card.kpi-danger:hover { border-color: var(--brand); }

/* ⑥ 公海待审核提示框：数据看板顶部，区别于 kpi-warn(黄)/kpi-danger(红) 的紫色数字消息框 */
.review-notice {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 12px 18px; cursor: pointer;
  background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
  color: #fff; border-radius: var(--radius); font-size: 14px;
  box-shadow: 0 2px 10px rgba(124, 58, 237, .28);
  transition: filter .15s ease;
}
.review-notice b { font-size: 20px; line-height: 1; }
.review-notice:hover { filter: brightness(1.08); }

/* ④ 搜索选中信息卡（补全客户绑定入口）：搜索框下方显示客户名/联系人/微信/电话 + 重新选择 */
.pick-card {
  margin-top: 8px; padding: 10px 12px;
  background: var(--bg, #f8fafc); border: 1px solid var(--brand, #2563eb);
  border-left: 4px solid var(--brand, #2563eb); border-radius: 8px;
  font-size: 13px;
}
.pick-card-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pick-card-row + .pick-card-row { margin-top: 6px; }
.pick-card-name { font-size: 14px; }
.pick-card-info { color: var(--text-sub, #64748b); gap: 14px; }
.pick-card-info span { white-space: nowrap; }
.pick-card-info .cell-txt { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 待跟进提醒列表 */
.follow-reminder { display: flex; flex-direction: column; gap: 8px; }
.fr-item {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius);
  border-left: 3px solid var(--brand);
}
.fr-item .fr-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fr-item .fr-main .link { font-size: 13px; }
.fr-item .fr-owner { font-size: 12px; color: var(--text-mute); }
.fr-item .fr-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fr-item .fr-last { font-size: 12px; color: var(--text-sub); }
.fr-tag { font-size: 11px; padding: 1px 8px; border-radius: 9px; font-weight: 600; }
.fr-tag.fr-due  { background: var(--warn-bg);  color: var(--warn); }
.fr-tag.fr-over { background: var(--danger-bg); color: var(--danger); }
.empty-state { padding: 28px 16px; text-align: center; color: var(--text-mute); font-size: 14px; background: var(--panel); border: 1px dashed var(--border); border-radius: var(--radius); }

/* 列表内跟进时间徽标 */
/* m223：全站表格日期列统一字号——此前 12px（跟进时间）/12.5px（其余日期列）混用且偏小，
   统一为 13px。DataTable 的 type:'date' 列由 ui.js 自动套 .cell-date；
   手写表格里的日期单元格也手动加 .cell-date，保证「所有表格日期一样大」。 */
.cell-date { font-size: 13px; }
.cell-followtime { font-size: 13px; }
.follow-badge { display: inline-block; margin-top: 2px; font-size: 10px; padding: 1px 6px; border-radius: 8px; font-weight: 600; }
.follow-badge.over { background: var(--danger-bg); color: var(--danger); }
.follow-badge.due  { background: var(--warn-bg);   color: var(--warn); }
.follow-badge.soon { background: var(--info-bg);   color: var(--info); }

/* m88：项目详情抽屉里的温馨提示（红色小字，列表里不再单列展示）
   旧版 m86 是在项目列表加一列，但用户反馈列太宽、与详情里的提示重复。
   改为详情抽屉底部以小字红字展示，不占列表空间。
   m88：加 proj-tip-weak（弱提示，用于"已记录原因"等非紧急提醒）。 */
.proj-tip-detail {
  margin: 10px 0 0;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--danger, #dc2626);
  background: var(--danger-bg, #fee2e2);
  border-left: 3px solid var(--danger, #dc2626);
  border-radius: 4px;
  line-height: 1.5;
}
.proj-tip-detail.proj-tip-weak {
  color: var(--muted, #6b7280);
  background: #f3f4f6;
  border-left-color: #d1d5db;
}

/* ============ m98：项目列表温馨提示列 + 待办一键筛选 ============ */
/* 列表单元格里的跟进提示：红色加粗一眼能看清；弱提示（黄单已记录原因）灰色 */
.proj-tip-cell {
  /* m163：block + nowrap 单行省略——span 是行内元素，不加 block 省略号不生效；
   * normal 换行会把行高顶得不齐，与整表对齐规则冲突（要看全文字 hover 有 title） */
  display: block;
  color: var(--danger, #dc2626);
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
}
.proj-tip-cell.weak {
  color: var(--muted, #6b7280);
  font-weight: 400;
}
/* m261：提示可点击办理——鼠标手型 + 悬停下划线，一眼看出能点 */
.proj-tip-cell.clickable { cursor: pointer; }
.proj-tip-cell.clickable:hover { text-decoration: underline; }
.proj-tip-detail.clickable { cursor: pointer; }
.proj-tip-detail.clickable:hover { filter: brightness(0.96); }
.proj-tip-detail .tip-go {
  margin-left: 6px;
  font-size: 11px;
  white-space: nowrap;
  opacity: 0.85;
}
/* 待办筛选按钮：开启时整颗变红，与列表里的红色提示呼应 */
.todo-btn .todo-n {
  background: var(--danger-bg, #fee2e2);
  color: var(--danger, #dc2626);
  border-radius: 9px;
  padding: 0 7px;
  font-size: 12px;
  margin-left: 4px;
  font-weight: 700;
}
.todo-btn .todo-n:empty { display: none; }
.todo-btn.on {
  background: var(--danger, #dc2626);
  border-color: var(--danger, #dc2626);
  color: #fff;
}
.todo-btn.on .todo-n { background: #fff; color: var(--danger, #dc2626); }

/* ============ 可访问账号 chip 标签 ============ */
.chip {
  display: inline-block;
  font-size: 11px; padding: 2px 8px;
  background: #eef5ff; color: #1d4ed8;
  border: 1px solid #c7dbff;
  border-radius: 10px;
  line-height: 1.4;
}
.ua-self { padding: 8px; background: #eef5ff; border-radius: 6px; margin-bottom: 10px; }

/* 跟进周期设置 */
.fi-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 16px; margin: 12px 0 4px; }
.fi-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.fi-row .fi-name { flex: 1; color: var(--text-sub); }

/* ============ 回收站卡片 ============ */
.bin-list { display: flex; flex-direction: column; gap: 10px; }
.bin-card { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; transition: box-shadow .15s; }
.bin-card:hover { box-shadow: 0 2px 8px rgba(16,24,40,.06); }
.bin-card-head { display: flex; align-items: center; gap: 14px; padding: 14px 18px; cursor: pointer; user-select: none; }
.bin-card-head:hover { background: #f8fafc; }
.bin-card.open .bin-card-head { background: #f8fafc; border-bottom: 1px solid var(--line); }
.bin-avatar { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg,#5b6cf2,#7a4dd1); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 16px; flex-shrink: 0; }
.bin-info { flex: 1; min-width: 0; }
.bin-name { font-size: 14px; font-weight: 600; color: var(--text); }
.bin-meta { font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.bin-count { display: flex; flex-direction: column; align-items: center; gap: 0; padding: 0 12px; border-right: 1px solid var(--line); }
.bin-count b { font-size: 22px; color: var(--danger); line-height: 1.1; }
.bin-count span { font-size: 11px; color: var(--text-mute); }
.bin-arrow { font-size: 12px; color: var(--text-mute); width: 20px; text-align: center; }
.bin-card-body { padding: 0; }
.bin-card-body.hidden { display: none; }
.bin-card-body .data-table { margin: 0; border: none; border-radius: 0; }
.bin-card-body .data-table th { background: #f3f5f9; font-size: 12px; }

.quick-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.section { margin-bottom: 20px; }
.section h3 { font-size: 14px; margin-bottom: 12px; }

/* ============ 弹窗 ============ */
.mask {
  position: fixed; inset: 0; background: rgba(16,24,40,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 500; padding: 24px; backdrop-filter: blur(2px);
}
.mask.hide { display: none; }
/* m455：下层遮罩不再变黑/模糊，避免「弹窗套弹窗」时屏幕一层比一层黑 */
.mask.lb-lower, .drawer-mask.lb-lower { background: transparent !important; backdrop-filter: none !important; }
.modal {
  background: var(--panel); border-radius: 11px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 720px; max-height: 92vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.modal.wide { max-width: 980px; }
.modal.extra-wide { max-width: 1080px; }
/* m345：.mask 原本左右各 24px 内边距，extra-wide 实际只有 100vw - 48px；
   报价单预览（纸宽 980）在普通屏幕就放不满、右侧「报价 / 眼睛」列被挤出可视区。
   这里给放 extra-wide 的遮罩收窄内边距，并把弹窗撑到「视口 - 遮罩内边距」。 */
.mask.with-wide { padding: 14px; }
.mask.with-wide > .modal.extra-wide { max-width: calc(100vw - 28px); }
.modal.narrow { max-width: 440px; }
/* m427：弹窗三段头部/身体/页脚统一收紧到「放松 12px」档
   —— 之前 head 15×20 + body 18×20 + foot 13×20，头部累计 33×40，太松 */
.modal-head {
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.modal-head h3 { font-size: 15px; font-weight: 600; flex: 1; }
.modal-head .x {
  cursor: pointer; color: var(--text-mute); font-size: 20px;
  line-height: 1; padding: 2px 6px; border-radius: 4px;
}
.modal-head .x:hover { background: #eef1f6; color: var(--text); }
.modal-body { padding: 12px 16px; overflow-y: auto; flex: 1; }
.modal-foot {
  padding: 10px 16px; border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end; background: #fcfdfe;
}
/* m454：放假设置「节日清单」—— 一行一个节日，天数 / 月份已预填，窄屏自动换行不挤 */
.hm-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; margin-bottom: 8px; font-size: 12px; }
.hm-bar label { font-weight: 600; color: var(--text); }
.hm-bar select { width: 104px; height: 28px; border: 1px solid var(--border); border-radius: 6px; padding: 0 6px;
  background: #fff; color: var(--text); font-size: 12px; outline: none; box-sizing: border-box; }
.hm-bar select:focus { border-color: var(--brand); }
.hm-tip { flex: 1 1 240px; min-width: 180px; line-height: 18px; }
.hm-rows { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.hm-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 8px; padding: 5px 8px;
  border-bottom: 1px solid #eef1f6; }
.hm-row:last-child { border-bottom: none; }
.hm-row.off { opacity: .55; }
.hm-idx { width: 20px; text-align: right; color: var(--text-sub); font-size: 12px; }
/* 注意：全局 input[type=text] 带 width:100%，必须用 .hm-row .hm-name 这种更高优先级压住 */
.hm-row .hm-name, .hm-row .hm-days, .hm-row .hm-month-sel { height: 30px; border: 1px solid var(--border);
  border-radius: 6px; background: #fff; color: var(--text); font-size: 13px; outline: none; box-sizing: border-box; }
.hm-row .hm-name { width: 120px; padding: 0 8px; }
.hm-row .hm-days { width: 62px; padding: 0 6px; text-align: right; }
.hm-row .hm-month-sel { width: 92px; padding: 0 4px; font-size: 12px; }
.hm-row .hm-name:focus, .hm-row .hm-days:focus, .hm-row .hm-month-sel:focus { border-color: var(--brand); }
.hm-unit { font-size: 12px; color: var(--text-sub); }
.hm-sum { margin-top: 8px; padding: 7px 10px; border: 1px solid #cfe1ff; background: #f2f7ff;
  border-radius: 6px; font-size: 12.5px; line-height: 22px; color: var(--text); }
.hm-sum b { color: #14508c; }
@media (max-width: 560px) { .hm-name { flex: 1 1 120px; width: auto; } }
/* m427：表单网格 gap 从 18px → 14px，分组标题 margin 砍半 */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid > * { min-width: 0; }
/* m319：编辑表单里的字段分组标题（全宽一行、紧凑，右侧一条分隔线） */
.form-grid .form-sec {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 6px;
  margin: 8px 0 2px; font-size: 12.5px; font-weight: 600; color: var(--brand);
}
.form-grid .form-sec:first-child { margin-top: 0; }
.form-grid .form-sec::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* 详情抽屉紧凑表单 */
.form-compact {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}
.form-compact .full { grid-column: 1 / -1; }
.form-compact label.fld {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 0;
  min-width: 0;
}
.form-compact label.fld > span {
  width: 92px; flex-shrink: 0;
  margin-bottom: 0; text-align: right;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 12.5px; color: var(--text-sub); font-weight: 500;
}
.form-compact label.fld > input,
.form-compact label.fld > select,
.form-compact label.fld > .ro-val {
  flex: 1 1 auto; min-width: 0; width: auto;
  padding: 7px 10px; min-height: 36px;
  font-size: 13px;
}
.form-compact label.fld > select {
  padding-right: 26px;
}
.form-compact label.fld.full {
  flex-direction: column; align-items: stretch; gap: 8px;
}
.form-compact label.fld.full > span {
  width: auto; text-align: left;
  font-size: 12px;
  color: var(--text-sub);
}
.form-compact label.fld.full > input,
.form-compact label.fld.full > select,
.form-compact label.fld.full > textarea {
  width: 100%; min-width: 0;
  padding: 8px 12px;
  font-size: 13px;
  min-height: 36px;
}
.form-compact label.fld.full > .ro-val {
  width: auto;
  display: block;
  word-break: break-word;
  padding: 9px 12px;
  min-height: 36px;
  line-height: 1.6;
}
/* ro-val 标签（只读/提示型）：自动独立成行 + 垂直布局，避免长文本撑垮网格 */
.form-compact label.fld:has(> .ro-val) {
  grid-column: 1 / -1;
  flex-direction: column; align-items: stretch; gap: 6px;
}
.form-compact label.fld:has(> .ro-val) > span {
  width: auto; text-align: left; margin-bottom: 0;
}
.form-compact label.fld.full > textarea {
  width: 100%; min-height: 120px; resize: vertical;
  line-height: 1.55; padding: 8px 10px;
}

/* 详情分组折叠 */
/* m427：表单分组折叠 margin 从 12 → 8，head 内 padding 从 12×18 → 10×14（标准档） */
.form-section {
  margin-bottom: 8px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--panel); overflow: hidden;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
  transition: box-shadow .15s;
}
.form-section:hover {
  box-shadow: 0 2px 6px rgba(16,24,40,.06);
}
.form-section-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 14px; background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  cursor: pointer; user-select: none;
  font-weight: 600; font-size: 13px; color: var(--text);
  border-bottom: 1px solid var(--border);
  letter-spacing: .2px;
}
.form-section-head:hover { background: linear-gradient(180deg, #f1f5f9 0%, #e8eef5 100%); }
.form-section-head .sec-ico {
  font-size: 11px; color: var(--text-mute);
  transition: transform .15s;
}
.form-section.collapsed .form-section-head .sec-ico { transform: rotate(-90deg); }
.form-section-body {
  padding: 14px 18px 12px;
}
.form-section.collapsed .form-section-body { display: none; }
.form-section.collapsed .form-section-head { border-bottom: 0; }

/* 客户联动只读区：2×2 网格 + 居中卡片 */
/* 关键：强制整行，不被外层 form-compact 网格切成半列 */
.cust-auto-fields {
  grid-column: 1 / -1 !important;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 10px;
  padding: 12px 14px 10px;
  margin: 8px 0 4px;
  background: linear-gradient(180deg, #f6faff 0%, #eef4fc 100%);
  border: 1px dashed var(--brand);
  border-radius: 10px;
  width: 100%;
  box-sizing: border-box;
}
/* 关键：覆盖外层 form-compact 的 :has(> .ro-val) 全行规则，强制 2 列 */
.cust-auto-fields label.fld,
.cust-auto-fields label.ca-cell,
.cust-auto-fields label.ca-cell:has(> .ro-val) {
  grid-column: auto !important;
  flex-direction: column !important;
  align-items: stretch !important;
  gap: 0 !important;
}
.cust-auto-fields .ca-cell {
  margin: 0;
  background: var(--panel);
  border: 1px solid #dde7f3;
  border-radius: 8px;
  padding: 8px 12px 9px;
  transition: border-color .15s, box-shadow .15s;
  min-width: 0;
  overflow: hidden;
}
.cust-auto-fields .ca-cell:hover {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(43,92,255,.06);
}
.cust-auto-fields .ca-cell > span {
  width: auto;
  flex-shrink: 1;
  min-width: 0;
  font-size: 12px;
  color: var(--text-sub);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 3px;
  white-space: normal;
  overflow: hidden;
  line-height: 1.4;
}
.cust-auto-fields .ca-cell > span b {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1 1 auto;
}
.cust-auto-fields .ro-val {
  color: var(--text);
  font-weight: 600;
  padding: 2px 0 0;
  background: transparent;
  border-radius: 0;
  border: 0;
  min-height: 20px;
  line-height: 1.45;
  font-size: 13.5px;
  word-break: break-word;
  overflow-wrap: anywhere;
}
.auto-tag {
  display: inline-block;
  background: var(--brand);
  color: #fff;
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: 3px;
  margin-right: 6px;
  font-weight: 500;
  vertical-align: middle;
  letter-spacing: .2px;
}

/* ---- 右侧抽屉 ---- */
.drawer-mask {
  position: fixed; inset: 0; background: rgba(16,24,40,.4);
  z-index: 400; display: flex; justify-content: flex-end;
}
.drawer-mask.hide { display: none; }
.drawer {
  width: 900px; max-width: 96vw; background: var(--panel);
  display: flex; flex-direction: column; box-shadow: var(--shadow-lg);
  animation: slideIn .22s ease;
}
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
.drawer-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: relative; }
.drawer-head h3 { font-size: 16px; font-weight: 600; position: relative; z-index: 1; }
.drawer-head .x { cursor: pointer; font-size: 22px; color: var(--text-mute); position: relative; z-index: 1; }

/* m64f：项目等级印章——放在项目标题的「左上角」（标题前面），等级按项目预算自动判定不可手填 */
.proj-watermark {
  display: inline-block; flex: none; align-self: flex-start;
  margin: -3px 12px 0 0;
  transform: rotate(-10deg);
  font-size: 21px; font-weight: 800; letter-spacing: 2px; line-height: 1.15;
  padding: 2px 11px; border: 2px solid currentColor; border-radius: 8px;
  background: rgba(255, 255, 255, .55);
  opacity: .55; pointer-events: none; user-select: none; white-space: nowrap;
}
/* m64f-2：水印占位后，标题吃掉剩余宽度并超长省略，保证右上角 × 始终贴右 */
.drawer-head > h3 {
  flex: 1 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* 等级配色：A级金 / B级蓝 / C级灰 */
.lv-A { color: #e08b00; }
.lv-B { color: #2f6fd8; }
.lv-C { color: #6e6e6e; }
/* 只读展示用的小徽章 */
.lv-badge {
  display: inline-block; padding: 1px 9px; border-radius: 10px;
  font-size: 12px; font-weight: 700; letter-spacing: .5px;
  border: 1px solid currentColor; background: rgba(255, 255, 255, .65);
}

/* m181：新片场认证徽章——绿色小标，放在客户名称右边，醒目但不占地方 */
.xpc-badge {
  display: inline-block;
  padding: 1px 7px;
  margin-left: 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #10b981, #059669);
  vertical-align: middle;
  white-space: nowrap;
  line-height: 1.5;
}
.cell-name .xpc-badge { flex-shrink: 0; }

/* m182：新片场认证迷你开关——列表/详情/表单通用 */
.xpc-sw { position: relative; display: inline-block; width: 36px; height: 20px; vertical-align: middle; cursor: pointer; }
.xpc-sw input { opacity: 0; width: 0; height: 0; position: absolute; }
.xpc-sw-track { position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: #cbd5e1; border-radius: 20px; transition: all .2s ease; }
.xpc-sw-track:before { content: ""; position: absolute; height: 14px; width: 14px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: all .2s ease; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.xpc-sw input:checked + .xpc-sw-track { background: #10b981; }
.xpc-sw input:checked + .xpc-sw-track:before { transform: translateX(16px); }
.xpc-sw-label { margin-left: 6px; font-size: 12px; font-weight: 500; vertical-align: middle; white-space: nowrap; }
.xpc-sw-label.on { color: #059669; }
.xpc-sw-label.off { color: #94a3b8; }
/* 详情/列表旧样式兼容（点击切换文字） */
.xpc-toggle { cursor: pointer; transition: opacity .15s; }
.xpc-toggle:hover { opacity: .8; }
.xpc-toggle.xpc-off {
  padding: 1px 7px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

/* combo 行内编辑器的下拉面板 */
.cell-combo-panel { z-index: 99999; box-shadow: 0 4px 16px rgba(0,0,0,.12); }

/* m181：chip 风格筛选按钮（新片场认证等快速筛选） */
.chip-btn {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  padding: 0 12px;
  height: 32px;
  font-size: 13px;
  border-radius: 16px;
  transition: all .15s;
}
.chip-btn:hover { background: #e2e8f0; }
.chip-btn.chip-active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  border-color: transparent;
  font-weight: 600;
}
.chip-btn .btn-ic { margin-right: 4px; }

/* 校验失败时行闪烁高亮 */
@keyframes kvFlash {
  0%, 100% { background: transparent; }
  50% { background: #fef3c7; border-radius: 4px; }
}
.kv-flash { animation: kvFlash 0.6s ease-in-out 2; }

.drawer-body { flex: 1; overflow-y: auto; padding: 0; }
/* m427：详情抽屉表单/页脚统一收紧到「放松 12px」档（之前 18×20 + foot 16×16，头部就吃掉 34px） */
.drawer-form { padding: 12px 16px; }
.drawer-foot { display: flex; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.ro-val { min-height: 32px; padding: 7px 10px; background: #f8fafc; border-radius: 6px; font-size: 13px; color: var(--text); word-break: normal; overflow-wrap: anywhere; }

/* m427：全站 tab 体系收紧到紧凑四档
   （之前 tab 区 padding 20px + tab-pane padding 18px，叠加后 tab 到内容空出 38px） */
.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--border); background: #fcfdfe; }
.tab {
  padding: 7px 12px; cursor: pointer; font-size: 12.5px; color: var(--text-sub);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab:hover { color: var(--text); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 500; }
/* m427：tab-pane 的 padding 从 18×20 砍到 12×16，只保留「放松」四档 */
.tab-pane { padding: 12px 16px; }
.tab-pane.hide { display: none; }

/* 项目管理页内的子 tab：列表 / 数据分析图 / 数据搜索
 * 放在内容区顶部，独立于侧边导航，让用户一眼能找到「数据分析/搜索」入口
 * m427：之前 12px 下边距 + 12px margin-bottom，折行时再叠一层自然行间 → 砍到 6px + 8px */
.proj-tabs {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px;
  padding: 0 0 6px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.proj-tabs-l { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; flex: 1 1 auto; }
/* m75：项目总数小徽章，挂在「项目列表」tab 文字右上角（替代 m68.2 的行尾 chip） */
.proj-tab-badge {
  display: inline-block; margin-left: 6px; padding: 1px 9px;
  min-width: 24px; text-align: center;
  background: #dbe7fd; color: var(--brand, #2563eb);
  border-radius: 11px; font-size: 14px; font-weight: 800;
  line-height: 21px; vertical-align: 1px;
  font-variant-numeric: tabular-nums;
}
.proj-tab.on .proj-tab-badge { background: rgba(255,255,255,.28); color: #fff; }
.proj-tab {
  padding: 7px 14px; cursor: pointer; font-size: 12.5px;
  color: var(--text-sub); background: #f4f6fa;
  border: 1px solid transparent; border-radius: 18px;
  transition: background .15s, color .15s, border-color .15s;
  user-select: none;
}
.proj-tab:hover { color: var(--text); background: #e9eef7; }
.proj-tab.on {
  color: #fff; background: var(--brand, #2563eb);
  border-color: var(--brand, #2563eb);
  font-weight: 500;
}
.proj-pane.hide { display: none; }


/* m49：修复 .proj-pane 内嵌套 .table-wrap 滚动条失灵
   根因：.proj-pane 作为 .content 的 flex 子项，未设 min-width:0，
   默认 min-width:auto 被内部 <table style="min-width:totalWidthpx"> 撑宽
   → .content(overflow:hidden) 直接裁剪右侧、不出现水平滚动条
   （用户截图：项目管理页"客户"列被截断、右侧大片空白、无滚动条）。
   解法：.proj-pane 自身变成 flex column + min-width:0，让其内部
   .table-wrap 像 .content > .table-wrap 一样 flex 撑满 + overflow 滚动。
   不设 overflow:hidden，避免裁剪 .toolbar 的负 margin（-22px 撑满宽度）。 */
.proj-pane {
  flex: 1 1 0;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
/* m59：项目管理列表页表格下方大片空白
   根因：#proj-pane-list 是 .content 的 flex 子项，再用 flex:1 撑满 viewport，
        内部 #pj-table 也 flex:1 撑满 pane。即使只 2 行数据（表格高 ~153px），
        viewport 800 下 pane 仍撑到 ~700px，表格下方留出 530px+ 一大片空白
        （用户截图：从表格右下方一块白板一直延伸到左下角版本号）。
   修复（两层防御）：
   ① #proj-pane-list 改 flex:0 0 auto + overflow:visible + max-height 限定视口，
     数据少时（2 行 ~153px）pane 跟内容走，紧贴工具栏下方；
     数据多时（≥视口 65%）pane 上限 ~520px，超出内部滚动。
   ② #pj-table flex:0 0 auto 跟内容走，max-height:100% 不撑出 pane，
     max-width:100% + width:100% 让列少时撑满 pane；列多（>容器宽）时 pj-table 内部 overflow:auto 触发横向滚动条。
   不影响 #proj-pane-chart / #proj-pane-search，这两个继续走原 flex:1 撑满（图表/搜索页确实需要）。*/
#proj-pane-list {
  flex: 0 0 auto;
  overflow: visible;     /* m60: 回归 visible —— 横向滚动让 .table-wrap 自己处理（wrap 高度有 153px，足够显示加粗的滚动条） */
  max-height: calc(100vh - 280px);
}
#proj-pane-list > #pj-table {
  flex: 0 0 auto;
  max-height: 100%;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}
.proj-pane > .table-wrap {
  flex: 1 1 0;
  min-height: 0;
  min-width: 0;
  overflow: auto;
}
/* m67：导入「字段映射确认」面板被压成 2px —— 用户点「导入项目」后毫无反应
   根因：上面 m49 的 .proj-pane > .table-wrap 是给「数据表格撑满剩余空间」设计的，
        但 #pj-mapping 也是 .proj-pane 的直接子元素且带 table-wrap class，被一起命中
        → flex:1 1 0（basis 0，可无限压缩）+ min-height:0。
        而 m59 又给 #proj-pane-list 加了 max-height:calc(100vh - 280px)，
        于是空的 #pj-mapping(basis 0) 和 #pj-table(flex:0 0 auto，实占 153px) 抢空间时全输，
        2239px 的映射表被 overflow:auto 吞掉，只剩 2px —— 功能其实跑通了，只是看不见。
   修复：所有 mapping 容器一律 flex:0 0 auto（跟内容走）+ max-height 内滚。
        用 [id$="-mapping"] 一次性覆盖全部 7 个（c/pj/pool/inv/m/f/io），防止别处复发。
   注意：必须写在 .proj-pane > .table-wrap 之后 —— 特异性同为 (0,2,0)，靠后写覆盖。 */
[id$="-mapping"].table-wrap {
  flex: 0 0 auto;
  min-height: 0;
  max-height: 40vh;
  overflow: auto;
}
/* 空的映射容器不占行（不留下 10px margin 空隙）。
   原来只有 .content > .table-wrap:empty 有这条，而 mapping 的父是 .proj-pane 等，漏网了。 */
[id$="-mapping"].table-wrap:empty { display: none; }
/* 图表面板无 .table-wrap，内容可能超长 → 兜底纵向滚动 */
#proj-pane-chart { overflow-y: auto; }

.kv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; font-size: 12.5px; margin-bottom: 16px; }
.kv-grid .full { grid-column: 1 / -1; }
.kv-grid p { display: flex; gap: 10px; align-items: flex-start; padding: 2px 0; margin: 0; }
.kv-grid b { color: var(--text-mute); white-space: nowrap; font-weight: 500; width: 92px; text-align: left; flex-shrink: 0; line-height: 1.7; }
.kv-grid span { color: var(--text); word-break: break-all; flex: 1; line-height: 1.7; }
.kv-grid .muted { filter: blur(2px); color: var(--text-mute); }
.kv-grid input, .kv-grid select, .kv-grid textarea {
  width: 100%; padding: 5px 8px; border: 1px solid var(--border); border-radius: 5px; font-size: 12.5px;
  background: var(--panel); color: var(--text);
}
.kv-grid textarea { min-height: 60px; resize: vertical; }

/* 轻量详情抽屉：两列紧凑字段列表 */
.drawer-preview { padding: 16px 20px 0; }
/* m262：项目详情操作按钮移到「基本信息」最上面（原来是底部 .drawer-foot） */
.drawer-actions {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 14px 20px 12px;
  border-bottom: 1px solid var(--border);
}
.proj-lock-note { padding: 10px 20px 0; font-size: 12px; color: var(--muted, #6b7280); line-height: 1.6; }

/* m264：合同盖章——印章预览 / 已盖章状态块 / 盖章通知弹窗 */
.seal-prev { margin-top: 8px; min-height: 70px; border: 1px dashed #cfd8dc; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; padding: 8px; background: #fafafa; }
.seal-prev img { max-height: 150px; max-width: 230px; object-fit: contain; }
.mc-seal-thumb { max-height: 34px; max-width: 70px; object-fit: contain; vertical-align: middle; }
/* m338：公司维护——三个用途 LOGO 的卡片式上传位 */
.mc-logos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mc-logo-cell { border: 1px solid #e4e7ec; border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.mc-logo-cell b { font-size: 12.5px; }
.mc-logo-prev { height: 64px; border: 1px dashed #cfd8dc; border-radius: 6px; background: #fafafa;
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.mc-logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mc-logo-btns { display: flex; gap: 6px; }
.mc-logo-cell .hint { font-size: 11.5px; color: #98a2b3; }
.proj-tip-detail.seal-block { border-color: #0b6b4f; background: #eef6f3; color: #0b6b4f; }
.proj-tip-detail.seal-block.clickable:hover { filter: brightness(0.97); }
.proj-tip-detail.seal-done .btn-link { color: #0b6b4f; margin-left: 4px; }
.seal-notice { display: flex; gap: 14px; align-items: flex-start; }
.seal-notice-ic { font-size: 30px; line-height: 1; }
.kv-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 24px;
}
/* m314（用户 2026-10-18）：「项目管理的宽度显示太宽了，导致旁边有很多空白」。
   900px 抽屉里两栏各 ~430px，绝大多数字段值很短 → 每行右侧留一大片空白。
   kv-3col：三栏密排，每栏 ~277px，值紧贴标签、右栏不再空。窄屏自动降两栏 / 一栏。 */
.kv-list.kv-3col { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 20px; }
.kv-list.kv-3col .kv-row b { width: 82px; }
/* 概览 / 我的提成 / 已定演员这些汇总行整行铺满，三栏下不被挤成 1/3 宽 */
.kv-list.kv-3col .kv-summary { grid-column: 1 / -1; }
/* 断点跟抽屉宽度走（.drawer 固定 900px、窄屏 96vw）：≥901px 视口 = 900px 抽屉 → 三栏最高密度 */
@media (max-width: 900px) { .kv-list.kv-3col { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .kv-list.kv-3col { grid-template-columns: minmax(0, 1fr); } }
.kv-row {
  display: flex; align-items: flex-start; gap: 10px;
  min-height: 26px; font-size: 12.5px;
}
.kv-row b {
  width: 90px; flex-shrink: 0;
  color: var(--text-sub); font-weight: 500;
  text-align: right; line-height: 1.65;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.kv-row b i { color: var(--danger); font-style: normal; }
.kv-row span {
  flex: 1; min-width: 0;
  color: var(--text); line-height: 1.65;
  word-break: break-all;
}
.kv-row.kv-empty span { color: var(--text-mute); }
/* m369（用户「基本信息姓名字段右边显示拼音，比如 王博 Wang Bo」）：姓名右侧的拼音，灰字不抢眼 */
.kv-row .kv-py { flex: 0 0 auto; margin-left: -4px; color: #98a2b3; font-size: 12px; letter-spacing: .2px; }
.kv-row.span2 { grid-column: 1 / -1; }
.kv-row span.kv-editable {
  cursor: pointer;
  border-bottom: 1px dashed var(--border-dark);
  padding: 1px 4px; margin: -1px -4px;
  border-radius: 4px;
  transition: background .12s, border-color .12s;
}
.kv-row span.kv-editable:hover {
  background: var(--brand-light);
  border-bottom-color: var(--brand);
}

/* m201：长文本折叠 —— 通告/备注/开票信息等超长字段默认只显示 4 行 + 「展开全文 ▾」。
   不折叠时高度不封顶（detail 抽屉里通告上千字会把整行撑到屏幕外，用户 2026-10-01 截图反馈）。
   max-height 用 em：折叠高度固定 4 行，跟字号无关（6.6em = 4 × 1.65 行高）。 */
.lt-wrap { display: block; }
.lt-wrap .lt-body {
  display: block;
  white-space: pre-wrap;   /* 通告常是分条写的，保留换行 */
  line-height: 1.65;
}
.lt-wrap.is-collapsed .lt-body {
  max-height: 6.6em;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(180deg, #000 62%, transparent);
  mask-image: linear-gradient(180deg, #000 62%, transparent);
}
.lt-wrap .lt-toggle {
  flex: none; display: inline-block; width: auto;
  margin-top: 3px; font-size: 12px; line-height: 1.4;
  color: var(--brand); cursor: pointer; user-select: none; white-space: nowrap;
}
.lt-wrap .lt-toggle:hover { text-decoration: underline; }

/* 表格单元格文本摘要 */
.cell-text {
  display: inline-block;
  max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  vertical-align: middle;
}

/* 跟进时间轴 */
.timeline { position: relative; padding-left: 20px; }
.timeline::before {
  content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px;
  width: 2px; background: var(--border);
}
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before {
  content: ''; position: absolute; left: -18px; top: 5px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--brand); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--brand-light);
}
.tl-date { color: var(--text-mute); font-size: 11.5px; margin-right: 6px; }

/* ---- AI 面板 ---- */
.hint { font-size: 12px; color: var(--text-sub); line-height: 1.6; margin: 8px 0; }
.dim { opacity: .5; }

/* ---- 提示条 ---- */
.toast-wrap {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 900; display: flex; flex-direction: column; gap: 8px; align-items: center;
}
.toast {
  background: #101828; color: #fff; padding: 9px 17px; border-radius: 7px;
  font-size: 12.5px; box-shadow: var(--shadow-lg);
  animation: pop .2s ease; display: flex; align-items: center; gap: 7px;
}
.toast.ok  { background: #0d8a52; }
.toast.warn { background: #d97706; }
.toast.err { background: #d92d20; }
/* m427b：toast 带「撤销」按钮的样式 */
.toast-undoable .toast-undo-wrap {
  display: inline-flex; align-items: center; gap: 4px; margin-left: 6px;
}
.toast-undo {
  background: rgba(255,255,255,.22); border: 0; color: #fff;
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 4px;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  transition: background .15s, opacity .15s;
}
.toast-undo:hover { background: rgba(255,255,255,.35); }
.toast-undo.disabled, .toast-undo:disabled {
  background: rgba(255,255,255,.1); opacity: .55; cursor: default;
}
.toast-undo-cd {
  font-size: 11px; color: rgba(255,255,255,.85); min-width: 18px; text-align: right;
  font-variant-numeric: tabular-nums;
}
@keyframes pop { from { opacity: 0; transform: translateY(-9px); } to { opacity: 1; transform: none; } }

/* 导入导出 */
.io-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.io-grid input[type=file] { margin: 10px 0; font-size: 12px; }
.io-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 设置 */
/* m427：紧凑四档：4=微间距 / 8=标准 / 12=放松 / 16=宽松 */
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); gap: 8px; }
/* m52：grid 子项必须 min-width:0，否则内部 max-content 表格会把 grid 列撑爆、
   内容溢出卡片边界（flex/grid 子项默认 min-width:auto 的血泪教训） */
.set-grid > .card { min-width: 0; }
/* m52：公海认领规则卡内部表格较宽（姓名+部门+上限列），与其他卡不同必须占满整行；
   超宽时出横向滚动条，绝不再溢出卡片边界 */
#sec-claim { grid-column: 1 / -1; overflow-x: auto; }
.set-grid .card label.check { display: flex; margin-bottom: 10px; }

/* m174：系统设置里的大开关（toggle switch），比默认 checkbox 好看 */
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; background: var(--bg, #f8fafc); border-radius: 8px; margin-bottom: 10px; }
.switch-row .switch-label { font-size: 14px; font-weight: 500; color: var(--text); }
.switch-row .switch-desc { font-size: 12px; color: var(--text-sub); margin-top: 2px; }
.switch { position: relative; display: inline-block; width: 48px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #cbd5e1; border-radius: 26px; transition: all .2s ease; }
.switch-slider:before { position: absolute; content: ""; height: 20px; width: 20px; left: 3px; bottom: 3px; background-color: white; border-radius: 50%; transition: all .2s ease; box-shadow: 0 2px 4px rgba(0,0,0,.2); }
.switch input:checked + .switch-slider { background-color: var(--brand, #2563eb); }
.switch input:checked + .switch-slider:before { transform: translateX(22px); }
.switch input:focus + .switch-slider { box-shadow: 0 0 0 3px rgba(37, 99, 235, .2); }
/* m176：开关状态徽标 —— 用户反馈「灰 toggle 到底是开还是关看不出来」，必须明说 */
.switch-state { display: inline-block; margin-left: 8px; padding: 1px 10px; border-radius: 10px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.switch-state.on { background: #dcfce7; color: #15803d; }
.switch-state.off { background: #fee2e2; color: #b91c1c; }
.set-header { background: linear-gradient(135deg, #f6faff 0%, #eef4fc 100%); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-bottom: 10px; }
.set-header h3 { font-size: 17px; margin: 0 0 2px; color: var(--text); }
.set-header p { font-size: 12px; color: var(--text-sub); margin: 0 0 6px; }
/* m427：flex-wrap 折行时 align-content 默认 stretch 产生 16-20px 行间空白 ——
   显式 flex-start 让每行按自然高度叠，行间距只靠 gap 控制 */
.set-anchor { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 4px; }
.set-anchor a { font-size: 12px; padding: 4px 10px; border-radius: 14px; background: #fff; border: 1px solid var(--border); color: var(--text-sub); text-decoration: none; transition: all .15s; }
.set-anchor a:hover { color: var(--brand); border-color: var(--brand); background: #f0f7ff; }
.claim-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.claim-label { font-size: 13px; color: var(--text-sub); white-space: nowrap; }
.claim-num { width: 80px; padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px; }
#sec-claim label.fi-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
#sec-claim label.fi-row .fi-name { white-space: nowrap; min-width: 130px; }
#sec-claim label.fi-row input[type="number"] { width: 72px; flex: none; }
.kpi-inline { display: flex; gap: 16px; align-items: center; }
.kpi-inline b { color: var(--brand); font-size: 15px; }

/* 字段配置面板 */
.col-config-panel {
  position: absolute; top: 38px; right: 0;
  width: 260px; max-height: 420px; overflow-y: auto;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  z-index: 200; padding: 12px;
}
.col-config-panel .cfg-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; font-weight: 600; }
.col-config-panel .cfg-item {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 6px;
  border: 1px solid transparent;
  user-select: none;
  cursor: grab;
}
.col-config-panel .cfg-item:hover { background: #f8fafc; border-color: var(--border); }
.col-config-panel .cfg-item.dragging { opacity: .4; }
.col-config-panel .cfg-item:active { cursor: grabbing; }
.col-config-panel .cfg-item .drag-ico {
  color: var(--text-mute); cursor: inherit;
  font-size: 16px; padding: 4px 8px; border-radius: 4px; line-height: 1;
  background: #f1f3f7; border: 1px solid var(--border);
  user-select: none;
}
.col-config-panel .cfg-item .drag-ico:hover { background: #e3e8ef; color: var(--text); border-color: var(--text-mute); }
.col-config-panel .cfg-item .drag-ico:active { cursor: grabbing; background: #d6dce6; }
.col-config-panel label.check { margin: 0; display: flex; flex: 1; cursor: pointer; }
.col-config-panel .cfg-foot {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 12px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.col-config-panel .cfg-foot .btn { flex: 1; min-width: 80px; }
.col-config-wrap { position: relative; display: inline-block; }

/* 滚动条 */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cdd5e0; border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #adb8c9; }

.muted { color: var(--text-mute); }

/* 打印 */
@media print {
  .sidebar, .topbar, .toolbar, .btn { display: none !important; }
  .main { margin-left: 0; }
}

/* ============ 图表 ============ */
.chart-wrap { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; }
.chart-row { display: flex; align-items: center; gap: 10px; margin: 8px 0; font-size: 12.5px; }
.chart-label { width: 110px; color: var(--text-sub); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-bar { height: 18px; background: linear-gradient(90deg, var(--brand), #6b9fff); border-radius: 3px; min-width: 4px; transition: width .3s ease; }
.chart-val { width: 36px; text-align: right; color: var(--text); font-weight: 500; }
.line-chart { display: flex; align-items: flex-end; gap: 8px; height: 160px; padding-bottom: 24px; }
.line-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.line-bar { width: 70%; background: var(--brand); border-radius: 3px 3px 0 0; min-height: 4px; transition: height .3s ease; }
.line-x { font-size: 11px; color: var(--text-sub); transform: rotate(-35deg); transform-origin: left top; white-space: nowrap; }

/* ============ 发票 ============ */
.invoice-file { display: flex; align-items: center; gap: 8px; color: var(--brand); cursor: pointer; }
.invoice-file:hover { text-decoration: underline; }

/* ============ 资料端 / 收集表 ============ */
.form-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.form-card { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow-sm); transition: box-shadow .2s; }
.form-card:hover { box-shadow: var(--shadow); }
.form-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 8px; }
.form-card-head h4 { margin: 0; font-size: 15px; line-height: 1.4; }
.form-card-desc { color: var(--text-sub); font-size: 13px; margin: 0 0 12px; min-height: 18px; }
.form-card-meta { display: flex; gap: 14px; font-size: 12px; color: var(--text-mute); margin-bottom: 12px; }
.form-card-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.form-designer { display: grid; grid-template-columns: 160px 1fr 240px; gap: 16px; min-height: 60vh; }
.fd-sidebar, .fd-props { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px; }
.fd-main { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; }
.fd-title { font-weight: 600; margin-bottom: 12px; color: var(--text); }
.fd-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fd-tool { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); cursor: pointer; font-size: 12px; color: var(--text-sub); transition: all .15s; }
.fd-tool:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }
.fd-tool span { font-size: 15px; color: var(--brand); }
.fd-form-head { margin-bottom: 16px; }
.fd-head-input { width: 100%; font-size: 18px; font-weight: 600; border: none; border-bottom: 1px solid var(--border); background: transparent; padding: 8px 0; margin-bottom: 8px; }
.fd-head-input:focus { outline: none; border-bottom-color: var(--brand); }
.fd-head-area { width: 100%; border: none; background: transparent; resize: none; min-height: 40px; font-size: 13px; color: var(--text-sub); }
.fd-head-area:focus { outline: none; }
.fd-fields { display: flex; flex-direction: column; gap: 10px; }
.fd-empty-hint { text-align: center; color: var(--text-mute); padding: 40px 0; }
.fd-field { display: flex; gap: 10px; padding: 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel); cursor: pointer; transition: border-color .15s; }
.fd-field:hover, .fd-field.active { border-color: var(--brand); }
.fd-field-idx { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; background: var(--brand-light); color: var(--brand); border-radius: 50%; font-size: 11px; flex-shrink: 0; }
.fd-field-body { flex: 1; min-width: 0; }
.fd-field-title { font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.fd-field-title .required { color: var(--danger); }
/* m134：题型切换 chip（点击弹菜单换题型） */
.fd-type-chip { display: inline-flex; align-items: center; font-size: 11px; font-weight: 600; color: var(--brand); background: var(--bg); border: 1px solid var(--border); padding: 2px 8px; border-radius: 999px; cursor: pointer; margin-right: 6px; user-select: none; white-space: nowrap; vertical-align: 1px; }
.fd-type-chip:hover { border-color: var(--brand); }
.fd-field-preview input, .fd-field-preview textarea, .fd-field-preview select { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: #fff; }
.fd-field-preview textarea { min-height: 54px; resize: vertical; }
.fd-field-preview .fd-preview-opt { display: flex; align-items: center; gap: 6px; padding: 4px 0; font-size: 13px; color: var(--text-sub); }
.fd-field-preview .fd-preview-upload { border: 1px dashed var(--border); border-radius: 6px; padding: 14px; text-align: center; color: var(--text-sub); font-size: 13px; background: var(--bg); }
.fd-field-preview .fd-preview-sign { border: 1px solid var(--border); border-radius: 6px; padding: 14px; text-align: center; color: var(--text-sub); font-size: 13px; }
.fd-field-actions { display: flex; flex-direction: column; gap: 4px; opacity: 0; transition: opacity .15s; }
.fd-field:hover .fd-field-actions { opacity: 1; }
.fd-field-actions button { width: 26px; height: 26px; padding: 0; }

.fd-prop { display: block; margin-bottom: 14px; }
.fd-prop span { display: block; font-size: 12px; color: var(--text-sub); margin-bottom: 4px; }
.fd-prop input[type="text"], .fd-prop input[type="number"], .fd-prop textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.fd-prop-check { display: flex; align-items: center; gap: 6px; }
.fd-prop-check span { display: inline; margin: 0; }

/* m118 设计器：外观/权限设置区 */
.fd-section { border: 1px solid var(--border); border-radius: 8px; margin-top: 10px; background: var(--bg); }
.fd-section summary { cursor: pointer; padding: 10px 12px; font-size: 13px; font-weight: 600; color: var(--text); user-select: none; }
.fd-section-body { padding: 4px 12px 12px; }
.fd-header-wrap { border: 1px dashed var(--border); border-radius: 8px; padding: 8px; text-align: center; background: var(--panel); min-height: 40px; display: flex; align-items: center; justify-content: center; }
.fd-header-img { max-width: 100%; max-height: 120px; border-radius: 6px; display: block; }
.fd-acl-head, .fd-acl-row { display: grid; grid-template-columns: 1fr 70px 90px; align-items: center; gap: 6px; padding: 6px 0; font-size: 13px; }
.fd-acl-head { color: var(--text-sub); font-size: 12px; border-bottom: 1px solid var(--border); }
.fd-acl-row { border-bottom: 1px solid var(--border); }
.fd-acl-row:last-of-type { border-bottom: none; }
.fd-acl-row input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--brand); justify-self: center; }
.fd-acl-name { color: var(--text); }
.fd-hint { font-size: 12px; color: var(--text-mute); margin: 6px 0 0; }
.fd-options { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.fd-option { display: flex; gap: 6px; }
.fd-option input { flex: 1; }

.form-data-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }

/* ===== m119：收集表页面化（设计器页签 / 权限 chip / 数据页 / 简历页 / 卡片优化） ===== */
/* 设计器顶部工具条 + 页签（参考 WPS 表单编辑器：页签在顶部，外观/权限不再挤中间栏） */
.fd-page-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 14px; position: sticky; top: 0; z-index: 5; }
.fd-tabs { display: flex; gap: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.fd-tab { border: none; background: transparent; padding: 7px 16px; border-radius: 999px; font-size: 13px; cursor: pointer; color: var(--text-sub); white-space: nowrap; font-family: inherit; }
.fd-tab:hover { color: var(--brand); }
.fd-tab.on { background: var(--brand); color: #fff; font-weight: 600; }
.fd-set-panel { max-width: 860px; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; }
.fd-set-title { margin: 0 0 14px; font-size: 15px; color: var(--text); }
/* 权限设置：chip 卡片式（姓名横排，角色按钮一眼看清） */
.fd-acl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-top: 12px; }
.fd-acl-chip { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--bg); }
.fd-acl-chip.on { border-color: var(--brand); background: var(--brand-light); }
.fd-acl-chip-name { display: block; font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; margin-bottom: 8px; }
.fd-acl-chip-btns { display: flex; gap: 6px; }
.fd-acl-btn { flex: 1; border: 1px solid var(--border); background: var(--panel); border-radius: 6px; font-size: 12px; padding: 5px 0; cursor: pointer; color: var(--text-sub); white-space: nowrap; font-family: inherit; transition: background .15s, color .15s, border-color .15s; }
.fd-acl-btn:hover { border-color: var(--brand); color: var(--brand); }
/* m4xx：三种角色选中态统一（管理员/查看员/登记员），都用品牌色实底 + 对勾，避免
   ① 登记员漏写选中样式 → 点了完全没反应；② 查看员用天蓝色、管理员用品牌色 → 同一组按钮三种长相。 */
.fd-acl-btn.on-a,
.fd-acl-btn.on-v,
.fd-acl-btn.on-s { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.fd-acl-btn.on-a::before,
.fd-acl-btn.on-v::before,
.fd-acl-btn.on-s::before { content: '✓ '; font-size: 11px; }
.fd-acl-btn.on-a:hover,
.fd-acl-btn.on-v:hover,
.fd-acl-btn.on-s:hover { color: #fff; }
/* m359：按部门授权（主入口）+ 单独员工（可折叠） */
.fd-acl-sub { margin: 18px 0 8px; font-size: 13px; color: var(--text); display: flex; align-items: baseline; gap: 8px; }
.fd-acl-sub small { font-weight: 400; font-size: 12px; color: var(--text-mute); }
.fd-acl-sub-toggle { cursor: pointer; user-select: none; }
.fd-acl-sub-toggle:hover span { color: var(--brand); }
.fd-acl-depts { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.fd-acl-dept { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; background: var(--bg); }
.fd-acl-dept.on { border-color: var(--brand); background: var(--brand-light); }
.fd-acl-dept-name { flex: 0 0 92px; font-size: 13px; font-weight: 600; color: var(--text); display: flex; flex-direction: column; min-width: 0; }
.fd-acl-dept-name small { font-weight: 400; font-size: 11px; color: var(--text-mute); }
.fd-acl-chip-name small { display: block; font-weight: 400; font-size: 11px; color: var(--text-mute); }
/* 数据页 */
.fdata-count { font-weight: 600; color: var(--text); white-space: nowrap; }
/* 简历页：内容自适应，免内部滚动条（整页滚动） */
/* m120：简历/详情页无法下滑修复 —— .content 全局 overflow:hidden（表格页架构），
   这两个包裹层必须自己成为滚动容器（同 .table-wrap 模式：flex:1 + min-height:0 + overflow auto）。
   短内容不出滚动条，长内容整页可滚。 */
.resume-page-wrap { background: #f5f7fa; padding: 24px; border-radius: var(--radius); flex: 1 1 0; min-height: 0; overflow-y: auto; }
.resume-a4.onpage { width: min(880px, 100%); min-height: auto; padding: 36px 40px; margin: 0 auto; }
.resume-photo-ph { width: 115px; height: 155px; border-radius: 4px; border: 1px dashed #cbd5e1; background: #f8fafc; color: #94a3b8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 12px; flex-shrink: 0; }
.record-page-wrap { max-width: 860px; margin: 0 auto; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; flex: 0 1 auto; min-height: 0; max-height: 100%; overflow-y: auto; }
/* 卡片：状态左边条 + 标签组 + 按钮不折字 */
.form-card { border-left: 4px solid transparent; }
.form-card.st-pub { border-left-color: #16a34a; }
.form-card.st-draft { border-left-color: #cbd5e1; }
.form-card-tags { display: flex; gap: 6px; flex-shrink: 0; }
.form-card-actions .btn { white-space: nowrap; }

@media (max-width: 900px) {
  .form-designer { grid-template-columns: 1fr; }
  .fd-sidebar, .fd-props { order: 1; }
  .fd-main { order: 0; }
}

/* 照片预览独立覆盖层（不替换当前 Modal） */
.photo-preview-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.72); display: flex; align-items: center; justify-content: center; z-index: 3000; padding: 20px; }
.photo-preview-box { background: var(--panel); border-radius: var(--radius); max-width: 92vw; max-height: 92vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,.35); overflow: hidden; }
.photo-preview-head { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); font-weight: 600; }
.photo-preview-head .x { cursor: pointer; font-size: 22px; line-height: 1; color: var(--text-sub); }
.photo-preview-head .x:hover { color: var(--danger); }
.photo-preview-body { padding: 10px; overflow: auto; display: flex; align-items: center; justify-content: center; }
.photo-preview-body img { max-width: 88vw; max-height: 78vh; border-radius: 8px; object-fit: contain; }

/* 模卡/照片字段：缩略图列表 */
.photo-preview-list { display: flex; flex-wrap: wrap; gap: 10px; }
.photo-preview-thumb { position: relative; width: 96px; height: 96px; border-radius: 8px; overflow: hidden; border: 1px solid var(--border); background: #f1f3f7; }
.photo-preview-thumb img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }

/* ---------- 收集表简历视图 ---------- */
.resume-preview-wrap { max-height: 70vh; overflow: auto; background: #f5f7fa; padding: 24px; text-align: center; }
/* m123：按用户提供的 个人简历.docx（稻壳儿深蓝模板）重做视觉——
   姓名大号深蓝 #253d76、分区标题深蓝圆角条白字、正文灰 #666、照片 3:4、字体微软雅黑。
   结构类名与分桶（resume-items/full/wide/resume-photo-ph）保持不变，仅换视觉令牌。 */
.resume-a4 { width: 210mm; min-height: 297mm; margin: 0 auto; padding: 24mm 18mm; box-sizing: border-box; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.08); text-align: left; font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", sans-serif; color: #666; }
.resume-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 22px; border-bottom: 2px solid #253d76; padding-bottom: 16px; }
.resume-head-info h2 { margin: 0; font-size: 38px; font-weight: 700; color: #253d76; letter-spacing: 3px; }
.resume-position { margin: 10px 0 0; color: #525252; font-size: 16px; }
/* m355：简历模板的联系栏——姓名下面一行「性别 | 出生年月 | 学历 | 电话 | 微信 | 长期坐标」 */
.resume-meta { margin: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 13px; color: #525252; }
.resume-meta i { color: #cbd5e1; font-style: normal; }
.resume-meta .resume-value { font-size: 13px; color: #525252; display: inline; }
.resume-photo { width: 115px; height: 155px; object-fit: cover; border-radius: 4px; border: 1px solid #e5e7eb; background: #f1f3f7; flex-shrink: 0; }
.resume-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.resume-section { margin-bottom: 22px; }
.resume-section h4 { display: inline-block; margin: 0 0 12px; font-size: 16px; font-weight: 700; color: #fff; background: #253d76; border-radius: 999px; padding: 6px 22px; letter-spacing: 1px; }
.resume-section h4 .rst-ico { margin-right: 6px; font-size: 15px; }
/* m120 BOSS 直聘风：短字段 label:value 同行多列平铺；长文本 .full 整宽通栏 */
.resume-items { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px 24px; }
/* m123：基本信息/联系方式按模板固定两列（docx 模板的两列信息表） */
.resume-items.cols2 { grid-template-columns: repeat(2, 1fr); }
.resume-item { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.resume-item.full { grid-column: 1 / -1; display: block; }
/* m121：长问题短答案独占一行（标签+值同行），且标签允许收缩换行——任何字段都不可能再溢出重叠 */
.resume-item.wide { grid-column: 1 / -1; }
.resume-label { font-size: 12.5px; color: #888; flex: 0 1 auto; min-width: 0; overflow-wrap: break-word; }
/* m123：通栏字段的标签 = 模板的「粗体小标题」（深蓝加粗），正文灰 #666 */
.resume-item.full .resume-label { display: block; margin-bottom: 4px; font-weight: 700; color: #253d76; font-size: 13px; }
.resume-value { font-size: 13.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-all; color: #666; min-width: 0; }
.resume-value a { color: #253d76; }
.resume-img { max-width: 100%; max-height: 120px; border-radius: 6px; border: 1px solid #e5e7eb; }
.resume-foot { margin-top: 30px; padding-top: 12px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-mute); text-align: center; }
@media (max-width: 760px) {
  .resume-grid { grid-template-columns: 1fr; }
  .resume-a4 { width: auto; min-height: auto; padding: 20px; }
}
@media print {
  .resume-preview-wrap { background: #fff; padding: 0; max-height: none; overflow: visible; }
  .resume-a4 { box-shadow: none; width: auto; min-height: auto; padding: 0; }
}
.photo-preview-del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55); color: #fff; border-radius: 50%; font-size: 16px; cursor: pointer; line-height: 1; }
.photo-preview-del:hover { background: var(--danger); }
.photos-field textarea { display: none; }

/* OCR 识别状态提示 */
.ocr-status-box { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 8px; padding: 10px 12px; color: #166534; }
.ocr-status-ok { display: block; font-weight: 600; margin-bottom: 6px; }
.ocr-status-items { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; }
.ocr-status-items span { background: #fff; border: 1px solid #bbf7d0; border-radius: 12px; padding: 2px 10px; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* ============ 员工账号管理表格 ============ */
/* m427：staff 链之前是 help 10px 上 + 12px 下 + toolbar 10px 下 + 搜索框 + toolbar 10px 下
   层层叠叠贡献 ~42px 视觉空白，现在统一按「标准 8px」控制 */
.staff-help {
  background: var(--brand-light);
  border: 1px solid #c7dbff;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-sub);
  line-height: 1.6;
  margin-bottom: 8px;
}
.staff-help b { color: var(--brand-dark); }
/* m427：提示条的内联 style（padding:10px;margin-bottom:10px）用 !important 压成 6px
   —— 它是 staff-toolbar 的 inline 变体，保留视觉层次但去掉冗余空白 */
.staff-toolbar[style*="padding:10px"],
.staff-toolbar[style*="padding: 10px"] {
  padding: 6px 10px !important;
  margin-bottom: 6px !important;
}
.staff-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.staff-search-input {
  flex: 1;
  max-width: 260px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.staff-search-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(43,92,255,.1);
}
.staff-table-wrap {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
}
.staff-table { margin: 0; border: none; }
.staff-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-sub);
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.staff-table tbody td {
  padding: 6px 10px;
  border-bottom: 1px solid #f0f3f8;
  vertical-align: middle;
  white-space: nowrap;
}
.staff-table tbody tr:last-child td { border-bottom: none; }
.staff-table tbody tr:hover { background: #f8fafc; }
/* 新建员工行高亮闪烁（创建后 2.4 秒内可见） */
.staff-table tbody tr.staff-row-new {
  animation: staff-row-flash 1.2s ease-in-out 0s 2;
  background: linear-gradient(90deg, #fff7e6, #ffe0a6 50%, #fff7e6);
}
@keyframes staff-row-flash {
  0%   { background: #ffe0a6; transform: scale(1.005); }
  50%  { background: #fff7e6; transform: scale(1.0); }
  100% { background: transparent; transform: scale(1.0); }
}
.avatar-xs {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5b6cf2, #7a4dd1);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}
.dept-chips {
  display: inline-flex;
  gap: 4px;
  flex-wrap: wrap;
}
.dept-chip {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #f2f4f8;
  color: var(--text-mute);
  cursor: pointer;
  user-select: none;
  transition: all .12s;
  line-height: 1.5;
}
.dept-chip:hover { border-color: var(--brand); color: var(--brand); }
.dept-chip.on {
  background: var(--brand-light);
  border-color: var(--brand);
  color: var(--brand-dark);
  font-weight: 500;
}
.au-cell {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  max-width: 160px;
}
.au-cell:hover .btn-link { text-decoration: underline; }
.btn-link {
  color: var(--brand);
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}
/* 员工表登录账号/密码列 */
.login-cell { white-space: nowrap; }
.login-cell .login-acc {
  font-weight: 600; font-size: 12px; margin-right: 6px;
}
.login-cell .login-pwd {
  font-family: Consolas, monospace; font-size: 12px; color: #667085;
  margin-right: 4px; letter-spacing: 1px;
}
.login-cell .btn-sm { padding: 2px 6px; font-size: 11px; margin-right: 3px; }
.staff-table .inline-edit:focus {
  outline: none;
  background: #fff;
}

/* ============ 公司账号选择卡片 ============ */
.company-acct-list { display: flex; flex-direction: column; gap: 10px; }
.company-acct-card {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px;
  border: 1px solid var(--border); border-radius: 10px; cursor: pointer;
  background: var(--panel); transition: all .15s ease;
}
.company-acct-card:hover { border-color: var(--brand); background: var(--brand-light); transform: translateY(-1px); }
.company-acct-logo { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.company-acct-logo.placeholder {
  display: flex; align-items: center; justify-content: center;
  background: var(--brand); color: #fff; font-size: 20px; font-weight: 700;
}
.company-acct-info { flex: 1; min-width: 0; }
.company-acct-name { font-size: 16px; font-weight: 600; color: var(--text); }
.company-acct-meta { font-size: 12px; color: var(--text-mute); margin-top: 2px; }
.company-acct-arrow { color: var(--brand); font-size: 18px; flex-shrink: 0; }

/* ============ 今日数据变动区块 ============ */
.today-changes { margin-top: 4px; }
.today-changes-summary { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.today-change-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border-radius: 20px; background: var(--brand-light); border: 1px solid var(--border);
  font-size: 13px; cursor: pointer; transition: all .15s ease;
}
.today-change-chip:hover { background: var(--brand); color: #fff; }
.today-change-chip .tcc-name { font-weight: 600; }
.today-change-chip .tcc-count { background: var(--brand); color: #fff; border-radius: 10px; padding: 1px 8px; font-size: 12px; }
.today-change-chip:hover .tcc-count { background: #fff; color: var(--brand); }
.today-change-detail {
  margin-top: 8px; padding: 12px 14px; background: var(--panel);
  border: 1px solid var(--border); border-radius: 8px; display: none;
}
.today-change-detail.show { display: block; }
.today-change-detail table { width: 100%; font-size: 13px; table-layout: fixed; }
.today-change-detail th { text-align: left; padding: 4px 8px; color: var(--text-mute); font-weight: 500; border-bottom: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-change-detail td { padding: 4px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.today-change-detail tr:last-child td { border-bottom: none; }
.tcd-field-change { color: var(--text-mute); }
.tcd-field-change b { color: var(--text); }
.tcd-arrow { color: var(--brand); margin: 0 4px; }

/* ============ 公司账号管理 ============ */
.ca-logo {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  object-fit: cover;
  display: inline-block;
  flex-shrink: 0;
  background: #eef1f6;
}
.ca-users { max-width: 260px; }
.ca-row td .chip { margin: 1px 2px; }
.ca-contact-main { line-height: 1.4; font-size: 13px; }
.ca-contact-sub { font-size: 11px; color: var(--text-mute); margin-top: 2px; }

/* 微信账号分类筛选条 */
.ca-filter-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ca-filter-tabs { display: flex; gap: 6px; }
.ca-tab { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 5px 14px; font-size: 13px; cursor: pointer; transition: all .15s; color: var(--text-sub); }
.ca-tab:hover { color: var(--brand); border-color: var(--brand); }
.ca-tab.on { background: var(--brand); color: #fff; border-color: var(--brand); font-weight: 600; }
.ca-tab-num { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 4px; border-radius: 9px; background: rgba(255,255,255,.25); color: inherit; font-size: 11px; line-height: 16px; text-align: center; }
.ca-tab:not(.on) .ca-tab-num { background: #f0f4f8; color: var(--text-mute); }
.ca-toolbar-right { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ca-cat-badge { display: inline-block; padding: 3px 10px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.ca-cat-biz { background: #e8f4fd; color: #1976d2; }
.ca-cat-cast { background: #f3e8ff; color: #7b1fa2; }
.ua-group-title { font-size: 12px; color: var(--text-sub); font-weight: 600; margin: 10px 0 6px; }
.ca-form-logo { margin-bottom: 14px; }
.ca-logo-label { display: block; font-size: 12px; color: var(--text-sub); margin-bottom: 6px; }
.ca-logo-box { display: flex; align-items: center; gap: 14px; }
.ca-logo-preview {
  width: 64px; height: 64px; border-radius: 10px;
  border: 1px dashed var(--border); background: #f6f8fc;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 12px; color: var(--text-mute); flex-shrink: 0;
}
.ca-logo-lg {
  width: 100%; height: 100%; object-fit: cover; border-radius: 10px;
}
.ca-form-fields .fld { display: block; margin-bottom: 12px; }
.ca-form-fields .fld > span { display: block; font-size: 12px; color: var(--text-sub); margin-bottom: 5px; }
.ca-form-fields .fld > span .req { color: var(--danger, #e23); font-style: normal; }
.ca-form-fields input[type=text],
.ca-form-fields textarea {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.ca-form-fields input[type=text]:focus,
.ca-form-fields textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(43,92,255,.1);
}
.ua-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.ua-grid .check { font-size: 13px; }


/* ============ 需求 L：客户关联摘要框 ============ */
.cust-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  padding: 10px 14px;
  margin: 6px 0 10px;
  background: linear-gradient(135deg, #f6f9ff, #eef3ff);
  border: 1px solid #d8e2ff;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
}
.cust-summary .cs-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.cust-summary .cs-item b {
  color: var(--text-sub);
  font-weight: 500;
}
.cust-summary .cs-item span {
  color: var(--brand, #2b5cff);
  font-weight: 600;
  font-size: 14px;
}
.kv-summary {
  background: linear-gradient(135deg, #f6f9ff, #eef3ff);
  border-left: 3px solid var(--brand, #2b5cff);
  padding: 10px 14px;
  margin: 8px 0;
  border-radius: 0 6px 6px 0;
}
.kv-summary b {
  color: var(--text-sub);
  font-weight: 500;
}
/* m66：项目归属人的「我的提成」金条——比 kv-summary 更醒目，金额用品牌色加粗放大 */
.kv-my-comm {
  background: linear-gradient(135deg, #fff8e6, #fff3d1);
  border-left: 3px solid #e8a93b;
  padding: 12px 14px;
  margin: 8px 0;
  border-radius: 0 6px 6px 0;
  grid-column: 1 / -1;
}
.kv-my-comm b { color: var(--text-sub); font-weight: 500; }
.kv-my-comm .muted { color: var(--text-mute); }
.ro-val.muted {
  color: var(--text-sub);
  font-style: italic;
  padding: 6px 10px;
  background: #f5f7fa;
  border-radius: 4px;
}
.hide-text {
  display: none;
}

/* ==========================================================
 * m33 — 辅助列重做（字典维护 + 字段管理一体化） + 公司管理 + 导入提示
 * ========================================================== */
.aux-wrap { display: flex; flex-direction: column; gap: 0; padding: 4px 0 24px; }
.aux-tabs {
  display: flex; gap: 4px; padding: 0 4px; border-bottom: 2px solid var(--border);
  margin-bottom: 18px; flex-wrap: wrap;
}
.aux-tab {
  padding: 10px 18px; cursor: pointer; border-radius: 8px 8px 0 0; font-size: 14px;
  color: var(--text-sub); transition: all .15s; font-weight: 500;
  border: 1px solid transparent; border-bottom: none;
}
.aux-tab:hover { color: var(--brand); background: var(--brand-light); }
.aux-tab.active { color: var(--brand); background: var(--panel); border-color: var(--border); border-bottom-color: var(--panel); position: relative; top: 1px; }

.aux-pane { display: flex; flex-direction: column; gap: 14px; padding: 0 4px; }
.aux-pane-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  padding-bottom: 4px; border-bottom: 1px dashed var(--border);
}
.aux-pane-head h3 { margin: 0 0 4px; font-size: 16px; color: var(--text); }
.aux-pane-head .hint { margin: 0; color: var(--text-sub); font-size: 12.5px; }

/* ====== 字典卡片网格 ====== */
.aux-dict-grid {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
}
.aux-dict-card {
  background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px 12px; display: flex; flex-direction: column; gap: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.aux-dict-card:hover { border-color: var(--brand); box-shadow: 0 2px 8px rgba(16,24,40,.06); }
.aux-dict-card.aux-dict-full { grid-column: 1/-1; }
.aux-dict-card.aux-dict-add-card { background: linear-gradient(180deg, #f6faff, #eef4fc); border-style: dashed; }
.aux-dict-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.aux-dict-head h4 { margin: 0 0 2px; font-size: 14.5px; color: var(--text); }
.aux-dict-head .muted { margin: 0; font-size: 12px; color: var(--text-sub); }
.aux-dict-head code { background: #f5f7fa; padding: 1px 6px; border-radius: 4px; font-size: 11px; color: var(--text-sub); }
.aux-dict-actions { display: flex; gap: 6px; flex-shrink: 0; }

.aux-dict-tags {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding-top: 6px; border-top: 1px dashed var(--border);
}
.aux-tag-item {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; background: #f6faff; color: var(--brand);
  border: 1px solid #cbe0f7; border-radius: 14px; font-size: 12.5px;
  transition: all .15s;
}
.aux-tag-item:hover { background: var(--brand-light); }
.aux-tag-item button {
  background: transparent; border: 0; color: var(--text-mute); cursor: pointer;
  font-size: 14px; padding: 0 2px; margin-left: 2px;
}
.aux-tag-item button:hover { color: var(--danger); }
.aux-tag-item.aux-tag-off { background: #f5f7fa; color: var(--text-mute); border-color: var(--border); opacity: .8; }
.aux-tag-item b { font-weight: 600; }
.aux-tag-item small { color: var(--text-mute); font-size: 11px; }
.aux-tag-add {
  width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center;
  background: transparent; border: 1px dashed var(--border); border-radius: 50%;
  color: var(--text-mute); cursor: pointer; font-size: 16px; line-height: 1;
  transition: all .15s;
}
.aux-tag-add:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-light); }

/* ====== 公司管理 ====== */
.co-name { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.co-logo {
  width: 36px; height: 36px; border-radius: 8px;
  background: linear-gradient(135deg, #e3f0ff, #c4ddf8); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 600; flex-shrink: 0;
}
.co-name-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
/* m163：dt-fixed 对齐后公司名称列定宽 240px，长简称/全称单行省略（title 看全） */
.co-name-text b, .co-name-text small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.co-name-text b { color: var(--text); font-weight: 600; font-size: 13.5px; }
.co-name-text small { color: var(--text-mute); font-size: 11.5px; }

.co-drawer-head { display: flex; align-items: center; gap: 14px; }
.co-logo-lg {
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(135deg, #e3f0ff, #c4ddf8); color: var(--brand);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
}
.co-drawer-head h3 { margin: 0 0 2px; font-size: 18px; }
.co-drawer-head .muted { margin: 0; font-size: 13px; }

.co-sum-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px; margin: 14px 0 18px;
}
.co-sum-card {
  background: linear-gradient(180deg, #f6faff, #eef4fc);
  border: 1px solid #cbe0f7; border-radius: 10px;
  padding: 14px 12px; text-align: center;
  display: flex; flex-direction: column; gap: 2px;
}
.co-sum-card b { font-size: 22px; color: var(--brand); font-weight: 700; }
.co-sum-card b.num { font-size: 20px; }
.co-sum-card small { font-size: 12px; color: var(--text-sub); }
.co-sum-card span { font-size: 12px; color: var(--text-sub); }

/* ====== 导入未识别提示 ====== */
.imp-warn {
  background: #fff8e6; border: 1px solid #ffd591; border-radius: 8px;
  padding: 10px 14px; margin-bottom: 12px; font-size: 13px; color: #5e3b00;
  display: flex; flex-direction: column; gap: 4px;
}
.imp-warn b { color: #c47b00; }
.imp-warn small { color: var(--text-sub); font-size: 12px; }
.row-unmapped { background: #fff8e6; }
.row-unmapped td:first-child { color: #c47b00; font-weight: 500; }

/* ====== 字段管理嵌入视图 ====== */
#aux-fm-list table.data-table { background: var(--panel); }
#aux-fm-list table.data-table thead { background: linear-gradient(180deg, #f8fbff, #eef4fc); }
#aux-fm-list .muted { color: var(--text-mute); }

/* ====== m58b：左下角常驻版本号（v1.00 → v2.00 …，每次发布 +1） ====== */
.sidebar-ver {
  flex: 0 0 auto;
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px;
  padding: 8px 12px 12px;
  font-size: 11px;
  color: #5a6884;
  letter-spacing: .4px;
  user-select: none;
}
.sidebar-ver #app-version { color: #8593ad; font-weight: 600; }
/* m279：左下角「强制更新」按钮——清缓存 + 注销旧 Service Worker + 重载最新版 */
.sidebar-ver #force-update-btn { cursor: pointer; color: #2b5cff; margin-left: 6px; }
.sidebar-ver #force-update-btn:hover { text-decoration: underline; }

/* ====== m69（v1.17）：摩卡智能裁剪编辑器 ======
 * 参考华谊兄弟时尚模特页：统一竖版封面、人脸居中靠上。
 * 弹窗三段式：左侧缩略图列表 / 中间原图+可拖裁剪框 / 右侧实时裁剪预览。 */
.moka-overlay {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(15, 23, 42, .55);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.moka-box {
  background: var(--panel, #fff);
  border-radius: 12px;
  width: min(980px, 96vw); max-height: 92vh;
  display: flex; flex-direction: column;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
  overflow: hidden;
}
.moka-head {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
  font-size: 14.5px; font-weight: 600; color: var(--text);
}
.moka-head .moka-count { color: var(--text-sub); font-size: 12.5px; font-weight: 400; }
.moka-head .x { margin-left: auto; cursor: pointer; font-size: 22px; color: var(--text-sub); line-height: 1; padding: 0 4px; }
.moka-head .x:hover { color: var(--text); }
.moka-body {
  display: flex; gap: 0; flex: 1 1 auto; min-height: 0;
}
.moka-side {
  flex: 0 0 108px; overflow-y: auto;
  border-right: 1px solid var(--border);
  padding: 10px 8px; display: flex; flex-direction: column; gap: 8px;
  background: var(--bg, #f7f9fc);
}
.moka-thumb {
  position: relative; cursor: pointer;
  border: 2px solid transparent; border-radius: 8px; overflow: hidden;
  aspect-ratio: 3/4; background: #e8ecf3;
  flex: 0 0 auto;
}
.moka-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.moka-thumb.on { border-color: var(--brand, #2f6fd8); }
.moka-thumb.skipped img { opacity: .35; filter: grayscale(1); }
.moka-thumb-skip {
  position: absolute; inset: auto 0 0 0; text-align: center;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: 11px; padding: 2px 0;
}
.moka-thumb-face {
  position: absolute; top: 4px; right: 4px;
  color: #22a06b; font-size: 13px; line-height: 1;
  text-shadow: 0 0 3px #fff, 0 0 3px #fff;
}
.moka-main {
  flex: 1 1 auto; min-width: 0; display: flex; gap: 14px;
  padding: 14px; min-height: 0;
}
.moka-stage {
  position: relative; flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; justify-content: center;
  background: #11151c; border-radius: 8px; overflow: hidden;
  align-self: stretch;
  touch-action: none;
}
/* imgwrap：JS 固定为图片实际显示尺寸，裁剪框百分比以它为基准（不能相对 stage，否则两侧空隙让框偏出图片） */
.moka-imgwrap { position: relative; line-height: 0; flex: 0 0 auto; }
.moka-img {
  width: 100%; height: 100%; display: block;
  user-select: none; -webkit-user-drag: none; pointer-events: none;
}
/* 裁剪框：百分比定位（left/top/width/height 由内联 style 控制） */
.moka-frame {
  position: absolute; box-sizing: border-box;
  border: 1.5px solid #fff;
  outline: 1.5px solid rgba(47, 111, 216, .9);
  box-shadow: 0 0 0 9999px rgba(10, 14, 20, .45);
  cursor: move;
}
/* 三分构图线 */
.moka-grid {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, transparent calc(33.33% - .5px), rgba(255,255,255,.55) 33.33%, transparent calc(33.33% + .5px)),
    linear-gradient(to right, transparent calc(66.66% - .5px), rgba(255,255,255,.55) 66.66%, transparent calc(66.66% + .5px)),
    linear-gradient(to bottom, transparent calc(33.33% - .5px), rgba(255,255,255,.55) 33.33%, transparent calc(33.33% + .5px)),
    linear-gradient(to bottom, transparent calc(66.66% - .5px), rgba(255,255,255,.55) 66.66%, transparent calc(66.66% + .5px));
}
.moka-handle {
  position: absolute; right: -7px; bottom: -7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--brand, #2f6fd8); border: 2px solid #fff;
  cursor: nwse-resize;
}
.moka-side-r {
  flex: 0 0 168px; display: flex; flex-direction: column; gap: 8px;
  min-height: 0;
}
.moka-pv-title { font-size: 12px; color: var(--text-sub); }
.moka-pv {
  aspect-ratio: 3/4; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--border); background: #e8ecf3;
  flex: 0 0 auto;
}
.moka-pv img { width: 100%; height: 100%; object-fit: cover; display: block; }
.moka-face-hint { font-size: 12px; line-height: 1.5; min-height: 18px; }
.moka-face-hint .ok { color: #22a06b; }
.moka-face-hint .warn { color: #c47b00; }
.moka-foot {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px; border-top: 1px solid var(--border);
}
.moka-foot .moka-tip { flex: 1 1 auto; min-width: 0; font-size: 12px; color: var(--text-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 移动端：侧栏变底部横排 */
@media (max-width: 720px) {
  .moka-body { flex-direction: column; overflow-y: auto; }
  .moka-side { flex: 0 0 auto; flex-direction: row; overflow-x: auto; border-right: none; border-bottom: 1px solid var(--border); }
  .moka-thumb { width: 64px; }
  .moka-main { flex-direction: column; }
  .moka-stage { min-height: 320px; }
  .moka-side-r { flex: 0 0 auto; flex-direction: row; align-items: center; }
  .moka-pv { width: 110px; }
}


/* ==========================================================
 * m82（v1.32）：手机端响应式 + PWA
 * 断点：≤900px 侧栏改离屏抽屉；≤720px 双列改单列、顶栏次信息让位
 * ========================================================== */

/* 汉堡导航按钮：桌面端隐藏，移动端显示 */
.nav-toggle {
  display: none;
  align-items: center; justify-content: center;
  width: 36px; height: 36px; flex: 0 0 auto;
  border: 1px solid var(--border); border-radius: 8px;
  background: var(--panel); color: var(--text);
  font-size: 17px; line-height: 1; cursor: pointer;
}
.nav-toggle:active { background: var(--brand-light); }

/* 手机端侧栏抽屉遮罩 */
.nav-mask { position: fixed; inset: 0; background: rgba(16,24,40,.45); z-index: 90; }
.nav-mask.hide { display: none; }

@media (max-width: 900px) {
  /* 侧栏改离屏抽屉：默认收起，body.nav-open 时滑出 */
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; }
  body.nav-open .sidebar { transform: translateX(0); box-shadow: 0 0 48px rgba(0,0,0,.4); }
  .main { margin-left: 0; }
  .nav-toggle { display: flex; }

  /* 顶栏 / 内容区收窄（.toolbar 负 margin 与 .content padding 保持同值） */
  .topbar { padding: 0 12px; gap: 10px; height: 50px; }
  .topbar h2 { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .content { padding: 12px 12px 30px; }
  .toolbar { padding: 10px 12px; margin: -12px -12px 10px; }
  .toolbar input[type=search] { width: auto; flex: 1 1 130px; min-width: 110px; }

  /* 详情抽屉 / 弹窗全宽 */
  .drawer { width: 100vw; max-width: 100vw; }
  .mask { padding: 12px; }

  /* 看板 / 统计条更紧凑 */
  .dash-grid { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; margin-bottom: 14px; }
  .pj-stat-item { flex: 1 1 120px; min-width: 120px; }
}

@media (max-width: 720px) {
  /* 表单 / 详情双列 → 单列 */
  .form-grid, .form-compact, .kv-grid, .kv-list { grid-template-columns: minmax(0, 1fr); }
  .fd-tools { grid-template-columns: 1fr; }

  /* 顶栏次信息让位给标题与汉堡按钮 */
  .topbar #pg-sub, .topbar #today { display: none; }

  /* 弹窗 / 抽屉内边距收窄 */
  .login-box { padding: 26px 20px 18px; }
  .modal-head, .modal-foot { padding-left: 14px; padding-right: 14px; }
  .modal-body { padding: 14px; }
  .drawer-head { padding: 14px; }
  .drawer-preview { padding: 14px 14px 0; }
  .drawer-actions { padding: 12px 14px 10px; }
  .proj-lock-note { padding: 8px 14px 0; }

  /* 内容区再收窄（.toolbar 负 margin 同步） */
  .content { padding: 10px 10px 24px; }
  .toolbar { padding: 9px 10px; margin: -10px -10px 9px; }
}

/* ==========================================================
 * m240（2026-10-08 用户）：「手机看的时候页面可以往右滑动，不固定」+「看板显示不要那么大，
 *   不然手机显示不了多少」两处收尾。
 *   ①横向滑动的根因：.dash-scroll 只设了 overflow-y:auto，另一轴按规范会被计算成 auto，
 *     于是看板里任何超宽内容（最典型是「最近删除记录」的 .log-table，.log-detail 写死
 *     min-width:240px + 时间/操作人/删除客户三列）都会把整个内容区撑成可左右滑动。
 *     手机端直接把横向裁掉；确实需要横滑的宽表格一律交给它自己的 .table-wrap 内部滚动
 *     （这是全站既有规范，客户管理/项目管理等全是这么做的）。
 *   ②看板 KPI：桌面 24px 数字 + 16px 内边距在手机上过大，一屏看不了几张卡。
 *     手机上固定两列 + 收紧字号/内边距，同样一屏能看到两倍的卡。
 *   ③同根因的另一批：.set-grid（系统设置）是 minmax(360px,1fr)，360 宽手机的内宽
 *     只剩 ~340px —— 一列都放不下，照样撑破 .set-scroll 能左右滑；.form-list 320px
 *     在 320 宽的窄机上同理。手机端一律压成单列。
 * ========================================================== */
@media (max-width: 900px) {
  /* 总闸：手机端任何页面都不许横向滑动。前面每处根因都单独修了，这里再上一道兜底，
     防止又冒出一个写死宽度的元素把整页撑宽（用户「永远记住」的教训）。 */
  html, body { overflow-x: hidden; max-width: 100%; }
  .layout, .main, .content { max-width: 100vw; }
  .dash-scroll { overflow-x: hidden; }
}
@media (max-width: 720px) {
  /* 同一根因的另一批：auto-fit/auto-fill + minmax(写死像素) 的栅格，容器一窄就撑破
     （.set-grid 是 360px，360 宽的手机内宽只剩 ~340px → 系统设置页照样能左右滑）。 */
  .set-grid, .form-list { grid-template-columns: minmax(0, 1fr); }

  /* 看板卡片压扁：数字与标题同一行（原来上下两行白高一倍），字号 24→17px、内边距 16→7px */
  .dash-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 10px; }
  .dash-grid .kpi { padding: 7px 9px; text-align: left; }
  .dash-grid .kpi b { display: inline; font-size: 17px; }
  .dash-grid .kpi span { font-size: 11.5px; margin-left: 5px; }
  .dash-grid .kpi small { font-size: 10px; margin-top: 1px; }

  .reminder-card { padding: 10px 12px; gap: 2px; }
  .reminder-card b { font-size: 24px; }
  .reminder-card span { font-size: 11.5px; }
  .reminder-card small { font-size: 10.5px; }

  .review-notice { padding: 8px 12px; font-size: 12.5px; }
  .review-notice b { font-size: 16px; }
}

/* m265（2026-10-12 用户「卡片显示数量多一点，可以小一点」）：手机端卡片墙再加密，
   一行从 3 张提到 5 张左右；卡片变窄后名字/占位字/缩放按钮同步缩小。 */
@media (max-width: 720px) {
  .model-card-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 2px; padding: 0; }
  .model-card { border-radius: 0; }
  .model-card-name { height: 19px; padding: 0 4px; gap: 4px; line-height: 19px; }
  .model-card-name .mcn-main { font-size: 9.5px; }
  .model-card-name .mcn-en { font-size: 9px; letter-spacing: 0; }
  .model-card-init { font-size: 30px; }
  .model-card .mc-zoom { width: 22px; height: 22px; font-size: 11px; top: 5px; right: 5px; }
}

/* m240：触摸设备上手指划过卡片会触发 :hover 的 translateY(-1px)，滑动时一整排卡片
   此起彼伏地上下弹 —— 就是用户说的「抖动」。触摸端一律取消位移，只留阴影反馈。
   用 (hover: none) 而不是宽度断点：平板、折叠屏等宽屏触摸设备同样命中。 */
@media (hover: none) {
  .dash-grid .kpi[onclick]:hover, .dash-grid .kpi.kpi-click:hover,
  .dash-grid .kpi[role="button"]:hover, .reminder-card:hover { transform: none; }
  /* m265：卡片墙的「🔍 放大」按钮靠 .model-card:hover 才显示，触摸端永远没有 hover
     → 按钮一直是 opacity:0，手机用户根本点不到。触摸端直接常显。 */
  .model-card .mc-zoom { opacity: 1; }
  .model-card:hover { transform: none; }
  .model-card:hover .model-card-photo { transform: none; }
}

/* m225：AI 拓客关键词 chips（系统设置 → AI 拓客 里的添加/删除列表） */
.ai-kw-list { display: flex; flex-wrap: wrap; gap: 6px; }
.ai-kw-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 8px 3px 10px; font-size: 13px; line-height: 1.4;
  color: var(--text, #1f2937); background: #f1f5f9;
  border: 1px solid var(--border, #e2e8f0); border-radius: 14px;
}
.ai-kw-chip .ai-kw-x {
  cursor: pointer; color: var(--danger, #e5484d); font-weight: 700;
  font-size: 14px; line-height: 1; padding: 0 3px; border-radius: 50%;
  user-select: none;
}
.ai-kw-chip .ai-kw-x:hover { color: #fff; background: var(--danger, #e5484d); }

/* ==========================================================
 * m241（2026-10-09 用户）：数据看板新增「今日员工操作统计」+「操作明细（按日期）」。
 *   ① 今日员工操作统计：m251 先竖排卡片 → m254 用户「不要这种显示，换个 ui」，
 *      最终形态 = 紧凑表格（一行一个员工、一列一项指标，员工列吸附左侧，超宽横向滚动）。
 *   ② 操作明细：日期 + 员工两个筛选控件 + 明细表；详情列限宽换行，表格由 .table-wrap 内部滚动。
 * ========================================================== */
/* m254：今日员工操作统计 —— 紧凑表格（一行一个员工，一列一项指标） */
.staff-stat-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); }
.staff-stat-table { width: 100%; border-collapse: collapse; font-size: 12.5px; white-space: nowrap; }
.staff-stat-table th,
.staff-stat-table td { padding: 7px 9px; text-align: center; font-variant-numeric: tabular-nums; }
.staff-stat-table th { background: var(--bg); color: var(--text-sub); font-weight: 500; }
.staff-stat-table td { color: var(--text); }
.staff-stat-table th:first-child,
.staff-stat-table td:first-child { position: sticky; left: 0; z-index: 1; background: var(--panel); text-align: left; font-weight: 600; }
.staff-stat-table th:first-child { background: var(--bg); }
.staff-stat-table tbody tr + tr td { border-top: 1px dashed var(--border); }
.staff-stat-table td.sst-zero { color: var(--text-mute); }
.staff-stat-table td.sst-total { font-weight: 700; color: var(--brand); }
.staff-stat-table tfoot td { background: var(--bg); color: var(--text-sub); border-top: 1px solid var(--border); }
.staff-stat-table tfoot td:first-child { background: var(--bg); }
.staff-stat-idle { margin-top: 8px; font-size: 12px; color: var(--text-mute); line-height: 1.7; }
.staff-filter-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 12px; max-height: 320px; overflow: auto; padding: 4px 2px; }
.staff-filter-item { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.staff-filter-item input { margin: 0; }

.date-ops-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.date-ops-bar .spacer { flex: 1; }
.date-ops-bar label { font-size: 13px; color: var(--text-sub); }
.date-ops-bar input[type="date"] { height: 32px; padding: 0 8px; }
.date-ops-table td.dops-detail { max-width: 560px; white-space: normal; word-break: break-word; }

@media (max-width: 720px) {
  .staff-stat-table { font-size: 12px; }
  .staff-stat-table th, .staff-stat-table td { padding: 6px 7px; }
  .date-ops-table td.dops-detail { max-width: 260px; }
}

/* ==========================================================
 * m323（2026-10-19 用户）：演员详情「媒体资料」区 + 联系信息锁 + 模卡相册
 * ========================================================== */
.mmedia-wrap { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.mmedia { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.mmedia.over { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-light, #eef3ff); }
.mmedia-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.mmedia-head b { font-size: 14px; color: #1a2233; }
.mmedia-ic { font-size: 17px; }
.mmedia-hint { font-size: 12px; color: var(--text-sub); font-style: normal; }
.mmedia-ops { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.mm-link { width: 180px; padding: 5px 8px; border: 1px solid #d0d5dd; border-radius: 6px; font-size: 12.5px; }
.mm-empty { padding: 16px; text-align: center; color: #98a2b3; font-size: 12.5px; border: 1px dashed #e4e7ec; border-radius: 8px; background: #fafbfc; }
/* m329（用户「正面照片显示那么大，模卡又显示那么小」）：两边尺寸拉齐——正面照由 380px 收到 240px，
   模卡缩略图由最小 92px 放大到 150px，画面上不再一头巨大一头缩成小豆丁。 */
/* m339（用户：「正面照片数据显示全，现在都把头给裁掉了，显示长方形就行」）——
   原来 3:4 竖版 + background-size:cover，横版照片上下被裁（头部没了）。
   改为 4:3 长方形 + contain（整张照片完整显示，不裁任何部分）。 */
/* m429：contain 时若背景不封 repeat，竖版正面照会在 4:3 框里左右平铺成「三张脸」
 *   （用户看到的「详情正面照片显示 3 张」就是这个）→ 显式 no-repeat。 */
/* m438（用户：「所有的照片不要有留白，为什么这个相框要有留白？就不要有相框，也不要有弧度，
 *   长方形就好，4 个角也不要有弧度；找别人摩卡也是，不要有弧度」）：
 *   原 m433 的 3:4 框 + contain，照片比例一不对就四周留浅灰底。
 *   现在容器按图片自身尺寸收缩（display:inline-block + img 自适应），
 *   整张照片完整显示、不裁头、不留白；容器与图片全部直角、无 border、无背景色。 */
.model-photo-main.mm-front {
  display: inline-block; width: auto; max-width: 420px; aspect-ratio: auto;
  border: 0; border-radius: 0; background: none; overflow: hidden;
  margin-bottom: 10px; line-height: 0;
}
.model-photo-main.mm-front .mm-front-img {
  display: block; width: 420px; max-width: 100%; height: auto;
  border: 0; border-radius: 0; background: none; cursor: zoom-in;
}
@media (max-width: 720px) {
  .model-photo-main.mm-front,
  .model-photo-main.mm-front .mm-front-img { max-width: 100%; max-height: none; }
}
/* 模卡缩略图同样直角无边框（m438） */
.mm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.mm-thumb { position: relative; }
.mm-thumb img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center top; border-radius: 0; border: 0; cursor: zoom-in; background: #f1f3f7; display: block; }
.mm-thumb img:hover { box-shadow: 0 4px 12px rgba(0,0,0,.12); }
.mm-thumb-x { position: absolute; top: 4px; right: 4px; width: 18px; height: 18px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; line-height: 18px; text-align: center; cursor: pointer; display: none; }
.mm-thumb:hover .mm-thumb-x { display: block; }
.media-list { display: flex; flex-direction: column; gap: 6px; }
.media-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid #eef0f4; border-radius: 8px; background: #fafbfc; font-size: 13px; }
.media-item .mi-ic { font-size: 15px; }
.media-item .mi-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #344054; }
.media-item .mi-go { color: var(--brand); cursor: pointer; white-space: nowrap; }
.media-item .mi-go:hover { text-decoration: underline; }
.media-item .mi-del { color: #c0c6cf; cursor: pointer; font-weight: 700; }
.media-item .mi-del:hover { color: #f04438; }
/* 分组头带图标标签 */
.msec-h { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: #1a2233; padding-left: 10px; border-left: 3px solid var(--brand); }
/* m382：基本信息卡片头部同时挂「👤 基本信息」和「🤝 合作项目」，两段各自 flex 后文字不再竖排 */
.msec-h > span { white-space: nowrap; }
.msec h3 { margin-bottom: 10px; }

/* ==========================================================
 * m372（2026-10-24 用户）：
 *  ① 演员详情「合作项目」放到「基本信息」右边（同一行左右两栏）；
 *  ② 项目详情「基本信息」左边加「演员模特资料」卡片墙（与演员模特库同款卡片）。
 * ========================================================== */
.mdet-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 340px); gap: 16px; align-items: start; }
.mdet-cols > .mdet-coop { margin: 0; }
.mdet-coop { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: #fff; }
/* m382（用户：「合作项目不要在这里，在基本信息右边放一个合作项目」）：
   合作项目并进「基本信息」这一张卡片：左 = 基本信息字段（三栏），右 = 合作项目一栏（300px）。
   窄屏（≤900px 视口）自动上下堆叠。 */
.msec-coop-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(240px, 320px); gap: 18px; align-items: start; }
@media (max-width: 900px) { .msec-coop-cols { grid-template-columns: minmax(0, 1fr); } }
/* 右侧合作项目栏：左侧一条细分隔线，和左边字段区在视觉上分开 */
.mcoop-side { border-left: 1px dashed #eaecf0; padding-left: 14px; }
@media (max-width: 900px) { .mcoop-side { border-left: 0; padding-left: 0; } }
.msec-coop-sep { display: inline-block; width: 1px; height: 12px; margin: 0 10px; background: var(--border-dark); vertical-align: -1px; }
.mcoop-num { font-weight: 400; color: var(--text-mute); }
.mcoop-side .mcoop-add { margin-top: 8px; width: 100%; }
.mcoop-list { display: flex; flex-direction: column; gap: 8px; }
.mcoop-item { border: 1px solid #eef0f4; border-radius: 10px; padding: 8px 10px; background: #fafbfc; }
.mcoop-top { display: flex; align-items: center; gap: 6px; }
.mcoop-name { font-size: 13px; font-weight: 600; }
.mcoop-badge { font-size: 10.5px; color: #0b6b4f; background: #eef6f3; border-radius: 20px; padding: 1px 7px; }
.mcoop-del { margin-left: auto; color: #c0c6cf; cursor: pointer; font-weight: 700; }
.mcoop-del:hover { color: #f04438; }
.mcoop-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 11.5px; color: var(--text-sub); }
.mcoop-money { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; font-size: 12px; color: var(--text-sub); }
.mcoop-money b { color: var(--brand); font-weight: 600; }
.mcoop-empty { padding: 14px; text-align: center; color: #98a2b3; font-size: 12.5px; border: 1px dashed #e4e7ec; border-radius: 8px; }
.mcoop-add { margin-top: 10px; width: 100%; }
@media (max-width: 900px) { .mdet-cols { grid-template-columns: minmax(0, 1fr); } }

/* ==========================================================
 * m429（用户 2026-11-02）演员详情页重排：
 *   · 顶部姓名行内嵌「信息 / 修改日志」页签（默认信息、日志在右）；
 *   · 合作项目不再并排放在基本信息右侧，改为信息区里单列展示；
 *   · 间距只用 4 / 8 / 12 / 16 四档，去掉大块空白。
 * ========================================================== */
.mdet-head-l { display: flex; align-items: center; gap: 16px; flex: 1 1 auto; min-width: 0; }
.mdet-head-l > h3 {
  flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  cursor: pointer;
}
.mdet-tabs { display: flex; gap: 2px; flex: 0 0 auto; padding: 2px; background: #f2f4f7; border-radius: 8px; }
.mdet-tabs .tab {
  padding: 4px 12px; margin: 0; border: 0; border-radius: 6px;
  font-size: 12.5px; line-height: 1.5; color: var(--text-sub);
}
.mdet-tabs .tab:hover { color: var(--text); }
.mdet-tabs .tab.active { background: #fff; color: var(--brand); font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.08); }
/* tab-pane 自身已有 12/16 内边距，里面的 drawer-preview 不再重复叠加 */
.tab-pane > .drawer-preview { padding: 0; }
/* 信息区纵向紧凑排布：媒体块 / 各分组卡片之间统一 12px，组内 8px */
.drawer-preview > .mmedia-wrap { margin-bottom: 12px; }
.drawer-preview > .section,
.drawer-preview > .msec { margin-bottom: 12px; }
.drawer-preview > .section:last-of-type,
.drawer-preview > .msec:last-of-type { margin-bottom: 0; }
.mdet-coop { margin: 0; }
/* 来源字段：列表里单行省略 + 悬停看全文；详情里整行换行完整展示 */
.cell-source { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kv-row .kv-source { word-break: break-all; white-space: normal; }


/* 项目详情「模特资料」页签：演员库同款卡片墙 */
.pact-box { border: 1px solid var(--border); border-radius: 12px; padding: 12px 12px 14px; background: #fff; margin-top: 10px; }
.pact-box .msec-h { margin-bottom: 10px; }
.pact-box .model-card-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
.pact-empty { padding: 14px 10px; text-align: center; color: #98a2b3; font-size: 12.5px; line-height: 1.7; border: 1px dashed #e4e7ec; border-radius: 8px; }

/* 录入模特弹窗：姓名输入后紧贴输入框下方弹出演员模特库卡片列表 + 列表里的正面照缩略图 */
.ap-picker { margin: -6px 0 14px; padding: 10px; border: 1px solid var(--border); border-radius: 10px; background: #fafbfc; }
.ap-list-title { margin: 4px 0 8px; font-size: 13px; font-weight: 600; color: #344054; }
.ap-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 4px; max-height: 260px; overflow: auto; }
.ap-picker .model-card.sel { outline: 3px solid var(--brand); outline-offset: -3px; }
.ap-add { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); white-space: nowrap;
  font-size: 10.5px; color: #fff; background: rgba(43,92,255,.9); border-radius: 12px; padding: 2px 8px; z-index: 3; }
.ap-add:hover { background: var(--brand); }
.ap-empty { grid-column: 1 / -1; padding: 12px; text-align: center; color: #98a2b3; font-size: 12.5px; }
.ap-cell { width: 60px; }
.ap-thumb { width: 34px; height: 46px; border-radius: 4px; background: #f1f3f7 center/contain no-repeat; border: 1px solid var(--border); }
/* 联系信息锁 */
.contact-lock { }
.capp-box { display: flex; align-items: center; gap: 14px; padding: 16px; border: 1px dashed #d9e0ec; border-radius: 12px; background: #f8fafd; }
.capp-ic { font-size: 30px; }
.capp-txt { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.capp-txt b { font-size: 14px; color: #344054; }
.capp-txt span { font-size: 12.5px; color: #98a2b3; }
.capp-status { font-size: 12.5px; color: #d97706; }
.capp-status.ok { color: #12b76a; }
.capp-ops { display: flex; }
/* 模卡相册 */
.gallery-overlay { position: fixed; inset: 0; background: rgba(10,12,18,.82); z-index: 900; display: flex; align-items: center; justify-content: center; }
.gallery-box { width: min(720px, 94vw); display: flex; flex-direction: column; }
.gallery-head { display: flex; align-items: center; gap: 10px; color: #fff; padding: 8px 4px; }
.gallery-count { font-size: 13px; opacity: .8; }
.gallery-title { flex: 1; font-size: 14px; text-align: center; }
.gallery-head .x { cursor: pointer; font-size: 26px; opacity: .8; }
.gallery-head .x:hover { opacity: 1; }
.gallery-body { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 60vh; }
.gallery-body img { max-width: 100%; max-height: 68vh; border-radius: 6px; object-fit: contain; }
.gallery-nav { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); display: flex; justify-content: space-between; padding: 0 12px; pointer-events: none; }
.gallery-nav .btn { pointer-events: auto; width: 44px; height: 44px; border-radius: 50%; font-size: 24px; background: rgba(255,255,255,.12); color: #fff; border: none; display: flex; align-items: center; justify-content: center; padding: 0; }
.gallery-nav .btn:hover { background: rgba(255,255,255,.25); }
.gallery-foot { display: flex; gap: 10px; justify-content: center; padding: 10px 0; }

/* ==========================================================
 * m326 PhotoViewer 全站图片查看器（整屏黑底 / 滚轮缩放 / 拖动 / 1:1 / 多图缩略图条）
 * ========================================================== */
.pv-overlay { position: fixed; inset: 0; z-index: 4000; background: rgba(8,10,16,.93); display: flex; flex-direction: column; animation: pvIn .18s ease; }
@keyframes pvIn { from { opacity: 0; } to { opacity: 1; } }
.pv-top { display: flex; align-items: center; gap: 8px; padding: 10px 16px; color: #e7ecf5; flex: 0 0 auto; }
.pv-count { font-size: 13px; opacity: .85; white-space: nowrap; }
.pv-title { font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-spacer { flex: 1; }
.pv-btn { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #e7ecf5; border-radius: 8px; padding: 5px 12px; font-size: 14px; cursor: pointer; line-height: 1.4; white-space: nowrap; transition: background .15s; }
.pv-btn:hover { background: rgba(255,255,255,.18); }
.pv-act { background: rgba(79,124,255,.25); border-color: rgba(79,124,255,.55); }
.pv-act:hover { background: rgba(79,124,255,.45); }
/* m333（需求4）：照片预览的删除按钮用危险色，和普通操作区分开 */
.pv-btn.pv-danger { background: rgba(220,38,38,.28); border-color: rgba(248,113,113,.65); color: #ffe4e4; }
.pv-btn.pv-danger:hover { background: rgba(220,38,38,.55); }
.pv-danger { background: rgba(217,45,32,.22); border-color: rgba(217,45,32,.5); }
.pv-danger:hover { background: rgba(217,45,32,.42); }
.pv-pct { font-size: 12px; min-width: 44px; text-align: center; opacity: .9; }
.pv-stage { flex: 1; position: relative; overflow: hidden; cursor: grab; touch-action: none; }
.pv-stage.pv-grabbing { cursor: grabbing; }
.pv-img { position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); max-width: none; user-select: none; -webkit-user-drag: none; border-radius: 0; box-shadow: 0 10px 44px rgba(0,0,0,.55); }
.pv-thumbs { display: flex; gap: 6px; padding: 8px 14px 12px; overflow-x: auto; justify-content: safe center; flex: 0 0 auto; }
.pv-thumb { width: 52px; height: 70px; object-fit: cover; border-radius: 0; opacity: .5; cursor: pointer; border: 2px solid transparent; flex: 0 0 auto; transition: opacity .15s; }
.pv-thumb:hover { opacity: .85; }
.pv-thumb.on { opacity: 1; border-color: #4f7cff; }

/* m326：模卡小图上的「✂ 裁剪」角标（与 ✕ 同款悬浮按钮） */
.mm-thumb { position: relative; }
.mm-thumb-crop { position: absolute; left: 4px; top: 4px; width: 20px; height: 20px; border-radius: 5px; background: rgba(15,23,42,.72); color: #fff; font-size: 12px; line-height: 20px; text-align: center; cursor: pointer; opacity: 0; transition: opacity .15s; }
.mm-thumb:hover .mm-thumb-crop { opacity: 1; }
.mm-thumb-crop:hover { background: var(--brand); }

/* ===== m330（2026-10-20 用户）「选择关联项目」弹窗（ProjPicker）+ 批量修改「关联项目」 ===== */
.pp-wrap { display: flex; flex-direction: column; gap: 8px; }
.pp-search { padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; }
.pp-count { font-size: 12px; color: var(--text-sub); }
.pp-list { max-height: min(52vh, 420px); overflow-y: auto; border: 1px solid var(--border); border-radius: 6px; }
.pp-item { border-bottom: 1px solid var(--border); }
.pp-item:last-child { border-bottom: none; }
.pp-item-main { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; }
.pp-item-main:hover { background: #f7f9fc; }
.pp-cb { display: flex; align-items: center; }
.pp-name { font-weight: 600; color: var(--brand); cursor: pointer; }
.pp-name:hover { text-decoration: underline; }
.pp-meta { flex: 1; color: var(--text-sub); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-view { color: var(--brand); font-size: 12px; cursor: pointer; white-space: nowrap; }
.pp-info { padding: 6px 12px 10px 34px; background: #fafbfd; font-size: 12px; display: flex; flex-direction: column; gap: 4px; }
.pp-info.hide { display: none; }
.pp-info-row { display: flex; gap: 10px; }
.pp-info-row b { min-width: 72px; color: var(--text-sub); font-weight: 500; }
.pp-empty { padding: 16px; text-align: center; color: var(--text-sub); font-size: 13px; }
.bfe-proj-cur { margin-top: 8px; font-size: 12px; color: var(--text-sub); }

/* ===== m331（2026-10-20 用户需求①）演员模特库「显示模式」后台配置 ===== */
.vm-select { max-width: 190px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; background: #fff; }
.vm-wrap { display: flex; flex-direction: column; gap: 12px; }
.vm-top { display: inline-flex; gap: 8px; align-items: center; }
.vm-top select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; min-width: 180px; }
.vm-sub { font-size: 12px; color: var(--text-sub); }
.vm-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 12px;
  max-height: 46vh; overflow-y: auto; padding: 10px; border: 1px solid var(--border); border-radius: 6px; }
.vm-f { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
/* m338：显示模式的「导出权限」勾选项 */
.vm-exp { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 6px; background: #fafbfc; cursor: pointer; flex-wrap: wrap; }
.vm-exp .muted { font-weight: 400; font-size: 12px; }
/* m344（用户：「这个导出的框框关不了，一直显示在这里」）——
 * 全站 .hide 从来没有通用规则，只有 .batch-bar.hide / .mask.hide 这类「类名组合」特例，
 * 所以 .exp-dd-menu.hide 一直按 display:block 显示：一打开演员模特库，导出菜单就挂在工具栏上关不掉。
 * 这里补通用规则；各特例本来也是 none，重复声明无副作用。 */
.hide { display: none !important; }
/* m338：列表工具栏的导出下拉（演员模特库） */
.exp-dd { position: relative; display: inline-block; }
.exp-dd-menu { position: absolute; right: 0; top: 100%; z-index: 60; min-width: 220px; margin-top: 4px;
  background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(16,24,40,.14); padding: 4px; }
.exp-dd-menu a { display: block; padding: 8px 10px; font-size: 13px; color: var(--text); border-radius: 6px; cursor: pointer; white-space: nowrap; }
.exp-dd-menu a:hover { background: #f2f4f7; }

/* ===== m340（用户需求 9）：详情抽屉「⚙ 设置排序」===== */
.drawer-head .dt-order-btn {
  flex: 0 0 auto; margin: 0 12px 0 10px; padding: 3px 10px; font-size: 12px;
  white-space: nowrap; position: relative; z-index: 1;
}
.do-panel { display: flex; flex-direction: column; gap: 4px; max-height: 60vh; overflow: auto; padding: 2px; }
.do-item {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px;
  border: 1px solid var(--border); border-radius: 6px; background: #fff;
  user-select: none;
}
.do-item.dragging { border-color: var(--brand); box-shadow: 0 4px 14px rgba(0,0,0,.14); background: #f5f9ff; }
.do-idx { width: 22px; color: var(--text-mute); font-size: 12px; text-align: right; }
.do-grip { cursor: grab; touch-action: none; color: var(--text-mute); padding: 0 4px; font-size: 14px; }
.do-item.dragging .do-grip { cursor: grabbing; }
.do-lbl { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* m373（用户需求3：「直接在原数据上排序，长按拖拽」）：排序面板改为在详情抽屉内就地展开，按组分节，
 * 每一行就是详情里真实的字段行，组名就在上面，一眼看出属于哪个组。 */
.do-wrap { display: flex; flex-direction: column; min-height: 0; }
.do-hint { margin: 0 0 8px; }
.do-inline { max-height: none; overflow: visible; padding: 0; display: block; }
.do-grp {
  font-size: 12px; font-weight: 700; color: var(--brand);
  margin: 12px 0 6px; padding-left: 6px; border-left: 3px solid var(--brand);
}
.do-grp:first-child { margin-top: 0; }
.do-grp-body { display: flex; flex-direction: column; gap: 4px; }
.do-acts { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; padding-top: 10px; border-top: 1px solid var(--border); }

/* ===== m341（用户需求 10）：选中数据后，把图片拖进演员模特列表 / Ctrl+V 粘贴 → 追加到模卡 ===== */
#m-table.m-drop-img { outline: 2px dashed var(--brand); outline-offset: -3px; background: #f5f9ff; }
#m-table.m-drop-img::after {
  content: '松开即可上传到模卡';
  position: sticky; left: 0; bottom: 0; display: block; width: 100%;
  padding: 6px; text-align: center; font-size: 12px; color: var(--brand); background: #eef3ff;
}

/* ===== m428 全站上传统一（拖拽高亮 / 项目发票·附件） ===== */
.up-over {
  outline: 2px dashed var(--brand); outline-offset: -3px;
  background: #eef4ff !important;
}
.up-zone {
  position: relative; display: flex; align-items: center; gap: 12px;
  padding: 16px; margin-bottom: 8px;
  border: 2px dashed var(--border); border-radius: 10px; background: #fafbfc;
  transition: border-color .15s, background .15s;
}
.up-zone:hover { border-color: var(--brand); background: #f5f9ff; }
.up-zone.up-over { border-color: var(--brand); background: #eef4ff; }
.up-zone-ic { flex: 0 0 auto; font-size: 24px; width: 32px; text-align: center; }
.up-zone-main { flex: 1 1 auto; min-width: 0; }
.up-zone-main b { display: block; font-size: 14px; margin-bottom: 3px; }
.up-zone-hint { font-size: 12px; color: var(--text-mute); line-height: 1.6; }
.up-status { font-size: 12px; color: var(--brand); margin-top: 5px; min-height: 0; }
.up-file-list { display: flex; flex-direction: column; gap: 6px; margin: 6px 0 16px; }
.up-file {
  display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: 8px; background: #fff;
}
.up-file-ic {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 6px; background: #eef2f7;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
}
.up-file-main { flex: 1 1 auto; min-width: 0; }
.up-file-main b {
  display: block; font-size: 13px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.up-file-meta { font-size: 11px; color: var(--text-mute); }
.up-file-acts { flex: 0 0 auto; display: flex; gap: 6px; }
.up-empty {
  padding: 14px; margin-bottom: 16px; text-align: center;
  border: 1px dashed var(--border); border-radius: 8px;
  color: var(--text-mute); font-size: 12px;
}
/* ===== m437：三向成本口径（薪酬 / 项目报价 / 演员库） ===== */
.kv-link { margin-left: 6px; font-size: 12px; color: var(--brand); cursor: pointer; white-space: nowrap; }
.kv-link:hover { text-decoration: underline; }
.m437-calc-tag { margin-left: 5px; font-size: 11px; color: var(--text-mute); }
.m437-src { font-size: 11px; line-height: 1.35; }
.m437-hint { margin: 6px 0; font-size: 12px; color: var(--text-mute); line-height: 1.6; }
.m437-hist-btn { float: right; margin-left: 8px; }
.m437-hist-table td { vertical-align: top; }
.m437-note { max-width: 220px; color: var(--text-mute); font-size: 12px; }
.m437-calc-box { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: #fafbfc; }
.m437-calc-box .kv-row { display: flex; gap: 10px; padding: 4px 0; border-bottom: 1px dashed var(--border); }
.m437-calc-box .kv-row:last-child { border-bottom: 0; }
.m437-calc-box .kv-row b { flex: 0 0 96px; font-weight: 600; }
.m437-calc-box .kv-row span { flex: 1 1 auto; word-break: break-all; }

.sal-proj-fld { grid-column: span 2; }
.sal-proj-line { display: flex; gap: 6px; align-items: center; }
.sal-proj-line input { flex: 1 1 auto; min-width: 0; }
.sal-proj-bind { margin-top: 5px; }
.sal-proj-mini { border: 1px solid var(--border); border-radius: 7px; background: #f7f9fc; padding: 7px 9px; }
.spm-head { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.spm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.pp-info-row { display: flex; gap: 8px; font-size: 12px; line-height: 1.55; }
.pp-info-row b { flex: 0 0 52px; color: var(--text-mute); font-weight: 500; }
.pp-info-row span { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sal-proj-cell { cursor: pointer; padding: 1px 0; }
.sal-proj-cell:hover .sp-name { text-decoration: underline; }
.sal-proj-cell .sp-name { font-size: 12px; font-weight: 600; color: var(--brand); line-height: 1.4; }
.sal-proj-cell .sp-meta { font-size: 11px; color: var(--text-mute); line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sal-bind-btn { white-space: nowrap; }
.sal-cost-diff { color: #c2410c; font-weight: 700; }
.m437-diff { margin-top: 8px; padding: 7px 9px; border: 1px solid #f5c2a4; background: #fff7ed; border-radius: 7px; color: #9a3412; font-size: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m437-proj-block .kv-list { margin-top: 6px; }
.m437-proj-sal { margin-top: 10px; }
.m437-proj-sal .msec-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.m437-sal-badge { color: var(--brand); font-size: 11px; }
@media (max-width: 900px) { .sal-proj-fld { grid-column: span 2; } }
@media (max-width: 620px) { .sal-proj-fld { grid-column: span 1; } .spm-grid { grid-template-columns: 1fr; } }

/* ==========================================================
 * 报价单导入（QuoteImport） · m4?? 2026-11-03
 * 拖拽区 / 队列 / 预览确认 / OCR 状态
 * ========================================================== */
.qi-zone { border: 1px dashed var(--border-dark); background: #fbfcfe; border-radius: 8px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12px; color: var(--text-sub); transition: border-color .15s, background .15s; }
.qi-zone-compact { margin: 6px 0 8px; }
.qi-zone.qi-over { border-color: var(--brand); background: var(--brand-light); }
.qi-zone-ic { font-size: 15px; }
.qi-zone-txt { flex: 1 1 260px; min-width: 180px; }
.qi-zone .qi-pick { position: relative; display: inline-flex; align-items: center; padding: 3px 10px; border: 1px solid var(--border); background: #fff; color: var(--text); border-radius: 6px; cursor: pointer; font-size: 12px; white-space: nowrap; }
.qi-zone .qi-pick:hover { border-color: var(--brand); color: var(--brand); }
.qi-zone .qi-pick input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; left: 0; top: 0; }

.modal.qi-modal { width: 1180px; max-width: 97vw; }
.modal.qi-modal .modal-body { max-height: 76vh; overflow: auto; }
.qi-hint { margin-bottom: 8px; color: var(--text-sub); font-size: 12px; line-height: 1.6; }
.qi-note { margin-top: 6px; color: var(--text-mute); font-size: 11px; }
.qi-empty { padding: 14px; text-align: center; color: var(--text-mute); font-size: 12px; background: #fbfcfe; border: 1px dashed var(--border); border-radius: 8px; }
.qi-queue { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.qi-q-item { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); border-radius: 7px; padding: 7px 9px; background: #fff; }
.qi-q-item.qi-q-off { opacity: .55; }
.qi-q-main { flex: 1 1 auto; min-width: 0; }
.qi-q-name { font-size: 12px; font-weight: 600; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; word-break: break-all; }
.qi-q-name .muted { font-weight: 400; color: var(--text-mute); font-size: 11px; }
.qi-q-st { font-size: 11px; color: var(--text-sub); margin-top: 2px; line-height: 1.5; }
.qi-q-st.qi-st-ok { color: var(--success); }
.qi-q-st.qi-st-run { color: var(--brand); }
.qi-q-st.qi-st-warn { color: #b54708; }
.qi-q-st.qi-st-err { color: var(--danger); }
.qi-q-ops { flex: 0 0 auto; display: flex; align-items: center; gap: 10px; }
.qi-q-ops .qi-check { font-size: 11px; color: var(--text-sub); white-space: nowrap; }
.qi-prog { height: 4px; background: #eef1f6; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.qi-prog i { display: block; height: 100%; background: var(--brand); transition: width .2s; }
.qi-chip { display: inline-block; padding: 0 6px; border: 1px solid var(--border); border-radius: 10px; font-size: 10px; color: var(--text-sub); background: #f7f9fc; line-height: 1.7; }
.qi-chip-ok { color: var(--success); border-color: #b9e9d2; background: var(--success-bg); }
.qi-ocr-badge { display: inline-block; padding: 0 6px; border-radius: 10px; background: #eef3ff; color: var(--brand); font-size: 10px; line-height: 1.7; }
.qi-link { border: 0; background: none; color: var(--brand); cursor: pointer; font-size: 11px; padding: 0; }
.qi-link:hover { text-decoration: underline; }
.qi-link.qi-del { color: var(--danger); }
.qi-check { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.qi-check input { accent-color: var(--brand); }

.qi-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 8px; padding-bottom: 6px; }
.qi-tab { border: 1px solid var(--border); background: #fff; border-radius: 6px; padding: 3px 9px; font-size: 11px; cursor: pointer; color: var(--text-sub); max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qi-tab.on { border-color: var(--brand); color: var(--brand); background: var(--brand-light); font-weight: 600; }
.qi-pv-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.qi-pv-head b { font-size: 13px; word-break: break-all; }
.qi-pv-status { font-size: 11px; }
.qi-warn { margin: 5px 0; padding: 5px 8px; border-radius: 6px; background: var(--warn-bg); border: 1px solid #f7d9a8; color: #9a5b00; font-size: 11px; line-height: 1.55; }
.qi-warn-red { background: var(--danger-bg); border-color: #f6c3bd; color: #a4251d; }
.qi-target { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 6px 0 8px; font-size: 12px; }
.qi-target select { max-width: 360px; }
.qi-pv-scroll { margin-top: 4px; }
.qi-pv-title { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12px; font-weight: 600; margin: 10px 0 5px; }
.qi-pv-title .muted { font-weight: 400; font-size: 11px; color: var(--text-mute); }
.qi-inline { margin-left: auto; font-size: 11px; font-weight: 400; display: inline-flex; align-items: center; gap: 5px; }
.qi-field-table, .qi-actor-table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.qi-field-table th, .qi-actor-table th { background: #f6f8fb; color: var(--text-sub); font-weight: 600; text-align: left; padding: 4px 6px; border: 1px solid var(--border); white-space: nowrap; }
.qi-field-table td, .qi-actor-table td { border: 1px solid var(--border); padding: 3px 6px; vertical-align: middle; }
.qi-field-table tr.qi-row-miss td { background: #fffbe8; }
.qi-field-table tr.qi-row-low td { background: #fff8e6; }
.qi-k { width: 120px; color: var(--text-sub); white-space: nowrap; }
.qi-left { width: 34%; color: var(--text); word-break: break-all; }
.qi-right { width: 40%; }
.qi-right input, .qi-right select, .qi-right textarea { width: 100%; font-size: 11.5px; padding: 2px 5px; }
.qi-right textarea { resize: vertical; }
.qi-src { font-size: 10px; color: var(--text-mute); line-height: 1.4; margin-top: 1px; }
.qi-miss-tag { display: inline-block; padding: 0 5px; border-radius: 4px; background: #fff3cd; color: #8a6100; font-size: 10px; }
.qi-req { color: var(--danger); margin-left: 2px; }
.qi-actor-table td input, .qi-actor-table td select { width: 100%; min-width: 54px; font-size: 11px; padding: 1px 4px; }
.qi-actor-table td .qi-miss { background: #fff3cd; border-color: #e8c76a; }
.qi-model-cell { min-width: 96px; }
.qi-summary { margin-top: 10px; padding: 7px 9px; border: 1px solid var(--border); border-radius: 7px; background: #f9fbfe; font-size: 11.5px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.qi-summary .qi-check { margin-left: auto; }
.qi-red { color: var(--danger) !important; font-weight: 700; }
.qi-ro { color: var(--text-mute); font-size: 11px; }
.qi-empty-cell { text-align: center; color: var(--text-mute); padding: 10px !important; }
@media (max-width: 900px) {
  .modal.qi-modal { width: 98vw; }
  .qi-left, .qi-right { width: auto; }
  .qi-field-table { display: block; overflow-x: auto; }
  .qi-summary .qi-check { margin-left: 0; }
}
.qi-low-tag { display: inline-block; margin-left: 6px; padding: 0 5px; border-radius: 3px; background: #fff3cd; color: #8a6d3b; border: 1px solid #f0d98a; font-size: 10.5px; line-height: 16px; vertical-align: middle; white-space: nowrap; }
.qi-actor-table tr.qi-actor-low td { background: #fffbe8; }
.qi-actor-table tr.qi-actor-low td .qi-src { color: #9a7b2f; }

/* ===== m439：薪酬批量绑定项目 + 项目名单行显示 ===== */
.sal-proj-cell .sp-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 18px; }
.sal-proj-cell.is-deleted .sp-name { color: var(--danger); }
.m437-proj-name { display: inline-block; max-width: 320px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; font-weight: 600; }
.m437-del { color: var(--danger); }
.mcoop-name.m437-del { cursor: help; }
.m439-batch-note { font-size: 12px; color: #1a7f37; background: #eaf7ee; border: 1px solid #bfe3c9; border-radius: 5px; padding: 2px 8px; align-self: center; white-space: nowrap; max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.bfe-bind .bfe-proj-cur { margin-top: 7px; font-size: 12px; color: var(--text-dim); }
.bfe-bind #bfe-bind-warn { margin-top: 8px; }

/* m462：工资条「本条已手动调整」标记（只改单条快照，不回写员工档案） */
.ps-manual-mark { display:inline-block; margin-left:4px; padding:0 4px; border-radius:4px; font-size:10px; line-height:14px; color:#b26a00; background:#fff3e0; border:1px solid #ffd8a8; cursor:help; vertical-align:1px; }
.ps-edit input { height:28px; padding:2px 6px; font-size:13px; }
