/* Aba Base Global (dono) — grafo da base de conhecimento. */
.bg-topo h1 { margin-bottom: 4px; }
.bg-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) 320px;
  gap: 12px;
  height: calc(100vh - 150px);
  min-height: 520px;
}
.bg-painel, .bg-detalhe {
  overflow-y: auto;
  background: var(--card-bg, #fff);
  border: 1px solid var(--borda, #e5e7eb);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
}
.bg-bloco { margin-bottom: 14px; }
.bg-rotulo { font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; margin-bottom: 6px; }
.bg-persp { display: flex; flex-direction: column; gap: 4px; }
.bg-persp button {
  text-align: left; padding: 6px 8px; border: 1px solid #e5e7eb; border-radius: 6px;
  background: #f9fafb; cursor: pointer; font: inherit;
}
.bg-persp button.ativo { background: #111827; color: #fff; border-color: #111827; }
.bg-ajuda { color: #6b7280; font-size: 12px; line-height: 1.4; margin: 6px 0 0; }
#bg-busca { width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid #d1d5db; border-radius: 6px; font: inherit; }
.bg-resultados { list-style: none; padding: 0; margin: 6px 0 0; max-height: 180px; overflow-y: auto; }
.bg-resultados li { padding: 4px 6px; cursor: pointer; border-radius: 4px; }
.bg-resultados li:hover { background: #f3f4f6; }
.bg-filtros { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-bottom: 6px; }
.bg-chk { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.bg-legenda div { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.bg-bola { width: 12px; height: 12px; border-radius: 50%; display: inline-block; flex: none; }
.bg-palco { position: relative; display: flex; flex-direction: column; min-width: 0; }
.bg-barra { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; color: #374151; flex-wrap: wrap; }
.bg-barra-dir { display: flex; gap: 6px; }
.bg-grafo { flex: 1; border: 1px solid #e5e7eb; border-radius: 8px; background: #fcfcfd; min-height: 400px; }
.bg-carregando { position: absolute; inset: 40px 0 0 0; display: flex; align-items: center; justify-content: center; color: #6b7280; pointer-events: none; }
.bg-detalhe h2 { font-size: 15px; margin: 0 0 4px; word-break: break-word; }
.bg-detalhe .bg-tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 10px; background: #f3f4f6; margin: 0 4px 4px 0; }
.bg-detalhe .bg-tag.lacuna { background: #fee2e2; color: #991b1b; }
.bg-detalhe dl { margin: 8px 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 8px; }
.bg-detalhe dt { color: #6b7280; }
.bg-detalhe dd { margin: 0; word-break: break-word; }
.bg-detalhe ul { padding-left: 16px; margin: 4px 0 10px; }
.bg-detalhe li { cursor: pointer; margin: 2px 0; }
.bg-detalhe li:hover { text-decoration: underline; }
.bg-cob-rolagem { overflow-x: auto; }
.bg-cob { border-collapse: collapse; width: 100%; font-size: 12px; margin: 6px 0 12px; }
.bg-cob th, .bg-cob td { border: 1px solid #e5e7eb; padding: 3px 4px; white-space: nowrap; text-align: right; }
.bg-cob th:first-child, .bg-cob td:first-child { text-align: left; }
.bg-cob td.zero { background: #fee2e2; color: #991b1b; font-weight: 600; }
@media (max-width: 1100px) {
  .bg-layout { grid-template-columns: 1fr; height: auto; }
  .bg-grafo { height: 70vh; }
  .bg-painel, .bg-detalhe { max-height: 50vh; }
}
