.coach-analytics-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.client-selector {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    border: 1px solid #e9ecef;
}

.client-selector select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 250px;
    background: white;
    font-size: 14px;
}

.client-stats {
    margin-left: auto;
    color: #495057;
    font-size: 14px;
}

.no-clients-message {
    background: #fff3cd;
    color: #856404;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ffeaa7;
    margin-bottom: 20px;
}

.coach-tabs {
    display: flex;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 20px;
    background: white;
    border-radius: 8px 8px 0 0;
    padding: 0 20px;
}

.tab-button {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
    color: #6c757d;
}

.tab-button:hover {
    color: #495057;
    background: #f8f9fa;
}

.tab-button.active {
    border-bottom-color: #007cba;
    color: #007cba;
    font-weight: 600;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Insights Dashboard */
.insights-dashboard h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.insight-category {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.insight-category h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #ecf0f1;
}

.insight-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin: 8px 0;
    background: #f8f9fa;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.insight-item.clickable:hover {
    background: #e3f2fd;
    border-left-color: #2196f3;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.2);
}

.insight-icon {
    font-size: 20px;
    margin-right: 12px;
    min-width: 30px;
}

.insight-text {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #495057;
}

.insight-arrow {
    color: #666;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.insight-item.clickable:hover .insight-arrow {
    transform: translateX(3px);
    color: #2196f3;
}

/* Data Charts */
.data-charts-dashboard h3 {
    color: #2c3e50;
    margin-bottom: 25px;
    border-bottom: 2px solid #e74c3c;
    padding-bottom: 10px;
}

.chart-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.chart-section.chart-highlight {
    box-shadow: 0 0 0 3px #2196f3, 0 2px 15px rgba(0,0,0,0.1);
    background: #f3f9ff;
    transform: scale(1.02);
}

.chart-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 16px;
}

.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Summary Grid */
.insights-summary {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    border: 1px solid #e9ecef;
}

.insights-summary h4 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
}

.summary-item .label {
    color: #6c757d;
    font-weight: 500;
}

.summary-item .value {
    font-weight: 600;
    color: #2c3e50;
}

.trend-improving { color: #27ae60; }
.trend-regression { color: #e74c3c; }
.trend-stable { color: #95a5a6; }
.trend-plateau { color: #f39c12; }
.trend-insufficient_data { color: #95a5a6; }

.coach-analytics-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .coach-analytics-dashboard {
        padding: 10px;
    }
    
    .client-selector {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .client-selector select {
        min-width: 100%;
    }
    
    .client-stats {
        margin-left: 0;
        margin-top: 10px;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .coach-tabs {
        flex-direction: column;
        padding: 0;
    }
    
    .tab-button {
        text-align: left;
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .tab-button.active {
        border-left-color: #007cba;
        border-bottom: none;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
}