/* Relatórios (dono, 22/10/2026): busca no grupo, pares "oficial (painel)" × "BI" e o painel "Como foi calculado". */

/* ---- menu: busca dentro de Relatórios ---- */
.sb-rel-busca { padding: 4px 10px 6px 16px; }
.sb-rel-busca-campo {
  width: 100%; box-sizing: border-box; min-height: 30px; padding: 5px 9px;
  font: inherit; font-size: 12.5px; color: var(--text-primary);
  background: var(--surface-1); border: 1px solid var(--border); border-radius: 8px;
}
.sb-rel-busca-campo:focus { outline: 2px solid var(--accent); outline-offset: 0; }
.sb-rel-nada { margin: 6px 0 0; font-size: 12px; color: var(--text-muted); }
.sb-rel-escondido { display: none !important; }

/* ---- menu: par oficial × BI lado a lado ---- */
.sb-par { display: flex; flex-direction: column; align-items: stretch; margin-left: 52px; margin-right: 6px; border-radius: 8px; background: var(--hover, rgba(0,0,0,.03)); }
.sb-sub2 .sb-par .sb-item { padding: 5px 6px; flex: 0 0 auto; min-width: 0; /* uma embaixo da outra: altura do próprio texto */ flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 3px; font-size: 12px; overflow-wrap: anywhere; }
.sb-par .sb-item + .sb-item { border-top: 1px dashed var(--border); }
.sb-par .sb-item.ativo { border-left: 3px solid var(--menu-ativo-barra); }
.sb-par-rot {
  display: inline-block; font-size: 10px; font-weight: 600; line-height: 1.2; padding: 1px 6px; border-radius: 999px;
  color: var(--text-muted); background: var(--surface-1); border: 1px solid var(--border); white-space: normal;
}

/* ---- botão no topo do relatório ---- */
.cc-barra { display: flex; justify-content: flex-end; margin: 0 0 8px; }
.cc-abrir {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 6px 12px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--accent);
  background: var(--accent-soft); border: 1px solid transparent; border-radius: 999px; cursor: pointer;
}
.cc-abrir:hover { border-color: var(--accent); }
.cc-abrir svg { width: 16px; height: 16px; }

/* ---- painel ao lado ---- */
.cc-fundo { position: fixed; inset: 0; background: rgba(15, 23, 42, .35); z-index: 1200; }
.cc-painel {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(560px, 92vw); z-index: 1201;
  display: flex; flex-direction: column; background: var(--surface-1); color: var(--text-primary);
  box-shadow: -8px 0 30px rgba(0,0,0,.18); border-left: 1px solid var(--border);
}
.cc-painel[hidden], .cc-fundo[hidden] { display: none; }
.cc-topo { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px 10px; border-bottom: 1px solid var(--border); }
.cc-topo h2 { margin: 0; font-size: 16px; line-height: 1.3; flex: 1; }
.cc-topo small { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-top: 2px; }
.cc-fechar { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: none; color: var(--text-secondary); font-size: 18px; cursor: pointer; }
.cc-corpo { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 16px 16px; font-size: 14px; line-height: 1.55; overflow-wrap: anywhere; }
.cc-corpo h3 { font-size: 14px; margin: 16px 0 4px; color: var(--accent); }
.cc-corpo ul, .cc-corpo ol { padding-left: 20px; margin: 4px 0; }
.cc-corpo li { margin: 3px 0; }
.cc-corpo p { margin: 6px 0; }
.cc-aviso { font-size: 12px; color: var(--text-muted); background: var(--hover, rgba(0,0,0,.04)); border-radius: 8px; padding: 6px 10px; margin: 10px 0 2px; }
.cc-vivo { font-weight: 700; }
.cc-vivo.cc-da-tela { color: var(--accent); background: var(--accent-soft); border-radius: 4px; padding: 0 3px; }
.cc-rodape { padding: 10px 16px; border-top: 1px solid var(--border); font-size: 13px; display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cc-rodape a { color: var(--accent); }
@media (max-width: 860px) {
  .cc-painel { width: 100vw; border-left: 0; }
  .cc-barra { margin-bottom: 6px; }
}

/* ---- "?" ao lado dos números principais ---- */
.cc-q {
  display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; margin-left: 5px;
  vertical-align: middle; border-radius: 50%; border: 1px solid var(--accent); background: none; color: var(--accent);
  font: 700 11px/1 inherit; font-family: inherit; cursor: pointer; padding: 0; flex: none;
}
.cc-q:hover, .cc-q[aria-expanded="true"] { background: var(--accent); color: var(--accent-contrast, #fff); }
.cc-formula {
  position: absolute; z-index: 1300; max-width: min(340px, calc(100vw - 24px)); padding: 10px 12px;
  background: var(--surface-1); color: var(--text-primary); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.18); font-size: 13px; line-height: 1.45; text-transform: none; letter-spacing: normal; font-weight: 400;
}
.cc-formula b { display: block; margin-bottom: 3px; }
.cc-formula a { display: inline-block; margin-top: 6px; color: var(--accent); font-size: 12px; }

/* ---- última página na impressão (Exportar PDF pela impressão) ---- */
.cc-impressao { display: none; }
@media print {
  .cc-barra, .cc-painel, .cc-fundo, .cc-q, .cc-formula { display: none !important; }
  .cc-impressao:not(:empty) { display: block; break-before: page; page-break-before: always; font-size: 11px; line-height: 1.45; color: #000; }
  .cc-impressao h2 { font-size: 15px; margin: 0 0 6px; }
  .cc-impressao h3 { font-size: 12px; margin: 10px 0 3px; }
  .cc-impressao ul, .cc-impressao ol { padding-left: 18px; margin: 2px 0; }
}
