/* 팝업 기본 스타일 */
.popup_wrap {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 10px;
    overflow-y: auto;
}

.popup_inner {
    position: relative;
    width: 97%;
    max-width: 1600px;
    background: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 1001;
    margin-bottom: 20px;
}

/* 팝업 헤더 */
.popup_tit {
    display: flex;
    border-bottom: 1px solid #ddd;
    background-color: #0d1342;
    color: rgba(255, 255, 255, .9);
    font-size: 15px;
    padding: 15px 20px;
    line-height: 1em;
    position: relative;
    font-weight: 300;
}

.popup_tit .tit {
    margin: 0;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, .9);
    line-height: 1.4;
}

/* 팝업 컨텐츠 */
.popup_con {
    padding: 15px;
    font-size: 13px;
}

/* 팝업 내 테이블 셀 */
.popup_con td,
.popup_con th {
    font-size: 13px;
}

/* 팝업 내 힌트 메시지 */
.popup_con .hint-message {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* 팝업 푸터 */
.popup_foot {
    padding: 12px 15px;
    text-align: center;
    border-top: 1px solid #e5e5e5;
    background: #f9f9f9;
    border-radius: 0 0 4px 4px;
}

.popup_foot .newbtn,
.popup_foot .newbtns {
    min-width: 80px;
    margin: 0 4px;
    font-size: 13px;
}

/* 팝업 컨테이너 */
.auth-container {
    display: flex;
    gap: 15px;
    height: calc(100vh - 180px);
    min-height: 450px;
    max-height: 600px;
}

/* 섹션 영역 공통 스타일 */
.group-selection-area,
.role-list-area,
.menu-tree-area {
    flex: 1;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
}

.section-title {
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    border-bottom: 1px solid #e5e5e5;
    background: #f9f9f9;
    border-radius: 4px 4px 0 0;
    line-height: 1.4;
}

/* 검색 영역 */
.search-box {
    padding: 10px 12px;
    display: flex;
    gap: 8px;
}

.search-box .input {
    flex: 1;
    height: 32px;
    padding: 0 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
}

/* 테이블 영역 */
.table_area {
    flex: 1;
    padding: 0 12px 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* 메뉴 트리 영역 */
.menu-tree-container {
    flex: 1;
    padding: 0 12px 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.menu-tree-wrapper {
    flex: 1;
    overflow-y: auto;
    border: none;
    border-radius: 0;
    padding: 0;
    background: #fff;
    min-height: 0;
}

.menu-tree-wrapper::-webkit-scrollbar {
    width: 5px;
}

.menu-tree-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.menu-tree-wrapper::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 3px;
}

.menu-tree-wrapper::-webkit-scrollbar-thumb:hover {
    background: #999;
}

/* 선택된 항목 스타일 */
#selectedGroupName,
#selectedRoleName {
    color: #327fc8;
    margin-left: 6px;
    font-size: 12px;
}

/* DataTables 커스텀 스타일 */
.dataTables_wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.dataTables_wrapper .dataTables_scroll {
    flex: 1;
    overflow: hidden;
    min-height: 0;
}

.dataTables_wrapper .dataTables_scrollBody {
    overflow-y: auto !important;
}

.dataTables_wrapper table.dataTable {
    width: 100% !important;
    margin: 0 !important;
    font-size: 13px;
}

.dataTables_wrapper table.dataTable thead th {
    background: #f9f9f9;
    padding: 8px 10px;
    font-weight: 500;
    border-bottom: 1px solid #e5e5e5;
    font-size: 13px;
    line-height: 1.4;
}

.dataTables_wrapper table.dataTable tbody td {
    padding: 6px 10px;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.4;
}

.dataTables_wrapper table.dataTable tbody tr {
    cursor: pointer;
}

.dataTables_wrapper table.dataTable tbody tr:hover,
.dataTables_wrapper table.dataTable tbody tr.selected {
    background-color: #ddedfd !important;
}

/* 메시지 스타일 */
.no-data-message {
    padding: 15px;
    text-align: center;
    color: #666;
    background: #f9f9f9;
    border-radius: 3px;
    margin: 8px 0;
    font-size: 13px;
    line-height: 1.4;
}

/* 탭 스타일 */
.tab-container {
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 0px;
}

.tab-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    background-color: #f8f9fa;
}

.tab-item {
    margin: 0;
    border-right: 1px solid #dee2e6;
}

.tab-item:last-child {
    border-right: none;
}

.tab-link {
    display: block;
    padding: 12px 20px;
    text-decoration: none;
    color: #6c757d;
    background-color: #f8f9fa;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    font-weight: 500;
}

.tab-link:hover {
    color: #495057;
    background-color: #e9ecef;
    text-decoration: none;
}

.tab-item.active .tab-link {
    color: #007bff;
    background-color: #fff;
    border-bottom: 3px solid #007bff;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* 이행정보 이력 팝업 스타일 */
.history-list {
    margin-top: 20px;
}

.history-item {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.history-item h3 {
    margin: 0 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #4a90e2;
    color: #333;
}

.history-empty-message {
    padding: 20px;
    text-align: center;
    color: #999;
    font-style: italic;
    background-color: #fafafa;
    border-radius: 3px;
}

.history-detail {
    margin-bottom: 15px;
}

.detail-table {
    width: 100%;
    border-collapse: collapse;
}

.detail-table th {
    width: 150px;
    padding: 8px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    text-align: left;
}

.detail-table td {
    padding: 8px;
    border: 1px solid #ddd;
}

.target-person-list h4 {
    margin: 15px 0 10px 0;
    color: #555;
    font-size: 14px;
    font-weight: bold;
}

.target-person-empty {
    padding: 10px 20px;
    color: #999;
    font-style: italic;
}

.target-person-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.target-person-item {
    padding: 10px 20px;
    border-left: 3px solid #4a90e2;
    margin-bottom: 8px;
    background-color: #fff;
}

.target-person-type {
    color: #666;
    margin-left: 10px;
}

.target-person-detail {
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.text-left {
    text-align: left;
}