/* ==========================================================================
   MITIC FUT — melhorias visuais (14/10/2026): navegação agrupada, cores do clube, destaque da
   partida, chaveamento, elenco por setor, gráficos, carta do jogador, pódio, estados vazios e acessibilidade
   ========================================================================== */
/* Escudos sempre legíveis no fundo preto */
.crest-plate { display: inline-grid; place-items: center; border-radius: 50%; background: #EDEBE6; padding: 12%; box-sizing: border-box; flex-shrink: 0; vertical-align: middle; }
.crest-plate img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* Sobras da paleta antiga: cor só quando o jogo pede */
.tie .w { color: var(--text-primary); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.badge.green { background: transparent; border-color: var(--border-strong); color: var(--text-primary); }
.badge.live { background: transparent; border-color: var(--text-primary); color: var(--text-primary); gap: 6px; }
.badge.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.4s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.presence { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 6px; }
.presence::before { content: ""; width: 7px; height: 7px; border-radius: 50%; border: 1px solid currentColor; }
.presence.on { color: var(--text-primary); }
.presence.on::before { background: currentColor; }

/* Cabeçalho: faixa nas cores do clube (único acento por técnico) */
#career-head { position: relative; padding-top: 10px; }
.club-stripe { height: 4px; margin-bottom: 14px; background: linear-gradient(90deg, var(--c1) 0 50%, var(--c2) 50% 100%); }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; }
.menu > summary::-webkit-details-marker { display: none; }
.menu-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 200px; padding: 8px; background: #0e0e0e; border: 1px solid var(--border-strong); border-radius: var(--radius-md); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7); display: grid; gap: 6px; }

/* Navegação em grupos */
.nav-groups { margin: 14px 0 16px; }
.tabs-groups { border-bottom: 1px solid var(--border-subtle); }
.tabs-sub { margin-top: 0; padding-top: 6px; border-bottom: none; }
.tabs-sub .tab { font-size: 0.8rem; padding: 7px 12px; border-radius: 999px; border: 1px solid transparent; }
.tabs-sub .tab.active { background: transparent; color: var(--text-primary); border-color: var(--border-strong); }
.tabs { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; }
.tabs::-webkit-scrollbar { display: none; }

/* Carregamento com esqueleto e transição entre abas */
.skeleton { display: grid; gap: 14px; }
.sk { background: linear-gradient(90deg, #0f0f0f 0%, #1a1a1a 50%, #0f0f0f 100%); background-size: 200% 100%; border-radius: var(--radius-lg); animation: shimmer 1.2s linear infinite; }
.sk-title { height: 30px; width: 34%; }
.sk-card { height: 160px; }
.sk-wide { height: 220px; }
.sk-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.tab-enter { animation: tab-in 260ms cubic-bezier(.2, .9, .1, 1) both; }
@keyframes tab-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Painel: partida em destaque */
.match-hero { padding: 22px; }
.match-hero .scoreboard .big { font-size: 3rem; }
.next-match { padding: 18px 0 6px; }
.next-match .team { display: grid; justify-items: center; gap: 8px; font-family: var(--font-sports); font-weight: 900; font-size: 1.6rem; text-transform: uppercase; }
.next-match .vs { font-family: var(--font-mono); font-size: 2rem; color: var(--text-muted); }
.crest-xl { display: grid; place-items: center; }
.res-sum { cursor: pointer; padding: 6px 0; font-weight: 700; }

/* Estados vazios desenhados */
.empty-art { display: flex; align-items: center; gap: 22px; padding: 18px 6px; }
.empty-art-ill { width: 92px; flex-shrink: 0; opacity: 0.85; }
.empty-art-ill svg { width: 100%; height: auto; display: block; }
.empty-art-title { font-family: var(--font-sports); font-weight: 900; font-size: 1.5rem; text-transform: uppercase; line-height: 1.05; }
.empty-art p { margin-top: 4px; font-size: 0.88rem; max-width: 46ch; }

/* Elenco: setores, mini-barras e tom do OVR */
.group-row td { background: #070707; font-family: var(--font-sports); font-weight: 900; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.04em; padding-top: 14px; }
.sticky-head { max-height: 72vh; overflow: auto; }
.sticky-head thead th { position: sticky; top: 0; background: #0b0b0b; z-index: 1; }
.bar-cell { white-space: nowrap; }
.mini-bar { display: inline-block; width: 46px; height: 5px; background: #262626; vertical-align: middle; margin-right: 6px; }
.mini-bar i { display: block; height: 100%; background: var(--text-primary); }
.mini-bar.warn i { background: var(--card-yellow, #F2C200); }
.mini-num { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-secondary); }
.ovr.t0 { background: #141414; color: #8c8c8c; }
.ovr.t1 { background: #1b1b1b; color: #b5b5b5; }
.ovr.t2 { background: #262626; color: #d6d6d6; }
.ovr.t3 { background: #3a3a3a; color: #fff; }
.ovr.t4 { background: #b5b5b5; color: #000; }
.ovr.t5 { background: #EDEBE6; color: #000; }

/* Ficha do jogador como carta impressa */
.player-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 18px; align-items: center; padding: 16px; margin: 4px 0 14px; background: #EDEBE6; color: #050505; border-radius: 4px; }
.player-card .muted, .player-card .kicker { color: #444; }
.player-card .screen-title { color: #050505; font-size: 2.4rem; }
.pc-ovr { display: grid; justify-items: center; padding-right: 16px; border-right: 2px solid #050505; }
.pc-num { font-family: var(--font-sports); font-weight: 900; font-size: 4rem; line-height: 0.9; }
.pc-pos { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.1em; }
.pc-sec { font-family: var(--font-mono); font-size: 0.7rem; color: #555; }
.player-card.is-legend { border: 3px solid #C9A227; }
@media (max-width: 560px) { .player-card { grid-template-columns: auto minmax(0, 1fr); } .pc-crest { display: none; } }

/* Competições: chaveamento */
.bracket { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(190px, 1fr); gap: 18px; overflow-x: auto; padding-bottom: 6px; }
.bk-col { display: flex; flex-direction: column; justify-content: space-around; gap: 10px; }
.bk-stage { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.bk-tie { border: 1px solid var(--border-medium); background: #0b0b0b; }
.bk-team { display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 6px 8px; font-size: 0.84rem; }
.bk-team + .bk-team { border-top: 1px solid var(--border-subtle); }
.bk-team.win { font-weight: 800; }
.bk-team.out { color: var(--text-muted); }
.bk-team.me { box-shadow: inset 3px 0 0 var(--text-primary); }
.bk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-note { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted); padding: 0 8px 4px; }
tr.upcoming td { color: var(--text-secondary); }

/* Mercado: atalhos e filtros avançados */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: transparent; color: var(--text-secondary); font-weight: 700; font-size: 0.8rem; cursor: pointer; }
.chip.on { background: var(--text-primary); color: #000; border-color: var(--text-primary); }
details.adv { grid-column: 1 / -1; }
details.adv > summary { cursor: pointer; color: var(--text-secondary); font-weight: 700; font-size: 0.86rem; }

/* Finanças: medidor e barras */
.meter .label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
.meter-track { position: relative; height: 10px; background: #1a1a1a; margin-top: 6px; }
.meter-track i { display: block; height: 100%; background: var(--text-primary); }
.meter.warn .meter-track i { background: var(--card-yellow, #F2C200); }
.meter.bad .meter-track i { background: var(--card-red, #D7261E); }
.meter.bad .num { color: var(--card-red, #D7261E); }
.hbar { display: grid; grid-template-columns: 160px minmax(0, 1fr) 100px; gap: 12px; align-items: center; padding: 5px 0; font-size: 0.86rem; }
.hbar-track { height: 10px; background: #141414; }
.hbar-track i { display: block; height: 100%; }
.hbar.rev .hbar-track i { background: var(--text-primary); }
.hbar.exp .hbar-track i, .legend i.exp { background: repeating-linear-gradient(135deg, #8c8c8c 0 3px, transparent 3px 6px); }
.hbar .num { text-align: right; }
.legend { font-size: 0.76rem; color: var(--text-muted); display: inline-flex; gap: 6px; align-items: center; }
.legend i { width: 14px; height: 8px; display: inline-block; }
.legend i.rev { background: var(--text-primary); }
.spark { width: 100%; height: 110px; display: block; margin-top: 6px; }
@media (max-width: 640px) { .hbar { grid-template-columns: 110px minmax(0, 1fr) 80px; } .sk-grid { grid-template-columns: 1fr; } }

/* Diretoria: medidor em arco */
.gauge { position: relative; width: 220px; margin: 10px auto 6px; color: var(--text-primary); text-align: center; }
.gauge.warn { color: var(--card-yellow, #F2C200); }
.gauge.bad { color: var(--card-red, #D7261E); }
.gauge svg { width: 100%; display: block; }
.gauge-num { position: absolute; left: 0; right: 0; bottom: 18px; font-family: var(--font-sports); font-weight: 900; font-size: 2.6rem; line-height: 1; color: var(--text-primary); }
.gauge-num span { font-size: 1rem; color: var(--text-muted); }
.gauge-label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); }

/* Ranking: pódio e estante de troféus */
.podium { display: grid; grid-template-columns: repeat(3, 1fr); align-items: end; gap: 10px; margin: 6px 0 16px; }
.pod { display: grid; justify-items: center; gap: 4px; text-align: center; }
.pod-who { font-size: 0.92rem; }
.pod-pts { font-family: var(--font-sports); font-weight: 900; font-size: 1.8rem; }
.pod-pts span { font-size: 0.9rem; color: var(--text-muted); }
.pod-block { width: 100%; display: grid; place-items: center; font-family: var(--font-sports); font-weight: 900; font-size: 1.6rem; color: #000; background: #EDEBE6; }
.pod-1 .pod-block { height: 92px; }
.pod-2 .pod-block { height: 64px; background: #b5b5b5; }
.pod-3 .pod-block { height: 44px; background: #8c8c8c; }
.shelf { padding: 8px 0; border-bottom: 1px solid var(--border-subtle); }
.shelf-who { font-weight: 700; margin-bottom: 6px; }
.shelf-row { display: flex; flex-wrap: wrap; gap: 10px; }
.cup { display: grid; justify-items: center; color: var(--gold-trophy, #C9A227); }
.cup small { font-family: var(--font-mono); font-size: 0.66rem; color: var(--text-muted); }

/* Início: cartões de carreira */
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: minmax(0, 1fr); } }
.career-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.career-card { display: grid; gap: 6px; text-align: left; padding: 16px; background: #0b0b0b; border: 1px solid var(--border-medium); color: var(--text-primary); cursor: pointer; border-radius: var(--radius-md); transition: border-color 160ms ease, transform 160ms ease; }
.career-card:hover { border-color: var(--text-primary); transform: translateY(-2px); }
.cc-code { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.14em; color: var(--text-muted); }
.cc-name { font-family: var(--font-sports); font-weight: 900; font-size: 1.6rem; text-transform: uppercase; line-height: 1.05; }
.cc-status { font-size: 0.8rem; color: var(--text-secondary); }
.cc-status.live { color: var(--text-primary); }
.cc-go { font-weight: 700; font-size: 0.84rem; margin-top: 4px; }

/* Acessibilidade: foco visível, rótulos legíveis, contraste do texto secundário */
:focus-visible { outline: 2px solid #EDEBE6; outline-offset: 2px; }
.btn:focus-visible, .tab:focus-visible, .chip:focus-visible { outline-offset: 3px; }
.stat .label, .kicker, th { font-size: max(0.72rem, 11px); }
.dim { color: #8f8f8f; }
@media (prefers-reduced-motion: reduce) { .tab-enter, .sk, .badge.live::before, .career-card { animation: none; transition: none; } }
.crest-plate img, .crest-plate .crest-img { width: 100% !important; height: 100% !important; max-width: 100%; max-height: 100%; filter: none !important; margin: 0 !important; }
.tab.active .badge { color: #000; border-color: #000; }
.tab.active .badge.live::before { background: #000; }
.club-hero .crest .crest-plate img, .club-line .crest .crest-plate img, .club-choice .crest .crest-plate img, .crest-xl .crest-plate img, .bk-team .crest .crest-plate img, .pc-crest .crest-plate img { width: 100% !important; height: 100% !important; }
.club-line .crest .crest-plate { width: 22px !important; height: 22px !important; }
.mini-bar { width: 32px; margin-right: 4px; }
.modal .player-card { margin-top: 26px; }
.cc-wrap { display: grid; gap: 6px; }
.cc-wrap .career-card { height: 100%; }
.cc-del { justify-self: start; }
