/* =========================================================================
 * 工作台 · 项目记录（宝石花 LIMS · 只读）—— 样式
 * 依附 style.css 设计变量；只在 lims 板块与浮层/弹窗内生效
 * ========================================================================= */

.lims-head { margin-bottom: 10px; }
.lims-hint { color: var(--faint); font-size: 12px; }

/* ---------- 工具条 ---------- */
.lims-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.lims-q { width: 300px; height: 34px; }
.lims-sel { height: 34px; }
#limsSt { width: 138px; }
#limsBiz { width: 172px; }
#limsCenter { width: 172px; }
#limsSort { width: 178px; }
.lims-count { color: var(--muted); font-size: 13px; }
.lims-ext { margin-left: auto; color: var(--brand); font-size: 13px; text-decoration: none; white-space: nowrap; }
.lims-ext:hover { text-decoration: underline; }

/* ---------- 列表 ---------- */
.lims-tablewrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: auto; box-shadow: var(--shadow-s); }
.lims-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 900px; table-layout: fixed; }
.lims-table th {
  position: sticky; top: 0; z-index: 2; background: #fafbfe; text-align: left; font-weight: 600;
  color: var(--text-2); padding: 8px 12px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.lims-table td { padding: 8px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.lims-table tbody tr:last-child td { border-bottom: 0; }
.lims-row { cursor: pointer; }
.lims-row:hover td { background: var(--brand-l); }
.lims-table .c-no { white-space: nowrap; color: var(--muted); font-size: 12px; }
.lims-table .c-name { word-break: break-word; }
.lims-table .c-cus { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.lims-table .c-num { text-align: right; white-space: nowrap; }
.lims-table .c-time { white-space: nowrap; color: var(--muted); font-size: 12px; }

/* 列宽锁定（配合 table-layout:fixed）：宽屏下各列按比例收敛，避免富余宽度全被名称列吞掉后在表中间露出大片空白 */
.lims-table th.c-no { width: 9%; }
.lims-table th.c-name { width: 22%; }
.lims-table th.c-flow { width: 12%; }
.lims-table th.c-cus { width: 20%; }
.lims-table th.c-center { width: 9%; }
.lims-table th.c-owner { width: 7%; }
.lims-table th.c-num { width: 9%; }
.lims-table th.c-time { width: 12%; }

/* 防 style.css 里全局 .c-name{display:flex}（文件列表组件用）串进表格：
   否则 th/td.c-name 不是 table-cell，渲染宽度撑不满列宽——右侧露出一条没有单元格的"幽灵空白列" */
.lims-table th.c-name, .lims-table td.c-name { display: table-cell; }
.lims-tag { background: #f1f5fb; border: 1px solid var(--line); border-radius: 6px; padding: 1px 8px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.lims-none td { text-align: center !important; color: var(--faint); padding: 32px 0 !important; }
.lims-pager { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 12px 0 4px; }
.lims-pg { color: var(--muted); font-size: 13px; }
.lims-loading { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 48px 0; color: var(--muted); }
.lims-empty { text-align: center; padding: 60px 20px; }
.le-t { font-weight: 600; font-size: 16px; margin-bottom: 6px; }
.le-s { color: var(--muted); font-size: 13px; max-width: 560px; margin: 0 auto 14px; }
.lims-retry { margin: 0 auto; }

/* ---------- 悬停浮层 ---------- */
.lims-pop {
  position: fixed; z-index: 1040; width: 660px; max-width: calc(100vw - 24px);
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-l); padding: 12px 16px; animation: modalIn .14s ease;
}
.lp-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.lp-tt { flex: 1; min-width: 0; }
.lp-tt b { font-size: 14px; }
.lp-no { display: block; color: var(--faint); font-size: 12px; margin-top: 1px; }
.lp-badge { font-size: 12px; padding: 2px 8px; border-radius: 12px; white-space: nowrap; flex: 0 0 auto; }
.lp-badge.done { background: var(--ok-l); color: var(--ok); border: 1px solid #c6f0d8; }
.lp-badge.run { background: var(--brand-l); color: var(--brand-d); border: 1px solid var(--brand-l2); }
.lp-meta { color: var(--muted); font-size: 12px; margin-bottom: 8px; }
.lp-chain { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-bottom: 8px; }
.lp-node { font-size: 12px; padding: 1px 8px; border-radius: 12px; background: #f3f4f6; color: var(--text-2); border: 1px solid var(--line); }
.lp-node.st-finish { background: var(--ok-l); color: #15803d; border-color: #c6f0d8; }
.lp-node.st-next { color: var(--faint); }
.lp-node.st-cur { background: var(--brand-l); color: var(--brand-d); border-color: var(--brand-l2); }
.lp-node.st-rej { background: #fdecec; color: #b42318; border-color: #f5c2bd; }
.lp-arr { color: var(--faint); font-size: 11px; }
.lp-sec { color: var(--muted); font-size: 12px; margin: 2px 0 6px; }
.lims-pop .lp-flow { max-height: 46vh; overflow: auto; }
.lp-tab { width: 100%; border-collapse: collapse; font-size: 12px; }
.lp-tab th { text-align: left; color: var(--faint); font-weight: 600; padding: 4px 10px 4px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.lp-tab td { padding: 4px 10px 4px 0; border-bottom: 1px dashed var(--line-2); vertical-align: top; }
.lp-tab tr:last-child td { border-bottom: 0; }
.lp-tab .lp-n { white-space: nowrap; font-weight: 600; }
.lp-tab .lp-t { white-space: nowrap; color: var(--text-2); }
.lp-tab.full { font-size: 13px; }
.lp-none { color: var(--faint); }
.lp-foot { margin-top: 8px; color: var(--faint); font-size: 12px; }
.lp-err { color: var(--danger); font-size: 13px; padding: 6px 0; }
.lp-loading { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; padding: 10px 0; }

/* ---------- 详情弹窗 ---------- */
.lims-modal-body { font-size: 13px; }
.lims-kvs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 24px; margin-bottom: 12px; }
.lm-kv { display: flex; gap: 8px; border-bottom: 1px dashed var(--line-2); padding: 4px 0; min-width: 0; }
.lm-k { color: var(--faint); white-space: nowrap; width: 78px; flex: 0 0 auto; }
.lm-v { color: var(--text); min-width: 0; word-break: break-word; }
.lims-flowhead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.lims-flowbox { margin-bottom: 4px; }
.lims-flowbox .lp-chain { margin-bottom: 10px; }
.lims-modal-foot { display: flex; gap: 16px; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line-2); }
.lims-modal-foot .lims-ext { margin-left: 0; }

/* ---------- 小屏 ---------- */
@media (max-width: 720px) {
  .lims-q { width: 100%; }
  #limsSt, #limsBiz, #limsCenter, #limsSort { width: 100%; }
  .lims-kvs { grid-template-columns: 1fr; }
  .lims-table { min-width: 640px; }
  .lims-table .c-cus, .lims-table .c-time { display: none; }   /* 小屏省信息 */
}

/* t16：合同/报销页状态标签配色 + 事由列截断 */
.lims-tag.st-wait { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.lims-tag.st-ok { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
/* stc1 状态色标：待登记·待审批·待履约·履约中·已关闭 一眼可分（灰→琥珀→蓝→青→绿；变更紫、终态淡） */
.lims-tag.st-reg { background: #eef2f7; border-color: #d5dee9; color: #52627a; }
.lims-tag.st-pend { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.lims-tag.st-run { background: #ecfeff; border-color: #a5f3fc; color: #0e7490; }
.lims-tag.st-off { background: #f7f8fa; border-color: #e5e9ef; color: #9aa4b6; }
.lims-tag.st-chg { background: #f5f3ff; border-color: #ddd6fe; color: #6d28d9; }
.lp-badge.st-reg { background: #eef2f7; border: 1px solid #d5dee9; color: #52627a; }
.lp-badge.st-wait { background: #fff7ed; border: 1px solid #fed7aa; color: #c2410c; }
.lp-badge.st-pend { background: #eff6ff; border: 1px solid #bfdbfe; color: #1d4ed8; }
.lp-badge.st-run { background: #ecfeff; border: 1px solid #a5f3fc; color: #0e7490; }
.lp-badge.st-ok { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.lp-badge.st-off { background: #f7f8fa; border: 1px solid #e5e9ef; color: #9aa4b6; }
.lp-badge.st-chg { background: #f5f3ff; border: 1px solid #ddd6fe; color: #6d28d9; }
.c2-desc, .e2-desc { max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c2-title { max-width: 420px; }

/* 227：合同「收付」徽标（收款/付款/不涉及） */
.c2-sv{font-size:11px;line-height:18px;border-radius:4px;padding:0 6px;border:1px solid transparent;white-space:nowrap}
.c2-sv.sv-in{color:#067647;background:#ecfdf3;border-color:#abefc6}
.c2-sv.sv-out{color:#b54708;background:#fffaeb;border-color:#fedf89}
.c2-sv.sv-na{color:#667085;background:#f2f4f7;border-color:#e4e7ec}
