/**Layer 88: Analytics*/
.analytics-dashboard {
    padding: 2rem 0
}

.analytics-header {
    margin-bottom: 2rem
}

.analytics-title {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text
}

.analytics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1.5rem
}

.analytics-card {
    background: #fff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .08);
    border: 1px solid #e5e7eb
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem
}

.card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: #111827
}

.rating-badge {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    box-shadow: 0 4px 8px rgba(249, 115, 22, .3)
}

.form-indicator {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    border-radius: 8px;
    font-size: .875rem;
    font-weight: 600
}

.form-excellent {
    background: #d1fae5;
    color: #065f46
}

.form-good {
    background: #dbeafe;
    color: #1e40af
}

.form-average {
    background: #fef3c7;
    color: #92400e
}

.form-poor {
    background: #fee2e2;
    color: #991b1b
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-top: 1rem
}

.metric-item {
    text-align: center;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px
}

.metric-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #3b82f6
}

.metric-label {
    font-size: .75rem;
    color: #6b7280;
    margin-top: .25rem
}

.form-guide {
    display: flex;
    gap: .25rem;
    margin: .75rem 0
}

.form-result {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: .875rem
}

.form-result.W {
    background: #10b981;
    color: #fff
}

.form-result.D {
    background: #f59e0b;
    color: #fff
}

.form-result.L {
    background: #ef4444;
    color: #fff
}

.trend-arrow {
    font-size: 1.25rem;
    margin-left: .5rem
}

.trend-rising {
    color: #10b981
}

.trend-stable {
    color: #6b7280
}

.trend-declining {
    color: #ef4444
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
    margin-top: .5rem
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
    transition: width .3s
}

.xg-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
    margin-top: 1rem
}

.xg-value {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700
}

.xg-label {
    font-size: .75rem;
    color: #6b7280;
    text-align: center
}

@media (max-width:768px) {
    .analytics-grid {
        grid-template-columns: 1fr
    }

    .metrics-grid {
        grid-template-columns: 1fr
    }
}