/* Fase 1 — port fivedesk-report.css scoped */
#page-relatorios.page{ display:flex; flex-direction:column; min-height:0; overflow:auto; box-sizing:border-box; }

/* Faixa-resumo de filtros aplicados (Período / Classificação) — removida. */
#page-relatorios #biFilterBanner,
#page-relatorios #biClientBanner {
  display: none !important;
}

#page-relatorios .relatorios-fd.content{
  flex:1; width:100%; max-width:none; margin:0;
  --rel-stack-gap:1rem;
  --radius-card:var(--fd-radius-card, 0.25rem);
  /* Scrollbars internas (cards) = mesma azul/transparência das listas suspensas de filtro */
  --rel-scroll-thumb:rgba(10,120,240,.28);
  --rel-scroll-thumb-hover:rgba(10,120,240,.42);
  padding:var(--fd-filterbar-page-pad-top, 0.625rem) 1.75rem 3rem; min-width:0; box-sizing:border-box;
}

/* Topbar: Relatórios + subtítulo Central de Indicadores */
#topbarPageTitleRelatorios,
#topbarPageSubtitleRelatorios,
.topbar-relatorios-head{
  display:none !important;
}
.main-content:has(#page-relatorios.active) .app-topbar{
  justify-content:space-between !important;
  gap:1rem;
}
.main-content:has(#page-relatorios.active) .app-topbar-left{
  display:flex !important;
  flex-direction:row;
  align-items:center;
  justify-content:flex-start;
  min-width:0;
  flex:1 1 auto;
  gap:0.875rem;
}
.main-content:has(#page-relatorios.active) .topbar-relatorios-head{
  display:flex !important;
  flex-direction:column;
  align-items:flex-start;
  justify-content:center;
  gap:0.125rem;
  min-width:0;
  align-self:stretch;
}
.main-content:has(#page-relatorios.active) #topbarPageTitleRelatorios{
  display:block !important;
  align-self:auto !important;
}
.main-content:has(#page-relatorios.active) #topbarPageSubtitleRelatorios{
  display:block !important;
}
.main-content:has(#page-relatorios.active) .topbar-chats-head,
.main-content:has(#page-relatorios.active) #topbarPageTitleChats,
.main-content:has(#page-relatorios.active) #topbarPageTitleDashboard,
.main-content:has(#page-relatorios.active) #topbarPageTitleClientes,
.main-content:has(#page-relatorios.active) #topbarPageSubtitleClientes,
.main-content:has(#page-relatorios.active) #topbarPageTitleAcompanhamento,
.main-content:has(#page-relatorios.active) #topbarPageSubtitleAcompanhamento{
  display:none !important;
}
.main-content:has(#page-relatorios.active) .app-topbar-actions{
  flex-shrink:0;
}

/* port fivedesk-app.css (filterbar + fselect + chips + mais) — escopo Relatórios */
#page-relatorios .relatorios-fd .filterbar{ display:flex; gap:0.75rem; align-items:center; flex-wrap:wrap; margin-bottom:0.875rem; }
#page-relatorios .relatorios-fd .fselect{ position:relative; }
#page-relatorios .relatorios-fd .fselect select{
  appearance:none; height:2.875rem; border:0.0625rem solid var(--line); border-radius:var(--radius-card, 0.25rem); background:var(--surface);
  font-family:inherit; font-size:0.84375rem; font-weight:600; color:var(--rel-ink-2); cursor:pointer; outline:none; transition:.16s;
}
#page-relatorios .relatorios-fd .fselect select:focus{ border-color:var(--blue); box-shadow:0 0 0 0.25rem rgba(var(--rel-accent-rgb),.13); }
#page-relatorios .relatorios-fd .fselect svg{
  position:absolute; right:0.8125rem; top:50%; transform:translateY(-50%); width:1rem; height:1rem; color:var(--rel-icon-muted); pointer-events:none;
}
html[data-theme="dark"] #page-relatorios .relatorios-fd .fselect select{ color:#c2cee6; }
#page-relatorios .relatorios-fd .morefilters{
  display:inline-flex; align-items:center; gap:0.5625rem; height:2.875rem; padding:0 1rem; border:0.0625rem solid var(--line);
  border-radius:var(--radius-card, 0.25rem); background:var(--surface); font-family:inherit; font-size:0.84375rem; font-weight:600; color:var(--rel-ink-2);
  cursor:pointer; transition:.16s; box-shadow:none;
}
#page-relatorios .relatorios-fd .morefilters:hover{ background:var(--field); }
html[data-theme="dark"] #page-relatorios .relatorios-fd .morefilters{ color:#c2cee6; }
#page-relatorios .relatorios-fd .chips{ display:flex; align-items:center; gap:0.5rem; flex-wrap:wrap; margin-bottom:1.75rem; }
#page-relatorios .relatorios-fd .chips .lead{ font-size:0.78125rem; color:var(--muted); font-weight:600; margin-right:0.125rem; }
#page-relatorios .relatorios-fd .chip{
  display:inline-flex; align-items:center; gap:0.4375rem; height:1.875rem; padding:0 0.625rem 0 0.75rem; border-radius:62.4375rem;
  background:rgba(var(--rel-accent-rgb),.08); border:0.0625rem solid rgba(var(--rel-accent-rgb),.22); font-size:0.78125rem; font-weight:600; color:#3d6ea8;
}
#page-relatorios .relatorios-fd .chip b{ font-weight:700; color:#1f4f93; }
#page-relatorios .relatorios-fd .chip .x{
  width:1rem; height:1rem; border-radius:50%; display:flex; align-items:center; justify-content:center; cursor:pointer;
  color:#7ba2d8; transition:.13s; border:0; background:none; padding:0;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chip .x{ color:var(--rel-ink-muted); }
#page-relatorios .relatorios-fd .chip .x:hover{ background:rgba(var(--rel-accent-rgb),.15); color:#1f4f93; }
#page-relatorios .relatorios-fd .chip .x svg{ width:0.625rem; height:0.625rem; }
#page-relatorios .relatorios-fd .chips .clear{
  margin-left:auto; font-size:0.8125rem; font-weight:600; color:var(--muted); cursor:pointer; background:none; border:0; font-family:inherit;
}
#page-relatorios .relatorios-fd .chips .clear:hover{ color:var(--rel-danger-bright); }
html[data-theme="dark"] #page-relatorios .relatorios-fd .chip{
  background:rgba(59,155,255,.12); border-color:rgba(59,155,255,.3); color:#9cc6ff;
}
html[data-theme="dark"] #page-relatorios .relatorios-fd .chip b{ color:#cfe3ff; }

/* ============================================================
   FiveDesk — Relatórios (report builder + gráficos)
   Depende de fivedesk-theme.css + fivedesk-app.css
   ============================================================ */

/* ---------- sub-navegação por contexto (genérica · todas as páginas) ----------
   Cada indicador organiza seus gráficos em sub-abas, evitando scroll infinito. */
#page-relatorios .relatorios-fd .subnav{ display:flex; gap:0.375rem; padding:1.125rem 1.375rem 0.5rem; overflow-x:auto; scrollbar-width:thin; }
#page-relatorios .relatorios-fd .subnav::-webkit-scrollbar{ height:0.3125rem; } #page-relatorios .relatorios-fd .subnav::-webkit-scrollbar-thumb{ background:var(--line); border-radius:0.1875rem; }
#page-relatorios .relatorios-fd .subtab{ flex:none; display:inline-flex; align-items:center; gap:0.5rem; height:2.375rem; padding:0 0.9375rem; border:0.0625rem solid var(--line);
  border-radius:var(--radius-card, 0.25rem); background:var(--surface); font-family:inherit; font-size:0.78125rem; font-weight:700; color:var(--muted);
  cursor:pointer; transition:.15s cubic-bezier(.22,1,.36,1); white-space:nowrap; box-shadow:none; }
#page-relatorios .relatorios-fd .subtab .ti{ width:1rem; height:1rem; flex:none; } #page-relatorios .relatorios-fd .subtab .ti svg{ width:1rem; height:1rem; display:block; }
#page-relatorios .relatorios-fd .subtab:hover{ color:var(--ink); border-color:#cfdbef; }
html[data-theme="dark"] #page-relatorios .relatorios-fd .subtab:hover{ border-color:rgba(127,182,255,.34); }
#page-relatorios .relatorios-fd .subtab.on{ background:var(--blue); color:#fff; border-color:transparent;
  box-shadow:none; }
#page-relatorios .relatorios-fd .subtab.on .ti{ color:#fff; }
#page-relatorios .relatorios-fd .subtab.on .tw{ background:rgba(var(--rel-surface-rgb),.22); color:#fff; }
#page-relatorios .relatorios-fd .subtab .tw{ display:inline-flex; align-items:center; justify-content:center; min-width:1.125rem; height:1.125rem; padding:0 0.3125rem; border-radius:0.375rem;
  background:rgba(207,59,64,.12); color:var(--rel-danger); font-size:0.625rem; font-weight:800; }
html[data-theme="dark"] #page-relatorios .relatorios-fd .subtab .tw{ background:rgba(207,59,64,.2); color:#f1797d; }
#page-relatorios .relatorios-fd .subtab:focus-visible{ outline:0.125rem solid var(--blue); outline-offset:0.125rem; }
#page-relatorios .relatorios-fd .subtab.on,
#page-relatorios .relatorios-fd .subtab.on:focus,
#page-relatorios .relatorios-fd .subtab.on:focus-visible{
  outline:none; box-shadow:none;
}
/* Sub-abas Departamentos e Financeiro: mesma largura do Nublado. */
#page-relatorios .relatorios-fd #depSubnav{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:0.375rem;
  align-items:stretch;
  overflow:visible;
}
#page-relatorios .relatorios-fd #finSubnav{
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(0, 1fr));
  gap:0.375rem;
  align-items:stretch;
  overflow:visible;
}
#page-relatorios .relatorios-fd #depSubnav .subtab,
#page-relatorios .relatorios-fd #finSubnav .subtab{
  width:100%;
  min-width:0;
  justify-content:center;
  box-sizing:border-box;
}

/* Dia: sub-abas com azul difuso por toda a extensão, sem direção linear. */
#page-relatorios .relatorios-fd :is(#depSubnav,#finSubnav) .subtab,
#page-relatorios .relatorios-fd :is(#depSubnav,#finSubnav) .subtab:not(.on){
  background:
    radial-gradient(circle at 16% 24%, rgba(255,255,255,.42) 0, rgba(255,255,255,.14) 25%, transparent 48%),
    radial-gradient(circle at 72% 76%, rgba(12,91,194,.30) 0, transparent 48%),
    radial-gradient(circle at 92% 12%, rgba(137,204,255,.42) 0, transparent 38%),
    #4b95e8;
  border-color:rgba(24,105,198,.30);
  color:#fff;
  box-shadow:inset 0 0.0625rem rgba(255,255,255,.30),inset 0 0 1.125rem rgba(255,255,255,.08);
  text-shadow:0 0.0625rem rgba(9,54,108,.42);
}
#page-relatorios .relatorios-fd :is(#depSubnav,#finSubnav) .subtab:hover{
  background:
    radial-gradient(circle at 22% 30%, rgba(255,255,255,.52) 0, rgba(255,255,255,.17) 28%, transparent 50%),
    radial-gradient(circle at 74% 70%, rgba(9,78,172,.34) 0, transparent 50%),
    radial-gradient(circle at 90% 14%, rgba(163,218,255,.50) 0, transparent 40%),
    #559fed;
  border-color:rgba(20,96,185,.44);
  color:#fff;
}
#page-relatorios .relatorios-fd :is(#depSubnav,#finSubnav) .subtab.on,
#page-relatorios .relatorios-fd :is(#depSubnav,#finSubnav) .subtab.on:hover{
  background:
    radial-gradient(circle at 18% 22%, rgba(255,255,255,.48) 0, rgba(255,255,255,.14) 27%, transparent 49%),
    radial-gradient(circle at 68% 78%, rgba(0,63,148,.38) 0, transparent 52%),
    radial-gradient(circle at 88% 18%, rgba(123,201,255,.48) 0, transparent 40%),
    #267bd8;
  border-color:rgba(9,78,163,.48);
  color:#fff;
  box-shadow:inset 0 0.0625rem rgba(255,255,255,.34),inset 0 0 1.25rem rgba(255,255,255,.08);
}
/* Subpáginas (.subnav / .prj-nav): só rótulo; ícones ficam na Central (.indic .in-ic). */
#page-relatorios .relatorios-fd .subnav .subtab .ti,
#page-relatorios .relatorios-fd .prj-nav .prj-tab .ti,
#page-relatorios .relatorios-fd .subnav .subtab > svg,
#page-relatorios .relatorios-fd .prj-nav .prj-tab > svg{
  display:none !important;
  width:0 !important;
  height:0 !important;
  overflow:hidden !important;
  margin:0 !important;
  padding:0 !important;
}
#page-relatorios .relatorios-fd .subsector{ display:none; }
#page-relatorios .relatorios-fd .subsector.on{ display:block; animation:subsec-fade .35s cubic-bezier(.22,1,.36,1) both; }
@keyframes subsec-fade{ from{ opacity:0; transform:translateY(0.5rem); } to{ opacity:1; transform:none; } }
@media (prefers-reduced-motion: reduce){ #page-relatorios .relatorios-fd .subsector.on{ animation:none; } }

#page-relatorios .relatorios-fd .anl-empty-state{
  min-height:7rem;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0.4375rem;
  padding:1.375rem 1.5rem;
  border:0.0625rem dashed #cbd8ea;
  border-radius:var(--radius-card);
  background:linear-gradient(180deg,rgba(246,249,254,.92),rgba(var(--rel-surface-rgb),.84));
  color:#6b7a94;
  text-align:center;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .anl-empty-state{ border:0.0625rem dashed var(--rel-line); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .anl-empty-state{ background:linear-gradient(180deg,rgba(172,179,188,.92),var(--surface)); }
/* Piso fixo dos hosts de gráfico em todas as visões (vazio / loading / sem série) */
#page-relatorios .relatorios-fd .plot .gridbars{
  min-height:28.125rem;
}
#page-relatorios .relatorios-fd .spanel .sp-body:has(> .anl-empty-state),
#page-relatorios .relatorios-fd .dpanel .dp-body:has(> .anl-empty-state),
#page-relatorios .relatorios-fd .fpanel .fp-body:has(> .fin-empty),
#page-relatorios .relatorios-fd .spanel .sp-body:has(> .fin-empty),
#page-relatorios .relatorios-fd .dpanel .dp-body:has(> .fin-empty){
  min-height:17.5rem;
  display:flex;
  flex-direction:column;
  justify-content:center;
}
#page-relatorios .relatorios-fd .visao .visao-cat-plot{
  min-height:8.25rem;
}
#page-relatorios .relatorios-fd .visao .visao-evol-chart-wrap,
#page-relatorios .relatorios-fd .visao .visao-evol-1d-chart{
  min-height:var(--visao-pair-body-h, 14.625rem);
}
#page-relatorios .relatorios-fd .anl-empty-state .anl-empty-kicker{
  font-size:0.75rem;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--rel-ink-2);
}
#page-relatorios .relatorios-fd .anl-empty-state p{
  max-width:35rem;
  margin:0;
  font-size:0.78125rem;
  font-weight:600;
  line-height:1.45;
}
#page-relatorios .relatorios-fd .riskmap-wrap.has-empty{
  min-height:20rem;
}
#page-relatorios .relatorios-fd .riskmap-wrap.has-empty svg{
  min-height:20rem;
  opacity:.45;
}
#page-relatorios .relatorios-fd .riskmap-wrap.has-empty .anl-empty-state{
  position:absolute;
  inset:50% auto auto 50%;
  width:min(32.5rem,calc(100% - 3rem));
  min-height:8.125rem;
  transform:translate(-50%,-50%);
  box-shadow:0 1.125rem 2.5rem -1.75rem rgba(var(--rel-ink-rgb),.28);
}
#page-relatorios .relatorios-fd .at-empty-row td{
  padding:1.125rem 0 0.375rem!important;
  border-top:0.0625rem solid var(--line);
  text-align:center!important;
}


/* ---------- tokens de elevação multicamada (Sprint 2) ----------
   Profundidade em camadas cria figura/fundo: sombra de contato curta
   + sombra ambiente difusa + halo interno de luz no topo. */
#page-relatorios .relatorios-fd{
  --rel-pagination-footer-bg:color-mix(in srgb, var(--blue,#007bff) 11%, var(--surface,#fff));
  font-family: var(--font, 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif);
  -webkit-font-smoothing: antialiased;
  --elev-1: 0 0.0625rem 0.125rem rgba(13,40,80,.05), 0 0.125rem 0.375rem -0.125rem rgba(13,40,80,.08);
  --elev-2: 0 0.0625rem 0.125rem rgba(13,40,80,.06), 0 0.375rem 0.875rem -0.375rem rgba(13,40,80,.14), 0 0.875rem 1.875rem -1rem rgba(13,40,80,.16);
  --elev-3: 0 0.0625rem 0 rgba(255,255,255,.85) inset, 0 0.125rem 0.25rem rgba(13,40,80,.05),
            0 0.875rem 1.875rem -0.75rem rgba(13,40,80,.20), 0 2.5rem 4.375rem -2.5rem rgba(13,40,80,.30);
  --recess: inset 0 0.0625rem 0.125rem rgba(13,40,80,.05);
}
html[data-theme="dark"] #page-relatorios .relatorios-fd{
  --elev-1: 0 0.0625rem 0.125rem rgba(0,0,0,.28), 0 0.125rem 0.375rem -0.125rem rgba(0,0,0,.38);
  --elev-2: 0 0.0625rem 0.125rem rgba(0,0,0,.32), 0 0.375rem 0.875rem -0.375rem rgba(0,0,0,.42), 0 0.875rem 1.875rem -1rem rgba(0,0,0,.48);
  --elev-3: 0 0.0625rem 0 rgba(255,255,255,.06) inset, 0 0.125rem 0.25rem rgba(0,0,0,.28),
            0 0.875rem 1.875rem -0.75rem rgba(0,0,0,.52), 0 2.5rem 4.375rem -2.5rem rgba(0,0,0,.58);
  --recess: inset 0 0.0625rem 0.125rem rgba(0,0,0,.24);
}

/* ---------- ZONA DE CONFIGURAÇÃO (Gestalt: região comum) ----------
   Tudo o que "configura" vive numa superfície recuada e tingida,
   visualmente distinta da zona de "resultado" (cartões elevados). */
#page-relatorios .relatorios-fd .config-panel{ position:relative; background:linear-gradient(180deg,#eef3fa,#e9eff8); border:0.0625rem solid #dde6f2;
  border-radius:var(--radius-card); padding:1rem 1rem 0.875rem; box-shadow:var(--recess); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .config-panel{ border:0.0625rem solid var(--rel-line); }
#page-relatorios .relatorios-fd .config-tab{ display:inline-flex; align-items:center; gap:0.4375rem; margin:0.125rem 0 0.8125rem 0.25rem; font-size:0.65625rem; font-weight:800;
  letter-spacing:.09em; text-transform:uppercase; color:var(--rel-icon-muted); }
#page-relatorios .relatorios-fd .config-tab svg{ width:0.9375rem; height:0.9375rem; color:var(--rel-ink-muted); }

/* ---------- builder / tipo de indicadores ---------- */
#page-relatorios .relatorios-fd .builder{ background:var(--surface); border:0.0625rem solid var(--line); border-radius:var(--radius-card);
  box-shadow:var(--elev-1); padding:0.9375rem 1.125rem 1.0625rem; margin-bottom:0.75rem; }
#page-relatorios .relatorios-fd .builder .b-lab{ font-size:0.65625rem; font-weight:800; letter-spacing:.08em; text-transform:uppercase; color:var(--rel-ink-muted); }
#page-relatorios .relatorios-fd .ind-head{ display:flex; align-items:baseline; gap:0.75rem; margin-bottom:0.75rem; }
#page-relatorios .relatorios-fd .ind-note{ font-size:0.75rem; color:var(--muted); }

/* indicator row — ícones direto sobre o painel (sem card intermediário) */
#page-relatorios .relatorios-fd .indic-row{ display:flex; gap:0.5625rem; background:transparent; border:0; border-radius:0; padding:0.1875rem 0 0.1875rem;
  margin-bottom:0; overflow:visible; }
#page-relatorios .relatorios-fd .indic-row::-webkit-scrollbar{ height:0.375rem; }
#page-relatorios .relatorios-fd .indic-row::-webkit-scrollbar-thumb{ background:var(--line); border-radius:0.1875rem; }
#page-relatorios .relatorios-fd .indic{ flex:1 1 0; min-width:0; display:flex; align-items:center; justify-content:center; gap:0.625rem; padding:0 1rem; height:3.625rem;
  border:0.0625rem solid rgba(255,255,255,.28); border-radius:var(--radius-card); background:rgba(var(--rel-surface-rgb),.26);
  box-shadow:inset 0 0.0625rem rgba(255,255,255,.14); backdrop-filter:blur(0.625rem); -webkit-backdrop-filter:blur(0.625rem);
  font-family:inherit; cursor:pointer;
  transition:background .16s cubic-bezier(.22,1,.36,1), border-color .16s cubic-bezier(.22,1,.36,1), box-shadow .16s cubic-bezier(.22,1,.36,1), color .16s cubic-bezier(.22,1,.36,1);
  position:relative; scroll-snap-align:start; color:#fff; transform:none; }
#page-relatorios .relatorios-fd .indic .in-ic{ display:flex; align-items:center; justify-content:center; color:inherit; transition:.16s; flex:none; }
#page-relatorios .relatorios-fd .indic .in-ic svg{ width:1.4375rem; height:1.4375rem; }
/* rótulo curto visível DENTRO do botão (ícone + nome) — é menu de acesso, sem microdados */
#page-relatorios .relatorios-fd .indic .in-tx{ display:flex; min-width:0; }
#page-relatorios .relatorios-fd .indic .in-t{ font-size:0.875rem; font-weight:700; color:inherit; letter-spacing:-0.00625rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#page-relatorios .relatorios-fd .indic .in-s{ display:none; }

/* HOVER (inativos) — mantém o ghost atual; sem translate (quebra backdrop nos vizinhos). */
#page-relatorios .relatorios-fd .indic:not(.on):not([data-soon]):hover{
  background:rgba(var(--rel-surface-rgb),.36);
  border-color:rgba(255,255,255,.55);
  color:#fff;
  box-shadow:inset 0 0.0625rem rgba(255,255,255,.18), 0 0.25rem 0.75rem rgba(15,42,74,.14);
}

/* FOCO via teclado */
#page-relatorios .relatorios-fd .indic:focus-visible{ outline:0.125rem solid var(--blue); outline-offset:0.125rem; }
#page-relatorios .relatorios-fd .indic.on:focus,
#page-relatorios .relatorios-fd .indic.on:focus-visible{
  outline:none;
}

/* ATIVO — branco sólido, como a aba selecionada em Tarefas. */
#page-relatorios .relatorios-fd .indic.on{
  background:rgba(var(--rel-surface-rgb),.96);
  border-color:rgba(255,255,255,.95);
  box-shadow:0 0.125rem 0.5rem rgba(var(--rel-shadow-deep-rgb),.16);
  color:var(--rel-accent-deep);
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
  overflow:hidden;
}
/* Poeira cósmica ofuscada só no ativo — sem mudar o preenchimento do botão. */
#page-relatorios .relatorios-fd .indic.on::before{
  content:"";
  position:absolute;
  inset:-30%;
  z-index:0;
  pointer-events:none;
  background-image:
    radial-gradient(0.09375rem 0.09375rem at 10% 24%, rgba(var(--rel-thead-3-rgb),.55), transparent),
    radial-gradient(0.075rem 0.075rem at 22% 72%, rgba(var(--rel-thead-4-rgb),.5), transparent),
    radial-gradient(0.10625rem 0.10625rem at 38% 18%, rgba(var(--rel-thead-3-rgb),.45), transparent),
    radial-gradient(0.08125rem 0.08125rem at 52% 58%, rgba(var(--rel-thead-2-rgb),.48), transparent),
    radial-gradient(0.1rem 0.1rem at 68% 34%, rgba(var(--rel-thead-4-rgb),.52), transparent),
    radial-gradient(0.075rem 0.075rem at 78% 80%, rgba(var(--rel-thead-3-rgb),.42), transparent),
    radial-gradient(0.1125rem 0.1125rem at 88% 14%, rgba(var(--rel-thead-2-rgb),.5), transparent),
    radial-gradient(0.08125rem 0.08125rem at 94% 46%, rgba(var(--rel-thead-4-rgb),.46), transparent);
  background-size:8.75rem 6.875rem, 7.5rem 9.375rem, 10rem 6.25rem, 8.125rem 8.75rem, 9.375rem 7.5rem, 6.875rem 8.125rem, 10.625rem 5.9375rem, 7.8125rem 7.1875rem;
  opacity:.38;
  filter:blur(0.04375rem);
  mix-blend-mode:multiply;
}
#page-relatorios .relatorios-fd .indic.on > *{
  position:relative;
  z-index:1;
}
#page-relatorios .relatorios-fd .indic.on .in-ic{ color:var(--blue); }
#page-relatorios .relatorios-fd .indic.on .in-ic svg{ width:1.5rem; height:1.5rem; }

/* Hover também no selecionado — sem translate (mantém o visual dos demais). */
#page-relatorios .relatorios-fd .indic.on:not([data-soon]):hover{
  background:rgba(var(--rel-surface-rgb),.96);
  border-color:rgba(255,255,255,.95);
  color:var(--rel-accent-deep);
  box-shadow:0 0.125rem 0.5rem rgba(var(--rel-shadow-deep-rgb),.16);
}

/* EM BREVE — discreto, sem clique vazio */
#page-relatorios .relatorios-fd .indic[data-soon]{ opacity:.42; cursor:default; }
#page-relatorios .relatorios-fd .indic[data-soon]:hover{ box-shadow:none; transform:none; color:#8693a8; }
#page-relatorios .relatorios-fd .indic[data-soon] .soon-tag{ display:none; }

/* ---------- filtros em linha única (todos do mesmo tamanho) ---------- */
/* botões de filtro com degradê azul-claro (mantendo identidade) */
#page-relatorios .relatorios-fd .filterbar.fb-line .fdsel-trigger, #page-relatorios .relatorios-fd .filterbar.fb-line .morefilters{
  background:var(--surface) !important;
  border-color:var(--line) !important;
}
#page-relatorios .relatorios-fd .filterbar.fb-line .fdsel-trigger:hover, #page-relatorios .relatorios-fd .filterbar.fb-line .morefilters:hover{
  background:var(--field) !important;
  border-color:#cfdbef !important;
}
#page-relatorios .relatorios-fd .filterbar.fb-line .fdsel-trigger .fdsel-chev, #page-relatorios .relatorios-fd .filterbar.fb-line .morefilters svg{ color:var(--blue); }
html[data-theme="dark"] #page-relatorios .relatorios-fd .filterbar.fb-line .fdsel-trigger,
#page-relatorios .relatorios-fd [data-theme="dark"] .filterbar.fb-line .fdsel-trigger,
html[data-theme="dark"] #page-relatorios .relatorios-fd .filterbar.fb-line .morefilters,
#page-relatorios .relatorios-fd [data-theme="dark"] .filterbar.fb-line .morefilters{
  background:var(--surface) !important;
  border-color:var(--line) !important;
}
#page-relatorios .relatorios-fd [data-theme="cinza"] .filterbar.fb-line .fdsel-trigger,#page-relatorios .relatorios-fd [data-theme="cinza"] .filterbar.fb-line .morefilters{
  background:var(--surface) !important;
  border-color:var(--line) !important;
}

#page-relatorios .relatorios-fd .config-panel .filterbar.fb-line{ background:var(--surface); border:0.0625rem solid var(--line); border-radius:var(--radius-card);
  box-shadow:var(--elev-1); padding:0.625rem 0.75rem; margin-bottom:0.75rem; }
#page-relatorios .relatorios-fd .config-panel .chips{ margin:0 0.125rem; }
#page-relatorios .relatorios-fd .filterbar.fb-line{ display:flex; flex-wrap:nowrap; gap:0.5625rem; align-items:stretch; }
#page-relatorios .relatorios-fd .more-pop{ display:none; }
#page-relatorios .relatorios-fd .more-pop.open{ display:block; }
#page-relatorios .relatorios-fd .filterbar.fb-line .fselect{ flex:1 1 0; min-width:0; }
#page-relatorios .relatorios-fd .filterbar.fb-line .fselect select{ width:100%; height:2.875rem; font-size:0.8125rem; padding:0 1.875rem 0 0.75rem; }
#page-relatorios .relatorios-fd .filterbar.fb-line .fselect svg{ right:0.6875rem; }
#page-relatorios .relatorios-fd .filterbar.fb-line .morewrap{ flex:1 1 0; min-width:0; position:relative; }
#page-relatorios .relatorios-fd .filterbar.fb-line .morefilters{ width:100%; height:2.875rem; justify-content:center; gap:0.5rem; }
#page-relatorios .relatorios-fd .filterbar.fb-line .morefilters svg{ width:1.0625rem; height:1.0625rem; flex:none; }
@media (max-width: 0px) /* ui-scale-freeze: was 1400px */{
  #page-relatorios .relatorios-fd .indic-row{
    flex-wrap:wrap;
    overflow:visible;
  }
  #page-relatorios .relatorios-fd .indic{
    flex:1 1 calc(33.333% - 0.375rem);
    min-width:9.375rem;
  }
  #page-relatorios .relatorios-fd .filterbar.fb-line{
    flex-wrap:wrap;
  }
  #page-relatorios .relatorios-fd .filterbar.fb-line > .fselect,
  #page-relatorios .relatorios-fd .filterbar.fb-line > .morewrap{
    flex:1 1 calc(25% - 0.4375rem);
    min-width:10.625rem;
  }
}

/* card de filtros (barra Tickets) — primeiro na página */
#page-relatorios .relatorios-fd .rel-top-section{ margin:0; }
#page-relatorios .relatorios-fd .rel-filter-card{
  box-sizing:border-box;
  width:100%;
  min-height:var(--fd-filterbar-min-h, 3.5rem);
  isolation:isolate;
  background:
    radial-gradient(circle at 78% 8%, rgba(var(--rel-cyan-rgb), 0.24), transparent 28%),
    linear-gradient(145deg, var(--rel-thead-2) 0%, var(--rel-thead-3) 54%, var(--rel-thead-4) 100%);
  border:0.0625rem solid rgba(255, 255, 255, 0.30);
  border-radius:var(--fd-radius-card, 0.25rem);
  --fd-filterbar-radius: var(--fd-radius-card, 0.25rem);
  box-shadow:inset 0 0.0625rem rgba(255, 255, 255, 0.22);
  padding:0;
  margin-bottom:var(--rel-stack-gap, 1rem);
  overflow:hidden;
  scrollbar-width:thin;
  position:relative;
  font-size:var(--fd-filterbar-font, 0.78125rem);
}
#page-relatorios .relatorios-fd .rel-filter-card::before,
#page-relatorios .relatorios-fd .rel-indic-panel.config-panel::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  opacity:0.16;
  pointer-events:none;
  background-image:linear-gradient(rgba(var(--rel-surface-rgb),.08) 0.0625rem, transparent 0.0625rem), linear-gradient(90deg, rgba(var(--rel-surface-rgb),.08) 0.0625rem, transparent 0.0625rem);
  background-size:2.125rem 2.125rem;
  mask-image:linear-gradient(90deg, transparent 35%, #000);
}
#page-relatorios .relatorios-fd .rel-filter-card > :not(.tf-cosmic-dust):not(.sr-only):not(.tk-filterbar):not(.rel-filter-summary),
#page-relatorios .relatorios-fd .rel-indic-panel.config-panel > :not(.tf-cosmic-dust){
  position:relative;
  z-index:1;
}
#page-relatorios .relatorios-fd .rel-filter-card > .rel-filter-summary{
  position:relative;
  z-index:0;
}
#page-relatorios .relatorios-fd .rel-filter-card > #drValue{
  display:none;
}
#page-relatorios .relatorios-fd .rel-filter-card .tf-cosmic-dust,
#page-relatorios .relatorios-fd .rel-indic-panel.config-panel .tf-cosmic-dust{
  /* Host/grãos: css/shared/login-cosmic-dust.css (velocidades distintas). */
  position:absolute;
  inset:0;
  z-index:0;
  overflow:hidden;
  pointer-events:none;
  border-radius:inherit;
}
/* Ciclo nebulosa/grãos: ver css/shared/login-cosmic-dust.css */
@keyframes rel-cosmic-drift{
  0%{ transform:translate3d(0,0,0) scale(1); }
  100%{ transform:translate3d(0,0,0) scale(1); }
}
@keyframes rel-cosmic-dust-drift{
  0%{ transform:translate3d(0,0,0); }
  100%{ transform:translate3d(0,0,0); }
}
/* Poeira sob prefers-reduced-motion: ver css/shared/login-cosmic-dust.css */
#page-relatorios .relatorios-fd .rel-filter-card .tk-filterbar{
  box-sizing:border-box;
  width:100%;
  max-width:100%;
  min-width:0;
  padding:var(--fd-filterbar-pad-y, 0.625rem) var(--fd-filterbar-pad-x, 0.75rem);
  overflow-x:auto;
  overflow-y:hidden;
  position:relative;
  /* Acima da faixa de filtrados — senão o menu abre atrás dela (mesmo z-index + ordem no DOM). */
  z-index:3;
}
#page-relatorios .relatorios-fd .rel-filter-summary{
  margin:0 0.5rem 0.5rem;
  border:0;
  border-radius:var(--fd-radius-card, 0.25rem);
  /* Cor do card de filtrados de Tarefas; mantém a transparência 0.42 de Relatórios. */
  background:color-mix(in srgb, color-mix(in srgb, #fff 78%, #90eeff 22%) 42%, transparent);
  padding:0.5rem var(--fd-filterbar-pad-x, 0.75rem);
  box-shadow:inset 0 0.0625rem rgba(255, 255, 255, 0.45);
  position:relative;
  z-index:0;
}
#page-relatorios .relatorios-fd .rel-filter-summary .chips{
  display:flex;
  align-items:center;
  gap:0.5rem;
  flex-wrap:wrap;
  margin:0;
}
#page-relatorios .relatorios-fd .rel-filter-summary .chips .lead{
  font-size:0.78125rem;
  color:var(--rel-thead-1);
  font-weight:800;
  margin-right:0.125rem;
}
#page-relatorios .relatorios-fd .rel-filter-summary .chip{
  display:inline-flex;
  align-items:center;
  gap:0.4375rem;
  height:1.875rem;
  padding:0 0.625rem 0 0.75rem;
  border-radius:var(--fd-radius-card, 0.25rem);
  background:rgba(var(--rel-surface-rgb), 0.62);
  border:0.0625rem solid rgba(31, 79, 147, 0.28);
  font-size:0.78125rem;
  font-weight:700;
  color:var(--rel-thead-1);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-filter-summary .chip{ background:var(--surface); }
