/* ✅ 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;
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

/* ✅ 대시보드 레이아웃 */
.dashboard-wrapper {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

.main-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* ✅ 사이드바 스타일 */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #ffffff 0%, #fffbf5 100%);
    border-right: 2px solid #e5e7eb;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    transition: all 0.3s ease;
    z-index: 100;
}

.sidebar.collapsed {
    width: 0;
    border-right: none;
}

.sidebar-nav {
    padding: 1rem 0;
}

/* ✅ 콘텐츠 영역 */
.content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #FFF8F0;
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  background: white;
  margin: 1rem;
  border-radius: 1rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  height: 100%;
  max-height: calc(100vh - 70px - 2rem);
}

/* ✅ 생산성/품질 드롭다운 상단 고정 */
.prod-dropdown-wrapper,
.quality-dropdown-wrapper {
  position: sticky;
  top: -1.5rem;
  z-index: 100;
  background: white;
  margin: -1.5rem -1.5rem 1.5rem -1.5rem;
  padding: 1rem 1.5rem;
  border-bottom: 2px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* ✅ Tailwind CDN 로딩 지연 대비 - 중요 텍스트 스타일 고정 */
#content h2 {
    font-size: 1.5rem; /* text-2xl */
    font-weight: 700;  /* font-bold */
}

#content table th {
    font-size: 0.875rem; /* text-sm */
    font-weight: 700;    /* font-bold */
}

#content table td {
    font-size: 0.875rem; /* text-sm */
}

/* 생산성 월별 테이블 (작은 글씨 유지) */
#content .prod-monthly-table th,
#content .prod-monthly-table td,
#content .prod-weekly-table th,
#content .prod-weekly-table td {
    font-size: inherit;
}

#content button {
    font-size: 0.875rem; /* text-sm */
}

#content .text-xs {
    font-size: 0.75rem;
}

#content .text-sm {
    font-size: 0.875rem;
}

#content .text-lg {
    font-size: 1.125rem;
}

#content .text-xl {
    font-size: 1.25rem;
}

#content .text-2xl {
    font-size: 1.5rem;
}

#content .font-semibold {
    font-weight: 600;
}

#content .font-bold {
    font-weight: 700;
}

/* 드롭다운 */
.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;
}
th[data-tooltip]: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;
}

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

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

/* 인입동향 표와 채널별 표는 제외 */
#content table:not(#monthlySkillTable):not([id^="monthlyChannelTable_"]) 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 ================================================= */

/* ===== 네비게이션 바 스타일 ===== */
.header-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #fffbf5 100%);
  border-bottom: 2px solid #e5e7eb;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  padding: 1rem 2rem;
  height: 70px;
  z-index: 1001;
}

.sidebar-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: #fff8f0;
  border: 1px solid #e5e7eb;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: #5D4037;
  font-size: 1.25rem;
}

.sidebar-toggle:hover {
  background: #ffe8cc;
  color: #D84315;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  transition: all 0.2s ease;
}

.navbar-brand:hover {
  transform: translateY(-1px);
}

.navbar-brand:active {
  transform: translateY(0);
}

.navbar-logo {
  height: 40px;
  width: auto;
  transition: transform 0.2s ease;
}

.navbar-brand:hover .navbar-logo {
  transform: scale(1.05);
}

.navbar-icon {
  font-size: 1.75rem;
  color: #D84315;
}

.navbar-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: #5D4037;
  letter-spacing: -0.02em;
  margin: 0;
  transition: color 0.2s ease;
}

.navbar-brand:hover .navbar-title {
  color: #D84315;
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: #fff8f0;
  border: 1px solid #e5e7eb;
  border-radius: 2rem;
  font-size: 0.95rem;
  color: #5D4037;
  font-weight: 500;
}

.user-info i {
  font-size: 1.25rem;
  color: #D84315;
}

.logout-button {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  background: #D84315;
  color: white;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 6px rgba(216, 67, 21, 0.3);
}

