/* ==========================================================================
   ncaw.css - CAW 데스크톱 드래그앤드롭 메뉴 & 기사 편집 시스템 (/m/css/ncaw.css)
   데스크톱 2열 와이드 레이아웃 + 최신 웹에디터 + 모달 인증 시스템
   ========================================================================== */

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background-color: #f8fafc;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans KR", sans-serif;
  color: #0f172a;
  -webkit-text-size-adjust: 100%;
}

/* 전체 데스크톱 2열 래퍼 */
.desktop-app-layout {
  display: flex;
  width: 100%;
  min-height: 100vh;
}

/* 1. 좌측 드래그앤드롭 사이드바 (가변 너비 & 마우스 리사이징 지원) */
#sidebar {
  width: 380px;
  min-width: 220px;
  max-width: 650px;
  height: 100vh;
  position: sticky;
  top: 0;
  background-color: #f8fafc;
  border-right: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  z-index: 100;
  overflow: hidden;
  box-sizing: border-box;
}

/* 좌측 사이드바와 우측 본문 사이의 마우스 리사이저 바 */
.sidebar-resizer {
  width: 5px;
  height: 100vh;
  position: sticky;
  top: 0;
  background-color: #e2e8f0;
  cursor: col-resize;
  flex-shrink: 0;
  z-index: 105;
  transition: background-color 0.15s ease, width 0.15s ease;
  user-select: none;
}

.sidebar-resizer:hover,
.sidebar-resizer.is-resizing {
  background-color: #3b82f6;
  width: 6px;
}

/* 리사이징 진행 중 바디 상태 (텍스트 선택 방지 및 커서 유지) */
body.is-sidebar-resizing {
  cursor: col-resize !important;
  user-select: none !important;
  -webkit-user-select: none !important;
}

body.is-sidebar-resizing iframe,
body.is-sidebar-resizing #my-editor {
  pointer-events: none !important;
}

/* 사이드바 상단 툴바 (아이콘 2배 크기 확대) */
#menuicon {
  padding: 8px 14px;
  background-color: #f1f5f9;
  border-bottom: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

#menuicon i, #menuicon span.brand-text {
  cursor: pointer;
  font-size: 26px !important; /* 상단 툴바 아이콘 크기 확대 (기존 18px -> 26px) */
  color: #475569;
  transition: all 0.15s ease;
  user-select: none;
  line-height: 1;
}

#menuicon i:hover, #menuicon span.brand-text:hover {
  color: #2563eb;
  transform: translateY(-1px);
}

#menuicon span.brand-text {
  font-weight: 800;
  font-size: 18px !important;
  color: #1e3a8a;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 드래그앤드롭 트리 메뉴 스크롤 컨테이너 */
#topmenu {
  flex-grow: 1;
  overflow-y: auto;
  padding: 10px 12px;
}

/* 트리 노드 아이템 스타일 (아이콘 2배 확대 & 기존 줄간격 유지) */
.tree-node-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 6px; /* 패딩을 컴팩트하게 조정하여 줄간격(행 높이) 유지 */
  min-height: 28px; /* 기존과 동일한 행 높이 */
  line-height: 1.2;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  color: #1e293b;
  transition: all 0.12s ease;
  user-select: none;
  border: 1px solid transparent;
  margin-bottom: 2px; /* 기존 줄간격 2px 완벽 유지 */
}

.tree-node-item:hover {
  background-color: #e2e8f0;
}

.tree-node-item.is-selected {
  background-color: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
  font-weight: 700;
}

.tree-node-sub {
  margin-left: 20px;
  border-left: 1px dashed #cbd5e1;
  padding-left: 6px;
}

/* 1단 폴더 아이콘: 2배 크기 확대 (기존 12~13px -> 24px) */
.tree-node-item .folder-icon {
  font-size: 24px !important;
  line-height: 1;
  flex-shrink: 0;
  width: 26px;
  text-align: center;
}

/* 2단 파일 아이콘: 2배 크기 확대 (기존 12px -> 22px) */
.tree-node-item .fa-file-text-o {
  font-size: 22px !important;
  line-height: 1;
  flex-shrink: 0;
  width: 24px;
  text-align: center;
}

