:root {
    /* FDR Scale overrides */
    --fdr-1: #4ADE80;
    --fdr-2: #86EFAC;
    --fdr-3: #A3A3A3;
    --fdr-4: #FB923C;
    --fdr-5: #EF4444;
    /* Position color overrides */
    --position-gk: #FCD34D;
    --position-def: #34D399;
    --position-mid: #60A5FA;
    --position-fwd: #F87171;
}
/* ===== PAGE HEADER ===== */
.page-header {
    background: var(--surface-1);
    border-bottom: 1px solid var(--border-default);
    padding: 10px 24px;
}
.page-header-inner {
    max-width: 1400px;
    margin: 0 auto;
}



/* ===== MAIN CONTENT ===== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--space-4);
}

.page-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 2px;
}
.page-subtitle { color: var(--text-muted); font-size: 12px; }
.gw-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-1) var(--space-3);
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 600;
    color: var(--color-info);
    margin-left: var(--space-3);
}

.search-box {
    margin-left: auto;
    position: relative;
}

.search-input {
    background: var(--surface-1);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    padding: var(--space-2) var(--space-4);
    padding-left: 36px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    width: 200px;
    transition: all 200ms ease-out;
}

.search-input:focus {
    outline: none;
    border-color: var(--color-info);
    width: 260px;
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== TEAMS GRID ===== */
.rankings-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--surface-1);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
}

.rankings-label {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    flex-shrink: 0;
}

.rankings-pills {
    display: flex;
    gap: 8px;
    align-items: center;
}

.rankings-pill {
    padding: 6px 16px;
    background: var(--surface-2);
    border: 1px solid var(--border-default);
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 500;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all 200ms ease;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

.rankings-pill:hover {
    color: var(--text-primary);
    background: var(--surface-3);
    border-color: var(--border-emphasis);
}

.rankings-pill.active {
    background: var(--color-primary);
    color: #fff;
    border-color: var(--color-primary);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.25), 0 1px 3px rgba(16, 185, 129, 0.15);
}

.teams-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
}

@media (max-width: 1200px) {
    .teams-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 900px) {
    .teams-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .teams-grid { grid-template-columns: 1fr; }
}

/* ===== COMPACT TEAM CARD ===== */
.team-card {
    background: var(--surface-1);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-3);
    transition: all 150ms ease-out;
    cursor: pointer;
}

.team-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-emphasis);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Card Header - Compact */
.card-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.team-badge {
    width: 32px;
    height: 32px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.team-badge img {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.team-info {
    flex: 1;
    min-width: 0;
}

.team-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-meta {
    font-size: 10px;
    color: var(--text-muted);
    display: flex;
    gap: 6px;
    margin-top: 2px;
}

.rank-badge {
    width: 24px;
    height: 24px;
    background: var(--surface-3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.rank-badge.top-3 {
    background: linear-gradient(135deg, var(--color-success), #22c55e);
    color: #000;
}

/* Power Metrics - Redesigned with bars */
.power-metrics {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: var(--space-3);
}

.power-metric {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border-radius: 0;
    padding: 0;
    text-align: left;
    border-top: none;
}

.power-metric.attack .power-bar-fill { background: var(--color-error); }
.power-metric.defense .power-bar-fill { background: var(--color-info); }
.power-metric.fixture .power-bar-fill { background: var(--color-success); }
.power-metric.form-metric .power-bar-fill { background: var(--color-warning); }

.power-label {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--text-secondary);
    width: 52px;
    flex-shrink: 0;
    text-align: right;
}

.power-bar {
    flex: 1;
    height: 6px;
    background: var(--surface-3);
    border-radius: 3px;
    overflow: hidden;
}

.power-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 400ms ease-out;
}

.power-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-primary);
    width: 28px;
    text-align: right;
    flex-shrink: 0;
    line-height: 1;
}

.power-value.good { color: var(--color-success); }
.power-value.bad { color: var(--color-error); }

.power-metric.highlight .power-bar { height: 8px; }
.power-metric.highlight .power-label { color: var(--text-primary); font-weight: 700; }
.power-metric.highlight .power-value { font-size: 14px; }

/* FDR Strip - Compact */
.fdr-strip {
    display: flex;
    gap: 2px;
    margin-bottom: var(--space-2);
}

.fdr-badge {
    flex: 1;
    padding: 6px 2px;
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 9px;
    font-weight: 600;
    color: #000;
    position: relative;
}

.fdr-badge .opp { 
    font-weight: 700; 
    display: block;
    font-size: 10px;
}
.fdr-badge .venue { 
    font-size: 8px; 
    opacity: 0.7;
}

.fdr-1 { background: var(--fdr-1); }
.fdr-2 { background: var(--fdr-2); }
.fdr-3 { background: var(--fdr-3); }
.fdr-4 { background: var(--fdr-4); }
.fdr-5 { background: var(--fdr-5); }

.btts-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 5px;
    height: 5px;
    background: var(--color-warning);
    border-radius: 50%;
}

