body {
    padding-top: 0; /* Remove any body padding meant for a fixed top navbar */
}

/* Sidebar styles */
.sidebar {
    width: 250px;
    background-color: #C21AA8; /* Brand color */
    color: #ffffff; /* Light text for brand background */
    height: 100vh; /* Full height sidebar */
    position: fixed; /* Fixed Sidebar */
    top: 0;
    left: 0;
    z-index: 1040; /* Ensure sidebar is above main content but below modals if any */
    padding: 0; /* Remove default padding, handle with internal elements */
    transition: transform 0.3s ease-in-out;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 1rem 1.25rem;
    background-color: rgba(0,0,0,0.1); /* Slightly darker overlay for header */
    border-bottom: 1px solid rgba(255,255,255,0.2); /* Lighter border for brand bg */
}

.sidebar-brand {
    color: #ffffff; /* Ensure brand text is white */
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
}

.sidebar .nav-link {
    color: #f8f9fa; /* Lighter text for links on brand color */
    padding: 0.75rem 1.25rem;
    display: flex;
    align-items: center;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px; /* Ensure icons align */
    text-align: center;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active { /* Style for active link */
    color: #ffffff;
    background-color: rgba(0,0,0,0.2); /* Darker overlay for hover/active on brand bg */
}

.sidebar .nav-item.mt-auto { /* Pushes profile/logout to bottom */
    margin-top: auto !important;
    border-top: 1px solid rgba(255,255,255,0.2); /* Lighter separator line for brand bg */
}

/* General Button Styles */
.btn {
    /* Base button styling if not already present from a framework like Bootstrap */
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #C21AA8; /* Brand color for primary buttons */
    border-color: #C21AA8;
}

.btn-primary:hover {
    color: #fff;
    background-color: #a3168c; /* Darker shade of brand color on hover */
    border-color: #95147f;
}

.btn-secondary { /* Example for secondary button, adjust as needed */
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
}

/* Links - if you want general links to also use brand color */
/*
a {
    color: #C21AA8;
}
a:hover {
    color: #a3168c;
}
*/


/* Main content adjustments */
.main-content {
    margin-left: 250px; /* Default for when sidebar is visible */
    padding: 20px;
    transition: margin-left 0.3s ease-in-out;
    padding-top: 20px; /* Default top padding */
}

/* Sidebar Toggle Button - already styled inline mostly, but can add more */
#sidebarToggle {
    /* position: fixed; top: 10px; left: 10px; z-index: 1050; */ /* Handled inline for now */
}

/* Mobile Top Bar */
.mobile-top-bar {
    /* background-color: #f8f9fa; */ /* Bootstrap default, can override */
    /* border-bottom: 1px solid #dee2e6; */
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}
.mobile-top-bar .navbar-brand {
    font-weight: bold;
}


/* Responsive adjustments */
@media (max-width: 991.98px) { /* Bootstrap lg breakpoint */
    .sidebar {
        transform: translateX(-100%); /* Hide sidebar off-screen */
    }

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

    .main-content {
        margin-left: 0; /* Full width main content when sidebar is hidden */
        padding-top: 70px; /* Space for the mobile-top-bar + sidebar toggle */
    }

    /* Overlay for when sidebar is active on mobile */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1039; /* Below sidebar, above content */
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease-in-out;
    }

    .sidebar-overlay.active { /* JS will toggle this class */
        display: block;
        opacity: 1;
    }
}

/* Ensure main content is not overlapped by fixed sidebar toggle if it's outside main-content */
/* Class 'sidebar-active' is toggled on body by JS */
body.sidebar-active {
    overflow-x: hidden; /* Prevent horizontal scroll when sidebar is open, vertical scroll still allowed */
    /* Consider 'overflow-y: hidden;' only if you want to prevent main content scroll completely, often not desired. */
}

/* Specific style for the mobile top bar to ensure it's above main content */
.d-lg-none.mobile-top-bar {
    z-index: 1035; /* Ensure it's above main content but below sidebar if it overlaps */
}