.logout-button:hover {
  background: #bf360c;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(216, 67, 21, 0.4);
}

/* ===== 사이드바 메뉴 스타일 (호버 아코디언) ===== */
.sidebar-nav {
  padding: 1rem 0;
}

/* 메뉴 그룹 컨테이너 */
.menu-group {
  margin: 0.25rem 0;
  position: relative;
}

/* 메인 메뉴 버튼 */
.sidebar-nav .menu-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: calc(100% - 1rem);
  margin: 0 0.5rem;
  padding: 0.75rem 1rem;
  background: transparent;
  color: #5D4037;
  font-size: 0.95rem;
  font-weight: 600;
  text-align: left;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-nav .menu-btn:hover {
  background: #ffe8cc;
  color: #D84315;
}

.menu-group.expanded .menu-btn {
  background: #ffe8cc;
  color: #D84315;
}

.sidebar-nav .menu-btn.active,
.sidebar-nav .menu-btn.single.active {
  background: linear-gradient(135deg, #ffcc80 0%, #ffb74d 100%);
  color: #bf360c;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(216, 67, 21, 0.2);
}

/* 메뉴 화살표 아이콘 */
.menu-arrow {
  font-size: 0.75rem;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-group.expanded .menu-arrow {
  transform: rotate(90deg);
}

/* 서브메뉴 리스트 */
.submenu-list {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding-left: 1rem;
}

.menu-group.expanded .submenu-list,
.menu-group.active .submenu-list {
  max-height: 800px;
  transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 서브메뉴 버튼 */
.submenu-btn {
  display: block;
  width: calc(100% - 1.5rem);
  margin: 0.25rem 0.75rem;
  padding: 0.6rem 1rem;
  background: transparent;
  color: #666;
  font-size: 0.875rem;
  font-weight: 500;
  text-align: left;
  border: none;
  border-radius: 0.4rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  padding-left: 2rem;
}

.submenu-btn::before {
  content: "•";
  position: absolute;
  left: 1rem;
  color: #999;
}

.submenu-btn:hover {
  background: #ffe0b2;
  color: #e65100;
  transform: translateX(4px);
}

.submenu-btn.active {
  background: #ffcc80;
  color: #bf360c;
  font-weight: 600;
}

.submenu-btn.active::before {
  color: #bf360c;
}

/* ===== 모바일 반응형 ===== */
@media (max-width: 768px) {
  .header-navbar {
    padding: 0.75rem 1rem;
    height: 60px;
  }

  .navbar-title {
    font-size: 1.125rem;
  }

  .navbar-icon {
    font-size: 1.5rem;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 60px;
    height: calc(100vh - 60px);
    z-index: 999;
    transform: translateX(-100%);
  }

  .sidebar:not(.collapsed) {
    transform: translateX(0);
  }

  .user-info span {
    display: none;
  }

  .logout-button span {
    display: none;
  }

  .logout-button {
    padding: 0.6rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    justify-content: center;
  }
}

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

/* 검색 결과 카드 활성화 스타일 */
.kms-search-result-card.kms-active {
  background-color: #EEF2FF !important; /* indigo-50 */
  border-color: #6366F1 !important; /* indigo-500 */
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2) !important;
}

.kms-search-result-card.kms-active h3 {
  color: #4338CA !important; /* indigo-700 */
}

/* 사이드바 가이드 목록 좌우 스크롤 방지 */
#kmsList {
  overflow-x: hidden;
  word-wrap: break-word;
}

#kmsList button {
  max-width: 100%;
  overflow-wrap: break-word;
  word-break: break-word;
}

/* ✅ CKEditor View: 인라인 스타일 완전 보존 */
.ckeditor-view {
  /* 기본 컨테이너 스타일만 설정, 내부 요소는 인라인 스타일 우선 */
  all: initial; /* 모든 상속 스타일 초기화 */
  display: block;
}

