/* GestorAppMI - RELATÓRIOS [RELATORIOS-2210]: menu lateral dos módulos (estilo da ficha lateral) + filtros + lista em grade com totais */
#grl-host .grl-corpo { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; min-height: 0; }   /* [REL-MENU-0711] a lista foi para o menu */
#grl-host .grl-cab { display: flex; align-items: center; gap: 4px; }
#grl-host .grl-cab-fav { flex: 0 0 30px; border: 0 !important; background: transparent !important; box-shadow: none !important; transform: none !important; cursor: pointer; padding: 0 0 8px !important; }
#grl-host .grl-cab-fav::before { content: none !important; }
#grl-host .grl-cab-fav.fav, #grl-host .grl-cab-fav:hover { opacity: 1; color: #e3a008 !important; }
#g-sistema .gp-menu a.gp-rel { font-size: 11.5px; line-height: 1.25; padding-top: 5px; padding-bottom: 5px; }
#g-sistema .gp-menu a.gp-rel span { white-space: normal; overflow: visible; }
#g-sistema .gp-menu a.gp-rel { gap: 8px; font-size: 12.5px; }   /* [REL-NOMES-0711] */
#g-sistema .gp-menu a.gp-rel .gp-rel-ico { width: 14px; height: 14px; flex: none; opacity: .65; }
#g-sistema .gp-menu a.gp-rel.ativo .gp-rel-ico { opacity: 1; }
#grl-host .grl-alterna { display: inline-flex; gap: 4px; padding: 3px; border-radius: 10px; background: var(--p-100, #e3ecfb); align-self: flex-start; }
#grl-host .grl-alterna button { border: 0 !important; box-shadow: none !important; transform: none !important; background: transparent !important; color: var(--p-800, #0d2b5c) !important;
  font-weight: 800 !important; font-size: 12px !important; letter-spacing: .5px; padding: 6px 16px !important; border-radius: 8px !important; cursor: pointer; width: auto !important; height: auto !important; }
#grl-host .grl-alterna button::before { content: none !important; }
#grl-host .grl-alterna button.ativo { background: var(--p-500, #1668e3) !important; color: #fff !important; }

