/* Controle de Obra e Empreita — componentes base
   Só usa variáveis de tokens.css. Ver docs/DESIGN.md seção 5. */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--fonte); font-size: var(--texto-base); line-height: 1.35; color: var(--grafite); background: var(--papel); -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--azul-2); }
p { margin: 0 0 8px; }
h1, h2, h3 { margin: 0; }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 18px; }
.suave { color: var(--suave); }
.pequeno { font-size: 15px; }
.forte { font-weight: 800; }
.num { font-weight: 900; font-variation-settings: "wdth" 100; }
.escondido { display: none !important; }

/* ---------- Tela ---------- */
.tela { max-width: 480px; margin: 0 auto; min-height: 100dvh; background: var(--papel); padding-bottom: 170px; position: relative; }
/* nada pode empurrar a tela para o lado (campos em grade, tabelas): o que passar fica cortado, não rola */
.tela { overflow-x: clip; }
.conteudo input, .conteudo select, .conteudo textarea { max-width: 100%; min-width: 0; }
.conteudo { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.secao-titulo { display: flex; align-items: center; justify-content: space-between; margin: 8px 0 0; }
.secao-titulo h2 { display: flex; align-items: center; gap: 8px; }

/* Topo azul com grade de planta */
.topo { background: var(--azul); color: var(--branco); padding: 20px 16px 18px; position: relative; overflow: hidden; }
.topo::before { content: ""; position: absolute; inset: 0; opacity: .18; pointer-events: none;
  background-image: linear-gradient(var(--sobre-azul) 1px, transparent 1px), linear-gradient(90deg, var(--sobre-azul) 1px, transparent 1px);
  background-size: 24px 24px; }
.topo::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: var(--trena); }
.topo > * { position: relative; }
.topo h1 { color: var(--branco); }
.topo .sub { color: var(--sobre-azul); font-size: 16px; margin-top: 4px; }
.topo-linha { display: flex; align-items: center; gap: 12px; }
.topo-linha .cresce { flex: 1; min-width: 0; }
.botao-topo { width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: var(--branco); display: grid; place-items: center; flex: none; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--trena); color: var(--grafite); display: grid; place-items: center; font-weight: 900; font-size: 20px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Ícones ---------- */
.ico { width: 24px; height: 24px; flex: none; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ico.g { width: 32px; height: 32px; }
.ico.gg { width: 48px; height: 48px; stroke-width: 1.8; }

/* ---------- Botões ---------- */
.botao-principal, .botao-secundario, .botao-whats, .botao-perigo {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: var(--toque-acao); padding: 0 20px; border-radius: var(--raio-botao); text-decoration: none; }
.botao-principal { border: 0; background: var(--trena); color: var(--grafite); font-weight: 800; font-size: 18px; }
.botao-principal:active { background: var(--trena-escuro); }
.botao-secundario { border: 2px solid var(--azul-2); background: var(--branco); color: var(--azul-2); font-weight: 700; font-size: 18px; }
.botao-whats { border: 0; background: var(--whats); color: var(--whats-texto); font-weight: 800; font-size: 18px; }
.botao-perigo { border: 2px solid var(--erro); background: var(--branco); color: var(--erro); font-weight: 700; font-size: 18px; }
.botao-texto { background: none; border: 0; color: var(--azul-2); font-weight: 700; min-height: var(--toque-min); padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; }
.linha-botoes { display: flex; gap: 10px; }
.linha-botoes > * { flex: 1; }

/* Lançar: par fixo "Digitar" + "Falar". Voz nunca é o único caminho. */
.lancar { position: fixed; right: 16px; bottom: 84px; display: flex; gap: 10px; align-items: center; z-index: 20; }
.lancar .botao-digitar, .lancar .botao-mic { height: 60px; border-radius: 999px; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 20px 0 16px; font-weight: 800; font-size: 17px; flex: none; }
.lancar .botao-digitar { background: var(--branco); color: var(--azul-2); border: 2px solid var(--azul-2); box-shadow: 0 4px 12px rgba(22,54,92,.18); }
.lancar .botao-mic { background: var(--azul-2); color: var(--branco); box-shadow: 0 6px 16px rgba(22,54,92,.35); }
.lancar .ico { width: 28px; height: 28px; }
.botao-mic.ouvindo { background: var(--erro) !important; animation: pulso 1.1s ease-in-out infinite; }
@keyframes pulso { 0%,100% { box-shadow: 0 0 0 0 rgba(179,38,30,.45); } 50% { box-shadow: 0 0 0 16px rgba(179,38,30,0); } }
@media (min-width: 520px) { .lancar { right: calc(50% - 240px + 16px); } }

/* ---------- Barra inferior ---------- */
.barra-inferior { position: fixed; left: 0; right: 0; bottom: 0; background: var(--branco); border-top: 1px solid var(--linha); display: flex; z-index: 20; padding-bottom: env(safe-area-inset-bottom); }
.barra-inferior > div { max-width: 480px; margin: 0 auto; width: 100%; display: flex; }
.barra-inferior a, .barra-inferior button { flex: 1; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-decoration: none; color: var(--suave); font-size: 14px; font-weight: 700; border: 0; background: none; }
.barra-inferior .ativo { color: var(--azul); }
.barra-inferior .ativo .ico { stroke-width: 2.6; }

/* ---------- Cartões e listas ---------- */
.cartao { background: var(--branco); border-radius: var(--raio-cartao); padding: 14px 16px; box-shadow: 0 1px 2px rgba(38,43,49,.06); }
a.cartao { display: block; text-decoration: none; color: inherit; } /* link-cartão: sem isso o fundo quebra em pedaços nas bordas (inline) */
.avatar { overflow: hidden; }
.cartao.toque { cursor: pointer; }
.cartao.toque:active { background: #F7F9FB; }
.cartao-linha { display: flex; align-items: center; gap: 12px; }
.cartao-linha .cresce { flex: 1; min-width: 0; }
.cartao-titulo { font-weight: 800; font-size: 19px; line-height: 1.2; }
.lista { display: flex; flex-direction: column; gap: 10px; }
.lista-compacta { background: var(--branco); border-radius: var(--raio-cartao); overflow: hidden; }
.lista-compacta > * { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 10px 16px; border-bottom: 1px solid var(--linha); color: inherit; text-decoration: none; }
.lista-compacta > *:last-child { border-bottom: 0; }
.lista-compacta .cresce { flex: 1; min-width: 0; }
.seta { color: var(--suave); }
.ico-quadro { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--papel); color: var(--azul); }
.ico-quadro.azul { background: var(--azul); color: var(--branco); }
.ico-quadro.trena { background: var(--trena); color: var(--grafite); }
.ico-quadro.ok { background: var(--ok-fundo); color: var(--ok); }
.ico-quadro.atencao { background: var(--atencao-fundo); color: var(--atencao); }
.ico-quadro.erro { background: var(--erro-fundo); color: var(--erro); }

/* Chips (escolher em vez de digitar) */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: var(--toque-min); padding: 0 16px; border-radius: var(--raio-chip); border: 2px solid var(--linha); background: var(--branco); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.chip.marcado { border-color: var(--azul-2); background: var(--azul-2); color: var(--branco); }
.chip.mais { border-style: dashed; color: var(--azul-2); }

/* Abas */
.abas { display: flex; background: var(--azul); padding: 0 4px; }
.abas a, .abas button { flex: 1; min-width: 0; min-height: 60px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--sobre-azul); font-weight: 700; font-size: 14px; text-decoration: none; border: 0; background: none; border-bottom: 4px solid transparent; white-space: nowrap; padding: 6px 0 4px; }
.abas .ativa { color: var(--branco); border-bottom-color: var(--trena); }

