.table_wrap {
    overflow-x: auto;
    box-shadow: var(--ui_shadow_panel);
}

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

td,
th {
    padding: 13px 12px;
    border-bottom: 1px solid var(--ui_color_table_border);
    text-align: center;
    white-space: nowrap;
}

th {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

td:nth-child(2),
th:nth-child(2) {
    text-align: left;
}

.standings tr:last-child td {
    border: 0;
}

.standings th:first-child,
.standings td:first-child {
    padding-left: 25px;
    text-align: left;
}

.rank {
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    font-size: 13px;
}

.table_wrap {
    border-radius: 10px;
}

td,
th {
    border-color: #2c3540;
}

td {
    font-size: 14px;
}

th {
    color: #828d9b;
    font-weight: 400;
}

.standings tbody tr:hover {
    background: #202834;
}

.rank {
    border: 0;
    border-radius: 5px;
    background: #28313c;
    color: #cdd4dd;
    font-weight: 500;
}

.place_1 .rank {
    background: #477de3;
    color: var(--ui_color_text);
}

.place_2 .rank {
    background: #434d5a;
    color: #eef1f5;
}

.place_3 .rank {
    background: #6b5239;
    color: #f3e6d8;
}

.form_badges {
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.form_badge {
    position: relative;
    display: inline-grid;
    width: 21px;
    height: 21px;
    place-items: center;
    border-radius: 4px;
    color: var(--ui_color_text);
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
}

.form_badge--win {
    background: #36a96b;
}

.form_badge--draw {
    background: var(--ui_color_neutral);
}

.form_badge--loss {
    background: #e34f5d;
}

.standings_row {
    cursor: pointer;
    outline: 0;
    user-select: none;
}

.standings_row:focus {
    outline-offset: -2px;
    outline: 0;
}

.standings_block {
    overflow: hidden;
    margin-right: -25px;
    margin-left: -25px;
    margin-bottom: -15px;
}

.standings_block .table_wrap {
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.form_tooltip {
    position: fixed;
    z-index: 40;
    width: 250px;
    padding: 10px;
    border: 1px solid #354150;
    border-radius: 8px;
    background: #171e27;
    color: var(--ui_color_text);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.42);
    pointer-events: none;
}

.form_tooltip_teams {
    display: grid;
    gap: 7px;
}

.form_tooltip_teams>span {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.form_tooltip_teams b {
    overflow: hidden;
    color: var(--ui_color_text);
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 500;
}

.standings_sort {
    border: 0;
    background: 0 0;
    color: inherit;
    padding: 2px 3px;
    cursor: pointer;
    font: inherit;
    letter-spacing: inherit;
    text-transform: inherit;
    white-space: nowrap;
}

.standings_sort:hover {
    color: var(--ui_color_text);
}

.standings_sort:after {
    display: inline-block;
    width: 9px;
    margin-left: 2px;
    color: var(--ui_color_neutral);
    content: "↕";
}

.standings_sort.sort-asc:after {
    content: "↑";
}

.standings_sort.sort-desc:after {
    content: "↓";
}

.activity_section {
    margin-top: 0;
}

.activity_log {
    display: grid;
    min-width: 0;
    gap: 10px;
}

.activity_item {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    padding: 14px;
    border: 1px solid var(--ui_color_border_muted);
    border-radius: var(--ui_radius_md);
    background: var(--ui_color_surface_soft);
    position: relative;
}

.activity_meta {
    margin-bottom: 10px;
}

.activity_meta p {
    margin: 0;
    color: var(--ui_color_text_secondary);
    font-size: 12px;
}

.activity_meta p b {
    color: var(--ui_color_text);
    font-weight: 600;
}

.activity_meta time {
    color: var(--ui_color_text_subtle);
    font-size: 10px;
}

.activity_match,
.activity_meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.activity_players {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
    color: var(--ui_color_text_light);
    font-size: 12px;
}

.activity_players > span:not(.activity_dash) {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.activity_dash {
    color: var(--ui_color_neutral);
}

.activity_change {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
}

.activity_change small {
    color: #778391;
    font-size: 10px;
}

.activity_change>span {
    color: var(--ui_color_text_subtle);
    font-size: 11px;
}

.activity_change>span:after {
    margin-left: 6px;
    content: "→";
}

.activity_change b {
    min-width: 37px;
    padding: 4px 6px;
    border-radius: 5px;
    background: var(--ui_color_control);
    color: var(--ui_color_text);
    text-align: center;
    font-size: 12px;
}

.activity_empty {
    padding: 24px;
    color: var(--ui_color_text_subtle);
    text-align: center;
}

@media (max-width: 899px) {
    .standings_block {
        margin-left: -15px;
        margin-right: -15px;
    }
    .standings th:first-child, .standings td:first-child {
        padding-right: 5px;
        padding-left: 15px;
    }
    .activity_item {
        overflow: hidden;
        padding: 11px;
    }

    .activity_meta,
    .activity_meta p,
    .activity_match {
        min-width: 0;
    }

    .activity_match {
            align-items: flex-start;
            flex-direction: column;
            gap: 8px;
        }

    .activity_players {
        display: grid;
        width: 100%;
        grid-template-columns: 18px minmax(0, 1fr);
        gap: 5px 7px;
    }

    .activity_players .activity_dash {
        display: none;
    }

    .activity_change {
            position: absolute;
            right: 10px;
            top: 40px;
        }

    .standings tbody td:not(:nth-child(2)):not(:last-child) {
            font-size: 12px;
        }

    .standings .rank {
            width: 22px;
            height: 22px;
            border-radius: 4px;
            font-size: 10px;
        }

    .standings td:first-child {
            padding-right: 6px;
        }

    .standings td:nth-child(2) {
            padding-left: 6px;
        }

    .standings tbody td {
            vertical-align: middle;
        }
}

.table_wrap {
    scrollbar-width: none;
}

.table_wrap::-webkit-scrollbar {
    display: none;
}
