/* table-kit.css — 大表格增强：搜索栏 / 吸顶表头 / 排序指示 / 命中高亮 / 虚拟占位 */
.tk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e5e7eb;
  font-size: 12px;
  color: #64748b;
}
.tk-bar .tk-q {
  flex: 0 1 420px;
  min-width: 180px;
  height: 30px;
  padding: 4px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  color: #0f172a;
  background: #fff;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.tk-bar .tk-q:focus { border-color: #1a7f4b; box-shadow: 0 0 0 2px rgba(26,127,75,.12); }
.tk-bar .tk-count { color: #475569; white-space: nowrap; }
.tk-bar .tk-count b { color: #1a7f4b; }
.tk-bar .tk-reset {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  cursor: pointer;
}
.tk-bar .tk-reset:hover { border-color: #1a7f4b; color: #1a7f4b; }
.tk-bar .tk-hint { color: #94a3b8; font-size: 11px; margin-left: auto; }

.tk-scroll {
  max-height: var(--tk-max-h, calc(100vh - 215px));
  overflow-y: auto;
  overscroll-behavior: contain;
}
table.tk-on thead {
  position: sticky;
  top: 0;
  z-index: 6;
  background: #fff;
}
table.tk-on thead th {
  background: #f8fafc;
  box-shadow: inset 0 -1px 0 #e2e8f0;
}
table.tk-on thead tr.mi-fil-row td {
  background: #fff;
  box-shadow: inset 0 -1px 0 #e5e7eb;
}
table.tk-on thead th.tk-sortable { cursor: pointer; user-select: none; }
table.tk-on thead th.tk-sortable:hover { background: #eef6f1; }
table.tk-on thead th.tk-sorted { color: #1a7f4b; }

/* 列宽拖拽：表头右缘 6px 抓手（按下拖动即锁定为 fixed 布局） */
table.tk-on thead th { position: relative; }
table.tk-on thead th .tk-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 8px;
  height: 100%;
  cursor: col-resize;
  z-index: 3;
  touch-action: none;
}
table.tk-on thead th .tk-resizer::after {
  content: '';
  position: absolute;
  top: 20%;
  right: 3px;
  width: 1px;
  height: 60%;
  background: transparent;
}
table.tk-on thead th .tk-resizer:hover::after,
table.tk-on thead th .tk-resizer.tk-dragging::after { background: #1a7f4b; }

/* 锁定列宽后：超出列宽的文本省略，避免挤压相邻列 */
table.tk-on.tk-fixed thead th,
table.tk-on.tk-fixed tbody td { overflow: hidden; text-overflow: ellipsis; }
.tk-ind {
  display: inline-block;
  margin-left: 2px;
  font-size: 10px;
  color: #1a7f4b;
  line-height: 1;
  vertical-align: middle;
}

/* 窗口裁剪/搜索不匹配：只影响 TableKit，不碰业务 inline display */
table.tk-on tbody > tr.tk-hide { display: none !important; }
table.tk-on tr.tk-spacer > td { padding: 0 !important; border: 0 !important; background: transparent !important; }

mark.tk-hit {
  background: #fde68a;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(253,230,138,.6);
}

@media (max-width: 768px) {
  .tk-bar { gap: 6px; padding: 6px 8px; }
  .tk-bar .tk-q { flex: 1 1 100%; }
  .tk-bar .tk-hint { display: none; }
  .tk-scroll { max-height: none !important; overflow-y: visible; }
  table.tk-on thead { position: static; }
}
