/* Dashboard Layout */
body {
    display: flex;
    flex-direction: row;
    background-color: #f4f7f6;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: white;
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 0;
    list-style: none;
    margin: 0;
}

.menu-item {
    padding: 12px 25px;
    cursor: pointer;
    color: #666;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: 0.2s;
}

.menu-item:hover,
.menu-item.active {
    background-color: #f0fcf4;
    color: var(--primary);
    border-right: 4px solid var(--primary);
}

.menu-item i {
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #eee;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    flex: 1;
    padding: 30px;
    width: calc(100% - 250px);
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-info h3 {
    margin: 0;
    font-size: 24px;
    color: var(--dark);
}

.stat-info p {
    margin: 0;
    color: #888;
    font-size: 14px;
}

/* Filters */
.filter-bar {
    background: white;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar input,
.filter-bar select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

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

    /* Overlay */
    #sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 90;
    }

    #sidebar-overlay.active {
        display: block;
    }

    /* Close Button */
    .close-sidebar-btn {
        display: block;
        font-size: 24px;
        color: var(--dark);
        cursor: pointer;
        padding: 5px;
    }

    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }

    .mobile-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px;
        background: white;
        margin-bottom: 20px;
        border-radius: 10px;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    }

    .menu-toggle {
        display: block;
        font-size: 24px;
        cursor: pointer;
    }
}

@media (min-width: 769px) {
    .mobile-header {
        display: none;
    }

    .close-sidebar-btn {
        display: none;
    }

    #sidebar-overlay {
        display: none !important;
    }
}

/* Login Override */
.login-container {
    z-index: 9999;
}