/* ══════════════════════════════════════════════════════
   采集中心 — L1 情报采集前端（清爽两列版 v2）
   参考素材工坊布局：左导航(280px) | 右展示(1fr)
   前缀: cc-
   ══════════════════════════════════════════════════════ */

#page-collection-center { max-width: 1200px; }
#page-collection-center .page-header { margin-bottom: 20px; }

/* ── 两列布局 ── */
.cc-layout { display: grid; grid-template-columns: 280px 1fr; gap: 20px; align-items: start; }

/* ── 左侧面板 ── */
.cc-sidebar { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

/* ── 概览 ── */
.cc-overview { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; gap: 16px; }
.cc-ov-item { flex: 1; text-align: center; }
.cc-ov-value { font-size: 20px; font-weight: 700; color: var(--primary); line-height: 1.2; }
.cc-ov-label { font-size: 10px; color: var(--text-secondary); margin-top: 1px; }

/* ── 采集列表 ── */
.cc-list { padding: 6px; }
.cc-list-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius);
  cursor: pointer; font-size: 13px; color: var(--text);
  transition: all 0.12s;
}
.cc-list-item:hover { background: var(--bg-gray); }
.cc-list-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.cc-list-item .cc-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.cc-dot-on { background: var(--primary); }
.cc-dot-off { background: var(--text-tertiary); }
.cc-list-item .cc-lname { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.cc-list-item .cc-lproj { font-size: 10px; padding: 1px 6px; border-radius: 4px; background: var(--bg-gray); color: var(--text-secondary); flex-shrink: 0; }

/* ── 新建按钮 ── */
.cc-sidebar-actions { padding: 8px 12px 12px; border-top: 1px solid var(--border); }
.cc-new-btn {
  display: flex; align-items: center; justify-content: center; gap: 4px;
  width: 100%; padding: 8px;
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: transparent; color: var(--text-secondary);
  font-size: 13px; cursor: pointer; transition: all 0.15s;
}
.cc-new-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ── 右侧主区 ── */
.cc-main { min-height: 400px; }

/* ── 空状态 ── */
.cc-empty {
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 60px 20px; color: var(--text-tertiary); text-align: center;
}
.cc-empty-icon { font-size: 38px; margin-bottom: 10px; }
.cc-empty-title { font-size: 15px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.cc-empty-desc { font-size: 12px; max-width: 280px; line-height: 1.6; }

/* ── 详情卡片 ── */
.cc-detail { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; }

/* ── 头部 ── */
.cc-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
}
.cc-h-left { min-width: 0; }
.cc-h-title { font-size: 17px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 8px; }
.cc-h-sub { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.cc-h-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── 状态条 ── */
.cc-status-bar {
  display: flex; gap: 20px; padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-gray);
  font-size: 12px;
}
.cc-sb-item { display: flex; align-items: center; gap: 4px; }
.cc-sb-label { color: var(--text-secondary); }
.cc-sb-value { font-weight: 600; }

/* ── 内容列表 ── */
.cc-items { padding: 16px 24px; }
.cc-items-header { font-size: 13px; font-weight: 600; margin: 0 0 10px; display: flex; justify-content: space-between; align-items: center; }
.cc-items-header .cci-count { font-size: 11px; color: var(--text-tertiary); font-weight: 400; }
.cc-item-card {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 8px;
  transition: background 0.1s;
}
.cc-item-card:hover { background: var(--bg-gray); }
.cc-item-title {
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 4px;
}
.cc-item-meta { font-size: 11px; color: var(--text-tertiary); margin-bottom: 4px; display: flex; gap: 12px; }
.cc-item-snippet { font-size: 12px; color: var(--text-secondary); line-height: 1.5; max-height: 40px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cc-item-url { font-size: 11px; color: var(--primary); word-break: break-all; margin-top: 4px; }
.cc-item-url a { color: inherit; text-decoration: none; }
.cc-item-url a:hover { text-decoration: underline; }

/* ── 运行历史（折叠） ── */
.cc-history-toggle {
  padding: 12px 24px;
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text-secondary);
  cursor: pointer; display: flex; align-items: center; gap: 4px;
  transition: color 0.15s;
}
.cc-history-toggle:hover { color: var(--text); }
.cc-history-body { display: none; }
.cc-history-body.open { display: block; }
.cc-history-inner { padding: 0 24px 16px; }
.cc-history-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cc-history-table th { text-align: left; padding: 5px 6px; border-bottom: 2px solid var(--border); color: var(--text-secondary); font-weight: 600; font-size: 11px; }
.cc-history-table td { padding: 5px 6px; border-bottom: 1px solid var(--border); font-size: 11px; }
.cc-run-badge { display: inline-block; font-size: 10px; padding: 1px 6px; border-radius: 4px; font-weight: 600; }
.cc-run-badge-ok { background: var(--primary-light); color: var(--primary); }
.cc-run-badge-running { background: #e8f4fd; color: #1890ff; }
.cc-run-badge-failed { background: #fff0f0; color: var(--danger); }
.cc-run-badge-skipped { background: #fff8e1; color: var(--warning); }

/* ── 加载 / 错误 ── */
.cc-loading { display: flex; align-items: center; justify-content: center; padding: 60px; color: var(--text-tertiary); font-size: 13px; }

/* ── 入场动画 ── */
@keyframes ccFadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.cc-detail { animation: ccFadeIn 0.25s ease; }

/* ── 响应式 ── */
@media (max-width: 768px) { .cc-layout { grid-template-columns: 1fr; } }
