:root {
    --sidebar-width: 250px;
    --main-bg: #f8f9fa;
    --sidebar-bg: #2e3f6d;
    --text-light: #ecf0f1;
}

body {
    min-height: 100vh;
    display: flex;
    background: var(--main-bg);
}

.sidebar {
    background: var(--sidebar-bg);
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    padding: 20px;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    z-index: 1000;
    overflow-y: auto;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 30px;
    transition: margin 0.3s;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.nav-link {
    color: var(--text-light) !important;
    padding: 12px 15px !important;
    border-radius: 5px;
    transition: background 0.3s;
}

.nav-link:hover { background: rgba(255,255,255,0.1); }

.stat-card {
    background: white;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.mobile-menu { 
    display: none; 
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
}

@media (max-width: 768px) {
    .sidebar { 
        transform: translateX(-100%); 
        height: 100%;
    }
    .sidebar.active { transform: none; }
    .main-content { 
        margin-left: 0;
        padding-top: 70px;
    }
    .mobile-menu { display: block; }
}

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

@media (max-width: 768px) {
    .sidebar.active ~ .sidebar-overlay {
        display: block;
    }
}

.user-panel {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 1rem;
    margin-top: auto;
}

.user-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

.btn-link.nav-link {
    color: var(--text-light) !important;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
}

.btn-link.nav-link:hover {
    background: rgba(255,255,255,0.1) !important;
}

.user-name-link {
    display: block;
    padding: 8px 15px;
    color: white !important;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}
.user-name-link:hover {
    background: rgba(255,255,255,0.1);
}

.main-header {
    position: relative;
    z-index: 999;
}