#page-relatorios .relatorios-fd .rel-filter-summary .chip b{
  font-weight:800;
  color:#0f2a4a;
}
#page-relatorios .relatorios-fd .rel-filter-summary .chip .x{
  width:1rem;
  height:1rem;
  border-radius:var(--fd-radius-card, 0.25rem);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  color:#7ba2d8;
  transition:0.13s;
  border:0;
  background:none;
  padding:0;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-filter-summary .chip .x{ color:var(--rel-ink-muted); }
#page-relatorios .relatorios-fd .rel-filter-summary .chip .x:hover{
  background:rgba(var(--rel-accent-rgb), 0.15);
  color:#1f4f93;
}
#page-relatorios .relatorios-fd .rel-filter-summary .chip .x svg{
  width:0.625rem;
  height:0.625rem;
}
html[data-theme="dark"] #page-relatorios .relatorios-fd .rel-filter-summary {
  background:rgba(127, 149, 199, 0.42);
  box-shadow:inset 0 0.0625rem rgba(255, 255, 255, 0.2);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-filter-summary{
  background:rgba(172, 179, 188, 0.55);
  box-shadow:inset 0 0.0625rem rgba(236, 238, 243, 0.35);
}
html[data-theme="dark"] #page-relatorios .relatorios-fd .rel-filter-card,
html[data-theme="dark"] #page-relatorios .relatorios-fd .rel-indic-panel.config-panel{
  background:
    radial-gradient(circle at 78% 8%, rgba(144, 238, 255, 0.18), transparent 28%),
    linear-gradient(145deg, #163f9a 0%, #1a4db8 52%, #2f6fe0 100%);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-filter-card,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-indic-panel.config-panel{
  background:
    radial-gradient(circle at 78% 8%, rgba(184, 191, 199, 0.4), transparent 28%),
    linear-gradient(145deg, #5a6573 0%, #6e7a8a 48%, #8a939f 100%);
  border-color: rgba(20, 24, 29, 0.22);
}
/* Menu aberto: não cortar dropdown; ficará acima dos painéis seguintes */
#page-relatorios .relatorios-fd .rel-filter-card:has(.flt.open),
#page-relatorios .relatorios-fd .rel-filter-card:has(.flt.rel-period-open){
  overflow:visible;
  z-index:220;
}
#page-relatorios .relatorios-fd .rel-filter-card:has(.flt.open) .tk-filterbar,
#page-relatorios .relatorios-fd .rel-filter-card:has(.flt.rel-period-open) .tk-filterbar{
  overflow:visible;
  z-index:5;
}
#page-relatorios .relatorios-fd .rel-filter-card:has(.flt.open) .rel-filter-summary,
#page-relatorios .relatorios-fd .rel-filter-card:has(.flt.rel-period-open) .rel-filter-summary{
  z-index:0;
  pointer-events:none;
}
#page-relatorios .relatorios-fd .rel-filter-card:has(.flt.open) .flt-group,
#page-relatorios .relatorios-fd .rel-filter-card:has(.flt.rel-period-open) .flt-group{
  overflow:visible;
}
#page-relatorios .relatorios-fd .rel-top-section:has(.flt.open),
#page-relatorios .relatorios-fd .rel-top-section:has(.flt.rel-period-open){
  position:relative;
  z-index:220;
}
/*
 * overflow-x:hidden em #page-relatorios / .relatorios-fd (shell + critical + portal)
 * força clip também no eixo Y (CSS overflow pairing). Sem isto o menu abre
 * “cortado” no Portal (página = scrollport) mesmo com o card em overflow:visible.
 */
#page-relatorios.page:has(.flt.open),
#page-relatorios.page:has(.flt.rel-period-open),
#page-relatorios.page:has(.flt.open) .relatorios-fd,
#page-relatorios.page:has(.flt.rel-period-open) .relatorios-fd{
  overflow:visible;
}
#page-relatorios .relatorios-fd .rel-filter-card .chips{ margin:0; }
#page-relatorios .relatorios-fd .rel-filter-card .chip{
  border-radius:var(--fd-radius-card, 0.25rem);
}
#page-relatorios .relatorios-fd .rel-filter-card .chip .x{
  border-radius:var(--fd-radius-card, 0.25rem);
}
#page-relatorios .relatorios-fd .rel-indic-panel{ margin-top:0; }
#page-relatorios .relatorios-fd .rel-indic-section{ margin:0 0 var(--rel-stack-gap, 1rem); }
#page-relatorios .relatorios-fd .rel-indic-panel.config-panel{
  padding:0.875rem 1rem;
  overflow:hidden;
  isolation:isolate;
  background:
    radial-gradient(circle at 78% 8%, rgba(var(--rel-cyan-rgb), 0.24), transparent 28%),
    linear-gradient(145deg, var(--rel-thead-2) 0%, var(--rel-thead-3) 54%, var(--rel-thead-4) 100%);
  border:0.0625rem solid rgba(255, 255, 255, 0.30);
  box-shadow:inset 0 0.0625rem rgba(255, 255, 255, 0.22);
}

/* tk-filterbar (paridade Tickets / acompanhamento) */
#page-relatorios .relatorios-fd .tk-filterbar{
  --tk-fb-rhythm: 0.5rem; /* = gap busca↔barra e barra↔período (0.375rem + 0.125rem margem fb-div) */
  display:flex; align-items:center; gap:var(--tk-fb-rhythm); flex-wrap:nowrap;
  padding:0; margin-bottom:0; background:transparent; border:0; border-radius:0; box-shadow:none;
  min-height:0; min-width:0; max-width:100%; box-sizing:border-box;
  overflow:visible; width:100%;
}
#page-relatorios .relatorios-fd .tk-filterbar .btn.sm{ height:var(--fd-filterbar-control-h, 2.25rem); flex:none; }
#page-relatorios .relatorios-fd .tk-filterbar .search{ flex:0 0 15rem; min-width:11.875rem; }
#page-relatorios .relatorios-fd .tk-filterbar .search input{ height:var(--fd-filterbar-control-h, 2.25rem); border:0.0625rem solid var(--line); background:var(--surface); border-radius:var(--radius-card, 0.25rem); padding-left:2.375rem; }
#page-relatorios .relatorios-fd .tk-filterbar-search{ position:relative; flex:0 0 15rem; min-width:11.875rem; }
#page-relatorios .relatorios-fd .tk-filterbar-search input{ width:100%; height:var(--fd-filterbar-control-h, 2.25rem); border:0.0625rem solid var(--line); background:var(--surface); border-radius:var(--radius-card, 0.25rem); padding:0 0.75rem 0 2.375rem; font-family:inherit; font-size:var(--fd-filterbar-search-font, 0.8125rem); font-weight:600; color:var(--rel-ink-2); box-sizing:border-box; }
#page-relatorios .relatorios-fd .tk-filterbar-search input.rel-search-active{ color:var(--blue, #007bff); font-weight:700; border-color:rgba(var(--rel-accent-rgb),.22); background:rgba(var(--rel-accent-rgb),.06); }
#page-relatorios .relatorios-fd .tk-filterbar-search input:focus{ outline:none; border-color:var(--blue); box-shadow:0 0 0 0.1875rem rgba(var(--rel-accent-rgb),.12); }
#page-relatorios .relatorios-fd .tk-filterbar-search-ic{ position:absolute; left:0.75rem; top:50%; transform:translateY(-50%); color:var(--rel-icon-muted); pointer-events:none; }
#page-relatorios .relatorios-fd .fb-div{ width:0.0625rem; align-self:stretch; background:rgba(var(--rel-surface-rgb),.28); margin:0.25rem 0; flex:none; }
#page-relatorios .relatorios-fd .flt-group{
  display:flex;
  align-items:center;
  gap:var(--tk-fb-rhythm, 0.5rem);
  flex-wrap:nowrap;
  flex:1 1 0;
  min-width:0;
  overflow-x:auto;
  overflow-y:hidden;
  padding-bottom:0.125rem;
  scrollbar-width:thin;
  scrollbar-color:var(--rel-scroll-thumb) transparent;
}
#page-relatorios .relatorios-fd .flt-group::-webkit-scrollbar{ height:0.25rem; }
#page-relatorios .relatorios-fd .flt-group::-webkit-scrollbar-track{ background:transparent; }
#page-relatorios .relatorios-fd .flt-group::-webkit-scrollbar-thumb{ background:var(--rel-scroll-thumb); border-radius:62.4375rem; }
/* Ao abrir uma lista, libera o eixo vertical sem alterar a altura da barra. */
#page-relatorios .relatorios-fd .flt-group:has(.flt.open),
#page-relatorios .relatorios-fd .flt-group:has(.flt.rel-period-open){ overflow:visible; }
#page-relatorios .relatorios-fd .flt{ position:relative; }
#page-relatorios .relatorios-fd .flt.open{ z-index:130; }
/* Busca + filtros (ativos e inativos): mesmo card retangular da página */
#page-relatorios .relatorios-fd .flt-trig{ display:inline-flex; align-items:center; gap:0.375rem; height:var(--fd-filterbar-trig-h, 2.125rem); max-width:10.9375rem; border:0.0625rem solid var(--line); border-radius:var(--radius-card, 0.25rem);
  background:var(--surface); padding:0 0.5625rem; font-family:inherit; font-size:var(--fd-filterbar-font, 0.78125rem); font-weight:600; color:#475569; cursor:pointer; transition:.13s; outline:none; box-sizing:border-box; }
#page-relatorios .relatorios-fd .flt-trig:focus,
#page-relatorios .relatorios-fd .flt-trig:focus-visible{ outline:none; box-shadow:none; }
#page-relatorios .relatorios-fd .flt-trig:hover{ background:var(--field); color:var(--rel-ink-2); border-color:color-mix(in srgb, var(--line) 70%, var(--blue)); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .flt-trig:hover{ border-color:var(--rel-ink-3); }
#page-relatorios .relatorios-fd .flt-trig .flt-lbl{ overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#page-relatorios .relatorios-fd .flt-trig svg{ width:0.8125rem; height:0.8125rem; color:var(--rel-icon-muted); flex:none; transition:.18s; }
#page-relatorios .relatorios-fd .flt.open .flt-trig{ background:var(--field); border-color:rgba(var(--rel-accent-rgb),.22); }
#page-relatorios .relatorios-fd .flt.open .flt-trig svg{ transform:rotate(180deg); }
#page-relatorios .relatorios-fd .flt.active .flt-trig,
#page-relatorios .relatorios-fd .flt.active .flt-trig:hover,
#page-relatorios .relatorios-fd .flt.active.open .flt-trig{
  color:#0F2A4A;
  background:radial-gradient(120% 140% at 50% 45%, #c5e0ff 0%, #dcebff 40%, var(--rel-surface) 78%);
  border-color:var(--rel-surface);
  font-weight:700;
  box-shadow:none;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .flt.active .flt-trig,html[data-theme="cinza"] #page-relatorios .relatorios-fd .flt.active .flt-trig:hover,html[data-theme="cinza"] #page-relatorios .relatorios-fd .flt.active.open .flt-trig{ background:radial-gradient(120% 140% at 50% 45%,#a8bcd8 0%,#b4c2d6 40%,var(--surface) 78%); }
#page-relatorios .relatorios-fd .flt.active .flt-trig svg{ color:var(--blue); }
#page-relatorios .relatorios-fd .flt-menu{
  --flt-menu-row-h: 2.25rem;
  /* Pad 0 em todos os temas: viewport = N×linha (Dia/Nublado/Noite). */
  --flt-menu-pad: 0;
  --flt-menu-rows: 7;
  position:absolute; top:2.5rem; left:0; z-index:140; min-width:11.5rem;
  box-sizing:border-box;
  /* Altura = N linhas inteiras (sem cortar a última visível). */
  max-height:calc(var(--flt-menu-rows) * var(--flt-menu-row-h));
  overflow-y:auto; overflow-x:hidden;
  background:var(--surface); border:0.0625rem solid var(--line);
  border-radius:0.25rem; box-shadow:var(--shadow-2);
  padding:var(--flt-menu-pad); display:none;
  scrollbar-width:thin;
  scrollbar-color:var(--rel-scroll-thumb) transparent;
  scroll-snap-type:y mandatory;
  overscroll-behavior:contain;
}
#page-relatorios .relatorios-fd .flt-menu::-webkit-scrollbar{ width:0.25rem; }
#page-relatorios .relatorios-fd .flt-menu::-webkit-scrollbar-track{ background:transparent; }
#page-relatorios .relatorios-fd .flt-menu::-webkit-scrollbar-thumb{
  background:var(--rel-scroll-thumb);
  border-radius:62.4375rem;
}
#page-relatorios .relatorios-fd .flt-menu::-webkit-scrollbar-thumb:hover{
  background:var(--rel-scroll-thumb-hover);
}
#page-relatorios .relatorios-fd .flt.open .flt-menu{ display:block; }
#page-relatorios .relatorios-fd .flt:nth-last-child(-n+4) .flt-menu{ left:auto; right:0; }

/* Filtro Categoria — árvore Categoria → Departamento → Incidente */
#page-relatorios .relatorios-fd .flt-cat-tree .flt-trig .flt-lbl{
  max-width:min(12.5rem,28vw);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#page-relatorios .relatorios-fd .flt-cat-tree-menu{
  --flt-cat-tree-row-h:2.125rem;
  --flt-menu-row-h:2.125rem;
  min-width:min(20rem,92vw);
  max-width:26.25rem;
  max-height:min(calc(100dvh - 6rem), 14 * var(--flt-cat-tree-row-h));
  padding:0;
  scroll-snap-type:y mandatory;
}
#page-relatorios .relatorios-fd .flt-cat-tree-menu > .flt-opt.all{
  position:sticky;
  top:0;
  z-index:2;
  background:var(--surface);
}
#page-relatorios .relatorios-fd .flt-cat-node{
  display:flex;
  align-items:center;
  gap:0.25rem;
  min-height:var(--flt-cat-tree-row-h);
  height:var(--flt-cat-tree-row-h);
  box-sizing:border-box;
  padding:0 0.5rem 0 0.375rem;
  scroll-snap-align:start;
  scroll-snap-stop:always;
}
#page-relatorios .relatorios-fd .flt-cat-node.lvl1{ padding-left:1.125rem; }
#page-relatorios .relatorios-fd .flt-cat-node.lvl2{ padding-left:2.25rem; }
#page-relatorios .relatorios-fd .flt-cat-node:hover{
  background:rgba(var(--rel-accent-rgb),.06);
}
#page-relatorios .relatorios-fd .flt-cat-exp,
#page-relatorios .relatorios-fd .flt-cat-exp-spacer{
  width:1.375rem;
  height:1.375rem;
  flex:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:0;
  border-radius:0.25rem;
  background:transparent;
  color:var(--blue);
  cursor:pointer;
  padding:0;
}
#page-relatorios .relatorios-fd .flt-cat-exp:hover{
  background:rgba(var(--rel-accent-rgb),.12);
}
#page-relatorios .relatorios-fd .flt-cat-exp svg{
  width:0.8125rem;
  height:0.8125rem;
  transition:transform .18s ease;
}
#page-relatorios .relatorios-fd .flt-cat-node.open > .flt-cat-exp svg{
  transform:rotate(180deg);
}
#page-relatorios .relatorios-fd .flt-cat-exp-spacer{
  cursor:default;
  pointer-events:none;
}
#page-relatorios .relatorios-fd .flt-cat-tick{
  width:0.75rem;
  height:0.6875rem;
  flex:none;
  margin:0 0.3125rem 0 0.25rem;
  border-left:0.125rem solid var(--blue);
  border-bottom:0.125rem solid var(--blue);
  border-bottom-left-radius:0.1875rem;
  opacity:.9;
}
#page-relatorios .relatorios-fd .flt-cat-tree-menu .flt-opt.flt-cat-check{
  flex:1 1 auto;
  min-width:0;
  width:auto;
  height:var(--flt-cat-tree-row-h);
  min-height:var(--flt-cat-tree-row-h);
  padding:0 0.375rem 0 0;
  font-size:0.78125rem;
  scroll-snap-align:unset;
}
#page-relatorios .relatorios-fd .flt-cat-children[hidden]{
  display:none !important;
}
#page-relatorios .relatorios-fd .rel-hidden-flts{ display:none !important; }
#page-relatorios .relatorios-fd .flt-opt{ display:flex; align-items:center; gap:0.5625rem; width:100%;
  height:var(--flt-menu-row-h, 2.25rem); min-height:var(--flt-menu-row-h, 2.25rem); box-sizing:border-box;
  padding:0 0.625rem; border:0; border-radius:0; flex-shrink:0;
  background:none; font-family:inherit; font-size:0.8125rem; font-weight:600; color:var(--rel-ink-2); cursor:pointer; text-align:left; white-space:nowrap;
  scroll-snap-align:start; scroll-snap-stop:always;
}
#page-relatorios .relatorios-fd .flt-opt:hover{ background:var(--field); }
#page-relatorios .relatorios-fd .flt-opt::before{ content:""; width:1rem; height:1rem; flex:none; border-radius:0.1875rem; border:0.09375rem solid #cfd9e7; background:var(--surface); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .flt-opt::before{ border:0.09375rem solid var(--rel-accent-tint); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .flt-opt::before{ border:0.09375rem solid var(--rel-line); }
#page-relatorios .relatorios-fd .flt-opt.sel{ color:var(--blue); }
#page-relatorios .relatorios-fd .flt-opt.sel::before{ background:var(--blue) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='20 6 9 17 4 12'/></svg>") center no-repeat; border-color:var(--blue); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .flt-opt.sel::before{ border-color:var(--rel-line); }
#page-relatorios .relatorios-fd .flt-opt.all{ color:var(--muted); border-bottom:0.0625rem solid var(--line); border-radius:0; margin-bottom:0; }
#page-relatorios .relatorios-fd .flt-opt.all::before{ display:none; }
/* Sep + sec = 1× --flt-menu-row-h para o snap de rolagem não desalinhando após “Prioridade”. */
#page-relatorios .relatorios-fd .flt-sep{
  height:0.75rem;
  margin:0 0.5rem;
  box-sizing:border-box;
  border:0;
  border-bottom:0.0625rem solid var(--line, #e5eaf2);
  background:transparent;
  scroll-snap-align:start;
  scroll-snap-stop:always;
  flex-shrink:0;
}
#page-relatorios .relatorios-fd .flt-sec{
  height:1.5rem;
  min-height:1.5rem;
  box-sizing:border-box;
  padding:0 0.625rem;
  display:flex;
  align-items:center;
  font-size:0.625rem;
  font-weight:800;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--muted);
  line-height:1;
  scroll-snap-align:none;
  flex-shrink:0;
}
#page-relatorios .relatorios-fd .flt-contato .flt-menu{ padding:0; overflow:hidden; display:none; flex-direction:column; min-width:min(17.5rem,92vw); max-height:min(20rem,70vh); min-height:0; scroll-snap-type:none; }
#page-relatorios .relatorios-fd .flt-contato.open .flt-menu{ display:flex; }
#page-relatorios .relatorios-fd .flt-contato-search-wrap{ flex:none; padding:0.375rem 0.5rem; border-bottom:0.0625rem solid var(--line); background:var(--surface); }
#page-relatorios .relatorios-fd .flt-contato-search{ display:block; width:100%; max-width:100%; box-sizing:border-box; height:2rem; margin:0; border:0.0625rem solid var(--line); border-radius:0.25rem; padding:0 0.625rem; font-family:inherit; font-size:0.78125rem; font-weight:600; color:var(--rel-ink-2); background:var(--field); }
#page-relatorios .relatorios-fd .flt-contato-search:focus{ outline:none; border-color:var(--blue); box-shadow:0 0 0 0.1875rem rgba(var(--rel-accent-rgb),.12); }
#page-relatorios .relatorios-fd .flt-contato-search::-webkit-search-cancel-button{ margin-right:0.125rem; }
#page-relatorios .relatorios-fd .flt-contato-list{
  --flt-contato-visible:6;
  --flt-contato-item-h:2.25rem;
  flex:1 1 auto;
  min-height:0;
  box-sizing:border-box;
  max-height:calc(var(--flt-contato-visible) * var(--flt-contato-item-h));
  overflow-y:auto;
  overflow-x:hidden;
  padding:0;
  /* Sem scrollbar-gutter:stable — reservar faixa quebra o múltiplo exato de linha. */
  scrollbar-width:thin;
  scrollbar-color:var(--rel-scroll-thumb) transparent;
  -webkit-overflow-scrolling:touch;
  scroll-snap-type:y mandatory;
  overscroll-behavior:contain;
}
#page-relatorios .relatorios-fd .flt-contato-list::-webkit-scrollbar{ width:0.25rem; }
#page-relatorios .relatorios-fd .flt-contato-list::-webkit-scrollbar-track{ background:transparent; }
#page-relatorios .relatorios-fd .flt-contato-list::-webkit-scrollbar-thumb{
  background:var(--rel-scroll-thumb);
  border-radius:62.4375rem;
}
#page-relatorios .relatorios-fd .flt-contato-list::-webkit-scrollbar-thumb:hover{
  background:var(--rel-scroll-thumb-hover);
}
#page-relatorios .relatorios-fd .flt-contato-list .flt-opt{
  height:var(--flt-contato-item-h); min-height:var(--flt-contato-item-h);
  align-items:center; padding-top:0; padding-bottom:0;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; line-height:1.2;
}
#page-relatorios .relatorios-fd .flt-opt.flt-opt-todos{ color:var(--blue); font-weight:700; margin-bottom:0.25rem; }
#page-relatorios .relatorios-fd .flt-opt.flt-opt-todos::before{ display:block; }
#page-relatorios .relatorios-fd .flt-contato-empty{ padding:0.625rem 0.5rem; font-size:0.75rem; font-weight:600; color:var(--rel-ink-muted); text-align:center; }
#page-relatorios .relatorios-fd .fb-right{
  display:flex; align-items:center; justify-content:flex-end;
  margin-left:auto; flex:0 0 auto; align-self:center; padding-left:0.75rem; flex-wrap:nowrap;
  border-left:0.0625rem solid rgba(255,255,255,.28);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .fb-right{ border-left:0.0625rem solid rgba(var(--rel-surface-rgb),.28); }
#page-relatorios .relatorios-fd .fav-card{ display:inline-flex; align-items:center; gap:0.5625rem; height:2.25rem; padding:0 0.8125rem; border:0.0625rem solid var(--line); border-radius:0.6875rem;
  background:var(--field); font-size:0.78125rem; font-weight:600; color:var(--rel-ink-faint); cursor:pointer; font-family:inherit; }
#page-relatorios .relatorios-fd .fav-card .fav-star{ width:1rem; height:1rem; fill:none; stroke:currentColor; stroke-width:1.8; }
#page-relatorios .relatorios-fd .atalho-seg{ display:inline-flex; align-items:center; background:var(--field); border:0.0625rem solid var(--line); border-radius:var(--radius-card, 0.25rem); padding:0.1875rem; gap:0.1875rem; }
#page-relatorios .relatorios-fd .atalho-seg .as-toggle{ display:inline-flex; align-items:center; gap:0.4375rem; height:2.125rem; padding:0 0.8125rem; border:0; border-radius:var(--radius-card, 0.25rem);
  background:none; font-family:inherit; font-size:0.78125rem; font-weight:600; color:var(--rel-ink-faint); cursor:pointer; box-shadow:none; }
#page-relatorios .relatorios-fd .atalho-seg .as-edit{ width:2.125rem; height:2.125rem; border:0; border-radius:var(--radius-card, 0.25rem); background:none; color:var(--rel-icon-muted); cursor:pointer; display:flex; align-items:center; justify-content:center; box-shadow:none; }
#page-relatorios .relatorios-fd .morewrap{ position:relative; }
#page-relatorios .relatorios-fd .flt#relFltPeriodo{ position:relative; flex:none; z-index:20; }
#page-relatorios .relatorios-fd .flt#relFltPeriodo.open,
#page-relatorios .relatorios-fd .flt#relFltPeriodo.rel-period-open{ z-index:230; }
#page-relatorios .relatorios-fd .flt#relFltPeriodo .flt-trig{ max-width:none; }
#page-relatorios .relatorios-fd .flt#relFltPeriodo .flt-trig .flt-lbl{ overflow:visible; text-overflow:clip; }
/* Dropdown do calendário personalizado — padrão menu (sem scrim/desfoque) */
#page-relatorios .relatorios-fd .rel-period-dropdown{
  position:absolute;
  top:calc(100% + 0.5rem);
  left:0;
  z-index:240;
  display:block;
  padding:0;
  margin:0;
  background:transparent;
  border:0;
  box-shadow:none;
}
#page-relatorios .relatorios-fd .rel-period-dropdown.hidden{ display:none !important; }
#page-relatorios .relatorios-fd .rel-period-panel{
  display:flex;
  align-items:stretch;
  gap:0;
  background:var(--surface);
  border:0.0625rem solid var(--line);
  border-radius:var(--radius-card);
  box-shadow:0 0.75rem 1.875rem -1rem rgba(var(--rel-ink-rgb),.25), 0 1rem 2.5rem rgba(15,47,58,.18);
  overflow:hidden;
  max-width:min(31.875rem, calc(100vw - 1.5rem));
}
#page-relatorios .relatorios-fd .rel-period-panel{
  border-top-color:transparent;
  border-left-color:transparent;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-period-panel{ box-shadow:0 0.75rem 1.875rem -1rem rgba(var(--rel-ink-rgb),.25), 0 1rem 2.5rem rgba(var(--rel-shadow-rgb),0.18); }
#page-relatorios .relatorios-fd .rel-period-panel-cal{
  flex:0 0 auto;
  width:min(20.75rem, calc(100vw - 10.5rem));
  /* Superfície do tip/rodapé — o azul fica só no header do calendário. */
  background:var(--surface,#fff);
  min-height:100%;
  display:flex;
  flex-direction:column;
}
#page-relatorios .relatorios-fd .rel-period-panel-cal .acomp-period-range,
#page-relatorios .relatorios-fd .rel-period-panel-cal .acomp-period-range--embedded{
  width:100%;
  max-width:100%;
  flex:1 1 auto;
  min-height:100%;
  display:flex;
  flex-direction:column;
  border:0 !important;
  border-radius:0;
  box-shadow:none;
  background:transparent;
  overflow:visible;
}
#page-relatorios .relatorios-fd .rel-period-panel-cal .acomp-period-range-header{
  border:0;
  outline:0;
  box-shadow:none;
  flex:none;
}
#page-relatorios .relatorios-fd .rel-period-panel-cal .acomp-period-range-body{
  background:var(--surface,#fff);
  flex:1 1 auto;
}
#page-relatorios .relatorios-fd .rel-period-panel-cal .acomp-period-range-foot{
  /* Mesmo fundo do corpo — sem faixa azul sobrando sob o tip. */
  flex:none;
  background:var(--surface,#fff);
}
#page-relatorios .relatorios-fd .rel-period-panel-aside{
  flex:1 1 9.5rem;
  min-width:8.75rem;
  max-width:11rem;
  padding:0;
  border-left:0.0625rem solid rgba(255,255,255,.42);
  background:
    linear-gradient(165deg, rgba(var(--rel-surface-rgb),.88) 0%, rgba(236,246,255,.78) 48%, rgba(220,238,255,.72) 100%);
  backdrop-filter:blur(0.875rem);
  -webkit-backdrop-filter:blur(0.875rem);
  box-shadow:
    inset 0 0.0625rem 0 rgba(255,255,255,.65),
    inset 0 -0.0625rem 0 rgba(var(--rel-thead-2-rgb),.06);
  display:flex;
  flex-direction:column;
  align-self:stretch;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-period-panel-aside{ background:linear-gradient(165deg,var(--surface) 0%,rgba(172,179,188,.78) 48%,rgba(184,191,199,.72) 100%); }
#page-relatorios .relatorios-fd .dr-presets--stack{
  flex:1 1 auto;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:0.375rem;
  padding:0.625rem 0.625rem;
  min-height:100%;
  box-sizing:border-box;
}
#page-relatorios .relatorios-fd .dr-presets--stack button{
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  height:2.125rem;
  width:100%;
  border:0;
  border-radius:var(--radius-card, 0.25rem);
  background:transparent;
  font-family:inherit;
  font-size:0.78125rem;
  font-weight:700;
  color:var(--rel-thead-2);
  cursor:pointer;
  text-align:center;
  box-shadow:none;
  transition:background .14s ease, color .14s ease;
}
#page-relatorios .relatorios-fd .dr-presets--stack button:hover{
  background:rgba(var(--rel-thead-3-rgb),.10);
  color:var(--rel-accent-deep);
}
#page-relatorios .relatorios-fd .dr-presets--stack button.on{
  background:rgba(var(--rel-thead-3-rgb),.92);
  color:#fff;
  font-weight:800;
  box-shadow:none;
}
#page-relatorios .relatorios-fd .dr-presets--stack button:disabled{ opacity:.45; cursor:not-allowed; }
/* menu antigo (#drPop) removido do markup */
#page-relatorios .relatorios-fd .rel-period-flt-menu{ display:none !important; }
#page-relatorios .relatorios-fd .tickets-card .tk-stats[hidden]{ display:none !important; }
#page-relatorios .relatorios-fd .tickets-card .tk-stats:not([hidden]){ display:flex; }
#page-relatorios .relatorios-fd .tickets-card .tk-stats-dow{ margin-bottom:1.25rem; border:0.0625rem solid var(--line); border-radius:var(--radius-card); overflow:hidden; }
#page-relatorios .relatorios-fd .sr-only{ position:absolute; width:0.0625rem; height:0.0625rem; padding:0; margin:-0.0625rem; overflow:hidden; clip:rect(0,0,0,0); border:0; }

/* card próprio dos filtros (legado) */
#page-relatorios .relatorios-fd .config-panel.filters-panel{ margin-top:1.375rem; }
#page-relatorios .relatorios-fd .config-panel.filters-panel .filterbar.fb-line{ margin-bottom:0; }
#page-relatorios .relatorios-fd .config-panel.filters-panel .chips{ margin-top:0.75rem; }

/* popover "Mais filtros" */
#page-relatorios .relatorios-fd .more-pop{ position:absolute; top:3.375rem; right:0; z-index:30; width:18.75rem; background:var(--surface); border:0.0625rem solid var(--line);
  border-radius:0.375rem; box-shadow:var(--shadow-2); padding:0.875rem; display:none; }
#page-relatorios .relatorios-fd .more-pop.open{ display:block; }
/* popovers período e calendário */
#page-relatorios .relatorios-fd .cal-pop,
#page-relatorios .relatorios-fd .dr-pop{ display:none; }
#page-relatorios .relatorios-fd .cal-pop.open,
#page-relatorios .relatorios-fd .dr-pop.open{ display:block; }
#page-relatorios .relatorios-fd .more-pop h4{ font-size:0.65625rem; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:var(--rel-ink-muted); margin:0 0 0.6875rem; }
#page-relatorios .relatorios-fd .more-grid{ display:grid; gap:0.5625rem; }
#page-relatorios .relatorios-fd .fselect.block{ display:block; }
#page-relatorios .relatorios-fd .fselect.block select{ width:100%; }

/* ============================================================
   SELETOR DE PERÍODO — picker inline (paridade acompanhamento)
   ============================================================ */
#page-relatorios .relatorios-fd .flt-menu.cal-menu .acomp-period-range--inline{ position:static; width:100%; max-width:none; border:0; box-shadow:none; border-radius:0; }
#page-relatorios .relatorios-fd .flt-menu.cal-menu .acomp-period-range--inline.hidden{ display:none; }
#page-relatorios .relatorios-fd .acomp-period-range{ border:0.0625rem solid var(--line); border-radius:var(--radius-card); background:var(--surface); box-shadow:0 1rem 2.5rem rgba(15,47,58,.18); overflow:hidden; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .acomp-period-range{ box-shadow:0 1rem 2.5rem rgba(var(--rel-shadow-rgb),0.18); }
#page-relatorios .relatorios-fd .acomp-period-range.hidden{ display:none; }
#page-relatorios .relatorios-fd .acomp-period-range-header{ display:flex; align-items:center; justify-content:space-between; gap:0.4375rem; padding:0.5rem 0.625rem; background:var(--blue,#007bff); color:#fff; }
#page-relatorios .relatorios-fd .acomp-period-range-title{
  flex:1 1 auto;
  max-width:calc(100% - 5.5rem);
  margin:0 auto;
  text-align:center;
  font-size:0.875rem;
  font-weight:700;
  text-transform:capitalize;
  letter-spacing:.01em;
  font-family:inherit;
  line-height:1.2;
  color:#fff;
  cursor:pointer;
  border:none;
  border-radius:0.5rem;
  padding:0.375rem 0.75rem;
  background:rgba(var(--rel-surface-rgb),.15);
  box-shadow:0 0.0625rem 0 rgba(255,255,255,.12) inset, 0 0.25rem 0.875rem -0.375rem rgba(var(--rel-shadow-pure-rgb),.22);
  transition:background .14s, box-shadow .14s, transform .12s;
}
#page-relatorios .relatorios-fd .acomp-period-range-title:hover{
  background:rgba(var(--rel-surface-rgb),.25);
  transform:translateY(-0.0625rem);
}
#page-relatorios .relatorios-fd .acomp-period-range-title:active{ transform:translateY(0); }
#page-relatorios .relatorios-fd .acomp-period-range-title:focus-visible{
  outline:0.125rem solid rgba(255,255,255,.65);
  outline-offset:0.125rem;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .acomp-period-range-title:focus-visible{ outline:0.125rem solid var(--rel-line); }
