/* Dashboard — centro de comando com mapa do Brasil (nov/2026). */
#view-dashboard{--dash-ok:#1D9E75;--dash-atencao:#EF9F27;--dash-vencido:#E24B4A;--dash-fechado:#888780;}
.dash-filtros{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;margin-bottom:10px;}
.dash-filtros label{display:flex;flex-direction:column;gap:3px;font-size:.72rem;color:var(--color-text-muted);}
.dash-filtros select,.dash-datas input{height:34px;padding:0 30px 0 var(--space-3);border:1px solid var(--color-border);border-radius:var(--radius-md);background-color:var(--color-surface);color:var(--color-text);font-size:.82rem;min-width:120px;}
.dash-datas{display:flex;align-items:center;gap:6px;font-size:.8rem;color:var(--color-text-muted);}
.dash-datas[hidden]{display:none;}
.dash-cats{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:12px;}
.dash-cats-rotulo{font-size:.75rem;color:var(--color-text-muted);margin-right:2px;}
.dash-cat{display:inline-flex;align-items:center;gap:6px;height:28px;padding:0 12px;border-radius:999px;border:1px solid var(--color-border);background:var(--color-surface);color:var(--color-text-muted);font-size:.78rem;cursor:pointer;}
.dash-cat i{width:8px;height:8px;border-radius:50%;background:var(--c);}
.dash-cat.ativo{border-color:var(--c);color:var(--color-text);background:color-mix(in srgb,var(--c) 14%,transparent);font-weight:600;}
.dash-cat-limpar{border-style:dashed;}
.dash-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin-bottom:12px;}
.dash-kpi{background:var(--color-surface);border:1px solid var(--color-divider);border-radius:var(--radius-md);padding:10px 14px;}
.dash-kpi b{display:block;font-size:1.5rem;font-weight:600;line-height:1.2;}
.dash-kpi span{font-size:.75rem;color:var(--color-text-muted);}
.dash-kpi-alerta b{color:var(--dash-vencido);}
.dash-kpi-botao{cursor:pointer;}
.dash-kpi-botao:hover{border-color:var(--color-border);}
.dash-kpi-botao.ativo{border-color:var(--color-primary);background:var(--color-primary-highlight);}
.dash-corpo{display:grid;grid-template-columns:minmax(260px,330px) minmax(0,1fr) 230px;border:1px solid var(--color-divider);border-radius:var(--radius-lg);overflow:hidden;background:var(--color-surface);min-height:560px;}
.dash-lista{display:flex;flex-direction:column;border-right:1px solid var(--color-divider);min-height:0;}
.dash-lista-cab{padding:10px 12px;border-bottom:1px solid var(--color-divider);}
.dash-caminho{display:flex;align-items:center;gap:2px;flex-wrap:wrap;font-size:.85rem;color:var(--color-text-faint);}
.dash-parte{background:none;border:none;padding:2px 4px;border-radius:4px;color:var(--color-primary);cursor:pointer;font:inherit;}
.dash-parte.atual{color:var(--color-text);font-weight:600;cursor:default;}
.dash-lista-info{font-size:.75rem;color:var(--color-text-muted);margin-top:4px;}
.dash-link{background:none;border:none;padding:0;color:var(--color-primary);text-decoration:underline;cursor:pointer;font:inherit;}
.dash-lista-itens{overflow:auto;max-height:640px;}
.dash-item{padding:9px 12px;border-bottom:1px solid var(--color-divider);cursor:pointer;}
.dash-item:hover,.dash-item:focus-visible,.dash-item.destaque{background:var(--color-surface-offset);}
.dash-item-topo,.dash-item-rodape{display:flex;justify-content:space-between;gap:8px;font-size:.72rem;color:var(--color-text-muted);}
.dash-item-rodape>span:first-child{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.dash-item-titulo{font-size:.85rem;font-weight:600;margin:2px 0;}
.dash-ponto{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:5px;}
.dash-sla-ok{color:var(--dash-ok);}.dash-sla-atencao{color:var(--dash-atencao);}.dash-sla-vencido{color:var(--dash-vencido);font-weight:600;}
.dash-reinc{font-size:.8em;}
.dash-mais{margin:8px 12px;}
.dash-vazio{padding:24px 12px;font-size:.85rem;color:var(--color-text-muted);}
.dash-mapa-wrap{position:relative;min-width:0;display:flex;flex-direction:column;}
.dash-mapa-barra{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:8px 10px;border-bottom:1px solid var(--color-divider);}
.dash-metrica{margin:0;}
.dash-camada{display:flex;align-items:center;gap:6px;font-size:.8rem;color:var(--color-text-muted);cursor:pointer;}
#dashTv{margin-left:auto;}
.dash-mapa{flex:1;min-height:440px;position:relative;}
.dash-carregando{display:flex;align-items:center;justify-content:center;height:100%;min-height:440px;color:var(--color-text-muted);font-size:.85rem;}
.dash-svg{display:block;width:100%;height:100%;min-height:440px;max-height:640px;}
.dash-uf{fill:color-mix(in srgb,var(--color-primary) var(--int,0%),var(--color-surface-2));stroke:var(--color-border);stroke-width:1;vector-effect:non-scaling-stroke;cursor:pointer;transition:fill .2s;}
.dash-ligacao{stroke:var(--color-text-muted);stroke-width:1;vector-effect:non-scaling-stroke;}
.dash-uf:hover{fill:color-mix(in srgb,var(--color-primary) calc(var(--int,0%) + 12%),var(--color-surface-2));}
.dash-uf.ativo{fill:var(--color-surface-2);stroke:var(--color-text-muted);}
.dash-uf.apagado{fill:var(--color-surface-offset);opacity:.55;}
.dash-bolha-uf,.dash-bolha{cursor:pointer;}
.dash-bolha-uf circle,.dash-bolha circle{stroke:var(--color-surface);stroke-width:1.5;vector-effect:non-scaling-stroke;opacity:.9;}
.dash-bolha-uf text,.dash-bolha text{fill:#fff;text-anchor:middle;font-weight:600;pointer-events:none;}
.dash-bolha .dash-bolha-nome{fill:var(--color-text-muted);font-weight:400;}
.dash-bolha.apagada{opacity:.35;}
.dash-bolha.destaque circle{stroke:var(--color-text);stroke-width:2.5;opacity:1;}
circle.sla-ok{fill:var(--dash-ok);}circle.sla-atencao{fill:var(--dash-atencao);}circle.sla-vencido{fill:var(--dash-vencido);}circle.sla-fechado{fill:var(--dash-fechado);}
.dash-loja-ponto{fill:var(--color-text-faint);opacity:.55;pointer-events:none;}
.dash-legenda{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:6px 10px 10px;font-size:.72rem;color:var(--color-text-muted);}
.dash-legenda i{display:inline-block;width:9px;height:9px;border-radius:50%;margin-right:4px;vertical-align:-1px;}
.dash-legenda i.sla-ok{background:var(--dash-ok);}.dash-legenda i.sla-atencao{background:var(--dash-atencao);}.dash-legenda i.sla-vencido{background:var(--dash-vencido);}.dash-legenda i.sla-fechado{background:var(--dash-fechado);}
.dash-legenda i.dash-leg-loja{background:var(--color-text-faint);width:6px;height:6px;}
.dash-legenda-dica{margin-left:auto;}
.dash-popover{position:absolute;z-index:5;width:220px;max-height:280px;overflow:auto;background:var(--color-surface);border:1px solid var(--color-border);border-radius:var(--radius-md);box-shadow:var(--shadow-md);padding:6px;}
.dash-popover[hidden]{display:none;}
.dash-pop-cab{display:flex;justify-content:space-between;align-items:center;padding:2px 4px 6px;font-size:.82rem;}
.dash-pop-fechar{width:24px;height:24px;padding:0;border:none;background:none;color:var(--color-text-muted);cursor:pointer;}
.dash-pop-loja{display:flex;justify-content:space-between;gap:8px;width:100%;padding:6px 6px;border:none;border-radius:6px;background:none;font-size:.8rem;color:var(--color-text);cursor:pointer;text-align:left;}
.dash-pop-loja:hover,.dash-pop-loja.ativo{background:var(--color-surface-offset);}
.dash-lateral{border-left:1px solid var(--color-divider);padding:12px;overflow:auto;max-height:720px;}
.dash-lateral h4{margin:14px 0 8px;font-size:.78rem;font-weight:600;color:var(--color-text-muted);}
.dash-lateral h4:first-child{margin-top:0;}
.dash-barra,.dash-rank{display:block;width:100%;padding:4px 0;border:none;background:none;text-align:left;cursor:pointer;color:var(--color-text);font-size:.8rem;}
.dash-barra:disabled{cursor:default;}
.dash-barra-rot,.dash-rank{display:flex;justify-content:space-between;gap:8px;}
.dash-barra-trilho{display:block;height:6px;border-radius:3px;background:var(--color-surface-offset);margin-top:3px;overflow:hidden;}
.dash-barra-trilho i{display:block;height:100%;border-radius:3px;}
.dash-rank:hover span{color:var(--color-primary);}
.dash-origens{display:flex;flex-direction:column;gap:4px;font-size:.8rem;}
.dash-origens span{display:flex;justify-content:space-between;}
.dash-vazio-p{font-size:.78rem;color:var(--color-text-faint);margin:0;}
/* Modo TV: ocupa a tela inteira (com ou sem a API de tela cheia do navegador). */
#view-dashboard.dash-tv{position:fixed;inset:0;z-index:1000;overflow:auto;padding:16px 20px;background:var(--color-bg);}
#view-dashboard.dash-tv .dash-filtros,#view-dashboard.dash-tv .dash-cats{display:none;}
#view-dashboard.dash-tv .dash-corpo{min-height:calc(100vh - 140px);}
#view-dashboard.dash-tv .dash-svg{max-height:none;}
@media (max-width:1180px){
  .dash-corpo{grid-template-columns:minmax(240px,300px) minmax(0,1fr);}
  .dash-lateral{grid-column:1/-1;border-left:none;border-top:1px solid var(--color-divider);column-count:3;column-gap:24px;max-height:none;}
  .dash-lateral>*{break-inside:avoid;}
  .dash-lateral h4{break-after:avoid;}
}
@media (max-width:860px){
  .dash-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}
  .dash-corpo{grid-template-columns:1fr;}
  .dash-lista{border-right:none;border-bottom:1px solid var(--color-divider);order:2;}
  .dash-mapa-wrap{order:1;}
  .dash-lateral{order:3;column-count:1;}
  .dash-lista-itens{max-height:420px;}
}