/* 자식 요소들의 스타일 초기화 */
.ckeditor-view * {
  all: revert; /* 브라우저 기본 스타일로 복원 */
}

/* 인라인 스타일이 있는 요소는 완전히 우선 적용 */
.ckeditor-view [style] {
  /* 인라인 스타일 최우선 - 어떤 CSS도 덮어쓰지 않음 */
}

/* 기본 태그 스타일 최소화 - 인라인 스타일이 없을 때만 적용 */
.ckeditor-view h1:not([style*="font"]) { font-size: 2em; font-weight: 700; margin-bottom: .4em; }
.ckeditor-view h2:not([style*="font"]) { font-size: 1.6em; font-weight: 700; margin-bottom: .4em; }
.ckeditor-view h3:not([style*="font"]) { font-size: 1.3em; font-weight: 600; margin-bottom: .3em; }
.ckeditor-view h4:not([style*="font"]) { font-size: 1.2em; font-weight: 600; margin-bottom: .3em; }

.ckeditor-view p:not([style]) { margin: 0.5em 0; }

.ckeditor-view img {
  max-width: 100%;
  height: auto;
}

.ckeditor-view table:not([style]) {
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0;
}
.ckeditor-view table td:not([style]),
.ckeditor-view table th:not([style]) {
  border: 1px solid #ccc;
  padding: 6px 8px;
}
.ckeditor-view table th:not([style]) {
  background: #f8f8f8;
  font-weight: 600;
}

/* ✅ Tailwind text-align 클래스 강제 적용 */
.ckeditor-view .text-left { text-align: left !important; }
.ckeditor-view .text-center { text-align: center !important; }
.ckeditor-view .text-right { text-align: right !important; }

.ckeditor-view ul:not([style]),
.ckeditor-view ol:not([style]) {
  margin: 10px 0;
  padding-left: 30px;
}

.ckeditor-view ul:not([style]) li {
  list-style-type: disc;
  margin: 5px 0;
}

.ckeditor-view ol:not([style]) li {
  list-style-type: decimal;
  margin: 5px 0;
}

.ckeditor-view blockquote:not([style]) {
  margin: 10px 0;
  padding: 10px 15px;
  border-left: 4px solid #ccc;
  background: #f9f9f9;
}