/* Card Footer - Compact */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-subtle);
}

.form-section {
    display: flex;
    align-items: center;
    gap: 6px;
}

.form-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.form-dots {
    display: flex;
    gap: 3px;
}

.form-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.form-dot.win { background: var(--color-success); }
.form-dot.draw { background: var(--color-warning); }
.form-dot.loss { background: var(--color-error); }

.form-letters {
    display: flex;
    gap: 3px;
}
.form-letter {
    font-size: 10px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
}
.form-letter.win { background: rgba(74, 222, 128, 0.15); color: var(--color-success); }
.form-letter.draw { background: rgba(251, 191, 36, 0.15); color: var(--color-warning); }
.form-letter.loss { background: rgba(248, 113, 113, 0.15); color: var(--color-error); }

.footer-stats {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.trend {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
}

.trend.improving {
    background: rgba(74, 222, 128, 0.15);
    color: var(--color-success);
}

.trend.worsening {
    background: rgba(248, 113, 113, 0.15);
    color: var(--color-error);
}

.trend.stable {
    background: rgba(163, 163, 163, 0.1);
    color: var(--text-muted);
}

.xg-badge {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.xg-badge.over {
    background: rgba(251, 191, 36, 0.15);
    color: var(--color-warning);
}

.xg-badge.under {
    background: rgba(74, 222, 128, 0.15);
    color: var(--color-success);
}

.xg-badge.rising {
    background: rgba(74, 222, 128, 0.15);
    color: var(--color-success);
}

.xg-badge.falling {
    background: rgba(248, 113, 113, 0.15);
    color: var(--color-error);
}

/* Team Report Modal */
.report-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}
.report-stat {
    background: var(--surface-0);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    text-align: center;
}
.report-stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
}
.report-stat-value.good { color: var(--color-success); }
.report-stat-value.bad { color: var(--color-error); }
.report-stat-value.warn { color: var(--color-warning); }
.report-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.report-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.report-bar-label {
    width: 80px;
    font-size: 11px;
    color: var(--text-secondary);
    text-align: right;
    flex-shrink: 0;
}
.report-bar {
    flex: 1;
    height: 8px;
    background: var(--surface-3);
    border-radius: 4px;
    overflow: hidden;
}
.report-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 400ms ease-out;
}
.report-bar-value {
    width: 32px;
    font-size: 12px;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
}
.report-venue-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3);
}
.report-venue-card {
    background: var(--surface-0);
    border-radius: var(--radius-md);
    padding: var(--space-3);
}
.report-venue-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: var(--space-2);
    display: flex;
    align-items: center;
    gap: 6px;
}
.report-venue-stat {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    padding: 3px 0;
    color: var(--text-secondary);
}
.report-venue-stat span:last-child { font-weight: 600; color: var(--text-primary); }
.report-form-strip {
    display: flex;
    gap: 6px;
    margin-bottom: var(--space-3);
}
.report-form-item {
    flex: 1;
    text-align: center;
    padding: 8px 4px;
    border-radius: var(--radius-sm);
    background: var(--surface-0);
}
.report-form-result {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}
.report-form-result.w { color: var(--color-success); }
.report-form-result.d { color: var(--color-warning); }
.report-form-result.l { color: var(--color-error); }
.report-form-opp { font-size: 9px; color: var(--text-muted); }
.report-form-score { font-size: 10px; color: var(--text-secondary); }
.report-fdr-row {
    display: flex;
    gap: 4px;
    margin-bottom: var(--space-3);
}
.report-fdr-match {
    flex: 1;
    padding: 10px 4px;
    border-radius: var(--radius-sm);
    text-align: center;
}
.report-fdr-opp { font-size: 11px; font-weight: 700; display: block; }
.report-fdr-venue { font-size: 9px; opacity: 0.7; }
.report-fdr-cs { font-size: 9px; margin-top: 2px; color: rgba(0,0,0,0.6); }
.report-verdict {
    background: var(--surface-0);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    border-left: 3px solid var(--color-info);
}
.report-verdict p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--text-secondary);
    margin: 0;
}

/* Tags Row */
.tags-row {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: var(--space-2);
}

.team-tag {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-muted);
}

.team-tag.home-strong {
    background: rgba(74, 222, 128, 0.12);
    color: var(--color-success);
}

.team-tag.away-strong {
    background: rgba(96, 165, 250, 0.12);
    color: var(--color-info);
}

