/* ✅ Paperlogy Webfont */
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-1Thin.woff2') format('woff2');
    font-weight: 100;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-2ExtraLight.woff2') format('woff2');
    font-weight: 200;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-3Light.woff2') format('woff2');
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-4Regular.woff2') format('woff2');
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-5Medium.woff2') format('woff2');
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-6SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-7Bold.woff2') format('woff2');
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-8ExtraBold.woff2') format('woff2');
    font-weight: 800;
    font-display: swap;
}
@font-face {
    font-family: 'Paperozi';
    src: url('https://cdn.jsdelivr.net/gh/projectnoonnu/2408-3@1.0/Paperlogy-9Black.woff2') format('woff2');
    font-weight: 900;
    font-display: swap;
}

/* ✅ 전체 프로젝트 기본 한국형 Typography 세팅 */
html, body {
    font-family: 'Paperozi', 'Noto Sans KR', sans-serif;
    line-height: 1.35;        /* 한국어 최적 라인높이 */
    letter-spacing: -0.01em;  /* 자간 소폭 조절 */
    -webkit-font-smoothing: antialiased;
    color: #212121;
    background-color: #FFF8F0; /* 기존 배경 유지 */
}

/* 드롭다운 */
.selector {
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  transition: all 0.2s ease-in-out;
}
.selector:hover {
  border-color: #D84315;
  box-shadow: 0 0 0 2px rgba(216, 67, 21, 0.2);
}

/* 표 + 그래프 좌우 배치 */
.graph-container {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: stretch;
  width: 100%;
  gap: 24px;
}

.table-container {
  flex: 1;
  min-width: 0;
  overflow-x: auto;
}

.chart-container {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 3px 8px rgba(0,0,0,0.05);
}

/* 표 스타일 */
table {
  border-collapse: collapse;
  width: 90%;
  margin: 0 auto 20px auto;
  background-color: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  font-size: 0.85rem;
}
th, td {
  border: 1px solid #ccc;
  padding: 0.4rem 0.3rem;
  text-align: center;
  white-space: nowrap;
}
th {
  background-color: #f3f3f3;
  font-weight: 600;
  position: relative;
  cursor: pointer;
}
th:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #FFF8E1;
  border: 1px solid #ccc;
  padding: 0.5rem;
  white-space: nowrap;
  z-index: 50;
}
table tbody th {
  background-color: #fafafa;
  font-weight: 600;
}
th.weekend,
th.holiday {
  color: #D84315;
  background-color: #FFF3E0 !important;
}

/* 메인 채널 강조 */
.main-channel-highlight {
  background-color: #FFF4E6;
  border: 2px solid rgba(216, 67, 21, 0.5);
  box-shadow: 0 2px 6px rgba(216, 67, 21, 0.1);
  border-radius: 0.75rem;
  transition: all 0.25s ease-in-out;
}

/* 상담원 카드 */
.agent-card {
  background-color: #fff;
  border: 1px solid #E0E0E0;
  border-radius: 0.75rem;
  padding: 1rem 1rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  transition: all 0.2s ease-in-out;
}
.agent-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

.agent-card .score-item { padding: 0.25rem 0; }
.agent-card .channel-score { font-size: 1.25rem; }
.agent-card .channel-name { font-size: 0.85rem; }
.agent-card .case-count { font-size: 0.75rem; }

.quality-cards-wrapper .grid {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 1rem;
}

#content canvas {
  height: 100% !important;
  width: 100% !important;
}

/* 상담사별 그래프 */
section h2 {
  color: #5D4037;
}
section table th, section table td {
  border: 1px solid #ddd;
}
section table th {
  background: #FFF8E1;
  font-weight: 700;
}

interaction: {
  mode: "nearest",
  intersect: true
},
elements: {
  point: {
    borderWidth: 1,
    borderColor: "#fff",
  }
}

#content table th,
#content table td {
  vertical-align: middle;
}

#content table th:first-child {
  text-align: center !important;  /* 상담사 이름 중앙 */
}

#content table td:nth-child(2) {
  width: 80px;
  min-width: 80px;
  text-align: center;
}

[id^="csrTable_"] table th,
[id^="csrTable_"] table td {
  padding: 0.25rem 0.3rem; /* ✅ 상담사별 표 전용 */
  line-height: 1.2;
}

[id^="csrTable_"] table th:nth-child(3),
[id^="csrTable_"] table td:nth-child(3) {
  border-right: 2px double #ccc !important;
}


/* ✅ 메인/서브 메뉴 UI ================================================= */

