@charset "UTF-8";

/* =============================================
   그룹 관리 리스트
   ============================================= */
#system_group table {
    table-layout: fixed;
    width: 100%;
}
#system_group .tbody-scroll table tbody tr {
    cursor: pointer;
}
#system_group .tbody-scroll table tbody tr:hover {
    background-color: #f8f9fa;
}
#system_group .tbody-scroll {
    max-height: calc(100vh - 570px);
    min-height: 120px;
}
#system_group .pagination-wrap {
    margin-top: 20px;
}

/* =============================================
   3개 모달 공통 변수 (셀렉터 축약용)
   ============================================= */
/* :is(A, B, C) 로 detail / register / edit 3개 모달 공통 처리 */

/* show 토글 */
:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal).show {
    display: flex;
}

/* 모달 다이얼로그 크기 · 플렉스 구조 (배포 관리 모달과 동일: 내용에 맞춰 높이 자동, 최대 90vh) */
.sg-dialog {
    width: 900px;
    max-width: none;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* index.css .modal-content padding·min-height 초기화 후 플렉스 레이아웃 */
:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .modal-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    padding: 0;
}

/* =============================================
   상단: 그룹 정보 영역
   ============================================= */
:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .sg-detail-top {
    flex-shrink: 0;
    padding: 16px 20px;
}

:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .system_group-reg-info {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 20px;
    border: none;
    border-radius: 12px;
    padding: 16px 20px;
}

:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .sg-info-title {
    grid-column: 1 / -1;
    margin-bottom: 8px;
    padding-bottom: 0;
}

:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .form-group-view {
    display: grid;
    grid-template-columns: 90px 1fr;
    align-items: center;
    gap: 10px;
}

:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .form-label {
    font-size: 13px;
    font-weight: 500;
    color: #6b7280;
}

/* 상세 전용: 읽기 전용 값 표시 */
#system_group_detail_modal .form-value {
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    box-sizing: border-box;
    font-size: 14px;
    color: #1d1d1d;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    display: flex;
    align-items: center;
}

/* 등록·수정 전용: 입력 필드 */
:is(#system_group_register_modal, #system_group_edit_modal) .form-input {
    width: 100%;
    height: 38px;
    padding: 8px 12px;
    box-sizing: border-box;
    margin: 0;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #1d1d1d;
    transition: border-color 0.15s, box-shadow 0.15s;
}
:is(#system_group_register_modal, #system_group_edit_modal) .form-input:focus {
    outline: none;
    border-color: #047bb6;
    box-shadow: 0 0 0 3px rgba(4, 123, 182, 0.1);
}
:is(#system_group_register_modal, #system_group_edit_modal) select.form-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding: 0 30px 0 12px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%236b7280'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-color: #fff;
    cursor: pointer;
}

:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .sg-radio-group {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 38px;
}
:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .sg-radio-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
    color: #111827;
    cursor: pointer;
}
#system_group_detail_modal .sg-radio-group label { cursor: default; }
:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .sg-radio-group input[type="radio"] {
    width: 15px;
    height: 15px;
    margin: 0;
}

/* =============================================
   하단: 멤버 영역 레이아웃
   ============================================= */
#system_group_detail_modal .sg-detail-bottom {
    flex: 0 0 auto;
    padding: 8px 20px 16px;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
:is(#system_group_register_modal, #system_group_edit_modal) .sg-detail-bottom {
    flex: 0 0 auto;
    padding: 8px 20px 16px;
    min-height: 0;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* =============================================
   패널 구조
   ============================================= */
:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .system_group-reg-device-panel {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    padding: 16px 20px;
    overflow: hidden;
    border: none;
    border-radius: 12px;
}

:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .system_group-reg-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-shrink: 0;
}

:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .system_group-reg-panel-header .stats--modal__title {
    margin-bottom: 0;
    padding-bottom: 0;
}

:is(#system_group_register_modal, #system_group_edit_modal) .system_group-reg-panel-btn {
    font-size: 12px;
    padding: 2px 10px;
    height: 26px;
    line-height: 1;
}

/* =============================================
   form-tbl (padding · 컬럼 동기화 · no-data)
   ============================================= */
:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .system_group-reg-device-panel .form-tbl {
    flex: 0 0 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 목록 스크롤 영역: 내용에 맞춰 늘어나되 뷰포트 기준 상한 (모달 전체가 90vh를 넘지 않도록) */
:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .system_group-reg-device-panel .tbody-scroll {
    max-height: calc(90vh - 470px);
    min-height: 140px;
    overflow-y: auto;
}

/* 등록·수정: 좌(전체 사용자)·우(그룹원 목록) 두 패널의 목록 높이 동기화.
   그리드가 두 패널을 같은 높이로 늘려주므로, 내부 목록 영역도 패널 높이에 맞춰 채워 좌우 박스 높이를 일치시킨다. */
:is(#system_group_register_modal, #system_group_edit_modal) .system_group-reg-device-panel .form-tbl {
    flex: 1 1 auto;
}
:is(#system_group_register_modal, #system_group_edit_modal) .system_group-reg-device-panel .tbody-scroll {
    flex: 1 1 auto;
}

:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .form-tbl :is(th, td) {
    padding: 8px 10px;
    font-size: 14px;
}
:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .form-tbl table {
    table-layout: fixed;
    width: 100%;
}

/* bit.css .no-data display:flex → table-cell 재정의 */
:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .form-tbl .no-data {
    display: table-cell;
    height: auto;
    text-align: center;
    vertical-align: middle;
    padding: 16px;
}

/* =============================================
   행 클릭 이동: 클릭 가능 표시 (등록·수정 모달)
   ============================================= */
:is(#system_group_register_modal, #system_group_edit_modal) .tbody-scroll table tbody tr[data-user-id] {
    cursor: pointer;
}
:is(#system_group_register_modal, #system_group_edit_modal) .tbody-scroll table tbody tr[data-user-id]:hover {
    background-color: #f8f9fa;
}

:is(#system_group_register_modal, #system_group_edit_modal) .sg-member-del {
    text-align: center;
}
:is(#system_group_register_modal, #system_group_edit_modal) .al-transfer__remove {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    position: relative;
    cursor: pointer;
    background: none;   /* 배경색 없음 */
    border: none;
    vertical-align: middle;
}
/* X 모양 만들기 (두 개의 선을 겹침) */
:is(#system_group_register_modal, #system_group_edit_modal) .al-transfer__remove::before,
:is(#system_group_register_modal, #system_group_edit_modal) .al-transfer__remove::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 2px;
    background-color: #888;   /* X 선 색상 */
    transform-origin: center;
}
:is(#system_group_register_modal, #system_group_edit_modal) .al-transfer__remove::before {
    transform: translate(-50%, -50%) rotate(45deg);
}
:is(#system_group_register_modal, #system_group_edit_modal) .al-transfer__remove::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}
/* hover 시 진하게 */
:is(#system_group_register_modal, #system_group_edit_modal) .al-transfer__remove:hover::before,
:is(#system_group_register_modal, #system_group_edit_modal) .al-transfer__remove:hover::after {
    background-color: #333;
}

/* =============================================
   모달 내 검색박스 전폭
   ============================================= */
:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .search-box {
    width: 100%;
    margin-bottom: 8px;
}

/* =============================================
   검색 필터 숨김
   ============================================= */
:is(#system_group_detail_modal, #system_group_register_modal, #system_group_edit_modal) .sg-member-hidden {
    display: none !important;
}
