/* ═══════════════════════════════════════════════════════════════════
   BNT 리뷰 분석 (.rv-*)
═══════════════════════════════════════════════════════════════════ */

/* 요약 바 */
.rv-summary{display:flex;align-items:center;gap:8px;padding:10px 12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);margin-bottom:12px;flex-wrap:wrap;}
.rv-chip{display:inline-block;padding:3px 9px;border-radius:9px;font-size:11px;font-weight:700;}
.rv-chip-ours{background:#DBEAFE;color:#1E40AF;}
.rv-chip-comp{background:#F3F4F6;color:#475569;}
.rv-chip-active{background:#DCFCE7;color:#166534;}
.rv-chip-crawler-on{background:#DBEAFE;color:#1E40AF;cursor:help;}
.rv-chip-crawler-off{background:#FEE2E2;color:#991B1B;cursor:help;}
.rv-search{font-size:12px;padding:6px 10px;}
.rv-empty{color:var(--text3);font-size:13px;text-align:center;padding:40px 20px;background:var(--surface);border:1px dashed var(--border);border-radius:var(--radius-sm);}

/* 그룹 묶음 */
.rv-group{margin-bottom:14px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);overflow:hidden;}
.rv-group-head{display:flex;align-items:center;gap:10px;padding:8px 12px;background:var(--surface2);border-bottom:1px solid var(--border);}
.rv-group-name{font-size:13px;font-weight:700;}
.rv-group-count{font-size:11px;color:var(--text3);}
.rv-group-body{padding:4px 0;}

/* 상품 row */
.rv-row{display:flex;align-items:center;gap:10px;padding:9px 12px;border-bottom:1px solid var(--border);}
.rv-row:last-child{border-bottom:none;}
.rv-row-main{flex:1;min-width:0;}
.rv-row-head{display:flex;align-items:center;gap:6px;margin-bottom:3px;flex-wrap:wrap;}
.rv-row-name{font-size:13px;font-weight:600;color:var(--text);}
.rv-row-meta{font-size:11px;color:var(--text3);display:flex;flex-wrap:wrap;gap:4px;line-height:1.5;}
.rv-row-meta code{font-family:monospace;background:var(--surface2);padding:1px 5px;border-radius:3px;font-size:10.5px;}
.rv-row-actions{display:flex;gap:4px;flex-shrink:0;align-items:center;}
.rv-row-actions a{text-decoration:none;}

/* 뱃지 */
.rv-badge{display:inline-block;padding:2px 7px;border-radius:9px;font-size:10.5px;font-weight:700;}
.rv-badge-ours{background:#DBEAFE;color:#1E40AF;}
.rv-badge-comp{background:#F3F4F6;color:#64748B;}
.rv-badge-on{background:#DCFCE7;color:#166534;}
.rv-badge-off{background:#FEE2E2;color:#991B1B;}

/* 토글 (체크박스+라벨) */
.rv-toggle{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;background:var(--surface2);border-radius:var(--radius-sm);cursor:pointer;font-size:12.5px;}
.rv-toggle input{cursor:pointer;}

/* Phase 2/3 placeholder */
.rv-coming-soon{padding:60px 20px;text-align:center;color:var(--text3);background:var(--surface);border:1px dashed var(--border);border-radius:var(--radius-sm);}
.rv-coming-icon{font-size:48px;margin-bottom:14px;opacity:.75;}
.rv-coming-title{font-size:16px;font-weight:700;color:var(--text);margin-bottom:6px;}
.rv-coming-desc{font-size:12px;line-height:1.6;max-width:420px;margin:0 auto;}

/* ═══════════════════════════════════════════════════════════════════
   BNT 리뷰 조회 (.rvq-*)
═══════════════════════════════════════════════════════════════════ */
.rvq-filter{display:flex;flex-wrap:wrap;gap:10px;padding:12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);margin-bottom:12px;align-items:flex-end;}
.rvq-summary{margin-bottom:10px;}
.rvq-summary-row{display:flex;gap:6px;flex-wrap:wrap;align-items:center;}
.rvq-chip{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;background:var(--surface2);border-radius:10px;font-size:11.5px;color:var(--text2);}
.rvq-chip strong{color:var(--text);}
.rvq-chip-total{background:#DBEAFE;color:#1E40AF;}
.rvq-chip-rating-5{background:#DCFCE7;color:#166534;}
.rvq-chip-rating-4{background:#E0F2FE;color:#075985;}
.rvq-chip-rating-3{background:#FEF3C7;color:#92400E;}
.rvq-chip-rating-2{background:#FFEDD5;color:#9A3412;}
.rvq-chip-rating-1{background:#FEE2E2;color:#991B1B;}

.rvq-content{margin-top:8px;}
.rvq-empty{color:var(--text3);font-size:13px;text-align:center;padding:40px 20px;background:var(--surface);border:1px dashed var(--border);border-radius:var(--radius-sm);}

.rvq-table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:var(--radius-sm);background:var(--surface);}
.rvq-table{width:100%;border-collapse:collapse;font-size:12px;}
.rvq-table thead th{position:sticky;top:0;background:var(--surface2);padding:8px 10px;font-weight:600;color:var(--text2);border-bottom:1px solid var(--border);font-size:11px;text-align:left;white-space:nowrap;z-index:1;}
.rvq-table tbody td{padding:8px 10px;border-bottom:1px solid var(--border);vertical-align:top;}
.rvq-table tbody tr:hover{background:var(--surface2);}

.rvq-cell-star{font-size:12px;white-space:nowrap;}
.rvq-star-5{color:#16a34a;}
.rvq-star-4{color:#0ea5e9;}
.rvq-star-3{color:#eab308;}
.rvq-star-2{color:#f97316;}
.rvq-star-1{color:#ef4444;}
.rvq-cell-date{color:var(--text3);font-family:monospace;white-space:nowrap;}
.rvq-cell-reviewer{color:var(--text2);}
.rvq-cell-product{white-space:nowrap;max-width:220px;}
.rvq-product-name{display:inline-block;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;margin-left:4px;font-size:11.5px;color:var(--text2);}
.rvq-cell-option{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text3);font-size:11px;}
.rvq-cell-body{max-width:420px;line-height:1.5;}
.rvq-cell-title{font-weight:700;margin-bottom:2px;color:var(--text);}
.rvq-cell-content{font-size:11.5px;color:var(--text2);max-height:120px;overflow-y:auto;}
.rvq-cell-img{text-align:center;}
.rvq-img-ic{cursor:pointer;display:inline-block;padding:3px 7px;background:var(--surface2);border-radius:10px;font-size:10.5px;color:var(--text2);}
.rvq-img-ic:hover{background:var(--accent-light);color:var(--accent-text);}

.rvq-badge{display:inline-block;padding:1px 6px;border-radius:8px;font-size:9.5px;font-weight:700;vertical-align:middle;}
.rvq-badge-ours{background:#DBEAFE;color:#1E40AF;}
.rvq-badge-comp{background:#F3F4F6;color:#475569;}

.rvq-img-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px;margin:10px 0;}
.rvq-img-grid img{width:100%;height:140px;object-fit:cover;border-radius:var(--radius-sm);cursor:pointer;border:1px solid var(--border);}

/* ═══════════════════════════════════════════════════════════════════
   BNT 리뷰 비교 (.rvc-*)
═══════════════════════════════════════════════════════════════════ */
.rvc-filter{display:flex;gap:10px;padding:12px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);margin-bottom:14px;align-items:flex-end;flex-wrap:wrap;}

.rvc-stats{margin-bottom:14px;}
.rvc-stat-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:12px;margin-bottom:8px;}
.rvc-stat-card{padding:14px 16px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);border-top:4px solid var(--accent,#1A5FB4);}
.rvc-card-ours{border-top-color:#1A5FB4;}
.rvc-card-comps{border-top-color:#94A3B8;}
.rvc-stat-head{display:flex;align-items:center;gap:8px;margin-bottom:10px;}
.rvc-stat-icon{font-size:20px;}
.rvc-stat-label{font-size:14px;font-weight:700;}
.rvc-stat-badge{font-size:18px;}
.rvc-stat-big{display:flex;align-items:baseline;gap:12px;margin-bottom:10px;}
.rvc-stat-avg{font-size:32px;font-weight:800;color:var(--text);}
.rvc-stat-avg span{font-size:14px;font-weight:500;color:var(--text3);}
.rvc-stat-total{font-size:14px;color:var(--text3);}
.rvc-stat-sub{display:flex;gap:12px;font-size:11.5px;color:var(--text2);margin-bottom:10px;flex-wrap:wrap;}
.rvc-stat-sub strong{color:var(--text);}
.rvc-stat-kw-title{font-size:10.5px;font-weight:700;color:var(--text3);letter-spacing:.4px;text-transform:uppercase;margin-bottom:4px;}
.rvc-stat-kw{display:flex;flex-wrap:wrap;gap:4px;}
.rvc-kw{padding:2px 8px;background:#FEE2E2;color:#991B1B;border-radius:9px;font-size:10.5px;font-weight:600;}
.rvc-kw small{opacity:.65;font-size:9.5px;margin-left:2px;}
.rvc-kw-empty{font-size:11px;color:var(--text3);}

.rvc-meta{font-size:11.5px;color:var(--text3);padding:8px 12px;background:var(--surface2);border-radius:var(--radius-sm);}

.rvc-charts{margin-bottom:14px;}
.rvc-chart-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:12px;}
.rvc-chart-card{padding:12px 14px;background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);}
.rvc-chart-title{font-size:13px;font-weight:700;margin-bottom:8px;}

.rvc-ai{background:var(--surface);border:1px solid var(--border);border-left:4px solid #8B5CF6;border-radius:var(--radius-sm);padding:14px 16px;margin-bottom:14px;}
.rvc-ai-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:10px;flex-wrap:wrap;gap:8px;}
.rvc-ai-title{font-size:15px;font-weight:800;color:#5B21B6;}
.rvc-ai-meta{display:flex;gap:6px;align-items:center;font-size:11px;color:var(--text3);flex-wrap:wrap;}
.rvc-ai-meta code{font-family:monospace;background:var(--surface2);padding:1px 5px;border-radius:3px;font-size:10px;}
.rvc-ai-regen{padding:4px 10px !important;font-size:11px !important;}
.rvc-ai-stale{
  background:#FEF3C7;border:1px solid #FCD34D;border-radius:6px;
  padding:8px 12px;margin-bottom:10px;font-size:12.5px;color:#92400E;line-height:1.5;
}
.rvc-ai-stale-tag{
  display:inline-block;background:#FCD34D;color:#78350F;font-size:10.5px;font-weight:700;
  padding:1px 6px;border-radius:4px;vertical-align:middle;margin-left:6px;
}
.rvc-ai-subtitle{font-size:12px;font-weight:700;margin-bottom:8px;color:var(--text);}
.rvc-ai-summary{padding:10px 12px;background:#F5F3FF;border-radius:var(--radius-sm);margin-bottom:14px;}
.rvc-ai-summary p{margin:0;font-size:12.5px;line-height:1.6;color:var(--text);}
.rvc-ai-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:10px;margin-bottom:14px;}
.rvc-ai-block{padding:10px 12px;background:var(--surface2);border-radius:var(--radius-sm);margin-bottom:10px;}
.rvc-ai-pos{border-left:3px solid #10B981;}
.rvc-ai-neg{border-left:3px solid #EF4444;}
.rvc-ai-comp{border-left:3px solid #F59E0B;}
.rvc-ai-point{padding:8px 0;border-bottom:1px dashed var(--border);}
.rvc-ai-point:last-child{border-bottom:none;}
.rvc-ai-point-title{font-size:12.5px;font-weight:700;margin-bottom:3px;}
.rvc-ai-point-detail{font-size:11.5px;color:var(--text2);line-height:1.5;margin-bottom:3px;}
.rvc-ai-point-evidence{font-size:11px;color:var(--text3);font-style:italic;padding:4px 8px;background:var(--surface);border-radius:4px;margin-top:4px;}
.rvc-ai-empty{font-size:11.5px;color:var(--text3);padding:4px 0;}

.rvc-ai-action{padding:8px 10px;background:var(--surface);border-radius:var(--radius-sm);border-left:3px solid var(--text3);margin-bottom:6px;}
.rvc-ai-action-high{border-left-color:#EF4444;}
.rvc-ai-action-medium{border-left-color:#F59E0B;}
.rvc-ai-action-low{border-left-color:#94A3B8;}
.rvc-ai-action-head{display:flex;align-items:center;gap:6px;margin-bottom:3px;flex-wrap:wrap;}
.rvc-ai-action-priority{font-size:10px;font-weight:700;padding:2px 7px;border-radius:9px;}
.rvc-ai-priority-high{background:#FEE2E2;color:#991B1B;}
.rvc-ai-priority-medium{background:#FEF3C7;color:#92400E;}
.rvc-ai-priority-low{background:#F3F4F6;color:#475569;}
.rvc-ai-action-title{font-size:12.5px;font-weight:700;}
.rvc-ai-action-detail{font-size:11.5px;color:var(--text2);line-height:1.5;}

@media (max-width: 900px){
  .rvq-filter{flex-direction:column;align-items:stretch;}
  .rvc-filter{flex-direction:column;align-items:stretch;}
  .rvc-stat-grid{grid-template-columns:1fr;}
  .rvc-chart-grid{grid-template-columns:1fr;}
  .rvc-ai-grid{grid-template-columns:1fr;}
}

/* ══════════════════════════════════════════════════════════════
   단계 전환 영역 (단순화 1안: dropdown 제거 후 명시적 버튼)
   ══════════════════════════════════════════════════════════════ */
.bp-stage-transition{
  display:flex;
  gap:8px;
  padding:14px 16px 4px;
  margin-top:14px;
  border-top:1px solid var(--border);
  align-items:center;
}
.bp-stage-advance-btn{
  flex:1;
  padding:11px 16px;
  background:var(--accent);
  color:#fff;
  border:none;
  border-radius:6px;
  font-weight:600;
  font-family:inherit;
  font-size:13.5px;
  cursor:pointer;
  transition:opacity 0.12s, transform 0.08s;
}
.bp-stage-advance-btn:hover{ opacity:0.9; }
.bp-stage-advance-btn:active{ transform:translateY(1px); }
.bp-stage-pause-btn,
.bp-stage-reject-btn{
  padding:11px 14px;
  background:transparent;
  border:1px solid var(--border);
  border-radius:6px;
  color:var(--text2);
  font-family:inherit;
  font-size:12.5px;
  cursor:pointer;
  transition:background 0.12s, border-color 0.12s, color 0.12s;
}
.bp-stage-pause-btn:hover{
  background:var(--surface2);
  border-color:var(--text3);
  color:var(--text);
}
.bp-stage-reject-btn{ color:#dc2626; border-color:#fca5a5; }
.bp-stage-reject-btn:hover{ background:#fee2e2; border-color:#dc2626; }

/* 단종 처리 버튼 — 운영 단계의 메인 액션 (회색계) */
.bp-stage-discontinue-btn{
  padding:11px 14px;
  background:#6b7280;
  color:#fff;
  border:1px solid #6b7280;
  border-radius:6px;
  font-family:inherit;
  font-size:13px;
  font-weight:600;
  cursor:pointer;
  transition:background 0.12s;
  flex:1;
}
.bp-stage-discontinue-btn:hover{ background:#4b5563; border-color:#4b5563; }

/* 단종 sub-type 선택 모달 옵션 카드 */
.bp-discontinue-options{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  margin:6px 0;
}
.bp-discontinue-option{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:6px;
  padding:16px;
  background:#ffffff;
  border:1.5px solid var(--border);
  border-radius:10px;
  cursor:pointer;
  text-align:left;
  font-family:inherit;
  transition:border-color 0.12s, background 0.12s, transform 0.08s;
}
.bp-discontinue-option:hover{
  border-color:#374151;
  background:#f9fafb;
}
.bp-discontinue-option:active{ transform:translateY(1px); }
.bp-discontinue-option-icon{ font-size:24px; }
.bp-discontinue-option-label{
  font-weight:700;
  color:#111827;
  font-size:14px;
}
.bp-discontinue-option-desc{
  font-size:12px;
  color:var(--text2);
  line-height:1.5;
}
.bp-discontinue-option[data-type="inventory"]:hover{ border-color:#c2410c; background:#fff7ed; }

/* 단종 sub-type 칩 — 카드/헤더에 노출 */
.bp-discontinue-chip{
  display:inline-flex;
  align-items:center;
  gap:4px;
  padding:2px 8px;
  border-radius:4px;
  font-size:11px;
  font-weight:600;
  margin-left:6px;
  vertical-align:middle;
  white-space:nowrap;
}
.bp-discontinue-chip-empty{
  background:#fef3c7 !important;
  color:#b45309 !important;
  border:1px solid #fcd34d;
  font-family:inherit;
  cursor:pointer;
}
.bp-discontinue-chip-empty[disabled]{ cursor:default; opacity:0.7; }
.bp-discontinue-chip-change{
  border:none;
  background:transparent;
  color:inherit;
  cursor:pointer;
  font-size:13px;
  padding:0 0 0 4px;
  opacity:0.7;
}
.bp-discontinue-chip-change:hover{ opacity:1; }

/* 진행서 [지금 할 일] 탭 — sub-type 미정 안내 카드 */
.bp-discontinue-prompt{
  background:#fef3c7;
  border:1px solid #fcd34d;
  border-radius:8px;
  padding:14px 16px;
  margin:10px 0;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.bp-discontinue-prompt strong{ color:#b45309; }
.bp-discontinue-prompt p{
  margin:0;
  font-size:12.5px;
  color:#78350f;
  line-height:1.5;
}
.bp-discontinue-prompt .bp-stage-discontinue-btn{
  flex:0 0 auto;
  align-self:flex-start;
}

/* 1차 점검 단계 전용 — 3 판정 버튼 = 단계 결정 + 자동 전환 */
.bp-check-decision-buttons{
  display:flex;
  gap:10px;
  padding:14px 16px 4px;
  margin-top:14px;
  border-top:1px solid var(--border);
}
.bp-check-decision-buttons button{
  flex:1;
  padding:13px 16px;
  border:2px solid var(--border);
  border-radius:8px;
  background:#fff;
  font-weight:600;
  font-family:inherit;
  font-size:13.5px;
  cursor:pointer;
  transition:background 0.12s, border-color 0.12s, transform 0.08s;
}
.bp-check-decision-buttons button:active{ transform:translateY(1px); }
.bp-check-decision-pass{ border-color:#10b981; color:#10b981; }
.bp-check-decision-pass:hover{ background:#ecfdf5; border-color:#059669; }
.bp-check-decision-transfer{ border-color:#9ca3af; color:#6b7280; }
.bp-check-decision-transfer:hover{ background:#f3f4f6; border-color:#6b7280; }
.bp-check-decision-reject{ border-color:#fca5a5; color:#ef4444; }
.bp-check-decision-reject:hover{ background:#fee2e2; border-color:#dc2626; }

/* C 단순화: 우측 6 카드 → 3 카드 (오늘 할 일 / 기록 / 제품 정보) */

/* 1) 오늘 할 일 카드 — 다음 액션 + 확인 필요 통합 */
.bp-today-card{
  border-top:3px solid #0f7f97;
}
.bp-today-action{
  display:block;
  margin-bottom:10px;
  color:#0f172a;
  font-size:17px;
  line-height:1.35;
}
.bp-today-risks{
  margin-top:12px;
  padding:10px 12px;
  background:#fff7ed;
  border:1px solid #fed7aa;
  border-radius:8px;
}
.bp-today-risks-head{
  font-size:12px;
  font-weight:700;
  color:#c2410c;
  margin-bottom:6px;
}
.bp-today-risks .bp-risk-item{
  font-size:11.5px;
  color:#7c2d12;
  padding:3px 0;
  line-height:1.4;
}

/* 2) 기록 카드 = 빠른 기록 폼 + 최근 활동 통합 */
.bp-record-recent{
  margin-top:14px;
  padding-top:12px;
  border-top:1px dashed var(--border);
}
.bp-record-recent-head{
  font-size:11.5px;
  font-weight:700;
  color:var(--text2);
  margin-bottom:8px;
  letter-spacing:0.3px;
}
.bp-record-recent .bp-rail-recent-list{
  display:flex;
  flex-direction:column;
  gap:5px;
}

/* 빠른 기록 = 유일한 입력 진입점 — 시각적 강조 */
.bp-quick-record-primary{
  border:2px solid var(--accent);
  box-shadow:0 2px 12px rgba(37, 99, 235, 0.08);
}
.bp-quick-record-primary .bp-os-panel-head h4{
  color:var(--accent-text);
}

/* 다음 액션 카드 → 빠른 기록 안내 문구 */
.bp-next-action-hint{
  margin-top:10px;
  padding:8px 12px;
  background:var(--surface2);
  border-radius:6px;
  font-size:11.5px;
  color:var(--text2);
  text-align:center;
  border:1px dashed var(--border);
}
.bp-next-action-hint strong{
  color:var(--accent-text);
  font-weight:600;
}

/* 정보 카드의 가격 기준 — 라벨 명시 (목표가/시장가 두 줄) */
.bp-brief-price{
  display:flex;
  flex-direction:column;
  gap:2px;
  font-weight:600;
  font-size:13px;
  line-height:1.4;
}
.bp-brief-price-row{
  display:flex;
  gap:6px;
  align-items:baseline;
  white-space:nowrap;
}
.bp-brief-price-row em{
  font-style:normal;
  font-weight:500;
  font-size:11px;
  color:var(--text3);
  flex-shrink:0;
  min-width:36px;
}

/* Progress bar 단계 chip 클릭 가능 (단계 자유 이동) */
.bp-progress-clickable{
  cursor:pointer;
  transition:transform 0.1s, background 0.12s, box-shadow 0.12s;
}
.bp-progress-clickable:hover{
  transform:translateY(-1px);
  box-shadow:0 2px 6px rgba(0,0,0,0.08);
  filter:brightness(1.05);
}
.bp-progress-clickable:active{ transform:translateY(0); }

/* 보조 정보의 단계/판정 표시 (dropdown 제거 후 read-only 라벨) */
.bp-edit-stage-display{
  padding:8px 10px;
  background:var(--surface2);
  border:1px solid var(--border);
  border-radius:6px;
  font-size:13px;
  color:var(--text);
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:8px;
}
.bp-edit-stage-display small{
  font-size:11px;
  color:var(--text3);
  font-weight:normal;
}

/* =====================================================================
   제품 진행서 — 의도 축으로 분리 (지금 할 일 / 기록 / 정보)
   페르소나 토론 결과의 재설계. 레거시 .bp-detail-brief / .bp-work-rail /
   .bp-context-card / .bp-detail-fold 등은 즉시 삭제하지 않고 미사용 상태로
   둠 (회귀 시 빠른 부분 롤백 안전망).
   ===================================================================== */

.bp-detail-shell {
  display: grid;
  gap: 12px;
  max-width: 1080px;
  margin: 0 auto;
  width: 100%;
}

/* [지금 할 일] 탭 1x2 그리드 — 좌(다음 진행 항목 선택) | 우(지금 진행 중인 항목).
   "선택 → 실행"의 좌→우 흐름. 모바일에선 단일 컬럼 stack. */
.bp-todo-pair-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
@media (max-width: 880px) {
  .bp-todo-pair-grid { grid-template-columns: 1fr; }
}

/* (레거시) 4섹터 2x2 그리드 — 빠른 기록 폼이 모달화되면서 단일 컬럼으로 단순화됨. */
.bp-todo-quad-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}
@media (max-width: 880px) {
  .bp-todo-quad-grid { grid-template-columns: 1fr; }
}

/* [기록] 탭 + [지금 할 일] 탭 진입점 — "+ 기록" 모달 호출 버튼.
   메인: [기록] 탭 필터 우측 끝(.bp-add-record-btn).
   보조: [지금 할 일] 탭 "최근 활동" 헤더 우측(.bp-add-record-btn-mini). */
.bp-activity-stage-tabs-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.bp-activity-stage-tabs-wrap .bp-activity-stage-tabs {
  flex: 1;
  min-width: 0;
}
.bp-add-record-btn {
  flex-shrink: 0;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  background: #0f7f97;
  border: 1px solid #0f7f97;
  border-radius: 8px;
  cursor: pointer;
  transition: background .12s, transform .08s;
  white-space: nowrap;
}
.bp-add-record-btn:hover { background: #0c6478; }
.bp-add-record-btn:active { transform: translateY(1px); }
.bp-add-record-btn-mini {
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #0f7f97;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, border-color .12s;
}
.bp-add-record-btn-mini:hover { background: #cffafe; border-color: #67e8f9; }
.bp-todo-recent-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* ─── 공통 슬림 헤더 ─── */
.bp-detail-stickyhead {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  /* 시그널(상품명)과 단계 흐름 사이 간격: 8px → 10px (20% 증가) */
  gap: 10px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}

/* 단계 흐름 stepper — 발주 상세(.status-steps)와 동일한 노드+라인 디자인.
   슬림 칩(.bp-stage-strip-slim)보다 시각 구분이 명확. 클릭 점프 유지. */
.bp-stage-flow {
  display: flex;
  gap: 0;
  padding: 4px 0 2px;
}
.bp-stage-flow-step {
  flex: 1;
  text-align: center;
  position: relative;
  min-width: 0;
}
.bp-stage-flow-step::before {
  content: '';
  position: absolute;
  top: 13px;
  left: 50%;
  right: -50%;
  height: 2px;
  background: #e2e8f0;
  z-index: 0;
}
.bp-stage-flow-step:last-child::before { display: none; }
.bp-stage-flow-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #ffffff;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 6px;
  position: relative;
  z-index: 1;
  transition: transform .12s, background .12s, border-color .12s, box-shadow .12s;
}
.bp-stage-flow-step.done .bp-stage-flow-dot {
  background: #10b981;
  border-color: #10b981;
  color: #ffffff;
}
.bp-stage-flow-step.current .bp-stage-flow-dot {
  background: #0f7f97;
  border-color: #0f7f97;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(15,127,151,.15);
}
.bp-stage-flow-step.done::before { background: #10b981; }
.bp-stage-flow-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 4px;
}
.bp-stage-flow-step.current .bp-stage-flow-label {
  color: #0f7f97;
  font-weight: 700;
}
.bp-stage-flow-step.done .bp-stage-flow-label {
  color: #10b981;
  font-weight: 700;
}
.bp-stage-flow-step.clickable { cursor: pointer; }
.bp-stage-flow-step.clickable:hover .bp-stage-flow-dot {
  transform: translateY(-1px);
  border-color: #0f7f97;
  color: #0f7f97;
}
.bp-stage-flow-step.clickable.done:hover .bp-stage-flow-dot,
.bp-stage-flow-step.clickable:hover .bp-stage-flow-dot { box-shadow: 0 2px 6px rgba(15,127,151,.18); }
.bp-stage-flow-step.clickable:hover .bp-stage-flow-label { color: #0f7f97; }
.bp-stage-flow-step.clickable:focus-visible {
  outline: 2px solid #0f7f97;
  outline-offset: 2px;
  border-radius: 8px;
}
@media (max-width: 720px) {
  .bp-stage-flow-dot { width: 22px; height: 22px; font-size: 10px; }
  .bp-stage-flow-step::before { top: 11px; }
  .bp-stage-flow-label { font-size: 10px; padding: 0 2px; }
}

/* (레거시) 슬림 칩 스테퍼 — bp-stage-flow로 대체됨. 즉시 삭제하지 않고 보존(롤백 안전망). */
.bp-stage-strip-slim {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 2px;
}
.bp-stage-strip-slim::-webkit-scrollbar { height: 4px; }
.bp-stage-strip-slim::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }

.bp-stage-chip-slim {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, color .12s, border-color .12s, transform .08s;
}
.bp-stage-chip-slim:hover { background: #e0f2fe; color: #0f7f97; border-color: #7dd3fc; }
.bp-stage-chip-slim:active { transform: translateY(1px); }
.bp-stage-chip-slim.done {
  color: #0f7f97;
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.bp-stage-chip-slim.current {
  color: #ffffff;
  background: #0f7f97;
  border-color: #0f7f97;
  box-shadow: 0 1px 4px rgba(15,127,151,.25);
}
.bp-stage-chip-slim .bp-stage-chip-num {
  font-size: 10px;
  font-weight: 800;
  opacity: .7;
}

/* 한 줄 시그널 (관리자 스캔 + 신규 5초 메시징) */
.bp-signal-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 14px;
  font-size: 13px;
  color: #334155;
  line-height: 1.45;
}
.bp-signal-title {
  font-size: 16px;
  font-weight: 800;
  color: #0f172a;
  outline: none;
}
.bp-signal-title[contenteditable="true"]:hover {
  background: #fef9c3;
  border-radius: 4px;
}
.bp-signal-title[contenteditable="true"]:focus {
  background: #fef9c3;
  outline: 2px solid #facc15;
  border-radius: 4px;
}
.bp-signal-meta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #64748b;
  font-size: 12px;
}
.bp-signal-meta strong {
  color: #0f172a;
  font-weight: 700;
}
.bp-signal-divider {
  color: #cbd5e1;
  font-size: 11px;
}
.bp-signal-risk {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 700;
}

/* ─── 탭 바 ─── */
.bp-detail-tabs {
  display: flex;
  gap: 2px;
  padding: 4px;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 10px;
}
.bp-detail-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  background: transparent;
  border: none;
  border-radius: 7px;
  cursor: pointer;
  transition: background .12s, color .12s;
}
.bp-detail-tab:hover { color: #0f7f97; background: rgba(255,255,255,.6); }
.bp-detail-tab[aria-selected="true"] {
  color: #0f7f97;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(15,23,42,.06);
}
.bp-detail-tab .bp-tab-count {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
}
.bp-detail-tab[aria-selected="true"] .bp-tab-count { color: #0f7f97; }

/* 탭 패널 (DOM 보존 — display 토글). gap을 약간 키워 시각 그룹 사이 호흡감 추가. */
.bp-detail-tabpanel {
  display: grid;
  gap: 16px;
}
.bp-detail-tabpanel[hidden] { display: none; }

/* ─── [지금 할 일] 탭 ─── */

/* 단계 목표 — 5초 메시징 */
.bp-stage-objective-large {
  position: relative;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 4px solid #0f7f97;
  border-radius: 8px;
}
.bp-stage-objective-large strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.bp-stage-objective-large p {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.6;
  color: #475569;
}
.bp-stage-objective-large .bp-stage-completion-cap {
  font-size: 12px;
  color: #64748b;
  padding-top: 8px;
  border-top: 1px dashed #e2e8f0;
}
.bp-stage-objective-large .bp-stage-completion-cap::before {
  content: '완료 조건 — ';
  color: #0f7f97;
  font-weight: 700;
}

/* 단계 컨텍스트 메타 (담당·가격·1688 inline) */
.bp-stage-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  padding: 10px 14px;
  font-size: 12.5px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.bp-stage-meta-row .bp-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.bp-stage-meta-row .bp-meta-item em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: #94a3b8;
  margin-right: 2px;
}
.bp-stage-meta-row .bp-meta-item strong {
  color: #0f172a;
  font-weight: 700;
}
.bp-stage-meta-row .bp-meta-jump {
  margin-left: auto;
  padding: 3px 10px;
  font-size: 11.5px;
  font-weight: 700;
  color: #0f7f97;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 999px;
  cursor: pointer;
}
.bp-stage-meta-row .bp-meta-jump:hover { background: #cffafe; }
.bp-stage-meta-row a.bp-meta-link {
  color: #0f7f97;
  text-decoration: none;
  font-weight: 700;
}
.bp-stage-meta-row a.bp-meta-link:hover { text-decoration: underline; }

/* 진행 중 메서드 카드 영역 */
/* active 박스 — chip row와 같은 시각으로 통일(한 그룹으로 인지). 둘이 1x2 그리드의
   좌·우 컬럼이라 같은 visual weight여야 그룹 경계가 명확. */
.bp-method-active-list {
  display: grid;
  gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 8px;
}
.bp-method-active-list-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 4px;
}
.bp-method-active-list-head .bp-method-count {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f7f97;
  padding: 1px 7px;
  background: #ecfeff;
  border: 1px solid #a5f3fc;
  border-radius: 999px;
}

/* 대기/안 함 칩 row — 항목당 1행 (세로 stack). 1x2 그리드의 좌측 컬럼.
   active 박스와 같은 시각(배경/보더 통일)으로 한 그룹 인지. */
.bp-method-chip-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 8px;
}
.bp-method-chip-row-head {
  font-size: 12px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 4px;
}
.bp-method-chip-row-hint {
  font-weight: 500;
  color: #94a3b8;
}

/* "안 함" → "대기" 되돌리기 버튼 — 모달 좌측 정렬해서 [취소][저장]과 분리.
   파괴적이지만 의도가 "되돌리기"라 위험색(빨강)은 과함. 차분한 회색 + 우측 마진 auto로 분리. */
.bp-revert-pending-btn {
  margin-right: auto;
  color: #475569;
  border-color: #cbd5e1;
}
.bp-revert-pending-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
  border-color: #94a3b8;
}
.bp-method-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  font-size: 12.5px;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
  transition: background .12s, border-color .12s, color .12s;
}
.bp-method-chip:hover { background: #ecfeff; border-color: #7dd3fc; color: #0f7f97; }
.bp-method-chip[data-state="skip"] {
  color: #94a3b8;
  background: #f1f5f9;
  text-decoration: line-through;
  text-decoration-color: #cbd5e1;
}
.bp-method-chip[data-state="skip"]:hover { text-decoration: none; }
.bp-method-chip .bp-method-chip-state {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
}
.bp-method-chip[data-state="skip"] .bp-method-chip-state {
  background: #fee2e2;
  color: #b91c1c;
}

/* 빠른 기록 폼 영역 (탭 안 inline) */
.bp-todo-quickrecord {
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.bp-todo-quickrecord-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}
.bp-todo-quickrecord-head small {
  font-size: 11.5px;
  font-weight: 600;
  color: #94a3b8;
}

/* 최근 활동 inline */
.bp-todo-recent {
  padding: 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.bp-todo-recent-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
}
.bp-todo-recent-head a {
  font-size: 11.5px;
  font-weight: 700;
  color: #0f7f97;
  text-decoration: none;
  cursor: pointer;
}
.bp-todo-recent-head a:hover { text-decoration: underline; }

/* sticky 단계 전환 영역 (탭 본문 안에 위치) — footer 성격으로 본문 카드와 차별화.
   보더 제거. 분리 신호는 그림자(위쪽으로 떠오른 인상) + 옅은 회색 배경만으로. */
.bp-stage-transition-sticky {
  position: sticky;
  bottom: 0;
  z-index: 4;
  margin-top: 8px;
  padding: 14px 16px;
  background: rgba(248,250,252,0.96);
  backdrop-filter: blur(6px);
  border: none;
  border-radius: 10px;
  box-shadow: 0 -4px 12px rgba(15,23,42,.05);
}
.bp-stage-transition-sticky .bp-stage-transition,
.bp-stage-transition-sticky .bp-check-decision-buttons {
  margin: 0;
  padding: 0;       /* 레거시 padding 14px 16px 4px 제거 */
  border-top: 0;    /* 레거시 border-top 1px solid 제거 — footer 안 가로 라인 원인 */
}
/* 폼 focus 시 sticky 해제 (모바일 가상 키보드 가림 방지) */
.bp-detail-tabpanel:has(input:focus, textarea:focus, [contenteditable="true"]:focus)
  .bp-stage-transition-sticky {
  position: static;
  box-shadow: none;
}

/* 빈 상태 카피 (활동 0건일 때만) */
.bp-tab-empty-hint {
  padding: 18px;
  text-align: center;
  color: #64748b;
  font-size: 13px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  line-height: 1.6;
}
.bp-tab-empty-hint strong {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
  font-size: 14px;
}

/* ─── [기록] 탭 ─── */
.bp-record-tab-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  color: #64748b;
}
.bp-record-tab-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
}

/* ─── [정보] 탭 — 폼 본격화 ─── */
.bp-info-section {
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
}
.bp-info-section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
}
.bp-info-section-head h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
}
.bp-info-section-head small {
  font-size: 11.5px;
  color: #94a3b8;
}
.bp-info-meta {
  margin-top: 4px;
  padding: 8px 12px;
  font-size: 11.5px;
  color: #94a3b8;
  background: #f8fafc;
  border-radius: 6px;
  text-align: right;
}

/* 모바일 fallback (~720px 이하 : .bp-detail-shell 단일 컬럼은 이미 됨) */
@media (max-width: 720px) {
  .bp-stage-strip-slim {
    /* 가로 스크롤은 데스크톱에서도 활성, 모바일에선 그대로 */
  }
  .bp-signal-row {
    flex-direction: column;
    gap: 4px;
  }
  .bp-signal-divider { display: none; }
  .bp-detail-tabs {
    flex-wrap: nowrap;
  }
  .bp-detail-tab {
    padding: 9px 8px;
    font-size: 12.5px;
  }
  .bp-stage-objective-large strong { font-size: 17px; }
  .bp-stage-meta-row { font-size: 12px; }
  .bp-stage-meta-row .bp-meta-jump { margin-left: 0; }
}

/* ─────────────────────────────────────────────────────────────
   활동 기록 모달의 이미지 첨부 + 활동 카드의 첨부 노출
   ───────────────────────────────────────────────────────────── */

.bp-attachment-section {
  margin-top: 14px;
  padding: 14px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
}
.bp-attachment-section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}
.bp-attachment-section-head small {
  font-size: 11px;
  font-weight: 500;
  color: #94a3b8;
}
.bp-attachment-controls {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}

.bp-attachments-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.bp-attachments-empty {
  padding: 14px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}
.bp-attachment-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}
.bp-attachment-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
  display: block;
}
.bp-attachment-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.7);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  line-height: 1;
}
.bp-attachment-remove:hover { background: rgba(220, 38, 38, 0.9); }
.bp-attachment-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
  background: #f1f5f9;
}
.bp-attachment-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e1;
  border-top-color: #0f7f97;
  border-radius: 50%;
  animation: bp-spin 0.8s linear infinite;
}
@keyframes bp-spin { to { transform: rotate(360deg); } }

/* 활동 카드의 첨부 이미지 그리드 */
.bp-activity-attachments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 6px;
  margin: 8px 0 4px;
}
.bp-activity-attachments img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  cursor: zoom-in;
  background: #f8fafc;
  transition: transform .12s, box-shadow .12s;
}
.bp-activity-attachments img:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(15,23,42,.12);
}

/* ═════════════════════════════════════════════════════════════
   BNT 단계 메서드 관리 (.bsm-*) — bnt_stage_methods 편집 페이지
   ═════════════════════════════════════════════════════════════ */

#page-bnt-stage-methods { padding: 20px 24px 60px; max-width: 1080px; margin: 0 auto; }

.bsm-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.bsm-title { font-size: 18px; font-weight: 800; color: #0f172a; }
.bsm-subtitle { margin-top: 4px; font-size: 12.5px; color: #64748b; line-height: 1.5; }
.bsm-toolbar-actions { display: flex; align-items: center; gap: 10px; }
.bsm-autosave-indicator {
  font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px;
  transition: opacity .12s;
}
.bsm-autosave-indicator[data-state="saving"] { background: #fef3c7; color: #92400e; }
.bsm-autosave-indicator[data-state="saved"]  { background: #ecfdf5; color: #047857; }
.bsm-autosave-indicator[data-state="error"]  { background: #fee2e2; color: #b91c1c; }

/* 단계 탭 */
.bsm-stage-tabs {
  display: flex; gap: 2px; padding: 4px;
  background: #f1f5f9; border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: 14px;
}
.bsm-tab {
  flex: 1;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 12px; font-size: 13px; font-weight: 700;
  color: #64748b; background: transparent; border: none; border-radius: 7px;
  cursor: pointer; transition: background .12s, color .12s;
}
.bsm-tab:hover { color: #0f7f97; background: rgba(255,255,255,.6); }
.bsm-tab.active {
  color: #0f7f97; background: #ffffff;
  box-shadow: 0 1px 2px rgba(15,23,42,.06);
}
.bsm-tab-count {
  font-size: 11px; font-weight: 700; padding: 1px 7px;
  background: #e2e8f0; color: #64748b; border-radius: 999px;
}
.bsm-tab.active .bsm-tab-count { background: #ecfeff; color: #0f7f97; }

/* 단계 목표 */
.bsm-stage-objective {
  padding: 14px 18px;
  margin-bottom: 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-left: 4px solid #0f7f97;
  border-radius: 8px;
}
.bsm-stage-title { font-size: 18px; font-weight: 800; color: #0f172a; margin-bottom: 4px; }
.bsm-stage-desc { font-size: 13px; line-height: 1.55; color: #475569; }

/* 그룹 카드 */
.bsm-groups { display: grid; gap: 14px; }
.bsm-group {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.bsm-group-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.bsm-group-label-edit {
  font-size: 14px; font-weight: 800; color: #0f172a;
  padding: 2px 6px; border-radius: 4px; outline: none;
  flex: 1; min-width: 0;
}
.bsm-group-label-edit[contenteditable="true"]:hover { background: #fef9c3; }
.bsm-group-label-edit[contenteditable="true"]:focus { background: #fef9c3; outline: 2px solid #facc15; }
.bsm-group-count {
  font-size: 11px; font-weight: 700; padding: 1px 8px;
  background: #ecfeff; color: #0f7f97; border: 1px solid #a5f3fc; border-radius: 999px;
}

/* 메서드 영역 */
.bsm-method-list { padding: 8px 12px; display: grid; gap: 8px; min-height: 32px; }
.bsm-method {
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: border-color .12s, box-shadow .12s;
}
.bsm-method:hover { border-color: #cbd5e1; box-shadow: 0 1px 3px rgba(15,23,42,.05); }
.bsm-method-head {
  display: flex; align-items: flex-start; gap: 8px;
}
.bsm-method-label-wrap { flex: 1; min-width: 0; display: grid; gap: 4px; }
.bsm-method-label {
  font-size: 13.5px; font-weight: 700; color: #0f172a;
  padding: 2px 6px; border-radius: 4px; outline: none;
}
.bsm-method-label[contenteditable="true"]:hover { background: #fef9c3; }
.bsm-method-label[contenteditable="true"]:focus { background: #fef9c3; outline: 2px solid #facc15; }
.bsm-method-detail {
  font-size: 12.5px; color: #475569; line-height: 1.55;
  padding: 4px 6px; border-radius: 4px; outline: none;
  min-height: 18px;
  white-space: pre-wrap;
}
.bsm-method-detail[contenteditable="true"]:hover { background: #f8fafc; }
.bsm-method-detail[contenteditable="true"]:focus { background: #fefce8; outline: 1px solid #facc15; }
.bsm-method-detail:empty::before {
  content: attr(data-placeholder);
  color: #cbd5e1;
}

/* 체크리스트 */
.bsm-checklist {
  list-style: none; padding: 6px 0 0; margin: 8px 0 0;
  display: grid; gap: 4px;
  border-top: 1px dashed #e2e8f0;
}
.bsm-checklist-item {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 0;
}
.bsm-checklist-text {
  flex: 1; font-size: 12.5px; color: #334155;
  padding: 3px 8px; border-radius: 4px; outline: none;
}
.bsm-checklist-text[contenteditable="true"]:hover { background: #f8fafc; }
.bsm-checklist-text[contenteditable="true"]:focus { background: #fefce8; outline: 1px solid #facc15; }
.bsm-checklist-text::before { content: '\2611  '; color: #94a3b8; }
.bsm-checklist-add { padding: 4px 0; }
.bsm-checklist-add button {
  font-size: 11.5px; font-weight: 600; color: #64748b;
  background: transparent; border: 1px dashed #cbd5e1; border-radius: 6px;
  padding: 4px 10px; cursor: pointer;
}
.bsm-checklist-add button:hover { color: #0f7f97; border-color: #0f7f97; background: #ecfeff; }

/* 추가 버튼 */
.bsm-add-method-btn,
.bsm-add-group-btn {
  display: block; width: 100%;
  padding: 10px 14px;
  margin: 0;
  font-size: 12.5px; font-weight: 700; color: #64748b;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 0;
  cursor: pointer;
  transition: background .12s, color .12s, border-color .12s;
}
.bsm-add-method-btn { border: none; border-top: 1px dashed #e2e8f0; }
.bsm-add-method-btn:hover,
.bsm-add-group-btn:hover {
  color: #0f7f97; background: #ecfeff; border-color: #0f7f97;
}
.bsm-add-group-btn {
  margin-top: 8px;
  border-radius: 8px;
  padding: 14px;
}

/* 드래그 핸들 */
.bsm-drag-handle {
  cursor: grab;
  font-size: 14px;
  color: #cbd5e1;
  user-select: none;
  flex-shrink: 0;
  padding: 0 2px;
  line-height: 1;
}
.bsm-drag-handle:hover { color: #64748b; }
.bsm-drag-handle:active { cursor: grabbing; }
.bsm-group-drag { font-size: 16px; padding: 0 4px; }
.bsm-method-drag { padding-top: 4px; }
.bsm-checklist-drag { font-size: 12px; }

/* 아이콘 버튼 */
.bsm-btn-icon-danger {
  flex-shrink: 0;
  width: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700;
  color: #94a3b8; background: transparent;
  border: 1px solid transparent; border-radius: 4px;
  cursor: pointer;
  transition: color .12s, background .12s, border-color .12s;
}
.bsm-btn-icon-danger:hover { color: #b91c1c; background: #fee2e2; border-color: #fca5a5; }
.bsm-btn-icon-mini {
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; color: #cbd5e1; background: transparent; border: none; border-radius: 3px;
  cursor: pointer;
}
.bsm-btn-icon-mini:hover { color: #b91c1c; background: #fee2e2; }

/* 빈 상태 */
.bsm-empty {
  padding: 40px 20px;
  text-align: center;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
}
.bsm-empty-text { font-size: 13px; color: #64748b; margin-bottom: 12px; }
.bsm-empty-sub { font-size: 12px; color: #94a3b8; }
.bsm-empty-row { padding: 10px; text-align: center; font-size: 11.5px; color: #cbd5e1; }
.bsm-btn-primary {
  padding: 8px 16px;
  font-size: 12.5px; font-weight: 700;
  color: #ffffff; background: #0f7f97; border: 1px solid #0f7f97; border-radius: 8px;
  cursor: pointer;
}
.bsm-btn-primary:hover { background: #0c6478; }

/* SortableJS 드래그 중 시각 */
.sortable-ghost { opacity: 0.4; }
.sortable-chosen { box-shadow: 0 4px 12px rgba(15,23,42,.15); }
.sortable-drag { cursor: grabbing; }

@media (max-width: 720px) {
  #page-bnt-stage-methods { padding: 14px 12px 60px; }
  .bsm-toolbar { flex-direction: column; gap: 10px; }
  .bsm-stage-tabs { flex-wrap: wrap; }
  .bsm-tab { flex: 1 1 30%; padding: 8px 4px; font-size: 11.5px; }
}

