:root {
    --primary-purple: #6c5ce7;
    --dark-purple: #4834d4;
    --light-purple: #efeeff;
    --bg-light: #ffffff;
    --bg-sidebar: #f8fafc;
    --text-dark: #1e293b;
    --text-muted: #64748b;
    --glass-bg: rgba(255, 255, 255, 0.8);
    --glass-border: rgba(108, 92, 231, 0.1);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-purple {
    background-color: var(--primary-purple);
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-purple:hover {
    background-color: var(--dark-purple);
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.text-purple {
    color: var(--primary-purple) !important;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: #f1f5f9;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Sidebar Styling */
#sidebar {
    width: 275px;
    height: 100vh;
    background: var(--bg-sidebar);
    position: fixed;
    transition: all 0.3s ease;
    border-right: 1px solid var(--glass-border);
    z-index: 1000;
    overflow-y: auto;
    /* Enable simple vertical scrolling */
}

/* Custom Scrollbar for Sidebar */
#sidebar::-webkit-scrollbar {
    width: 6px;
}

#sidebar::-webkit-scrollbar-track {
    background: transparent;
}

#sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(108, 92, 231, 0.3);
    border-radius: 20px;
}

.sidebar-header {
    padding: 1.5rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header h3 {
    margin-bottom: 0;
}

.sidebar-logo {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    margin-bottom: 0;
    border: 2px solid white;
    box-shadow: 0 0 10px rgba(108, 92, 231, 0.2);
}

.sidebar-header h3 {
    color: var(--primary-purple);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 0;
    font-size: 1.5rem;
}

.nav-link {
    color: var(--text-muted) !important;
    padding: 1rem 2rem !important;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-purple) !important;
    background: var(--light-purple);
    border-left: 4px solid var(--primary-purple);
}

.nav-link i {
    font-size: 1.2rem;
    width: 25px;
}

/* Sub-menu Styling */
.sub-menu {
    list-style: none;
    padding-left: 0;
    background: rgba(0, 0, 0, 0.02);
}

.sub-menu .nav-link {
    padding: 0.7rem 2rem 0.7rem 3.5rem !important;
    font-size: 0.9rem;
}

.sub-menu .nav-link:hover {
    border-left: none;
    background: var(--light-purple);
}

/* Main Content Styling */
#content {
    margin-left: 275px;
    padding: 0;
    width: calc(100% - 275px);
    min-height: 100vh;
}

/* Banner */
.banner-container {
    height: 350px;
    overflow: hidden;
    position: relative;
    border-bottom: 4px solid var(--primary-purple);
    background: linear-gradient(135deg, #4a3f9f 0%, #6c5ce7 100%);
    display: flex;
    align-items: center;
}

.banner-container.has-content {
    flex-direction: row;
}

.banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: left center;
    filter: brightness(0.8);
    transition: all 0.5s ease;
}

.banner-container.has-content .banner-img {
    width: 40%;
    filter: brightness(1);
}

.banner-content {
    flex: 1;
    padding: 3rem;
    color: white;
    z-index: 2;
    display: none;
    /* Hidden by default, shown when using has-content */
}

.banner-container.has-content .banner-content {
    display: block;
}

.banner-overlay {
    position: absolute;
    top: 50%;
    left: 5%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 20px;
    z-index: 5;
}

.banner-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid white;
    object-fit: cover;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.banner-text-content {
    display: flex;
    flex-direction: column;
}

.banner-overlay h1 {
    font-size: 2.2rem;
    font-weight: 800;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.banner-overlay p {
    font-size: 1.1rem;
    font-weight: 700;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5);
}

/* Cards & Glassmorphism */
.dashboard-card {
    background: var(--bg-light);
    border: 1px solid var(--glass-border);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    transition: transform 0.3s ease;
}

.dashboard-card:hover {
    transform: translateY(-5px);
}

/* DataTable Styling */
.table {
    color: var(--text-dark) !important;
}

.dataTables_wrapper {
    padding: 1rem;
}

.dataTables_length,
.dataTables_filter,
.dataTables_info,
.dataTables_paginate {
    color: var(--text-muted) !important;
    margin-bottom: 1rem;
}

table.dataTable.no-footer {
    border-bottom: 1px solid var(--glass-border) !important;
}

.dataTables_filter input {
    background: #fff !important;
    border: 1px solid #dee2e6 !important;
    color: var(--text-dark) !important;
    border-radius: 10px;
}

.page-item.active .page-link {
    background-color: #e9ecef !important;
    border-color: #dee2e6 !important;
    color: var(--primary-purple) !important;
    font-weight: 700;
}

.page-link {
    background-color: #f8f9fa !important;
    color: var(--text-muted) !important;
    border: 1px solid var(--glass-border) !important;
}

.page-link:hover {
    background-color: #e9ecef !important;
    color: var(--primary-purple) !important;
}

/* Responsive */
@media (max-width: 768px) {
    #sidebar {
        margin-left: -275px;
    }

    #sidebar.active {
        margin-left: 0;
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.1);
    }

    #content {
        margin-left: 0;
        width: 100%;
    }

    .banner-container.has-content {
        flex-direction: column;
        height: auto;
    }

    .banner-container.has-content .banner-img {
        width: 100%;
        height: 200px;
    }

    .banner-container.has-content .banner-content {
        width: 100%;
        padding: 1.5rem;
        display: block;
    }

    .banner-content h1 {
        font-size: 1.5rem;
    }

    .banner-overlay {
        position: relative;
        top: 0;
        left: 0;
        transform: none;
        padding: 1.5rem;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .banner-overlay h1 {
        font-size: 1.5rem;
    }

    .banner-logo {
        width: 70px;
        height: 70px;
    }

    .mobile-toggle {
        display: flex !important;
        align-items: center;
        z-index: 998;
    }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: block;
    }
}