.team-tag.bully {
    background: rgba(251, 191, 36, 0.12);
    color: var(--color-warning);
}

/* Venue Analysis - Hidden by default, shown on hover/expand */
.venue-analysis,
.xg-comparison {
    display: none;
}

/* CS Average inline */
.cs-badge {
    font-size: 9px;
    color: var(--color-info);
    font-weight: 600;
}

.venue-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.venue-bar-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.venue-bar-label {
    width: 50px;
    font-size: 10px;
    color: var(--text-muted);
    text-align: right;
}

.venue-bar-container {
    flex: 1;
    height: 18px;
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.venue-bar {
    height: 100%;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 6px;
    transition: width 500ms ease-out;
    min-width: 30px;
}

.venue-bar.home {
    background: linear-gradient(90deg, rgba(74, 222, 128, 0.3), rgba(74, 222, 128, 0.6));
}

.venue-bar.away {
    background: linear-gradient(90deg, rgba(96, 165, 250, 0.3), rgba(96, 165, 250, 0.6));
}

.venue-bar.defense.home {
    background: linear-gradient(90deg, rgba(52, 211, 153, 0.3), rgba(52, 211, 153, 0.6));
}

.venue-bar.defense.away {
    background: linear-gradient(90deg, rgba(139, 92, 246, 0.3), rgba(139, 92, 246, 0.6));
}

.venue-bar-value {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-primary);
}

.venue-bar-marker {
    width: 16px;
    font-size: 9px;
    font-weight: 600;
    color: var(--text-muted);
}

.venue-insight {
    margin-top: var(--space-2);
    padding-top: var(--space-2);
    border-top: 1px solid var(--border-subtle);
    text-align: center;
}

.insight-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    color: var(--text-secondary);
}

.insight-tag.home {
    background: rgba(74, 222, 128, 0.15);
    color: var(--color-success);
}

.insight-tag.away {
    background: rgba(96, 165, 250, 0.15);
    color: var(--color-info);
}

.insight-tag.balanced {
    background: var(--surface-2);
    color: var(--text-muted);
}

/* Power splits higher indicator */
.power-splits span.higher {
    background: rgba(74, 222, 128, 0.2);
    color: var(--color-success);
}

/* Card Footer */
.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-3);
    border-top: 1px solid var(--border-subtle);
}

.form-section {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.form-label {
    font-size: 9px;
    color: var(--text-muted);
    text-transform: uppercase;
}

.footer-stats {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.fdr-avg {
    font-size: 10px;
    color: var(--text-muted);
}

/* ===== FIXTURE SWINGS SECTION ===== */
.swing-section {
    margin-top: var(--space-8);
}

.swing-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.swing-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.swing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
}

.swing-card {
    background: var(--surface-1);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    border-left: 3px solid var(--color-success);
}

.swing-card.buy-now { border-left-color: var(--color-success); }
.swing-card.buy-soon { border-left-color: var(--color-info); }
.swing-card.hold { border-left-color: var(--color-warning); }

.swing-team {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}

.swing-timing {
    margin-left: auto;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
}

.swing-timing.buy-now {
    background: rgba(74, 222, 128, 0.2);
    color: var(--color-success);
}

.swing-timing.buy-soon {
    background: rgba(96, 165, 250, 0.2);
    color: var(--color-info);
}

.swing-signals {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.signal-tag {
    font-size: 10px;
    padding: var(--space-1) var(--space-2);
    background: var(--surface-2);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
}

/* ===== LOADING STATE ===== */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 300ms ease-out;
}

.loading-overlay.show {
    opacity: 1;
    pointer-events: all;
}

.loader {
    text-align: center;
}

.loader-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--surface-3);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto var(--space-4);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ===== SKELETON LOADING ===== */
.skeleton {
    background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite ease-in-out;
    border-radius: var(--radius-sm);
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-container {
        padding: 0 var(--space-4);
        gap: var(--space-4);
    }

    .nav-link span:not(.icon) {
        display: none;
    }

    .nav-link {
        padding: var(--space-2);
    }

    .page-title {
        font-size: 22px;
    }

    .filter-bar {
        flex-wrap: wrap;
    }

    .rankings-toolbar {
        flex-wrap: wrap;
    }

    .stats-toolbar-row {
        flex-wrap: wrap;
    }

    .stats-group-pills {
        flex-wrap: wrap;
    }

    .stats-search-box {
        width: 100%;
        margin-left: 0;
    }

    .stats-search-input {
        width: 100% !important;
    }

    .stats-search-input:focus {
        width: 100% !important;
    }
}

/* Tooltip */
[data-tooltip] {
    position: relative;
}

