.team-avatar,
.profile-team-mark,
.catalog-team-mark {
    overflow: hidden;
}

.team-avatar img,
.profile-team-mark img,
.catalog-team-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-team-mark.has-logo + .profile-team-mark,
.catalog-team-mark.has-logo + .catalog-team-mark {
    display: none;
}

.team-profile-copy {
    position: relative;
    min-width: 0;
}

.team-title-row {
    display: flex;
    align-items: center;
    gap: 11px;
}

.team-title-row h1 {
    margin-right: 0;
}

.team-name-edit-trigger {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    padding: 0;
    border: 1px solid #3a4655;
    background: rgba(17, 24, 34, .88);
    color: #829061;
    cursor: pointer;
    transition: color .16s, border-color .16s, background .16s, transform .16s;
}

.team-name-edit-trigger svg {
    width: 15px;
    height: 15px;
    fill: currentColor;
}

.team-name-edit-trigger:hover,
.team-name-edit-trigger.active {
    border-color: #718c2e;
    background: rgba(199, 255, 50, .09);
    color: var(--accent);
    transform: translateY(-1px);
}

.team-name-popover[hidden] {
    display: none;
}

.team-name-popover {
    position: absolute;
    z-index: 12;
    left: 0;
    top: calc(100% + 12px);
    width: min(650px, calc(100vw - 48px));
    padding: 14px;
    border: 1px solid #405020;
    background: #101720;
    box-shadow: 0 22px 55px rgba(0, 0, 0, .48);
}

.team-name-popover::before {
    content: "";
    position: absolute;
    left: 18px;
    top: -6px;
    width: 10px;
    height: 10px;
    border-left: 1px solid #405020;
    border-top: 1px solid #405020;
    background: #101720;
    transform: rotate(45deg);
}

.team-name-popover form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 100px auto;
    align-items: end;
    gap: 10px;
    margin: 0;
}

.team-name-popover label {
    min-width: 0;
}

.team-name-popover label > span {
    display: block;
    margin-bottom: 5px;
    color: #8995a6;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .6px;
}

.team-name-popover input {
    width: 100%;
    height: 38px;
    padding: 8px 10px;
    border: 1px solid #344052;
    background: #090f17;
    color: #edf1f6;
}

.team-name-popover input:focus {
    outline: 1px solid var(--accent);
    border-color: var(--accent);
}

.team-name-popover .team-tag-field input {
    text-align: center;
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 1px;
}

.team-name-popover form > div {
    display: flex;
    align-items: center;
    gap: 9px;
}

.team-name-cancel {
    padding: 8px 4px;
    border: 0;
    background: none;
    color: #8591a2;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

.team-name-cancel:hover {
    color: #fff;
}

.team-name-popover > small {
    display: block;
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px solid #27313e;
    color: #687486;
    font-size: 7px;
}

.team-brand-editor {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr) auto;
    align-items: center;
    gap: 20px;
    margin-top: 28px;
    padding: 15px 17px;
    border: 1px solid #344326;
    background: linear-gradient(100deg, rgba(199, 255, 50, .065), rgba(12, 18, 23, .9) 45%);
}

.team-brand-editor > div {
    display: flex;
    flex-direction: column;
}

.team-brand-editor > div > strong {
    margin-top: 3px;
    font-size: 12px;
}

.team-brand-editor > div > small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 8px;
}

