/* ═══════════════════════════════════════════════════════════
   CPL 제품 진행서 — BNT 프로젝트 템플릿 기반 (7단계)
   prefix: .cp-*
   ═══════════════════════════════════════════════════════════ */

/* ── 페이지 컨테이너 — BNT 프로젝트 처럼 풀폭/풀하이트 ─── */
/* 기본 .page 의 max-width:980px / center margin 해제 */
.page#page-cpl-projects {
  max-width: none;
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
}
.page#page-cpl-projects.active {
  display: block;
}
#cpl-projects-root {
  width: 100%;
}

/* 내부 컨텐츠 패딩 */
.cp-page { padding: 20px 28px; max-width: none; }
.cp-page-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
}
.cp-page-title { font-size: 20px; font-weight: 700; }
.cp-page-sub { font-size: 13px; color: var(--text3); margin-top: 4px; }

/* ── 상단 툴바 (현황/리스트 토글 + 검색 + 담당자 + 아카이브 + 새 제품) ─ */
.cp-topbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-bottom: 16px;
}
.cp-topbar-left {
  display: flex; align-items: center; gap: 12px;
}
.cp-board-title {
  font-size: 20px; font-weight: 700; color: var(--text);
}
.cp-view-toggle {
  display: inline-flex; background: var(--surface2);
  border: 1px solid var(--border); border-radius: 8px; padding: 3px;
}
.cp-view-toggle-btn {
  padding: 5px 14px; font-size: 13px; border: none; background: transparent;
  border-radius: 6px; cursor: pointer; color: var(--text2);
  display: inline-flex; align-items: center; gap: 4px;
}
.cp-view-toggle-btn.active {
  background: var(--surface); color: var(--text); font-weight: 600;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.cp-topbar-right {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-left: auto;
}
.cp-archive-toggle {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 6px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px; color: var(--text2); cursor: pointer; background: var(--surface);
}
.cp-add-btn {
  background: var(--accent); color: #fff; border: none;
  padding: 8px 14px; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.cp-add-btn:hover { filter: brightness(1.05); }

/* ── 대시보드 헤더 카드 ─────────────────────────────────── */
.cp-hero-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 20px 24px; margin-bottom: 16px;
  box-shadow: var(--shadow);
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px;
}
.cp-hero-tag {
  display: inline-block; background: #eff6ff; color: #1d4ed8;
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  margin-bottom: 6px;
}
.cp-hero-title {
  font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.4;
}

/* ── 메트릭 카드 줄 (BNT .bp-os-metrics 와 동일 치수) ───── */
.cp-metric-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
@media (max-width: 1100px) { .cp-metric-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px)  { .cp-metric-row { grid-template-columns: repeat(2, 1fr); } }
.cp-metric-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}
.cp-metric-label { font-size: 12px; color: #6b7280; margin-bottom: 4px; }
.cp-metric-value { font-size: 26px; font-weight: 700; color: #111827; line-height: 1.1; }
/* 메트릭별 색상 강조 옵션 — BNT 는 단색. 필요 시 클래스로 적용. */
.cp-metric-value.val-pending  { color: #ea580c; }
.cp-metric-value.val-prep     { color: #db2777; }
.cp-metric-value.val-running  { color: #16a34a; }
.cp-metric-sub { font-size: 11px; color: #9ca3af; }

/* ── 단계별 흐름 그리드 (BNT .bp-os-grid 동일 치수) ─────── */
.cp-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
@media (max-width: 1100px) { .cp-overview-grid { grid-template-columns: 1fr; } }

.cp-section-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px;
}
.cp-section-head {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}
.cp-section-title { font-size: 15px; font-weight: 700; color: #111827; margin: 0; }
.cp-section-meta { font-size: 11px; color: #6b7280; }

/* ── 단계별 흐름 (BNT 프로젝트 .bp-pipeline 패턴) ───────── */
.cp-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 720px) { .cp-pipeline { grid-template-columns: repeat(2, minmax(0,1fr)); } }

.cp-pipeline-step {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 6px 8px;
  align-items: center;
  text-align: left;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
  font-family: inherit;
}
.cp-pipeline-step:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}
.cp-pipeline-step-empty {
  opacity: .55;
  cursor: default;
}
.cp-pipeline-step-empty:hover {
  border-color: #e5e7eb;
  background: #f9fafb;
}
.cp-pipeline-step-active {
  border-color: var(--accent);
  background: rgba(37, 99, 235, 0.06);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.18);
}
.cp-pipeline-step-active .cp-pipeline-count {
  color: var(--accent);
}
.cp-pipeline-label,
.cp-pipeline-count {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}
.cp-pipeline-count { color: #111827; }
.cp-pipeline-bar {
  grid-column: 1 / -1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}
.cp-pipeline-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

/* 단계 필터 해제 버튼 (단계별 흐름 헤더 우측) */
.cp-stage-filter-clear {
  margin-left: 8px;
  padding: 2px 8px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.cp-stage-filter-clear:hover { opacity: 0.85; }

/* ── 우측: 지금 봐야 할 제품 ───────────────────────────── */
.cp-recent-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
  max-height: 360px; overflow-y: auto; padding-right: 4px;
}
.cp-recent-list::-webkit-scrollbar { width: 8px; }
.cp-recent-list::-webkit-scrollbar-thumb {
  background: var(--border); border-radius: 4px;
}
.cp-recent-list::-webkit-scrollbar-thumb:hover { background: var(--text3); }
@media (max-width: 900px) { .cp-recent-list { grid-template-columns: 1fr; } }
.cp-recent-row {
  display: flex; align-items: center; gap: 8px;
  padding: 8px; border-radius: 8px; cursor: pointer;
  transition: background .15s;
}
.cp-recent-row:hover { background: var(--surface2); }
.cp-recent-thumb {
  width: 32px; height: 32px; border-radius: 6px; background: var(--surface2);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text2); flex-shrink: 0;
  overflow: hidden;
}
.cp-recent-thumb.has-img { background: transparent; }
.cp-recent-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-recent-body { flex: 1; min-width: 0; }
.cp-recent-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-recent-meta { font-size: 11px; color: var(--text3); margin-top: 2px; }
.cp-stage-badge.sm { padding: 2px 6px; font-size: 10px; }

/* ── 다가오는 마감 ───────────────────────────────────────── */
.cp-deadline-tabs {
  display: flex; gap: 4px; margin-bottom: 12px;
}
.cp-deadline-tab {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--surface); font-size: 12px; cursor: pointer;
  color: var(--text2);
}
.cp-deadline-tab.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.cp-deadline-tab-count {
  display: inline-block; background: rgba(0,0,0,.06); padding: 1px 6px;
  border-radius: 8px; font-size: 11px; margin-left: 4px;
}
.cp-deadline-tab.active .cp-deadline-tab-count { background: rgba(255,255,255,.25); }

.cp-deadline-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px; display: flex;
  justify-content: space-between; align-items: center; gap: 12px;
  cursor: pointer; transition: background .15s, border-color .15s;
  margin-bottom: 6px;
}
/* "처리 완료" 버튼 — 카드 우측 */
.cp-due-done-btn {
  background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0;
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border-radius: 6px; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .12s;
}
.cp-due-done-btn:hover {
  background: #d1fae5; border-color: #6ee7b7; transform: scale(1.03);
}
/* 중요 표시 카드 ✕ 해제 버튼 — 회색 톤으로 처리완료와 시각 구분 */
.cp-imp-unmark-btn {
  background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0;
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border-radius: 6px; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .12s;
}
.cp-imp-unmark-btn:hover {
  background: #fee2e2; color: #991b1b; border-color: #fecaca; transform: scale(1.03);
}

/* 중요 표시 카드 📌 고정 버튼 — 토글. on 상태는 진한 보라 */
.cp-imp-pin-btn {
  background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0;
  font-size: 11px; font-weight: 600; padding: 4px 10px;
  border-radius: 6px; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, transform .12s, color .12s;
}
.cp-imp-pin-btn:hover {
  background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; transform: scale(1.03);
}
.cp-imp-pin-btn.on {
  background: #6d28d9; color: #fff; border-color: #6d28d9;
}
.cp-imp-pin-btn.on:hover {
  background: #5b21b6; border-color: #5b21b6; color: #fff;
}

/* 고정된 카드 자체 강조 — 좌측 보라 띠 + 약간 진한 배경 */
.cp-deadline-card.pinned {
  border-left: 3px solid #a855f7;
  background: linear-gradient(90deg, rgba(168,85,247,0.06), var(--surface2) 40%);
}
.cp-deadline-card:hover {
  background: var(--surface); border-color: var(--accent);
}
.cp-deadline-card-tag {
  background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 4px; white-space: nowrap;
}
.cp-deadline-card-tag.due         { background: #e0f2fe; color: #075985; }
.cp-deadline-card-tag.due.soon    { background: #fef3c7; color: #92400e; }
.cp-deadline-card-tag.due.today   { background: #fee2e2; color: #991b1b; }
.cp-deadline-card-tag.due.overdue { background: #fecaca; color: #7f1d1d; }
.cp-deadline-card-body { flex: 1; min-width: 0; }
.cp-deadline-card-name { font-size: 13px; font-weight: 600; }
.cp-deadline-card-sub { font-size: 11px; color: var(--text3); margin-top: 2px; }
.cp-deadline-empty {
  text-align: center; color: var(--text3); font-size: 12px; padding: 24px;
}

/* 100개 기한 카드가 들어올 수 있는 스크롤 컨테이너 */
.cp-due-list-scroll {
  max-height: 520px; overflow-y: auto;
  padding-right: 4px; /* 스크롤바 공간 */
}
.cp-due-list-scroll::-webkit-scrollbar { width: 8px; }
.cp-due-list-scroll::-webkit-scrollbar-thumb {
  background: var(--border); border-radius: 4px;
}
.cp-due-list-scroll::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ── 목록 화면 필터 바 ────────────────────────────────────── */
.cp-filter-bar {
  display: flex; gap: 12px; align-items: center; flex-wrap: wrap;
  margin-bottom: 14px;
}
.cp-search-input {
  padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; min-width: 240px; background: var(--surface);
}
.cp-stage-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-stage-pill {
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 12px; cursor: pointer; background: var(--surface);
  color: var(--text2); user-select: none; white-space: nowrap;
}
.cp-stage-pill.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}
.cp-stage-pill:hover:not(.active) { background: var(--surface2); }

/* ── VOC 처리 워크플로 ─────────────────────────────────── */
/* 필터 pill — VOC 탭/페이지 상단 */
.cp-voc-filter-pills {
  display: flex; gap: 6px; flex-wrap: wrap;
  margin-bottom: 12px;
}
.cp-voc-filter-pill {
  padding: 5px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text2);
  cursor: pointer; user-select: none;
  transition: background .12s, color .12s, border-color .12s;
}
.cp-voc-filter-pill:hover { background: var(--surface2); }
.cp-voc-filter-pill.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* VOC 처리 상태 카드 시각 */
.cp-log-tag.voc-unresolved {
  background: #fee2e2; color: #991b1b;
  border-color: transparent; font-weight: 700;
}
.cp-log-tag.voc-resolved {
  background: #d1fae5; color: #065f46;
  border-color: transparent; font-weight: 700;
}
.cp-log-card.voc-unresolved {
  border-left: 3px solid #ef4444;
  background: linear-gradient(90deg, rgba(239,68,68,.04), #ffffff 25%);
}
.cp-log-card.voc-resolved {
  border-left: 3px solid #10b981;
  background: linear-gradient(90deg, rgba(16,185,129,.04), #ffffff 25%);
  opacity: .85;
}
.cp-log-card.voc-resolved:hover { opacity: 1; }

/* 헤더 [✓ 처리 완료] 버튼 */
.cp-icon-btn.voc-resolve {
  background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0;
  font-weight: 700;
}
.cp-icon-btn.voc-resolve:hover { background: #d1fae5; }

/* 상세 모달 안 VOC 처리 정보 박스 */
.cp-voc-resolved-info {
  background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
  border: 1px solid #a7f3d0;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: #065f46;
}
.cp-voc-resolved-note {
  margin-top: 6px;
  padding: 6px 8px;
  background: rgba(255,255,255,.6);
  border-radius: 4px;
  color: var(--text);
  font-size: 13px;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── 그룹 공유 — 로그 추가/수정 모달의 체크박스 ───────────── */
.cp-share-field {
  background: linear-gradient(135deg, #faf5ff 0%, #f0f9ff 100%);
  border: 1px solid #e9d5ff; border-radius: 8px;
  padding: 10px 12px; margin-top: 4px;
}
.cp-share-label {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; user-select: none;
}
.cp-share-label input[type="checkbox"] {
  width: 16px; height: 16px; accent-color: #7c3aed;
  flex-shrink: 0; cursor: pointer;
}
.cp-share-tag {
  background: #ede9fe; color: #6d28d9;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 4px; white-space: nowrap;
}
.cp-share-hint {
  font-size: 11px; color: var(--text2); line-height: 1.5;
}
.cp-share-hint b { color: #5b21b6; }

/* SKU 진행서 로그 카드 — 그룹 공유 로그 강조 */
.cp-log-tag.share {
  background: #ede9fe; color: #6d28d9; border-color: transparent;
  font-weight: 700;
}
.cp-log-card.shared {
  border-left: 3px solid #a855f7;
  background: linear-gradient(90deg, rgba(168,85,247,.04), #ffffff 25%);
}

/* ── 그룹 상세 페이지 — 단계 막대 자리에 멤버 단계 분포 + 통합 로그 ── */
.cp-group-detail-badge {
  display: inline-block; margin-left: 8px;
  background: #ede9fe; color: #6d28d9;
  font-size: 11px; font-weight: 700; padding: 2px 9px;
  border-radius: 999px; vertical-align: middle;
  letter-spacing: .2px;
}
.cp-group-dist {
  display: flex; flex-direction: column; gap: 6px;
  margin-top: 12px;
}
.cp-group-dist-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 0;
}
.cp-group-dist-skus {
  display: flex; flex-wrap: wrap; gap: 4px;
  flex: 1;
}
.cp-group-dist-sku {
  background: var(--surface2); border: 1px solid var(--border);
  padding: 3px 9px; border-radius: 6px; font-size: 12px;
  color: var(--text); cursor: pointer;
  transition: background .12s, border-color .12s;
}
.cp-group-dist-sku:hover {
  background: #ede9fe; border-color: #c4b5fd; color: #5b21b6;
}

/* 그룹 로그 카드의 SKU 칩 — 어느 SKU 의 로그인지 표시 */
.cp-grouplog-skuchip {
  display: inline-block;
  background: #f5f3ff; color: #6d28d9;
  font-size: 10.5px; font-weight: 600;
  padding: 2px 8px; border-radius: 6px;
  cursor: pointer; margin: 4px 0;
  transition: background .12s;
}
.cp-grouplog-skuchip:hover {
  background: #ddd6fe; color: #5b21b6;
}

/* 그룹 제품정보 탭 — 멤버 SKU 카드 그리드 */
.cp-group-info-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.cp-group-info-card {
  display: flex; gap: 10px; align-items: center;
  background: #ffffff; border: 1px solid var(--border);
  border-radius: 8px; padding: 10px;
  cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.cp-group-info-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 6px rgba(0,0,0,.05);
}
.cp-group-info-thumb {
  width: 56px; height: 56px; flex-shrink: 0;
  background: var(--surface2); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--text3);
  overflow: hidden;
}
.cp-group-info-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cp-group-info-body { flex: 1; min-width: 0; }
.cp-group-info-name {
  font-weight: 700; font-size: 13px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  margin-bottom: 4px;
}
.cp-group-info-meta {
  display: flex; gap: 6px; align-items: center; flex-wrap: wrap;
  margin-bottom: 3px;
}
.cp-group-info-cat { font-size: 11px; color: var(--text3); }

/* ── 그룹 모드 — 그룹 카드 (그룹/단독 단위) ─────────────── */
.cp-group-list {
  display: flex; flex-direction: column; gap: 8px;
}
.cp-group-card {
  background: #ffffff; border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; cursor: pointer;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.cp-group-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,0,0,.05);
}
.cp-group-card.expanded {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(124,58,237,.04) 0%, #ffffff 60%);
}
.cp-group-card-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; flex-wrap: wrap;
}
.cp-group-card-title {
  display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1;
}
.cp-group-card-icon { font-size: 15px; }
.cp-group-card-name {
  font-weight: 700; font-size: 14px; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cp-group-card-caret {
  font-size: 11px; color: var(--text3); margin-left: 2px;
}
.cp-group-card-dist {
  display: flex; gap: 4px; flex-wrap: wrap;
}
.cp-group-card-sub {
  font-size: 11px; color: var(--text3); margin-top: 4px;
}
.cp-group-members {
  display: flex; flex-direction: column; gap: 4px;
  margin-top: 10px; padding-top: 10px;
  border-top: 1px dashed var(--border);
}
.cp-group-member {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 6px;
  background: var(--surface2); cursor: pointer;
  transition: background .12s;
}
.cp-group-member:hover { background: #ede9fe; }
.cp-group-member-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cp-group-member-model {
  font-size: 11px; color: var(--text3);
  font-family: monospace;
}

/* ── 진행서 목록 카드 그리드 ──────────────────────────────── */
.cp-list-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 1280px) { .cp-list-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 960px)  { .cp-list-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .cp-list-grid { grid-template-columns: 1fr; } }

.cp-list-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px; cursor: pointer;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  box-shadow: var(--shadow);
  display: flex; gap: 12px; align-items: stretch;
}
.cp-list-card:hover {
  transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08);
  border-color: var(--accent);
}
.cp-list-card-thumb {
  flex: 0 0 72px; width: 72px; height: 72px;
  border-radius: 8px; background: #f1f5f9; border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #94a3b8;
  overflow: hidden;
}
.cp-list-card-thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.cp-list-card-thumb.has-img { background: transparent; border-color: transparent; }
.cp-list-card-body {
  flex: 1; min-width: 0; display: flex; flex-direction: column;
}
.cp-list-card-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 8px; margin-bottom: 6px;
}
.cp-list-card-name {
  font-weight: 600; font-size: 14px; color: var(--text);
  flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cp-stage-badge {
  padding: 3px 8px; border-radius: 10px; font-size: 11px; font-weight: 600;
  color: #fff; white-space: nowrap;
}
.cp-list-card-meta {
  font-size: 12px; color: var(--text3); margin-top: 4px;
}
.cp-list-card-recent {
  font-size: 11px; color: var(--text3); margin-top: 8px;
  display: flex; align-items: center; gap: 4px;
}

/* 글로벌 검색 결과 — 카드의 매칭 배지 + 스니펫 */
.cp-list-card-matchbadge {
  display: inline-block; margin-left: 6px;
  font-size: 10px; font-weight: 600; padding: 1px 7px;
  background: #fef3c7; color: #92400e; border: 1px solid #fde68a;
  border-radius: 8px; vertical-align: middle;
}
.cp-list-card-snippets {
  margin-top: 8px; padding-top: 8px;
  border-top: 1px dashed var(--border);
  display: flex; flex-direction: column; gap: 4px;
}
.cp-list-card-snippet {
  font-size: 11.5px; line-height: 1.4; color: var(--text2);
  background: #f8fafc; padding: 5px 8px; border-radius: 5px;
  border-left: 2px solid #cbd5e1;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.cp-list-card-snippet.is-comment { border-left-color: #a78bfa; background: #faf5ff; }
.cp-list-card-snippet.is-log     { border-left-color: #10b981; }

/* 검색어 하이라이트 — 노란 형광펜 */
mark.cp-mark {
  background: #fef08a; color: inherit; padding: 0 1px;
  border-radius: 2px; font-weight: 600;
}

/* 로그 수정 이력 모달 — 버전 카드 리스트 */
.cp-hist-list {
  display: flex; flex-direction: column; gap: 10px;
  max-height: 60vh; overflow-y: auto; padding-right: 4px;
}
.cp-hist-card {
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px;
}
.cp-hist-card.current {
  background: #f0fdf4; border-color: #86efac;
}
.cp-hist-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px; gap: 8px; flex-wrap: wrap;
}
.cp-hist-card-ver {
  font-weight: 700; font-size: 13px; color: var(--text);
  background: var(--surface); padding: 2px 8px; border-radius: 4px;
  border: 1px solid var(--border);
}
.cp-hist-card.current .cp-hist-card-ver {
  background: #10b981; color: #fff; border-color: #10b981;
}
.cp-hist-card-meta { font-size: 11.5px; color: var(--text3); }
.cp-hist-snap-meta {
  font-size: 11.5px; color: var(--text2); margin-bottom: 6px;
  display: flex; gap: 6px; flex-wrap: wrap;
}
.cp-hist-snap-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.cp-hist-snap-content {
  font-size: 13px; color: var(--text); line-height: 1.5;
  white-space: pre-wrap; word-break: break-word;
  background: var(--surface); padding: 8px 10px; border-radius: 6px;
  border: 1px solid var(--border);
}

/* 전체 VOC 페이지 — 카드의 제품명 칩 + 상단 통계 */
.cp-voc-card-prod {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 600; color: #6d28d9;
  background: #ede9fe; border: 1px solid #ddd6fe;
  padding: 2px 8px; border-radius: 10px;
  margin: 2px 0 6px; cursor: pointer; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cp-voc-card-prod:hover { background: #ddd6fe; }
.cp-voc-top-row {
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 12px;
}
.cp-voc-prod-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text2); cursor: pointer;
}
.cp-voc-prod-chip:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.cp-voc-prod-chip b { color: var(--text); margin-left: 2px; }
.cp-voc-prod-chip:hover b { color: #fff; }

/* 통합 검색 카운트 바 — 그리드 위 */
.cp-list-count-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 12px; color: var(--text2);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px;
  margin-bottom: 12px;
}
.cp-count-bar-q {
  font-weight: 700; color: var(--text);
  background: #fef08a; padding: 2px 8px; border-radius: 4px;
}
.cp-count-bar-sep { color: var(--text3); }
.cp-list-count-bar b { color: var(--text); font-weight: 700; }

.cp-list-empty {
  text-align: center; padding: 60px 20px; color: var(--text3); font-size: 14px;
}

/* ── 상세 화면 ───────────────────────────────────────────── */
.cp-detail-back {
  background: var(--surface); border: 1px solid var(--border);
  padding: 6px 12px; border-radius: 6px; font-size: 13px;
  cursor: pointer; color: var(--text2);
}
.cp-detail-back:hover { background: var(--surface2); }

/* SKU 상세에서 그룹 상세로 점프하는 버튼 — 그룹 컬러로 강조 */
.cp-detail-group-nav {
  background: #f5f3ff; border: 1px solid #ddd6fe;
  padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; color: #6d28d9; font-family: inherit;
  transition: background .15s, border-color .15s;
}
.cp-detail-group-nav:hover {
  background: #ede9fe; border-color: #c4b5fd;
}

.cp-detail-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 18px 20px; box-shadow: var(--shadow);
  margin-bottom: 16px;
}
.cp-detail-name { font-size: 18px; font-weight: 700; margin-bottom: 14px; }

/* ── 상세 헤더: 좌측 110×110 썸네일 + 우측(이름·메타·단계바) ─── */
.cp-detail-head { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 0; }
.cp-detail-thumb {
  width: 110px; height: 110px; flex-shrink: 0;
  border-radius: 12px; overflow: hidden;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.cp-detail-thumb.has-img { cursor: zoom-in; }
.cp-detail-thumb.has-img:hover { box-shadow: 0 0 0 2px var(--primary, #10b981); }
.cp-detail-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-detail-thumb-ph { font-size: 38px; opacity: 0.45; }
.cp-detail-head-body {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; justify-content: space-between;
  align-self: stretch; /* 썸네일 높이만큼 늘려서 단계바를 하단에 붙임 */
}
.cp-detail-head-body .cp-detail-name { margin-bottom: 2px; }
.cp-detail-meta {
  display: flex; flex-wrap: wrap; gap: 6px 12px;
  font-size: 12px; color: var(--text3);
}
.cp-detail-meta-code { font-family: monospace; color: var(--text2); }
.cp-detail-meta-model { color: var(--text2); }

/* ── 7단계 진행 막대 (BNT .bp-stage-flow 패턴) ──────────────
   각 단계마다 ::before 로 다음 단계까지 연결선. .done 인 단계는
   연결선이 초록색으로 채워져 "여기까지 완료" 시각화. */
.cp-stage-bar {
  display: flex; gap: 0;
  padding: 4px 0 2px;
}
.cp-stage-step {
  /* flex column 으로 강제 — 동그라미가 step 최상단에서 시작하게 만들어
     ::before 라인의 수직 위치 계산이 정확히 동그라미 중앙에 떨어지게 함. */
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center;
  position: relative;
  user-select: none;
}
.cp-stage-step::before {
  /* 36px 동그라미 중앙 = 18px, 라인 두께 2px → top: 17px */
  content: ''; position: absolute;
  top: 17px; left: 50%; right: -50%;
  height: 2px; background: #e2e8f0; z-index: 0;
}
.cp-stage-step:last-child::before { display: none; }
.cp-stage-step.done::before { background: #10b981; }

.cp-stage-circle {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
  background: #cbd5e1; border: 2px solid #cbd5e1;
  position: relative; z-index: 1;
  flex-shrink: 0;
  transition: transform .15s, filter .15s, box-shadow .15s;
}
.cp-stage-step:hover .cp-stage-circle:not(.current) {
  filter: brightness(1.06); transform: scale(1.05);
}
.cp-stage-circle.done { background: #10b981; border-color: #10b981; }
.cp-stage-circle.current {
  background: var(--accent); border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(59,130,246,.18);
}
.cp-stage-circle.skipped { background: #cbd5e1; border-color: #cbd5e1; opacity: .55; }

.cp-stage-label {
  font-size: 11px; margin-top: 6px; color: var(--text2);
  display: flex; align-items: center; justify-content: center; gap: 3px;
  white-space: nowrap;
}
.cp-stage-step.current .cp-stage-label { color: var(--text); font-weight: 600; }
.cp-stage-step.done .cp-stage-label { color: var(--text2); }

/* 7단계 컬러 */
.cp-st-lead      { --st-c: #94a3b8; }
.cp-st-sourcing  { --st-c: #3b82f6; }
.cp-st-sample    { --st-c: #a855f7; }
.cp-st-prelaunch { --st-c: #f59e0b; }
.cp-st-operating { --st-c: #10b981; }
.cp-st-eol       { --st-c: #ef4444; }
.cp-st-reject    { --st-c: #6b7280; }

.cp-stage-badge.cp-bg-lead      { background: #94a3b8; }
.cp-stage-badge.cp-bg-sourcing  { background: #3b82f6; }
.cp-stage-badge.cp-bg-sample    { background: #a855f7; }
.cp-stage-badge.cp-bg-prelaunch { background: #f59e0b; }
.cp-stage-badge.cp-bg-operating { background: #10b981; }
.cp-stage-badge.cp-bg-eol       { background: #ef4444; }
.cp-stage-badge.cp-bg-reject    { background: #6b7280; }

/* ── 상세 탭 ─────────────────────────────────────────────── */
.cp-tabs {
  display: flex; gap: 2px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; padding: 4px;
  margin-bottom: 12px;
}
.cp-tab {
  flex: 1; padding: 10px 14px; border: none; background: transparent;
  font-size: 13px; font-weight: 500; color: var(--text2);
  border-radius: 7px; cursor: pointer; transition: background .15s, color .15s;
}
.cp-tab.active {
  background: var(--accent); color: #fff;
}
.cp-tab:not(.active):hover { background: var(--surface2); color: var(--text); }
.cp-tab-count {
  display: inline-block; background: rgba(255,255,255,.25);
  padding: 1px 6px; border-radius: 8px; font-size: 11px; margin-left: 4px;
}
.cp-tab:not(.active) .cp-tab-count { background: var(--surface2); color: var(--text3); }

.cp-tab-panel {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 16px; min-height: 240px;
}

/* ── 로그 작성 탭 ─────────────────────────────────────────── */
.cp-log-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 12px; flex-wrap: wrap;
}
.cp-log-filter-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-log-filter-pill {
  padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px;
  font-size: 11px; cursor: pointer; background: var(--surface);
  color: var(--text2); user-select: none;
}
.cp-log-filter-pill.active {
  background: var(--text); color: #fff; border-color: var(--text);
}
/* 중요 표시 필터 — 빈 별/노란 별 토글 */
.cp-log-filter-pill.star {
  font-size: 14px; line-height: 1; padding: 4px 10px;
  color: #cbd5e1;
}
.cp-log-filter-pill.star.active {
  background: #fef3c7; color: #f59e0b; border-color: #fcd34d;
}
.cp-log-filter-pill.star:hover { color: #f59e0b; }
.cp-log-add-btn {
  background: var(--accent); color: #fff; border: none;
  padding: 8px 14px; border-radius: 6px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.cp-log-add-btn:hover { filter: brightness(1.05); }

/* 검색창 — Korean IME 호환을 위해 input element를 재렌더하지 않음. */
.cp-log-search {
  position: relative; display: inline-flex; align-items: center;
  margin-left: auto;
}
.cp-log-search-icon {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  font-size: 12px; color: var(--text3); pointer-events: none;
}
.cp-log-search-input {
  width: 260px; padding: 7px 30px 7px 30px;
  border: 1px solid var(--border); border-radius: 6px;
  font-size: 12px; background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
  /* IME 안전 — 직접 타이핑되는 영역, transform 등 트리거 회피 */
}
.cp-log-search-input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.cp-log-search-clear {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; border: none; background: transparent;
  font-size: 11px; color: var(--text3); cursor: pointer; line-height: 1;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.cp-log-search-clear:hover { background: var(--surface2); color: var(--text); }

.cp-log-group { margin-bottom: 18px; }
.cp-log-group-head {
  font-size: 12px; font-weight: 700; color: var(--text2);
  margin-bottom: 10px; padding: 6px 10px;
  background: #f1f5f9; border-radius: 6px;
}
.cp-log-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
@media (max-width: 1100px) { .cp-log-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 720px)  { .cp-log-grid { grid-template-columns: 1fr; } }

.cp-log-card {
  background: #ffffff; border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; cursor: pointer;
  position: relative;
  transition: transform .15s, border-color .15s, box-shadow .15s;
}
.cp-log-card:hover {
  border-color: var(--accent);
  box-shadow: 0 3px 10px rgba(0,0,0,.06);
  transform: translateY(-1px);
}
/* important — 좌측 stripe 없이 상단 노란 그라데이션 + 노란 테두리로 표시 */
.cp-log-card.important {
  background: linear-gradient(to bottom, #fffbeb 0, #ffffff 32px);
  border-color: #fcd34d;
}
.cp-log-card-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 6px; margin-bottom: 4px; font-size: 11px; color: var(--text3);
}
.cp-log-card-time { font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.cp-log-card-head-right { display: inline-flex; align-items: center; gap: 6px; }

/* 카드 인라인 별 토글 버튼 */
.cp-log-star {
  background: transparent; border: none; padding: 0 2px;
  font-size: 14px; line-height: 1; cursor: pointer;
  color: #cbd5e1; transition: color .12s, transform .12s;
}
.cp-log-star:hover { color: #f59e0b; transform: scale(1.15); }
.cp-log-star.on { color: #f59e0b; text-shadow: 0 0 1px #f59e0b; }

/* 기한 D-day 배지 */
.cp-log-due {
  font-size: 10px; padding: 1px 6px; border-radius: 8px;
  background: #f1f5f9; color: #475569; font-weight: 600;
  border: 1px solid #e2e8f0;
}
.cp-log-due.soon    { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.cp-log-due.today   { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.cp-log-due.overdue { background: #fee2e2; color: #7f1d1d; border-color: #fca5a5; }
.cp-log-card-comments {
  background: #ede9fe; color: #6d28d9; font-weight: 600;
  font-size: 10px; padding: 1px 7px; border-radius: 8px;
  white-space: nowrap;
}
.cp-log-card-content {
  font-size: 13px; color: var(--text); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; text-overflow: ellipsis; word-break: break-word;
}
.cp-log-card-tags {
  display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px;
}
/* chip — 옵션 A: 분류축별 hue (채널=green / 방향=purple / 카테고리=amber / 벤더=gray)
   같은 축 안의 값들은 같은 hue로 묶어 인지 부담 최소화. */
.cp-log-tag {
  font-size: 10px; padding: 1px 7px; border-radius: 8px;
  background: #f3f4f6; color: #4b5563;
  border: 1px solid transparent;
  font-weight: 500;
}
/* 채널 — 초록 */
.cp-log-tag.ch  { background: #dcfce7; color: #166534; border-color: #bbf7d0; }
/* 방향 — 보라 */
.cp-log-tag.dir { background: #ede9fe; color: #6d28d9; border-color: #ddd6fe; }
/* 카테고리 — 호박/주황 */
.cp-log-tag.cat { background: #ffedd5; color: #9a3412; border-color: #fed7aa; }
/* 벤더 — 회색 그대로 (.cp-log-tag 기본값 사용) */
.cp-log-tag.ven { /* no override */ }
/* 별표 — 노랑 (강조) */
.cp-log-tag.star{ background: #fef3c7; color: #92400e; border-color: #fde68a; font-size: 11px; }

.cp-log-empty {
  text-align: center; padding: 40px 12px; color: var(--text3); font-size: 13px;
}

/* ── 신규 진행서 모달 (품목 선택) ────────────────────────── */
.cp-newproj-modal { width: min(560px, 94vw); }
.cp-newproj-list {
  max-height: 360px; overflow-y: auto; border: 1px solid var(--border);
  border-radius: 6px; background: var(--surface2);
}
.cp-newproj-item {
  padding: 8px 12px; cursor: pointer; border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.cp-newproj-item:last-child { border-bottom: none; }
.cp-newproj-item:hover { background: var(--surface); }
.cp-newproj-item-name { font-weight: 600; }
.cp-newproj-item-sub { font-size: 11px; color: var(--text3); margin-top: 2px; }
.cp-newproj-item.already-exists { opacity: .5; cursor: not-allowed; }
.cp-newproj-item.already-exists::after {
  content: '이미 진행서 있음'; font-size: 10px; color: var(--accent);
  margin-left: 8px;
}

/* ── 로그 추가/상세 모달 ─────────────────────────────────── */
.cp-log-modal { width: min(640px, 94vw); }
.cp-log-modal .form-field { margin-bottom: 12px; }
.cp-log-modal .pl-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.cp-log-modal-product {
  font-size: 12px; color: var(--text3);
  padding: 0 2px 10px; margin-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.cp-log-modal-product b { color: var(--text); font-weight: 600; }

/* ── 첨부 (드래그앤드롭 + 붙여넣기 + 클릭 선택) ──────────── */
.cp-attach-zone {
  border: 2px dashed var(--border); border-radius: 8px;
  padding: 14px; text-align: center; cursor: pointer;
  background: var(--surface2); transition: background .15s, border-color .15s;
}
.cp-attach-zone:hover, .cp-attach-zone.drag-over {
  border-color: var(--accent); background: rgba(59,130,246,.06);
}
.cp-attach-list {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 8px;
}
.cp-attach-item {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px 6px 6px; background: var(--surface);
  min-width: 180px; max-width: 280px;
}
.cp-attach-item img {
  width: 44px; height: 44px; object-fit: cover; border-radius: 4px;
  background: var(--surface2);
}
.cp-attach-file-ic {
  width: 44px; height: 44px; display: flex; align-items: center;
  justify-content: center; font-size: 20px; background: var(--surface2);
  border-radius: 4px; flex-shrink: 0;
}
.cp-attach-meta { flex: 1; min-width: 0; }
.cp-attach-name {
  font-size: 12px; font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cp-attach-name a { color: inherit; text-decoration: none; }
.cp-attach-name a:hover { text-decoration: underline; color: var(--accent); }
.cp-attach-size { font-size: 10px; color: var(--text3); margin-top: 2px; }
.cp-attach-del {
  background: transparent; border: none; cursor: pointer;
  color: var(--text3); font-size: 14px; padding: 2px 6px;
}
.cp-attach-del:hover { color: #ef4444; }
.cp-attach-item.readonly .cp-attach-del { display: none; }

/* ── 로그 상세 모달 — 헤더 / 본문 / 댓글 ───────────────────
   이중 스크롤 방지 위해 안쪽 overflow 제거 (.modal-box 가 처리). */
.cp-log-modal.detail { width: min(720px, 96vw); }
.cp-detail-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 8px;
}
.cp-detail-header-actions { display: flex; gap: 4px; }
/* 헤더 액션 — 톤다운, 텍스트만 작게 (배경 X) */
.cp-icon-btn {
  background: transparent; border: none;
  padding: 4px 8px; border-radius: 6px; font-size: 12px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 3px; color: var(--text3);
  font-family: inherit;
}
.cp-icon-btn:hover { background: var(--surface2); color: var(--text2); }
.cp-icon-btn.danger { color: #b91c1c; }
.cp-icon-btn.danger:hover { background: #fef2f2; color: #991b1b; }

/* 메타 한 줄 (발생 일시 좌 / 작성자·작성 시각 우) */
.cp-detail-metarow {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin: 4px 0 10px;
}
.cp-detail-when {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; font-weight: 600; color: var(--text);
}
.cp-detail-when-ic { font-size: 14px; opacity: .8; }
.cp-detail-when-text { letter-spacing: -.2px; }
.cp-detail-imp {
  margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 700;
}
.cp-detail-author {
  font-size: 11px; color: var(--text3);
}
.cp-detail-author-sep { margin: 0 4px; }

/* chip 한 줄 — 값 있는 chip 만 들어옴. 배경 박스 없음(평평하게). */
.cp-detail-chiprow {
  display: flex; flex-wrap: wrap; gap: 5px;
  margin-bottom: 14px;
}

/* 내용 — 박스 없이 plain. 가장 큰 시선 무게. */
.cp-detail-content {
  white-space: pre-wrap; padding: 4px 0 4px 2px;
  line-height: 1.7; word-break: break-word;
  font-size: 15px; color: var(--text);
  margin-bottom: 14px;
}

/* 첨부 블록 — 폼필드 라벨 대신 작은 sub-label */
.cp-detail-attach { margin-bottom: 12px; }
.cp-detail-sub-label {
  font-size: 11px; font-weight: 700; color: var(--text3);
  margin-bottom: 6px; letter-spacing: .3px;
}

/* 첨부 zone — comment scope 용 작은 버전 */
.cp-attach-zone.small { padding: 8px; }

/* ── 댓글 섹션 ──────────────────────────────────────────── */
.cp-comment-section {
  margin-top: 16px; padding-top: 12px;
  border-top: 1px solid var(--border);
}
.cp-comment-section-title {
  font-size: 13px; font-weight: 700; color: var(--text2);
  margin-bottom: 10px;
}
.cp-comment-count {
  display: inline-block; background: var(--surface2);
  color: var(--text2); font-size: 11px; padding: 1px 7px;
  border-radius: 8px; margin-left: 4px;
}
.cp-comment-list {
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 12px;
}
.cp-comment-empty {
  text-align: center; padding: 18px; color: var(--text3);
  font-size: 12px; background: var(--surface2); border-radius: 6px;
}
/* 댓글 카드 — 본인/타인 동일한 회색 톤. 본인 표시는 작은 텍스트 뱃지로만. */
.cp-comment-card {
  background: var(--surface2);
  border-radius: 8px; padding: 10px 12px;
  position: relative;
}
.cp-comment-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--text3); margin-bottom: 4px;
}
.cp-comment-author { font-weight: 600; color: var(--text2); }
.cp-comment-mine-badge {
  background: var(--surface); border: 1px solid var(--border);
  font-size: 9px; padding: 0 5px; border-radius: 4px;
  color: var(--text3); margin-left: 4px; letter-spacing: .5px;
}
.cp-comment-time { flex: 1; }
.cp-comment-edited {
  background: transparent; border: none; cursor: pointer; padding: 0 0 0 4px;
  font-size: 10.5px; color: var(--text3); text-decoration: underline dotted;
}
.cp-comment-edited:hover { color: var(--accent); }
.cp-comment-actions { display: inline-flex; gap: 2px; }
.cp-comment-act-btn {
  background: transparent; border: none; color: var(--text3);
  cursor: pointer; font-size: 12px; padding: 0 4px; line-height: 1;
  border-radius: 4px;
}
.cp-comment-act-btn:hover { background: var(--surface); color: var(--text2); }
.cp-comment-act-btn.danger:hover { color: #ef4444; background: #fee2e2; }
/* legacy class — 혹시 남아있는 호출 호환용 */
.cp-comment-del {
  background: transparent; border: none; color: var(--text3);
  cursor: pointer; font-size: 12px; padding: 0 4px;
}
.cp-comment-del:hover { color: #ef4444; }

/* 댓글 인라인 수정 textarea */
.cp-comment-edit-ta {
  width: 100%; min-height: 60px;
  font-size: 13px; line-height: 1.5;
  padding: 6px 8px;
}
.cp-comment-edit-actions {
  display: flex; gap: 6px; margin-top: 6px; justify-content: flex-end;
}
.cp-comment-edit-actions .btn-save,
.cp-comment-edit-actions .btn-cancel {
  padding: 4px 12px; font-size: 12px;
}
.cp-comment-body {
  font-size: 13px; color: var(--text); line-height: 1.55;
  white-space: pre-wrap; word-break: break-word;
}

/* 댓글 입력 — 컴팩트한 단일 박스. 첨부 zone 은 줄이고 안내 점선만. */
.cp-comment-input-wrap {
  background: var(--surface2);
  border-radius: 8px; padding: 10px;
}
.cp-comment-textarea {
  min-height: 60px; resize: vertical; width: 100%;
  border: 1px solid var(--border); border-radius: 6px;
  padding: 8px 10px; font-size: 13px; font-family: inherit;
  margin-bottom: 6px; background: #ffffff;
}
.cp-comment-bottom-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 4px;
}
.cp-comment-attach-hint {
  font-size: 11px; color: var(--text3);
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 8px; border-radius: 6px; cursor: pointer;
  transition: background .15s;
}
.cp-comment-attach-hint:hover, .cp-comment-attach-hint.drag-over {
  background: var(--surface); color: var(--text2);
}

/* 로그 카드의 작은 첨부 썸네일 */
.cp-log-card-attach {
  position: relative; margin: 6px 0 4px;
  display: inline-block;
}
.cp-log-card-attach img {
  width: 60px; height: 60px; object-fit: cover; border-radius: 6px;
  background: var(--surface2);
}
.cp-log-card-attach-more {
  position: absolute; top: 2px; right: 2px;
  background: rgba(0,0,0,.65); color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 1px 6px; border-radius: 8px;
}

/* 벤더 chip — 단일 회색 톤(.cp-log-tag 그대로 상속). 색 변형 X. */

/* ── AI 요약 박스 (로그 상세 모달 안) ────────────────────── */
.cp-icon-btn.ai { color: #6d28d9; }
.cp-icon-btn.ai:hover { background: #f5f3ff; color: #5b21b6; }

.cp-ai-box {
  background: linear-gradient(135deg, #faf5ff 0%, #f0f9ff 100%);
  border: 1px solid #e9d5ff;
  border-radius: 10px;
  padding: 12px 14px;
  margin: 8px 0 14px;
}
.cp-ai-box.loading {
  display: flex; align-items: center; gap: 8px;
  color: #6d28d9; font-size: 13px;
}
.cp-ai-box.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; padding: 10px 12px; font-size: 13px; }

.cp-ai-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid #ddd6fe; border-top-color: #6d28d9;
  animation: cp-spin .8s linear infinite; display: inline-block;
}
@keyframes cp-spin { to { transform: rotate(360deg); } }

.cp-ai-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-bottom: 8px;
}
.cp-ai-title { font-size: 13px; font-weight: 700; color: #5b21b6; }
.cp-ai-tag {
  display: inline-block; margin-left: 6px;
  background: #ede9fe; color: #6d28d9;
  font-size: 9px; font-weight: 600;
  padding: 1px 6px; border-radius: 4px; letter-spacing: .2px;
}
.cp-ai-move-btn {
  background: #6d28d9; color: #fff; border: none;
  font-size: 11px; font-weight: 600;
  padding: 5px 10px; border-radius: 6px; cursor: pointer;
  font-family: inherit; white-space: nowrap;
}
.cp-ai-move-btn:hover { background: #5b21b6; }
.cp-ai-body-sum {
  font-size: 13px; color: var(--text); line-height: 1.6;
  padding: 8px 10px; background: rgba(255,255,255,.7);
  border-radius: 6px; margin-bottom: 8px;
}
.cp-ai-date-block { margin-top: 6px; }
.cp-ai-date-block-title {
  font-size: 11px; font-weight: 700; color: #6b7280;
  margin-bottom: 4px; letter-spacing: .2px;
}
.cp-ai-date-row {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 4px 0; font-size: 12px;
}
.cp-ai-date {
  font-family: monospace; color: #6d28d9; font-weight: 600;
  flex-shrink: 0; min-width: 80px;
}
.cp-ai-date-text { color: var(--text2); line-height: 1.5; }
.cp-ai-empty { font-size: 11px; color: var(--text3); padding: 4px 0; }

/* ── 히스토리 탭 — AI 요약 카드 (날짜 그룹) ───────────────── */
.cp-hist-group { margin-bottom: 18px; }
.cp-hist-group-head {
  font-size: 12px; font-weight: 700; color: var(--text2);
  margin-bottom: 8px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.cp-hist-list { display: flex; flex-direction: column; gap: 8px; }

.cp-hist-card {
  background: #ffffff; border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px;
  border-left: 3px solid #a855f7;
}
.cp-hist-card-head {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; color: var(--text3); margin-bottom: 6px;
  flex-wrap: wrap;
}
.cp-hist-card-tag {
  background: #f5f3ff; color: #6d28d9;
  font-weight: 600; padding: 1px 7px; border-radius: 8px;
}
.cp-hist-card-time { color: var(--text2); }
.cp-hist-card-by { flex: 1; text-align: right; }
.cp-hist-card-open, .cp-hist-card-del {
  background: transparent; border: 1px solid var(--border);
  color: var(--text3); font-size: 11px;
  width: 24px; height: 24px; border-radius: 4px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.cp-hist-card-open:hover { color: var(--accent); border-color: var(--accent); }
.cp-hist-card-del:hover { color: #ef4444; border-color: #fecaca; background: #fef2f2; }

.cp-hist-body {
  font-size: 13.5px; color: var(--text); line-height: 1.6;
  margin-bottom: 6px;
}
.cp-hist-dates {
  background: var(--surface2); border-radius: 6px;
  padding: 8px 10px; margin-top: 6px;
}
.cp-hist-date-row {
  display: flex; gap: 8px; align-items: flex-start;
  padding: 3px 0; font-size: 12px;
}
.cp-hist-date-key {
  font-family: monospace; color: var(--text2); font-weight: 600;
  flex-shrink: 0; min-width: 80px;
}
.cp-hist-date-sum { color: var(--text2); line-height: 1.5; }

/* ── placeholder 탭 ──────────────────────────────────────── */
.cp-tab-placeholder {
  text-align: center; padding: 60px 24px; color: var(--text3);
  font-size: 13px; line-height: 1.7;
}
.cp-tab-placeholder strong { color: var(--text2); font-size: 14px; display: block; margin-bottom: 6px; }
