/* VMS — câmeras ao vivo e gravações (tela do QCentral e página fixa do mosaico). */

/* ── Barra do agente ── */
.vms-agente { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 10px 14px; border-radius: 10px;
  background: #fff; border: 1px solid var(--gray-200, #e9ecef); margin-bottom: 14px; font-size: 13.5px; }
.vms-agente .vms-pulso { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; background: #a0aec0; }
.vms-agente.ok .vms-pulso { background: #38a169; box-shadow: 0 0 0 3px rgba(56,161,105,.18); }
.vms-agente.falta .vms-pulso { background: #e53e3e; box-shadow: 0 0 0 3px rgba(229,62,62,.18); }
.vms-agente.aviso .vms-pulso { background: #dd6b20; }
.vms-agente .vms-agente-txt { flex: 1; min-width: 220px; line-height: 1.4; }
.vms-agente .vms-agente-txt small { color: #718096; display: block; }
.vms-passos { margin: 8px 0 0 18px; color: #4a5568; font-size: 13px; line-height: 1.6; }

/* ── Ao vivo: lista + mosaico ── */
/* Ao vivo cabe na janela (altura exata ajustada por _vmsAjustarAltura); a lista rola por dentro e não estica o mosaico. */
.vms-vivo { display: flex; gap: 14px; height: calc(100vh - 230px); min-height: 380px; }
.vms-vivo .vms-palco, .vms-vivo .vms-tela { min-height: 0; }
.vms-lista { width: 320px; flex: 0 0 320px; background: #fff; border: 1px solid var(--gray-200, #e9ecef); border-radius: 10px;
  display: flex; flex-direction: column; overflow: hidden; }
.vms-lista-busca { padding: 10px; border-bottom: 1px solid var(--gray-200, #e9ecef); }
.vms-lista-busca input { width: 100%; padding: 8px 10px; border: 1px solid var(--gray-300, #dee2e6); border-radius: 6px; font: inherit; font-size: 13px; }
.vms-arvore { overflow-y: auto; flex: 1; padding: 0 0 10px; font-size: 13px; }
.vms-arvore-acoes { padding: 6px 12px; font-size: 11.5px; color: #a0aec0; }
.vms-arvore-acoes a { color: #718096; }
.vms-seta { flex: 0 0 12px; width: 12px; font-size: 9px; text-align: center; color: #a0aec0; transition: transform .15s; }

/* Nível 1 — cliente: cabeçalho fixo enquanto rola o próprio grupo. */
.vms-cli + .vms-cli { margin-top: 2px; }
.vms-cliente { position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 7px; padding: 8px 10px 8px 12px;
  background: #f4f6f9; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; cursor: pointer; user-select: none; }
.vms-cliente:hover { background: #ebeff5; }
.vms-cliente .vms-seta { transform: rotate(90deg); color: #718096; }
.vms-cli.fechado .vms-cliente .vms-seta { transform: none; }
.vms-cliente-sigla { flex: 0 0 auto; padding: 1px 6px; border-radius: 4px; background: #2b6cb0; color: #fff; font-size: 10.5px; font-weight: 700;
  letter-spacing: .4px; }
.vms-cliente-nome { flex: 1; min-width: 0; font-size: 11.5px; font-weight: 700; color: #2d3748; text-transform: uppercase; letter-spacing: .2px;
  line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vms-cliente-qtd { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: #718096; white-space: nowrap; }

/* Nível 2 — NVR: recuado sob o cliente, linha-guia alinhada à seta do cliente. */
.vms-grupo { margin: 4px 0 6px 17px; border-left: 1px solid #dfe5ec; }
.vms-nvr-cab { position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 10px 6px 8px; cursor: pointer; user-select: none;
  border-radius: 0 6px 6px 0; }
.vms-nvr-cab:hover { background: #f1f5f9; }
.vms-nvr.aberto > .vms-nvr-cab .vms-seta { transform: rotate(90deg); }
.vms-nvr-cab .vms-nvr-nome { flex: 1; min-width: 0; font-weight: 600; color: #2d3748; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vms-nvr-cab .vms-nvr-info { flex: 0 0 auto; font-size: 11px; color: #a0aec0; white-space: nowrap; }
.vms-nvr-cab .vms-nvr-info.erro { color: #c05621; font-weight: 600; }
/* Ações do NVR por cima da contagem ao passar o mouse (em tela de toque ficam sempre visíveis). */
.vms-nvr-acoes { display: flex; gap: 2px; }
@media (hover: hover) {
  .vms-nvr-acoes { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); display: none; padding-left: 10px;
    background: linear-gradient(to right, transparent, #f1f5f9 10px); }
  .vms-nvr-cab:hover .vms-nvr-acoes, .vms-nvr-cab:focus-within .vms-nvr-acoes { display: flex; }
}
.vms-nvr-cab .vms-btn-icone { border: none; background: none; cursor: pointer; padding: 1px 6px; border-radius: 4px; color: #4a5568; font-size: 14px;
  line-height: 1.3; }
.vms-nvr-cab .vms-btn-icone:hover { background: #e2e8f0; color: #2b6cb0; }

/* Nível 3 — câmeras: recuadas sob o NVR, linha-guia alinhada à seta do NVR. */
.vms-canais { display: none; margin: 1px 0 4px 14px; border-left: 1px solid #dfe5ec; }
.vms-nvr.aberto .vms-canais { display: block; }
.vms-canal { display: flex; align-items: center; gap: 7px; padding: 4px 10px 4px 10px; cursor: pointer; color: #2d3748; border-radius: 0 6px 6px 0; }
.vms-canal:hover { background: #ebf8ff; }
.vms-canal.no-mosaico { color: #2b6cb0; font-weight: 600; background: #f0f7ff; }
.vms-canal .vms-ponto { width: 7px; height: 7px; border-radius: 50%; background: #cbd5e0; flex: 0 0 auto; }
.vms-canal .vms-ponto.on { background: #38a169; }
.vms-canal .vms-ponto.off { background: #e53e3e; }
.vms-canal .vms-canal-num { flex: 0 0 auto; color: #a0aec0; font-size: 11px; min-width: 18px; font-variant-numeric: tabular-nums; }
.vms-canal .vms-canal-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Selo "em mosaico salvo" (grade 2×2 verde, com a quantidade quando > 1) × "não atribuída" (vaga tracejada laranja).
   Desenhado em CSS: o mesmo em qualquer fonte do Windows. */
.vms-mos { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 3px; font-size: 10.5px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums; }
.vms-mos i { display: inline-block; width: 11px; height: 11px; flex: 0 0 auto; }
.vms-mos.sim { color: #2f855a; }
.vms-mos.sim i { background: linear-gradient(#38a169, #38a169) 0 0 / 5px 5px no-repeat, linear-gradient(#38a169, #38a169) 6px 0 / 5px 5px no-repeat,
  linear-gradient(#38a169, #38a169) 0 6px / 5px 5px no-repeat, linear-gradient(#38a169, #38a169) 6px 6px / 5px 5px no-repeat; }
.vms-mos.nao { color: #c05621; }
.vms-mos.nao i { border: 1.5px dashed #dd6b20; border-radius: 2px; box-sizing: border-box; }
.vms-legenda { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; padding: 0 12px 6px; font-size: 11px; color: #718096; }
.vms-legenda .vms-mos { font-weight: 400; color: #718096; gap: 5px; }
.vms-canais-msg { padding: 6px 10px 8px 12px; color: #718096; font-size: 12px; line-height: 1.4; }
.vms-arvore > .vms-canais-msg { padding: 12px; }
.vms-canais-msg.erro { color: #c53030; }
/* Planta (mapa sinótico) na árvore do Ao vivo: mesmo nível do NVR. */
.vms-planta-item { display: flex; align-items: center; gap: 6px; padding: 6px 10px 6px 8px; cursor: pointer; user-select: none; border-radius: 0 6px 6px 0; }
.vms-planta-item:hover { background: #f0fff4; }
.vms-planta-item .vms-planta-ico { flex: 0 0 12px; width: 12px; font-size: 11px; text-align: center; }
.vms-planta-item .vms-nvr-nome { flex: 1; min-width: 0; font-weight: 600; color: #2d3748; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vms-planta-item .vms-nvr-info { flex: 0 0 auto; font-size: 11px; color: #a0aec0; }
.vms-planta-item.no-mosaico .vms-nvr-nome { color: #2b6cb0; }

.vms-palco { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.vms-barra { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.vms-barra select, .vms-barra input[type="text"], .vms-barra input[type="date"], .vms-barra input[type="time"] {
  padding: 7px 9px; border: 1px solid var(--gray-300, #dee2e6); border-radius: 6px; font: inherit; font-size: 13px; background: #fff; }
.vms-barra .vms-espaco { flex: 1; }
/* Ao vivo: o cliente encolhe (reticências) antes de os botões descerem de linha; a altura da barra sai do vídeo. */
#vmsMosaicoSel { max-width: 260px; }
.vms-mosaico-atual { flex: 1 1 200px; min-width: 0; display: flex; align-items: baseline; gap: 4px; font-size: 13px; color: #4a5568; white-space: nowrap; }
.vms-mosaico-atual:empty { flex-basis: 0; }
/* Botões do Ao vivo descem juntos: o nome do cliente fica com a linha de cima inteira em vez de espremido entre eles. */
.vms-barra-acoes { display: flex; gap: 8px; margin-left: auto; }
.vms-mosaico-atual > span, .vms-mosaico-atual > a { flex: none; }
.vms-mosaico-atual > b { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.vms-chk { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: #4a5568; cursor: pointer; user-select: none; white-space: nowrap; }
.vms-chk input { margin: 0; cursor: pointer; }
.vms-tela { flex: 1; min-height: 420px; background: #0b0f14; border-radius: 10px; overflow: hidden; position: relative; }
/* Ao vivo interno parado até ▶ Iniciar (não gasta processamento só por abrir o VMS). */
.vms-parado { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 24px; text-align: center; color: #cbd5e0; }
.vms-parado p { margin: 0; max-width: 480px; font-size: 13.5px; line-height: 1.5; }
.vms-parado small { font-size: 12px; color: #718096; }
.vms-parado .btn { font-size: 14px; padding: 8px 18px; }

/* ── Grade do mosaico (também na página fixa) ── */
.vms-grade { display: grid; gap: 2px; width: 100%; height: 100%; background: #0b0f14; }
.vms-celula { position: relative; background: #111821; overflow: hidden; min-width: 0; min-height: 0; cursor: pointer; outline: 2px solid transparent; outline-offset: -2px; }
.vms-celula.selecionada { outline-color: #63b3ed; }
.vms-celula.vazia { background: repeating-linear-gradient(45deg, #121a24, #121a24 10px, #151f2b 10px, #151f2b 20px); }
.vms-celula-video { position: absolute; inset: 0; }
/* Telinha de alarmes (vaga do mosaico). Bolinha: vermelha = novo, amarela = visto/pendente, verde = tratado. */
.vms-celula.alarmes { background: #0f141b; }
.vms-alarmes { position: absolute; inset: 0; display: flex; flex-direction: column; color: #e2e8f0; font-size: 12.5px; }
.vms-al-cab { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; background: #18202b; border-bottom: 1px solid #2d3748; font-weight: 600; }
.vms-al-cont { display: flex; gap: 6px; }
.vms-al-n { min-width: 22px; padding: 1px 7px; border-radius: 10px; font-size: 11.5px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; }
.vms-al-n.novo { background: #e53e3e; color: #fff; }
.vms-al-n.visto { background: #d69e2e; color: #1a202c; }
.vms-al-lista { flex: 1; overflow-y: auto; padding: 2px 0 26px; }
.vms-al-vazio { padding: 16px; color: #718096; text-align: center; }
.vms-al-item { border-bottom: 1px solid #1f2733; cursor: pointer; }
.vms-al-item:hover { background: #18202b; }
.vms-al-item.aberto { background: #1c2533; }
.vms-al-linha { display: flex; align-items: center; gap: 8px; padding: 6px 10px; min-width: 0; }
.vms-al-bola { flex: 0 0 10px; width: 10px; height: 10px; border-radius: 50%; background: #718096; }
.vms-al-item.novo .vms-al-bola { background: #e53e3e; animation: vms-pisca 1.2s ease-in-out infinite; }
.vms-al-item.visto .vms-al-bola { background: #ecc94b; }
.vms-al-item.tratado .vms-al-bola { background: #48bb78; }
.vms-al-item.reconhecido .vms-al-bola { background: #718096; }
.vms-al-item.tratado .vms-al-desc, .vms-al-item.reconhecido .vms-al-desc { color: #a0aec0; }
.vms-al-hora { flex: 0 0 auto; color: #a0aec0; font-variant-numeric: tabular-nums; }
.vms-al-desc { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vms-al-cli { padding: 0 5px; border-radius: 4px; background: #2c5282; color: #fff; font-size: 10.5px; font-weight: 700; }
.vms-al-x { color: #fbd38d; font-weight: 700; }
.vms-al-det { display: flex; gap: 6px; padding: 0 10px 8px 28px; color: #cbd5e0; align-items: center; flex-wrap: wrap; }
.vms-al-txt { flex: 1; min-width: 120px; padding: 5px 8px; border-radius: 5px; border: 1px solid #4a5568; background: #0f141b; color: #e2e8f0; font: inherit; }
.vms-al-tratar { padding: 5px 10px; border-radius: 5px; border: 0; background: #38a169; color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.vms-al-tratar:disabled { opacity: .6; }
/* Vaga de mapa do condomínio (Leaflet). */
.vms-celula.mapa { background: #e9edf2; }
.vms-mapa { position: absolute; inset: 0; z-index: 0; isolation: isolate; }   /* camadas do Leaflet (z-index 400–1000) ficam dentro: o rótulo da vaga fica por cima */
.vms-mapa .leaflet-control-attribution { font-size: 9px; }
.vms-mapa-grupo { width: 30px; height: 30px; border-radius: 50%; border: 2px solid #fff; color: #fff; font-weight: 700; font-size: 12px;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.vms-mapa-pino.alerta svg { animation: vms-pino 1.2s ease-in-out infinite; }
@keyframes vms-pino { 50% { transform: translateY(-3px); } }
/* Vaga de planta (mapa sinótico): imagem inteira centralizada, pontos com a cor do status por cima. */
.vms-celula.planta { background: #e9edf2; }
.vms-planta { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; }
.vms-planta-quadro { position: relative; }
.vms-planta-quadro img { display: block; width: 100%; height: 100%; user-select: none; }
.vms-planta-pontos { position: absolute; inset: 0; pointer-events: none; }
.vms-planta-ponto { position: absolute; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%; border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0,0,0,.35); pointer-events: auto; }
.vms-planta-ponto.verde { background: #38a169; }
.vms-planta-ponto.amarelo { background: #d69e2e; }
.vms-planta-ponto.vermelho { background: #e53e3e; animation: vms-pisca 1.2s ease-in-out infinite; }
.vms-planta-ponto.cinza { background: #a0aec0; }
@keyframes vms-pisca { 50% { box-shadow: 0 0 0 6px rgba(229,62,62,.35); } }
.vms-video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
/* Mosaico com "esticar" (padrão): a imagem preenche a célula inteira, sem tarjas pretas. */
.vms-grade.esticar .vms-video { object-fit: fill; }
.vms-celula-rotulo { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 8px 4px; font-size: 12px; color: #e2e8f0;
  background: linear-gradient(transparent, rgba(0,0,0,.65)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.vms-celula-estado { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center;
  padding: 10px; font-size: 12.5px; color: #a0aec0; pointer-events: none; }
.vms-celula-estado.ao_vivo, .vms-celula-estado.parado:empty { display: none; }
.vms-celula-estado.erro { color: #feb2b2; flex-direction: column; gap: 3px; font-weight: 600; }
/* Texto técnico do NVR/agente, menor, embaixo do que aconteceu ("Sem comunicação" + "(wrong response on DESCRIBE)…"). */
.vms-celula-estado small.vms-detalhe { font-size: 10.5px; font-weight: 400; opacity: .8; }
/* Vaga sem imagem: a última imagem da câmera esmaecida para o preto (VmsQuadros, vms-player.js) e o erro em vermelho por cima. */
.vms-anterior { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: brightness(.35) saturate(.55);
  pointer-events: none; user-select: none; }
.vms-grade.esticar .vms-anterior { object-fit: fill; }
.vms-celula-estado.sobre-quadro { color: #e2e8f0; text-shadow: 0 1px 3px #000, 0 0 10px rgba(0,0,0,.9); }
.vms-celula-estado.erro.sobre-quadro { flex-direction: column; gap: 4px; color: #ff3b3b; font-weight: 700; font-size: 14px; }
.vms-celula-estado.erro.sobre-quadro small { font-size: 11px; font-weight: 400; color: #fed7d7; }
.vms-celula.foco .vms-celula-estado.erro.sobre-quadro { font-size: 20px; }
/* Agente 0.2.11 convertendo H.265 → H.264 (este computador não decodifica H.265): pesa no processador — selo vermelho. */
.vms-conv { position: absolute; top: 4px; left: 4px; z-index: 3; padding: 1px 6px; border-radius: 3px; background: #e53e3e; color: #fff;
  font: 700 10.5px/16px system-ui, -apple-system, 'Segoe UI', sans-serif; letter-spacing: .2px; cursor: help; box-shadow: 0 1px 3px rgba(0,0,0,.5); }
.vms-celula.alarme-associado .vms-conv { left: 34px; }
.vms-celula.foco .vms-conv, .vms-rep-tela .vms-conv { font-size: 12.5px; line-height: 19px; padding: 1px 8px; }
.vms-celula-estado.conectando::before { content: ''; width: 16px; height: 16px; border: 2px solid #4a5568; border-top-color: #a0aec0; border-radius: 50%;
  margin-right: 8px; animation: vmsGira 1s linear infinite; }
@keyframes vmsGira { to { transform: rotate(360deg); } }
/* ✕ da vaga, em edição: aparece na vaga ocupada ao passar o mouse e na selecionada (em tela de toque, sempre). */
.vms-celula-x { display: none; position: absolute; top: 6px; right: 6px; z-index: 3; width: 24px; height: 24px; padding: 0; border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; }
.vms-celula-x:hover { background: #e53e3e; border-color: #e53e3e; }
.vms-celula:not(.vazia):hover .vms-celula-x, .vms-celula.selecionada:not(.vazia) .vms-celula-x { display: block; }
@media (hover: none) { .vms-celula:not(.vazia) .vms-celula-x { display: block; } }
.vms-celula:has(.vms-celula-x) .vms-al-cab { padding-right: 36px; }
/* Arrastar uma vaga para outra, em edição: as duas trocam de lugar. Mapa e alarmes pegam pela alça (neles arrastar já tem outro uso). */
.vms-grade.trocavel .vms-celula:not(.vazia):not(.mapa):not(.alarmes) { cursor: grab; user-select: none; }
.vms-celula-alca { display: none; position: absolute; top: 6px; right: 36px; z-index: 3; width: 24px; height: 24px; border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 13px; line-height: 22px; text-align: center; cursor: grab; user-select: none; }
.vms-celula-alca:hover { background: #2b6cb0; border-color: #2b6cb0; }
.vms-celula.mapa:hover .vms-celula-alca, .vms-celula.alarmes:hover .vms-celula-alca,
.vms-celula.mapa.selecionada .vms-celula-alca, .vms-celula.alarmes.selecionada .vms-celula-alca { display: block; }
.vms-celula:has(.vms-celula-alca) .vms-al-cab { padding-right: 66px; }
.vms-grade.arrastando, .vms-grade.arrastando * { cursor: grabbing !important; }
.vms-grade.arrastando .vms-celula-x, .vms-grade.arrastando .vms-celula-alca { display: none !important; }
.vms-celula.arrastada > .vms-celula-video { opacity: .35; }
.vms-celula.alvo::after { content: attr(data-solte); position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; box-sizing: border-box;
  border: 3px solid #f6ad55; background: rgba(0,0,0,.45); color: #fff; font-size: 14px; font-weight: 600; pointer-events: none; }   /* borda aqui: o vídeo cobre o outline da célula */
.vms-arrasto { position: absolute; z-index: 6; max-width: 280px; padding: 6px 10px; border-radius: 6px; background: #1a202c; color: #e2e8f0; font-size: 12.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; box-shadow: 0 6px 18px rgba(0,0,0,.5); pointer-events: none; }
/* Menu do botão direito numa câmera. */
.vms-menu { position: absolute; z-index: 6; min-width: 230px; max-width: 320px; padding: 4px; border: 1px solid #4a5568; border-radius: 8px; background: #1a202c; color: #e2e8f0;
  font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
.vms-menu-tit { padding: 6px 10px; font-size: 11.5px; color: #a0aec0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-bottom: 1px solid #2d3748; margin-bottom: 3px; }
.vms-menu-nota { padding: 6px 10px; font-size: 12px; color: #a0aec0; line-height: 1.4; }
.vms-menu button { display: block; width: 100%; padding: 8px 10px; border: none; border-radius: 5px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.vms-menu button:hover { background: #2b6cb0; color: #fff; }
/* Reprodução aberta do mosaico: por cima dele, comandos embaixo (o topo da página fixa aparece por cima ao mexer o mouse). */
.vms-rep { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: #000; color: #e2e8f0; }
.vms-rep-tela { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.vms-rep.esticar .vms-video { object-fit: fill; }
.vms-rep-info { position: absolute; left: 0; right: 0; bottom: 0; display: flex; align-items: center; gap: 8px; padding: 18px 10px 6px; font-size: 13px;
  background: linear-gradient(transparent, rgba(0,0,0,.7)); pointer-events: none; }
.vms-rep-selo { flex: 0 0 auto; padding: 2px 8px; border-radius: 4px; background: #c05621; color: #fff; font-size: 11.5px; font-weight: 700; }
.vms-rep-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vms-rep-hora { flex: 0 0 auto; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vms-linha-tempo.vms-rep-linha { flex: 0 0 46px; border-radius: 0; background: #2d3748; }
.vms-linha-tempo.vms-rep-linha .vms-marca, .vms-rep-linha .vms-canais-msg { color: #a0aec0; }
.vms-rep-barra { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; background: #1a202c; font-size: 12.5px; }
.vms-rep-barra button { padding: 6px 10px; border: 1px solid #4a5568; border-radius: 6px; background: #2d3748; color: #e2e8f0; font: inherit; cursor: pointer; white-space: nowrap; }
.vms-rep-barra button:hover { background: #4a5568; }
.vms-rep-barra .vms-rep-play { min-width: 112px; background: #2b6cb0; border-color: #2b6cb0; color: #fff; }
.vms-rep-barra .vms-rep-fechar { background: #c53030; border-color: #c53030; color: #fff; }
.vms-rep-barra input { padding: 5px 7px; border: 1px solid #4a5568; border-radius: 6px; background: #2d3748; color: #e2e8f0; font: inherit; color-scheme: dark; }
.vms-rep-espaco { flex: 1; }
.vms-grade.com-foco .vms-celula:not(.foco) { display: none; }
.vms-grade.com-foco .vms-celula.foco { grid-column: 1 / -1 !important; grid-row: 1 / -1 !important; }

/* ── Gravações ── */
.vms-gravacoes { display: flex; gap: 14px; min-height: calc(100vh - 230px); }
/* A lista não dita a altura das Gravações (rola por dentro); quem dita é o player. */
@media (min-width: 901px) { .vms-gravacoes .vms-lista { contain: size; } }
.vms-linha-tempo { position: relative; height: 46px; background: #edf2f7; border-radius: 6px; cursor: crosshair; user-select: none; overflow: hidden; }
.vms-linha-tempo .vms-seg { position: absolute; top: 6px; bottom: 16px; background: #3182ce; border-radius: 2px; }
.vms-linha-tempo .vms-seg.evento { background: #dd6b20; }
.vms-linha-tempo .vms-marca { position: absolute; bottom: 0; font-size: 10px; color: #718096; transform: translateX(-50%); }
.vms-linha-tempo .vms-agulha { position: absolute; top: 0; bottom: 0; width: 2px; background: #e53e3e; pointer-events: none; }
.vms-relogio { font-variant-numeric: tabular-nums; font-weight: 700; color: #2d3748; min-width: 74px; }

/* ── Listas (mosaicos, agentes) ── */
.vms-url { font-family: Consolas, monospace; font-size: 12px; background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 4px; padding: 2px 6px; }
.vms-tag { display: inline-block; padding: 1px 8px; line-height: 18px; vertical-align: middle; border-radius: 10px; font-size: 11.5px; font-weight: 600; background: #edf2f7; color: #4a5568; }
/* Agentes: pílulas numa linha só, centradas com o botão ao lado; o que não couber desce inteiro para a linha de baixo. */
.vms-agentes .vms-tag { white-space: nowrap; }
.vms-agentes td { vertical-align: middle; }
.vms-ag-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.vms-ag-linha + .vms-ag-linha { margin-top: 6px; }
.vms-ag-tags { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.vms-ag-filtro { display: flex; justify-content: flex-end; margin: 0 0 8px; font-size: 13px; color: #4a5568; }
.vms-ag-filtro label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.vms-tag.ok { background: #c6f6d5; color: #22543d; }
.vms-tag.off { background: #fed7d7; color: #742a2a; }

@media (max-width: 900px) {
  .vms-vivo, .vms-gravacoes { flex-direction: column; }
  .vms-lista { width: auto; flex: 0 0 auto; max-height: 280px; }
  .vms-tela, .vms-vivo .vms-tela { min-height: 300px; }
  .vms-vivo { height: auto; }
}

/* ── Página fixa do mosaico (telão) ── */
body.vms-pagina { margin: 0; background: #0b0f14; color: #e2e8f0; font-family: 'Segoe UI', Tahoma, Arial, sans-serif; overflow: hidden; }
.vms-pagina #vmsMosaico { position: fixed; inset: 0; }
/* Camadas da página fixa: a ativa por cima; no tour, a próxima é montada escondida e entra esmaecendo. */
.vms-pagina .vms-camada { position: absolute; inset: 0; opacity: 0; pointer-events: none; transition: opacity .5s ease; }
.vms-pagina .vms-camada.ativa { opacity: 1; pointer-events: auto; z-index: 1; }
.vms-pagina .vms-topo { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: linear-gradient(rgba(0,0,0,.7), transparent); opacity: 0; transition: opacity .3s; font-size: 13px; }
.vms-pagina .vms-topo:hover, .vms-pagina .vms-topo.visivel { opacity: 1; }
.vms-pagina .vms-topo button { background: rgba(255,255,255,.12); color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 6px; padding: 5px 10px; cursor: pointer; font: inherit; }
.vms-pagina .vms-aviso { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; padding: 24px; }
.vms-pagina .vms-aviso > div { max-width: 560px; background: #1a202c; border: 1px solid #2d3748; border-radius: 12px; padding: 24px 28px; line-height: 1.55; }
.vms-pagina .vms-aviso h2 { margin: 0 0 8px; font-size: 20px; color: #fff; }
.vms-pagina .vms-aviso a { color: #63b3ed; }

/* ── Agentes: painel da máquina ── */
.vms-linha-clicavel { cursor: pointer; }
.vms-sub { font-size: 12px; color: #718096; line-height: 1.45; }
.vms-tag.aviso { background: #feebc8; color: #7b341e; }
.vms-check { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; white-space: nowrap; }
.vms-aviso-claro { background: #fffaf0; border: 1px solid #fbd38d; color: #7b341e; border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-bottom: 8px; }
#vmsAgenteDet h4 { font-size: 14px; color: #2d3748; }
#vmsAgenteDet select { padding: 6px 8px; border: 1px solid #dee2e6; border-radius: 6px; font: inherit; font-size: 13px; max-width: 280px; }
.vms-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.vms-kpi { background: #fff; border: 1px solid #e9ecef; border-radius: 8px; padding: 10px 12px; }
.vms-kpi-rot { font-size: 12px; color: #718096; }
.vms-kpi-val { font-size: 22px; font-weight: 600; color: #1a202c; margin: 2px 0; }
.vms-graficos { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.vms-grafico { background: #fff; border: 1px solid #e9ecef; border-radius: 8px; padding: 8px 10px 4px; }
.vms-grafico-tit { font-size: 12.5px; color: #2d3748; font-weight: 600; margin-bottom: 2px; }
.vms-grafico-area { position: relative; }
.vms-svg { width: 100%; height: auto; display: block; touch-action: none; }
.vms-svg-grade { stroke: #e9ecef; stroke-width: 1; }
.vms-svg-eixo { font-size: 9.5px; fill: #868e96; font-variant-numeric: tabular-nums; }
.vms-svg-linha { fill: none; stroke: #0066cc; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.vms-svg-area { fill: #0066cc; fill-opacity: .1; stroke: none; }
.vms-svg-ponto { fill: #0066cc; stroke: #fff; stroke-width: 2; }
.vms-svg-cursor { stroke: #adb5bd; stroke-width: 1; }
.vms-dica { display: none; position: absolute; top: -4px; background: #fff; border: 1px solid #dee2e6; border-radius: 6px; padding: 3px 8px;
  font-size: 12px; color: #4a5568; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.08); pointer-events: none; }
.vms-dica b { color: #1a202c; }
.vms-tabela-hist { max-height: 260px; overflow: auto; margin-top: 6px; }
.vms-tabela-hist table { font-size: 12px; }
.vms-tabela-hist td, .vms-tabela-hist th { padding: 4px 8px; }

/* ── Acesso do cliente ao mosaico ── */
.vms-acesso-grupo { border: 1px solid #e2e8f0; border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.vms-acesso-grupo.liberado { border-color: #90cdf4; background: #f7fbff; }
.vms-acesso-cab { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.vms-acesso-corpo { margin: 8px 0 0 24px; }
.vms-acesso-grupo:not(.liberado) .vms-acesso-corpo { opacity: .45; }
.vms-acesso-todos { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.vms-acesso-usuarios { margin: 6px 0 0 22px; max-height: 220px; overflow-y: auto; display: flex; flex-direction: column; gap: 3px; }
.vms-acesso-usuarios label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }

/* ── Layouts personalizados ── */
.vms-mini-layout { display: grid; gap: 2px; background: #cbd5e0; border: 2px solid #cbd5e0; border-radius: 3px; }
.vms-mini-layout span { background: #fff; }
.vms-le-topo { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.vms-le-topo select { padding: 7px 9px; border: 1px solid var(--gray-300, #dee2e6); border-radius: 6px; font: inherit; min-width: 70px; }
.vms-le-quadro { width: 100%; max-width: 860px; margin: 0 auto; aspect-ratio: 16 / 9; }
.vms-le-grade { position: relative; display: grid; width: 100%; height: 100%; gap: 0; background: #1a202c; border-radius: 8px; overflow: hidden;
  touch-action: none; user-select: none; cursor: crosshair; }
.vms-le-un { border: 1px dashed rgba(255,255,255,.08); }
.vms-le-area { pointer-events: none; margin: 2px; border-radius: 4px; background: #2d3748; border: 1px solid #4a5568;
  display: flex; align-items: center; justify-content: center; }
.vms-le-area.grande { background: #2c5282; border-color: #63b3ed; }
.vms-le-area span { color: #e2e8f0; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.vms-le-sel { pointer-events: none; margin: 1px; border: 2px solid #f6e05e; border-radius: 5px; background: rgba(246,224,94,.18); }
.vms-layouts-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.vms-layout-card { background: #fff; border: 1px solid var(--gray-200, #e9ecef); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 6px; }
.vms-layout-card-prev { display: flex; justify-content: center; padding: 6px 0 4px; cursor: pointer; }
.vms-layout-card-prev .vms-mini-layout { max-width: 100%; }
.vms-layout-card-nome { font-weight: 700; color: #2d3748; font-size: 14px; }
.vms-layout-card-info { font-size: 12px; color: #718096; }
.vms-layout-card-acoes { margin-top: 4px; display: flex; gap: 6px; }
.vms-le { background: #fff; border: 1px solid var(--gray-200, #e9ecef); border-radius: 10px; padding: 16px 18px; }

/* ── Tours ── */
.vms-tour-seq { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.vms-tour-chip { display: inline-flex; gap: 4px; align-items: center; padding: 2px 8px; border-radius: 10px; background: #edf2f7; color: #2d3748; font-size: 12px; }
.vms-tour-chip b { font-weight: 600; color: #4a5568; }
.vms-tour-chip.removido { background: #fed7d7; color: #742a2a; text-decoration: line-through; }
.vms-tour-seta { color: #a0aec0; font-size: 12px; }
.vms-tour-itens { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.vms-tour-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; background: #f7fafc; border: 1px solid #e2e8f0; border-radius: 8px; }
.vms-tour-item select { flex: 1; min-width: 220px; padding: 7px 9px; border: 1px solid var(--gray-300, #dee2e6); border-radius: 6px; font: inherit; font-size: 13px; background: #fff; }
.vms-tour-num { flex: 0 0 26px; height: 26px; border-radius: 50%; background: #2b6cb0; color: #fff; font-weight: 700; font-size: 12px;
  display: inline-flex; align-items: center; justify-content: center; }
.vms-tour-dur { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #4a5568; }
.vms-tour-dur input { width: 80px; padding: 6px 8px; border: 1px solid var(--gray-300, #dee2e6); border-radius: 6px; font: inherit; }

/* ── Alarmes (seção) ── */
.al-resumo { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.al-kpi { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #fff; border: 1px solid var(--gray-200, #e9ecef); border-radius: 10px; font-size: 13px; color: #4a5568; }
.al-kpi b { font-size: 18px; color: #1a202c; font-variant-numeric: tabular-nums; }
button.al-kpi { font: inherit; font-size: 13px; cursor: pointer; text-align: left; transition: border-color .15s, box-shadow .15s; }
button.al-kpi:hover { border-color: #a0aec0; }
button.al-kpi.ativo { border-color: var(--primary, #003366); box-shadow: 0 0 0 2px rgba(0, 51, 102, .15); }
.al-kpi.reconhecido .al-bola { background: #a0aec0; }
.al-bola { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #a0aec0; vertical-align: middle; }
.al-kpi.novo .al-bola, .al-linha.novo .al-bola { background: #e53e3e; animation: vms-pisca 1.2s ease-in-out infinite; }
.al-kpi.visto .al-bola, .al-linha.visto .al-bola { background: #ecc94b; }
.al-linha.tratado .al-bola { background: #48bb78; }
.al-linha.reconhecido .al-bola { background: #a0aec0; }
.al-linha { cursor: pointer; }
.al-linha.novo td { background: #fff5f5; }
.al-linha.tratado td, .al-linha.reconhecido td { color: #718096; }
.al-detalhe td { background: #f7fafc; font-size: 13px; line-height: 1.6; }
.al-barra { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.al-barra select { padding: 7px 9px; border: 1px solid var(--gray-300, #dee2e6); border-radius: 6px; font: inherit; font-size: 13px; background: #fff; }
.al-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #4a5568; cursor: pointer; margin-right: 12px; }
.al-sub { font-size: 12px; color: #718096; line-height: 1.4; }
.al-acao { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.al-acao select, .al-acao input { padding: 6px 8px; border: 1px solid var(--gray-300, #dee2e6); border-radius: 6px; font: inherit; font-size: 13px; }
.al-acao .al-ac-mon { width: 60px; }
.al-acao label { font-size: 13px; color: #4a5568; display: inline-flex; gap: 4px; align-items: center; }
.al-tipos { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 16px; padding: 10px 12px; border: 1px solid #e2e8f0; border-radius: 8px; background: #f8fafc; }
.al-tipos label { display: flex; gap: 8px; align-items: flex-start; margin: 0; font-size: 13px; font-weight: 400; line-height: 1.35; color: #2d3748; text-align: left; cursor: pointer; }
/* Checkboxes do módulo: anula o .form-group input (largura 100% + padding), que esticava a caixa e espremia o texto. */
.al-tipos input[type=checkbox], .al-chk input[type=checkbox], .al-canais input[type=checkbox], .al-acao input[type=checkbox] {
    width: 15px; height: 15px; padding: 0; margin: 0; flex: none; accent-color: var(--primary, #0b3a6e); cursor: pointer;
}
.al-tipos input[type=checkbox] { margin-top: 1px; }
/* Editor de regra: blocos de opções alinhados à esquerda, um por linha (al-col) ou lado a lado. */
.al-secao { margin: 18px 0 8px; font-size: 15px; }
.al-opcoes { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 4px 0; }
.al-opcoes.al-col { flex-direction: column; align-items: flex-start; gap: 8px; }
.al-opcoes .al-chk { margin: 0; font-weight: 400; }
.al-opcoes .al-sub-opcao { margin-left: 23px; margin-top: -2px; }
.al-chk:has(input:disabled) { opacity: .5; cursor: default; }
.al-botoes { display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 10px; }
.al-tocar { display: inline-flex; align-items: center; gap: 8px; margin-top: 2px; font-size: 13px; color: #4a5568; }
.al-tocar input { width: 64px; padding: 5px 8px; border: 1px solid var(--gray-300, #dee2e6); border-radius: 6px; font: inherit; font-size: 13px; text-align: center; }
.al-linha2 { display: flex; gap: 12px; flex-wrap: wrap; }
.al-linha2 .form-group { flex: 1; min-width: 220px; }
.al-cred { border-collapse: collapse; width: 100%; font-size: 13px; }
.al-cred td { padding: 6px 8px; border-bottom: 1px solid #edf2f7; }
.al-cred td:first-child { color: #718096; width: 160px; }
.al-cred code { background: #f7fafc; padding: 2px 6px; border-radius: 4px; user-select: all; }
.al-ajuda { background: #fff; border: 1px solid var(--gray-200, #e9ecef); border-radius: 10px; padding: 16px 22px; max-width: 920px; line-height: 1.6; font-size: 14px; }
.al-ajuda h3 { margin: 14px 0 6px; font-size: 16px; }
.al-ajuda code { background: #f7fafc; padding: 1px 5px; border-radius: 4px; }

/* Aba Mosaicos (admin): VMS liberado por cliente (rev. 87) */
.vms-liberados { padding: 10px 14px; margin-bottom: 12px; }
.vms-liberados small { display: block; color: #718096; font-size: 12px; margin-top: 6px; }
.vms-liberado { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 10px; border-radius: 12px; background: #c6f6d5; color: #22543d; font-size: 12.5px; font-weight: 600; }
.vms-liberado button { border: 0; background: transparent; color: #22543d; cursor: pointer; font-size: 12px; padding: 0 4px; border-radius: 8px; }
.vms-liberado button:hover { background: #9ae6b4; }
.vms-aviso-acesso { font-size: 12.5px; background: #feebc8; color: #7b341e; padding: 8px 10px; border-radius: 6px; }

/* PTZ da câmera ampliada (agente 0.2.4): setas e zoom por cima do vídeo, canto inferior direito */
.vms-ptz { position: absolute; right: 14px; bottom: 34px; z-index: 6; display: flex; align-items: flex-end; gap: 10px; user-select: none; touch-action: none; opacity: .55; transition: opacity .15s; }
.vms-ptz:hover, .vms-ptz.movendo { opacity: 1; }
.vms-ptz-pad { display: grid; grid-template-columns: repeat(3, 34px); grid-template-rows: repeat(3, 34px); gap: 3px; background: rgba(0,0,0,.45); padding: 5px; border-radius: 50%; }
.vms-ptz-zoom { display: flex; flex-direction: column; gap: 3px; background: rgba(0,0,0,.45); padding: 5px; border-radius: 18px; }
.vms-ptz button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 15px; cursor: pointer; padding: 0; line-height: 34px; }
.vms-ptz button:hover { background: rgba(255,255,255,.3); }
.vms-ptz button:active { background: #f6ad55; color: #1a202c; }
.vms-ptz-centro { display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,.75); font-size: 10px; font-weight: 700; letter-spacing: .5px; }
.vms-ptz-msg { position: absolute; right: 0; bottom: -22px; white-space: nowrap; color: #fed7d7; font-size: 11.5px; text-shadow: 0 1px 2px #000; }
.vms-ptz-msg:empty { display: none; }

/* Máquina (Agentes): GPU do navegador e energia (agente 0.2.4) */
.vms-gpu { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--gray-200, #e2e8f0); border-radius: 8px; font-size: 13px; }
.vms-confirma { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: #fefcbf; border: 1px solid #f6e05e; font-size: 13px; }
.vms-confirma.perigo { background: #fff5f5; border-color: #feb2b2; }
.vms-cmds { margin: 10px 0 0; padding-left: 18px; font-size: 12.5px; color: #4a5568; }
.vms-cmds li { margin-bottom: 4px; }

/* Linha do tempo com zoom (roda do mouse) — VmsLinhaTempo */
.vms-lt { touch-action: none; }
.vms-lt .vms-lt-trilho { position: absolute; inset: 0; }
.vms-lt.arrastando { cursor: grabbing; }
.vms-lt .vms-lt-cursor { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(26,32,44,.55); pointer-events: none; display: none; z-index: 3; }
.vms-lt .vms-lt-cursor span { position: absolute; top: 2px; left: 4px; padding: 0 4px; border-radius: 3px; background: #1a202c; color: #fff; font-size: 10.5px; line-height: 15px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.vms-lt .vms-lt-cursor.esq span { left: auto; right: 4px; }
.vms-rep-linha.vms-lt .vms-lt-cursor { background: rgba(255,255,255,.6); }
.vms-lt .vms-lt-dia { position: absolute; top: 2px; right: 2px; z-index: 4; display: none; border: 0; border-radius: 4px; padding: 1px 6px; font-size: 10.5px; background: rgba(26,32,44,.75); color: #fff; cursor: pointer; }
.vms-lt.com-zoom .vms-lt-dia { display: block; }
.vms-lt .vms-lt-dica { position: absolute; top: 2px; right: 6px; font-size: 10px; color: #a0aec0; pointer-events: none; display: none; }
.vms-lt:hover .vms-lt-dica { display: block; }
.vms-lt.com-zoom .vms-lt-dica, .vms-lt.arrastando .vms-lt-dica { display: none; }
.vms-lt .vms-agulha { z-index: 2; }
.vms-linha-tempo .vms-marca.borda-esq { transform: none; margin-left: 2px; }
.vms-linha-tempo .vms-marca.borda-dir { transform: translateX(-100%); margin-left: -2px; }

/* Salvar mosaico: aviso de troca de cliente (revoga o acesso liberado) */
.vms-troca-cliente { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: #fff5f5; border: 1px solid #feb2b2; font-size: 13px; color: #742a2a; }

/* ── Extrair vídeo (recorte na linha do tempo), foto e bandeja das extrações (agente 0.2.6) ── */
.vms-lt .vms-lt-fora { position: absolute; top: 0; bottom: 0; background: rgba(0,0,0,.30); pointer-events: none; z-index: 1; }
.vms-lt .vms-lt-corte { position: absolute; top: 0; bottom: 0; z-index: 1; box-sizing: border-box; background: rgba(56,161,105,.22);
  border-top: 3px solid #38a169; border-bottom: 3px solid #38a169; cursor: grab; }
.vms-lt.arrastando .vms-lt-corte { cursor: grabbing; }
.vms-lt .vms-lt-alca { position: absolute; top: -3px; bottom: -3px; left: -7px; width: 14px; cursor: ew-resize; z-index: 2; }
.vms-lt .vms-lt-alca.dir { left: auto; right: -7px; }
.vms-lt .vms-lt-alca::before { content: ''; position: absolute; top: 0; bottom: 0; left: 4px; width: 6px; border-radius: 3px; background: #38a169; box-shadow: 0 0 0 1px rgba(255,255,255,.7); }
.vms-lt .vms-lt-corte-rot { position: absolute; top: 3px; left: 50%; transform: translateX(-50%); padding: 0 5px; border-radius: 3px; background: #22543d; color: #fff;
  font-size: 10.5px; line-height: 15px; white-space: nowrap; pointer-events: none; }
.vms-lt.recortando { cursor: crosshair; }
.vms-lt.recortando:hover .vms-lt-dica { display: block; left: 6px; right: auto; }
.vms-corte { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 7px 10px; border-radius: 8px; background: #f0fff4; border: 1px solid #9ae6b4; font-size: 12.5px; color: #22543d; }
.vms-corte .vms-corte-tit { font-weight: 700; margin-right: 4px; }
.vms-corte input { padding: 4px 6px; border: 1px solid #cbd5e0; border-radius: 6px; font: inherit; background: #fff; color: #1a202c; }
.vms-corte button { padding: 5px 10px; border: 1px solid #cbd5e0; border-radius: 6px; background: #fff; color: #2d3748; font: inherit; cursor: pointer; white-space: nowrap; }
.vms-corte button:hover { background: #edf2f7; }
.vms-corte .vms-corte-ok { background: #38a169; border-color: #38a169; color: #fff; font-weight: 600; }
.vms-corte .vms-corte-ok:hover { background: #2f855a; }
.vms-corte .vms-corte-ok:disabled { opacity: .6; cursor: wait; }
.vms-corte .vms-corte-dur { min-width: 70px; font-weight: 700; font-variant-numeric: tabular-nums; }
.vms-corte .vms-corte-dur.erro { color: #c53030; }
.vms-corte .vms-corte-nota { font-size: 11.5px; color: #4a5568; }
.vms-rep .vms-corte { flex: 0 0 auto; border: 0; border-radius: 0; background: #1c3326; color: #e2e8f0; }
.vms-rep .vms-corte input { border-color: #4a5568; background: #2d3748; color: #e2e8f0; color-scheme: dark; }
.vms-rep .vms-corte button { border-color: #4a5568; background: #2d3748; color: #e2e8f0; }
.vms-rep .vms-corte button:hover { background: #4a5568; }
.vms-rep .vms-corte .vms-corte-ok { background: #38a169; border-color: #38a169; color: #fff; }
.vms-rep .vms-corte .vms-corte-nota { color: #a0aec0; }
.vms-rep .vms-corte .vms-corte-dur.erro { color: #feb2b2; }
.vms-rep-barra .vms-rep-sep { width: 1px; height: 22px; background: #4a5568; margin: 0 2px; }
.vms-rep-barra .vms-rep-recortar.ativo, #vmsRecRecortar.ativo, #vmsRecRecortar.ativo:hover { background: #2f855a !important; border-color: #2f855a !important; color: #fff !important; opacity: 1; }
.vms-congelado { position: absolute; inset: 0; }
.vms-flash { position: absolute; inset: 0; z-index: 7; background: #fff; pointer-events: none; animation: vms-flash .45s ease-out forwards; }
@keyframes vms-flash { from { opacity: .8; } to { opacity: 0; } }
.vms-extracoes { position: fixed; right: 16px; bottom: 16px; z-index: 10050; width: 370px; max-width: calc(100vw - 32px); overflow: hidden; border-radius: 10px;
  background: #1a202c; color: #e2e8f0; font-size: 12.5px; box-shadow: 0 10px 30px rgba(0,0,0,.45); font-family: 'Segoe UI', Tahoma, Arial, sans-serif; }
.vms-ext-cab { display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #2d3748; }
.vms-ext-cab span { flex: 1; color: #a0aec0; font-size: 11.5px; }
.vms-ext-cab button { border: 0; background: none; color: #e2e8f0; font-size: 14px; cursor: pointer; padding: 0 4px; }
.vms-ext-lista { max-height: 50vh; overflow: auto; }
.vms-ext-item { padding: 8px 10px; border-top: 1px solid #2d3748; }
.vms-ext-tit { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vms-ext-txt { margin-top: 2px; color: #cbd5e0; overflow-wrap: anywhere; }
.vms-ext-item.erro .vms-ext-txt { color: #feb2b2; }
.vms-ext-barra { height: 5px; margin-top: 5px; overflow: hidden; border-radius: 3px; background: #2d3748; }
.vms-ext-barra span { display: block; height: 100%; background: #38a169; transition: width .4s; }
.vms-ext-aviso { margin-top: 4px; color: #f6ad55; font-size: 11.5px; }
.vms-ext-acoes { display: flex; justify-content: flex-end; gap: 6px; margin-top: 5px; }
.vms-ext-acoes button { padding: 3px 9px; border: 1px solid #4a5568; border-radius: 5px; background: #2d3748; color: #e2e8f0; font: inherit; cursor: pointer; }
.vms-ext-acoes button:hover { background: #4a5568; }
.vms-ext-acoes button.x { padding: 3px 7px; }
.vms-avisos { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 10060; display: flex; flex-direction: column; gap: 6px; max-width: min(640px, calc(100vw - 32px)); }
.vms-aviso-bolha { padding: 9px 14px; border-radius: 8px; background: #2d3748; color: #fff; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.45); cursor: pointer;
  font-family: 'Segoe UI', Tahoma, Arial, sans-serif; overflow-wrap: anywhere; }
.vms-aviso-bolha.success { background: #276749; }
.vms-aviso-bolha.error { background: #9b2c2c; }

/* Etiqueta da vaga: resolução · fps · codec (a cada 5 s), no rodapé logo depois do nome e do IP da câmera, discreta (data-info do rótulo).
   Âmbar = fluxo da grade mais pesado que o esperado (> 15 fps, > D1 ou H.265); vaga no principal nunca fica âmbar. */
.vms-celula-rotulo[data-info]::after { content: attr(data-info); margin-left: 8px; font: 10px/1 Consolas, 'Courier New', monospace;
  color: rgba(203,213,224,.55); }
.vms-celula-rotulo.excesso[data-info]::after { color: rgba(246,173,85,.9); }
.vms-celula.foco .vms-celula-rotulo[data-info]::after { font-size: 11px; }
/* Rótulo maior que a vaga (nome, IP, NVR, resolução, fps, codec): com o mouse em cima, quebra em linhas e mostra tudo, por cima do
   vídeo (pedido do usuário, 12/11/2026). Coube numa linha: nada muda. */
.vms-celula:hover .vms-celula-rotulo { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; z-index: 3;
  text-shadow: 0 1px 2px #000, 0 0 4px #000; }
.vms-celula:hover .vms-celula-rotulo[data-info]::after { line-height: 1.4; color: rgba(226,232,240,.85); }
.vms-celula:hover .vms-celula-rotulo.excesso[data-info]::after { color: rgba(246,173,85,.95); }

/* ── Sinais de alarme (rev. 92) ─────────────────────────────────────────────
   Canal associado a câmera de alarme: 🔔 no canto. Alarme tocando (até ver/tratar, com limite): borda vermelha esmaecida
   piscando por cima do vídeo (::after, porque o vídeo cobre o outline; durante o arrasto o ::after é do .alvo). */
.vms-celula.alarme-associado::before { content: '🔔'; position: absolute; top: 4px; left: 4px; z-index: 3; padding: 0 4px; border-radius: 3px;
  background: rgba(0,0,0,.55); font-size: 12px; line-height: 18px; pointer-events: none; opacity: .85; }
.vms-celula.alarme-tocando::before { background: #c53030; opacity: 1; animation: vms-alarme-sino 1s ease-in-out infinite; }
.vms-celula.alarme-tocando:not(.alvo)::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; box-sizing: border-box;
  border: 4px solid rgba(229,62,62,.85); box-shadow: inset 0 0 22px rgba(229,62,62,.55); animation: vms-alarme-borda 1s ease-in-out infinite; }
@keyframes vms-alarme-borda { 0%, 100% { opacity: 1; } 50% { opacity: .15; } }
@keyframes vms-alarme-sino { 50% { transform: rotate(-14deg); } }
/* Mapa e planta: o equipamento com alarme tocando pisca rápido vermelho/amarelo e volta à cor do status quando para. */
.vms-mapa-pino.alarme svg path { animation: vms-alarme-rva .5s steps(1, end) infinite; }
.vms-mapa-pino.alarme { z-index: 1000 !important; }
.vms-mapa-grupo.alarme { animation: vms-alarme-rva-fundo .5s steps(1, end) infinite; }
.vms-planta-ponto.alarme { width: 16px; height: 16px; margin: -8px 0 0 -8px; z-index: 2; animation: vms-alarme-rva-fundo .5s steps(1, end) infinite; }
@keyframes vms-alarme-rva { 0% { fill: #e53e3e; } 50% { fill: #ecc94b; } }
@keyframes vms-alarme-rva-fundo { 0% { background-color: #e53e3e; } 50% { background-color: #ecc94b; } }
/* Som desligado nesta tela (botão 🔇 no topo). */
.vms-pagina .vms-topo button.som-mudo { background: #c53030; border-color: #c53030; }

/* Pop-up de alarme (agente 0.2.7+): barra do alarme no topo, mosaico abaixo. */
body.vms-popup #vmsMosaico { top: 46px; }
.vms-popup-barra { position: fixed; top: 0; left: 0; right: 0; height: 46px; z-index: 6; display: flex; align-items: center; gap: 12px; padding: 0 12px;
  background: #9b2c2c; color: #fff; font-size: 15px; box-shadow: 0 2px 8px rgba(0,0,0,.5); }
.vms-popup-barra.tocando { animation: vms-popup-pisca 1s ease-in-out infinite; }
@keyframes vms-popup-pisca { 50% { background: #e53e3e; } }
.vms-popup-barra .vms-popup-titulo { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vms-popup-barra .vms-popup-sub { opacity: .85; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vms-popup-barra .vms-popup-conta { font-variant-numeric: tabular-nums; opacity: .9; white-space: nowrap; }
.vms-popup-barra button { background: rgba(255,255,255,.15); color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; padding: 6px 12px;
  cursor: pointer; font: inherit; white-space: nowrap; }
.vms-popup-barra button:hover { background: rgba(255,255,255,.3); }
.vms-popup-barra button.fechar { background: #1a202c; border-color: #1a202c; font-weight: 700; }
body.vms-popup .vms-topo { display: none; }
/* Alarmes (rev. 92): tarefa pop-up no editor de regra e associação câmera ↔ canais. */
.al-acao.al-popup { background: #fff5f5; border: 1px solid #fed7d7; border-radius: 8px; padding: 6px 8px; }
.al-acao .al-ac-tam { width: 70px; }
.al-canais { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 4px 12px; }
.al-canais label { display: flex; gap: 6px; align-items: center; font-size: 13px; color: #2d3748; cursor: pointer; padding: 2px 4px; border-radius: 4px; }
.al-canais label.sugerido { background: #fffbea; }

/* Aumentar o mosaico (12/11/2026): aviso na barra do Ao vivo e o layout que vai junto no Salvar. */
.vms-mosaico-atual > .vms-aumentado-aviso { color: #c05621; font-weight: 600; margin-right: 6px; }
#vmsAumentarSel { max-width: 150px; }
.vms-aumento-salvar { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: #fffaf0; border: 1px solid #fbd38d; font-size: 13px; color: #4a5568; }
.vms-aumento-topo { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 6px; }
.vms-aumento-topo .vms-mini-layout { flex: none; }

/* ── Grupos de vagas (12/11/2026) ───────────────────────────────────────────
   Contorno grosso por fora de um retângulo de vagas, com título opcional pendurado no meio da borda de cima. Item da grade por cima
   das vagas (z 4: abaixo da gravação aberta, 5, e do PTZ, 6), sem pegar clique. Some com a câmera ampliada. */
.vms-contorno { position: relative; z-index: 4; pointer-events: none; border: 4px solid; box-sizing: border-box; min-width: 0; min-height: 0; }
.vms-grade.com-foco .vms-contorno { display: none; }
.vms-contorno-titulo { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 16px); box-sizing: border-box;
  padding: 2px 12px 3px; border-radius: 0 0 7px 7px; font: 600 13px/1.3 'Segoe UI', Tahoma, Arial, sans-serif; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; box-shadow: 0 2px 6px rgba(0,0,0,.45); letter-spacing: .2px; }

/* Edição dos grupos (VMS → Ao vivo → ▢ Grupos): miniatura do mosaico, clique na primeira e na última vaga. */
.vms-grp-mini { display: grid; gap: 3px; height: 300px; background: #1a202c; padding: 3px; border-radius: 6px; user-select: none; }
.vms-grp-mini .vms-grp-vaga { position: relative; background: #2d3748; color: #e2e8f0; border-radius: 3px; font-size: 11px; line-height: 1.25;
  padding: 3px 5px; overflow: hidden; cursor: pointer; min-width: 0; min-height: 0; }
.vms-grp-mini .vms-grp-vaga b { display: block; font-size: 12px; color: #fff; }
.vms-grp-mini .vms-grp-vaga span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .8; }
.vms-grp-mini .vms-grp-vaga:hover { background: #4a5568; }
.vms-grp-mini .vms-grp-vaga.inicio { background: #2b6cb0; outline: 2px solid #90cdf4; }
.vms-grp-mini .vms-contorno { border-width: 3px; }
.vms-grp-mini .vms-contorno-titulo { font-size: 11px; padding: 1px 8px 2px; top: -3px; }
.vms-grp-dica { font-size: 12.5px; color: #4a5568; margin: 8px 0; }
.vms-grp-lista { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.vms-grp-item { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px; border: 1px solid #e2e8f0; border-left-width: 6px; border-radius: 6px; }
.vms-grp-item input[type=text] { flex: 1; min-width: 160px; padding: 6px 9px; border: 1px solid #cbd5e0; border-radius: 6px; font-size: 13px; }
.vms-grp-cores { display: inline-flex; gap: 3px; }
.vms-grp-cor { width: 20px; height: 20px; border-radius: 50%; border: 2px solid transparent; padding: 0; cursor: pointer; box-shadow: 0 0 0 1px rgba(0,0,0,.25) inset; }
.vms-grp-cor.sel { border-color: #1a202c; box-shadow: 0 0 0 2px #fff inset; }
.vms-grp-vagas { font-size: 12px; color: #718096; white-space: nowrap; }

/* Alarmes (rev. 104): filtros da lista e 🎬 Verificar — a gravação do alarme num lightbox, pelo agente desta máquina. */
.al-filtros select, .al-periodo input { padding: 7px 9px; border: 1px solid var(--gray-300, #dee2e6); border-radius: 6px; font: inherit; font-size: 13px; background: #fff; }
.al-filtros #alFCamera { max-width: 260px; }
.al-periodo { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: #4a5568; }
.al-auto { display: flex; margin-top: 6px; }
.al-ver { position: fixed; inset: 0; z-index: 2100; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(10, 14, 22, .78); }
.al-ver-caixa { display: flex; flex-direction: column; width: min(1280px, 100%); height: min(92vh, 900px); overflow: hidden; border-radius: 12px; background: #111827; color: #e2e8f0; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); }
.al-ver-cab { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #1a202c; border-bottom: 1px solid #2d3748; }
.al-ver-ico { font-size: 22px; }
.al-ver-tit { flex: 1; min-width: 0; font-size: 15px; }
.al-ver-tit .al-sub { color: #a0aec0; }
.al-ver-canal { padding: 6px 8px; border: 1px solid #4a5568; border-radius: 6px; background: #0f141c; color: #e2e8f0; font: inherit; font-size: 13px; }
.al-ver-x { padding: 2px 10px; border: 0; border-radius: 6px; background: transparent; color: #e2e8f0; font-size: 22px; cursor: pointer; }
.al-ver-x:hover { background: rgba(255, 255, 255, .1); }
.al-ver-tela { position: relative; flex: 1; min-height: 0; background: #000; }
.al-ver-msg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 24px; text-align: center; color: #cbd5e0; font-size: 14px; line-height: 1.55; }
.al-ver-msg a { color: #90cdf4; }
.al-ver-msg p { max-width: 640px; margin: 0; }
.al-ver-msg-ico { font-size: 30px; }
.al-ver-rodape { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px 14px; background: #1a202c; border-top: 1px solid #2d3748; }
.al-ver-espaco { flex: 1; }
.al-ver-tratar { display: inline-flex; align-items: center; gap: 6px; }
.al-ver-tratativa { width: 280px; padding: 6px 9px; border: 1px solid #4a5568; border-radius: 6px; background: #0f141c; color: #e2e8f0; font: inherit; font-size: 13px; }
/* O print e o fechar ficam no rodapé/cabeçalho do lightbox; a barra da gravação mantém saltos, data/hora e ✂️ outro trecho. */
.al-ver .vms-rep-foto, .al-ver .vms-rep-fechar { display: none; }
@media (max-width: 700px) {
    .al-ver { padding: 0; }
    .al-ver-caixa { height: 100%; border-radius: 0; }
    .al-ver-cab { flex-wrap: wrap; gap: 8px; }
    .al-ver-tit { font-size: 14px; }
    .al-ver-canal { order: 3; flex: 1 1 100%; }
    .al-ver-tratar { flex: 1 1 100%; }
    .al-ver-tratativa { flex: 1; width: auto; }
}
.al-ver-rodape .btn-secondary, .al-ver-rodape .btn-secondary:hover { background: #2d3748; border-color: #4a5568; color: #e2e8f0; }

/* Troca de mosaico (agente 0.2.13): menu lateral recolhível da página do mosaico (tela não persistente). ".vms-menu" já é o
   menu do botão direito — por isso "vms-lateral". Por cima da barra do topo (5), do PTZ (6) e do flash (7). */
.vms-lateral { position: fixed; top: 0; bottom: 0; left: 0; z-index: 20; display: flex; flex-direction: column; width: 320px; max-width: 86vw;
    background: rgba(17,24,39,.97); color: #e2e8f0; box-shadow: 6px 0 22px rgba(0,0,0,.55); transform: translateX(-105%); transition: transform .18s ease; }
.vms-lateral.aberto { transform: none; }
.vms-lateral-topo { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid #2d3748; font-size: 15px; }
.vms-lateral-topo button { border: 0; background: none; color: #cbd5e0; font-size: 18px; cursor: pointer; padding: 2px 6px; }
.vms-lateral input { margin: 10px 12px 4px; padding: 7px 10px; border: 1px solid #4a5568; border-radius: 6px; background: #1a202c; color: #e2e8f0; font: inherit; font-size: 13.5px; }
.vms-lateral-lista { flex: 1; overflow-y: auto; padding: 4px 8px 14px; }
.vms-lateral-grupo { margin: 12px 6px 4px; color: #a0aec0; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; }
.vms-lateral-item { display: block; width: 100%; padding: 8px 10px; border: 0; border-radius: 6px; background: none; color: #e2e8f0; font: inherit; font-size: 14px;
    text-align: left; cursor: pointer; }
.vms-lateral-item:hover:not([disabled]) { background: #2d3748; }
.vms-lateral-item.atual { background: #2b6cb0; color: #fff; cursor: default; }
.vms-lateral-item.atual small { opacity: .8; }
.vms-lateral-item.voltar { margin-top: 6px; color: #90cdf4; border: 1px dashed #2c5282; }
.vms-lateral-vazio { padding: 12px 8px; color: #a0aec0; font-size: 13px; }

/* ── Pânico (rev. 112): sub-aba de Alarmes, atendimento e linha da lista ─────────────────────────────── */
.pn-barra { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.pn-legenda { display: flex; flex-wrap: wrap; gap: 12px; margin-left: auto; font-size: 12.5px; color: #4a5568; }
.pn-legenda span { display: inline-flex; align-items: center; gap: 5px; }
.pn-bola { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #a0aec0; flex: none; }
.pn-bola.verde { background: #38a169; } .pn-bola.amarelo { background: #d69e2e; } .pn-bola.vermelho { background: #c53030; }
.pn-bola.cinza { background: #a0aec0; } .pn-bola.disparo { background: #e53e3e; animation: vms-pisca .8s ease-in-out infinite; }
.pn-tit { font-size: 15px; margin: 16px 0 8px; }
.pn-res { border: 1px solid #e2e8f0; border-left: 5px solid #a0aec0; border-radius: 10px; background: #fff; margin-bottom: 10px; }
.pn-res.verde { border-left-color: #38a169; } .pn-res.amarelo { border-left-color: #d69e2e; } .pn-res.vermelho { border-left-color: #c53030; }
.pn-res.disparo { border-left-color: #e53e3e; background: #fff5f5; }
.pn-res-cab { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; flex-wrap: wrap; }
.pn-res-nome { flex: 1; min-width: 200px; }
.pn-res-acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.pn-res-corpo { padding: 0 12px 12px; }
.pn-tag { display: inline-block; font-size: 11.5px; padding: 1px 8px; border-radius: 999px; background: #edf2f7; color: #4a5568; }
.pn-tag.novo { background: #bee3f8; color: #2a4365; cursor: pointer; font-weight: 600; }
.pn-tag.ok { background: #c6f6d5; color: #22543d; } .pn-tag.ruim { background: #fed7d7; color: #9b2c2c; } .pn-tag.teste { background: #feebc8; color: #7b341e; }
.pn-mod { border-top: 1px dashed #e2e8f0; padding-top: 8px; margin-top: 8px; }
.pn-mod-cab { margin-bottom: 2px; }
.pn-mod-acoes { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0; }
.pn-botoes { margin-top: 6px; font-size: 13px; }
.pn-botoes .mono, .mono { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; }
.pn-palavra { font-size: 28px; font-weight: 800; letter-spacing: .04em; text-align: center; padding: 14px; margin: 8px 0 12px;
              border: 2px dashed #3182ce; border-radius: 10px; background: #ebf8ff; color: #1a365d; word-break: break-word; }
.pn-pend { background: #fffbea; border: 1px solid #f6e05e; border-radius: 8px; padding: 8px 10px; margin-top: 8px; }   /* aguardando associação (rev. 116) */
.pn-op { display: block; font-weight: normal; margin: 4px 0; }
.pn-et { padding: 1px 8px; margin-left: 4px; }
.pn-et-previa { display: flex; justify-content: center; padding: 14px; background: #edf2f7; border-radius: 8px; margin-bottom: 8px; overflow: auto; }
.pn-et-previa iframe { border: 1px solid #a0aec0; background: #fff; zoom: 1.6; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.pn-localizando { background: #fefcbf; border: 1px solid #ecc94b; color: #744210; border-radius: 8px; padding: 8px 12px; margin: 8px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pn-qr-topo { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 8px; }
.pn-qr-img { width: 150px; height: 150px; flex: none; border: 1px solid #e2e8f0; border-radius: 8px; padding: 4px; background: #fff; }
.pn-qr-img svg { width: 100%; height: 100%; display: block; }
@media (max-width: 600px) { .pn-qr-topo { flex-direction: column; align-items: center; } }
.pn-passos { padding-left: 20px; } .pn-passos li { margin: 4px 0; }
.pn-linha { display: flex; gap: 8px; align-items: center; font-size: 13.5px; }
.pn-atend-cab { font-size: 18px; font-weight: 700; color: #9b2c2c; }
.pn-atend-dados { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px 14px; margin: 10px 0; }
.pn-atend-dados span { display: block; font-size: 11.5px; color: #718096; } .pn-atend-dados small { display: block; }
.pn-confirmado { background: #c53030; color: #fff; font-weight: 700; padding: 10px 12px; border-radius: 8px; margin-top: 10px; }
.pn-btn-desarmar { background: #38a169; color: #fff; } .pn-btn-desarmar:hover { background: #2f855a; color: #fff; }
.pn-btn-confirmar { background: #c53030; color: #fff; } .pn-btn-confirmar:hover { background: #9b2c2c; color: #fff; }
.pn-btn-atender { background: #e53e3e; color: #fff; font-weight: 700; } .pn-btn-atender:hover { background: #c53030; color: #fff; }
.al-linha.al-panico td:first-child { border-left: 4px solid #e53e3e; }
.al-linha.al-panico.novo { background: #fff5f5; animation: pn-linha 1.2s ease-in-out infinite; }
.al-linha.al-panico.confirmado { background: #fed7d7; }
@keyframes pn-linha { 50% { background: #fed7d7; } }
@media (max-width: 640px) { .pn-legenda { margin-left: 0; } .pn-palavra { font-size: 22px; } }
/* Vigia global do pânico (rev. 113): faixa no topo de QUALQUER página, abaixo dos modais (2000) e dos avisos (2200) */
.pn-faixa { position: fixed; top: 0; left: 0; right: 0; z-index: 1900; background: #c53030; color: #fff; box-shadow: 0 3px 12px rgba(0,0,0,.35);
            animation: pn-faixa 1s steps(2, end) infinite; }
@keyframes pn-faixa { 50% { background: #9b2c2c; } }
.pn-faixa-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; font-size: 15px; }
.pn-faixa-item + .pn-faixa-item { border-top: 1px solid rgba(255,255,255,.25); }
.pn-faixa-tit { font-weight: 800; letter-spacing: .04em; }
.pn-faixa-btn { background: #fff; color: #9b2c2c; border: 0; border-radius: 6px; padding: 5px 12px; font-weight: 700; cursor: pointer; }
.pn-faixa-btn.sec { background: rgba(255,255,255,.2); color: #fff; }
.pn-faixa-mudo { opacity: .8; font-size: 13px; }
.pn-faixa-aviso { font-size: 13px; background: rgba(0,0,0,.2); }
