/* ===================================================================
   css_sit_moderno.css  v8
   Paleta: navy #013466 | blue #075e93 | tint #dbecfc | steel #4f6c8a
   Injetar APÓS ThemeTecnisa.css na master page
   Fundo: cinza original do tema (#e9e9e9) — sem override
   =================================================================== */

/* ── 1. MASTER PAGE HEADER ────────────────────────────────────────*/
.TableMPCabecalho {
  background-image: none !important;
  background: linear-gradient(to bottom, #ffffff 0%, #f4f8fc 100%) !important;
  border-bottom: 3px solid #013466 !important;
}

/* ── 2. TOOLBAR ───────────────────────────────────────────────────*/
.TableToolBar, .TableToolBar_Personal {
  background-image: none !important;
  background: linear-gradient(to bottom, #c8dff0 0%, #aacde6 100%) !important;
  border-bottom: 2px solid #075e93 !important;
}

/* ── 3. GRUPOS / SEÇÕES ───────────────────────────────────────────*/
fieldset.Group, .Group {
  background-color: #ffffff !important;
  border: 1px solid #b8d4ea !important;
  border-radius: 5px !important;
}
legend.GroupTitle, .GroupTitle {
  color: #013466 !important;
  font-family: 'Segoe UI', system-ui, Arial, sans-serif !important;
  font-weight: 700 !important;
  padding: 0 6px !important;
}

/* ── 4. ÁREA DE CONTEÚDO ──────────────────────────────────────────*/
.TableConteudoGeral {
  background-color: #ffffff !important;
  border: 1px solid #b8d4ea !important;
  border-radius: 4px !important;
}

/* ── 5. INPUTS / SELECTS ──────────────────────────────────────────*/
input.Attribute,
select.Attribute,
textarea.Attribute {
  border: 1px solid #93bcd9 !important;
  border-radius: 3px !important;
  background-color: #ffffff !important;
  color: #1a2a3a !important;
  transition: border-color 0.15s ease !important;
}
input.Attribute:focus,
select.Attribute:focus,
textarea.Attribute:focus {
  border-color: #075e93 !important;
  box-shadow: 0 0 0 2px rgba(7, 94, 147, 0.20) !important;
  outline: none !important;
}

/* Readonly: fundo SÓ em inputs de formulário.
   *** NUNCA dar background a span.ReadonlyAttribute — os campos de
   grid são spans e o fundo cria retângulos flutuando no hover ***  */
input.ReadonlyAttribute,
select.ReadonlyAttribute,
textarea.ReadonlyAttribute {
  background-color: #f0f6fb !important;
  color: #4a6a84 !important;
}
span.ReadonlyAttribute {
  background-color: transparent !important;
}

/* ── 6. GRID — células de dados ───────────────────────────────────
   Padding horizontal 1px = original do GeneXus (cellpadding=1).
   Aumentar o horizontal desalinha as colunas da linha de títulos.
   Fonte 11px (12px também desalinha por expandir conteúdo).        */
table.Grid > tbody > tr > td,
table.WorkWith > tbody > tr > td {
  font-size: 11px !important;
  padding: 4px 1px !important;
}

/* ── 7. THEAD FANTASMA (linha de sizing) ──────────────────────────
   Grids multi-transacionais têm thead com células font-size:1pt
   invisíveis, só para definir larguras. Colapsar a linha remove o
   "segundo header" mantendo o sizing das colunas.
   Atenção: usar [style*="font-size:1pt"] — "1pt" sozinho pega 11pt */
table.Grid > thead > tr:has(> th[style*="font-size:1pt"]),
table.Grid > thead > tr:has(> td[style*="font-size:1pt"]),
table.WorkWith > thead > tr:has(> th[style*="font-size:1pt"]),
table.WorkWith > thead > tr:has(> td[style*="font-size:1pt"]) {
  visibility: collapse;
}
/* Padding mínimo nelas: o fantasma colapsado ainda dita a largura
   das colunas — padding maior alarga o grid e desalinha os títulos */
table.Grid > thead th[style*="font-size:1pt"],
table.Grid > thead td[style*="font-size:1pt"],
table.WorkWith > thead th[style*="font-size:1pt"],
table.WorkWith > thead td[style*="font-size:1pt"] {
  padding: 1px !important;
}

/* ── 8. CABEÇALHO REAL DO GRID (thead com texto) ──────────────────
   Escopo: só dentro de table.Grid/WorkWith (tabelas de layout têm
   .GridTitle fantasma também) e :not(font-size:1pt) exclui sizing  */
table.Grid > thead td.GridTitle:not([style*="font-size:1pt"]),
table.Grid > thead th.GridTitle:not([style*="font-size:1pt"]),
table.WorkWith > thead td.GridTitle:not([style*="font-size:1pt"]),
table.WorkWith > thead th.GridTitle:not([style*="font-size:1pt"]) {
  background-color: #013466 !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 5px 6px !important;
  letter-spacing: 0.02em !important;
}

/* ── 9. LINHA DE TÍTULOS LEGADA (bgcolor) ─────────────────────────
   Nos grids multi-transacionais os títulos ficam numa tabela
   separada acima do grid, células com atributo bgcolor="#4F6C8A"  */
td[bgcolor="#4F6C8A" i] {
  background-color: #013466 !important;
  color: #ffffff !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  padding: 4px 1px !important;
}
td[bgcolor="#4F6C8A" i] * {
  color: #ffffff !important;
  font-size: 11px !important;
}

/* ── 10. LINHAS ALTERNADAS ────────────────────────────────────────*/
tr.GridOdd > td, tr.GridOdd > th {
  background-color: #ffffff !important;
  color: #1a2a3a !important;
}
tr.GridEven > td, tr.GridEven > th {
  background-color: #edf5fc !important;
  color: #1a2a3a !important;
}

/* ── 11. HOVER ────────────────────────────────────────────────────*/
table.Grid > tbody > tr:hover > td,
table.Grid > tbody > tr:hover > th,
table.WorkWith > tbody > tr:hover > td,
table.WorkWith > tbody > tr:hover > th,
tr.GridHighlight > td,
tr.GridHighlight > th,
tr.gx-current-row > td,
tr.gx-current-row > th {
  background-color: #b8d8ef !important;
  color: #013466 !important;
  cursor: pointer;
}

/* ── 12. ÍCONES DE AÇÃO ───────────────────────────────────────────*/
.gx-image-link img {
  opacity: 0.70;
  transition: opacity 0.15s ease;
}
.gx-image-link:hover img {
  opacity: 1;
}

/* ── 13. PAGINAÇÃO — SVG moderno no lugar dos GIFs ────────────────*/
.PagingButtonsFirst,
.PagingButtonsPrevious,
.PagingButtonsNext,
.PagingButtonsLast,
.PagingButtonsFirst_Personal,
.PagingButtonsPrevious_Personal,
.PagingButtonsNext_Personal,
.PagingButtonsLast_Personal {
  background-color: #075e93 !important;
  border-radius: 4px !important;
  height: 22px !important;
  width: 22px !important;
  background-repeat: no-repeat !important;
  background-position: center center !important;
  background-size: 10px 10px !important;
  opacity: 0.90;
  transition: background-color 0.15s ease, opacity 0.15s ease !important;
  vertical-align: middle;
  margin: 0 2px !important;
  cursor: pointer !important;
}
.PagingButtonsFirst, .PagingButtonsFirst_Personal {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Crect x='0' y='1' width='2' height='8' fill='white'/%3E%3Cpolygon points='3,5 9,1 9,9' fill='white'/%3E%3C/svg%3E") !important;
}
.PagingButtonsPrevious, .PagingButtonsPrevious_Personal {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpolygon points='1,5 8,1 8,9' fill='white'/%3E%3C/svg%3E") !important;
}
.PagingButtonsNext, .PagingButtonsNext_Personal {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpolygon points='9,5 2,1 2,9' fill='white'/%3E%3C/svg%3E") !important;
}
.PagingButtonsLast, .PagingButtonsLast_Personal {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpolygon points='1,1 7,5 1,9' fill='white'/%3E%3Crect x='8' y='1' width='2' height='8' fill='white'/%3E%3C/svg%3E") !important;
}
.PagingButtonsFirst:hover, .PagingButtonsPrevious:hover,
.PagingButtonsNext:hover,  .PagingButtonsLast:hover,
.PagingButtonsFirst_Personal:hover, .PagingButtonsPrevious_Personal:hover,
.PagingButtonsNext_Personal:hover,  .PagingButtonsLast_Personal:hover {
  background-color: #013466 !important;
  opacity: 1;
}

/* ── 14. ERROS / VALIDAÇÃO ────────────────────────────────────────*/
.ErrorViewer, .gx-error-message, .ErrorAttribute {
  color: #c60b44 !important;
}