#page-relatorios .relatorios-fd .acomp-period-nav{ width:2rem; height:2rem; border:none; border-radius:0.5rem; background:rgba(var(--rel-surface-rgb),.15); color:#fff; font-size:1.25rem; line-height:1; cursor:pointer; }
#page-relatorios .relatorios-fd .acomp-period-nav:hover{ background:rgba(var(--rel-surface-rgb),.25); }
#page-relatorios .relatorios-fd .acomp-period-nav:disabled{ opacity:.35; cursor:not-allowed; }
#page-relatorios .relatorios-fd .acomp-period-range-body{ padding:0.4375rem 0.625rem 0; }
#page-relatorios .relatorios-fd .acomp-period-cal-wd{ display:grid; grid-template-columns:repeat(7,1fr); margin-bottom:0.25rem; }
#page-relatorios .relatorios-fd .acomp-period-cal-wd span{ text-align:center; font-size:0.65625rem; font-weight:700; color:#aeb9cc; text-transform:uppercase; letter-spacing:.02em; padding:0.25rem 0; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .acomp-period-cal-wd span{ color:var(--rel-accent-ink); }
#page-relatorios .relatorios-fd .acomp-period-cal-grid{ display:grid; grid-template-columns:repeat(7,1fr); }
#page-relatorios .relatorios-fd .acomp-period-cal-grid.mode-months,
#page-relatorios .relatorios-fd .acomp-period-cal-grid.mode-years{ grid-template-columns:repeat(3,1fr); gap:0.375rem 0.25rem; padding:0.375rem 0 0.25rem; }
#page-relatorios .relatorios-fd .acomp-period-cal-wd[hidden]{ display:none !important; }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell{ position:relative; height:1.9375rem; display:flex; align-items:center; justify-content:center; cursor:pointer; }
#page-relatorios .relatorios-fd .acomp-period-cal-grid.mode-months .cal-cell,
#page-relatorios .relatorios-fd .acomp-period-cal-grid.mode-years .cal-cell{ height:2.75rem; }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-num{ position:relative; z-index:2; width:2rem; height:2rem; display:flex; align-items:center; justify-content:center; font-size:0.78125rem; font-weight:600; color:#3c4a63; border-radius:0.5625rem; font-variant-numeric:tabular-nums; transition:.12s cubic-bezier(.22,1,.36,1); }
#page-relatorios .relatorios-fd .acomp-period-cal-grid.mode-months .cal-num,
#page-relatorios .relatorios-fd .acomp-period-cal-grid.mode-years .cal-num{ width:4.5rem; height:2.25rem; border-radius:var(--radius-card, 0.25rem); font-size:0.75rem; font-weight:700; letter-spacing:.02em; }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.is-start .cal-num,
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.cal-pick-month.is-start .cal-num,
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.cal-pick-year.is-start .cal-num{ background:var(--rel-accent); color:#fff; box-shadow:0 0.3125rem 0.75rem -0.25rem rgba(var(--rel-accent-rgb),.7); }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell:hover:not(.muted):not(.dis) .cal-num{ background:rgba(var(--rel-accent-rgb),.13); color:var(--rel-accent-ink); transform:translateY(-0.0625rem); }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.is-start:hover:not(.muted):not(.dis) .cal-num,
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.rng-main.is-start:hover:not(.muted):not(.dis) .cal-num,
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.rng-main.is-end:hover:not(.muted):not(.dis) .cal-num{ background:var(--rel-accent); color:#fff; transform:none; }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.muted{ pointer-events:none; }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.muted .cal-num{ color:#d3d9e2; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.muted .cal-num{ color:var(--rel-accent-ink); }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.dis{ pointer-events:none; }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.dis .cal-num{ color:#d3d9e2; text-decoration:line-through; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.dis .cal-num{ color:var(--rel-accent-ink); }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.rng::before{ content:""; position:absolute; top:0.0625rem; bottom:0.0625rem; left:0; right:0; z-index:1; }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.rng.cap-l::before{ left:0.125rem; border-radius:0.5625rem 0 0 0.5625rem; }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.rng.cap-r::before{ right:0.125rem; border-radius:0 0.5625rem 0.5625rem 0; }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.rng.cap-l.cap-r::before{ border-radius:0.5625rem; }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.rng-main::before{ background:rgba(var(--rel-accent-rgb),.14); }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.rng-main.rng-prev::before{ background:rgba(var(--rel-accent-rgb),.10); }
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.rng-main.is-start .cal-num,
#page-relatorios .relatorios-fd .acomp-period-cal-grid .cal-cell.rng-main.is-end .cal-num{ background:var(--rel-accent); color:#fff; box-shadow:0 0.3125rem 0.75rem -0.25rem rgba(var(--rel-accent-rgb),.7); }
#page-relatorios .relatorios-fd .acomp-period-panel-sum-wrap{ margin-top:0.4375rem; padding-top:0.4375rem; border-top:0.0625rem solid var(--line); }
#page-relatorios .relatorios-fd .acomp-period-panel-sum{ text-align:center; font-size:0.75rem; font-weight:600; color:var(--rel-ink-faint); line-height:1.35; }
#page-relatorios .relatorios-fd .acomp-period-panel-sum.main{ display:flex; flex-wrap:wrap; align-items:baseline; justify-content:center; gap:.35em; line-height:1.35; }
#page-relatorios .relatorios-fd .acomp-period-panel-sum .acomp-period-psum-range{ display:inline; font-size:0.78125rem; font-weight:700; color:var(--rel-accent-ink); white-space:nowrap; }
#page-relatorios .relatorios-fd .acomp-period-panel-sum .acomp-period-psum-days{ display:inline; font-size:0.75rem; font-weight:800; color:var(--rel-ink-2); white-space:nowrap; }
#page-relatorios .relatorios-fd .acomp-period-panel-sum.empty{ color:var(--rel-ink-muted); }
#page-relatorios .relatorios-fd .acomp-period-range-hint{ margin:0; padding:0.375rem 0 0.4375rem; font-size:0.6875rem; color:var(--muted); text-align:center; }
#page-relatorios .relatorios-fd .acomp-period-range-foot{
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:0;
  /* Gap simetrico acima/abaixo do tip — sem faixa colorida sobrando. */
  padding:0.375rem 0.625rem;
  border-top:0.0625rem solid var(--line);
  background:var(--surface,#fff);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .acomp-period-range-foot{
  background:var(--surface);
}
#page-relatorios .relatorios-fd .acomp-period-tip{
  width:100%;
  margin:0;
  max-width:none;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0.375rem 0.625rem;
  border-radius:var(--radius-card, 0.25rem);
  background:#fff8e1;
  border:0.0625rem solid rgba(176, 140, 40, 0.38);
  box-shadow:none;
  box-sizing:border-box;
}
#page-relatorios .relatorios-fd .acomp-period-tip-txt{
  font-size:0.71875rem;
  font-weight:650;
  line-height:1.3;
  color:#6b5614;
  letter-spacing:.01em;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#page-relatorios .relatorios-fd .acomp-period-foot-actions{
  display:flex;
  align-items:center;
  gap:0.5rem;
  width:100%;
}
#page-relatorios .relatorios-fd .acomp-period-foot-actions .acomp-period-clear,
#page-relatorios .relatorios-fd .acomp-period-foot-actions .acomp-period-apply{
  flex:1 1 0;
  width:auto;
  min-width:0;
}
#page-relatorios .relatorios-fd .acomp-period-clear{ height:2.125rem; padding:0 0.75rem; border:0.0625rem solid var(--line); border-radius:var(--radius-card, 0.25rem); background:var(--surface); color:var(--rel-ink-faint); font:inherit; font-size:0.78125rem; font-weight:700; cursor:pointer; }
#page-relatorios .relatorios-fd .acomp-period-apply{ height:2.125rem; padding:0 0.875rem; border:none; border-radius:var(--radius-card, 0.25rem); background:var(--rel-accent); color:#fff; font:inherit; font-size:0.78125rem; font-weight:700; cursor:pointer; box-shadow:none; }
#page-relatorios .relatorios-fd .acomp-period-apply:disabled{ opacity:.45; cursor:not-allowed; box-shadow:none; }




/* ============================================================
   COMPARAÇÃO ao lado de cada indicador (hierarquia + lista suspensa)
   atual = dominante · comparativos = subordinados, com cor do período
   ============================================================ */
#page-relatorios .relatorios-fd .cmp-line{ display:flex; align-items:center; flex-wrap:wrap; gap:0.375rem 0.625rem; margin-top:0.5rem; }
#page-relatorios .relatorios-fd .cmp-tag{ display:inline-flex; align-items:center; gap:0.375rem; font-size:0.71875rem; font-weight:700; color:var(--rel-ink-faint);
  padding:0.1875rem 0.5625rem 0.1875rem 0.4375rem; border-radius:62.4375rem; background:var(--field); border:0.0625rem solid var(--line); white-space:nowrap; }
#page-relatorios .relatorios-fd .cmp-tag .cd{ width:0.5rem; height:0.5rem; border-radius:0.15625rem; flex:none; }
#page-relatorios .relatorios-fd .cmp-tag .cv{ font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums; }
#page-relatorios .relatorios-fd .cmp-tag .cdelta{ display:inline-flex; align-items:center; gap:0.125rem; font-weight:800; font-variant-numeric:tabular-nums; }
#page-relatorios .relatorios-fd .cmp-tag .cdelta svg{ width:0.6875rem; height:0.6875rem; }
#page-relatorios .relatorios-fd .cmp-tag .cdelta.up{ color:#15875b; } #page-relatorios .relatorios-fd .cmp-tag .cdelta.down{ color:var(--rel-danger); } #page-relatorios .relatorios-fd .cmp-tag .cdelta.flat{ color:var(--rel-ink-muted); }
#page-relatorios .relatorios-fd .cmp-more{ display:inline-flex; align-items:center; gap:0.3125rem; height:1.5625rem; padding:0 0.625rem; border-radius:62.4375rem;
  border:0.0625rem solid var(--line); background:var(--surface); color:var(--rel-ink-faint); font-family:inherit; font-size:0.6875rem;
  font-weight:800; cursor:pointer; transition:.14s; position:relative; }
#page-relatorios .relatorios-fd .cmp-more:hover{ border-color:var(--blue); color:var(--blue); background:rgba(var(--rel-accent-rgb),.05); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .cmp-more:hover{ border-color:var(--rel-ink-3); }
#page-relatorios .relatorios-fd .cmp-more svg{ width:0.75rem; height:0.75rem; transition:transform .18s; }
#page-relatorios .relatorios-fd .cmp-more.open svg{ transform:rotate(180deg); }
#page-relatorios .relatorios-fd .cmp-wrap{ position:relative; }
#page-relatorios .relatorios-fd .cmp-drop{ position:absolute; top:calc(100% + 0.5rem); left:0; z-index:30; min-width:16.125rem; padding:0; background:var(--surface);
  border:0.0625rem solid var(--line); border-radius:var(--radius-card); box-shadow:var(--elev-3); display:none; overflow:hidden; }
#page-relatorios .relatorios-fd .cmp-drop.open{ display:block; animation:cmp-pop .18s cubic-bezier(.22,1,.36,1) both; }
@keyframes cmp-pop{ from{ opacity:0; transform:translateY(-0.375rem) scale(.985); } to{ opacity:1; transform:none; } }
#page-relatorios .relatorios-fd .cmp-drop .cdh{ font-size:0.625rem; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:var(--rel-ink-muted);
  padding:0.75rem 0.875rem 0.5625rem; background:linear-gradient(180deg,var(--field),transparent); border-bottom:0.0625rem solid var(--line); }
#page-relatorios .relatorios-fd .cmp-drop .cdbody{ padding:0.375rem; }
#page-relatorios .relatorios-fd .cmp-drop .cdrow{ display:grid; grid-template-columns:0.625rem 1fr auto auto; gap:0.625rem; align-items:center; padding:0.5625rem 0.625rem; border-radius:var(--radius-card); transition:.12s; }
#page-relatorios .relatorios-fd .cmp-drop .cdrow:hover{ background:var(--field); }
#page-relatorios .relatorios-fd .cmp-drop .cdrow.cur{ background:rgba(var(--rel-accent-rgb),.06); }
#page-relatorios .relatorios-fd .cmp-drop .cdrow.cur .cdn{ color:var(--ink); font-weight:800; }
#page-relatorios .relatorios-fd .cmp-drop .cdrow .cdd{ width:0.625rem; height:0.625rem; border-radius:0.1875rem; box-shadow:0 0 0 0.1875rem var(--surface); }
#page-relatorios .relatorios-fd .cmp-drop .cdrow .cdn{ font-size:0.71875rem; font-weight:700; color:var(--rel-ink-3); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#page-relatorios .relatorios-fd .cmp-drop .cdrow .cdv{ font-size:0.84375rem; font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums; }
#page-relatorios .relatorios-fd .cmp-drop .cdrow .cdg{ font-size:0.6875rem; font-weight:800; font-variant-numeric:tabular-nums; min-width:3rem; text-align:right;
  padding:0.125rem 0; }
#page-relatorios .relatorios-fd .cmp-drop .cdrow .cdg.up{ color:#15875b; } #page-relatorios .relatorios-fd .cmp-drop .cdrow .cdg.down{ color:var(--rel-danger); } #page-relatorios .relatorios-fd .cmp-drop .cdrow .cdg.flat{ color:var(--rel-ink-muted); }

html[data-theme="dark"] #page-relatorios .relatorios-fd .cal-role.main{ color:#7fb6ff; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .cal-role.main{ color:#0a2c5c; } html[data-theme="dark"] #page-relatorios .relatorios-fd .cal-role.cmp{ color:#f1b53d; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .cal-role.cmp{ color:#6b3b08; } html[data-theme="dark"] #page-relatorios .relatorios-fd .cal-role.cmp2{ color:#b9a6ff; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .cal-role.cmp2{ color:#3d2a7a; }
html[data-theme="dark"] #page-relatorios .relatorios-fd .cmp-tag .cdelta.up, html[data-theme="dark"] #page-relatorios .relatorios-fd .cmp-drop .cdrow .cdg.up{ color:#3fc285; }
html[data-theme="dark"] #page-relatorios .relatorios-fd .cmp-tag .cdelta.down, html[data-theme="dark"] #page-relatorios .relatorios-fd .cmp-drop .cdrow .cdg.down{ color:#f1797d; }

/* TH-9: cinza — relatorios-shell overrides */
html[data-theme="cinza"] #page-relatorios .relatorios-fd{
  --elev-1: 0 0.0625rem 0.125rem rgba(0,0,0,.22), 0 0.125rem 0.375rem -0.125rem rgba(0,0,0,.30);
  --elev-2: 0 0.0625rem 0.125rem rgba(0,0,0,.26), 0 0.375rem 0.875rem -0.375rem rgba(0,0,0,.35), 0 0.875rem 1.875rem -1rem rgba(0,0,0,.40);
  --elev-3: 0 0.0625rem 0 rgba(255,255,255,.06) inset, 0 0.125rem 0.25rem rgba(0,0,0,.22),
            0 0.875rem 1.875rem -0.75rem rgba(0,0,0,.44), 0 2.5rem 4.375rem -2.5rem rgba(0,0,0,.50);
  --recess: inset 0 0.0625rem 0.125rem rgba(0,0,0,.18);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .fselect select{ color:#14181d; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .morefilters{ color:#14181d; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chip{ background:rgba(11,99,214,.14); border-color:rgba(10,61,128,.42); color:#0a2c5c; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chip{ border-color:var(--rel-line); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chip b{ color:#0a2c5c; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .subtab:hover{ border-color:rgba(11,99,214,.40); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .subtab:hover{ border-color:var(--rel-ink-3); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .subtab .tw{ background:rgba(151,35,31,.18); color:#6e1614; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .filterbar.fb-line .fdsel-trigger,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .filterbar.fb-line .morefilters{ background:var(--surface)!important; border-color:var(--line)!important; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .filterbar.fb-line .fdsel-trigger:hover,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .filterbar.fb-line .morefilters:hover{ background:var(--field)!important; border-color:rgba(10,61,128,.42)!important; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .filterbar.fb-line .fdsel-trigger:hover,html[data-theme="cinza"] #page-relatorios .relatorios-fd .filterbar.fb-line .morefilters:hover{ border-color:var(--rel-ink-3) !important; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .cmp-tag .cdelta.up, html[data-theme="cinza"] #page-relatorios .relatorios-fd .cmp-drop .cdrow .cdg.up{ color:#0e4a2c; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .cmp-tag .cdelta.down, html[data-theme="cinza"] #page-relatorios .relatorios-fd .cmp-drop .cdrow .cdg.down{ color:#6e1614; }

/* TH-9 — config-panel / indicadores builder (cinza + dark; claro mantém gradiente acima) */
html[data-theme="dark"] #page-relatorios .relatorios-fd .config-panel,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .config-panel {
  background: linear-gradient(180deg, var(--field), color-mix(in srgb, var(--blue) 10%, var(--field)));
  border-color: var(--line);
}
html[data-theme="dark"] #page-relatorios .relatorios-fd .rel-indic-panel.config-panel,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-indic-panel.config-panel {
  background:
    radial-gradient(circle at 78% 8%, rgba(144, 238, 255, 0.18), transparent 28%),
    linear-gradient(145deg, #163f9a 0%, #1a4db8 52%, #2f6fe0 100%);
  border: 0.0625rem solid rgba(255, 255, 255, 0.30);
}
html[data-theme="dark"] #page-relatorios .relatorios-fd .config-tab,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .config-tab {
  color: var(--muted);
}
html[data-theme="dark"] #page-relatorios .relatorios-fd .config-tab svg,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .config-tab svg {
  color: var(--muted);
}
html[data-theme="dark"] #page-relatorios .relatorios-fd .builder .b-lab,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .builder .b-lab {
  color: var(--muted);
}
html[data-theme="dark"] #page-relatorios .relatorios-fd .indic,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .indic {
  background: rgba(255,255,255,.26);
  border-color: rgba(255,255,255,.28);
  color: #fff;
}
html[data-theme="dark"] #page-relatorios .relatorios-fd .indic:not(.on):not([data-soon]):hover,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .indic:not(.on):not([data-soon]):hover {
  background: rgba(255,255,255,.36);
  border-color: rgba(255,255,255,.55);
  color: #fff;
  box-shadow: inset 0 0.0625rem rgba(255,255,255,.18), 0 0.25rem 0.75rem rgba(0,0,0,.28);
}
html[data-theme="dark"] #page-relatorios .relatorios-fd .indic.on,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .indic.on,
html[data-theme="dark"] #page-relatorios .relatorios-fd .indic.on:not([data-soon]):hover,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .indic.on:not([data-soon]):hover {
  background: rgba(255,255,255,.96);
  border-color: rgba(255,255,255,.95);
  color: #143a8c;
}
html[data-theme="dark"] #page-relatorios .relatorios-fd .indic[data-soon]:hover,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .indic[data-soon]:hover {
  color: var(--muted);
}

/* ============================================================
   CHART CARD — gráfico de barras empilhadas (premium)
   ============================================================ */
#page-relatorios .relatorios-fd .chart-card{ position:relative; overflow:hidden; border-radius:var(--radius-card); border:0.0625rem solid rgba(var(--rel-tint-rgb),.9);
  background:
    radial-gradient(40rem 23.75rem at 88% -8%, rgba(var(--rel-accent-rgb),.14), transparent 62%),
    radial-gradient(32.5rem 22.5rem at 4% 108%, rgba(var(--rel-accent-strong-rgb),.10), transparent 60%),
    linear-gradient(165deg,#fbfdff 0%,#f2f7fd 58%,#eaf1fb 100%);
  box-shadow:var(--elev-3); }
/* Visão/Clientes compartilham o mesmo fluxo das demais visões dentro de section.section —
   sem offset negativo (o -1.125rem desalinhava o gap até a Central de Indicadores). */
#page-relatorios .relatorios-fd .chart-head{ position:relative; z-index:2; display:flex; align-items:flex-start; gap:0.875rem; padding:1.375rem 1.625rem 0.875rem; }
/* Paridade título/subtítulo das visões (Tickets, Departamentos, Clientes, Fin…) */
#page-relatorios .relatorios-fd .chart-head > div:first-child,
#page-relatorios .relatorios-fd .tk-head > div:first-child,
#page-relatorios .relatorios-fd .clientes-header-main{
  min-width:0;
  text-align:left;
}
#page-relatorios .relatorios-fd .chart-head .ch-t,
#page-relatorios .relatorios-fd .tk-head .tk-t,
#page-relatorios .relatorios-fd .clientes-title{
  margin:0;
  font-size:1.125rem;
  font-weight:800;
  letter-spacing:-0.021875rem;
  line-height:1.22;
  color:var(--ink);
  text-align:left;
}
#page-relatorios .relatorios-fd .chart-head .ch-s,
#page-relatorios .relatorios-fd .tk-head .tk-s,
#page-relatorios .relatorios-fd .clientes-sub{
  margin:0.375rem 0 0;
  font-size:0.8125rem;
  font-weight:500;
  line-height:1.4;
  letter-spacing:0;
  color:var(--muted);
  text-align:left;
}
/* Painéis internos (Financeiro / Visão / Departamentos): 1 degrau abaixo do ch-t */
#page-relatorios .relatorios-fd .fpanel .fp-head,
#page-relatorios .relatorios-fd .dpanel .dp-head,
#page-relatorios .relatorios-fd .spanel .sp-head{
  align-items:flex-start;
  text-align:left;
}
/* Visão — gap subtítulo→corpo = gap título→topo (padding simétrico no head) */
#page-relatorios .relatorios-fd .visao .spanel .sp-head{
  padding:1rem 1.125rem;
}
#page-relatorios .relatorios-fd .visao .spanel .sp-body{
  padding-top:0;
}
#page-relatorios .relatorios-fd .fpanel .fp-head > div:not(.sp):not(.fp-ic):not(.fp-head-tools),
#page-relatorios .relatorios-fd .dpanel .dp-head > div:not(.sp):not(.dp-ic),
#page-relatorios .relatorios-fd .spanel .sp-head > div:not(.sp):not(.sp-ic){
  min-width:0;
  text-align:left;
}
#page-relatorios .relatorios-fd .fpanel .fp-head h3,
#page-relatorios .relatorios-fd .dpanel .dp-head h3,
#page-relatorios .relatorios-fd .spanel .sp-head h3,
#page-relatorios .relatorios-fd .fin-evol-panel #finEvolTitle{
  margin:0;
  font-size:1rem;
  font-weight:800;
  letter-spacing:-0.01875rem;
  line-height:1.22;
  color:var(--ink);
  text-align:left;
}
#page-relatorios .relatorios-fd .fpanel .fp-head .fp-sub,
#page-relatorios .relatorios-fd .dpanel .dp-head .dp-sub,
#page-relatorios .relatorios-fd .spanel .sp-head .sp-sub,
#page-relatorios .relatorios-fd .fin-evol-panel #finEvolSub{
  margin:0.375rem 0 0;
  font-size:0.75rem;
  font-weight:500;
  line-height:1.4;
  letter-spacing:0;
  color:var(--muted);
  text-align:left;
}
#page-relatorios .relatorios-fd .chart-head .sp{ flex:1; }
#page-relatorios .relatorios-fd .chart-head .ch-tot{ display:flex; flex-direction:column; flex-wrap:nowrap; align-items:flex-end; gap:0.25rem; text-align:right; margin-right:0.25rem; }
#page-relatorios .relatorios-fd .chart-head .ch-tot .ch-tot-main{ display:flex; flex-direction:column; align-items:flex-end; gap:0.125rem; min-width:0; }
#page-relatorios .relatorios-fd .chart-head .ch-tot .ch-tot-main > b,
#page-relatorios .relatorios-fd .chart-head .ch-tot b{ font-size:2.125rem; font-weight:800; color:var(--ink); letter-spacing:-0.075rem; line-height:1; font-variant-numeric:tabular-nums; }
#page-relatorios .relatorios-fd .chart-head .ch-tot .ch-tot-lbl{ font-size:0.65625rem; font-weight:700; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); }
#page-relatorios .relatorios-fd .chart-head .ch-delta{ display:inline-flex; flex-direction:row; flex-wrap:nowrap; align-items:center; justify-content:flex-end; gap:0.25rem; margin:0; font-size:0.65625rem; font-weight:700;
  padding:0; border-radius:0; background:transparent; color:var(--muted); font-variant-numeric:tabular-nums; white-space:nowrap; letter-spacing:.02em; line-height:1.35; }
#page-relatorios .relatorios-fd .chart-head .ch-delta svg{ width:0.6875rem; height:0.6875rem; flex:none; display:block; }
#page-relatorios .relatorios-fd .chart-head .ch-delta span{ font-size:inherit; font-weight:inherit; letter-spacing:.02em; text-transform:none; opacity:1; }
#page-relatorios .relatorios-fd .chart-head .ch-delta.up{ background:transparent; color:var(--rel-accent-strong); }
#page-relatorios .relatorios-fd .chart-head .ch-delta.down{ background:transparent; color:#15804a; }
#page-relatorios .relatorios-fd .chart-head .ch-act{ display:flex; gap:0.4375rem; }
#page-relatorios .relatorios-fd .cc-ibtn{ width:2.375rem; height:2.375rem; border-radius:0.625rem; border:0.0625rem solid var(--line); background:rgba(var(--rel-surface-rgb),.7);
  color:var(--rel-ink-faint); cursor:pointer; display:flex; align-items:center; justify-content:center; transition:.15s; }
#page-relatorios .relatorios-fd .cc-ibtn:hover{ background:var(--rel-surface); color:var(--ink); box-shadow:var(--shadow-1); }
#page-relatorios .relatorios-fd .cc-ibtn svg{ width:1.0625rem; height:1.0625rem; }

#page-relatorios .relatorios-fd .chart-body{ position:relative; z-index:2; display:grid; grid-template-columns:minmax(0,1fr) 15.5rem; gap:1.125rem;
  padding:0.875rem 1.625rem 1.375rem; align-items:stretch; }

/* plot */
#page-relatorios .relatorios-fd .plot{ display:grid; grid-template-columns:2.875rem minmax(0,1fr); grid-template-rows:1fr auto; }
#page-relatorios .relatorios-fd .plot .yaxis{ position:relative; grid-row:1; grid-column:1; }
#page-relatorios .relatorios-fd .plot .ytick{ position:absolute; right:0.625rem; transform:translateY(50%); font-size:0.71875rem; font-weight:600;
  color:var(--rel-ink-muted); font-variant-numeric:tabular-nums; }
#page-relatorios .relatorios-fd .plot .gridbars{ position:relative; grid-row:1; grid-column:2; height:28.125rem; }
#page-relatorios .relatorios-fd .plot .gline{ position:absolute; left:0; right:0; height:0.0625rem; background:rgba(var(--rel-shadow-2-rgb),.045); }
#page-relatorios .relatorios-fd .plot .gline.base{
  height:var(--dep-plot-axis-stroke, 0.078125rem);
  background:rgba(var(--rel-shadow-2-rgb),.32);
  z-index:2;
}
#page-relatorios .relatorios-fd .plot .gridbars::before{
  content:'';
  position:absolute;
  left:0;
  top:var(--dep-plot-pad-y, 0);
  bottom:var(--dep-plot-pad-bottom, var(--dep-plot-pad-y, 0));
  width:var(--dep-plot-axis-stroke, 0.078125rem);
  background:rgba(var(--rel-shadow-2-rgb),.28);
  z-index:3;
  pointer-events:none;
}

/* camada de anotação — linhas de média e meta (Sprint 2) */
#page-relatorios .relatorios-fd .plot .annot{ position:absolute; inset:0; pointer-events:none; z-index:4; }
#page-relatorios .relatorios-fd .plot .aline{ position:absolute; left:0; right:0; height:0; border-top:0.09375rem dashed; }
#page-relatorios .relatorios-fd .plot .aline.avg{ border-color:rgba(10,61,122,.55); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .plot .aline.avg{ border-color:var(--rel-line); }
#page-relatorios .relatorios-fd .plot .aline.meta{ border-color:rgba(var(--rel-danger-bright-rgb),.6); }
#page-relatorios .relatorios-fd .plot .aline .atag{ position:absolute; right:0;
  display:inline-flex; align-items:baseline; gap:0.3125rem; font-size:0.65625rem; font-weight:700; font-variant-numeric:tabular-nums;
  padding:0.125rem 0.5rem; border-radius:0.375rem; white-space:nowrap; box-shadow:var(--elev-1); }
#page-relatorios .relatorios-fd .plot .aline.avg .atag{ bottom:0.125rem; }
#page-relatorios .relatorios-fd .plot .aline.meta .atag{ top:0.125rem; }
#page-relatorios .relatorios-fd .plot .aline .atag b{ font-size:0.59375rem; font-weight:800; letter-spacing:.05em; text-transform:uppercase; }
#page-relatorios .relatorios-fd .plot .aline.avg .atag{ background:#0a3d7a; color:#dbe8fb; }
#page-relatorios .relatorios-fd .plot .aline.avg .atag b{ color:#fff; }
#page-relatorios .relatorios-fd .plot .aline.meta .atag{ background:var(--rel-surface); color:var(--rel-ink-muted); border:0.0625rem solid rgba(var(--rel-danger-bright-rgb),.35); }
#page-relatorios .relatorios-fd .plot .aline.meta .atag b{ color:var(--rel-danger-ink); }
#page-relatorios .relatorios-fd .plot .bars{ position:absolute; inset:0; display:flex; align-items:flex-end; justify-content:space-around; padding:0 1.5%; }
#page-relatorios .relatorios-fd .plot .xrow{ grid-row:2; grid-column:2; display:flex; justify-content:space-around; padding:0.625rem 1.5% 0.25rem; position:relative; z-index:5; background:var(--surface,#fff); }
#page-relatorios .relatorios-fd .plot .xlab{ flex:1; text-align:center; font-size:0.75rem; font-weight:600; color:var(--rel-ink-faint); padding:0 0.25rem;
  display:flex; flex-direction:column; align-items:center; gap:0.1875rem; }
#page-relatorios .relatorios-fd .plot .xlab .xt{ text-wrap:balance; line-height:1.2; }

/* bar column + stack — visual "tiles" empilhados (premium) */
#page-relatorios .relatorios-fd .col{ flex:1; display:flex; flex-direction:column; justify-content:flex-end; align-items:center; height:100%; }
#page-relatorios .relatorios-fd .stack{ position:relative; width:3.5rem; max-width:72%; min-width:1.75rem; display:flex; flex-direction:column; gap:0.125rem;
  transition:transform .18s cubic-bezier(.22,1,.36,1); }
#page-relatorios .relatorios-fd .plot .stack{ filter:none; }
#page-relatorios .relatorios-fd .col:hover .stack{ transform:translateY(-0.1875rem); }
#page-relatorios .relatorios-fd .seg{ position:relative; cursor:pointer; border-radius:0; overflow:hidden;
  box-shadow:inset 0 0.0625rem 0 rgba(255,255,255,.24); transition:filter .14s, transform .14s; }
#page-relatorios .relatorios-fd .seg::after{ content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(180deg, rgba(var(--rel-surface-rgb),.20), rgba(var(--rel-surface-rgb),0) 48%); }
/* segmentos no DOM: primeiro=topo da pilha, último=base no eixo X */
#page-relatorios .relatorios-fd .plot .stack .seg:first-child{ border-radius:0.5625rem 0.5625rem 0 0; }
#page-relatorios .relatorios-fd .plot .stack .seg:last-child{ border-radius:0; }
#page-relatorios .relatorios-fd .plot .stack .seg:only-child{ border-radius:0.5625rem 0.5625rem 0 0; }
#page-relatorios .relatorios-fd .seg:hover{ filter:brightness(1.07) saturate(1.05); }
#page-relatorios .relatorios-fd .seg.dim{ opacity:.3; filter:saturate(.55); }
#page-relatorios .relatorios-fd .stack .cap, #page-relatorios .relatorios-fd .col > .cap{ font-size:0.875rem; font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums;
  letter-spacing:-0.01875rem; margin-bottom:0.5rem; line-height:1; transition:transform .16s; display:inline-flex; align-items:baseline; justify-content:center; gap:0.35em; }
#page-relatorios .relatorios-fd .col > .cap .cap-qty{ color:var(--blue); }
#page-relatorios .relatorios-fd .col > .cap .cap-pct{ color:var(--ink); }
#page-relatorios .relatorios-fd .col:hover > .cap{ transform:translateY(-0.1875rem); }

/* legend — painel alto, com rolagem interna e margens equilibradas */
#page-relatorios .relatorios-fd .legend{ position:relative; align-self:stretch; min-height:0;
  background:rgba(var(--rel-surface-rgb),.55); border:0.0625rem solid rgba(255,255,255,.8); border-radius:var(--radius-card);
  backdrop-filter:blur(0.25rem); }
#page-relatorios .relatorios-fd .legend h4{ position:absolute; top:0.9375rem; left:1.125rem; margin:0; font-size:0.625rem; font-weight:800; letter-spacing:.09em; text-transform:uppercase; color:var(--rel-ink-muted); }
#page-relatorios .relatorios-fd .legend.dep-leg-card h4{ position:static; top:auto; left:auto; }
#page-relatorios .relatorios-fd .leg-list{ position:absolute; left:0.875rem; right:0.5rem; top:2.5rem; bottom:0.875rem; overflow-y:auto;
  display:flex; flex-direction:column; gap:0.0625rem; padding-right:0.375rem;
  scrollbar-width:thin;
  scrollbar-color:var(--rel-scroll-thumb) transparent;
}
#page-relatorios .relatorios-fd .leg-list::-webkit-scrollbar{ width:0.25rem; }
#page-relatorios .relatorios-fd .leg-list::-webkit-scrollbar-thumb{ background:var(--rel-scroll-thumb); border-radius:62.4375rem; }
#page-relatorios .relatorios-fd .leg-list::-webkit-scrollbar-thumb:hover{ background:var(--rel-scroll-thumb-hover); }
#page-relatorios .relatorios-fd .leg-list::-webkit-scrollbar-track{ background:transparent; }
#page-relatorios .relatorios-fd .leg-i{ display:flex; align-items:center; gap:0.5625rem; padding:0.375rem 0.4375rem; border-radius:0.5rem; cursor:pointer; transition:.12s; }
#page-relatorios .relatorios-fd .leg-i:hover{ background:rgba(var(--rel-shadow-rgb),.05); }
#page-relatorios .relatorios-fd .leg-i .sw{ width:0.8125rem; height:0.8125rem; border-radius:0.25rem; flex:none; box-shadow:inset 0 0 0 0.0625rem rgba(var(--rel-shadow-pure-rgb),.06); }
#page-relatorios .relatorios-fd .leg-i .nm{ font-size:0.78125rem; font-weight:600; color:var(--rel-ink-2); line-height:1.2; }
#page-relatorios .relatorios-fd .leg-i .lv{ margin-left:auto; font-size:0.71875rem; font-weight:700; color:var(--rel-ink-muted); font-variant-numeric:tabular-nums; }
#page-relatorios .relatorios-fd .leg-i.off .nm{ color:#aeb9cc; text-decoration:line-through; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .leg-i.off .nm{ color:var(--rel-accent-ink); }
#page-relatorios .relatorios-fd .leg-i.off .sw{ background:#d4dae3 !important; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .leg-i.off .sw{ background:rgba(var(--rel-accent-rgb),0.16) !important; }
#page-relatorios .relatorios-fd .leg-i.off .lv{ color:#c2cad6; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .leg-i.off .lv{ color:var(--rel-accent-ink); }

#page-relatorios .relatorios-fd .chart-foot{ display:none !important; }
#page-relatorios .relatorios-fd .chart-foot .upd{ font-size:0.75rem; color:var(--muted); display:inline-flex; align-items:center; gap:0.4375rem; }
#page-relatorios .relatorios-fd .chart-foot .upd .live{ width:0.4375rem; height:0.4375rem; border-radius:50%; background:var(--blue); box-shadow:0 0 0 0.1875rem rgba(var(--rel-accent-rgb),.22); }
#page-relatorios .relatorios-fd .chart-foot .sp{ flex:1; }
#page-relatorios .relatorios-fd .chart-foot .hint-click{ font-size:0.75rem; color:var(--rel-ink-muted); display:inline-flex; align-items:center; gap:0.375rem; }
#page-relatorios .relatorios-fd .chart-foot .hint-click svg{ width:0.875rem; height:0.875rem; }