/* 전체 NAV */
.nav-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  padding: 0.5rem 0;
}

/* ===== 메인 메뉴 ===== */
.main-nav {
  display: flex;
  justify-content: center;
  gap: 1rem;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem; /* ✅ 하위 메뉴와 구분 간격 */
}

.menu-btn {
  flex: 1;
  height: 46px;
  border-radius: 0.5rem;
  background: #fffaf0;
  color: #444;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  line-height: 46px;
  transition: all 0.2s ease;
}
.menu-btn:hover {
  background: #ffe8cc;
  color: #bf360c;
}
.menu-btn.active {
  background: #ffcc80;
  color: #bf360c;
}

/* ===== 서브 메뉴 ===== */
.sub-nav {
  display: flex;
  justify-content: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  padding: 0.4rem 0.75rem;
  margin-bottom: 1.5rem;
}

.submenu-group {
  display: flex;
  flex: 1;
  justify-content: center;
  gap: 0.5rem;
}
.submenu-group.hidden { display: none; }

.submenu-btn {
  flex: 1;
  height: 40px;
  border-radius: 0.4rem;
  background: #fff8f0;
  color: #666;
  font-size: 0.95rem;
  text-align: center;
  line-height: 40px;
  transition: all 0.2s ease;
}
.submenu-btn:hover {
  background: #ffe0b2;
  color: #e65100;
}
.submenu-btn.active {
  background: #ffcc80;
  color: #bf360c;
  font-weight: 600;
}

button, .emoji {
  font-family: 'Paperozi', 'Noto Sans KR', sans-serif !important;
}

/* 🌀 로그인 모달이 뜰 때 전체 배경 Blur 처리 */
.blur-background {
  filter: blur(6px);
  pointer-events: none; /* 배경 클릭 방지 */
  user-select: none;
}

/* CKEditor notification 숨기기 */
[id^="cke_notifications_area"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
}
/* 왼쪽 리스트 버튼 활성 스타일 */
#kmsList button.kms-active {
  background-color: #EEF2FF; /* indigo-50 */
  border: 1px solid #6366F1; /* indigo-500 */
  color: #4338CA !important; /* indigo-700 */
  font-weight: 600;
  border-radius: 0.5rem;
}

.ckeditor-view * {
  all: revert; /* ✅ Tailwind 영향 제거 */
}

/* 기본 가독성 보정 */
.ckeditor-view {
  font-size: 15px;
  line-height: 1.7;
  color: #333;
}

/* CKEditor 헤딩 유지 */
.ckeditor-view h1 { font-size: 2em; font-weight: 700; margin-bottom: .4em; }
.ckeditor-view h2 { font-size: 1.6em; font-weight: 700; margin-bottom: .4em; }
.ckeditor-view h3 { font-size: 1.3em; font-weight: 600; margin-bottom: .3em; }

/* 이미지 */
.ckeditor-view img {
  max-width: 100%;
  height: auto;
}

/* 표 스타일 */
.ckeditor-view table {
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0;
}
.ckeditor-view table td,
.ckeditor-view table th {
  border: 1px solid #ccc;
  padding: 6px 8px;
}
.ckeditor-view table th {
  background: #f8f8f8;
  font-weight: 600;
}


.kms-img-zoom-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.kms-img-zoom-scrollwrap {
  background: #0f0f0f;
  border-radius: 12px;
  box-shadow: 0 15px 40px rgba(0,0,0,.5);
  max-width: 90vw;
  max-height: 80vh;
  overflow: auto;
  border: 1px solid rgba(255,255,255,.2);
}

.kms-img-zoom-scrollwrap img {
  display: block;
  height: auto;
}

.kms-img-zoom-controls {
  margin-top: 14px;
  display: flex;
  gap: 10px;
}

.kms-img-zoom-btn {
  background: rgba(255,255,255,.92);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid #ccc;
}
.kms-img-zoom-btn:hover {
  background: #fff;
}

/* ✅ 안내 문구 */
.kms-zoom-help {
  color: #e5e7eb;
  font-size: 13px;
  opacity: .85;
  margin-top: 10px;
  text-align: center;
}

.kms-refresh-btn {
  @apply text-xs bg-gray-200 hover:bg-gray-300 text-gray-800 px-2 py-1 rounded transition;
}
#kmsGuideViewer p img {
  display: inline-block !important;
}
/* ✅ CKEditor 이미지가 0x0 되는 현상 방지 */
#kmsGuideViewer img {
  display: inline-block !important;
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
}