/* ═══════════════════════════════════════════════════════════ */
/* BNT 프로젝트 (칸반 보드) — bnt-projects                     */
/* ═══════════════════════════════════════════════════════════ */

.page#page-bnt-projects {
  max-width: none;
  padding: 0;
  margin: 0;
  height: 100vh;
  flex-direction: column;
  overflow: hidden;
  contain: layout paint style;
}

.page#page-bnt-projects.active {
  display: flex;
}

/* ── 상단 툴바 ── */
.bp-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
  gap: 16px;
  flex-wrap: wrap;
}

.bp-toolbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bp-toolbar-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.bp-view-toggle {
  display: flex;
  gap: 2px;
  background: #e5e7eb;
  padding: 2px;
  border-radius: 6px;
}

.bp-view-btn {
  padding: 4px 12px;
  border: none;
  background: transparent;
  font-size: 12px;
  cursor: pointer;
  border-radius: 4px;
  color: #374151;
}

.bp-view-btn.bp-view-active {
  background: white;
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
  font-weight: 500;
}

.bp-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.bp-search {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  width: 180px;
}

.bp-filter-select {
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-size: 13px;
  background: white;
}

.bp-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
}

/* ── 레이아웃 ── */
.bp-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.bp-view-container {
  flex: 1;
  overflow: auto;
  padding: 20px;
}

/* ── 제품 진행 현황 뷰 ── */
.bp-overview {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 1440px;
  margin: 0 auto;
}

.bp-os-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.bp-os-eyebrow {
  font-size: 12px;
  font-weight: 700;
  color: #1a5fb4;
  margin-bottom: 4px;
}

.bp-os-hero h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.35;
  color: #111827;
}

.bp-os-hero-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.bp-os-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
}

.bp-os-metric,
.bp-os-panel {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.bp-os-metric {
  padding: 14px;
}

.bp-os-metric-label {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.bp-os-metric-value {
  font-size: 26px;
  font-weight: 700;
  color: #111827;
}

.bp-os-metric-sub {
  font-size: 11px;
  color: #9ca3af;
}

.bp-os-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, .8fr);
  gap: 14px;
}

.bp-os-panel {
  padding: 14px;
}

.bp-os-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.bp-os-panel-head h4 {
  margin: 0;
  font-size: 15px;
  color: #111827;
}

.bp-os-panel-head span {
  font-size: 11px;
  color: #6b7280;
}

.bp-pipeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.bp-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;
}

.bp-pipeline-step:hover {
  border-color: #93c5fd;
  background: #f8fbff;
}

.bp-pipeline-step-empty {
  opacity: .55;
  cursor: default;
}

.bp-pipeline-step-empty:hover {
  border-color: #e5e7eb;
  background: #f9fafb;
}

.bp-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);
}
.bp-pipeline-step-active .bp-pipeline-count {
  color: var(--accent-text);
}

/* 단계 필터 해제 버튼 (단계별 흐름 헤더 우측) */
.bp-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;
}
.bp-stage-filter-clear:hover { opacity: 0.85; }

.bp-pipeline-label,
.bp-pipeline-count {
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

.bp-pipeline-count {
  color: #111827;
}

.bp-pipeline-bar {
  grid-column: 1 / -1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.bp-pipeline-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.bp-focus-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bp-focus-item {
  display: grid;
  gap: 5px;
  width: 100%;
  text-align: left;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px;
  cursor: pointer;
}

.bp-focus-item:hover {
  border-color: #3b82f6;
}

.bp-focus-stage {
  width: fit-content;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-weight: 700;
}

.bp-focus-item strong {
  font-size: 13px;
  color: #111827;
}

.bp-focus-item small,
.bp-row-sub {
  font-size: 11px;
  color: #6b7280;
}

.bp-os-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.bp-os-table th,
.bp-os-table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e5e7eb;
  text-align: left;
  vertical-align: top;
}

.bp-os-table th {
  font-size: 11px;
  color: #6b7280;
  background: #f9fafb;
}

.bp-os-table tbody tr {
  cursor: pointer;
}

.bp-os-table tbody tr:hover {
  background: #f8fbff;
}

.bp-os-empty {
  padding: 16px;
  color: #6b7280;
  font-size: 13px;
  text-align: center;
  background: #f9fafb;
  border-radius: 6px;
}

/* ── 칸반 보드 ── */
.bp-kanban {
  display: flex;
  gap: 12px;
  min-height: 400px;
  padding-bottom: 16px;
}

.bp-kanban-column {
  flex: 0 0 260px;
  background: #fafbfc;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 180px);
  transition: background 0.2s;
}

.bp-kanban-column.bp-column-dragover {
  background: #dbeafe;
}

.bp-column-header {
  padding: 10px 12px;
  background: white;
  border-radius: 8px 8px 0 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 13px;
}

.bp-column-icon {
  font-size: 14px;
}

.bp-column-title {
  flex: 1;
}

.bp-column-count {
  background: #e5e7eb;
  color: #374151;
  padding: 1px 6px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

.bp-column-body {
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}

/* ── 제품 카드 ── */
.bp-card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.bp-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.bp-card-dragging {
  opacity: 0.4;
}

.bp-card-archived {
  opacity: 0.5;
  background: #f9fafb;
}

.bp-card-title {
  font-weight: 600;
  font-size: 14px;
  color: #111827;
  margin-bottom: 6px;
  word-break: keep-all;
  line-height: 1.4;
}

.bp-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 4px;
}

.bp-card-owner {
  display: inline-flex;
  align-items: center;
}

.bp-card-price {
  font-size: 11px;
  color: #374151;
  margin-top: 2px;
}

.bp-check-badge {
  display: inline-block;
  font-size: 10px;
  margin-top: 4px;
  padding: 1px 6px;
  background: #f3f4f6;
  border-radius: 10px;
}

/* ── 빈 상태 ── */
.bp-empty-state {
  padding: 60px 20px;
  text-align: center;
  color: #6b7280;
}

.bp-empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.bp-empty-state p {
  margin: 4px 0;
  line-height: 1.6;
}

.bp-empty-state .bp-dim {
  font-size: 13px;
  color: #9ca3af;
  margin-bottom: 20px;
}

/* ── 제품 진행서 전체 상세 ── */
.bp-detail-mode .bp-toolbar {
  align-items: center;
}

.bp-detail-mode .bp-view-toggle,
.bp-detail-mode .bp-toolbar-right {
  display: none;
}

.bp-detail-page {
  display: grid;
  gap: 16px;
}

.bp-detail-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* 제품 진행서 ← 목록으로 백 버튼 — 깔끔한 ghost 스타일 */
.bp-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px 7px 11px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text2);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.08s;
}
.bp-back-btn:hover {
  background: var(--surface2);
  color: var(--text);
  border-color: var(--text3);
}
.bp-back-btn:hover svg { transform: translateX(-2px); transition: transform 0.12s; }
.bp-back-btn:active { background: var(--border); transform: translateY(1px); }
.bp-back-btn svg { transition: transform 0.12s; flex-shrink: 0; }

.bp-detail-top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.bp-detail-action-btn {
  padding: 6px 12px;
  font-size: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s ease;
}
.bp-detail-action-btn:hover { background: var(--bg2); color: var(--text); }
.bp-detail-action-btn.bp-detail-action-danger {
  color: #dc2626;
  border-color: #fecaca;
  background: #fff5f5;
}
.bp-detail-action-btn.bp-detail-action-danger:hover {
  background: #fee2e2;
  border-color: #dc2626;
}

/* 아카이브 포함 체크박스 (toolbar) */
.bp-filter-archived {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: all 0.12s ease;
}
.bp-filter-archived:hover { background: var(--bg2); }
.bp-filter-archived input { margin: 0; cursor: pointer; }
.bp-filter-archived:has(input:checked) {
  background: #fef3c7;
  border-color: #fbbf24;
  color: #78350f;
  font-weight: 600;
}

.bp-detail-hero,
.bp-detail-progress,
.bp-detail-brief,
.bp-detail-card,
.bp-detail-metric {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}

.bp-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px;
}

.bp-detail-hero h3 {
  margin: 4px 0;
  font-size: 22px;
  line-height: 1.3;
  color: #111827;
}

.bp-detail-sub {
  font-size: 12px;
  color: #64748b;
}

.bp-detail-progress {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 0;
  padding: 16px 18px;
}

.bp-detail-progress-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 6px;
  color: #94a3b8;
  font-size: 11px;
  text-align: center;
}

.bp-detail-progress-step::before {
  content: '';
  position: absolute;
  top: 13px;
  left: 0;
  right: 0;
  height: 2px;
  background: #e2e8f0;
  z-index: 0;
}

.bp-detail-progress-step:first-child::before {
  left: 50%;
}

.bp-detail-progress-step:last-child::before {
  right: 50%;
}

.bp-detail-progress-step i {
  position: relative;
  z-index: 1;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 2px solid #dbe3ee;
  border-radius: 999px;
  background: #ffffff;
  color: #64748b;
  font-style: normal;
  font-weight: 800;
}

.bp-detail-progress-step.done,
.bp-detail-progress-step.current {
  color: #0f7f97;
  font-weight: 700;
}

.bp-detail-progress-step.done i,
.bp-detail-progress-step.current i {
  border-color: #0f7f97;
  background: #0f7f97;
  color: #ffffff;
}

.bp-detail-brief {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
}

.bp-detail-brief div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px 14px;
  border-right: 1px solid #e2e8f0;
}

.bp-detail-brief div:last-child {
  border-right: 0;
}

.bp-detail-brief span {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.bp-detail-brief strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bp-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.bp-detail-metric {
  display: grid;
  gap: 5px;
  padding: 12px;
}

.bp-detail-metric span {
  font-size: 11px;
  color: #64748b;
}

.bp-detail-metric strong {
  min-height: 20px;
  font-size: 15px;
  color: #0f172a;
  word-break: keep-all;
}

.bp-detail-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, .7fr);
  gap: 16px;
  align-items: start;
}

