/* ============================================================================
 * frontend/work_log.css · 工作报表分析（前台整页）
 * 复刻对标站 scrm.gdzhongke.cn「日志」(biWork/logStatistics 员工统计矩阵) + 8766 统一规范
 * ========================================================================== */

#work_logView .wk-page-card { display: flex; flex-direction: column; min-height: 0; height: 100%; }
#work_logHost { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* ---------------------------------------------------------------- 页头 */
.wl-page-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 8px; flex: none;
}
.wl-title-wrap { display: flex; align-items: baseline; gap: 10px; }
.wl-page-title { margin: 0; font-size: 17px; font-weight: 600; color: #1f2a37; }
.wl-page-sub { font-size: 12px; color: #8a94a6; }
.wl-head-actions { display: flex; gap: 8px; align-items: center; }
.wl-search { position: relative; display: flex; align-items: center; }
.wl-search-input {
  height: 32px; width: 230px; padding: 0 10px;
  border: 1px solid #dcdfe6; border-radius: 6px; font-size: 13px; outline: none;
}
.wl-search-input:focus { border-color: #0052cc; }

/* ---------------------------------------------------- 筛选条（对标站 filtrate-bar） */
.wl-filter-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 16px 10px; flex: none; flex-wrap: wrap;
}
.wl-fb-left { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.wl-fb-right { display: flex; align-items: center; gap: 8px; }
.wl-fb-label { font-size: 13px; color: #8a94a6; margin-right: 2px; }
.wl-fb-chip {
  height: 28px; padding: 0 11px; font-size: 12px;
  border: 1px solid #e3e8ef; border-radius: 14px;
  background: #fff; color: #5b6472; cursor: pointer; white-space: nowrap;
}
.wl-fb-chip:hover { border-color: #0052cc; color: #0052cc; }
.wl-fb-chip.is-active { background: #eaf2ff; border-color: #0052cc; color: #0052cc; font-weight: 600; }
.wl-fb-date {
  height: 28px; padding: 0 8px; font-size: 12px;
  border: 1px solid #e3e8ef; border-radius: 6px; outline: none; color: #46536a;
}
.wl-fb-date:focus { border-color: #0052cc; }
.wl-fb-wave { color: #b6bdc9; font-size: 12px; }

.wl-view-tabs { display: flex; gap: 4px; border: 1px solid #e3e8ef; border-radius: 6px; padding: 2px; background: #f7f9fc; }
.wl-vt {
  height: 26px; padding: 0 12px; font-size: 12px;
  border: none; border-radius: 5px; background: transparent; color: #5b6472; cursor: pointer;
}
.wl-vt:hover { color: #0052cc; }
.wl-vt.is-active { background: #fff; color: #0052cc; font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.06); }

/* ---------------------------------------------------------- 列表区 */
.wl-list-area {
  display: flex; flex-direction: column; flex: 1; min-height: 0;
  padding: 0 16px calc(var(--active-pager-height, 58px) + 14px);
}

/* ------------------------------------------------ 员工×类别 统计矩阵（对标站主形态） */
.wl-matrix-wrap {
  flex: 1; min-height: 0; overflow: auto;
  border: 1px solid #e8ecf2; border-radius: 8px; background: #fff;
}
table.wl-matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
table.wl-matrix thead th {
  position: sticky; top: 0; z-index: 2;
  background: #f7f9fc; border-bottom: 1px solid #e8ecf2;
  padding: 0 12px; height: 40px;
  font-weight: 600; color: #46536a; white-space: nowrap;
}
.wl-th-name { text-align: left; min-width: 160px; }
.wl-th-num { text-align: center; width: 92px; }
.wl-th-total { color: #0052cc; }
table.wl-matrix tbody td {
  padding: 9px 12px; border-bottom: 1px solid #f0f3f7; color: #2c3849; vertical-align: middle;
}
table.wl-matrix tbody tr.wl-mx-row:nth-child(even) td { background: #f4f6f9; }
table.wl-matrix tbody tr.wl-mx-row:hover td { background: #eef2f7; }

.wl-td-name { display: flex; align-items: center; gap: 8px; }
.wl-avatar {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: #e7efff; color: #2362fb; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.wl-name-text { color: #2c3849; font-weight: 500; }

/* 数字列：对齐对标站「蓝色可点」 */
.wl-td-num { text-align: center; font-variant-numeric: tabular-nums; }
.wl-td-num.is-clickable { color: #2362fb; cursor: pointer; font-weight: 600; }
.wl-td-num.is-clickable:hover { text-decoration: underline; }
.wl-td-num.is-zero { color: #ccd2dc; }
.wl-td-num.wl-td-total { color: #0052cc; font-weight: 700; background: #fbfcfe; }

.wl-matrix-foot { flex: none; padding: 8px 2px 0; font-size: 12px; color: #8a94a6; }
.wl-matrix-foot b { color: #2362fb; }

/* ---------------------------------------------------- 操作记录表（8766 原生融合） */
.wl-logs-wrap {
  flex: 1; min-height: 0; overflow: auto;
  border: 1px solid #e8ecf2; border-radius: 8px; background: #fff;
}
table.wl-logs { width: 100%; border-collapse: collapse; font-size: 13px; }
table.wl-logs thead th {
  position: sticky; top: 0; z-index: 2;
  background: #f7f9fc; border-bottom: 1px solid #e8ecf2;
  padding: 0 12px; height: 38px; text-align: left;
  font-weight: 600; color: #46536a; white-space: nowrap;
}
table.wl-logs tbody td {
  padding: 9px 12px; border-bottom: 1px solid #f0f3f7; color: #2c3849; vertical-align: middle;
}
table.wl-logs tbody tr.wl-row:nth-child(even) td { background: #f4f6f9; }
table.wl-logs tbody tr.wl-row:hover td { background: #eef2f7; }
.wl-row { cursor: pointer; }
.wl-log-action { color: #2c3849; font-weight: 500; }
.wl-log-detail { color: #5b6472; font-size: 12px; }
.wl-empty { text-align: center; padding: 44px 0; color: #b6bdc9; font-size: 13px; }

#work_logView .wk-pager { margin-top: 4px; }

/* ------------------------------------------------------ 下钻明细 */
.wl-drill { display: flex; flex-direction: column; gap: 10px; }
.wl-drill-head { display: flex; align-items: center; gap: 10px; }
.wl-drill-badge {
  display: inline-block; padding: 2px 10px; border-radius: 10px;
  font-size: 12px; background: #eaf2ff; color: #0052cc;
}
.wl-drill-cnt { font-size: 12px; color: #8a94a6; }
.wl-drill-list { display: flex; flex-direction: column; gap: 6px; }
.wl-drill-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border: 1px solid #eef1f6; border-radius: 7px; background: #fbfcfe;
}
.wl-drill-title { font-size: 13px; color: #2c3849; }
.wl-drill-time { flex: none; font-size: 12px; color: #8a94a6; font-variant-numeric: tabular-nums; }
.wl-drill-empty, .wl-drill-loading { padding: 34px 0; text-align: center; color: #b6bdc9; font-size: 13px; }

/* ------------------------------------------------------ 操作记录详情 */
.wl-detail-pane { padding: 4px 0; }
.wl-kv-row { display: flex; gap: 12px; padding: 9px 2px; border-bottom: 1px solid #f0f3f7; font-size: 13px; }
.wl-kv-row:last-child { border-bottom: none; }
.wl-kv-k { flex: none; width: 88px; color: #8a94a6; }
.wl-kv-v { flex: 1; color: #2c3849; word-break: break-all; white-space: pre-wrap; }

@media (max-width: 1100px) {
  .wl-search-input { width: 170px; }
  .wl-fb-right { width: 100%; justify-content: flex-end; }
}

/* ------------------------------------------------ 对象类型胶囊（操作记录） */
.wl-target-pill {
  display: inline-block; padding: 1px 9px; border-radius: 10px;
  font-size: 12px; line-height: 18px; background: #eef2f7; color: #46536a;
}

/* ================================================ 日志页重构 · 2026-10-17
   对标站形态：顶部 5 格统计 + 员工日报流卡片 */

/* 5 格统计条（对标站 今日新增客户/商机/合同/回款/跟进记录） */
.wl-stats-bar {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 12px; margin: 0 0 14px;
}
.wl-stat-cell {
  background: #fff; border: 1px solid #eef1f5; border-radius: 10px;
  padding: 14px 16px; box-shadow: 0 1px 2px rgba(16, 24, 40, .03);
}
.wl-stat-label { font-size: 12.5px; color: #8a94a6; margin-bottom: 6px; }
.wl-stat-val { font-size: 22px; font-weight: 600; color: #1f2b3d; line-height: 1.2; }
.wl-stat-val i { font-size: 12.5px; font-weight: 400; color: #8a94a6; font-style: normal; margin-left: 3px; }

/* 日报流 */
.wl-diary { display: flex; flex-direction: column; gap: 12px; }
.wl-diary-hero {
  background: linear-gradient(135deg, #f7f9fc 0%, #f2f5fa 100%);
  border: 1px solid #eef1f5; border-radius: 12px; padding: 18px 20px;
}
.wl-diary-hello { font-size: 17px; font-weight: 600; color: #1f2b3d; }
.wl-diary-tip { margin-top: 6px; font-size: 13px; color: #d97706; }
.wl-diary-tip.is-done { color: #12a150; }
.wl-diary-welcome { margin-top: 8px; font-size: 13px; color: #8a94a6; }

.wl-diary-list { display: flex; flex-direction: column; gap: 10px; }
.wl-diary-card {
  background: #fff; border: 1px solid #eef1f5; border-radius: 10px;
  padding: 14px 18px; cursor: pointer; transition: box-shadow .15s, border-color .15s;
}
.wl-diary-card:hover { border-color: #d8dfea; box-shadow: 0 2px 8px rgba(16, 24, 40, .06); }
.wl-diary-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.wl-diary-avatar {
  width: 28px; height: 28px; border-radius: 50%; background: #4f46e5; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; flex-shrink: 0;
}
.wl-diary-name { font-size: 14px; font-weight: 600; color: #1f2b3d; }
.wl-diary-type {
  font-size: 12px; padding: 1px 9px; border-radius: 10px;
  background: #eef2f7; color: #46536a;
}
.wl-diary-date { margin-left: auto; font-size: 12.5px; color: #98a2b3; }
.wl-diary-body { font-size: 13.5px; color: #3d4a5c; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.wl-diary-empty { text-align: center; color: #98a2b3; padding: 48px 0; font-size: 13.5px; }

@media (max-width: 1100px) {
  .wl-stats-bar { grid-template-columns: repeat(3, 1fr); }
}
