﻿/* =========================================================
   DIVM SIDEBAR
   ========================================================= */

.divm-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--divm-sidebar-width);
    background: var(--divm-sidebar);
    color: #fff;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: transform 0.25s ease;
}


/* =========================================================
   BRAND
   ========================================================= */

.divm-brand {
    height: 78px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.divm-brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
}

.divm-logo {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 12px;
    background: white;
}

.divm-brand-text {
    display: flex;
    flex-direction: column;
}

    .divm-brand-text strong {
        font-size: 21px;
        letter-spacing: 0.3px;
    }

    .divm-brand-text small {
        color: #94a3b8;
        font-size: 10px;
    }


/* =========================================================
   USER PROFILE
   ========================================================= */

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 15px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
}

.sidebar-user-avatar img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 50%;
}

.sidebar-user-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .sidebar-user-info strong {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sidebar-user-info span {
        font-size: 11px;
        color: #94a3b8;
    }


/* =========================================================
   SCROLL AREA
   ========================================================= */

.sidebar-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 5px 12px 15px;
}

    .sidebar-scroll::-webkit-scrollbar {
        width: 4px;
    }

    .sidebar-scroll::-webkit-scrollbar-thumb {
        background: #334155;
        border-radius: 10px;
    }


/* =========================================================
   MENU
   ========================================================= */

.divm-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.menu-item {
    margin-bottom: 3px;
}

.menu-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    min-height: 44px;
    padding: 10px 13px;
    color: #cbd5e1;
    border-radius: 10px;
    font-size: 13.5px;
    transition: all 0.2s ease;
}

    .menu-link i {
        width: 20px;
        text-align: center;
        font-size: 15px;
    }

    .menu-link:hover {
        background: var(--divm-sidebar-hover);
        color: #fff;
        transform: translateX(2px);
    }

    .menu-link.active {
        background: var(--divm-sidebar-active);
        color: #fff;
        box-shadow: 0 4px 12px rgba(37,99,235,0.25);
    }

    .menu-link small {
        margin-left: auto;
        color: #64748b;
        font-size: 9px;
    }

    .menu-link.coming-soon {
        opacity: 0.7;
    }


/* =========================================================
   SIDEBAR BOTTOM
   ========================================================= */

.sidebar-bottom {
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.logout-link:hover {
    background: rgba(239,68,68,0.15);
    color: #fca5a5;
}


/* =========================================================
   SIDEBAR CLOSE
   ========================================================= */

.sidebar-close {
    border: 0;
    background: transparent;
    color: #94a3b8;
    font-size: 18px;
}


/* =========================================================
   SIDEBAR ACCORDION
   ========================================================= */

.sidebar-section {
    list-style: none;
    margin-bottom: 4px;
}

.sidebar-section-button {
    width: 100%;
    border: 0;
    background: transparent;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 13px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .6px;
    transition: all .2s ease;
}

    .sidebar-section-button span {
        display: flex;
        align-items: center;
        gap: 12px;
    }

        .sidebar-section-button span i {
            width: 20px;
            text-align: center;
        }

    .sidebar-section-button:hover {
        background: rgba(255,255,255,.05);
        color: #e2e8f0;
    }

    .sidebar-section-button.open {
        color: #fff;
    }

.section-arrow {
    font-size: 9px;
    transition: transform .2s ease;
}

.sidebar-section-button.open .section-arrow {
    transform: rotate(180deg);
}


/* =========================================================
   SIDEBAR SUBMENU
   ========================================================= */

.sidebar-submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height .25s ease, opacity .2s ease;
}

    .sidebar-submenu.open {
        max-height: 600px;
        opacity: 1;
        padding-bottom: 5px;
    }

    .sidebar-submenu .menu-link {
        margin-left: 8px;
        padding-left: 18px;
        min-height: 40px;
        font-size: 13px;
    }

        .sidebar-submenu .menu-link i {
            font-size: 13px;
        }

        .sidebar-submenu .menu-link.active {
            background: rgba(37,99,235,.25);
            color: #fff;
            box-shadow: none;
        }
