/* ============ 월 마감 (monthly.js · cost.js) ============ */
#page-cost {
  --mc-plus: #1f8a4c;
  --mc-minus: #d70015;
  --mc-line: var(--hairline, rgba(0, 0, 0, 0.08));
  --mc-soft: var(--text-soft, #6e6e73);
  --mc-blue: #0066cc;
  --mc-card: #fff;
}

/* 헤더: 기간 선택 + 화면 전환 */
#page-cost .mc-head-actions { gap: 10px !important; }
#page-cost .mc-period { display: flex; align-items: center; gap: 6px; }
#page-cost .mc-period select { min-width: 84px; }
#page-cost .mc-seg {
  display: inline-flex;
  padding: 3px;
  border-radius: 11px;
  background: rgba(118, 118, 128, 0.12);
}
#page-cost .mc-seg-btn {
  height: 30px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #1d1d1f);
  cursor: pointer;
  white-space: nowrap;
}
#page-cost .mc-seg-btn.is-on {
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}
#page-cost .mc-view[hidden] { display: none !important; }
#page-cost .mc-view { min-width: 0; }

/* 지출 정리: 규칙 버튼을 단계 줄 오른쪽으로 */
#page-cost .cost-steps { flex-wrap: wrap; gap: 8px 0; }
#page-cost .cost-steps .cost-btn-rules { margin-left: 16px; }
#page-cost .cost-noncost {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 6px;
  background: #f2f2f7;
  font-size: 11px;
  font-weight: 600;
  color: var(--mc-soft);
}
#page-cost .cost-deposits { margin-top: 20px; }
#page-cost .cost-dep-empty {
  margin: 16px 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #f5f5f7;
  font-size: 13px;
  color: var(--mc-soft);
}
#page-cost .cost-dep-bank {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 4px 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #f5f5f7;
  font-size: 13px;
  color: var(--mc-soft);
}
#page-cost .cost-dep-bank b { color: var(--text, #1d1d1f); font-weight: 700; margin-left: 4px; }
#page-cost .cost-dep-group {
  border: 1px solid var(--mc-line);
  border-radius: 12px;
  margin-bottom: 8px;
  overflow: hidden;
}
#page-cost .cost-dep-group summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fafafa;
  cursor: pointer;
  font-size: 13px;
  list-style: none;
}
#page-cost .cost-dep-group summary::-webkit-details-marker { display: none; }
#page-cost .cost-dep-type { font-weight: 700; }
#page-cost .cost-dep-cnt { color: var(--mc-soft); font-size: 12px; }
#page-cost .cost-dep-sum { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
#page-cost .cost-dep-table { width: 100%; border-collapse: collapse; font-size: 12px; }
#page-cost .cost-dep-table td { padding: 7px 14px; border-top: 1px solid #f2f2f7; }
#page-cost .cost-dep-table td.d { width: 56px; color: var(--mc-soft); white-space: nowrap; }
#page-cost .cost-dep-table td.a { text-align: right; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
#page-cost .cost-dep-table td:last-child { width: 150px; }
#page-cost .cost-dep-table select { width: 100%; border: 1px solid var(--mc-line); border-radius: 8px; padding: 4px 6px; font: inherit; font-size: 12px; background: #fff; }

/* ---------- 리포트 공통 ---------- */
#page-cost .mc-loading,
#page-cost .mc-empty-s { font-size: 13px; color: var(--mc-soft); line-height: 1.55; }
#page-cost .mc-loading { padding: 40px 0; text-align: center; }
#page-cost .mc-card {
  background: var(--mc-card);
  border: 1px solid var(--mc-line);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
  min-width: 0;
}
#page-cost .mc-card-h {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-bottom: 12px;
}
#page-cost .mc-card-h h3 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
#page-cost .mc-card-hs { font-size: 12px; color: var(--mc-soft); }
#page-cost .mc-card-h .mc-btn { margin-left: auto; }
#page-cost .mc-hint { margin-top: 10px; font-size: 12px; line-height: 1.5; color: var(--mc-soft); }
#page-cost .mc-note { margin: -4px 0 14px; font-size: 12px; color: var(--mc-soft); }
#page-cost .mc-plus { color: var(--mc-plus); }
#page-cost .mc-minus { color: var(--mc-minus); }
#page-cost .mc-empty { text-align: center; padding: 48px 20px; }
#page-cost .mc-empty-t { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
#page-cost .mc-empty .mc-btn { margin-top: 16px; }

