:root {
  /* 对齐 wuxinyang.cn：纯白底 + 中性灰 + 蓝色强调 + 12px 圆角 + 极轻阴影 */
  --bg: #ffffff;
  --canvas: #f2f3f5; /* 页面画布：侧栏+顶栏连成一片的灰色底，内容卡片浮在其上（对齐腾讯文档企业版） */
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #f4f5f7;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --text: #0a0a0a;
  --text-2: #374151;
  --text-3: #6b7280;
  --accent: #3C83F6;
  --accent-hover: #2E6BE0;
  --accent-soft: #EDF4FE;
  --shadow: 0 1px 2px rgba(0,0,0,.03), 0 1px 3px rgba(0,0,0,.04);
  --shadow-m: 0 4px 10px rgba(0,0,0,.04), 0 2px 4px rgba(0,0,0,.03);
  --shadow-lg: 0 10px 24px rgba(0,0,0,.05), 0 4px 6px rgba(0,0,0,.03);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-l: 16px;
  /* 全站公告条高度让位（2026-10-23）：body.has-notice 时为 44px，否则 0 */
  --notice-h: 0px;
}
[data-theme="dark"] {
  --bg: #0a0a0a;
  --canvas: #0d0d0d;
  --surface: #171717;
  --surface-2: #1f1f1f;
  --surface-3: #262626;
  --border: #2a2a2a;
  --border-strong: #3a3a3a;
  --text: #fafafa;
  --text-2: #d4d4d4;
  --text-3: #9ca3af;
  --accent: #3C83F6;
  --accent-hover: #3C83F6;
  --accent-soft: #15233b;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.4);
  --shadow-m: 0 4px 10px rgba(0,0,0,.4), 0 2px 4px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 24px rgba(0,0,0,.6);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; font-size: 14px; }
/* 让 [hidden] 真正生效：作者样式（.app-shell / .login-screen 用 display:grid）
   与 UA 的 [hidden]{display:none} 同优先级时会胜出，导致 hidden 属性无效 → 全屏错位 */
[hidden] { display: none !important; }

/* ---------- Login ---------- */
.login-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background:
  radial-gradient(1200px 600px at 50% -10%, var(--accent-soft), transparent 60%), var(--bg); padding: 40px 20px 80px; position: relative; }
