/*
 * Elenco
 * Ajustes da tela /elenco, tabela de jogadores, ficha e modal de escalação.
 */

/*
 * Cartão visual do jogador (campo verde + bandeira flamulando + imagem +
 * faixa com nome/posição). Usado em qualquer tela/modal que exiba a
 * identidade visual de um jogador (Ficha do jogador, Editar jogador, etc).
 */
[data-elenco-treinar-icone].hidden {
    display: none !important;
}

.elenco-tab {
    background: linear-gradient(180deg,
            var(--elenco-primary-start) 0%,
            var(--elenco-primary-dark) 24%,
            var(--elenco-primary-deep) 68%,
            var(--elenco-primary-black) 100%);
}

.jogador-card-stage {
    position: relative;
    overflow: hidden;
    border-radius: 0.75rem;
    border: 1px solid #27272a;
    background:
        radial-gradient(120% 55% at 12% -4%, rgba(134, 239, 172, .18), transparent 55%),
        radial-gradient(120% 55% at 88% -4%, rgba(147, 197, 253, .16), transparent 55%),
        linear-gradient(180deg, #060a10 0%, #0b1220 34%, rgba(9, 9, 11, .8) 100%);
}

/* Cantos do card em diagonal (moldura), so decorativo. */
.jogador-card-stage::before,
.jogador-card-stage::after {
    content: '';
    position: absolute;
    z-index: 8;
    width: 30%;
    height: 11%;
    opacity: .5;
    pointer-events: none;
}
.jogador-card-stage::before {
    left: -6%;
    top: -3%;
    background: linear-gradient(135deg, #4ade80, transparent 70%);
    clip-path: polygon(0 0, 100% 0, 0 100%);
}
.jogador-card-stage::after {
    right: -6%;
    bottom: -3%;
    background: linear-gradient(-45deg, #4ade80, transparent 70%);
    clip-path: polygon(100% 100%, 0 100%, 100% 0);
}

.jogador-card-stage__imagem {
    position: absolute;
    inset: 0;
    z-index: 5;
}

.jogador-card-stage__imagem > svg {
    position: absolute;
    left: 50%;
    bottom: 0;
    width: 86%;
    height: 92%;
    transform: translateX(-50%);
    filter:
        drop-shadow(0 .9rem .72rem rgba(var(--jogador-primary-rgb, 15, 159, 110), .68))
        drop-shadow(0 .22rem .17rem rgba(var(--jogador-primary-rgb, 15, 159, 110), .8));
}

.jogador-card-stage__escudo {
    position: absolute;
    right: .5rem;
    bottom: .5rem;
    z-index: 6;
    width: 2.75rem;
    aspect-ratio: 1 / 1.18;
    filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .5));
}

.jogador-card-stage__camisa {
    position: absolute;
    right: .4rem;
    top: .4rem;
    z-index: 6;
    width: 3rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5));
}

/* Carimbo apto/inapto sobreposto na imagem, canto inferior direito (ficha do jogador). */
.jogador-card-stamp {
    position: absolute;
    right: .6rem;
    bottom: .6rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .55rem;
    border-radius: .45rem;
    border: 1px solid rgba(148, 163, 184, .4);
    background: rgba(9, 9, 11, .78);
    font-size: .78rem;
    font-weight: 900;
    white-space: nowrap;
    pointer-events: none;
}

.jogador-card-stamp i {
    font-size: .78rem;
}