/* 1단/2단 공개 여부 체크박스: 픽킹 편의를 위한 20px 크기 확대 */
.node-active-chk {
  width: 18px !important;
  height: 18px !important;
  cursor: pointer;
  margin: 0 4px 0 2px;
  accent-color: #2563eb;
  flex-shrink: 0;
  vertical-align: middle;
}

/* 메뉴 명칭 텍스트 (줄간격 내 깔끔 정렬) */
.tree-node-item .node-title-text {
  font-size: 14px;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 조작 액션 아이콘들 (수정, 삭제, 하위 추가): 2배 크기 확대 (기존 12px -> 22px) */
.node-action-icon {
  color: #94a3b8;
  font-size: 22px !important; /* 2배 크기 확대 */
  padding: 2px 4px;
  border-radius: 4px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.12s ease;
  margin-left: 3px;
  flex-shrink: 0;
}

.node-action-icon:hover {
  color: #ef4444;
  background-color: #fee2e2;
  transform: scale(1.1);
}

/* 2. 우측 메인 기사 관리 & 에디터 영역 */
#content {
  flex-grow: 1;
  min-height: 100vh;
  background-color: #ffffff;
  padding: 14px 24px 40px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 1400px;
}

/* 우측 상단 앱 바 */
.desktop-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  border-bottom: 2px solid #e2e8f0;
}

.desktop-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.desktop-title {
  font-size: 18px;
  font-weight: 800;
  color: #1e3a8a;
  letter-spacing: -0.3px;
  margin: 0;
}

.site-badge {
  background: #2563eb;
  color: #ffffff !important;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 12px;
  text-decoration: none !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}

.site-badge:hover {
  background: #1d4ed8;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

.auth-badge {
  font-size: 12px;
  color: #334155;
  background: #f8fafc;
  padding: 4px 10px;
  border-radius: 16px;
  border: 1px solid #cbd5e1;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.auth-btn {
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
}

.auth-btn:hover {
  background: #f1f5f9;
}

.auth-btn-primary {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.auth-btn-primary:hover {
  background: #1d4ed8;
}

/* 3. 잠금 안내 카드 (비로그인 시 우측에 표시) */
.guest-lock-card {
  background: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 14px;
  padding: 40px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin: 20px auto;
  max-width: 500px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.guest-lock-icon {
  font-size: 40px;
  line-height: 1;
}

.guest-lock-title {
  font-size: 17px;
  font-weight: 800;
  color: #1e293b;
  margin: 0;
}

.guest-lock-desc {
  font-size: 13px;
  color: #64748b;
  line-height: 1.6;
  margin: 0;
}

.guest-lock-btns {
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* 4. 기사 목록 & 벌크 조작 카드 */
.list-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.list-toolbar {
  padding: 6px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 6px;
}

.toolbar-left-group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.toolbar-right-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 액션 버튼 공통 */
.m-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  transition: all 0.12s ease;
  white-space: nowrap;
}

.m-btn:active {
  transform: scale(0.97);
}

.m-btn:disabled,
.m-btn[disabled],
.m-btn.is-disabled {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
  box-shadow: none !important;
  transform: none !important;
  filter: grayscale(35%) !important;
}


.m-btn-blue {
  background-color: #2563eb;
  color: #ffffff;
}
.m-btn-blue:hover {
  background-color: #1d4ed8;
}

.m-btn-red {
  background-color: #ef4444;
  color: #ffffff;
}
.m-btn-red:hover {
  background-color: #dc2626;
}

.m-btn-green {
  background-color: #10b981;
  color: #ffffff;
}
.m-btn-green:hover {
  background-color: #059669;
}

.m-btn-gray {
  background-color: #64748b;
  color: #ffffff;
}
.m-btn-gray:hover {
  background-color: #475569;
}

.m-btn-subtle {
  background-color: #f1f5f9;
  color: #334155;
  border: 1px solid #cbd5e1;
}
.m-btn-subtle:hover {
  background-color: #e2e8f0;
}

.m-target-input {
  min-width: 65px;
  max-width: 120px;
  height: 28px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  background: #ffffff;
  outline: none;
  padding: 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.m-target-input:focus {
  border-color: #2563eb;
}

/* 타이트한 기사 목록 테이블 */
.table-scroll-container {
  width: 100%;
  overflow-x: auto;
}

#newsTable {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  line-height: 1.2;
}

#newsTable th {
  background-color: #f1f5f9;
  color: #475569;
  font-weight: 700;
  padding: 4px 6px;
  border-bottom: 1px solid #cbd5e1;
  text-align: center;
  font-size: 11px;
}

#newsTable td {
  padding: 3px 6px; /* 타이트한 컴팩트 패딩 */
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
  line-height: 1.25;
}

#newsTable tbody tr {
  cursor: pointer;
  height: 26px; /* 26px 슬림 행 높이 */
  transition: background-color 0.1s ease;
}

