/* ============ DASHBOARD STYLES ============ */
.dashboard {
    display: none;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-radius: 30px;
    overflow: hidden;
    box-shadow: var(--shadow);
    animation: fadeIn 0.5s ease;
    width: 100%;
}

.dashboard.visible {
    display: block;
}

.dashboard-header {
    background: linear-gradient(135deg, var(--dark), #636e72);
    color: white;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dashboard-header .logo-small {
    font-size: 1.5em;
    font-weight: 700;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2em;
}

.dashboard-content {
    display: flex;
    min-height: 600px;
    max-height: 80vh;
}

.sidebar {
    width: 250px;
    background: var(--light);
    padding: 30px 0;
    border-right: 1px solid #e0e0e0;
    overflow-y: auto;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    padding: 15px 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    color: var(--dark);
    border-left: 4px solid transparent;
}

.sidebar-menu li:hover {
    background: rgba(108, 92, 231, 0.1);
}

.sidebar-menu li.active {
    background: var(--primary);
    color: white;
    border-left-color: var(--dark);
}

.sidebar-menu li span {
    white-space: nowrap;
}

.main-content {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    background: white;
}

.section {
    display: none;
    animation: slideIn 0.5s ease;
}

.section.active {
    display: block;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        padding: 15px 0;
    }
    
    .sidebar-menu {
        display: flex;
        overflow-x: auto;
    }
    
    .sidebar-menu li {
        padding: 10px 15px;
        white-space: nowrap;
    }
    
    .main-content {
        max-height: none;
    }
}

@media (max-width: 600px) {
    .dashboard-header {
        padding: 15px;
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .dashboard-header .logo-small {
        justify-content: center;
    }
    
    .user-info {
        width: 100%;
        justify-content: center;
        gap: 10px;
    }
    
    #userNameDisplay {
        display: none; /* Hide the text name to save space for the logout button */
    }
    
    .btn-logout {
        padding: 8px 15px;
        font-size: 0.9em;
    }
}