/* Sidebar styles */
.sidebar {
    width: 14rem;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    background-color: #2c3e50;
    color: #ecf0f1;
    padding: 15px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: scroll;
}

.sidebar.active {
    transform: translateX(0); /* Slide in when active */
}

.sidebar ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar ul li {
    margin: 0.6rem 0.4rem;
    /* border-color: #0d141b;
    border-radius: 0.2rem;
    border-width: 0.01rem;
    border-style: solid; */
}

.sidebar ul li a {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 1rem;
    display: block;
    padding: 0.4rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.sidebar ul li a:hover {
    background-color: #34495e;
}

.sidebar .sub-menu {
    margin-left: 0.8rem; /* Indent sub-menu items */
    margin-bottom: 0.5rem;
}

.sidebar .sub-menu li a {
    font-size: 0.7rem; /* Smaller font for sub-menu items */
    color: #bdc3c7;
}

.sidebar .sub-menu li {
    margin: 0 0.4rem; 
}

.sidebar .sub-menu li a:hover {
    color: #ffffff;
}

/* Sidebar container */
.sidebar-container {
    position: relative;
}

/* Sidebar toggle button */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    background-color: #2c3e50;
    color: #ffffff;
    border: none;
    /* padding: 0.2rem 0.4rem; */
    font-size: 2rem;
    cursor: pointer;
    border-radius: 0.3rem;
    width: 2.5rem;
    height: 2.7rem;
    z-index: 1000;
}

.sidebar-toggle:hover {
    background-color: #192531;
}

.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 999;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* User Info Section */
.user-info {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #34495e;
    margin-bottom: 20px;
}

.user-name {
    font-size: 1.2rem;
    font-weight: bold;
    color: #ecf0f1;
}

/* Logout Button */
.logout-form {
    margin-top: 10px;
    text-align: center;
}

.logout-button {
    background-color: #e74c3c;
    color: #ffffff;
    border: none;
    padding: 0.5rem 0.9rem;
    font-size: 1rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.logout-button:hover {
    background-color: #c0392b;
}

/* Responsive styles */
@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%); /* Hide sidebar by default */
    }

    .sidebar.active {
        transform: translateX(0); /* Show sidebar when active */
    }

    .sidebar-toggle {
        display: block; /* Show toggle button on smaller screens */
    }

    .content {
        margin-left: 0; /* Remove margin for content on smaller screens */
    }
}


@media (max-width: 992px) {
    .content {
        margin-left: 0; /* Remove margin for smaller screens */
    }
}