/* Visão Geral completa: ajustes fora do Card 1 aprovado.
   Nenhum seletor abaixo altera .overview-performance-card ou seus descendentes. */

/* Estados honestos: ausência de fonte não vira linha, barra ou tendência artificial. */
#kpis .overview-kpi-unavailable{
  background:linear-gradient(180deg,#081720,#06131b);
}
#kpis .overview-kpi-unavailable .kpi-icon{
  color:#71858e;
  background:rgba(113,133,142,.08);
}
#kpis .overview-kpi-unavailable .kpi-value{
  color:#c6d1d5;
  font-size:20px;
}
#kpis .overview-kpi-unavailable .kpi-delta b,
#kpis .kpi[data-overview-slot="portfolio"] .kpi-delta.neutral b,
#kpis .kpi[data-overview-slot="positivity"] .kpi-delta.neutral b{
  color:#8799a2;
}
#kpis svg.spark[data-state="sem-serie"]{
  opacity:.42;
}
#kpis svg.spark[data-state="sem-serie"]:after{content:""}

/* Cabeçalho e período: mantém geometria aprovada e dá espaço ao intervalo completo. */
.topbar .control.period{
  overflow:hidden;
}
#topPeriod{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.period-main{
  line-height:1.35;
}
.control:focus-visible,.filter-btn:focus-visible,.side-collapse:focus-visible,.viewall:focus-visible{
  outline:2px solid rgba(25,208,212,.7);
  outline-offset:2px;
}

/* Card 2: anatomia da referência preservada mesmo em sem_dado. */
.row1 > .panel:not(.overview-performance-card).overview-sem-dado .attendance-body{
  background:linear-gradient(180deg,rgba(7,22,31,.16),rgba(7,22,31,.04));
}
.row1 > .panel:not(.overview-performance-card).overview-sem-dado .stat-card{
  background:#091821;
}
.row1 > .panel:not(.overview-performance-card).overview-sem-dado .stat-card strong{
  color:#d3dde1;
}
.row1 > .panel:not(.overview-performance-card).overview-sem-dado .stat-card b{
  color:#748891;
}
.row1 > .panel:not(.overview-performance-card) .att-empty-title{
  fill:#c9d5da;
  font-weight:650;
}
.row1 > .panel:not(.overview-performance-card) .att-empty-copy{
  fill:#758891;
}

/* Card 3: melhora leitura sem transformar snapshot em série histórica. */
.row2 > .panel:first-child .portfolio-legend{
  min-width:0;
}
.row2 > .panel:first-child .legend-name{
  line-height:1.22;
}
.row2 > .panel:first-child .overview-unavailable-legend{
  opacity:.58;
  cursor:default;
}
.row2 > .panel:first-child .overview-unavailable-legend .legend-dot{
  background:transparent!important;
  border:1px solid #657a84;
}
.row2 > .panel:first-child.overview-history-unavailable .area-empty-line{
  stroke:#5d737c;
  stroke-dasharray:3 5;
  opacity:.55;
}
.row2 > .panel:first-child.overview-history-unavailable .area-empty-title{
  fill:#c9d5da;
  font-weight:650;
}
.row2 > .panel:first-child.overview-history-unavailable .area-empty-copy{
  fill:#71858e;
}
.row2 > .panel:first-child.overview-history-unavailable .area-stat b{
  color:#8da0a8;
}

/* Card 4: nomes ganham mais espaço; percentuais e scores seguem dados reais. */
.row2 > .panel:last-child .team-body{
  grid-template-columns:minmax(0,1fr) 74px 50px;
}
.row2 > .panel:last-child .team-row{
  grid-template-columns:22px 142px minmax(70px,1fr);
}
.row2 > .panel:last-child .team-row .name{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.row2 > .panel:last-child .score.empty{
  border-color:#526771;
  color:#81939b;
  background:rgba(82,103,113,.08);
}
.row2 > .panel:last-child.overview-sem-dado .team-body:after{
  content:"Ranking da equipe indisponível";
  position:absolute;
  inset:32px 0 0;
  display:grid;
  place-items:center;
  color:#71858e;
  font-size:10px;
  pointer-events:none;
}

/* Leitura rápida: quatro blocos fixos, conteúdo sempre derivado do DOM real. */
.quick-body{
  min-width:0;
}
.quick-item{
  min-width:0;
}
.quick-item > div:last-child{
  min-width:0;
}
.quick-item strong{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.quick-item p{
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}

/* Alertas: uma fonte real ocupa a altura inteira; não criamos uma segunda linha falsa. */
.alerts.overview-single-alert .alert-body{
  grid-template-rows:1fr;
}
.alerts.overview-single-alert .alert-row{
  border-bottom:0;
}
.alerts.overview-no-alerts .alert-body{
  display:block;
}
.alerts.overview-no-alerts .alert-body > .api-empty{
  position:absolute;
  inset:0;
  display:grid;
  place-items:center;
  background:transparent;
}

/* Controles individuais sem alternativa de backend continuam visíveis e explicáveis. */
.select-mini.analytics-disabled-control{
  opacity:.72;
  cursor:not-allowed;
}
.analytics-control-reason{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

@media (max-width:900px), (max-height:520px){
  .analytics-filter-popover,.analytics-records-dialog{max-width:calc(100vw - 24px)}
}

@media (prefers-reduced-motion:reduce){
  .row1 > .panel:not(.overview-performance-card) *,
  .row2 > .panel *,
  .bottom *{
    animation-duration:.001ms!important;
    animation-delay:0ms!important;
    transition-duration:.001ms!important;
  }
}
