/* Paleta: #4f7cac azul do site (marca), #475f7f azul escuro (cabecalho). Antes: vermelho #94161a, #64c5b1 verde-agua. Neutro ao tema claro/escuro: nao forca texto nem fundo. */
html body{
  --mb-color-core-brand:#4f7cac !important;
  --mb-color-core-brand-hover:#3f6a96 !important;
  --mb-color-text-brand:#4f7cac !important;
  --mb-color-text-brand-hover:#3f6a96 !important;
  --mb-color-border-brand:#4f7cac !important;
  --mb-color-background:#FFFFFF !important;
  --mb-color-bg-dashboard:#FFFFFF !important;
  --mb-color-bg-dashboard-card:#FFFFFF !important;
  --mb-color-text-primary:#111827 !important;
  --mb-color-text-secondary:#374151 !important;
}
/* cards do dashboard: cantos retos, sem sombra */
[data-testid="dashcard"]{border-radius:0 !important;box-shadow:none !important;border:1px solid #E5E7EB !important}
/* tabelas: quadradas e compactas */
[data-testid="table-root"]{border-radius:0 !important}
[data-testid="table-header"] [role="row"]{height:28px !important;background:#475f7f !important}
[data-testid="table-header"] [role="columnheader"],[data-testid="table-header"] [role="columnheader"] *{color:#fff !important}
[data-testid="table-body"] [role="row"]{height:26px !important;min-height:26px !important}
[data-testid="table-body"] [role="gridcell"]{height:26px !important;min-height:0 !important;padding-top:0 !important;padding-bottom:0 !important;line-height:1.1 !important;color:#111827 !important}
[data-testid="table-body"] [role="gridcell"] *{line-height:1.1 !important;color:#111827 !important}
/* zebra translucida (classe via pexinxa.js) funciona em tema claro e escuro */
[data-testid="table-body"] [role="row"].pex-impar [role="gridcell"]{background:rgba(128,128,128,.16) !important}
[data-testid="table-body"] [role="row"]:hover [role="gridcell"]{background:rgba(79,124,172,.16) !important}
/* sem espaco entre cards: a grade deixa 6px de margem; cada card cresce 3px por lado e as bordas se encostam */
[data-testid="dashcard"]{margin:-3px !important;width:calc(100% + 6px) !important;height:calc(100% + 6px) !important}
/* cabecalho da tabela em negrito */
[data-testid="table-header"] [role="columnheader"],[data-testid="table-header"] [role="columnheader"] *{font-weight:700 !important}
/* cards de numeros (scalar): faixa vermelha lateral, numero em negrito */
[data-testid="dashcard"]:has([data-testid="scalar-container"]){border-left:5px solid #4f7cac !important;background:#FFFFFF !important}
[data-testid="scalar-value"]{font-weight:700 !important;color:#111827 !important}
/* rodape da tabela: uma linha, "ITENS 33  COMPRA R$ ...", tudo em negrito, linha fina cinza no topo */
[data-testid="table-footer"]{height:36px !important;background:#FFFFFF !important;border-top:1px solid #D1D5DB !important;padding:0 16px !important;align-items:center !important}
[data-testid="table-footer"] > span{display:flex !important;flex-wrap:nowrap;align-items:baseline;gap:32px;width:100%;overflow:hidden}
[data-testid="table-footer"] .pex-chip{display:inline-flex;flex-direction:row;align-items:baseline;gap:8px;padding:0;margin:0;border:0;background:transparent;white-space:nowrap}
[data-testid="table-footer"] .pex-chip-l{color:#374151;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
[data-testid="table-footer"] .pex-chip-v{color:#111827;font-size:14px;font-weight:700}
/* filtros do dashboard: texto escuro em vez do vermelho da marca, valor em negrito */
[data-testid="fixed-width-filters"],[data-testid="dashboard-parameters-widget-container"],[data-testid="parameters-container"],[data-testid="parameter-value-dropdown"]{
  --mb-color-text-brand:#111827 !important;--mb-color-text-brand-hover:#000 !important;--mb-color-core-brand:#374151 !important;--mb-color-border-brand:#9CA3AF !important}
[data-testid="fixed-width-filters"] button,[data-testid="parameters-container"] button{color:#111827 !important;background:#F9FAFB !important;border:1px solid #D1D5DB !important;border-radius:0 !important}
[data-testid="fixed-width-filters"] button *,[data-testid="parameters-container"] button *{color:#111827 !important}
[data-testid="fixed-width-filters"] button b,[data-testid="parameters-container"] button b,[data-testid="fixed-width-filters"] button strong{font-weight:700 !important}

/* sem espaço lateral: cards e tabelas encostam nas bordas da tela */
[data-testid="dashboard-grid"]{padding-left:0 !important;padding-right:0 !important;max-width:none !important;margin-left:0 !important;margin-right:0 !important}
[data-testid="dashboard-parameters-and-cards"]{padding-left:0 !important;padding-right:0 !important}

/* impressao/PDF de um card (JS monta #pex-print) */
#pex-print{position:fixed;left:-100000px;top:0;background:#FFFFFF}
.pex-page{box-sizing:border-box;padding:20px;background:#FFFFFF;overflow:hidden}
.pex-print-title{font-size:16px;font-weight:700;margin:0 0 10px;color:#111827}
@media print{
  html.pex-printing body>*:not(#pex-print){display:none !important}
  html.pex-printing,html.pex-printing body{background:#FFFFFF !important;height:auto !important;overflow:visible !important}
  html.pex-printing #pex-print{position:static !important;left:auto !important;top:auto !important}
  html.pex-printing .pex-page{break-after:page;page-break-after:always}
  html.pex-printing .pex-page:last-child{break-after:auto;page-break-after:auto}
  html.pex-printing *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}

/* links publicos: sem o bloco do titulo; um selo pequeno no canto (ex.: VOX) */
[data-testid="embed-frame-header"]{position:relative !important;min-height:40px}
[data-testid="embed-frame-header"] > div:has(> [data-testid="fixed-width-dashboard-header"]){display:none !important}
[data-testid="embed-frame-header"][data-pex-badge]::after{content:attr(data-pex-badge);position:absolute;right:24px;top:9px;
  background:#475f7f;color:#FFFFFF;font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;
  padding:3px 10px;border-radius:2px;line-height:1.4;pointer-events:none}

/* links publicos: sem o rodape "Powered by Metabase" */
[data-testid="embedding-footer"]{display:none !important}