#newsTable tbody tr:hover {
  background-color: #f8fafc;
}

#newsTable tbody tr.is-active {
  background-color: #eff6ff !important;
}

.title-cell,
#newsTable td.title-cell,
#newsTable td:nth-child(3) {
  text-align: left !important;
  padding-left: 8px !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 600;
  color: #0f172a;
}

#newsTable th.th-title,
#newsTable th:nth-child(3) {
  text-align: left !important;
  padding-left: 8px !important;
}

.row-chk, .pub-chk {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #2563eb;
  vertical-align: middle;
  margin: 0 auto;
  display: block;
}

/* 5. 상세 메타 정보 바 */
.editor-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  flex-wrap: wrap;
}

.meta-field-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.meta-capsule {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #475569;
  font-weight: 600;
}

.meta-capsule input, .meta-capsule select {
  height: 26px;
  padding: 0 6px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  font-size: 12px;
  background: #ffffff;
  color: #1e293b;
  outline: none;
}

.meta-capsule input {
  text-align: center;
}

.editor-action-btns {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 6. 제목 및 부제목 입력 영역 */
.form-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.form-title-label {
  width: 50px;
  font-size: 13px;
  font-weight: 700;
  color: #1e3a8a;
  flex-shrink: 0;
}

.form-title-input {
  flex-grow: 1;
  height: 32px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 13px;
  color: #0f172a;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-title-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

/* 7. 최신 웹에디터 (RichTextEditor) 마운트 래퍼 */
.desktop-editor-wrapper {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

/* 8. 피드백 결과 토스트 */
#result {
  min-height: 24px;
  font-size: 12px;
  font-weight: 600;
  color: #1d4ed8;
  padding: 4px 8px;
  border-radius: 4px;
}

/* 9. 모달 다이얼로그 (로그인 / 회원가입) */
.m-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(2px);
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.m-modal-backdrop.is-active {
  display: flex;
}

.m-modal-card {
  width: 100%;
  max-width: 380px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  animation: modalFadeIn 0.2s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.m-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
}

.m-modal-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  margin: 0;
}

.m-modal-close {
  background: none;
  border: none;
  font-size: 20px;
  color: #64748b;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}

.m-modal-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.m-input-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.m-input-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
}

.m-text-input {
  width: 100%;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  font-size: 13px;
  outline: none;
}
.m-text-input:focus {
  border-color: #2563eb;
}

.m-modal-footer {
  padding: 0 16px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
}

/* ==========================================================================
   인스타그램 / 릴스 뷰어 3대 버튼 모던 글래스모피즘 디자인 (드래그 크기 조절 완벽 보존)
   ========================================================================== */
/* 상단 헤더 영역: 이전 버전의 자연스러운 인플로우 flex 유지 (크기 조절 간섭 0%) */
.instagram-overlay-header {
  width: 100% !important;
  height: 50px !important;
  min-height: 46px !important;
  padding: 8px 12px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 6px !important;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.15) 75%, transparent 100%) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  border-top-left-radius: 8px !important;
  border-top-right-radius: 8px !important;
  box-sizing: border-box !important;
  pointer-events: auto;
  position: relative !important;
  z-index: 5 !important;
}