/* ============================================================
   TOOLTIP (hover na pilha / legenda)
   ============================================================ */
#page-relatorios .relatorios-fd .chart-tip{ position:fixed; z-index:120; min-width:7.5rem; max-width:17.5rem; background:var(--surface);
  border:0.0625rem solid var(--line); border-radius:0.6875rem; box-shadow:0 1.125rem 2.75rem -1rem rgba(8,20,48,.45);
  padding:0.625rem 0.8125rem; pointer-events:none; opacity:0; transform:translateY(0.25rem); transition:opacity .12s, transform .12s; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-tip{ box-shadow:0 1.125rem 2.75rem -1rem rgba(var(--rel-shadow-rgb),0.45); }
#page-relatorios .relatorios-fd .chart-tip.show{ opacity:1; transform:translateY(0); }
#page-relatorios .relatorios-fd .chart-tip .tp-h{ font-size:0.8125rem; font-weight:800; color:var(--ink); letter-spacing:-0.0125rem; }
#page-relatorios .relatorios-fd .chart-tip .tp-h.solo{ font-weight:700; }
#page-relatorios .relatorios-fd .chart-tip .tp-r{ display:flex; align-items:center; gap:0.5625rem; margin-top:0.5rem; }
#page-relatorios .relatorios-fd .chart-tip .tp-r .sw{ width:0.8125rem; height:0.8125rem; border-radius:0.25rem; flex:none; }
#page-relatorios .relatorios-fd .chart-tip .tp-r .nm{ font-size:0.78125rem; font-weight:600; color:var(--rel-ink-2); }
#page-relatorios .relatorios-fd .chart-tip .tp-r .vl{ margin-left:auto; font-size:0.8125rem; font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums; padding-left:1.125rem; }
#page-relatorios .relatorios-fd .chart-tip .tp-pct{ font-size:0.6875rem; color:var(--muted); margin-top:0.3125rem; }

/* ============================================================
   DRAWER — drill-down (clique numa pilha)
   ============================================================ */
#page-relatorios .relatorios-fd .dd-overlay{ position:fixed; inset:0; z-index:var(--app-layer-scrim,2050); background:rgba(8,16,38,.38);
  opacity:0; pointer-events:none; transition:opacity .2s; backdrop-filter:none; -webkit-backdrop-filter:none; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .dd-overlay{ background:var(--rel-accent-ink); }
#page-relatorios .relatorios-fd .dd-overlay.open{ opacity:1; pointer-events:auto; }
/* Travamento sem position:fixed no body — scroll de .main-content + compensação da scrollbar */
html.relatorios-drawer-open{
  overscroll-behavior:none;
}
html.relatorios-drawer-open #appScreen .main-content,
html.relatorios-drawer-open .main-content{
  overflow:hidden !important;
  overscroll-behavior:none;
  /* Compensa a largura da scrollbar que some, evitando micro-shift do conteúdo */
  padding-right:calc(0 + var(--rel-drawer-sbw, 0));
  box-sizing:border-box;
}
html.relatorios-drawer-open #page-relatorios{
  overflow:hidden;
}
html.relatorios-drawer-open #page-relatorios .relatorios-fd{
  pointer-events:none;
}
html.relatorios-drawer-open #page-relatorios .relatorios-fd .dd-overlay.open,
html.relatorios-drawer-open #page-relatorios .relatorios-fd .drawer.open,
html.relatorios-drawer-open #page-relatorios .relatorios-fd .anl-scrim.open,
html.relatorios-drawer-open #page-relatorios .relatorios-fd .anl-drawer.open{
  pointer-events:auto;
}
/* Topbar permanece atrás do scrim (escurece) — z-index do overlay > topbar sticky */
html.relatorios-drawer-open #appScreen .app-topbar,
html.relatorios-drawer-open .app-topbar{
  visibility:visible;
  opacity:1;
}
/* Resumo expandido: 2º painel = coluna de conversa do Chats com
   sidebar geral (220) + fila (360) + painel direito (340) abertos. */
#page-relatorios .relatorios-fd{
  --rel-app-sidebar-w: 13.75rem;
  --rel-chats-queue-w: 22.5rem;
  --rel-chats-panel-w: 21.25rem;
  --rel-dw-detail-w: 28.75rem;
  --rel-dw-convo-chat-w: max(
    17.5rem,
    calc(100vw - var(--rel-app-sidebar-w) - var(--rel-chats-queue-w) - var(--rel-chats-panel-w))
  );
  --rel-dw-expanded-w: min(
    calc(100vw - var(--rel-app-sidebar-w)),
    calc(var(--rel-dw-detail-w) + var(--rel-dw-convo-chat-w))
  );
}
#page-relatorios .relatorios-fd .drawer{ position:fixed; top:0; right:0; bottom:0; z-index:var(--app-layer-drawer,2051); width:var(--rel-dw-detail-w); max-width:calc(100vw - var(--rel-app-sidebar-w)); background:var(--surface);
  isolation:isolate; backdrop-filter:none; -webkit-backdrop-filter:none;
  box-shadow:none; transform:translateX(100%);
  transition:transform .26s cubic-bezier(.4,.0,.2,1), width .34s cubic-bezier(.22,1,.36,1);
  display:flex; flex-direction:row; overflow:hidden; }
#page-relatorios .relatorios-fd .drawer.open{ transform:none; }
#page-relatorios .relatorios-fd .drawer.expanded{ width:var(--rel-dw-expanded-w); max-width:calc(100vw - var(--rel-app-sidebar-w)); }
/* painel de detalhe (esquerda) — mantém largura fixa */
#page-relatorios .relatorios-fd .dw-detail{ width:var(--rel-dw-detail-w); flex:none; display:flex; flex-direction:column; height:100%; min-height:0; }
/* painel de conversa (direita) — revelado ao expandir no tamanho da coluna Chats */
#page-relatorios .relatorios-fd .dw-convo{ flex:1 1 auto; min-width:0; width:0; display:flex; flex-direction:column; height:100%; min-height:0;
  background:#eef2f7; border-left:0.0625rem solid var(--line); opacity:0; transition:opacity .22s ease .06s; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .dw-convo{ background:rgba(var(--rel-accent-rgb),0.16); }
#page-relatorios .relatorios-fd .drawer.expanded .dw-convo{ opacity:1; width:auto; flex:1 1 0; min-width:0; max-width:none; }
#page-relatorios .relatorios-fd .cv-head{ flex:none; display:flex; align-items:center; gap:0.6875rem; padding:0.9375rem 1.125rem; background:var(--surface); border-bottom:0.0625rem solid var(--line); }
#page-relatorios .relatorios-fd .cv-ava{ width:2.5rem; height:2.5rem; border-radius:0.6875rem; flex:none; display:flex; align-items:center; justify-content:center;
  font-size:0.875rem; font-weight:700; color:#fff; background:linear-gradient(150deg,#2b9bff,#0046d6); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .cv-ava{ background:linear-gradient(150deg,var(--rel-accent-ink),var(--rel-accent-ink)); }
#page-relatorios .relatorios-fd .cv-id{ min-width:0; flex:1; }
#page-relatorios .relatorios-fd .cv-name{ font-size:0.90625rem; font-weight:800; color:var(--ink); letter-spacing:-0.0125rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#page-relatorios .relatorios-fd .cv-meta{ font-size:0.71875rem; color:var(--muted); margin-top:0.0625rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#page-relatorios .relatorios-fd .cv-chan{ flex:none; color:#1eb45c; } #page-relatorios .relatorios-fd .cv-chan svg{ width:1.375rem; height:1.375rem; }
/* Thread do resumo: host only — bolhas = chats-timeline-bubbles-skin.css (.rel-dw-chats-mirror). */
#page-relatorios .relatorios-fd .cv-thread{ flex:1; min-height:0; overflow-x:hidden; overflow-y:auto; padding:1.125rem 1.125rem 0.5rem; display:flex; flex-direction:column; gap:0.875rem; }
#page-relatorios .relatorios-fd .cv-thread-empty{ padding:1rem; color:var(--muted); font-size:0.8125rem; margin:0; }
#page-relatorios .relatorios-fd .cv-day{ align-self:center; font-size:0.65625rem; font-weight:700; color:var(--rel-icon-muted); background:rgba(var(--rel-shadow-rgb),.06);
  padding:0.25rem 0.75rem; border-radius:62.4375rem; margin:0.125rem 0 0.5rem; text-transform:capitalize; }
#page-relatorios .relatorios-fd .cv-note{ flex:none; display:flex; align-items:center; justify-content:center; gap:0.4375rem; padding:0.6875rem 1rem;
  font-size:0.71875rem; font-weight:600; color:var(--rel-ink-muted); background:var(--surface); border-top:0.0625rem solid var(--line); }
#page-relatorios .relatorios-fd .cv-note svg{ width:0.875rem; height:0.875rem; }
#page-relatorios .relatorios-fd .drawer .dw-head{ position:relative; padding:1.375rem 1.5rem 1.125rem; color:#fff; flex:none; overflow:hidden;
  background:linear-gradient(155deg,#0a2a6b,#0046b8); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer .dw-head{ background:linear-gradient(155deg,var(--rel-accent-ink),var(--rel-accent-ink)); }
#page-relatorios .relatorios-fd .drawer .dw-head::before{ content:""; position:absolute; inset:0; background:linear-gradient(155deg,#0a2a6b,#0046b8); z-index:0; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer .dw-head::before{ background:linear-gradient(155deg,var(--rel-accent-ink),var(--rel-accent-ink)); }
#page-relatorios .relatorios-fd .drawer .dw-head > *{ position:relative; z-index:1; }
#page-relatorios .relatorios-fd .drawer .dw-crumb{ display:flex; align-items:center; gap:0.5rem; font-size:0.75rem; font-weight:600; color:#bcd2f5; margin-bottom:0.75rem; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer .dw-crumb{ color:var(--rel-accent-ink); }
#page-relatorios .relatorios-fd .drawer .dw-crumb .seg-sw{ width:0.6875rem; height:0.6875rem; border-radius:0.1875rem; }
#page-relatorios .relatorios-fd .drawer .dw-crumb svg{ width:0.8125rem; height:0.8125rem; opacity:.7; }
#page-relatorios .relatorios-fd .drawer .dw-title{ font-size:1.3125rem; font-weight:800; letter-spacing:-0.025rem; }
#page-relatorios .relatorios-fd .drawer .dw-sub{ font-size:0.8125rem; color:#c4d6f5; margin-top:0.25rem; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer .dw-sub{ color:var(--rel-accent-ink); }
#page-relatorios .relatorios-fd .drawer .dw-x{ position:absolute; top:1.125rem; right:1.125rem; z-index:2; width:2.25rem; height:2.25rem; border-radius:0.625rem;
  border:0.0625rem solid rgba(255,255,255,.22); background:rgba(var(--rel-surface-rgb),.12); color:#fff; cursor:pointer;
  display:flex; align-items:center; justify-content:center; transition:.15s; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer .dw-x{ border:0.0625rem solid var(--rel-line); }
#page-relatorios .relatorios-fd .drawer .dw-x:hover{ background:rgba(var(--rel-surface-rgb),.22); }
#page-relatorios .relatorios-fd .drawer .dw-x svg{ width:1.125rem; height:1.125rem; }
#page-relatorios .relatorios-fd .drawer .dw-kpis{ display:flex; gap:0.625rem; margin-top:1.125rem; }
#page-relatorios .relatorios-fd .drawer .dw-kpi{ flex:1; background:rgba(var(--rel-surface-rgb),.12); border:0.0625rem solid rgba(255,255,255,.16); border-radius:var(--radius-card); padding:0.625rem 0.75rem; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer .dw-kpi{ border:0.0625rem solid var(--rel-line); }
#page-relatorios .relatorios-fd .drawer .dw-kpi .v{ font-size:1.25rem; font-weight:800; letter-spacing:-0.03125rem; line-height:1; }
#page-relatorios .relatorios-fd .drawer .dw-kpi .l{ font-size:0.625rem; font-weight:700; letter-spacing:.05em; text-transform:uppercase; color:#bcd2f5; margin-top:0.3125rem; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer .dw-kpi .l{ color:var(--rel-accent-ink); }

#page-relatorios .relatorios-fd .drawer .dw-body{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  padding:1.25rem 1.5rem 1.625rem;
}
#page-relatorios .relatorios-fd .dw-sec-t{ font-size:0.6875rem; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:var(--rel-ink-muted); margin:0 0 0.8125rem; }
/* subcategoria bars */
#page-relatorios .relatorios-fd .subbars{ display:flex; flex-direction:column; gap:0.75rem; margin-bottom:1.625rem; }
#page-relatorios .relatorios-fd .subbar .sb-top{ display:flex; align-items:baseline; gap:0.5rem; margin-bottom:0.375rem; }
#page-relatorios .relatorios-fd .subbar .sb-nm{ font-size:0.8125rem; font-weight:600; color:var(--rel-ink-2); }
#page-relatorios .relatorios-fd .subbar .sb-vl{ margin-left:auto; font-size:0.8125rem; font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums; }
#page-relatorios .relatorios-fd .subbar .sb-pc{ font-size:0.71875rem; font-weight:600; color:var(--rel-ink-muted); }
#page-relatorios .relatorios-fd .subbar .sb-track{ height:0.5625rem; border-radius:0.375rem; background:var(--field); overflow:hidden; }
#page-relatorios .relatorios-fd .subbar .sb-fill{ height:100%; border-radius:0.375rem; transform-origin:left; transition:width .5s cubic-bezier(.4,0,.2,1); }

/* tickets list */
#page-relatorios .relatorios-fd .dw-tk{ display:flex; align-items:center; gap:0.75rem; padding:0.75rem 0; border-bottom:0.0625rem solid var(--line); }
#page-relatorios .relatorios-fd .dw-tk:last-child{ border-bottom:0; }
#page-relatorios .relatorios-fd .dw-tk .tk-av{ width:2.375rem; height:2.375rem; border-radius:0.625rem; background:linear-gradient(150deg,#2b9bff,#0046d6); color:#fff;
  display:flex; align-items:center; justify-content:center; font-size:0.8125rem; font-weight:700; flex:none; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .dw-tk .tk-av{ background:linear-gradient(150deg,var(--rel-accent-ink),var(--rel-accent-ink)); }
#page-relatorios .relatorios-fd .dw-tk .tk-main{ min-width:0; }
#page-relatorios .relatorios-fd .dw-tk .tk-id{ font-size:0.75rem; font-weight:800; color:var(--blue); }
#page-relatorios .relatorios-fd .dw-tk .tk-nm{ font-size:0.84375rem; font-weight:700; color:var(--ink); line-height:1.2; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
#page-relatorios .relatorios-fd .dw-tk .tk-meta{ font-size:0.71875rem; color:var(--muted); margin-top:0.0625rem; }
#page-relatorios .relatorios-fd .dw-tk .tk-r{ margin-left:auto; text-align:right; flex:none; }
#page-relatorios .relatorios-fd .dw-tk .tk-st{ display:inline-flex; align-items:center; gap:0.3125rem; font-size:0.6875rem; font-weight:700; padding:0.1875rem 0.5rem; border-radius:62.4375rem; }
#page-relatorios .relatorios-fd .dw-tk .tk-st.at{ background:rgba(var(--rel-accent-rgb),.12); color:var(--rel-accent-strong); } #page-relatorios .relatorios-fd .dw-tk .tk-st.at .d{ background:var(--blue); }
#page-relatorios .relatorios-fd .dw-tk .tk-st.fi{ background:var(--field); color:var(--rel-ink-faint); } #page-relatorios .relatorios-fd .dw-tk .tk-st.fi .d{ background:var(--rel-icon-muted); }
#page-relatorios .relatorios-fd .dw-tk .tk-st .d{ width:0.375rem; height:0.375rem; border-radius:50%; }
#page-relatorios .relatorios-fd .dw-tk .tk-tm{ font-size:0.6875rem; color:var(--rel-ink-muted); margin-top:0.1875rem; }

#page-relatorios .relatorios-fd .drawer .dw-foot{ flex:none; padding:0.875rem 1.5rem; border-top:0.0625rem solid var(--line); display:flex; gap:0.625rem; background:var(--surface); }
#page-relatorios .relatorios-fd .drawer .dw-foot button{
  flex:1;
  width:100%;
  min-height:2.625rem;
  border-radius:var(--radius-card, 0.25rem);
  font-family:inherit;
  font-size:0.8125rem;
  font-weight:800;
  cursor:pointer;
  transition:.15s;
  border:0.0625rem solid var(--line);
  background:var(--surface);
  color:var(--rel-ink-2);
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:0.5rem;
  padding:0 1rem;
}
#page-relatorios .relatorios-fd .drawer .dw-foot button.primary{
  background:var(--a-blue);
  color:#fff;
  border-color:var(--a-blue);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer .dw-foot button.primary{ border-color:var(--rel-line); }
#page-relatorios .relatorios-fd .drawer .dw-foot button:hover:not(:disabled):not(.dw-export-soon){
  transform:translateY(-0.0625rem);
  box-shadow:var(--a-elev-2);
}
#page-relatorios .relatorios-fd .drawer .dw-foot .dw-export-soon{
  position:relative;
  overflow:hidden;
  cursor:not-allowed;
  pointer-events:none;
  opacity:.78;
  color:var(--rel-ink-muted);
  background:#f4f6fa;
  border-color:var(--line);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer .dw-foot .dw-export-soon{ background:rgba(var(--rel-accent-rgb),0.16); }
#page-relatorios .relatorios-fd .drawer .dw-foot .dw-export-soon .dw-export-label{
  opacity:.55;
}
#page-relatorios .relatorios-fd .drawer .dw-foot .dw-export-soon .dw-export-wm{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:0.6875rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:#e6b000;
  transform:rotate(-16deg);
  pointer-events:none;
  text-shadow:
    0 0 0.375rem rgba(255,255,255,.95),
    0 0.0625rem 0 rgba(255,255,255,.7);
  user-select:none;
}

/* drawer — detalhes de ticket (lista de campos + tempos) */
#page-relatorios .relatorios-fd .dw-dls--cliente{ margin-bottom:1rem; }
#page-relatorios .relatorios-fd .cli-dw-bars{ padding:0 0.125rem 0.25rem; margin-bottom:1.25rem; }
#page-relatorios .relatorios-fd .cli-dw-bar{ margin-bottom:0.625rem; }
#page-relatorios .relatorios-fd .cli-dw-bar-top{ display:flex; justify-content:space-between; align-items:baseline; gap:0.5rem; font-size:0.75rem; margin-bottom:0.25rem; color:var(--rel-ink-2); }
#page-relatorios .relatorios-fd .cli-dw-bar-top b{ font-size:0.75rem; font-weight:800; color:var(--ink); }
#page-relatorios .relatorios-fd .cli-dw-bar-top span{ min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#page-relatorios .relatorios-fd .cli-dw-bar-track{ height:0.375rem; border-radius:6.1875rem; background:var(--field); overflow:hidden; }
#page-relatorios .relatorios-fd .cli-dw-bar-track i{ display:block; height:100%; border-radius:6.1875rem; background:var(--blue); }

#page-relatorios .relatorios-fd .drawer .dw-crumb .dw-crumb-inicio{ font-weight:700; color:#e8f1ff; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer .dw-crumb .dw-crumb-inicio{ color:var(--rel-accent-ink); }
#page-relatorios .relatorios-fd .drawer .dw-crumb .dw-crumb-status{ font-weight:600; color:#fff; }
#page-relatorios .relatorios-fd .drawer .dw-crumb[hidden]{
  display:none !important;
  margin:0;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"] .dw-kpi,
#page-relatorios .relatorios-fd .drawer[data-detail-kind="cliente"] .dw-kpi{
  display:grid;
  grid-template-rows:auto minmax(2.6em, 1fr);
  align-items:start;
  justify-items:center;
  text-align:center;
  min-height:0;
  gap:0.375rem;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"] .dw-kpi .l,
#page-relatorios .relatorios-fd .drawer[data-detail-kind="cliente"] .dw-kpi .l{
  order:-1;
  margin-top:0;
  margin-bottom:0;
  width:100%;
  min-height:1.2em;
  font-size:0.6875rem;
  font-weight:800;
  line-height:1.2;
  letter-spacing:.05em;
  text-transform:uppercase;
  color:#e8f1ff;
  text-align:center;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"] .dw-kpi .l,html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer[data-detail-kind="cliente"] .dw-kpi .l{ color:var(--rel-accent-ink); }
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"] .dw-kpi .v,
#page-relatorios .relatorios-fd .drawer[data-detail-kind="cliente"] .dw-kpi .v{
  font-size:0.8125rem; font-weight:600; letter-spacing:-0.0125rem; line-height:1.25;
  display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden;
  width:100%;
  align-self:center;
  text-align:center;
  color:#fff;
}
#page-relatorios .relatorios-fd .dw-dls--ticket{ margin-bottom:1.125rem; }
#page-relatorios .relatorios-fd .dw-aval-card{
  border:0.0625rem solid var(--line); border-radius:0.75rem; background:var(--surface);
  padding:0.875rem 1rem 1rem; margin:0 0 1.375rem;
}
#page-relatorios .relatorios-fd .dw-aval-sec-t{ margin-bottom:0.625rem; }
#page-relatorios .relatorios-fd .dw-aval-stars{ display:flex; gap:0.375rem; margin-bottom:0.5rem; }
#page-relatorios .relatorios-fd .dw-aval-star{ font-size:1.375rem; line-height:1; color:#c5cdd8; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .dw-aval-star{ color:var(--rel-accent-ink); }
#page-relatorios .relatorios-fd .dw-aval-soon{ margin:0; font-size:0.8125rem; font-weight:600; color:var(--rel-ink-muted); }
#page-relatorios .relatorios-fd .dw-dls{ display:grid; grid-template-columns:1fr 1fr; gap:0.0625rem; background:var(--line); border:0.0625rem solid var(--line);
  border-radius:var(--radius-card); overflow:hidden; margin-bottom:1.5rem; }
