/* =========================================================================
 * 工作台 · 项目记录（宝石花 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: 12.5px; }
.lims-ext { margin-left: auto; color: var(--brand); font-size: 12.5px; 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: 9px 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 7px; font-size: 12px; color: var(--text-2); white-space: nowrap; }
.lims-none td { text-align: center !important; color: var(--faint); padding: 30px 0 !important; }
.lims-pager { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 13px 0 4px; }
.lims-pg { color: var(--muted); font-size: 12.5px; }
.lims-loading { display: flex; gap: 8px; align-items: center; justify-content: center; padding: 46px 0; color: var(--muted); }
.lims-empty { text-align: center; padding: 60px 20px; }
.le-t { font-weight: 600; font-size: 15px; 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 14px; 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: 11.5px; margin-top: 1px; }
.lp-badge { font-size: 11.5px; padding: 2px 9px; border-radius: 20px; 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: 11.5px; padding: 1px 8px; border-radius: 20px; 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: 10px; }
.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: 12.5px; }
.lp-none { color: var(--faint); }
.lp-foot { margin-top: 8px; color: var(--faint); font-size: 11.5px; }
.lp-err { color: var(--danger); font-size: 12.5px; padding: 6px 0; }
.lp-loading { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12.5px; padding: 10px 0; }

/* ---------- 详情弹窗 ---------- */
.lims-modal-body { font-size: 13px; }
.lims-kvs { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 22px; 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: 14px; 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; }   /* 小屏省信息 */
}
