/* TFPesquisa (form global de pesquisa do SIGEMP) — partial _tfpesquisa.ejs (DFM) + tfpesquisa.js. Prefixo próprio (tfp-) para não depender
   do CSS de cada tela. Form bsSizeable: Panel1 alTop, Panel2 alBottom, DBGrid1 alClient (redimensiona pelo canto). Cores do DFM (BGR→RGB). */
.tfp-ov[hidden] { display: none !important; }
.tfp-ov { position: fixed; inset: 0; background: rgba(0,0,0,.25); z-index: 3000; display: flex; align-items: center; justify-content: center; }
.tfp-modal { background: #f0f0f0; border: 1px solid #555; box-shadow: 0 8px 30px rgba(0,0,0,.35); max-width: 98vw; max-height: 96vh; display: flex; flex-direction: column; }
.tfp-modal-t { height: 26px; flex: none; background: #fff; border-bottom: 1px solid #ccc; display: flex; align-items: center; justify-content: space-between; padding-left: 8px; font: 12px "Segoe UI", Arial, sans-serif; color: #000; user-select: none; }
.tfp-modal-x { cursor: pointer; padding: 2px 8px; }
.tfp-modal-x:hover { background: #e81123; color: #fff; }
.tfp-form { position: relative; box-sizing: border-box; overflow: hidden; resize: both; min-width: 420px; min-height: 140px; max-width: 98vw; max-height: calc(96vh - 28px); }
.tfp-form * { box-sizing: border-box; }
.tfp-form [id] { position: absolute; margin: 0; }
#FPesquisa__Panel1 { width: 100% !important; }
#FPesquisa__Panel2 { top: auto !important; bottom: 0; width: 100% !important; }
#FPesquisa__DBGrid1 { width: 100% !important; height: auto !important; bottom: 43px; }
.tfp-panel { display: flex; align-items: center; border: 1px solid; border-color: #fff #808080 #808080 #fff; }
.tfp-panel[data-bevel="bvLowered"] { border-color: #808080 #fff #fff #808080; }
.tfp-label { white-space: pre; overflow: hidden; line-height: 14px; }
#FPesquisa__Label3 { line-height: 15px; }
.tfp-maskedit { border: 1px solid #7a7a7a; padding: 1px 3px; background: #fff; outline: none; font-family: "MS Sans Serif", "Microsoft Sans Serif", Arial, sans-serif !important; }
.tfp-maskedit:focus { border-color: #6400d7; }
.tfp-bitbtn { border: 1px solid #adadad; background: #e1e1e1; cursor: pointer; padding: 0; }
.tfp-bitbtn:hover { background: #efe5fb; border-color: #6400d7; }
.tfp-bitbtn:focus { outline: 1px dotted #000; outline-offset: -4px; border-color: #6400d7; }
/* DBGrid1: gdsGradient (títulos clWhite → GradientEndColor clMedGray), TitleFont Calibri 13 negrito; Font MS Sans Serif 8; Color clWindow;
   dgRowSelect + dgAlwaysShowSelection; colunas padrão (DisplayWidth × largura do '0' + 4) e texto recortado na borda da célula */
.tfp-dbgrid { overflow: auto; background: #fff; border: 1px solid #828790; outline: none; cursor: default; user-select: none; }
.tfp-grid { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: max-content; font: 11px "MS Sans Serif", "Microsoft Sans Serif", Arial, sans-serif; color: #000; }
.tfp-grid th { position: sticky; top: 0; z-index: 1; height: 21px; line-height: 20px; padding: 0 2px; text-align: left; white-space: pre; overflow: hidden; font: bold 13px/20px Calibri, Arial, sans-serif; color: #000;
  background: linear-gradient(#fff, #a0a0a4); border-right: 1px solid #808080; border-bottom: 1px solid #808080; }
.tfp-grid td { height: 17px; line-height: 16px; padding: 0 2px; white-space: pre; overflow: hidden; background: #fff; border-right: 1px solid #c0c0c0; border-bottom: 1px solid #c0c0c0; }
.tfp-grid td.n { text-align: right; padding-right: 3px; }
.tfp-grid tr.sp td { line-height: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
/* DBGrid1DrawColumnCell (0xf5a9ac): RecNo ímpar → Brush $DFDFDF; gdSelected → Brush $F0CAA6 (#C9A6F0) e Font $800000 (#3c0080) e
   SelectedRows.CurrentRowSelected := True; CurrentRowSelected → FrameRect $FF0000 (#7700FF) de x = 0 até a borda da última coluna */
.tfp-grid tr.par td { background: #dfdfdf; }
.tfp-grid tr.sel td { background: #c9a6f0; color: #3c0080; box-shadow: inset 0 1px 0 #7700ff, inset 0 -1px 0 #7700ff; }
.tfp-grid tr.sel td:first-child { box-shadow: inset 1px 0 0 #7700ff, inset 0 1px 0 #7700ff, inset 0 -1px 0 #7700ff; }
.tfp-grid tr.sel td:last-child { border-right-color: #7700ff; }
/* realce FUN_010da034 (coluna = Ordem, texto achado): FillRect com Color da grade (clWindow) ou clHighlight na selecionada (apaga a moldura
   dentro da célula); texto na Font da grade (branco na selecionada); ocorrências em negrito, clRed (clYellow na selecionada) */
.tfp-grid tr td.rl { background: #fff; color: #000; box-shadow: none; }
.tfp-grid tr.sel td.rl { background: #6400d7; color: #fff; box-shadow: none; }
.tfp-grid td.rl b { color: #f00; }
.tfp-grid tr.sel td.rl b { color: #ff0; }
/* "Incluir novo registro": a manutenção do cadastro (outra página) num iframe por cima do TFPesquisa */
.tfp-inc { position: fixed; inset: 0; z-index: 3050; }
.tfp-inc iframe { width: 100%; height: 100%; border: 0; background: transparent; display: block; }
/* ShowMessage/ShowException quando a página não tem o diálogo do PE */
.tfp-dlg-ov { position: fixed; inset: 0; z-index: 3100; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.15); }
.tfp-dlg { background: #f0f0f0; border: 1px solid #555; min-width: 340px; max-width: 760px; box-shadow: 0 8px 30px rgba(0,0,0,.35); font: 13px "Segoe UI", Arial, sans-serif; }
.tfp-dlg-t { background: #5a00c0; color: #fff; padding: 4px 10px; font-weight: bold; font-size: 12px; }
.tfp-dlg-b { padding: 14px 16px; white-space: pre-wrap; }
.tfp-dlg-f { padding: 0 16px 12px; text-align: right; }
.tfp-dlg-f button { min-width: 80px; }
