a.active p {
    color: #007bff !important;
}

/* 사이드바 로고 축소 */
body header .header-logo-img a img {
    height: calc(44 / 16 * 1rem) !important;
    max-height: 44px;
}
@media (max-width: 480px) {
    body header .header-logo-img a img {
        height: calc(35 / 16 * 1rem) !important;
    }
}

/* 사이드바 닫기 버튼 */
.sidebar-close-btn {
    position: absolute;
    top: 50%;
    right: calc(6 / 16 * 1rem);
    transform: translateY(-50%);
    width: calc(28 / 16 * 1rem);
    height: calc(28 / 16 * 1rem);
    border-radius: 4px;
    border: 1px solid #D4D4D4;
    background: #fff;
    color: #11A1AE;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background 0.2s, color 0.2s;
}
.sidebar-close-btn:hover {
    background: #11A1AE;
    color: #fff;
}
.sidebar-close-btn i {
    font-size: calc(12 / 16 * 1rem);
}
body header .header-logo {
    position: relative;
    padding-right: calc(44 / 16 * 1rem);
}

/* 사이드바 열기 버튼 (숨겨진 상태에서만 표시) - 닫기 버튼과 동일 높이, 상단 정렬 */
.sidebar-open-btn {
    position: fixed;
    left: 0;
    top: calc(20 / 16 * 1rem);
    z-index: 100;
    width: calc(28 / 16 * 1rem);
    height: calc(28 / 16 * 1rem);
    border: 1px solid #D4D4D4;
    border-left: none;
    border-radius: 0 6px 6px 0;
    background: #fff;
    color: #11A1AE;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 2px 0 8px rgba(0,0,0,0.08);
    transition: background 0.2s, color 0.2s;
}
.sidebar-open-btn:hover {
    background: #11A1AE;
    color: #fff;
}
.sidebar-open-btn i {
    font-size: calc(12 / 16 * 1rem);
}

/* 사이드바 숨김 상태 (데스크톱) - display:none으로 완전히 숨김 */
@media (min-width: 481px) {
    body.sidebar-collapsed header#sidebar-header {
        display: none !important;
    }
    /* 열기 버튼이 콘텐츠와 겹치지 않도록 본문 왼쪽 여백 확보 */
    body.sidebar-collapsed section {
        padding-left: calc(44 / 16 * 1rem) !important;
    }
}
@media (max-width: 480px) {
    .sidebar-close-btn { display: none !important; }
    .sidebar-open-btn { display: none !important; }
}

@media screen and (min-width: 768px) {
    .section-content-body {
        width: 500px !important;
    }
}

/* ═══ 모바일 반응형 (테이블·폼·섹션) ═══ */
@media (max-width: 768px) {
    /* 본문 영역 넘침 방지 */
    body section {
        overflow-x: hidden;
        padding-left: calc(12 / 16 * 1rem) !important;
        padding-right: calc(12 / 16 * 1rem) !important;
    }

    /* 검색 폼: 줄바꿈·너비 제한 */
    .section-find-options form {
        flex-wrap: wrap;
    }
    .section-find-options .form-items-date {
        flex-wrap: wrap;
    }
    .section-find-options label input,
    .section-find-options .select-box {
        max-width: 100%;
        box-sizing: border-box;
    }
    .section-find-options .form-items-button {
        flex-wrap: wrap;
    }

    /* 테이블: 가로 스크롤로 전체 컬럼 보기 */
    .section-table-data {
        position: relative;
        padding-bottom: calc(56 / 16 * 1rem);
        margin-left: calc(-12 / 16 * 1rem);
        margin-right: calc(-12 / 16 * 1rem);
        width: calc(100% + 1.5rem);
        max-width: none;
    }
    .section-table-data .table {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        overflow-y: visible;
    }
    .section-table-data .table table {
        min-width: 640px;
        width: max-content;
    }
    .section-table-data table thead tr th,
    .section-table-data table tbody tr td {
        padding: calc(10 / 16 * 1rem) calc(8 / 16 * 1rem) !important;
        font-size: calc(12 / 16 * 1rem) !important;
        white-space: nowrap;
    }
    .section-table-data table thead tr th {
        font-size: calc(11 / 16 * 1rem) !important;
    }

    /* 테이블 상단 요약(section-table-info) 모바일 정리 */
    .section-table-info {
        margin-bottom: calc(12 / 16 * 1rem);
    }
    .section-table-info-sum {
        flex-wrap: wrap;
        gap: calc(8 / 16 * 1rem);
    }
    .section-table-info-sum-data {
        min-width: calc(140 / 16 * 1rem);
    }

    /* 테이블 위 버튼(엑셀·전송 등) 줄바꿈 */
    .section-table-function,
    .section-table-function-button {
        flex-wrap: wrap;
        gap: calc(8 / 16 * 1rem);
    }
    .section-table-function-button button {
        flex: 1 1 auto;
        min-width: 0;
    }

    /* 페이지네이션 + 행수 선택: 겹침 방지 */
    .section-table-data > div[style*="position:absolute"],
    .section-table-data > div[style*="position: absolute"] {
        position: relative !important;
        float: none !important;
        margin-top: calc(12 / 16 * 1rem);
        margin-bottom: calc(8 / 16 * 1rem);
    }
    .table-paging {
        margin-top: calc(16 / 16 * 1rem);
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table-paging ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    /* 폼 전용 페이지(내정보·비밀번호 등) */
    .section-content-body {
        max-width: 100%;
        box-sizing: border-box;
        padding-left: calc(8 / 16 * 1rem);
        padding-right: calc(8 / 16 * 1rem);
    }

    /* 모달: 작은 화면에서 너비 제한 */
    .modal-content-body {
        max-width: calc(100vw - 24px) !important;
        margin: 0 calc(12 / 16 * 1rem);
    }
}

@media (max-width: 480px) {
    body section {
        padding-left: calc(10 / 16 * 1rem) !important;
        padding-right: calc(10 / 16 * 1rem) !important;
    }
    .section-table-data {
        margin-left: calc(-10 / 16 * 1rem);
        margin-right: calc(-10 / 16 * 1rem);
        width: calc(100% + 1.25rem);
    }
    .section-table-data .table table {
        min-width: 560px;
    }
    .section-info-firm-title h1 {
        font-size: calc(24 / 16 * 1rem) !important;
    }
    .section-info-firm-remine-row p.remine-data {
        font-size: calc(28 / 16 * 1rem) !important;
    }
}