#page-cost .mc-btn {
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid var(--mc-line);
  background: #fff;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--text, #1d1d1f);
  cursor: pointer;
  white-space: nowrap;
}
#page-cost .mc-btn--primary { background: var(--mc-blue); border-color: var(--mc-blue); color: #fff; }
#page-cost .mc-btn--ghost { background: transparent; }
#page-cost .mc-btn--sm { height: 30px; padding: 0 12px; font-size: 12px; }
#page-cost .mc-btn:disabled { opacity: 0.45; cursor: default; }

/* 월 목록 */
#page-cost .mc-months {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 12px;
  scrollbar-width: none;
}
#page-cost .mc-months::-webkit-scrollbar { display: none; }
#page-cost .mc-month {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 78px;
  padding: 7px 12px;
  border: 1px solid var(--mc-line);
  border-radius: 12px;
  background: #fff;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
#page-cost .mc-month-m { font-size: 14px; font-weight: 700; }
#page-cost .mc-month-st { font-size: 11px; color: var(--mc-soft); white-space: nowrap; }
#page-cost .mc-month.is-closed .mc-month-st { color: var(--mc-plus); }
#page-cost .mc-month.is-sales .mc-month-st { color: #b25000; }
#page-cost .mc-month.is-now .mc-month-st { color: var(--mc-blue); }
#page-cost .mc-month.is-none { opacity: 0.55; }
#page-cost .mc-month.is-on { border-color: var(--mc-blue); box-shadow: inset 0 0 0 1px var(--mc-blue); }

/* 마감 바 */
#page-cost .mc-closebar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 14px;
  background: #f5f5f7;
}
#page-cost .mc-closebar.is-closed { background: #eaf7ee; }
#page-cost .mc-closebar-t { font-size: 13px; font-weight: 700; white-space: nowrap; }
#page-cost .mc-closebar-t small { font-weight: 500; color: var(--mc-soft); margin-left: 4px; }
#page-cost .mc-checks { display: flex; flex-wrap: wrap; gap: 6px; flex: 1 1 auto; min-width: 0; }
#page-cost .mc-check {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  background: #fff;
  white-space: nowrap;
}
#page-cost .mc-check.is-ok { color: var(--mc-plus); }
#page-cost .mc-check.is-warn { color: #b25000; background: #fff4e5; }
#page-cost .mc-closebar .mc-btn { margin-left: auto; }

/* KPI */
#page-cost .mc-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
#page-cost .mc-kpi {
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--mc-line);
  border-radius: 16px;
  background: #fff;
}
#page-cost .mc-kpi-l { font-size: 13px; font-weight: 600; color: var(--mc-soft); }
#page-cost .mc-kpi-l small { font-size: 11px; font-weight: 500; margin-left: 4px; }
#page-cost .mc-kpi-v {
  margin: 6px 0 4px;
  font-size: clamp(22px, 2.2vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#page-cost .mc-kpi-s { font-size: 12px; color: var(--mc-soft); line-height: 1.5; }
#page-cost .mc-kpi--main.is-plus { background: #f0faf3; border-color: #cdebd6; }
#page-cost .mc-kpi--main.is-plus .mc-kpi-v { color: var(--mc-plus); }
#page-cost .mc-kpi--main.is-minus { background: #fff2f2; border-color: #f6cfd2; }
#page-cost .mc-kpi--main.is-minus .mc-kpi-v { color: var(--mc-minus); }
#page-cost .mc-kpi--main.is-wait { background: #f5f5f7; }
#page-cost .mc-kpi--main.is-wait .mc-btn { margin-top: 8px; }
#page-cost .mc-d { margin-left: 4px; font-weight: 700; white-space: nowrap; }
#page-cost .mc-d.is-good { color: var(--mc-plus); }
#page-cost .mc-d.is-bad { color: var(--mc-minus); }
#page-cost .mc-d.is-flat { color: var(--mc-soft); font-weight: 500; }

/* 본문 2단 */
#page-cost .mc-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0 16px;
  align-items: start;
}
@media (min-width: 1200px) {
  #page-cost .mc-grid { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  #page-cost .mc-grid--recon { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
}
#page-cost .mc-col { min-width: 0; }