.jogador-card-stamp--ok { color: #4ade80; border-color: rgba(74, 222, 128, .45); }
.jogador-card-stamp--danger { color: #f87171; border-color: rgba(248, 113, 113, .45); }
.jogador-card-stamp--warn { color: #fbbf24; border-color: rgba(251, 191, 36, .45); }
.jogador-card-stamp--tired { color: #fb923c; border-color: rgba(251, 146, 60, .45); }

/* Indicador de pe preferencial sobreposto na imagem (ficha do jogador). */
.jogador-card-foot {
    position: absolute;
    left: .6rem;
    bottom: .6rem;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    padding: .28rem .55rem;
    border-radius: .45rem;
    border: 1px solid rgba(148, 163, 184, .4);
    background: rgba(9, 9, 11, .78);
    color: #e4e4e7;
    font-size: .78rem;
    font-weight: 900;
}

.jogador-card-foot i {
    font-size: .78rem;
    opacity: .85;
}

.jogador-card-banner {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 7;
    padding: .6rem .75rem .65rem;
    text-align: center;
    background: linear-gradient(0deg, rgba(9, 9, 11, .92) 12%, rgba(9, 9, 11, .55) 65%, transparent 100%);
}

.jogador-card-sponsor { position: absolute; z-index: 7; top: 9px; right: 9px; display: grid; place-items: center; width: 54px; height: 28px; padding: 3px 5px; overflow: hidden; border-radius: 6px; background: rgba(255,255,255,.94); color: #18181b; font-size: 7px; font-weight: 900; text-align: center; box-shadow: 0 3px 12px rgba(0,0,0,.3); }
.jogador-card-sponsor img { width: 100%; height: 100%; object-fit: contain; }

.jogador-card-banner__nome {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 1.05rem;
    font-weight: 900;
    line-height: 1.15;
    color: #f4f4f5;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .85);
}

.jogador-card-banner__posicao {
    margin-top: .1rem;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #86efac;
    text-shadow: 0 1px 4px rgba(0, 0, 0, .85);
}

/*
 * Variante premium usada no modal "Editar jogador".
 */
.jogador-card-stage--identity {
    border-radius: 1.35rem;
    border: 4px solid #182231;
    background: #030712;
    box-shadow:
        0 0 0 2px #030712,
        inset 0 0 0 2px rgba(148, 163, 184, .18),
        inset 0 -120px 100px rgba(0, 0, 0, .82),
        0 24px 55px rgba(0, 0, 0, .45);
}

@keyframes jogador-card-estadio-zoom {
    from {
        transform: scale(1.5);
    }
    to {
        transform: scale(1.05);
    }
}

@media (prefers-reduced-motion: reduce) {
    .jogador-card-stage--identity::before {
        animation: none;
        transform: scale(1.15);
    }
}

.jogador-card-stage--identity::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    width: auto;
    height: auto;
    opacity: 1;
    background: var(--jogador-card-stadium-bg, none) center center / cover no-repeat;
    transform: scale(1.3);
    transform-origin: center center;
    animation: jogador-card-estadio-zoom 30s linear infinite;
    pointer-events: none;
    will-change: transform;
    clip-path: none;
}

.jogador-card-stage--identity::after {
    content: none;
}

.jogador-card-stage--identity .jogador-card-stage__escudo {
    left: 1rem;
    right: auto;
    top: 1rem;
    bottom: auto;
    z-index: 9;
    width: 3.7rem;
}

.jogador-card-stage--identity .jogador-card-stage__imagem > svg {
    width: 112%;
    height: 96%;
    bottom: 4.5%;
}

.jogador-card-stage--identity .jogador-card-banner {
    padding: 4.25rem .9rem 1rem;
    background:
        linear-gradient(0deg, rgba(0, 0, 0, .96) 0%, rgba(0, 0, 0, .86) 52%, transparent 100%);
}

.jogador-card-stage--identity .jogador-card-banner__nome {
    font-size: 2.35rem;
    line-height: 1;
    letter-spacing: 0;
    color: #ffffff;
    text-shadow:
        0 2px 0 rgba(0, 0, 0, .55),
        0 6px 12px rgba(0, 0, 0, .8);
}

.jogador-card-stage--identity .jogador-card-banner__posicao {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    margin-top: .55rem;
    font-size: 1rem;
    color: var(--jogador-nivel-color, #4ade80);
}

.jogador-card-stage--identity .jogador-card-banner__posicao::before,
.jogador-card-stage--identity .jogador-card-banner__posicao::after {
    content: '';
    width: 3.2rem;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--jogador-nivel-color, #4ade80), transparent);
    box-shadow: 0 0 9px var(--jogador-nivel-color, #4ade80);
    opacity: .85;
}

.jogador-card-banner__nivel {
    display: none;
}

.jogador-card-stage--identity .jogador-card-banner__nivel {
    display: flex;
    justify-content: center;
    margin-top: .65rem;
}

.jogador-nivel-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .3rem .9rem;
    border-radius: .5rem;
    border: 1px solid transparent;
    font-size: 1rem;
    font-weight: 950;
    letter-spacing: .04em;
}

.jogador-nivel-badge--tier-1 {
    color: #f4f4f5;
    border-color: rgba(244, 244, 245, .35);
    background: rgba(244, 244, 245, .08);
}

.jogador-nivel-badge--tier-2 {
    color: #9ca3af;
    border-color: rgba(156, 163, 175, .4);
    background: rgba(156, 163, 175, .1);
}

.jogador-nivel-badge--tier-3 {
    color: #facc15;
    border-color: rgba(250, 204, 21, .45);
    background: rgba(250, 204, 21, .1);
}

.jogador-nivel-badge--tier-4 {
    color: #f87171;
    border-color: rgba(248, 113, 113, .45);
    background: rgba(248, 113, 113, .1);
}

.jogador-nivel-badge--tier-5 {
    color: #fb923c;
    border-color: rgba(251, 146, 60, .45);
    background: rgba(251, 146, 60, .1);
}

.jogador-nivel-badge--tier-6 {
    color: #4ade80;
    border-color: rgba(74, 222, 128, .45);
    background: rgba(74, 222, 128, .1);
}

.jogador-nivel-badge--tier-7 {
    color: #fde68a;
    border-color: rgba(251, 191, 36, .65);
    background: linear-gradient(135deg, rgba(251, 191, 36, .24), rgba(217, 119, 6, .12));
    text-shadow: 0 0 10px rgba(251, 191, 36, .75);
    box-shadow: 0 0 16px rgba(251, 191, 36, .35);
}

.jogador-nivel-badge--tier-8 {
    color: #7dd3fc;
    border-color: rgba(56, 189, 248, .65);
    background: linear-gradient(135deg, rgba(56, 189, 248, .24), rgba(37, 99, 235, .14));
    text-shadow: 0 0 12px rgba(56, 189, 248, .85);
    box-shadow: 0 0 18px rgba(56, 189, 248, .4);
}

.jogador-nivel-badge--tier-9 {
    color: #86efac;
    border-color: rgba(34, 197, 94, .7);
    background: linear-gradient(135deg, rgba(34, 197, 94, .28), rgba(22, 163, 74, .14));
    text-shadow: 0 0 12px rgba(74, 222, 128, .9);
    box-shadow: 0 0 18px rgba(74, 222, 128, .45);
}

.jogador-nivel-badge--tier-10 {
    color: #f3e8ff;
    border-color: rgba(168, 85, 247, .75);
    background: linear-gradient(135deg, rgba(168, 85, 247, .32), rgba(126, 34, 206, .16));
    text-shadow: 0 0 14px rgba(192, 132, 252, 1);
    box-shadow: 0 0 22px rgba(168, 85, 247, .55);
    animation: jogador-nivel-shine 2.2s ease-in-out infinite;
}

@keyframes jogador-nivel-shine {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.4); }
}

@media (prefers-reduced-motion: reduce) {
    .jogador-nivel-badge--tier-10 {
        animation: none;
    }
}

@media (max-width: 420px) {
    .jogador-card-stage--identity .jogador-card-banner__nome {
        font-size: 1.65rem;
    }

    .jogador-card-stage--identity .jogador-card-banner__posicao {
        font-size: .78rem;
    }
}

/*
 * Ficha do jogador
 */
.player-sheet {
    margin: -.25rem;
    padding: .85rem;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 1rem;
    background:
        radial-gradient(80% 42% at 25% 0%, rgba(59, 130, 246, .2), transparent 60%),
        radial-gradient(80% 55% at 100% 8%, rgba(34, 197, 94, .13), transparent 54%),
        linear-gradient(180deg, rgba(5, 16, 30, .96), rgba(2, 8, 18, .98));
    box-shadow: inset 0 0 38px rgba(15, 23, 42, .85);
}

.player-sheet-hero {
    display: grid;
    grid-template-columns: minmax(220px, .82fr) 1fr;
    gap: 1rem;
    align-items: stretch;
}

.player-sheet-card {
    min-width: 0;
}

/* Atributos principais (VEL/FIN/DRI...) logo abaixo da figurinha da ficha —
   mesma mini-badge do sticker card do mercado (.mercado-sticker-stat), so
   que aqui fica numa faixa propria (sem o rodape escuro do mercado, que
   nao existe nesta tela) em vez de dentro da moldura da imagem. */
.player-sheet-card__stats {
    margin-top: 0.6rem;
    padding: 0.55rem 0.25rem 0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
}

.jogador-card-stage--sheet {
    height: 100%;
    min-height: 25rem;
}

.jogador-card-stage--sheet .jogador-card-stage__imagem > svg {
    width: 108%;
    height: 95%;
    bottom: 4.25%;
}

.jogador-card-stage--sheet .jogador-card-banner__nome {
    font-size: 1.85rem;
}

.jogador-card-stage--sheet .jogador-card-banner {
    padding-top: 3.25rem;
    padding-bottom: 2.4rem;
}

.player-sheet-info {
    min-width: 0;
    align-self: start;
    display: grid;
    gap: 0;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, .22);
    border-radius: .9rem;
    background: rgba(10, 24, 42, .72);
    box-shadow: inset 0 0 24px rgba(15, 23, 42, .75);
}

.player-sheet-info-row {
    display: grid;
    grid-template-columns: 3.1rem 1fr;
    gap: .9rem;
    align-items: center;
    min-height: 5.2rem;
    border-bottom: 1px solid rgba(148, 163, 184, .22);
}

.player-sheet-info-row > i {
    color: #4ade80;
    font-size: 1.45rem;
    text-align: center;
}

.player-sheet-info-row strong {
    display: block;
    color: #f8fafc;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.1;
}

.player-sheet-info-row span,
.player-sheet-stat span {
    display: block;
    margin-top: .28rem;
    color: #94a3b8;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.player-sheet-info-row--split {
    display: flex;
    gap: 1.1rem;
}

.player-sheet-info-row__col {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: .7rem;
}

.player-sheet-info-row__col > i {
    flex: none;
    color: #4ade80;
    font-size: 1.3rem;
    text-align: center;
}

.player-sheet-info-row__col > div {
    min-width: 0;
}

.player-sheet-info-row__col strong,
.player-sheet-info-row__col span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.player-sheet-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
    margin-top: .75rem;
}

.player-sale-type {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: .5rem;
    border: 1px solid var(--theme-border, #3f3f46);
    border-radius: .5rem;
    background: var(--theme-surface-2, #09090b);
    padding: .625rem .75rem;
    color: var(--theme-text, #e4e4e7);
    font-size: .875rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.player-sale-type:has(input:checked) {
    border-color: var(--theme-primary, #0f9f6e);
    background: color-mix(in srgb, var(--theme-primary, #0f9f6e) 10%, transparent);
}

.player-sale-type input {
    accent-color: var(--theme-primary, #0f9f6e);
}

.identity-arrow {
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    flex: none;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--theme-border, #3f3f46);
    border-radius: .5rem;
    background: var(--theme-surface-2, #09090b);
    color: var(--theme-muted, #d4d4d8);
    transition: border-color .15s ease, color .15s ease, transform .15s ease;
}

.identity-arrow:hover,
.identity-arrow:focus-visible {
    border-color: color-mix(in srgb, var(--theme-primary, #0f9f6e) 55%, transparent);
    color: var(--theme-primary, #6ee7b7);
    outline: none;
}

.identity-arrow:active {
    transform: scale(.95);
}

.identity-selector {
    display: grid;
    min-width: 0;
    gap: .4rem;
}

.identity-selector__label {
    display: flex;
    min-width: 0;
    align-items: center;
    color: var(--theme-text, #e4e4e7);
    font-size: .8rem;
    font-weight: 800;
    white-space: nowrap;
}

.identity-selector__arrows {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .4rem;
}

.identity-selector__arrows .identity-arrow {
    width: 100%;
}

.identity-selector__label--skin::before {
    width: .9rem;
    height: .9rem;
    margin-right: .35rem;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    background: var(--identity-skin-color, #efc59f);
    content: '';
}

.player-sheet-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border-radius: .5rem;
    border: 1px solid rgba(148, 163, 184, .28);
    background: rgba(15, 23, 42, .85);
    padding: .55rem .75rem;
    color: #cbd5e1;
    font-size: .75rem;
    font-weight: 850;
}

.player-sheet-sale {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border-radius: .5rem;
    border: 1px solid rgba(251, 191, 36, .4);
    background: rgba(251, 191, 36, .12);
    padding: .55rem .75rem;
    color: #fbbf24;
    font-size: .75rem;
    font-weight: 850;
}

.player-sheet-sale:hover {
    border-color: rgba(251, 191, 36, .65);
    color: #fde68a;
}

.player-sheet-pill--danger {
    border-color: rgba(248, 113, 113, .4);
    color: #fca5a5;
}

.player-sheet-pill--warn {
    border-color: rgba(251, 191, 36, .4);
    color: #fcd34d;
}

.player-sheet-training-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    border-radius: .5rem;
    border: 1px solid rgba(96, 165, 250, .4);
    background: rgba(37, 99, 235, .15);
    padding: .55rem .75rem;
    color: #93c5fd;
    font-size: .75rem;
    font-weight: 850;
}

.player-sheet-training-btn:hover {
    border-color: rgba(96, 165, 250, .65);
    color: #bfdbfe;
}

/* Os controles da ficha alternam entre ação e bloqueio via classe .hidden.
   Estas regras precisam vencer o display próprio dos componentes. */
.player-sheet-actions .hidden {
    display: none;
}

.player-sheet-training-hint {
    display: flex;
    align-items: center;
    gap: .35rem;
    margin-top: .4rem;
    font-size: .68rem;
    color: #94a3b8;
}

.player-sheet-section {
    margin-top: .85rem;
    padding: .75rem;
    border: 1px solid rgba(148, 163, 184, .2);
    border-radius: .85rem;
    background: rgba(8, 22, 38, .58);
}

.player-sheet-section h3 {
    display: flex;
    align-items: center;
    gap: .45rem;
    margin: 0 0 .65rem;
    color: #d1d5db;
    font-size: .98rem;
    font-weight: 950;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.player-sheet-section h3 span,
.player-sheet-section h3 i {
    color: #4ade80;
}

.player-sheet-main-attrs,
.player-sheet-attrs {
    display: grid;
    gap: .6rem;
}

.player-sheet-main-attrs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.player-sheet-attrs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.player-sheet-attr {
    min-width: 0;
    width: 100%;
    padding: .75rem .55rem .6rem;
    border: 1px solid rgba(148, 163, 184, .25);
    border-radius: .62rem;
    background: rgba(15, 32, 53, .72);
    text-align: center;
    box-shadow: inset 0 0 18px rgba(15, 23, 42, .45);
    cursor: pointer;
    font: inherit;
    transition: border-color .15s, transform .1s;
}

.player-sheet-attr:hover,
.player-sheet-attr:focus-visible {
    border-color: rgba(248, 113, 113, .6);
    outline: none;
}

.player-sheet-attr:active {
    transform: scale(.97);
}

.player-sheet-attr--main {
    border-color: rgba(248, 113, 113, .42);
}

.player-sheet-attr__label {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: .45rem;
    color: #cbd5e1;
    font-size: .73rem;
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
}

.player-sheet-attr__label i {
    opacity: .75;
}

.player-sheet-attr__grade {
    margin-top: .55rem;
    color: #fca5a5;
    font-size: 1.55rem;
    font-weight: 950;
    line-height: 1;
}

.player-sheet-attr__value {
    margin-top: .18rem;
    color: #fca5a5;
    font-size: .82rem;
    font-weight: 850;
}

.player-sheet-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .55rem;
}

.player-sheet-stat {
    min-width: 0;
    padding: .85rem 1rem;
    border: 1px solid rgba(148, 163, 184, .24);
    border-radius: .62rem;
    background: rgba(15, 32, 53, .72);
}

.player-sheet-stat .player-sheet-stat__label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .35rem;
}

.player-sheet-stat .player-sheet-salary-badge {
    display: inline-flex;
    align-items: center;
    margin-top: 0;
    padding: .14rem .38rem;
    border: 1px solid rgba(125, 211, 252, .35);
    border-radius: 999px;
    background: rgba(14, 165, 233, .12);
    color: #7dd3fc;
    font-size: .58rem;
    font-weight: 900;
    line-height: 1;
    letter-spacing: .02em;
    white-space: nowrap;
}

.player-sheet-stat .player-sheet-salary-badge--valorizado {
    border-color: rgba(52, 211, 153, .35);
    background: rgba(16, 185, 129, .12);
    color: #6ee7b7;
}

.player-sheet-stat .player-sheet-salary-badge--insatisfeito {
    border-color: rgba(251, 191, 36, .4);
    background: rgba(245, 158, 11, .12);
    color: #fcd34d;
}

.player-sheet-stat .player-sheet-salary-badge--muito_insatisfeito {
    border-color: rgba(248, 113, 113, .4);
    background: rgba(239, 68, 68, .12);
    color: #fca5a5;
}

.player-sheet-stat strong {
    display: block;
    margin-top: .35rem;
    color: #f8fafc;
    font-size: 1.25rem;
    font-weight: 950;
    line-height: 1;
}

.player-sheet-stat strong small {
    color: #cbd5e1;
    font-size: .72em;
    font-weight: 800;
    white-space: nowrap;
}

.player-sheet-stat .ficha-cartao-group {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    margin-top: 0;
}

.player-sheet-stat .ficha-cartao-rect {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    height: 1.5rem;
    border-radius: .2rem;
    font-size: .68rem;
    font-weight: 950;
    line-height: 1;
    color: #1c1917;
}

.ficha-cartao-rect--amarelo {
    background: #facc15;
}

.ficha-cartao-rect--vermelho {
    background: #ef4444;
}

@media (max-width: 760px) {
    .player-sheet {
        padding: .6rem;
    }

    .player-sheet-hero {
        grid-template-columns: 1fr;
        gap: .6rem;
    }

    .jogador-card-stage--sheet {
        min-height: 15rem;
    }

    .jogador-card-stage--sheet .jogador-card-banner__nome {
        font-size: 1.35rem;
    }

    .jogador-card-stage--sheet .jogador-card-banner {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }

    .player-sheet-info {
        padding: .6rem .75rem;
    }

    .player-sheet-info-row {
        grid-template-columns: 1.7rem 1fr;
        gap: .55rem;
        min-height: 2.5rem;
    }

    .player-sheet-info-row > i {
        font-size: 1rem;
    }

    .player-sheet-info-row strong {
        font-size: .92rem;
    }

    .player-sheet-info-row span,
    .player-sheet-stat span {
        font-size: .62rem;
        margin-top: .1rem;
    }

    .player-sheet-info-row--split {
        gap: .6rem;
    }

    .player-sheet-info-row__col > i {
        font-size: 1rem;
    }

    .jogador-card-stamp {
        padding: .22rem .45rem;
        font-size: .7rem;
    }

    .jogador-card-foot {
        padding: .22rem .45rem;
        font-size: .7rem;
    }

    .player-sheet-actions {
        gap: .4rem;
    }

    .player-sheet-sale,
    .player-sheet-pill,
    .player-sheet-training-btn {
        padding: .4rem .6rem;
        font-size: .7rem;
    }

    .player-sheet-section {
        margin-top: .55rem;
        padding: .55rem;
    }

    .player-sheet-section h3 {
        margin-bottom: .45rem;
        font-size: .8rem;
    }

    .player-sheet-main-attrs,
    .player-sheet-attrs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: .4rem;
    }

    .player-sheet-attr {
        padding: .45rem .3rem .4rem;
    }

    .player-sheet-attr__label {
        gap: .25rem;
        font-size: .6rem;
    }

    .player-sheet-attr__grade {
        margin-top: .3rem;
        font-size: 1.15rem;
    }

    .player-sheet-attr__value {
        font-size: .68rem;
    }

    .player-sheet-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .4rem;
    }

    .player-sheet-stat {
        padding: .5rem .6rem;
    }

    .player-sheet-stat strong {
        margin-top: .2rem;
        font-size: 1rem;
    }
}

/* Treino individual: grade de cartoes selecionaveis (um grupo de atributos por cartao). */
.treino-individual-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
}

@media (max-width: 480px) {
    .treino-individual-grid {
        grid-template-columns: 1fr;
    }
}

.treino-individual-grupo {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.7rem;
    border: 1px solid rgb(39 39 42);
    border-radius: 0.65rem;
    background: rgb(24 24 27 / 0.6);
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease;
}

.treino-individual-grupo:hover {
    border-color: rgb(63 63 70);
}

.treino-individual-grupo--recomendado {
    border-color: rgba(16, 185, 129, 0.35);
}

.treino-individual-grupo--selecionado {
    border-color: rgb(16 185 129);
    background: rgba(16, 185, 129, 0.1);
}

.treino-individual-grupo__icon {
    flex-shrink: 0;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.5rem;
    background: rgb(39 39 42);
    color: rgb(212 212 216);
}

.treino-individual-grupo--selecionado .treino-individual-grupo__icon {
    background: rgba(16, 185, 129, 0.2);
    color: rgb(52 211 153);
}

.treino-individual-grupo__info {
    min-width: 0;
}

.treino-individual-grupo__label {
    font-size: 0.78rem;
    font-weight: 700;
    color: rgb(228 228 231);
}

.treino-individual-grupo__badge {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0.05rem 0.35rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.15);
    color: rgb(52 211 153);
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.treino-individual-grupo__attrs {
    margin-top: 0.1rem;
    font-size: 0.68rem;
    color: rgb(113 113 122);
}

.treino-individual-grupo__custo {
    margin-top: 0.2rem;
    font-size: 0.72rem;
    font-weight: 800;
    color: rgb(52 211 153);
}

.treino-individual-grupo__custo > i {
    color: rgb(250 204 21);
}

.treino-individual-grupo__custo--semsaldo {
    color: rgb(248 113 113);
}

.treino-individual-grupo--semsaldo {
    opacity: 0.55;
    cursor: not-allowed;
}

.escalacao-tatica-wrap {
    display: grid;
    gap: .85rem;
}

.escalacao-tatica-field {
    position: relative;
    min-height: 27rem;
    max-width: 22rem;
    width: 100%;
    margin: 0 auto;
    overflow: hidden;
    border: 1px solid rgba(34, 197, 94, .28);
    border-radius: .85rem;
    background:
        linear-gradient(0deg, transparent 49.5%, rgba(255, 255, 255, .32) 49.5%, rgba(255, 255, 255, .32) 50.5%, transparent 50.5%),
        radial-gradient(circle at 50% 50%, transparent 0 12%, rgba(255, 255, 255, .25) 12.4% 12.9%, transparent 13.2%),
        repeating-linear-gradient(0deg, rgba(16, 185, 129, .18) 0 16.6%, rgba(34, 197, 94, .12) 16.6% 33.2%),
        linear-gradient(180deg, #0d3324, #052015);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

.escalacao-tatica-field::before,
.escalacao-tatica-field::after {
    content: '';
    position: absolute;
    left: 32%;
    right: 32%;
    height: 12%;
    border: 2px solid rgba(255, 255, 255, .28);
}

.escalacao-tatica-field::before {
    top: 0;
    border-top: 0;
}

.escalacao-tatica-field::after {
    bottom: 0;
    border-bottom: 0;
}

.escalacao-tatica-dot {
    position: absolute;
    z-index: 2;
    transform: translate(-50%, -50%);
    display: inline-flex;
    flex-direction: column;
    gap: .1rem;
    align-items: center;
    justify-content: center;
    min-width: 3.15rem;
    max-width: 4.6rem;
    min-height: 2rem;
    padding: .25rem .4rem;
    border: 1px solid rgba(125, 211, 252, .42);
    border-radius: .55rem;
    background: rgba(15, 23, 42, .86);
    color: #e0f2fe;
    font-size: .58rem;
    font-weight: 900;
    line-height: 1;
    text-align: center;
    box-shadow: 0 .35rem .8rem rgba(0, 0, 0, .32);
    cursor: pointer;
}

.escalacao-tatica-dot span,
.escalacao-tatica-dot small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.escalacao-tatica-dot small {
    color: #bbf7d0;
    font-size: .53rem;
    font-weight: 800;
    text-transform: none;
}

.escalacao-tatica-dot--vazio {
    border-color: #ef4444;
    background: rgba(127, 29, 29, .88);
    color: #fee2e2;
    box-shadow: 0 .35rem .8rem rgba(0, 0, 0, .32), 0 0 0 3px rgba(239, 68, 68, .38);
}

.escalacao-tatica-dot--vazio small {
    color: #fecaca;
}

.escalacao-tatica-dot--suspenso {
    border-color: rgba(239, 68, 68, .55);
    box-shadow: 0 .35rem .8rem rgba(0, 0, 0, .32), 0 0 0 2px rgba(239, 68, 68, .25);
}

.escalacao-tatica-dot--suspenso small {
    color: #fca5a5;
}

/* Lesionado: card fica visivelmente avermelhado, nao so a borda. */
.escalacao-tatica-dot--lesionado {
    background: rgba(127, 29, 29, .55);
    border-color: rgba(239, 68, 68, .65);
    box-shadow: 0 .35rem .8rem rgba(0, 0, 0, .32), 0 0 0 2px rgba(239, 68, 68, .3);
}

.escalacao-tatica-dot--lesionado small {
    color: #fecaca;
}

/* Selo de status (cartao/lesao) no canto inferior direito do card. */
.escalacao-tatica-dot__status {
    position: absolute;
    right: -.3rem;
    bottom: -.3rem;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, .9);
}

.escalacao-tatica-dot__status--card {
    width: .68rem;
    height: .92rem;
    border-radius: .12rem;
    background: #dc2626;
    box-shadow: 0 0 0 2px rgba(15, 23, 42, .9), 0 1px 3px rgba(0, 0, 0, .5);
}

.escalacao-tatica-dot__status--med {
    background: #f59e0b;
    color: #1a1105;
    font-size: .5rem;
}

.escalacao-tatica-list {
    display: grid;
    gap: .5rem;
    max-height: 42vh;
    overflow: auto;
    padding-right: .15rem;
}

.escalacao-tatica-row {
    display: grid;
    grid-template-columns: minmax(4.75rem, .55fr) minmax(0, 1.25fr) minmax(7.5rem, .75fr);
    gap: .5rem;
    align-items: center;
    padding: .55rem;
    border: 1px solid rgba(63, 63, 70, .9);
    border-radius: .65rem;
    background: rgba(24, 24, 27, .72);
}

.escalacao-tatica-row__slot {
    min-width: 0;
}

.escalacao-tatica-row__slot strong,
.escalacao-tatica-row__slot span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.escalacao-tatica-row__slot strong {
    color: #f4f4f5;
    font-size: .72rem;
    font-weight: 900;
}

.escalacao-tatica-row__slot span {
    margin-top: .15rem;
    color: #a1a1aa;
    font-size: .62rem;
    text-transform: uppercase;
}

.escalacao-tatica-player,
.escalacao-tatica-role {
    min-width: 0;
    width: 100%;
    border: 1px solid #3f3f46;
    border-radius: .55rem;
    background: #09090b;
    color: #f4f4f5;
    font-size: .78rem;
    font-weight: 700;
    padding: .5rem .6rem;
}

.escalacao-tatica-player {
    display: grid;
    gap: .1rem;
    text-align: left;
    cursor: pointer;
}

.escalacao-tatica-player strong,
.escalacao-tatica-player span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.escalacao-tatica-player strong {
    font-size: .78rem;
}

.escalacao-tatica-player span {
    color: #a1a1aa;
    font-size: .65rem;
}

.escalacao-tatica-picker {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: grid;
    place-items: center;
    padding: 1rem;
    padding-bottom: 50px;
    background: rgba(0, 0, 0, .68);
}

.escalacao-tatica-picker__dialog {
    display: flex;
    flex-direction: column;
    width: min(92vw, 24rem);
    max-height: min(80vh, 38rem);
    overflow: hidden;
    border: 1px solid rgba(63, 63, 70, .95);
    border-radius: .9rem;
    background: #18181b;
    box-shadow: 0 1.5rem 4rem rgba(0, 0, 0, .55);
}

.escalacao-tatica-picker__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .8rem .9rem;
    border-bottom: 1px solid rgba(63, 63, 70, .9);
    background: rgba(39, 39, 42, .7);
}

.escalacao-tatica-picker__head strong,
.escalacao-tatica-picker__head span {
    display: block;
}

.escalacao-tatica-picker__head strong {
    color: #f4f4f5;
    font-size: .9rem;
    font-weight: 900;
}

.escalacao-tatica-picker__head span {
    margin-top: .1rem;
    color: #a1a1aa;
    font-size: .68rem;
    font-weight: 800;
}

.escalacao-tatica-picker__head button {
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border: 1px solid rgba(82, 82, 91, .9);
    border-radius: .55rem;
    color: #d4d4d8;
    background: #09090b;
}

.escalacao-tatica-picker__roles {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding: .7rem;
    border-bottom: 1px solid rgba(63, 63, 70, .75);
    background: rgba(9, 9, 11, .35);
}

.escalacao-tatica-picker__roles span {
    flex-basis: 100%;
    color: #a1a1aa;
    font-size: .65rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.escalacao-tatica-picker__roles button {
    padding: .42rem .55rem;
    border: 1px solid rgba(63, 63, 70, .95);
    border-radius: 999px;
    background: rgba(24, 24, 27, .82);
    color: #d4d4d8;
    font-size: .68rem;
    font-weight: 850;
}

.escalacao-tatica-picker__roles button.is-selected {
    border-color: rgba(16, 185, 129, .7);
    background: rgba(16, 185, 129, .16);
    color: #bbf7d0;
}

.escalacao-tatica-picker__list {
    display: grid;
    flex: 1;
    gap: .45rem;
    min-height: 0;
    overflow: auto;
    padding: .7rem;
}

.escalacao-tatica-picker__list button {
    display: grid;
    gap: .12rem;
    width: 100%;
    padding: .65rem .7rem;
    border: 1px solid rgba(63, 63, 70, .9);
    border-radius: .65rem;
    color: #e4e4e7;
    background: rgba(9, 9, 11, .72);
    text-align: left;
}

.escalacao-tatica-picker__list button.is-selected {
    border-color: rgba(16, 185, 129, .65);
    background: rgba(16, 185, 129, .12);
}

.escalacao-tatica-picker__list strong,
.escalacao-tatica-picker__list span {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.escalacao-tatica-picker__list strong {
    font-size: .82rem;
    font-weight: 900;
}

.escalacao-tatica-picker__list span,
.escalacao-tatica-picker__empty {
    color: #a1a1aa;
    font-size: .7rem;
}

.escalacao-tatica-picker__empty {
    padding: 1rem;
    text-align: center;
}

.escalacao-tatica-picker__foot {
    padding: .7rem;
    border-top: 1px solid rgba(63, 63, 70, .9);
    background: rgba(39, 39, 42, .5);
}

.escalacao-tatica-picker__foot button {
    width: 100%;
    padding: .65rem;
    border-radius: .6rem;
    font-size: .82rem;
    font-weight: 900;
}

.escalacao-tatica-picker__foot button:disabled {
    opacity: .45;
    cursor: not-allowed;
}

@media (max-width: 520px) {
    .escalacao-tatica-field {
        min-height: 25rem;
    }

    .escalacao-tatica-row {
        grid-template-columns: 1fr;
    }
}

/* Lista de reservas do editor de escalacao */
.escalacao-reservas-lista {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    min-height: 2.25rem;
}

.escalacao-reserva-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .3rem .3rem .55rem;
    border: 1px solid #3f3f46;
    border-radius: 999px;
    background: rgba(24, 24, 27, .8);
    font-size: .72rem;
    color: #e4e4e7;
}

.escalacao-reserva-chip b {
    color: #a1a1aa;
    font-weight: 800;
    font-size: .62rem;
    text-transform: uppercase;
}

.escalacao-reserva-chip [data-remover-reserva] {
    display: grid;
    place-items: center;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 999px;
    color: #a1a1aa;
    font-size: .6rem;
}

.escalacao-reserva-chip [data-remover-reserva]:hover {
    background: rgba(239, 68, 68, .18);
    color: #fca5a5;
}

.escalacao-reserva-add {
    margin-top: .6rem;
    padding: .45rem .8rem;
    border: 1px dashed #52525b;
    border-radius: .6rem;
    font-size: .78rem;
    font-weight: 700;
    color: #a1a1aa;
}

.escalacao-reserva-add:hover {
    border-color: #71717a;
    color: #e4e4e7;
}