[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-4);
    color: var(--text-primary);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-sm);
    font-size: 11px;
    white-space: nowrap;
    z-index: 10;
    margin-bottom: var(--space-2);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: var(--space-8);
    color: var(--text-muted);
}

/* Progress Bar */
.progress-bar {
    height: 6px;
    background: var(--surface-3);
    border-radius: 3px;
    overflow: hidden;
    margin-top: var(--space-2);
}

.progress-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 300ms ease-out;
}

/* ===== FULL SEASON CALENDAR ===== */
.calendar-section {
    padding: var(--space-4);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.calendar-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.calendar-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.calendar-legend {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    font-size: 12px;
    color: var(--text-secondary);
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: var(--radius-sm);
}

.calendar-controls {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.control-group {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.control-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
}

.calendar-control-btn {
    padding: var(--space-2) var(--space-3);
    background: var(--surface-2);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: 11px;
    cursor: pointer;
    transition: all 150ms;
}

.calendar-control-btn:hover {
    background: var(--surface-3);
    color: var(--text-primary);
}

.calendar-control-btn.active {
    background: var(--color-info);
    color: var(--surface-0);
    border-color: var(--color-info);
}

/* Color classes for different modes */
.fixture-cell.color-1 { background: var(--fdr-1); color: #000; }
.fixture-cell.color-2 { background: var(--fdr-2); color: #000; }
.fixture-cell.color-3 { background: var(--fdr-3); color: #000; }
.fixture-cell.color-4 { background: var(--fdr-4); color: #000; }
.fixture-cell.color-5 { background: var(--fdr-5); color: #fff; }

/* CS value in fixture cell */
.cs-value {
    font-size: 8px;
    font-weight: 700;
    line-height: 1;
}

.calendar-container {
    background: var(--surface-1);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.calendar-scroll {
    overflow-x: auto;
    padding-bottom: var(--space-2);
}

.calendar-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
}

.calendar-table th {
    background: var(--surface-2);
    padding: var(--space-2) var(--space-1);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    border-bottom: 1px solid var(--border-default);
    position: sticky;
    top: 0;
    z-index: 10;
}

.calendar-table th.gw-header {
    min-width: 36px;
    text-align: center;
}

.calendar-table th.gw-current {
    background: rgba(96, 165, 250, 0.2);
    color: var(--color-info);
}

.calendar-table th.team-header {
    min-width: 140px;
    text-align: left;
    padding-left: var(--space-3);
    position: sticky;
    left: 0;
    background: var(--surface-2);
    z-index: 20;
}

.calendar-table td {
    padding: var(--space-1);
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
    transition: all 150ms;
}

.calendar-table tr:hover td {
    background: var(--surface-2);
}

.calendar-table td.team-cell {
    position: sticky;
    left: 0;
    background: var(--surface-1);
    z-index: 5;
    text-align: left;
    padding-left: var(--space-3);
}

.calendar-table tr:hover td.team-cell {
    background: var(--surface-2);
}

.calendar-team {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.calendar-team-badge {
    width: 20px;
    height: 20px;
}

.calendar-team-name {
    font-size: 12px;
    font-weight: 500;
}

.calendar-team-fdr {
    font-size: 10px;
    color: var(--text-muted);
    margin-left: auto;
    padding-right: var(--space-2);
}

.fixture-cell {
    width: 32px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 600;
    margin: 0 auto;
    cursor: pointer;
    transition: all 150ms;
    position: relative;
}

.fixture-cell:hover {
    transform: scale(1.15);
    z-index: 10;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.fixture-cell .opp {
    line-height: 1.1;
}

.fixture-cell .venue {
    font-size: 7px;
    opacity: 0.8;
}

.fixture-cell.fdr-1 { background: var(--fdr-1); color: #000; }
.fixture-cell.fdr-2 { background: var(--fdr-2); color: #000; }
.fixture-cell.fdr-3 { background: var(--fdr-3); color: #000; }
.fixture-cell.fdr-4 { background: var(--fdr-4); color: #000; }
.fixture-cell.fdr-5 { background: var(--fdr-5); color: #fff; }

.fixture-cell.blank {
    background: var(--surface-3);
    color: var(--text-muted);
}

.fixture-cell.past {
    opacity: 0.4;
}

/* Easy run highlight */
.fixture-cell.easy-run-start {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    box-shadow: inset 3px 0 0 var(--color-success), inset 0 2px 0 var(--color-success), inset 0 -2px 0 var(--color-success);
    background-image: linear-gradient(90deg, rgba(74, 222, 128, 0.12) 0%, transparent 100%);
}

.fixture-cell.easy-run-end {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    box-shadow: inset -3px 0 0 var(--color-success), inset 0 2px 0 var(--color-success), inset 0 -2px 0 var(--color-success);
    background-image: linear-gradient(270deg, rgba(74, 222, 128, 0.12) 0%, transparent 100%);
}

.fixture-cell.easy-run-middle {
    box-shadow: inset 0 2px 0 var(--color-success), inset 0 -2px 0 var(--color-success);
    background-image: linear-gradient(180deg, rgba(74, 222, 128, 0.08) 0%, rgba(74, 222, 128, 0.04) 50%, rgba(74, 222, 128, 0.08) 100%);
}

/* Dim non-easy-run cells in targetable calendar */
.targetable-calendar .fixture-cell:not(.easy-run-start):not(.easy-run-middle):not(.easy-run-end) {
    opacity: 0.3;
}
.targetable-calendar .fixture-cell:not(.easy-run-start):not(.easy-run-middle):not(.easy-run-end):hover {
    opacity: 0.7;
}

/* BTTS marker in calendar */
.fixture-cell.btts {
    box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.5);
}

.btts-marker {
    position: absolute;
    top: -3px;
    right: -3px;
    font-size: 8px;
    line-height: 1;
}

.fixture-cell {
    position: relative;
}

/* Analysis Section */
.calendar-analysis {
    margin-top: var(--space-6);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
}

.analysis-card {
    background: var(--surface-1);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
}

.analysis-card-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.analysis-card-icon {
    font-size: 20px;
}

.analysis-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.analysis-team-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.analysis-team-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    background: var(--surface-2);
    border-radius: var(--radius-md);
}

.analysis-team-badge {
    width: 24px;
    height: 24px;
}

.analysis-team-info {
    flex: 1;
}

.analysis-team-name {
    font-size: 12px;
    font-weight: 500;
}

.analysis-team-detail {
    font-size: 10px;
    color: var(--text-muted);
}

.analysis-team-stat {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 600;
}

.analysis-team-stat.good { color: var(--color-success); }
.analysis-team-stat.warning { color: var(--color-warning); }
.analysis-team-stat.bad { color: var(--color-error); }

.gw-range-badge {
    font-size: 10px;
    padding: 2px 6px;
    background: var(--surface-3);
    border-radius: 10px;
    color: var(--text-muted);
}

/* Swing Indicator in Calendar */
.swing-indicator {
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 1px solid var(--surface-1);
}

.swing-indicator.improving { background: var(--color-success); }
.swing-indicator.worsening { background: var(--color-error); }

/* Double Gameweek indicator */
.dgw-indicator {
    position: absolute;
    bottom: -1px;
    right: -1px;
    font-size: 7px;
    background: var(--color-info);
    color: #000;
    border-radius: 2px;
    padding: 0 2px;
    font-weight: 700;
}

/* Blank Gameweek */
.bgw-cell {
    background: var(--surface-3) !important;
    color: var(--text-muted) !important;
}

.bgw-cell::after {
    content: '-';
}

/* ===== STATS TABLE ===== */
.stats-container {
    background: var(--surface-1);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.stats-compact-toolbar {
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--border-default);
    background: var(--surface-0);
}

.stats-toolbar-row {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.stats-group-pills {
    display: flex;
    gap: 2px;
    background: var(--surface-2);
    padding: 3px;
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.stats-group-pill {
    padding: 5px 10px;
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 150ms ease-out;
    display: flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

.stats-group-pill:hover {
    color: var(--text-primary);
    background: var(--surface-3);
}

.stats-group-pill.active {
    background: var(--color-info);
    color: var(--surface-0);
}

.stats-view-pills {
    display: flex;
    gap: 2px;
    background: var(--surface-2);
    padding: 3px;
    border-radius: var(--radius-md);
}

.stats-view-pill {
    padding: 5px 10px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 150ms ease-out;
    white-space: nowrap;
}

.stats-view-pill:hover {
    color: var(--text-primary);
}

.stats-view-pill.active {
    background: var(--surface-3);
    color: var(--text-primary);
    font-weight: 600;
}

.stats-toolbar-divider {
    width: 1px;
    height: 20px;
    background: var(--border-default);
    flex-shrink: 0;
}

.stats-search-box {
    margin-left: auto;
}

.stats-search-input {
    width: 160px !important;
}

.stats-search-input:focus {
    width: 200px !important;
}

/* Column Selector Dropdown */
.col-selector-wrap {
    position: relative;
}

.col-selector-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: var(--surface-2);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 150ms ease-out;
    white-space: nowrap;
}

.col-selector-btn:hover {
    background: var(--surface-3);
    color: var(--text-primary);
    border-color: var(--border-emphasis);
}

.col-selector-popover {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    z-index: 50;
    width: 280px;
    max-height: 420px;
    overflow-y: auto;
    background: var(--surface-1);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    padding: var(--space-2) 0;
}

.col-selector-popover.open {
    display: block;
}

.col-selector-group {
    padding: var(--space-1) var(--space-3);
}

.col-selector-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 0;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 4px;
}

.col-selector-group-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.col-selector-toggle-all {
    font-size: 10px;
    color: var(--color-info);
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    padding: 0;
}

.col-selector-toggle-all:hover {
    text-decoration: underline;
}

.col-selector-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
}

.col-selector-item input[type="checkbox"] {
    width: 14px;
    height: 14px;
    accent-color: var(--color-info);
    cursor: pointer;
    flex-shrink: 0;
}

.col-selector-item label {
    font-size: 11px;
    color: var(--text-secondary);
    cursor: pointer;
    flex: 1;
    min-width: 0;
}

.col-selector-item label .col-key {
    font-weight: 600;
    color: var(--text-primary);
    margin-right: 4px;
}

.stats-header {
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--border-default);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
}

.stats-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.stats-toggle {
    display: flex;
    gap: var(--space-1);
    background: var(--surface-2);
    padding: var(--space-1);
    border-radius: var(--radius-md);
    flex-wrap: wrap;
}

.stats-toggle-btn {
    padding: var(--space-2) var(--space-3);
    background: transparent;
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 150ms;
    white-space: nowrap;
}

.stats-toggle-btn:hover {
    color: var(--text-primary);
}

.stats-toggle-btn.active {
    background: var(--color-info);
    color: var(--surface-0);
}

.stats-scroll {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.stats-table th {
    background: var(--surface-2);
    padding: var(--space-2) var(--space-3);
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-default);
    text-align: center;
    cursor: pointer;
    user-select: none;
    transition: all 150ms;
    white-space: nowrap;
}

.stats-table th:hover {
    background: var(--surface-3);
    color: var(--text-primary);
}

.stats-table th.sorted-asc,
.stats-table th.sorted-desc {
    background: rgba(96, 165, 250, 0.15);
    color: var(--color-info);
}

.stats-table th.sorted-asc::after {
    content: ' ↑';
}

.stats-table th.sorted-desc::after {
    content: ' ↓';
}

.stats-table th.team-col {
    position: sticky;
    left: 0;
    z-index: 20;
    text-align: left;
    min-width: 160px;
    cursor: default;
}

.stats-table th.section-divider {
    border-left: 2px solid var(--border-emphasis);
}

.stats-table td {
    padding: var(--space-2) var(--space-3);
    text-align: center;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 13px;
    font-variant-numeric: tabular-nums;
}

.stats-table td.team-col {
    position: sticky;
    left: 0;
    background: var(--surface-1);
    z-index: 5;
    text-align: left;
}

.stats-table tr:hover td {
    background: var(--surface-2);
}

.stats-table tr:hover td.team-col {
    background: var(--surface-2);
}

.stats-table td.section-divider {
    border-left: 2px solid var(--border-emphasis);
}

.stats-team {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.stats-rank {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    width: 20px;
}

.stats-badge {
    width: 24px;
    height: 24px;
}

.stats-team-name {
    font-weight: 500;
    font-size: 13px;
}

.stats-value {
    font-weight: 500;
}

.stats-value.good {
    color: var(--color-success);
}

.stats-value.bad {
    color: var(--color-error);
}

.stats-value.neutral {
    color: var(--text-secondary);
}

.stats-bar {
    display: inline-block;
    height: 6px;
    border-radius: 3px;
    background: var(--color-info);
    opacity: 0.7;
    margin-left: var(--space-2);
    vertical-align: middle;
}

.stats-form {
    display: flex;
    gap: 2px;
    justify-content: center;
}

.stats-form-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.stats-form-dot.W { background: var(--color-success); }
.stats-form-dot.D { background: var(--text-muted); }
.stats-form-dot.L { background: var(--color-error); }

.stats-mini {
    font-size: 10px;
    color: var(--text-muted);
}

.stats-section-header {
    background: var(--surface-3) !important;
    font-size: 11px !important;
    font-weight: 700 !important;
    letter-spacing: 1px;
    color: var(--text-primary) !important;
}

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 14, 20, 0.85);
    backdrop-filter: blur(8px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms ease-out;
    padding: var(--space-4);
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.modal-container {
    background: var(--surface-1);
    border: 1px solid var(--border-emphasis);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 720px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    transform: translateY(16px) scale(0.97);
    transition: transform 250ms ease-out;
    box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.modal-overlay.open .modal-container {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--border-default);
    flex-shrink: 0;
}

.modal-header-badge {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.modal-header-info {
    flex: 1;
}

.modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.modal-subtitle {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-default);
    background: var(--surface-2);
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 150ms;
    flex-shrink: 0;
}

.modal-close:hover {
    background: var(--surface-3);
    color: var(--text-primary);
}

.modal-body {
    padding: var(--space-4) var(--space-6);
    overflow-y: auto;
    flex: 1;
}

.modal-section {
    margin-bottom: var(--space-6);
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.modal-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.modal-stat {
    background: var(--surface-0);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    text-align: center;
}

.modal-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.modal-stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
}

.modal-stat-value.good { color: var(--color-success); }
.modal-stat-value.bad { color: var(--color-error); }
.modal-stat-value.warn { color: var(--color-warning); }
.modal-stat-value.info { color: var(--color-info); }

.modal-stat-sub {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 2px;
}

.modal-fdr-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: 8px var(--space-3);
    background: var(--surface-0);
    border-radius: var(--radius-sm);
    margin-bottom: 4px;
}

.modal-fdr-gw {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    width: 36px;
    flex-shrink: 0;
}

.modal-fdr-opp {
    font-size: 13px;
    font-weight: 600;
    flex: 1;
}

.modal-fdr-venue {
    font-size: 10px;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    font-weight: 600;
}

.modal-fdr-venue.home {
    background: rgba(74, 222, 128, 0.15);
    color: var(--color-success);
}

.modal-fdr-venue.away {
    background: rgba(96, 165, 250, 0.15);
    color: var(--color-info);
}

.modal-fdr-dot {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
}

.modal-fdr-bar-container {
    flex: 1;
    height: 8px;
    background: var(--surface-3);
    border-radius: 4px;
    overflow: hidden;
    max-width: 120px;
}

.modal-fdr-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 300ms ease-out;
}

/* ===== SWINGS TAB PANELS ===== */
.swings-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

@media (max-width: 900px) {
    .swings-layout { grid-template-columns: 1fr; }
}

.swings-panel {
    background: var(--surface-1);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.swings-panel-header {
    padding: var(--space-4) var(--space-4);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.swings-panel-icon {
    font-size: 20px;
}

.swings-panel-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 15px;
    font-weight: 600;
    flex: 1;
}

.swings-panel-count {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--surface-3);
    border-radius: 10px;
    color: var(--text-muted);
    font-weight: 600;
}

.swings-panel-body {
    padding: var(--space-2);
    max-height: 520px;
    overflow-y: auto;
}

.swings-run-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 150ms;
    border: 1px solid transparent;
}

.swings-run-item:hover {
    background: var(--surface-2);
    border-color: var(--border-default);
}

.swings-run-rank {
    font-size: 12px;
    font-weight: 700;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
}

.swings-run-badge {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.swings-run-info {
    flex: 1;
    min-width: 0;
}

.swings-run-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.swings-run-detail {
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 1px;
    display: flex;
    gap: 6px;
    align-items: center;
}

.swings-run-mini-fdr {
    display: flex;
    gap: 2px;
    flex-shrink: 0;
}

.swings-mini-dot {
    width: 14px;
    height: 14px;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 7px;
    font-weight: 700;
}

.swings-run-stat {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.swings-run-arrow {
    color: var(--text-muted);
    font-size: 14px;
    flex-shrink: 0;
}

.swing-direction-group {
    padding: var(--space-2) var(--space-3);
}

.swing-direction-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--space-2) 0;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.swing-direction-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-subtle);
}

.swing-fdr-change {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 600;
}

.swing-fdr-change .arrow {
    font-size: 10px;
}

/* Column group headers */
.stats-table thead tr.col-groups th {
    padding: var(--space-1) var(--space-3);
    font-size: 9px;
    background: var(--surface-3);
    border-bottom: none;
    cursor: default;
}

.stats-table thead tr.col-groups th.attack-group {
    color: var(--color-error);
    background: rgba(248, 113, 113, 0.1);
}

.stats-table thead tr.col-groups th.defense-group {
    color: var(--color-info);
    background: rgba(96, 165, 250, 0.1);
}

.stats-table thead tr.col-groups th.overall-group {
    color: var(--color-success);
    background: rgba(74, 222, 128, 0.1);
}

/* ===== ACCESSIBILITY: Minimum font sizes & contrast ===== */
.fdr-badge { font-size: 10px; }
.fdr-badge .opp { font-size: 11px; }
.form-label { font-size: 10px; color: var(--text-secondary); }
.form-letter { font-size: 11px; }
.xg-badge { font-size: 10px; }
.report-stat-label { font-size: 11px; color: var(--text-secondary); }
.report-bar-label { font-size: 12px; }
.report-venue-stat { font-size: 12px; }
.report-form-opp { font-size: 10px; color: var(--text-secondary); }
.report-form-score { font-size: 11px; }
.report-fdr-cs { font-size: 10px; color: var(--text-secondary); }
.report-fdr-venue { font-size: 10px; }
.report-fdr-opp { font-size: 12px; }
.team-tag { font-size: 10px; }
.cs-badge { font-size: 10px; }
.venue-bar-label { font-size: 11px; color: var(--text-secondary); }
.venue-bar-value { font-size: 11px; }
.venue-bar-marker { font-size: 10px; }
.insight-tag { font-size: 11px; }
.fdr-avg { font-size: 11px; color: var(--text-secondary); }
.swing-timing { font-size: 11px; }
.signal-tag { font-size: 11px; }
.calendar-table th { font-size: 11px; }
.calendar-team-fdr { font-size: 11px; color: var(--text-secondary); }
.fixture-cell { font-size: 10px; }
.stats-group-pill, .stats-view-pill { font-size: 12px; }
.stats-mini { font-size: 11px; color: var(--text-secondary); }
.stats-section-header { font-size: 12px !important; }

/* ===== ADVANCED xG TABLE ===== */
.data-controls {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--surface-1);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.data-controls-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

.segmented-control {
    display: flex;
    background: var(--surface-2);
    border-radius: var(--radius-md);
    padding: 3px;
    gap: 2px;
}

.segmented-btn {
    padding: 6px 14px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: 12px;
    font-weight: 500;
    border-radius: calc(var(--radius-md) - 2px);
    cursor: pointer;
    transition: all 150ms ease-out;
    white-space: nowrap;
}

.segmented-btn:hover {
    color: var(--text-primary);
}

.segmented-btn.active {
    background: var(--surface-1);
    color: var(--text-primary);
    font-weight: 600;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Heatmap utility classes */
.text-green { color: var(--color-success); font-weight: 600; }
.text-yellow { color: var(--color-warning); font-weight: 500; }
.text-red { color: var(--color-error); font-weight: 600; }

/* Advanced xG Table — removed; columns merged into main Stats Table */

/* ===== MOMENTUM MATRIX ===== */
.momentum-matrix-section {
    background: var(--surface-1);
    border: 1px solid var(--border-default);
    border-radius: 16px;
    padding: var(--space-6);
    margin-bottom: 48px;
}

.momentum-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-3);
}

.momentum-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.momentum-title-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    background: rgba(96, 165, 250, 0.15);
    color: var(--color-info);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.momentum-grid {
    display: grid;
    grid-template-columns: 65fr 35fr;
    gap: var(--space-4);
}

.momentum-chart-container {
    position: relative;
    background: var(--surface-0);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-2);
    min-height: 400px;
}

.momentum-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
}

.scout-report-panel {
    background: var(--surface-0);
    border: 1px solid var(--border-default);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
}

.scout-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-align: center;
    gap: var(--space-3);
    padding: var(--space-6);
}

.scout-empty-icon {
    font-size: 32px;
    opacity: 0.4;
}

.scout-empty-text {
    font-size: 13px;
}

.scout-team-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border-subtle);
}

.scout-badge {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.scout-team-name {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 18px;
    font-weight: 700;
}

.scout-team-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 2px;
}

.scout-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-2);
    margin-bottom: var(--space-4);
}

