/* ✅ Sidebar Styles */
.sidebar {
    height: 100vh; /* Full height */
    background-color: #343a40; /* Dark gray background */
    color: #fff; /* White text */
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1); /* Subtle shadow */
    padding-top: 20px;
    position: fixed; /* Fix the sidebar position */
    left: 0; /* Keep it aligned to the left */
    top: 0;
    width: 250px; /* Default width */
    transition: transform 0.3s ease-in-out; /* Smooth transition */
}

/* ✅ Navigation Links */
.sidebar .nav {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Space between items */
}

.sidebar .nav-link {
    color: #adb5bd; /* Light gray text */
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 5px; /* Rounded corners */
    transition: all 0.3s ease; /* Smooth transition for hover effect */
}

.sidebar .nav-link i {
    margin-right: 10px; /* Space between icon and text */
    font-size: 18px;
}

/* ✅ Hover Effect */
.sidebar .nav-link:hover {
    background-color: #495057; /* Slightly lighter gray */
    color: #fff; /* White text on hover */
    text-decoration: none;
}

/* ✅ Active Link */
.sidebar .nav-link.active {
    background-color: #007bff; /* Bootstrap primary color */
    color: #fff; /* White text */
}

.sidebar .nav-link.active:hover {
    background-color: #0056b3; /* Darker primary color */
}

/* ✅ Sidebar Toggle (Mobile) */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%); /* Hide sidebar by default */
        position: fixed;
        z-index: 1030; /* Ensure it's above other content */
    }

    .sidebar.open {
        transform: translateX(0); /* Show sidebar when open */
    }
}

/* ✅ Sidebar Toggle Button */
#sidebarToggle {
    position: absolute;
    left: 10px;
    top: 10px;
    z-index: 1050; /* Ensure it's above the sidebar */
    background: none;
    border: none;
    cursor: pointer;
}

#sidebarToggle img {
    width: 50px;
    height: 30px;
}

/* ✅ Hide Toggle Button on Larger Screens */
@media (min-width: 768px) {
    #sidebarToggle {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        width: 250px;
        left: -250px; /* Sidebar is hidden by default */
        top: 0;
        height: 100vh;
        transition: left 0.3s ease-in-out;
    }

    .sidebar.open {
        left: 0; /* Show sidebar */
    }

    .container-fluid {
        padding-top: 50px; /* Adjust this based on navbar height */
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    main {
        padding-top: 10px !important; /* Remove extra space */
    }
}

.navbar {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