#page-relatorios .relatorios-fd .dw-dl{ background:var(--surface); padding:0.6875rem 0.8125rem; }
#page-relatorios .relatorios-fd .dw-dl .dl-k{ display:block; font-size:0.65625rem; font-weight:700; letter-spacing:.03em; text-transform:uppercase; color:var(--rel-ink-muted); }
#page-relatorios .relatorios-fd .dw-dl .dl-v{ display:block; font-size:0.84375rem; font-weight:700; color:var(--ink); margin-top:0.1875rem; }
#page-relatorios .relatorios-fd .dw-dl--status-split .dl-v-sub{
  margin-top:0.25rem;
  font-size:0.8125rem;
  font-weight:700;
  color:var(--ink);
}
#page-relatorios .relatorios-fd .dw-times{ display:flex; gap:0.75rem; }
#page-relatorios .relatorios-fd .dw-time{ flex:1; border:0.0625rem solid var(--line); border-radius:var(--radius-card); padding:0.8125rem 0.875rem; background:var(--field); }
#page-relatorios .relatorios-fd .dw-time .tl{ font-size:0.6875rem; font-weight:700; color:var(--muted); }
#page-relatorios .relatorios-fd .dw-time .tv{ font-size:1.3125rem; font-weight:800; color:var(--ink); font-variant-numeric:tabular-nums; letter-spacing:-0.03125rem; margin:0.3125rem 0 0.5625rem; }
#page-relatorios .relatorios-fd .dw-sec-hint{ font-size:0.75rem; font-weight:600; color:var(--muted); line-height:1.45; margin:-0.375rem 0 0.75rem; }
#page-relatorios .relatorios-fd .dw-sla-line{ display:flex; flex-direction:column; align-items:flex-start; gap:0.375rem; margin-top:0.125rem; }
#page-relatorios .relatorios-fd .dw-sla-hint{ margin:0; font-size:0.6875rem; font-weight:600; color:var(--rel-icon-muted); line-height:1.4; }
#page-relatorios .relatorios-fd .dw-time .sla-b{ font-size:0.71875rem; padding:0.25rem 0.625rem; }
/* drawer ticket — sem centrar o stack (evita faixa vazia); gap simétrico entre blocos */
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-body{
  overflow-y:auto;
  padding:1rem 1.25rem;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  flex:1 1 auto;
  min-height:0;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-ticket-stack{
  flex:0 1 auto;
  min-height:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:1rem;
  margin:0;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-ticket-block{
  flex:0 0 auto;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-ticket-block .dw-aval-card{
  margin-bottom:0;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-ticket-block .dw-dls--ticket{
  margin-bottom:0;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-ticket-block--tempos .dw-times{
  margin-bottom:0;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-head{
  padding:1.125rem 1.25rem 0.875rem;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-kpis{
  margin-top:0.875rem;
  gap:0.5rem;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-kpi{
  padding:0.5rem 0.625rem;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-dls--ticket{
  margin-bottom:0;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-aval-card{
  margin-bottom:0;
  padding:0.6875rem 0.875rem 0.8125rem;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-aval-star{
  font-size:1.1875rem;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-sec-t{
  margin-top:0;
  margin-bottom:0.5rem;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-sec-hint{
  margin:-0.25rem 0 0.625rem;
  line-height:1.35;
  font-size:0.71875rem;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-times{
  gap:0.625rem;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-time{
  padding:0.625rem 0.75rem;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-time .tv{
  font-size:1.1875rem;
  margin:0.1875rem 0 0.3125rem;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-sla-hint{
  font-size:0.65625rem;
  line-height:1.28;
  margin:0;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"]:not(.expanded) .dw-foot{
  padding:0.75rem 1.25rem;
  flex-shrink:0;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="ticket"] .dw-detail,
#page-relatorios .relatorios-fd .drawer[data-detail-kind="cliente"] .dw-detail{
  display:flex;
  flex-direction:column;
  min-height:0;
  overflow:hidden;
}
#page-relatorios .relatorios-fd .drawer[data-detail-kind="cliente"] .dw-foot{
  padding:0.75rem 1.25rem;
  flex-shrink:0;
}
#page-relatorios .relatorios-fd .drawer .dw-foot #dwPrimary,
#page-relatorios .relatorios-fd .drawer .dw-foot button.primary{
  background:var(--a-blue, var(--blue, #007bff));
  color:#fff;
  border-color:var(--a-blue, var(--blue, #007bff));
  opacity:1;
  visibility:visible;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer .dw-foot #dwPrimary,html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer .dw-foot button.primary{ border-color:var(--rel-line); }

/* ============================================================
   VISÃO TICKETS — data grid
   ============================================================ */
#page-relatorios .relatorios-fd .tickets-card{ background:var(--surface); border:0.0625rem solid var(--line); border-radius:var(--radius-card);
  box-shadow:var(--elev-3); overflow:hidden; }
#page-relatorios .relatorios-fd .tk-head{ display:flex; align-items:flex-start; gap:0.875rem; padding:1.375rem 1.625rem 0.875rem; border-bottom:0.0625rem solid var(--line); }
#page-relatorios .relatorios-fd .tk-head .sp{ flex:1; }
#page-relatorios .relatorios-fd .tk-pill{ font-size:0.78125rem; color:var(--muted); font-weight:600; white-space:nowrap; }
#page-relatorios .relatorios-fd .tk-pill b{ color:var(--ink); font-weight:800; font-size:0.875rem; }

/* KPI strip — hierarquia: 1 herói + apoios, algarismos tabulares */
#page-relatorios .relatorios-fd .tk-stats{
  display:flex; gap:0; padding:0.875rem 1.375rem;
  border:0.0625rem solid color-mix(in srgb, var(--blue,#007bff) 16%, var(--line));
  border-bottom:0.0625rem solid color-mix(in srgb, var(--blue,#007bff) 12%, var(--line));
  background:linear-gradient(
    148deg,
    color-mix(in srgb, #f4f9ff 90%, var(--rel-surface)) 0%,
    color-mix(in srgb, #c9ddf2 48%, #e6f0fa) 42%,
    color-mix(in srgb, #dce9f7 72%, var(--rel-surface)) 68%,
    color-mix(in srgb, #b8d0eb 38%, #edf4fc) 100%
  );
  box-shadow:
    0 0.0625rem 0.125rem rgba(var(--rel-shadow-rgb),.07),
    inset 0 0.0625rem 0 rgba(255,255,255,.78),
    inset 0 -0.0625rem 0 rgba(var(--rel-shadow-rgb),.05);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tk-stats{ border:0.0625rem solid var(--rel-line); border-bottom:0.0625rem solid var(--rel-line); }
html[data-theme="dark"] #page-relatorios .relatorios-fd .tk-stats{
  background:linear-gradient(
    148deg,
    color-mix(in srgb, #1a2d4a 88%, #243a5c) 0%,
    color-mix(in srgb, #2a4470 70%, #1e3354) 50%,
    color-mix(in srgb, #1f3558 85%, #2d4a72) 100%
  );
  border-color:color-mix(in srgb, var(--blue,#007bff) 28%, var(--line));
  box-shadow:
    0 0.0625rem 0.125rem rgba(0,0,0,.35),
    inset 0 0.0625rem 0 rgba(255,255,255,.08);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tk-stats{
  background:linear-gradient(
    148deg,
    color-mix(in srgb, #1a2d4a 88%, #243a5c) 0%,
    color-mix(in srgb, #2a4470 70%, #1e3354) 50%,
    color-mix(in srgb, #1f3558 85%, #2d4a72) 100%
  );
  border-color:color-mix(in srgb, var(--blue,#007bff) 28%, var(--line));
  box-shadow:
    0 0.0625rem 0.125rem rgba(0,0,0,.35),
    inset 0 0.0625rem 0 rgba(255,255,255,.08);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tk-stats{ border-color:var(--rel-line); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tk-stats{ border-color:var(--rel-line); }
#page-relatorios .relatorios-fd .tk-stat{ flex:1; display:flex; flex-direction:column; align-items:center; justify-content:flex-start; text-align:center; padding:0 1.125rem; border-left:0.0625rem solid color-mix(in srgb, var(--blue,#007bff) 14%, var(--line)); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tk-stat{ border-left:0.0625rem solid var(--rel-line); }
#page-relatorios .relatorios-fd .tk-stat:first-child{ border-left:0; }
#page-relatorios .relatorios-fd .tk-stat .sv{ font-size:1.125rem; font-weight:700; color:var(--rel-ink-2); font-variant-numeric:tabular-nums; letter-spacing:-0.025rem; line-height:1; text-align:center; }
#page-relatorios .relatorios-fd .tk-stat .sv b{ font-weight:800; }
#page-relatorios .relatorios-fd .tk-stat .sv i{ font-style:normal; font-size:0.8125rem; font-weight:600; color:var(--rel-ink-muted); }
#page-relatorios .relatorios-fd .tk-stat .sl{ font-size:0.65625rem; font-weight:700; letter-spacing:.04em; text-transform:uppercase; color:var(--rel-ink-muted); margin:0 0 0.375rem; line-height:1.2; text-align:center; }
#page-relatorios .relatorios-fd .tk-stat.hero .sv{ font-size:1.625rem; color:var(--blue); letter-spacing:-0.0625rem; }
#page-relatorios .relatorios-fd .tk-stat.hero .sl{ color:#5b8fd6; }
#page-relatorios .relatorios-fd .tk-stat.alert .sv{ color:var(--rel-danger-ink); }
#page-relatorios .relatorios-fd .tk-stat.alert .sl{ color:#c0867f; }

/* heatmap Volume por dia e hora (aba Análise) */
#page-relatorios .relatorios-fd .tk-vol-heat-body{ padding:1rem 1.25rem 1.125rem; }
#page-relatorios .relatorios-fd .tk-vol-heat-grid{
  display:grid;
  grid-template-columns:auto repeat(24,minmax(0,1fr));
  gap:0.25rem;
  width:100%;
  align-items:center;
}
#page-relatorios .relatorios-fd .tk-vol-heat-corner{ min-width:0; height:0; }
#page-relatorios .relatorios-fd .tk-vol-heat-x{
  text-align:center;
  font-size:0.625rem;
  font-weight:700;
  color:var(--muted,#9aa7bd);
  font-variant-numeric:tabular-nums;
  padding-bottom:0.375rem;
}
#page-relatorios .relatorios-fd .tk-vol-heat-y{
  padding:0.25rem 0.625rem 0.25rem 0;
  font-size:0.75rem;
  font-weight:700;
  color:var(--muted,#7c8aa6);
  white-space:nowrap;
}
#page-relatorios .relatorios-fd .tk-vol-heat-cell{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:1.625rem;
  aspect-ratio:1;
  width:100%;
  max-height:2.25rem;
  border-radius:0.25rem;
  font-size:0.625rem;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  background:rgba(var(--rel-accent-chart-rgb),calc(var(--tk-heat-a,0) * 1));
  box-shadow:inset 0 0 0 0.0625rem rgba(var(--rel-shadow-rgb),.04);
}
#page-relatorios .relatorios-fd .tk-vol-heat-cell.is-lite{ color:var(--fg,#222); font-weight:700; }
#page-relatorios .relatorios-fd .tk-vol-heat-cell.is-dark{ color:#fff; }
#page-relatorios .relatorios-fd .tk-vol-heat-cell.is-zero{
  background:var(--field,#eef1f5);
  color:var(--muted,#9aa7bd);
  font-weight:600;
  box-shadow:inset 0 0 0 0.0625rem rgba(var(--rel-shadow-rgb),.06);
}

/* treemap Volume por horário (aba Análise) */
#page-relatorios .relatorios-fd .tk-hour-treemap-body{ padding:1rem 1rem 1.125rem; }
#page-relatorios .relatorios-fd .tk-hour-treemap-cap{
  background:linear-gradient(180deg,#0a2a6b,#0046b8);
  color:#fff;
  text-align:center;
  font-size:0.75rem;
  font-weight:800;
  letter-spacing:.02em;
  padding:0.5625rem 0.625rem;
  border-radius:0.625rem 0.625rem 0 0;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tk-hour-treemap-cap{ background:linear-gradient(180deg,var(--rel-accent-ink),var(--rel-accent-ink)); }
#page-relatorios .relatorios-fd .tk-hour-treemap{
  position:relative;
  width:100%;
  min-height:17.5rem;
  height:17.5rem;
  background:var(--surface,#fff);
  border:0.0625rem solid var(--line,#e8eaed);
  border-top:0;
  border-radius:0 0 0.75rem 0.75rem;
  overflow:hidden;
}
#page-relatorios .relatorios-fd .tk-hour-tm-cell{
  position:absolute;
  box-sizing:border-box;
  border:0.125rem solid var(--rel-surface);
  border-radius:0.375rem;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:0.0625rem;
  padding:0.25rem 0.375rem;
  overflow:hidden;
  text-align:center;
  transition:filter .15s ease;
}
#page-relatorios .relatorios-fd .tk-hour-tm-cell:hover{ filter:brightness(1.06); z-index:2; }
#page-relatorios .relatorios-fd .tk-hour-tm-lbl{
  font-size:0.65625rem;
  font-weight:700;
  line-height:1.15;
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#page-relatorios .relatorios-fd .tk-hour-tm-val{
  font-size:0.875rem;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  line-height:1.1;
}
#page-relatorios .relatorios-fd .tk-hour-tm-cell.is-dark{ color:#fff; text-shadow:0 0.0625rem 0.125rem rgba(var(--rel-shadow-pure-rgb),.18); }
#page-relatorios .relatorios-fd .tk-hour-tm-cell:not(.is-dark){ color:var(--ink,#1a2b4a); }

#page-relatorios .relatorios-fd .tk-tablewrap{
  overflow:auto;
  max-height:40rem;
  scrollbar-gutter:stable;
  scrollbar-width:thin;
  scrollbar-color:var(--rel-scroll-thumb) transparent;
  position:relative;
  isolation:isolate;
  --tk-thead-band-h:3.25rem;
}
#page-relatorios .relatorios-fd .tk-tablewrap::-webkit-scrollbar{ width:0.25rem; height:0.25rem; }
#page-relatorios .relatorios-fd .tk-tablewrap::-webkit-scrollbar-track{ background:transparent; }
#page-relatorios .relatorios-fd .tk-tablewrap::-webkit-scrollbar-thumb{
  background:var(--rel-scroll-thumb);
  border-radius:62.4375rem;
}
#page-relatorios .relatorios-fd .tk-tablewrap::-webkit-scrollbar-thumb:hover{ background:var(--rel-scroll-thumb-hover); }
/* Faixa sticky do cabeçalho — azul uniforme (ref. Relatórios) + degradê suave na base */
#page-relatorios .relatorios-fd .tk-tablewrap::before{
  content:"";
  position:sticky;
  top:0;
  left:0;
  right:0;
  z-index:2;
  display:block;
  height:var(--tk-thead-band-h, 3rem);
  margin-bottom:calc(-1 * var(--tk-thead-band-h, 3rem));
  pointer-events:none;
  background:var(--blue,#007bff);
  border-radius:var(--radius-card) var(--radius-card) 0 0;
}
#page-relatorios .relatorios-fd .tk-tablewrap::after{
  content:none !important;
  display:none !important;
}
#page-relatorios .relatorios-fd .tk-colrow th{
  position:sticky; top:0; z-index:3; font-weight:700; font-size:0.75rem;
  text-align:center; vertical-align:middle;
  padding:0.8125rem 0.5rem; white-space:nowrap; cursor:pointer; user-select:none;
  border-right:0;
  border-bottom:0;
  box-sizing:border-box;
}
#page-relatorios .relatorios-fd .tk-table{ width:100%; border-collapse:separate; border-spacing:0; font-size:0.8125rem; }
#page-relatorios .relatorios-fd .tk-table thead th{ background:transparent; color:#fff; }
#page-relatorios .relatorios-fd .tk-colrow th.sorted::after{
  content:"▲";
  font-size:0.5rem;
  margin-left:0.3125rem;
  display:inline-block;
  vertical-align:middle;
  opacity:1;
  color:#fff;
  text-shadow:
    0 0 0.25rem rgba(255, 255, 255, 0.95),
    0 0 0.625rem rgba(var(--rel-cyan-rgb), 0.9),
    0 0 1rem rgba(255, 255, 255, 0.55);
}
/* Neutraliza sticky/sombra de .tk-table vazada (acompanhamento.css global) entre Protocolo e Data */
#page-relatorios .relatorios-fd .tk-table thead th:first-child,
#page-relatorios .relatorios-fd .tk-table tbody td:first-child{
  position:static;
  left:auto;
  box-shadow:none;
}
#page-relatorios .relatorios-fd .tk-colrow th:hover{ background:rgba(var(--rel-surface-rgb),.10); }
#page-relatorios .relatorios-fd .tk-colrow th.sorted{ background:transparent; }
#page-relatorios .relatorios-fd .tk-colrow th.sorted.desc::after{ content:"▼"; }
#page-relatorios .relatorios-fd .tk-colrow th.c-perf-h{ width:7rem; }
/* separador entre grupos de colunas — desativado na lista de tickets */
#page-relatorios .relatorios-fd .tk-table .tk-colrow th.grp-start,
#page-relatorios .relatorios-fd .tk-table tbody td.grp-start{ box-shadow:none; }

#page-relatorios .relatorios-fd .tk-table tbody tr:first-child td{
  border-top:0;
}

#page-relatorios .relatorios-fd #view-tickets.tickets-card:not(.chart-card) > #tkStats{
  margin:0 1.625rem 0.875rem;
  border:0.0625rem solid var(--line);
  border-radius:var(--radius-card);
  overflow:hidden;
}
#page-relatorios .relatorios-fd #view-tickets.tickets-card:not(.chart-card) > .tk-tablewrap{
  margin:0 1.625rem 1.375rem;
  border:0.0625rem solid var(--line);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-1);
  background:var(--surface);
}
#page-relatorios .relatorios-fd .tk-table tbody td{ padding:0.5625rem 0.5rem; border-bottom:0.0625rem solid var(--line); color:#3c4a63; white-space:nowrap; }
#page-relatorios .relatorios-fd .tk-table:not(.dep-detail-table) tbody tr{ cursor:pointer; transition:background .12s; }
#page-relatorios .relatorios-fd .tk-table:not(.dep-detail-table) tbody tr:nth-child(even){ background:var(--rel-surface-sunken); }
#page-relatorios .relatorios-fd .tk-table:not(.dep-detail-table) tbody tr:hover{ background:rgba(var(--rel-accent-rgb),.07); }
#page-relatorios .relatorios-fd .tk-table:not(.dep-detail-table) tbody tr:hover td:first-child{ box-shadow:inset 0.1875rem 0 0 var(--blue); }
#page-relatorios .relatorios-fd .tk-table tbody tr:hover .c-proto{ color:var(--blue-600); }
#page-relatorios .relatorios-fd .c-proto{ font-weight:700; color:var(--blue); font-variant-numeric:tabular-nums; letter-spacing:0.0125rem; }
#page-relatorios .relatorios-fd .c-date{ color:var(--muted); font-variant-numeric:tabular-nums; }
#page-relatorios .relatorios-fd .c-client .cli-nm,
#page-relatorios .relatorios-fd .c-contratante .cli-nm{ font-weight:600; color:var(--ink); max-width:12.5rem; overflow:hidden; text-overflow:ellipsis; display:block; }
/* td.c-cat: neutraliza .c-cat global de outras páginas (ex. acompanhamento) que ficam no <head> após navegação */
#page-relatorios .relatorios-fd .tk-table tbody td.c-cat{
  display:table-cell; white-space:normal; vertical-align:middle;
  height:auto; border-radius:0; background:transparent; font-weight:inherit; font-size:inherit;
}
#page-relatorios .relatorios-fd .c-cat .cat-c{ display:block; font-weight:600; color:var(--ink); }
#page-relatorios .relatorios-fd .c-cat .cat-m{ display:block; font-size:0.71875rem; color:var(--muted); margin-top:0.0625rem; }
#page-relatorios .relatorios-fd .tk-table tbody td.c-categoria,
#page-relatorios .relatorios-fd .tk-table tbody td.c-departamento,
#page-relatorios .relatorios-fd .tk-table tbody td.c-incidente{
  font-weight:600; color:var(--ink); white-space:normal; max-width:11.25rem; overflow:hidden; text-overflow:ellipsis;
}

#page-relatorios .relatorios-fd .tk-table tbody td.c-proto,
#page-relatorios .relatorios-fd .tk-table tbody td.c-contratante,
#page-relatorios .relatorios-fd .tk-table tbody td.c-categoria,
#page-relatorios .relatorios-fd .tk-table tbody td.c-cat,
#page-relatorios .relatorios-fd .tk-table tbody td.c-departamento,
#page-relatorios .relatorios-fd .tk-table tbody td.c-incidente,
#page-relatorios .relatorios-fd .tk-table tbody td.c-analyst,
#page-relatorios .relatorios-fd .tk-table tbody td.c-status{
  text-align:center;
}
#page-relatorios .relatorios-fd .tk-table tbody td.c-cat .cat-c,
#page-relatorios .relatorios-fd .tk-table tbody td.c-cat .cat-m{
  text-align:center;
}
#page-relatorios .relatorios-fd .tk-table tbody td.c-status .st-b{
  margin-left:auto; margin-right:auto;
}

/* células de performance — número + barra de dados com tick de meta */
#page-relatorios .relatorios-fd .c-perf{ vertical-align:middle; overflow:hidden; position:relative; z-index:0; }
#page-relatorios .relatorios-fd .perf{ display:flex; flex-direction:column; gap:0.3125rem; min-width:5.875rem; overflow:hidden; }
#page-relatorios .relatorios-fd .perf-row{ display:flex; align-items:center; gap:0.375rem; }
#page-relatorios .relatorios-fd .perf-v{ font-size:0.78125rem; font-weight:700; font-variant-numeric:tabular-nums; letter-spacing:0.0125rem; }
#page-relatorios .relatorios-fd .perf-v.ok{ color:var(--rel-accent-strong); } #page-relatorios .relatorios-fd .perf-v.warn{ color:var(--rel-warn-ink); } #page-relatorios .relatorios-fd .perf-v.bad{ color:var(--rel-danger-ink); }
#page-relatorios .relatorios-fd .perf-v.na{ color:var(--rel-ink-faint); }
#page-relatorios .relatorios-fd .perf-track{ position:relative; height:0.375rem; border-radius:0.25rem; background:rgba(var(--rel-shadow-rgb),.08); overflow:hidden; }
#page-relatorios .relatorios-fd .perf-fill{ position:absolute; left:0; top:0; bottom:0; width:0; border-radius:0.25rem; }
#page-relatorios .relatorios-fd .perf-fill.ok{
  background:linear-gradient(180deg, #3da0ff 0%, var(--blue,#007bff) 45%, var(--rel-accent-strong) 100%);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .perf-fill.ok{ background:linear-gradient(180deg, var(--rel-accent-ink) 0%, var(--blue,#007bff) 45%, var(--rel-accent-strong) 100%); }
#page-relatorios .relatorios-fd .perf-fill.warn{ background:linear-gradient(180deg,#ffc24d,var(--rel-warn)); }
#page-relatorios .relatorios-fd .perf-fill.bad{ background:linear-gradient(180deg,#f06a6e,var(--rel-danger-bright)); }
#page-relatorios .relatorios-fd .perf-fill.muted{ background:#c5cdd8; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .perf-fill.muted{ background:rgba(var(--rel-accent-rgb),0.16); }
#page-relatorios .relatorios-fd .perf-muted .perf-v.na{ color:#8a96a8; }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .perf-muted .perf-v.na{ color:var(--rel-ink-muted); }

/* badges SLA / status */
#page-relatorios .relatorios-fd .sla-b, #page-relatorios .relatorios-fd .st-b{ display:inline-flex; align-items:center; gap:0.375rem; font-size:0.6875rem; font-weight:700; padding:0.1875rem 0.5625rem; border-radius:62.4375rem; white-space:nowrap; }
#page-relatorios .relatorios-fd .sla-b .d, #page-relatorios .relatorios-fd .st-b .d{ width:0.375rem; height:0.375rem; border-radius:50%; }
#page-relatorios .relatorios-fd .sla-b.ok{ background:rgba(var(--rel-accent-rgb),.10); color:var(--rel-accent-strong); } #page-relatorios .relatorios-fd .sla-b.ok .d{ background:var(--blue); }
#page-relatorios .relatorios-fd .sla-b.warn{ background:rgba(var(--rel-warn-rgb),.16); color:var(--rel-warn-ink); } #page-relatorios .relatorios-fd .sla-b.warn .d{ background:var(--rel-warn); }
#page-relatorios .relatorios-fd .sla-b.bad{ background:rgba(var(--rel-danger-bright-rgb),.12); color:var(--rel-danger-ink); } #page-relatorios .relatorios-fd .sla-b.bad .d{ background:var(--rel-danger-bright); }
#page-relatorios .relatorios-fd .sla-b.na{ background:rgba(var(--rel-neutral-rgb),.18); color:#6b778c; } #page-relatorios .relatorios-fd .sla-b.na .d{ background:var(--rel-ink-muted); }
#page-relatorios .relatorios-fd .st-b.fi{ background:rgba(var(--rel-accent-rgb),.12); color:var(--rel-accent-strong); } #page-relatorios .relatorios-fd .st-b.fi .d{ background:var(--blue,#0a78f0); }
#page-relatorios .relatorios-fd .st-b.at{ background:rgba(var(--rel-ok-rgb),.14); color:#15803d; } #page-relatorios .relatorios-fd .st-b.at .d{ background:#1f9d57; }
#page-relatorios .relatorios-fd .st-b.ag{ background:rgba(224,69,69,.12); color:#c62828; } #page-relatorios .relatorios-fd .st-b.ag .d{ background:#e04545; }
#page-relatorios .relatorios-fd .st-b.pa{ background:rgba(var(--rel-warn-rgb),.16); color:var(--rel-warn-ink); } #page-relatorios .relatorios-fd .st-b.pa .d{ background:#e8b90a; }

#page-relatorios .relatorios-fd .tk-foot{
  display:flex;
  align-items:center;
  gap:0.875rem;
  flex-wrap:wrap;
  padding:0.75rem 0.25rem 0.25rem;
  border-top:0;
  background:transparent;
}
#page-relatorios .relatorios-fd .tk-foot .pp{
  font-size:0.8125rem;
  color:var(--muted);
}
#page-relatorios .relatorios-fd .tk-foot .pp b{
  color:var(--ink);
  font-weight:700;
}
#page-relatorios .relatorios-fd .tk-foot .sp{ flex:1; min-width:0.5rem; }
#page-relatorios .relatorios-fd .tk-foot .per{
  display:none;
}
#page-relatorios .relatorios-fd .tk-foot .per select{
  height:2.125rem;
  border:0.0625rem solid var(--line);
  border-radius:0.5625rem;
  background:var(--surface, #fff);
  padding:0 1.75rem 0 0.625rem;
  font-size:0.8125rem;
  color:var(--ink);
}
#page-relatorios .relatorios-fd .tk-foot .list-pagination-bar{
  width:100%;
  border:0;
  padding:0;
  margin:0;
  background:transparent;
}
#page-relatorios .relatorios-fd .tk-foot .list-pagination-bar:not(.hidden){
  display:flex;
}
#page-relatorios .relatorios-fd .tk-foot .upd{ font-size:0.75rem; color:var(--muted); display:inline-flex; align-items:center; gap:0.4375rem; }
#page-relatorios .relatorios-fd .tk-foot .upd .live{ width:0.4375rem; height:0.4375rem; border-radius:50%; background:var(--blue); box-shadow:0 0 0 0.1875rem rgba(var(--rel-accent-rgb),.22); }
#page-relatorios .relatorios-fd .tk-foot .hint-click{ font-size:0.75rem; color:var(--rel-ink-muted); display:inline-flex; align-items:center; gap:0.375rem; }
#page-relatorios .relatorios-fd .tk-foot .hint-click svg{ width:0.875rem; height:0.875rem; }

/* ---------- MOVIMENTO (Sprint 3) ---------- */
/* cross-fade ao trocar de indicador — sem fill: estado de repouso é sempre visível */
@keyframes viewEnter{ from{ opacity:0; transform:translateY(0.625rem) scale(.994); } to{ opacity:1; transform:none; } }
#page-relatorios .relatorios-fd .view-enter{ animation:viewEnter .42s cubic-bezier(.22,1,.36,1); }

@media (prefers-reduced-motion: reduce){
  #page-relatorios .relatorios-fd .view-enter{ animation:none; }
  #page-relatorios .relatorios-fd .col .stack,
  #page-relatorios .relatorios-fd .col .cap,
  #page-relatorios .relatorios-fd #tkBody tr{ transition:none !important; }
}

/* Abas solicitadas: o inativo mantém o mesmo azul do ativo, clareado apenas com branco; título em branco. */
#page-relatorios .relatorios-fd #depSubnav .subtab:not(.on),
#page-relatorios .relatorios-fd #finSubnav .subtab:not(.on),
#page-relatorios .relatorios-fd #depSubnav .subtab:not(.on):hover,
#page-relatorios .relatorios-fd #finSubnav .subtab:not(.on):hover{
  background:color-mix(in srgb, var(--blue,#007bff) 40%, white 60%);
  color:#fff;
  border-color:color-mix(in srgb, var(--blue,#007bff) 40%, white 60%);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd #depSubnav .subtab:not(.on),html[data-theme="cinza"] #page-relatorios .relatorios-fd #finSubnav .subtab:not(.on),html[data-theme="cinza"] #page-relatorios .relatorios-fd #depSubnav .subtab:not(.on):hover,html[data-theme="cinza"] #page-relatorios .relatorios-fd #finSubnav .subtab:not(.on):hover{ border-color:var(--rel-ink-3); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd #depSubnav .subtab:not(.on),html[data-theme="cinza"] #page-relatorios .relatorios-fd #finSubnav .subtab:not(.on),html[data-theme="cinza"] #page-relatorios .relatorios-fd #depSubnav .subtab:not(.on):hover,html[data-theme="cinza"] #page-relatorios .relatorios-fd #finSubnav .subtab:not(.on):hover{ background:color-mix(in srgb, var(--blue,#007bff) 40%, var(--surface) 60%); }
#page-relatorios .relatorios-fd #depSubnav .subtab:not(.on) .ti,
#page-relatorios .relatorios-fd #finSubnav .subtab:not(.on) .ti,
#page-relatorios .relatorios-fd #depSubnav .subtab:not(.on) .tw,
#page-relatorios .relatorios-fd #finSubnav .subtab:not(.on) .tw{
  color:#fff;
}

@media (max-width: 0px) /* ui-scale-freeze: was 1180px */{
  #page-relatorios .relatorios-fd .chart-body{ grid-template-columns:1fr; }
  #page-relatorios .relatorios-fd .legend{ order:2; }
}
@media (max-width:760px){
  #page-relatorios .relatorios-fd .plot .gridbars{ height:23.75rem; }
}

/* Sprint 1 — breathing room: sobrescreve margin-bottom inline da section de configuração */
#page-relatorios .relatorios-fd section.section{
  margin-top:0 !important;
  margin-bottom:1.625rem !important;
}
/* Sprint 1 — subsector: respiro antes do conteúdo da aba ativa */
#page-relatorios .relatorios-fd .subsector.on{ padding-top:0.25rem; }

/* ============================================================
   BOTÃO "LIMPAR" — card de filtros
   ============================================================ */
/* «Limpar»: mesma geometria do Pesquisar (altura + retângulo), cor de etiqueta suave.
   Tokens: texto #a3262b · fundo #fdecec · ícone #e5484d */
#page-relatorios .relatorios-fd .rel-clear-filters{
  display:inline-flex; align-items:center; justify-content:center; gap:0.4375rem;
  flex:none; white-space:nowrap;
  box-sizing:border-box;
  height:var(--fd-filterbar-control-h, 2.25rem);
  min-height:var(--fd-filterbar-control-h, 2.25rem);
  max-height:var(--fd-filterbar-control-h, 2.25rem);
  padding:0 0.875rem; margin-right:0.5rem;
  border:0.0625rem solid var(--rel-danger-bright) !important; border-radius:var(--radius-card, 0.25rem);
  background:#fdecec;
  color:#a3262b;
  font-family:inherit; font-size:0.8125rem; font-weight:700; line-height:1;
  letter-spacing:.01em; cursor:pointer;
  box-shadow:none !important;
  transition:background .14s ease, color .14s ease, filter .14s ease;
}
#page-relatorios .relatorios-fd .rel-clear-filters svg{
  flex:none;
  color:var(--rel-danger-bright);
  stroke:currentColor;
}
#page-relatorios .relatorios-fd .rel-clear-filters:hover,
#page-relatorios .relatorios-fd .rel-clear-filters:focus-visible{
  background:#fbdede;
  color:#a3262b;
  filter:brightness(0.97);
  outline:none;
}
#page-relatorios .relatorios-fd .rel-clear-filters:active{
  background:#f6c9c9;
  filter:none;
}

/* ============================================================
   BOTÃO "PESQUISAR" — card de filtros
   ============================================================ */
/* Pesquisar — canto direito do card de filtros (flat: sem sombra inferior) */
#page-relatorios .relatorios-fd .rel-search-apply{
  display:inline-flex; align-items:center; justify-content:center; gap:0.4375rem;
  flex:none; white-space:nowrap;
  box-sizing:border-box;
  height:var(--fd-filterbar-control-h, 2.25rem);
  min-height:var(--fd-filterbar-control-h, 2.25rem);
  max-height:var(--fd-filterbar-control-h, 2.25rem);
  padding:0 1rem;
  border:0; border-radius:var(--radius-card, 0.25rem);
  background:var(--rel-surface);
  color:var(--rel-thead-2); font-family:inherit; font-size:0.8125rem; font-weight:700; line-height:1;
  letter-spacing:.01em; cursor:pointer;
  box-shadow:none !important;
  filter:none !important;
  transition:background .14s ease, color .14s ease;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-search-apply{ background:var(--surface); }
#page-relatorios .relatorios-fd .rel-search-apply:hover,
#page-relatorios .relatorios-fd .rel-search-apply:focus,
#page-relatorios .relatorios-fd .rel-search-apply:focus-visible,
#page-relatorios .relatorios-fd .rel-search-apply:active{
  background:#e8f1ff;
  color:var(--rel-thead-1);
  transform:none;
  box-shadow:none !important;
  filter:none !important;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-search-apply:hover,html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-search-apply:focus,html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-search-apply:focus-visible,html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-search-apply:active{ background:rgba(var(--rel-accent-rgb),0.16); }

/* legado: botão largo (não usar na tk-filterbar) */
#page-relatorios .relatorios-fd .filterbar.fb-line .rp-search-btn,
#page-relatorios .relatorios-fd .rel-filter-card > .rp-search-btn{
  display:none !important;
}
#page-relatorios .relatorios-fd .rp-search-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:0.5rem; flex:1 1 0; min-width:8.125rem;
  height:2.875rem; padding:0 1.125rem; border:0; border-radius:var(--radius-card, 0.25rem); background:var(--blue);
  color:#fff; font-family:inherit; font-size:0.84375rem; font-weight:800; letter-spacing:.01em; cursor:pointer;
  transition:background .15s ease; box-shadow:none !important; filter:none !important;
}
#page-relatorios .relatorios-fd .rp-search-btn svg{ width:1rem; height:1rem; flex:none; }
#page-relatorios .relatorios-fd .rp-search-btn:hover,
#page-relatorios .relatorios-fd .rp-search-btn:active{
  background:var(--blue-600, #0058c4); transform:none; box-shadow:none !important; filter:none !important;
}

/* ============================================================
   MODAL DE GRAFICO EXPANDIDO
   ============================================================ */
body.relatorios-print-focus-open{
  overflow:hidden;
}

#page-relatorios.relatorios-print-focus{
  position:fixed; inset:0; z-index:2500; width:100vw; height:100vh;
  background:var(--field); overflow-y:auto; padding:0; max-width:none; box-sizing:border-box;
}
#page-relatorios.relatorios-print-focus .relatorios-fd.content{
  width:100%; max-width:none; margin:0; padding:1.5rem 1.75rem 3.75rem; box-sizing:border-box;
}

/* ============================================================
   VISÃO EXECUTIVA — tokens + layout
   ============================================================ */
#page-relatorios .relatorios-fd .visao{
  --s-blue:#007BFF; --s-blue-bg:rgba(0,123,255,.10);
  --s-ok:#15875b; --s-ok-dot:#1f9d57; --s-ok-bg:#e8f7ef; --s-ok-soft:#d6f0e0;
  --s-warn:#b4790a; --s-warn-dot:#e0a106; --s-warn-bg:#fff3df; --s-warn-soft:#fbe9c8;
  --s-bad:#cf3b40; --s-bad-dot:#e5484d; --s-bad-bg:#fdecec; --s-bad-soft:#f8dcdd;
  --s-cost:#5b6a86;
  --s-elev-1:0 0.0625rem 0.125rem rgba(13,27,52,.06);
  --s-elev-2:0 0.625rem 1.625rem -0.875rem rgba(13,27,52,.20);
}
html[data-theme="dark"] #page-relatorios .relatorios-fd .visao{
  --s-blue:#7fb6ff; --s-blue-bg:rgba(59,155,255,.14);
  --s-ok:#3fc285; --s-ok-dot:#34d399; --s-ok-bg:rgba(31,157,87,.16);
  --s-warn:#f1b53d; --s-warn-dot:#e0a106; --s-warn-bg:rgba(224,161,6,.14);
  --s-bad:#f1797d; --s-bad-dot:#e5484d; --s-bad-bg:rgba(207,59,64,.16);
  --s-elev-2:0 0.75rem 1.875rem -1rem rgba(0,0,0,.6);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .visao{
  /* Info e a severidade NEUTRA no Nublado — warn, bad e ok e que
     carregam matiz. Azul aqui competia com o acento. */
  --s-blue:#1f262e; --s-blue-bg:rgba(20,24,29,.08);
  --s-ok:#0e4a2c; --s-ok-dot:#0e4a2c; --s-ok-bg:rgba(31,157,87,.16);
  --s-warn:#6b3b08; --s-warn-dot:#e0a106; --s-warn-bg:rgba(224,161,6,.14);
  --s-bad:#6e1614; --s-bad-dot:#e5484d; --s-bad-bg:rgba(151,35,31,.16);
  --s-elev-2:0 0.75rem 1.875rem -1rem rgba(0,0,0,.6);
}

/* Header right: total de chamados — legado; Visão usa .ch-tot (paridade Incidentes). */
#page-relatorios .relatorios-fd .visao .visao-head-kicker{ display:none; }

/* KPI groups — 8 cards com mesma largura (2+3+3 colunas proporcionais) */
#page-relatorios .relatorios-fd .visao .visao-kpi-row{
  display:flex; align-items:stretch; margin-bottom:1.125rem;
  --visao-kpi-card-h:8.25rem;
}
#page-relatorios .relatorios-fd .visao .visao-kpi-group{
  flex:1 1 0; min-width:0; display:flex; flex-direction:column; gap:0.4375rem; padding:0 0.875rem;
}
#page-relatorios .relatorios-fd .visao .visao-kpi-row > .visao-kpi-group:nth-child(1){ flex:2 1 0; }
#page-relatorios .relatorios-fd .visao .visao-kpi-row > .visao-kpi-group:nth-child(3){ flex:3 1 0; }
#page-relatorios .relatorios-fd .visao .visao-kpi-row > .visao-kpi-group:nth-child(5){ flex:3 1 0; }
#page-relatorios .relatorios-fd .visao .visao-kpi-group:first-child{ padding-left:0; }
#page-relatorios .relatorios-fd .visao .visao-kpi-group:last-child{ padding-right:0; }
#page-relatorios .relatorios-fd .visao .visao-kpi-sep{ width:0.0625rem; background:var(--line); margin:1.25rem 0 0; flex:none; align-self:stretch; }
#page-relatorios .relatorios-fd .visao .vkg-lbl{ font-size:0.625rem; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color:var(--muted); padding:0 0.0625rem; flex:none; }
#page-relatorios .relatorios-fd .visao .vkg-grid{ display:grid; gap:0.625rem; flex:1; align-items:stretch; align-content:stretch; grid-auto-rows:1fr; min-height:var(--visao-kpi-card-h); }
#page-relatorios .relatorios-fd .visao .vkg-grid.g2{ grid-template-columns:repeat(2,minmax(0,1fr)); }
#page-relatorios .relatorios-fd .visao .vkg-grid.g3{ grid-template-columns:repeat(3,minmax(0,1fr)); }
#page-relatorios .relatorios-fd .visao .vkg-grid > .sk{ height:100%; min-height:var(--visao-kpi-card-h); box-sizing:border-box; }
/* Valor centralizado entre margens laterais e entre o título e a linha do rodapé */
#page-relatorios .relatorios-fd .visao .vkg-grid > .sk .sk-top{
  margin-bottom:0;
}
#page-relatorios .relatorios-fd .visao .vkg-grid > .sk .sk-v{
  flex:1 1 auto;
  min-height:1.75rem;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
}
#page-relatorios .relatorios-fd .visao .vkg-grid > .sk .sk-foot{
  margin-top:0;
  padding-top:0.625rem;
  min-height:2.75em;
  align-items:flex-start;
  flex:none;
  flex-wrap:wrap;
  line-height:1.35;
}

/* Chart rows */
#page-relatorios .relatorios-fd .visao .visao-body{ padding:0 1.625rem 1.375rem; }
#page-relatorios .relatorios-fd .visao{
  --visao-roster-row-h:2.125rem;
  --visao-roster-gap:1rem;
  --visao-roster-visible:5;
  /* Mesma altura útil dos cards Carga/Clientes (5 linhas) */
  --visao-pair-body-h:calc(
    (var(--visao-roster-visible) * var(--visao-roster-row-h))
    + ((var(--visao-roster-visible) - 1) * var(--visao-roster-gap))
  );
}
#page-relatorios .relatorios-fd .visao .visao-row-2{
  display:grid;
  grid-template-columns:1fr;
  gap:1rem;
  margin-bottom:0.875rem;
}
#page-relatorios .relatorios-fd .visao .visao-row-3{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:1rem;
  margin-bottom:0.875rem;
}
#page-relatorios .relatorios-fd .visao #visaoStatusPanel .sp-body,
#page-relatorios .relatorios-fd .visao #visaoCatPanel .sp-body{
  display:flex;
  flex-direction:column;
  min-width:0;
}
#page-relatorios .relatorios-fd .visao #visaoStatusChart,
#page-relatorios .relatorios-fd .visao #visaoCatChart{
  flex:none;
  box-sizing:border-box;
  width:100%;
  height:var(--visao-pair-body-h);
  min-height:var(--visao-pair-body-h);
  max-height:var(--visao-pair-body-h);
  display:flex;
  align-items:stretch;
  justify-content:center;
  color:var(--ink);
}
#page-relatorios .relatorios-fd .visao #visaoStatusChart > div{
  width:100%;
  height:100%;
  min-height:100%;
}
#page-relatorios .relatorios-fd .visao #visaoCatPanel .sp-body{ overflow-x:auto; overflow-y:hidden; scrollbar-width:thin; }
#page-relatorios .relatorios-fd .visao #visaoCatChart .visao-cat-chart{
  width:100%;
  max-width:100%;
  height:100%;
  min-height:0;
  display:flex;
  flex-direction:column;
  box-sizing:border-box;
  overflow-x:auto;
  overflow-y:hidden;
  -webkit-overflow-scrolling:touch;
  padding:0.25rem 0 0;
}
#page-relatorios .relatorios-fd .visao .visao-cat-cols{
  display:grid;
  grid-template-columns:repeat(var(--visao-cat-n, 1), minmax(0, 1fr));
  column-gap:var(--visao-cat-gap, 2.25rem);
  width:100%;
  height:100%;
  min-height:0;
  align-items:stretch;
  flex:1 1 auto;
  box-sizing:border-box;
  padding:0 0.75rem;
}
#page-relatorios .relatorios-fd .visao .visao-cat-col{
  min-width:0;
  max-width:none;
  height:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
}
#page-relatorios .relatorios-fd .visao .visao-cat-col > .cap{
  margin-top:auto;
  font-size:0.65625rem;
  font-weight:700;
  margin-bottom:0.625rem;
  gap:0.35em;
}
#page-relatorios .relatorios-fd .visao .visao-cat-bar{
  width:4.5rem;
  max-width:100%;
  border-radius:0.375rem 0.375rem 0 0;
  min-height:0.1875rem;
  flex:none;
}
#page-relatorios .relatorios-fd .visao .visao-cat-xlab{
  position:relative;
  flex:none;
  box-sizing:border-box;
  width:100%;
  min-height:calc(0.75rem * 1.25 * 2 + 0.625rem);
  margin:0;
  padding:0.625rem 0.25rem 0;
  text-align:center;
  font-size:0.75rem;
  font-weight:600;
  color:var(--ink,#1a2b4a);
  line-height:1.25;
  overflow-wrap:break-word;
  text-wrap:balance;
}
#page-relatorios .relatorios-fd .visao .visao-cat-xlab::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:calc(-1 * var(--visao-cat-gap, 2.25rem));
  height:0.0625rem;
  background:var(--line,#e8eaed);
  pointer-events:none;
}
#page-relatorios .relatorios-fd .visao .visao-cat-col:last-child .visao-cat-xlab::before{
  right:0;
}
#page-relatorios .relatorios-fd .visao #visaoEvolPanel .sp-body{
  display:flex;
  flex-direction:column;
  min-width:0;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:thin;
}
#page-relatorios .relatorios-fd .visao #visaoEvolChart{
  flex:none;
  box-sizing:border-box;
  min-width:0;
  width:100%;
  height:var(--visao-pair-body-h);
  min-height:var(--visao-pair-body-h);
  max-height:var(--visao-pair-body-h);
  display:flex;
  align-items:stretch;
  justify-content:center;
  color:var(--ink);
}
#page-relatorios .relatorios-fd .visao #visaoEvolChart > .visao-evol-chart-wrap,
#page-relatorios .relatorios-fd .visao #visaoEvolChart > .visao-evol-1d{
  width:100%;
  height:100%;
  min-height:100%;
}
#page-relatorios .relatorios-fd .visao .visao-evol-chart-wrap{ width:100%; max-width:100%; overflow:visible; height:100%; display:flex; align-items:stretch; }
#page-relatorios .relatorios-fd .visao .visao-evol-svg{
  vertical-align:top;
  width:100% !important;
  height:100% !important;
  max-height:100%;
}
#page-relatorios .relatorios-fd .visao .visao-evol-1d{
  display:flex; align-items:stretch; width:100%; height:100%; min-height:100%; gap:clamp(0.625rem,2.5vw,1.25rem);
}
#page-relatorios .relatorios-fd .visao .visao-evol-1d-chart{
  flex:1 1 55%; min-width:0; display:flex; gap:0.5rem; align-items:stretch;
}
#page-relatorios .relatorios-fd .visao .visao-evol-1d-y{
  flex:none; width:1.625rem; display:flex; flex-direction:column; justify-content:space-between;
  padding:1.125rem 0 1.75rem; font-size:0.59375rem; font-weight:600; color:var(--muted); font-variant-numeric:tabular-nums;
}
#page-relatorios .relatorios-fd .visao .visao-evol-1d-plot{
  position:relative; flex:1; min-width:0; min-height:8.25rem;
}
#page-relatorios .relatorios-fd .visao .visao-evol-1d-hline{
  position:absolute; left:0; right:0; height:0.0625rem; background:rgba(var(--rel-shadow-2-rgb),.06); pointer-events:none;
  top:calc(1.125rem + (100% - 2.875rem) * (1 - var(--y-frac, 0)));
}
#page-relatorios .relatorios-fd .visao .visao-evol-1d-bar{
  position:absolute; left:0; bottom:1.75rem; height:calc(100% - 2.875rem); max-height:4.5rem; min-height:2.25rem;
  border-radius:0 0.75rem 0.75rem 0;
  background:linear-gradient(90deg, rgba(var(--rel-accent-chart-rgb),.22) 0%, rgba(var(--rel-accent-chart-rgb),.08) 100%);
  border:0.0625rem solid rgba(var(--rel-accent-chart-rgb),.28); border-left:0.1875rem solid var(--blue,#0a78f0);
  box-shadow:inset 0 -0.5rem 1.5rem rgba(var(--rel-accent-chart-rgb),.06);
  transition:width .35s cubic-bezier(.22,1,.36,1);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .visao .visao-evol-1d-bar{ border-left:0.1875rem solid var(--rel-line); }
#page-relatorios .relatorios-fd .visao .visao-evol-1d-mean{
  position:absolute; top:1.125rem; bottom:1.75rem; width:0; border-left:0.0625rem dashed var(--muted,#bbb); pointer-events:none;
}
#page-relatorios .relatorios-fd .visao .visao-evol-1d-mean span{
  position:absolute; top:50%; left:0.375rem; transform:translateY(-50%);
  font-size:0.625rem; font-weight:700; color:var(--muted); letter-spacing:.02em;
}
#page-relatorios .relatorios-fd .visao .visao-evol-1d-meta{
  flex:0 1 45%; min-width:0; display:flex; align-items:center; justify-content:flex-end;
  gap:clamp(0.875rem,3.5vw,2rem); padding:0.75rem 0.125rem 1.75rem 0.5rem;
}
#page-relatorios .relatorios-fd .visao .visao-evol-1d-med-lbl{
  font-size:0.8125rem; font-weight:700; color:var(--muted); letter-spacing:.02em;
}
#page-relatorios .relatorios-fd .visao .visao-evol-1d-val{
  font-size:clamp(2.5rem,6vw,3.5rem); font-weight:800; line-height:1; letter-spacing:-0.125rem;
  color:var(--blue,#0a78f0); font-variant-numeric:tabular-nums;
}
#page-relatorios .relatorios-fd .visao .visao-evol-1d-date{
  font-size:clamp(0.9375rem,2.2vw,1.125rem); font-weight:700; color:var(--muted); font-variant-numeric:tabular-nums;
}
@media (max-width:640px){
  #page-relatorios .relatorios-fd .visao .visao-evol-1d{ flex-direction:column; }
  #page-relatorios .relatorios-fd .visao .visao-evol-1d-meta{ justify-content:center; padding-bottom:0.5rem; }
}
#page-relatorios .relatorios-fd .visao .visao-row-4{ display:grid; grid-template-columns:1fr 1fr; gap:1rem; align-items:start; }