/* ---------- Situação ---------- */
.selo { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border-radius: var(--raio-chip); font-weight: 800; font-size: 15px; white-space: nowrap; }
.selo .ico { width: 18px; height: 18px; stroke-width: 2.6; }
.selo.ok { background: var(--ok-fundo); color: var(--ok); }
.selo.atencao { background: var(--atencao-fundo); color: #7A6200; }
.selo.erro { background: var(--erro-fundo); color: var(--erro); }
.selo.neutro { background: var(--papel); color: var(--suave); }
.selo.azul { background: #E3ECF6; color: var(--azul); }

/* Barra de progresso */
.progresso { display: flex; flex-direction: column; gap: 6px; }
.progresso .trilho { height: 14px; border-radius: 999px; background: var(--linha); overflow: hidden; }
.progresso .cheio { height: 100%; border-radius: 999px; background: var(--azul-2); }
.progresso.atencao .cheio { background: var(--trena); }
.progresso.erro .cheio { background: var(--erro); }
.progresso .legenda { display: flex; justify-content: space-between; font-weight: 700; font-size: 16px; }
.progresso.grande .trilho { height: 20px; }

/* Semáforo da obra */
.semaforo { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.semaforo.ok { background: var(--ok); } .semaforo.atencao { background: var(--trena-escuro); } .semaforo.erro { background: var(--erro); } .semaforo.neutro { background: var(--linha); }

/* ---------- Pessoa com rosto ---------- */
.pessoa { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 96px; text-align: center; background: none; border: 0; padding: 6px 0; }
.pessoa .rosto { width: 72px; height: 72px; border-radius: 50%; background: var(--azul-2); color: var(--branco); display: grid; place-items: center; font-weight: 900; font-size: 26px; border: 4px solid transparent; position: relative; overflow: visible; }
.pessoa .rosto img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pessoa.presente .rosto { border-color: var(--ok); }
.pessoa.presente .rosto::after { content: ""; position: absolute; right: -4px; bottom: -4px; width: 24px; height: 24px; border-radius: 50%; background: var(--ok); border: 3px solid var(--branco); }
.pessoa .nome { font-weight: 800; font-size: 16px; line-height: 1.1; }
.pessoa .funcao { color: var(--suave); font-size: 14px; }
.pessoas { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-start; }

/* ---------- Cartão de confirmação ---------- */
.confirmacao { background: var(--branco); border-radius: var(--raio-cartao); border: 3px solid var(--azul-2); overflow: hidden; }
.confirmacao .cabeca { background: var(--azul-2); color: var(--branco); padding: 10px 16px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.confirmacao .item { padding: 12px 16px; border-bottom: 1px solid var(--linha); display: flex; gap: 12px; align-items: flex-start; }
.confirmacao .item:last-of-type { border-bottom: 0; }
.confirmacao .rotulo { color: var(--suave); font-size: 15px; }
.confirmacao .valor { font-weight: 800; font-size: 19px; }
.confirmacao .acoes { display: flex; gap: 10px; padding: 12px 16px; background: var(--papel); }
.confirmacao .acoes > * { flex: 1; }
.marca-confirme { display: inline-flex; align-items: center; gap: 4px; background: var(--atencao-fundo); color: #7A6200; font-size: 14px; font-weight: 800; padding: 2px 8px; border-radius: var(--raio-chip); vertical-align: middle; }
.marca-confirme .ico { width: 14px; height: 14px; stroke-width: 3; }
.fala { background: #E3ECF6; border-radius: var(--raio-cartao); padding: 12px 16px; font-style: italic; color: var(--azul); display: flex; gap: 10px; }

/* Aviso Desfazer */
.aviso-desfazer { position: fixed; left: 50%; transform: translateX(-50%); bottom: 80px; width: calc(100% - 32px); max-width: 448px; background: var(--grafite); color: var(--branco); border-radius: var(--raio-botao); padding: 8px 8px 8px 16px; display: flex; align-items: center; gap: 12px; z-index: 30; box-shadow: 0 8px 24px rgba(0,0,0,.3); }
.aviso-desfazer .cresce { flex: 1; font-weight: 700; }
.aviso-desfazer button { background: var(--trena); color: var(--grafite); border: 0; border-radius: 10px; min-height: 44px; padding: 0 16px; font-weight: 800; display: inline-flex; align-items: center; gap: 6px; }
.aviso-desfazer .tempo { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--trena); width: 60%; border-radius: 0 0 0 12px; }

/* Faixas: sem internet / erro */
.faixa { display: flex; align-items: center; gap: 10px; padding: 10px 16px; font-weight: 700; font-size: 16px; }
.faixa .cresce { flex: 1; }
.faixa.sem-sinal { background: var(--grafite); color: var(--branco); }
.faixa.sem-sinal .conta { background: var(--trena); color: var(--grafite); border-radius: var(--raio-chip); padding: 2px 10px; font-weight: 900; }
.faixa.erro { background: var(--erro); color: var(--branco); }
.faixa button { background: rgba(255,255,255,.18); color: inherit; border: 0; border-radius: 10px; min-height: 40px; padding: 0 12px; font-weight: 800; }

/* Estado vazio */
.vazio { text-align: center; padding: 28px 20px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.vazio .desenho { width: 120px; height: 120px; color: var(--azul-2); }
.vazio h2 { font-size: 22px; }
.vazio p { color: var(--suave); max-width: 300px; }
.vazio .botao-principal, .vazio .botao-secundario { max-width: 320px; }

/* Tarefa da equipe */
.tarefa { display: flex; gap: 12px; align-items: flex-start; }
.tarefa .caixa { width: 28px; height: 28px; border-radius: 8px; border: 3px solid var(--azul-2); flex: none; margin-top: 2px; display: grid; place-items: center; color: var(--branco); }
.tarefa.feita .caixa { background: var(--ok); border-color: var(--ok); }
.tarefa.feita .titulo { text-decoration: line-through; color: var(--suave); }
.tarefa .titulo { font-weight: 800; font-size: 18px; }
.tarefa .anexos { display: flex; gap: 8px; margin-top: 8px; }
.tarefa .anexos button { min-height: 44px; border-radius: 10px; border: 2px solid var(--linha); background: var(--branco); padding: 0 12px; display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
.tarefa .foto-ref { width: 56px; height: 56px; border-radius: 10px; background: var(--linha); display: grid; place-items: center; color: var(--suave); }

/* Campos (último recurso) */
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo label { font-weight: 700; }
.campo input, .campo select { width: 100%; min-height: var(--toque-acao); border: 2px solid var(--linha); border-radius: var(--raio-botao); padding: 0 14px; background: var(--branco); font-size: 18px; }
.campo input:focus { border-color: var(--azul-2); outline: 0; }
.contador { display: inline-flex; align-items: center; border: 2px solid var(--linha); border-radius: var(--raio-botao); overflow: hidden; background: var(--branco); }
.contador button { width: 56px; min-height: 52px; border: 0; background: var(--papel); font-weight: 900; font-size: 22px; color: var(--azul-2); }
.contador .n { min-width: 72px; text-align: center; font-weight: 900; font-size: 22px; }

/* Interruptor */
.interruptor { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.interruptor .cresce { flex: 1; font-weight: 700; }
.interruptor .botao { width: 64px; height: 36px; border-radius: 999px; background: var(--linha); border: 0; position: relative; flex: none; }
.interruptor .botao::after { content: ""; position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; border-radius: 50%; background: var(--branco); transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.interruptor .botao.ligado { background: var(--ok); }
.interruptor .botao.ligado::after { left: 32px; }
.interruptor .palavra { font-weight: 800; width: 36px; }

/* Ouvindo (tela de voz) */
.tela-ouvindo { text-align: center; padding: 24px 16px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.tela-ouvindo .circulo { width: 120px; height: 120px; border-radius: 50%; background: var(--azul-2); color: var(--branco); display: grid; place-items: center; animation: pulso-azul 1.1s ease-in-out infinite; }
.tela-ouvindo .circulo .ico { width: 56px; height: 56px; }
@keyframes pulso-azul { 0%,100% { box-shadow: 0 0 0 0 rgba(30,74,122,.4); } 50% { box-shadow: 0 0 0 24px rgba(30,74,122,0); } }
.tela-ouvindo .exemplo { color: var(--suave); }
.tela-ouvindo .exemplo b { color: var(--grafite); }

/* Caixa do link */
.caixa-link { background: var(--papel); border: 2px dashed var(--linha); border-radius: var(--raio-botao); padding: 12px 14px; font-weight: 800; font-size: 17px; word-break: break-all; display: flex; align-items: center; gap: 10px; }
.mensagem-pronta { background: #E7FBEF; border-left: 4px solid var(--whats); border-radius: 0 12px 12px 0; padding: 10px 14px; font-size: 16px; white-space: pre-line; }

/* Opções grandes (escolha por cartão) */
.opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opcao { background: var(--branco); border: 3px solid var(--linha); border-radius: var(--raio-cartao); padding: 14px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; font-weight: 800; font-size: 17px; min-height: 108px; }
.opcao .ico { width: 36px; height: 36px; color: var(--azul-2); }
.opcao small { font-weight: 500; color: var(--suave); font-size: 14px; line-height: 1.2; }
.opcao.marcada { border-color: var(--azul-2); background: #E3ECF6; }
.opcao.marcada::before { content: ""; }

/* ---------- PC (painel web e telas largas) ---------- */
/* A mesma tela: a partir de 900px a barra de baixo vira menu lateral, o conteúdo alarga
   e as listas ficam em duas colunas. Nada de tela "só do celular". */
@media (min-width: 900px) {
  .tela { max-width: none; margin-left: 240px; padding: 0 0 120px; min-height: 100vh; }
  .topo { padding: 28px 40px 22px; }
  .topo h1 { font-size: 30px; }
  .abas { padding: 0 32px; justify-content: flex-start; }
  .abas a, .abas button { flex: none; min-width: 120px; }
  .faixa { padding-left: 40px; padding-right: 40px; }
  .conteudo { max-width: 1040px; padding: 24px 40px; gap: 16px; }
  .conteudo .duas-colunas, .conteudo .lista { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .conteudo > .secao-titulo { grid-column: 1 / -1; }
  .conteudo > .botao-principal, .conteudo > .botao-secundario { max-width: 420px; }
  .opcoes { grid-template-columns: repeat(4, 1fr); }
  .formulario { max-width: 640px; }
  .vazio { max-width: 560px; margin: 0 auto; }

  .barra-inferior { top: 0; bottom: 0; right: auto; width: 240px; border-top: 0; border-right: 1px solid var(--linha); background: var(--branco); }
  .barra-inferior > div { flex-direction: column; max-width: none; padding-top: 88px; }
  .barra-inferior a, .barra-inferior button { flex: none; flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 24px; min-height: 56px; font-size: 17px; }
  .barra-inferior .ativo { background: #E3ECF6; border-right: 4px solid var(--trena); }
  .barra-inferior::before { content: "Empreita"; position: absolute; top: 0; left: 0; right: 0; height: 72px; background: var(--azul); color: var(--branco); font-weight: 900; font-size: 22px; display: flex; align-items: center; padding: 0 24px; font-variation-settings: "wdth" 118; }
  .barra-inferior::after { content: ""; position: absolute; top: 72px; left: 0; right: 0; height: 4px; background: var(--trena); }

  .lancar { right: 32px; bottom: 32px; }
  .aviso-desfazer { bottom: 32px; left: auto; right: 220px; transform: none; max-width: 420px; }
}

/* ---------- Marcar turma (rostos grandes) ---------- */
.turma-grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.turma-grade .pessoa { width: auto; background: var(--branco); border-radius: var(--raio-cartao); padding: 14px 6px 12px; box-shadow: 0 1px 2px rgba(38,43,49,.06); }
.turma-grade .rosto { width: 84px; height: 84px; font-size: 30px; }
.pessoa.meia .rosto { border-color: var(--trena-escuro); }
.pessoa.meia .rosto::after { content: "½"; position: absolute; right: -6px; bottom: -6px; width: 28px; height: 28px; border-radius: 50%; background: var(--trena); color: var(--grafite); border: 3px solid var(--branco); font-weight: 900; font-size: 14px; display: grid; place-items: center; }
.pessoa.falta .rosto { border-color: var(--erro); opacity: .6; }
.pessoa.falta .rosto::after { content: "×"; position: absolute; right: -6px; bottom: -6px; width: 28px; height: 28px; border-radius: 50%; background: var(--erro); color: var(--branco); border: 3px solid var(--branco); font-weight: 900; font-size: 18px; line-height: 1; display: grid; place-items: center; }
.pessoa .situacao { font-size: 13px; font-weight: 800; margin-top: 2px; }
.pessoa.presente .situacao { color: var(--ok); } .pessoa.meia .situacao { color: #7A6200; } .pessoa.falta .situacao { color: var(--erro); }
.pessoa .situacao:empty::before { content: "toque"; color: var(--suave); font-weight: 600; }
@media (min-width: 900px) { .turma-grade { grid-template-columns: repeat(6, 1fr); } }

/* Folha de baixo (escolha rápida) */
.folha-fundo { position: fixed; inset: 0; background: rgba(38,43,49,.5); z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.folha { background: var(--branco); border-radius: 20px 20px 0 0; padding: 16px 16px 24px; width: 100%; max-width: 480px; display: flex; flex-direction: column; gap: 10px; max-height: calc(100dvh - 12px); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; } /* folha alta rola por dentro; antes cortava o título em cima (v8) */
.folha .alca { width: 44px; height: 5px; border-radius: 999px; background: var(--linha); margin: 0 auto 6px; }
.folha .cabeca { display: flex; align-items: center; gap: 12px; }
.folha .escolha { display: flex; align-items: center; gap: 12px; min-height: 60px; border-radius: var(--raio-botao); border: 2px solid var(--linha); background: var(--branco); padding: 0 14px; font-weight: 800; font-size: 18px; text-align: left; }
.folha .escolha .ico-quadro { width: 40px; height: 40px; }
@media (min-width: 900px) { .folha-fundo { align-items: center; } .folha { border-radius: 20px; } }

/* Itens da barra que ainda não existem (blocos seguintes) */
.barra-inferior .desligado { opacity: .4; pointer-events: none; }

/* ---------- Pessoas (bloco 2) ---------- */
.rosto-grande { width: 120px; height: 120px; border-radius: 50%; background: var(--azul-2); color: var(--branco); display: grid; place-items: center; font-weight: 900; font-size: 44px; margin: 0 auto; position: relative; overflow: visible; }
.rosto-grande img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.rosto-grande .camera { position: absolute; right: -4px; bottom: -4px; width: 44px; height: 44px; border-radius: 50%; background: var(--trena); color: var(--grafite); border: 3px solid var(--branco); display: grid; place-items: center; }
.botao-foto { width: 100%; min-height: 140px; border: 3px dashed var(--azul-2); border-radius: var(--raio-cartao); background: #E3ECF6; color: var(--azul); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-weight: 800; font-size: 18px; }
.botao-foto .ico { width: 44px; height: 44px; }
.valor-grande { display: flex; align-items: center; gap: 12px; }
.valor-grande .num { font-size: 32px; }
.valor-grande .contador .n { min-width: 110px; }
.dinheiro-deve { color: var(--erro); } .dinheiro-receber { color: var(--ok); }
.lista-pessoas > * { min-height: 76px; }
.lista-pessoas .avatar { width: 52px; height: 52px; font-size: 22px; background: var(--azul-2); color: var(--branco); }
.lista-pessoas .avatar.cliente { background: var(--trena); color: var(--grafite); }
.lista-pessoas .avatar.fornecedor { background: var(--papel); color: var(--azul); border: 2px solid var(--linha); }
.chips-habilidades .chip { font-size: 16px; min-height: 44px; }
.folha .pessoas { justify-content: center; }

/* ---------- Lançar (bloco 3) ---------- */
.item-lanc { border: 2px solid var(--linha); border-radius: var(--raio-cartao); padding: 12px; display: flex; flex-direction: column; gap: 10px; background: var(--branco); }
.item-lanc.confira { border-color: var(--trena-escuro); background: #FFFCEB; }
.item-lanc .linha-qtd { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.item-lanc .linha-qtd input { min-height: 52px; }
.item-lanc .cabeca { display: flex; align-items: center; gap: 8px; }
.item-lanc .cabeca .num-item { width: 28px; height: 28px; border-radius: 50%; background: var(--azul-2); color: var(--branco); display: grid; place-items: center; font-weight: 900; font-size: 15px; flex: none; }
.item-lanc .cabeca input { flex: 1; min-width: 0; }
.item-lanc .tirar { background: none; border: 0; color: var(--erro); min-width: 44px; min-height: 44px; display: grid; place-items: center; }
.total-lanc { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 2px; }
.item-nota { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--linha); }
.item-nota:last-child { border-bottom: 0; }
.item-nota .valor { font-weight: 900; white-space: nowrap; }
.item-nota.confira { background: #FFFCEB; }
.nota-img { width: 100%; max-height: 220px; border-radius: var(--raio-cartao); border: 2px solid var(--linha); object-fit: contain; background: var(--papel); }
.ouvindo-folha { align-items: center; text-align: center; gap: 14px; padding-bottom: 32px; }
.ouvindo-folha .circulo { width: 112px; height: 112px; border-radius: 50%; background: var(--erro); color: var(--branco); display: grid; place-items: center; animation: pulso 1.1s ease-in-out infinite; }
.ouvindo-folha .circulo.parado { background: var(--azul-2); animation: none; }
.ouvindo-folha .circulo .ico { width: 52px; height: 52px; }
.ouvindo-folha .parcial { font-size: 20px; font-weight: 700; min-height: 56px; color: var(--grafite); }
.ouvindo-folha textarea { width: 100%; min-height: 80px; border: 2px solid var(--linha); border-radius: var(--raio-botao); padding: 10px; font: inherit; }
.folha-fundo.trabalhando { align-items: center; padding: 16px; z-index: 60; }
.folha-fundo.trabalhando .lendo { max-width: 360px; width: 100%; }
.lendo { text-align: center; padding: 24px 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.lendo .giro { width: 64px; height: 64px; border-radius: 50%; border: 6px solid var(--linha); border-top-color: var(--azul-2); animation: gira 1s linear infinite; }
@keyframes gira { to { transform: rotate(360deg) } }

/* ---------- Seletor grande (listas que crescem: obras, pessoas, fornecedores) ----------
   Pílulas só para opções fixas e curtas. O seletor mostra o escolhido e abre uma folha empilhada. */
.seletor { width: 100%; min-height: 64px; border: 2px solid var(--linha); border-radius: var(--raio-cartao); background: var(--branco); display: flex; align-items: center; gap: 12px; padding: 10px 12px 10px 14px; text-align: left; font: inherit; color: inherit; cursor: pointer; }
.seletor .ico-quadro { width: 40px; height: 40px; flex: none; }
.seletor .textos { flex: 1; min-width: 0; }
.seletor .rotulo { font-size: 14px; color: var(--suave); font-weight: 700; }
.seletor .valor { font-size: 19px; font-weight: 800; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seletor .sub { font-size: 14px; color: var(--suave); }
.seletor .seta { color: var(--suave); transform: rotate(90deg); }
.seletor.sem-escolha { border-color: var(--trena); background: var(--atencao-fundo); border-style: dashed; border-width: 3px; }
.seletor.sem-escolha .valor { color: var(--azul); }
.seletor.sem-escolha .ico-quadro { background: var(--trena); color: var(--grafite); }
.seletor:active { background: #F7F9FB; }
.folha .busca { min-height: 52px; border: 2px solid var(--linha); border-radius: var(--raio-botao); padding: 0 14px; font: inherit; width: 100%; }
.folha .lista-escolha { max-height: 60vh; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
.folha .escolha.marcada { border-color: var(--azul-2); background: #E3ECF6; }

/* ---- Bloco 5: mão de obra ---- */
.semana-faixa { display: flex; gap: 6px; }
.semana-faixa button { flex: 1; min-height: 60px; border: 2px solid var(--linha); border-radius: var(--raio-botao); background: var(--branco); font: inherit; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--grafite); }
.semana-faixa button .d { font-size: 12px; font-weight: 700; color: var(--suave); text-transform: uppercase; }
.semana-faixa button .n { font-size: 18px; font-weight: 900; }
.semana-faixa button.parado { background: #FFF4D6; border-color: var(--trena); }
.semana-faixa button.parado .n::after { content: "parada"; display: block; font-size: 9px; font-weight: 800; color: #7A6200; text-transform: uppercase; }
.semana-faixa button.hoje { border-color: var(--azul-2); background: #E3ECF6; }
.semana-faixa button.feito .n::after { content: ""; display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); margin: 2px auto 0; }
.semana-faixa button.falta-marcar .n::after { content: ""; display: block; width: 6px; height: 6px; border-radius: 50%; background: var(--trena); margin: 2px auto 0; }
.dias { display: inline-flex; gap: 4px; }
.dias span { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; border: 2px solid var(--linha); color: var(--suave); background: var(--branco); }
.dias span.dia { background: var(--ok); border-color: var(--ok); color: var(--branco); }
.dias span.meia { background: var(--trena); border-color: var(--trena); color: var(--grafite); }
.dias span.falta { background: var(--erro-fundo); border-color: var(--erro); color: var(--erro); }
.dias span.pendente { border-style: dashed; border-color: var(--trena-escuro); }
.pagar-pessoa { display: flex; flex-direction: column; gap: 10px; }
.pagar-pessoa .cabeca { display: flex; align-items: center; gap: 12px; }
.pagar-pessoa .rosto-p { width: 52px; height: 52px; border-radius: 50%; background: var(--azul-2); color: var(--branco); display: grid; place-items: center; font-weight: 900; font-size: 20px; flex: none; }
.pagar-pessoa .conta, .cartao .conta { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 15px; color: var(--suave); padding: 2px 0; }
.pagar-pessoa .conta b, .cartao .conta b { color: var(--grafite); white-space: nowrap; }
.pagar-pessoa.pago { opacity: .75; }
.assinatura { height: 180px; border: 2px dashed var(--azul-2); border-radius: var(--raio-cartao); background: var(--branco); position: relative; display: grid; place-items: center; color: var(--suave); }
.assinatura canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: var(--raio-cartao); }
.assinatura .linha-ass { position: absolute; left: 24px; right: 24px; bottom: 36px; border-top: 2px solid var(--linha); }
.recibo-texto { background: var(--branco); border: 2px solid var(--linha); border-radius: var(--raio-cartao); padding: 16px; font-size: 17px; line-height: 1.5; }
.recibo-texto b { font-weight: 900; }
.valor-grande { font-size: 36px; font-weight: 900; letter-spacing: -.5px; }
.chips.valores .chip { min-width: 80px; justify-content: center; font-weight: 900; }
.medicao { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--linha); }
.medicao:last-child { border-bottom: 0; }
.pagar-pessoa .rosto-p img, .assinatura img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.assinatura img { border-radius: var(--raio-cartao); object-fit: contain; }

/* ---- Bloco 6: cliente (orçamento, contrato, link) ---- */
.tabela { width: 100%; border-collapse: collapse; font-size: 16px; }
.tabela th, .tabela td { padding: 10px 8px; border-bottom: 1px solid var(--linha); text-align: left; vertical-align: top; }
.tabela th { font-size: 13px; text-transform: uppercase; letter-spacing: .3px; color: var(--suave); font-weight: 800; }
.tabela td.num, .tabela th.num { text-align: right; white-space: nowrap; }
.tabela tr.total td { font-weight: 900; font-size: 18px; border-top: 2px solid var(--grafite); border-bottom: 0; }
.opcoes-orc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opcao-orc { background: var(--branco); border: 3px solid var(--linha); border-radius: var(--raio-cartao); padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; }
.opcao-orc.marcada { border-color: var(--azul-2); background: #E3ECF6; }
.opcao-orc .titulo { font-weight: 900; font-size: 17px; }
.opcao-orc .valor { font-weight: 900; font-size: 24px; letter-spacing: -.3px; }
.opcao-orc .desc { color: var(--suave); font-size: 14px; }
.comodo { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--linha); }
.comodo:last-child { border-bottom: 0; }
.comodo .medidas { color: var(--suave); font-size: 14px; }
.etapa-linha { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--linha); }
.etapa-linha:last-child { border-bottom: 0; }
.etapa-linha .cabeca { display: flex; align-items: center; gap: 10px; }
.etapa-linha .cabeca .forte { font-size: 17px; }
.etapa-linha .progresso .trilho { height: 8px; }
.documento { background: var(--branco); border: 2px solid var(--linha); border-radius: var(--raio-cartao); padding: 18px 16px; font-size: 16px; line-height: 1.55; white-space: pre-wrap; }
.documento h4 { margin: 14px 0 4px; font-size: 16px; }
.pagina-cliente .topo { padding-bottom: 18px; }
.pagina-cliente .conteudo { padding-bottom: 40px; }
.pix-caixa { background: var(--branco); border: 2px solid var(--linha); border-radius: var(--raio-cartao); padding: 14px; display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center; }
.pix-caixa .chave { font-weight: 900; font-size: 18px; word-break: break-all; }
.pix-caixa canvas, .pix-caixa img { width: 180px; height: 180px; }
.linha-tempo { display: flex; flex-direction: column; gap: 10px; }
.linha-tempo .dia { display: flex; gap: 10px; }
.linha-tempo .dia .data { width: 56px; flex: none; font-size: 13px; font-weight: 800; color: var(--suave); text-transform: uppercase; padding-top: 4px; }
.linha-tempo .dia .cartao { flex: 1; }
@media print {
  .topo, .barra-inferior, .lancar, .aviso-desfazer, .faixa, .nao-imprime, .botao-principal, .botao-secundario, .botao-texto, .botao-whats, .barra-estados { display: none !important; }
  body, .tela { background: #fff; }
  .conteudo { padding: 0; max-width: none; }
  .cartao, .documento, .tabela { box-shadow: none; border-color: #999; }
  .so-imprime { display: block !important; }
}
.so-imprime { display: none; }
/* exemplo dentro do campo bem claro, para não parecer já preenchido (pedido do Murilo, 10/10/2026) */
::placeholder { color: #A9B3BE; opacity: 1; font-weight: 400; }
.campo input.sem-valor, .campo select.sem-valor[data-exemplo] { color: #A9B3BE; font-weight: 400; }
.campo select option { color: var(--grafite); }
