/* Profinance Hub V54.38 — correções isoladas do Modo TV
   Escopo intencional: somente html.tv-mode. Não altera o Monitor Work normal. */
html.tv-mode .op-inline-icon,
html.tv-mode .op-tool-mini i,
html.tv-mode .tv-team-tool-row>i,
html.tv-mode .live-app-icon,
html.tv-mode .movement-event-icon{
  overflow:hidden!important;
  position:relative!important;
  isolation:isolate!important;
}
html.tv-mode .op-inline-icon .wow-tool-icon{width:17px!important;height:17px!important;min-width:17px!important;min-height:17px!important;max-width:17px!important;max-height:17px!important}
html.tv-mode .op-tool-mini i .wow-tool-icon{width:17px!important;height:17px!important;min-width:17px!important;min-height:17px!important;max-width:17px!important;max-height:17px!important}
html.tv-mode .tv-team-tool-row>i .wow-tool-icon{width:15px!important;height:15px!important;min-width:15px!important;min-height:15px!important;max-width:15px!important;max-height:15px!important}
html.tv-mode .live-app-icon .wow-tool-icon{width:20px!important;height:20px!important;min-width:20px!important;min-height:20px!important;max-width:20px!important;max-height:20px!important}
html.tv-mode .movement-event-icon .wow-tool-icon{width:18px!important;height:18px!important;min-width:18px!important;min-height:18px!important;max-width:18px!important;max-height:18px!important}
html.tv-mode .wow-tool-icon{
  display:grid!important;
  place-items:center!important;
  position:relative!important;
  overflow:hidden!important;
  flex:0 0 auto!important;
  border-radius:5px!important;
  background:#291244!important;
  contain:layout paint!important;
}
html.tv-mode .wow-tool-icon img{
  position:static!important;
  inset:auto!important;
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
  object-position:center!important;
  transform:none!important;
  margin:0!important;
  z-index:1!important;
}
html.tv-mode .wow-tool-icon>i{
  position:absolute!important;
  inset:0!important;
  display:grid!important;
  place-items:center!important;
  font:900 8px/1 Arial,sans-serif!important;
  color:#fff!important;
  z-index:0!important;
}
html.tv-mode .op-inline-icon img,
html.tv-mode .op-tool-mini i img,
html.tv-mode .tv-team-tool-row>i img,
html.tv-mode .live-app-icon img,
html.tv-mode .movement-event-icon img{
  max-width:100%!important;
  max-height:100%!important;
  object-fit:contain!important;
}
html.tv-mode .op-inline-icon{width:17px!important;height:17px!important;flex:0 0 17px!important}
html.tv-mode .op-tool-mini i{width:19px!important;height:19px!important;flex:0 0 19px!important}
html.tv-mode .tv-team-tool-row>i{width:16px!important;height:16px!important;min-width:16px!important;max-width:16px!important}