/* Carga por analista / Clientes — altura acompanha as linhas; inset superior = inferior */
#page-relatorios .relatorios-fd .visao #visaoAnlPanel .sp-body,
#page-relatorios .relatorios-fd .visao #visaoCltPanel .sp-body{
  padding:0 1.125rem 1rem;
}
#page-relatorios .relatorios-fd .visao #visaoAnlList,
#page-relatorios .relatorios-fd .visao #visaoCltList{
  min-width:0;
}
#page-relatorios .relatorios-fd .visao .visao-roster-scroll{
  --visao-roster-h:var(--visao-pair-body-h);
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:var(--visao-roster-gap);
  height:auto;
  min-height:0;
  max-height:var(--visao-roster-h);
  overflow-x:hidden;
  overflow-y:auto;
  padding-right:0.125rem;
  scrollbar-width:thin;
  scrollbar-color:var(--rel-scroll-thumb) transparent;
  -webkit-overflow-scrolling:touch;
}
#page-relatorios .relatorios-fd .visao .visao-roster-scroll::-webkit-scrollbar{ width:0.25rem; }
#page-relatorios .relatorios-fd .visao .visao-roster-scroll::-webkit-scrollbar-track{ background:transparent; }
#page-relatorios .relatorios-fd .visao .visao-roster-scroll::-webkit-scrollbar-thumb{
  background:var(--rel-scroll-thumb);
  border-radius:62.4375rem;
}
#page-relatorios .relatorios-fd .visao .visao-roster-scroll::-webkit-scrollbar-thumb:hover{
  background:var(--rel-scroll-thumb-hover);
}
#page-relatorios .relatorios-fd .visao .visao-roster-scroll.is-empty{
  min-height:var(--visao-roster-h);
  justify-content:center;
  align-items:center;
  gap:0;
}
#page-relatorios .relatorios-fd .visao .visao-roster-empty{
  color:var(--muted);
  font-size:0.8125rem;
  font-weight:600;
}
#page-relatorios .relatorios-fd .visao .visao-roster-row{
  display:flex;
  align-items:center;
  gap:0.625rem;
  height:var(--visao-roster-row-h);
  min-height:var(--visao-roster-row-h);
  max-height:var(--visao-roster-row-h);
  flex:none;
  box-sizing:border-box;
  overflow:hidden;
}
#page-relatorios .relatorios-fd .visao .visao-roster-av{
  width:2.125rem;
  height:2.125rem;
  border-radius:50%;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:0.75rem;
  font-weight:700;
  flex:none;
  letter-spacing:-0.0125rem;
}
#page-relatorios .relatorios-fd .visao .visao-roster-av--muted{
  background:var(--field,#f2f4f7);
  border:0.09375rem solid var(--line,#e5e7eb);
  color:var(--ink,#33425f);
}
#page-relatorios .relatorios-fd .visao .visao-roster-main{
  flex:1;
  min-width:0;
}
#page-relatorios .relatorios-fd .visao .visao-roster-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:0.25rem;
  gap:0.5rem;
}
#page-relatorios .relatorios-fd .visao .visao-roster-name{
  font-size:0.8125rem;
  font-weight:700;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--ink);
}
#page-relatorios .relatorios-fd .visao .visao-roster-count{
  font-size:0.8125rem;
  font-weight:800;
  font-variant-numeric:tabular-nums;
  flex:none;
  color:var(--ink);
}
#page-relatorios .relatorios-fd .visao .visao-roster-track{
  background:var(--line,#eaecef);
  border-radius:6.1875rem;
  height:0.3125rem;
  overflow:hidden;
}
#page-relatorios .relatorios-fd .visao .visao-roster-fill{
  height:100%;
  border-radius:6.1875rem;
  background:var(--accent,#0a78f0);
  transition:width .6s;
}
#page-relatorios .relatorios-fd .visao .visao-roster-share{ flex:none; }
#page-relatorios .relatorios-fd .visao .visao-clt-pulver{
  margin-top:0.875rem;
  padding-top:0.75rem;
  border-top:0.0625rem solid var(--line,#eaecef);
  text-align:left;
}
#page-relatorios .relatorios-fd .visao .visao-clt-pulver-n{
  font-size:1.375rem;
  font-weight:800;
  color:var(--ink);
  letter-spacing:-0.0625rem;
  font-variant-numeric:tabular-nums;
  line-height:1.1;
}
#page-relatorios .relatorios-fd .visao .visao-clt-pulver-t{
  font-size:0.78125rem;
  font-weight:700;
  margin-top:0.25rem;
}
#page-relatorios .relatorios-fd .visao .visao-clt-pulver-s{
  font-size:0.71875rem;
  color:var(--muted);
  margin-top:0.125rem;
}

/* Alerts */
#page-relatorios .relatorios-fd .visao .visao-alerts{ display:flex; flex-direction:column; gap:0.5rem; margin-bottom:1.125rem; }
#page-relatorios .relatorios-fd .visao .visao-alerts[hidden]{ display:none; }
#page-relatorios .relatorios-fd .visao .visao-alert{
  display:flex; gap:0.75rem; padding:0.8125rem 1rem; align-items:flex-start;
  border:0.0625rem solid var(--line,#d5d9e0); border-left-width:0.25rem;
  border-radius:var(--radius-card,var(--fd-radius-card,0.25rem));
  background:var(--field,#f2f4f7); color:var(--muted,#6b7280);
}
#page-relatorios .relatorios-fd .visao .visao-alert-body{ flex:1; min-width:0; }
#page-relatorios .relatorios-fd .visao .visao-alert-title{
  font-size:0.8125rem; font-weight:800; margin-bottom:0.1875rem; color:inherit;
}
#page-relatorios .relatorios-fd .visao .visao-alert-desc{
  font-size:0.78125rem; line-height:1.45; color:var(--rel-ink-faint,#5b6a86);
}
#page-relatorios .relatorios-fd .visao .visao-alert--neutral{
  background:var(--field,#f2f4f7); border-color:var(--line,#d5d9e0);
  border-left-color:var(--rel-ink-muted,#9aa7bd); color:var(--muted,#6b7280);
}
#page-relatorios .relatorios-fd .visao .visao-alert--neutral .visao-alert-title{ color:var(--rel-ink-2,#33425f); }
#page-relatorios .relatorios-fd .visao .visao-alert--info{
  background:var(--s-blue-bg,rgba(0,123,255,.09)); border-color:var(--s-blue,#0a78f0);
  border-left-color:var(--s-blue,#0a78f0); color:var(--s-blue,#0a78f0);
}
#page-relatorios .relatorios-fd .visao .visao-alert--info .visao-alert-title{ color:var(--s-blue,#0a78f0); }
#page-relatorios .relatorios-fd .visao .visao-alert--warn{
  background:var(--s-warn-bg,#fff9e6); border-color:var(--s-warn-dot,#e0a106);
  border-left-color:var(--s-warn-dot,#e0a106); color:var(--s-warn,#b4790a);
}
#page-relatorios .relatorios-fd .visao .visao-alert--warn .visao-alert-title{ color:var(--s-warn,#b4790a); }
#page-relatorios .relatorios-fd .visao .visao-alert--crit{
  background:var(--s-bad-bg,#fdecec); border-color:var(--s-bad-dot,#e5484d);
  border-left-color:var(--s-bad-dot,#e5484d); color:var(--s-bad,#cf3b40);
}
#page-relatorios .relatorios-fd .visao .visao-alert--crit .visao-alert-title{ color:var(--s-bad,#cf3b40); }

/* Responsive */
@media (max-width: 0px) /* ui-scale-freeze: was 1180px */{
  #page-relatorios .relatorios-fd .visao .visao-kpi-sep{ display:none; }
  #page-relatorios .relatorios-fd .visao .visao-kpi-group{ padding:0 0 0.75rem; border-bottom:0.0625rem solid var(--line); }
  #page-relatorios .relatorios-fd .visao .visao-kpi-group:last-child{ border-bottom:0; padding-bottom:0; }
  #page-relatorios .relatorios-fd .visao .visao-kpi-row{ flex-direction:column; }
  #page-relatorios .relatorios-fd .visao .visao-row-2,
  #page-relatorios .relatorios-fd .visao .visao-row-3,
  #page-relatorios .relatorios-fd .visao .visao-row-4{ grid-template-columns:1fr; }
}

/* Painéis internos — mesma margem da Visão Executiva (0 1.625rem 1.375rem) */
#page-relatorios .relatorios-fd .rel-panel-body{ padding:0 1.625rem 1.375rem; }
#page-relatorios .relatorios-fd .chart-card.tickets-card{
  background:
    radial-gradient(40rem 23.75rem at 88% -8%, rgba(var(--rel-accent-rgb),.14), transparent 62%),
    radial-gradient(32.5rem 22.5rem at 4% 108%, rgba(var(--rel-accent-strong-rgb),.10), transparent 60%),
    linear-gradient(165deg,#fbfdff 0%,#f2f7fd 58%,#eaf1fb 100%);
  border:0.0625rem solid rgba(var(--rel-tint-rgb),.9);
  border-radius:var(--radius-card);
  box-shadow:var(--elev-3);
  overflow:hidden;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.tickets-card{ background:radial-gradient(40rem 23.75rem at 88% -8%, rgba(var(--rel-accent-rgb),.14), transparent 62%),
    radial-gradient(32.5rem 22.5rem at 4% 108%, rgba(var(--rel-accent-strong-rgb),.10), transparent 60%),
    linear-gradient(165deg,rgba(var(--rel-accent-rgb),0.16) 0%,rgba(var(--rel-accent-rgb),0.16) 58%,rgba(var(--rel-accent-rgb),0.16) 100%); }
#page-relatorios .relatorios-fd .chart-card.tickets-card .tk-head{
  border-bottom:none;
  padding:1.375rem 1.625rem 0.875rem;
  align-items:flex-start;
}
#page-relatorios .relatorios-fd .tickets-card .tk-tickets-split-panel{
  display:block;
  overflow:visible;
  background:transparent;
  border:0;
  box-shadow:none;
}
#page-relatorios .relatorios-fd .tickets-card .tk-tickets-split-panel > .tk-stats{
  margin:0 0 0.875rem;
  border:0.0625rem solid color-mix(in srgb, var(--blue,#007bff) 16%, var(--line));
  border-radius:var(--radius-card);
  overflow:hidden;
  background:linear-gradient(
    148deg,
    color-mix(in srgb, #f4f9ff 90%, var(--rel-surface)) 0%,
    color-mix(in srgb, #c9ddf2 48%, #e6f0fa) 42%,
    color-mix(in srgb, #dce9f7 72%, var(--rel-surface)) 68%,
    color-mix(in srgb, #b8d0eb 38%, #edf4fc) 100%
  );
  box-shadow:
    0 0.0625rem 0.125rem rgba(var(--rel-shadow-rgb),.07),
    inset 0 0.0625rem 0 rgba(255,255,255,.78),
    inset 0 -0.0625rem 0 rgba(var(--rel-shadow-rgb),.05);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card .tk-tickets-split-panel > .tk-stats{ border:0.0625rem solid var(--rel-line); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card .tk-tickets-split-panel > .tk-stats{ background:linear-gradient(
    148deg,color-mix(in srgb,var(--surface-2) 90%,var(--surface)) 0%,color-mix(in srgb,#a8b7c8 48%,#c0c7ce) 42%,color-mix(in srgb,#b0bcca 72%,var(--surface)) 68%,color-mix(in srgb,#9fb0c4 38%,#c0c7ce) 100%
  ); }
#page-relatorios .relatorios-fd .tickets-card .tk-tickets-split-panel > .tk-tablewrap{
  border:0.0625rem solid var(--line);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-1);
  background:var(--surface);
  overflow:hidden;
  max-height:var(--tk-list-visible-h);
  scrollbar-gutter:auto;
  position:relative;
  isolation:isolate;
  --tk-thead-band-h:3.125rem;
  display:flex;
  flex-direction:column;
}
#page-relatorios .relatorios-fd .tickets-card .tk-tickets-split-panel > .tk-tablewrap::before{
  content:"";
  position:sticky;
  top:0;
  left:0;
  right:0;
  z-index:2;
  display:block;
  height:var(--tk-thead-band-h, 3.25rem);
  margin-bottom:calc(-1 * var(--tk-thead-band-h, 3.25rem));
  pointer-events:none;
  background:var(--tk-thead-grad, linear-gradient(145deg, #163f9a 0%, #1a4db8 30%, #2f6fe0 64%, #5aa0ff 100%));
  box-shadow:var(--tk-thead-edge, inset 0 0.0625rem 0 rgba(255,255,255,.34));
  border-radius:var(--radius-card) var(--radius-card) 0 0;
}
#page-relatorios .relatorios-fd .tickets-card .tk-tickets-split-panel .tk-table thead{
  position:relative;
  z-index:3;
}
#page-relatorios .relatorios-fd .tickets-card .tk-tickets-split-panel .tk-table thead tr.tk-colrow{
  background:transparent;
}
#page-relatorios .relatorios-fd .tickets-card .tk-tickets-split-panel .tk-table thead tr.tk-colrow th{
  border-bottom:0;
  background:transparent;
  position:sticky;
  top:0;
  z-index:3;
}
#page-relatorios .relatorios-fd .chart-card.tickets-card .tk-inner-panel{
  display:flex;
  flex-direction:column;
  gap:0.875rem;
  overflow:visible;
  background:transparent;
  border:0;
  box-shadow:none;
}
#page-relatorios .relatorios-fd .chart-card.tickets-card .tk-inner-panel .tk-stats{
  margin:0;
  border:0.0625rem solid color-mix(in srgb, var(--blue,#007bff) 16%, var(--line));
  border-bottom:0.0625rem solid color-mix(in srgb, var(--blue,#007bff) 12%, var(--line));
  border-radius:var(--radius-card);
  overflow:hidden;
  flex:none;
  background:linear-gradient(
    148deg,
    color-mix(in srgb, #f4f9ff 90%, var(--rel-surface)) 0%,
    color-mix(in srgb, #c9ddf2 48%, #e6f0fa) 42%,
    color-mix(in srgb, #dce9f7 72%, var(--rel-surface)) 68%,
    color-mix(in srgb, #b8d0eb 38%, #edf4fc) 100%
  );
  box-shadow:
    0 0.0625rem 0.125rem rgba(var(--rel-shadow-rgb),.07),
    inset 0 0.0625rem 0 rgba(255,255,255,.78),
    inset 0 -0.0625rem 0 rgba(var(--rel-shadow-rgb),.05);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.tickets-card .tk-inner-panel .tk-stats{ border:0.0625rem solid var(--rel-line); border-bottom:0.0625rem solid var(--rel-line); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.tickets-card .tk-inner-panel .tk-stats{ background:linear-gradient(
    148deg,color-mix(in srgb,var(--surface-2) 90%,var(--surface)) 0%,color-mix(in srgb,#a8b7c8 48%,#c0c7ce) 42%,color-mix(in srgb,#b0bcca 72%,var(--surface)) 68%,color-mix(in srgb,#9fb0c4 38%,#c0c7ce) 100%
  ); }
#page-relatorios .relatorios-fd .chart-card.tickets-card .tk-tablewrap{
  flex:none;
  min-height:var(--tk-list-visible-h);
  max-height:var(--tk-list-visible-h);
  height:var(--tk-list-visible-h);
  border:0.0625rem solid var(--line);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow-1);
  background:var(--surface);
  isolation:isolate;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
#page-relatorios .relatorios-fd .chart-card.tickets-card .tk-tablewrap::before{
  background:var(--tk-thead-grad, linear-gradient(145deg, #163f9a 0%, #1a4db8 30%, #2f6fe0 64%, #5aa0ff 100%));
  box-shadow:var(--tk-thead-edge, inset 0 0.0625rem 0 rgba(255,255,255,.34));
  border-radius:var(--radius-card) var(--radius-card) 0 0;
}
#page-relatorios .relatorios-fd .chart-card.tickets-card .tk-tablewrap::after{
  content:none !important;
  display:none !important;
}
#page-relatorios .relatorios-fd .chart-card.tickets-card .tk-colrow th{
  border-bottom:0;
}
#page-relatorios .relatorios-fd .chart-card.tickets-card .tk-foot.chart-foot,
#page-relatorios .relatorios-fd .tickets-card .tk-foot{
  display:none;
}
#page-relatorios .relatorios-fd .tickets-card{
  --tk-list-row-h:var(--fd-list-thead-h, 3.125rem);
  --tk-list-pager-h:var(--fd-list-pager-h, 3.125rem); /* mesma altura do cabeçalho de colunas */
  --tk-list-visible:14;
  --tk-list-scroll-h:calc(var(--tk-list-row-h) * (1 + var(--tk-list-visible)));
  /* Cabeçalho + 14 dados + linha de paginação */
  --tk-list-visible-h:calc(var(--tk-list-scroll-h) + var(--tk-list-pager-h));
  --tk-thead-grad:var(--fd-list-thead-grad, linear-gradient(145deg, #163f9a 0%, #1a4db8 30%, #2f6fe0 64%, #5aa0ff 100%));
  --tk-thead-edge:var(--fd-list-thead-edge, inset 0 0.0625rem 0 rgba(255,255,255,.34), inset 0 -0.0625rem 0 rgba(8,32,90,.16));
}
#page-relatorios .relatorios-fd .tickets-card .tk-tablewrap,
#page-relatorios .relatorios-fd #view-tickets.tickets-card:not(.chart-card) > .tk-tablewrap,
#page-relatorios .relatorios-fd .tickets-card .tk-tickets-split-panel > .tk-tablewrap{
  min-height:var(--tk-list-visible-h);
  max-height:var(--tk-list-visible-h);
  height:var(--tk-list-visible-h);
  overflow:hidden;
  position:relative;
  display:flex;
  flex-direction:column;
}
#page-relatorios .relatorios-fd .tickets-card .tk-table-scroll{
  flex:none;
  height:var(--tk-list-scroll-h);
  min-height:var(--tk-list-scroll-h);
  max-height:var(--tk-list-scroll-h);
  overflow:hidden;
  position:relative;
}
#page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table-scroll::after,
#page-relatorios .relatorios-fd .tickets-card .tk-table-scroll.is-empty::after{
  content:none;
}
#page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty::after{
  content:none;
}
#page-relatorios .relatorios-fd .tickets-card .tk-list-pager.list-pagination-bar,
#page-relatorios .relatorios-fd .tickets-card #tkListaPagination.list-pagination-bar{
  flex:none;
  display:flex;
  align-items:center;
  width:100%;
  height:var(--tk-list-pager-h, 3.125rem);
  min-height:var(--tk-list-pager-h, 3.125rem);
  max-height:var(--tk-list-pager-h, 3.125rem);
  margin:0;
  padding:0 0.75rem;
  box-sizing:border-box;
  border-top:0;
  border-radius:0 0 var(--radius-card, 0.25rem) var(--radius-card, 0.25rem);
  background:var(--tk-thead-grad);
  box-shadow:var(--tk-thead-edge);
}
#page-relatorios .relatorios-fd .tickets-card .tk-list-pager.list-pagination-bar.hidden,
#page-relatorios .relatorios-fd .tickets-card #tkListaPagination.list-pagination-bar.hidden{
  display:flex !important;
}
#page-relatorios .relatorios-fd .tickets-card .tk-list-pager .list-pagination-inner,
#page-relatorios .relatorios-fd .tickets-card #tkListaPagination .list-pagination-inner{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:0.5rem;
  width:100%;
  height:100%;
  flex-wrap:nowrap;
}
#page-relatorios .relatorios-fd .tickets-card .tk-list-pager .list-pagination-info,
#page-relatorios .relatorios-fd .tickets-card #tkListaPagination .list-pagination-info{
  flex:none;
  min-width:0;
  order:0;
  font-size:0.75rem;
  font-weight:800;
  letter-spacing:.02em;
  line-height:1.2;
  color:#fff;
  text-shadow:0 0.0625rem 0 rgba(var(--rel-shadow-deep-rgb),.18);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#page-relatorios .relatorios-fd .tickets-card .tk-list-pager .list-pagination-actions,
#page-relatorios .relatorios-fd .tickets-card #tkListaPagination .list-pagination-actions{
  flex:none;
  margin-left:0;
  order:1;
  display:inline-flex;
  align-items:center;
  gap:0.375rem;
}
#page-relatorios .relatorios-fd .tickets-card .tk-list-pager .list-pagination-btn,
#page-relatorios .relatorios-fd .tickets-card #tkListaPagination .list-pagination-btn{
  width:2rem;
  min-width:2rem;
  height:2rem;
  border-radius:var(--radius-card, 0.25rem);
  border:0.0625rem solid rgba(255,255,255,.4);
  background:rgba(255,255,255,.14);
  color:#fff;
  box-shadow:none;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card .tk-list-pager .list-pagination-btn,html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card #tkListaPagination .list-pagination-btn{ background:rgba(255,255,255,.14); color:#fff; }
#page-relatorios .relatorios-fd .tickets-card .tk-list-pager .list-pagination-btn:hover:not(:disabled),
#page-relatorios .relatorios-fd .tickets-card #tkListaPagination .list-pagination-btn:hover:not(:disabled){
  background:rgba(255,255,255,.28);
  border-color:rgba(255,255,255,.55);
  color:#fff;
  box-shadow:none;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card .tk-list-pager .list-pagination-btn:hover:not(:disabled),html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card #tkListaPagination .list-pagination-btn:hover:not(:disabled){ background:rgba(255,255,255,.28); color:#fff; }
#page-relatorios .relatorios-fd .tickets-card .tk-list-pager .list-pagination-btn:focus,
#page-relatorios .relatorios-fd .tickets-card .tk-list-pager .list-pagination-btn:focus-visible,
#page-relatorios .relatorios-fd .tickets-card #tkListaPagination .list-pagination-btn:focus,
#page-relatorios .relatorios-fd .tickets-card #tkListaPagination .list-pagination-btn:focus-visible{
  outline:none;
  border-color:rgba(255,255,255,.7);
  color:#fff;
  box-shadow:0 0 0 0.125rem rgba(255,255,255,.22);
}
#page-relatorios .relatorios-fd .tickets-card .tk-list-pager .list-pagination-btn:disabled,
#page-relatorios .relatorios-fd .tickets-card #tkListaPagination .list-pagination-btn:disabled{
  background:rgba(255,255,255,.08);
  border-color:rgba(255,255,255,.22);
  color:rgba(255,255,255,.72);
  box-shadow:none;
  opacity:.45;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card .tk-list-pager .list-pagination-btn:disabled,html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card #tkListaPagination .list-pagination-btn:disabled{ border-color:rgba(255,255,255,.22); }
#page-relatorios .relatorios-fd .tickets-card .tk-list-pager .list-pagination-page,
#page-relatorios .relatorios-fd .tickets-card #tkListaPagination .list-pagination-page{
  height:2rem;
  min-height:2rem;
  padding:0 0.625rem;
  border-radius:var(--radius-card, 0.25rem);
  border:0.0625rem solid rgba(255,255,255,.55);
  background:#fff;
  color:#1a4db8;
  font-size:0.75rem;
  font-weight:800;
  letter-spacing:.02em;
  box-shadow:none;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card .tk-list-pager .list-pagination-page,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card #tkListaPagination .list-pagination-page{
  background:#fff;
  border-color:rgba(255,255,255,.55);
  box-shadow:none;
  color:#1a4db8;
}
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody tr.tk-pad-row{
  cursor:default;
  pointer-events:none;
  height:var(--tk-list-row-h, 3.125rem);
}
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody tr.tk-pad-row td{
  height:var(--tk-list-row-h, 3.125rem);
  padding:0 0.5rem;
  border-bottom:0.0625rem solid var(--line);
  vertical-align:middle;
}
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody tr.tk-pad-row:hover{
  background:transparent;
}
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody tr.tk-pad-row:nth-child(even),
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody tr.tk-pad-row:nth-child(even):hover{
  background:var(--rel-surface-sunken);
}
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody tr.tk-pad-row:nth-child(odd){
  background:transparent;
}
/* Sem tickets: preserva as faixas alternadas e as divisórias. */
#page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table tbody tr,
#page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table tbody tr:nth-child(odd),
#page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table tbody tr.tk-pad-row,
#page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table tbody tr.tk-pad-row:nth-child(odd),
#page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table tbody tr.tk-pad-row:hover,
#page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table tbody tr.tk-empty-row,
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody.tk-body--empty tr,
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody.tk-body--empty tr:nth-child(odd){
  background:var(--rel-surface) !important;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table tbody tr,html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table tbody tr:nth-child(odd),html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table tbody tr.tk-pad-row,html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table tbody tr.tk-pad-row:nth-child(odd),html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table tbody tr.tk-pad-row:hover,html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table tbody tr.tk-empty-row,html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card .tk-table tbody.tk-body--empty tr,html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card .tk-table tbody.tk-body--empty tr:nth-child(odd){ background:var(--surface) !important; }
#page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table tbody tr:nth-child(even),
#page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table tbody tr.tk-pad-row:nth-child(even),
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody.tk-body--empty tr:nth-child(even),
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody.tk-body--empty tr.tk-pad-row:nth-child(even){
  background:var(--rel-surface-sunken) !important;
}
#page-relatorios .relatorios-fd .tickets-card .tk-tablewrap.is-empty .tk-table tbody tr td,
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody.tk-body--empty tr td{
  background:transparent !important;
}
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody tr.tk-pad-row:hover td:first-child{
  box-shadow:none !important;
}
#page-relatorios .relatorios-fd .tickets-card .tk-tablewrap:has(.tk-empty-cell) .tk-table{
  height:100%;
}
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody:has(.tk-empty-cell),
#page-relatorios .relatorios-fd .tickets-card .tk-table tr.tk-empty-row{
  height:calc(var(--tk-list-visible-h) - var(--tk-list-row-h, 3.125rem));
}
#page-relatorios .relatorios-fd .tickets-card .tk-table .tk-empty-cell{
  height:calc(var(--tk-list-visible-h) - var(--tk-list-row-h, 3.125rem));
  vertical-align:middle;
  text-align:center;
  color:var(--muted, #7a879e);
  font-size:0.8125rem;
  font-weight:600;
  border-bottom:none !important;
  cursor:default;
  white-space:normal;
}
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody tr.tk-empty-row{
  cursor:default;
}
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody tr.tk-empty-row:hover{
  background:transparent !important;
}
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody tr.tk-empty-row:hover td:first-child{
  box-shadow:none !important;
}
#page-relatorios .relatorios-fd .tickets-card .tk-tablewrap::before,
#page-relatorios .relatorios-fd #view-tickets.tickets-card:not(.chart-card) > .tk-tablewrap::before,
#page-relatorios .relatorios-fd .tickets-card .tk-tickets-split-panel > .tk-tablewrap::before{
  content:none !important;
  display:none !important;
  height:0 !important;
  margin:0 !important;
}
#page-relatorios .relatorios-fd .tickets-card .tk-table thead{
  position:sticky;
  top:0;
  z-index:4;
}
#page-relatorios .relatorios-fd .tickets-card .tk-table thead tr.tk-colrow{
  height:var(--tk-list-row-h,3.125rem);
  background:var(--tk-thead-grad);
  box-shadow:var(--tk-thead-edge);
}
#page-relatorios .relatorios-fd .tickets-card .tk-colrow th{
  height:var(--tk-list-row-h,3.125rem);
  padding:0 0.625rem;
  line-height:1.2;
  vertical-align:middle;
  background:transparent;
  color:#fff;
  font-weight:800;
  font-size:0.75rem;
  letter-spacing:.02em;
  text-shadow:0 0.0625rem 0 rgba(var(--rel-shadow-deep-rgb),.18);
  transition:box-shadow .14s ease, background .14s ease;
}
/* Blindagem: header da lista de tickets — degradê da Central + tipografia reforçada */
#page-relatorios .relatorios-fd #tkTable thead tr.tk-colrow{
  background:var(--tk-thead-grad) !important;
  box-shadow:var(--tk-thead-edge) !important;
}
#page-relatorios .relatorios-fd #tkTable thead tr.tk-colrow th{
  background:transparent !important;
  color:#fff !important;
  font-weight:800 !important;
  letter-spacing:.02em;
  text-shadow:0 0.0625rem 0 rgba(var(--rel-shadow-deep-rgb),.18);
}
#page-relatorios .relatorios-fd #tkTable thead tr.tk-colrow th .sort,
#page-relatorios .relatorios-fd #tkTable thead tr.tk-colrow th svg{ color:#fff !important; }
#page-relatorios .relatorios-fd .tickets-card .tk-colrow th:first-child{ border-top-left-radius:var(--radius-card); }
#page-relatorios .relatorios-fd .tickets-card .tk-colrow th:last-child{ border-top-right-radius:var(--radius-card); }
#page-relatorios .relatorios-fd .tickets-card .tk-colrow th:hover,
#page-relatorios .relatorios-fd #tkTable thead tr.tk-colrow th:hover{
  background:rgba(var(--rel-surface-rgb),.12) !important;
  box-shadow:inset 0 0.0625rem 0 rgba(255,255,255,.28);
}
#page-relatorios .relatorios-fd .tickets-card .tk-colrow th.sorted,
#page-relatorios .relatorios-fd #tkTable thead tr.tk-colrow th.sorted{
  background:transparent !important;
  box-shadow:none;
}
#page-relatorios .relatorios-fd .tickets-card .tk-colrow th.sorted::after,
#page-relatorios .relatorios-fd #tkTable thead tr.tk-colrow th.sorted::after{
  opacity:1;
  color:#fff;
  text-shadow:
    0 0 0.25rem rgba(255, 255, 255, 0.95),
    0 0 0.625rem rgba(var(--rel-cyan-rgb), 0.9),
    0 0 1rem rgba(255, 255, 255, 0.55);
}
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody tr{
  height:var(--tk-list-row-h);
}
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody td,
#page-relatorios .relatorios-fd .tickets-card .tk-table tbody td.c-cat{
  height:var(--tk-list-row-h);
  padding:0 0.5rem;
  line-height:1.2;
  vertical-align:middle;
  box-sizing:border-box;
}
#page-relatorios .relatorios-fd .chart-card.dep .dep-panel-body{ padding-top:0.25rem; padding-bottom:1.125rem; }
#page-relatorios .relatorios-fd .chart-card.dep .dep-inner-panel .chart-body{
  padding:0.75rem 0.875rem 0.875rem;
  margin:0;
}

/* Financeiro — painéis brancos alinhados ao título e aos botões do .chart-head (1.625rem) */
#page-relatorios .relatorios-fd .chart-card.fin{
  --rel-fin-gutter:1.625rem;
}
#page-relatorios .relatorios-fd .chart-card.fin > .subnav,
#page-relatorios .relatorios-fd .chart-card.fin > #finSubnav.subnav{
  padding-left:var(--rel-fin-gutter);
  padding-right:var(--rel-fin-gutter);
}
/* Dentro do fin-head-band o gutter já vem do pai — sem 2º recuo à esquerda dos botões */
#page-relatorios .relatorios-fd .chart-card.fin .fin-head-main > #finSubnav.subnav{
  padding-left:0;
  padding-right:0;
}
#page-relatorios .relatorios-fd .chart-card.fin > .fin-body{
  padding-left:var(--rel-fin-gutter);
  padding-right:var(--rel-fin-gutter);
}