/* 3대 버튼 공통 글래스모피즘 캡슐 스타일 (배경과 자연스러운 융합) */
.instagram-play-mode-btn,
.instagram-toggle-type-btn,
.instagram-view-btn {
  height: 28px !important;
  line-height: 28px !important;
  padding: 0 10px !important;
  border-radius: 20px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: -0.2px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  color: #ffffff !important;
  background: rgba(15, 23, 42, 0.65) !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  cursor: pointer !important;
  pointer-events: auto;
  text-decoration: none !important;
  white-space: nowrap !important;
  user-select: none !important;
  box-sizing: border-box !important;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.instagram-play-mode-btn svg,
.instagram-toggle-type-btn svg,
.instagram-view-btn svg {
  flex-shrink: 0 !important;
  display: block !important;
}

/* 1. [재생 활성화] 버튼 */
.instagram-play-mode-btn {
  background: rgba(15, 23, 42, 0.68) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

.instagram-play-mode-btn svg {
  fill: #f43f5e !important;
}

.instagram-play-mode-btn:hover {
  background: rgba(225, 48, 108, 0.88) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  color: #ffffff !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(225, 48, 108, 0.35) !important;
}

.instagram-play-mode-btn:hover svg {
  fill: #ffffff !important;
}

.instagram-play-mode-btn:active {
  transform: scale(0.96) !important;
}

/* 활성화(재생 중) 상태 */
.instagram-play-mode-btn.is-active {
  background: rgba(22, 163, 74, 0.88) !important;
  border-color: rgba(34, 197, 94, 0.5) !important;
}

.instagram-play-mode-btn.is-active svg {
  stroke: #ffffff !important;
  fill: none !important;
}

.instagram-play-mode-btn.is-active:hover {
  background: rgba(21, 128, 61, 0.95) !important;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.35) !important;
}

/* 2. [릴스 ↔ 피드] 버튼 */
.instagram-toggle-type-btn {
  background: rgba(15, 23, 42, 0.65) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  margin-left: 0 !important;
  margin-right: auto !important; /* 우측 버튼과 분리 */
}

.instagram-toggle-type-btn svg {
  stroke: #94a3b8 !important;
}

.instagram-toggle-type-btn:hover {
  background: rgba(30, 41, 59, 0.88) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25) !important;
}

.instagram-toggle-type-btn:hover svg {
  stroke: #ffffff !important;
}

.instagram-toggle-type-btn:active {
  transform: scale(0.96) !important;
}

/* 3. [Instagram에서 보기] 버튼 */
.instagram-view-btn {
  background: rgba(15, 23, 42, 0.65) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  margin-left: auto !important;
}

.instagram-view-btn svg:first-child {
  stroke: #f43f5e !important;
}

.instagram-view-btn svg:last-child {
  stroke: #94a3b8 !important;
}

.instagram-view-btn:hover {
  background: linear-gradient(135deg, rgba(240, 148, 51, 0.9) 0%, rgba(225, 48, 108, 0.9) 50%, rgba(188, 24, 136, 0.9) 100%) !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.45) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 14px rgba(225, 48, 108, 0.4) !important;
}

.instagram-view-btn:hover svg:first-child,
.instagram-view-btn:hover svg:last-child {
  stroke: #ffffff !important;
}

.instagram-view-btn:active {
  transform: scale(0.96) !important;
}

/* 드래그 크기 조절(Resizing) 중 오버레이 및 모든 버튼 포인터 이벤트 완벽 무효화 (드래그 100% 보장) */
body.rte-resizing .instagram-overlay,
body.rte-resizing .instagram-overlay *,
body.rte-resizing .instagram-overlay-header,
body.rte-resizing .instagram-play-mode-btn,
body.rte-resizing .instagram-toggle-type-btn,
body.rte-resizing .instagram-view-btn,
body.rte-resizing .instagram-play-toggle-btn,
body.rte-resizing .instagram-container iframe {
  pointer-events: none !important;
}
body.rte-resizing .rte-corner-handle {
  pointer-events: auto !important;
}