.team-logo-upload {
    display: grid;
    grid-template-columns: auto minmax(90px, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.team-logo-upload label {
    margin: 0;
    white-space: nowrap;
}

.team-logo-upload input[type="file"] {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.team-logo-upload > span {
    min-width: 0;
    overflow: hidden;
    color: #7f8a9a;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-logo-remove {
    margin: 0;
}

.team-logo-remove button {
    padding: 4px 0;
    border: 0;
    background: none;
    color: #ff7c88;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

.team-logo-remove button:hover {
    color: #fff;
}

@media (max-width: 900px) {
    .team-brand-editor {
        grid-template-columns: 1fr;
    }

    .team-logo-remove {
        justify-self: start;
    }
}

@media (max-width: 560px) {
    .team-logo-upload {
        grid-template-columns: 1fr;
    }

    .team-logo-upload .btn {
        width: 100%;
    }

    .team-profile {
        align-items: flex-start;
    }

    .team-profile-copy {
        min-width: 0;
    }

    .team-profile h1 {
        overflow-wrap: anywhere;
    }

    .team-title-row {
        align-items: flex-start;
    }

    .team-name-edit-trigger {
        width: 31px;
        height: 31px;
        margin-top: 4px;
    }

    .team-name-popover {
        position: fixed;
        left: 15px;
        right: 15px;
        top: auto;
        bottom: 18px;
        width: auto;
    }

    .team-name-popover::before {
        display: none;
    }

    .team-name-popover form {
        grid-template-columns: 1fr;
    }

    .team-name-popover form > div {
        justify-content: space-between;
    }
}

.team-hall-section {
    padding-bottom: 18px;
}

.team-hall {
    overflow: hidden;
    border: 1px solid #34402c;
    background:
        radial-gradient(circle at 88% 5%, rgba(199, 255, 50, .09), transparent 27%),
        linear-gradient(145deg, #101710, #0c121a 58%);
    box-shadow: 0 24px 58px rgba(0, 0, 0, .2);
}

.team-hall-header {
    display: flex;
    min-height: 105px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 22px 25px;
    border-bottom: 1px solid #2c3829;
}

.team-hall-header h2 {
    margin: 5px 0 3px;
    font: 700 28px "Arial Narrow", Impact, sans-serif;
}

.team-hall-header p {
    margin: 0;
    color: #788496;
    font-size: 9px;
}

.team-hall-total {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 11px 9px 13px;
    border: 1px solid #526432;
    background: rgba(199, 255, 50, .06);
    color: #9eaa8c;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .8px;
}

.team-hall-total b {
    display: grid;
    min-width: 27px;
    height: 27px;
    place-items: center;
    background: var(--accent);
    color: #0a0f09;
    font-size: 12px;
}

.team-hall-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid #2a342a;
}

.team-hall-stats > article {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 13px;
    min-height: 92px;
    padding: 16px 20px;
    border-right: 1px solid #293329;
}

.team-hall-stats > article:last-child {
    border-right: 0;
}

.team-hall-stats > article > span {
    display: grid;
    width: 40px;
    height: 40px;
    flex: none;
    place-items: center;
    border: 1px solid #536332;
    background: rgba(199, 255, 50, .065);
    color: var(--accent);
    font: 900 14px Impact;
    transform: skew(-5deg);
}

.team-hall-stats > article > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.team-hall-stats strong {
    color: #f1f5f8;
    font: 800 23px "Arial Narrow", Impact, sans-serif;
    line-height: 1;
}

.team-hall-stats small {
    margin-top: 3px;
    color: #d8dfe7;
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.team-hall-stats p {
    margin: 2px 0 0;
    color: #667284;
    font-size: 8px;
}

.team-hall-stats .silver > span {
    border-color: #536171;
    background: rgba(197, 210, 224, .07);
    color: #cbd4de;
}

.team-hall-stats .bronze > span {
    border-color: #6f4d32;
    background: rgba(221, 143, 83, .08);
    color: #df965e;
}

.team-hall-stats .total > span {
    border-color: #3d4958;
    background: #151e29;
    color: #8491a2;
}

.team-hall-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 10px;
}

.team-hall-list-head strong {
    color: #aeb8c5;
    font-size: 8px;
    letter-spacing: .9px;
}

.team-hall-list-head span {
    color: #667284;
    font-size: 8px;
}

.team-hall-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
    padding: 0 20px 20px;
}

.team-achievement {
    display: grid;
    min-width: 0;
    grid-template-columns: 44px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 12px;
    min-height: 76px;
    padding: 11px 13px;
    border: 1px solid #2c3846;
    background: rgba(10, 15, 22, .72);
    transition: border-color .16s, background .16s, transform .16s;
}

.team-achievement:hover {
    border-color: #566a34;
    background: rgba(199, 255, 50, .035);
    transform: translateY(-1px);
}

.team-achievement-medal {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid #536332;
    background: rgba(199, 255, 50, .08);
    color: var(--accent);
    font: 900 14px Impact;
}

.team-achievement.rank-2 .team-achievement-medal {
    border-color: #556271;
    background: rgba(199, 210, 223, .07);
    color: #ced6df;
}

.team-achievement.rank-3 .team-achievement-medal {
    border-color: #765034;
    background: rgba(223, 146, 87, .075);
    color: #e09a64;
}

.team-achievement > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.team-achievement small {
    overflow: hidden;
    color: #7f8b9a;
    font-size: 7px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: .45px;
    white-space: nowrap;
}

.team-achievement strong {
    margin-top: 4px;
    overflow: hidden;
    color: #edf1f5;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-achievement p {
    margin: 3px 0 0;
    color: #647082;
    font-size: 8px;
}

.team-hall-empty {
    display: flex;
    min-height: 150px;
    align-items: center;
    justify-content: center;
    gap: 15px;
    padding: 24px;
}

.team-hall-empty > span {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px dashed #4b5936;
    color: #849364;
    font-size: 20px;
}

.team-hall-empty > div {
    display: flex;
    flex-direction: column;
}

.team-hall-empty strong {
    font-size: 11px;
}

.team-hall-empty p {
    max-width: 330px;
    margin: 4px 0 0;
    color: #6e7a8b;
    font-size: 8px;
}

.team-competition-section {
    padding-top: 18px;
    padding-bottom: 32px;
}

.team-roster-section {
    padding-top: 32px;
}

.team-requests-panel .team-request-list {
    margin-bottom: 0;
}

.team-requests-center {
    display: inline-flex;
    margin-top: 16px;
}

.team-competition-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}

.team-activity-panel {
    min-width: 0;
    border: 1px solid #293544;
    background: #0d131c;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .17);
}

.team-activity-panel > header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    min-height: 78px;
    padding: 16px 18px;
    border-bottom: 1px solid #273240;
    background: linear-gradient(100deg, rgba(199, 255, 50, .04), transparent 56%);
}

.team-activity-panel > header h2 {
    margin: 4px 0 0;
    font: 700 22px "Arial Narrow", Impact, sans-serif;
}

.team-activity-panel > header > b {
    display: grid;
    place-items: center;
    min-width: 30px;
    height: 30px;
    padding: 0 7px;
    border: 1px solid #4a5b2b;
    background: rgba(199, 255, 50, .07);
    color: var(--accent);
    font-size: 10px;
}

.team-tournament-list,
.team-upcoming-list {
    max-height: 515px;
    overflow-y: auto;
    scrollbar-color: #394558 #0a0f16;
    scrollbar-width: thin;
}

.team-tournament-row,
.team-upcoming-match {
    display: grid;
    align-items: center;
    min-height: 91px;
    padding: 13px 15px;
    border-bottom: 1px solid #242f3c;
    transition: background .16s, border-color .16s;
}

.team-tournament-row {
    grid-template-columns: 47px minmax(0, 1fr) 20px;
    gap: 13px;
}

.team-tournament-row:hover,
.team-upcoming-match:hover {
    background: rgba(199, 255, 50, .035);
    border-color: #3c4b2b;
}

.team-tournament-row:last-child,
.team-upcoming-match:last-child {
    border-bottom: 0;
}

.team-event-mark {
    display: grid;
    place-items: center;
    width: 47px;
    height: 47px;
    border: 1px solid #364353;
    background: #18222e;
    color: var(--accent);
    font: italic 900 12px Impact;
}

.team-tournament-row > div,
.team-match-info {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.team-tournament-row small,
.team-match-info > small {
    overflow: hidden;
    color: #788496;
    font-size: 7px;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: .45px;
    white-space: nowrap;
}

.team-tournament-row small i {
    color: #8f9b70;
    font-style: normal;
    font-weight: 900;
}

.team-tournament-row small i.status-live {
    color: var(--accent);
}

.team-tournament-row small i.status-finished {
    color: #667284;
}

.team-tournament-row strong {
    margin-top: 3px;
    overflow: hidden;
    color: #edf1f6;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-tournament-row p,
.team-match-info p {
    margin: 3px 0 0;
    color: #697587;
    font-size: 8px;
}

.team-row-arrow {
    color: var(--accent);
    font-size: 16px;
    transition: transform .16s;
}

.team-tournament-row:hover .team-row-arrow,
.team-upcoming-match:hover .team-row-arrow {
    transform: translateX(3px);
}

.team-upcoming-match {
    grid-template-columns: 62px minmax(0, 1fr) 20px;
    gap: 13px;
}

.team-match-date {
    display: flex;
    min-height: 51px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #303b49;
}

.team-match-date strong {
    color: #f2f5f8;
    font-size: 11px;
    text-transform: uppercase;
}

.team-match-date span {
    margin-top: 2px;
    color: var(--accent);
    font-size: 9px;
    font-weight: 900;
    text-transform: uppercase;
}

.team-match-info > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 23px minmax(0, 1fr);
    align-items: center;
    gap: 6px;
    margin-top: 4px;
}

.team-match-info > div strong {
    overflow: hidden;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.team-match-info > div strong:last-child {
    text-align: right;
}

.team-match-info > div b {
    color: var(--accent);
    font-size: 8px;
    text-align: center;
}

.team-activity-empty {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 25px;
}

.team-activity-empty > span {
    display: grid;
    place-items: center;
    width: 45px;
    height: 45px;
    flex: none;
    border: 1px dashed #3a4655;
    color: #718093;
    font-size: 18px;
}

.team-activity-empty > div {
    display: flex;
    flex-direction: column;
}

.team-activity-empty strong {
    font-size: 11px;
}

.team-activity-empty p {
    max-width: 270px;
    margin: 3px 0 0;
    color: #6e7a8b;
    font-size: 8px;
}

@media (max-width: 900px) {
    .team-hall-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .team-hall-stats > article:nth-child(2) {
        border-right: 0;
    }

    .team-hall-stats > article:nth-child(-n+2) {
        border-bottom: 1px solid #293329;
    }

    .team-hall-list {
        grid-template-columns: 1fr;
    }

    .team-competition-grid {
        grid-template-columns: 1fr;
    }

    .team-tournament-list,
    .team-upcoming-list {
        max-height: none;
    }
}

@media (max-width: 520px) {
    .team-hall-header {
        min-height: 0;
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 15px;
    }

    .team-hall-header h2 {
        font-size: 24px;
    }

    .team-hall-stats > article {
        min-height: 80px;
        gap: 9px;
        padding: 12px;
    }

    .team-hall-stats > article > span {
        width: 34px;
        height: 34px;
    }

    .team-hall-stats strong {
        font-size: 20px;
    }

    .team-hall-list-head {
        align-items: flex-start;
        gap: 5px;
        flex-direction: column;
        padding-inline: 13px;
    }

    .team-hall-list {
        padding: 0 13px 13px;
    }

    .team-achievement {
        grid-template-columns: 38px minmax(0, 1fr) 12px;
        gap: 9px;
        padding-inline: 10px;
    }

    .team-achievement-medal {
        width: 38px;
        height: 38px;
    }

    .team-activity-panel > header {
        min-height: 70px;
        padding: 14px;
    }

    .team-activity-panel > header h2 {
        font-size: 19px;
    }

    .team-tournament-row,
    .team-upcoming-match {
        padding-inline: 11px;
    }

    .team-upcoming-match {
        grid-template-columns: 52px minmax(0, 1fr) 12px;
        gap: 9px;
    }

    .team-tournament-row {
        grid-template-columns: 42px minmax(0, 1fr) 12px;
        gap: 10px;
    }

    .team-event-mark {
        width: 42px;
        height: 42px;
    }
}
