html,
body {
  font-family: "Pretendard" !important;
}

/* 좌측 패널 아이콘 */
.menu-icon {
  stroke: #000;
}
.Mui-selected .menu-icon {
  color: #778beb;
  stroke: #778beb;
}

.rct-collapse *,
.rct-checkbox *,
.rct-node-icon * {
  width: 24px !important;
}

/* 매뉴얼 버튼 위치  */
i.btn-user-guide {
  position: fixed;
  display: block;
  width: 56px;
  height: 56px;
  background: url(/icons/btn_user_guide.svg) no-repeat center;
  background-size: 56px;
  bottom: 100pt;
  left: 24px;
  z-index: 1000000 !important;
}

/* 채널톡 위치 조정 */

#ch-plugin * {
  /* display: none !important; */
}

#custom-channel-launcher {
  position: fixed;
  display: block;
  width: 66px;
  height: 66px;
  background: url(/icons/btn_channel_talk.png) no-repeat center;
  background-size: contain;
  bottom: 60pt;
  left: 11px;
  z-index: 10000000 !important;
}

/* 전역 스크롤바 스타일링 */
* {
  scrollbar-width: thin;
  scrollbar-color: #ccc #f1f1f1;
}

*::-webkit-scrollbar {
  width: 8px;
}

*::-webkit-scrollbar-track {
  background: #fff;
}

*::-webkit-scrollbar-thumb {
  background: #ccc;
  border-radius: 4px;
}

*::-webkit-scrollbar-thumb:hover {
  background: #bbb;
}

/* 칩 스타일링 */
.status-chip { 
  display: flex;
  border-radius: 8px;
  min-width: 76px;
  height: 28px;
  padding: 8px 0px;
  justify-content: center;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  border-radius: 8px;
  border: 1px solid #E8E8E8;
  box-shadow: 0px 1px 5px 0px rgba(0, 0, 0, 0.12);
}

.type-chip{
  display: flex;
  min-width: 66px;
  font-size:0.875rem;
  height: 28px;
  padding: 2px 8px;
  justify-content: center;
  align-items: center;
  border-radius: 35px;
  background-color: white;/* 125% */
}