/* ==========================================================================
   계층형 트리 메뉴 드래그앤드롭 (DnD) 스타일
   ========================================================================== */
.tree-node-item {
  cursor: grab;
  position: relative;
}

.tree-node-item:active {
  cursor: grabbing;
}

/* 드래그 중인 원본 아이템 반투명 처리 */
.tree-group.is-dragging,
.tree-node-item.is-dragging {
  opacity: 0.4 !important;
  background-color: #f1f5f9 !important;
  border: 1px dashed #94a3b8 !important;
}

/* 드래그 오버 인디케이터 (상단 / 하단 파란색 삽입 가이드라인) */
.drag-over-top {
  border-top: 2px solid #2563eb !important;
}

.drag-over-bottom {
  border-bottom: 2px solid #2563eb !important;
}

/* 2단 메뉴를 1단 대메뉴 위로 드롭할 때 1단 폴더 전체 하이라이트 */
.drag-over-folder {
  background-color: #dbeafe !important;
  border-color: #3b82f6 !important;
  border-radius: 6px;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.3) !important;
}

/* ==========================================================================
   1단/2단 메뉴 공개 여부 체크박스 (active 필드)
   ========================================================================== */
.node-active-chk {
  width: 14px;
  height: 14px;
  cursor: pointer;
  margin: 0 4px 0 2px;
  accent-color: #2563eb;
  flex-shrink: 0;
  vertical-align: middle;
}

/* 비공개(active=0) 메뉴 행 스타일 */
.tree-node-item.is-inactive .node-title-text {
  color: #94a3b8;
}

/* 메뉴 텍스트 마우스 오버 시 편집 가능 안내 */
.tree-node-item .node-title-text:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ==========================================================================
   인터넷 신문 추천 구글 웹폰트 14종 (한글 7종, 영문 5종, 영문 필기체 2종)
   ========================================================================== */