/* ✅ Tailwind 색상 클래스 강제 적용 */
.ckeditor-view .bg-orange-50 { background-color: #fff7ed !important; }
.ckeditor-view .bg-orange-100 { background-color: #ffedd5 !important; }
.ckeditor-view .border-orange-200 { border-color: #fed7aa !important; }
.ckeditor-view .text-orange-900 { color: #7c2d12 !important; }

.ckeditor-view .bg-red-50 { background-color: #fef2f2 !important; }
.ckeditor-view .bg-red-100 { background-color: #fee2e2 !important; }
.ckeditor-view .border-red-200 { border-color: #fecaca !important; }
.ckeditor-view .border-red-600 { border-color: #dc2626 !important; }
.ckeditor-view .text-red-600 { color: #dc2626 !important; }
.ckeditor-view .text-red-700 { color: #b91c1c !important; }
.ckeditor-view .text-red-800 { color: #991b1b !important; }

.ckeditor-view .bg-green-50 { background-color: #f0fdf4 !important; }
.ckeditor-view .border-green-500 { border-color: #22c55e !important; }
.ckeditor-view .text-green-700 { color: #15803d !important; }

.ckeditor-view .bg-yellow-100 { background-color: #fef3c7 !important; }
.ckeditor-view .border-yellow-400 { border-color: #facc15 !important; }
.ckeditor-view .text-yellow-900 { color: #713f12 !important; }

.ckeditor-view .bg-gray-50 { background-color: #f9fafb !important; }
.ckeditor-view .bg-gray-100 { background-color: #f3f4f6 !important; }
.ckeditor-view .border-gray-200 { border-color: #e5e7eb !important; }
.ckeditor-view .border-gray-300 { border-color: #d1d5db !important; }
.ckeditor-view .border-gray-500 { border-color: #6b7280 !important; }
.ckeditor-view .text-gray-500 { color: #6b7280 !important; }
.ckeditor-view .text-gray-600 { color: #4b5563 !important; }
.ckeditor-view .text-gray-700 { color: #374151 !important; }
.ckeditor-view .text-gray-800 { color: #1f2937 !important; }
.ckeditor-view .text-gray-900 { color: #111827 !important; }

.ckeditor-view .bg-slate-50 { background-color: #f8fafc !important; }
.ckeditor-view .border-slate-200 { border-color: #e2e8f0 !important; }

.ckeditor-view .bg-indigo-700 { background-color: #4338ca !important; }
.ckeditor-view .text-indigo-700 { color: #4338ca !important; }

.ckeditor-view .bg-white { background-color: #ffffff !important; }

/* ✅ Tailwind Spacing 클래스 */
.ckeditor-view .p-2 { padding: 0.5rem !important; }
.ckeditor-view .p-4 { padding: 1rem !important; }
.ckeditor-view .p-5 { padding: 1.25rem !important; }
.ckeditor-view .p-6 { padding: 1.5rem !important; }

.ckeditor-view .px-3 { padding-left: 0.75rem !important; padding-right: 0.75rem !important; }
.ckeditor-view .py-1 { padding-top: 0.25rem !important; padding-bottom: 0.25rem !important; }

.ckeditor-view .mb-2 { margin-bottom: 0.5rem !important; }
.ckeditor-view .mb-3 { margin-bottom: 0.75rem !important; }
.ckeditor-view .mb-4 { margin-bottom: 1rem !important; }
.ckeditor-view .mt-1 { margin-top: 0.25rem !important; }
.ckeditor-view .my-2 { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.ckeditor-view .my-4 { margin-top: 1rem !important; margin-bottom: 1rem !important; }
.ckeditor-view .mr-3 { margin-right: 0.75rem !important; }
.ckeditor-view .ml-2 { margin-left: 0.5rem !important; }

.ckeditor-view .space-y-1 > * + * { margin-top: 0.25rem !important; }
.ckeditor-view .space-y-6 > * + * { margin-top: 1.5rem !important; }
.ckeditor-view .gap-2 { gap: 0.5rem !important; }

/* ✅ Tailwind Border 클래스 */
.ckeditor-view .border { border-width: 1px !important; }
.ckeditor-view .border-2 { border-width: 2px !important; }
.ckeditor-view .border-l-4 { border-left-width: 4px !important; }
.ckeditor-view .border-l-8 { border-left-width: 8px !important; }
.ckeditor-view .border-t { border-top-width: 1px !important; }

.ckeditor-view .rounded { border-radius: 0.25rem !important; }
.ckeditor-view .rounded-lg { border-radius: 0.5rem !important; }

/* ✅ Tailwind Shadow */
.ckeditor-view .shadow-sm { box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05) !important; }
.ckeditor-view .shadow-md { box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1) !important; }

/* ✅ Tailwind Typography */
.ckeditor-view .text-base { font-size: 1rem !important; line-height: 1.5rem !important; }
.ckeditor-view .text-lg { font-size: 1.125rem !important; line-height: 1.75rem !important; }
.ckeditor-view .text-xl { font-size: 1.25rem !important; line-height: 1.75rem !important; }

.ckeditor-view .font-medium { font-weight: 500 !important; }
.ckeditor-view .font-bold { font-weight: 700 !important; }

/* ✅ Tailwind Layout */
.ckeditor-view .flex { display: flex !important; }
.ckeditor-view .flex-wrap { flex-wrap: wrap !important; }
.ckeditor-view .items-start { align-items: flex-start !important; }
.ckeditor-view .items-center { align-items: center !important; }
.ckeditor-view .flex-shrink-0 { flex-shrink: 0 !important; }

.ckeditor-view .block { display: block !important; }
.ckeditor-view .inline-block { display: inline-block !important; }

.ckeditor-view .min-w-\[60px\] { min-width: 60px !important; }

/* ✅ list-style */
.ckeditor-view .list-none { list-style-type: none !important; }
.ckeditor-view .list-disc { list-style-type: disc !important; }
.ckeditor-view .list-inside { list-style-position: inside !important; }


.kms-img-zoom-modal {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  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;
}

.kms-content img {
  max-width: 100%;
  height: auto;
}

.prose img {
  width: auto !important;
  height: auto !important;
  max-width: 100% !important;
}

/* ✅ CKEditor 출력 이미지 반응형 강제 */
.ckeditor-view img {
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  display: block;
}

/* ✅ KMS Viewer 이미지 반응형 고정 — inline width/height 무시 */
#kmsGuideViewer img,
.ckeditor-view img {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  display: block !important;
}
#kmsGuideViewer img {
  max-width: min(100%, 900px) !important;
  height: auto !important;
  display: block !important;
  margin: 8px auto !important;
  object-fit: contain !important;
}

/* ==============================
   ✅ Auth Modal Theme (로그인/회원가입)
   - Site palette: bg #FFF8F0, text #5D4037, accent #D84315
   ============================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
}

.modal-card {
  width: 360px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
  padding: 20px 18px;
}

.auth-title {
  margin: 4px 0 16px;
  text-align: center;
  font-size: 22px;
  font-weight: 800;
  color: #5D4037;
}

.form-input {
  width: 100%;
  height: 40px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 10px;
  font-size: 14px;
  color: #333;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form-input:focus {
  border-color: #D84315;
  box-shadow: 0 0 0 2px rgba(216,67,21,0.18);
}

.btn {
  width: 100%;
  height: 42px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 14px;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.btn-primary {
  background: #D84315;
  color: #fff;
  border: 1px solid #D84315;
}
.btn-primary:hover {
  background: #bf360c;
  border-color: #bf360c;
}

.btn-secondary {
  background: #fff8f0;
  color: #5D4037;
  border: 1px solid #e0e0e0;
}
.btn-secondary:hover {
  background: #ffe0b2;
  border-color: #ffcc80;
  color: #bf360c;
}

.auth-helper {
  margin-top: 8px;
  text-align: center;
  font-size: 12px;
  color: #7a6a64;
}

/* ✅ 경고 모달 스타일 */
#warningModal .modal-card {
  max-width: 28rem;
}

#warningModal .warning-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
  margin-right: 1rem;
}

#warningModal .warning-icon.warning {
  background-color: #f59e0b;
  border: 2px solid #d97706;
}

#warningModal .warning-icon.danger {
  background-color: #ef4444;
  border: 2px solid #dc2626;
}

#warningModal .warning-icon.info {
  background-color: #3b82f6;
  border: 2px solid #2563eb;
}

#warningModal .warning-header {
  display: flex;
  align-items: center;
  margin-bottom: 1rem;
}

#warningModal .warning-title {
  font-size: 1.125rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
}

#warningModal .warning-message {
  color: #4b5563;
  line-height: 1.625;
  margin-bottom: 1.5rem;
}

#warningModal .warning-actions {
  display: flex;
  justify-content: flex-end;
}

#warningModal .warning-btn {
  padding: 0.5rem 1.5rem;
  color: white;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: opacity 0.15s ease;
  border: none;
  cursor: pointer;
}

#warningModal .warning-btn:hover {
  opacity: 0.9;
}

#warningModal .warning-btn.warning {
  background-color: #f59e0b;
}

#warningModal .warning-btn.danger {
  background-color: #ef4444;
}

#warningModal .warning-btn.info {
  background-color: #3b82f6;
}

/* ============================================
   work-jeon-a 툴팁 스타일
   ============================================ */
th[data-tooltip] {
  position: relative;
}

th[data-tooltip]: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;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border-radius: 4px;
  font-size: 12px;
  margin-top: 4px;
}