/* Clientes — dashboard moderno (65% tabela · 35% barras de volume) */
#page-relatorios .relatorios-fd .chart-card.clientes.clientes--modern{
  --cli-slate-50:#f8fafc;
  --cli-slate-100:#f1f5f9;
  --cli-slate-200:#e2e8f0;
  --cli-slate-400:#94a3b8;
  --cli-slate-600:#475569;
  --cli-slate-900:#0f172a;
  --cli-blue:#2563eb;
  --cli-rank-visible:13;
  --cli-rank-thead-h:var(--fd-list-thead-h, 3.125rem); /* igual cabeçalho de tickets / Foto B */
  --cli-rank-row-h:3.125rem;
  --cli-rank-pager-h:var(--fd-list-pager-h, 3.125rem); /* mesma altura do cabeçalho de colunas / tickets */
  --cli-rank-scroll-h:calc(var(--cli-rank-thead-h) + var(--cli-rank-visible) * var(--cli-rank-row-h));
  --tk-thead-grad:var(--fd-list-thead-grad, linear-gradient(145deg, #163f9a 0%, #1a4db8 30%, #2f6fe0 64%, #5aa0ff 100%));
  --tk-thead-edge:var(--fd-list-thead-edge, inset 0 0.0625rem 0 rgba(255,255,255,.34), inset 0 -0.0625rem 0 rgba(8,32,90,.16));
  font-family:var(--fd-font, 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif);
  background:var(--surface, #fff);
}
#page-relatorios .relatorios-fd .chart-card.clientes.clientes--modern > .chart-head,
#page-relatorios .relatorios-fd .chart-card.clientes.clientes--modern > .chart-foot{
  display:none;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-head.tk-head{
  border-bottom:none;
  padding:1.375rem 1.625rem 0.875rem;
  align-items:flex-start;
  background:var(--surface, #fff);
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-stats.tk-stats{
  margin:0 1.625rem;
  border:0.0625rem solid var(--line);
  border-radius:0.375rem;
  overflow:hidden;
  width:auto;
  box-sizing:border-box;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-stats .tk-stat{
  flex:1 1 0;
  min-width:0;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-stats .tk-stat.hero .sv{
  font-size:1.125rem;
  letter-spacing:-0.025rem;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-body{
  padding:1rem 1.625rem 1.5rem;
  background:var(--cli-slate-50);
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-split{
  display:block;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-panel-rank{
  min-height:0;
  border-radius:var(--radius-card);
  border:0.0625rem solid var(--line);
  background:var(--surface, #fff);
  box-shadow:var(--shadow-1, 0 0.0625rem 0.1875rem rgba(15,23,42,.05));
  overflow:hidden;
  display:flex;
  flex-direction:column;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-panel-chart{
  display:none;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-body{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll{
  flex:1;
  min-height:var(--cli-rank-scroll-h);
  height:var(--cli-rank-scroll-h);
  max-height:var(--cli-rank-scroll-h);
  overflow:hidden;
  position:relative;
  isolation:isolate;
  background:var(--surface, #fff);
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll.is-empty::after{
  content:none;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-vol-scroll{
  display:none;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-scrollbar{
  scrollbar-width:thin;
  scrollbar-color:var(--rel-scroll-thumb) transparent;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-scrollbar::-webkit-scrollbar{
  width:0.25rem;
  height:0.25rem;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-scrollbar::-webkit-scrollbar-track{
  background:transparent;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-scrollbar::-webkit-scrollbar-thumb{
  background:var(--rel-scroll-thumb);
  border-radius:62.4375rem;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-scrollbar::-webkit-scrollbar-thumb:hover{
  background:var(--rel-scroll-thumb-hover);
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-single-detail{
  border-top:0.0625rem solid var(--cli-slate-100);
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table{
  width:100%;
  border-collapse:separate;
  border-spacing:0;
  font-size:0.8125rem;
}
/* Cabeçalho contínuo (igual tickets/rodapé): degradê na linha, células transparentes. */
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table thead{
  position:sticky;
  top:0;
  z-index:4;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table thead tr.tk-colrow,
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table thead tr.clientes-rank-colrow{
  height:var(--cli-rank-thead-h, 3.125rem);
  background:var(--tk-thead-grad);
  box-shadow:var(--tk-thead-edge);
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table thead th{
  position:static;
  top:auto;
  z-index:auto;
  height:var(--cli-rank-thead-h, 3.125rem);
  max-height:var(--cli-rank-thead-h, 3.125rem);
  padding:0 0.5rem !important;
  font-size:0.75rem;
  font-weight:800;
  letter-spacing:.02em;
  text-transform:uppercase;
  color:#fff !important;
  background:transparent !important;
  box-shadow:none;
  border-bottom:0;
  border-right:0;
  box-sizing:border-box;
  vertical-align:middle;
  text-align:center;
  line-height:1.2;
  text-shadow:0 0.0625rem 0 rgba(var(--rel-shadow-deep-rgb),.18);
  cursor:default;
  user-select:none;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table thead th:first-child{
  border-top-left-radius:var(--radius-card);
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table thead th:last-child{
  border-top-right-radius:var(--radius-card);
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table thead th:hover{
  background:rgba(var(--rel-surface-rgb),.12) !important;
  box-shadow:inset 0 0.0625rem 0 rgba(255,255,255,.28);
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table thead th.col-hash{
  padding-left:0.5rem;
  padding-right:0.5rem;
  width:2.75rem;
  text-align:center;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody tr.cli-rank-row:hover td:first-child,
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody tr.cli-rank-row.cli-rank-row--hl td:first-child,
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody tr.cli-rank-row:focus-visible td:first-child{
  box-shadow:inset 0.1875rem 0 0 var(--blue, #007bff);
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody tr.cli-pad-row:nth-child(even):hover{
  background:var(--rel-surface-sunken);
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody tr.cli-pad-row:hover td:first-child{
  box-shadow:none !important;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody tr.cli-pad-row td{
  height:var(--cli-rank-row-h);
  padding:0 0.5rem;
  border-bottom:0.0625rem solid var(--line, var(--cli-slate-100));
  vertical-align:middle;
}
#page-relatorios .relatorios-fd .chart-card.clientes #clientesRankPagination.list-pagination-bar{
  margin:0;
  padding:0 0.75rem;
  border-top:0;
  border-radius:0 0 var(--radius-card, 0.25rem) var(--radius-card, 0.25rem);
  width:100%;
  box-sizing:border-box;
  display:flex;
  align-items:center;
  height:var(--cli-rank-pager-h, 3.125rem);
  min-height:var(--cli-rank-pager-h, 3.125rem);
  max-height:var(--cli-rank-pager-h, 3.125rem);
  background:var(--tk-thead-grad);
  box-shadow:var(--tk-thead-edge);
}
#page-relatorios .relatorios-fd .chart-card.clientes #clientesRankPagination.list-pagination-bar.hidden{
  display:flex !important;
}
#page-relatorios .relatorios-fd .chart-card.clientes #clientesRankPagination .list-pagination-inner{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:0.625rem;
  width:100%;
  height:100%;
  flex-wrap:nowrap;
}
#page-relatorios .relatorios-fd .chart-card.clientes #clientesRankPagination .list-pagination-info{
  flex:none;
  min-width:0;
  order:0;
  font-size:0.78125rem;
  font-weight:800;
  letter-spacing:.02em;
  line-height:1.3;
  color:#fff;
  text-shadow:0 0.0625rem 0 rgba(var(--rel-shadow-deep-rgb),.18);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
#page-relatorios .relatorios-fd .chart-card.clientes #clientesRankPagination .list-pagination-actions{
  flex:none;
  margin-left:0;
  order:1;
  display:inline-flex;
  align-items:center;
  gap:0.375rem;
}
#page-relatorios .relatorios-fd .chart-card.clientes #clientesRankPagination .list-pagination-btn{
  width:2rem;
  min-width:2rem;
  height:2rem;
  border-radius:var(--radius-card, 0.25rem);
  border:0.0625rem solid rgba(255,255,255,.48);
  background:rgba(var(--rel-surface-rgb),.92);
  color:var(--rel-thead-2);
  box-shadow:0 0.0625rem 0.125rem rgba(var(--rel-shadow-deep-rgb),.12), inset 0 0.0625rem 0 rgba(255,255,255,.85);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.clientes #clientesRankPagination .list-pagination-btn{ background:var(--surface); }
#page-relatorios .relatorios-fd .chart-card.clientes #clientesRankPagination .list-pagination-btn:hover:not(:disabled){
  background:var(--rel-surface);
  border-color:rgba(255,255,255,.9);
  color:var(--rel-accent-deep);
  box-shadow:0 0.125rem 0.375rem rgba(var(--rel-shadow-deep-rgb),.16), inset 0 0.0625rem 0 rgba(255,255,255,.9);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.clientes #clientesRankPagination .list-pagination-btn:hover:not(:disabled){ background:var(--surface); }
#page-relatorios .relatorios-fd .chart-card.clientes #clientesRankPagination .list-pagination-btn:focus,
#page-relatorios .relatorios-fd .chart-card.clientes #clientesRankPagination .list-pagination-btn:focus-visible{
  outline:none;
  border-color:var(--rel-surface);
  color:var(--rel-accent-deep);
  box-shadow:0 0 0 0.1875rem rgba(255,255,255,.28);
}
#page-relatorios .relatorios-fd .chart-card.clientes #clientesRankPagination .list-pagination-btn:disabled{
  background:rgba(var(--rel-surface-rgb),.28);
  border-color:rgba(255,255,255,.22);
  color:rgba(255,255,255,.72);
  box-shadow:none;
  opacity:1;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.clientes #clientesRankPagination .list-pagination-btn:disabled{ border-color:var(--rel-line); }
#page-relatorios .relatorios-fd .chart-card.clientes #clientesRankPagination .list-pagination-page{
  height:2rem;
  min-height:2rem;
  padding:0 0.75rem;
  border-radius:var(--radius-card, 0.25rem);
  border:0.0625rem solid rgba(255,255,255,.48);
  background:rgba(var(--rel-surface-rgb),.92);
  color:var(--rel-accent-deep);
  font-size:0.78125rem;
  font-weight:800;
  letter-spacing:.02em;
  box-shadow:0 0.0625rem 0.125rem rgba(var(--rel-shadow-deep-rgb),.12), inset 0 0.0625rem 0 rgba(255,255,255,.85);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.clientes #clientesRankPagination .list-pagination-page{
  background:var(--surface);
  border-color:var(--rel-line);
  box-shadow:none;
  color:var(--rel-ink);
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody td.col-hash{
  padding-left:0.5rem;
  font-size:0.75rem;
  font-weight:600;
  color:var(--muted, var(--cli-slate-400));
  text-align:left;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-empty-cell{
  display:none !important;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll:has(.clientes-empty-cell) .clientes-rank-table,
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody:has(.clientes-empty-cell),
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tr:has(.clientes-empty-cell){
  height:auto;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table thead th.col-client{
  text-align:center;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table thead th.col-r{
  text-align:center;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table thead th.col-vol{
  text-align:center;
  min-width:12.5rem;
  width:26%;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody tr.cli-rank-row{
  height:var(--cli-rank-row-h);
  box-sizing:border-box;
  cursor:pointer;
  transition:background .12s ease;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody tr.cli-rank-row:nth-child(even),
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody tr.cli-pad-row:nth-child(even){
  background:var(--rel-surface-sunken);
}
/* Sem clientes: preserva as faixas alternadas e as divisórias. */
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll.is-empty .clientes-rank-table tbody tr,
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll.is-empty .clientes-rank-table tbody tr:nth-child(odd),
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll.is-empty .clientes-rank-table tbody tr.cli-pad-row,
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll.is-empty .clientes-rank-table tbody tr.cli-pad-row:nth-child(odd),
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll.is-empty .clientes-rank-table tbody tr.cli-pad-row:hover{
  background:var(--rel-surface) !important;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll.is-empty .clientes-rank-table tbody tr,html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll.is-empty .clientes-rank-table tbody tr:nth-child(odd),html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll.is-empty .clientes-rank-table tbody tr.cli-pad-row,html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll.is-empty .clientes-rank-table tbody tr.cli-pad-row:nth-child(odd),html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll.is-empty .clientes-rank-table tbody tr.cli-pad-row:hover{ background:var(--surface) !important; }
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll.is-empty .clientes-rank-table tbody tr:nth-child(even),
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll.is-empty .clientes-rank-table tbody tr.cli-pad-row:nth-child(even),
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll.is-empty .clientes-rank-table tbody tr.cli-pad-row:nth-child(even):hover{
  background:var(--rel-surface-sunken) !important;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll.is-empty .clientes-rank-table tbody tr td{
  background:transparent !important;
  border-bottom:0.0625rem solid var(--line, var(--cli-slate-100));
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody tr.cli-rank-row:hover,
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody tr.cli-rank-row.cli-rank-row--hl,
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody tr.cli-rank-row:focus-visible{
  background:rgba(var(--rel-accent-rgb),.07);
  outline:none;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody tr.cli-pad-row{
  height:var(--cli-rank-row-h);
  cursor:default;
  pointer-events:none;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody tr.cli-pad-row:hover{
  background:inherit;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody tr.cli-pad-row td{
  border-bottom:0.0625rem solid var(--line, var(--cli-slate-100));
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody td{
  padding:0 0.875rem;
  vertical-align:middle;
  border-bottom:0.0625rem solid var(--cli-slate-100);
  background:transparent;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody td.col-hash{
  padding-left:1.125rem;
  font-size:0.75rem;
  font-weight:600;
  color:var(--cli-slate-400);
  text-align:left;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody td.col-client{
  text-align:left;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody td.col-r{
  text-align:right;
  font-variant-numeric:tabular-nums;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody td.col-vol{
  padding-right:1rem;
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-vol-cell{
  display:flex;
  align-items:center;
  gap:0.75rem;
  min-width:0;
  width:100%;
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-vol-track{
  flex:1;
  height:1.5rem;
  max-height:1.5rem;
  border-radius:62.4375rem;
  background:var(--cli-slate-100);
  overflow:hidden;
  min-width:0;
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-vol-track i{
  display:block;
  height:100%;
  border-radius:62.4375rem;
  background:var(--cli-blue);
  transition:width .35s cubic-bezier(.22,1,.36,1);
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-vol-cell .cli-vol-pct{
  flex:none;
  font-size:0.9375rem;
  font-weight:800;
  color:var(--cli-blue);
  font-variant-numeric:tabular-nums;
  line-height:1;
  min-width:2.5em;
  text-align:right;
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-name-cell{
  display:flex;
  align-items:center;
  gap:0.625rem;
  min-width:0;
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-avatar{
  display:inline-flex;
  width:1.75rem;
  height:1.75rem;
  border-radius:50%;
  align-items:center;
  justify-content:center;
  font-size:0.625rem;
  font-weight:800;
  color:var(--cli-blue);
  background:color-mix(in srgb, var(--cli-blue) 10%, var(--rel-surface));
  border:0.0625rem solid color-mix(in srgb, var(--cli-blue) 18%, var(--cli-slate-100));
  flex:none;
  overflow:hidden;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.clientes .cli-avatar{ border:0.0625rem solid var(--rel-line); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.clientes .cli-avatar{ background:color-mix(in srgb, var(--cli-blue) 10%, var(--surface)); }
#page-relatorios .relatorios-fd .chart-card.clientes .cli-avatar .cli-avatar-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
#page-relatorios .relatorios-fd .drawer .cli-dw-head{
  display:flex;
  align-items:center;
  gap:0.75rem;
  margin:0 0 0.875rem;
}
#page-relatorios .relatorios-fd .drawer .cli-dw-head .cli-avatar{
  display:inline-flex;
  width:2.5rem;
  height:2.5rem;
  border-radius:50%;
  align-items:center;
  justify-content:center;
  font-size:0.75rem;
  font-weight:800;
  color:var(--cli-blue, #2563eb);
  background:color-mix(in srgb, var(--cli-blue, #2563eb) 10%, var(--rel-surface));
  border:0.0625rem solid color-mix(in srgb, var(--cli-blue, #2563eb) 18%, #e2e8f0);
  flex:none;
  overflow:hidden;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer .cli-dw-head .cli-avatar{ border:0.0625rem solid var(--rel-line); }
html[data-theme="cinza"] #page-relatorios .relatorios-fd .drawer .cli-dw-head .cli-avatar{ background:color-mix(in srgb, var(--cli-blue, #2563eb) 10%, var(--surface)); }
#page-relatorios .relatorios-fd .drawer .cli-dw-head .cli-avatar .cli-avatar-img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
#page-relatorios .relatorios-fd .drawer .cli-dw-head-name{
  font-weight:700;
  color:var(--cli-slate-900, #0f172a);
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-name{
  font-weight:600;
  color:var(--cli-slate-900);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-num b{
  font-weight:800;
  color:var(--cli-slate-900);
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-muted{
  font-size:0.75rem;
  color:var(--cli-slate-600);
}
#page-relatorios .relatorios-fd .chart-card.clientes .sla-na-text{
  font-size:0.75rem;
  font-weight:600;
  color:var(--cli-slate-400);
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-empty-cell{
  display:none !important;
  height:0 !important;
  padding:0 !important;
  border:0 !important;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-scroll:has(.clientes-empty-cell) .clientes-rank-table{
  height:auto;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tbody:has(.clientes-empty-cell),
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-rank-table tr:has(.clientes-empty-cell){
  height:auto;
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-vol-head{
  flex:none;
  display:flex;
  align-items:center;
  height:var(--cli-rank-thead-h);
  padding:0 1rem;
  border-bottom:0.0625rem solid var(--cli-slate-100);
  background:var(--rel-surface);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.clientes .clientes-vol-head{ background:var(--surface); }
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-vol-head-title{
  font-size:0.6875rem;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
  color:var(--cli-slate-400);
}
#page-relatorios .relatorios-fd .chart-card.clientes .clientes-vol-list{
  display:flex;
  flex-direction:column;
  min-height:min-content;
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-vol-row{
  display:flex;
  align-items:center;
  gap:0.75rem;
  height:var(--cli-rank-row-h);
  box-sizing:border-box;
  padding:0 1rem;
  border-bottom:0.0625rem solid var(--cli-slate-100);
  transition:background .12s ease;
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-vol-row:hover,
#page-relatorios .relatorios-fd .chart-card.clientes .cli-vol-row.cli-vol-row--hl{
  background:var(--cli-slate-50);
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-vol-track{
  flex:1;
  height:0.5rem;
  border-radius:62.4375rem;
  background:var(--cli-slate-100);
  overflow:hidden;
  min-width:0;
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-vol-track i{
  display:block;
  height:100%;
  border-radius:62.4375rem;
  background:var(--cli-blue);
  transition:width .35s cubic-bezier(.22,1,.36,1);
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-vol-meta{
  flex:none;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:0.0625rem;
  font-variant-numeric:tabular-nums;
  min-width:3.25rem;
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-vol-meta b{
  font-size:0.8125rem;
  font-weight:800;
  color:var(--cli-slate-900);
}
#page-relatorios .relatorios-fd .chart-card.clientes .cli-vol-meta .cli-vol-pct{
  font-size:0.625rem;
  font-weight:600;
  color:var(--cli-slate-400);
}
@media (max-width: 0px) /* ui-scale-freeze: was 1100px */{
  #page-relatorios .relatorios-fd .chart-card.clientes .clientes-split{
    grid-template-columns:1fr;
  }
  #page-relatorios .relatorios-fd .chart-card.clientes .clientes-vol-scroll{
    max-height:min(var(--cli-rank-scroll-h), 22.5rem);
  }
}

/* só filtros + card do indicador ativo ficam visíveis */
#page-relatorios.relatorios-print-focus .config-panel:not(.filters-panel){ display:none !important; }
#page-relatorios.relatorios-print-focus .chips{ display:none !important; }

/* dentro do card em foco: mantém só a subaba ativa (não empilha relatório completo) */
#page-relatorios.relatorios-print-focus .subnav{ display:none !important; }
#page-relatorios.relatorios-print-focus .subsector:not(.on){
  display:none !important;
}
#page-relatorios.relatorios-print-focus .subsector.on{
  display:block !important;
  margin-bottom:0;
  padding-bottom:0;
  border-bottom:0;
}

#page-relatorios.relatorios-print-focus .chart-head .ch-act{ display:none; }

#page-relatorios.relatorios-print-focus .chart-card,
#page-relatorios.relatorios-print-focus .tickets-card{
  width:100%; max-width:none;
  overflow:visible;
}
#page-relatorios.relatorios-print-focus .chart-card.tickets-card .tk-inner-panel{
  overflow:visible;
}
#page-relatorios.relatorios-print-focus .chart-body{
  grid-template-columns:minmax(0,1fr) minmax(13.75rem,17.5rem);
  align-items:start;
}
#page-relatorios.relatorios-print-focus .plot .gridbars{
  height:min(58vh,38.75rem);
}
/* Lista de tickets: tudo visível; rolagem só na página expandida */
#page-relatorios.relatorios-print-focus .relatorios-fd .tk-tablewrap{
  min-height:0;
  height:auto;
  max-height:none;
  overflow:visible;
  scrollbar-gutter:auto;
}
#page-relatorios.relatorios-print-focus .relatorios-fd .tk-tablewrap::before,
#page-relatorios.relatorios-print-focus .relatorios-fd .tk-tablewrap::after{
  display:none;
}
/* Legendas (ex.: departamentos): sem painel com scroll interno */
#page-relatorios.relatorios-print-focus .legend{
  min-height:auto;
  max-height:none;
  height:auto;
  align-self:stretch;
}
#page-relatorios.relatorios-print-focus .leg-list{
  position:static;
  overflow:visible;
  max-height:none;
  margin-top:2.5rem;
  padding:0 0.875rem 0.875rem 0.5rem;
}

/* barra fixa: rotulo + Exportar + Voltar */
#page-relatorios.relatorios-print-focus .rp-focus-bar{
  position:sticky; top:0; z-index:10; display:flex; align-items:center; gap:0.625rem;
  padding:0.875rem 1.75rem; background:var(--surface); border-bottom:0.0625rem solid var(--line);
  box-shadow:0 0.125rem 0.625rem rgba(var(--rel-shadow-rgb),.08);
}
#page-relatorios .rp-focus-bar .rp-focus-label{ font-size:0.78125rem; font-weight:700; color:var(--muted); margin-right:auto; }
#page-relatorios .rp-focus-bar .cc-ibtn{
  width:2.375rem; height:2.375rem; padding:0; flex:none; border-radius:var(--radius-card, 0.25rem); border:0.0625rem solid var(--line);
  background:rgba(var(--rel-surface-rgb),.7); color:var(--rel-ink-faint); cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; transition:.15s; box-shadow:none;
}
html[data-theme="cinza"] #page-relatorios .rp-focus-bar .cc-ibtn{ background:var(--surface); }
#page-relatorios .rp-focus-bar .cc-ibtn svg{ width:1.0625rem; height:1.0625rem; flex:none; }
#page-relatorios .rp-focus-bar .cc-ibtn:hover{ background:var(--rel-surface); color:var(--ink); box-shadow:none; }
html[data-theme="cinza"] #page-relatorios .rp-focus-bar .cc-ibtn:hover{ background:var(--surface); }
#page-relatorios .rp-focus-bar .rel-export-menu{ z-index:20; }
#page-relatorios .rp-focus-bar .rp-focus-back{
  height:2.375rem; padding:0 1.125rem; border-radius:var(--radius-card, 0.25rem); border:0.0625rem solid transparent; background:var(--blue); color:#fff;
  font-family:inherit; font-size:0.8125rem; font-weight:700; cursor:pointer; transition:.14s; box-shadow:none;
}
#page-relatorios .rp-focus-bar .rp-focus-back:hover{ background:var(--blue-600); }

@media (max-width: 0px) /* ui-scale-freeze: was 1180px */{
  #page-relatorios.relatorios-print-focus .chart-body{ grid-template-columns:1fr; }
  #page-relatorios.relatorios-print-focus .legend{ min-height:auto; max-height:none; }
}

/* ============================================================
   IMPRESSÃO — A4, 0.625rem de margem em todas as bordas
   ============================================================ */
@media print{
  #page-relatorios.relatorios-print-focus{ position:static; overflow:visible; background:#fff; }
  #page-relatorios.relatorios-print-focus .rp-focus-bar{ display:none !important; }
  @page{ size:A4; margin:0.625rem; }
}

/* ==========================================================================
   S9 — chart-card + plot chrome (cinza + dark)
   ========================================================================== */
html[data-theme="dark"] #page-relatorios .relatorios-fd .chart-card,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card {
  border-color: var(--line);
  background:
    radial-gradient(40rem 23.75rem at 88% -8%, color-mix(in srgb, var(--blue) 18%, transparent), transparent 62%),
    radial-gradient(32.5rem 22.5rem at 4% 108%, color-mix(in srgb, var(--blue) 12%, transparent), transparent 60%),
    linear-gradient(165deg, var(--surface) 0%, var(--field) 58%, color-mix(in srgb, var(--field) 85%, var(--bg-app)) 100%);
  box-shadow: var(--elev-3);
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .chart-head .ch-delta.up,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-head .ch-delta.up {
  background: color-mix(in srgb, var(--blue) 16%, transparent);
  color:var(--blue-text);
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .chart-head .ch-delta.down,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-head .ch-delta.down {
  background: rgba(21,104,63,0.14);
  color: #0e4a2c;
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .cc-ibtn,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .cc-ibtn {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-color: var(--line);
  color: var(--muted);
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .cc-ibtn:hover,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .cc-ibtn:hover {
  background: var(--surface-2, var(--field));
  color: var(--ink);
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .legend,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .legend {
  background: color-mix(in srgb, var(--surface) 72%, transparent);
  border-color: var(--line);
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .legend h4,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .legend h4 {
  color: var(--muted);
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .leg-i .nm,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .leg-i .nm {
  color: var(--ink);
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .leg-i:hover,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .leg-i:hover {
  background: color-mix(in srgb, var(--blue) 8%, transparent);
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .plot .ytick,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .plot .ytick,
html[data-theme="dark"] #page-relatorios .relatorios-fd .plot .xlab .xt,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .plot .xlab .xt {
  color: var(--muted);
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .plot .gline,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .plot .gline {
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .plot .gline.base,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .plot .gline.base {
  background: color-mix(in srgb, var(--ink) 32%, transparent);
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .plot .gridbars::before,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .plot .gridbars::before {
  background: color-mix(in srgb, var(--ink) 28%, transparent);
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .plot .aline.avg .atag,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .plot .aline.avg .atag {
  background: color-mix(in srgb, var(--blue) 55%, #0a1628);
  color: #dbe8fb;
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .plot .aline.meta .atag,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .plot .aline.meta .atag {
  background: var(--surface);
  color: var(--muted);
  border-color: color-mix(in srgb, #6e1614 35%, var(--line));
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .chart-foot,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-foot {
  border-top-color: color-mix(in srgb, var(--line) 80%, transparent);
}

html[data-theme="dark"] #page-relatorios .relatorios-fd .chart-foot .hint-click,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-foot .hint-click {
  color: var(--muted);
}

html[data-theme="dark"] #page-relatorios.relatorios-print-focus,
html[data-theme="cinza"] #page-relatorios.relatorios-print-focus {
  background: var(--field);
}

/* ========================================================
   Export dropdown (.rel-export-menu)
   ======================================================== */

.rel-export-menu {
  position: absolute;
  top: calc(100% + 0.25rem);
  right: 0;
  z-index: 900;
  background: var(--surface, #fff);
  border: 0.0625rem solid var(--line, #e0e3ea);
  border-radius: 0.625rem;
  box-shadow: 0 0.5rem 1.5rem rgba(var(--rel-shadow-pure-rgb),.12), 0 0.125rem 0.375rem rgba(var(--rel-shadow-pure-rgb),.06);
  padding: 0.375rem;
  min-width: 11.125rem;
  display: flex;
  flex-direction: column;
  gap: 0.0625rem;
}

.rel-export-menu .rem-sep {
  height: 0.0625rem;
  background: var(--line, #e0e3ea);
  margin: 0.25rem 0;
}

.rel-export-menu .rem-item {
  display: flex;
  align-items: center;
  gap: 0.5625rem;
  padding: 0.4375rem 0.625rem;
  border-radius: 0.4375rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--tx, #1a2236);
  cursor: pointer;
  transition: background .1s;
}

.rel-export-menu .rem-item:hover {
  background: var(--field, #f4f6fa);
}

.rel-export-menu .rem-item svg {
  color: var(--muted, #888);
  flex: none;
}

.rel-export-menu .rem-item.rem-pdf {
  color: var(--rel-danger);
}

.rel-export-menu .rem-item.rem-pdf svg {
  color: var(--rel-danger);
}

.rel-export-menu .rem-item.rem-pdf:hover {
  background: color-mix(in srgb, var(--rel-danger) 8%, var(--surface, #fff));
}

.rel-export-menu .rem-item.rem-png,
.repm-formats .rem-item.rem-png {
  color: var(--rel-accent-chart);
}

.rel-export-menu .rem-item.rem-png svg,
.repm-formats .rem-item.rem-png svg {
  color: var(--rel-accent-chart);
}

.rel-export-menu .rem-item.rem-png:hover {
  background: color-mix(in srgb, var(--rel-accent-chart) 8%, var(--surface, #fff));
}

.rel-export-menu .rem-tag {
  margin-left: auto;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: color-mix(in srgb, var(--rel-danger) 12%, transparent);
  color: var(--rel-danger);
  padding: 0.0625rem 0.375rem;
  border-radius: 1.25rem;
}

html[data-theme="dark"] .rel-export-menu,
html[data-theme="cinza"] #page-relatorios .rel-export-menu {
  background: var(--surface, #1e2636);
  border-color: var(--line, #2d3648);
  box-shadow: 0 0.5rem 1.75rem rgba(0,0,0,.35);
}

html[data-theme="dark"] .rel-export-menu .rem-item:hover,
html[data-theme="cinza"] #page-relatorios .rel-export-menu .rem-item:hover {
  background: var(--field, #262f42);
}

.rel-export-menu .rem-item.rem-disabled,
.repm-formats .rem-item.rem-disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
  color: var(--muted, #888);
}

.rel-export-menu .rem-item.rem-disabled:hover,
.repm-formats .rem-item.rem-disabled:hover {
  background: transparent;
}

.rem-soon {
  margin-left: auto;
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--muted, #888);
  letter-spacing: 0.02em;
}

/* PDF preview modal */
body.rel-export-modal-open {
  overflow: hidden;
}

.rel-png-capture-frame{
  display:block;
  box-sizing:border-box;
  width:fit-content;
  max-width:100%;
  margin:0 auto;
  overflow:visible;
}

/* PNG — enquadramento igual à tela (sombra, cantos, clientes sem corte interno) */
#page-relatorios .relatorios-fd .chart-card.rel-export-png-capturing,
#page-relatorios .relatorios-fd .tickets-card.rel-export-png-capturing{
  overflow:visible !important;
  contain:none;
  width:100%;
  max-width:100%;
  box-sizing:border-box;
  background:#f2f7fd !important;
  background-image:none !important;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.rel-export-png-capturing,html[data-theme="cinza"] #page-relatorios .relatorios-fd .tickets-card.rel-export-png-capturing{ background:rgba(var(--rel-accent-rgb),0.16) !important; }
#page-relatorios .relatorios-fd .chart-card.visao.rel-export-png-capturing .visao-body{
  padding-bottom:1.375rem;
  background:#f2f7fd;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chart-card.visao.rel-export-png-capturing .visao-body{ background:rgba(var(--rel-accent-rgb),0.16); }
#page-relatorios .relatorios-fd .chart-card.visao.rel-export-png-capturing #visaoCatPanel .sp-body,
#page-relatorios .relatorios-fd .chart-card.visao.rel-export-png-capturing #visaoEvolPanel .sp-body{
  overflow:visible !important;
  flex:none !important;
  max-height:none !important;
}
#page-relatorios .relatorios-fd .chart-card.visao.rel-export-png-capturing #visaoCatChart,
#page-relatorios .relatorios-fd .chart-card.visao.rel-export-png-capturing #visaoCatChart > div,
#page-relatorios .relatorios-fd .chart-card.visao.rel-export-png-capturing #visaoEvolChart,
#page-relatorios .relatorios-fd .chart-card.visao.rel-export-png-capturing #visaoEvolChart > div{
  min-height:auto !important;
  overflow:visible !important;
}
#page-relatorios .relatorios-fd .chart-card.visao.rel-export-png-capturing #visaoCatChart svg,
#page-relatorios .relatorios-fd .chart-card.visao.rel-export-png-capturing #visaoEvolChart svg{
  display:block;
  overflow:visible;
}
#page-relatorios .relatorios-fd .chart-card.clientes.rel-export-png-capturing .clientes-rank-scroll,
#page-relatorios .relatorios-fd .chart-card.clientes.rel-export-png-capturing .clientes-vol-scroll{
  height:auto !important;
  max-height:none !important;
  overflow:visible !important;
}
#page-relatorios .relatorios-fd .chart-card.clientes.rel-export-png-capturing .clientes-panel-rank,
#page-relatorios .relatorios-fd .chart-card.clientes.rel-export-png-capturing .clientes-panel-chart{
  min-height:auto !important;
  height:auto !important;
}
#page-relatorios .relatorios-fd .chart-card.clientes.rel-export-png-capturing .clientes-body{
  padding-bottom:1.375rem;
}
#page-relatorios .relatorios-fd .chart-card.visao.rel-export-png-capturing .visao-row-4 .spanel{
  overflow:visible !important;
  height:auto !important;
  min-height:0;
}
#page-relatorios .relatorios-fd .chart-card.rel-export-png-capturing .chart-foot{
  display:flex !important;
  visibility:visible !important;
}

.rel-png-capture-host{
  position:fixed; left:-6250rem; top:0; z-index:-1; pointer-events:none; overflow:visible; background:var(--rel-surface);
}
html[data-theme="cinza"] #page-relatorios .rel-png-capture-host{ background:var(--surface); }
.rel-png-capture-host #page-relatorios{
  position:static !important;
  inset:auto !important;
  width:100% !important;
  height:auto !important;
  max-width:none !important;
  overflow:visible !important;
  padding:0 !important;
  background:var(--rel-surface);
}
html[data-theme="cinza"] .rel-png-capture-host #page-relatorios{ background:var(--surface); }
.rel-png-capture-host .rel-export-preview-card{
  overflow:visible !important; box-shadow:none !important; border-radius:0; max-width:none !important;
}

.rel-export-pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.repm-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 20, 32, 0.55);
}
html[data-theme="cinza"] #page-relatorios .repm-backdrop{ background:var(--rel-accent-ink); }

.repm-panel {
  position: relative;
  z-index: 1;
  width: min(70rem, 100%);
  max-height: min(92vh, 57.5rem);
  display: flex;
  flex-direction: column;
  background: var(--surface, #fff);
  border: 0.0625rem solid var(--line, #e0e3ea);
  border-radius: var(--radius-card, var(--fd-radius-card, 0.25rem));
  box-shadow: 0 1.5rem 4rem rgba(var(--rel-shadow-pure-rgb), 0.18);
  overflow: hidden;
}

.repm-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 0.0625rem solid var(--line, #e0e3ea);
}

.repm-title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--tx, #1a2236);
}

.repm-sub {
  margin: 0.25rem 0 0;
  font-size: 0.8125rem;
  color: var(--muted, #666);
}

.repm-close {
  border: none;
  background: transparent;
  font-size: 1.625rem;
  line-height: 1;
  cursor: pointer;
  color: var(--muted, #666);
  padding: 0 0.25rem;
}

.repm-body {
  display: grid;
  grid-template-columns: 12.5rem 1fr;
  gap: 0;
  min-height: 0;
  flex: 1;
}

.repm-formats {
  padding: 1rem;
  border-right: 0.0625rem solid var(--line, #e0e3ea);
  background: var(--field, #f8f9fc);
}

.repm-formats-lbl,
.repm-preview-lbl {
  margin: 0 0 0.625rem;
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted, #888);
}

.repm-formats .rem-item {
  display: flex;
  align-items: center;
  gap: 0.5625rem;
  padding: 0.5rem 0.625rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--tx, #1a2236);
  cursor: pointer;
}

.repm-formats .rem-item.rem-pdf {
  color: var(--rel-danger);
  background: color-mix(in srgb, var(--rel-danger) 6%, var(--surface, #fff));
}

.repm-formats .rem-item.is-selected {
  box-shadow: inset 0 0 0 0.0625rem currentColor;
}

.repm-preview-wrap {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 1rem 1.25rem 1.25rem;
}

.repm-page-status {
  align-self: flex-end;
  margin: -1.625rem 0.125rem 0.625rem 0;
  font-size: 0.6875rem;
  font-weight: 800;
  color: var(--muted, #667085);
  letter-spacing: 0.02em;
}

.repm-preview-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #eef1f6;
  border: 0.0625rem solid var(--line, #e0e3ea);
  border-radius: 0.625rem;
  padding: 1.25rem;
}

.rel-export-pdf-modal #page-relatorios.relatorios-export-doc {
  position: relative;
  inset: auto;
  z-index: auto;
  width: 70.1875rem;
  max-width: 100%;
  min-height: 49.625rem;
  height: auto;
  margin: 0 auto;
  padding: 0;
  overflow: visible;
  background: var(--rel-surface);
  box-shadow: 0 1rem 2.625rem rgba(15, 23, 42, 0.14);
}
html[data-theme="cinza"] .rel-export-pdf-modal #page-relatorios.relatorios-export-doc{ background:var(--surface); }

.rel-export-pdf-modal #page-relatorios.relatorios-export-doc .relatorios-fd.content {
  padding: 1.75rem 2rem 2.125rem;
}

.rel-export-pdf-modal #page-relatorios.relatorios-export-doc .rel-export-preview-card {
  width: 100%;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.rel-export-pdf-modal #page-relatorios.relatorios-export-doc .subnav,
.rel-export-pdf-modal #page-relatorios.relatorios-export-doc .prj-nav,
.rel-export-pdf-modal #page-relatorios.relatorios-export-doc .chart-head .ch-act,
.rel-export-pdf-modal #page-relatorios.relatorios-export-doc .chart-foot,
.rel-export-pdf-modal #page-relatorios.relatorios-export-doc #relTkFilterBar,
.rel-export-pdf-modal #page-relatorios.relatorios-export-doc .rel-top-section,
.rel-export-pdf-modal #page-relatorios.relatorios-export-doc .rel-indic-section,
.rel-export-pdf-modal #page-relatorios.relatorios-export-doc .rp-focus-bar {
  display: none !important;
}

.rel-export-preview-card {
  background: var(--rel-surface);
  border-radius: 0.625rem;
  box-shadow: 0 0.125rem 0.75rem rgba(var(--rel-shadow-pure-rgb), 0.06);
  padding: 1.25rem 1.5rem;
  max-width: 100%;
}

.rel-print-header--preview {
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.125rem;
  padding-bottom: 0.875rem;
  border-bottom: 0.125rem solid var(--rel-danger);
}

.rel-print-header--preview .rph-logo {
  font-size: 1.125rem;
  font-weight: 800;
  color: var(--rel-danger);
  letter-spacing: -0.02em;
}

.rel-print-header--preview .rph-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
  text-align: right;
  font-size: 0.75rem;
  color: var(--muted, #666);
}

.rel-print-header--preview .rph-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--tx, #1a2236);
}

.repm-foot {
  display: flex;
  justify-content: flex-end;
  gap: 0.625rem;
  padding: 0.875rem 1.25rem;
  border-top: 0.0625rem solid var(--line, #e0e3ea);
}

.repm-btn {
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  cursor: pointer;
  border: 0.0625rem solid var(--line, #e0e3ea);
}

.repm-btn-ghost {
  background: var(--surface, #fff);
  color: var(--tx, #1a2236);
}

.repm-btn-primary {
  background: var(--rel-danger);
  border-color: var(--rel-danger);
  color: #fff;
}

html[data-theme="dark"] .repm-panel,
html[data-theme="cinza"] #page-relatorios .repm-panel {
  background: var(--surface, #1e2636);
  border-color: var(--line, #2d3648);
}

html[data-theme="dark"] .repm-preview-scroll,
html[data-theme="cinza"] #page-relatorios .repm-preview-scroll {
  background: #151b28;
}

html[data-theme="dark"] .rel-export-preview-card,
html[data-theme="cinza"] #page-relatorios .rel-export-preview-card {
  background: var(--surface, #1e2636);
}

@media (max-width: 768px) {
  .repm-body {
    grid-template-columns: 1fr;
  }
  .repm-formats {
    border-right: none;
    border-bottom: 0.0625rem solid var(--line, #e0e3ea);
  }
}

/* ========================================================
   PDF Print header (.rel-print-header)
   ======================================================== */

.rel-print-header {
  display: none;
}

/* ========================================================
   @media print — PDF export via window.print()
   ======================================================== */

@media print {
  /* Hide everything on page */
  body.relatorios-pdf-mode * {
    visibility: hidden;
  }

  body.relatorios-pdf-mode #appTopbar,
  body.relatorios-pdf-mode #sidebar,
  body.relatorios-pdf-mode #page-relatorios .rp-focus-bar,
  body.relatorios-pdf-mode #page-relatorios .rel-top-section,
  body.relatorios-pdf-mode #page-relatorios .rel-indic-section,
  body.relatorios-pdf-mode #page-relatorios #biClientBanner,
  body.relatorios-pdf-mode #page-relatorios #biFilterBanner,
  body.relatorios-pdf-mode #page-relatorios .chips {
    display: none !important;
    visibility: hidden !important;
  }

  /* Show only the printing card and its descendants */
  body.relatorios-pdf-mode .relatorios-card-printing,
  body.relatorios-pdf-mode .relatorios-card-printing * {
    visibility: visible;
  }

  body.relatorios-pdf-mode .relatorios-card-printing {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    max-width: none !important;
    overflow: visible !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
    page-break-inside: avoid;
  }

  /* Hide interactive controls inside card during print */
  body.relatorios-pdf-mode .relatorios-card-printing .ch-act,
  body.relatorios-pdf-mode .relatorios-card-printing .cc-ibtn,
  body.relatorios-pdf-mode .relatorios-card-printing .chart-foot,
  body.relatorios-pdf-mode .relatorios-card-printing .rel-export-menu {
    display: none !important;
    visibility: hidden !important;
  }

  /* Charts and SVGs scale to fill page */
  body.relatorios-pdf-mode .relatorios-card-printing svg {
    max-width: 100%;
    height: auto;
  }

  @page {
    size: A4 landscape;
    margin: 8mm;
  }
}
/* Skeleton contextual: cada bloco carrega dentro da área que será substituída. */
#page-relatorios .rel-loading-region { position:relative !important; overflow:hidden; color:transparent !important; text-shadow:none !important; -webkit-text-fill-color:transparent !important; user-select:none !important; -webkit-user-select:none !important; caret-color:transparent !important; }
#page-relatorios .rel-loading-region--table { color:inherit !important; -webkit-text-fill-color:initial !important; }
#page-relatorios .rel-loading-region--axes { color:inherit !important; -webkit-text-fill-color:initial !important; }
#page-relatorios .rel-loading-region--financial-axes { color:inherit !important; -webkit-text-fill-color:initial !important; }
#page-relatorios .rel-loading-region--value { pointer-events:none; }
#page-relatorios .rel-loading-region--value > .rel-loading-skeleton { pointer-events:all; }
#page-relatorios .rel-loading-region--finance-kpi { color:inherit !important; -webkit-text-fill-color:initial !important; }
#page-relatorios .rel-loading-region--finance-kpi > .ff-l,
#page-relatorios .rel-loading-region--finance-kpi > .ff-l * {
  visibility:visible !important;
  opacity:1 !important;
  color:var(--muted) !important;
  -webkit-text-fill-color:var(--muted) !important;
}
#page-relatorios .rel-loading-region--finance-sum-card { color:inherit !important; -webkit-text-fill-color:initial !important; }
#page-relatorios .rel-loading-region--finance-sum-card .cs-k,
#page-relatorios .rel-loading-region--finance-sum-card .cs-k * {
  visibility:visible !important;
  opacity:1 !important;
  color:var(--rel-ink-muted) !important;
  -webkit-text-fill-color:#9aa7bd !important;
}
#page-relatorios .rel-loading-value-wrap { visibility:hidden !important; opacity:0 !important; color:transparent !important; -webkit-text-fill-color:transparent !important; user-select:none !important; }
#page-relatorios .rel-loading-region::before,
#page-relatorios .rel-loading-region::after,
#page-relatorios .rel-loading-source-hidden { visibility:hidden !important; opacity:0 !important; }
#page-relatorios .rel-loading-source-revealing { opacity:0 !important; }
#page-relatorios .rel-loading-source-transition { transition:opacity .14s ease !important; }
#page-relatorios .rel-loading-region:not(.rel-loading-region--table):not(.rel-loading-region--axes):not(.rel-loading-region--financial-axes):not(.rel-loading-region--finance-kpi):not(.rel-loading-region--finance-sum-card) > :not(.rel-loading-skeleton):not(.rel-loading-static-message),
#page-relatorios .rel-loading-region:not(.rel-loading-region--table):not(.rel-loading-region--axes):not(.rel-loading-region--financial-axes):not(.rel-loading-region--finance-kpi):not(.rel-loading-region--finance-sum-card) > :not(.rel-loading-skeleton):not(.rel-loading-static-message) *,
#page-relatorios .rel-loading-region--table tbody,
#page-relatorios .rel-loading-region--table tbody * { visibility:hidden !important; }
#page-relatorios .rel-loading-region--table thead,
#page-relatorios .rel-loading-region--table thead * { visibility:visible !important; -webkit-text-fill-color:currentColor !important; }
#page-relatorios .rel-loading-skeleton,
#page-relatorios .rel-loading-skeleton * { color:initial; -webkit-text-fill-color:initial; visibility:visible !important; }
#page-relatorios .rel-loading-static-message,
#page-relatorios .rel-loading-static-message * { visibility:visible !important; opacity:1 !important; color:inherit !important; -webkit-text-fill-color:initial !important; }
#page-relatorios .rel-loading-skeleton > :not(.rel-loading-announcement) { opacity:.7; }
#page-relatorios .rel-loading-skeleton { position:absolute; inset:0; z-index:35; overflow:hidden; box-sizing:border-box; background:transparent !important; pointer-events:all; opacity:1; transition:opacity .12s ease; }
#page-relatorios .rel-loading-region--axes > .rel-loading-skeleton { left:2.875rem; bottom:2.875rem; }
#page-relatorios .rel-loading-skeleton.is-entering,
#page-relatorios .rel-loading-skeleton.is-leaving { opacity:0; }
#page-relatorios .rel-loading-empty-suppressed { visibility:hidden !important; }
#page-relatorios .rel-loading-announcement { position:absolute; width:0.0625rem; height:0.0625rem; padding:0; margin:-0.0625rem; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
#page-relatorios .rel-sk-text i, #page-relatorios .rel-sk-text b,
#page-relatorios .rel-sk-rows i, #page-relatorios .rel-sk-chart i,
#page-relatorios .rel-sk-funnel i, #page-relatorios .rel-sk-value i,
#page-relatorios .rel-sk-ticket-rows i,
#page-relatorios .rel-sk-finance-rank i,
#page-relatorios .rel-sk-finance-kpi i,
#page-relatorios .rel-sk-finance-sum i,
#page-relatorios .rel-sk-incident-rows i,
#page-relatorios .rel-sk-stacked div,
#page-relatorios .rel-sk-status div::before,
#page-relatorios .rel-sk-status div::after,
#page-relatorios .rel-sk-stacked-full div {
  background:repeating-linear-gradient(105deg,var(--rel-wash-info) 0,var(--rel-accent-tint) 3.75rem,var(--rel-wash-info-soft) 7.5rem,var(--rel-accent-tint-2) 11.25rem,var(--rel-wash-info) 15rem);
  background-size:15rem 100%;
  animation:relSkeletonBlue 1.25s linear infinite;
  will-change:background-position;
}
#page-relatorios .rel-sk-value { width:100%; height:100%; min-height:0.625rem; display:flex; align-items:center; box-sizing:border-box; padding:0.125rem 0; }
#page-relatorios .rel-sk-value i { display:block; width:min(82%,11.25rem); height:max(0.5rem,45%); min-height:0.5rem; max-height:1.375rem; border-radius:0.375rem; }
#page-relatorios .rel-loading-region--finance-kpi > .rel-loading-skeleton {
  left:0.125rem;
}
#page-relatorios .rel-sk-finance-kpi { width:100%; height:100%; display:flex; flex-direction:column; justify-content:flex-start; gap:0.625rem; box-sizing:border-box; padding-top:0.125rem; }
#page-relatorios .rel-sk-finance-kpi i { display:block; flex:0 0 auto; border-radius:var(--radius-card, 0.25rem); }
#page-relatorios .rel-sk-finance-kpi-value { width:70%; font-size:calc(1.375rem * var(--ff-type-scale, 1)); height:1em; }
#page-relatorios .rel-sk-finance-kpi-sub { width:54%; font-size:calc(0.6875rem * var(--ff-type-scale, 1)); height:1.35em; }
#page-relatorios .rel-sk-finance-sum {
  width:100%;
  height:100%;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
  gap:0.1875rem;
  box-sizing:border-box;
}
#page-relatorios .rel-sk-finance-sum i { display:block; flex:0 0 auto; border-radius:var(--radius-card, 0.25rem); }
#page-relatorios .rel-sk-finance-sum-value {
  width:5.4em;
  font-size:1.1875rem;
  height:1.1em;
}
#page-relatorios .rel-sk-finance-sum-value--nome {
  width:9.6em;
  font-size:1rem;
  height:1.25em;
}
#page-relatorios .rel-sk-finance-sum-sub {
  width:11.8em;
  max-width:92%;
  font-size:0.71875rem;
  height:1.35em;
}
#page-relatorios .relatorios-fd .visao .vkg-grid .rel-sk-value { justify-content:center; }
#page-relatorios .rel-sk-text { height:100%; display:flex; flex-direction:column; justify-content:center; gap:0.75rem; padding:0.875rem 1rem; box-sizing:border-box; }
#page-relatorios .rel-sk-text i, #page-relatorios .rel-sk-text b { display:block; height:0.625rem; border-radius:0.375rem; }
#page-relatorios .rel-sk-text i:first-child{width:62%} #page-relatorios .rel-sk-text b{width:36%;height:1.375rem} #page-relatorios .rel-sk-text i:last-child{width:78%}
#page-relatorios .rel-sk-rows { height:100%; display:grid; align-content:space-evenly; gap:0.5rem; padding:0.625rem 0.875rem; box-sizing:border-box; }
#page-relatorios .rel-sk-rows i { display:block; min-height:0.625rem; border-radius:0.375rem; }
#page-relatorios .rel-sk-rows i:nth-child(even){width:82%}
#page-relatorios .rel-sk-rows--symmetric i,
#page-relatorios .rel-sk-rows--symmetric i:nth-child(even){ width:100%; }
#page-relatorios .rel-sk-ticket-rows { width:100%; height:100%; display:grid; grid-auto-rows:minmax(0,1fr); padding:0; box-sizing:border-box; }
#page-relatorios .rel-sk-ticket-rows > div { min-height:0; display:flex; align-items:center; justify-content:center; padding:0 0.875rem; box-sizing:border-box; border-bottom:0.0625rem solid var(--line,#e8eaed); }
#page-relatorios .rel-sk-ticket-rows i { display:block; width:100%; height:1rem; border-radius:var(--radius-card,0.25rem); }
#page-relatorios .rel-sk-detail-rows > div:nth-child(even){ background:var(--rel-surface-sunken); }
#page-relatorios .rel-sk-ticket-data-rows > div:nth-child(even),
#page-relatorios .rel-sk-client-rows > div:nth-child(even){ background:var(--rel-surface-sunken); }
#page-relatorios .rel-loading-skeleton--ticket-rows > .rel-sk-ticket-data-rows,
#page-relatorios .rel-loading-skeleton--client-rows > .rel-sk-client-rows{ opacity:.56; }
#page-relatorios .rel-sk-finance-rank { width:100%; height:100%; display:grid; grid-template-rows:repeat(12,3.75rem); box-sizing:border-box; }
#page-relatorios .rel-sk-finance-rank > div { height:3.75rem; display:flex; align-items:center; justify-content:center; padding:0 0.875rem; border-bottom:0.0625rem solid var(--line,#e8eaed); box-sizing:border-box; }
#page-relatorios .rel-sk-finance-rank > div:last-child { border-bottom:0; }
#page-relatorios .rel-sk-finance-rank i { display:block; width:100%; height:0.75rem; border-radius:var(--radius-card,0.25rem); }
#page-relatorios .rel-sk-incident-rows { width:100%; height:100%; display:grid; grid-auto-rows:minmax(0,1fr); gap:0; padding:0.5rem 0.75rem; box-sizing:border-box; }
#page-relatorios .rel-sk-incident-rows i { display:block; align-self:center; width:100%; height:0.75rem; border-radius:var(--radius-card,0.25rem); }
#page-relatorios .rel-sk-chart { height:100%; display:flex; align-items:flex-end; justify-content:space-around; gap:5%; padding:12% 8% 10%; box-sizing:border-box; border-bottom:0.0625rem solid rgba(37,125,224,.15); }
#page-relatorios .rel-sk-chart i { display:block; width:10%; min-height:15%; border-radius:0.375rem 0.375rem 0.125rem 0.125rem; }
#page-relatorios .rel-sk-chart i:nth-child(1){height:30%} #page-relatorios .rel-sk-chart i:nth-child(2){height:57%} #page-relatorios .rel-sk-chart i:nth-child(3){height:43%} #page-relatorios .rel-sk-chart i:nth-child(4){height:76%} #page-relatorios .rel-sk-chart i:nth-child(5){height:61%}
#page-relatorios .rel-sk-stacked { height:100%; display:flex; align-items:flex-end; justify-content:space-around; gap:4%; padding:8% 5% 7%; box-sizing:border-box; border-bottom:0.0625rem solid rgba(37,125,224,.16); }
#page-relatorios .rel-sk-stacked div { width:9%; border-radius:0.3125rem 0.3125rem 0.125rem 0.125rem; box-shadow:inset 0 -1.125rem 0 rgba(39,117,218,.14),inset 0 -2.375rem 0 rgba(89,159,240,.16); }
html[data-theme="cinza"] #page-relatorios .rel-sk-stacked div{ box-shadow:inset 0 -1.125rem 0 rgba(var(--rel-shadow-rgb),0.14),inset 0 -2.375rem 0 rgba(var(--rel-shadow-rgb),0.16); }
#page-relatorios .rel-sk-stacked div:nth-child(1){height:42%} #page-relatorios .rel-sk-stacked div:nth-child(2){height:68%} #page-relatorios .rel-sk-stacked div:nth-child(3){height:54%} #page-relatorios .rel-sk-stacked div:nth-child(4){height:81%} #page-relatorios .rel-sk-stacked div:nth-child(5){height:61%} #page-relatorios .rel-sk-stacked div:nth-child(6){height:73%} #page-relatorios .rel-sk-stacked div:nth-child(7){height:48%}
#page-relatorios .rel-sk-stacked--department { padding:0 5% 0.125rem; border-bottom:0; }
#page-relatorios .rel-loading-skeleton--stacked-department > .rel-sk-stacked--department{ opacity:.56; }
#page-relatorios .rel-sk-stacked--department div:nth-child(1){height:52.7%} #page-relatorios .rel-sk-stacked--department div:nth-child(2){height:74.8%} #page-relatorios .rel-sk-stacked--department div:nth-child(3){height:62.9%} #page-relatorios .rel-sk-stacked--department div:nth-child(4){height:85%} #page-relatorios .rel-sk-stacked--department div:nth-child(5){height:68.9%} #page-relatorios .rel-sk-stacked--department div:nth-child(6){height:79.1%} #page-relatorios .rel-sk-stacked--department div:nth-child(7){height:57.8%}
#page-relatorios .rel-sk-status { width:100%; height:100%; min-height:7.5rem; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); align-items:center; padding:0.25rem 0; box-sizing:border-box; }
#page-relatorios .rel-sk-status div { height:7.25rem; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:0.5625rem; position:relative; }
#page-relatorios .rel-sk-status div::before { content:""; display:block; width:3rem; height:3rem; border-radius:50%; }
#page-relatorios .rel-sk-status div::after { content:""; display:block; width:64%; height:0.6875rem; border-radius:0.375rem; box-shadow:0 1.375rem 0 rgba(181,216,255,.72),0 2.625rem 0 rgba(232,243,255,.9); }
html[data-theme="cinza"] #page-relatorios .rel-sk-status div::after{ box-shadow:0 1.375rem 0 rgba(var(--rel-shadow-rgb),0.72),0 2.625rem 0 rgba(var(--rel-shadow-rgb),0.9); }
#page-relatorios .rel-sk-stacked-full { width:100%; height:100%; min-height:10rem; display:flex; align-items:flex-end; justify-content:center; gap:clamp(1.125rem,3vw,2.25rem); padding:0.75rem 4% 0.125rem; box-sizing:border-box; border-bottom:0.0625rem solid rgba(37,125,224,.18); }
#page-relatorios .rel-sk-stacked-full div { flex:1 1 0; width:auto; min-width:3.5rem; max-width:9.375rem; border-radius:0.5rem 0.5rem 0 0; }
#page-relatorios .rel-sk-stacked-full div:nth-child(1){height:92%} #page-relatorios .rel-sk-stacked-full div:nth-child(2){height:76%} #page-relatorios .rel-sk-stacked-full div:nth-child(3){height:61%} #page-relatorios .rel-sk-stacked-full div:nth-child(4){height:47%} #page-relatorios .rel-sk-stacked-full div:nth-child(5){height:34%}
#page-relatorios .rel-sk-timeline { height:100%; padding:8% 4% 5%; box-sizing:border-box; background:transparent !important; }
#page-relatorios .rel-sk-timeline svg { width:100%; height:100%; display:block; }
#page-relatorios .rel-sk-timeline path { fill:none; stroke:#8fc3ff; stroke-width:8.8; stroke-linecap:round; stroke-dasharray:70 28; animation:relSkeletonDash 1.3s linear infinite; }
html[data-theme="cinza"] #page-relatorios .rel-sk-timeline path{ stroke:var(--rel-accent-chart); }
#page-relatorios .rel-sk-timeline line { stroke:#cfe5ff; stroke-width:2; }
html[data-theme="cinza"] #page-relatorios .rel-sk-timeline line{ stroke:var(--rel-accent-chart); }
#page-relatorios .rel-sk-funnel { height:100%; display:grid; justify-items:center; align-content:center; gap:7%; }
#page-relatorios .rel-sk-funnel i { display:block; height:13%; border-radius:0.3125rem; }
#page-relatorios .rel-sk-funnel i:nth-child(1){width:86%} #page-relatorios .rel-sk-funnel i:nth-child(2){width:68%} #page-relatorios .rel-sk-funnel i:nth-child(3){width:50%} #page-relatorios .rel-sk-funnel i:nth-child(4){width:32%}
#page-relatorios #relSearchApplyBtn.is-loading { cursor:wait; opacity:.82; }
@keyframes relSkeletonBlue { from{background-position:15rem 0} to{background-position:0 0} }
@keyframes relSkeletonDash { to{stroke-dashoffset:-98} }
@media (prefers-reduced-motion:reduce){
  #page-relatorios .rel-loading-skeleton *{animation-duration:2.4s!important}
  #page-relatorios .rel-loading-skeleton,
  #page-relatorios .rel-loading-source-transition{transition-duration:.01ms!important}
}

/* ============================================================
   Faixa 1280–1440: a barra de filtros quebra em vez de cortar
   ============================================================
   .tk-filterbar era `flex-wrap: nowrap`. Abaixo de ~1440 as pilulas nao cabiam
   ao lado de Limpar/Pesquisar, e em vez de quebrar linha eram espremidas ate o
   texto ser cortado no meio da palavra ("Depa" no lugar de "Departamento"),
   com os botoes por cima.

   Deixando quebrar, o cartao ganha uma segunda linha e nenhuma pilula perde o
   rotulo. Os botoes seguem a direita da primeira linha (margin-left:auto). */
@media (max-width: 0px) /* ui-scale-freeze: was 1440px */ {
    #page-relatorios .relatorios-fd .tk-filterbar {
        flex-wrap: wrap;
        row-gap: var(--tk-fb-rhythm, 0.5rem);
    }
    #page-relatorios .relatorios-fd .flt-group {
        flex-wrap: wrap;
        row-gap: var(--tk-fb-rhythm, 0.5rem);
    }
}
/* Rede de seguranca: se ainda faltar espaco, o rotulo corta com reticencias em
   vez de sumir a seco no meio da palavra. */
#page-relatorios .relatorios-fd .flt-trig .flt-lbl {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Nublado — ultimos pigmentos claros da barra de filtros e dos avisos.
   Limpar: sobre cinza medio o rosa some e o vermelho medio nao passa AA,
   entao o botao vira superficie com tinta vermelha escura (4,8:1). */
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-clear-filters{
  background:var(--rel-surface);
  color:#6e1614;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-clear-filters:hover,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-clear-filters:focus-visible{
  background:rgba(151,35,31,.14);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-clear-filters:active{
  background:rgba(151,35,31,.22);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .acomp-period-tip{
  background:#f3e8c4;
  border:0.0625rem solid rgba(120, 92, 28, 0.42);
  box-shadow:none;
  color:#3a2c0c;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .acomp-period-tip-txt{
  color:#3a2c0c;
  font-weight:700;
  font-size:0.71875rem;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .perf-fill.warn{
  background:linear-gradient(180deg,#c08a3a,var(--rel-warn));
}


/* ============================================================
   Nublado — faixa de indicadores, painel de config e Pesquisar.
   As regras acima sao mescladas dark+cinza e carregam a laje azul
   pensada para fundo escuro; sobre cinza medio ela vira um bloco
   estranho. Override so do cinza — o Noite continua como esta.
   ============================================================ */
html[data-theme="cinza"] #page-relatorios .relatorios-fd .config-panel{
  background:linear-gradient(180deg,var(--rel-surface-raised),var(--rel-surface));
  border-color:var(--rel-line);
}
/* A faixa deixa de ser laje azul e vira lavagem de acento: quem carrega
   o contraste passa a ser a aba ativa, nao o painel. */
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-indic-panel.config-panel{
  background:rgba(10,61,128,.16);
  border:0.0625rem solid var(--rel-line);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .indic{
  background:rgba(20,24,29,.06);
  border-color:rgba(20,24,29,.16);
  color:var(--rel-ink);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .indic:not(.on):not([data-soon]):hover{
  background:rgba(20,24,29,.12);
  border-color:rgba(20,24,29,.28);
  color:var(--rel-ink);
  box-shadow:inset 0 0.0625rem rgba(255,255,255,.10), 0 0.25rem 0.75rem rgba(20,24,29,.18);
}
/* Aba ativa: chip claro sobre a lavagem — 7,2:1. */
html[data-theme="cinza"] #page-relatorios .relatorios-fd .indic.on,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .indic.on:not([data-soon]):hover{
  background:var(--rel-surface-raised);
  border-color:var(--rel-surface-raised);
  color:var(--rel-ink-strong);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .indic[data-soon]{
  color:var(--rel-ink-3);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .indic[data-soon]:hover{
  color:var(--rel-ink-3);
}
/* Pesquisar e a acao primaria da barra. Sobre cinza, texto azul sem caixa
   nao se destaca de nada — ganha preenchimento. */
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-search-apply{
  background:var(--rel-accent);
  color:#ffffff;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-search-apply:hover,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-search-apply:focus,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-search-apply:focus-visible{
  background:var(--rel-accent-strong);
  color:#ffffff;
}


/* ============================================================
   Polimento Nublado — micro-detalhes da barra de filtros.
   Azul fica em dois lugares so: preenchimento da acao primaria
   e anel de foco. Contorno e chip informativo vao para o cinza.
   ============================================================ */
/* Limpar e acao secundaria ao lado de um CTA preenchido: fica fantasma,
   com a tinta vermelha sinalizando a natureza e a borda so aparecendo
   na intencao. */
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-clear-filters{
  background:transparent;
  /* Vermelho a 38% sobre cinza dava 1,65:1 — some. Em repouso o contorno
     e neutro (3,16:1) e quem sinaliza a natureza destrutiva e a tinta. */
  border-color:var(--rel-line) !important;
  color:#6e1614;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-clear-filters:hover,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-clear-filters:focus-visible{
  background:rgba(151,35,31,.12);
  border-color:var(--rel-danger) !important;
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-clear-filters:active{
  background:rgba(151,35,31,.20);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .rel-clear-filters svg{
  color:#6e1614;
}
/* Chip de filtro ativo e informativo, nao acionavel: sai do azul. */
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chip{
  background:rgba(20,24,29,.07);
  border-color:var(--rel-line);
  color:var(--rel-ink-2);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chip b{
  color:var(--rel-ink);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chip .x{
  color:var(--rel-ink-3);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .chip .x:hover{
  background:rgba(20,24,29,.14);
  color:var(--rel-ink);
}
/* Divisor entre KPIs: era azul a 14%. */
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tk-stat{
  border-left-color:var(--rel-line);
}


/* ============================================================
   Nublado — controles segmentados, rodape e valores de KPI.
   Sub-aba, toggle e paginacao sao NAVEGACAO, nao acao primaria:
   o estado ativo passa a ser um degrau de superficie, como as
   abas de indicador ja fazem. Azul continua so no Pesquisar.
   ============================================================ */
html[data-theme="cinza"] #page-relatorios .relatorios-fd .subtab.on{
  background:var(--rel-surface-raised);
  color:var(--rel-ink-strong);
  border-color:var(--rel-line);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .subtab.on .ti{
  color:var(--rel-ink-strong);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .subtab.on .tw{
  background:rgba(20,24,29,.14);
  color:var(--rel-ink);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .seg button.on{
  color:var(--rel-ink-strong);
}
/* Rodape da lista acompanha a faixa do cabecalho. */
html[data-theme="cinza"] #page-relatorios .relatorios-fd .list-pagination-bar{
  background:var(--tk-thead-grad);
  border-color:var(--rel-line);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .list-pagination-info{
  color:#ffffff;
}

/* ============================================================
   Nublado — sub-abas inativas, faixa de KPI e valor em destaque.
   Sub-aba INATIVA vinha de color-mix(--blue 40%, branco): sobre
   cinza isso continua azul. Inativo tem de ser o repouso.
   ============================================================ */
html[data-theme="cinza"] #page-relatorios .relatorios-fd #depSubnav .subtab:not(.on),
html[data-theme="cinza"] #page-relatorios .relatorios-fd #finSubnav .subtab:not(.on){
  background:rgba(20,24,29,.06);
  color:var(--rel-ink-2);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd #depSubnav .subtab:not(.on) .ti,
html[data-theme="cinza"] #page-relatorios .relatorios-fd #finSubnav .subtab:not(.on) .ti{
  color:var(--rel-ink-3);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd #depSubnav .subtab:not(.on):hover,
html[data-theme="cinza"] #page-relatorios .relatorios-fd #finSubnav .subtab:not(.on):hover{
  background:rgba(20,24,29,.12);
  color:var(--rel-ink);
}
/* Faixa de KPI da lista: fundo claro + tipografia azul-marinho. */
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tk-stats,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tk-stats.clientes-stats{
  background:#c5ced8;
  border-color:rgba(var(--rel-cloud-navy-rgb), 0.28);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tk-stats .sl{
  color:var(--rel-cloud-navy, #173b57);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tk-stats .sv,
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tk-stat.hero .sv{
  color:var(--rel-cloud-navy-deep, #0b2234);
}
html[data-theme="cinza"] #page-relatorios .relatorios-fd .tk-stats .tk-stat{
  border-left-color:rgba(var(--rel-cloud-navy-rgb), 0.22);
}

/* Autoridade final do Dia: mistura radial uniforme e ativo sem traço inferior. */
html:not([data-theme="dark"]):not([data-theme="cinza"]) #page-relatorios .relatorios-fd :is(#depSubnav,#finSubnav) .subtab,
html:not([data-theme="dark"]):not([data-theme="cinza"]) #page-relatorios .relatorios-fd :is(#depSubnav,#finSubnav) .subtab:not(.on){
  background:
    radial-gradient(circle at 16% 24%,rgba(255,255,255,.42) 0,rgba(255,255,255,.14) 25%,transparent 48%),
    radial-gradient(circle at 72% 76%,rgba(12,91,194,.30) 0,transparent 48%),
    radial-gradient(circle at 92% 12%,rgba(137,204,255,.42) 0,transparent 38%),
    #4b95e8;
  border-color:rgba(24,105,198,.30);
  color:#fff;
  box-shadow:inset 0 0.0625rem rgba(255,255,255,.30),inset 0 0 1.125rem rgba(255,255,255,.08);
  text-shadow:0 0.0625rem rgba(9,54,108,.42);
}
html:not([data-theme="dark"]):not([data-theme="cinza"]) #page-relatorios .relatorios-fd :is(#depSubnav,#finSubnav) .subtab.on,
html:not([data-theme="dark"]):not([data-theme="cinza"]) #page-relatorios .relatorios-fd :is(#depSubnav,#finSubnav) .subtab.on:hover{
  background:
    radial-gradient(circle at 18% 22%,rgba(255,255,255,.48) 0,rgba(255,255,255,.14) 27%,transparent 49%),
    radial-gradient(circle at 68% 78%,rgba(0,63,148,.38) 0,transparent 52%),
    radial-gradient(circle at 88% 18%,rgba(123,201,255,.48) 0,transparent 40%),
    #267bd8;
  border-color:rgba(9,78,163,.48);
  color:#fff;
  box-shadow:inset 0 0.0625rem rgba(255,255,255,.34),inset 0 0 1.25rem rgba(255,255,255,.08);
}