/* ---- o MENU à esquerda: módulos e, no escolhido, os relatórios dele ---- */
#grl-host .grl-menu { position: sticky; top: 0; display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 14px;
  background: var(--p-50, #f3f6fb); border: 1px solid var(--p-borda, #dbe3ef); max-height: calc(100 * var(--vh, 1vh) - 190px); overflow-y: auto; }
#grl-host .grl-mod { display: flex !important; align-items: center; gap: 10px; width: 100% !important; height: 42px !important; padding: 0 12px !important;
  border-radius: 10px !important; border: 0 !important; background: transparent !important; color: var(--p-texto, #16233d) !important; box-shadow: none !important;
  transform: none !important; font-size: 12.5px !important; font-weight: 800 !important; letter-spacing: .3px; text-align: left !important; cursor: pointer; }
#grl-host .grl-mod::before { content: none !important; }
#grl-host .grl-mod i { font-style: normal; width: 22px; text-align: center; font-size: 17px; font-family: "Segoe UI Emoji", "Apple Color Emoji", "Noto Color Emoji", sans-serif; }
#grl-host .grl-mod span { flex: 1 1 auto; }
#grl-host .grl-mod small { font-size: 11px; font-weight: 800; opacity: .7; }
#grl-host .grl-mod:hover { background: var(--p-100, #e3ecfb) !important; }
#grl-host .grl-mod.ativo { background: var(--p-500, #1668e3) !important; color: var(--p-sobre, #fff) !important; }
#grl-host .grl-mod.ativo * { color: var(--p-sobre, #fff) !important; }
#grl-host .grl-rels { display: flex; flex-direction: column; gap: 2px; }
#grl-host .grl-rel { display: flex; align-items: stretch; border-radius: 8px; }
#grl-host .grl-rel:hover { background: var(--p-100, #e3ecfb); }
#grl-host .grl-rel.ativo { background: #fff; box-shadow: inset 3px 0 0 var(--p-500, #1668e3); }
#grl-host .grl-rel button { border: 0 !important; background: transparent !important; box-shadow: none !important; transform: none !important; cursor: pointer;
  color: var(--p-texto, #16233d) !important; padding: 7px 8px !important; height: auto !important; min-height: 0 !important; }
#grl-host .grl-rel button::before { content: none !important; }
#grl-host .grl-rel-nome { flex: 1 1 auto; text-align: left !important; font-size: 11.5px !important; font-weight: 700 !important; line-height: 1.25; width: auto !important; }
#grl-host .grl-rel-nome small { display: block; font-size: 10px; font-weight: 700; opacity: .6; }
#grl-host .grl-rel.fav .grl-rel-nome { font-weight: 900 !important; }
#grl-host .grl-rel.ativo .grl-rel-nome { color: var(--p-800, #0d2b5c) !important; }
#grl-host .grl-estrela { flex: 0 0 30px; width: 30px !important; font-size: 16px !important; opacity: .45; }
#grl-host .grl-rel.fav .grl-estrela, #grl-host .grl-estrela:hover { opacity: 1; color: #e3a008 !important; }

/* ---- a ÁREA do relatório ---- */
#grl-host .grl-area { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
#grl-host .grl-cab h3 { margin: 0; font-size: 15px; font-weight: 900; letter-spacing: .6px; color: var(--p-800, #0d2b5c); padding: 2px 4px 8px;
  border-bottom: 1px solid var(--p-borda, #dbe3ef); }
#grl-host .grl-filtros { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 10px; padding: 12px; border-radius: 14px; background: #fff;
  border: 1px solid var(--p-borda, #dbe3ef); }
#grl-host .grl-f { display: flex; flex-direction: column; gap: 3px; width: 190px; margin: 0 !important; }
#grl-host .grl-f > span { font-size: 11px !important; font-weight: 900; letter-spacing: .3px; text-align: left !important; display: block; }
#grl-host .grl-f input, #grl-host .grl-f select { height: 40px; border-radius: 10px !important; width: 100% !important; text-align: left !important; text-align-last: auto !important; }
#grl-host .grl-f.grl-f-per { width: 160px; }
#grl-host .grl-f.grl-f-num { width: 150px; }
#grl-host .grl-f.grl-f-num input { text-align: right !important; }
#grl-host .grl-f.grl-f-txt { width: 240px; }
#grl-host .grl-f.grl-f-sim { flex-direction: row; align-items: center; gap: 8px; width: auto; height: 40px; }
#grl-host .grl-f.grl-f-sim input { width: 20px !important; height: 20px !important; flex: 0 0 20px; }
#grl-host .grl-f.grl-f-sim > span { font-size: 12px !important; }
#grl-host .grl-gerar { height: 40px; min-width: 130px; margin-left: auto; font-weight: 900; }
/* [REL-ABERTO-0811] CLIENTE / FORNECEDOR: a lista aparece conforme digita (vazio = TODOS) */
#grl-host .grl-f.grl-f-pes { width: 380px; position: relative; }
/* [REL-VER-0811] (08/11, Mateus) o botão VER: o filtro inteiro cabe na mesma linha */
#grl-host .grl-filtros:has(.grl-f-pes) { flex-wrap: nowrap; }
#grl-host .grl-filtros:has(.grl-f-pes) > .grl-f { flex: 0 1 auto; min-width: 0; }
#grl-host .grl-filtros > .grl-f.grl-f-pes { flex: 1 1 380px; max-width: 420px; }
#grl-host .grl-filtros > .grl-gerar { min-width: 90px; flex: 0 0 auto; }
/* a LISTA do cliente / fornecedor sempre com a letra forte (nada apagado) */
#g-sistema #grl-host .grl-achados button, #g-sistema #grl-host .grl-achados button b { color: #16233d !important; opacity: 1 !important; }
#g-sistema #grl-host .grl-achados button small { color: #4d5d7a !important; opacity: 1 !important; }
#g-sistema #grl-host .grl-f input.grl-combo::placeholder { color: #16233d !important; opacity: 1 !important; }
#grl-host .grl-f input.grl-combo { padding-right: 34px !important; cursor: pointer; }
#grl-host .grl-f-pes .grl-seta { position: absolute; right: 15px; bottom: 17px; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); pointer-events: none; }
#grl-host .grl-f input.grl-combo::placeholder { color: inherit; opacity: 1; }
#grl-host .grl-achados .grl-achados-mais { display: block; padding: 7px 12px; font-size: 11px; font-weight: 800; opacity: .7; }
#grl-host .grl-achados { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; margin-top: 2px; background: #fff; border: 1px solid var(--p-300, #9db6dd);
  border-radius: 10px; box-shadow: 0 8px 22px rgba(13, 43, 92, .18); max-height: 300px; overflow: auto; }
#grl-host .grl-achados:empty { display: none; }
#grl-host .grl-achados button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 7px 12px; border: 0; border-bottom: 1px solid #eef2f8;
  background: #fff !important; color: #16233d !important; text-align: left; cursor: pointer; font: inherit; height: auto !important; min-height: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
#grl-host .grl-achados button b { font-size: 12.5px; } #grl-host .grl-achados button small { font-size: 11px; opacity: .7; }
#grl-host .grl-achados button:hover, #grl-host .grl-achados button.sel { background: var(--p-100, #dbeafe) !important; }
/* [REL-VISUALIZAR-0811] o VISUALIZADOR do relatório (folha A4) com IMPRIMIR e EXPORTAR */
dialog.grl-vis { width: min(1180px, 96vw); height: 94vh; max-height: 94vh; padding: 0; border: 0; border-radius: 14px; overflow: hidden; }
dialog.grl-vis[open] { display: flex; flex-direction: column; }
dialog.grl-vis .grl-vis-bar { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: var(--p-800, #0d2b5c); color: #fff; flex-wrap: wrap; }
dialog.grl-vis .grl-vis-bar b { flex: 1 1 auto; font-size: 14px; letter-spacing: .5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
dialog.grl-vis .grl-vis-bar button { height: 36px; min-width: 76px; padding: 0 14px; border-radius: 10px; border: 0; font-weight: 900; cursor: pointer; background: #fff; color: var(--p-800, #0d2b5c); }
dialog.grl-vis .grl-vis-bar button.imp { background: #22a35a; color: #fff; min-width: 120px; }
dialog.grl-vis .grl-vis-bar button.x { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); min-width: 40px; }
dialog.grl-vis iframe { flex: 1 1 auto; width: 100%; border: 0; background: #7d8796; }

/* ---- o RESULTADO ---- */
#grl-host .grl-res { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
#grl-host .grl-faixa { align-items: center; }
#grl-host .grl-info { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; text-align: left; }
#grl-host .grl-info b { font-size: 13px; letter-spacing: .4px; }
#grl-host .grl-info small { font-size: 11px; opacity: .75; }
#grl-host .grl-alerta { margin: 0; padding: 8px 12px; border-radius: 10px; background: #fff4d6; border: 1px solid #f0c75e; font-size: 12px; font-weight: 800; }
#grl-host .grl-tot { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: center; padding: 10px 14px; border-radius: 12px; background: var(--p-50, #f3f6fb);
  border: 1px solid var(--p-borda, #dbe3ef); font-size: 12.5px; position: sticky; bottom: 0; }
#grl-host .grl-tot > b { color: var(--p-800, #0d2b5c); letter-spacing: .8px; }
#grl-host .grl-neg { color: #b4233f !important; font-style: normal; }

@media (max-width: 900px) {
  #grl-host .grl-corpo { grid-template-columns: minmax(0, 1fr); }
  #grl-host .grl-menu { position: static; max-height: 260px; }
  #grl-host .grl-f, #grl-host .grl-f.grl-f-per, #grl-host .grl-f.grl-f-txt { width: calc(50% - 5px); }
  #grl-host .grl-gerar { width: 100%; margin-left: 0; }
  #grl-host .grl-filtros { flex-wrap: wrap; }
}

/* [PADRAO-TELAS-0711] o resultado: a pesquisa não fica por baixo da lista (a margem negativa era de outra barra) e os botões do resultado no tamanho dos outros, redondos e com espaço */
#grl-host .grl-res > .gk-lista { margin-top: 0 !important; border-radius: 12px !important; }
#grl-host .grl-res > .gk-pesq { overflow: visible !important; height: auto !important; }
html #g-sistema #grl-host .grl-faixa .gk-bts-barra { gap: 8px !important; }
html #g-sistema #grl-host .grl-faixa .gk-bts-barra button.gk-red { min-width: 36px !important; width: auto !important; height: 30px !important; padding: 0 12px !important; border-radius: 10px !important; font-size: 16px !important; line-height: 1 !important; }
html #g-sistema #grl-host .grl-faixa .gk-bts-barra button#grl-pdf { font-size: 12px !important; font-weight: 900 !important; letter-spacing: .5px; }
