/* 사내 11개 업무 페이지 전용 — 왼쪽 고정 내비 (PC) */
:root {
    --intranet-sidebar-width: 232px;
    --intranet-sidebar-top: 90px;
}

body.intranet-sidebar-active {
    --intranet-sidebar-top: 90px;
}

.intranet-sidebar {
    display: none;
}

@media (min-width: 769px) {
    body.intranet-sidebar-active .intranet-sidebar {
        display: flex;
        flex-direction: column;
        position: fixed;
        left: 0;
        top: var(--intranet-sidebar-top);
        bottom: 0;
        width: var(--intranet-sidebar-width);
        padding: 0 0 24px;
        margin: 0;
        background: #fff;
        border-right: 1px solid #e8e8e8;
        box-shadow: 2px 0 12px rgba(0, 0, 0, 0.04);
        z-index: 900;
        overflow-y: auto;
        box-sizing: border-box;
    }

    body.intranet-sidebar-active .intranet-sidebar-brand {
        /* 헤더와 사이드바 경계는 붙이고, 브랜드 텍스트만 안쪽 여백 */
        padding: 14px 16px 14px;
        margin-bottom: 8px;
        border-bottom: 1px solid #f0f0f0;
    }

    body.intranet-sidebar-active .intranet-sidebar-brand a {
        font-size: 0.95rem;
        font-weight: 700;
        color: #333;
        text-decoration: none;
    }

    body.intranet-sidebar-active .intranet-sidebar-brand a:hover {
        color: #ff6a00;
    }

    body.intranet-sidebar-active .intranet-sidebar-brand span {
        display: block;
        font-size: 0.75rem;
        font-weight: 500;
        color: #888;
        margin-top: 4px;
    }

    body.intranet-sidebar-active .intranet-sidebar-nav {
        list-style: none;
        margin: 0;
        padding: 0 8px;
    }

    body.intranet-sidebar-active .intranet-sidebar-nav li {
        margin: 0;
    }

    body.intranet-sidebar-active .intranet-sidebar-nav a {
        display: block;
        padding: 10px 12px;
        margin: 2px 0;
        border-radius: 8px;
        font-size: 0.9rem;
        font-weight: 500;
        color: #444;
        text-decoration: none;
        line-height: 1.35;
        transition: background 0.15s, color 0.15s;
    }

    body.intranet-sidebar-active .intranet-sidebar-nav a:hover {
        background: #fff5eb;
        color: #ff6a00;
    }

    body.intranet-sidebar-active .intranet-sidebar-nav a.is-active {
        background: #fff0e6;
        color: #e65f00;
        font-weight: 600;
    }

    body.intranet-sidebar-active main,
    body.intranet-sidebar-active .main-footer {
        margin-left: var(--intranet-sidebar-width);
        width: calc(100% - var(--intranet-sidebar-width));
        max-width: calc(100% - var(--intranet-sidebar-width));
        min-width: 0;
        box-sizing: border-box;
    }

    /* 회계 등: 푸터가 main 안에 있을 때 — 이중 오프셋·100vw 펼침 방지 */
    body.intranet-sidebar-active main .main-footer {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* 회계 main → 푸터 배경이 사이드바~우측 끝까지 맞닿음 (카드만 calc 여백) */
    body.intranet-sidebar-active main.accounting-page {
        max-width: none !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-top: 140px !important;
        padding-bottom: 40px !important;
    }

    body.intranet-sidebar-active .accounting-page .accounting-container {
        max-width: min(1400px, calc(100% - 48px));
        margin-left: auto;
        margin-right: auto;
        width: 100%;
        box-sizing: border-box;
    }

    body.intranet-sidebar-active .accounting-page > .main-footer {
        margin-top: 12px !important;
    }

    /* 내규·등록·상세: 가운데 열 패딩 */
    body.intranet-sidebar-active .intranet-page-inner {
        padding-left: clamp(16px, 2.5vw, 28px) !important;
        padding-right: clamp(16px, 2.5vw, 28px) !important;
    }
}