/* 분야별 지출 */
#page-cost .mc-cat-head,
#page-cost .mc-cat-row {
  display: grid;
  grid-template-columns: minmax(120px, 1.3fr) minmax(60px, 1.4fr) 84px 64px 74px;
  align-items: center;
  gap: 10px;
}
#page-cost .mc-cat-head {
  padding: 0 6px 6px;
  font-size: 11px;
  color: var(--mc-soft);
  border-bottom: 1px solid var(--mc-line);
}
#page-cost .mc-cat-head span:nth-child(n + 3) { text-align: right; }
#page-cost .mc-cat { border-bottom: 1px solid #f2f2f7; }
#page-cost .mc-cat-row {
  width: 100%;
  padding: 9px 6px;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 8px;
}
#page-cost .mc-cat-row:hover { background: #f7f7f9; }
#page-cost .mc-cat-name { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; min-width: 0; }
#page-cost .mc-cat-name i { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 3px; }
#page-cost .mc-cat-bar { height: 8px; border-radius: 4px; background: #f2f2f7; overflow: hidden; }
#page-cost .mc-cat-bar span { display: block; height: 100%; border-radius: 4px; }
#page-cost .mc-cat-amt,
#page-cost .mc-cat-pct,
#page-cost .mc-cat-d {
  text-align: right;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#page-cost .mc-cat-amt { font-weight: 700; }
#page-cost .mc-cat-pct { color: var(--mc-soft); }
#page-cost .mc-cat-d .mc-d { margin: 0; font-size: 12px; }
#page-cost .mc-cat-items { padding: 2px 6px 10px 23px; }
#page-cost .mc-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 12.5px;
  border-bottom: 1px dashed #ececf0;
}
#page-cost .mc-item:last-child { border-bottom: 0; }
#page-cost .mc-item span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#page-cost .mc-item small { color: var(--mc-soft); }
#page-cost .mc-item b { font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
#page-cost .mc-cat-extra {
  display: flex;
  justify-content: space-between;
  padding: 9px 6px;
  font-size: 13px;
  color: var(--mc-soft);
}
#page-cost .mc-cat-extra small { font-size: 11px; margin-left: 4px; }
#page-cost .mc-cat-extra b { color: var(--text, #1d1d1f); font-variant-numeric: tabular-nums; }

/* 번 돈 → 통장 */
#page-cost .mc-flow-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 9px 0;
  border-bottom: 1px solid #f2f2f7;
}
#page-cost .mc-flow-t { font-size: 13px; font-weight: 600; }
#page-cost .mc-flow-d { font-size: 11.5px; color: var(--mc-soft); margin-top: 2px; line-height: 1.4; }
#page-cost .mc-flow-v { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
#page-cost .mc-flow-row.is-strong .mc-flow-t { font-size: 14px; font-weight: 700; }
#page-cost .mc-flow-row.is-strong .mc-flow-v { font-size: 17px; }
#page-cost .mc-flow-row.is-total { border-bottom: 0; border-top: 2px solid var(--text, #1d1d1f); margin-top: 2px; }

/* AI 비서 */
#page-cost .mc-ai-text { font-size: 13.5px; line-height: 1.65; }
#page-cost .mc-ai-text h4 { margin: 14px 0 4px; font-size: 13px; font-weight: 700; color: var(--mc-blue); }
#page-cost .mc-ai-text h4:first-child { margin-top: 0; }
#page-cost .mc-ai-text p { margin: 0 0 6px; }
#page-cost .mc-ai-text ul { margin: 0 0 4px; padding-left: 18px; }
#page-cost .mc-ai-text li { margin: 2px 0; }
#page-cost .mc-ai-busy { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--mc-soft); padding: 12px 0; }
#page-cost .mc-spin {
  width: 16px; height: 16px;
  border: 2px solid #d1d1d6; border-top-color: var(--mc-blue);
  border-radius: 50%;
  animation: mc-spin 0.8s linear infinite;
}
@keyframes mc-spin { to { transform: rotate(360deg); } }