/* 品牌脚注：钉在登录容器（整页）底部——卡片矮时即视口底部；卡片高时在页面最底，padding-bottom 80px 保证不与卡片重叠 */
.login-screen .login-foot { position: absolute; left: 0; right: 0; bottom: 24px; text-align: center; }
.login-card {
  width: 380px; max-width: 92vw; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 40px 34px; box-shadow: var(--shadow-lg);
}
.login-card .sub { color: var(--text-3); margin: 6px 0 24px; font-size: 13px; line-height: 1.55; }
.login-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 26px; }
.login-brand .brand-mark { width: 34px; height: 34px; border-radius: var(--radius-sm); background: #000 url(/img/logo-mark.png) center/cover no-repeat; color: transparent; display: grid; place-items: center; font-weight: 700; }
.login-brand .brand-name { font-weight: 600; font-size: 17px; letter-spacing: -.3px; }
.login-divider { display: flex; align-items: center; gap: 12px; color: var(--text-3); font-size: 12px; margin: 22px 0 16px; }
.login-divider::before, .login-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.login-hint { color: var(--danger, #dc2626); font-size: 12px; margin: 4px 0 0; min-height: 0; }
.btn.feishu { background: #3C83F6; color: #fff; border-color: #3C83F6; }
.btn.feishu:hover { background: #2E6BE0; border-color: #2E6BE0; }
.btn.feishu .fs-logo { display: inline-block; width: 22px; height: 22px; vertical-align: -4px; border-radius: 5px; }
/* 飞书主入口（登录页顶部最大按钮） */
.btn.feishu.feishu-primary { width: 100%; justify-content: center; padding: 13px 16px; font-size: 15px; font-weight: 600; border-radius: 10px; box-shadow: 0 4px 14px rgba(60,131,246,.22); margin-top: 12px; }
.btn.feishu.feishu-primary:hover { box-shadow: 0 6px 18px rgba(60,131,246,.28); transform: translateY(-1px); transition: all .15s ease; }
/* 设计师登录主入口（与 .feishu-primary 同尺寸，浅色对比） */
.btn.email-primary { width: 100%; justify-content: center; padding: 13px 16px; font-size: 15px; font-weight: 600; border-radius: 10px; background: var(--surface); color: var(--text); border-color: var(--border); margin-top: 8px; box-shadow: var(--shadow); }
.btn.email-primary:hover { border-color: var(--accent); color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); transition: all .15s ease; }
/* 密码登录视图的"返回飞书登录"链接 */
.login-back { display: block; width: 100%; text-align: center; margin-top: 16px; background: none; border: none; color: var(--text-3); font-size: 13px; cursor: pointer; padding: 6px 0; }
.login-back:hover { color: var(--accent); }
/* 邀请码注册入口（主入口分割线下方） */
.btn.login-reg-btn { width: 100%; justify-content: center; padding: 11px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; }
.btn.login-reg-btn .ic-svg { width: 16px; height: 16px; }
/* 魔法链接已发送态 */
.login-sent { text-align: center; padding: 8px 0 0; }
.login-sent-ic { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.login-sent-ic .ic-svg { width: 26px; height: 26px; }
.login-sent-title { font-size: 16px; font-weight: 600; margin-bottom: 5px; }
.login-sent-to { color: var(--text-3); font-size: 13px; margin-bottom: 20px; word-break: break-all; }
.login-sent .btn { width: 100%; justify-content: center; margin-top: 8px; }
a.btn.login-dev-link { text-decoration: none; }
/* 邀请码预校验状态徽章 */
.invite-state { min-height: 0; margin-top: 6px; }
.invite-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--bg-2, #f4f4f5); color: var(--text-3); }
.invite-badge .ic-svg { width: 13px; height: 13px; }
.invite-badge.ok { background: #ecfdf5; color: #059669; }
.invite-badge.bad { background: #fef2f2; color: #dc2626; }
[data-theme="dark"] .invite-badge.ok { background: rgba(5,150,105,.16); }
[data-theme="dark"] .invite-badge.bad { background: rgba(220,38,38,.16); }
.login-card input[readonly] { background: var(--bg-2, #f4f4f5); color: var(--text-2); cursor: default; }

/* ---------- 飞书配置开关 ---------- */
.switch-field { display: flex; align-items: center; gap: 4px; }
.switch-field label { margin-bottom: 0; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; inset: 0; cursor: pointer; background: #d0d3d9; border-radius: 24px; transition: .2s; }
.switch .slider::before { content: ''; position: absolute; height: 18px; width: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; }
.switch input:checked + .slider { background: var(--accent); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.fs-steps { margin: 0; padding-left: 18px; color: var(--text-2); font-size: 13px; line-height: 1.9; }
.fs-steps li { margin-bottom: 2px; }
.ml8 { margin-left: 8px; }

/* ---------- 侧栏头像（飞书头像图）---------- */
.avatar .avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }


/* ---------- App shell ---------- */
/* 布局对齐腾讯文档企业版：侧栏与顶栏共用同一灰色画布（无分隔线），主内容为白色圆角卡片浮于其上 */
.app-shell { display: grid; grid-template-columns: 188px 1fr; height: calc(100vh - var(--notice-h)); overflow: hidden; background: var(--canvas); }
/* 有公告时：body 用 padding-top 让位（margin 会与 body 发生折叠导致页面多出 44px 可滚动白底，2026-10-23 修复） */
body.has-notice { --notice-h: 44px; padding-top: var(--notice-h); }

/* ---------- 全站公告条（2026-10-23）：主站最顶部蓝色提示条，多条公告上下轮播，可点 × 关闭 ---------- */
#notice-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 44px;
  z-index: 50; /* 低于 modal(70)/scrim(55)，高于常规内容 */
  background: linear-gradient(90deg, #2E6BE0, #3C83F6);
  color: #fff; display: flex; align-items: center; overflow: hidden;
  font-size: 13px; box-shadow: 0 1px 3px rgba(0,0,0,.12);
}
#notice-bar[hidden] { display: none; }
#notice-bar .nb-track-wrap { flex: 1; height: 100%; overflow: hidden; }
#notice-bar .nb-track { height: 100%; transition: transform .4s ease; }
#notice-bar .nb-item {
  height: 44px; display: flex; align-items: center; justify-content: center;
  padding: 0 44px 0 16px; /* 右侧留出关闭按钮位置 */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
#notice-bar .nb-text { overflow: hidden; text-overflow: ellipsis; }
#notice-bar a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
#notice-bar a:hover { opacity: .88; }
#notice-bar .nb-close {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  width: 26px; height: 26px; border: none; border-radius: 6px; cursor: pointer;
  background: transparent; color: #fff; padding: 0;
  display: flex; align-items: center; justify-content: center; flex: none;
}
#notice-bar .nb-close svg { width: 14px; height: 14px; display: block; }
#notice-bar .nb-close:hover { background: rgba(255,255,255,.18); }
.sidebar {
  background: transparent; border-right: none;
  display: flex; flex-direction: column; padding: 20px 14px 0; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 8px; padding: 6px 8px 18px; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: #000 url(/img/logo-mark.png) center/cover no-repeat; color: transparent; display: grid; place-items: center; font-weight: 700; font-size: 14px; flex: none; }
.brand-name { font-weight: 700; font-size: 14.5px; letter-spacing: -.2px; white-space: nowrap; }
/* 账号弹窗（头像触发：切换/查看设计师视角） */
.acct-body { padding: 18px 22px; }
.acct-card { display: flex; align-items: center; gap: 12px; }
.acct-card .avatar { width: 48px; height: 48px; font-size: 18px; flex: none; }
.acct-info { min-width: 0; }
.acct-name { font-weight: 600; font-size: 15px; color: var(--text); }
.acct-role { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.acct-tip { margin: 14px 0 0; font-size: 12.5px; color: var(--text-3); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; line-height: 1.5; }
.acct-list { display: flex; flex-direction: column; gap: 6px; max-height: 56vh; overflow: auto; padding: 2px; }
.acct-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 8px 10px; cursor: pointer; font-family: inherit; color: var(--text); transition: .15s; }
.acct-item:hover { border-color: var(--accent); background: var(--surface-2); }
.acct-item .avatar { width: 34px; height: 34px; font-size: 14px; flex: none; }
.acct-item-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.acct-item-name { font-weight: 600; font-size: 13.5px; line-height: 1.3; }
.acct-item-sub { font-size: 11.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.acct-cur { font-size: 11px; color: var(--accent); flex: none; }
.acct-empty { color: var(--text-3); font-size: 13px; text-align: center; padding: 22px; }
.nav { display: flex; flex-direction: column; gap: 6px; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 11px 12px; border-radius: var(--radius-sm); min-height: 44px;
  color: var(--text-3); font-weight: 500; font-size: 14px; border: none; background: none; width: 100%; text-align: left; transition: .15s;
}
.nav-item:hover { background: var(--accent-soft); color: var(--accent); }
.nav-item.active { background: var(--accent); color: #fff; font-weight: 600; box-shadow: var(--shadow-m); }
.ic-svg { width: 19px; height: 19px; display: inline-block; vertical-align: -0.2em; flex: none; }
.nav-item .ic { width: 19px; height: 19px; display: inline-flex; align-items: center; justify-content: center; opacity: .9; }

/* ---------- 顶栏：右上角用户区（对齐 052b 子站样式） ---------- */
.main { display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.topbar {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  height: 56px; flex: none; padding: 0 20px;
  background: transparent; border-bottom: none;
}
.topbar .hamburger { margin: 0; align-self: center; }
.topbar-user { position: relative; margin-left: auto; display: flex; align-items: center; }
/* ---------- 全局搜索（对齐腾讯文档：范围标签 + 下拉分类结果） ---------- */
.gsearch {
  position: relative; flex: 1; max-width: 720px; margin-right: 24px; min-width: 0;
  display: flex; align-items: center; gap: 8px;
  height: 38px; padding: 0 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  transition: border-color .15s, box-shadow .15s;
}
.gsearch:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
/* 范围标签：灰色常规体（2026-10-08 改，不加粗） */
.gs-scope { font-size: 12.5px; font-weight: 400; color: var(--text-3); background: var(--surface-2); border-radius: 999px; padding: 4px 12px; white-space: nowrap; cursor: pointer; position: relative; }
.gs-scope:hover { color: var(--text-2); }
.gs-scope-menu {
  position: absolute; top: calc(100% + 10px); left: -8px; z-index: 90;
  min-width: 128px; padding: 5px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: var(--shadow-lg);
}
.gs-scope-item {
  display: block; width: 100%; padding: 8px 12px; border: none; background: none;
  border-radius: 7px; font-family: inherit; font-size: 13px; color: var(--text);
  text-align: left; cursor: pointer;
}
.gs-scope-item:hover { background: var(--surface-2); }
.gs-scope-item.active { color: var(--accent); font-weight: 600; }
.gs-sep { width: 1px; height: 16px; background: var(--border); flex: none; }
.gs-ic { width: 15px; height: 15px; color: var(--text-3); flex: none; }
.gsearch input { flex: 1; min-width: 0; border: none; outline: none; background: none; font-family: inherit; font-size: 13.5px; color: var(--text); }
.gsearch input::placeholder { color: var(--text-3); }
.gs-panel {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; z-index: 80;
  max-height: 68vh; overflow-y: auto; padding: 6px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-width: calc(100vw - 32px); /* 防窗口溢出 */
}
/* 空态面板：搜索指定内容（标签）+ 搜索历史（2026-10-08 对齐腾讯文档） */
.gs-sect-t { display: flex; align-items: center; justify-content: space-between; padding: 12px 12px 6px; font-size: 12px; color: var(--text-3); }
.gs-tags { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 12px 12px; border-bottom: 1px solid var(--border); }
.gs-tag {
  padding: 5px 12px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 8px;
  font-family: inherit; font-size: 12.5px; color: var(--text-2); cursor: pointer; transition: .15s;
}
.gs-tag:hover { border-color: var(--accent); color: var(--accent); }
.gs-tag.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.gs-hist-acts { display: flex; gap: 14px; }
.gs-hist-more, .gs-hist-clear { border: none; background: none; font-family: inherit; font-size: 12px; color: var(--text-3); cursor: pointer; padding: 0; }
.gs-hist-more:hover, .gs-hist-clear:hover { color: var(--accent); }
.gs-hist-ic { width: 15px; height: 15px; color: var(--text-3); flex: none; display: inline-flex; }
.gs-hist-ic svg { width: 100%; height: 100%; }
.gs-hist-item .gs-item-name { color: var(--text-2); }
.gs-group-t { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px 4px; font-size: 12px; color: var(--text-3); }
.gs-item {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 12px;
  border: none; background: none; border-radius: 8px; cursor: pointer; text-align: left; font-family: inherit;
}
.gs-item:hover, .gs-item.hl { background: var(--surface-2); }
.gs-item-ic { width: 30px; height: 30px; border-radius: 8px; flex: none; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: #fff; }
.gs-item-main { min-width: 0; flex: 1; }
.gs-item-name { font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-item-name mark, .gs-item-sub mark { background: none; color: var(--accent); font-weight: 600; padding: 0; }
.gs-item-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-empty { padding: 28px 12px; text-align: center; font-size: 13px; color: var(--text-3); }
.gs-foot { padding: 8px 12px 6px; border-top: 1px solid var(--border); margin-top: 4px; font-size: 11.5px; color: var(--text-3); display: flex; justify-content: space-between; }
@media (max-width: 768px) {
  .gsearch { margin-right: 8px; }
  .gs-scope { display: none; }
  .gs-sep { display: none; }
}
.topbar-avatar {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 8px;
  background: none; border: none; border-radius: 10px; cursor: pointer; font-family: inherit;
  transition: .15s;
}
.topbar-avatar:hover { background: var(--surface-2); }
/* 尺寸严格对齐 052b 子站 .userbox：头像 26×26 圆形、名字 13.5px/600 */
.topbar-avatar .avatar { width: 26px; height: 26px; font-size: 12px; }
.topbar-avatar-name { font-weight: 600; font-size: 13.5px; color: var(--text); max-width: 9em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 顶栏「管理后台」按钮（头像左侧，仅管理员可见；管理后台视图中显示「返回主站」） */
.topbar-admin {
  display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; padding: 5px 6px;
  background: none; border: none; cursor: pointer; line-height: 1;
  font-family: inherit; font-size: 13px; font-weight: 500; color: var(--text-2); transition: .15s;
}
.topbar-admin .ic-svg { width: 15px; height: 15px; flex: none; display: block; vertical-align: baseline; }
.topbar-admin:hover { background: var(--surface-2); color: var(--text); border-radius: 8px; }
.user-menu {
  position: absolute; top: calc(100% + 8px); right: 0; z-index: 70;
  min-width: 216px; padding: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow-lg);
}
.um-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.um-head .avatar { width: 38px; height: 38px; font-size: 15px; flex: none; }
.um-head-main { display: flex; flex-direction: column; min-width: 0; }
.um-name { font-weight: 600; font-size: 13.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.um-role { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.um-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border: none; background: none; border-radius: 8px;
  font-family: inherit; font-size: 13.5px; color: var(--text); text-align: left; cursor: pointer; transition: .15s;
}
.um-item:hover { background: var(--surface-2); }
.um-item .ic-svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.um-item.danger { color: var(--danger, #d92d20); }
.um-item.danger .ic-svg { color: var(--danger, #d92d20); }
.um-value { margin-left: auto; font-size: 12px; color: var(--text-3); }
.um-sep { height: 1px; background: var(--border); margin: 6px 4px; }

.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; }
/* 头像图加载失败时的首字 fallback（feishu 存储 URL 在外站拿不到图，监听器替换为 span） */
.avatar .av-fb, .dsr-av .av-fb, .cm-av .av-fb, .pend-avatar .av-fb { color: inherit; line-height: 1; font-weight: inherit; }
.view {
  padding: 28px; overflow: auto; flex: 1; min-height: 0;
  background: var(--surface); border: 1px solid var(--border); border-bottom: none;
  /* 底部不收边：白区直通视口底部（无限延伸观感），仅上侧保留圆角与灰边（对齐腾讯文档） */
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  margin: 0 16px 0; box-shadow: var(--shadow);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-weight: 500; font-size: 13px; transition: .12s; min-height: 40px;
  white-space: nowrap; /* 防止按钮文字在窄宽下断行破坏样式（特别是带 (N) 或较长中文文本时） */
}
.btn:hover { border-color: var(--border-strong); background: var(--surface-2); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn:active { transform: scale(.98); }
/* 统一所有 .btn 内的 SVG icon 大小（避免不同 SVG viewBox 自然显示导致尺寸差异） */
.btn .ic-svg { width: 14px; height: 14px; flex: none; }
.btn.sm { padding: 0 12px; font-size: 12px; line-height: 1; border-radius: 7px; height: 28px; min-height: 28px; box-sizing: border-box; }
.btn.sm .ic-svg { width: 14px; height: 14px; }
.btn.danger { color: #dc2626; border-color: #fca5a5; }
.btn.danger:hover { background: #fef2f2; }
.btn.ghost { background: var(--surface-2); border-color: var(--border-strong); color: var(--text-2); }
.btn.ghost:hover { background: var(--surface); color: var(--text); }
.ghost-btn { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; color: var(--text-3); font-size: 12.5px; padding: 6px 8px; border-radius: var(--radius-sm); line-height: 1; }
.ghost-btn:hover { background: var(--surface-2); color: var(--text); }
.ghost-btn.icon-only { padding: 6px; border-radius: 8px; }
.ghost-btn.icon-only .ic-svg { width: 18px; height: 18px; }

/* ---------- Cards & grids ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 16px; }
.page-head h2 { font-size: 20px; font-weight: 600; letter-spacing: -.4px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ---------- Filter bar (物料清单页) ---------- */
.filter-bar { display: flex; align-items: center; gap: 14px; margin: 0 0 18px; flex-wrap: wrap; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chip {
  appearance: none; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: 13px; font-weight: 500;
  padding: 7px 16px; border-radius: 999px; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, box-shadow .15s;
  line-height: 1.4; white-space: nowrap;
}
.filter-chip:hover { color: var(--text); border-color: var(--border-strong); background: var(--bg-2, var(--surface)); }
.filter-chip.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
  box-shadow: 0 1px 3px rgba(60,131,246, 0.18);
}
.filter-divider { width: 1px; height: 22px; background: var(--border); flex: none; }

.filter-dropdown { position: relative; }
.filter-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 10px; cursor: pointer;
  background: var(--surface); border: 1.5px solid var(--accent); color: var(--accent);
  font-size: 13px; font-weight: 500; line-height: 1.4; white-space: nowrap;
  transition: background .15s, color .15s;
}
.filter-trigger:hover { background: var(--accent-soft); }
.filter-trigger .ic-svg { width: 16px; height: 16px; flex: none; }
.filter-trigger .ic-svg:last-child { width: 14px; height: 14px; opacity: .8; }
.filter-menu {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 30;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 5px; min-width: 140px;
  box-shadow: var(--shadow-m, var(--shadow-lg, 0 4px 24px rgba(15,23,42,.12)));
  display: none;
}
.filter-menu.open { display: block; }
.filter-menu-item {
  appearance: none; border: none; background: transparent; cursor: pointer;
  width: 100%; text-align: left;
  padding: 8px 12px; border-radius: 6px; font-size: 13px; color: var(--text-2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: background .12s, color .12s;
}
.filter-menu-item:hover { background: var(--accent-soft); color: var(--text); }
.filter-menu-item.selected { color: var(--accent); font-weight: 600; }
.filter-menu-item.selected::after { content: '✓'; color: var(--accent); font-weight: 700; }

/* 空状态（无匹配筛选时） */
.grid.empty-grid { display: block; padding: 60px 0; }
.empty-state { text-align: center; color: var(--text-3); }
.empty-state .big { width: 48px; height: 48px; opacity: .55; margin: 0 auto 14px; }
.empty-state .big .ic-svg { width: 48px; height: 48px; }

/* ---------- Badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
/* 状态 chip 行内化（与 .code-chip 同款少圆角；定义在 .badge 之后以覆盖其默认） */
.status-badge { border-radius: 6px; padding: 3px 10px; }
.status-badge.sc-active { color: #059669; background: #ecfdf5; }
.status-badge.sc-archived { color: #a1a1aa; background: #f4f4f5; }

/* 状态列行内编辑下拉：点击徽章展开菜单，参考 image 2 的小下拉风格 */
.status-dd { position: relative; display: inline-block; }
.status-badge-editable { cursor: pointer; border: 1px solid transparent; transition: border-color .12s, box-shadow .12s; }
.status-badge-editable:hover { border-color: var(--border); }
.status-badge-editable[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.status-dd-menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 60;
  min-width: 112px; padding: 3px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10), 0 2px 6px rgba(15, 23, 42, 0.05);
}
/* 清单详情页 head 的下拉：portal 到 body、fixed 定位，避免被 .view 的 overflow:auto 裁剪 */
.inline-status-dd .status-dd-menu, .inline-code-menu { position: fixed; z-index: 9999; }
/* portal 后 menu 不再是 .inline-status-dd 后代，上面的选择器失效；这里用独立类再写一次兜底（JS 也会 inline 设 z-index，双保险） */
.inline-status-menu, .inline-code-menu { position: fixed; z-index: 9999; }
.status-dd-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 9px;
  border: none; background: none; cursor: pointer; font-size: 12.5px;
  color: var(--text); border-radius: 7px; text-align: left;
}
.status-dd-item:hover { background: var(--surface-2); }
.status-dd-item.selected { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.status-dd-item .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }

/* ===== 优先级列：白字彩色圆形徽章 + 下拉（高=红 中=橙 低=绿） ===== */
.prio-dd { position: relative; display: inline-block; }
.prio-badge {
  cursor: pointer; border: none; padding: 0; border-radius: 50%;
  width: 19px; height: 19px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #fff; line-height: 1;
  transition: filter .12s, box-shadow .12s;
}
.prio-badge:hover { filter: brightness(.94); }
.prio-badge[aria-expanded="true"] { box-shadow: 0 0 0 3px var(--accent-soft); }
.prio-dd-menu {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 60;
  min-width: 96px; padding: 3px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10), 0 2px 6px rgba(15, 23, 42, 0.05);
}
.prio-dd-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 9px;
  border: none; background: none; cursor: pointer; font-size: 12.5px;
  color: var(--text); border-radius: 7px; text-align: left;
}
.prio-dd-item:hover { background: var(--surface-2); }
.prio-dd-item.selected { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.prio-dd-item .dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }

/* 导出下拉菜单（白色系按钮 + 右侧展开面板） */
.export-dd { position: relative; display: inline-block; }
.export-trigger { display: inline-flex; align-items: center; gap: 4px; }
.export-trigger .ic-svg { width: 15px; height: 15px; }
.export-trigger .caret { width: 13px; height: 13px; opacity: .65; margin-left: -2px; }
.export-dd-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 80;
  min-width: 210px; padding: 4px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, .12), 0 2px 8px rgba(15, 23, 42, .06);
}
.export-item {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px;
  border: none; background: none; cursor: pointer; font-size: 13px;
  color: var(--text); border-radius: 7px; text-align: left;
}
.export-item:hover { background: var(--surface-2); }
.export-item .ic-svg { width: 16px; height: 16px; color: var(--accent); flex: 0 0 16px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow); transition: .14s;
}
.card.hover:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-m); }
.project-card { cursor: pointer; position: relative; }
.project-card .pc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.project-card .pc-top > div:first-child { flex: 1 1 auto; min-width: 0; }
.project-card h3 { font-size: 15.5px; font-weight: 600; letter-spacing: -.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1 1 auto; min-width: 0; }
.project-card .client { color: var(--text-3); font-size: 12.5px; margin-top: 3px; }
.project-card .meta { display: flex; gap: 14px; margin-top: 16px; color: var(--text-2); font-size: 12.5px; }
.project-card .meta b { color: var(--text); font-weight: 600; }
.project-card .pc-date { display: flex; align-items: center; gap: 5px; margin-top: 10px; font-size: 12px; }
.project-card .pc-date .ic-svg { width: 13px; height: 13px; flex: none; color: var(--text-3); }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }

/* 分类列：单选，彩色胶囊（线上=蓝，线下=红） */
.cat-cell { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }
.cat-pill { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.cat-pill.online { color: #3C83F6; background: #EDF4FE; }
.cat-pill.offline { color: #dc2626; background: #fef2f2; }
/* 分类单选编辑浮窗的切换芯片 */
.inline-edit-popover.cat-edit-popover { padding: 6px; min-width: 0; max-width: 96px; width: 96px; }
.cat-chip-list { display: flex; flex-direction: column; gap: 4px; align-items: stretch; }
.cat-chip { display: flex; align-items: center; justify-content: center; padding: 6px 8px; min-width: 0; width: 100%; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .12s; }
.cat-chip:hover { border-color: var(--accent); }
.cat-chip.on.online { color: #3C83F6; background: #EDF4FE; border-color: #3C83F6; }
.cat-chip.on.offline { color: #dc2626; background: #fef2f2; border-color: #dc2626; }
.cat-chip.on.cat-clear { color: var(--text-2); background: var(--surface-2); border-color: var(--border); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.7; white-space: nowrap; }
.tag + .tag { margin-left: 5px; }
.tag-spread { color: var(--accent); background: var(--accent-soft); }
.tag-activity { color: #d97706; background: #fffbeb; }
.code-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 7px; font-size: 11.5px; font-weight: 600; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.code-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--accent-soft); color: var(--accent); white-space: nowrap; }
.code-chip-wrap { display: flex; gap: 8px; align-items: center; }

/* 清单详情页 head 行内编辑（owner 可点即编辑：名称 / 关联项目 / 状态） */
/* 统一规范：hover → 灰色下划线；focus（进入编辑）→ 蓝色下划线 + 蓝色光标； */
/* caret 不超过下划线：通过 line-height 紧凑 + offset 2px 让光标基线紧贴 underline */
.page-head .inline-edit-text {
  cursor: text;
  outline: none;
  background: transparent !important;
  box-shadow: none !important;
  border-radius: 0;
  padding: 0;
  margin: 0;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
  transition: text-decoration-color .12s;
}
.page-head .inline-edit-text:hover {
  text-decoration-color: var(--text-3); /* 灰色 hover，提示可编辑 */
}
.page-head .inline-edit-text:focus {
  text-decoration-color: var(--accent); /* 蓝色 focus，正式进入编辑 */
  caret-color: var(--accent);
}
.page-head .inline-edit-text:empty::before {
  content: attr(data-placeholder); color: var(--text-3); pointer-events: none;
}
.page-head h2.inline-edit-text:empty::before { content: '点击命名清单…'; }
.page-head .code-chip-editable {
  cursor: pointer; border: 1px solid transparent; transition: border-color .12s, box-shadow .12s;
}
.page-head .code-chip-editable:hover { border-color: var(--accent); }
.page-head .code-chip-editable[aria-expanded="true"] { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.page-head .code-chip-empty { background: transparent; color: var(--text-3); border: 1px dashed var(--border); }
/* ⚠️ 2026-09-10 移除 .code-chip-sync-btn 与 dh-spin keyframes：关联项目改为实时拉取上游，去掉手动同步按钮。 */
.page-head .inline-status-dd { position: relative; display: inline-block; }
.inline-code-menu {
  min-width: 320px; max-width: 400px; padding: 4px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.10), 0 2px 6px rgba(15, 23, 42, 0.05);
  display: flex; flex-direction: column; max-height: 360px; overflow: hidden;
}
.inline-code-search { padding: 2px 4px 6px; border-bottom: 1px solid var(--border); flex: 0 0 auto; }
.inline-code-search-input {
  width: 100%; padding: 6px 10px; font-size: 12.5px; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px;
  outline: none; font-family: inherit;
}
.inline-code-search-input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.inline-code-list { overflow-y: auto; overflow-x: hidden; padding: 2px; flex: 1 1 auto; min-height: 0; }
.inline-code-item {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 9px;
  border: none; background: none; cursor: pointer; font-size: 12.5px;
  color: var(--text); border-radius: 7px; text-align: left;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.inline-code-item:hover { background: var(--surface-2); }
.inline-code-item.selected { background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.inline-code-item.muted { color: var(--text-3); }
.inline-code-empty { padding: 14px 12px; text-align: center; color: var(--text-3); font-size: 12px; }

/* ---------- Tables / item list ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; overflow-y: hidden; padding-bottom: 1px; }
/* 细线滚动条（原 10px 粗灰条）：轨道透明 + 4px 细滑块，hover 加深 */
.panel { scrollbar-width: thin; scrollbar-color: rgba(15, 23, 42, .20) transparent; }
.panel::-webkit-scrollbar { height: 4px; width: 4px; }
.panel::-webkit-scrollbar-track { background: transparent; }
.panel::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, .18); border-radius: 2px; }
.panel::-webkit-scrollbar-thumb:hover { background: rgba(15, 23, 42, .34); }
.row .source-cell { display: flex; align-items: center; gap: 3px; justify-content: center; min-width: 0; }
.row .source-cell.muted { color: var(--text-3); font-size: 13px; }
.row .src-link { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); text-decoration: none; font-size: 12px; max-width: 100%; }
.row .src-link:hover { text-decoration: underline; }
.row .src-link .ic-svg { width: 14px; height: 14px; flex: none; }
.row .src-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 74px; }
.row .src-x { border: none; background: transparent; color: var(--text-3); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 2px; }
.row .src-x:hover { color: #dc2626; }
.row .ref-btn .src-add { font-size: 12px; font-weight: 600; line-height: 1.5; margin-left: 0; }

/* 源文件缩略图（参考交付物列）：首文件格式色块+格式 / 图片缩略图 + 右下角张数角标（显示总张数 N，去掉 + 号）。1:1 正方形与交付物列对齐 */
.row .src-thumb-cell { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; }
.row .src-thumb-box {
  position: relative; width: 52px; height: 52px; flex: none; cursor: pointer; border-radius: 8px; overflow: hidden;
}
.row .src-thumb-box .thumb {
  width: 52px; height: 52px; border-radius: 8px; background-size: cover; background-position: center;
  background-color: var(--border); border: 1px solid var(--border); transition: transform .15s ease, filter .15s ease;
}
.row .src-thumb-box .thumb.src-img-thumb { background-color: var(--border); }
.row .src-thumb-box .thumb.doc-thumb { display: grid; place-items: center; font-size: 11px; font-weight: 700; letter-spacing: .2px; color: #fff; border-color: transparent; border-radius: 8px; }
.row .src-thumb-box .thumb.src-doc-pdf  { background: #DC2626; }
.row .src-thumb-box .thumb.src-doc-ppt  { background: #D97706; }
.row .src-thumb-box .thumb.src-doc-doc  { background: #3C83F6; }
.row .src-thumb-box .thumb.src-doc-xls  { background: #16a34a; }
.row .src-thumb-box .thumb.src-doc-zip  { background: #6b7280; }
.row .src-thumb-box .thumb.src-doc-design { background: #7c3aed; }
.row .src-thumb-box .thumb.src-doc-other { background: #64748b; }
.row .src-thumb-box .thumb-extra {
  position: absolute; right: 3px; bottom: 3px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: rgba(15, 23, 42, .78); color: #fff; font-size: 10.5px; font-weight: 600;
  line-height: 18px; text-align: center; letter-spacing: 0; pointer-events: none;
}
/* 源文件列空态：与交付物列 .preview-empty-inner 完全对齐的 52×52 缩略图框（icon-only，老板要求）
   复用 .src-thumb-box 的 52×52 / border-radius:8 / overflow 基础样式，只覆盖「没有 .thumb 子元素」时的
   flex 居中布局（默认 .src-thumb-box 没设 display，靠 .thumb 的位置占位 → 空态需显式 display:grid 居中 icon） */
.row .src-thumb-box.src-empty-inner {
  display: grid; place-items: center;
  border: 1px dashed var(--border-strong);
  background: var(--surface);
  color: var(--text-3);
  cursor: pointer;
  transition: border-color .12s, background .12s, color .12s;
}
.row .src-thumb-box.src-empty-inner .ic-svg { width: 16px; height: 16px; display: block; }
.row .src-thumb-box.src-empty-inner:hover { border-color: var(--accent); border-style: solid; background: var(--accent-soft); color: var(--accent); }
.row .src-thumb-box:hover .thumb { transform: scale(1.05); filter: brightness(.92); }

/* 多源文件下载弹窗：勾选列表 */
.sd-list { max-height: 60vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.sd-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: 13px; border-bottom: 1px solid var(--border); }
.sd-row:last-child { border-bottom: 0; }
.sd-check { display: inline-flex; flex: 0 0 auto; cursor: pointer; }
.sd-check input { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }
.sd-ic { flex: 0 0 auto; width: 34px; height: 24px; border-radius: 5px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; letter-spacing: .2px; cursor: pointer; transition: transform .12s, box-shadow .12s; }
.sd-ic:hover { transform: scale(1.12); box-shadow: 0 2px 8px rgba(0,0,0,.18); }
.sd-ic:active { transform: scale(1.04); }
.sd-ic.sd-img { background-size: cover; background-position: center; color: transparent; }
.sd-ic.src-doc-pdf  { background: #DC2626; }
.sd-ic.src-doc-ppt  { background: #D97706; }
.sd-ic.src-doc-doc  { background: #3C83F6; }
.sd-ic.src-doc-xls  { background: #16a34a; }
.sd-ic.src-doc-zip  { background: #6b7280; }
.sd-ic.src-doc-design { background: #7c3aed; }
.sd-ic.src-doc-other { background: #64748b; }
.sd-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; }
.sd-del { flex: 0 0 auto; border: none; background: transparent; color: var(--text-3); cursor: pointer; font-size: 16px; line-height: 1; width: 24px; height: 24px; border-radius: 6px; }
.sd-del:hover { color: #dc2626; background: rgba(220,38,38,.12); }


/* ---------- 源文件上传弹窗：拖拽 / 点击 / 粘贴 ---------- */
.dropzone {
  border: 1.5px dashed var(--border-strong, var(--border));
  border-radius: var(--radius);
  background: var(--bg);
  padding: 26px 18px;
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--accent); background: var(--accent-soft); }
.dropzone.drag { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); }
.dz-inner { display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.dz-icon { color: var(--accent); }
.dz-icon .ic-svg { width: 34px; height: 34px; }
.dz-title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.dz-sub { color: var(--text-3); }

.src-preview { margin-top: 14px; }
.src-preview.hidden { display: none; }
.src-file-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); }
.src-thumb { width: 42px; height: 42px; border-radius: 8px; object-fit: cover; flex: none; display: grid; place-items: center; background: var(--bg); color: var(--accent); }
.src-thumb.file .ic-svg { width: 20px; height: 20px; }
.src-meta { flex: 1; min-width: 0; }
.src-fname { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.src-remove { flex: none; border: none; background: transparent; color: var(--text-3); font-size: 18px; line-height: 1; width: 28px; height: 28px; border-radius: 6px; cursor: pointer; }
.src-remove:hover { color: #dc2626; background: rgba(220,38,38,.12); }

.btn.primary:disabled { opacity: .5; cursor: not-allowed; }
.btn.primary:disabled:hover { background: var(--accent); border-color: var(--accent); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn:disabled:hover { background: var(--surface); border-color: var(--border); color: var(--text); }

.row {
  display: grid; grid-template-columns: 52px 92px minmax(140px, 0.5fr) minmax(170px, 1fr) 80px 60px 56px 88px 100px 124px 108px 72px 64px 104px auto; gap: 14px; align-items: center; justify-items: stretch;
  padding: 7px 18px; border-bottom: 1px solid #d1d5db;
  /* 主表格：固定 min-width（≥ 面板宽度 且 ≥ grid 模板自然宽度 1700px），保证表头与数据行等宽对齐，
     避免 max-content 因列内图片/按钮/数字不同导致 head 窄 / data 宽、fr 列漂移。超出时 panel 横向滚动。 */
  min-width: max(100%, 1800px);
}
.row > * { min-width: 0; }
.row > .who,
.row > .ref-cell,
.row > .thumb-wrap,
.row > .source-cell,
.row > [data-edit="status"] { justify-self: stretch; min-width: 0; }
/* 末尾行保留 border-bottom：让表格末尾分割线完整延伸到 panel 边界；
   panel padding-bottom: 1px 防止最后一行 border 与 panel border 重叠造成的视觉断点 */
.row:last-child { border-bottom: 1px solid #d1d5db; }
.row.head { background-color: var(--surface-2) !important; background-clip: padding-box; box-shadow: inset 0 0 0 999px var(--surface-2); color: var(--text-3); font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.row.head > div { white-space: nowrap; background-color: var(--surface-2) !important; background-clip: padding-box; }
/* 非 sticky 表头 cell 显式声明 bg(覆盖可能的 transparent 继承)，保证 head 行整条都有 head 底色，包括最右一列「最近更新」 */
.row.head > div:not(.sticky-col) { background-color: var(--surface-2) !important; }
/* head 行底边加深，与数据行的边框视觉分开 */
.row.head { border-bottom: 1px solid #d1d5db; }
.row:hover:not(.head) { background: #f5f6f8; }

/* 前 3 列固定锁定（水平滚动时不跟随移动）—— 序号 / 物料 / 规格
   - background 必须 opaque（白色 / hover 浅灰），右缘 box-shadow 制造清晰边界
   - 防止非 sticky 列（如 内容 / 数量）横滑时透出来 */
/* ⚠️ 2026-09-10 彻底修复「表头灰色断点 / 白色没充满行高 / 灰线不连续 / drawer 白色色块」根因：
   .row { align-items: center } 让 sticky col 垂直居中，cell 高度=内容高度(19~24px) << 行高(head 33 / 数据行 67px)，
   sticky col 的不透明背景 + ::after veil 都只覆盖自身短高度 → 上下留白 + veil 上下断点 + drawer 行浅蓝上叠白色短块。
   修复：sticky col 改 align-self: stretch 填满整行 content 高度（背景与 veil 同步覆盖全高），
   内部用 flex column + justify-content:center 让内容仍垂直居中；横向对齐按列特性区分。 */
.row .sticky-col {
  position: sticky; background: var(--surface); z-index: 3;
  align-self: stretch; display: flex; flex-direction: column; justify-content: center; align-items: stretch;
  overflow: visible;
}
/* category / area：chip 与文本横向居中（不撑满宽度）；title/ctrl 用默认 stretch（文本左对齐 / ctrl-cell 内部自居中） */
.row .sticky-col.cat-cell,
.row .sticky-col.area-cell { align-items: center; }
/* area 是 sticky col：不要继承 .it-unit 的圆角胶囊 + 120ms bg 过渡
   否则行 hover 时单元会形成一块浅灰 pill，叠加到行灰底上快速 hover 出现闪烁
   ⚠️ 2026-09-10 修复：不要写 background:inherit —— 会继承 .row 的透明背景，
   把 .row .sticky-col 的不透明白底和 ::after veil 一起变透明 → 横滚时下方内容从区域列透出。
   背景交给 .row .sticky-col（surface）/ .row:hover .sticky-col（#f5f6f8）控制即可。 */
.row .sticky-col.area-cell,
.row .sticky-col.area-cell:hover {
  border-radius: 0;
  padding: 0;
  transition: none;
}
/* head 行 control 列（checkbox）横向居中 */
.row.head .sticky-col.ctrl-head { align-items: center; flex-direction: row; }
/* ⚠️ 2026-09-10 修复 ctrl-cell 图标垂直堆叠：sticky col 通用规则把 flex-direction 改成 column 覆盖了 ctrl-cell 原本的 row 方向，
   导致 drag-handle / row-num / sel-cb / pin-btn 在 hover 时纵向排列。ctrl-cell 需要显式恢复 row + 居中（它本身就是 sticky col 元素）。 */
.row .sticky-col.ctrl-cell { flex-direction: row; align-items: center; justify-content: center; gap: 6px; min-height: 22px; }
/* title 列 .it-title 不能 flex-grow（line 2404 的 flex:1 1 auto 会让它撑满高度、文本顶对齐）→ 0 1 auto 保持自然高度由父居中，并随 align-items:stretch 撑满宽度保证 ellipsis 生效 */
.row .sticky-col.sticky-col-4 .it-title { flex: 0 1 auto; }
/* drawer 打开行高亮浅蓝：sticky col 同步浅蓝，避免白色色块（Bug D） */
.row.active-drawer .sticky-col { background: #EDF4FE; }
/* ⚠️ sticky 列右缘追加 ::after veil：当后续滚动 cell 滑入 sticky 区域时（如已滚动让 priority cell 重叠进 sticky-5），
   用 sticky col 自身 stacking context 的伪元素向右延伸一段 hard-cap（在 width 内）做兜底，确保背景填到 sticky col 的真实右缘
   之外约 4px 的范围，避免视觉透出。注意 ::after width 较小（4px），不能盖住下一列的内容。 */
.row .sticky-col::after { content: ''; position: absolute; top: 0; right: -4px; bottom: 0; width: 4px; background: inherit; pointer-events: none; }
/* ⚠️ 2026-09-10 修复 Bug1：sticky 列间隙透出（彻底排查）
   现象：横滚时 sticky-2/3/4 左侧 14px gap（来自 grid gap: 14px）暴露，scrolled 列内容直接透出。
   原因：之前的 ::after veil 只盖右缘 4px，sticky col 之间的 gap（每个 14px）完全没有遮罩。
        把 ::after 从右缘延伸到「右缘 + gap 宽 = 14px」即可（z-index inherit 自 sticky col 本身，仍能压住 scrolled 内容）。
   ⚠️ 2026-09-10 进一步修复：用户要求「冻结到物料名称即可」，规格列（曾 sticky-5）取消 sticky：
     - 原本 sticky-5 的 head 行 z-index:4 + background:surface-2 会盖住滚到该位置的「备注/最近更新」head cell，
       导致备注/最近更新看起来"只有部分灰色"且行分割线断掉。
     - 取消 sticky-5 后规格列跟其他滚动列一起滚，head 行整条灰色（surface-2）从分类一直延伸到最近更新，
       行分割线也连续不断。 */
.row:hover:not(.head) .sticky-col { background: #f5f6f8; }
.row.head .sticky-col { background: var(--surface-2); z-index: 4; }
.row > .sticky-col-1 { left: 0; }
.row > .sticky-col-1::after { right: -14px; width: 14px; }             /* 序号右缘覆盖 → 分类左 gap */
.row > .sticky-col-2 { left: 82px; }                                    /* 68(序号) + 14(gap) */
.row > .sticky-col-2::after { right: -14px; width: 14px; }             /* 分类右缘覆盖 → 区域左 gap */
.row > .sticky-col-3 { left: 176px; }                                   /* 82 + 80(分类) + 14 */
.row > .sticky-col-3::after { right: -14px; width: 14px; }             /* 区域右缘覆盖 → 物料左 gap */
.row > .sticky-col-4 { left: 264px; }                                   /* 176 + 74(区域) + 14 */
.row > .sticky-col-4::after { right: -14px; width: 14px; }             /* 物料右缘覆盖 → 规格左 gap（规格已非 sticky，此 14px veil 仅在 panel scrollLeft=0 时不影响规格列内容显示，因为规格列 grid 起点 424+14=438 在 veil 右缘之外） */
/* ⚠️ 不再有 .row > .sticky-col-5 { position: sticky } / left / ::after / box-shadow。
   规格列是普通列，跟其他列一起滚。head 行的 sticky col 只剩 1~4，sticky col 不再盖住备注/最近更新。 */
/* head 行的 sticky col 的 ::after 同步提到 z-index 4（z-index 才会让 sticky 区域压在 scrolled cell 之上） */
.row.head > .sticky-col::after { z-index: 4; }
/* ⚠️ 不要在 .sticky-col 上加 overflow: hidden！会把 ::after veil（right: -14px，向外延伸）一并裁掉，
   导致 14px gap 完全暴露。内容溢出（it-title 长名）由 ::after veil 本身遮住（veil 是 opaque white），
   再加 text-overflow: ellipsis 兜底。 */
.row .sticky-col { overflow: visible; }
.row .sticky-col .it-title,
.row .sticky-col .it-spec { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* ⚠️ 2026-09-10 物料名称截断加固：sticky col 在 flex column + align-items:stretch 下子元素默认按内容收缩，
   需显式 max-width:100% + display:block + min-width:0 才能让 overflow:hidden 真正在 160px 列内截断+省略号。
   （不改其他列；只针对物料名称 sticky col-4） */
.row .sticky-col.sticky-col-4 .it-title { display: block; max-width: 100%; min-width: 0; }

/* ---------- 首列：默认显示序号，悬浮显示拖把手 + 多选框（owner 行）---------- */
.row .ctrl-cell {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; min-height: 22px;
}
.row .ctrl-cell .row-num {
  font-size: 12.5px; color: var(--text-3); font-weight: 500;
  font-variant-numeric: tabular-nums;
  user-select: none;
}
.row .ctrl-cell .drag-handle {
  display: none;
  width: 18px; height: 22px;
  align-items: center; justify-content: center;
  color: var(--text-3); cursor: grab;
  border-radius: 5px;
  flex: none;
}
.row .ctrl-cell .drag-handle:active { cursor: grabbing; }
.row .ctrl-cell .drag-handle:hover { background: var(--accent-soft); color: var(--accent); }
.row .ctrl-cell .drag-handle .grip-ic { width: 14px; height: 14px; }
.row .ctrl-cell .sel-cb {
  display: none;
  width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); flex: none;
}
/* owner 行：悬浮把拖把手 + 多选框亮起，序号退场 */
.row:hover:not(.head) .ctrl-cell:not(.static) .row-num { display: none; }
.row:hover:not(.head) .ctrl-cell:not(.static) .drag-handle { display: inline-flex; }
.row:hover:not(.head) .ctrl-cell:not(.static) .sel-cb { display: inline-block; }
/* 选中后多选框常驻可见，序号退场（保持视觉清晰） */
.row .ctrl-cell:not(.static) .sel-cb:checked { display: inline-block; }
.row .ctrl-cell:not(.static):has(.sel-cb:checked) .row-num { display: none; }
/* 拖拽进行中：原行半透明 */
.row.dragging { opacity: .35; }
.row.dragging .ctrl-cell .drag-handle { cursor: grabbing; background: var(--accent-soft); color: var(--accent); }
/* 投落指示线 */
.drop-line {
  grid-column: 1 / -1; height: 2px; background: var(--accent); border-radius: 1px;
  margin: 0 -18px; pointer-events: none;
  box-shadow: 0 0 0 1px var(--accent-soft);
}
.row.head .ctrl-head { display: flex; align-items: center; justify-content: center; }
.row.head #sel-all { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }
/* 字段就地编辑：可编辑单元格统一视觉 —— hover 灰色细下划线、编辑态蓝色细下划线（参考 wuxinyang.cn 待办侧边栏） */
/* 字段就地编辑：可编辑单元格统一视觉 —— hover 灰色细下划线、编辑态蓝色细下划线（参考 wuxinyang.cn 待办侧边栏）。
   ⚠️ :not(.sticky-col) 是必须的：sticky 列本身需要 opaque 背景遮住横滑时的滚动内容，
   一旦被 [data-edit] 的 background:transparent !important 覆盖，就会出现「表格内容重叠」的视觉 bug。
   普通 data-edit 列（数量/单位/设计师/状态/...）继续保持透明，与灰色下划线提示融合。 */
.row [data-edit]:not(.sticky-col) { cursor: text; transition: text-decoration-color .12s; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1.5px; text-underline-offset: 3px; background: transparent !important; }
.row [data-edit]:not([data-edit="status"]):not([data-edit="unit"]):not([data-edit="category"]):not([data-edit="assignees_csv"]):not(.inline-editing):hover { text-decoration-color: var(--border-strong); }
.row [data-edit].inline-editing { text-decoration-color: var(--accent); }
/* 输入控件（行内 input / textarea / select）—— 高度自适应 cell（让 pop 完全覆盖 cell）；textarea 单独保留最小高度 */
.inline-edit-input, .inline-edit-select {
  width: 100%; font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 6px;
  padding: 4px 8px; outline: none; box-shadow: none; transition: border-color .12s, box-shadow .12s;
  min-height: 0; height: 100%;
}
.inline-edit-input:focus, .inline-edit-select:focus {
  border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft);
}
/* 数字输入框（如数量/单价/总价）：去掉浏览器自带的上下箭头，避免与单行 cell 抢视觉焦点 */
input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
textarea.inline-edit-input { resize: vertical; min-height: 36px; line-height: 1.5; max-height: none; }
.inline-edit-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 28px; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none'><path d='M6 9l6 6 6-6' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-position: right 8px center; background-size: 12px;
}
/* 弹层卡片（负责设计师 / 应用场景 多选） */
.inline-edit-popover {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 12px 14px; min-width: 220px; max-width: 320px;
}
.inline-edit-popover .iep-head { font-size: 12px; font-weight: 600; color: var(--text-3); margin-bottom: 10px; }
.inline-edit-popover .iep-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 10px; }
/* 文本 / 数字 行内编辑浮层（az 段：浮在 cell 上方，不撑高行，溢出可视）
   编辑态强调框只保留一份：去掉 popover 容器的灰色边框（避免与 input focus inset 蓝色双层叠加），
   让 input 的 inset 阴影成为唯一的强调框，颜色用 --accent 提升对比度。 */
.inline-edit-popover.text-edit-popover { padding: 0; min-width: 0; max-width: none; border: 0; border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); background: var(--surface); }
.inline-edit-popover.text-edit-popover .inline-edit-input { border: 0; box-shadow: none; border-radius: 0; border-bottom: 1.5px solid var(--accent); background: transparent; padding: 4px 6px; }
.inline-edit-popover.text-edit-popover .inline-edit-input:focus { box-shadow: none; border-bottom-color: var(--accent); }
/* 字段配置弹层（az 段：左侧拖把手 + 字段名 + 右侧眼睛） */
.tool-panel.field-config-panel { padding: 6px; min-width: 220px; max-width: 320px; }
.tool-panel .fc-row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: var(--radius-sm); cursor: pointer;
  background: transparent; font: inherit; color: inherit; text-align: left;
  transition: background .12s; user-select: none; box-sizing: border-box;
  position: relative;
}
.tool-panel .fc-row:hover { background: var(--surface-2); }
.tool-panel .fc-row .fc-name { flex: 1; font-size: 13px; color: var(--text); }
.tool-panel .fc-row .fc-eye { width: 18px; height: 18px; flex: none; color: var(--text-3); transition: color .12s; }
.tool-panel .fc-row.visible .fc-eye { color: var(--accent); }
.tool-panel .fc-row.locked { cursor: not-allowed; opacity: .65; }
.tool-panel .fc-row.locked .fc-eye { color: var(--accent); opacity: .7; }
.tool-panel .fc-row .fc-drag { color: var(--text-3); display: inline-flex; }
.tool-panel .fc-row .fc-drag svg { width: 14px; height: 14px; }
.tool-panel .fc-row.dragging { opacity: .35; }
.tool-panel .fc-row.drop-above::before, .tool-panel .fc-row.drop-below::after { content: ''; position: absolute; left: 6px; right: 6px; height: 2px; background: var(--accent); border-radius: 1px; pointer-events: none; }
.tool-panel .fc-row.drop-above::before { top: -1px; }
.tool-panel .fc-row.drop-below::after { bottom: -1px; }
.tool-panel .fc-row.locked .fc-drag { opacity: .35; }
/* 状态下拉（参考 wuxinyang.cn 标签下拉风格） */
.inline-edit-popover.status-dropdown { padding: 6px; min-width: 120px; }
.inline-edit-popover.status-dropdown .status-opt {
  display: block; width: 100%; padding: 9px 12px; border: 0; background: transparent;
  border-radius: var(--radius-sm); cursor: pointer; font: inherit; color: inherit;
  text-align: left; transition: background .12s;
}
.inline-edit-popover.status-dropdown .status-opt:hover { background: var(--surface-2); }
.inline-edit-popover.status-dropdown .status-opt.sel { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.row.share-row { grid-template-columns: minmax(180px, 1.2fr) minmax(170px, 1fr) minmax(200px, 1.2fr) 110px 110px 80px; min-width: max(100%, 920px); }
/* 分享页容器：固定 1100px 宽（移动端自动收缩到 100%），避免筛选/空态切换时整页表格左右抖动 */
.share-page-wrap { width: 1100px; max-width: 100%; margin: 0 auto; padding: 40px 24px; box-sizing: border-box; }
.share-page-wrap .panel { width: 100%; }
/* 防止 share-row 单元格内容撑大列宽：单元格默认 min-width:auto，长文本/图片会推宽整列；显式置 0 让 fr 列按模板分配 */
.row.share-row > * { min-width: 0; }
/* 设计预览页搜索 + 筛选工具条 */
.share-toolbar { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.share-search { position: relative; flex: 1; min-width: 220px; }
.share-search .ic-svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.share-search input { width: 100%; padding: 10px 12px 10px 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 14px; transition: border-color .12s, box-shadow .12s; }
.share-search input::placeholder { color: var(--text-3); }
.share-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.share-status { padding: 10px 30px 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 14px; cursor: pointer; transition: border-color .12s, box-shadow .12s; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 9px center; background-size: 14px; -webkit-appearance: none; -moz-appearance: none; appearance: none; }
.share-status:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.share-count { color: var(--text-3); font-size: 13px; margin-left: auto; white-space: nowrap; }
@media (max-width: 560px) { .share-count { margin-left: 0; width: 100%; } }

/* 分享页 tabs + 计数：flex 行布局，让计数贴右、tabs 占满剩余空间 */
.share-tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; }
.share-tabs-row .tabs { flex: 1 1 auto; min-width: 0; margin-bottom: 18px; }
.share-tabs-row .share-count { margin-left: 0; }
@media (max-width: 560px) {
  .share-tabs-row { flex-wrap: wrap; }
  .share-tabs-row .share-count { width: auto; margin-left: auto; }
}
.row .thumb { width: 40px; height: 52px; border-radius: 6px; object-fit: cover; background: var(--border); border: 1px solid var(--border); }
/* 设计预览页缩略图/画廊图：明确可点击放大，禁用移动端双击缩放整页的手势 */
.share-thumb { touch-action: manipulation; cursor: zoom-in; }
.share-thumb .thumb { cursor: zoom-in; }
.share-pane-gallery .card img { touch-action: manipulation; cursor: zoom-in; }
.row .thumb.ph { display: grid; place-items: center; color: var(--text-3); }
.row .thumb.ph::before {
  content: "";
  width: 24px;
  height: 24px;
  background-color: var(--text-3);
  opacity: .65;
  -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4.5' width='18' height='15' rx='2'/><circle cx='9' cy='10' r='1.6'/><path d='M3 17l5-5 4 4 3-3 6 6'/></svg>") center/contain no-repeat;
          mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'><rect x='3' y='4.5' width='18' height='15' rx='2'/><circle cx='9' cy='10' r='1.6'/><path d='M3 17l5-5 4 4 3-3 6 6'/></svg>") center/contain no-repeat;
}
/* 行文本统一：单行截断 + 省略号，避免任一单元格内容过长把整行撑高导致错位 */
.row .it-title, .row .it-spec, .row .it-cell-text {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}
.row .it-title { font-weight: 600; font-size: 14px; line-height: 1.35; }
.row .it-spec { color: var(--text-2); font-size: 12.5px; line-height: 1.4; }
.row .it-cell-text { font-size: 12.5px; line-height: 1.45; color: var(--text); }
.row .it-cell-text.muted { color: var(--text-3); }
/* 备注列：左对齐、单行截断、可点击编辑 */
.row .it-note {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; word-break: normal;
  font-size: 12.5px; line-height: 1.45; color: var(--text-2); cursor: pointer;
  border-radius: 6px; padding: 2px 6px; user-select: none; text-align: left;
}
.row .it-note:hover { background: var(--accent-soft); }
.row .it-note .muted { color: var(--text-3); }
/* 长名称（设计师、原图源文件名）也在同一行截断，避免撑高整行 */
.row .who, .src-name { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .it-cell-text.muted { color: var(--text-3); }
.row .it-num { font-size: 12.5px; line-height: 1.45; text-align: center; font-variant-numeric: tabular-nums; color: var(--text); }
.row .it-num.money { text-align: right; font-weight: 600; }
.row .it-num.updated { color: var(--text-3); font-size: 12px; }
.row .it-num[data-edit] { cursor: text; transition: text-decoration-color .12s; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1.5px; text-underline-offset: 3px; background: transparent !important; }
.row .it-num[data-edit]:not(.inline-editing):hover { text-decoration-color: var(--border-strong); background: transparent; }
.row .it-num[data-edit].inline-editing { text-decoration-color: var(--accent); background: transparent; }
/* 点位列（量词下拉：张/套/个/页） */
.row .it-unit { font-size: 12.5px; line-height: 1.45; text-align: center; color: var(--text); cursor: pointer; border-radius: 6px; padding: 2px 6px; transition: background .12s; user-select: none; }
.row .it-unit:hover { background: var(--accent-soft); }
.row .it-unit.inline-editing { background: var(--surface); }
.inline-edit-popover.unit-dropdown {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-lg);
  padding: 4px 2px; display: flex; flex-direction: column; gap: 2px; min-width: 48px; max-width: 60px;
}
.inline-edit-popover.unit-dropdown .unit-opt {
  border: none; background: transparent; padding: 4px 2px; border-radius: 6px; text-align: center;
  font-size: 12px; color: var(--text); cursor: pointer; transition: background .1s;
}
.inline-edit-popover.unit-dropdown .unit-opt:hover { background: var(--accent-soft); color: var(--accent); }
.inline-edit-popover.unit-dropdown .unit-opt.sel { background: var(--accent); color: #fff; }
/* 自定义值（不在枚举内）时显示的「当前: XX（自定义）」提示行 */
.inline-edit-popover.unit-dropdown .unit-custom-hint-row {
  font-size: 10px; color: var(--text-3); padding: 3px 4px;
  border-bottom: 1px dashed var(--border); margin-bottom: 4px;
  display: flex; align-items: center; justify-content: center; gap: 0;
  white-space: normal; line-height: 1.3; text-align: center;
}
.inline-edit-popover.unit-dropdown .unit-custom-hint-row b { color: var(--accent); font-weight: 600; }

/* 点位·自定义 popover（双击触发） */
.inline-edit-popover.unit-custom-edit {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: var(--shadow-lg); padding: 8px 10px; min-width: 80px; max-width: 96px;
  display: flex; flex-direction: column; gap: 6px;
}
.inline-edit-popover.unit-custom-edit .uce-title {
  font-size: 11px; font-weight: 600; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.inline-edit-popover.unit-custom-edit .uce-input {
  border: 1px solid var(--border); background: var(--bg);
  border-radius: 6px; padding: 4px 6px; font-size: 12px; font-weight: 600;
  color: var(--text); outline: none; box-sizing: border-box; width: 100%;
  text-align: center; letter-spacing: 1px;
}
.inline-edit-popover.unit-custom-edit .uce-input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
.inline-edit-popover.unit-custom-edit .uce-hint {
  font-size: 10px; color: var(--text-3); line-height: 1.4;
}

/* 区域下拉（复用 unit-dropdown 结构，放宽宽度；未分类时两组合并 + 分组标签） */
.inline-edit-popover.unit-dropdown.area-dropdown { min-width: 96px; max-width: 132px; padding: 4px 4px; }
.inline-edit-popover.unit-dropdown.area-dropdown .unit-opt { padding: 4px 6px; text-align: left; }
.inline-edit-popover.unit-dropdown.area-dropdown .area-group-label {
  font-size: 10px; color: var(--text-3); padding: 4px 6px 2px;
  border-bottom: 1px dashed var(--border); margin-top: 2px; white-space: nowrap;
}
.inline-edit-popover.unit-dropdown.area-dropdown .area-group-label:first-child { margin-top: 0; }
.inline-edit-popover.unit-dropdown.area-dropdown .unit-custom-hint-row { justify-content: flex-start; }
.inline-edit-popover.unit-dropdown.area-dropdown .area-custom-cta {
  border-top: 1px dashed var(--border); margin-top: 3px; padding-top: 6px;
  color: var(--text-3); font-size: 11px;
}
.inline-edit-popover.unit-dropdown.area-dropdown .area-custom-cta:hover { color: var(--accent); }
/* 区域下拉：隐藏滚动条（保留滚动交互），仅视觉去除滑块/轨道 */
.inline-edit-popover.unit-dropdown.area-dropdown { scrollbar-width: none; -ms-overflow-style: none; }
.inline-edit-popover.unit-dropdown.area-dropdown::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* 区域·自定义 popover（双击触发，比单位宽） */
.inline-edit-popover.unit-custom-edit.area-custom-edit { min-width: 148px; max-width: 176px; }
.inline-edit-popover.unit-custom-edit.area-custom-edit .uce-input { letter-spacing: 0; }

/* 抽屉区域编辑：分组标签 + 自定义输入行 */
.drawer-edit-opts .area-group-label {
  font-size: 10px; color: var(--text-3); padding: 4px 6px 2px; white-space: nowrap;
}
.drawer-edit-opts .unit-custom-hint-row {
  font-size: 10px; color: var(--text-3); padding: 3px 6px;
  border-bottom: 1px dashed var(--border); margin-bottom: 4px;
}
.drawer-edit-opts .drawer-area-custom { padding: 6px 4px 2px; border-top: 1px dashed var(--border); margin-top: 4px; }
.drawer-edit-opts .drawer-area-custom .uce-input {
  border: 1px solid var(--border); background: var(--bg); border-radius: 6px;
  padding: 5px 8px; font-size: 12px; color: var(--text); outline: none;
  box-sizing: border-box; width: 100%;
}
.drawer-edit-opts .drawer-area-custom .uce-input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}

.row .actions { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; position: relative; }

/* 居中列：设计 / 状态 / 参考 / 预览 / 源文件 / 操作（表头与内容同步） */
.row [data-label="操作"] { text-align: right; justify-self: end; }
.row [data-label="操作"].actions { justify-content: flex-end; }

/* ---------- 行内操作菜单 ---------- */
.row-menu-btn {
  position: relative; /* anchor for hover tooltip */
  background: transparent; border: 1px solid transparent; padding: 4px 9px; border-radius: 8px;
  color: var(--text-2); cursor: pointer; transition: .12s;
  display: inline-flex; align-items: center; justify-content: center;
}
.row-menu-btn:hover, .row-menu-btn.open { background: var(--surface-2); color: var(--text); border-color: var(--border); }
/* 悬浮即出「更多操作」自定义提示（瞬时、无系统 title 延迟）*/
.row-menu-btn::after {
  content: "更多操作";
  position: absolute;
  top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%);
  background: #1f2937; color: #fff;
  padding: 5px 10px; border-radius: 6px;
  font-size: 12px; line-height: 1; white-space: nowrap;
  pointer-events: none;
  opacity: 0; transition: opacity .12s ease;
  z-index: 20;
}
.row-menu-btn:hover::after { opacity: 1; }
.row-menu-btn.open::after { opacity: 0; } /* 菜单已展开：不再叠提示 */
.menu-pop {
  position: absolute; right: 0; top: calc(100% + 4px); min-width: 150px; z-index: 50;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg); padding: 6px; display: none;
}
.menu-pop.open { display: block; }
.menu-item {
  display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  padding: 8px 10px; background: transparent; border: 0; border-radius: 6px;
  font-size: 13px; color: var(--text); cursor: pointer; transition: background .1s;
}
.menu-item:hover { background: var(--surface-2); }
.menu-item.primary { color: var(--accent); font-weight: 600; }
.menu-item.primary:hover { background: var(--accent-soft); }
.menu-item .mi-ic { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.row .who { font-size: 13px; color: var(--text-2); }
.row [data-col="owner"], .row [data-col="status"], .row [data-col="manager"] { text-align: center; }
.row .sel-cb, #sel-all { width: 15px; height: 15px; cursor: pointer; accent-color: var(--accent); }

/* ---------- Selection bar (export) ---------- */
.selbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 18px; background: var(--accent-soft); border: 1px solid var(--border); border-bottom: none; border-radius: var(--radius) var(--radius) 0 0; }
[data-theme="dark"] .selbar { background: #15233b; }
.selbar .sel-info { font-size: 13px; font-weight: 600; color: var(--text); }

/* 选中信息内联到 page-head 右侧（编辑清单左侧），避免选择切换时页面抖动 */
.page-head-right { display: flex; align-items: center; gap: 6px; flex-wrap: nowrap; }
/* 注意：元素只有 id="sel-inline" 没有 class，需用 id 选择器 */
#sel-inline { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: var(--accent-soft); border-radius: 999px; color: var(--text); font-size: 13px; white-space: nowrap; flex-shrink: 0; }
[data-theme="dark"] #sel-inline { background: #15233b; }
#sel-inline .sel-info { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
#sel-inline .sel-info b { color: var(--accent); }
#sel-inline:empty { padding: 0; background: transparent; }
.panel.tight { border-top-left-radius: 0; border-top-right-radius: 0; }
/* 结算表：仅展示与计费、对账相关的 6 列（项目/数量/单价/总价/设计/原图） */
.row.settle, .panel .row.settle { grid-template-columns: minmax(220px, 1.6fr) 80px 70px 100px 110px minmax(140px, 1fr) 80px; gap: 14px; justify-items: stretch; min-width: max(100%, 900px); }
.row.settle.settle-total { background: var(--surface-2); font-weight: 600; color: var(--text); border-bottom: none; }
.row.settle.settle-total > div { white-space: nowrap; }
.row.settle .total-amount { color: var(--accent); font-weight: 700; text-align: right; }

/* ---------- 结算方式切换（分段控件，极简互联网风） ---------- */
/* ⚠️ 已去掉「结算方式」文字标签（直接显示 逐项价 / 一口价 + 提交结算按钮） */
.settle-mode { display: flex; align-items: center; gap: 6px; margin: 2px 0 12px; }
.settle-mode .sm-chip { display: inline-flex; align-items: center; padding: 5px 14px; border-radius: 999px; background: var(--surface-2); color: var(--text); font-size: 13px; font-weight: 600; }
.seg { display: inline-flex; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; }
.seg-btn { appearance: none; border: none; background: transparent; cursor: pointer; padding: 6px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--text-2); transition: all .18s ease; white-space: nowrap; }
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface); color: var(--accent); box-shadow: var(--shadow); }

/* ---------- 一口价合计卡 ---------- */
.settle-lump { margin-top: 4px; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 24px 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.settle-lump .sl-label { font-size: 13px; color: var(--text-2); font-weight: 500; letter-spacing: .04em; }
.settle-lump .sl-amount { font-size: 44px; line-height: 1.15; font-weight: 800; color: var(--text); margin: 10px 0 6px; letter-spacing: -.01em; cursor: default; }
.settle-lump .sl-amount[data-action="settle-lump-edit"] { cursor: pointer; border-radius: 10px; padding: 0 8px; transition: background .15s ease; }
.settle-lump .sl-amount[data-action="settle-lump-edit"]:hover { background: var(--accent-soft); color: var(--accent); }
.settle-lump .sl-amount[data-action="settle-lump-edit"]::after { content: '✎'; font-size: 18px; font-weight: 400; color: var(--text-3); margin-left: 10px; vertical-align: middle; }
.settle-lump .sl-sub { font-size: 12px; color: var(--text-3); }
.settle-lump .sl-toggle { margin-top: 18px; appearance: none; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); cursor: pointer; padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 4px; transition: all .15s ease; }
.settle-lump .sl-toggle:hover { color: var(--accent); border-color: var(--accent); }
.settle-lump .sl-toggle svg { width: 14px; height: 14px; transition: transform .2s ease; }
.settle-lump .sl-toggle.open svg { transform: rotate(180deg); }
.settle-lump .sl-detail { width: 100%; max-width: 520px; margin-top: 14px; border-top: 1px dashed var(--border); padding-top: 12px; }
.settle-lump .sl-d-row { display: flex; justify-content: space-between; align-items: center; padding: 7px 6px; font-size: 13px; }
.settle-lump .sl-d-row + .sl-d-row { border-top: 1px solid var(--border); }
.settle-lump .sl-d-name { color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 70%; text-align: left; }
.settle-lump .sl-d-amt { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
/* 结算表 sticky：项目（220+ 范围）、数量、点位 3 列固定 */
.row.settle > .sticky-col { position: sticky; background: var(--surface); z-index: 2; }
.row.settle.head.settle > .sticky-col, .row.settle.settle.head > .sticky-col { background: var(--surface-2); z-index: 3; }
.row.settle > .sticky-col-1 { left: 0; }
.row.settle > .sticky-col-2 { left: 220px; }
.row.settle > .sticky-col-3 { left: 300px; }  /* 220 + 80 */
.row.settle > .sticky-col-3 { box-shadow: 4px 0 8px -6px rgba(0,0,0,.08); }
.panel.no-sel .row { grid-template-columns: 52px 92px minmax(140px, 0.5fr) minmax(170px, 1fr) 80px 60px 56px 88px 100px 124px 108px 72px 64px 104px auto; justify-items: stretch; }

/* ---------- Date picker (wuxinyang.cn 风格) ---------- */
.dp-mask { position: fixed; inset: 0; z-index: 85; display: none; }
.dp-mask.show { display: block; }
.dp-panel {
  position: fixed; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 14px; width: 296px; z-index: 86; font-size: 13px;
  animation: dpPopIn .16s ease;
}
@keyframes dpPopIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.dp-head .dp-ym { font-weight: 700; font-size: 14px; color: var(--text); cursor: pointer; padding: 4px 10px; border-radius: 6px; transition: .1s; }
.dp-head .dp-ym:hover { background: var(--surface-2); }
.dp-nav { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: var(--text-3); transition: .12s; cursor: pointer; }
.dp-nav:hover { background: var(--surface-2); color: var(--accent); }
.dp-nav svg { width: 16px; height: 16px; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-dow { text-align: center; font-size: 11px; color: var(--text-3); padding: 4px 0; font-weight: 600; }
.dp-day {
  text-align: center; padding: 7px 0; border-radius: 7px; cursor: pointer; font-size: 13px;
  color: var(--text); transition: .1s; min-height: 32px;
  display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 1px;
}
.dp-day:hover { background: var(--accent-soft); }
.dp-grid > :nth-child(7n+6):not(.sel):not(.other),
.dp-grid > :nth-child(7n+7):not(.sel):not(.other) { color: var(--accent); }
.dp-day.other { color: var(--text-3); opacity: .55; }
.dp-grid > :nth-child(7n+6).other,
.dp-grid > :nth-child(7n+7).other { color: rgba(60,131,246, .42); }
.dp-day.today { color: var(--accent); font-weight: 700; }
.dp-day.today::after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.dp-day.sel { background: var(--accent); color: #fff; font-weight: 700; }
.dp-day.sel.today::after { background: #fff; }
.dp-day.disabled { cursor: default; opacity: .3; }
.dp-day.disabled:hover { background: none; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.dp-foot button { font-size: 12px; padding: 6px 12px; border-radius: 6px; color: var(--text-3); min-height: 32px; font-weight: 500; background: none; border: none; cursor: pointer; transition: .1s; }
.dp-foot button:hover { background: var(--surface-2); color: var(--accent); }
.dp-foot .dp-clear { color: #dc2626; }
.dp-foot .dp-clear:hover { background: #fef2f2; color: #dc2626; }
.dp-input {
  width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); background: var(--surface); cursor: pointer;
  color: var(--text); font-size: 14px; transition: border-color .12s, box-shadow .12s;
  display: flex; align-items: center;
}
.dp-input:hover { border-color: var(--border-strong); }
.dp-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dp-input.empty { color: var(--text-3); }
.dp-quick { display: flex; gap: 4px; margin-bottom: 8px; flex-wrap: wrap; }
.dp-quick button {
  padding: 5px 10px; border-radius: 6px; background: var(--surface-2); font-size: 11.5px;
  color: var(--text-3); min-height: 28px; border: none; cursor: pointer; transition: .1s; font-weight: 500;
}
.dp-quick button:hover { background: var(--accent-soft); color: var(--accent); }
.dp-years, .dp-months { display: grid; gap: 8px; margin-bottom: 8px; }
.dp-years { grid-template-columns: repeat(4, 1fr); }
.dp-months { grid-template-columns: repeat(3, 1fr); }
.dp-year, .dp-month {
  text-align: center; padding: 10px 0; border-radius: 8px; cursor: pointer; font-size: 14px;
  color: var(--text); transition: .1s;
}
.dp-year:hover, .dp-month:hover { background: var(--accent-soft); }
.dp-year.cur, .dp-month.cur { background: var(--accent); color: #fff; font-weight: 600; }
.dp-expire-row { display: flex; gap: 8px; align-items: stretch; }
.dp-expire-row .dp-input { flex: 1; }
.dp-expire-row .btn { white-space: nowrap; }

/* ---------- Modal ---------- */
.modal-mask { position: fixed; inset: 0; background: rgba(10,10,12,.45); display: grid; place-items: center; z-index: 70; padding: 20px; }
.modal { width: 520px; max-width: 96vw; max-height: 88vh; overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }
.x-btn { background: none; border: none; color: var(--text-3); font-size: 20px; line-height: 1; }

/* 确认弹窗（替代原生 confirm），独立根节点，z-index 高于普通 modal */
.confirm-mask { position: fixed; inset: 0; background: rgba(10,10,12,.45); display: grid; place-items: center; z-index: 80; padding: 20px; }
.confirm-modal, .modal.dd-link-modal { width: 420px; max-width: 96vw; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden; }
.confirm-modal .modal-head, .modal.dd-link-modal .modal-head { border-bottom: none; padding-bottom: 0; }
.confirm-msg { color: var(--text-2); line-height: 1.7; font-size: 14px; }
.btn.danger-solid { background: #dc2626; border-color: #dc2626; color: #fff; }
.btn.danger-solid:hover { background: #b91c1c; border-color: #b91c1c; }

/* ---------- Form ---------- */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); outline: none; transition: .12s; min-height: 42px;
}
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* 表单内的勾选框/单选框不按文本输入框拉伸（2026-10-11 修复「页面可见权限」勾选框过大） */
.field input[type="checkbox"], .field input[type="radio"] {
  width: 16px; height: 16px; min-height: 0; padding: 0; margin: 0; flex: none;
  accent-color: var(--accent); cursor: pointer;
}
.field input[type="checkbox"]:focus, .field input[type="radio"]:focus { box-shadow: none; }
.field textarea { resize: vertical; min-height: 72px; }
/* 表单 select：替换浏览器默认箭头 + 控蓝色 ✓，保持跟 .dd 视觉一致 */
.field select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'><path d='M1 1.5L6 6.5L11 1.5' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 8px;
  accent-color: var(--accent);
}
.field select:disabled { background-image: none; padding-right: 12px; }
/* 打开后的 option 列表：贴合 wuxinyang 卡片风格（Chromium / Safari 生效；Win Firefox 部分属性会忽略） */
.field select option {
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  background: var(--surface);
}
.field select option:checked { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
/* 父级 :focus 时让当前选中项呈主蓝白字（macOS Safari 行为对齐 .dd-item.selected） */
.field select:focus option:checked { background: var(--accent); color: #fff; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form input { flex: 1; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); outline: none; transition: .12s; min-height: 42px; }
.inline-form input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hint { color: var(--text-3); font-size: 12px; margin-top: 5px; }

/* ---------- Custom Dropdown（替代浏览器默认 <select>，贴合卡片风格） ---------- */
.dd { position: relative; }
.dd-trigger {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); cursor: pointer;
  outline: none; transition: .12s; min-height: 42px;
  font-family: inherit; font-size: 14px; text-align: left;
}
.dd-trigger:hover { border-color: var(--border-strong); }
.dd-trigger:focus, .dd.open .dd-trigger { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dd-trigger .dd-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-trigger .dd-label.is-placeholder { color: var(--text-3); }
.dd-trigger > .ic-svg { width: 16px; height: 16px; opacity: .6; flex: none; transition: transform .15s; }
.dd.open .dd-trigger > .ic-svg { transform: rotate(180deg); }
.dd-menu {
  position: absolute; top: calc(100% + 4px); left: 0; right: auto; z-index: 40;
  width: max-content; min-width: 100%; max-width: 60vw; /* 按选项自适应宽度（2026-10-25），不再与输入框同宽 */
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 5px;
  box-shadow: var(--shadow); display: none; max-height: 280px; overflow-y: auto;
}
.dd.open .dd-menu { display: block; }
.dd-item {
  appearance: none; border: none; background: transparent; cursor: pointer;
  width: 100%; text-align: left;
  padding: 8px 12px; border-radius: 6px; font-size: 13.5px; color: var(--text-2);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  transition: background .12s, color .12s; font-family: inherit;
  white-space: nowrap; overflow: hidden; /* 配合菜单 max-width，超长选项省略号 */
}
.dd-item:hover { background: var(--accent-soft); color: var(--text); }
.dd-item.selected { color: var(--accent); font-weight: 600; background: var(--accent-soft); }
.dd-item.selected::after { content: '✓'; color: var(--accent); font-weight: 700; }
/* 打开的 .dd 提升到 table 内 stacking 顶部，避免被下一行 tr 遮挡 */
.dd.open { z-index: 50; }

/* 行内迷你 .dd（表格列内可点击切换，紧凑不抢空间） */
.dd.mini .dd-trigger { padding: 3px 6px 3px 8px; min-height: auto; font-size: 12.5px; background: transparent; border-color: transparent; justify-content: flex-start; gap: 2px; }
.dd.mini .dd-trigger:hover { background: var(--surface); border-color: var(--border); }
.dd.mini.open .dd-trigger { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dd.mini > .ic-svg { width: 12px; height: 12px; opacity: .55; }
.dd.mini .dd-menu { min-width: 110px; }
/* 列表表格内 状态 列：收紧 td 内边距 + 触发器贴边 */
.lists-table .col-status { padding: 6px 8px; white-space: nowrap; }
.lists-table .col-status .dd.mini { display: inline-flex; }

/* 内容列实时预览：108×61 = 16:9 横版迷你画布（铺满整列宽）。
   蓝色 ✓ 角标已移除 —— 缩略图本身已能看出是否画了内容。
   注意：父 .row 是 grid 容器，implicit row 高度跟随子 cell 最高项；硬编码 height 61 让 row 撑到 ~75px，
   其他列内容（单行文字）通过 align-items: center 居中显示，多余空白符合现代表格"上下留白呼吸感"。 */
.ref-cell .canvas-thumb { position: relative; width: 92px; height: 52px; cursor: zoom-in; border: 1px solid var(--border); overflow: hidden; border-radius: 5px; }
.ref-cell .canvas-thumb .canvas-mini { display: block; width: 92px; height: 52px; border-radius: 5px; }
.ref-cell .canvas-thumb .canvas-mini-img { display: block; width: 92px; height: 52px; object-fit: cover; object-position: center top; border-radius: 5px; background: var(--surface); }
.ref-cell .canvas-thumb .canvas-mini-ph { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; }
/* 彻底隐藏：保留 DOM 元素方便未来开关，但视觉不显示 */
.ref-cell .canvas-thumb .canvas-badge { display: none; }
.ref-cell .canvas-thumb:hover { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ref-cell { position: relative; }

/* ---------- Toast ---------- */
.toast { position: fixed; top: 26px; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--surface); padding: 11px 18px; border-radius: 10px; font-size: 13px; box-shadow: var(--shadow-lg); z-index: 100; }
.toast.err { background: #dc2626; color: #fff; }

/* ---------- 微信风格下载进度弹窗 ---------- */
.dlg-mask { position: fixed; inset: 0; background: rgba(0,0,0,.42); display: grid; place-items: center; z-index: 110; animation: dlgFadeIn .18s ease; }
@keyframes dlgFadeIn { from { opacity: 0; } to { opacity: 1; } }
.dlg-window { width: 380px; max-width: 92vw; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.22), 0 2px 8px rgba(0,0,0,.08); animation: dlgPop .22s cubic-bezier(.2,.8,.3,1.1); }
@keyframes dlgPop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.dlg-chrome { background: #ebebed; height: 28px; display: flex; align-items: center; padding: 0 12px; gap: 8px; border-bottom: 1px solid #d8d8da; }
.dlg-dot { width: 12px; height: 12px; border-radius: 50%; cursor: pointer; transition: filter .12s; }
.dlg-dot:hover { filter: brightness(.92); }
.dlg-dot-red { background: #ff5f57; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.08); }
.dlg-dot-yellow { background: #febc2e; box-shadow: inset 0 0 0 .5px rgba(0,0,0,.08); }
.dlg-body { padding: 36px 28px 30px; text-align: center; }
.dlg-icon { width: 96px; height: 96px; margin: 0 auto 18px; }
.dlg-icon svg { width: 100%; height: 100%; display: block; }
.dlg-name { font-size: 16px; font-weight: 600; color: #1f1f1f; margin-bottom: 6px; word-break: break-all; line-height: 1.4; }
.dlg-size { font-size: 13px; color: #888; margin-bottom: 18px; }
.dlg-status { font-size: 14px; color: #888; margin-bottom: 22px; min-height: 20px; }
.dlg-ring-wrap { position: relative; width: 60px; height: 60px; margin: 0 auto; }
.dlg-ring { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.dlg-ring-bg { fill: none; stroke: #e5e5e5; stroke-width: 5; }
.dlg-ring-fg { fill: none; stroke: #07c160; stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset .25s ease; }
.dlg-pause { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 32px; height: 32px; border-radius: 50%; border: none; background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 1px #e5e5e5; transition: box-shadow .12s; padding: 0; }
.dlg-pause:hover { box-shadow: 0 0 0 1px #07c160; }
.dlg-pause-bars { display: inline-flex; gap: 4px; height: 14px; align-items: center; }
.dlg-pause-bars i { display: block; width: 4px; height: 14px; background: #07c160; border-radius: 1px; }
.dlg-pause.paused .dlg-pause-bars { position: relative; width: 12px; height: 12px; }
.dlg-pause.paused .dlg-pause-bars::before { content: ''; position: absolute; left: 0; top: 0; border-style: solid; border-width: 6px 0 6px 10px; border-color: transparent transparent transparent #07c160; }
.dlg-pause.paused .dlg-pause-bars i { display: none; }
.dlg-done-tick { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 32px; height: 32px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px #e5e5e5; display: flex; align-items: center; justify-content: center; }
.dlg-done-tick svg { width: 18px; height: 18px; }

/* ---------- Canvas ---------- */
.canvas-wrap { position: relative; height: calc(100vh - 60px - 56px - 56px); background:
  radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .16) 1px, transparent 0) 0 0 / 26px 26px, #606060;
  overflow: hidden; border-top: 1px solid #4d4d4d; }
.canvas-area { display: block; }
.canvas-toolbar { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border); padding: 7px 10px; border-radius: 10px; box-shadow: var(--shadow); margin-bottom: 12px; }
.cs-spacer { flex: 1; }
/* 画布实时保存状态徽章 */
.cs-state {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; line-height: 1; padding: 4px 10px;
  border-radius: 999px; border: 1px solid transparent;
  white-space: nowrap; user-select: none;
  transition: background .15s, color .15s, border-color .15s;
}
.cs-state::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
}
.cs-state[data-state="idle"]      { color: var(--text-3);   background: var(--surface-2); border-color: var(--border); }
.cs-state[data-state="pending"]   { color: #6b7280;          background: #f3f4f6;          border-color: #e5e7eb; }
.cs-state[data-state="pending"]::before { animation: csPulse 1.2s ease-in-out infinite; }
.cs-state[data-state="saving"]    { color: #3C83F6;          background: #EDF4FE;          border-color: #BFD6FD; }
.cs-state[data-state="saved"]     { color: #059669;          background: #ecfdf5;          border-color: #a7f3d0; }
/* 失败高亮：醒目红色，可点击重试 */
.cs-state[data-state="error"]     {
  color: #b91c1c; background: #fef2f2; border-color: #fecaca;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
  animation: csErrorFlash 1.6s ease-in-out infinite;
  cursor: pointer;
}
.cs-state[data-state="error"]:hover { background: #fee2e2; border-color: #fca5a5; }
[data-theme="dark"] .cs-state[data-state="error"] {
  color: #fca5a5; background: #450a0a; border-color: #7f1d1d;
}
@keyframes csPulse      { 0%,100% { opacity: 1 } 50% { opacity: .35 } }
@keyframes csErrorFlash  { 0%,100% { box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12) } 50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0.20) } }
[data-theme="dark"] .cs-state[data-state="pending"] { color: #cbd5e1; background: #1e293b; border-color: #334155; }
[data-theme="dark"] .cs-state[data-state="saving"]  { color: #93B9FB; background: #172554; border-color: #1e3a8a; }
[data-theme="dark"] .cs-state[data-state="saved"]   { color: #6ee7b7; background: #052e2b; border-color: #064e3b; }
.canvas-stage { position: absolute; top: 0; left: 0; transform-origin: 0 0; }
.ccard { position: absolute; width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 0; overflow: hidden; box-shadow: var(--shadow); cursor: grab; user-select: none; touch-action: none; }
.ccard.readonly { cursor: default; }
.ccard:active { cursor: grabbing; }
/* 一张卡片 = 一个交付物：图片按原始宽高比渲染（不裁切、不变形） */
.ccard .cc-imgs { display: block; background: var(--border); }
.ccard .cc-imgs img { display: block; width: 100%; height: auto; max-height: 420px; object-fit: contain; border-radius: 0; -webkit-user-drag: none; user-drag: none; background: var(--surface-2); }
.ccard .cc-noimg { height: 96px; background: var(--border); }
.ccard .cc-body { padding: 9px 11px; }
.ccard .cc-title { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccard .cc-spec { font-size: 11px; color: var(--text-3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ccard .cc-status { display: inline-flex; align-items: center; align-self: flex-start; font-size: 10.5px; font-weight: 600; margin-top: 6px; padding: 1px 7px; border-radius: 4px; line-height: 1.5; }
.ccard .cc-group { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.cc-del { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 6px; border: none; background: rgba(0,0,0,.5); color: #fff; display: none; }
.ccard:hover .cc-del { display: block; }
.cc-eye { position: absolute; top: 6px; left: 6px; z-index: 3; width: 26px; height: 26px; border-radius: 7px; border: none; background: rgba(0,0,0,.55); color: #fff; cursor: pointer; font-size: 13px; display: none; align-items: center; justify-content: center; }
.ccard:hover .cc-eye { display: flex; }

/* ---------- 添加物料项弹窗 · 预设物料勾选项 ---------- */
.chk.preset-chk { display: flex; align-items: center; gap: 8px; }
.chk.preset-chk .pc-name { font-weight: 600; white-space: nowrap; flex-shrink: 0; }
.chk.preset-chk .pc-meta { color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Empty ---------- */
.empty:not(input):not(textarea):not(select) { text-align: center; color: var(--text-3); padding: 70px 20px; }

/* ---------- Clickable thumbnail ---------- */
/* Clickable thumbnail —— 排除 .canvas-thumb（内容列缩略图由 .ref-cell .canvas-thumb 单独控制 108×61） */
.row .thumb-wrap:not(.canvas-thumb) { width: 56px; height: 56px; display: grid; place-items: center; cursor: pointer; border-radius: 8px; position: relative; }
/* 物料清单「交付物」列 —— 与「内容与参考」列等高（66px），1:1 方形保证视觉对齐 */
.row .thumb-wrap[data-col="preview"] { width: 52px; height: 52px; padding: 0; min-height: 0; }
.row .thumb-wrap[data-col="preview"] .thumb { width: 52px; height: 52px; }
/* 「交付物」列：缩略图 / 上传按钮 与字段表头（text-align:center）同一水平基线
   根因：.row 默认 justify-items:stretch + .row > .thumb-wrap 显式 justify-self:stretch，
        会把固定宽度（52px 或 width:auto）的子元素钉到 grid track 左侧，与居中表头错位
   修复（按场景）：
     - 直接 .thumb-wrap[data-col="preview"] → justify-self:center 居中
     - 包裹 div（无 .thumb-wrap class，结算视图 settle）→ flex 让内嵌 .thumb-wrap 居中
     - 空态 .has-empty-inner → 强覆盖原 justify-self:start !important（保留 width:auto 让"上传"胶囊按内容收缩，仅改水平位置） */
.row > .thumb-wrap[data-col="preview"] { justify-self: center; }
.row > [data-col="preview"]:not(.thumb-wrap) {
  display: flex;
  align-items: center;
  justify-content: center;
}
.row > .thumb-wrap.multi[data-col="preview"].has-empty-inner { justify-self: center !important; }
/* 交付物为 PDF / PPT 等非图片文件时：显示格式徽标（扩展名文字 + 语义色底）
   注意：必须用 .row .thumb-wrap[data-col="preview"] 前缀提高特异性 —— 文件后面
   .thumb-wrap.multi .thumb（0-3-0）会覆盖 .thumb.doc-thumb.doc-pptx（同为 0-3-0）的背景色 */
.row .thumb-wrap[data-col="preview"] .thumb.doc-thumb { position: relative; display: grid; place-items: center; border-radius: 5px; font-size: 11px; font-weight: 700; letter-spacing: .3px; border: 1px solid var(--border); background: var(--surface-2); background-image: none; }
.row .thumb-wrap[data-col="preview"] .thumb.doc-thumb.doc-pdf { background: #DC2626; color: #fff; border-color: transparent; }
.row .thumb-wrap[data-col="preview"] .thumb.doc-thumb.doc-ppt,
.row .thumb-wrap[data-col="preview"] .thumb.doc-thumb.doc-pptx { background: #D97706; color: #fff; border-color: transparent; }
.row .thumb-wrap[data-col="preview"] .thumb.doc-thumb.doc-pdf::after { content: 'PDF'; }
.row .thumb-wrap[data-col="preview"] .thumb.doc-thumb.doc-ppt::after,
.row .thumb-wrap[data-col="preview"] .thumb.doc-thumb.doc-pptx::after { content: 'PPT'; }
/* 「交付物」列空态：owner 上传按钮 / 其他角色 muted —（对齐源文件列的列内交互） */
/* 「交付物」列空态：与源文件列 `.ref-btn` 视觉完全共用（HTML 同时挂 .ref-btn 类，padding/border/font/icon 全部继承 .ref-btn）
   这里只保留对「.row .thumb 继承的 40×52 / grid stretch / flex 父容器收缩」的覆盖 + 强制重置 .thumb 的 width:40/height:52/border-radius:6 退化 */
.row .thumb-wrap[data-col="preview"] .preview-empty-inner {
  position: absolute;                /* 脱离 grid 流，直接填满 52×52 框（wrap 是 position:relative），不受 auto 列轨宽影响 */
  inset: 0;
  display: flex !important;
  flex-direction: column;            /* 竖排：图标在上、文字在下，适配 52×52 缩略图框 */
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 100%; height: 100%;
  min-width: 0; min-height: 0;
  padding: 0 !important;
  border-radius: 7px !important;     /* 显式重置 .row .thumb / .thumb-wrap.multi .thumb 留下的 6px / 5px */
  background: var(--surface) !important;
  border: 1px dashed var(--border-strong) !important;
  color: var(--text-3) !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  box-sizing: border-box !important;
  cursor: pointer;
}
/* 统一两个空态胶囊的图标尺寸：源文件列 .ref-btn 的 .ic-svg 默认继承 19×19，强制改成 14×14 与交付物一致 */
.row .ref-btn .ic-svg { width: 14px; height: 14px; flex: none; display: inline-block; vertical-align: middle; }
/* 源文件列空态胶囊的默认色：与交付物列空态一致用灰色（var(--text-3)），不继承 styles.css 后半段 .ref-btn 的蓝色 */
.row .source-cell .ref-btn:not(.primary):not(.has) { color: var(--text-3) !important; background: var(--surface) !important; border-color: var(--border-strong) !important; }
.row .source-cell .ref-btn:hover:not(.primary):not(.has) { color: var(--accent) !important; background: var(--accent-soft) !important; border-color: var(--accent) !important; }
/* 统一两个空态胶囊的尺寸计算：button 元素默认 box-sizing: border-box，与 div 默认 content-box 不一致 → 强制两边都是 content-box */
.row .ref-btn { box-sizing: content-box !important; }
/* 交付物文字段竖排，随按钮 11px，避免 12px 文字在 52px 框内溢出 */
.row .thumb-wrap[data-col="preview"] .preview-empty-inner .preview-empty-text { font-size: 11px; font-weight: 600; letter-spacing: 0; line-height: 1.2; }
.row .thumb-wrap[data-col="preview"] .preview-empty-inner.muted { padding: 4px 0; border: 0 !important; background: transparent !important; font-weight: 400; color: var(--text-3); font-size: 13px; }
.row .thumb-wrap[data-col="preview"]:hover .preview-empty-inner:not(.muted) {
  border-color: var(--accent) !important; border-style: solid !important; color: var(--accent) !important; background: var(--accent-soft) !important;
}
.row .thumb-wrap:not(.multi):hover { background: var(--accent-soft); }
.row .thumb-wrap .thumb { transition: transform .15s ease; }
.row .thumb-wrap:not(.multi):hover .thumb { transform: scale(1.08); }
.share-thumb { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 8px; }
.share-thumb:not([onclick=""]) { cursor: zoom-in; }
.share-thumb:not([onclick=""]):hover { background: var(--accent-soft); }

/* 缩略图右上角小徽标（参考图数量等） */
.thumb-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 8px; background: var(--accent); color: #fff;
  font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
  pointer-events: none; box-shadow: 0 1px 3px rgba(0,0,0,.18);
  letter-spacing: 0;
}

/* ---------- 灵感参考列 / 画布 ---------- */
.ref-cell { display: grid; place-items: center; }
.ref-btn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 9px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-3); font-size: 12px; font-weight: 600; cursor: pointer; transition: .12s; white-space: nowrap; }
.ref-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ref-btn.has { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.ref-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); padding: 6px 14px; border-radius: 8px; font-size: 13px; }
.ref-btn.primary:hover { background: #2E6BE0; color: #fff; border-color: #2E6BE0; }
/* 交付预览 modal 空态：上传按钮居中、突出 */
.dpv-empty-upload { margin-top: 10px; }
.ref-board { padding: 6px 0 30px; }
.ref-group { margin-bottom: 28px; }
.ref-group-title { font-weight: 600; font-size: 14px; margin: 6px 0 12px; display: flex; align-items: center; gap: 8px; }
.ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.ref-grid.sm { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.ref-tile { position: relative; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.ref-tile img { width: 100%; height: 152px; object-fit: cover; display: block; cursor: zoom-in; background: var(--border); transition: transform .15s ease; }
.ref-tile:hover img { transform: scale(1.04); }
.ref-tile.sm img { height: 112px; }
.ref-tile-x { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; border-radius: 6px; border: none; background: rgba(0,0,0,.55); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; opacity: 0; transition: .12s; }
.ref-tile:hover .ref-tile-x { opacity: 1; }
.ref-tile-x:hover { background: #dc2626; }
.ref-tile-meta { font-size: 11px; color: var(--text-3); padding: 6px 8px; }

/* ---------- Info tip icon ---------- */
.info-tip { display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 14px; border-radius: 50%; background: var(--border-strong); color: var(--text-3); font-size: 9.5px; font-weight: 700; margin-left: 4px; cursor: help; vertical-align: middle; }
.info-tip:hover { background: var(--accent-soft); color: var(--accent); }
.info-tip:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 点击 i 图标弹出的说明气泡（替代仅依赖原生 title） */
.info-popover {
  position: fixed; z-index: 40;
  background: #1f2937; color: #fff;
  padding: 8px 12px; border-radius: 8px;
  font-size: 12px; line-height: 1.55;
  max-width: 260px;
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
  pointer-events: none;
  opacity: 0; transform: translateY(-4px); transition: opacity .14s ease, transform .14s ease;
}
.info-popover.show { opacity: 1; transform: translateY(0); }
.info-popover::before {
  content: ''; position: absolute; left: 50%; transform: translateX(-50%) rotate(45deg);
  width: 8px; height: 8px; background: #1f2937;
}
.info-popover.arrow-down::before { top: -4px; }
.info-popover.arrow-up::before { bottom: -4px; }

/* ---------- 设计说明（飞书 iframe） ---------- */
.dd-wrap { display: flex; flex-direction: column; gap: 12px; width: 100%; }
.dd-topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.dd-status { font-size: 12.5px; color: var(--text-3); }
.dd-actions { display: flex; gap: 6px; }
.dd-input-wrap { display: flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 8px 8px 8px 12px; }
.dd-url { flex: 1; min-width: 0; padding: 8px 0; border: none; background: transparent; color: var(--text); outline: none; font-size: 13.5px; }
.dd-url:focus { outline: none; }
.dd-url::placeholder { color: var(--text-3); }
.dd-input-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dd-hint { line-height: 1.6; }
.dd-frame-wrap { display: flex; flex-direction: column; gap: 8px; }
.dd-frame { width: 100%; height: calc(100vh - 60px - 56px - 70px); min-height: 520px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); display: block; }
.dd-frame-tip { line-height: 1.7; padding: 0 2px; word-break: break-all; }
.dd-frame-tip a { color: var(--accent); }
.dd-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 60px 20px; border: 1px dashed var(--border); border-radius: 10px; background: var(--surface-2); }
.dd-empty-icon { font-size: 40px; opacity: .5; }
.dd-empty-title { font-size: 15px; font-weight: 500; }
.dd-empty-desc { margin-top: 2px; }
/* 需求说明链接设置弹窗 */
.dd-link-modal { min-width: 360px; max-width: 480px; }
.dd-link-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.dd-link-input { width: 100%; height: 36px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-size: 13.5px; box-sizing: border-box; transition: border-color .15s, box-shadow .15s; }
.dd-link-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dd-link-input::placeholder { color: var(--text-3); }

.chk-list { display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow: auto; padding: 2px; }

/* 指派设计师弹窗搜索框 */
.ds-search-wrap { position: relative; display: block; width: 100%; margin: 0; box-sizing: border-box; }
.ds-search-wrap:focus-within { border-color: var(--accent); }
.ds-search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; display: flex; align-items: center; justify-content: center; color: var(--text-3); pointer-events: none; }
.ds-search-ic .ic-svg { width: 15px; height: 15px; display: block; }
/* 独立 .ds-search 输入框（不在 wrap 内时使用） */
.ds-search { width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--text); font-size: 13.5px; margin: 0 0 10px; box-sizing: border-box; line-height: 1.4; }
.ds-search:focus { outline: none; border-color: var(--accent); }
.ds-search::placeholder { color: var(--text-3); }
/* 在 .ds-search-wrap 内部时：wrap=36 高，input 撑满 36 高 + 行高 36 + 0 内边距顶底让文本垂直居中，icon 50% + translateY(-50%) 也垂直居中，三者天然对齐 */
.ds-search-wrap .ds-search { height: 36px; padding: 0 12px 0 32px; line-height: 36px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-2); margin: 0; }
.ds-search-wrap .ds-search:focus { outline: none; border-color: var(--accent); }
.chk-list.inline { flex-direction: row; flex-wrap: wrap; max-height: none; }
/* 设计列下拉选择：竖向列表 + 限高，避免浮窗过高 */
.inline-edit-popover.designer-dropdown { min-width: 240px; max-width: 300px; }
.inline-edit-popover.designer-dropdown .iep-head { margin-bottom: 8px; }
.inline-edit-popover.designer-dropdown .ds-search-wrap { margin-bottom: 10px; }
.inline-edit-popover.designer-dropdown .ds-search { margin: 0; }
.inline-edit-popover.designer-dropdown .iep-list { flex-direction: column; flex-wrap: nowrap; max-height: 200px; overflow: auto; width: 100%; gap: 6px; }
.inline-edit-popover.designer-dropdown .iep-empty { margin-top: 2px; }
/* 负责人：单选 + 可清空下拉（参考 status-dropdown 风格，但选项含「未指派」清空项） */
.inline-edit-popover.manager-dropdown { padding: 8px; min-width: 260px; max-width: 280px; display: flex; flex-direction: column; gap: 8px; max-height: 380px; overflow: hidden; }
.inline-edit-popover.manager-dropdown .ds-search-wrap { margin-bottom: 0; }
.inline-edit-popover.manager-dropdown .ds-search { margin: 0; }
.inline-edit-popover.manager-dropdown .mgr-list { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow: auto; padding: 0; }
.inline-edit-popover.manager-dropdown .mgr-list .chk { padding: 9px 11px; font-size: 13.5px; cursor: pointer; }
.inline-edit-popover.manager-dropdown .mgr-list .chk.sel { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.inline-edit-popover.manager-dropdown .mgr-list .chk.sel input[type="checkbox"]:checked { accent-color: var(--accent); }
.inline-edit-popover.manager-dropdown .mgr-list .chk input[type="checkbox"] { pointer-events: none; }
.inline-edit-popover.manager-dropdown .mgr-opt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: none; background: transparent; cursor: pointer; color: var(--text); border-radius: var(--radius-sm); font-size: 13px; text-align: left; transition: background .12s, color .12s; }
.inline-edit-popover.manager-dropdown .mgr-opt:hover { background: var(--surface-2); color: var(--accent); }
.inline-edit-popover.manager-dropdown .mgr-opt.sel { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.inline-edit-popover.manager-dropdown .mgr-opt .mgr-name { flex: 1; }
.inline-edit-popover.manager-dropdown .mgr-opt .mgr-role { display: inline-block; font-size: 10.5px; color: var(--text-3); border: 1px solid var(--border); padding: 1px 6px; border-radius: 999px; line-height: 1.4; }
.inline-edit-popover.manager-dropdown .mgr-opt .mgr-role.owner { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.chk { display: flex; align-items: center; gap: 9px; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius-sm); cursor: pointer; transition: background .15s, border-color .15s; }
.chk:hover { background: var(--surface-2); border-color: var(--border-strong); }
.chk input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
/* 打印清单 · 字段选择 */
.pf-sub { font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.chk.pf-chk { padding: 7px 11px; font-size: 13px; white-space: nowrap; }
.pf-bar { display: flex; gap: 8px; margin-top: 12px; }
.pf-bar .ghost-btn { border: 1px solid var(--border); }

/* ---------- Preview modal (PSD/AI/SVG/PDF) ---------- */
.modal.wide { width: 940px; }
.pv-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.pv-spacer { flex: 1; }
.pv-stage { width: 100%; max-height: 70vh; overflow: auto; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; display: grid; place-items: safe center; padding: 16px; scrollbar-width: none; }
.pv-stage::-webkit-scrollbar { width: 0; height: 0; }
.pv-img { max-width: 100%; max-height: 66vh; transform-origin: center center; transition: transform .08s linear; box-shadow: 0 6px 24px rgba(0,0,0,.12); background: #fff; }
.pv-fail { padding: 64px 20px; text-align: center; color: var(--text-3); background: var(--surface-2); border: 1px dashed var(--border); border-radius: 10px; }
.pv-note { margin-top: 12px; font-size: 12.5px; color: var(--text-2); background: var(--surface-2); border-radius: 8px; padding: 10px 12px; }
.empty .big { font-size: 30px; margin-bottom: 10px; opacity: .5; }

/* ---------- 「导出内容与参考」格式选择（三格式卡） ---------- */
.fmt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.fmt-tile { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 16px 14px 14px; border: 1.5px solid var(--border); border-radius: var(--radius, 12px); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .12s; text-align: left; }
.fmt-tile:hover { border-color: var(--accent); box-shadow: var(--shadow-lg, 0 4px 16px rgba(0,0,0,.06)); transform: translateY(-1px); }
.fmt-tile:active { transform: translateY(0); }
.fmt-badge { display: inline-flex; align-items: center; justify-content: center; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 700; color: #fff; letter-spacing: .5px; line-height: 1.4; }
.fmt-badge-pdf { background: #475569; }
.fmt-badge-ppt { background: #D97706; }
.fmt-badge-doc { background: #3C83F6; }
.fmt-name { font-size: 14px; font-weight: 600; color: var(--text); }
.fmt-desc { font-size: 12px; line-height: 1.5; }
@media (max-width: 540px) { .fmt-grid { grid-template-columns: 1fr; } }

/* 导出总览弹窗：按小标题分 3 组（内容与参考 / 压缩包 / 物料清单） */
.export-hub-section { margin-top: 18px; }
.export-hub-section:first-of-type { margin-top: 14px; }
.export-hub-label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; letter-spacing: .3px; }
.export-hub-section .muted.small { line-height: 1.55; }
/* 大块单卡（压缩包 / Excel）：左侧 icon + 右侧文字 */
.fmt-tile.fmt-tile-large { flex-direction: row; align-items: center; gap: 14px; padding: 14px 16px; width: 100%; }
.fmt-tile-large-ic { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); flex: 0 0 40px; }
.fmt-tile-large-ic .ic-svg { width: 20px; height: 20px; }
.fmt-tile-large-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1 1 auto; }

/* ---------- 交付预览多文件管理器（dpv-*） ---------- */
.modal.dpv-modal { width: min(960px, 96vw); }
.modal.dpv-modal .modal-head { padding: 16px 22px; }
.dpv-title { display: inline-flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.dpv-title .ic-svg { width: 18px; height: 18px; color: var(--accent); }
.dpv-count { margin-left: 4px; padding: 2px 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 600; }
.dpv-body { padding: 16px 22px 22px; }
/* 交付预览：16:9 画布，无边框/底色/留白；图片以 contain 显示，不铺满、不露白边 */
.modal.dpv-modal .modal-body { scrollbar-width: none; overflow-y: auto; }
.modal.dpv-modal .modal-body::-webkit-scrollbar { width: 0; height: 0; }
.modal.dpv-modal .pv-stage { aspect-ratio: 16 / 9; width: min(100%, calc(70vh * 16 / 9)); margin: 0 auto; max-height: none; overflow: auto; border: 0; background: transparent; padding: 0; border-radius: 0; }
.modal.dpv-modal .pv-img { width: 100%; height: 100%; max-width: none; max-height: none; object-fit: contain; }
/* 顶部缩略图条（横向滚动） */
.dpv-strip-wrap { display: flex; align-items: stretch; gap: 8px; padding: 14px 0 12px; border-top: 1px solid var(--border); }
.dpv-strip { display: flex; gap: 8px; flex: 1; min-width: 0; overflow-x: auto; padding-bottom: 2px; scrollbar-width: thin; }
.dpv-strip::-webkit-scrollbar { height: 4px; }
.dpv-strip::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 2px; }
.dpv-strip-cell { position: relative; flex: 0 0 auto; }
.dpv-strip-btn { padding: 0; border: 1.5px solid var(--border); border-radius: 8px; background: var(--surface-2); cursor: pointer; transition: .12s; display: block; }
.dpv-strip-btn:hover { border-color: var(--accent); }
.dpv-strip-btn.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dpv-strip-thumb { width: 64px; height: 64px; background-size: cover; background-position: center; background-color: var(--border); border-radius: 6px; }
.dpv-strip-doc { display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; background-image: none; }
.dpv-strip-doc.dpv-doc-pdf { background: #DC2626; }
.dpv-strip-doc.dpv-doc-ppt, .dpv-strip-doc.dpv-doc-pptx { background: #D97706; }
.dpv-strip-num { position: absolute; top: 4px; left: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: rgba(15, 23, 42, .78); color: #fff; font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; }
.dpv-strip-badge { position: absolute; bottom: 4px; right: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 600; line-height: 16px; text-align: center; }
.dpv-strip-cell.ro .dpv-strip-btn { opacity: .82; }
.dpv-strip-x { position: absolute; top: 4px; right: 4px; width: 20px; height: 20px; padding: 0; border-radius: 50%; border: 0; background: rgba(17,24,39,.85); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,.35); }
/* 把 × 钉在卡片内右上角（之前 top:-6px / right:-6px 让 X 外飘 6px，会被 .dpv-strip 的 overflow-x:auto 顺带把 overflow-y 也强制成 auto 而裁掉上半圆；挪到内部彻底解决） */
.dpv-strip-x:hover { color: #fff; background: #000; }
.dpv-strip-x .ic-svg { width: 12px; height: 12px; }
.dpv-strip-add { flex: 0 0 auto; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 64px; height: 64px; padding: 0 10px; border: 1.5px dashed var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text-3); cursor: pointer; transition: .12s; }
.dpv-strip-add:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.dpv-strip-add .ic-svg { width: 20px; height: 20px; }
.dpv-strip-add-lbl { font-size: 11px; font-weight: 600; }
/* 主预览区 */
.dpv-empty { padding: 48px 20px; }
.dpv-empty-inner { padding: 56px 20px; text-align: center; border: 1.5px dashed var(--border); border-radius: 10px; background: var(--surface-2); color: var(--text-3); display: grid; gap: 8px; place-items: center; }
.dpv-empty-inner .ic-svg { width: 30px; height: 30px; opacity: .6; }
.dpv-empty-title { font-size: 14px; font-weight: 600; color: var(--text-2); }
.dpv-empty-desc { font-size: 12px; }
.dpv-empty-inner.muted { color: var(--text-3); background: var(--surface-2); }
.dpv-doc-stage { padding-top: 16px; }
.dpv-doc-card { display: flex; align-items: center; gap: 18px; padding: 36px 28px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.dpv-doc-icon { width: 64px; height: 80px; border-radius: 8px; display: grid; place-items: center; font-size: 16px; font-weight: 700; color: #fff; }
.dpv-doc-icon.dpv-doc-pdf { background: #DC2626; }
.dpv-doc-icon.dpv-doc-ppt, .dpv-doc-icon.dpv-doc-pptx { background: #D97706; }
.dpv-doc-meta { min-width: 0; }
.dpv-doc-name { font-size: 14px; font-weight: 600; color: var(--text); word-break: break-all; }
.dpv-actions { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.dpv-name-row { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 0 1 auto; }
.dpv-fname { display: inline-block; font-size: 12px; color: var(--text-2); max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle; }
.dpv-ext { flex: 0 0 auto; border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; font-size: 10.5px; font-weight: 700; color: var(--text-2); background: var(--surface-2); letter-spacing: .4px; line-height: 1.4; vertical-align: middle; }
.dpv-fsize { color: var(--text-3); font-weight: 500; font-size: 12px; flex: 0 0 auto; }
.dpv-fname[data-action="dpv-rename"] { cursor: text; }
.dpv-fname[data-action="dpv-rename"]:hover { text-decoration: underline; text-decoration-color: var(--text-3); text-decoration-thickness: 1.5px; text-underline-offset: 1.5px; }
.dpv-fname.editing { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 1.5px; text-underline-offset: 1.5px; caret-color: var(--accent); outline: none; background: transparent; white-space: normal; max-width: 460px !important; overflow: visible; }
.dpv-ro-tag { display: inline-block; margin-left: 8px; padding: 1px 6px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 10.5px; font-weight: 600; vertical-align: middle; }

/* 交付预览图片加载失败（孤儿文件/历史遗留）：onerror 替换为该卡片，owner 可直接清理 */
.dpv-broken-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 40px 24px; color: var(--text-3); text-align: center; min-height: 220px; }
.dpv-broken-icon { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-2); color: var(--text-3); }
.dpv-broken-icon .ic-svg { width: 24px; height: 24px; }
.dpv-broken-title { font-size: 13px; font-weight: 600; color: var(--text-2); }
.dpv-broken-name { font-size: 11.5px; color: var(--text-3); max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 交付弹窗头部「分享」按钮 */
.modal.dpv-modal { position: relative; }
.modal-head-actions { display: flex; align-items: center; gap: 8px; }
.dpv-share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-2); font-size: 13px; font-weight: 600; cursor: pointer; transition: .12s; }
.dpv-share-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.dpv-share-btn .ic-svg { width: 15px; height: 15px; }

/* 交付图精准分享面板（覆盖在交付弹窗内） */
.dpv-share-overlay { position: absolute; inset: 0; z-index: 5; background: var(--surface); border-radius: var(--radius); display: flex; flex-direction: column; overflow: hidden; }
.dpv-share-panel { display: flex; flex-direction: column; height: 100%; }
.dpv-share-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; border-bottom: 1px solid var(--border); }
.dpv-share-head h4 { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 600; margin: 0; }
.dpv-share-head h4 .ic-svg { width: 18px; height: 18px; color: var(--accent); }
.dpv-share-body { flex: 1; overflow: auto; padding: 16px 22px; display: grid; gap: 18px; }
.dpv-share-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.dv-share-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.dv-share-card { position: relative; padding: 0; border: 1.5px solid var(--border); border-radius: 10px; background: var(--surface-2); cursor: pointer; overflow: hidden; transition: .12s; aspect-ratio: 1 / 1; }
.dv-share-card:hover { border-color: var(--accent); }
.dv-share-card.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.dv-share-thumb { position: absolute; inset: 0; background-size: cover; background-position: center; background-color: var(--border); }
.dv-share-doc { display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; }
.dv-share-check { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; opacity: 0; transform: scale(.8); transition: .12s; }
.dv-share-check .ic-svg { width: 13px; height: 13px; }
.dv-share-card.sel .dv-share-check { opacity: 1; transform: scale(1); }
.dv-share-name { position: absolute; left: 0; right: 0; bottom: 0; padding: 4px 6px; font-size: 10.5px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.55)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recipient-list { display: grid; gap: 8px; max-height: 220px; overflow: auto; padding: 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.recipient-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.recipient-item:hover { background: var(--surface); }
.recipient-item input { width: 16px; height: 16px; accent-color: var(--accent); }
.recipient-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-size: 13px; font-weight: 700; flex: 0 0 auto; }
.recipient-meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.recipient-name { font-size: 13px; font-weight: 600; }
.recipient-sub { font-size: 11px; }
.recipient-role { font-size: 10.5px; font-weight: 600; padding: 2px 8px; border-radius: 999px; flex: 0 0 auto; }
.tag-owner { background: #EDF4FE; color: #3C83F6; }
.tag-designer { background: #fffbeb; color: #d97706; }
.tag-staff { background: #f1f5f9; color: #475569; }
.dv-share-msg { width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 13px; resize: vertical; background: var(--surface); color: var(--text); }
.dv-share-msg:focus { outline: none; border-color: var(--accent); }
.dpv-share-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); }
.dv-share-result { display: grid; gap: 12px; padding: 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.dv-share-ok { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: #059669; }
.dv-share-ok .ic-svg { width: 18px; height: 18px; }
.dv-share-link-row { display: flex; gap: 8px; }
.dv-share-link { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 12.5px; background: var(--surface); color: var(--text); }
.dv-share-status { }

/* 收件人查看页（公开，/delivery/<code>） */
.dv-viewer-loading { min-height: 60vh; display: grid; place-content: center; justify-items: center; }
.dv-viewer { max-width: 880px; margin: 0 auto; padding: 24px 20px 40px; }
.dv-viewer .login-brand { justify-content: center; margin-bottom: 12px; }
.dv-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 16px 18px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; }
.dv-project { font-size: 12px; color: var(--text-3); font-weight: 600; }
.dv-title { font-size: 18px; font-weight: 700; margin: 2px 0; }
.dv-back { flex: 0 0 auto; text-decoration: none; }
.dv-back .ic-svg { width: 15px; height: 15px; }
.dv-msg { margin: 14px 0; padding: 12px 14px; background: var(--accent-soft); color: var(--text); border-radius: 10px; font-size: 13.5px; white-space: pre-wrap; }
.dv-main { margin: 16px 0; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; padding: 12px; min-height: 200px; }
.dv-main-img { max-width: 100%; max-height: 70vh; border-radius: 8px; }
.dv-doc-card { display: grid; gap: 10px; place-items: center; padding: 28px; text-align: center; }
.dv-doc-icon { width: 56px; height: 72px; border-radius: 8px; display: grid; place-items: center; font-size: 14px; font-weight: 700; color: #fff; background: #475569; }
.dv-strip { display: flex; gap: 8px; overflow-x: auto; padding: 10px 2px; scrollbar-width: thin; }
.dv-strip-btn { padding: 0; border: 1.5px solid var(--border); border-radius: 8px; background: var(--surface-2); cursor: pointer; overflow: hidden; flex: 0 0 auto; }
.dv-strip-btn img { width: 72px; height: 72px; object-fit: cover; display: block; }
.dv-strip-btn.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---------- Miscs ---------- */
.flex { display: flex; } .gap8 { gap: 8px; } .gap12 { gap: 12px; } .between { justify-content: space-between; } .center { align-items: center; }
.muted { color: var(--text-3); } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .small { font-size: 12.5px; }
.timeline { border-left: 2px solid var(--border); margin-left: 6px; padding-left: 16px; display: flex; flex-direction: column; gap: 14px; }
.tl-item { position: relative; }
.tl-item::before { content: ''; position: absolute; left: -23px; top: 3px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.tl-item .tl-act { font-weight: 600; font-size: 13px; }
.tl-item .tl-time { color: var(--text-3); font-size: 11.5px; }
.tl-item.global::before { background: #059669; } /* 全局事件（如登录）用绿色点区分 */
.share-box { background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 10px; padding: 14px; }
.share-box code { font-family: ui-monospace, monospace; font-size: 12.5px; word-break: break-all; }

/* 分享弹窗场景选择（向客户交付 / 与设计协作） */
.share-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.share-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 14px; border: 1px solid var(--border); background: var(--bg); border-radius: 10px; cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s, background .15s; }
.share-tab:hover { border-color: var(--accent); }
.share-tab.active { border-color: var(--accent); background: #EDF4FE; box-shadow: 0 0 0 1px var(--accent) inset; }
.share-tab-title { font-size: 14px; font-weight: 600; color: var(--text-1); }
.share-tab.active .share-tab-title { color: var(--accent); }
.share-tab-desc { font-size: 12px; line-height: 1.5; }
.share-scene[hidden] { display: none; }
/* 专属分享链接列表（按勾选快照生成的独立子码链接） */
.share-gen-list { display: flex; flex-direction: column; gap: 8px; }
.share-gen-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; }
.share-gen-item code { flex: 1 1 auto; min-width: 0; font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; color: var(--text-1); }
.share-gen-item .btn { flex: 0 0 auto; }
.tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--border); align-items: center; }
.tab { padding: 9px 14px; border: none; background: none; color: var(--text-2); font-weight: 500; font-size: 13.5px; border-bottom: 2px solid transparent; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }
/* 标签组内竖线分割（用于把「结算」这类独立模块与主流程标签视觉分离） */
.tab-sep { display: inline-block; width: 1px; height: 18px; background: var(--border); margin: 0 8px; flex: 0 0 auto; }

/* 清单详情：tabs 行 + 右侧选中操作条（同一行，操作条紧贴右侧） */
.list-tabs-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: nowrap; margin-bottom: 18px; border-bottom: 1px solid var(--border); padding-bottom: 12px; }
.list-tabs-row .tabs { margin-bottom: 0; flex: 1 1 auto; min-width: 0; border-bottom: none; }
.list-tabs-row #sel-inline { flex: 0 0 auto; }

/* tabs 右侧槽位：每个 tab 的工具栏/输入/状态都填到这里，与 tab 同列更紧凑。
   关键：所有 tab 的 tabs-side 总高统一 36px + 8px 上下间距（防止切换时高度抖动），
   子元素统一 box-sizing + height:36px 保证按钮/输入框/segmented 高一致。 */
.list-tabs-row .tabs-side { display: flex; align-items: center; gap: 10px; flex: 0 1 auto; min-width: 0; flex-wrap: nowrap; justify-content: flex-end; }
.tabs-side > * { min-width: 0; box-sizing: border-box; }
/* 子元素强制 36px（覆盖 canvas-toolbar / dd-link-bar / settle-mode 自身高度） */
.tabs-side .lists-toolbar,
.tabs-side .canvas-toolbar,
.tabs-side .settle-mode { height: 36px; margin: 0; }
/* 物料清单工具栏放进 tabs-side 后禁止内部换行（修复「当前顺序」等按钮独立一行断行）：
   搜索框可收缩，按钮保持一行；空间不足时整体横向收窄而非换行 */
.tabs-side .lists-toolbar { flex-wrap: nowrap; min-width: 0; }
.tabs-side .lists-toolbar .lists-search { flex: 1 1 110px; min-width: 90px; max-width: 240px; }
.tabs-side .lists-toolbar .tool-wrap { flex: 0 0 auto; }
/* 需求说明：状态文字 + 设置按钮 */
.tabs-side .dd-status { font-size: 12.5px; color: var(--text-3); line-height: 36px; white-space: nowrap; }
.tabs-side .canvas-toolbar { padding: 0 12px; background: transparent; border: 0; box-shadow: none; gap: 8px; }
.tabs-side .canvas-toolbar .cs-spacer { display: none; }
.tabs-side .settle-mode { padding: 0; }

/* ---------- 结算确认区域（双签 + 提交结算） ---------- */
.settle-confirm {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 14px 18px; margin-top: 12px;
  background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.settle-confirm .sc-head {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13.5px; font-weight: 700; color: var(--text);
  padding-right: 10px; border-right: 1px solid var(--border);
}
.settle-confirm .sc-head .ic-svg { width: 16px; height: 16px; color: var(--accent); }
.settle-confirm .sc-chips { display: flex; gap: 10px; flex-wrap: wrap; flex: 1 1 auto; }
.settle-confirm .sc-chip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--surface-2); color: var(--text-3);
  border: 1px solid var(--border); transition: all .18s ease;
  user-select: none; min-height: 40px;
}
.settle-confirm .sc-chip.confirmed {
  background: var(--accent-soft); color: var(--accent);
  border-color: var(--accent);
}
.settle-confirm .sc-chip.clickable { cursor: pointer; }
.settle-confirm .sc-chip.clickable:hover { transform: translateY(-1px); box-shadow: 0 4px 10px -4px rgba(15,23,42,.16); border-color: var(--accent); }
.settle-confirm .sc-chip.clickable:active { transform: translateY(0); }
.settle-confirm .sc-chip.confirmed.clickable:hover { background: var(--surface); color: var(--text-3); border-color: var(--border); }
.settle-confirm .sc-chip .sc-avatar {
  width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%;
  background: var(--border); color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600; letter-spacing: 0;
  overflow: hidden; object-fit: cover;
}
.settle-confirm .sc-chip.pending .sc-avatar { filter: grayscale(1) opacity(.5); background: #e5e7eb; color: var(--text-3); }
.settle-confirm .sc-chip .sc-meta { display: flex; flex-direction: column; line-height: 1.2; }
.settle-confirm .sc-chip .sc-name { font-size: 13.5px; font-weight: 600; }
.settle-confirm .sc-chip .sc-role { font-size: 11.5px; opacity: .8; }
.settle-confirm .sc-chip.confirmed .sc-role { font-weight: 600; }
.settle-confirm .sc-submit { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; margin-left: auto; }
.settle-confirm .settle-submit-btn { min-width: 120px; }
.settle-confirm .settle-submit-btn[disabled] { background: var(--surface-2); color: var(--text-3); border-color: var(--border); cursor: not-allowed; opacity: 1; }
.settle-confirm .sc-hint { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.settle-confirm .sc-hint-wrap { flex: 0 0 auto; margin-left: auto; }
.settle-confirm .sc-empty { font-size: 12px; color: var(--text-3); padding: 6px 12px; }

/* tabs-side 里的「提交结算」按钮（蓝色 primary，紧跟结算方式下拉） */
.settle-mode .settle-submit-tabs {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 14px; font-size: 13px; font-weight: 600;
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent); border-radius: 8px;
  cursor: pointer; transition: background .12s, transform .12s;
  margin-left: 6px;
}
.settle-mode .settle-submit-tabs:hover { background: #2E6BE0; border-color: #2E6BE0; }
.settle-mode .settle-submit-tabs:active { transform: scale(.97); }
.settle-mode .settle-submit-tabs[disabled] {
  background: var(--surface-2); color: var(--text-3); border-color: var(--border); cursor: not-allowed;
}
.settle-mode .settle-submit-tabs .ic-svg { width: 14px; height: 14px; }

/* ---------- 手机端响应式（≤768px） ---------- */
.hamburger { display: none; }
.scrim { position: fixed; inset: 0; background: rgba(10,10,12,.45); z-index: 55; display: none; }
.scrim.show { display: block; }

@media (max-width: 768px) {
  .hamburger {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; margin: 10px; flex: 0 0 auto;
    border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface);
    color: var(--text); font-size: 18px; line-height: 1;
    align-self: flex-start;
  }
  .view { padding: 16px 12px; margin: 0 10px 0; border-radius: var(--radius) var(--radius) 0 0; border-bottom: none; }

  /* 侧栏抽屉 */
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: var(--notice-h); left: 0; bottom: 0; width: 82vw; max-width: 280px;
    z-index: 60; transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: var(--shadow-lg); overflow-y: auto;
    background: var(--surface); /* 抽屉必须不透明，避免透出下层内容 */
  }
  .sidebar.open { transform: none; }

  /* 页面头部按钮整行 */
  .page-head { flex-direction: column; align-items: stretch; gap: 12px; }
  .page-head .btn { width: 100%; justify-content: center; }

  /* 卡片网格 */
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }

  /* 筛选条：横向滚动以适应窄屏 */
  .filter-bar { flex-wrap: wrap; gap: 10px; }
  .filter-divider { display: none; }

  /* 清单行 → 卡片式堆叠 + 内联标签 */
  .row { display: block; padding: 14px; }
  .row.head { display: none; }
  .row > * { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 5px 0; }
  .row > *::before { content: attr(data-label); color: var(--text-3); font-size: 12px; font-weight: 600; flex: 0 0 auto; white-space: nowrap; }
  .row [data-cell="title"] { font-size: 15.5px; font-weight: 600; padding: 0 0 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); }
  .row [data-cell="title"]::before { content: none; }
  .row .ctrl-cell { justify-content: space-between; padding: 0 0 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); gap: 8px; }
  .row .ctrl-cell::before { color: var(--text-3); font-size: 12px; font-weight: 600; }
  .row:hover:not(.head) .ctrl-cell:not(.static) .row-num,
  .row .ctrl-cell .row-num { display: inline-block; }
  .row:hover:not(.head) .ctrl-cell:not(.static) .drag-handle { display: none; }
  .row .ctrl-cell .drag-handle { display: none; }
  .row .ctrl-cell:not(.static) .sel-cb,
  .row:hover:not(.head) .ctrl-cell:not(.static) .sel-cb { display: inline-block; }
  .row .actions { justify-content: space-between; }
  .row .thumb-wrap, .share-thumb { display: flex; width: auto; height: auto; justify-content: flex-end; padding-top: 8px; }
  .row .thumb-wrap::before, .share-thumb::before { content: none; }
  .row .thumb-wrap .thumb { width: 72px; height: 90px; }
  .share-thumb .thumb { width: 80px; height: 100px; object-fit: cover; border-radius: 8px; }

  /* 标签横向滚动 */
  .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .tab { white-space: nowrap; }

  /* 弹窗全屏 */
  .modal-mask { padding: 0; touch-action: manipulation; }
  .modal, .modal.wide { width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  /* 交付预览弹窗移动端适配：缩略图条横向滚动，主预览贴满 */
  .modal.dpv-modal .modal-body { padding: 0 16px 16px; }
  .modal.dpv-modal .dpv-strip-wrap { padding: 12px 0 10px; }
  .modal.dpv-modal .dpv-strip-thumb { width: 56px; height: 56px; }
  .modal.dpv-modal .dpv-strip-add { min-width: 56px; height: 56px; }
  .modal.dpv-modal .dpv-actions { gap: 6px; }
  .modal.dpv-modal .dpv-fname { max-width: 200px; }
  .modal-body { padding: 18px; }
  /* 移动端灯箱：图片放大铺满视口，禁用页面级缩放手势 */
  .pv-stage { max-height: 86vh; touch-action: none; overscroll-behavior: contain; }
  .pv-img { max-height: 82vh; width: auto; max-width: 100%; object-fit: contain; }

  /* 画布 / 设计说明 高度适配（顶部仅汉堡按钮） */
  .canvas-wrap { height: calc(100dvh - 8px); }
  .dd-frame { height: calc(100dvh - 8px - 90px); min-height: 380px; }

  /* 触控尺寸 */
  .btn, .field input, .field textarea, .field select, .dd-url, .inline-form input { min-height: 44px; }
  .row-menu-btn { min-width: 40px; min-height: 40px; }

  /* 导出选择条换行 */
  .selbar { flex-wrap: wrap; }
  .selbar .flex { width: 100%; }
  .selbar .btn { flex: 1; justify-content: center; }
}

/* ---------- 管理后台 ---------- */
.admin-wrap { padding: 4px 2px; }
.admin-modules { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.admin-mod {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-2);
  font-size: 13.5px; font-weight: 600; cursor: pointer; transition: all .15s;
}
.admin-mod .ic { display: inline-flex; }
.admin-mod:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.admin-mod.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.admin-mod:disabled { opacity: .55; cursor: not-allowed; }
.admin-mod .soon { font-size: 11px; font-weight: 500; color: var(--text-3); background: var(--surface-2); padding: 1px 7px; border-radius: 999px; margin-left: 2px; }
.admin-mod.active .soon { color: #fff; background: rgba(255,255,255,.22); }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-head h3 { font-size: 16px; font-weight: 600; }

/* 模板卡片网格 */
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.tpl-card {
  position: relative; text-align: left; background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 16px; cursor: pointer; transition: all .15s; display: flex; flex-direction: column; gap: 8px;
}
.tpl-card:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.tpl-card.selected { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tpl-card.blank { border-style: dashed; background: var(--surface-2); }
.tpl-card-h { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 15px; color: var(--text); }
.tpl-card-h .ic-svg { color: var(--accent); }
.tpl-card-desc { font-size: 12.5px; color: var(--text-3); line-height: 1.5; min-height: 36px; }
.tpl-card-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.tpl-card-acts { display: flex; gap: 8px; margin-top: 6px; }
.sys-tag { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-soft); padding: 1px 7px; border-radius: 999px; margin-left: auto; }

/* 空清单内联逐行编辑器 */
.empty-editor-wrap { padding: 8px 0 24px; }
.empty-hint { color: var(--text-3); font-size: 14px; margin: 4px 0 16px; }
.empty-editor { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); }
.ee-table { width: 100%; }
.ee-head, .ee-row { display: grid; grid-template-columns: 40px minmax(160px,1.4fr) minmax(120px,1fr) 80px 72px minmax(160px,1.4fr) 44px; align-items: center; gap: 8px; padding: 8px 12px; }
.ee-head { background: var(--surface-2); font-size: 12px; color: var(--text-3); font-weight: 600; border-bottom: 1px solid var(--border); }
.ee-row { border-bottom: 1px solid var(--border); }
.ee-row:last-child { border-bottom: none; }
.ee-idx { color: var(--text-3); font-size: 13px; text-align: center; }
.ee-input { width: 100%; height: 38px; padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font-size: 13px; box-sizing: border-box; transition: border-color .15s, box-shadow .15s; }
.ee-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.ee-input[type=number] { text-align: center; }
.ee-del { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-3); cursor: pointer; font-size: 18px; line-height: 1; transition: all .15s; }
.ee-del:hover { color: #ef4444; border-color: #ef4444; }
.ee-foot { display: flex; gap: 8px; padding: 12px; background: var(--surface-2); border-top: 1px solid var(--border); }

/* 场景标签 */
.scenario-badge { align-self: flex-start; font-size: 11.5px; font-weight: 600; padding: 2px 10px; border-radius: 999px; border: 1px solid transparent; }

/* 新建清单两步向导 */
.nl-step { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 10px; }
.nl-step span { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; }
.nl-step-on { background: var(--accent); color: #fff; }
.nl-step-off { background: var(--surface-2); color: var(--text-3); border: 1px solid var(--border); }
.nl-step-sep { color: var(--text-3); }
.nl-tpl-note { background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 500; padding: 9px 12px; border-radius: var(--radius-sm); margin-bottom: 14px; }

/* ---------- 模板物料项预览表 ---------- */
.tpl-preview { margin-top: 12px; }
.mini-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.mini-table th, .mini-table td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--border); }
.mini-table th { color: var(--text-3); font-weight: 600; background: var(--surface-2); }
.mini-table td { color: var(--text-2); }
.field .mt8 { margin-top: 8px; }

/* ---------- 物料清单页：状态卡片 + 工具栏（参照 wuxinyang.cn 待办页） ---------- */
.stats-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 0 0 18px; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; cursor: pointer; transition: border-color .15s, transform .12s, box-shadow .15s;
  display: flex; flex-direction: column; gap: 2px; min-width: 0; text-align: left;
}
.stat-card:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow); }
.stat-card.active { background: var(--surface-2); }
.stat-card .stat-val { font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -.5px; font-variant-numeric: tabular-nums; color: var(--text); }
.stat-card.c-total .stat-val { color: var(--text); }
.stat-card.c-active .stat-val { color: var(--accent); }
.stat-card.c-archived .stat-val { color: var(--text-3); }
.stat-card.c-approved .stat-val { color: #059669; }
.stat-card.c-client .stat-val { color: #7c3aed; }
.stat-card.c-pending .stat-val { color: #d97706; }
.stat-card .stat-label { font-size: 12.5px; color: var(--text-3); font-weight: 500; }

/* 工具栏（搜索 + 视图 + 筛选 + 排序 + 字段配置 + 回收站） */
.lists-toolbar { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; flex-wrap: nowrap; }
.lists-toolbar .filter-chips { flex-wrap: nowrap; flex: none; }
.lists-search { position: relative; flex: 1 1 240px; min-width: 120px; }
.lists-toolbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; }
.lists-search input {
  width: 100%; height: 36px; padding: 0 34px 0 36px; border: 1px solid var(--border);
  border-radius: 10px; background: var(--surface); font-size: 13.5px; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.lists-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.lists-search input::placeholder { color: var(--text-3); }
.lists-search .ic-svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-3); pointer-events: none; }
.lists-search .ls-clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; display: none; align-items: center; justify-content: center; border: none; background: var(--surface-3); border-radius: 50%; color: var(--text-3); cursor: pointer; }
.lists-search .ls-clear:hover { background: var(--border); color: var(--text-2); }
.lists-search .ls-clear svg { width: 12px; height: 12px; }
.lists-search.has-val .ls-clear { display: flex; }

.tool-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  color: var(--text-2); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: border-color .15s, color .15s, background .15s; white-space: nowrap;
}
.tool-btn:hover { border-color: var(--border-strong); color: var(--text); }
.tool-btn.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.tool-btn.disabled { opacity: .45; cursor: not-allowed; pointer-events: none; }
.tool-btn .ic-svg { width: 15px; height: 15px; flex: none; }
.tool-btn .arrow { width: 12px; height: 12px; opacity: .7; }
.tool-btn .badge-mini { display: inline-flex; align-items: center; justify-content: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; margin-left: 2px; }
.tool-btn .badge-mini.hidden { display: none; }

/* 工具栏内的新建清单按钮：与其他 tool-btn 同高（36px），保持一行高度一致 */
.lists-toolbar .btn { min-height: 36px; height: 36px; padding: 0 16px; box-sizing: border-box; font-size: 13px; }

/* 筛选面板（多条件） */
.tool-panel {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 40;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 14px; min-width: 320px; max-width: min(420px, calc(100vw - 32px));
}
.tool-panel.hidden { display: none; }
.tool-panel .tp-section + .tp-section { margin-top: 14px; }
/* 短文本下拉（视图/排序/字段）：按内容自适应，去掉全局 320px 最小宽度 */
.tool-panel.adaptive { min-width: 0; width: max-content; max-width: min(420px, calc(100vw - 32px)); padding: 6px; }
.tool-panel.adaptive .fc-item { padding: 8px 12px; }
.tool-panel .tp-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.tool-panel .tp-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tool-panel .tp-pill { padding: 5px 12px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 12.5px; cursor: pointer; transition: .15s; white-space: nowrap; }
.tool-panel .tp-pill:hover { border-color: var(--border-strong); }
.tool-panel .tp-pill.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.tool-panel .tp-actions { display: flex; align-items: center; justify-content: space-between; padding-top: 12px; margin-top: 12px; border-top: 1px solid var(--border); gap: 8px; }
.tool-panel .tp-reset { display: inline-flex; align-items: center; gap: 5px; padding: 6px 10px; border: none; background: transparent; color: var(--text-3); font-size: 12.5px; cursor: pointer; }
.tool-panel .tp-reset:hover { color: var(--text-2); }
.tool-panel .tp-close { padding: 6px 16px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent); color: #fff; font-size: 13px; font-weight: 500; cursor: pointer; }
.tool-panel .tp-close:hover { background: var(--accent-hover); }

.tool-wrap { position: relative; display: inline-block; }

/* 字段配置 / 视图 / 排序菜单共用 */
.fc-menu .fc-item,
.tool-panel .fc-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 8px;
  border: none; background: transparent;
  text-align: left; font: inherit; color: inherit;
  cursor: pointer; transition: background .12s, color .12s;
  user-select: none; width: 100%; box-sizing: border-box;
}
.fc-menu .fc-item:hover,
.tool-panel .fc-item:hover { background: var(--surface-2); }
.fc-menu .fc-item.active,
.tool-panel .fc-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.fc-menu .fc-item.active:hover,
.tool-panel .fc-item.active:hover { background: var(--accent-soft); }
.fc-menu .fc-item .fc-eye,
.tool-panel .fc-item .fc-eye { width: 16px; height: 16px; color: var(--accent); flex: none; }
.fc-menu .fc-item.off .fc-eye,
.tool-panel .fc-item.off .fc-eye { color: var(--text-3); }
.fc-menu .fc-item .fc-name,
.tool-panel .fc-item .fc-name { flex: 1; font-size: 13px; color: inherit; }
.fc-menu .fc-item.off .fc-name,
.tool-panel .fc-item.off .fc-name { color: var(--text-3); }

/* 表格视图 */
.lists-table-wrap { background: transparent; overflow: visible; }
.lists-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
/* 表格自身承担圆角（border-collapse:separate 下可靠）：四个角分别给首/末 cell */
.lists-table thead th:first-child { border-top-left-radius: var(--radius); }
.lists-table thead th:last-child { border-top-right-radius: var(--radius); }
.lists-table tbody tr:last-child td:first-child { border-bottom-left-radius: var(--radius); }
.lists-table tbody tr:last-child td:last-child { border-bottom-right-radius: var(--radius); }
/* separate 模式下 cell 之间会有 1px 间隙；用 td border-bottom 替代原 tr border-bottom */
.lists-table tbody tr:last-child td { border-bottom: none; }
.lists-table tbody td { padding: 14px; color: var(--text-2); vertical-align: middle; border-bottom: 1px solid var(--border); }
.lists-table thead th { background: var(--surface-2); color: var(--text-3); font-weight: 600; font-size: 12px; text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; letter-spacing: .2px; text-transform: uppercase; }
.lists-table tbody tr { cursor: pointer; transition: background .12s; }
.lists-table tbody tr:hover { background: var(--accent-soft); }
.lists-table .col-name { font-weight: 600; color: var(--text); }
.lists-table .col-name .col-client { font-weight: 400; color: var(--text-3); font-size: 12px; margin-top: 2px; }
.lists-table .col-client { font-weight: 400; color: var(--text-3); font-size: 12.5px; }
.lists-table .col-num { font-variant-numeric: tabular-nums; }
.lists-table .col-date { color: var(--text-3); font-size: 12.5px; }
.lists-table .col-actions { text-align: right; white-space: nowrap; }
.lists-table .col-actions .ic-btn { width: 28px; height: 28px; }
.lists-table tbody tr.archived { opacity: .6; }

/* 设计稿协作视图（viewDesignList /list/<token>）：参考/原图/预览缩略图缩小 20%（48→38、60→48） */
.row[data-design-row] .thumb { width: 38px; height: 48px; }

/* 物料项内"画板"入口按钮（详情页"内容"列） */
.item-canvas-btn { display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px; border: 0; border-radius: 0; background: transparent; color: var(--accent); font-size: 12.5px; font-weight: 500; cursor: pointer; transition: .12s; }
.item-canvas-btn:hover { color: var(--accent-hover, #2E6BE0); }
.it-cell-note { font-size: 12px; color: var(--text-2); margin-top: 4px; line-height: 1.5; word-break: break-word; }
.it-cell-note.muted { color: var(--text-3); }

/* 物料项多附件（preview_paths / source_paths）：首图 + 角标 + hover 放大镜 */
.thumb-wrap.multi { position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; min-height: 52px; padding: 0; overflow: hidden; cursor: zoom-in; }
.thumb-wrap.multi .thumb { width: 40px; height: 52px; flex: 0 0 40px; border-radius: 5px; background-size: cover; background-position: center; background-color: var(--border); border: 1px solid var(--border); transition: transform .15s ease, filter .15s ease; }
.thumb-wrap.multi:hover .thumb { transform: scale(1.04); filter: brightness(.92); }
.thumb-wrap.multi .thumb-extra { position: absolute; right: 2px; bottom: 2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: rgba(15, 23, 42, .78); color: #fff; font-size: 10.5px; font-weight: 600; line-height: 18px; text-align: center; letter-spacing: 0; pointer-events: none; }
.thumb-wrap.multi .thumb-zoom { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; background: rgba(15, 23, 42, 0); transition: background .15s ease; pointer-events: none; }
.thumb-wrap.multi .thumb-zoom .ic-svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: rgba(60,131,246, .92); opacity: 0; transform: scale(.7); transition: opacity .15s ease, transform .15s ease; box-shadow: 0 2px 8px rgba(15, 23, 42, .25); }
.thumb-wrap.multi:hover .thumb-zoom { background: rgba(15, 23, 42, .12); }
.thumb-wrap.multi:hover .thumb-zoom .ic-svg { opacity: 1; transform: scale(1); }
.source-cell.multi { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.source-cell.multi .src-link { font-size: 11.5px; }
.source-cell.multi .src-x { font-size: 11px; padding: 0 4px; height: 18px; }
.multi-files { display: flex; flex-direction: column; gap: 2px; }
.multi-files .src-link { display: inline-block; padding: 1px 6px; font-size: 11px; color: var(--accent); text-decoration: none; border: 1px solid var(--accent-soft); border-radius: 4px; background: var(--surface); }
.multi-files .src-link:hover { background: var(--accent-soft); }

/* ---------- 源文件统一管理弹窗分区（openSourceModal 复用：已上传列表 + 继续上传） ---------- */
.src-existing { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.src-existing-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.src-existing-head .ic-svg { width: 16px; height: 16px; color: var(--text-2); flex: none; }
.src-upload { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--border); }
.src-upload-head { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text); }
.src-upload-head .ic-svg { width: 16px; height: 16px; color: var(--text-2); flex: none; }
.src-upload-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 4px; }
/* 列表行加下载链接（每个文件都可单独下载，不需全选） */
.sd-row .sd-dl { flex: 0 0 auto; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-3); border-radius: 6px; transition: background .12s, color .12s; }
.sd-row .sd-dl:hover { background: var(--accent-soft); color: var(--accent); }
.sd-row .sd-dl .ic-svg { width: 14px; height: 14px; }

/* 物料项独立白板 modal（fabric.js 画布） */
.ic-toolbar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.ic-tool { display: inline-flex; align-items: center; gap: 4px; padding: 5px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text-2); font-size: 12.5px; cursor: pointer; transition: .12s; }
.ic-tool:hover { border-color: var(--border-strong); color: var(--text); }
.ic-tool.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ic-t-ic { font-size: 13px; line-height: 1; }
.ic-tool-sep { width: 1px; height: 20px; background: var(--border); margin: 0 4px; }
.ic-status { margin-left: auto; }
.ic-stage-wrap { width: 100%; height: 600px; overflow: auto; background: #fafafa; border-top: 1px solid var(--border); display: flex; justify-content: center; }
.ic-stage-wrap canvas { display: block; }
/* 画板全屏：modal 占满视口、头部横排（标题左、actions 右） */
.modal.ic-fullscreen { width: 95vw; max-width: 95vw; height: 90vh; max-height: 90vh; margin: 5vh auto; }
.modal.ic-fullscreen .modal-body { padding: 0; }
.modal.ic-fullscreen .ic-toolbar { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-wrap: wrap; }
.modal.ic-fullscreen .ic-stage-wrap { width: 100%; height: calc(90vh - 130px); min-height: 0; min-width: 0; overflow: auto; background: #fafafa; display: flex; justify-content: center; }
.modal-head .ic-head-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* ---------- 物料清单详情页（清单项）：状态卡片 + 工具栏 + 卡片视图 ---------- */
.items-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.items-body.card-view { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.items-body.card-view .panel { all: unset; }
.items-body.card-view .empty { padding: 60px; grid-column: 1 / -1; }

.item-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; transition: border-color .15s, transform .12s, box-shadow .15s; position: relative; }
.item-card:hover { border-color: var(--border-strong); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.item-card .ic-thumb { aspect-ratio: 16/10; background: var(--surface-2); display: grid; place-items: center; overflow: hidden; position: relative; }
.item-card .ic-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.item-card .ic-thumb .ph { width: 36px; height: 36px; opacity: .35; color: var(--text-3); }
.item-card .ic-thumb .ic-status { position: absolute; top: 8px; right: 8px; }
.item-card .ic-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.item-card .ic-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.item-card .ic-title { font-weight: 600; font-size: 14px; color: var(--text); line-height: 1.35; word-break: break-word; }
.item-card .ic-meta { font-size: 12px; color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; }
.item-card .ic-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 8px; margin-top: 2px; border-top: 1px dashed var(--border); font-size: 12px; gap: 8px; }
.item-card .ic-designer { color: var(--text-2); display: flex; align-items: center; gap: 5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-card .ic-designer .ic-svg { width: 14px; height: 14px; flex: none; color: var(--text-3); }
.item-card .ic-quick { display: flex; gap: 4px; align-items: center; flex: none; }
.item-card .ic-quick button { width: 26px; height: 26px; padding: 0; border-radius: 6px; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); cursor: pointer; }
.item-card .ic-quick button:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.item-card .ic-quick .ic-svg { width: 14px; height: 14px; }

@media (max-width: 640px) {
  .items-cards, .items-body.card-view { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .stats-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lists-toolbar { gap: 8px; }
  .lists-table thead th, .lists-table tbody td { padding: 10px 8px; }
}

/* ---------- 系统设置：分享到聊天卡片 ---------- */
.settings-grid { display: grid; grid-template-columns: minmax(320px, 1fr) minmax(280px, 420px); gap: 28px; align-items: start; }
.settings-form { display: flex; flex-direction: column; gap: 18px; }
.cover-drop { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px; border: 1.5px dashed var(--border-strong); border-radius: 12px; background: var(--surface-2); cursor: pointer; transition: border-color .15s, background .15s; }
.cover-drop:hover { border-color: var(--accent); background: var(--accent-soft); }
.cover-prev { width: 120px; height: 120px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border-strong); background: #fff; }
.cover-hint { font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.5; }
.settings-preview { position: sticky; top: 16px; }
.wx-card-preview { background: #ededed; border-radius: 14px; padding: 20px; }
.wx-bubble-row { display: flex; gap: 10px; align-items: flex-start; }
.wx-avatar { width: 38px; height: 38px; border-radius: 8px; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.wx-bubble { position: relative; background: #fff; border-radius: 8px; max-width: 320px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.wx-bubble::before { content: ''; position: absolute; left: -6px; top: 14px; border: 6px solid transparent; border-right-color: #fff; }
.wx-card { display: flex; gap: 10px; padding: 10px; align-items: center; }
.wx-card-cover { width: 64px; height: 64px; border-radius: 8px; object-fit: cover; flex-shrink: 0; background: var(--accent-soft); }
.wx-card-body { min-width: 0; flex: 1; }
.wx-card-title { font-size: 14px; font-weight: 600; color: #1a1a1a; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wx-card-desc { font-size: 12px; color: #888; margin-top: 3px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wx-card-foot { font-size: 11px; color: #b0b0b0; margin-top: 6px; }
@media (max-width: 760px) { .settings-grid { grid-template-columns: 1fr; } .settings-preview { position: static; } }

/* 可点击标签（客户 / 状态 / 场景 / 物料类型），点击触发筛选 */
.clickable-tag { cursor: pointer; transition: filter .15s ease, box-shadow .15s ease, transform .15s ease; user-select: none; }
.clickable-tag:hover { filter: brightness(.95); box-shadow: 0 0 0 2px var(--accent-soft); }
.clickable-tag:active { transform: translateY(1px); }
.scenario-badge.clickable-tag:hover, .tag.clickable-tag:hover { filter: brightness(1.05); box-shadow: 0 0 0 2px var(--accent-soft); }
.clickable-tag:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 物料清单卡片网格：默认最多 3 列，平板 2 列，手机 1 列 */
.lists-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(310px, 1fr)); gap: 16px; }
@media (max-width: 1024px) { .lists-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .lists-grid { grid-template-columns: 1fr; } }

/* ---------- 用户管理 ---------- */
.ut-block { background: #fff; border: 1px solid var(--border-strong); border-radius: 12px; padding: 16px 18px; }
.table-wrap { overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.table-wrap::-webkit-scrollbar { display: none; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.data-table thead th { text-align: left; padding: 10px 12px; color: var(--text-3); font-weight: 600; font-size: 12.5px; background: var(--surface-2); border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.data-table thead th:first-child { border-top-left-radius: 8px; }
.data-table thead th:last-child { border-top-right-radius: 8px; }
.data-table tbody td { padding: 11px 12px; border-bottom: 1px solid var(--border-strong); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--accent-soft); }
.u-cell { display: flex; align-items: center; gap: 9px; }
.u-cell .avatar.sm { width: 26px; height: 26px; font-size: 11px; flex-shrink: 0; }
/* ⚠️ 不能在 td 上用 display:flex —— 会覆盖 table-cell，行高不再拉伸，边框分割线与其他列错开（2026-10-10 修复） */
.ut-acts { white-space: nowrap; }
.ut-acts .btn + .btn { margin-left: 8px; }
/* 操作列图标按钮（2026-10-22）：文字按钮 → icon 按钮，等宽 28px 方形 */
.ut-acts .ibtn { width: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
.ut-acts .ibtn .ic-svg { width: 15px; height: 15px; }

/* ---------- 专家邀请码 ---------- */
.invite-code-cell { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; font-weight: 600; letter-spacing: .5px; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border-strong); cursor: pointer; }
.invite-code-cell:hover { border-color: var(--accent); color: var(--accent); }
.invite-result { text-align: center; }
.invite-result-code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 30px; font-weight: 700; letter-spacing: 3px; color: var(--accent); margin: 6px 0 4px; }
.invite-result-role { color: var(--text-3); font-size: 13px; margin-bottom: 18px; }
/* 邮件服务：常用服务商快填 */
.mail-presets { display: flex; flex-wrap: wrap; gap: 8px; }
.pend-list { display: flex; flex-direction: column; gap: 10px; }
.pend-card { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface-2); }
.pend-avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 14px; font-weight: 600; overflow: hidden; flex-shrink: 0; }
.pend-avatar.lg { width: 46px; height: 46px; font-size: 17px; }
.pend-avatar .avatar-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pend-info { flex: 1; min-width: 0; }
.pend-name { font-size: 14px; font-weight: 600; color: var(--text); }
.pend-sub { line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pend-info-row { display: flex; align-items: center; gap: 14px; padding: 6px 4px 14px; border-bottom: 1px solid var(--border-strong); margin-bottom: 14px; }
.pend-info-row .pend-info { flex: 1; }


/* ---------- 飞书通讯录同步结果弹窗 ---------- */
.section-head > div { display: flex; gap: 8px; align-items: center; }
.sync-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 14px; }
.sync-metric { background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px; padding: 12px 14px; text-align: center; }
.sync-metric .n { font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.2; }
.sync-metric .l { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.sync-metric.accent { background: var(--accent-soft); border-color: var(--accent); }
.sync-metric.accent .n { color: var(--accent); }
.sync-detail { border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 14px; background: #fff; margin-top: 10px; }
.sync-detail summary { cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--text); }
.data-table.compact tbody td, .data-table.compact thead th { padding: 8px 10px; font-size: 12.5px; }

/* ===== 画板全屏覆盖层（CanvasBoard 引擎挂载点） ===== */
.cb-layer { position: fixed; inset: 0; z-index: 200; background: #fff; }

/* ===== 画板弹窗（非全屏，16:9 比例，不显示标题栏，画板引擎自带顶栏+关闭按钮） ===== */
.modal.canvas-modal { width: min(90vw, 1400px); aspect-ratio: 16 / 9; max-width: 96vw; max-height: 90vh; }
.modal.canvas-modal .modal-body { padding: 0; height: 100%; }
.cb-modal-mount { position: relative; width: 100%; height: 100%; min-height: 0; }
.cb-modal-mount { position: relative; width: 100%; height: 100%; min-height: 0; }

/* 画板加载蒙层：覆盖整个 modal，挡住「先空白 UI 再内容」闪烁 */
.cp-loading {
  position: absolute; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center;
  background: #f5f5f7;
  transition: opacity .28s ease;
}
.cp-loading.cp-loading-out { opacity: 0; pointer-events: none; }
.cp-loading-inner { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cp-spinner {
  width: 36px; height: 36px;
  border: 3px solid #e5e7eb; border-top-color: #3C83F6;
  border-radius: 50%;
  animation: cp-spin .85s linear infinite;
}
@keyframes cp-spin { to { transform: rotate(360deg); } }
.cp-loading-text { font-size: 13px; color: #6b7280; font-weight: 500; }

/* ===== 回收站 modal ===== */
.recycle-toolbar { display: flex; align-items: center; gap: 12px; padding: 0 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.recycle-search { flex: 1; display: flex; align-items: center; gap: 8px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: .12s; }
.recycle-search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.recycle-search .ic-svg { width: 16px; height: 16px; color: var(--text-3); flex: none; }
.recycle-search input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; font-size: 13.5px; }
.recycle-toolbar .btn.danger-outline { background: transparent; color: #dc2626; border: 1px solid #fecaca; }
.recycle-toolbar .btn.danger-outline:hover:not(:disabled) { background: #fee2e2; border-color: #fca5a5; }
.recycle-list { display: flex; flex-direction: column; gap: 8px; max-height: 56vh; overflow-y: auto; padding-right: 4px; }
.recycle-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); transition: .12s; }
.recycle-item:hover { border-color: var(--border-strong); background: var(--surface-2); }
.ri-info { flex: 1; min-width: 0; }
.ri-name { font-size: 14px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-meta { font-size: 12px; color: var(--text-3); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ri-actions { display: flex; gap: 6px; flex: none; }
.ri-actions .btn { font-size: 12px; padding: 4px 10px; }
.ri-actions .btn.danger { color: #dc2626; border-color: #fecaca; background: transparent; }
.ri-actions .btn.danger:hover { background: #fee2e2; border-color: #fca5a5; }
.recycle-empty { padding: 60px 20px; text-align: center; color: var(--text-3); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.recycle-empty .ic-svg { width: 48px; height: 48px; opacity: .35; }
.recycle-empty .muted { color: var(--text-3); font-size: 12.5px; }
.lists-tool-recycle { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; font-size: 13px; }
.lists-tool-recycle .ic-svg { width: 15px; height: 15px; opacity: .75; }

/* 列表卡片右下角「更多」按钮（不触发卡片点击进入；hover 时浮现） */
.card .card-menu-btn { position: absolute; bottom: 10px; right: 10px; width: 28px; height: 28px; border: 0; background: transparent; border-radius: 6px; color: var(--text-3); cursor: pointer; opacity: 0; transition: .12s; display: grid; place-items: center; z-index: 2; }
.card:hover .card-menu-btn { opacity: 1; }
.card .card-menu-btn:hover { background: var(--surface-2); color: var(--text); }
.card .card-menu-btn .ic-svg { width: 16px; height: 16px; }
/* 菜单 pop 紧贴按钮上方 */
.card .menu-pop { right: 8px; bottom: 42px; top: auto; }
/* menu item danger（红色提示） */
.menu-item.danger { color: #dc2626; }
.menu-item.danger:hover { background: #fee2e2; color: #b91c1c; }

/* 菜单内分隔线 */
.menu-divider { height: 1px; margin: 4px 2px; background: var(--border); }

/* 物料清单详情页 page-head 右侧的「⋯ 更多」触发器（最右侧，无外边框） */
.list-more-wrap { position: relative; display: inline-flex; }
.list-more-btn {
  width: 28px; height: 28px; border: none; background: transparent;
  border-radius: 6px; color: var(--text-3); cursor: pointer;
  display: grid; place-items: center; transition: background .12s, color .12s;
}
.list-more-btn:hover { background: var(--surface-2); color: var(--text); }
.list-more-btn[aria-expanded="true"] { background: var(--surface-2); color: var(--text); }
.list-more-btn .ic-svg { width: 16px; height: 16px; }
/* 详情页浮窗默认弹出方向为向下（参考 飞书「更多」菜单），靠右对齐，与触发器对齐 */
.list-more-wrap > .menu-pop { right: 0; top: calc(100% + 6px); }

/* ---------- 行右键唤起的浮窗（Notion 风：圆角 12、阴影、icon + label） ---------- */
.cp-ctx-menu {
  position: fixed;
  z-index: 100;
  min-width: 200px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 12px 36px -8px rgba(15, 23, 42, .18), 0 6px 18px -6px rgba(15, 23, 42, .10);
  display: flex;
  flex-direction: column;
  gap: 2px;
  animation: cp-ctx-in .12s ease-out;
}
.cp-ctx-menu[hidden] { display: none; }
@keyframes cp-ctx-in {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.cp-ctx-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px;
  border: 0;
  background: transparent;
  border-radius: 8px;
  color: var(--text, #18181B);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: background .12s, color .12s;
}
.cp-ctx-item:hover { background: var(--surface-2, #fafafa); }
.cp-ctx-item:active { background: var(--accent-soft, #EDF4FE); color: var(--accent, #3C83F6); }
.cp-ctx-item.primary { color: var(--accent, #3C83F6); font-weight: 600; }
.cp-ctx-item.primary:hover { background: var(--accent-soft, #EDF4FE); }
.cp-ctx-ic { width: 18px; height: 18px; flex: 0 0 18px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-3, #71717A); }
.cp-ctx-item.primary .cp-ctx-ic { color: var(--accent, #3C83F6); }
.cp-ctx-label { flex: 1; }

/* ===== 物料详情右抽屉（master-detail） ===== */
.drawer-scrim { position: fixed; inset: 0; background: rgba(15,23,42,.32); opacity: 0; transition: opacity .2s ease; z-index: 60; }
.drawer-scrim.show { opacity: 1; }
.item-drawer {
  position: fixed; top: 0; right: 0; height: 100vh; width: 384px; max-width: 92vw;
  background: var(--bg, #fff); box-shadow: -8px 0 30px rgba(15,23,42,.12);
  transform: translateX(100%); transition: transform .22s cubic-bezier(.22,.61,.36,1);
  z-index: 61; display: flex; flex-direction: column;
}
.item-drawer.open { transform: translateX(0); }
.id-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 16px 16px 12px; border-bottom: 1px solid var(--border); }
.id-head-main { min-width: 0; }
.id-title { font-size: 16px; font-weight: 700; color: var(--text, #0a0a0a); line-height: 1.35; word-break: keep-all; margin-bottom: 6px; }
.id-close { flex: 0 0 28px; width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border: none; background: none; color: var(--text-3, #6b7280); border-radius: 8px; cursor: pointer; }
.id-close:hover { background: var(--surface-2, #fafafa); color: var(--text, #0a0a0a); }
.id-body { flex: 1; overflow-y: auto; padding: 14px 16px; }
.id-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.id-fk { font-size: 12px; color: var(--text-3, #6b7280); margin-bottom: 3px; }
.id-fv { font-size: 13.5px; color: var(--text, #0a0a0a); font-weight: 600; line-height: 1.4; min-height: 19px; }
/* ⚠️ 占位（"—"）字段使用 muted 灰字 + 常规字重，与有值字段区分；空字段不再占满行高，规避「字段底部白色色块」视觉残留 */
.id-fv:empty::before, .id-fv.is-empty { color: var(--text-3, #9ca3af); font-weight: 400; }
.id-sec { margin-top: 18px; }
.id-sec-t { font-size: 12.5px; font-weight: 700; color: var(--text-2, #374151); margin-bottom: 9px; display: flex; align-items: center; gap: 6px; }
.id-count { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--surface-2, #fafafa); color: var(--text-3, #6b7280); font-size: 11.5px; font-weight: 700; }
.id-media { display: flex; gap: 12px; align-items: center; }
.id-media-img { width: 84px; height: 84px; object-fit: cover; border-radius: 8px; border: 1px solid var(--border); background: var(--surface-2, #fafafa); flex: 0 0 84px; }
.id-media-ph { width: 84px; height: 84px; border-radius: 8px; background: var(--surface-2, #fafafa); display: flex; align-items: center; justify-content: center; color: var(--text-3, #6b7280); flex: 0 0 84px; }
.id-content { font-size: 13px; color: var(--text, #0a0a0a); line-height: 1.55; background: var(--surface-2, #fafafa); border-radius: 8px; padding: 10px 12px; }
.id-files { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.id-file { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text, #0a0a0a); background: var(--surface-2, #fafafa); border-radius: 8px; padding: 7px 10px; }
.id-file svg { color: var(--text-3, #6b7280); flex: 0 0 16px; }
.id-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.id-foot { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.id-foot .btn { flex: 1; justify-content: center; font-size: 12.5px; padding: 8px 6px; }
.ref-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--accent, #3C83F6); background: var(--surface-2, #fafafa); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; cursor: pointer; font-family: inherit; transition: .15s; }
.ref-btn:hover { background: #EDF4FE; border-color: var(--accent, #3C83F6); }
.ref-btn.block { width: 100%; justify-content: flex-start; margin-top: 8px; }
.row.active-drawer { background: #EDF4FE; }

/* 物料详情抽屉：四宫格快捷入口（简化视觉） */
.id-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 16px; }
.id-quick-btn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 13px 4px 11px; background: var(--surface-2, #fafafa); border: 1px solid var(--border); border-radius: 12px; cursor: pointer; transition: .15s; color: var(--text-2, #374151); font-family: inherit; }
.id-quick-btn:hover { border-color: var(--accent, #3C83F6); background: #EDF4FE; color: var(--accent, #3C83F6); }
.id-quick-ic { width: 24px; height: 24px; display: inline-flex; align-items: center; justify-content: center; color: var(--accent, #3C83F6); }
.id-quick-ic svg { width: 24px; height: 24px; }
.id-quick-label { font-size: 11.5px; font-weight: 600; line-height: 1.2; text-align: center; }
.id-quick-badge { position: absolute; top: 6px; right: 8px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent, #3C83F6); color: #fff; font-size: 10.5px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }

/* 物料详情抽屉：评论区 */
.id-comments { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.id-comments .id-sec-t { margin-bottom: 10px; }
.id-comments-list { display: flex; flex-direction: column; gap: 12px; max-height: 240px; overflow-y: auto; }
.cm-item { display: flex; gap: 10px; }
.cm-av { flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent, #3C83F6); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; overflow: hidden; }
.cm-av .cm-av-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.cm-av .cm-av-fallback { line-height: 1; }
.cm-main { flex: 1; min-width: 0; }
.cm-top { display: flex; align-items: baseline; gap: 8px; }
.cm-name { font-size: 13px; font-weight: 700; color: var(--text, #0a0a0a); }
.cm-time { font-size: 11px; color: var(--text-3, #6b7280); }
.cm-text { font-size: 13px; color: var(--text, #0a0a0a); line-height: 1.5; margin-top: 2px; word-break: break-word; white-space: pre-wrap; }
.id-comment-input { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end; }
.id-comment-input textarea { flex: 1; resize: none; border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px; color: var(--text, #0a0a0a); background: var(--bg, #fff); line-height: 1.4; }
.id-comment-input textarea:focus { outline: none; border-color: var(--accent, #3C83F6); }
.id-comment-input .btn { flex: 0 0 auto; }


/* ===== 按设计师查看 ===== */
.designer-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 18px; }
.nav-pill {
  border: 1px solid var(--border, #e3e3e8);
  background: var(--surface, #fff);
  color: var(--text-2, #444);
  border-radius: 999px;
  padding: 6px 14px;
  font: inherit; font-size: 13px; font-weight: 600;
  cursor: pointer; transition: all .12s ease;
}
.nav-pill:hover { border-color: var(--accent, #3C83F6); color: var(--accent, #3C83F6); }
.nav-pill.active { background: var(--accent, #3C83F6); border-color: var(--accent, #3C83F6); color: #fff; }
.by-designer-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 16px; }
.by-designer-stats .stat { font-size: 13px; color: var(--text-2, #444); display: inline-flex; align-items: center; gap: 6px; }
.by-designer-stats .stat b { color: var(--text, #0a0a0a); font-size: 15px; }
.by-designer-project { margin-bottom: 22px; }
.bdp-head { display: flex; align-items: baseline; gap: 10px; padding: 0 2px 8px; border-bottom: 1px solid var(--border, #e3e3e8); margin-bottom: 10px; }
.bdp-title { font-size: 15px; font-weight: 700; color: var(--text, #0a0a0a); }
.bdp-head .client { font-size: 12px; color: var(--accent, #3C83F6); font-weight: 600; }

/* ===== 2026-09-14 UI 批量优化（14 项） ===== */

/* UI-9 优先级列：内容与表头居中、列宽收窄（72px，列宽在 ITEM_COL_SPECS） */
.row [data-col="priority"] { text-align: center; }
.row [data-col="priority"] .prio-dd { display: inline-flex; }

/* UI-10 物料行置顶图钉：行悬浮显示，已置顶常显（accent） */
.row [data-col="title"] { display: flex; align-items: center; gap: 4px; }
.row [data-col="title"] .it-title { flex: 1 1 auto; min-width: 0; }
.pin-btn { flex: 0 0 auto; display: none; align-items: center; justify-content: center; width: 18px; height: 18px; border: 0; border-radius: 5px; background: transparent; color: var(--text-3); cursor: pointer; padding: 0; }
.pin-btn .ic-svg { width: 14px; height: 14px; }
.row:hover .pin-btn { display: inline-flex; }
.pin-btn.on { display: inline-flex; color: var(--accent); }
.pin-btn:hover { background: var(--accent-soft); color: var(--accent); }

/* UI-7 源文件在线预览：文件名可点击（cursor） + PDF 内嵌 + zip 目录清单 */
.row .src-link { cursor: pointer; }
.srcpdf-frame-wrap { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface-2); }
.srcpdf-frame { width: 100%; height: 72vh; border: 0; display: block; background: #fff; }
.zp-list { max-height: 60vh; overflow: auto; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.zp-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px; font-size: 13px; border-bottom: 1px solid var(--border); }
.zp-row:last-child { border-bottom: 0; }
.zp-row.dir .zp-name { color: var(--text-2); }
.zp-ic { color: var(--text-3); display: inline-flex; flex: 0 0 auto; }
.zp-ic .ic-svg { width: 15px; height: 15px; }
.zp-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; }
.zp-size { flex: 0 0 auto; color: var(--text-3); font-size: 12px; font-variant-numeric: tabular-nums; }

/* UI-8/UI-12 抽屉字段就地编辑：悬浮灰细线、编辑蓝细线、输入光标不溢出细线 */
.id-fv-edit { cursor: text; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 1.5px; text-underline-offset: 4px; transition: text-decoration-color .12s; }
.id-fv-edit:hover { text-decoration-color: var(--border-strong); }
.id-fv-edit:active, .id-fv-edit:focus { text-decoration-color: var(--accent); }
.drawer-edit-line { padding: 4px 2px; }
.drawer-edit-line .inline-edit-input { border: 0; border-radius: 0; border-bottom: 1.5px solid var(--accent); background: transparent; padding: 4px 6px; box-shadow: none; height: auto; min-height: 32px; }
.drawer-edit-line .inline-edit-input:focus { box-shadow: none; }
.drawer-edit-opts { display: flex; flex-direction: column; gap: 4px; padding: 4px; }
.drawer-edit-opts .status-opt { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 0; border-radius: 7px; background: transparent; cursor: pointer; font-size: 13px; color: var(--text); }
.drawer-edit-opts .status-opt:hover { background: var(--surface-2); }
.drawer-edit-opts .status-opt.sel { background: var(--accent-soft); }

/* UI-11 评论附件：待发送 chips + 已发评论附件（图片缩略图 / 文件下载） */
.id-cm-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cm-file-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 4px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface-2); font-size: 12px; max-width: 100%; }
.cm-file-thumb { width: 26px; height: 26px; border-radius: 5px; object-fit: cover; display: block; }
.cm-file-ic { color: var(--text-3); display: inline-flex; }
.cm-file-ic .ic-svg { width: 14px; height: 14px; }
.cm-file-name { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-file-x { border: 0; background: transparent; color: var(--text-3); cursor: pointer; display: inline-flex; padding: 2px; border-radius: 4px; }
.cm-file-x:hover { color: #dc2626; background: #fef2f2; }
.cm-file-x .ic-svg { width: 12px; height: 12px; }
.cm-atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cm-att-thumb { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: zoom-in; padding: 0; background: var(--surface-2); }
.cm-att-thumb img { width: 64px; height: 64px; object-fit: cover; display: block; }
.cm-att-file { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; color: var(--accent); text-decoration: none; max-width: 100%; background: var(--surface-2); }
.cm-att-file span { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cm-att-file:hover { border-color: var(--accent); }
.cm-att-file .ic-svg { width: 14px; height: 14px; flex: none; }
.id-comment-input textarea { min-height: 34px; }

/* UI-13 按设计师模式（合并进物料交付页） */
.lists-mode-seg { flex: 0 0 auto; }
.dsr-section-t { font-size: 13px; font-weight: 600; color: var(--text-2); margin: 18px 0 10px; letter-spacing: .3px; }
.dsr-section-t:first-child { margin-top: 4px; }
.dsr-section-t.idle { color: var(--text-3); font-weight: 500; }
.dsr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.dsr-card { padding: 14px 16px; }
.dsr-card.active { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.dsr-top { display: flex; align-items: center; gap: 10px; }
.dsr-av { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; overflow: hidden; }
.dsr-av.sm { flex: 0 0 28px; width: 28px; height: 28px; font-size: 12px; }
.dsr-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.dsr-info { flex: 1 1 auto; min-width: 0; }
.dsr-name { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dsr-stats { display: flex; gap: 12px; margin-top: 12px; font-size: 12.5px; color: var(--text-3); flex-wrap: wrap; }
.dsr-stats b { color: var(--text); font-size: 14px; margin-right: 2px; }

/* 按设计师：列表视图（紧凑表格） */
.dsr-table { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; width: 100%; max-width: 100%; box-sizing: border-box; }
.dsr-table .row { display: grid; grid-template-columns: 2fr 0.9fr 0.9fr 0.7fr 0.7fr 1.2fr; gap: 8px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; width: 100%; min-width: 0; box-sizing: border-box; }
.dsr-table .row.head { background: var(--surface-2); color: var(--text-3); font-size: 12px; font-weight: 600; cursor: default; }
.dsr-table .row.head:hover { background: var(--surface-2); }
.dsr-table .row:last-child { border-bottom: none; }
.dsr-table .row:not(.head):hover { background: var(--surface-2); }
.dsr-table .num { text-align: center; font-variant-numeric: tabular-nums; color: var(--text-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.dsr-table .num b { color: var(--text); font-size: 14px; }
.dsr-table .dsr-row-head .num { color: var(--text-3); }
.dsr-cell-name { display: flex; align-items: center; gap: 10px; min-width: 0; overflow: hidden; }
.dsr-cell-meta { min-width: 0; flex: 1; overflow: hidden; }

/* ---------- AI 交付物检查（2026-09-10） ---------- */
.ac-scope { font-size: 13px; line-height: 1.6; margin-bottom: 12px; }
.ac-scope b { color: var(--text); font-weight: 600; }
.ac-progress { margin-top: 12px; font-size: 13px; line-height: 1.6; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--surface-2); border: 1px solid var(--border); }
.ac-hist-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; }
.ac-hist-main { flex: 1 1 auto; min-width: 0; }
.ac-hist-title { font-size: 13.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-hist-sub { font-size: 12px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-hist-row .badge { flex: 0 0 auto; }
.ac-report-head { display: flex; align-items: center; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.ac-report-body { font-size: 13.5px; line-height: 1.75; color: var(--text-2); max-height: 56vh; overflow: auto; }
.ac-report-body .ac-md-h1 { font-size: 16px; font-weight: 700; color: var(--text); margin: 0 0 10px; }
.ac-report-body .ac-md-h2 { font-size: 14px; font-weight: 700; color: var(--text); margin: 16px 0 8px; }
.ac-report-body .ac-md-ul { margin: 0 0 10px; padding-left: 20px; }
.ac-report-body .ac-md-ul li { margin: 3px 0; }
.ac-report-body .ac-md-p { margin: 0 0 8px; }

/* 管理后台 → 系统设置 → AI 检查 */
.ai-set-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ai-set-field { display: flex; flex-direction: column; gap: 6px; }
.ai-set-field label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.ai-set-field input { height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 13.5px; width: 100%; box-sizing: border-box; }
.ai-set-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.ai-set-tip { font-size: 12.5px; color: var(--text-3); margin-top: 10px; }

/* AI 检查弹窗 · 物料勾选面板（2026-09-11） */
.ac-toolbar { display: flex; align-items: center; gap: 10px; margin: 8px 0; flex-wrap: wrap; }
.ac-toolbar-sep { color: var(--text-3); }
.ac-link { color: var(--accent); cursor: pointer; font-size: 13px; }
.ac-link:hover { text-decoration: underline; }
.ac-item-list { max-height: 260px; overflow: auto; }
.ac-item-chk { display: flex; align-items: center; gap: 10px; }
.ac-item-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-item-meta { flex: 0 0 auto; font-size: 12px; }

/* 画布卡片 · 成组（默认无视觉；只在拖拽时显示虚线框） */
.ccard.grouped-dragging { outline: 2px dashed var(--accent); outline-offset: 5px; }

/* 选目标编组模式 */
.canvas-wrap.cc-picking .ccard { cursor: copy; transition: outline .12s; outline: 2px dashed transparent; outline-offset: 3px; }
.canvas-wrap.cc-picking .ccard:hover { outline-color: var(--accent); }
.canvas-wrap.cc-picking .ccard[data-group]:not([data-group=""]):hover { outline: 2px solid var(--accent) dashed; outline-offset: 3px; }

/* 右键菜单 */
.cc-ctx-menu { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 4px; min-width: 200px; }
.cc-ctx-menu .cc-ctx-item { display: block; width: 100%; text-align: left; padding: 8px 12px; border: none; background: transparent; cursor: pointer; border-radius: 6px; transition: background .12s; }
.cc-ctx-menu .cc-ctx-item:hover { background: var(--surface-2); }
.cc-ctx-menu .cc-ctx-main { font-size: 13.5px; color: var(--text); font-weight: 500; }
.cc-ctx-menu .cc-ctx-sub { font-size: 11.5px; margin-top: 2px; }

/* 源文件大图预览弹窗（2026-09-12） */
.src-pv-modal-body { padding: 0; background: var(--surface-2); }
.src-pv-body { display: flex; align-items: center; justify-content: center; min-height: 60vh; max-height: 78vh; overflow: auto; padding: 16px; box-sizing: border-box; background: #0f172a; }
.src-pv-img img { max-width: 90vw; max-height: 76vh; object-fit: contain; display: block; box-shadow: 0 8px 32px rgba(0,0,0,.4); border-radius: 4px; background: #fff; }
.src-pv-pdf iframe { width: 90vw; height: 76vh; border: 0; background: #fff; border-radius: 4px; }
.src-pv-fail { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 48px 24px; text-align: center; }
.src-pv-fail-ic { width: 64px; height: 48px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 700; color: #fff; }
.src-pv-fail-name { font-size: 14px; color: var(--text); font-weight: 600; word-break: break-all; max-width: 60ch; }

/* ★ 详情页骨架屏（2026-09-10 秒级加载优化：无缓存时先出骨架，避免空白） */
.sk, .sk-block { display: inline-block; vertical-align: middle; border-radius: 4px; }
.sk-block { background: linear-gradient(90deg, #eef0f3 0%, #f7f8fa 50%, #eef0f3 100%); background-size: 200% 100%; animation: sk-shimmer 1.4s ease-in-out infinite; }
@keyframes sk-shimmer { 0% { background-position: -200% 0; } 100% { background-position: 200% 0; } }
.lst-skel-table { padding: 0 0 4px; overflow: hidden; }
.lst-skel-row { display: grid; grid-template-columns: 50px 60px 70px minmax(160px, 1fr) 90px 60px 80px 120px 120px 100px 140px 120px; gap: 14px; padding: 12px 14px; border-bottom: 1px solid var(--border); align-items: center; }
.lst-skel-table .row.lst-skel-row { background: transparent; }

/* ===================== 效率交付 → 座位规划 ===================== */
.sp-wall { padding: 0; }
.sp-card-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.sp-tool-card { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 14px; cursor: pointer; transition: box-shadow .15s, transform .15s, border-color .15s; }
.sp-tool-card.hover:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(15, 23, 42, .12); border-color: #93B9FB; }
.sp-tool-soon { cursor: default; opacity: .65; }
.sp-tool-ic { width: 46px; height: 46px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.sp-tool-ic .ic-svg { width: 24px; height: 24px; }
.sp-tool-meta { flex: 1; min-width: 0; }
.sp-tool-name { font-size: 15px; font-weight: 700; color: var(--text, #0f172a); }
.sp-tool-desc { font-size: 12.5px; color: var(--text-2, #64748b); margin-top: 3px; line-height: 1.5; }
.sp-tool-go { color: #3C83F6; flex: none; }
.sp-tool-go .ic-svg { width: 20px; height: 20px; }

.sp-editor { display: flex; flex-direction: column; gap: 10px; }
/* 工具页占满模式（2026-10-23）：AI 效率工具 / 排版宝 iframe 铺满整个内容区，去 .view 四周留白与边框 */
.view.flush { display: flex; flex-direction: column; padding: 0; margin: 0; border: none; }
.sp-editor.flush { flex: 1; min-height: 0; gap: 0; }
.sp-editor.flush > iframe { flex: 1; min-height: 0; }
.sp-editor.flush .ai-host { flex: 1; min-height: 0; overflow: auto; padding: 14px 18px; box-sizing: border-box; }
.sp-ebar { display: flex; align-items: center; gap: 10px; }
.sp-ebar-sep { width: 1px; height: 20px; background: var(--border, #e2e8f0); }
.sp-proj-label { font-size: 13px; color: var(--text-2, #64748b); }
.sp-proj-sel { padding: 6px 10px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; background: var(--surface, #fff); color: var(--text, #0f172a); font-size: 13px; max-width: 360px; }
.sp-save-state { font-size: 12px; color: var(--text-2, #64748b); margin-left: auto; }
.sp-save-err { color: #c0392b; }

.sp-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 10px; background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 10px; }
.sp-tb-group { display: flex; align-items: center; gap: 6px; }
.sp-venue-area { margin-left: 4px; padding: 3px 9px; font-size: 12px; color: #475569; background: #f1f5f9; border: 1px solid #e2e8f0; border-radius: 999px; white-space: nowrap; }
.sp-tb-title { font-size: 12px; color: var(--text-2, #64748b); margin-right: 2px; }
.sp-tb-right { margin-left: auto; }
.sp-btn { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; font-size: 13px; border: 1px solid var(--border, #e2e8f0); background: var(--surface, #fff); color: var(--text, #0f172a); border-radius: 8px; cursor: pointer; transition: background .12s, border-color .12s; }
.sp-btn:hover { background: #f1f5f9; border-color: #cbd5e1; }
.sp-btn .ic-svg { width: 16px; height: 16px; }
.sp-btn-primary { background: #3C83F6; border-color: #3C83F6; color: #fff; }
.sp-btn-primary:hover { background: #2E6BE0; }
.sp-btn-danger { color: #c0392b; border-color: #f1c7c7; }
.sp-btn-danger:hover { background: #fdecea; }

.sp-body { display: flex; gap: 12px; align-items: stretch; }
.sp-canvas-wrap { flex: 1; height: 72vh; min-height: 460px; position: relative; background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 10px; overflow: hidden; }
.sp-canvas-2d, .sp-canvas-3d { position: absolute; inset: 0; }
.sp-assign-banner { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); z-index: 5; background: rgba(60,131,246, .95); color: #fff; font-size: 13px; padding: 8px 14px; border-radius: 999px; box-shadow: 0 6px 18px rgba(60,131,246, .35); }
.sp-assign-banner b { font-weight: 700; }
.sp-assign-hint { opacity: .85; font-size: 11.5px; margin-left: 6px; }

.sp-side { width: 320px; flex: none; overflow: auto; background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 10px; padding: 12px; }
.sp-side-sec { margin-bottom: 16px; }
.sp-side-head { font-size: 13px; font-weight: 700; color: var(--text, #0f172a); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.sp-side-sub { font-size: 12px; font-weight: 600; color: #3C83F6; background: #EDF4FE; border-radius: 999px; padding: 1px 8px; }
.sp-addperson { display: flex; gap: 6px; margin-bottom: 8px; }
.sp-input { flex: 1; min-width: 0; padding: 6px 9px; border: 1px solid var(--border, #e2e8f0); border-radius: 8px; font-size: 13px; color: var(--text, #0f172a); background: #fff; box-sizing: border-box; }
.sp-input-sm { flex: none; width: 84px; }
.sp-combo { position: relative; display: flex; align-items: center; }
.sp-combo.sp-input-sm { width: 84px; flex: none; }
.sp-combo-input { width: 100%; padding-right: 22px; }
.sp-combo-btn { position: absolute; right: 1px; top: 1px; bottom: 1px; width: 22px; border: none; border-left: 1px solid var(--border, #e2e8f0); background: transparent; color: var(--text-3, #9ca3af); cursor: pointer; border-radius: 0 7px 7px 0; display: inline-flex; align-items: center; justify-content: center; padding: 0; }
.sp-combo-btn:hover { background: var(--accent-soft, #EDF4FE); color: var(--accent, #3C83F6); }
.sp-combo-menu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: var(--surface, #fff); border: 1px solid var(--border, #e2e8f0); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); z-index: 20; max-height: 200px; overflow: auto; }
.sp-combo-item { padding: 7px 9px; font-size: 12.5px; color: var(--text, #0f172a); cursor: pointer; }
.sp-combo-item:hover, .sp-combo-item.active { background: var(--accent-soft, #EDF4FE); color: var(--accent, #3C83F6); }
.sp-combo-item:first-child { border-radius: 7px 7px 0 0; }
.sp-combo-item:last-child { border-radius: 0 0 7px 7px; }
.sp-input:focus { outline: none; border-color: #3C83F6; }
.sp-roster { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.sp-person { display: flex; align-items: center; gap: 8px; padding: 7px 8px; border: 1px solid var(--border, #e2e8f0); border-radius: 9px; background: #f8fafc; }
.sp-person-active { border-color: #3C83F6; background: #EDF4FE; }
.sp-person-pick { width: 26px; height: 26px; flex: none; border: 1px solid #cbd5e1; background: #fff; border-radius: 7px; color: #3C83F6; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.sp-person-pick .ic-svg { width: 15px; height: 15px; }
.sp-person-info { flex: 1; min-width: 0; }
.sp-person-name { font-size: 13px; font-weight: 600; color: var(--text, #0f172a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-person-grp { font-size: 11.5px; color: var(--text-2, #64748b); }
.sp-person-seat { font-size: 11.5px; flex: none; }
.sp-seat-tag { color: #16a34a; font-weight: 600; }
.sp-seat-none { color: #94a3b8; }
.sp-person-del { width: 24px; height: 24px; flex: none; border: none; background: transparent; color: #94a3b8; cursor: pointer; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; }
.sp-person-del:hover { background: #fdecea; color: #c0392b; }
.sp-person-del .ic-svg { width: 15px; height: 15px; }

.sp-props { display: flex; flex-direction: column; gap: 8px; }
.sp-prop-row { display: flex; align-items: center; gap: 8px; }
.sp-prop-k { width: 52px; flex: none; font-size: 12.5px; color: var(--text-2, #64748b); }
.sp-prop-v { flex: 1; min-width: 0; }
.sp-num { width: 80px; flex: none; }
.sp-color { width: 46px; height: 30px; flex: none; padding: 2px; border: 1px solid var(--border, #e2e8f0); border-radius: 7px; background: #fff; }
.sp-prop-del { width: 100%; margin-top: 4px; justify-content: center; }
.sp-empty { font-size: 12.5px; color: var(--text-2, #94a3b8); padding: 10px 2px; }

/* 弹窗（场地设置 / 快速排座） */
.sp-modal-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); display: flex; align-items: center; justify-content: center; z-index: 300; }
.sp-modal { width: min(460px, 92vw); max-height: 88vh; overflow: auto; background: var(--surface, #fff); border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.sp-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border, #e2e8f0); font-size: 15px; font-weight: 700; color: var(--text, #0f172a); }
.sp-modal-x { border: none; background: transparent; font-size: 22px; line-height: 1; color: #94a3b8; cursor: pointer; }
.sp-modal-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; }
.sp-modal-foot { display: flex; gap: 10px; justify-content: flex-end; padding: 12px 18px 16px; }
.sp-field { display: flex; flex-direction: column; gap: 5px; }
.sp-field label { font-size: 12.5px; color: var(--text-2, #64748b); }
.sp-field .sp-input, .sp-field select { width: 100%; box-sizing: border-box; }
.sp-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sp-row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.sp-total-field .sp-total { display: flex; align-items: center; height: 34px; padding: 6px 9px; border: 1px dashed var(--border); border-radius: 8px; font-size: 14px; font-weight: 700; color: var(--accent); background: var(--accent-soft); box-sizing: border-box; }
.sp-check { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text, #0f172a); cursor: pointer; }
.sp-tip { font-size: 12px; color: var(--text-2, #64748b); line-height: 1.5; }

/* 排布方式可视化选择卡片 */
.sp-modal.wide { width: min(560px, 92vw); }
.sp-layout-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sp-layout-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); cursor: pointer; transition: all .15s ease; outline: none; }
.sp-layout-card:hover { border-color: var(--accent); background: var(--accent-soft); }
.sp-layout-card:focus-visible { box-shadow: 0 0 0 2px var(--accent); }
.sp-layout-card.selected { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }
.sp-layout-card.selected::after { content: '✓'; position: absolute; top: 7px; right: 7px; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; display: grid; place-items: center; }
.sp-layout-icon { width: 84px; height: 58px; }
.sp-layout-icon svg { width: 100%; height: 100%; display: block; }
.sp-layout-title { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; color: var(--text); }
.sp-layout-num { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; }
.sp-layout-desc { font-size: 12px; color: var(--text-3); text-align: center; line-height: 1.35; }

/* 名单拖拽落座 */
.sp-person[draggable="true"] { cursor: grab; }
.sp-person.dragging { opacity: .5; }
.sp-canvas-2d.sp-drop-active { outline: 2px dashed #3C83F6; outline-offset: -4px; }

@media (max-width: 860px) {
  .sp-body { flex-direction: column; }
  .sp-side { width: auto; }
  .sp-canvas-wrap { height: 60vh; min-height: 360px; }
}

/* ===== 交付平台：子站跳转卡片 ===== */
.delivery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  padding: 0 0 24px;
}
.delivery-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.delivery-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-m);
  border-color: var(--border-strong);
}
.dc-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.4;
}
.dc-path {
  font-size: 13px;
  color: var(--text-3);
  word-break: break-all;
}
.dc-go {
  align-self: flex-start;
  margin-top: 8px;
}

/* ===================== 效率工具 → 社媒采集（2026-10-08） ===================== */
.cb-wrap { display: flex; flex-direction: column; gap: 12px; padding: 0 0 8px; }
.cb-ebar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cb-ebar-sep { width: 1px; height: 18px; background: var(--border); }
.cb-ebar-title { font-size: 14px; font-weight: 700; color: var(--text); }
.cb-ebar-sub { font-size: 12.5px; color: var(--text-3); }
.cb-ebar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.cb-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.cb-card-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.cb-card-title { font-size: 13.5px; font-weight: 700; color: var(--text); }
.cb-card-sub { font-size: 12px; color: var(--text-3); margin-left: auto; }

/* 平台切换 */
.cb-plats { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.cb-plat { appearance: none; border: 1px solid transparent; background: transparent; cursor: pointer; padding: 5px 12px; border-radius: 999px; font-size: 12.5px; color: var(--text-2); display: inline-flex; align-items: center; gap: 5px; transition: .15s; }
.cb-plat:hover { background: var(--surface-2); color: var(--text); }
.cb-plat.active { background: var(--accent-soft); color: var(--accent); border-color: rgba(60,131,246,.28); font-weight: 600; }
.cb-plat.soon { color: var(--text-3); }
.cb-plat.soon.active { background: var(--surface-2); color: var(--text-2); border-color: var(--border); }
.cb-plat i { font-style: normal; font-size: 10.5px; padding: 1px 5px; border-radius: 999px; background: var(--surface-3); color: var(--text-3); }

/* 表单 */
.cb-textarea { width: 100%; min-height: 96px; resize: vertical; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 13px; line-height: 1.6; font-family: inherit; }
.cb-textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cb-acts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.cb-input { padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface); color: var(--text); font-size: 13px; min-height: 38px; box-sizing: border-box; font-family: inherit; }
.cb-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cb-input-name { width: 220px; }
.cb-hint { margin-left: auto; font-size: 12px; color: var(--text-3); display: inline-flex; align-items: center; gap: 4px; }
.cb-hint .ic-svg { width: 13px; height: 13px; }
.cb-tip { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 8px 12px; border-radius: var(--radius-sm); margin-bottom: 10px; }
.cb-tip .ic-svg { width: 14px; height: 14px; flex: none; }
.cb-tip.warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.cb-tip.ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.cb-tip .btn.sm { margin-left: auto; }
.cb-rt { border: 1px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; background: var(--surface-2); }
.cb-rt-desc { font-size: 12px; color: var(--text-2); line-height: 1.6; margin-bottom: 8px; }
.cb-rt-desc code { background: var(--surface-3); padding: 1px 5px; border-radius: 4px; font-size: 11.5px; }
.cb-rt-row { display: flex; gap: 8px; align-items: center; }
.cb-rt-row .cb-input { flex: 1; }

/* 待接入态 */
.cb-soon { text-align: center; padding: 34px 16px; }
.cb-soon-ic { width: 44px; height: 44px; margin: 0 auto 10px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--surface-3); color: var(--text-3); }
.cb-soon-ic .ic-svg { width: 22px; height: 22px; }
.cb-soon-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.cb-soon-desc { font-size: 12.5px; color: var(--text-3); margin-top: 6px; line-height: 1.7; }

/* 任务列表 */
.cb-list { display: flex; flex-direction: column; }
.cb-item { display: flex; align-items: center; gap: 12px; padding: 12px 2px; border-top: 1px solid var(--border); }
.cb-item:first-child { border-top: none; }
.cb-item-main { flex: 1; min-width: 0; cursor: pointer; }
.cb-item-line { display: flex; align-items: center; gap: 8px; }
.cb-item-name { font-size: 13.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46%; }
.cb-item-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.cb-err { color: #b91c1c; }
.cb-bar { margin-top: 7px; height: 4px; border-radius: 999px; background: var(--surface-3); overflow: hidden; max-width: 520px; }
.cb-bar span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .3s; }
.cb-item-acts { display: flex; align-items: center; gap: 6px; flex: none; }
.cb-tag { font-size: 11px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-2); background: var(--surface-2); flex: none; }
.cb-tag.cb-run { color: #2E6BE0; background: #EDF4FE; border-color: #BFD6FD; }
.cb-tag.cb-done { color: #047857; background: #ecfdf5; border-color: #a7f3d0; }
.cb-tag.cb-fail { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }
.cb-tag.cb-plat-tag { color: var(--text-3); }
.cb-more { padding-top: 12px; border-top: 1px solid var(--border); text-align: center; }
.cb-empty { padding: 40px 16px; text-align: center; }
.cb-empty-t { font-size: 13.5px; color: var(--text-2); }
.cb-empty-d { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }

/* 明细表 */
.cb-table-wrap { overflow: auto; max-height: 62vh; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.cb-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.cb-table th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: left; padding: 9px 10px; color: var(--text-2); font-weight: 600; border-bottom: 1px solid var(--border); white-space: nowrap; }
.cb-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.cb-table tr:hover td { background: var(--surface-2); }
.cb-td-title { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cb-link { color: var(--accent); text-decoration: none; }
.cb-link:hover { text-decoration: underline; }
.cb-dot { display: inline-block; width: 7px; height: 7px; border-radius: 999px; }
.cb-dot.ok { background: #10b981; }
.cb-dot.bad { background: #ef4444; }
.cb-spin { animation: cb-rotate .8s linear infinite; }
@keyframes cb-rotate { to { transform: rotate(360deg); } }

/* ===================== 首页（2026-10-10）：问候 + 动态 ===================== */
/* 首页卡片：去阴影，弱化为浅灰细线边框 */
.home-wrap .card { box-shadow: none; border: 1px solid var(--border); transition: none; }
.home-wrap { display: flex; flex-direction: column; gap: 14px; }
/* 首页快捷入口卡（2026-10-11：替代原问候区） */
.home-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.home-quick-card { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; text-align: left; font-family: inherit; }
.home-quick-card:hover { border-color: var(--accent); }
.hq-ic { flex: none; width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.hq-ic .ic-svg { width: 20px; height: 20px; display: block; }
.hq-blue { background: #EDF4FE; color: #3C83F6; }
.hq-purple { background: #F1EDFD; color: #7C5CF0; }
.hq-teal { background: #E4F6F6; color: #0891B2; }
.hq-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hq-t { font-size: 14.5px; font-weight: 600; color: var(--text); line-height: 1.3; }
.hq-d { font-size: 12.5px; color: var(--text-3); line-height: 1.3; }
@media (max-width: 720px) { .home-quick { grid-template-columns: 1fr; } }
.home-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.home-stat { padding: 16px 20px; }
.home-stat .hs-val { font-size: 26px; font-weight: 700; line-height: 1.2; }
.home-stat .hs-label { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.home-cols { display: grid; grid-template-columns: 1.6fr 1fr; gap: 12px; align-items: start; }
@media (max-width: 900px) { .home-cols { grid-template-columns: 1fr; } }
.home-panel { padding: 16px 20px; }
.home-panel h3 { margin: 0 0 8px; font-size: 14.5px; font-weight: 700; }
.hf-row { display: flex; align-items: baseline; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--border, #f1f1f4); font-size: 13px; flex-wrap: wrap; }
.hf-row:last-child { border-bottom: none; }
.hf-actor { font-weight: 600; flex: none; }
.hf-act { color: var(--text); }
.hf-detail { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.hf-list { flex: none; font-size: 12px; color: #3C83F6; background: #EDF4FE; border-radius: 5px; padding: 1px 7px; }
.hf-time { margin-left: auto; flex: none; font-size: 12px; color: var(--text-3); }

/* ===================== 管理后台（2026-10-10 晚）：标签入侧栏 + 品牌「管理」徽标 ===================== */
.brand-tag { flex: none; font-size: 11px; font-weight: 600; line-height: 1; background: var(--accent); color: #fff; padding: 3px 7px; border-radius: 5px; letter-spacing: .5px; }
.nav-item:disabled { opacity: .5; cursor: not-allowed; }
.nav-item .soon { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--text-3); background: var(--surface-2); padding: 1px 7px; border-radius: 999px; }

/* ===== 账号资料弹窗（主站） ===== */
.prof-body{padding:4px 22px 0}
.prof-top{display:flex;gap:18px;align-items:flex-start}
.prof-avcol{display:flex;flex-direction:column;align-items:center;gap:8px}
.prof-avatar{width:76px;height:76px;border-radius:50%;overflow:hidden;border:none;padding:0;cursor:default;
  background:#eef1f6;color:#6b7280;font-size:26px;font-weight:600;display:flex;align-items:center;justify-content:center}
.prof-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.prof-avatar.editable{cursor:pointer}
.prof-avatar.editable:hover{box-shadow:0 0 0 3px rgba(60,131,246,.25)}
.prof-avbtn{border:none;background:none;color:#3C83F6;font-size:12.5px;cursor:pointer;padding:2px 4px}
.prof-avbtn:hover{text-decoration:underline}
.prof-main{flex:1;min-width:0;display:flex;flex-direction:column;gap:6px;padding-top:4px}
.prof-label{font-size:12px;color:#6b7280}
.prof-name{height:38px;border:1px solid #e2e8f0;border-radius:8px;padding:0 12px;font-size:14px;outline:none;width:100%}
.prof-name:focus{border-color:#3C83F6;box-shadow:0 0 0 3px rgba(60,131,246,.12)}
.prof-name:disabled{background:#fafbfc;color:#5a6472;cursor:not-allowed}
.prof-meta{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.prof-role{display:inline-block;padding:2px 10px;border-radius:20px;font-size:12px;background:#EDF4FE;color:#2E6BE0}
.prof-mail{font-size:12.5px;color:#64748b;word-break:break-all}
.prof-sec{margin-top:18px;border-top:1px solid #eef0f4;padding-top:14px}
.prof-sec-t{font-size:12px;color:#6b7280;margin-bottom:10px}
.prof-fs{display:flex;align-items:center;gap:10px;font-size:13.5px;color:#1f2937}
.prof-fs.off{color:#94a3b8}
.prof-fs-av{width:32px;height:32px;flex:none;display:flex;align-items:center;justify-content:center}
.prof-fs-av img{width:20px;height:20px;display:block}
.prof-fs.off .prof-fs-av img{filter:grayscale(1);opacity:.45}
.prof-tip{margin:10px 0 0;font-size:12.5px;color:#94a3b8;line-height:1.6}
.fb-body{padding:0}
.modal:has(.fb-body){position:relative;overflow:hidden}
.fb-frame{display:block;width:100%;height:74vh;border:0;background:var(--surface)}

/* ===== 赛事中心入口（2026-10-11）：/contest 是服务端直出的独立页，用真实链接整页跳转 ===== */
a.nav-item { text-decoration: none; cursor: pointer; }

/* ===== 效率工具页极简卡片（2026-10-12）：参考腾讯文档工具页，图标+标题，无描述 ===== */
.sp-wall { padding: 4px 0; }
.sp-card-wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.sp-wall .sp-tool-card { flex-direction: column; justify-content: center; gap: 12px; padding: 26px 14px 20px; text-align: center; }
.sp-wall .sp-tool-ic { width: 52px; height: 52px; border-radius: 14px; }
.sp-wall .sp-tool-name { font-size: 14px; font-weight: 600; }

/* ===== 效率工具卡片墙二次改版（2026-10-22）：对齐转换宝页面卡片，三组分类，一行最多 5 个 ===== */
.sp-wall-group { margin-bottom: 20px; }
.sp-wall-group:last-child { margin-bottom: 0; }
.sp-wall-title { font-size: 14px; font-weight: 700; color: var(--text, #0f172a); margin: 0 0 10px; display: flex; align-items: baseline; gap: 8px; }
.sp-wall-note { font-size: 12px; font-weight: 400; color: var(--text-3, #94a3b8); }
.sp-wall-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1180px) { .sp-wall-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 920px) { .sp-wall-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .sp-wall-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sp-wall .ai-conv-item { align-items: center; padding: 13px 14px; }
.sp-wall .ai-conv-item:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(15, 23, 42, .08); }
.sp-wall .ai-conv-item .t { font-size: 13px; }

/* ---------- 首页顶部轮播（2026-10-14） ---------- */
.home-carousel { position: relative; width: 100%; height: 200px; border-radius: 14px; overflow: hidden; background: #f1f3f7; box-shadow: 0 2px 10px rgba(16,24,40,.05); }
.home-carousel .hc-track { position: relative; width: 100%; height: 100%; }
.home-carousel .hc-slide { position: absolute; inset: 0; opacity: 0; transition: opacity .45s ease; display: block; text-decoration: none; }
.home-carousel .hc-slide.active { opacity: 1; z-index: 1; }
.home-carousel .hc-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.home-carousel .hc-title { position: absolute; left: 22px; bottom: 18px; max-width: 70%; padding: 6px 14px; border-radius: 10px; background: rgba(17,24,39,.45); color: #fff; font-size: 14px; font-weight: 600; backdrop-filter: blur(4px); }
.home-carousel .hc-dots { position: absolute; right: 16px; bottom: 14px; z-index: 3; display: flex; gap: 7px; }
.home-carousel .hc-dot { width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; background: rgba(255,255,255,.55); cursor: pointer; transition: all .2s; }
.home-carousel .hc-dot.active { width: 20px; border-radius: 5px; background: #fff; }
.home-carousel .hc-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(17,24,39,.32); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; opacity: 0; transition: opacity .2s, background .2s; }
.home-carousel:hover .hc-arrow { opacity: 1; }
.home-carousel .hc-arrow:hover { background: rgba(17,24,39,.55); }
.home-carousel .hc-arrow.prev { left: 10px; }
.home-carousel .hc-arrow.next { right: 10px; }
@media (max-width: 720px) { .home-carousel { height: 140px; } .home-carousel .hc-title { font-size: 12.5px; left: 14px; bottom: 12px; } }

/* ---------- 管理后台 · 首页轮播列表 ---------- */
.bn-thumb { width: 108px; height: 44px; object-fit: cover; border-radius: 6px; border: 1px solid #e9ebf0; display: block; }
.bn-acts { white-space: nowrap; }
.bn-uploader { display: flex; gap: 12px; align-items: flex-start; }
.bn-prev { width: 220px; height: 92px; border: 1px dashed #d5d8df; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: #fafbfc; }
.bn-prev img { width: 100%; height: 100%; object-fit: cover; }
.bn-up-acts { flex: 1; }

/* ---------- 轮播图片裁剪器（2026-10-14） ---------- */
.bnc-view { position: relative; overflow: hidden; border-radius: 10px; background: #14171d; cursor: move; touch-action: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.bnc-view .bnc-img { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; cursor: grab; }
.bnc-view .bnc-grid { position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.28) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.28) 1px, transparent 1px);
  background-size: 33.33% 100%, 33.33% 100%; opacity: .55; }
.bnc-acts { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.bnc-acts .spacer { flex: 1; }
.bnc-acts .bnc-zoom { flex: 1; max-width: 220px; accent-color: #3b82f6; }

/* ============================================================
   🔴 开发视觉规范铁律（2026-10-23 用户明令，全站生效）
   1. 输入类控件（input/textarea/select 及含输入的容器）聚焦时
      一律只高亮边框（border-color 变主色），禁止 box-shadow
      外发光/光圈效果（浅蓝色 glow）。后续新增样式同样遵守。
   ============================================================ */
input:focus, textarea:focus, select:focus,
input:focus-visible, textarea:focus-visible, select:focus-visible,
.gsearch:focus-within, .inline-code-search-input:focus,
.share-search input:focus, .share-status:focus, .dp-input:focus,
.inline-edit-input:focus, .inline-edit-select:focus,
.inline-form input:focus, .dd-trigger:focus, .dd-input-wrap:focus-within,
.dd-link-input:focus, .ee-input:focus, .lists-search input:focus,
.recycle-search:focus-within, .ai-set-field input:focus,
.cb-textarea:focus, .cb-input:focus, .prof-name:focus,
.ann-link-pop input:focus {
  box-shadow: none !important;
}

/* ---------- 公告表单：可视化插入链接（2026-10-23） ---------- */
.ann-toolbar { position: relative; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.ann-toolbar .btn.small .ic-svg { width: 13px; height: 13px; }
.ann-link-pop {
  position: absolute; top: calc(100% + 6px); left: 0; z-index: 90;
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-sm); box-shadow: var(--shadow-lg);
  padding: 8px; width: max-content; max-width: 380px;
  animation: dpPopIn .16s ease;
}
.ann-link-pop[hidden] { display: none; }
.ann-link-pop input { width: 150px; padding: 5px 9px; font-size: 12.5px; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text); }
.ann-link-pop input.al-url { width: 170px; }

/* ---------- 通用等待浮层 busyOverlay（2026-10-25）----------
   耗时请求（如飞书通讯录同步）期间给出即时反馈：转圈 + 阶段文案 + 已用秒数。
   层级 90：高于 confirm-mask(80)、低于 toast(100)，保证结果提示始终可见。 */
.busy-mask {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(10, 10, 12, .45);
  display: grid; place-items: center; padding: 20px;
  animation: busyMaskIn .16s ease;
}
.busy-box {
  min-width: 290px; max-width: 92vw;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: 26px 30px 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  text-align: center;
}
.busy-spinner {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  border: 3px solid var(--border); border-top-color: var(--accent);
  animation: busySpin .85s linear infinite;
}
.busy-title { font-size: 14.5px; font-weight: 600; color: var(--text); }
.busy-sub { font-size: 13px; color: var(--text-2); line-height: 1.65; max-width: 380px; word-break: break-all; }
.busy-sub:empty { display: none; }
.busy-timer { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.busy-bar { width: 100%; height: 3px; border-radius: 999px; background: var(--surface-3); overflow: hidden; }
.busy-bar i { display: block; height: 100%; width: 38%; border-radius: 999px; background: var(--accent); animation: busyBar 1.15s ease-in-out infinite; }
@keyframes busySpin { to { transform: rotate(360deg); } }
@keyframes busyBar { 0% { transform: translateX(-110%); } 100% { transform: translateX(320%); } }
@keyframes busyMaskIn { from { opacity: 0; } to { opacity: 1; } }
/* 按钮 busy 态：转圈 + 禁点，防止重复触发耗时操作 */
.btn.is-busy, .btn.is-busy:hover { pointer-events: none; opacity: .7; }
.busy-inline-spin {
  display: inline-block; width: 13px; height: 13px; flex: none;
  border-radius: 50%; border: 2px solid currentColor; border-top-color: transparent;
  opacity: .8; animation: busySpin .8s linear infinite; vertical-align: -2px;
}

/* 任务中台顶部留白修复（2026-10-25）：.view 顶部 28px 与 .gn-tabs 顶部 14px 叠加出 ~42px 空白；
   getnew 四种页面（预览/列表/看板/详情）根节点均自带内边距，外层顶部归零即可。
   2026-10-26：招聘管理 / 官网管理并入主站后同样复用该类（原 iframe 内嵌 .view--embed 已删除） */
.view--gn { padding-top: 0; }
/* 排版宝（2026-10-26）：子应用自带滚动容器，外层不再滚动，避免双滚动条 */
.view--mb { overflow: hidden; }
/* 排版宝挂在「效率工具」内容区内的宿主容器（2026-10-27）：
   与 .ai-host 同理撑满 .sp-editor，但自身不滚动——子应用自带滚动容器，外层再滚会出现双滚动条。 */
.mb-host { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }

/* ---------- 用户管理 · 子站权限列（2026-10-26）----------
   只完整显示一个子站标签，其余折成「+N」；整格可点，直接打开「查看 + 编辑」合并弹窗，
   操作列不再单独放子站授权图标按钮。 */
.us-cell {
  display: inline-flex; align-items: center; gap: 2px; max-width: 100%;
  background: none; border: 0; padding: 0; margin: 0;
  font: inherit; color: inherit; cursor: pointer; text-align: left;
}
.us-cell:hover .badge, .us-cell:hover .muted { text-decoration: underline; }
.us-more { color: var(--accent); font-size: 12px; font-weight: 600; white-space: nowrap; }
.us-cell:hover .us-more { text-decoration: underline; }
