@charset "UTF-8";

/* ==========================================
   그룹 메뉴 권한 관리 전용 CSS (#system_auth)
   ========================================== */

/* ========== 전체 컨테이너 ========== */
#system_auth {
    width: 100%;
    height: 100%;
}

#system_auth .system-auth-container {
    display: grid;
    grid-template-columns: 450px 1fr;
    gap: 20px;
    height: calc(100vh - 240px);
    min-height: 600px;
}

/* ========== 패널 공통 스타일 ========== */
#system_auth .panel {
    background: #fff;
    border: 1px solid #dbdee2;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 패널 헤더 */
#system_auth .panel-header {
    flex-shrink: 0;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

#system_auth .section-title {
    font-size: 17px;
    font-weight: 600;
    color: #1d1d1d;
    margin: 0;
}


/* 패널 바디 - 남은 공간 채우기 */
#system_auth .panel-body {
    flex: 1;
    overflow: hidden;
}

/* SimpleBar 스크롤 컨테이너 */
#system_auth .auth-scroll {
    height: 100%;
}

/* 스크롤 영역 내부 콘텐츠 div 패딩 */
#system_auth #groupListBody,
#system_auth #menuListBody {
    padding: 15px;
}

/* ========== 왼쪽 패널: 그룹 검색 ========== */
#system_auth .group-search-section {
    padding: 8px 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #fff;
}


/* ========== 그룹 목록 아이템 ========== */
#system_auth .group-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #fff;
}

#system_auth .group-item:hover {
    background: #f0f7ff;
    border-color: #047bb6;
    transform: translateX(3px);
}

#system_auth .group-item.active {
    background: #e3f2fd;
    border-color: #047bb6;
    border-width: 2px;
    box-shadow: 0 4px 12px rgba(4, 123, 182, 0.15);
}

#system_auth .group-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#system_auth .group-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#system_auth .group-item-name {
    font-size: 15px;
    font-weight: 600;
    color: #1d1d1d;
}

#system_auth .group-item.active .group-item-name {
    color: #047bb6;
}

#system_auth .group-item-site {
    font-size: 13px;
    color: #047bb6;
    font-weight: 500;
}

#system_auth .group-item-header-right {
    display: flex;
    align-items: center;
    gap: 6px;
}

#system_auth .group-item-count {
    font-size: 13px;
    color: #6b7280;
}

#system_auth .group-item-count b {
    font-size: 15px;
    font-weight: 700;
    color: #047bb6;
}

#system_auth .group-item-date {
    font-size: 12px;
    color: #9ca3af;
}

/* ========== 오른쪽 패널: 메뉴 권한 설정 ========== */
#system_auth .menu-info-section {
    display: flex;
    flex-direction: column;
    gap: 0;
}

#system_auth .menu-info-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

#system_auth .menu-info-group {
    font-size: 16px;
    font-weight: 600;
    color: #1d1d1d;
    display: block;
    margin-bottom: 3px;
}


#system_auth .auth-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* ========== 메뉴 트리 ========== */
#system_auth .menu-tree {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#system_auth .menu-tree-item {
    display: flex;
    flex-direction: column;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    transition: all 0.2s;
}

#system_auth .menu-tree-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* 메뉴 노드 */
#system_auth .menu-node {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

#system_auth .menu-node:hover {
    background: #f9fafb;
}

/* 레벨별 들여쓰기 */
#system_auth .menu-node[data-level="1"] {
    padding-left: 15px;
    background: #f0f7ff;
    border-bottom: 1px solid #e3f2fd;
}

#system_auth .menu-node[data-level="2"] {
    padding-left: 40px;
    background: #fafbfc;
}

#system_auth .menu-node[data-level="3"] {
    padding-left: 65px;
    background: #fff;
}


/* 펼치기/접기 토글 */
#system_auth .menu-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    flex-shrink: 0;
}

#system_auth .menu-toggle:hover {
    background: #e5e7eb;
}

#system_auth .menu-toggle.empty {
    visibility: hidden;
}

#system_auth .menu-toggle::before {
    content: '▶';
    font-size: 15px;
    color: #6b7280;
    transition: transform 0.2s;
    display: inline-block;
}

#system_auth .menu-toggle.expanded::before {
    transform: rotate(90deg);
}

/* 하위 메뉴 컨테이너 */
#system_auth .menu-children {
    display: none;
    flex-direction: column;
}

#system_auth .menu-children.expanded {
    display: flex;
}

/* ========== 빈 상태 ========== */
#system_auth .empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 300px;
    padding: 40px 20px;
}

#system_auth .empty-state-text {
    font-size: 15px;
    color: #6b7280;
    text-align: center;
    line-height: 1.6;
}


/* ========== 로딩 상태 ========== */
#system_auth .loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

#system_auth .loading-spinner::after {
    content: '';
    width: 32px;
    height: 32px;
    border: 3px solid #e5e7eb;
    border-top-color: #047bb6;
    border-radius: 50%;
    animation: groupMenuAuthSpin 0.8s linear infinite;
}

@keyframes groupMenuAuthSpin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== 반응형 ========== */
@media (max-width: 1200px) {
    #system_auth .system-auth-container {
        grid-template-columns: 380px 1fr;
    }
}

@media (max-width: 992px) {
    #system_auth .system-auth-container {
        grid-template-columns: 1fr;
        height: auto;
    }

    #system_auth .panel {
        min-height: 500px;
    }

    #system_auth .menu-info-title {
        flex-direction: column;
        align-items: flex-start;
    }

    #system_auth .auth-actions {
        width: 100%;
    }

    #system_auth .auth-actions .btn {
        flex: 1;
    }
}

@media (max-width: 576px) {
    #system_auth .system-auth-container {
        gap: 15px;
    }

    #system_auth .panel-header {
        padding: 15px;
    }

    #system_auth .panel-body {
        padding: 10px;
    }

    #system_auth .group-search-section {
        padding: 12px 15px;
    }

    #system_auth .group-item {
        padding: 12px;
    }
}

/* 체크박스-라벨 간격 */
#system_auth .menu-checkbox label {
    padding-left: 12px;
    cursor: pointer;
}

