/* ============================================================
   工作台 · 总览页
   按「IM 进线 / 起司云工单 / 邮件进线」三个板块聚合，
   下方是跨渠道的待认领池与待办、接手申请审批。
   ============================================================ */

.ov-page {
  padding: 20px 24px 40px;
  overflow-y: auto;
  height: calc(100vh - 56px);
  background: var(--bg);
}

/* ---------- 顶部问候 ---------- */
.ov-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}
.ov-hello { margin: 0 0 6px; font-size: 20px; font-weight: 600; color: var(--text); }
.ov-sub { margin: 0; font-size: 13px; color: var(--text-soft); }
.ov-sub b { color: var(--text); }
.text-warn { color: var(--warning); }
.text-danger { color: var(--danger); }

/* ---------- 三大板块卡片 ---------- */
.ov-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.ov-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  transition: box-shadow .15s ease, transform .15s ease;
}
.ov-card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(25, 22, 15, .08); }

/* 每个板块一条识别色，避免三张卡片长得一样 */
.ov-card-im      { border-top: 3px solid #10b981; }
.ov-card-external{ border-top: 3px solid var(--accent); }
.ov-card-email   { border-top: 3px solid #8b5cf6; }

.ov-card-head { display: flex; align-items: center; gap: 10px; }
.ov-icon { font-size: 20px; line-height: 1; }
.ov-card-title { flex: 1; min-width: 0; }

.ov-stats { display: flex; gap: 22px; }
.ov-stat { display: flex; flex-direction: column; gap: 2px; }
.ov-stat b { font-size: 20px; line-height: 1.1; color: var(--text); }
.ov-stat span { font-size: 11px; color: var(--text-faint); }

.ov-recent {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 64px;
  padding-top: 9px;
  border-top: 1px dashed var(--border);
}
.ov-recent-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 2px 0;
  font-size: 12px;
  cursor: pointer;
}
.ov-recent-item:hover .ov-recent-name { color: var(--accent); }
.ov-recent-name { flex-shrink: 0; font-weight: 500; }
.ov-recent-preview {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text-faint);
}
.ov-empty-row { padding: 16px 0; text-align: center; }

/* ---------- 下半部分：待认领池 + 侧栏 ---------- */
.ov-columns {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr);
  gap: 14px;
  align-items: start;
}

.ov-pool-list { max-height: 480px; overflow-y: auto; }
.ov-pool-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--border);
}
.ov-pool-item:last-child { border-bottom: none; }
.ov-pool-item:hover { background: var(--brand-tint); }

.ov-pool-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  cursor: pointer;
}
.ov-pool-preview {
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  color: var(--text-faint);
}
.ov-pool-side { display: flex; flex-shrink: 0; align-items: center; gap: 10px; }

.ov-side { display: flex; flex-direction: column; gap: 14px; }

.ov-mini-list { max-height: 250px; overflow-y: auto; }
.ov-mini-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.ov-mini-item:last-child { border-bottom: none; }
.ov-mini-item:hover { background: var(--brand-tint); }
.ov-mini-name { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.ov-approval {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
}
.ov-approval:last-child { border-bottom: none; }
.ov-approval-main { min-width: 0; font-size: 13px; }

/* ---------- 自适应 ---------- */
@media (max-width: 1180px) {
  .ov-groups { grid-template-columns: 1fr; }
  .ov-columns { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .ov-page { padding: 14px 12px 32px; }
  .ov-hero { flex-direction: column; align-items: flex-start; }
  .ov-stats { gap: 16px; }
}