/* 월별 흐름 */
#page-cost .mc-legend { font-size: 12px; color: var(--mc-soft); display: inline-flex; align-items: center; gap: 4px; }
#page-cost .mc-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-left: 6px; }
#page-cost .mc-legend i.is-s,
#page-cost .mc-tr-b.is-s { background: #0066cc; }
#page-cost .mc-legend i.is-c,
#page-cost .mc-tr-b.is-c { background: #c7c7cc; }
#page-cost .mc-trend { display: flex; align-items: stretch; height: 200px; }
#page-cost .mc-tr-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
  padding: 4px 2px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
#page-cost .mc-tr-col:hover { background: #f7f7f9; }
#page-cost .mc-tr-col.is-on { background: #eef5ff; }
#page-cost .mc-tr-p { font-size: 11px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
#page-cost .mc-tr-p.is-na { color: #c7c7cc; }
#page-cost .mc-tr-bars { flex: 1 1 auto; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
#page-cost .mc-tr-b { width: min(16px, 34%); border-radius: 4px 4px 0 0; min-height: 2px; }
#page-cost .mc-tr-b.is-na { min-height: 0; }
#page-cost .mc-tr-m { font-size: 12px; color: var(--mc-soft); }

/* 매출 대조 표 */
#page-cost .mc-table-wrap { overflow-x: auto; }
#page-cost .mc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
#page-cost .mc-table th {
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  color: var(--mc-soft);
  text-align: right;
  border-bottom: 1px solid var(--mc-line);
  white-space: nowrap;
}
#page-cost .mc-table th:first-child,
#page-cost .mc-table td:first-child { text-align: left; }
#page-cost .mc-table td {
  padding: 10px;
  text-align: right;
  border-bottom: 1px solid #f2f2f7;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
#page-cost .mc-table td:first-child { white-space: normal; }
#page-cost .mc-table tfoot td { border-bottom: 0; border-top: 1px solid var(--mc-line); }
#page-cost .mc-td-s { font-size: 11px; color: var(--mc-soft); margin-top: 2px; font-weight: 400; }
#page-cost .mc-v { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; }
#page-cost .mc-v.is-ok { background: #eaf7ee; color: var(--mc-plus); }
#page-cost .mc-v.is-warn { background: #fff4e5; color: #b25000; }
#page-cost .mc-v.is-bad { background: #ffeef0; color: var(--mc-minus); }
#page-cost .mc-v.is-na { color: var(--mc-soft); }
#page-cost .mc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
#page-cost .mc-chip { padding: 4px 10px; border-radius: 999px; background: #fff4e5; color: #b25000; font-size: 12px; font-weight: 600; }

/* 좁은 PC */
@media (max-width: 1100px) {
  #page-cost .mc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1800px) {
  #page-cost .mc-grid:not(.mc-grid--recon):not(.mc-grid--mk) { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); }
  #page-cost .mc-grid:not(.mc-grid--recon):not(.mc-grid--mk) > .mc-col:first-child {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    gap: 0 16px;
    align-items: start;
  }
  #page-cost .mc-kpi-v { font-size: 36px; }
  #page-cost .mc-trend { height: 240px; }
}

/* 모바일 */
@media (max-width: 768px) {
  #page-cost .mc-head-actions { width: 100%; flex-wrap: wrap !important; }
  #page-cost .mc-period { flex: 1 1 100%; }
  #page-cost .mc-period select { flex: 1 1 0; }
  #page-cost .mc-seg { flex: 1 1 100%; }
  #page-cost .mc-seg-btn { flex: 1 1 0; padding: 0 6px; }
  #page-cost .mc-kpi-v { font-size: 20px !important; }
  #page-cost .mc-kpis { gap: 8px; }
  #page-cost .mc-kpi { padding: 12px 14px; }
  #page-cost .mc-card { padding: 14px; }
  #page-cost .mc-cat-head { display: none; }
  #page-cost .mc-cat-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  #page-cost .mc-cat-row .mc-cat-bar,
  #page-cost .mc-cat-row .mc-cat-d { display: none; }
  #page-cost .mc-closebar .mc-btn { margin-left: 0; }
}

