﻿/* ━━━━━━━━━━━ SIDEBAR LAYOUT ━━━━━━━━━━━ */

.app-body {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.sidebar {
    width: 270px;
    background: #ffffff;
    border-right: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 10px 0;
}

    /* ━━━━━━━━━━━ NAV GROUP ━━━━━━━━━━━ */

    .sidebar-scroll .nav-group {
        border-bottom: 1px solid #e5e7eb;
    }

    .sidebar-scroll .nav-group-header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 7px;
        cursor: pointer;
        transition: all .2s;
    }

        .sidebar-scroll .nav-group-header:hover {
            background: var(--bg);
        }

        .sidebar-scroll .nav-group-header.active {
            background: var(--primary-lt);
        }

    /* ━━━━━━━━━━━ ICON BOX ━━━━━━━━━━━ */

    .sidebar-scroll .nav-group-icon {
        width: 34px;
        height: 34px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
        .sidebar-scroll .nav-group-icon i {
            color: #11307f !important;
            font-size: 18px;
        }
    
    /* ━━━━━━━━━━━ LABEL ━━━━━━━━━━━ */

    .sidebar-scroll .nav-group-label {
        font-size: 14px;
        font-weight: 600;
        color: #334155;
        flex: 1;
    }

    /* ━━━━━━━━━━━ COUNT BADGE ━━━━━━━━━━━ */

    .sidebar-scroll .nav-group-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 24px;
        height: 24px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 600;
        background: #11307f;
        color: white;
    }

    /* ━━━━━━━━━━━ ARROW ━━━━━━━━━━━ */

    .sidebar-scroll .nav-group-arrow {
        font-size: 9px;
        color: var(--text-lt);
        transition: transform 0.2s;
    }

    .sidebar-scroll .nav-group-header.open .nav-group-arrow {
        transform: rotate(90deg);
    }

    /* ━━━━━━━━━━━ SUB MENU ━━━━━━━━━━━ */

    .sidebar-scroll .nav-children {
        display: none;
        padding-left: 18px;
    }

        .sidebar-scroll .nav-children.open {
            display: block;
        }

    /* ━━━━━━━━━━━ SUB HEADER ━━━━━━━━━━━ */

    .sidebar-scroll .nav-sub-header {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 8px 12px;
        cursor: pointer;
        border-radius: 6px;
        transition: .15s;
    }

        .sidebar-scroll .nav-sub-header:hover {
            background: #f1f5f9;
        }

    .sidebar-scroll .nav-sub-label {
        flex: 1;
        font-size: 13px;
        color: #475569;
    }

    /* SUB COUNT */

    .sidebar-scroll .nav-sub-count {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 22px;
        height: 22px;
        padding: 0 6px;
        border-radius: 999px;
        font-size: 12px;
        font-weight: 600;
        background: #e2e8f0;
        color: #475569;
    }

    /* SUB ARROW */

    .sidebar-scroll .nav-sub-arrow {
        font-size: 10px;
        color: #94a3b8;
    }

    .sidebar-scroll .nav-sub-header.open .nav-sub-arrow {
        transform: rotate(90deg);
    }

    /* ━━━━━━━━━━━ FINAL LINKS ━━━━━━━━━━━ */

    .sidebar-scroll .nav-links {
        display: none;
        padding-left: 12px;
    }

        .sidebar-scroll .nav-links.open {
            display: block;
        }

    .sidebar-scroll .nav-link {
        padding: 7px 12px;
        font-size: 12px;
        border-radius: 6px;
        cursor: pointer;
        color: #64748b;
        transition: .15s;
    }

        .sidebar-scroll .nav-link:hover {
            background: #eef6ff;
            color: #2563eb;
        }

        .sidebar-scroll .nav-link.active {
            background: #e0f2fe;
            color: #1d4ed8;
            font-weight: 600;
        }

    /* MAIN GROUP */

    .sidebar-scroll .nav-group-header:hover {
        background: #e8f2ff;
    }

        .sidebar-scroll .nav-group-header:hover .nav-group-label {
            color: #11307f;
        }

    /* SUB GROUP */

    .sidebar-scroll .nav-sub-header:hover {
        background: #e8f2ff;
    }

        .sidebar-scroll .nav-sub-header:hover .nav-sub-label {
            color: #1d4ed8;
        }

    /* FINAL LINKS */

    .sidebar-scroll .nav-link:hover {
        background: #e8f2ff;
        color: #1d4ed8;
    }

    .sidebar-scroll .nav-group-header,
    .sidebar-scroll .nav-sub-header,
    .sidebar-scroll .nav-link {
        border-radius: 8px;
    }

        .sidebar-scroll .nav-group-header.active .nav-group-count {
            background: #0284c7;
            color: white;
        }

        .sidebar-scroll .nav-sub-header.open .nav-sub-count {
            background: #dbeafe;
            color: #1d4ed8;
        }

        .sidebar-scroll .nav-group-header.open .nav-group-count {
            background: #11307f;
            color: white;
        }


        .sidebar-scroll .nav-link::before, .sidebar-scroll .nav-sub-label::before {
            content: "•";
            color: #9ca3af;
            margin-right: 8px;
            font-size: 14px;
        }
