.torneios-tab,
#app-content:has(> .torneios-tab) {
    background: linear-gradient(180deg,
            var(--torneios-primary) 0%,
            var(--torneios-primary-dark) 24%,
            var(--torneios-primary-deep) 68%,
            var(--torneios-primary-black) 100%);
}

#app-content:has(> .torneios-tab) {
    min-height: 100dvh;
}

body:not(.is-unauthenticated) #app-content > .torneios-tab {
    min-height: 0;
}

html:has(.torneios-tab) {
    min-height: 100%;
    background-color: var(--torneios-primary-black, #03060c);
}

body:has(.torneios-tab) {
    min-height: 100dvh;
    background-color: var(--torneios-primary-black, #03060c);
}

.torneios-tab {
    position: relative;
}

.torneios-internal-create-row {
    transform: translateY(-0.625rem);
}

.torneios-registration {
    position: relative;
}

.torneios-card__image {
    display: block;
    flex: 0 0 auto;
    width: 3rem;
    height: 3rem;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: .7rem;
    object-fit: cover;
}

.torneios-type-badge {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .35rem .65rem;
    border: 1px solid rgba(96, 165, 250, .35);
    border-radius: 999px;
    background: rgba(37, 99, 235, .14);
    color: #bfdbfe;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .08em;
    line-height: 1;
}

.torneios-type-badge i {
    color: #60a5fa;
}

.torneios-type-badge--card {
    padding: .25rem .45rem;
    font-size: .57rem;
}

.torneios-type-badge--special {
    border-color: rgba(52, 211, 153, .38);
    background: rgba(16, 185, 129, .14);
    color: #a7f3d0;
}

.torneios-type-badge--special i {
    color: #34d399;
}

.torneios-type-badge--cup,
.torneios-type-badge--state {
    border-color: rgba(251, 191, 36, .38);
    background: rgba(245, 158, 11, .14);
    color: #fde68a;
}

.torneios-type-badge--cup i,
.torneios-type-badge--state i {
    color: #fbbf24;
}

.torneios-type-badge--regional {
    border-color: rgba(167, 139, 250, .38);
    background: rgba(139, 92, 246, .14);
    color: #ddd6fe;
}

.torneios-type-badge--regional i {
    color: #a78bfa;
}

.torneios-type-badge--municipal {
    border-color: rgba(34, 211, 238, .38);
    background: rgba(6, 182, 212, .14);
    color: #a5f3fc;
}

.torneios-type-badge--municipal i {
    color: #22d3ee;
}

.torneios-type-badge--friendly {
    border-color: rgba(161, 161, 170, .35);
    background: rgba(113, 113, 122, .16);
    color: #e4e4e7;
}

.torneios-type-badge--friendly i {
    color: #a1a1aa;
}

.torneios-partner-promo {
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid rgba(52, 211, 153, .35);
    border-radius: .85rem;
    background: #09090b;
    color: white;
    text-decoration: none;
}

.torneios-partner-promo img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.torneios-partner-credit {
    margin: .35rem 0 0;
    color: #a1a1aa;
    font-size: .72rem;
    line-height: 1.35;
}

.torneios-partner-credit strong {
    color: #6ee7b7;
    font-weight: 800;
}

.app-modal__box:has(> .app-modal__body > .torneios-modal-content) .app-modal__body {
    padding: 0.75rem;
}

.torneios-modal-collapse {
    overflow: visible;
    border: 1px solid rgba(63, 63, 70, .9);
    border-radius: .75rem;
    background: rgba(24, 24, 27, .55);
}

.torneios-modal-collapse > summary {
    display: flex;
    min-height: 48px;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 1rem;
    color: #e4e4e7;
    font-size: .75rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
    cursor: pointer;
    list-style: none;
}

.torneios-modal-collapse > summary::-webkit-details-marker {
    display: none;
}

.torneios-modal-collapse > summary > span:first-child,
.torneios-modal-collapse__meta {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

.torneios-modal-collapse > summary > span:first-child i {
    color: #67e8f9;
}

.torneios-modal-collapse__meta {
    gap: .65rem;
    color: #a1a1aa;
}

.torneios-modal-collapse__meta .fa-chevron-down {
    transition: transform .2s ease;
}

.torneios-modal-collapse[open] .torneios-modal-collapse__meta .fa-chevron-down {
    transform: rotate(180deg);
}

.torneios-modal-collapse__body {
    padding: 0 .25rem .35rem;
    min-width: 0;
}

.torneios-modal-collapse[open] .torneios-modal-collapse__body .torneios-match {
    width: 95%;
    margin-inline: auto;
    gap: .35rem;
    padding: 2.2rem .55rem .6rem;
    box-sizing: border-box;
}
.torneios-modal-collapse[open] .torneios-modal-collapse__body .torneios-match__team {
    font-size: .7rem;
    gap: .3rem;
    white-space: normal;
    line-height: 1.15;
}
.torneios-modal-collapse[open] .torneios-modal-collapse__body .torneios-match__team > span {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.torneios-modal-collapse[open] .torneios-modal-collapse__body .torneios-match__sponsor { width: 22px; height: 14px; padding: 1px 2px; }
.torneios-modal-collapse[open] .torneios-modal-collapse__body .torneios-match__sponsor-name { max-width: 32px; font-size: .48rem; }
.torneios-modal-collapse[open] .torneios-modal-collapse__body .torneios-match__score { font-size: .75rem; }
.torneios-modal-collapse[open] .torneios-modal-collapse__body .torneios-match__datetime { font-size: .62rem; gap: .4rem; padding-top: .35rem; }

.torneios-registration > div:first-child {
    position: relative;
    overflow: hidden;
    padding: 1.75rem 1.25rem;
    border-color: rgba(245, 158, 11, .42);
    background:
        radial-gradient(circle at 50% 0, rgba(250, 204, 21, .22), transparent 48%),
        linear-gradient(145deg, rgba(120, 53, 15, .32), rgba(15, 23, 42, .9));
    box-shadow: inset 0 1px rgba(255, 255, 255, .08), 0 .8rem 2rem rgba(0, 0, 0, .22);
}

.torneios-registration > div:first-child::before {
    content: "";
    position: absolute;
    inset: .6rem;
    border: 1px solid rgba(250, 204, 21, .12);
    border-radius: .75rem;
    pointer-events: none;
}

.torneios-registration [data-torneios-inscricao-nome] {
    position: relative;
    font-size: 1.25rem;
    line-height: 1.2;
}

.torneios-registration [data-torneios-inscricao-custo] {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 8rem;
    padding: .45rem .85rem;
    border: 1px solid rgba(250, 204, 21, .3);
    border-radius: 999px;
    background: rgba(0, 0, 0, .24);
}

.torneios-registration [data-torneios-inscricao-error] {
    border-width: 1px;
    border-color: rgba(248, 113, 113, .38);
    border-radius: .85rem;
    background: rgba(127, 29, 29, .32);
    padding: .9rem;
    color: #fecaca;
    font-weight: 700;
    line-height: 1.45;
}

.torneios-registration button {
    min-height: 3.25rem;
    box-shadow: inset 0 1px rgba(255, 255, 255, .08);
}

.torneios-registration [data-torneios-inscricao-confirmar]:not(:disabled) {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    box-shadow: 0 .65rem 1.4rem rgba(245, 158, 11, .2);
}

.torneios-tab [data-torneio-detalhe],
.torneios-tab [data-pelada-detalhe] {
    background-color: rgba(24, 24, 27, 0.72);
    backdrop-filter: blur(4px);
}

.torneios-matches-heading,
.torneios-match {
    display: grid;
    align-items: center;
}

.torneios-tone--internal { --tournament-accent: 168 85 247; }
.torneios-tone--ranked { --tournament-accent: 59 130 246; }
.torneios-tone--cup { --tournament-accent: 245 158 11; }

.torneios-accent-button {
    border-color: rgb(var(--tournament-accent) / .55);
    background: rgb(var(--tournament-accent) / .82);
    color: white;
    box-shadow: 0 0 20px rgb(var(--tournament-accent) / .16);
}

.torneios-accent-button:hover {
    background: rgb(var(--tournament-accent) / .96);
}

.torneios-matches-heading {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: .75rem;
    padding: .75rem 0;
}

.torneios-matches-heading span,
.torneios-matches-heading small {
    color: rgb(161 161 170);
    font-size: .68rem;
    text-transform: uppercase;
}

.torneios-matches-heading strong { display: block; color: white; }
.torneios-matches-list { display: grid; gap: .45rem; }

.torneios-match {
    position: relative;
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    gap: .65rem;
    padding: 1.25rem .8rem .8rem;
    border: 1px solid rgb(var(--tournament-accent) / .25);
    border-radius: .7rem;
    background: linear-gradient(105deg, rgb(var(--tournament-accent) / .08), rgba(24, 24, 27, .84));
    color: rgb(228 228 231);
    text-align: left;
    overflow-wrap: anywhere;
}

.torneios-match.torneios-match--scheduled {
    border-color: rgb(var(--tournament-accent) / .55);
    background: linear-gradient(90deg, rgb(var(--tournament-accent) / .18), rgba(24, 24, 27, .9));
}

.torneios-match.torneios-match--finished {
    border-color: rgba(113, 113, 122, .62);
    background: linear-gradient(90deg, rgba(63, 63, 70, .55), rgba(24, 24, 27, .94));
    box-shadow: inset 3px 0 #71717a;
}

.torneios-match.torneios-match--victory {
    border-color: rgba(34, 197, 94, .72);
    background: linear-gradient(90deg, rgba(20, 83, 45, .56), rgba(20, 30, 25, .94));
    box-shadow: inset 3px 0 #22c55e, 0 0 18px rgba(34, 197, 94, .14);
}

.torneios-match.torneios-match--defeat {
    border-color: rgba(239, 68, 68, .68);
    background: linear-gradient(90deg, rgba(127, 29, 29, .5), rgba(35, 22, 24, .94));
    box-shadow: inset 3px 0 #ef4444, 0 0 18px rgba(239, 68, 68, .12);
}

.torneios-match__tournament {
    position: absolute;
    top: .28rem;
    left: .45rem;
    max-width: calc(100% - 6.5rem);
    overflow: hidden;
    padding: .18rem .48rem;
    border: 1px solid rgb(var(--tournament-accent) / .45);
    border-radius: 999px;
    background: rgb(var(--tournament-accent) / .14);
    color: rgb(var(--tournament-accent));
    font-size: .56rem;
    font-weight: 900;
    letter-spacing: .04em;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.torneios-match__tournament i {
    margin-right: .15rem;
    font-size: .5rem;
}

.torneios-match__status {
    position: absolute;
    top: .28rem;
    right: .45rem;
    padding: .18rem .48rem;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-size: .56rem;
    font-weight: 900;
    letter-spacing: .06em;
    line-height: 1;
    text-transform: uppercase;
}

.torneios-match__status--scheduled { color: rgb(var(--tournament-accent)); background: rgb(var(--tournament-accent) / .14); }
.torneios-match__status--finished { color: #d4d4d8; background: rgba(113, 113, 122, .2); }
.torneios-match__status--victory { color: #86efac; background: rgba(34, 197, 94, .16); }
.torneios-match__status--defeat { color: #fca5a5; background: rgba(239, 68, 68, .16); }

.torneios-match--mine {
    border-color: rgb(var(--tournament-accent) / .62);
    background: linear-gradient(90deg, rgb(var(--tournament-accent) / .2), rgba(24, 24, 27, .88));
    box-shadow: inset 3px 0 rgb(var(--tournament-accent)), 0 0 20px rgb(var(--tournament-accent) / .13);
}

.torneios-match__team { display: flex; align-items: center; gap: .4rem; min-width: 0; overflow: hidden; font-size: .78rem; font-weight: 750; white-space: nowrap; }
.torneios-match__team>span { overflow: hidden; text-overflow: ellipsis; }
.torneios-match__team--away { justify-content: flex-end; text-align: right; }
.torneios-match__sponsor { flex: none; width: 32px; height: 20px; padding: 2px 3px; border-radius: 4px; background: rgba(255,255,255,.94); object-fit: contain; }
.torneios-match__sponsor-name { max-width: 54px; overflow: hidden; color: #d4d4d8; font-size: .55rem; text-overflow: ellipsis; }
.torneios-match__score { color: white; font-size: .82rem; }
.torneios-match__datetime {
    grid-column: 1 / -1;
    margin-top: .2rem;
    padding-top: .5rem;
    border-top: 1px solid rgba(113, 113, 122, .25);
    color: rgb(161 161 170);
    font-size: .68rem;
    font-weight: 650;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: .65rem;
    text-align: center;
}
.torneios-match__datetime i { margin-right: .2rem; color: rgb(var(--tournament-accent)); }
.torneios-match__action { color: #86efac; font-weight: 900; text-transform: uppercase; }
.torneios-match__action i { color: currentColor; }
.torneios-match small { position: absolute; top: .15rem; right: .4rem; color: rgb(var(--tournament-accent)); font-size: .52rem; text-transform: uppercase; }

.torneios-match-table-wrap {
    width: 100%;
    overflow: hidden;
    border: 1px solid rgba(113, 113, 122, .34);
    border-radius: .85rem;
    background: rgba(9, 9, 11, .42);
}

.torneios-match-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.torneios-match-table th {
    padding: .65rem .7rem;
    color: #a1a1aa;
    background: rgba(24, 24, 27, .88);
    font-size: .62rem;
    font-weight: 850;
    letter-spacing: .055em;
    text-align: left;
    text-transform: uppercase;
}

.torneios-match-table th:first-child,
.torneios-match-table__round {
    width: 3.75rem;
    text-align: center;
}

.torneios-match-table th:nth-child(3),
.torneios-match-table__date {
    width: 9.5rem;
}

.torneios-match-table th:last-child,
.torneios-match-table__state {
    width: 6.75rem;
    text-align: right;
}

.torneios-match-table td {
    padding: .65rem .7rem;
    border-top: 1px solid rgba(113, 113, 122, .22);
    vertical-align: middle;
}

.torneios-match-table__row {
    background: rgba(24, 24, 27, .42);
    transition: background-color .16s ease;
}

.torneios-match-table__row--mine {
    background: rgb(var(--tournament-accent) / .055);
}

.torneios-match-table__row--mine:hover {
    background: rgb(var(--tournament-accent) / .1);
}

.torneios-match-table__round > span {
    display: inline-grid;
    min-width: 1.75rem;
    min-height: 1.75rem;
    place-items: center;
    border: 1px solid rgb(var(--tournament-accent) / .32);
    border-radius: .5rem;
    color: rgb(var(--tournament-accent));
    background: rgb(var(--tournament-accent) / .08);
    font-size: .72rem;
    font-weight: 900;
}

.torneios-match-table__open {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, 1fr) 3rem minmax(0, 1fr);
    align-items: center;
    gap: .55rem;
    color: #f4f4f5;
    text-align: left;
}

.torneios-match-table__open:not(:disabled) {
    cursor: pointer;
}

.torneios-match-table__open:not(:disabled):focus-visible {
    border-radius: .45rem;
    outline: 2px solid rgb(var(--tournament-accent));
    outline-offset: 3px;
}

.torneios-match-table__open:disabled {
    cursor: default;
}

.torneios-match-table__club {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .4rem;
    font-size: .75rem;
    font-weight: 800;
}

.torneios-match-table__club > span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.torneios-match-table__club--away {
    justify-content: flex-end;
    text-align: right;
}

.torneios-match-table__score {
    color: #fff;
    font-size: .78rem;
    text-align: center;
    white-space: nowrap;
}

.torneios-match-table__sponsor {
    flex: none;
    width: 1.65rem;
    height: 1.1rem;
    padding: 1px 2px;
    border-radius: .25rem;
    background: rgba(255, 255, 255, .94);
    object-fit: contain;
}

.torneios-match-table__date {
    color: #d4d4d8;
    font-size: .68rem;
    font-weight: 700;
    white-space: nowrap;
}

.torneios-match-table__date i {
    margin-right: .3rem;
    color: rgb(var(--tournament-accent));
}

@media (max-width: 640px) {
    .torneios-match-table-wrap {
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .torneios-match-table,
    .torneios-match-table tbody {
        display: block;
    }

    .torneios-match-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
        clip-path: inset(50%);
    }

    .torneios-match-table__row {
        display: grid;
        grid-template-columns: auto 1fr auto;
        gap: .5rem .65rem;
        margin-bottom: .55rem;
        padding: .7rem;
        border: 1px solid rgba(113, 113, 122, .32);
        border-radius: .75rem;
    }

    .torneios-match-table__row:last-child {
        margin-bottom: 0;
    }

    .torneios-match-table td {
        width: auto;
        padding: 0;
        border: 0;
    }

    .torneios-match-table__round {
        grid-column: 1;
        grid-row: 1;
    }

    .torneios-match-table__game {
        grid-column: 1 / -1;
        grid-row: 2;
        padding-top: .55rem;
        border-top: 1px solid rgba(113, 113, 122, .2);
    }

    .torneios-match-table__date {
        grid-column: 2;
        grid-row: 1;
        align-self: center;
        white-space: normal;
    }

    .torneios-match-table__state {
        grid-column: 3;
        grid-row: 1;
        align-self: center;
    }

    .torneios-match-table__open {
        grid-template-columns: minmax(0, 1fr) 2.25rem minmax(0, 1fr);
        gap: .35rem;
    }

    .torneios-match-table__club {
        font-size: .7rem;
    }

    .torneios-match-table__sponsor {
        width: 1.35rem;
        height: .9rem;
    }
}

.chaveamento-wrap {
    overflow-x: auto;
    padding-bottom: 0.5rem;
}

.chaveamento-grid {
    display: flex;
    gap: 1.25rem;
    min-width: max-content;
}

.chaveamento-coluna {
    display: flex;
    flex-direction: column;
    min-width: 160px;
}

.chaveamento-coluna__titulo {
    margin-bottom: 0.5rem;
    color: #71717a;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-align: center;
    text-transform: uppercase;
}

.chaveamento-coluna__boxes {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: space-around;
    gap: 0.5rem;
}

.chaveamento-box {
    padding: 0.4rem 0.6rem;
    border: 1px solid rgba(113, 113, 122, 0.35);
    border-radius: 0.5rem;
    background: rgba(24, 24, 27, 0.6);
    font-size: 12px;
    line-height: 1.3;
}

.chaveamento-box--vencedor {
    border-color: rgba(16, 185, 129, 0.5);
    background: rgba(16, 185, 129, 0.08);
}

.chaveamento-box--vazio {
    opacity: 0.55;
    font-style: italic;
}

.chaveamento-box__nome {
    overflow: hidden;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.chaveamento-box__placar {
    margin-top: 0.15rem;
    color: #a1a1aa;
    font-size: 11px;
}

.chaveamento-conector {
    height: 0.5rem;
}
.opponent-profile-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 76px;
    gap: 14px;
}

.opponent-profile-brand {
    display: contents;
}

.opponent-profile-flag {
    width: 100%;
    height: 88px;
}

.opponent-profile-flag > svg,
.opponent-profile-flag > img {
    display: block;
    width: 100%;
    height: 100%;
}

.opponent-profile-shield {
    width: 76px;
    height: 88px;
}

.opponent-profile-shield > svg,
.opponent-profile-shield > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.opponent-profile-info {
    grid-column: 1 / -1;
    overflow-wrap: anywhere;
}

.opponent-profile-sponsor {
    flex-wrap: wrap;
}

@media (min-width: 640px) {
    .opponent-profile-hero {
        display: flex;
        align-items: center;
        gap: 16px;
    }

    .opponent-profile-brand {
        display: grid;
        flex: none;
        grid-template-columns: 140px 76px;
        gap: 8px;
    }

    .opponent-profile-flag {
        width: 140px;
    }

    .opponent-profile-info {
        flex: 1;
        grid-column: auto;
    }
}
