/* =========================================================
 * admin-service 전역 폰트 공통화
 * - font-family: "맑은 고딕" (Malgun Gothic) 단일 사용
 * - font-size : 최소 12px (12px 미만 금지)
 * - 룰 정의 위치는 본 파일이 단일 소스. 페이지/팝업/모달/그리드 등
 *   하위 CSS 에서 font-family 를 재정의하지 않는다.
 * ========================================================= */
:root {
  /* KRDS 프레임워크 변수 오버라이드 — output.css 의 Pretendard GOV 무력화 */
  --krds-font-family-base: var(--font-family-base) !important;
  --krds-typo-font-type: var(--font-family-base) !important;
  /* AG Grid 변수 정렬 */
  --ag-font-family: var(--font-family-base);
  --ag-font-size: var(--font-size-base);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  color: black;
}

html,
body,
input,
select,
textarea,
button,
table,
th,
td,
div,
span,
p,
a,
label,
h1, h2, h3, h4, h5, h6,
li,
.ag-theme-alpine,
.ag-theme-alpine * {
  font-family: var(--font-family-base) !important;
}

/* AG Grid 의 아이콘 글리프(체크박스 체크/언체크, 정렬 화살표, 메뉴 ··· 등)는
   "agGridAlpine" 아이콘 폰트로 그려지므로 위의 한글 폰트 강제 룰에서 다시 제외. */
.ag-theme-alpine .ag-icon,
.ag-theme-alpine .ag-icon::before,
.ag-theme-alpine .ag-icon::after,
.ag-theme-alpine .ag-checkbox-input-wrapper,
.ag-theme-alpine .ag-checkbox-input-wrapper::before,
.ag-theme-alpine .ag-checkbox-input-wrapper::after,
.ag-theme-alpine .ag-radio-button-input-wrapper,
.ag-theme-alpine .ag-radio-button-input-wrapper::before,
.ag-theme-alpine .ag-radio-button-input-wrapper::after {
  font-family: var(--ag-icon-font-family, "agGridAlpine") !important;
}

body {
  font-family: var(--font-family-base);
  color: black;
  font-size: var(--font-size-base);
  background-color: var(--color-bg-soft);
  /* 전역 최소 가로 — 1280 미만은 가로 스크롤 발생 */
  min-width: 1280px;
}

/* 컨텐츠 컨테이너 — 1280~1920 가변, 1920 이상은 가운데 고정.
   그리드 컬럼은 픽셀 고정이라 컨테이너만 늘어나고 그리드 룩은 그대로 유지된다. */
.contents {
  width: 100%;
  min-width: 1280px;
  max-width: 1920px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.menu-content {
  margin: 0 auto;
  padding: 20px;
}

/* 메인 컨테이너 */
.main-wrapper {
  /*margin-top: 10px;*/
  display: flex;
  justify-content: center;
}

/* 검색 필터 하단 버튼 그룹 (엑셀 다운로드 등 액션 버튼 영역) */
.head-btn-group {
  width: 100%;
  text-align: end;
  padding: 10px 5px;
  background-color: var(--color-bg-alt);
  border: 1px solid var(--color-border);
  margin-bottom: 10px;
}

/* =========================================================
 * 체크박스 / 라디오 시각 복원
 * - KRDS output.css 의 글로벌 룰( input[type=checkbox]/radio { position:absolute; width:1px; clip:rect(0,0,0,0); !important } )
 *   이 sr-only 처리를 한다. 이는 KRDS 의 .krds-form-check 라벨로 커스텀 박스를 그리는 패턴 전용인데,
 *   admin 화면 곳곳의 native 체크박스(AG Grid 행 선택, 검색바 "삭제포함/탈퇴회원 포함" 등)까지 함께 숨겨버리는 부작용이 있어 복원.
 * - KRDS 폼체크 패턴(.krds-form-check 자손 input) 은 그대로 sr-only 유지.
 * ========================================================= */
/* 검색 바 등 AG Grid 외부 native 체크박스 — sr-only 풀고 그대로 보이게. */
.main-wrapper input[type="checkbox"],
.main-wrapper input[type="radio"] {
  position: static !important;
  width: auto !important;
  height: auto !important;
  margin: 0 4px 0 0 !important;
  padding: 0 !important;
  overflow: visible !important;
  clip: auto !important;
  white-space: normal !important;
  border: initial !important;
}

/* AG Grid 체크박스/라디오 — wrapper 의 ::after 가 시각을 그리고 input 은 wrapper 전체를
   덮는 투명 오버레이로 클릭 타겟 역할을 한다. KRDS sr-only(1×1 + clip) 룰이 적용되면
   클릭 영역이 사라져 헤더 전체선택/행 선택이 동작하지 않으므로 AG Grid 기본 형태로 환원. */
.ag-theme-alpine .ag-checkbox-input-wrapper,
.ag-theme-alpine .ag-radio-button-input-wrapper {
  position: relative !important;
}

.ag-theme-alpine .ag-checkbox-input-wrapper input,
.ag-theme-alpine .ag-radio-button-input-wrapper input,
.ag-theme-alpine input.ag-checkbox-input,
.ag-theme-alpine input.ag-radio-button-input,
.ag-theme-alpine input.ag-input-field-input[type="checkbox"],
.ag-theme-alpine input.ag-input-field-input[type="radio"] {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  opacity: 0 !important;
  clip: auto !important;
  overflow: visible !important;
  border: 0 !important;
  cursor: pointer !important;
  z-index: 1 !important;
}

/* KRDS 폼체크 패턴 내부 input 은 라벨 ::before/::after 로 커스텀 박스를 그리므로 다시 sr-only 로 환원 */
.main-wrapper .krds-form-check input[type="checkbox"],
.main-wrapper .krds-form-check input[type="radio"] {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
