/* ============================================================================
 * frontend/task_center.css · 任务池（前台整页）
 * 复刻对标站 scrm.gdzhongke.cn「任务」页 + 8766 统一规范
 * ========================================================================== */

/* 页面整体：参与 flex 链，保证内部表格可滚、底部不被 fixed 分页条遮 */
#task_centerView .wk-page-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
}
#task_centerHost {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

/* ---------------------------------------------------------------- 页头 */
.task-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px 8px;
  flex: none;
}
.task-title-wrap { display: flex; align-items: baseline; gap: 10px; }
.task-page-title { margin: 0; font-size: 17px; font-weight: 600; color: #1f2a37; }
.task-page-sub { font-size: 12px; color: #8a94a6; }
.task-head-actions { display: flex; gap: 8px; }

/* ---------------------------------------------------------- 筛选行 */
.task-filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px 10px;
  flex: none;
  flex-wrap: wrap;
}
.task-search-box { position: relative; display: flex; align-items: center; gap: 6px; }
.task-search-box input {
  height: 32px;
  width: 230px;
  padding: 0 10px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  font-size: 13px;
  outline: none;
  transition: border-color .15s;
}
.task-search-box input:focus { border-color: #0052cc; }
.task-search-clear {
  height: 32px;
  padding: 0 10px;
  font-size: 12px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  background: #fff;
  color: #5b6472;
  cursor: pointer;
  flex: none;
}
.task-search-clear:hover { border-color: #0052cc; color: #0052cc; }

.task-scope-bar { display: flex; gap: 4px; }
.task-scope-chip {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  background: #fff;
  color: #5b6472;
  cursor: pointer;
  white-space: nowrap;
}
.task-scope-chip:hover { border-color: #0052cc; color: #0052cc; }
.task-scope-chip.is-active {
  background: #eaf2ff;
  border-color: #0052cc;
  color: #0052cc;
  font-weight: 600;
}

.task-filter-right { display: flex; gap: 8px; margin-left: auto; align-items: center; }
.task-sel {
  height: 32px;
  padding: 0 8px;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  color: #5b6472;
  cursor: pointer;
}

/* ---------------------------------------------------------- 列表区 */
.task-list-area {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  padding: 0 16px calc(var(--active-pager-height, 58px) + 14px);
}
.task-table-wrap {
  flex: 1;
  min-height: 0;
  overflow: auto;
  border: 1px solid #e8ecf2;
  border-radius: 8px;
}
.task-table-wrap table.cfg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.task-table-wrap thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f7f9fc;
  border-bottom: 1px solid #e8ecf2;
  padding: 0;
  height: 38px;
  text-align: left;
  font-weight: 600;
  color: #46536a;
  white-space: nowrap;
}
.task-table-wrap tbody td {
  padding: 9px 10px;
  border-bottom: 1px solid #f0f3f7;
  color: #2c3849;
  vertical-align: middle;
}
/* 斑马线（作用在 td 上，与全站一致） */
.task-table-wrap tbody tr:nth-child(even) td { background: #f4f6f9; }
.task-table-wrap tbody tr:hover td { background: #eef2f7; }

.task-row { cursor: pointer; }
.task-id { font-size: 12px; color: #8a94a6; font-family: ui-monospace, Menlo, monospace; }
.task-dimm { color: #b6bdc9; }
.task-overdue { color: #e5484d; font-weight: 600; }

.wk-main-name { color: #0052cc; text-decoration: none; font-weight: 500; }
.wk-main-name:hover { text-decoration: underline; }
.wk-cell-sub { font-size: 12px; color: #8a94a6; margin-top: 2px; }

.task-empty {
  text-align: center;
  padding: 40px 0;
  color: #b6bdc9;
  font-size: 13px;
}

/* 徽标 */
.task-badge {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 18px;
}
.task-badge-high { background: #ffefef; color: #e5484d; }
.task-badge-mid  { background: #fff7e6; color: #d97706; }
.task-badge-low  { background: #eef7ee; color: #3f9142; }

.task-status {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 18px;
}
.task-status-todo   { background: #eef2f7; color: #5b6472; }
.task-status-doing  { background: #eaf2ff; color: #0052cc; }
.task-status-done   { background: #eef7ee; color: #3f9142; }
.task-status-cancel { background: #f5f5f5; color: #a0a6b0; }

/* ---------------------------------------------------------- 分页条 */
/* 🔴 铁律：一律复用全站 .wk-pager（同客户列表），不自建 fixed 覆盖，
   否则分页条样式/位置与其它模块不一致。 */
#task_centerView .wk-pager { margin-top: 4px; }

/* ------------------------------------------------------- 字段配置弹窗 */
.task-col-cfg { display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow: auto; }
.task-col-cfg-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: #2c3849;
  cursor: pointer;
}
.task-col-cfg-row:hover { background: #f4f6f9; }
.task-col-cfg-row input { cursor: pointer; }

/* 列拖拽把手 */
#taskListArea .cfg-th-inner { display: flex; align-items: center; height: 38px; padding: 0 8px; gap: 4px; }
#taskListArea .cfg-drag { cursor: grab; color: #b6bdc9; font-size: 12px; user-select: none; }
#taskListArea .cfg-drag:active { cursor: grabbing; }
#taskListArea .sort-th {
  background: none; border: none; cursor: pointer;
  font-weight: 600; color: #46536a; font-size: 13px;
  white-space: nowrap; padding: 0;
}
#taskListArea .sort-th:hover { color: #0052cc; }
#taskListArea .sort-th.active { color: #0052cc; }
#taskListArea .col-resizer {
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 6px;
  cursor: col-resize;
  user-select: none;
}
#taskListArea .col-resizer:hover { background: #d6e4ff; }
#taskListArea thead th { position: sticky; top: 0; }
#taskListArea .cfg-th { position: relative; }

/* ===== 任务池 tab 数字角标（对标站「共N个/已完成N个」）· 2026-10-17 ===== */
.task-scope-n{font-size:11px;color:#8b95a5;font-weight:400;margin-left:6px;
  background:#f2f5f9;border-radius:9px;padding:1px 7px;white-space:nowrap}
.task-scope-chip.is-active .task-scope-n{background:#dbe8ff;color:#0052cc}
#taskScopeBarHost{display:inline-flex}
