:root {
    --primary: #4A90E2;
    --secondary: #50E3C2;
    --accent: #F5A623;
    --danger: #D0021B;
    --background-light: #F4F7F9;
    --background-dark: #2C3E50;
    --text-light: #ECF0F1;
    --text-dark: #34495E;
    --card-bg: #FFFFFF;
    --sidebar-width: 280px;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background-light);
    color: var(--text-dark);
    margin: 0;
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--background-dark);
    color: var(--text-light);
    transition: transform 0.3s ease-in-out;
    transform: translateX(0);
    flex-shrink: 0;
    padding: 2rem 0;
}
.sidebar-brand {
    padding: 0 1.5rem 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    text-decoration: none;
    display: block;
}
.sidebar-nav .nav-link {
    padding: 0.75rem 1.5rem;
    color: var(--text-light);
    border-radius: 0.5rem;
    margin: 0.5rem 1rem;
    transition: background-color 0.2s, box-shadow 0.2s;
}
.sidebar-nav .nav-link i {
    margin-right: 1rem;
    font-size: 1.2rem;
}
.sidebar-nav .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}
.sidebar-nav .nav-link.active {
    background-color: var(--primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    font-weight: 600;
}

/* Main Content */
.main-content {
    flex-grow: 1;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}
.user-profile {
    font-weight: 500;
}

/* Stat Cards */
.stat-card {
    background-color: var(--card-bg);
    border-radius: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}
.stat-content {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}
.stat-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    border-radius: 0.75rem;
    margin-right: 1.5rem;
}
.stat-icon.primary { background-color: var(--primary); }
.stat-icon.secondary { background-color: var(--secondary); }
.stat-icon.accent { background-color: var(--accent); }
.stat-icon.danger { background-color: var(--danger); }
.stat-details {
    flex-grow: 1;
}
.stat-title {
    font-size: 0.9rem;
    color: #888;
    margin: 0;
}
.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0.25rem 0 0;
}
.stat-sub-values {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #f0f0f0;
    padding-top: 1rem;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}
.stat-sub-values .sub-value {
    flex-grow: 1;
    text-align: center;
    padding: 0.5rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s;
}
.sub-value.this-week {
    background-color: rgba(0, 0, 0, 0.05);
    margin-right: 0.5rem;
}
.sub-value.this-month {
    background-color: rgba(0, 0, 0, 0.1);
}
.sub-value span {
    display: block;
    font-size: 1.25rem;
    font-weight: 700;
}
.sub-value small {
    font-weight: 500;
}


/* Responsive Navbar Toggle */
.mobile-header {
    display: none;
    padding: 1rem 1.5rem;
    background-color: var(--background-dark);
    color: white;
    justify-content: space-between;
    align-items: center;
}
.menu-toggle {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
}

@media (max-width: 991.98px) {
    body {
        flex-direction: column;
    }
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        transform: translateX(-100%);
        z-index: 1050;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    }
    .sidebar.show {
        transform: translateX(0);
    }
    .mobile-header {
        display: flex;
    }
    .main-content {
        padding-top: 5rem;
    }
}