.bp-detail-main,
.bp-detail-aside {
  display: grid;
  gap: 14px;
}

.bp-detail-card {
  padding: 16px;
}

.bp-detail-card .bp-os-panel-head {
  margin-bottom: 12px;
}

.bp-context-card {
  padding: 14px;
}

.bp-detail-fold {
  border-top: 1px solid #e2e8f0;
}

.bp-detail-fold:first-of-type {
  border-top: 0;
}

.bp-detail-fold summary {
  display: grid;
  grid-template-columns: minmax(0, .72fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  min-height: 46px;
  cursor: pointer;
  list-style: none;
}

.bp-detail-fold summary::-webkit-details-marker {
  display: none;
}

.bp-detail-fold summary::after {
  content: '펼치기';
  justify-self: end;
  padding: 3px 7px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.bp-detail-fold[open] summary::after {
  content: '접기';
  color: #0f7f97;
  border-color: #a7f3d0;
  background: #ecfdf5;
}

.bp-detail-fold summary span {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.bp-detail-fold summary small {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bp-detail-fold-body {
  padding: 2px 0 14px;
}

.bp-work-rail {
  align-content: start;
}

.bp-next-action-card {
  border-top: 3px solid #0f7f97;
}

.bp-next-action-card > strong {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.35;
}

.bp-next-action-meta,
.bp-next-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.bp-next-action-meta {
  margin-bottom: 12px;
  color: #64748b;
  font-size: 12px;
}

.bp-next-action-meta span {
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
}

.bp-quick-record-card .bp-activity-form {
  padding: 0;
  border: 0;
  background: transparent;
}

.bp-activity-form-compact {
  gap: 10px;
}

.bp-activity-form-compact .bp-activity-form-row,
.bp-activity-form-compact .bp-activity-form-secondary {
  grid-template-columns: 1fr;
}

.bp-activity-form-compact textarea {
  min-height: 78px;
}

.bp-signal-list,
.bp-risk-list,
.bp-rail-recent-list {
  display: grid;
  gap: 8px;
}

.bp-work-signal,
.bp-rail-recent-item {
  display: grid;
  gap: 4px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #94a3b8;
  border-radius: 8px;
  background: #ffffff;
  text-align: left;
}

.bp-work-signal {
  cursor: pointer;
}

.bp-work-signal-empty {
  cursor: default;
  background: #f8fafc;
}

.bp-work-signal-decision { border-left-color: #10b981; }
.bp-work-signal-task { border-left-color: #3b82f6; }
.bp-work-signal-risk { border-left-color: #ef4444; }

.bp-work-signal span,
.bp-rail-recent-item span {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.bp-work-signal strong,
.bp-rail-recent-item strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bp-work-signal small,
.bp-rail-recent-item small {
  color: #94a3b8;
  font-size: 11px;
}

.bp-work-signal:not(.bp-work-signal-empty):hover,
.bp-rail-recent-item:hover {
  border-color: #bae6fd;
  background: #f8fafc;
}

.bp-risk-item {
  padding: 9px 10px;
  border: 1px solid #fde68a;
  border-left: 3px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
}

.bp-risk-empty {
  padding: 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  font-size: 12px;
}

.bp-rail-recent-card {
  min-height: 220px;
}

.bp-rail-recent-item {
  cursor: pointer;
}

.bp-detail-page .btn,
.bp-detail-page .btn-primary,
.bp-detail-page .btn-outline {
  width: auto;
}

.bp-detail-page .form-row {
  margin-bottom: 12px;
}

.bp-detail-page .form-row label {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
}

.bp-detail-page .form-row input[type="text"],
.bp-detail-page .form-row input[type="number"],
.bp-detail-page .form-row input[type="date"],
.bp-detail-page .form-row select,
.bp-detail-page .form-row textarea {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}

.bp-detail-page .form-row textarea {
  resize: vertical;
  min-height: 92px;
}

/* ── 상세 패널 (이전 우측 슬라이드, 호환용) ── */
.bp-detail-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 50%;
  min-width: 400px;
  max-width: 600px;
  background: white;
  border-left: 1px solid var(--border);
  box-shadow: -4px 0 12px rgba(0,0,0,0.05);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.2s;
  z-index: 10;
}

.bp-detail-panel.bp-detail-open {
  transform: translateX(0);
}

.bp-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: white;
  z-index: 1;
}

.bp-detail-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.bp-close-btn {
  background: transparent;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #6b7280;
  padding: 4px 8px;
  border-radius: 4px;
}

.bp-close-btn:hover {
  background: #f3f4f6;
}

.bp-detail-body {
  padding: 20px;
}

/* ── 섹션 ── */
.bp-section {
  margin-bottom: 24px;
}

.bp-section h4 {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  margin: 0 0 10px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bp-snapshot {
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
}

.bp-snapshot-type {
  font-size: 11px;
  font-weight: 700;
  color: #1a5fb4;
  margin-bottom: 3px;
}

.bp-snapshot-title {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  line-height: 1.35;
  word-break: keep-all;
}

.bp-snapshot-sub {
  font-size: 12px;
  color: #6b7280;
  margin-top: 4px;
}

.bp-snapshot-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.bp-snapshot-badges span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.bp-next-action {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid #dbeafe;
}

.bp-next-action strong {
  font-size: 11px;
  color: #6b7280;
}

.bp-next-action span {
  font-size: 13px;
  color: #111827;
}

.bp-stage-checklist {
  display: grid;
  gap: 7px;
}

.bp-stage-checklist label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 6px 8px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 12px;
  color: #374151;
}

.bp-action-section {
  padding: 12px;
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
}

.bp-action-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.bp-action-head h4 {
  margin: 0;
}

.bp-action-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.bp-action-link-btn {
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #334155;
  border-radius: 6px;
  padding: 5px 8px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.bp-action-link-btn:hover {
  border-color: #0f7f97;
  color: #0f7f97;
  background: #f0fdfa;
}

.bp-action-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}

.bp-action-description {
  margin-bottom: 12px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
}

.bp-stage-objective {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.bp-stage-objective strong {
  display: block;
  margin: 3px 0 4px;
  color: #0f172a;
  font-size: 15px;
}

.bp-stage-objective p,
.bp-completion-box p {
  margin: 0;
  color: #475569;
  font-size: 12.5px;
  line-height: 1.55;
}

.bp-execution-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(300px, .92fr);
  gap: 12px;
  align-items: start;
}

.bp-execution-panel {
  min-width: 0;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.bp-method-candidates,
.bp-selected-methods {
  display: grid;
  gap: 10px;
}

.bp-method-group {
  display: grid;
  gap: 6px;
}

.bp-method-group-title {
  color: #0f7f97;
  font-size: 11px;
  font-weight: 800;
}

.bp-method-card,
.bp-selected-method {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.12s, background 0.12s;
}

/* 통합 메서드 카드 — 상태 칩(대기/진행/안 함) */
.bp-method-card-status {
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  padding: 5px 8px;
  border-radius: 999px;
  letter-spacing: 0.3px;
  white-space: nowrap;
}
.bp-method-pending .bp-method-card-status {
  background: #f1f5f9;
  color: #64748b;
}
.bp-method-active .bp-method-card-status {
  background: #dbeafe;
  color: #1d4ed8;
}
.bp-method-skip .bp-method-card-status {
  background: #f3f4f6;
  color: #9ca3af;
}
.bp-method-active {
  border-color: #93c5fd;
  background: #eff6ff;
}
.bp-method-skip {
  border-color: #e5e7eb;
  background: #fafbfc;
  opacity: 0.78;
}
.bp-method-skip:hover { opacity: 1; }
.bp-method-card-memo {
  margin-top: 6px;
  padding: 5px 9px;
  background: rgba(255,255,255,0.7);
  border-radius: 6px;
  font-size: 11.5px;
  color: #475569;
  line-height: 1.45;
  border: 1px solid rgba(147, 197, 253, 0.4);
}

/* 체크리스트 토글 (active 카드 안에서 펼치기/접기) */
.bp-method-card-checklist {
  margin-top: 6px;
  padding: 5px 9px;
  background: rgba(255,255,255,0.7);
  border: 1px solid rgba(147, 197, 253, 0.35);
  border-radius: 6px;
  font-size: 12px;
}
.bp-method-card-checklist > summary {
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  color: #1d4ed8;
  list-style: none;
  padding: 1px 0;
}
.bp-method-card-checklist > summary::-webkit-details-marker { display: none; }
.bp-method-card-checklist > summary::before {
  content: '▸';
  display: inline-block;
  margin-right: 5px;
  transition: transform 0.12s;
  color: #64748b;
}
.bp-method-card-checklist[open] > summary::before { transform: rotate(90deg); }
.bp-method-card-checklist[open] > summary { color: #0f172a; }
.bp-method-card-checklist ul {
  margin: 6px 0 2px;
  padding-left: 22px;
  color: #334155;
  line-height: 1.55;
}
.bp-method-card-checklist li { padding: 1px 0; }

/* 메서드 실행 모달 — detail 옆 체크리스트 박스 */
.bp-method-modal-checklist {
  margin-top: 10px;
  padding: 8px 12px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 6px;
}
.bp-method-modal-checklist-title {
  font-size: 12px;
  font-weight: 700;
  color: #0369a1;
  margin-bottom: 4px;
}
.bp-method-modal-checklist ul {
  margin: 0;
  padding-left: 20px;
  font-size: 12.5px;
  color: #0f172a;
  line-height: 1.55;
}
.bp-method-modal-checklist li { padding: 1px 0; }

/* [진행] 버튼은 약간 강조, [안 함]은 잔잔 */
.bp-method-actions .bp-method-btn-go {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.bp-method-actions .bp-method-btn-go:hover {
  opacity: 0.9;
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.bp-method-actions .bp-method-btn-skip {
  color: #94a3b8;
}

.bp-action-label-hint {
  font-weight: normal;
  color: var(--text3);
  font-size: 11px;
  margin-left: 4px;
}

.bp-method-card strong,
.bp-selected-method strong {
  display: block;
  color: #0f172a;
  font-size: 12.5px;
}

.bp-method-card p,
.bp-selected-method p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 11.5px;
  line-height: 1.45;
}

.bp-method-selected {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.bp-method-actions,
.bp-selected-method-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.bp-method-actions button,
.bp-selected-method-actions button {
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #334155;
  padding: 5px 7px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.bp-method-actions button:hover,
.bp-selected-method-actions button:hover {
  border-color: #0f7f97;
  color: #0f7f97;
}

.bp-selected-empty {
  padding: 14px 10px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.55;
  text-align: center;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.bp-selected-method {
  border-left: 4px solid #94a3b8;
}

.bp-selected-todo { border-left-color: #94a3b8; }
.bp-selected-doing { border-left-color: #3b82f6; }
.bp-selected-done { border-left-color: #10b981; }
.bp-selected-hold { border-left-color: #f59e0b; }
.bp-selected-excluded { border-left-color: #ef4444; opacity: .82; }

.bp-selected-method-top {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.bp-selected-method-top span,
.bp-selected-method-top b {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10.5px;
  line-height: 1;
}

.bp-selected-method-top b {
  background: #e0f2fe;
  color: #0369a1;
}

.bp-execution-checklist {
  margin-top: 12px;
}

.bp-method-checklist {
  padding: 10px 0;
  border-top: 1px solid #e2e8f0;
}

.bp-method-checklist:first-of-type {
  border-top: 0;
}

.bp-method-checklist-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.bp-method-checklist-title span {
  flex: 0 0 auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 10.5px;
  font-weight: 700;
}

.bp-method-checklist-title strong {
  color: #0f172a;
  font-size: 12.5px;
}

.bp-method-checklist ul {
  margin: 0;
  padding-left: 18px;
  color: #475569;
  font-size: 12px;
  line-height: 1.65;
}

.bp-completion-box {
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #d9f99d;
  border-radius: 8px;
  background: #f7fee7;
}

.bp-method-modal-head {
  margin: 8px 0 14px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.bp-method-modal-head span {
  display: inline-flex;
  margin-bottom: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 700;
}

.bp-method-modal-head strong {
  display: block;
  color: #0f172a;
}

.bp-method-modal-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.bp-method-choice-block {
  margin-bottom: 12px;
}

.bp-method-choice-buttons {
  display: flex;
  gap: 8px;
}
.bp-method-choice-buttons button { flex: 1 1 0; }

.bp-method-choice-buttons button {
  min-height: 42px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.bp-method-choice-buttons button:hover,
.bp-method-choice-buttons button.active {
  border-color: #0f7f97;
  background: #e6fffb;
  color: #0f7f97;
}

.bp-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.bp-action-block {
  margin-top: 8px;
}

.bp-action-label {
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 6px;
}

.bp-action-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bp-action-chip,
.bp-action-row-btn {
  border: 1px solid #bfdbfe;
  background: #ffffff;
  color: #1e3a8a;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11.5px;
  cursor: pointer;
  text-align: left;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bp-action-chip:hover,
.bp-action-row-btn:hover {
  background: #eff6ff;
  border-color: #3b82f6;
}

.bp-action-chip:disabled,
.bp-action-row-btn:disabled {
  opacity: .45;
  cursor: default;
}

.bp-action-choice {
  border-color: #a7f3d0;
  color: #047857;
}

.bp-action-task {
  border-color: #bfdbfe;
  color: #1d4ed8;
}

.bp-action-record {
  border-color: #fed7aa;
  color: #c2410c;
}

.bp-action-choice:hover { background: #ecfdf5; border-color: #10b981; }
.bp-action-task:hover { background: #eff6ff; border-color: #3b82f6; }
.bp-action-record:hover { background: #fff7ed; border-color: #f97316; }

.bp-action-chip.bp-action-done,
.bp-action-row-btn.bp-action-done,
.bp-action-chip.bp-action-done:disabled,
.bp-action-row-btn.bp-action-done:disabled {
  opacity: 1;
  cursor: pointer;
  background: #ecfdf5;
  border-color: #10b981;
  color: #065f46;
}

.bp-action-done b {
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: #10b981;
  color: #ffffff;
  font-size: 10px;
  line-height: 1.5;
}

.bp-action-list {
  display: grid;
  gap: 6px;
}

.bp-action-row-btn {
  width: 100%;
  border-radius: 6px;
  line-height: 1.35;
}

.bp-action-note {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
  color: #64748b;
  font-size: 11px;
}

.bp-stage-work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, .7fr);
  gap: 14px;
  align-items: stretch;
}

.bp-stage-work-single {
  grid-template-columns: 1fr;
}

.bp-stage-work-grid .bp-action-section {
  margin-bottom: 0;
}

.bp-stage-check-card {
  margin-bottom: 0;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #dbe3ee;
  border-radius: 8px;
}

/* ── 폼 ── */
.bp-detail-panel .form-row {
  margin-bottom: 12px;
}

.bp-detail-panel .form-row label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.bp-detail-panel .form-row input[type="text"],
.bp-detail-panel .form-row input[type="number"],
.bp-detail-panel .form-row select,
.bp-detail-panel .form-row textarea {
  width: 100%;
  padding: 6px 10px;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  font-size: 13px;
  font-family: inherit;
  box-sizing: border-box;
}

.bp-detail-panel .form-row textarea {
  resize: vertical;
  min-height: 80px;
}

.form-row-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* ── 메타 ── */
.bp-detail-meta {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
  font-size: 11px;
  color: #9ca3af;
  line-height: 1.6;
}

.bp-archived-tag {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 10px;
  font-weight: 500;
}

/* ── 액션 ── */
.bp-detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── 모달 ── */
.bp-modal {
  max-width: 480px;
  width: 92%;
}

.bp-modal h3 {
  margin: 0 0 16px 0;
  font-size: 18px;
}

.bp-modal .form-row {
  margin-bottom: 12px;
}

.bp-modal .form-row label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: #374151;
  margin-bottom: 4px;
}

.bp-modal .form-row input,
.bp-modal .form-row select,
.bp-modal .form-row textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
  box-sizing: border-box;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.12s;
}
.bp-modal .form-row input:focus,
.bp-modal .form-row select:focus,
.bp-modal .form-row textarea:focus {
  border-color: var(--accent);
}
.bp-modal .form-row textarea {
  resize: vertical;
  min-height: 80px;
}
.bp-modal .form-row textarea::placeholder,
.bp-modal .form-row input::placeholder {
  color: var(--text3);
}

.bp-hint {
  font-size: 12px;
  color: #9ca3af;
  margin: 12px 0;
  line-height: 1.5;
}

.bp-modal .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #f3f4f6;
}

/* 모달 안 버튼 통일 — auth.css의 .btn-primary{width:100%}를 무력화하고
   취소/저장이 한 줄에 균형 잡힌 형태로 보이게 함 */
.bp-modal .modal-actions .btn,
.bp-modal .modal-actions .btn-primary,
.bp-modal .modal-actions .btn-outline {
  width: auto;
  min-width: 80px;
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.12s, background 0.12s, border-color 0.12s;
}
.bp-modal .modal-actions .btn-primary {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  flex: 1;
}
.bp-modal .modal-actions .btn-primary:hover { opacity: 0.9; }
.bp-modal .modal-actions .btn-outline {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border);
}
.bp-modal .modal-actions .btn-outline:hover {
  background: var(--surface2);
  border-color: var(--text3);
  color: var(--text);
}

/* ── 리스트 뷰 ── */
.bp-list-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.bp-list-table thead th {
  padding: 10px 12px;
  text-align: left;
  background: #f9fafb;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  user-select: none;
}

.bp-list-table thead th:hover {
  background: #f3f4f6;
}

.bp-list-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  cursor: pointer;
}

.bp-list-table tbody tr:hover {
  background: #f9fafb;
}

.bp-list-table tbody td {
  padding: 10px 12px;
  vertical-align: middle;
}

.bp-list-stage-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 500;
}

/* ── 유틸리티 ── */
.bp-dim {
  color: #9ca3af;
}

/* ── 반응형 ── */
@media (max-width: 1100px) {
  .bp-detail-panel {
    width: 70%;
  }
}

@media (max-width: 900px) {
  .bp-toolbar {
    gap: 8px;
  }
  .bp-search {
    width: 100%;
    flex: 1 1 100%;
  }
  .bp-kanban-column {
    flex: 0 0 220px;
  }
  .bp-detail-panel {
    width: 100%;
    min-width: 0;
    max-width: none;
  }
  .form-row-pair {
    grid-template-columns: 1fr;
  }
}

/* ═══════════════════════════════════════════════════════════ */
/* BNT 프로젝트 — Phase 2: AI 프롬프트 실행 섹션               */
/* ═══════════════════════════════════════════════════════════ */

/* AI 프롬프트 카드 리스트 */
.bp-ai-section .bp-ai-count,
.bp-ai-logs-section .bp-ai-count {
  font-weight: normal;
  color: #9ca3af;
  font-size: 11px;
  margin-left: 6px;
}

.bp-ai-prompt-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.bp-ai-prompt-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 6px;
}

.bp-ai-prompt-titles {
  flex: 1;
  min-width: 0;
  line-height: 1.4;
}

.bp-ai-prompt-parent {
  font-size: 10.5px;
  color: #92400e;
  font-weight: 600;
  margin-bottom: 2px;
}

.bp-ai-prompt-title {
  font-size: 12.5px;
  color: #1f2937;
  word-break: keep-all;
}

.bp-ai-prompt-card .btn {
  flex-shrink: 0;
  width: auto;
  white-space: nowrap;
}

/* auth.css의 .btn-primary{width:100%} 전역 규칙을 프로젝트 상세 패널 내에서 보정 */
.bp-detail-panel .btn,
.bp-detail-panel .btn-primary,
.bp-detail-panel .btn-outline {
  width: auto;
}

/* AI 로그 리스트 */
.bp-ai-logs-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.bp-ai-log-entry {
  padding: 8px 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.12s;
}

.bp-ai-log-entry:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.bp-ai-log-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 12px;
}

.bp-ai-log-status { flex-shrink: 0; }

.bp-ai-log-title {
  flex: 1;
  font-weight: 600;
  color: #111827;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bp-ai-log-date {
  flex-shrink: 0;
  font-size: 11px;
  color: #9ca3af;
  font-family: 'SF Mono', Consolas, monospace;
}

.bp-ai-log-preview {
  font-size: 11.5px;
  color: #6b7280;
  line-height: 1.5;
  overflow: hidden;
}

.bp-ai-log-preview.bp-ai-log-error {
  color: #b91c1c;
}

/* 팀 활동 강조 영역 — 슬림 인라인 배너 (Phase C).
   기존 큰 3카드(grid 3열, min-height 84px)에서 한 줄짜리 dot+라벨+제목 배너로 압축.
   화면 좁으면 wrap 허용. 각 항목 클릭 시 bpFocusActivity로 해당 카드 점프. */
.bp-activity-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
  margin-bottom: 12px;
  padding: 8px 10px;
  border: 1px solid #eef2f7;
  border-radius: 8px;
  background: #fafbfc;
}

.bp-activity-summary-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding: 4px 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.3;
  color: #111827;
  text-align: left;
  cursor: pointer;
  flex: 1 1 200px;
}

.bp-activity-summary-item.bp-activity-summary-empty {
  cursor: default;
  opacity: 0.55;
}

.bp-activity-summary-item:not(.bp-activity-summary-empty):hover {
  background: #ffffff;
  box-shadow: 0 0 0 1px #e5e7eb;
}

.bp-activity-summary-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
}

.bp-activity-summary-decision .bp-activity-summary-dot { background: #10b981; }
.bp-activity-summary-task .bp-activity-summary-dot { background: #3b82f6; }
.bp-activity-summary-risk .bp-activity-summary-dot { background: #ef4444; }

.bp-activity-summary-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: #6b7280;
}

.bp-activity-summary-body {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12.5px;
  font-weight: 600;
  color: #111827;
}

.bp-activity-summary-meta {
  flex-shrink: 0;
  font-size: 10.5px;
  color: #9ca3af;
}

.bp-activity-form {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  gap: 8px;
  align-items: stretch;
  margin-bottom: 10px;
}

.bp-activity-form select,
.bp-activity-form textarea {
  border: 1px solid #d1d5db;
  border-radius: 6px;
  font-size: 12px;
  padding: 7px 8px;
}

.bp-activity-form textarea {
  min-height: 64px;
  resize: vertical;
}

.bp-activity-form-structured {
  display: grid;
  grid-template-columns: 1fr;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.bp-activity-form-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 8px;
}

.bp-activity-form-secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bp-activity-form-row label {
  display: grid;
  gap: 4px;
  margin: 0;
}

.bp-activity-form-row label span,
.bp-activity-decision-row > span {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
}

.bp-activity-form-row input,
.bp-activity-form-row select,
.bp-activity-form-structured textarea {
  min-height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  font-size: 12px;
  padding: 7px 8px;
  box-sizing: border-box;
}

.bp-activity-form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.bp-activity-form-actions span {
  font-size: 11px;
  color: #64748b;
}

.bp-activity-decision-row {
  display: grid;
  gap: 6px;
}

.bp-activity-decision-row[hidden] {
  display: none !important;
}

.bp-activity-decision-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.bp-activity-decision-buttons button {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #ffffff;
  color: #1d4ed8;
  padding: 5px 10px;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.bp-activity-decision-buttons button:hover,
.bp-activity-decision-buttons button.active {
  border-color: #0f7f97;
  background: #0f7f97;
  color: #ffffff;
}

.bp-activity-list {
  position: relative;
  display: grid;
  gap: 0;
  padding-left: 18px;
}

.bp-activity-list::before {
  content: '';
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 6px;
  width: 1px;
  background: #dbe3ee;
}

.bp-activity-stage-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 8px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
}

.bp-activity-stage-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  background: #ffffff;
  color: #4b5563;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.bp-activity-stage-tab b {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 10px;
  text-align: center;
}

.bp-activity-stage-tab:hover {
  border-color: #60a5fa;
  background: #eff6ff;
  color: #1d4ed8;
}

.bp-activity-stage-tab.active {
  border-color: #0f7f97;
  background: #0f7f97;
  color: #ffffff;
}

.bp-activity-stage-tab.active b {
  background: rgba(255, 255, 255, .22);
  color: #ffffff;
}

.bp-activity-timeline-title {
  margin: 16px 0 8px;
  font-size: 13px;
  font-weight: 700;
  color: #111827;
}

/* 활동기록 그룹: 원 기록 + 후속들을 한 묶음으로 시각화 */
.bp-activity-group {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 4px;
}

.bp-activity-group + .bp-activity-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #d1d5db;
}

/* 원 기록 카드 — 흰 배경, 강조된 카드 느낌 */
.bp-activity-item {
  position: relative;
  padding: 14px 14px 14px 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-bottom: 1px solid #e5e7eb;
  border-radius: 8px;
}

/* 그룹 안에서 첫 카드(원 기록) → 라운드/보더 통일 */
.bp-activity-group > .bp-activity-item:first-child {
  border-radius: 8px 8px 8px 8px;
}

/* (의미 없는 빈 원 ::before 제거. 종류는 칩으로 구분) */

/* 후속 기록 = 댓글 스타일 — 들여쓰기 + 회색 배경 + 좌측 강조선
 * 원 기록 카드와 시각적으로 분명히 구분되도록 강화 (margin/배경/보더). */
.bp-activity-followup {
  margin-left: 32px;
  margin-top: 6px;
  padding: 12px 14px 12px 16px;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #94a3b8;
  border-radius: 0 8px 8px 0;
  font-size: 13.5px;
}

/* 후속 카드 안의 제목은 살짝 작게 */
.bp-activity-followup .bp-activity-title {
  font-size: 14px;
}

/* 후속 → 후속이 연달아 올 때 위 마진 조금 줄여 흐름 자연스럽게 */
.bp-activity-followup + .bp-activity-followup {
  margin-top: 4px;
}

.bp-activity-highlight {
  animation: bpActivityPulse 1.25s ease-out;
}

@keyframes bpActivityPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, .42);
    border-color: #10b981;
  }
  100% {
    box-shadow: 0 0 0 12px rgba(16, 185, 129, 0);
  }
}

.bp-activity-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
}

.bp-activity-heading {
  min-width: 0;
}

.bp-activity-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 5px;
  font-size: 11px;
  color: #64748b;
}

.bp-activity-kicker span {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f8fafc;
  font-weight: 700;
  color: #64748b;
}

.bp-activity-title {
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
  color: #0f172a;
  word-break: keep-all;
}

.bp-activity-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 8px;
}

.bp-activity-fields span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: #f1f5f9;
  color: #334155;
}

.bp-activity-fields b {
  color: #64748b;
  font-weight: 700;
}

.bp-activity-parent-link {
  display: inline-flex;
  max-width: 100%;
  margin: 2px 0 8px;
  border: 0;
  background: transparent;
  color: #0f7f97;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bp-activity-parent-link:hover {
  text-decoration: underline;
}

.bp-activity-body {
  max-width: 760px;
  margin-top: 8px;
  padding: 0;
  border: 0;
  font-size: 13px;
  line-height: 1.7;
  color: #334155;
  white-space: normal;
}

.bp-activity-footer {
  margin-top: 10px;
  font-size: 11.5px;
  color: #94a3b8;
}

.bp-activity-actions {
  display: inline-flex;
  gap: 4px;
  opacity: .35;
  transition: opacity .15s ease;
}

.bp-activity-item:hover .bp-activity-actions {
  opacity: 1;
}

.bp-activity-actions button {
  border: 0;
  background: transparent;
  color: #64748b;
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.bp-activity-actions button:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.bp-activity-unavailable {
  padding: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  color: #92400e;
  font-size: 12px;
  line-height: 1.5;
}

/* ────────────────────────────────────────────────────────────
   자동 활동 로그 — 시스템이 작성한 stage_transition 등은 inline
   한 줄로 강등. 칩·버튼·구조 메타 모두 없음.
   ──────────────────────────────────────────────────────────── */
.bp-activity-auto-item {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 14px;
  font-size: 11.5px;
  color: #94a3b8;
  border-bottom: 1px solid #f3f4f6;
  line-height: 1.5;
}
.bp-activity-auto-item:hover {
  background: #fafbfc;
}
.bp-activity-auto-tag {
  flex-shrink: 0;
  padding: 1px 7px;
  background: #f1f5f9;
  border-radius: 999px;
  color: #64748b;
  font-weight: 600;
  font-size: 10.5px;
}
.bp-activity-auto-title {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475569;
}
.bp-activity-auto-meta {
  flex-shrink: 0;
  font-size: 10.5px;
  color: #94a3b8;
}

/* 수동 활동 카드의 칩 단순화 (1개만 강조, 나머지는 작은 텍스트) */
.bp-activity-kicker .bp-activity-type-chip {
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 700;
}

/* 활동 타입별 칩 색상 — 회의/결정/이슈 */
.bp-activity-meeting .bp-activity-type-chip {
  background: #ede9fe;
  color: #6d28d9;
}
.bp-activity-decision .bp-activity-type-chip {
  background: #d1fae5;
  color: #065f46;
}
.bp-activity-risk .bp-activity-type-chip {
  background: #fee2e2;
  color: #b91c1c;
}
.bp-activity-kicker .bp-activity-stage-tag {
  background: transparent;
  padding: 1px 4px;
  font-weight: 500;
  color: #94a3b8;
}
.bp-activity-kicker .bp-activity-followup-tag {
  background: #fef3c7;
  color: #92400e;
}

/* "⋯" 더보기 메뉴 (수정/삭제 숨김 처리) */
.bp-activity-menu-wrap {
  position: relative;
}
.bp-activity-menu-btn {
  font-size: 16px;
  line-height: 1;
  padding: 4px 8px;
}
.bp-activity-menu {
  position: absolute;
  top: 28px;
  right: 0;
  z-index: 10;
  display: flex;
  flex-direction: column;
  min-width: 100px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}
.bp-activity-menu[hidden] { display: none; }
.bp-activity-menu button {
  background: transparent;
  border: 0;
  padding: 8px 14px;
  text-align: left;
  font-size: 12px;
  cursor: pointer;
  color: #334155;
  font-weight: 500;
}
.bp-activity-menu button:hover {
  background: #f1f5f9;
}
.bp-activity-menu .bp-activity-menu-delete {
  color: #dc2626;
}
.bp-activity-menu .bp-activity-menu-delete:hover {
  background: #fee2e2;
}

/* 헤더의 제품명 — 클릭해서 인라인 편집 (contenteditable) */
.bp-hero-title-edit {
  display: inline-block;
  margin: 0;
  padding: 2px 6px;
  border: 1px dashed transparent;
  border-radius: 6px;
  outline: none;
  transition: border-color 0.12s, background 0.12s;
  cursor: text;
  word-break: break-word;
}
.bp-hero-title-edit[contenteditable="true"]:hover {
  border-color: var(--border);
  background: var(--surface2);
}
.bp-hero-title-edit[contenteditable="true"]:focus {
  border-color: var(--accent);
  border-style: solid;
  background: var(--surface);
}

/* 보조 정보 자동 저장 인디케이터 (저장 버튼 자리) */
.bp-autosave-indicator {
  font-size: 11.5px;
  color: var(--text3);
  padding: 6px 10px;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
  font-weight: 500;
}
.bp-autosave-indicator[data-state="saving"] {
  color: var(--text2);
  background: var(--surface2);
}
.bp-autosave-indicator[data-state="saved"] {
  color: #059669;
  background: #ecfdf5;
}
.bp-autosave-indicator[data-state="error"] {
  color: #dc2626;
  background: #fee2e2;
}

/* 후속 메인 버튼만 좀 더 도드라지게 */
.bp-activity-actions .bp-activity-followup-btn {
  background: #f0f9ff;
  color: #0369a1;
}
.bp-activity-actions .bp-activity-followup-btn:hover {
  background: #e0f2fe;
  color: #075985;
}

@media (max-width: 1100px) {
  .bp-detail-page-grid,
  .bp-os-metrics {
    grid-template-columns: 1fr;
  }
  .bp-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bp-detail-brief {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .bp-detail-brief div {
    border-bottom: 1px solid #e2e8f0;
  }
  .bp-detail-brief div:nth-child(2n) {
    border-right: 0;
  }
  .bp-detail-progress {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .bp-os-grid,
  .bp-pipeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .bp-detail-hero,
  .bp-detail-topbar {
    align-items: flex-start;
    flex-direction: column;
  }
  .bp-detail-metrics,
  .bp-detail-brief,
  .bp-detail-progress,
  .bp-stage-work-grid,
  .bp-execution-layout,
  .bp-method-card,
  .bp-selected-method,
  .bp-activity-form-row,
  .bp-activity-form-secondary {
    grid-template-columns: 1fr;
  }
  .bp-os-hero {
    align-items: flex-start;
    flex-direction: column;
  }
  .bp-os-hero-actions,
  .bp-activity-form {
    width: 100%;
    grid-template-columns: 1fr;
  }
  .bp-action-head {
    align-items: flex-start;
    flex-direction: column;
  }
  .bp-action-links {
    justify-content: flex-start;
  }
  .bp-method-choice-buttons {
    grid-template-columns: 1fr;
  }
  .bp-activity-summary {
    flex-direction: column;
    gap: 6px;
  }
  .bp-activity-summary-item {
    flex: 1 1 auto;
  }
  .bp-activity-actions {
    justify-content: flex-end;
  }
  .bp-action-grid {
    grid-template-columns: 1fr;
  }
}

/* 프롬프트 실행 확인 모달 */
.bp-run-modal {
  width: min(760px, 94vw);
  max-width: none;
}

.bp-run-modal textarea {
  font-family: 'SF Mono', Consolas, 'Noto Sans KR', monospace;
  font-size: 12px;
  line-height: 1.55;
  min-height: 260px;
  resize: vertical;
}

.bp-run-meta {
  font-size: 11px;
  color: #6b7280;
  margin: 10px 0 6px;
}

/* 로그 결과 보기 모달 */
.bp-log-modal {
  width: min(760px, 94vw);
  max-width: none;
}

.bp-log-head { margin-bottom: 10px; }

.bp-log-head h3 { margin: 0 0 4px 0; }

.bp-log-meta-line {
  font-size: 11px;
  color: #9ca3af;
  font-family: 'SF Mono', Consolas, monospace;
}

.bp-log-result-body {
  max-height: 58vh;
  overflow-y: auto;
  padding: 14px 16px;
  background: #fafafa;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13.5px;
  line-height: 1.75;
  margin-bottom: 12px;
}

/* bmRenderMarkdown 출력물에 맞춘 스타일 */
.bp-log-result-body h2,
.bp-log-result-body h3,
.bp-log-result-body h4 {
  margin: 14px 0 8px;
}

.bp-log-result-body table.bm-table {
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0;
  font-size: 12.5px;
}

.bp-log-result-body table.bm-table th,
.bp-log-result-body table.bm-table td {
  border: 1px solid #d1d5db;
  padding: 5px 9px;
  text-align: left;
  vertical-align: top;
}

.bp-log-result-body table.bm-table th { background: #f3f4f6; font-weight: 600; }

.bp-log-result-body pre.bm-code {
  background: #1f2937;
  color: #e5e7eb;
  padding: 10px 12px;
  border-radius: 5px;
  overflow-x: auto;
  font-size: 11.5px;
  line-height: 1.5;
  margin: 8px 0;
}

.bp-log-result-body code {
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 12px;
  font-family: 'SF Mono', Consolas, monospace;
}

.bp-log-result-body pre.bm-code code {
  background: transparent;
  padding: 0;
}

.bp-log-prompt-detail {
  margin-top: 8px;
  font-size: 12px;
}

.bp-log-prompt-detail summary {
  cursor: pointer;
  color: #6b7280;
  padding: 4px 0;
}

.bp-log-prompt-detail summary:hover { color: #374151; }

.bp-log-prompt-text {
  margin: 6px 0 0;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 5px;
  font-size: 11.5px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 220px;
  overflow-y: auto;
}

/* ── BNT 프로젝트: 정보탭 대표이미지 + 첨부파일 ───────── */
.bp-cover-row {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}
.bp-cover-slot {
  position: relative;
  width: 180px;
  height: 180px;
  flex-shrink: 0;
  border: 1.5px dashed var(--border);
  border-radius: 8px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
}
.bp-cover-slot:focus,
.bp-cover-slot:hover {
  border-color: var(--accent, #2563eb);
  background: #f1f5f9;
}
.bp-cover-slot.has-cover {
  border-style: solid;
  border-color: var(--border);
  background: #ffffff;
}
.bp-cover-slot[data-uploading] { opacity: 0.6; pointer-events: none; }
.bp-cover-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
}
.bp-cover-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text3, #94a3b8);
  font-size: 12px;
  text-align: center;
  padding: 8px;
}
.bp-cover-empty-icon { font-size: 28px; opacity: 0.7; }
.bp-cover-empty small {
  font-size: 11px;
  color: var(--text3, #94a3b8);
  line-height: 1.4;
}
.bp-cover-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: rgba(15, 23, 42, 0.7);
  color: #ffffff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.bp-cover-remove:hover { background: rgba(220, 38, 38, 0.9); }
.bp-cover-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-top: 4px;
}
.bp-cover-controls .btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  align-self: flex-start;
}
.bp-cover-hint {
  font-size: 11.5px;
  color: var(--text3, #94a3b8);
  line-height: 1.5;
  max-width: 280px;
}

.bp-proj-attach-block {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 4px;
}
.bp-proj-attach-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text2, #475569);
}
.bp-proj-attach-head .btn-sm {
  padding: 4px 10px;
  font-size: 12px;
}
.bp-proj-attach-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bp-proj-attach-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
}
.bp-proj-attach-icon { font-size: 16px; flex-shrink: 0; }
.bp-proj-attach-name {
  flex: 1;
  min-width: 0;
  color: var(--text1, #1e293b);
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bp-proj-attach-name:hover { color: var(--accent, #2563eb); text-decoration: underline; }
.bp-proj-attach-meta {
  flex-shrink: 0;
  font-size: 11.5px;
  color: var(--text3, #94a3b8);
}
.bp-proj-attach-remove {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text3, #94a3b8);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.bp-proj-attach-remove:hover { background: #fee2e2; color: #b91c1c; }
.bp-proj-attach-empty {
  font-size: 12.5px;
  color: var(--text3, #94a3b8);
  padding: 8px 4px;
  font-style: italic;
}

@media (max-width: 720px) {
  .bp-cover-row { flex-direction: column; }
  .bp-cover-slot { width: 100%; height: 220px; }
  .bp-cover-hint { max-width: none; }
}

/* ── 인라인 썸네일 (focus list / 운영 테이블) ───────── */
.bnt-thumb-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  font-weight: 600;
  background: #f1f5f9;
  vertical-align: middle;
}
.bnt-thumb-inline img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* ── 다가오는 마감 (현황 패널) ───────── */
.bp-deadline-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
  flex-wrap: wrap;
}
.bp-deadline-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 6px 6px 0 0;
  font-size: 12.5px;
  color: var(--text2, #475569);
  cursor: pointer;
  font-weight: 500;
  transition: background 0.12s;
}
.bp-deadline-tab:hover { background: #f1f5f9; }
.bp-deadline-tab.is-active {
  color: var(--accent, #2563eb);
  border-color: var(--border);
  border-bottom-color: transparent;
  background: #ffffff;
  position: relative;
  margin-bottom: -1px;
  font-weight: 600;
}
.bp-deadline-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  padding: 0 5px;
  height: 18px;
  border-radius: 9px;
  background: #e2e8f0;
  color: var(--text2, #475569);
  font-size: 10.5px;
  font-weight: 700;
}
.bp-deadline-tab.is-active .bp-deadline-tab-count {
  background: rgba(37, 99, 235, 0.15);
  color: var(--accent, #2563eb);
}
.bp-deadline-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bp-deadline-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 8px;
  text-align: left;
  cursor: pointer;
  width: 100%;
  transition: box-shadow 0.12s, border-color 0.12s;
}
.bp-deadline-item:hover {
  border-color: var(--accent, #2563eb);
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.06);
}
.bp-deadline-item.bp-deadline-overdue { border-left: 3px solid #dc2626; }
.bp-deadline-item.bp-deadline-today { border-left: 3px solid #f59e0b; }
.bp-deadline-item.bp-deadline-urgent { border-left: 3px solid #f59e0b; }
.bp-deadline-item.bp-deadline-soon { border-left: 3px solid #facc15; }
.bp-deadline-item.bp-deadline-normal { border-left: 3px solid #94a3b8; }

.bp-deadline-dday {
  flex-shrink: 0;
  min-width: 64px;
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
  text-align: center;
  background: #f1f5f9;
  color: var(--text2, #475569);
}
.bp-deadline-dday-overdue { background: #fee2e2; color: #b91c1c; }
.bp-deadline-dday-today { background: #fef3c7; color: #b45309; }
.bp-deadline-dday-urgent { background: #fef3c7; color: #b45309; }
.bp-deadline-dday-soon { background: #fef9c3; color: #92400e; }

.bp-deadline-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.bp-deadline-text strong {
  font-weight: 600;
  color: #1e293b;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bp-deadline-title {
  font-size: 12.5px;
  color: var(--text2, #475569);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bp-deadline-meta {
  font-size: 11.5px;
  color: var(--text3, #94a3b8);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.bp-deadline-kind {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.bp-deadline-kind-deadline {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}
.bp-deadline-kind-review {
  background: rgba(234, 88, 12, 0.12);
  color: #c2410c;
}
.bp-deadline-kind-next_review {
  background: rgba(22, 163, 74, 0.12);
  color: #15803d;
}
.bp-deadline-complete {
  flex-shrink: 0;
  padding: 5px 12px;
  border-radius: 14px;
  border: 1.5px solid var(--border);
  background: #ffffff;
  color: var(--text2, #475569);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.5px;
  line-height: 1;
  transition: background 0.12s, color 0.12s, border-color 0.12s, transform 0.12s;
  white-space: nowrap;
}
.bp-deadline-complete:hover {
  background: #16a34a;
  border-color: #16a34a;
  color: #ffffff;
}
.bp-deadline-complete:active { transform: scale(0.96); }

.bp-deadline-more {
  margin-top: 8px;
  width: 100%;
  padding: 8px;
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--accent, #2563eb);
  font-size: 12.5px;
  font-weight: 600;
}
.bp-deadline-more:hover { background: #f1f5f9; }

/* ── @멘션 칩 (저장된 활동기록 본문) ───────── */
.bp-mention {
  display: inline;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.92em;
  white-space: nowrap;
  cursor: help;
}
.bp-mention-resolved {
  background: rgba(37, 99, 235, 0.12);
  color: #1d4ed8;
}
.bp-mention-resolved:hover { background: rgba(37, 99, 235, 0.2); }
.bp-mention-unresolved {
  background: #f1f5f9;
  color: #94a3b8;
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

/* ── @멘션 자동완성 드롭다운 + 인디케이터 ───────── */
.bp-mention-dropdown {
  display: none;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.18);
  z-index: 1100;
  max-height: 280px;
  overflow-y: auto;
  padding: 4px;
}
.bp-mention-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  user-select: none;
}
.bp-mention-item:hover,
.bp-mention-item.is-selected {
  background: rgba(37, 99, 235, 0.1);
}
.bp-mention-item-name {
  font-weight: 600;
  color: #1e293b;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bp-mention-item-email {
  font-size: 11.5px;
  color: var(--text3, #94a3b8);
  flex-shrink: 0;
}
.bp-mention-indicator {
  font-size: 11.5px;
  color: var(--text2, #475569);
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.25);
  padding: 4px 10px;
  border-radius: 6px;
  margin-top: 6px;
  margin-bottom: 6px;
  line-height: 1.5;
}
.bp-mention-indicator b { color: #1e293b; font-weight: 600; }
.bp-mention-indicator[hidden] { display: none; }

/* ── BNT 알림 (헤더 벨 + 드롭다운) ───────── */
.bn-notif-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 50%;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text2, #475569);
  padding: 0;
  transition: background 0.15s, color 0.15s;
}
.bn-notif-btn:hover { background: #f1f5f9; color: var(--accent, #2563eb); }
.bn-notif-btn[hidden] { display: none !important; }
.bn-notif-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #ef4444;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border: 2px solid #ffffff;
  pointer-events: none;
}
.pn-header { position: relative; }
.bn-notif-dropdown {
  position: fixed;
  width: 340px;
  max-height: 480px;
  overflow-y: auto;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.18);
  z-index: 9990; /* 메인 컨텐츠 카드 위로 (토스트 9998 / 라이트박스 9999 아래) */
}
.bn-notif-dropdown[hidden] { display: none; }
.bn-notif-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 1;
}
.bn-notif-head b { color: #ef4444; margin-left: 2px; }
.bn-notif-head button {
  border: none;
  background: transparent;
  color: var(--accent, #2563eb);
  cursor: pointer;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
}
.bn-notif-head button:hover { background: rgba(37, 99, 235, 0.08); }
.bn-notif-list { padding: 4px 0; }
.bn-notif-item {
  display: flex;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  font-size: 12.5px;
  transition: background 0.12s;
}
.bn-notif-item:last-child { border-bottom: none; }
.bn-notif-item:hover { background: #f8fafc; }
.bn-notif-item-unread { background: rgba(37, 99, 235, 0.04); }
.bn-notif-item-unread .bn-notif-title { font-weight: 700; color: #1e293b; }
.bn-notif-icon { font-size: 16px; flex-shrink: 0; line-height: 1.2; }
.bn-notif-text { flex: 1; min-width: 0; }
.bn-notif-title {
  font-weight: 600;
  color: #334155;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bn-notif-body {
  color: var(--text2, #475569);
  font-size: 12px;
  line-height: 1.4;
  margin-bottom: 4px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.bn-notif-meta { font-size: 11px; color: var(--text3, #94a3b8); }
.bn-notif-empty {
  padding: 24px 16px;
  text-align: center;
  color: var(--text3, #94a3b8);
  font-size: 13px;
}

.bp-search-match-badge {
  display: inline-block;
  margin-left: 4px;
  font-size: 11px;
  vertical-align: middle;
  cursor: pointer;
  opacity: 0.8;
  background: transparent;
  border: 0;
  padding: 0;
  line-height: 1;
}
.bp-search-match-badge:hover { opacity: 1; }
.bp-search-match-badge:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-radius: 2px; }

/* 검색 매칭 활동 — 상세 패널에서 노란 좌측 바로 표시 */
.bp-activity-search-match {
  position: relative;
  background: rgba(250, 204, 21, 0.06);
}
.bp-activity-search-match::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: #facc15;
  border-radius: 3px 0 0 3px;
}

/* 검색 매칭 팝오버 (badge 클릭 시) */
.bp-search-popover {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  padding: 6px;
}
.bp-search-popover-head {
  font-size: 11px;
  color: var(--text2);
  padding: 4px 10px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}
.bp-search-popover-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
}
.bp-search-popover-item + .bp-search-popover-item { border-top: 1px solid var(--border); border-radius: 0; }
.bp-search-popover-item:hover { background: var(--surface2); }
.bp-search-popover-meta { font-size: 11px; color: var(--text3); }
.bp-search-popover-title { font-size: 13px; font-weight: 600; margin: 2px 0; color: var(--text1); }
.bp-search-popover-snippet { font-size: 12px; color: var(--text2); line-height: 1.4; }

/* 상세 패널 안 검색 네비게이터 */
.bp-search-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(250, 204, 21, 0.08);
  border: 1px solid #fde68a;
  border-radius: 6px;
  margin-bottom: 10px;
  font-size: 12px;
}
.bp-search-nav-label { flex: 1; color: var(--text2); }
.bp-search-nav-label b { color: var(--text1); }
.bp-search-nav-btn {
  font-size: 12px;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
}
.bp-search-nav-btn:hover { background: var(--surface2); }

.bnt-thumb-md { width: 40px; height: 40px; font-size: 16px; }
.bnt-thumb-sm { width: 32px; height: 32px; font-size: 13px; }
.bnt-thumb-placeholder {
  border: 1px solid var(--border);
  letter-spacing: -0.5px;
}

/* focus list 항목 안에서 텍스트 묶음 */
.bp-focus-item {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bp-focus-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
  text-align: left;
}
.bp-focus-text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 운영 테이블 제품 셀 안에서 썸네일 + 텍스트 묶음 */
.bp-row-product {
  display: flex;
  align-items: center;
  gap: 10px;
}
.bp-row-product-text { min-width: 0; flex: 1; }
.bp-row-product-text strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── BNT 프로젝트 AI 통합 (bnt-projects-ai.js) ───────────────────── */

/* 활동 모달 — 본문 textarea 아래 AI 제안 칩 컨테이너 */
.bp-ai-suggest {
  margin-top: 8px;
  padding: 8px 10px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  background: rgba(14, 116, 144, 0.05);  /* var(--accent) tinted */
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
}
.bp-ai-suggest[hidden] { display: none; }

.bp-ai-suggest-label {
  font-size: 12px;
  color: var(--accent-text);
  font-weight: 600;
  margin-right: 4px;
  flex-shrink: 0;
}

.bp-ai-suggest-loading {
  font-size: 12px;
  color: var(--text2);
  font-style: italic;
  padding: 2px 4px;
}

.bp-ai-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  transition: background-color .12s ease, border-color .12s ease, transform .08s ease;
  font-family: inherit;
  line-height: 1.4;
}
.bp-ai-chip:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}
.bp-ai-chip:active { transform: translateY(1px); }

.bp-ai-chip-field {
  font-weight: 600;
  color: var(--accent-text);
  font-size: 11px;
}
.bp-ai-chip-value {
  color: var(--text);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* [모두 적용] 강조 */
.bp-ai-chip-all {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  font-weight: 600;
}
.bp-ai-chip-all:hover {
  background: var(--accent-text);
  color: #fff;
  border-color: var(--accent-text);
}

/* [무시] 차분하게 */
.bp-ai-chip-dismiss {
  background: transparent;
  border-color: var(--border);
  color: var(--text2);
}
.bp-ai-chip-dismiss:hover {
  background: var(--surface2);
  border-color: var(--border2);
  color: var(--text);
}

/* ── 프로젝트 다이제스트 카드 ([정보] 탭 상단) ─────────────────── */

.bp-digest-card {
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.bp-digest-card[hidden] { display: none; }

.bp-digest-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.04) 0%, rgba(14, 116, 144, 0.01) 100%);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.bp-digest-head-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bp-digest-head-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.bp-digest-head strong {
  font-size: 14px;
  color: var(--accent-text);
}
.bp-digest-icon { font-size: 16px; }
.bp-digest-time {
  font-size: 11px;
  color: var(--text3);
}
.bp-digest-stale {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  background: var(--amber-light);
  color: var(--amber);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.bp-digest-btn {
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--text);
  cursor: pointer;
  font-family: inherit;
  transition: background-color .12s, border-color .12s;
}
.bp-digest-btn:hover {
  background: var(--accent-light);
  border-color: var(--accent);
}

.bp-digest-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.bp-digest-body[hidden] { display: none; }

.bp-digest-section h5 {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-text);
  margin-bottom: 6px;
  text-transform: none;
  letter-spacing: 0;
}
.bp-digest-section p {
  font-size: 13px;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

.bp-digest-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bp-digest-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 10px;
  padding: 6px 10px;
  background: var(--surface2);
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
}
.bp-digest-date {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--accent-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.bp-digest-title {
  flex: 1;
  min-width: 120px;
  color: var(--text);
  font-weight: 500;
}
.bp-digest-detail {
  flex-basis: 100%;
  font-size: 12px;
  color: var(--text2);
  padding-top: 2px;
}
.bp-digest-assignee {
  flex-shrink: 0;
  font-size: 12px;
  color: var(--text2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1px 8px;
}

.bp-digest-sev {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.bp-digest-sev-high { background: var(--red-light); color: var(--red); }
.bp-digest-sev-mid  { background: var(--amber-light); color: var(--amber); }
.bp-digest-sev-low  { background: var(--surface2); color: var(--text2); }

.bp-digest-loading {
  padding: 18px;
  text-align: center;
  color: var(--text2);
  font-size: 13px;
  font-style: italic;
}
.bp-digest-empty {
  padding: 8px 0;
  text-align: center;
  color: var(--text3);
  font-size: 12px;
}



/* AI 단계별 의견 정리 카드 (bnt-projects-ai.js) */
.bp-ai-stage-digest {
  margin: 12px 0;
  background: #fafbff;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  overflow: hidden;
}

.bp-ai-stage-digest-empty {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(180deg, #fafbff 0%, #eef1ff 100%);
  border: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: #4338ca;
  text-align: left;
  cursor: pointer;
  transition: background .15s ease;
}
.bp-ai-stage-digest-empty:hover { background: #e0e7ff; }

.bp-ai-stage-digest-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #f5f7ff;
  border: 0;
  border-bottom: 1px solid transparent;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}
.bp-ai-stage-digest.is-open .bp-ai-stage-digest-head {
  border-bottom-color: #c7d2fe;
}
.bp-ai-stage-digest-head:hover { background: #eef1ff; }

.bp-ai-stage-digest-title {
  font-weight: 600;
  color: #312e81;
  flex: 1;
}

.bp-ai-stage-digest-stale {
  font-size: 11px;
  font-weight: 700;
  color: #b45309;
  background: #fef3c7;
  padding: 2px 8px;
  border-radius: 99px;
}

.bp-ai-stage-digest-fresh {
  font-size: 11px;
  font-weight: 600;
  color: #059669;
  background: #d1fae5;
  padding: 2px 8px;
  border-radius: 99px;
}

.bp-ai-stage-digest-caret {
  font-size: 12px;
  color: #6366f1;
  font-weight: 600;
}

.bp-ai-stage-digest-body {
  padding: 14px 16px 12px;
}

.bp-ai-stage-digest-md {
  font-size: 13.5px;
  line-height: 1.7;
  color: #1f2937;
}
.bp-ai-stage-digest-md h2 {
  font-size: 14px;
  margin: 14px 0 6px;
  color: #4338ca;
}
.bp-ai-stage-digest-md h2:first-child { margin-top: 0; }
.bp-ai-stage-digest-md ul { padding-left: 18px; margin: 4px 0 8px; }
.bp-ai-stage-digest-md li { margin: 2px 0; }
.bp-ai-stage-digest-md p { margin: 4px 0 8px; }

.bp-ai-stage-digest-meta {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed #d1d5db;
  font-size: 11.5px;
  color: #6b7280;
}

.bp-ai-stage-digest-actions {
  margin-top: 8px;
  display: flex;
  gap: 8px;
}

/* ──────────────────────────────────────────────────────────
 * 활동 기록 — 카드 그리드 패턴 (CPL .cp-log-card 미러)
 * 상단: 유형 chip + 검색 / 본문: 카드 그리드(root만) / 하단: 자동 로그 토글
 * ────────────────────────────────────────────────────────── */
.bp-activity-cards-head {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 10px 0 12px;
}

.bp-activity-type-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bp-activity-type-chip-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--border, #e5e7eb);
  background: #fff;
  color: var(--text2, #4b5563);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.bp-activity-type-chip-btn:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.bp-activity-type-chip-btn b {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  min-width: 18px;
  text-align: center;
}

.bp-activity-type-chip-btn.active {
  background: #1f2937;
  color: #fff;
  border-color: #1f2937;
}

.bp-activity-type-chip-btn.active b {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.bp-activity-card-search {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 8px;
  padding: 0 8px;
  min-width: 220px;
  flex: 0 1 320px;
}

.bp-activity-card-search-icon {
  font-size: 12px;
  color: #9ca3af;
}

.bp-activity-card-search-input {
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
  padding: 6px 0;
  flex: 1;
  min-width: 120px;
}

.bp-activity-card-search-clear {
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 14px;
  cursor: pointer;
  padding: 0 2px;
}

.bp-activity-card-search-clear:hover { color: #ef4444; }

/* ── 카드 그리드 본체 ────────────────────────────────────── */
.bp-activity-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.bp-activity-card {
  position: relative;
  display: flex;
  background: #fff;
  border: 1px solid var(--border, #e5e7eb);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s;
  min-height: 110px;
}

.bp-activity-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
  border-color: #d1d5db;
}

.bp-activity-card-stripe {
  width: 4px;
  flex: 0 0 4px;
  background: #9ca3af;
}

/* 유형별 좌측 띠 컬러 */
.bp-activity-card-note     .bp-activity-card-stripe { background: #6b7280; }
.bp-activity-card-decision .bp-activity-card-stripe { background: #10b981; }
.bp-activity-card-meeting  .bp-activity-card-stripe { background: #8b5cf6; }
.bp-activity-card-risk     .bp-activity-card-stripe { background: #ef4444; }
.bp-activity-card-task     .bp-activity-card-stripe { background: #3b82f6; }

.bp-activity-card-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  min-width: 0;
}

.bp-activity-card-head {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.bp-activity-card-type {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
}

.bp-activity-card-note     .bp-activity-card-type { background: #f3f4f6; color: #374151; }
.bp-activity-card-decision .bp-activity-card-type { background: #d1fae5; color: #065f46; }
.bp-activity-card-meeting  .bp-activity-card-type { background: #ede9fe; color: #5b21b6; }
.bp-activity-card-risk     .bp-activity-card-type { background: #fee2e2; color: #991b1b; }
.bp-activity-card-task     .bp-activity-card-type { background: #dbeafe; color: #1e40af; }

.bp-activity-card-stage {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #f9fafb;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

.bp-activity-card-followup-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
}

.bp-activity-card-decision-chip {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: #ecfeff;
  color: #155e75;
  font-weight: 600;
}

.bp-activity-card-due {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 6px;
  background: #f9fafb;
  color: #6b7280;
}

.bp-activity-card-due.soon    { background: #fef3c7; color: #92400e; }
.bp-activity-card-due.today   { background: #fee2e2; color: #991b1b; font-weight: 600; }
.bp-activity-card-due.overdue { background: #fee2e2; color: #991b1b; font-weight: 600; }

.bp-activity-card-status {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-weight: 500;
}

.bp-activity-card-spacer { flex: 1; }

.bp-activity-card-comments {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f3f4f6;
}

.bp-activity-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.bp-activity-card-detail {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  white-space: pre-wrap;
}

.bp-activity-card-attach {
  position: relative;
  display: inline-block;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  max-width: 80px;
  max-height: 60px;
}

.bp-activity-card-attach img {
  display: block;
  width: 80px;
  height: 60px;
  object-fit: cover;
}

.bp-activity-card-attach-more {
  position: absolute;
  bottom: 2px;
  right: 2px;
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
}

.bp-activity-card-foot {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: #9ca3af;
}

.bp-activity-card-sep { color: #d1d5db; }

/* 검색 결과 매칭 카드 — 노란 외곽선 (CPL 패턴과 동일) */
.bp-activity-card.bp-activity-search-match {
  border-color: #f59e0b;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

/* ── 시스템 자동 로그 토글 영역 ──────────────────────────── */
.bp-activity-auto-block {
  margin-top: 14px;
  border-top: 1px dashed #e5e7eb;
  padding-top: 10px;
}

.bp-activity-auto-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 11px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
}

.bp-activity-auto-toggle:hover { background: #f9fafb; color: #6b7280; }

.bp-activity-auto-list {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ──────────────────────────────────────────────────────────
 * 활동 상세 모달 (bpOpenActivityDetailModal)
 * CPL .cp-log-modal.detail 패턴 미러
 * ────────────────────────────────────────────────────────── */
.bp-activity-detail-modal {
  display: flex;
  flex-direction: column;
  gap: 12px;
  /* 스크롤은 shared 의 .modal-box(max-height:90vh; overflow-y:auto)가 담당.
     여기서도 overflow-y:auto 를 주면 스크롤바가 이중으로 나타나므로 금지. */
}

.bp-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bp-detail-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bp-detail-act {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 6px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  color: #374151;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.bp-detail-act:hover { background: #f3f4f6; border-color: #d1d5db; }
.bp-detail-act.ai { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.bp-detail-act.ai:hover { background: #fde68a; }
.bp-detail-act.danger { color: #991b1b; }
.bp-detail-act.danger:hover { background: #fee2e2; border-color: #fecaca; }

.bp-detail-product {
  font-size: 12px;
  color: #6b7280;
  padding: 6px 10px;
  background: #f9fafb;
  border-radius: 6px;
  border-left: 3px solid #9ca3af;
}

.bp-detail-metarow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
}

.bp-detail-when {
  color: #4b5563;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bp-detail-when-sub { color: #9ca3af; }

.bp-detail-author { color: #6b7280; font-weight: 500; }

.bp-detail-chiprow {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.bp-detail-chiprow > span {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
}

.bp-detail-type-note     { background: #f3f4f6 !important; color: #374151 !important; }
.bp-detail-type-decision { background: #d1fae5 !important; color: #065f46 !important; }
.bp-detail-type-meeting  { background: #ede9fe !important; color: #5b21b6 !important; }
.bp-detail-type-risk     { background: #fee2e2 !important; color: #991b1b !important; }
.bp-detail-type-task     { background: #dbeafe !important; color: #1e40af !important; }
.bp-detail-stage         { background: #f9fafb !important; color: #6b7280 !important; border: 1px solid #e5e7eb; }
.bp-detail-decision      { background: #ecfeff !important; color: #155e75 !important; font-weight: 600; }
.bp-detail-due           { background: #fef3c7 !important; color: #92400e !important; }
.bp-detail-status        { background: #fee2e2 !important; color: #991b1b !important; }

.bp-detail-parent-link {
  background: #fff;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  color: #6b7280;
  cursor: pointer;
  text-align: left;
}

.bp-detail-parent-link:hover { background: #f9fafb; border-color: #9ca3af; }

.bp-detail-content {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.6;
  color: #1f2937;
  white-space: pre-wrap;
  word-break: break-word;
}

.bp-detail-attach .bp-detail-sub-label {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
  margin-bottom: 6px;
}

.bp-detail-attach-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bp-detail-attach-list img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e5e7eb;
}

/* ── AI 요약 박스 ───────────────────────────────────────── */
.bp-detail-ai-box {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
}

.bp-detail-ai-box.loading { color: #92400e; font-size: 13px; }
.bp-detail-ai-box.error   { background: #fee2e2; border-color: #fecaca; color: #991b1b; font-size: 13px; }

.bp-detail-ai-spinner {
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid #fde68a;
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: bp-spin 0.7s linear infinite;
  vertical-align: middle;
  margin-right: 6px;
}
@keyframes bp-spin { to { transform: rotate(360deg); } }

.bp-detail-ai-head { margin-bottom: 6px; }
.bp-detail-ai-title { font-size: 13px; font-weight: 600; color: #92400e; }
.bp-detail-ai-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fde68a;
  color: #78350f;
  font-weight: 500;
  margin-left: 4px;
}
.bp-detail-ai-body { font-size: 13px; color: #4b5563; line-height: 1.6; }
.bp-detail-ai-date-block { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #fde68a; }
.bp-detail-ai-date-block-title { font-size: 11px; color: #92400e; font-weight: 600; margin-bottom: 4px; }
.bp-detail-ai-date-row { display: flex; gap: 8px; font-size: 12px; padding: 2px 0; }
.bp-detail-ai-date { color: #6b7280; font-weight: 500; min-width: 80px; }

/* ── 댓글 영역 ──────────────────────────────────────────── */
.bp-comment-section {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid #e5e7eb;
}

.bp-comment-section-title {
  font-size: 13px;
  font-weight: 600;
  color: #4b5563;
  margin-bottom: 10px;
}

.bp-comment-count {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  margin-left: 4px;
}

.bp-comment-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.bp-comment-empty {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  padding: 12px 0;
  font-style: italic;
}

.bp-comment-card {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px 10px;
}

.bp-comment-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 4px;
}

.bp-comment-author { font-weight: 600; color: #374151; }

.bp-comment-mine-badge {
  font-size: 9px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1e40af;
  margin-left: 4px;
}

.bp-comment-time { color: #9ca3af; }

.bp-comment-edited {
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 10px;
  cursor: pointer;
  text-decoration: underline;
  margin-left: 4px;
  padding: 0;
}

.bp-comment-actions { margin-left: auto; display: inline-flex; gap: 4px; }

.bp-comment-act-btn {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 11px;
  padding: 2px 4px;
  border-radius: 4px;
  color: #6b7280;
}

.bp-comment-act-btn:hover { background: #e5e7eb; color: #374151; }
.bp-comment-act-btn.danger:hover { background: #fee2e2; color: #991b1b; }

.bp-comment-body {
  font-size: 13px;
  color: #1f2937;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.bp-comment-attach-list { display: flex; gap: 6px; flex-wrap: wrap; }
.bp-comment-attach-list img {
  width: 80px; height: 80px; object-fit: cover; border-radius: 6px; cursor: zoom-in;
  border: 1px solid #e5e7eb;
}

/* 댓글 입력 */
.bp-comment-input-wrap {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.bp-comment-textarea {
  width: 100%;
  min-height: 60px;
  border: none;
  outline: none;
  resize: vertical;
  background: transparent;
  font-size: 13px;
  font-family: inherit;
  line-height: 1.5;
}

.bp-comment-bottom-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bp-comment-attach-hint {
  font-size: 11px;
  color: #6b7280;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.bp-comment-attach-hint:hover { background: #f3f4f6; }

.bp-comment-submit {
  font-size: 12px;
  padding: 5px 12px;
}

/* 댓글 인라인 수정 */
.bp-comment-edit-ta {
  width: 100%;
  min-height: 60px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  font-family: inherit;
  resize: vertical;
}

.bp-comment-edit-actions {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  justify-content: flex-end;
}

/* ── 수정 이력 카드 ─────────────────────────────────────── */
.bp-activity-hist-modal {
  max-height: 85vh;
  overflow-y: auto;
}

.bp-hist-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.bp-hist-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
}

.bp-hist-card.current {
  border-color: #3b82f6;
  background: #eff6ff;
}

.bp-hist-card-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  margin-bottom: 6px;
  align-items: center;
}

.bp-hist-card-ver {
  font-weight: 600;
  color: #1e40af;
  font-size: 12px;
}

.bp-hist-card-meta { color: #6b7280; }

.bp-hist-snap {
  font-size: 12px;
  line-height: 1.5;
}

.bp-hist-snap-title { color: #1f2937; margin-bottom: 4px; }
.bp-hist-snap-body {
  color: #4b5563;
  white-space: pre-wrap;
  padding: 6px 8px;
  background: #f9fafb;
  border-radius: 4px;
  margin-bottom: 4px;
}

.bp-hist-snap-meta { color: #9ca3af; font-size: 11px; }

/* ═══════════════════════════════════════════════════════════
   [히스토리] 탭 — AI 요약 카드 (날짜 그룹)
   CPL .cp-hist-* 패턴 미러. 활동 상세 [✨ AI 요약 → 📚 히스토리로 이동] 흐름.
═══════════════════════════════════════════════════════════ */

.bp-history-placeholder {
  text-align: center;
  padding: 60px 24px;
  color: #9ca3af;
  font-size: 13px;
  line-height: 1.7;
}
.bp-history-placeholder strong {
  color: #6b7280;
  font-size: 14px;
  display: block;
  margin-bottom: 6px;
}

.bp-hist-group { margin-bottom: 18px; }
.bp-hist-group-head {
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  margin-bottom: 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid #e5e7eb;
}
.bp-hist-list { display: flex; flex-direction: column; gap: 8px; }

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

.bp-hist-body {
  font-size: 13.5px;
  color: #1f2937;
  line-height: 1.6;
  margin-bottom: 6px;
  white-space: pre-wrap;
}
.bp-hist-dates {
  background: #f9fafb;
  border-radius: 6px;
  padding: 8px 10px;
  margin-top: 6px;
}
.bp-hist-date-row {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 3px 0;
  font-size: 12px;
}
.bp-hist-date-key {
  font-family: monospace;
  color: #6b7280;
  font-weight: 600;
  flex-shrink: 0;
  min-width: 80px;
}
.bp-hist-date-sum { color: #4b5563; line-height: 1.5; }

/* ── 모달 안 AI 요약 [📚 히스토리로 이동] 버튼 ── */
.bp-detail-ai-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.bp-detail-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;
}
.bp-detail-ai-move-btn:hover { background: #5b21b6; }
