/* Gestão 360º Poker: complementos do style.css (ficha do jogador, contratos, fechamentos). */
.ic { vertical-align: -3px; flex: none; }
.topbar .btn { display: inline-flex; align-items: center; gap: 6px; }
.num, td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pos { color: #067647; } .neg { color: var(--danger); }
.icon-box { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: #111; color: #C9A227; flex: none; }
.ptabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin: 6px 0 14px; }
.ptabs button { border: 0; background: none; padding: 9px 12px; font: inherit; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; cursor: pointer; }
.ptabs button.active { color: var(--ink); border-bottom-color: var(--gold, #C9A227); }
.pf-head { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.pf-head h2 { margin: 0; }
.kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px 18px; }
.kv div { font-size: 14px; } .kv span { display: block; font-size: 12px; color: var(--muted); }
.fs { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0; }
.fs legend { font-weight: 700; font-size: 13px; padding: 0 6px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.calc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.calc-table td { padding: 6px 4px; border-bottom: 1px solid var(--line); }
.calc-table tr.total td { font-weight: 800; border-top: 2px solid var(--ink); }
.contract-body { white-space: pre-wrap; font-family: Georgia, 'Times New Roman', serif; font-size: 14px; line-height: 1.6; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px; max-height: 50vh; overflow: auto; }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding: 6px 0; }
.bars .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; min-width: 0; height: 100%; position: relative; }
.bars .bar i { display: block; width: 100%; border-radius: 4px 4px 0 0; background: #C9A227; min-height: 2px; }
.bars .bar i.neg { background: #d92d20; }
.bars .bar small { font-size: 10px; color: var(--muted); white-space: nowrap; }
.quota-row { display: grid; grid-template-columns: 1.2fr 1.6fr 110px 36px; gap: 6px; align-items: center; margin-bottom: 6px; }
.bk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 12px; }
.bk-leg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.bk-leg div { background: #f7f7f5; border-radius: 10px; padding: 8px 10px; }
.bk-leg span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.bk-leg b { font-size: 15px; }
.cx-table input[disabled] { opacity: .45; }
.ev-card { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: start; }
.ev-date { text-align: center; background: #111; color: #C9A227; border-radius: 10px; padding: 6px 0; font-weight: 800; line-height: 1.1; }
.ev-date small { display: block; color: #fff; font-weight: 600; font-size: 11px; text-transform: uppercase; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.chat { display: grid; gap: 8px; max-height: 50vh; overflow-y: auto; padding: 4px; }
.chat .msg { padding: 8px 12px; border-radius: 12px; background: #f2f2ef; max-width: 85%; white-space: pre-wrap; font-size: 14px; }
.chat .msg.me { background: #111; color: #fff; justify-self: end; }
.chat .msg small { display: block; opacity: .65; font-size: 11px; margin-top: 2px; }
/* Torneios: blocos um embaixo do outro (tabelas largas não quebram), colunas que ordenam */
.tn-stack { display: grid; gap: 12px; }
.tn-stack .panel, .tn-stack .table-wrap { min-width: 0; }
.tn-table th, .tn-table td { white-space: nowrap; }
.tn-table td:nth-child(2) { white-space: normal; min-width: 160px; }
.tn-sort { cursor: pointer; user-select: none; }
.tn-sort:hover { color: var(--ink); text-decoration: underline; }
.tn-off td { background: #fef3f2; }
.tn-stats .stat b { font-size: 20px; word-break: break-word; }
.tn-bars { overflow-x: auto; }
.tn-bars .bar { min-width: 26px; }
@media (max-width: 560px) { .bk-leg { grid-template-columns: 1fr 1fr; } .bk-grid { grid-template-columns: 1fr; } }
textarea.input.tall { min-height: 320px; font-family: Georgia, serif; line-height: 1.5; }
@media (max-width: 900px) { .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } .quota-row { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* =====================================================================================
   Responsivo: todas as telas do Poker se ajustam a qualquer largura (celular, tablet, computador e telas grandes).
   Regras: nada passa da largura da tela; grades viram uma coluna quando falta espaço; botões, abas, selos e
   números não quebram no meio; tabelas largas rolam para o lado dentro do próprio bloco.
   ===================================================================================== */
html, body { max-width: 100%; overflow-x: clip; } /* clip (e não hidden) para não atrapalhar o topo e o menu fixos */
img, video, canvas { max-width: 100%; height: auto; }
.input, select.input, textarea.input { max-width: 100%; min-width: 0; }
.row > *, .page-head > *, .grid-2 > *, .grid-3 > *, .grid-4 > *, .grid-cols > *, .kv > *, .stats > *, .bk-grid > *, .mk-grid > * { min-width: 0; }

/* textos: só palavras que não cabem (e-mails, links, códigos) quebram; o resto quebra entre palavras */
body { overflow-wrap: break-word; }
.btn, .badge, .tab, .seg-inline button, .ptabs button, table.data th, td.num, th.num, .num, .g-nav button, .topbar > * { white-space: nowrap; overflow-wrap: normal; }
.badge { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }

/* grades que se ajustam sozinhas: tantas colunas quanto couberem, uma coluna no celular */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); }
.grid-cols { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.kv { grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); }
.bk-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.mk-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr)); }
.bk-leg { grid-template-columns: repeat(auto-fit, minmax(min(100%, 110px), 1fr)); }

/* cartões de números: o valor fica numa linha e diminui um pouco em telas pequenas */
.stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr)) !important; }
/* o número acompanha a largura do próprio cartão (nunca fica cortado nem desproporcional) */
.stat { container-type: inline-size; }
.stat b { font-size: clamp(15px, 10cqi, 24px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat span, .stat small { overflow-wrap: break-word; }
/* valor com sinal (+/−) dentro do número grande: mesmo tamanho e fonte do número, cor verde/vermelha */
.stat b span { font: inherit !important; letter-spacing: inherit !important; text-transform: none !important; color: inherit; }
.stat b span.neg { color: var(--danger) !important; }
.stat b span.pos { color: #067647 !important; }
.bk-leg b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }

/* abas e botões de escolha: uma linha só, rolando para o lado quando não cabem */
.ptabs, .seg-inline, .tabs { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
.ptabs button, .seg-inline button, .tabs .tab { flex: none; }
.seg-inline { display: inline-flex; }

/* tabelas: sempre dentro do bloco; a tabela larga rola para o lado sem empurrar a página */
.table-wrap { max-width: 100%; }
.panel > table.data, .bk-card table.data { display: block; overflow-x: auto; max-width: 100%; }
table.data th { vertical-align: bottom; }
.calc-table td:last-child { white-space: nowrap; }

/* títulos proporcionais à tela */
.page-head h2, .pf-head h2 { font-size: clamp(18px, 1.2vw + 13px, 22px); line-height: 1.25; }
.page-head { row-gap: 8px; }

/* janelas (modais): ocupam a tela do celular sem cortar */
.modal { max-width: min(480px, 100%); }
.modal[style*="720px"] { max-width: min(760px, 100%) !important; }
.modal-foot { flex-wrap: wrap; }
.modal-foot .btn { flex: 0 1 auto; }

/* listas com texto e ação: a ação vai para baixo quando falta espaço */
.list-plain li { flex-wrap: wrap; }

/* telas grandes: conteúdo centralizado com largura confortável */
@media (min-width: 1700px) { .g-main { max-width: 1700px; margin: 0 auto; } }

/* tablet */
@media (max-width: 900px) {
  .g-main { padding: 16px; }
  .pf-head { gap: 10px; }
}
/* celular */
@media (max-width: 700px) {
  .page-head { align-items: stretch; }
  .page-head > h2 { flex: 1 1 100%; }
  .page-head > .spacer { display: none; }
  .page-head > .input, .page-head > select.input, .page-head > input.input { width: 100% !important; flex: 1 1 100%; }
  .page-head > .btn { flex: 1 1 auto; }
  .row > .input, .row > select.input { flex: 1 1 140px; width: auto !important; }
  .row > label.row { flex: 1 1 100%; }
  .row > label.row .input { flex: 1; width: auto !important; }
  .pf-head > .row { width: 100%; }
  .pf-head > .row .btn { flex: 1 1 auto; }
  .g-main { padding: 12px; }
  .panel { padding: 12px; }
  .modal-bg { padding: 8px; align-items: start; }
  .modal { max-height: calc(100vh - 16px); }
  .modal-body { padding: 14px; }
  .ev-card { grid-template-columns: 52px 1fr; }
  .ev-card > :last-child { grid-column: 1 / -1; }
  .quota-row { grid-template-columns: 1fr 1fr; }
  .quota-row [data-qp] { grid-column: 1; }
  /* números em duas colunas no celular (sem desperdiçar a tela) */
  .stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 140px), 1fr)) !important; gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat b { font-size: clamp(14px, 10.5cqi, 20px); }
  .topbar { gap: 6px; padding-left: 10px; padding-right: 10px; }
  .topbar .badge { display: none; }
  .chat .msg { max-width: 92%; }
  .bars .bar small { font-size: 9px; }
}
/* cartão com frase (não número): quebra entre palavras normalmente */
.stat b.stat-txt { white-space: normal; font-size: 15px !important; line-height: 1.3; overflow: visible; }
/* legendas da banca: o valor acompanha a largura de cada quadradinho */
.bk-leg div { container-type: inline-size; }
.bk-leg b { font-size: clamp(12px, 11.5cqi, 16px); }
.bk-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.bk-leg { grid-template-columns: repeat(auto-fit, minmax(min(100%, 130px), 1fr)); }
.bk-leg b { font-size: clamp(13px, 12cqi, 17px); }

/* sem permissão de ver valores: colunas de dinheiro somem */
body.sem-valores .val { display: none !important; }

/* pesquisa geral no topo e filtro "nesta tela" */
.gsearch { position: relative; flex: 0 1 260px; min-width: 120px; }
.gsearch .input { width: 100%; height: 32px; padding: 4px 10px; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.2); color: #fff; }
.gsearch .input::placeholder { color: rgba(255,255,255,.6); }
.gs-res { position: absolute; top: calc(100% + 6px); right: 0; width: min(420px, calc(100vw - 20px)); max-height: 70vh; overflow-y: auto; background: var(--card, #fff); color: var(--text, #111); border: 1px solid var(--line, #ddd); border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.18); z-index: 60; padding: 4px; }
.gs-res button { display: grid; grid-template-columns: auto 1fr; gap: 0 8px; width: 100%; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; color: inherit; white-space: normal; }
.gs-res button:hover, .gs-res button:focus { background: rgba(201,162,39,.12); }
.gs-res button .small { grid-column: 2; }
.gs-res .gs-type { grid-row: span 2; font-size: 11px; color: #8a6d12; background: rgba(201,162,39,.14); border-radius: 6px; padding: 2px 6px; align-self: start; white-space: nowrap; }
.gs-res b { overflow-wrap: anywhere; }
.sec-filter { width: min(220px, 100%); }
.filtro-fora { display: none !important; }
@media (max-width: 700px) {
  .gsearch { flex: 1 1 auto; min-width: 70px; }
  .sec-filter { width: 100%; order: 5; }
}
/* topo com a pesquisa: nada passa da largura (a cotação e a pesquisa encolhem; textos secundários somem antes) */
.topbar { min-width: 0; }
.topbar > * { flex-shrink: 0; }
.topbar .brand { min-width: 0; flex-shrink: 1; overflow: hidden; }
.topbar .brand #tname { overflow: hidden; text-overflow: ellipsis; }
.topbar .gsearch { flex: 0 1 240px; min-width: 90px; }
.topbar #rate-btn { flex-shrink: 1; min-width: 40px; max-width: 360px; overflow: hidden; }
.topbar #rate-txt { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1280px) { .topbar .who { display: none; } }
@media (max-width: 1000px) { .topbar #rate-txt { display: none; } }
@media (max-width: 600px) { .topbar .gsearch { min-width: 60px; } .topbar .brand-logo + #tname { display: none; } }
/* a barra do topo rola para o lado (style.css): a lista da pesquisa fica fixa na tela para não ser cortada */
.gs-res { position: fixed; top: 64px; right: auto; }
/* celular: logo sempre visível; "Suporte" só com o ícone e "Minha senha" vira "Senha" para tudo caber */
@media (max-width: 600px) {
  .topbar .brand { flex-shrink: 0; }
  .topbar #support-btn { font-size: 0; gap: 0 !important; padding-left: 8px; padding-right: 8px; }
  .topbar #my-pass { font-size: 0; }
  .topbar #my-pass::before { content: 'Senha'; font-size: 12px; }
}
/* faixa da demonstração (só na versão demo) */
.demo-faixa { position: fixed; left: 0; right: 0; bottom: 0; z-index: 70; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 16px; background: #111; color: #fff; font-size: 13px; border-top: 2px solid #C9A227; }
.demo-faixa a { color: #C9A227; font-weight: 600; text-decoration: none; white-space: nowrap; }
.demo-faixa a.sair { color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; padding: 3px 10px; }
body.com-demo { padding-bottom: 64px; }
@media (max-width: 600px) { .demo-faixa { font-size: 12px; padding: 6px 10px; } .demo-faixa .spacer { display: none; } body.com-demo { padding-bottom: 84px; } }