.name-chip{
  border-radius: 35px;
  background: var(--Gray-Color-50, #F7F7F7);
  display: flex;
  padding: 4px 8px;
  justify-content: center;
  align-items: center;
}

/* 타입 칩 스타일링 */
.scope1.type-chip{
  border-radius: 35px;
  border: 1px solid #E29400;
  background: #FFF;
  color: #E29400;
}


.scope2.type-chip{
  border: 1px solid var(--Palette-Teal-600, #178BA3);
  background: var(--Gray-White, #FFF);
  color: #178BA3;
}


.scope3.type-chip{
  border: 1px solid #578927;
  background: #FFF;
  color: #578927;
  height:22px;
}


.pcf.type-chip{
  border: 1px solid #A643B6;
  background: #FFF;
  color: #A643B6;
}

.other.type-chip{
  border: 1px solid #A643B6;
  background: #FFF;
  color: #A643B6;
}

/* 상태 칩 스타일링 */
/* "PENDING", "SENT", "RECEIVED", "IN_PROGRESS", "COMPLETED", "NO_RESPONSE" */
.pending.status-chip{
  border: 1px solid #F7F7F7;
  background: #FFF;
  color: #F7F7F7;
}

.sent.status-chip{
  border: 1px solid #F7F7F7;
  background: #FFF;
  color: #F7F7F7;
}

.received.status-chip{
  border: 1px solid #FFC107;
  background: #FFF;
  color: #FFC107;
}

.in_progress.status-chip{
  border: 1px solid #03A9F4;
  background: #FFF;
  color: #03A9F4;
}

.completed.status-chip{
  border: 1px solid #1DAC86;
  background: #FFF;
  color: #1DAC86;
}

.no_response.status-chip{
  border: 1px solid #FE4011;
  background: #FFF;
  color: #FE4011;
}

/* Scope 2 칩 스타일 */
.scope-2-location-based span::after,
.scope-2-market-based span::after {
  content: attr(data-label);
  display: inline-flex;
  height: 22px;
  padding: 0 8px;
  margin-left: 8px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-family: "Pretendard";
  font-weight: 500;
  border-radius: 16px;
  vertical-align: middle;
}

.scope-2-market-based span::after {
  content: "Market-based";
  background-color: #FFF3ED;
  color: #EF2507;
  border: 1px solid #FFE4D4;
}

.scope-2-location-based span::after {
  content: "Location-based";
  background-color: #FFFFEA;
  color: #E29400;
  border: 1px solid #FFFBC5;
}

/* =====================================================
   보고서 폰트 안정화 스타일
   - 폰트 대체 시에도 글자 간격과 줄바꿈이 일관되게 유지됨
   ===================================================== */

/* 보고서 전용 폰트 스택 - 대체 폰트에서도 안정적인 렌더링 */
.report-page,
.report-page *,
.report-cover-page,
.report-cover-page *,
.report-section-content,
.report-section-content * {
  /* 포괄적인 대체 폰트 스택 */
  font-family: 
    "Pretendard",
    "Pretendard Variable",
    -apple-system,
    BlinkMacSystemFont,
    "Apple SD Gothic Neo",
    "Malgun Gothic",
    "맑은 고딕",
    "Noto Sans KR",
    "Noto Sans CJK KR",
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif !important;
  
  /* 텍스트 렌더링 최적화 */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  
  /* 폰트 기능 설정 - 일관된 숫자 렌더링 */
  font-feature-settings: "tnum" on, "lnum" on;
  font-variant-numeric: tabular-nums lining-nums;
}

/* 보고서 텍스트 안정화 - 줄바꿈 및 간격 제어 */
.report-page,
.report-cover-page,
.report-section-content {
  /* 단어 단위 줄바꿈 (한글은 word-break: keep-all 권장) */
  word-break: keep-all;
  overflow-wrap: break-word;
  word-wrap: break-word;
  
  /* 하이픈 처리 비활성화 - 예상치 못한 줄바꿈 방지 */
  hyphens: none;
  -webkit-hyphens: none;
  -ms-hyphens: none;
  
  /* 기본 자간 설정 - 폰트 대체 시에도 안정적으로 0 유지 */
  letter-spacing: 0;
  
  /* 줄 높이 안정화 */
  line-height: 1.6;
}

/* 보고서 제목/헤더 텍스트 안정화 */
.report-page h1,
.report-page h2,
.report-page h3,
.report-page h4,
.report-page h5,
.report-page h6,
.report-section-content h1,
.report-section-content h2,
.report-section-content h3,
.report-section-content h4,
.report-section-content h5,
.report-section-content h6 {
  height: auto;
  min-height: 24px;
  letter-spacing: 0;
  word-break: keep-all;
  white-space: nowrap;
}

/* 보고서 Typography 높이 자동 조절 */
.report-page .MuiTypography-root,
.report-section-content .MuiTypography-root {
  height: auto;
  min-height: fit-content;
}

/* 한영 혼합 텍스트 안정화 (IJG본사, 일진USA 등) */
.report-page,
.report-page *,
.report-cover-page,
.report-cover-page *,
.report-section-content,
.report-section-content * {
  /* 글자 폭 안정화 - 대문자/소문자 비율 유지 */
  font-variant-caps: normal;
  text-transform: none;
  
  /* 영문+한글 혼합 시 글자 간격 일정하게 */
  font-kerning: none;
  font-variant-ligatures: none;
  
  /* 텍스트 크기 조절 비활성화 */
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* 보고서 테이블 셀 안정화 */
.report-page table,
.report-page th,
.report-page td,
.report-section-content table,
.report-section-content th,
.report-section-content td {
  /* 테이블 셀 내 텍스트 줄바꿈 제어 */
  word-break: keep-all;
  overflow-wrap: break-word;
  
  /* 셀 내 텍스트 정렬 안정화 */
  vertical-align: middle;
}

/* 숫자 데이터 안정화 - 고정 너비 숫자 */
.report-page .numeric-data,
.report-section-content .numeric-data,
.report-page td:has(> span),
.report-section-content td:has(> span) {
  font-variant-numeric: tabular-nums lining-nums;
  letter-spacing: 0;
  white-space: nowrap;
}

/* 보고서 본문 텍스트 안정화 */
.report-page p,
.report-section-content p {
  word-break: keep-all;
  overflow-wrap: break-word;
  text-align: justify;
  text-justify: inter-character;
}

.report-page p.page-number{
  text-align:right;
}

/* PDF 출력 시 폰트 임베딩 보장 */
@media print {
  .report-page,
  .report-page *,
  .report-cover-page,
  .report-cover-page *,
  .report-section-content,
  .report-section-content * {
    /* 프린트 시에도 동일한 폰트 스택 유지 */
    font-family: 
      "Pretendard",
      "Pretendard Variable",
      -apple-system,
      BlinkMacSystemFont,
      "Apple SD Gothic Neo",
      "Malgun Gothic",
      "맑은 고딕",
      "Noto Sans KR",
      "Noto Sans CJK KR",
      sans-serif !important;
    
    /* 프린트 최적화 */
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* =====================================================
   보고서 PDF 생성을 위한 페이지 분할 스타일
   ===================================================== */
@media print {
  @page {
    size: A4;
    margin: 0;
  }

  body {
    margin: 0;
    padding: 0;
  }

  /* 보고서 섹션 페이지 분할 */
  .report-section-content {
    page-break-inside: auto;
  }

  .report-section-content > div {
    page-break-inside: avoid;
    page-break-after: auto;
    break-inside: avoid;
    break-after: auto;
  }

  /* 표지는 항상 단독 페이지 */
  .report-cover-page {
    page-break-after: always;
    break-after: page;
  }

  /* 테이블, 차트, 이미지 등 주요 콘텐츠는 페이지 분할 방지 */
  table,
  .chart-container,
  .MuiCard-root,
  .section-content-block {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* 제목은 다음 콘텐츠와 함께 */
  h1, h2, h3, h4, h5, h6 {
    page-break-after: avoid;
    break-after: avoid;
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* 섹션 제목 + 첫 번째 단락은 함께 */
  .section-title + * {
    page-break-before: avoid;
    break-before: avoid;
  }

  /* 리스트 아이템은 분할 방지 */
  li {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* 캔버스와 이미지 분할 방지 */
  canvas,
  img,
  svg {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Box 컴포넌트 중 chart-container 클래스가 있는 요소 */
  .chart-container,
  .recharts-wrapper,
  .recharts-surface {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  /* 페이지 템플릿의 헤더와 푸터는 각 페이지에 반복 */
  .report-page {
    page-break-inside: auto;
    break-inside: auto;
    position: relative !important;
    overflow: visible !important;
  }
  
  /* 푸터 영역 하단 고정 */
  .report-page > div:last-child {
    position: absolute !important;
    bottom: 0 !important;
    left: 0 !important;
    background: white !important;
  }
}