/* 지출 정리: 저장 버튼 줄은 화면 아래에 붙어 있게 */
#page-cost .cost-action-bar--sticky {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px -24px -24px;
  padding: 14px 24px;
  background: rgba(255, 255, 255, 0.94);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--mc-line);
  border-radius: 0 0 18px 18px;
}
#page-cost .cost-action-btns { display: flex; gap: 10px; flex-wrap: wrap; }
#page-cost .cost-save-btn { min-width: 120px; }
#page-cost .cost-save-btn.is-saved { background: #1f8a4c !important; border-color: #1f8a4c !important; }

#page-cost .mc-dim { color: var(--mc-soft); }
#page-cost .mc-warn {
  margin: 0 0 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: #fff4e5;
  color: #8a4b00;
  font-size: 12.5px;
  line-height: 1.5;
}
#page-cost .mc-month.is-card .mc-month-st { color: var(--mc-minus); }

/* ---------- 비서 브리핑 (앞으로의 방향) ---------- */
#page-cost .mc-plan { margin-top: 8px; }
#page-cost .mc-plan-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin: 8px 0 12px; }
#page-cost .mc-plan-head h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
#page-cost .mc-plan-head span { font-size: 13px; color: var(--mc-soft); }
#page-cost .mc-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  align-items: stretch;
}
@media (min-width: 1600px) {
  #page-cost .mc-plan-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  #page-cost .mc-plan-grid { grid-template-columns: minmax(0, 1fr); }
}
#page-cost .mc-plan-card { display: flex; flex-direction: column; }
#page-cost .mc-big {
  font-size: clamp(26px, 2.2vw, 36px);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin: 2px 0 6px;
}
#page-cost .mc-plan-sub { font-size: 12.5px; line-height: 1.55; color: var(--mc-soft); margin: 4px 0 8px; }
#page-cost .mc-plan-sub b { color: var(--text, #1d1d1f); }
#page-cost .mc-plan-rows { margin-top: 2px; }
#page-cost .mc-plan-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px solid #f2f2f7;
  font-size: 13px;
}
#page-cost .mc-plan-row span { min-width: 0; }
#page-cost .mc-plan-row small { display: block; font-size: 11px; color: var(--mc-soft); margin-top: 1px; }
#page-cost .mc-plan-row b { font-variant-numeric: tabular-nums; white-space: nowrap; font-weight: 700; }
#page-cost .mc-plan-row.is-total { border-bottom: 0; border-top: 2px solid var(--text, #1d1d1f); margin-top: 4px; font-size: 14px; }
#page-cost .mc-plan-row.is-total b { font-size: 16px; }
#page-cost .mc-dirs { margin: 0; padding: 0; list-style: none; counter-reset: dir; }
#page-cost .mc-dirs li {
  counter-increment: dir;
  position: relative;
  padding: 8px 0 8px 30px;
  border-bottom: 1px solid #f2f2f7;
  font-size: 13px;
  line-height: 1.5;
}
#page-cost .mc-dirs li:last-child { border-bottom: 0; }
#page-cost .mc-dirs li::before {
  content: counter(dir);
  position: absolute;
  left: 0;
  top: 9px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--mc-blue);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
#page-cost .mc-dirs li b { display: block; font-size: 13.5px; }
#page-cost .mc-dirs li span { color: var(--mc-soft); font-size: 12.5px; }
#page-cost .mc-plan .mc-ai { margin-top: 0; }
@media (min-width: 1600px) {
  #page-cost .mc-plan .mc-ai-text { column-count: 2; column-gap: 40px; }
  #page-cost .mc-plan .mc-ai-text h4 { break-after: avoid; }
  #page-cost .mc-plan .mc-ai-text ul { break-inside: avoid; }
}

/* 비용 신호등 */
#page-cost .mc-sig {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(80px, 1.6fr) 44px 40px;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #f2f2f7;
  font-size: 13px;
}
#page-cost .mc-sig:last-child { border-bottom: 0; }
#page-cost .mc-sig-n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#page-cost .mc-sig-bar { position: relative; height: 8px; border-radius: 4px; background: #f2f2f7; }
#page-cost .mc-sig-bar i { position: absolute; top: 0; bottom: 0; background: #d1d1d6; border-radius: 4px; }
#page-cost .mc-sig-bar b { position: absolute; top: -3px; width: 4px; height: 14px; margin-left: -2px; border-radius: 2px; background: var(--mc-plus); }
#page-cost .mc-sig.is-hi .mc-sig-bar b { background: var(--mc-minus); }
#page-cost .mc-sig.is-lo .mc-sig-bar b { background: #ff9f0a; }
#page-cost .mc-sig-v { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
#page-cost .mc-sig-s { font-size: 12px; font-weight: 600; text-align: right; }
#page-cost .mc-sig.is-ok .mc-sig-s { color: var(--mc-plus); }
#page-cost .mc-sig.is-hi .mc-sig-s { color: var(--mc-minus); }
#page-cost .mc-sig.is-lo .mc-sig-s { color: #b25000; }

