/*body{
background: radial-gradient(circle, rgba(68,137,214,1) 0%, rgba(107,102,222,1) 100%);
color: #fff;
}*/

.menu_direito{
  height: 86px;
  width: 80px;
  background-color: black;
  color: white;
  position: absolute;
  z-index: 2;
  opacity: 0;
  text-align: center;
  line-height: 26px;
  cursor: pointer;
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
}

.qvplaceholder, .qvobject {
  flex: 1 1 auto;
  height: 300px;
  min-width: 400px;
  margin: 45px 0 0 45px;
}

#popup {
  background-color: #c3534b;
  color: #FFFFFF;
  position: fixed;
  max-width: 250px;
  padding: 10px;
  margin: 10px;
  bottom: 0;
  right: 0;
  display: none;
  border-radius: 5px;
  z-index: 6;
  font-family: sans-serif;
}

.close {
  cursor: pointer;
  background: 0 0;
  border: 0;
  float: right;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  color: #000;
  text-shadow: 0 1px 0 #fff;
  opacity: .2;
  position: absolute;
  right: 9px;
  top: 7px;
}
.close:hover { opacity: .5; }
#popupText { margin-right: 23px; }

.altura_400{ height: 450px; }

/* tabela */
.custom-table { font-size: 14px; background-color: #f9f9f9; border-collapse: collapse; }
.custom-table th, .custom-table td { padding: 8px; text-align: left; }
.custom-table th { background-color: #343a40; color: #fff; font-weight: bold; font-size: 14px; }
.custom-table td { border: 1px solid #ddd; }
.custom-table tr:hover { background-color: #f1f1f1; }
.custom-table tbody tr:nth-child(even) { background-color: #f2f2f2; }

#custom-background {
  background: linear-gradient(159deg, rgba(11,25,196,1) 0%, rgba(150,190,252,1) 18%, rgba(255,255,255,1) 47%, rgba(255,255,255,1) 100%) !important;
}

/* paginação */
.pagination {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  gap: 5px;
  flex-wrap: wrap;
}
.pagination button {
  padding: 5px 10px;
  border: 1px solid #ccc;
  background-color: #f9f9f9;
  cursor: pointer;
  font-size: 14px;
  border-radius: 4px;
  min-width: 40px;
  text-align: center;
}
.pagination button.active { background-color: #007bff; color: white; border-color: #007bff; }
.pagination button:hover { background-color: #ddd; }
.pagination .dots { padding: 5px 10px; font-size: 14px; color: #555; cursor: default; }

#loading-spinner {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.6); z-index: 9999; align-items: center; justify-content: center; color: white;
}
.spinner-container { text-align: center; }
.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #fff;
  border-radius: 50%;
  width: 50px; height: 50px;
  animation: spin 1s linear infinite; margin: 0 auto 10px;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

#pagination-container { margin-top: 20px; text-align: center; }
#table-container { margin-bottom: 0; }

/* inputs filtro (combobox) */
.form-group label { font-size: 12px; margin-bottom: 4px; }
.form-group .form-control { height: 28px; padding: 2px 6px; font-size: 12px; }


#btn-clear-all { margin-left: 6px; }

#pagination-container {
    margin-top: 20px; /* Espaço entre a tabela e os botões de paginação */
    text-align: center; /* Centraliza os botões de paginação */
}


/* bloqueio leve de qualquer clique dentro da paginação */
#pagination-container.disabled { pointer-events: none; opacity: .5; }

/* feedback global de "ocupado" */
body.busy { cursor: wait; }


/* =====================================================================
   ACRÉSCIMOS — Consolidado: Empenhado, Liquidado e Pago
   (somente o necessário para filtros em container, KPIs, alerta e
    novos botões de exportação com imagem Qlik)
   ===================================================================== */

/* container branco dos filtros */
.filters-box {
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 16px 16px 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}

/* período: duas datas lado a lado */
.periodo-inputs { display: flex; align-items: center; gap: 6px; }
.periodo-inputs .form-control { flex: 1 1 0; min-width: 0; }
.periodo-sep { font-size: 12px; color: #6c757d; }

/* linha de ações: Pesquisar/Limpar à esquerda, exportação à direita */
.filters-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}
.filters-main-buttons .btn + .btn { margin-left: 6px; }

/* botões de exportação com imagem vinda de objeto Qlik */
.export-group { display: flex; gap: 12px; }
.export-btn {
  position: relative;
  width: 56px;            /* ajuste aqui se a imagem Qlik exigir mais espaço */
  height: 56px;
}
.export-img { position: absolute; top: 0; left: 0; right: 0; bottom: 0; }
.export-hit {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  z-index: 2;
  background: transparent;
  border: 0;
  color: transparent;     /* texto só aparece se a imagem não carregar */
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
}
.export-hit:focus { outline: 2px solid #007bff; outline-offset: 2px; }
.export-btn.no-img .export-hit { background: #343a40; color: #fff; border-radius: 4px; }
.export-btn.disabled { opacity: .5; pointer-events: none; }

/* alerta de filtros incompatíveis */
#alerta-filtros { display: none; padding-right: 40px; }

/* KPIs */
.kpi-row { margin-top: 16px; }
.kpi-card {
  background: #fff;
  border: 1px solid #dee2e6;
  border-left: 5px solid #0b19c4;
  border-radius: 8px;
  padding: 14px 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
  height: 100%;
}
.kpi-card.kpi-liquidado { border-left-color: #17a2b8; }
.kpi-card.kpi-pago      { border-left-color: #28a745; }
.kpi-card .kpi-label {
  font-size: 13px; color: #495057; text-transform: uppercase;
  letter-spacing: .03em; margin: 0 0 4px;
}
.kpi-card .kpi-value { font-size: 22px; font-weight: 700; color: #212529; margin: 0; word-break: break-word; }

/* nova tabela: quebras de linha em colunas compostas e valores à direita */
.custom-table td { white-space: pre-line; vertical-align: top; }
.custom-table td.num, .custom-table th.num { text-align: right; white-space: nowrap; }

/* celular */
@media (max-width: 575.98px) {
  .filters-actions { flex-direction: column; align-items: stretch; }
  .filters-main-buttons { display: flex; }
  .filters-main-buttons .btn { flex: 1 1 0; }
  .export-group { justify-content: center; }
  .kpi-card .kpi-value { font-size: 20px; }
}