.font-noto-sans, [data-font="Noto Sans KR"] { font-family: 'Noto Sans KR\, -apple-system, sans-serif !important; }
.font-noto-serif, [data-font="Noto Serif KR"] { font-family: 'Noto Serif KR\, serif !important; }
.font-nanum-gothic, [data-font="Nanum Gothic"] { font-family: 'Nanum Gothic\, sans-serif !important; }
.font-nanum-myeongjo, [data-font="Nanum Myeongjo"] { font-family: 'Nanum Myeongjo\, serif !important; }
.font-gowun-batang, [data-font="Gowun Batang"] { font-family: 'Gowun Batang\, serif !important; }
.font-gowun-dodum, [data-font="Gowun Dodum"] { font-family: 'Gowun Dodum\, sans-serif !important; }
.font-song-myung, [data-font="Song Myung"] { font-family: 'Song Myung\, serif !important; }
.font-roboto, [data-font="Roboto"] { font-family: 'Roboto\, sans-serif !important; }
.font-merriweather, [data-font="Merriweather"] { font-family: 'Merriweather\, serif !important; }
.font-playfair, [data-font="Playfair Display"] { font-family: 'Playfair Display\, serif !important; }
.font-lora, [data-font="Lora"] { font-family: 'Lora\, serif !important; }
.font-montserrat, [data-font="Montserrat"] { font-family: 'Montserrat\, sans-serif !important; }
.font-dancing-script, [data-font="Dancing Script"] { font-family: 'Dancing Script\, cursive !important; }
.font-great-vibes, [data-font="Great Vibes"] { font-family: 'Great Vibes\, cursive !important; }
font[face="Noto Sans KR"], font[face="Noto Sans"] { font-family: 'Noto Sans KR\, sans-serif; }
font[face="Noto Serif KR"], font[face="Noto Serif"] { font-family: 'Noto Serif KR\, serif; }
font[face="Nanum Gothic"] { font-family: 'Nanum Gothic\, sans-serif; }
font[face="Nanum Myeongjo"] { font-family: 'Nanum Myeongjo\, serif; }
font[face="Gowun Batang"] { font-family: 'Gowun Batang\, serif; }
font[face="Gowun Dodum"] { font-family: 'Gowun Dodum\, sans-serif; }
font[face="Song Myung"] { font-family: 'Song Myung\, serif; }
font[face="Roboto"] { font-family: 'Roboto\, sans-serif; }
font[face="Merriweather"] { font-family: 'Merriweather\, serif; }
font[face="Playfair Display"] { font-family: 'Playfair Display\, serif; }
font[face="Lora"] { font-family: 'Lora\, serif; }
font[face="Montserrat"] { font-family: 'Montserrat\, sans-serif; }
font[face="Dancing Script"] { font-family: 'Dancing Script\, cursive; }
font[face="Great Vibes"] { font-family: 'Great Vibes\, cursive; }


    /* [v3.99 리디자인] 데스크톱 관리자 상단 헤더 조화로운 레이아웃 */
    .desktop-header {
      display: flex !important;
      flex-direction: column !important;
      align-items: stretch !important;
      gap: 10px !important;
      padding-bottom: 12px !important;
      border-bottom: 2px solid #e2e8f0 !important;
      background: transparent !important;
    }
    .desktop-header-main {
      display: flex !important;
      align-items: center !important;
      justify-content: space-between !important;
      width: 100% !important;
      gap: 16px !important;
      flex-wrap: nowrap !important;
    }
    .desktop-brand {
      display: inline-flex !important;
      align-items: center !important;
      gap: 8px !important;
      white-space: nowrap !important;
      flex-shrink: 0 !important;
    }
    .brand-logo-link {
      text-decoration: none !important;
      color: inherit !important;
      display: inline-flex !important;
      align-items: center !important;
    }
    .desktop-title {
      font-size: 20px !important;
      font-weight: 800 !important;
      color: #1e3a8a !important;
      letter-spacing: -0.5px !important;
      margin: 0 !important;
    }
    .desktop-sub-sep {
      color: #cbd5e1 !important;
      font-size: 13px !important;
      user-select: none !important;
      margin: 0 2px !important;
    }
    .desktop-subtitle {
      font-size: 13.5px !important;
      color: #64748b !important;
      font-weight: 600 !important;
      white-space: nowrap !important;
      letter-spacing: -0.2px !important;
    }
    .desktop-auth-wrap {
      display: inline-flex !important;
      align-items: center !important;
      flex-shrink: 0 !important;
    }
    .auth-badge {
      font-size: 12px !important;
      color: #334155 !important;
      background: #f8fafc !important;
      padding: 4px 12px !important;
      border-radius: 9999px !important;
      border: 1px solid #cbd5e1 !important;
      font-weight: 600 !important;
      display: inline-flex !important;
      align-items: center !important;
      gap: 8px !important;
      white-space: nowrap !important;
      flex-shrink: 0 !important;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
    }
    .auth-btn {
      height: 24px !important;
      padding: 0 10px !important;
      border-radius: 6px !important;
      font-size: 11px !important;
      font-weight: 700 !important;
      border: 1px solid #cbd5e1 !important;
      background: #ffffff !important;
      color: #475569 !important;
      cursor: pointer !important;
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      transition: all 0.15s ease !important;
      white-space: nowrap !important;
      flex-shrink: 0 !important;
    }
    .auth-btn:hover {
      background: #fee2e2 !important;
      color: #dc2626 !important;
      border-color: #fca5a5 !important;
    }
    .desktop-admin-bar {
      display: none !important;
      align-items: center !important;
      justify-content: space-between !important;
      flex-wrap: wrap !important;
      gap: 10px !important;
      background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%) !important;
      border: 1px solid #e2e8f0 !important;
      border-radius: 8px !important;
      padding: 6px 12px !important;
      box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) !important;
      width: 100% !important;
      box-sizing: border-box !important;
    }
    .desktop-admin-bar.is-admin-active {
      display: flex !important;
    }
    .admin-group-left, .admin-group-right {
      display: none !important;
      align-items: center !important;
      gap: 6px !important;
      white-space: nowrap !important;
      flex-shrink: 0 !important;
    }
    .desktop-admin-bar.is-admin-active .admin-group-left,
    .desktop-admin-bar.is-admin-active .admin-group-right {
      display: inline-flex !important;
    }
    .admin-bar-label {
      font-size: 11.5px !important;
      font-weight: 700 !important;
      color: #1e3a8a !important;
      display: inline-flex !important;
      align-items: center !important;
      gap: 4px !important;
      user-select: none !important;
      white-space: nowrap !important;
      margin-right: 2px !important;
    }
    .admin-bar-label-sub {
      color: #475569 !important;
    }
    .m-header-db-btn {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      gap: 5px !important;
      height: 26px !important;
      padding: 0 10px !important;
      font-size: 11.5px !important;
      font-weight: 700 !important;
      border-radius: 6px !important;
      border: 1px solid #cbd5e1 !important;
      background-color: #ffffff !important;
      color: #334155 !important;
      cursor: pointer !important;
      transition: all 0.15s ease !important;
      white-space: nowrap !important;
      text-decoration: none !important;
      box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03) !important;
    }
    .m-header-db-btn:hover {
      background-color: #f1f5f9 !important;
      color: #0f172a !important;
      border-color: #94a3b8 !important;
      transform: translateY(-0.5px) !important;
    }
    .btn-db-backup {
      border-color: #cbd5e1 !important;
      color: #1e3a8a !important;
    }
    .btn-db-backup:hover {
      background-color: #eff6ff !important;
      border-color: #93c5fd !important;
      color: #1d4ed8 !important;
    }
    .btn-db-restore {
      border-color: #fcd34d !important;
      color: #b45309 !important;
      background-color: #fffbeb !important;
    }
    .btn-db-restore:hover {
      background-color: #fef3c7 !important;
      border-color: #f59e0b !important;
      color: #92400e !important;
    }
    .btn-site-design {
      border-color: #1d4ed8 !important;
      background-color: #2563eb !important;
      color: #ffffff !important;
    }
    .btn-site-design:hover {
      background-color: #1d4ed8 !important;
      box-shadow: 0 2px 5px rgba(37, 99, 235, 0.3) !important;
    }
    .m-header-save-btn {
      display: inline-flex !important;
      align-items: center !important;
      justify-content: center !important;
      height: 26px !important;
      padding: 0 10px !important;
      font-size: 11px !important;
      font-weight: 700 !important;
      border-radius: 5px !important;
      border: 1px solid #1d4ed8 !important;
      background-color: #2563eb !important;
      color: #ffffff !important;
      cursor: pointer !important;
      transition: all 0.15s ease !important;
      white-space: nowrap !important;
    }
    .m-header-save-btn:hover {
      background-color: #1d4ed8 !important;
    }
    .upload-limit-input-wrap {
      display: inline-flex !important;
      align-items: center !important;
      background: #ffffff !important;
      border: 1px solid #cbd5e1 !important;
      border-radius: 5px !important;
      padding: 0 6px !important;
      height: 26px !important;
      box-sizing: border-box !important;
    }
    .upload-limit-input-wrap input {
      width: 48px !important;
      border: none !important;
      outline: none !important;
      font-size: 11.5px !important;
      font-weight: 700 !important;
      text-align: right !important;
      color: #0f172a !important;
      padding: 0 !important;
      background: transparent !important;
    }
    .upload-limit-unit {
      font-size: 11px !important;
      font-weight: 600 !important;
      color: #64748b !important;
      margin-left: 3px !important;
    }
    .upload-limit-select {
      height: 26px !important;
      font-size: 11.5px !important;
      font-weight: 600 !important;
      border: 1px solid #cbd5e1 !important;
      border-radius: 5px !important;
      background: #ffffff !important;
      color: #334155 !important;
      cursor: pointer !important;
      padding: 0 4px !important;
    }


/* [v4.00] 신규 기자 승인 및 회원 관리 모달 스타일 */
.btn-user-approval {
  border-color: #cbd5e1 !important;
  color: #0f766e !important;
  background-color: #f0fdfa !important;
}
.btn-user-approval:hover {
  background-color: #ccfbf1 !important;
  border-color: #14b8a6 !important;
  color: #0f766e !important;
}
.pending-badge {
  background: #ea580c !important;
  color: #ffffff !important;
  border-radius: 9999px !important;
  padding: 1px 6px !important;
  font-size: 10px !important;
  font-weight: 800 !important;
  margin-left: 3px !important;
}
.user-modal-card {
  max-width: 960px !important;
  width: 95% !important;
  max-height: 90vh !important;
  display: flex !important;
  flex-direction: column !important;
}
.user-modal-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 10px 16px !important;
  background: #f8fafc !important;
  border-bottom: 1px solid #e2e8f0 !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}
.user-modal-filter-wrap {
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
}
.user-filter-btn {
  height: 28px !important;
  padding: 0 10px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #475569 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  transition: all 0.15s ease !important;
}
.user-filter-btn.active {
  background: #2563eb !important;
  color: #ffffff !important;
  border-color: #1d4ed8 !important;
}
.btn-filter-pending.active {
  background: #ea580c !important;
  border-color: #c2410c !important;
}
.user-search-input {
  height: 28px !important;
  padding: 0 8px !important;
  font-size: 12px !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 6px !important;
  width: 160px !important;
  outline: none !important;
}
.user-reload-btn {
  height: 28px !important;
  padding: 0 10px !important;
  font-size: 11.5px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #334155 !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
}
.user-modal-body {
  padding: 0 !important;
  flex: 1 1 auto !important;
  overflow-y: auto !important;
  max-height: calc(90vh - 140px) !important;
}
.user-table-scroll {
  width: 100% !important;
  overflow-x: auto !important;
}
.user-approval-table {
  width: 100% !important;
  border-collapse: collapse !important;
  font-size: 12px !important;
  text-align: left !important;
  min-width: 780px !important;
}
.user-approval-table th {
  background: #f1f5f9 !important;
  color: #334155 !important;
  font-weight: 700 !important;
  padding: 8px 10px !important;
  border-bottom: 2px solid #cbd5e1 !important;
  white-space: nowrap !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 10 !important;
}
.user-approval-table td {
  padding: 6px 10px !important;
  border-bottom: 1px solid #e2e8f0 !important;
  vertical-align: middle !important;
  color: #0f172a !important;
}
.user-approval-table tr:hover td {
  background: #f8fafc !important;
}
.user-row-pending td {
  background: #fffbeb !important;
}
.user-edit-input {
  width: 100% !important;
  box-sizing: border-box !important;
  height: 26px !important;
  padding: 0 6px !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  outline: none !important;
  background: #ffffff !important;
}
.user-edit-input:focus {
  border-color: #2563eb !important;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.15) !important;
}
.user-edit-select {
  height: 26px !important;
  padding: 0 4px !important;
  font-size: 11.5px !important;
  font-weight: 600 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 4px !important;
  background: #ffffff !important;
  cursor: pointer !important;
  outline: none !important;
  width: 100% !important;
}
.user-btn-save {
  height: 25px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
  border: 1px solid #1d4ed8 !important;
  background: #2563eb !important;
  color: #ffffff !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}
.user-btn-save:hover {
  background: #1d4ed8 !important;
}
.user-btn-quick-appr {
  height: 25px !important;
  padding: 0 8px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
  border: 1px solid #16a34a !important;
  background: #22c55e !important;
  color: #ffffff !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}
.user-btn-quick-appr:hover {
  background: #16a34a !important;
}
.user-btn-del {
  height: 25px !important;
  padding: 0 6px !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  border-radius: 4px !important;
  border: 1px solid #ef4444 !important;
  background: #ffffff !important;
  color: #dc2626 !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}
.user-btn-del:hover {
  background: #fee2e2 !important;
}
.user-modal-footer {
  padding: 10px 16px !important;
  background: #f8fafc !important;
  border-top: 1px solid #e2e8f0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 10px !important;
}
.user-footer-note {
  font-size: 11.5px !important;
  color: #64748b !important;
}
.user-modal-btn-close {
  height: 28px !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  border-radius: 6px !important;
  border: 1px solid #cbd5e1 !important;
  background: #ffffff !important;
  color: #334155 !important;
  cursor: pointer !important;
}
