/* Complementos da versão estática (janelas, avisos flutuantes, carregamento, impressão). */
.carregando-inicial { padding: 3rem; color: var(--muted); text-align: center; }
.carregando { padding: 2rem 0; color: var(--muted); }
#toast { position: fixed; right: 1rem; bottom: 4.8rem; z-index: 90; box-shadow: 0 6px 20px rgba(0, 0, 0, .12); max-width: 380px; }
@media (min-width: 861px) { #toast { bottom: 1.2rem; } }
.modal-bg { position: fixed; inset: 0; background: rgba(15, 30, 35, .38); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal { background: var(--white); border-radius: var(--radius); padding: 1.3rem 1.4rem; width: min(480px, 100%); box-shadow: 0 12px 40px rgba(0, 0, 0, .2); }
.modal h2 { margin-bottom: .4rem; }
.segredo { display: flex; gap: .6rem; align-items: center; background: var(--teal-50); border: 1px dashed var(--teal-100); border-radius: var(--radius-sm); padding: .8rem; }
.segredo code { font-size: 1.15rem; letter-spacing: .08em; font-weight: 600; color: var(--teal-700); flex: 1; word-break: break-all; }
.erro-tela { max-width: 560px; margin: 3rem auto; text-align: center; }
.erro-tela h1 { color: var(--teal); }
.login-box .alt { margin-top: 1rem; font-size: .86rem; text-align: center; }
.relatorio { background: var(--white); max-width: 900px; margin: 0 auto; padding: 2rem; border: 1px solid var(--line); }
.relatorio h1 { color: var(--teal); }
.relatorio table { width: 100%; border-collapse: collapse; margin: .5rem 0 1rem; font-size: .86rem; }
.relatorio td, .relatorio th { border-bottom: 1px solid var(--line-2); padding: .35rem .4rem; text-align: left; }
.relatorio .nota { font-size: .76rem; color: var(--muted); }
@media print {
  .modal-bg, #toast, .no-print { display: none !important; }
  .relatorio { border: 0; padding: 0; max-width: none; }
  body { background: #fff; }
}

/* ===== Planilhas (horas e compatibilização): visual de planilha, edição direta nas células ===== */
.xl-wrap { overflow: auto; max-height: calc(100vh - 230px); border: 1px solid var(--line); background: var(--white); border-radius: var(--radius-sm); }
.xl { border-collapse: separate; border-spacing: 0; font-size: .8rem; min-width: 100%; }
.xl th, .xl td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; vertical-align: middle; }
.xl thead th { position: sticky; z-index: 3; background: var(--teal); color: #fff; font-weight: 500; font-size: .7rem; letter-spacing: .04em;
  text-transform: uppercase; padding: .35rem .3rem; text-align: center; border-color: var(--teal-600); white-space: nowrap; }
.xl thead tr:nth-child(1) th { top: 0; }
.xl thead tr:nth-child(2) th { top: 26px; }
.xl thead tr:nth-child(3) th { top: 52px; }
.xl thead th.sub { background: var(--teal-600); text-transform: none; font-size: .68rem; }
.xl td input, .xl td select, .xl td textarea { width: 100%; border: 0; background: transparent; padding: .32rem .35rem; font: inherit; color: inherit;
  border-radius: 0; min-height: 28px; box-sizing: border-box; }
.xl td textarea { resize: none; overflow: hidden; display: block; line-height: 1.35; }
.xl td select { padding-right: .1rem; cursor: pointer; }
.xl td input:focus, .xl td select:focus, .xl td textarea:focus { outline: 2px solid var(--teal); outline-offset: -2px; background: #fff; }
.xl td input:disabled, .xl td select:disabled, .xl td textarea:disabled { color: var(--ink-2); cursor: default; -webkit-text-fill-color: var(--ink-2); opacity: 1; }
.xl td.num, .xl td.calc { text-align: right; padding: .3rem .4rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.xl td.calc { background: var(--teal-50); color: var(--teal-700); font-weight: 500; }
.xl td.hm input { text-align: center; width: 2.6rem; padding: .32rem .1rem; }
.xl td.dia { padding: .3rem .45rem; white-space: nowrap; font-weight: 500; color: var(--teal-700); background: #fafcfc; }
.xl td.sem { padding: .3rem .35rem; color: var(--muted); font-size: .72rem; background: #fafcfc; }
.xl tr.fds td { background: #f3f6f6; }
.xl tr.fds td.dia, .xl tr.fds td.sem { color: var(--muted); }
.xl tr.hoje td.dia { box-shadow: inset 3px 0 0 var(--teal); }
.xl tr.cont td.dia, .xl tr.cont td.sem { color: transparent; }
.xl tr.primeira td { border-top: 1px solid #cfdcdf; }
.xl tr.importada td { background: #fbfaf5; color: var(--ink-2); }
.xl tr.importada td.dia { color: var(--warn); }
.xl td.acoes { white-space: nowrap; padding: 0 .2rem; text-align: center; }
.xl td.acoes button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: .2rem .3rem; font-size: .9rem; line-height: 1; }
.xl td.acoes button:hover { color: var(--teal); }
.xl td.acoes button.del:hover { color: var(--danger); }
.xl .salvando { box-shadow: inset 0 -2px 0 var(--warn); }
.xl .erro-cel { box-shadow: inset 0 0 0 2px var(--danger); background: var(--danger-bg) !important; }
.xl tr.grupo td { background: var(--teal-50); color: var(--teal-700); font-weight: 600; font-size: .74rem; letter-spacing: .05em; padding: .4rem .6rem; }
.xl tr.grupo td input { font-weight: 600; color: var(--teal-700); letter-spacing: .05em; }
.xl tfoot td { position: sticky; bottom: 0; background: var(--teal-50); font-weight: 600; padding: .4rem .45rem; z-index: 2; }
.xl td.atrasado { color: var(--danger); font-weight: 600; }
.xl td.sit-PENDENTE select { color: var(--warn); font-weight: 600; }
.xl td.sit-REANALISAR select { color: var(--danger); font-weight: 600; }
.xl td.sit-ATENDIDO select, .xl td.sit-ACATADO select { color: var(--ok); font-weight: 600; }
.xl td.crit-ALTA select { color: var(--danger); } .xl td.crit-BAIXA select { color: var(--ok); }
.xl td.link a { padding: 0 .35rem; font-size: .72rem; }
.abas-xl { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 2px solid var(--teal); margin-bottom: .6rem; }
.abas-xl a, .abas-xl button { padding: .38rem .75rem; font-size: .78rem; background: var(--line-2); color: var(--ink-2); border: 0;
  border-radius: 6px 6px 0 0; cursor: pointer; text-decoration: none; white-space: nowrap; }
.abas-xl a.on, .abas-xl button.on { background: var(--teal); color: #fff; font-weight: 500; }
.abas-xl .cont { display: inline-block; min-width: 1.3em; margin-left: .3rem; padding: 0 .3rem; border-radius: 9px; background: var(--warn-bg); color: var(--warn); font-size: .68rem; }
.faixa-xl { display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; align-items: center; background: var(--teal); color: #fff; padding: .6rem .9rem;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0; }
.faixa-xl h2 { color: #fff; margin: 0; font-size: .95rem; letter-spacing: .12em; }
.faixa-xl .rot { font-size: .66rem; letter-spacing: .12em; opacity: .8; display: block; }
.faixa-xl select { background: var(--teal-600); color: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 4px; padding: .25rem .4rem; }
.estado-xl { font-size: .74rem; color: var(--muted); min-height: 1.2em; }
.estado-xl.erro { color: var(--danger); }
.xl td.img-cel { min-width: 180px; }
.xl td.img-cel .thumbs { display: flex; flex-wrap: wrap; gap: 3px; padding: 3px 4px 0; }
.xl td.img-cel .thumb { position: relative; }
.xl td.img-cel .thumb img { height: 44px; width: 60px; object-fit: cover; border-radius: 3px; border: 1px solid var(--line); cursor: zoom-in; background: var(--line-2); display: block; }
.xl td.img-cel .thumb button { position: absolute; top: -5px; right: -5px; width: 17px; height: 17px; border-radius: 50%; border: 0; background: var(--danger); color: #fff;
  font-size: .7rem; line-height: 17px; padding: 0; cursor: pointer; display: none; }
.xl td.img-cel .thumb:hover button { display: block; }
.xl td.img-cel .colar { font-size: .68rem; color: var(--muted); padding: 0 .35rem .2rem; display: flex; gap: .5rem; align-items: center; }
.xl td.img-cel.enviando { box-shadow: inset 0 -2px 0 var(--warn); }
.xl td.img-cel.alvo { box-shadow: inset 0 0 0 2px var(--teal); background: var(--teal-50); }
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(10, 20, 24, .88); display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.lightbox img { max-width: 94vw; max-height: 88vh; box-shadow: 0 10px 40px rgba(0,0,0,.5); background: #fff; cursor: default; }
.lightbox .nav-lb { position: absolute; top: 50%; transform: translateY(-50%); border: 0; background: rgba(255,255,255,.15); color: #fff; font-size: 2rem; width: 48px; height: 64px; cursor: pointer; border-radius: 6px; }
.lightbox .ant { left: 16px; } .lightbox .prox { right: 16px; }
.lightbox .legenda { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; color: #dfe9ec; font-size: .8rem; }

/* entrar com Google */
.btn-google { width: 100%; justify-content: center; gap: .6rem; background: #fff; color: #1f1f1f; border: 1px solid #c7ced0; margin-top: .4rem; }
.btn-google:hover { background: #f4f6f6; }
.ou { display: flex; align-items: center; gap: .6rem; margin: 1rem 0 .8rem; color: var(--muted, #6b7a80); font-size: .78rem; }
.ou::before, .ou::after { content: ""; flex: 1; border-top: 1px solid #dde3e4; }

/* cancelados */
.riscado { text-decoration: line-through; opacity: .75; }
.ev.cancelado { background: #eceeef !important; color: #7a8588 !important; text-decoration: line-through; }

/* logotipo */
.brand .logo { display: block; width: 160px; height: auto; }
.brand .sub { margin-top: .55rem; }
.logo-login { width: 320px; max-width: 100%; height: auto; }
@media (max-width: 860px) { .logo-login { width: 220px; } }

/* capa do projeto */
.capa { display: block; object-fit: cover; background: var(--teal-50); border-radius: 8px; flex: none; }
.capa.lista { width: 64px; height: 44px; border-radius: 6px; }
.capa.falhou { opacity: .3; }
.capa-banner { position: relative; width: 100%; border-radius: 12px; overflow: hidden; margin: .2rem 0 1.1rem; outline: none;
  background: linear-gradient(135deg, var(--teal) 0%, #2a6a7e 55%, #7f9aa3 100%); }
.capa-banner.alta { aspect-ratio: 3 / 1; height: auto; max-height: 420px; }
.capa-banner.baixa { height: 120px; }
.capa-banner.sem { background: linear-gradient(135deg, var(--teal-50), #dfe8ea); border: 1px dashed #b9cdd3; }
.capa-banner.sem.baixa { height: 64px; }
.capa-banner .capa-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.capa-banner:not(.sem)::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; pointer-events: none;
  background: linear-gradient(to top, rgba(0,0,0,.35), transparent); }
.capa-banner:focus-visible { box-shadow: 0 0 0 3px var(--teal-100); }
.capa-banner.enviando { opacity: .55; pointer-events: none; }
.capa-acoes { position: absolute; right: .8rem; bottom: .7rem; display: flex; gap: .5rem; z-index: 2; }
.capa-banner.sem .capa-acoes { right: 50%; transform: translateX(50%); bottom: 50%; margin-bottom: -1rem; }
.capa-btn { background: rgba(255,255,255,.92); color: #1f2a2e; border: 0; border-radius: 8px; padding: .4rem .8rem; font-size: .8rem;
  font-weight: 500; cursor: pointer; box-shadow: 0 1px 4px rgba(0,0,0,.18); font-family: inherit; }
.capa-btn:hover { background: #fff; }
.capa-banner.sem .capa-btn { box-shadow: none; border: 1px solid #b9cdd3; }
.projhead .grow { flex: 1; min-width: 220px; }
@media (max-width: 860px) { .capa-banner.alta { max-height: none; } .capa-banner.baixa { height: 90px; } .capa-banner { border-radius: 8px; } }

/* histórico: registros (editável) e sistema */
.subabas { display: flex; gap: .3rem; margin: 0 0 .9rem; border-bottom: 1px solid var(--line); }
.subabas a { padding: .45rem .9rem; font-size: .85rem; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subabas a.on { color: var(--teal); border-bottom-color: var(--teal); font-weight: 500; }
.subabas a:hover { text-decoration: none; color: var(--teal); }
.xl td.sit-LEMBRETE select { color: var(--info); font-weight: 600; }

/* projetos em quadros */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; }
.seg a { display: inline-flex; align-items: center; gap: .35rem; padding: .45rem .8rem; font-size: .84rem; color: var(--muted); }
.seg a + a { border-left: 1px solid var(--line); }
.seg a.on { background: var(--teal-50); color: var(--teal); font-weight: 500; }
.seg a:hover { text-decoration: none; color: var(--teal); }
.quadros { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.quadro { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  color: var(--ink, #1f2a2e); transition: box-shadow .15s, transform .15s; }
.quadro:hover { text-decoration: none; box-shadow: 0 6px 18px rgba(16, 40, 48, .12); transform: translateY(-1px); }
.quadro-capa { position: relative; aspect-ratio: 3 / 1.25; background: var(--teal-50); overflow: hidden; }
.quadro-capa .capa.q-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 0; border: 0; }
.quadro-sem { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--teal) 0%, #2a6a7e 60%, #7f9aa3 100%); }
.quadro-sem span { color: rgba(255,255,255,.85); font-family: var(--font-title); letter-spacing: .3em; font-size: 1.35rem; }
.quadro-status { position: absolute; top: 8px; right: 8px; width: 11px; height: 11px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.quadro-txt { padding: .65rem .8rem .8rem; font-size: .84rem; line-height: 1.35; letter-spacing: .01em; color: #1f2a2e; }
.quadro-txt strong { font-weight: 500; }
.quadro.novo { align-items: center; justify-content: center; min-height: 150px; background: #eef1f2; border-style: dashed; color: var(--muted); }
.quadro.novo span { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; }

/* fotos da equipe (retratos verticais: enquadrar o rosto) */
img.avatar.foto { object-position: 50% 22%; }
.avatar.md { width: 40px; height: 40px; font-size: .85rem; }
.avatar.xl { width: 84px; height: 84px; font-size: 1.5rem; }

/* foto da pessoa */
.foto-bloco { display: flex; flex-direction: column; align-items: center; gap: .3rem; outline: none; border-radius: 10px; padding: .2rem; }
.foto-bloco:focus-visible { box-shadow: 0 0 0 3px var(--teal-100); }
.foto-bloco.enviando { opacity: .5; pointer-events: none; }
.foto-acoes { display: flex; gap: .7rem; font-size: .74rem; }
.modal .foto-bloco { margin: .6rem 0 .4rem; }
.user-btn { background: none; border: 0; padding: .2rem .4rem; border-radius: 999px; cursor: pointer; font: inherit; color: inherit; display: inline-flex; align-items: center; gap: .5rem; }
.user-btn:hover { background: var(--teal-50); }

/* enquadrar foto */
.enq-area { position: relative; margin: .4rem auto .8rem; border-radius: 10px; overflow: hidden; background: #eef1f2; }
.enq-area canvas { display: block; cursor: grab; touch-action: none; }
.enq-area canvas:active { cursor: grabbing; }
.enq-mascara { position: absolute; inset: 0; pointer-events: none; border-radius: 50%; box-shadow: 0 0 0 200px rgba(255,255,255,.62); outline: 2px solid rgba(21,77,97,.55); }
.enq-zoom { display: flex; align-items: center; gap: .6rem; color: var(--muted); }
.enq-zoom input { flex: 1; }
.capa-banner.alta.sem { aspect-ratio: auto; height: 150px; }

/* ordenar projetos: só a setinha (o seletor nativo fica invisível por cima) */
.ordenar { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 36px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--muted); font-size: 1.05rem; cursor: pointer; }
.ordenar:hover, .ordenar.on { color: var(--teal); background: var(--teal-50); }
.ordenar select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.ordenar:focus-within { box-shadow: 0 0 0 3px var(--teal-100); }
.th-ord { color: inherit; display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; }
.th-ord:hover { text-decoration: none; color: var(--teal); }
.th-ord .seta { font-size: .7rem; opacity: .35; }
.th-ord.on .seta, .th-ord:hover .seta { opacity: 1; }
.th-ord.on { color: var(--teal); }

/* checklist da etapa com responsável e prazo */
.checklist.itens li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.checklist.itens .txt { flex: 1 1 260px; font-weight: 400; margin: 0; font-size: .9rem; color: inherit; }
.checklist.itens .item-meta { display: inline-flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: .78rem; }
.checklist.itens .item-meta select, .checklist.itens .item-meta input[type=date] { font-size: .76rem; padding: .15rem .35rem; height: auto; min-height: 0; width: auto; }
.checklist.itens .item-meta select { max-width: 150px; }
.checklist.itens li.atrasado .txt { color: var(--danger); }
.item-novo select, .item-novo input[type=date] { width: auto; }
/* foto sempre redonda (não esticar pela largura dos links abaixo) */
.foto-bloco > .avatar, .pagehead .avatar { min-width: 0; flex: none; aspect-ratio: 1 / 1; }

/* Etapas › Lista: concluir bloco inteiro e blocos concluídos recolhidos */
.bloco-check { font-size: .82rem; font-weight: 500; gap: .4rem; cursor: pointer; white-space: nowrap; }
.blocos-feitos > summary { cursor: pointer; padding: .6rem .2rem; font-size: .9rem; list-style: none; }
.blocos-feitos > summary::before { content: "▸ "; }
.blocos-feitos[open] > summary::before { content: "▾ "; }
.blocos-feitos .card { opacity: .8; }

/* Etapas › Lista: concluir bloco inteiro; blocos concluídos recolhidos */
.bloco-check { font-size: .82rem; font-weight: 500; gap: .4rem; cursor: pointer; margin: 0; }
.blocos-feitos > summary { cursor: pointer; padding: .6rem .2rem; font-size: .86rem; }
.blocos-feitos[open] > summary { margin-bottom: .2rem; }

/* Mapa das obras */
.mapa-wrap { padding: 0; overflow: hidden; }
.mapa-obras { height: min(68vh, 640px); min-height: 360px; width: 100%; z-index: 0; }
.mapa-obras.marcando, .mapa-obras.marcando .leaflet-interactive { cursor: crosshair; }
.mapa-legenda { display: flex; flex-wrap: wrap; gap: .4rem .9rem; margin: 0 0 .7rem; font-size: .84rem; }
.mapa-legenda a { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.mapa-legenda a.off { opacity: .4; text-decoration: line-through; }
.mapa-legenda small { color: var(--muted, #6b7a80); }
.ponto { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; margin-right: .35rem; vertical-align: -1px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.mapa-legenda .ponto { margin-right: 0; }
.pin-obra { background: none; border: 0; filter: drop-shadow(0 1px 2px rgba(0,0,0,.35)); }
.pin-pop { min-width: 180px; line-height: 1.4; }
.lista-sem { list-style: none; margin: 0; padding: 0; display: grid; gap: .35rem; }
.mapa-formas { display: inline-flex; gap: .8rem; margin-left: auto; color: var(--muted, #6b7a80); font-size: .78rem; }
.mapa-formas > span { display: inline-flex; align-items: center; gap: .25rem; }
.pin-obra { cursor: pointer; line-height: 0; }
.maplibregl-popup-content { border-radius: 10px; padding: .7rem .9rem; font: inherit; box-shadow: 0 6px 20px rgba(0,0,0,.15); }

/* Carregando: silhueta de cachorro salsicha correndo */
.carregando { display: flex; flex-direction: column; align-items: center; gap: .5rem; padding: 2.5rem 0; color: var(--muted); font-size: .85rem; }
.carregando-inicial { min-height: 60vh; justify-content: center; }
.salsicha { --passo: .56s; width: 120px; height: auto; overflow: visible; color: var(--teal, #154d61); }
.salsicha .s-cao { fill: currentColor; animation: s-pulo calc(var(--passo) / 2) ease-in-out infinite; }
.salsicha .s-rabo { fill: none; stroke: currentColor; stroke-width: 4.6; stroke-linecap: round; transform-origin: 33px 30px; animation: s-rabo calc(var(--passo) / 2) ease-in-out infinite alternate; }
.salsicha .s-orelha { fill: var(--teal-700, #0e3a4a); transform-origin: 104px 6px; animation: s-orelha calc(var(--passo) / 2) cubic-bezier(.45,0,.3,1.4) infinite alternate; }
/* ciclo da pata: apoiada, empurra para trás; depois levanta e volta para a frente */
.salsicha .s-perna { transform-box: fill-box; transform-origin: 50% 15%; animation: s-passo var(--passo) infinite; }
.salsicha .s-tl, .salsicha .s-fl { opacity: .55; }
.salsicha .s-tr, .salsicha .s-fl { animation-delay: calc(var(--passo) / -2); }
.salsicha .s-sombra { fill: var(--teal, #154d61); opacity: .13; transform-origin: 72px 58px; animation: s-sombra calc(var(--passo) / 2) ease-in-out infinite; }
.salsicha .s-chao { stroke: var(--teal, #154d61); stroke-opacity: .28; stroke-width: 1.6; stroke-linecap: round; stroke-dasharray: 3 7; animation: s-chao var(--passo) linear infinite; }
/* pata desenhada para baixo: ângulo negativo = pé à frente (direita), positivo = pé atrás.
   Apoio: vai da frente para trás em velocidade constante (empurra o corpo para a frente);
   depois levanta e volta para a frente com aceleração suave. */
@keyframes s-passo {
  0% { transform: rotate(-24deg); animation-timing-function: linear; }
  60% { transform: rotate(24deg); animation-timing-function: ease-out; }
  80% { transform: translateY(-3.2px) rotate(0deg); animation-timing-function: ease-in; }
  100% { transform: rotate(-24deg); }
}
@keyframes s-pulo { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-1.8px); } }
@keyframes s-rabo { from { transform: rotate(-12deg); } to { transform: rotate(14deg); } }
@keyframes s-orelha { 0% { transform: rotate(-22deg) scaleY(.92); } 55% { transform: rotate(18deg) scaleY(1.06); } 100% { transform: rotate(26deg) scaleY(1); } }
@keyframes s-sombra { 50% { transform: scaleX(.94); } }
@keyframes s-chao { to { stroke-dashoffset: 20; } }   /* chão anda para trás na mesma velocidade das patas apoiadas */
/* mesma velocidade para todos, inclusive com "menos movimento" ligado no sistema (é só o indicador de carregamento) */

/* Projetos › Quadros: logo do cliente (incorporadora) no canto do card dos prédios */
.quadro-txt { display: flex; align-items: flex-start; gap: .6rem; }
.quadro-txt > div { flex: 1; min-width: 0; }
.quadro-logo { flex: none; width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #fff; border: 1px solid var(--line); margin-top: -1px; }
img.falhou { display: none; }

/* Girar o Modelo (visualizador BIM federado) */
.girar { display: grid; grid-template-columns: 280px 1fr; gap: 14px; align-items: start; }
.girar-lado { padding-bottom: .4rem; }
.girar-disc { list-style: none; margin: 0; padding: 0 .9rem; }
.girar-disc li { padding: .6rem 0; border-top: 1px solid var(--line-2); font-size: .86rem; }
.girar-disc li:first-child { border-top: 0; }
.girar-disc li.sem { opacity: .75; }
.girar-disc li.falhou strong { color: var(--danger); }
.girar-arq { display: block; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.girar-op { display: flex; align-items: center; gap: .5rem; margin: .35rem 0 0 1.55rem; font-size: .74rem; }
.girar-op input { flex: 1; min-width: 0; }
.girar-env { display: inline-block; margin: .3rem 0 0 1.55rem; font-size: .8rem; cursor: pointer; }
.girar-hist { padding: .2rem .9rem .6rem; font-size: .8rem; }
.girar-hist summary { cursor: pointer; color: var(--muted); }
.girar-hist ul { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .25rem; }
.girar-hist li { display: flex; justify-content: space-between; gap: .4rem; }
.girar-palco { position: relative; padding: 0; overflow: hidden; }
.girar-barra { display: flex; flex-wrap: wrap; align-items: center; gap: .45rem; padding: .55rem .7rem; border-bottom: 1px solid var(--line); }
.girar-barra .btn.on { background: var(--teal); color: #fff; border-color: var(--teal); }
.girar-corte { display: inline-flex; align-items: center; gap: .35rem; font-size: .82rem; margin: 0; }
.girar-corte input[type=range] { width: 120px; }
.girar-tela { position: relative; height: min(70vh, 680px); min-height: 360px; background: #f3f5f5; touch-action: none; }
.girar-tela canvas { display: block; }
.girar-msg, .girar-vazio { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; color: var(--muted); font-size: .85rem; text-align: center; padding: 1rem; }
.girar-msg .salsicha { width: 120px; }
.girar-vazio strong { color: var(--ink); font-weight: 500; }
.girar-props { position: absolute; right: 12px; top: 60px; width: min(320px, calc(100% - 24px)); max-height: calc(100% - 110px); overflow: auto; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(16,40,48,.14); padding: .75rem .85rem; font-size: .8rem; }
.girar-pg { margin-top: .6rem; }
.girar-pgt { font-weight: 500; color: var(--teal); font-size: .76rem; letter-spacing: .03em; margin-bottom: .2rem; }
.girar-pg dl { display: grid; grid-template-columns: auto 1fr; gap: .15rem .7rem; margin: 0; }
.girar-pg dt { color: var(--muted); }
.girar-pg dd { margin: 0; word-break: break-word; }
.girar-dica { font-size: .72rem; margin: 0; padding: .45rem .7rem; border-top: 1px solid var(--line-2); }
@media (max-width: 860px) {
  .girar { grid-template-columns: 1fr; }
  .girar-palco { order: -1; }
  .girar-tela { height: 58vh; }
  .girar-props { top: auto; bottom: 40px; max-height: 45%; }
}
.girar-nova { padding: .7rem .9rem .8rem; border-top: 1px solid var(--line-2); font-size: .8rem; }
.girar-nova label[for] { display: block; color: var(--muted); margin-bottom: .3rem; }
.girar-nova select { flex: 1; min-width: 0; }
.girar-nova .btn { cursor: pointer; white-space: nowrap; }
.girar-disc .ponto, .girar-nova .ponto { flex: none; margin-right: 0; }
.girar > * { min-width: 0; }
.girar-prox { display: block; margin: .15rem 0 0 1.55rem; font-size: .72rem; }
.girar-prox code, .girar-regra code { font-size: .72rem; background: var(--teal-50); padding: 0 .25rem; border-radius: 3px; }
.girar-regra { display: block; margin-top: .45rem; font-size: .72rem; line-height: 1.4; }

/* botão de destaque "Girar o Modelo" (cabeçalho do projeto e do portal, acima das abas) */
.btn-girar { display: inline-flex; align-items: center; gap: .5rem; padding: .5rem .95rem .5rem .75rem; border-radius: 999px;
  background: var(--teal); color: #fff; font-weight: 500; font-size: .88rem; text-decoration: none; box-shadow: 0 2px 8px rgba(21,77,97,.25);
  transition: transform .12s, box-shadow .12s; white-space: nowrap; }
.btn-girar:hover { text-decoration: none; color: #fff; transform: translateY(-1px); box-shadow: 0 5px 14px rgba(21,77,97,.3); }
.btn-girar .ico { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; transition: transform .5s; }
.btn-girar:hover .ico { transform: rotate(180deg); }
.btn-girar.on { background: #fff; color: var(--teal); box-shadow: inset 0 0 0 2px var(--teal); }
.girar-regra code { word-break: break-all; }

/* Configurações › Sistema › Google Drive */
.drive-teste { margin-top: .9rem; padding: .7rem .9rem; border-radius: 8px; font-size: .84rem; border: 1px solid var(--line); }
.drive-teste.ok { background: #eef7f0; border-color: #cfe6d5; }
.drive-teste.erro { background: #fdf1ef; border-color: #f2d3cd; }
.drive-teste ul { list-style: none; margin: .4rem 0; padding: 0; display: grid; gap: .2rem; }
.drive-teste li.ok { color: #24704a; }
.drive-teste li.erro { color: var(--danger); }

/* ---------- repositório: aba Arquivos e visualizador ---------- */
.arq-lista { list-style: none; margin: 0; padding: 0; }
.arq-item { display: flex; align-items: center; gap: .6rem; padding: .55rem 1rem; border-top: 1px solid var(--line, #e3e8ea); flex-wrap: wrap; }
.arq-lista .arq-item:first-child { border-top: 0; }
.arq-ico { color: var(--muted, #6b7a80); display: inline-flex; }
.arq-nome { min-width: 0; overflow-wrap: anywhere; }
.arq-nome small { display: block; }
.arq-acoes { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.arq-pasta > summary { font-weight: 600; }
button.link { background: none; border: 0; padding: 0; color: var(--blue, #1f5f8b); cursor: pointer; font: inherit; text-align: left; }
button.link:hover { text-decoration: underline; }
.modal.modal-ver { width: min(1100px, 100%); height: min(92vh, 100%); display: flex; flex-direction: column; padding: .8rem; }
.ver-topo { display: flex; align-items: center; gap: .4rem; margin-bottom: .6rem; min-width: 0; }
.ver-topo strong { min-width: 0; }
.ver-corpo { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #f3f5f6; border-radius: 6px; overflow: auto; }
.ver-corpo iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.ver-corpo img { max-width: 100%; max-height: 100%; object-fit: contain; }
@media (max-width: 640px) { .modal.modal-ver { height: 100%; border-radius: 0; } .modal-bg:has(.modal-ver) { padding: 0; } .arq-acoes { width: 100%; } }
.arq-titulo { display: inline-flex; align-items: center; gap: .5rem; margin-right: auto; }
.ver-corpo:has(.pdf-paginas) { flex-direction: column; align-items: stretch; justify-content: flex-start; overflow: hidden; }
.pdf-barra { display: flex; gap: .3rem; align-items: center; padding: .4rem; border-bottom: 1px solid var(--line, #e3e8ea); background: var(--white, #fff); }
.pdf-paginas { flex: 1; min-height: 0; overflow: auto; padding: 12px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.pdf-pagina { background: #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .18); flex: none; }
.pdf-pagina canvas { display: block; }
.arq-item .arq-nome { flex: 1 1 14rem; }
.arq-envio .escolher { position: relative; cursor: pointer; }
.arq-envio .escolher input[type=file] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }

/* ---------- Compatibilização: painel (cartões · detalhamento · colaboração) ---------- */
.cp-barra { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .9rem; }
.cp-barra select { width: auto; max-width: 15rem; padding-top: .4rem; padding-bottom: .4rem; font-size: .84rem; }
.cp-barra .seg a { padding: .4rem .7rem; }
.cp-busca { flex: 1 1 14rem; display: flex; align-items: center; gap: .4rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 0 .6rem; margin: 0; color: var(--muted); }
.cp-busca input { border: 0; padding: .45rem 0; font-size: .86rem; background: transparent; box-shadow: none; }
.cp-busca input:focus { outline: none; }
.cp-menu { position: relative; }
.cp-menu > summary { list-style: none; cursor: pointer; }
.cp-menu > summary::-webkit-details-marker { display: none; }
.cp-menu-lista { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(15, 40, 50, .12); min-width: 15rem; padding: .3rem; display: flex; flex-direction: column; }
.cp-menu-lista > * { text-align: left; background: none; border: 0; padding: .55rem .7rem; border-radius: 6px; font: inherit; font-size: .86rem; color: var(--ink); cursor: pointer; }
.cp-menu-lista > *:hover { background: var(--teal-50); text-decoration: none; }
.cp-aviso { font-size: .82rem; color: var(--warn); background: var(--warn-bg); border-radius: 8px; padding: .4rem .7rem; margin: 0 0 .8rem; }
.cp-corpo.cards { display: grid; grid-template-columns: minmax(250px, 300px) minmax(0, 1fr) minmax(250px, 300px); gap: 1rem; align-items: start; }
.cp-lista-cards { display: flex; flex-direction: column; gap: .5rem; max-height: calc(100vh - 150px); overflow-y: auto; padding: 2px 4px 2px 2px; position: sticky; top: 1rem; }
.cp-conta { font-size: .76rem; padding: 0 .2rem; }
.cp-card { display: flex; flex-direction: column; gap: .45rem; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .7rem .75rem; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s, box-shadow .15s; width: 100%; }
.cp-card:hover { border-color: var(--teal-100); }
.cp-card.on { border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal) inset; background: #fbfefe; }
.cp-card.fechado { opacity: .78; }
.cp-card-topo, .cp-card-linha, .cp-card-pe { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; font-size: .76rem; }
.cp-card-topo .grow, .cp-card-pe .grow { flex: 1; }
.cp-cod { color: var(--teal); font-size: .84rem; font-variant-numeric: tabular-nums; }
.cp-card-meio { display: flex; gap: .6rem; align-items: flex-start; }
.cp-card-txt { flex: 1; font-size: .87rem; line-height: 1.35; font-weight: 500; }
.cp-mini { position: relative; flex: none; width: 54px; height: 42px; border-radius: 6px; overflow: hidden; background: var(--line-2); }
.cp-mini img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-mini em { position: absolute; right: 2px; bottom: 2px; font-style: normal; font-size: .64rem; background: rgba(0,0,0,.55); color: #fff; border-radius: 4px; padding: 0 3px; }
.cp-sit { display: inline-flex; align-items: center; padding: .1rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 500; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.cp-sit.sit-PENDENTE { background: var(--warn-bg); color: var(--warn); }
.cp-sit.sit-REANALISAR { background: var(--danger-bg); color: var(--danger); }
.cp-sit.sit-ATENDIDO { background: var(--ok-bg); color: var(--ok); }
.cp-sit.sit-ACATADO { background: var(--teal-50); color: var(--teal); }
.cp-crit { display: inline-flex; align-items: center; gap: .3rem; color: var(--ink-2); }
.cp-crit i { width: 8px; height: 8px; border-radius: 50%; background: #8aa0a8; }
.cp-crit.crit-ALTA i { background: #d64545; } .cp-crit.crit-MEDIA i { background: #e0a800; } .cp-crit.crit-BAIXA i { background: #7f9db0; }
.cp-loc, .cp-vis, .cp-ind { display: inline-flex; align-items: center; gap: .2rem; color: var(--muted); }
.cp-loc .ico, .cp-vis .ico, .cp-ind .ico { width: 13px; height: 13px; }
.cp-discs { display: flex; flex-wrap: wrap; gap: .25rem; }
.cp-disc { font-size: .68rem; font-weight: 600; letter-spacing: .03em; padding: .08rem .38rem; border-radius: 5px; border: 1px solid var(--line); color: var(--ink-2); background: #fff; }
.cp-disc.sit-ATENDIDO, .cp-disc.sit-ACATADO { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.cp-disc.sit-REANALISAR { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.cp-prazo { color: var(--muted); white-space: nowrap; }
.cp-prazo.atrasado, input.atrasado { color: var(--danger) !important; font-weight: 600; }
.cp-vazio-cards { background: #fff; border: 1px dashed var(--line); border-radius: 10px; padding: 1rem; text-align: center; }
.cp-centro { min-width: 0; }
.cp-det { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 1.1rem 1.2rem; }
.cp-det-topo { display: flex; gap: 1rem; align-items: flex-start; border-bottom: 1px solid var(--line-2); padding-bottom: .8rem; margin-bottom: .4rem; }
.cp-det-topo h2 { margin: .2rem 0 0; font-size: 1.12rem; line-height: 1.35; }
.cp-det-cod { color: var(--teal); font-weight: 600; font-size: .86rem; }
.cp-det-cod .muted { font-weight: 400; }
.cp-det-acoes { display: flex; gap: .4rem; align-items: center; }
.cp-bloco { padding: .8rem 0; border-bottom: 1px solid var(--line-2); }
.cp-bloco:last-of-type { border-bottom: 0; }
.cp-bloco h3 { font-size: .74rem; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 .6rem; font-weight: 600; }
.cp-campos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem .8rem; }
.cp-campos label, .cp-largo { font-size: .76rem; color: var(--muted); display: flex; flex-direction: column; gap: .2rem; margin: 0; }
.cp-campos input, .cp-campos select { font-size: .86rem; padding: .4rem .55rem; color: var(--ink); }
.cp-campos input:disabled, .cp-campos select:disabled, .cp-det textarea:disabled, .cp-tab input:disabled, .cp-tab select:disabled { background: var(--line-2); color: var(--ink-2); opacity: 1; }
.cp-campos label.crit-ALTA select { border-left: 4px solid #d64545; } .cp-campos label.crit-MEDIA select { border-left: 4px solid #e0a800; } .cp-campos label.crit-BAIXA select { border-left: 4px solid #7f9db0; }
.cp-largo { margin-bottom: .6rem; }
.cp-det textarea { font-size: .88rem; line-height: 1.45; }
.cp-imgs { border: 1px dashed var(--line); border-radius: 8px; padding: .6rem; display: flex; flex-direction: column; gap: .5rem; }
.cp-imgs.alvo { border-color: var(--teal); background: var(--teal-50); }
.cp-rot { font-size: .76rem; color: var(--muted); }
.cp-imgs .thumbs { display: flex; gap: .4rem; flex-wrap: wrap; }
.cp-imgs .thumb img { width: 120px; height: 84px; object-fit: cover; }
.cp-tab-wrap { overflow-x: auto; }
.cp-tab { width: 100%; border-collapse: collapse; font-size: .84rem; }
.cp-tab th { text-align: left; font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 600; padding: .3rem .4rem; border-bottom: 1px solid var(--line); }
.cp-tab td { padding: .35rem .4rem; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.cp-tab select, .cp-tab input { font-size: .84rem; padding: .3rem .45rem; min-width: 7.5rem; }
.cp-tab select.sit-ATENDIDO, .cp-tab select.sit-ACATADO { color: var(--ok); font-weight: 500; }
.cp-tab select.sit-PENDENTE { color: var(--warn); font-weight: 500; } .cp-tab select.sit-REANALISAR { color: var(--danger); font-weight: 500; }
.cp-tab .del { background: none; border: 0; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.cp-tab .del:hover { color: var(--danger); }
.cp-estado { font-size: .76rem; margin: .4rem 0 0; } .cp-estado.erro { color: var(--danger); }
.cp-vazio-det { background: #fff; border: 1px dashed var(--line); border-radius: 12px; padding: 3rem 1rem; text-align: center; }
.cp-vazio-det .ico { width: 28px; height: 28px; }
.cp-colab { background: #fff; border: 1px solid var(--line); border-radius: 12px; position: sticky; top: 1rem; max-height: calc(100vh - 150px); display: flex; flex-direction: column; overflow: hidden; }
.cp-colab-abas { display: flex; border-bottom: 1px solid var(--line); }
.cp-colab-abas button { flex: 1; background: none; border: 0; border-bottom: 2px solid transparent; padding: .7rem .5rem; font: inherit; font-size: .86rem; color: var(--muted); cursor: pointer; }
.cp-colab-abas button.on { color: var(--teal); border-bottom-color: var(--teal); font-weight: 500; }
[data-col-corpo] { overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .8rem; min-height: 0; }
.cp-coms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .8rem; }
.cp-coms li { display: flex; gap: .55rem; align-items: flex-start; }
.cp-coms .avatar.sm { width: 28px; height: 28px; font-size: .68rem; }
.cp-coms li.meu .avatar { background: var(--teal-700, #0f4c5c); }
.cp-com-topo { display: flex; gap: .35rem; align-items: baseline; flex-wrap: wrap; font-size: .82rem; }
.cp-coms p { margin: .2rem 0; font-size: .85rem; line-height: 1.4; white-space: pre-line; overflow-wrap: anywhere; }
.cp-coms small { font-size: .72rem; }
.cp-com-form { display: flex; flex-direction: column; gap: .4rem; border-top: 1px solid var(--line-2); padding-top: .7rem; }
.cp-com-form textarea { font-size: .86rem; }
.cp-com-form select { width: auto; font-size: .8rem; padding: .3rem .45rem; }
.cp-hist { list-style: none; margin: 0; padding: 0 0 0 .3rem; border-left: 2px solid var(--line-2); }
.cp-hist li { position: relative; padding: 0 0 .9rem .9rem; display: flex; }
.cp-hist .cp-ponto { position: absolute; left: -6px; top: .3rem; width: 10px; height: 10px; border-radius: 50%; background: var(--teal); border: 2px solid #fff; }
.cp-hist p { margin: 0; font-size: .84rem; }
.cp-hist small { font-size: .72rem; }
.cp-lista .xl { min-width: 1500px; }
.cp-lista tr[data-abrir] { cursor: pointer; }
.cp-lista tr[data-abrir]:hover td { background: var(--teal-50); }
.cp-lista .cp-txt { min-width: 260px; max-width: 360px; white-space: pre-line; }
.cp-lista .cp-txt-c { min-width: 180px; font-size: .78rem; }
.cp-chips label { margin: 0; }
.cp-manual { font-size: .84rem; line-height: 1.6; }
@media (max-width: 1250px) { .cp-corpo.cards { grid-template-columns: minmax(240px, 290px) minmax(0, 1fr); } .cp-colab { grid-column: 2; position: static; max-height: none; } }
@media (max-width: 900px) {
  .cp-corpo.cards { grid-template-columns: 1fr; }
  .cp-lista-cards { position: static; max-height: 46vh; }
  .cp-colab { grid-column: auto; }
  .cp-barra select { flex: 1 1 45%; max-width: none; }
  .cp-det { padding: .9rem; }
}
/* registro (visualização), formulário e visualizador de anexos */
.cp-ver .cp-det-acoes { flex-wrap: wrap; justify-content: flex-end; max-width: 55%; }
.cp-ver .cp-det-acoes .btn { gap: .3rem; }
.cp-ver .btn.cp-ok { color: var(--ok); } .cp-ver .btn.cp-alerta { color: var(--danger); }
.cp-inds { display: flex; flex-wrap: wrap; gap: .5rem .7rem; align-items: center; font-size: .8rem; padding: .2rem 0 .7rem; border-bottom: 1px solid var(--line-2); }
.cp-texto { white-space: pre-line; font-size: .92rem; line-height: 1.55; overflow-wrap: anywhere; max-height: 22rem; overflow-y: auto; }
.cp-mais { border-bottom: 1px solid var(--line-2); padding: .5rem 0; }
.cp-mais > summary { cursor: pointer; font-size: .84rem; color: var(--teal); font-weight: 500; padding: .2rem 0; }
.cp-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .6rem 1rem; margin: .7rem 0 .3rem; }
.cp-dl dt { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.cp-dl dd { margin: .1rem 0 0; font-size: .86rem; }
.cp-dl .cp-dl-largo { grid-column: 1 / -1; }
.cp-abas-int { display: flex; gap: .2rem; border-bottom: 1px solid var(--line); margin: .9rem 0 .8rem; }
.cp-abas-int button { background: none; border: 0; border-bottom: 2px solid transparent; padding: .55rem .9rem; font: inherit; font-size: .88rem; color: var(--muted); cursor: pointer; }
.cp-abas-int button.on { color: var(--teal); border-bottom-color: var(--teal); font-weight: 500; }
.cp-sem-anexo { text-align: center; padding: 1.6rem 1rem; border: 1px dashed var(--line); border-radius: 10px; }
.cp-sem-anexo .ico { width: 26px; height: 26px; }
.cp-visor { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; outline: none; }
.cp-visor:fullscreen { display: flex; flex-direction: column; border-radius: 0; }
.cp-visor-barra { display: flex; align-items: center; gap: .25rem; padding: .4rem .5rem; border-bottom: 1px solid var(--line-2); font-size: .8rem; }
.cp-visor-barra button { background: #fff; border: 1px solid var(--line); border-radius: 6px; min-width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--teal); font-size: 1rem; }
.cp-visor-barra button:hover { background: var(--teal-50); }
.cp-visor-barra .ico { width: 16px; height: 16px; }
.cp-visor-nome { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-visor-zoom { min-width: 3rem; text-align: center; color: var(--muted); font-variant-numeric: tabular-nums; }
.cp-visor-palco { position: relative; height: 420px; background: #f3f5f6; overflow: auto; display: flex; align-items: center; justify-content: center; }
.cp-visor:fullscreen .cp-visor-palco { height: auto; flex: 1; }
.cp-visor-palco img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center center; transition: transform .15s; }
.cp-visor-palco img.ampliada { max-width: none; max-height: none; cursor: grab; transform-origin: top left; }
.cp-visor-palco.carregando-img::after { content: "Carregando…"; color: var(--muted); font-size: .84rem; }
.cp-seta { position: absolute; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: rgba(255,255,255,.92); color: var(--teal); font-size: 1.5rem; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.cp-seta.ant { left: .6rem; } .cp-seta.prox { right: .6rem; }
.cp-visor-minis { display: flex; gap: .4rem; padding: .5rem; overflow-x: auto; border-top: 1px solid var(--line-2); justify-content: center; }
.cp-visor-minis button { flex: none; width: 64px; height: 48px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; background: var(--line-2); cursor: pointer; }
.cp-visor-minis button.on { border-color: var(--teal); }
.cp-visor-minis img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-links { list-style: none; margin: .7rem 0 0; padding: 0; display: flex; flex-direction: column; gap: .3rem; font-size: .86rem; }
.cp-links li { display: flex; gap: .4rem; align-items: center; overflow-wrap: anywhere; }
.cp-links .ico { width: 15px; height: 15px; color: var(--muted); flex: none; }
.modal.cp-form { width: min(920px, 100%); max-height: min(92vh, 100%); padding: 0; display: flex; flex-direction: column; }
.cp-form-topo { display: flex; align-items: center; gap: .7rem; padding: .9rem 1.2rem; border-bottom: 1px solid var(--line); }
.cp-form-topo h2 { margin: 0; font-size: 1.1rem; }
.cp-form-topo .iconbtn { font-size: 1.4rem; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--muted); }
.cp-form-corpo { overflow-y: auto; padding: 1rem 1.2rem; flex: 1; min-height: 0; }
.cp-form-corpo .cp-campos { margin: .4rem 0 .6rem; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.cp-form-pe { display: flex; justify-content: flex-end; gap: .5rem; padding: .8rem 1.2rem; border-top: 1px solid var(--line); background: #fbfcfc; border-radius: 0 0 12px 12px; }
.cp-form .cp-imgs .thumbs { display: flex; flex-wrap: wrap; gap: .4rem; }
.cp-form .cp-imgs .thumb { position: relative; }
.cp-form .cp-imgs .thumb img { width: 110px; height: 78px; object-fit: cover; border-radius: 6px; display: block; }
.cp-form .cp-imgs .thumb button { position: absolute; top: 2px; right: 2px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; }
@media (max-width: 640px) {
  .modal.cp-form { max-height: 100%; height: 100%; border-radius: 0; }
  .modal-bg:has(.cp-form) { padding: 0; }
  .cp-visor-palco { height: 300px; }
  .cp-ver .cp-det-acoes { max-width: none; justify-content: flex-start; }
  .cp-ver .cp-det-topo { flex-direction: column; }
}
.cp-ver-topo h2 { margin: .45rem 0 .5rem; font-size: 1.15rem; line-height: 1.35; }
.cp-ver-linha { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.cp-ver .cp-det-acoes { max-width: none; }
.cp-visor-palco:has(img.ampliada) { display: block; text-align: left; }
.cp-visor-palco img.ampliada { transform: none; margin: 0; }
@media (max-width: 640px) { .cp-visor-barra { flex-wrap: wrap; } .cp-visor-nome { flex: 1 1 100%; } .cp-visor-barra .grow { display: none; } }
.cp-visor-quadro { position: relative; }
.cp-visor:fullscreen .cp-visor-quadro { flex: 1; display: flex; min-height: 0; }
.cp-visor:fullscreen .cp-visor-quadro .cp-visor-palco { flex: 1; height: auto; }

/* ---------- Ponto Eletrônico ---------- */
.pt-saudacao { font-family: var(--font-titulo, inherit); font-size: 1.35rem; color: var(--teal); margin: 0 0 .8rem; font-weight: 500; }
.pt-cartao { margin-bottom: 1.2rem; border-left: 4px solid var(--line); }
.pt-cartao.e-TRABALHANDO { border-left-color: var(--ok, #2f855a); } .pt-cartao.e-PAUSA { border-left-color: #e0a800; } .pt-cartao.e-PENDENTE { border-left-color: var(--danger); }
.pt-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; padding: .9rem 1.1rem .4rem; }
.pt-topo h2 { margin: 0; font-size: 1.05rem; display: flex; align-items: center; gap: .4rem; }
.pt-estado { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 500; padding: .2rem .6rem; border-radius: 999px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.pt-estado i { width: 8px; height: 8px; border-radius: 50%; background: #9aa9ae; }
.pt-estado.e-TRABALHANDO { background: var(--ok-bg); color: var(--ok); } .pt-estado.e-TRABALHANDO i { background: var(--ok); animation: pt-pulso 1.6s infinite; }
.pt-estado.e-PAUSA { background: var(--warn-bg); color: var(--warn); } .pt-estado.e-PAUSA i { background: #e0a800; }
.pt-estado.e-ENCERRADO { background: var(--teal-50); color: var(--teal); } .pt-estado.e-ENCERRADO i { background: var(--teal); }
.pt-estado.e-PENDENTE { background: var(--danger-bg); color: var(--danger); } .pt-estado.e-PENDENTE i { background: var(--danger); }
@keyframes pt-pulso { 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .pt-estado.e-TRABALHANDO i { animation: none; } }
.pt-corpo { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem 1.6rem; align-items: center; padding: .4rem 1.1rem .9rem; }
.pt-relogio { display: flex; flex-direction: column; }
.pt-relogio span { font-size: 2.3rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .02em; color: var(--ink); line-height: 1.1; }
.pt-relogio small { color: var(--muted); font-size: .76rem; }
.pt-inds { display: flex; gap: 1.4rem; flex-wrap: wrap; }
.pt-inds > div { display: flex; flex-direction: column; gap: .15rem; font-size: .8rem; }
.pt-inds strong { font-size: 1rem; font-weight: 600; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
.pt-botoes { display: flex; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.pt-botoes .btn { min-height: 44px; padding-left: 1.1rem; padding-right: 1.2rem; gap: .45rem; font-size: .95rem; }
.pt-botoes .ico { width: 18px; height: 18px; }
.pt-play .ico { fill: currentColor; }
.btn.ghost.pt-pause { color: #a36b00; border-color: #e8c66a; } .btn.ghost.pt-stop { color: var(--danger); border-color: #e7b3b3; }
.pt-fim { margin: 0; font-size: .86rem; max-width: 22rem; text-align: right; }
.pt-erro { grid-column: 1 / -1; margin: 0; color: var(--danger); font-size: .84rem; }
.pt-pe { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; border-top: 1px solid var(--line-2); padding: .55rem 1.1rem; font-size: .84rem; }
.pt-pe .grow { flex: 1; }
.pt-pe .linkbtn { display: inline-flex; align-items: center; gap: .3rem; }
.pt-pe .ico { width: 15px; height: 15px; }
@media (max-width: 760px) {
  .pt-corpo { grid-template-columns: 1fr; }
  .pt-botoes { justify-content: stretch; } .pt-botoes .btn { flex: 1; justify-content: center; }
  .pt-fim { text-align: left; }
  .pt-relogio span { font-size: 2rem; }
}
.modal.modal-largo { width: min(860px, 100%); }
.pt-conf { display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center; background: var(--teal-50); border-radius: 10px; padding: .6rem .9rem; margin: .8rem 0; }
.pt-conf > div { display: flex; flex-direction: column; font-size: .76rem; }
.pt-conf strong { font-size: 1rem; }
.pt-ativs { list-style: none; margin: 0 0 .6rem; padding: 0; }
.pt-ativs li { display: flex; gap: .7rem; align-items: center; padding: .5rem 0; border-bottom: 1px solid var(--line-2); font-size: .86rem; }
.pt-ativs .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.pt-hora { font-variant-numeric: tabular-nums; color: var(--teal); font-weight: 500; white-space: nowrap; min-width: 6.5rem; }
.pt-ativs .del { background: none; border: 0; color: var(--muted); font-size: 1.1rem; cursor: pointer; }
.pt-just { margin-top: .8rem; } .pt-just summary { cursor: pointer; color: var(--teal); font-size: .86rem; }
.pt-just form { display: flex; flex-direction: column; gap: .4rem; margin-top: .5rem; align-items: flex-start; }
.pt-hist { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.pt-hist [data-detalhe] { position: sticky; top: 1rem; }
.pt-linha { cursor: pointer; } .pt-linha.on td { background: var(--teal-50); }
.pt-sub { font-size: .76rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 1rem 0 .5rem; }
.pt-tempo { margin-left: .2rem; }
.cp-ponto.t-PAUSE { background: #e0a800; } .cp-ponto.t-STOP, .cp-ponto.t-AUTO_STOP { background: var(--ink-2); }
.pt-orig summary { cursor: pointer; font-size: .82rem; color: var(--teal); }
.pt-legal { font-size: .74rem; color: var(--muted); margin-top: 1.2rem; }
.pt-jtab input[type=time] { min-width: 6rem; }
@media (max-width: 1000px) { .pt-hist { grid-template-columns: 1fr; } .pt-hist [data-detalhe] { position: static; } }
@media print {
  .side, .top, .mobile-nav, .demo-banner, .nao-imprimir, .menu-toggle { display: none !important; }
  .main, .content { margin: 0 !important; padding: 0 !important; }
  .pt-rel { break-inside: avoid; box-shadow: none; border: 1px solid #ccc; }
}


/* Planilha de horas × Ponto Eletrônico */
.xl td.mob-rot { display: none; }
.xl td.calc input.dur { text-align: right; color: var(--teal-700); font-weight: 500; width: 3.6rem; padding: .32rem .2rem; font-variant-numeric: tabular-nums; }
.xl td.calc input.dur[readonly] { cursor: default; }
.xl td.calc input.dur:not([readonly]):not(:disabled) { background: #fff; box-shadow: inset 0 0 0 1px #d6e3e5; }
.xl td.calc input.dur:not([readonly]):not(:disabled):focus { box-shadow: none; }
.xl td.calc.hrs { padding: 0; }
.xl td.dia[data-focar] { cursor: pointer; }
.xl td.hm.trava input { color: var(--teal-700); font-weight: 600; cursor: not-allowed; }
.xl td.hm.trava { background-image: linear-gradient(transparent calc(100% - 2px), #b8cfd3 0); }
.xl tr.sugerida td { background: #f6fbfb; }
.xl tr.sugerida td.hm input { color: var(--teal); font-style: italic; }
.xl tr.foco td.dia { box-shadow: inset 4px 0 0 var(--warn); }
.xl tr.foco td { background-color: #fffaf0; }
.xl tr.pt-faixa td { background: #eef5f6; border-top: 1px solid #cfdcdf; padding: .22rem .5rem; position: sticky; left: 0; }
.xl tr.pt-faixa.foco td { background: #fdf3df; }
.pt-faixa-in { display: flex; flex-wrap: wrap; gap: .25rem 1.1rem; align-items: center; font-size: .74rem; color: var(--ink-2); }
.pt-faixa-in .linkbtn { display: inline-flex; gap: .3rem; align-items: center; font-size: .74rem; }
.pt-faixa-in .linkbtn .ico { width: 14px; height: 14px; }
.pt-faixa-in [hidden] { display: none !important; }
.pt-faixa-in .pt-int { font-variant-numeric: tabular-nums; color: var(--teal-700); }
.pt-faixa-in .badge { font-size: .66rem; }
.hp-conf { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 0; margin-bottom: .9rem; padding: 0; }
.hp-conf > div { padding: .8rem 1rem; }
.hp-conf .hp-conf-mes { border-left: 1px solid var(--line); background: #fafcfc; border-radius: 0 var(--radius) var(--radius) 0; }
.hp-conf .hp-conf-tit { display: flex; gap: .5rem; align-items: baseline; flex-wrap: wrap; text-transform: none; }
.hp-conf .pt-conf { margin: .5rem 0 .3rem; }
.hp-conf .hp-dica { margin: .4rem 0; }
.hp-just-txt { font-size: .82rem; margin: .3rem 0 0; }
@media (max-width: 860px) {
  .hp-conf { grid-template-columns: 1fr; }
  .hp-conf .hp-conf-mes { border-left: 0; border-top: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); }
}
/* celular: cada linha da planilha vira um cartão (mesmos campos, mesma gravação) */
@media (max-width: 760px) {
  .xl-wrap:has(table[data-planilha]) { max-height: none; overflow: visible; border: 0; background: none; }
  table.xl[data-planilha], .xl[data-planilha] tbody, .xl[data-planilha] tfoot { display: block; min-width: 0; }
  .xl[data-planilha] thead { display: none; }
  .xl[data-planilha] td { border: 0 !important; }
  .xl[data-planilha] tr[data-linha] { display: grid; grid-template-columns: 4.4rem repeat(4, 2.5rem) minmax(0, 1fr) auto; align-items: center; gap: .25rem .3rem;
    background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .5rem .55rem; margin: 0 0 .5rem; }
  .xl[data-planilha] tr[data-linha] td { background: none !important; padding: 0; min-width: 0 !important; }
  .xl[data-planilha] tr[data-linha] td.dia { grid-area: 1 / 1 / 2 / 4; font-size: .92rem; box-shadow: none !important; }
  .xl[data-planilha] tr.cont td.dia, .xl[data-planilha] tr.cont td.sem { color: var(--muted); }
  .xl[data-planilha] tr[data-linha] td.sem { grid-area: 1 / 4 / 2 / 6; }
  .xl[data-planilha] tr[data-linha] td.tot { grid-area: 1 / 6 / 2 / 7; justify-self: end; font-weight: 600; }
  .xl[data-planilha] tr[data-linha] td.acoes { grid-area: 1 / 7 / 2 / 8; }
  .xl[data-planilha] tr[data-linha] td.mob-rot { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
  .xl[data-planilha] tr[data-linha] td.b-m.mob-rot { grid-area: 2 / 1; } .xl[data-planilha] tr[data-linha] td.b-t.mob-rot { grid-area: 5 / 1; }
  .xl[data-planilha] tr[data-linha] td.b-m.eh { grid-area: 2 / 2; } .xl[data-planilha] tr[data-linha] td.b-m.em { grid-area: 2 / 3; }
  .xl[data-planilha] tr[data-linha] td.b-m.sh { grid-area: 2 / 4; } .xl[data-planilha] tr[data-linha] td.b-m.sm { grid-area: 2 / 5; }
  .xl[data-planilha] tr[data-linha] td.b-m.hrs { grid-area: 2 / 6 / 3 / 8; }
  .xl[data-planilha] tr[data-linha] td.b-m.proj { grid-area: 3 / 1 / 4 / 6; } .xl[data-planilha] tr[data-linha] td.b-m.etp { grid-area: 3 / 6 / 4 / 8; }
  .xl[data-planilha] tr[data-linha] td.b-m.atv { grid-area: 4 / 1 / 5 / 8; }
  .xl[data-planilha] tr[data-linha] td.b-t.eh { grid-area: 5 / 2; } .xl[data-planilha] tr[data-linha] td.b-t.em { grid-area: 5 / 3; }
  .xl[data-planilha] tr[data-linha] td.b-t.sh { grid-area: 5 / 4; } .xl[data-planilha] tr[data-linha] td.b-t.sm { grid-area: 5 / 5; }
  .xl[data-planilha] tr[data-linha] td.b-t.hrs { grid-area: 5 / 6 / 6 / 8; }
  .xl[data-planilha] tr[data-linha] td.b-t.proj { grid-area: 6 / 1 / 7 / 6; } .xl[data-planilha] tr[data-linha] td.b-t.etp { grid-area: 6 / 6 / 7 / 8; }
  .xl[data-planilha] tr[data-linha] td.b-t.atv { grid-area: 7 / 1 / 8 / 8; }
  .xl[data-planilha] tr[data-linha] td.b-t.mob-rot, .xl[data-planilha] tr[data-linha] td.b-t.hm, .xl[data-planilha] tr[data-linha] td.b-t.hrs { border-top: 1px dashed var(--line); padding-top: .4rem; margin-top: .2rem; }
  .xl[data-planilha] tr[data-linha] td input, .xl[data-planilha] tr[data-linha] td select { border: 1px solid var(--line); border-radius: 6px; background: #fff; min-height: 2.1rem; }
  .xl[data-planilha] tr[data-linha] td.hm input { width: 100%; }
  .xl[data-planilha] tr[data-linha] td.hrs input.dur { width: 100%; text-align: left; }
  .xl[data-planilha] tr[data-linha] td.hrs input.dur[readonly] { border-color: transparent; background: var(--teal-50); }
  .xl[data-planilha] tr.importada, .xl[data-planilha] tr.pt-faixa { display: block; margin: 0 0 .5rem; }
  .xl[data-planilha] tr.importada { display: flex; flex-wrap: wrap; gap: .1rem .5rem; padding: .4rem .55rem; border-radius: 10px; background: #fbfaf5; }
  .xl[data-planilha] tr.importada td { padding: 0; background: none; }
  .xl[data-planilha] tr.importada td:empty { display: none; }
  .xl[data-planilha] tr.pt-faixa td { display: block; border-radius: 10px; position: static; }
  .xl[data-planilha] tfoot tr { display: flex; justify-content: space-between; }
}