body {
    overflow-x: hidden;
}

#sidebar-wrapper {
    min-height: 100vh;
    margin-left: -15rem; /* Same as width */
    transition: margin .25s ease-out;
    background-color: #F1F5F9; /* Slate 100 - Light background */
    color: #334155; /* Slate 700 - Dark text */
    border-right: 1px solid #CBD5E1; /* Slate 300 for border */
}

#sidebar-wrapper .sidebar-heading {
    padding: 0.875rem 1.25rem;
    font-size: 1.2rem;
    color: #7C3AED; /* Violet */
    border-bottom: 1px solid #CBD5E1; /* Slate 300 for border */
}

#sidebar-wrapper .list-group {
    width: 15rem; /* Same as margin-left */
}

#sidebar-wrapper .list-group-item {
    background-color: #F1F5F9; /* Slate 100 */
    color: #334155; /* Slate 700 for item text */
    border: none;
    padding: 0.75rem 1.25rem;
}

#sidebar-wrapper .list-group-item:hover,
#sidebar-wrapper .list-group-item.active {
    background-color: #E2E8F0; /* Slate 200 for hover/active background */
    color: #7C3AED; /* Violet for hover/active text */
    text-decoration: none;
}

#sidebar-wrapper .list-group-item i {
    margin-right: 0.5rem;
    color: #64748B; /* Slate 500 for icons by default */
}

/* Ensure active/hover icons also change color */
#sidebar-wrapper .list-group-item:hover i,
#sidebar-wrapper .list-group-item.active i {
    color: #7C3AED; /* Violet for icons on hover/active */
}

/* Submenu styles */
#sidebar-wrapper .list-group .list-group-item ul {
    padding-left: 1rem; /* Indent sub-items */
    list-style: none;
}

#sidebar-wrapper .list-group .list-group-item ul a {
    color: #334155; /* Slate 700 for submenu links */
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
}

#sidebar-wrapper .list-group .list-group-item ul a:hover {
    color: #7C3AED; /* Violet for submenu links on hover */
}


#page-content-wrapper {
    min-width: 100vw;
}

#wrapper.toggled #sidebar-wrapper {
    margin-left: 0;
}

#menu-toggle {
    cursor: pointer;
}

/* Adjustments for smaller screens if sidebar is open */
@media (max-width: 768px) {
    #sidebar-wrapper {
        margin-left: -15rem; /* Hidden by default */
        border-right: 1px solid #CBD5E1; /* Ensure border is also present on toggle for consistency */
    }
    #wrapper.toggled #sidebar-wrapper {
        margin-left: 0; /* Shown when toggled */
        width: 15rem;
        position: absolute; /* Or fixed, depending on desired scroll behavior */
        z-index: 1000;
    }
    #wrapper.toggled #page-content-wrapper {
        margin-left: 0; /* Content doesn't shift or shifts less */
    }
}

/* NEW: Tablet and Mobile Sidebar Behavior */
@media (max-width: 991.98px) { /* Covers phones and tablets (portrait & landscape) */
    #wrapper.toggled #sidebar-wrapper {
        width: 15rem;         /* Ensure width is set */
        position: absolute;   /* Overlay content */
        z-index: 1000;        /* Stay on top */
        /* margin-left: 0; is handled by the global #wrapper.toggled #sidebar-wrapper rule */
    }
    /* No specific rule needed for #page-content-wrapper here, 
       as the absolute positioned sidebar won't push it. */
}

/* General Style Enhancements */

/* Prominent Shadows for Cards and Buttons */
.card, .btn {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn:hover, .btn:focus { /* Added :focus for accessibility and consistency */
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* Table Header Styling */
table > thead > tr > th,
.table > thead > tr > th { /* More specific Bootstrap selectors */
    background-color: #7C3AED;
    color: #FFFFFF;
    border-color: #6D28D9; /* Darker Violet */
}

/* Button Styling */
.btn-primary {
    background-color: #7C3AED;
    border-color: #7C3AED;
    color: #FFFFFF;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #6D28D9;
    border-color: #5B21B6;
    color: #FFFFFF;
}

.btn-secondary {
    background-color: #E2E8F0;    /* Slate 200 */
    border-color: #CBD5E1;      /* Slate 300 */
    color: #7C3AED;             /* Violet text */
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: #CBD5E1;    /* Slate 300 on hover */
    border-color: #94A3B8;      /* Slate 400 on hover */
    color: #6D28D9;             /* Darker Violet text */
}

/* Table General Styling */
.table {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Consistent shadow with cards */
    border: 1px solid #CBD5E1;               /* Outer border - Slate 300 */
}

.table th,
.table td {
    border: 1px solid #CBD5E1; /* Border for all cells - Slate 300 */
}

/* Striped tables styling */
.table-striped > tbody > tr:nth-of-type(odd) > * {
    --bs-table-accent-bg: #F8F9FA; /* Very light gray background */
}

/* Hoverable table rows styling */
.table-hover > tbody > tr:hover > * {
     --bs-table-hover-bg: #E9ECEF; /* Light gray hover background */
} 