/* Sidebar */
.sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: #fff;
    height: 708px; 
    position: fixed;
    top: 60px; 
    left: 0;
    overflow-y: auto; 
    transition: transform 0.3s ease;
    padding-top: 20px;
    border-right: 1px solid rgba(255,255,255,0.1);
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}
.sidebar::-webkit-scrollbar {
    display: none; 
}

.sidebar a {
    display: flex;
    align-items: center;
    color: #fff;
    padding: 12px 20px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin: 5px 10px;
}

/* Hover effect */
.sidebar a:hover {
    background-color: #34495e;
    padding-left: 25px;
}

/* Active link */
.sidebar a.active {
    background-color: #667eea;
    color: #fff;
    font-weight: 600;
}

.sidebar a i {
    margin-right: 12px;
    font-size: 1.1rem;
}

/* Mobile view (toggle sidebar) */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
        z-index: 1001;
    }
}

/* Sidebar submenu */
.sidebar .submenu {
    display: none;
    flex-direction: column;
    padding-left: 20px;
}

.sidebar .submenu a {
    padding: 8px 20px;
    font-size: 0.95rem;
    border-radius: 5px;
    margin: 3px 10px;
}

.sidebar a.submenu-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

/* Rotate chevron when active */
.sidebar a.submenu-toggle.active i.bi-chevron-down {
    transform: rotate(180deg);
    transition: transform 0.3s ease;
}

/* ========================= */
/* 📏 Responsive Sidebar Heights */
/* ========================= */

/* For smaller laptops (1280x720) */
@media (max-height: 720px) {
    .sidebar {
        height: 660px; /* 720 - 60 */
    }
}

/* For medium screens (1440x900) */
@media (min-height: 900px) and (max-height: 1079px) {
    .sidebar {
        height: 840px; /* 900 - 60 */
    }
}

/* For Full HD (1920x1080) */
@media (min-height: 1080px) {
    .sidebar {
        height: 1020px; /* 1080 - 60 */
    }
}
