/* INBRADE · Sistema de gestão · o que o sistema real acrescenta ao desenho (app.css) */

/* fotos reais: sempre inteiras, em moldura de retrato (3 por 4), sem recorte */
img.foto { width: 30px; height: 40px; border-radius: 7px; object-fit: contain; background: #E7E3D6; }
img.foto.sm { width: 24px; height: 32px; border-radius: 6px; }
img.foto.lg { width: 54px; height: 72px; border-radius: 10px; }
img.foto.xl { width: 84px; height: 112px; border-radius: 12px; }
.avatar.xl { width: 76px; height: 76px; border-radius: 16px; font-size: 24px; }
.foto__abre { display: block; flex: none; line-height: 0; cursor: zoom-in; }
.side__eu img.foto { width: 27px; height: 36px; }
.top__perfil img.foto { width: 21px; height: 28px; }
.ficha__topo { gap: 14px; align-items: center; }
.ficha__topo h1 { font-size: 24px; }
.ficha__topo p .faixa { vertical-align: middle; }
.ficha__nota { margin-top: 14px; }
.ficha__sub { margin-top: 20px; }
.page__head .small a { font-weight: 600; }
.page__acoes form { display: contents; }

/* topo e menu */
.top__onde { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13.5px; color: var(--muted); min-width: 0; white-space: nowrap; }
.side__sair { margin: 4px 0 0; }
.side__sair button { width: 100%; background: none; border: 0; text-align: left; font-family: inherit; cursor: pointer; }
.navm--3 { grid-template-columns: repeat(3, 1fr) !important; }
.navm--4 { grid-template-columns: repeat(4, 1fr) !important; }

/* avisos */
.aviso--ok { background: var(--ok-bg); color: var(--ok); }
.aviso--erro { background: var(--bad-bg); color: var(--bad); }

/* filtros de verdade */
.filtros--abas { margin-bottom: 10px; }
.filtros--form { margin-bottom: 16px; }
label.campo { cursor: text; }
label.campo input { border: 0; background: none; font: inherit; color: var(--text); width: 100%; min-width: 0; outline: none; padding: 0; }
label.campo:focus-within { outline: 2px solid var(--amarelo); outline-offset: 1px; }
.filtros select { appearance: none; -webkit-appearance: none; border: 1px solid var(--line); background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%238F8B80' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  border-radius: 99px; min-height: 34px; padding: 0 30px 0 13px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); max-width: 100%; cursor: pointer; }
.filtros select:has(option:checked:not([value=""])) { background-color: var(--ink); border-color: var(--ink); color: #fff; }
a.chip { color: var(--muted); } a.chip.is-on { color: #fff; }

/* tabela que ordena ao clicar no título */
.tabela--ordena th a { color: inherit; display: inline-block; padding: 4px 0; }
.tabela--ordena th[aria-sort] a { color: var(--ink); }
.tabela td.quebra, .quebra { white-space: normal; overflow-wrap: anywhere; }
.tabela td.quebra { min-width: 190px; max-width: 420px; }
.tabela td small { font-size: 12.5px; }
.tabela-wrap--topo { margin-top: -8px; }
.lista__pe { margin-top: 34px; } .lista__pe a { font-weight: 600; color: var(--amarelo-esc); }
.vazio__lista { padding: 18px 0 4px; }

.so-m { display: none; }

/* escolha de adversário e resultado ao anotar luta */
.escolhas { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px 14px; margin: 0; display: grid; gap: 4px; min-width: 0; }
.escolhas legend { font-size: 13px; font-weight: 700; color: var(--text); padding: 0 6px; }
.escolhas.tem-erro { border-color: var(--bad); }
.form label.escolha { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; font-weight: 400; color: var(--text); cursor: pointer; }
.form label.escolha:hover, .form label.escolha:has(input:checked) { background: var(--amarelo-bg); }
.form label.escolha input { width: 18px; height: 18px; min-height: 0; flex: none; accent-color: var(--ink); }
.form__linha { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.form__linha input[type] { flex: 1 1 200px; }
.filtro__de { margin: -6px 0 14px; }
.sec__acao { font-weight: 700; color: var(--amarelo-esc); }
.sec span a { font-weight: 600; color: var(--amarelo-esc); }
form.em-linha { display: inline; }
button.link { background: none; border: 0; padding: 0; font: inherit; font-size: 12.5px; color: var(--muted); text-decoration: underline; cursor: pointer; }
a.pessoa:hover b { text-decoration: underline; }

/* indicador com texto no lugar do número (nome da categoria) */
.kpi--texto > b { font-size: 21px; white-space: normal; line-height: 1.2; letter-spacing: -.02em; }
.kpi--texto > em .badge { margin-top: 3px; }

/* abas da ficha: uma seção por vez */
[data-painel] { display: grid; gap: 22px; min-width: 0; }
[data-painel][hidden] { display: none; }
.sub a small { font-weight: 600; color: var(--soft); margin-left: 3px; }

/* aba Competições: cada competição abre e mostra os adversários e o registro de luta */
.comps { display: grid; gap: 10px; }
.comp { padding: 0; overflow: hidden; }
.comp > summary { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 14px; align-items: center; padding: 14px 18px; cursor: pointer; list-style: none; }
.comp > summary::-webkit-details-marker { display: none; }
.comp > summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--soft); border-bottom: 2px solid var(--soft); transform: rotate(45deg); margin: 0 4px 4px; }
.comp[open] > summary::after { transform: rotate(-135deg); margin: 4px 4px 0; }
.comp[open] > summary { border-bottom: 1px solid var(--line-2); }
.comp__t { min-width: 0; } .comp__t b { display: block; font-size: 14.5px; line-height: 1.3; } .comp__t small { color: var(--muted); font-size: 12.5px; }
.comp__corpo { padding: 16px 18px 18px; display: grid; gap: 16px; }
.comp__corpo h4 { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.form__grade.form__grade--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.comp__form { background: var(--paper); border-radius: var(--r-sm); padding: 14px; }
.advs--mini { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.advs--mini .adv { padding: 10px; gap: 10px; align-items: center; border-radius: var(--r-sm); }
.advs--mini .adv b { font-size: 13.5px; display: block; line-height: 1.25; } .advs--mini .adv small { color: var(--muted); font-size: 12px; display: block; }

/* gráfico de peso por categoria */
.gr--peso .gr__area { margin-right: 8px; } .gr--peso .gr__x { margin-right: 8px; }
.gr__faixas { position: absolute; inset: 0; overflow: hidden; }
.gr__faixas i { position: absolute; background: rgba(235, 104, 52, .13); border-top: 2px solid #eb6834; border-bottom: 1px dashed rgba(235, 104, 52, .55); }
.gr__faixas i.sem-teto { border-top: 0; } .gr__faixas i.sem-piso { border-bottom: 0; }
.gp--p { width: 7px; height: 7px; box-shadow: 0 0 0 1px var(--card); }

/* dossiê dos adversários de uma competição por vir */
.dossie { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.dossie .adv { align-items: flex-start; padding: 14px; gap: 12px; }
.dossie .adv b { font-size: 15px; line-height: 1.25; display: block; }
.dossie .adv small { color: var(--muted); font-size: 12.5px; display: block; }
.dossie__n { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.dossie .adv.saiu { opacity: .55; }
.prox__atletas { display: grid; gap: 0; }
.prox__atletas a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-2); min-width: 0; }
.prox__atletas a:last-child { border-bottom: 0; padding-bottom: 0; }
.prox__atletas a > span:last-child { flex: none; }

/* medalhas */
.medalha { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.medalha::before { content: ""; width: 12px; height: 12px; border-radius: 50%; background: var(--m); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .18); }
.m1 { --m: #eda100; } .m2 { --m: #b9bec5; } .m3 { --m: #b8672e; }

/* formulários */
.form { display: grid; gap: 14px; }
.form--larga { max-width: 760px; }
.form__grade { display: grid; gap: 14px 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form label { display: grid; gap: 5px; font-size: 13px; font-weight: 600; color: var(--muted); min-width: 0; }
.form input[type], .form select { font: inherit; font-size: 15px; font-weight: 400; color: var(--text); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-sm); min-height: 44px; padding: 8px 12px; width: 100%; min-width: 0; }
.form input:focus, .form select:focus { outline: 2px solid var(--amarelo); outline-offset: 1px; border-color: var(--ink); }
.form input[readonly] { background: var(--paper); font-size: 13.5px; }
.form .tem-erro input, .form .tem-erro select { border-color: var(--bad); }
.form .erro { color: var(--bad); font-weight: 600; font-size: 12.5px; }
.form__fim { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.form__fim--esq { justify-content: flex-start; }
.def__larga { grid-column: 1 / -1; }
.btn-cheio { width: 100%; min-height: 48px; font-size: 15px; }
button.btn { font-family: inherit; cursor: pointer; }

/* ação recolhida dentro de um cartão (saída e retorno do atleta) */
.acao { margin-top: 16px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.acao summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--amarelo-esc); list-style: none; }
.acao summary::-webkit-details-marker { display: none; }
.acao[open] summary { margin-bottom: 12px; }

/* páginas de fora (entrada) e telas vazias */
body.fora { background: var(--ink); display: grid; min-height: 100vh; min-height: 100dvh; place-items: center; padding: 24px 16px; }
.fora__caixa { width: min(440px, 100%); display: grid; gap: 22px; justify-items: center; }
.fora__logo { height: 26px; width: auto; }
.fora__card { width: 100%; display: grid; gap: 14px; padding: 26px 22px; }
.fora__card h1 { font-size: 22px; }
.fora__quem { gap: 14px; }
.fora__pe { color: #8D8A80; font-size: 12.5px; text-align: center; }
.vazio { display: grid; gap: 12px; justify-items: start; max-width: 560px; }
.vazio h1 { font-size: 22px; }

@media (max-width: 900px) {
  .form__grade, .form__grade--3 { grid-template-columns: minmax(0, 1fr); }
  .comp > summary { grid-template-columns: minmax(0, 1fr) auto; padding: 12px 14px; } .comp__c { display: none; }
  .comp__corpo { padding: 14px; }
  img.foto.xl { width: 66px; height: 88px; }
  .filtros--form .campo { flex: 1 1 100%; }
  .filtros--form select { flex: 1 1 calc(50% - 4px); }
  .filtros--abas { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -16px; margin-right: -16px; padding: 0 16px; }
  .filtros--abas::-webkit-scrollbar { display: none; }
  .ficha__topo h1 { font-size: 20px; }
  .foto.xl, .avatar.xl { width: 60px; height: 60px; }
  .tabela td.quebra { min-width: 150px; }
  .form__fim .btn { flex: 1 1 auto; }
  .so-m { display: block; margin-top: 4px; }
  .tabela td:first-child, .tabela .pessoa b { white-space: normal; }
  .tabela .pessoa { align-items: flex-start; }
}

/* fotos maiores nos cartões, para chamar a atenção */
img.foto { width: 36px; height: 48px; }
img.foto.sm { width: 27px; height: 36px; }
img.foto.lg { width: 66px; height: 88px; border-radius: 10px; }
img.foto.xl { width: 96px; height: 128px; border-radius: 12px; }
.adv img.foto.lg { width: 84px; height: 112px; }
.advs--mini img.foto { width: 48px; height: 64px; border-radius: 8px; }
.dossie img.foto.xl { width: 108px; height: 144px; }
.side__eu img.foto { width: 27px; height: 36px; } .top__perfil img.foto { width: 21px; height: 28px; }
@media (max-width: 900px) { img.foto.xl { width: 78px; height: 104px; } .dossie img.foto.xl { width: 90px; height: 120px; } }

/* dossiê: cartões largos o bastante para foto grande e texto que quebra em vez de vazar */
.dossie { grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); }
.dossie .adv__c, .advs .adv__c { min-width: 0; flex: 1; }
.dossie .adv b, .dossie .adv small, .advs .adv b, .advs .adv small { white-space: normal; overflow-wrap: anywhere; }
.dossie .badge { white-space: normal; text-align: left; border-radius: 10px; line-height: 1.3; }
.kpi--hero.kpi--texto > b { font-size: 22px; }

.advs--mini .adv > span { min-width: 0; }
.advs--mini .badge { white-space: normal; }
