/* Barra de módulos adaptável — ver static/js/barra_modulos.js (2026-10-25). Só acima de 680 px; no celular vale a barra de baixo. */
.tf-mod.tf-mais[hidden], .tf-mais-lista[hidden] { display: none !important; }
@media (min-width: 681px) {
  /* 1) folga menor */
  .tf-barra-apertada .tf-modulos { gap: 2px; }
  .tf-barra-apertada .tf-modulos .tf-mod { padding: 0 9px; gap: 6px; font-size: 13px; }
  .tf-barra-apertada .tf-marca span { display: none; }
  .tf-barra-apertada .tf-marca { padding-right: 12px; }

  /* 2) não cabe: módulos fechados só com o ícone (o nome fica na dica); o aberto mantém o nome */
  .tf-modulos.tf-compacta .tf-mod:not(.on) { font-size: 0; gap: 0; padding: 0 11px; }
  .tf-modulos.tf-compacta .tf-mod:not(.on) .ph { font-size: 19px; }
  .tf-modulos.tf-compacta .tf-mod:not(.on) .tf-qt { font-size: 11px; margin-left: 3px; }
  .tf-modulos.tf-compacta .tf-mod.tf-mais:not(.on) { padding: 0 12px; }

  /* 3) ainda não cabe: botão Mais */
  .tf-mod.tf-mais { appearance: none; -webkit-appearance: none; border: 0; background: transparent; cursor: pointer; font-family: inherit; }
  .tf-mod.tf-mais[aria-expanded="true"] { background: var(--chip); color: var(--ink); }
  .tf-mais-ponto { width: 9px; height: 9px; border-radius: 50%; background: var(--acento); margin-left: 2px; align-self: flex-start; margin-top: 8px; }
  .tf-modulos.tf-compacta .tf-mais-ponto { margin-left: 0; }

  .tf-mais-lista { position: fixed; z-index: 90; min-width: 230px; max-width: calc(100vw - 16px); overflow-y: auto; padding: 6px;
    background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 34px rgba(18, 50, 79, .20); }
  .tf-mais-lista .tf-mod, .tf-mais-lista .tf-mod:not(.on) { display: flex; width: 100%; height: 42px; padding: 0 12px; gap: 10px; font-size: 14px;
    border-radius: 8px; color: var(--ink); background: transparent; box-shadow: none; }
  .tf-mais-lista .tf-mod:hover { background: var(--chip); color: var(--ink); }
  .tf-mais-lista .tf-mod::after { display: none; }
  .tf-mais-lista .tf-mod .ph { font-size: 18px; }
  .tf-mais-lista .tf-mod .tf-qt { margin-left: auto; }
}