#page-cost .mc-item--wrap span { white-space: normal; line-height: 1.45; }

/* 마케팅 성과 */
#page-cost .mc-mk { margin-top: 8px; }
#page-cost .mc-kpis--mk { margin-bottom: 12px; }
#page-cost .mc-mk-ins ul { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.6; }
#page-cost .mc-mk-ins li + li { margin-top: 4px; }
#page-cost .mc-mk-t { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
#page-cost .mc-mk-t th, #page-cost .mc-mk-t td { padding: 7px 6px; text-align: right; border-bottom: 1px solid var(--mc-line, rgba(0,0,0,.06)); white-space: nowrap; }
#page-cost .mc-mk-t th:first-child { text-align: left; font-weight: 600; }
#page-cost .mc-mk-t thead th { font-size: 11px; font-weight: 600; color: var(--mc-soft); }
#page-cost .mc-mk-t td:nth-child(2) { width: 32%; }
#page-cost .mc-mk-t--m td:nth-child(2) { width: auto; }
#page-cost .mc-mk-t tfoot th, #page-cost .mc-mk-t tfoot td { font-weight: 700; border-bottom: 0; }
#page-cost .mc-mk-t tfoot tr.is-sub th, #page-cost .mc-mk-t tfoot tr.is-sub td { font-weight: 500; color: var(--mc-soft); font-size: 12px; }
#page-cost .mc-mk-t tr.is-on th, #page-cost .mc-mk-t tr.is-on td { background: rgba(0, 102, 204, 0.06); font-weight: 700; }
#page-cost .mc-mk-bar { position: relative; display: block; height: 10px; border-radius: 5px; background: rgba(0,0,0,.04); overflow: hidden; }
#page-cost .mc-mk-bar i { position: absolute; left: 0; top: 0; bottom: 0; background: #b7d4f5; border-radius: 5px; }
#page-cost .mc-mk-bar i.is-b { background: #0a72d8; }
#page-cost .mc-legend i.is-in { background: #b7d4f5; }
#page-cost .mc-legend i.is-bk { background: #0a72d8; }
#page-cost .mc-mk .mc-card-h .mc-btn { margin-left: auto; }
#page-cost .mc-mk-edit { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--mc-line, rgba(0,0,0,.1)); }
#page-cost .mc-mk-kw { display: grid; grid-template-columns: 90px 1fr; align-items: center; gap: 8px; margin-top: 6px; font-size: 13px; }
#page-cost .mc-mk-kw input { height: 32px; padding: 0 10px; border: 1px solid #d2d2d7; border-radius: 8px; font: inherit; font-size: 13px; min-width: 0; }
#page-cost .mc-mk-vend { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#page-cost .mc-mk-vend .mc-card-hs { width: 100%; }
#page-cost .mc-mk-chip { font-size: 12px; padding: 4px 8px; border-radius: 999px; background: #f2f2f7; color: #3a3a3c; }
#page-cost .mc-mk-chip.is-linked { background: #e8f2fd; color: #0a5bb0; }
#page-cost .mc-mk-edit-a { display: flex; gap: 8px; margin-top: 12px; }
@media (min-width: 1100px) { #page-cost .mc-grid--mk { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
@media (max-width: 768px) {
  #page-cost .mc-mk-t:not(.mc-mk-t--m) td:nth-child(2) { display: none; }
  #page-cost .mc-mk-t:not(.mc-mk-t--m) thead th:nth-child(2) { display: none; }
}
#page-cost .mc-mk-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media (max-width: 768px) { #page-cost .mc-mk-t--m th, #page-cost .mc-mk-t--m td { padding: 7px 4px; font-size: 12px; } }