/* Clima: restaura composição compacta, alinhada e sem recortes. */
html.tv-mode .weather-panel{
  display:grid!important;
  grid-template-columns:92px minmax(0,1fr)!important;
  grid-template-rows:minmax(0,1fr)!important;
  align-items:center!important;
  gap:10px!important;
  min-width:0!important;
  width:100%!important;
  height:100%!important;
  overflow:visible!important;
}
html.tv-mode .weather-art{width:88px!important;height:88px!important;min-width:88px!important;min-height:88px!important;max-width:88px!important;max-height:88px!important;align-self:center!important;justify-self:center!important;overflow:visible!important}
html.tv-mode .weather-info{display:grid!important;grid-template-rows:auto auto auto!important;align-content:center!important;gap:3px!important;width:100%!important;min-width:0!important;max-width:100%!important;overflow:visible!important}
html.tv-mode .weather-location{display:grid!important;grid-template-columns:minmax(0,1fr) 28px 28px auto!important;gap:4px!important;align-items:center!important;width:100%!important;min-width:0!important;margin:0!important;overflow:visible!important}
html.tv-mode .weather-picker{min-width:0!important;width:100%!important;max-width:none!important}
html.tv-mode .weather-picker-btn{width:100%!important;min-width:0!important;height:28px!important;padding:0 8px!important;font-size:8px!important;overflow:hidden!important}
html.tv-mode .weather-location>button{width:auto!important;min-width:28px!important;height:28px!important;min-height:28px!important;padding:0 7px!important;font-size:8px!important;white-space:nowrap!important}
html.tv-mode .weather-main{display:grid!important;grid-template-columns:auto minmax(0,1fr)!important;align-items:center!important;gap:8px!important;min-width:0!important;margin:1px 0!important}
html.tv-mode .weather-main>strong{font-size:34px!important;line-height:.95!important;white-space:nowrap!important}
html.tv-mode .weather-main>div{min-width:0!important;overflow:hidden!important}
html.tv-mode .weather-main b{display:block!important;font-size:10.5px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html.tv-mode .weather-main span{display:block!important;font-size:8px!important;line-height:1.2!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html.tv-mode .weather-forecast-wrap{display:grid!important;grid-template-columns:22px minmax(0,1fr) 22px!important;align-items:center!important;gap:3px!important;width:100%!important;min-width:0!important;margin-top:2px!important;overflow:visible!important}
html.tv-mode .weather-forecast{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:4px!important;width:100%!important;min-width:0!important;max-width:100%!important;overflow:hidden!important;padding:0!important}
html.tv-mode .weather-hour{display:grid!important;grid-template-rows:auto 15px auto!important;place-items:center!important;min-width:0!important;width:auto!important;height:43px!important;min-height:43px!important;padding:3px 2px!important;overflow:hidden!important}
html.tv-mode .weather-hour span{font-size:6.6px!important;line-height:1!important;white-space:nowrap!important}
html.tv-mode .weather-hour i{font-size:13px!important;line-height:15px!important;margin:0!important}
html.tv-mode .weather-hour b{font-size:8px!important;line-height:1!important;white-space:nowrap!important}
html.tv-mode .weather-nav{width:22px!important;min-width:22px!important;height:34px!important;padding:0!important;display:grid!important;place-items:center!important}
html.tv-mode .weather-details{z-index:5000!important;max-width:min(520px,calc(100vw - 32px))!important}

/* Card de mapa: compacto, clima pequeno e nunca extrapola. */
html.tv-mode .mw-map-marker-wrap{max-width:258px!important}
html.tv-mode .mw-map-label{width:244px!important;max-width:244px!important;min-height:58px!important;overflow:hidden!important}
html.tv-mode .map-card-head{display:grid!important;grid-template-columns:38px minmax(0,1fr) auto!important;align-items:center!important;gap:7px!important;min-width:0!important}
html.tv-mode .mw-map-photo{width:38px!important;height:38px!important;min-width:38px!important;min-height:38px!important}
html.tv-mode .mw-map-label-copy{min-width:0!important;overflow:hidden!important}
html.tv-mode .mw-map-label-copy b{font-size:10px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html.tv-mode .mw-map-location{font-size:7px!important;line-height:1.2!important;display:block!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html.tv-mode .map-weather-icon{position:relative!important;inset:auto!important;display:flex!important;align-items:center!important;gap:3px!important;min-width:42px!important;max-width:58px!important;height:24px!important;padding:2px 4px!important;overflow:hidden!important;white-space:nowrap!important}
html.tv-mode .map-weather-icon .mwi-icon{font-size:11px!important;line-height:1!important;flex:0 0 auto!important}
html.tv-mode .map-weather-icon .mwi-temp{font-size:8px!important;line-height:1!important;flex:0 0 auto!important}
html.tv-mode .map-weather-icon .mwi-label{display:none!important}

/* Produtividade: logos sempre contidos e distribuição legível. */
html.tv-mode .tv-team-tool-distribution{overflow:hidden!important}
html.tv-mode .tv-team-tool-row{display:grid!important;grid-template-columns:16px 58px minmax(0,1fr) 30px!important;gap:5px!important;align-items:center!important;min-height:19px!important;overflow:hidden!important}
html.tv-mode .tv-team-tool-row>span{white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
html.tv-mode .tv-team-tool-row>em{overflow:hidden!important}
html.tv-mode .tv-prod-tools-card{overflow:hidden!important}
html.tv-mode .tv-productivity-panel img{max-width:100%!important;max-height:100%!important;object-fit:contain!important}

/* Elimina qualquer scroll interno desnecessário nos cards de operador. */
html.tv-mode .operator-scroller,
html.tv-mode .op-card,
html.tv-mode .operator-stage{overflow:hidden!important;scrollbar-width:none!important}
html.tv-mode .operator-scroller::-webkit-scrollbar,
html.tv-mode .op-card::-webkit-scrollbar{display:none!important}

@media(max-height:820px) and (min-width:1001px){
  html.tv-mode .weather-panel{grid-template-columns:78px minmax(0,1fr)!important;gap:7px!important}
  html.tv-mode .weather-art{width:74px!important;height:74px!important;min-width:74px!important;min-height:74px!important}
  html.tv-mode .weather-main>strong{font-size:29px!important}
  html.tv-mode .weather-hour{height:36px!important;min-height:36px!important;grid-template-rows:auto 12px auto!important}
  html.tv-mode .weather-hour i{font-size:11px!important;line-height:12px!important}
  html.tv-mode .weather-hour span{font-size:5.9px!important}
  html.tv-mode .weather-hour b{font-size:7.2px!important}
}

/* V54.38 final guard: carregada por último, somente TV. */
html.tv-mode .clock-zone{overflow:hidden!important}
html.tv-mode .weather-info{overflow:visible!important}
html.tv-mode .weather-forecast-wrap{overflow:hidden!important}
html.tv-mode .weather-forecast{overflow:hidden!important}
html.tv-mode .weather-hour{overflow:hidden!important}
html.tv-mode .operator-scroller,html.tv-mode .op-card{overflow:hidden!important}
html.tv-mode .tv-productivity-panel{overflow:hidden!important}
html.tv-mode .map-section{overflow:hidden!important}
html.tv-mode .mw-map-label{box-sizing:border-box!important}