.scout-stat {
    background: var(--surface-2);
    border-radius: var(--radius-md);
    padding: var(--space-3);
    text-align: center;
}

.scout-stat-label {
    font-size: 10px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 4px;
}

.scout-stat-value {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 20px;
    font-weight: 700;
}

.scout-stat-value.good { color: var(--color-success); }
.scout-stat-value.bad { color: var(--color-error); }
.scout-stat-value.warn { color: var(--color-warning); }
.scout-stat-value.info { color: var(--color-info); }

.scout-quadrant-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-3);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.scout-quadrant-tag.target {
    background: rgba(16, 185, 129, 0.15);
    color: var(--color-success);
}

.scout-quadrant-tag.monitor {
    background: rgba(96, 165, 250, 0.15);
    color: var(--color-info);
}

.scout-quadrant-tag.speculative {
    background: rgba(245, 158, 11, 0.15);
    color: var(--color-warning);
}

.scout-quadrant-tag.avoid {
    background: rgba(239, 68, 68, 0.15);
    color: var(--color-error);
}

#scoutReportText {
    font-size: 13px;
    line-height: 1.6;
    color: var(--text-secondary);
}

@media (max-width: 1024px) {
    .momentum-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== DARK MODE ===== */
[data-theme="dark"] .loading-overlay { background: rgba(15, 23, 42, 0.85); }
