.eg-mode-toggle {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    padding: 20px 0 16px;
    margin: 0 auto 10px;
    border-bottom: 1px solid #e9ecef;
}

.eg-mode-button {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px 40px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 260px;
    text-align: center;
    box-shadow: none;
}

.eg-mode-button:hover {
    border-color: #d0d7de;
    background-color: #f1f5f9;
    color: #475569;
}

.eg-mode-button-active {
    background-color: #1e3d59;
    color: #ffffff;
    border: none;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.evolucion-global-panel {
    padding: 8px 10px 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 12px;
    font-family: var(--font-body);
    overflow-x: auto;
}

.eg-legend-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 10px;
    margin-bottom: 8px;
}

.eg-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 9px;
    color: #334155;
}

.eg-legend-swatch {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    border: 1px solid rgba(15, 23, 42, 0.14);
}

.eg-table-wrap {
    display: block;
    width: max-content;
    min-width: 100%;
}

.eg-table {
    border-collapse: collapse;
    table-layout: fixed;
    background: #ffffff;
    font-size: 9px;
    width: max-content;
    min-width: 100%;
}

.eg-left-header-gap {
    padding: 0;
}

.eg-matchday-header {
    font-weight: 700;
    line-height: 1;
    font-size: 9px;
}

.eg-matchday-number {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 16px;
    font-variant-numeric: tabular-nums;
}

.eg-summary-header {
    min-width: 54px;
    width: 54px;
    padding: 5px 2px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    text-align: center;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
}

.eg-summary-header-green {
    background: #166534;
}

.eg-summary-header-yellow {
    background: #a16207;
}

.eg-summary-header-red {
    background: #991b1b;
}

.eg-section-row {
    font-family: var(--font-display);
    font-size: 11px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.eg-block-cell {
    font-size: 9px;
    font-weight: 600;
    color: #334155;
    line-height: 1.1;
}

.eg-item-cell {
    font-size: 9px;
    font-weight: 600;
    color: #0f172a;
    line-height: 1.12;
    text-transform: uppercase;
    word-break: break-word;
}

.eg-item-wide {
    background: linear-gradient(90deg, #ffffff 0%, #fcfdff 100%);
}

.eg-matchday-cell {
    position: relative;
    transition: transform 0.1s ease, box-shadow 0.1s ease;
}

.eg-matchday-cell:hover {
    transform: scale(1.05);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.2);
    z-index: 4;
}

.eg-matchday-anchor {
    position: relative;
    width: 100%;
    height: 100%;
}

.eg-matchday-hit {
    width: 100%;
    height: 100%;
}

.eg-summary-cell {
    vertical-align: middle;
}

.eg-summary-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1px;
    line-height: 1;
}

.eg-summary-value {
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.eg-summary-detail {
    font-size: 8px;
    opacity: 0.85;
    text-align: center;
}

.eg-empty-state {
    padding: 24px 18px;
    border-radius: 10px;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #475569;
    font-size: 13px;
}

.eg-rich-tooltip {
    width: 340px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(148, 163, 184, 0.55);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    color: #0f172a;
    backdrop-filter: blur(10px);
    pointer-events: none;
}

.eg-shared-tooltip {
    position: fixed;
    left: 0;
    top: 0;
    z-index: 4000;
    display: none;
    max-width: calc(100vw - 16px);
}

.eg-tip-topbar {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 10px;
}

.eg-tip-round {
    min-width: 78px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #0f172a;
    color: #f8fafc;
    font-size: 10px;
    font-weight: 700;
    padding: 0 10px;
}

.eg-tip-heading-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.eg-tip-item-name {
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
}

.eg-tip-metric-caption {
    font-size: 10px;
    font-weight: 600;
    line-height: 1.2;
    color: #64748b;
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-wrap: wrap;
}

.eg-tip-metric-label {
    font-weight: 700;
    color: #475569;
}

.eg-tip-metric-text {
    font-weight: 500;
}

.eg-tip-match {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.eg-tip-team {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.eg-tip-team-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.eg-tip-shield {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.eg-tip-score-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.eg-tip-score {
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
}

.eg-tip-result-label {
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}

.eg-tip-head-row,
.eg-tip-data-row {
    display: grid;
    gap: 6px;
    align-items: center;
}

.eg-tip-grid-rival {
    grid-template-columns: 66px repeat(3, minmax(0, 1fr));
}

.eg-tip-grid-season {
    grid-template-columns: 66px repeat(2, minmax(0, 1fr));
}

.eg-tip-head-row {
    margin-bottom: 4px;
}

.eg-tip-col-head {
    font-size: 9px;
    font-weight: 700;
    color: #64748b;
    text-align: center;
}

.eg-tip-col-head-empty {
    visibility: hidden;
}

.eg-tip-row-label {
    font-size: 10px;
    font-weight: 700;
    color: #0f172a;
}

.eg-tip-value {
    padding: 6px 4px;
    border-radius: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
}

.eg-tip-value-muted {
    background: #eff6ff;
}

@media (max-width: 1280px) {
    .eg-table {
        font-size: 8.5px;
    }

    .eg-summary-header {
        min-width: 50px;
        width: 50px;
        font-size: 9px;
    }
}

@media (max-width: 1024px) {
    .evolucion-global-panel {
        padding: 6px 4px 12px;
    }

    .eg-table {
        font-size: 8px;
    }
}

@media (max-width: 768px) {
    .eg-mode-button {
        width: 100%;
        min-width: 0;
        text-align: center;
        padding: 12px 20px;
    }

    .eg-legend-wrap {
        gap: 6px 8px;
    }

    .eg-legend-item {
        font-size: 9.5px;
    }

    .eg-rich-tooltip {
        width: 300px;
        padding: 10px;
    }

    .eg-tip-grid-rival {
        grid-template-columns: 54px repeat(3, minmax(0, 1fr));
    }

    .eg-tip-grid-season {
        grid-template-columns: 54px repeat(2, minmax(0, 1fr));
        gap: 4px;
    }
}
