/* ================================================================
   pc-mod-system.css — 환경설정 모듈 레이아웃 규칙
   규칙: 좌우 한 화면 / 상하 페이지 스크롤 OK / 카드 내부 스크롤 X
   ================================================================ */

/* ── 환경설정 카드: 내부 스크롤 제거 ── */
#pg-mes-queue .card,
#pg-adm-perm .card,
#pg-adm-backup .card,
#pg-adm-audit .card,
#pg-adm-code .card {
  overflow: visible !important;
  max-height: none !important;
}

/* ── 활동 로그 / 백업 목록 / 감사 로그: 내부 max-height 제거 ── */
#editLogList,
#backupArea,
#auditLogArea {
  max-height: none !important;
  overflow: visible !important;
}

/* ── 환경설정 영역 테이블: 가로 넘침 없이 컬럼 자동 조정 ── */
#pg-adm-backup .dt,
#pg-adm-audit .dt,
#pg-adm-code .dt {
  width: 100%;
  table-layout: auto;
}

/* 감사 로그 테이블 컬럼 폭 제어 (좁은 화면 대응) */
#auditLogArea .dt th:nth-child(1),
#auditLogArea .dt td:nth-child(1) { width: 140px; white-space: nowrap; }
#auditLogArea .dt th:nth-child(2),
#auditLogArea .dt td:nth-child(2) { width: 80px; }
#auditLogArea .dt th:nth-child(3),
#auditLogArea .dt td:nth-child(3) { width: 70px; }
#auditLogArea .dt th:nth-child(5),
#auditLogArea .dt td:nth-child(5) {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* t-set 내 auditTbl (mes-queue 탭) */
#auditTbl th:nth-child(1),
#auditTbl td:nth-child(1) { width: 140px; white-space: nowrap; }
#auditTbl th:nth-child(5),
#auditTbl td:nth-child(5) {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 백업 파일명 줄임 처리 */
#backupArea .dt td:first-child,
#backupTbody td:first-child {
  max-width: 300px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
}

/* ── 사용자 테이블: 가로 스크롤 없이 표시 ── */
#userTbl {
  width: 100%;
  table-layout: fixed;
}
#userTbl th:nth-child(1),
#userTbl td:nth-child(1) { width: 18%; }
#userTbl th:nth-child(2),
#userTbl td:nth-child(2) { width: 18%; }
#userTbl th:nth-child(3),
#userTbl td:nth-child(3) { width: 18%; }
#userTbl th:nth-child(4),
#userTbl td:nth-child(4) { width: 22%; }
#userTbl th:nth-child(5),
#userTbl td:nth-child(5) { width: 24%; }

/* ── 공통 코드 관리: 좌우 분할 레이아웃 ── */
#pg-adm-code .card > div[style*="grid-template-columns"] {
  min-width: 0;
}

/* 코드 카테고리 목록 */
#codeCatList {
  overflow: visible;
  max-height: none;
}

/* 코드 아이템 테이블 */
#codeItemList .dt {
  width: 100%;
  table-layout: auto;
  font-size: 12px;
}

/* ── 권한 관리: 체크박스 테이블 — 가로 스크롤 허용 (예외) ── */
#permArea {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
#permArea table {
  min-width: max-content;
}

/* ── 환경설정 페이지 전체: 페이지 단위 세로 스크롤만 ── */
#pg-mes-queue,
#pg-adm-perm,
#pg-adm-backup,
#pg-adm-audit,
#pg-adm-code {
  overflow-x: hidden;
  overflow-y: visible;
}
