/* Visualização TV da LWART (estilo da TV do Porto): tudo sob .ltv, para não vazar para o resto do sistema. */
.ltv { --ltv-az: #2563eb; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; padding: 12px 20px 0; color: #18354f; }
.ltv button { font: inherit; cursor: pointer; }
.ltv-barra { flex: 0 0 auto; padding-bottom: 12px; }
.ltv-atividades { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.ltv-atividades button, .ltv-etapas button { font-weight: 600; border: 1px solid #d5dfeb; border-radius: 10px; background: #fff; color: #4d6079; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); transition: background .15s, border-color .15s; }
.ltv-atividades button { font-size: 14px; padding: 8px 12px; }
.ltv-atividades button:hover:not(.ativo) { background: #f3f7fc; border-color: #b9c9de; }
.ltv-atividades button.ativo { background: linear-gradient(180deg, #2f6fee, #2563eb); border-color: #1f55c9; color: #fff; box-shadow: 0 3px 11px rgba(37, 99, 235, .35); }
.ltv-erro { flex: 0 0 auto; padding: 10px 14px; margin-bottom: 10px; border: 1px solid #dca94d; background: #fff6df; color: #734a0c; border-radius: 8px; }
.ltv-painel { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(190px, 18vw, 300px); gap: 14px; }
.ltv-mapa { min-height: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid #d5dfeb; border-radius: 14px; box-shadow: 0 1px 3px rgba(16, 24, 40, .06); overflow: hidden; }
.ltv-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 16px 0; }
.ltv-titulo { display: flex; align-items: baseline; flex-wrap: wrap; gap: 2px 12px; min-width: 0; }
.ltv-titulo h1 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.015em; color: #13263f; }
.ltv-titulo p { margin: 0; font-size: 12.5px; color: #5f7087; }
.ltv-linha-etapa { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; max-width: 100%; }
.ltv-linha-etapa > span { font: 500 10px 'IBM Plex Mono', monospace; letter-spacing: .12em; text-transform: uppercase; color: #748194; }
.ltv-etapas { display: flex; flex-wrap: wrap; gap: 2px; padding: 3px; background: #eaf0f7; border: 1px solid #dbe3ed; border-radius: 11px; }
.ltv-etapas button { border: 0; border-radius: 8px; background: transparent; box-shadow: none; font-size: 12.5px; padding: 6px 12px; min-height: 30px; color: #52657d; }
.ltv-etapas button:hover:not(.ativo) { background: rgba(255, 255, 255, .65); }
.ltv-etapas button.ativo { background: #fff; color: #1d4fc4; box-shadow: 0 1px 3px rgba(16, 24, 40, .2); }
.ltv-mapa svg { flex: 1 1 0; min-height: 200px; width: calc(100% - 24px); margin: 8px 12px 0; background: #f8fbfd; border: 1px solid #dbe3ed; border-radius: 10px; }
.ltv-mapa .block-axes line { stroke: #c8d7e5; stroke-width: 1; }
.ltv-mapa .block-axes text { fill: #4e6a82; font: 600 16px 'IBM Plex Sans', sans-serif; }
.ltv-mapa .tv-part { stroke: #fff; stroke-width: 1.2; }
.ltv-mapa .part-label { font: 600 11px 'IBM Plex Sans', sans-serif; fill: #27445e; paint-order: stroke; stroke: #f8fbfd; stroke-width: 3px; stroke-linejoin: round; }
.ltv-mapa .sector-grid { fill: none; stroke: #52728c; stroke-width: 2; stroke-dasharray: 9 7; opacity: .55; }
.ltv-mapa .sector-label { fill: #27445e; font: 700 27px 'IBM Plex Sans', sans-serif; paint-order: stroke; stroke: #fff; stroke-width: 7px; stroke-linejoin: round; }
.ltv-legenda { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 16px 10px; font-size: 12px; }
.ltv-legenda span { display: flex; align-items: center; gap: 6px; padding: 3px 11px 3px 9px; border-radius: 99px; background: #f3f6fa; border: 1px solid #e1e8f0; color: #3f526b; }
.ltv-legenda i { width: 10px; height: 10px; border-radius: 3px; display: block; }
.ltv aside { min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow: auto; }
.ltv-metric { position: relative; overflow: hidden; padding: 10px 12px 9px 17px; background: #fff; border: 1px solid #d5dfeb; border-radius: 12px; box-shadow: 0 1px 3px rgba(16, 24, 40, .06); }
.ltv-metric::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: #7a99c9; }
.ltv-metric.destaque::before { background: #2563eb; } .ltv-metric.feito::before { background: #25a66b; } .ltv-metric.andamento::before { background: #287cde; }
.ltv-metric > span { display: block; font-size: 12px; font-weight: 500; color: #4d5f77; }
.ltv-metric strong { display: block; margin: 3px 0 2px; font-size: clamp(22px, 1.8vw, 40px); font-weight: 700; letter-spacing: -.03em; line-height: 1.2; color: #13263f; font-variant-numeric: tabular-nums; }
.ltv-metric strong small { display: inline; margin-left: 5px; font-size: .42em; font-weight: 500; letter-spacing: 0; color: #6c7e95; }
.ltv-metric small { display: block; font-size: 11px; color: #5f7087; line-height: 1.45; }
.ltv-barra-prog { height: 5px; margin-top: 6px; background: #e9eef5; border-radius: 5px; overflow: hidden; }
.ltv-barra-prog i { display: block; height: 100%; background: #25a66b; }
.ltv-nota { margin: 0 2px; font-size: 11px; line-height: 1.5; color: #5f7087; }
.ltv-rodape { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 6px 0 9px; }
.ltv-rodape p { margin: 0 auto 0 0; font-size: 12px; color: #6b8093; }
.ltv-conexao { text-align: right; font-size: 12px; color: #6b8093; }
.ltv-conexao time { display: block; margin-top: 2px; }

@media (max-width: 1000px) {
  .ltv { overflow: auto; }
  .ltv-painel { grid-template-columns: 1fr; }
  .ltv-mapa svg { flex: none; height: 55vw; min-height: 300px; }
  .ltv aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .ltv-nota { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .ltv { padding: 10px 12px 0; }
  .ltv-atividades { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ltv-rodape { flex-wrap: wrap; }
}
/* TV de parede: sem cabeçalho nem abas do sistema (tv.html). */
body.ltv-tela-cheia { background: linear-gradient(180deg, #e6ecf3 0%, #dde5ee 100%); height: 100vh; overflow: hidden; }
body.ltv-tela-cheia .ltv { padding-top: 14px; }

/* Camadas e navegação do mapa (foto da obra, quadrantes/status, transparência, arrastar e aproximar). */
.ltv-quadro-mapa { position: relative; display: flex; flex: 1 1 0; min-height: 250px; margin: 8px 12px 0; }
.ltv-quadro-mapa svg { flex: 1 1 auto; width: 100%; height: auto; margin: 0; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.ltv-quadro-mapa svg.arrastando { cursor: grabbing; }
.ltv-quadro-mapa svg:focus-visible { outline: 2px solid #287cde; outline-offset: 2px; }
.ltv-mapa svg.com-foto .sector-grid { stroke: #4B5563; stroke-width: 2; stroke-dasharray: none; opacity: 1; }
.ltv-mapa svg.com-foto .sector-label { fill: #183b5b; stroke: #fff; stroke-width: 9px; }
.ltv-camadas { position: absolute; right: 10px; bottom: 10px; z-index: 3; width: 218px; padding: 7px 9px; background: #fffffff0; border: 1px solid #d6e0e8; border-radius: 6px; box-shadow: 0 2px 8px #15345012; color: #315575; }
.ltv-camadas[hidden], .ltv-legenda[hidden] { display: none; }
.ltv-camadas-chk { display: flex; align-items: center; gap: 13px; margin-bottom: 4px; }
.ltv-camadas-chk label { display: flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.ltv-camadas input[type=checkbox] { width: 12px; height: 12px; min-height: 0; margin: 0; padding: 0; accent-color: #287cde; flex-shrink: 0; }
.ltv-camadas-transp { display: flex; align-items: center; gap: 6px; font-size: 9px; color: #647c92; }
.ltv-camadas-transp output { width: 27px; text-align: right; font-size: 9px; font-weight: 600; color: #315575; }
.ltv-camadas-transp input[type=range] { width: 96px; flex: 1; min-width: 0; height: 16px; min-height: 0; padding: 0; margin: 0; accent-color: #287cde; cursor: pointer; }
.ltv-camadas-transp input:disabled { cursor: default; opacity: .4; }
.ltv-camadas input:focus-visible { outline: 2px solid #287cde; outline-offset: 2px; }
.ltv-nav-mapa { position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; gap: 3px; padding: 3px; border: 1px solid #d6e0e8; border-radius: 6px; background: #fffffff0; box-shadow: 0 2px 8px #15345012; }
.ltv-nav-mapa button { min-width: 28px; min-height: 28px; padding: 2px 7px; border: 0; border-radius: 4px; background: transparent; color: #315575; font-size: 15px; line-height: 1; }
.ltv-nav-mapa button:last-child { font-size: 10px; }
.ltv-nav-mapa button:hover { background: #eaf1f8; }
@media (pointer: coarse) { .ltv-nav-mapa button { min-width: 36px; min-height: 36px; } }
@media (max-width: 1000px) { .ltv-quadro-mapa { flex: none; min-height: 320px; } }
@media (max-width: 650px) { .ltv-camadas { right: 7px; bottom: 7px; width: 210px; padding: 6px 8px; } .ltv-nav-mapa { top: 7px; right: 7px; } }

/* Vistas Planta | 3D (3D carregado sob demanda): ferramentas flutuam sobre o mapa, sem mudar o cabeçalho nem a altura do quadro. */
.ltv-quadro-mapa svg[hidden], .ltv-3d[hidden], .ltv-3d-msg[hidden], .ltv-3d .tv-3d-scene[hidden], .ltv-superficie[hidden] { display: none; }
.ltv-3d { position: absolute; inset: 0; overflow: hidden; border: 1px solid #dbe3ed; border-radius: 10px; background: #edf2f6; }
.ltv-3d .tv-3d-scene { position: absolute; inset: 0; }
.ltv-3d canvas { display: block; width: 100%; height: 100%; touch-action: none; outline: none; }
.ltv-3d-msg { position: absolute; inset: 0; z-index: 2; display: grid; place-items: center; padding: 60px; background: #edf2f6e8; color: #52657d; font-size: 13px; text-align: center; pointer-events: none; }
.ltv-esq { position: absolute; top: 10px; left: 10px; z-index: 3; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.ltv-vista { display: flex; gap: 3px; padding: 3px; border: 1px solid #d6e0e8; border-radius: 6px; background: #fffffff0; box-shadow: 0 2px 8px #15345012; }
.ltv-vista button { min-height: 28px; padding: 2px 12px; border: 0; border-radius: 4px; background: transparent; color: #52657d; font-size: 11px; font-weight: 600; }
.ltv-vista button:hover { background: #eaf1f8; }
.ltv-vista button[aria-pressed=true] { background: #e2edf8; color: #194977; box-shadow: inset 0 0 0 1px #287cde; }
.ltv-superficie { display: flex; flex-wrap: wrap; gap: 5px; padding: 5px 7px; border: 1px solid #d6e0e8; border-radius: 6px; background: #fffffff0; }
.ltv-superficie label { display: flex; align-items: center; gap: 4px; font-size: 10px; color: #52657d; }
.ltv-superficie select { max-width: 135px; padding: 3px; font: inherit; color: #315575; background: #fff; border: 1px solid #d6e0e8; border-radius: 4px; }
@media (max-width: 650px) { .ltv-esq { top: 7px; left: 7px; } }
