/* Dashboard Layout */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
    background-color: #F3F4F6;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #1E3A8A 0%, #1E40AF 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
}

.badge-admin {
    font-size: 0.6rem;
    background: #F97316;
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    margin-left: 0.5rem;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav .nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255,255,255,0.8);
    transition: all 0.3s;
    text-decoration: none;
}

.sidebar-nav .nav-item:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-nav .nav-item.active {
    background: rgba(255,255,255,0.15);
    color: white;
    border-left: 3px solid #F97316;
}

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

.sidebar-nav hr {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.1);
    margin: 1rem 0;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 260px;
    transition: margin-left 0.3s ease;
}

/* Topbar */
.topbar {
    background: white;
    padding: 1rem 2rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 999;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.topbar-left h1 {
    font-size: 1.5rem;
    margin: 0;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #1E3A8A;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.notifications-dropdown {
    position: relative;
}

.notification-bell {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6B7280;
    position: relative;
}

.notification-bell .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #EF4444;
    color: white;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
}

.notifications-panel {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    margin-top: 0.5rem;
    display: none;
    max-height: 400px;
    overflow-y: auto;
}

.notifications-dropdown:hover .notifications-panel {
    display: block;
}

.notifications-panel h4 {
    padding: 1rem;
    margin: 0;
    border-bottom: 1px solid #E5E7EB;
}

.notification-item {
    padding: 1rem;
    border-bottom: 1px solid #F3F4F6;
}

.notification-item:hover {
    background: #F9FAFB;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-info strong {
    display: block;
    font-size: 0.9rem;
}

.user-info span {
    display: block;
    font-size: 0.8rem;
    color: #6B7280;
}

/* Dashboard Container */
.dashboard-container {
    padding: 2rem;
}

/* Welcome Section */
.welcome-section {
    background: linear-gradient(135deg, #1E3A8A, #3B82F6);
    color: white;
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.welcome-text h2 {
    color: white;
    margin-bottom: 0.5rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    gap: 1rem;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-card.blue .stat-icon { background: #DBEAFE; color: #1E3A8A; }
.stat-card.green .stat-icon { background: #D1FAE5; color: #065F46; }
.stat-card.orange .stat-icon { background: #FED7AA; color: #9A3412; }
.stat-card.purple .stat-icon { background: #EDE9FE; color: #5B21B6; }

.stat-content h3 {
    font-size: 2rem;
    margin: 0 0 0.25rem 0;
}

.stat-content p {
    color: #6B7280;
    margin: 0;
}

.stat-content small {
    font-size: 0.8rem;
    color: #9CA3AF;
}

.stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.stat-trend.positive { color: #10B981; }
.stat-trend.negative { color: #EF4444; }

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

/* Dashboard Card */
.dashboard-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}

.dashboard-card.large {
    grid-column: span 2;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-content {
    padding: 1.5rem;
}

.btn-link {
    color: #1E3A8A;
    font-weight: 600;
    text-decoration: none;
}

/* Exercises List */
.exercises-list, .activity-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.exercise-item, .activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 0.5rem;
}

.exercise-icon, .activity-icon {
    width: 50px;
    height: 50px;
    background: #DBEAFE;
    color: #1E3A8A;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.exercise-info, .activity-info {
    flex: 1;
}

.exercise-info strong, .activity-info strong {
    display: block;
    margin-bottom: 0.5rem;
}

.progress-bar {
    height: 6px;
    background: #E5E7EB;
    border-radius: 3px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1E3A8A, #3B82F6);
    transition: width 0.3s ease;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    border-radius: 0.375rem;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #9CA3AF;
}

.empty-state i {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Recommendations */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.recommendation-card {
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    padding: 1rem;
    position: relative;
}

.recommendation-badge {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: #F97316;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    text-transform: uppercase;
}

.recommendation-card h4 {
    margin: 0 0 0.5rem 0;
}

.recommendation-meta {
    display: flex;
    justify-content: space-between;
    margin: 1rem 0;
    font-size: 0.875rem;
    color: #6B7280;
}

.recommendation-meta .price {
    color: #1E3A8A;
    font-weight: 700;
}

/* Data Table */
.table-responsive {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th {
    background: #F9FAFB;
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    color: #6B7280;
    font-size: 0.875rem;
}

.data-table td {
    padding: 0.75rem;
    border-bottom: 1px solid #F3F4F6;
}

.data-table tr:hover {
    background: #F9FAFB;
}

.user-cell strong {
    display: block;
}

.user-cell small {
    color: #6B7280;
}

.badge {
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-info { background: #DBEAFE; color: #1E40AF; }
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger { background: #FEE2E2; color: #991B1B; }

.btn-icon {
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.375rem;
    color: #6B7280;
    transition: all 0.3s;
}

.btn-icon:hover {
    background: #F3F4F6;
    color: #1E3A8A;
}

/* Popular Exercises */
.popular-exercises {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.popular-exercise-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: #F9FAFB;
    border-radius: 0.5rem;
}

.exercise-rank {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1E3A8A, #3B82F6);
    color: white;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

.exercise-details {
    flex: 1;
}

.exercise-details h4 {
    margin: 0 0 0.5rem 0;
}

.exercise-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #6B7280;
}

/* Quick Actions */
.quick-actions {
    margin-top: 2rem;
}

.quick-actions h3 {
    margin-bottom: 1rem;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
}

.quick-action-btn {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    text-align: center;
    text-decoration: none;
    color: #1F2937;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.quick-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.quick-action-btn i {
    font-size: 2rem;
    color: #1E3A8A;
    margin-bottom: 0.5rem;
}

.quick-action-btn span {
    display: block;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .dashboard-grid { grid-template-columns: 1fr; }
    .dashboard-card.large { grid-column: span 1; }
    .recommendations-grid { grid-template-columns: repeat(2, 1fr); }
    .quick-actions-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .stats-grid { grid-template-columns: 1fr; }
    .recommendations-grid { grid-template-columns: 1fr; }
    .quick-actions-grid { grid-template-columns: 1fr; }
    
    .welcome-section {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .topbar {
        padding: 1rem;
    }
    
    .dashboard-container {
        padding: 1rem;
    }
}

/* Alerts pour les messages */
.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
}

.alert i {
    font-size: 1.25rem;
}

.alert-success {
    background: #D1FAE5;
    color: #065F46;
    border-left: 4px solid #10B981;
}

.alert-error {
    background: #FEE2E2;
    color: #991B1B;
    border-left: 4px solid #EF4444;
}

.alert-info {
    background: #DBEAFE;
    color: #1E40AF;
    border-left: 4px solid #3B82F6;
}

.alert-warning {
    background: #FEF3C7;
    color: #92400E;
    border-left: 4px solid #F59E0B;
}
