/* 📱 Celular premium (31/10/2026, ordem do master: "ajusta e melhora tudo de forma organizada premium").
   Grupo: gestao. Só vale no celular/tablet: tudo aqui dentro de @media (max-width: 768px).
   As classes gx-* são colocadas pelos componentes da gestão e não têm estilo nenhum no computador.
   Padrão: nome e texto na largura toda, ações numa fileira embaixo (alvo de 40px ou mais),
   números 2 por linha com o rótulo em cima, cantos de 12 a 14px e as cores dos tokens. */

@media (max-width: 768px) {

  /* ═══ 💰 FINANCEIRO ════════════════════════════════════════════════════════
     Os 8 números ficavam em 4 colunas e passavam da tela ("R$ 5.300" cortado).
     Agora são 2 por linha, rótulo em cima e valor embaixo, sem encavalar. */
  .gx-fin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; margin-bottom: 10px !important; }
  .gx-fin-kpis2 { margin-bottom: 16px !important; }
  .gx-fin-kpis .fin-card {
    min-width: 0; padding: 12px 14px; border-radius: 14px; text-align: left;
    display: flex; flex-direction: column; justify-content: space-between; gap: 6px;
  }
  .gx-fin-kpis .fin-label { font-size: 11.5px; line-height: 1.25; letter-spacing: .3px; color: var(--text-3); }
  .gx-fin-kpis .fin-value { margin-top: 0; font-size: 18px; line-height: 1.15; overflow-wrap: anywhere; }

  /* conciliação: título em cima, o mês com as setas numa fileira, as formas 2 por linha */
  .gx-fin-conc, .gx-fin-alerta, .gx-fin-consumo { border-radius: 14px !important; margin-bottom: 14px !important; }
  .gx-fin-conc-cab { flex-direction: column; align-items: stretch !important; gap: 10px !important; padding: 12px 14px !important; font-size: 14px !important; line-height: 1.35; }
  .gx-fin-conc-nav { justify-content: space-between; background: rgba(255,255,255,.7); border-radius: 12px; padding: 3px; }
  .gx-fin-conc-nav > .btn { min-width: 44px; justify-content: center; }
  .gx-fin-conc-nav > span { flex: 1; text-align: center; font-size: 15px; }
  .gx-fin-formas { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px !important; }
  .gx-fin-formas > div { min-width: 0 !important; border-radius: 12px !important; }
  .gx-fin-formas > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .gx-fin-formas > div > div:nth-child(2) { font-size: 18px !important; overflow-wrap: anywhere; }
  .gx-fin-conc-pdf .btn { width: 100%; justify-content: center; white-space: normal; line-height: 1.3; min-height: 44px !important; }

  /* devedores e planos sem pagamento: nome na largura toda, os dados numa
     linha embaixo e o "Cobrar" sozinho na direita (antes apertava o nome) */
  .gx-fin-alerta-cab { flex-direction: column; gap: 4px !important; padding: 12px 14px !important; line-height: 1.4; }
  .gx-fin-dev, .gx-fin-sp { row-gap: 4px !important; column-gap: 12px !important; padding: 12px 14px !important; font-size: 13px !important; }
  .gx-fin-dev > span:first-child, .gx-fin-sp > span:first-child {
    flex: 1 1 100% !important; min-width: 0 !important; font-size: 14.5px; line-height: 1.3; overflow-wrap: anywhere;
  }
  .gx-fin-dev > span:nth-child(2) { flex: 1 1 100%; font-size: 13px; }
  .gx-fin-dev:has(.gx-fin-cobrar)::after { content: ""; flex: 0 0 100%; order: 5; }
  .gx-fin-dev > .gx-fin-cobrar {
    order: 6; margin-left: auto; min-height: 40px !important; padding: 8px 18px !important;
    font-size: 14px !important; border-radius: 12px;
  }
  .gx-fin-consumo > div:first-child { font-size: 13.5px !important; line-height: 1.4; }
  .gx-fin-consumo th, .gx-fin-consumo td { padding: 9px 10px !important; }
  /* 31/10/2026: a 360px a tabela tinha 365px numa caixa de 338 e o "Un./cliente" saía
     cortado. Os números (colunas curtas) ficam com respiro menor e o cabeçalho pode
     quebrar depois da barra (o span gx-fin-cli do financeiro.js); o nome da vacina fica
     com o resto. */
  .gx-fin-consumo .gx-fin-cli { display: inline-block; }
  .gx-fin-consumo th:not(:first-child), .gx-fin-consumo td:not(:first-child) { padding-left: 6px !important; padding-right: 6px !important; }
  .gx-fin-consumo th { line-height: 1.25; vertical-align: bottom; }

  /* busca e forma de pagamento: uma embaixo da outra, largura toda */
  .gx-fin-filtros { padding: 12px !important; gap: 8px !important; border-radius: 14px; margin-bottom: 12px !important; }
  .gx-fin-filtros .search-box { flex: 1 1 100% !important; min-width: 0 !important; }
  .gx-fin-filtros > select { flex: 1 1 100%; width: 100% !important; min-width: 0 !important; }
  /* "Nenhum pagamento" ganhava o rótulo "ID" do cartão da tabela */
  .table-wrap.gx-fin-pag td.empty-state::before { content: none; }
  .table-wrap.gx-fin-pag td.empty-state { justify-content: center; }
  /* 31/10/2026: o "Nenhum pagamento" virava um cartão com borda dentro da moldura da
     lista (borda dupla e uma faixa sobrando embaixo). A linha vazia fica sem cartão. */
  .table-wrap.gx-fin-pag tr:has(> td.empty-state) { border: none; margin: 0; padding: 0; background: transparent; border-radius: 0; }

  /* Caixa do Dia (folha que sobe): data e imprimir numa linha, totais 2 por linha */
  .gx-fin-cx-top .input { flex: 1 1 auto; width: auto !important; min-width: 0; }
  .gx-fin-cx-top .btn { flex: 1 1 100%; justify-content: center; margin-left: 0 !important; }
  .gx-fin-cx-tot { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px !important; }
  .gx-fin-cx-tot .fin-card { min-width: 0 !important; padding: 12px 14px; text-align: left; border-radius: 12px; }
  .gx-fin-cx-tot .fin-value { font-size: 18px; overflow-wrap: anywhere; }
  .gx-fin-cx-tot > .fin-card:first-child, .gx-fin-cx-tot > .fin-card:last-child:nth-child(even) { grid-column: 1 / -1; }
  .gx-fin-cx-linha > div:first-child > div:first-child { min-width: 0; overflow-wrap: anywhere; }

  /* ═══ letra dos botões ════════════════════════════════════════════════════
     O .btn do celular cai para 12px; nas fileiras arrumadas aqui o piso é 13,5px. */
  .gx-us-cab-acoes .btn, .gx-au-botoes .btn, .gx-rel-acoes .btn, .gx-tr-topo .btn, .gx-est-pdf,
  .gx-fin-cx-top .btn, .gx-fin-conc-pdf .btn, .gx-mt-camp-acoes > .btn, .gx-est-tab td.gx-est-acao .btn,
  .gx-sus-cab .btn, .gx-sus-envio > .btn, .gx-pr-nav > .btn, .gx-pr-hist .btn { font-size: 13.5px !important; }

  /* ═══ 👥 USUÁRIOS ══════════════════════════════════════════════════════════
     A tabela de 6 colunas espremia o nome ("Mayara / Santos / Aguiar…") e as
     ações ficavam cortadas fora da tela. Cada usuário vira um cartão. */
  .gx-us-cab { flex-direction: column; align-items: stretch !important; gap: 12px; margin-bottom: 14px !important; }
  .gx-us-cab h1 { font-size: 20px !important; line-height: 1.2; }
  .gx-us-cab-acoes { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px !important; }
  .gx-us-cab-acoes .btn { width: 100%; justify-content: center; margin-left: 0 !important; white-space: nowrap; }
  .gx-us-kpis { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px !important; }
  .gx-us-kpi {
    display: flex; flex-direction: column-reverse; justify-content: flex-end; gap: 2px;
    min-width: 0; padding: 10px 12px !important; border-radius: 12px !important;
  }
  .gx-us-kpi:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .gx-us-kpi > span:first-child { font-size: 20px !important; line-height: 1.15; }
  .gx-us-kpi > span:last-child { margin-left: 0 !important; font-size: 12px !important; line-height: 1.3; font-weight: 600; }
  .gx-us-tab { display: grid; gap: 10px; background: transparent !important; border: none !important; overflow: visible !important; }
  .gx-us-thead { display: none !important; }
  .gx-us-linha {
    display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px 10px;
    padding: 12px 14px !important; background: var(--bg-card);
    border: 1px solid var(--border) !important; border-radius: 14px;
  }
  .gx-us-av { flex: 0 0 40px; width: 40px !important; height: 40px !important; font-size: 13px !important; }
  .gx-us-info { flex: 1 1 calc(100% - 50px); min-width: 0; padding-left: 0 !important; }
  .gx-us-info > div:first-child { font-size: 15px !important; line-height: 1.3; overflow-wrap: anywhere; }
  .gx-us-info > div:last-child { font-size: 12.5px !important; line-height: 1.35; overflow-wrap: anywhere; }
  .gx-us-perfil, .gx-us-status, .gx-us-cpf {
    flex: 0 0 auto; font-size: 12px !important; line-height: 1.2;
    padding: 5px 10px; border-radius: 999px; background: var(--bg-subtle);
  }
  .gx-us-perfil { order: 1; }
  .gx-us-status { order: 2; }
  .gx-us-cpf { order: 3; }
  .gx-us-cpf::before { content: "CPF"; margin-right: 5px; font-family: var(--font); font-weight: 700; color: var(--text-3); }
  .gx-us-acoes {
    order: 4; flex: 1 1 100%; justify-content: flex-end; gap: 6px !important;
    padding-top: 10px; border-top: 1px solid #f1f5f9;
  }
  .gx-us-acoes > button {
    min-width: 44px; min-height: 44px !important; font-size: 17px !important; border-radius: 12px !important;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .gx-us-acoes > button[title="Reativar usuário"] { font-size: 14px !important; padding: 0 14px !important; }
  .gx-us-acoes > div { min-height: 44px; }
  .gx-us-regras { border-radius: 12px !important; line-height: 1.6 !important; }
  .gx-us-senha, .gx-us-form2 { grid-template-columns: 1fr !important; }
  /* 🩺 Diagnóstico do acesso (31/10/2026): rótulo e valor numa linha quando cabem; o valor
     comprido (a lista de telas, as ações dos 7 dias) desce para baixo do rótulo, na largura
     toda e alinhado à esquerda, em vez de espremer o rótulo numa palavra por linha. */
  .gx-us-dg { flex-wrap: wrap; row-gap: 2px; padding: 7px 0 !important; font-size: 13px !important; line-height: 1.4; }
  .gx-us-dg > span { max-width: 60%; }
  .gx-us-dg-longo { flex-direction: column; align-items: stretch; gap: 3px !important; }
  .gx-us-dg-longo > span { max-width: none; }
  .gx-us-dg-longo > b { text-align: left !important; font-weight: 600; color: var(--text-1); }

  /* ═══ 💊 ESTIMATIVA DE COMPRA ══════════════════════════════════════════════
     A tabela de 8 colunas cortava o estoque e o botão. Cada vacina vira um
     cartão: o nome em cima, os números em grade com o rótulo e o botão embaixo. */
  .gx-est-ctrl { padding: 12px !important; gap: 10px !important; border-radius: 14px !important; }
  .gx-est-ctrl > div:nth-child(2) { display: none; }
  .gx-est-nav { flex: 1 1 100%; }
  .gx-est-seta { flex: 0 0 44px; width: 44px !important; height: 44px !important; min-height: 44px; border-radius: 12px !important; }
  .gx-est-mes { flex: 1 1 auto; min-width: 0 !important; height: 44px; text-align: center; border-radius: 12px !important; }
  .gx-est-pdf { flex: 1 1 100%; justify-content: center; }
  .gx-est-kpis { gap: 8px !important; margin-bottom: 14px !important; }
  .gx-est-kpis > div { padding: 14px !important; border-radius: 14px !important; }
  .gx-est-kpis > div > div:last-child { font-size: 26px !important; }
  .gx-est-formula { border-radius: 12px !important; line-height: 1.55; }
  .gx-est-tab { background: transparent !important; border: none !important; border-radius: 0 !important; overflow: visible !important; }
  .gx-est-tab table, .gx-est-tab tbody { display: block; }
  .gx-est-tab thead { display: none; }
  .gx-est-tab tr {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px;
    padding: 12px; margin-bottom: 10px; background: var(--bg-card);
    border: 1px solid var(--border); border-radius: 14px;
  }
  .gx-est-tab td {
    display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 3px;
    min-width: 0; padding: 8px 10px !important; border: none !important; border-radius: 10px;
    background: var(--bg-subtle); text-align: left !important;
  }
  .gx-est-tab td::before {
    content: attr(data-rot); font-size: 11px; font-weight: 700; line-height: 1.25;
    color: var(--text-3); text-transform: uppercase; letter-spacing: .02em;
    margin-bottom: auto; /* 31/10/2026: rótulo de 2 linhas não desce mais o número da casinha vizinha */
  }
  .gx-est-tab td.gx-est-c0 { grid-column: 1 / -1; padding: 0 2px 4px !important; background: transparent; }
  .gx-est-tab td.gx-est-c0::before { content: none; }
  .gx-est-tab td.gx-est-c0 > div { font-size: 15.5px !important; line-height: 1.35; }
  .gx-est-tab td.gx-est-c0 > div > span { display: inline-block; margin: 4px 0 0 !important; font-size: 11px !important; }
  .gx-est-tab td:not(.gx-est-c0):not(.gx-est-c6):not(.gx-est-acao) > span { font-size: 20px !important; line-height: 1.15; }
  .gx-est-tab td.gx-est-c5 > div { font-size: 11px !important; color: var(--text-3) !important; }
  /* 31/10/2026: o selo "🔴 Comprar Urgente" quebrava em 3 linhas na casinha de 81px (360px).
     Ele sobe para logo embaixo do nome, na largura toda e sem rótulo (o selo se explica),
     e a Sugestão de compra, o número que decide a compra, ocupa 2 casinhas. */
  .gx-est-tab td.gx-est-c0 { order: -2; }
  .gx-est-tab td.gx-est-c6 { order: -1; grid-column: 1 / -1; padding: 0 2px 4px !important; background: transparent; }
  .gx-est-tab td.gx-est-c6::before { content: none; }
  .gx-est-tab td.gx-est-c6 > span { white-space: nowrap; line-height: 1.25; font-size: 12px !important; padding: 4px 10px !important; }
  .gx-est-tab td.gx-est-c5 {
    grid-column: span 2; flex-direction: row; flex-wrap: wrap; align-items: baseline;
    align-content: space-between; column-gap: 5px;
  }
  /* o "doses" vai do lado do número, e o número fica na mesma altura do Disponível */
  .gx-est-tab td.gx-est-c5::before { flex: 0 0 100%; margin-bottom: 0; }
  .gx-est-tab td.gx-est-acao { grid-column: 1 / -1; align-items: flex-end; padding: 4px 0 0 !important; background: transparent; }
  .gx-est-tab td.gx-est-acao::before { content: none; }
  .gx-est-tab td.gx-est-acao .btn { min-height: 40px !important; }
  /* folha "Ver pacientes": nome em cima, plano · dose · data embaixo */
  .gx-est-pac-cab { display: none !important; }
  .gx-est-pac-cab + div { border-radius: 12px !important; max-height: 55dvh !important; }
  .gx-est-pac { grid-template-columns: minmax(0, 1fr) auto auto !important; gap: 4px 10px; padding: 12px !important; }
  .gx-est-pac > div:first-child { grid-column: 1 / -1; }
  .gx-est-pac > div:first-child > div:first-child { font-size: 14.5px !important; }
  .gx-est-pac > div:nth-child(2) { min-width: 0; font-size: 12.5px !important; }

  /* ═══ 🔒 AUDITORIA ═════════════════════════════════════════════════════════ */
  .gx-au-kpis { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px !important; margin-bottom: 14px !important; }
  .gx-au-kpi {
    min-width: 0 !important; padding: 12px 14px !important; border-radius: 12px !important; text-align: left !important;
    display: flex; flex-direction: column-reverse; align-items: flex-start; justify-content: flex-end; gap: 2px;
  }
  .gx-au-kpi > div:first-child { font-size: 22px !important; line-height: 1.1; }
  .gx-au-kpi > div:last-child { font-size: 12px !important; }
  .gx-au-botoes { display: grid !important; grid-template-columns: 1fr; gap: 8px !important; }
  .gx-au-botoes .btn { width: 100%; justify-content: center; margin-left: 0 !important; white-space: normal; line-height: 1.3; }
  .gx-au-busca { max-width: none !important; }
  .gx-au-grade { grid-template-columns: 1fr !important; gap: 10px !important; }
  .gx-au-cartao { padding: 14px !important; border-radius: 14px !important; }
  .gx-au-cartao > div:first-child > div:first-child { min-width: 0; }
  .gx-au-dia { padding: 12px 14px !important; gap: 12px !important; border-radius: 12px !important; }
  .gx-au-dia > div:nth-child(2) { min-width: 0; }
  .gx-au-trilha { flex-wrap: wrap; min-height: 40px; }
  .gx-au-trilha > span:first-child { display: inline-flex; align-items: center; min-height: 40px; }
  /* 31/10/2026: a sessão (1º acesso, Último, Total, Ativo, Ocioso, Eventos) segue o padrão
     de números 2 por linha, como o resto da gestão (eram 3 por linha). */
  .gx-au-sessao { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px !important; }
  .gx-au-sessao > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .gx-au-sessao > div { min-width: 0 !important; border-radius: 10px !important; display: flex; flex-direction: column-reverse; gap: 2px; }
  .gx-au-sessao > div > div:last-child { margin-top: 0 !important; font-size: 11px !important; }
  .gx-au-ev { min-width: 0; }
  .gx-au-ev-topo { gap: 6px; }
  .gx-au-ev-topo > button { flex: 0 0 auto; min-height: 40px !important; }
  .gx-au-det { grid-template-columns: 1fr !important; }
  .gx-au-det > div { overflow-wrap: anywhere; }
  .gx-au-rd-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }

  /* ═══ 👑 PAINEL DA GESTÃO ═══════════════════════════════════════════════════
     A cadeia de 6 elos quebrava em 4 + 2 sem ordem. Agora são 2 fileiras de 3,
     com a seta entre eles, e os cartões ficam mais enxutos. */
  .gx-ge-cab h2 { font-size: 20px !important; }
  .gx-ge-placar { padding: 14px 16px !important; border-radius: 14px !important; }
  .gx-ge-cadeia { padding: 14px !important; border-radius: 14px !important; }
  .gx-ge-cadeia-cab h3 { font-size: 15px !important; line-height: 1.35; }
  .gx-ge-elos:has(.gx-ge-elo) {
    display: grid !important; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr) 14px minmax(0, 1fr);
    gap: 8px 4px !important; align-items: center;
  }
  .gx-ge-elos > .gx-ge-seta { text-align: center; }
  .gx-ge-elos > .gx-ge-seta:nth-child(6) { display: none; }
  .gx-ge-elo {
    width: 100%; min-height: 46px !important; padding: 6px 4px !important;
    font-size: 15px !important; border-radius: 14px !important; white-space: nowrap;
  }
  .gx-ge-cadeia-resumo { font-size: 13px !important; line-height: 1.5; }
  .gx-ge-secao-cab { min-height: 44px; margin-bottom: 6px !important; }
  .gx-ge-secao-cab > span:nth-child(2) { font-size: 15px !important; }
  .gx-ge-secao { gap: 10px !important; }
  .gx-ge-cartao { min-height: 0 !important; padding: 13px 14px !important; border-width: 1.5px !important; border-radius: 14px !important; gap: 3px !important; }
  .gx-ge-cartao > div:nth-child(1) { font-size: 13.5px !important; }
  .gx-ge-cartao > div:nth-child(2) { font-size: 22px !important; line-height: 1.2; }
  .gx-ge-cartao > div:nth-child(3) { font-size: 13px !important; line-height: 1.45; }
  .gx-ge-cartao > div:nth-child(4) { font-size: 12.5px !important; margin-top: 4px; }
  /* folha "Clientes devendo": nome e saldo em cima, o Cobrar na direita embaixo */
  .gx-ge-dev { row-gap: 8px !important; padding: 12px 4px !important; }
  .gx-ge-dev > div:first-child { flex: 1 1 calc(100% - 120px) !important; min-width: 0 !important; }
  .gx-ge-dev > div:first-child > div:first-child { font-size: 14px; }
  .gx-ge-dev > button { margin-left: auto; min-height: 40px !important; padding: 8px 18px !important; font-size: 14px !important; border-radius: 12px; }
  .gx-ge-ok { min-height: 44px; padding: 10px 12px !important; font-size: 13.5px !important; border-radius: 12px !important; }
  /* folha "🎁 Brindes — estoque e furos" (31/10/2026): os 4 números do mês ficavam 2 + 1 + 1
     e a tabela de 5 colunas (312px numa caixa de 266) cortava a "Última contagem". Agora os
     números são 2 por linha e cada brinde vira um cartão: nome e setor em cima, Sistema e
     Mín / ideal lado a lado, a Última contagem numa linha e o campo Contado (com o motivo,
     quando a quantidade muda) embaixo, com alvo de 44px. */
  .gx-ge-bri-chips { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px !important; }
  .gx-ge-bri-chips > div { min-width: 0 !important; padding: 10px 12px !important; border-radius: 12px !important; }
  .gx-ge-bri-chips > div > div:last-child { font-size: 12px !important; line-height: 1.3; }
  .gx-ge-bri-est { padding: 12px 10px !important; }
  .gx-ge-bri-wrap { overflow: visible !important; }
  .gx-ge-bri-tab, .gx-ge-bri-tab tbody { display: block; width: 100% !important; }
  .gx-ge-bri-tab thead { display: none; }
  .gx-ge-bri-tab tr {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px;
    padding: 10px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card);
  }
  .gx-ge-bri-tab td {
    display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0;
    padding: 7px 10px !important; border: none !important; border-radius: 10px; background: var(--bg-subtle);
    text-align: left !important; white-space: normal !important; font-size: 13.5px; line-height: 1.3; overflow-wrap: break-word;
  }
  .gx-ge-bri-tab td[data-rot]::before {
    content: attr(data-rot); margin-bottom: auto; font-family: var(--font); font-size: 11px; font-weight: 700; line-height: 1.25;
    color: var(--text-3); text-transform: uppercase; letter-spacing: .02em;
  }
  .gx-ge-bri-tab td.gx-ge-bri-nome { grid-column: 1 / -1; padding: 0 2px 2px !important; background: transparent; font-size: 14.5px; }
  .gx-ge-bri-tab td.gx-ge-bri-nome > div { font-size: 12.5px !important; font-weight: 500; }
  .gx-ge-bri-tab td.gx-ge-bri-sis { order: 1; }
  .gx-ge-bri-tab td.gx-ge-bri-min { order: 2; }
  .gx-ge-bri-tab td.gx-ge-bri-ult { order: 3; grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; column-gap: 10px; }
  .gx-ge-bri-tab td.gx-ge-bri-ult::before { margin-bottom: 0; }
  .gx-ge-bri-tab td.gx-ge-bri-cont {
    order: 4; grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 110px;
    align-items: center; column-gap: 10px; row-gap: 6px; background: transparent; padding: 2px 0 0 !important;
  }
  .gx-ge-bri-tab td.gx-ge-bri-cont::before { margin-bottom: 0; padding-left: 10px; font-size: 12px; }
  .gx-ge-bri-tab td.gx-ge-bri-cont > input:first-of-type { width: 100% !important; min-height: 44px; font-size: 16px !important; }
  .gx-ge-bri-tab td.gx-ge-bri-cont > input + input { grid-column: 1 / -1; width: 100% !important; min-height: 44px; margin-top: 0 !important; font-size: 16px; }
  .gx-ge-bri-acoes { display: grid !important; grid-template-columns: 1fr; gap: 8px !important; }
  .gx-ge-bri-acoes > .btn { width: 100%; justify-content: center; min-height: 44px; font-size: 13.5px !important; white-space: normal; line-height: 1.3; }

  /* ═══ 🎯 METAS ══════════════════════════════════════════════════════════════
     Botões de tamanhos desencontrados e números soltos: agora tudo em grade de
     2, do mesmo tamanho, e os cartões com respiro igual. */
  .gx-mt-lider, .gx-mt-pontos { padding: 14px 16px !important; border-radius: 14px !important; }
  .gx-mt-hero { padding: 20px 18px !important; border-radius: 16px !important; margin-bottom: 16px !important; }
  .gx-mt-bloco { padding: 16px !important; border-radius: 14px !important; margin-bottom: 16px !important; }
  .gx-mt-botoes { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px !important; }
  .gx-mt-botoes > .btn {
    width: 100%; min-width: 0 !important; margin-left: 0 !important; justify-content: center; text-align: center;
    white-space: normal; line-height: 1.25; min-height: 46px !important; font-size: 13.5px !important; border-radius: 12px;
  }
  .gx-mt-botoes > .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .gx-mt-av .gx-mt-botoes { grid-template-columns: 1fr; }
  .gx-mt-chips { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px !important; }
  .gx-mt-chips > div { min-width: 0; padding: 10px 12px !important; }
  .gx-mt-chips > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .gx-mt-chips > div > div:first-child { line-height: 1.3; }
  .gx-mt-resumo { padding: 14px 16px !important; border-radius: 14px !important; margin-bottom: 16px !important; }
  .gx-mt-campanhas { grid-template-columns: 1fr !important; gap: 14px !important; }
  .gx-mt-camp { border-radius: 16px !important; }
  .gx-mt-camp > div:first-child, .gx-mt-camp > div:nth-child(2) { padding: 16px 18px !important; }
  .gx-mt-camp-acoes { padding: 0 18px 16px !important; }
  .gx-mt-camp-acoes > .btn { min-height: 44px !important; border-radius: 12px; }
  .gx-mt-fin-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 10px !important; }
  .gx-mt-fin-kpis .fin-card { min-width: 0; padding: 12px 14px; text-align: left; border-radius: 14px; }
  .gx-mt-fin-kpis .fin-value { font-size: 18px; overflow-wrap: anywhere; }
  .gx-mt-fin-linha { flex-wrap: wrap; row-gap: 6px !important; padding: 10px 14px !important; }
  .gx-mt-fin-linha > div:nth-child(2) { order: 5; flex: 1 1 100% !important; }
  .gx-mt-fin-linha > div:nth-child(3), .gx-mt-fin-linha > div:nth-child(4) { width: auto !important; }
  .gx-mt-fin-linha > div:nth-child(5) { width: auto !important; margin-left: auto; }

  /* ═══ 🏆 PREMIAÇÕES ═════════════════════════════════════════════════════════ */
  .gx-pr-lider, .gx-pr-metas, .gx-pr-podio, .gx-pr-card, .gx-pr-hist { padding: 14px !important; border-radius: 14px !important; }
  .gx-pr-nav { flex-wrap: wrap; gap: 8px !important; }
  .gx-pr-nav > .btn { min-width: 44px; justify-content: center; }
  /* as 3 metas grandes viram lista: o nome e os pontos à esquerda, o número à direita */
  .gx-pr-metas-chips { flex-direction: column; gap: 6px !important; }
  .gx-pr-meta {
    display: grid !important; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "rot val" "pts val";
    align-items: center; column-gap: 12px; row-gap: 2px; min-width: 0 !important; padding: 10px 14px !important; text-align: left !important;
  }
  .gx-pr-meta > div:nth-child(1) { grid-area: rot; font-size: 13.5px !important; line-height: 1.3; }
  .gx-pr-meta > div:nth-child(2) { grid-area: val; font-size: 24px !important; line-height: 1; }
  .gx-pr-meta > div:nth-child(3) { grid-area: pts; font-size: 12px !important; }
  .gx-pr-podio-linha { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); gap: 8px !important; }
  .gx-pr-podio-linha > div { min-width: 0 !important; padding: 12px 8px !important; }
  .gx-pr-podio-linha > div > div:nth-child(2) { overflow-wrap: anywhere; line-height: 1.25; }
  .gx-pr-podio-linha > div > div:nth-child(3) { font-size: 20px !important; }
  /* atividades: o nome e o número numa linha, a barra embaixo na largura toda */
  .gx-pr-atv { flex-wrap: wrap; row-gap: 5px !important; margin-bottom: 12px !important; }
  .gx-pr-atv > span:first-child { flex: 1 1 calc(100% - 60px); width: auto !important; min-width: 0 !important; font-size: 13px !important; line-height: 1.3; }
  .gx-pr-atv > div { order: 3; flex: 1 1 100% !important; height: 10px !important; }
  .gx-pr-atv > span:last-child { flex: 0 0 auto; width: auto !important; margin-left: auto; }
  /* detalhamento: cada pessoa vira um cartão, o ícone de cada item em cima do número */
  .gx-pr-det, .gx-pr-det tbody { display: block; width: 100%; }
  .gx-pr-det thead { display: none; }
  .gx-pr-det tr {
    display: grid !important; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px;
    padding: 10px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg-card);
  }
  .gx-pr-det td {
    display: block; min-width: 0; padding: 6px 4px !important; border: none !important; border-radius: 8px;
    background: var(--bg-subtle); text-align: center !important; font-size: 15px; font-weight: 800;
  }
  .gx-pr-det td::before { content: attr(data-rot); display: block; margin-bottom: 2px; font-family: var(--font); font-size: 13px; line-height: 1.2; font-weight: 600; color: var(--text-3); }
  .gx-pr-det td:nth-child(1) { grid-column: 1; grid-row: 1; background: transparent; font-size: 20px; align-self: center; }
  .gx-pr-det td:nth-child(2) { grid-column: 2 / 5; grid-row: 1; background: transparent; text-align: left !important; align-self: center; overflow-wrap: anywhere; }
  .gx-pr-det td:last-child { grid-column: 5; grid-row: 1; background: var(--orange-bg); }
  .gx-pr-det td:nth-child(1)::before, .gx-pr-det td:nth-child(2)::before { content: none; }

  /* ═══ 🎓 TREINAMENTO ═══════════════════════════════════════════════════════ */
  .gx-tr-titulo { font-size: 20px !important; line-height: 1.25; margin-bottom: 8px !important; }
  .gx-tr-pop { padding: 14px !important; border-radius: 14px !important; border-width: 1.5px !important; }
  .gx-tr-topo { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px !important; }
  .gx-tr-topo .btn { width: 100%; justify-content: center; margin-left: 0 !important; }
  .gx-tr-passo { padding: 14px !important; gap: 12px !important; border-radius: 14px !important; flex-wrap: nowrap !important; }
  .gx-tr-num { flex: 0 0 34px !important; height: 34px !important; font-size: 16px !important; }
  .gx-tr-corpo { min-width: 0 !important; }
  .gx-tr-corpo > div:first-child { font-size: 14.5px !important; }

  /* ═══ 📊 RELATÓRIOS ════════════════════════════════════════════════════════
     Continua tabela (ordem do master: lista de leitura fácil); só os controles
     se organizam: abas e modos em metades iguais, busca e ordem na largura toda. */
  .gx-rel-abas, .gx-rel-modo { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .gx-rel-abas button, .gx-rel-modo button { min-height: 42px !important; padding: 8px 10px !important; font-size: 13.5px !important; white-space: nowrap; }
  .gx-rel-topo { padding: 14px !important; border-radius: 14px !important; }
  .gx-rel-linha1 { gap: 12px !important; }
  .gx-rel-tit { flex: 1 1 100% !important; min-width: 0 !important; }
  .gx-rel-acoes { width: 100%; display: grid !important; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 48px; gap: 8px !important; }
  .gx-rel-acoes:not(:has(> :nth-child(3))) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gx-rel-acoes .btn { width: 100%; justify-content: center; margin-left: 0 !important; white-space: nowrap; }
  .gx-rel-kpi { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px !important; padding-top: 12px !important; }
  .gx-rel-kpi > div { min-width: 0; line-height: 1.3; }
  .gx-rel-kpi > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .gx-rel-ctl { gap: 8px !important; }
  .gx-rel-busca { flex: 1 1 100% !important; max-width: none !important; min-width: 0 !important; }
  .gx-rel-chips { flex: 1 1 100%; flex-wrap: nowrap !important; overflow-x: auto; gap: 6px !important; padding-bottom: 2px; scrollbar-width: none; }
  .gx-rel-chips::-webkit-scrollbar { display: none; }
  .gx-rel-chips .filter-chip { flex: 0 0 auto; min-height: 40px !important; white-space: nowrap; }
  .gx-rel-sel { flex: 1 1 100%; width: 100% !important; }

  /* ═══ 🏥 SI-PNI ════════════════════════════════════════════════════════════ */
  .gx-sus-cab > div:first-child { min-width: 0; }
  .gx-sus-cab h2 { font-size: 20px !important; }
  .gx-sus-sit, .gx-sus-fila { padding: 14px !important; border-radius: 14px !important; }
  /* 31/10/2026: contadores 2 por linha (padrão da gestão); eram 3 e o "Lançadas no SUS"
     quebrava no cartão estreito. Com 3, o último ocupa a linha toda. */
  .gx-sus-cont { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .gx-sus-cont > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .gx-sus-cont > div { min-width: 0; padding: 10px !important; border-radius: 12px !important; }
  .gx-sus-cont > div > div:last-child { font-size: 12px !important; line-height: 1.3; }
  /* cada lançamento: data e situação em cima, paciente na largura toda,
     vacina e quem aplicou embaixo, o botão sozinho na direita */
  .gx-sus-envio {
    display: grid !important; grid-template-columns: minmax(0, 1fr) auto; gap: 3px 10px !important;
    align-items: center; padding: 12px 0 !important;
  }
  .gx-sus-envio > * { min-width: 0 !important; }
  .gx-sus-envio > .gx-sus-data { grid-column: 1; grid-row: 1; font-size: 12.5px; }
  .gx-sus-envio > span:not([class]) { grid-column: 2; grid-row: 1; justify-self: end; }
  .gx-sus-envio > .gx-sus-pac { grid-column: 1 / -1; font-size: 14.5px; line-height: 1.3; }
  .gx-sus-envio > .gx-sus-vac, .gx-sus-envio > .gx-sus-quem, .gx-sus-envio > .gx-sus-det { grid-column: 1 / -1; line-height: 1.4; }
  .gx-sus-envio > .btn { grid-column: 1 / -1; justify-self: end; margin-top: 4px; min-height: 40px !important; }
  .gx-sus-busca { max-width: none !important; }
  .gx-sus-num > b { font-weight: 800; }
}

/* 31/10/2026 (revisão): a busca do Financeiro ficava com 38px; no celular, o alvo do dedo */
@media (max-width: 768px) {
  .gx-fin-filtros .search-box input { min-height: 44px; }
}
