/* Hora Máquina — cores do Empreita, letra Roboto (a do próprio Android), fundo liso e a faixa listrada no topo (SPEC §8). */
:root {
  --azul: #16365C; --azul-2: #1E4A7A; --amarelo: #F5C518; --amarelo-escuro: #C9A000; --preto: #1b1b1b;
  --texto: #262B31; --suave: #4F5A66; --fundo: #EEF1F4; --branco: #FFFFFF; --linha: #D3DAE2; --sobre-azul: #DCE6F1;
  --ok: #2E7D4F; --ok-fundo: #E5F3EA; --atencao: #8A6D00; --atencao-fundo: #FFF8DB; --erro: #B3261E; --erro-fundo: #FFF1F0;
  --azul-fundo: #E3ECF6; --whats: #25D366; --whats-texto: #073B1C;
  --fonte: Roboto, "Segoe UI", Arial, sans-serif;
  --toque: 48px; --acao: 56px; --raio: 14px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { font-family: var(--fonte); font-size: 17px; color: var(--texto); background: var(--fundo); }
body { margin: 0; min-height: 100vh; background: var(--fundo); padding-bottom: 92px; }
body.sem-menu { padding-bottom: 24px; }
h1, h2, h3 { font-weight: 900; line-height: 1.15; margin: 0; }
h1 { font-size: 26px; } h2 { font-size: 20px; } h3 { font-size: 18px; }
p { margin: 0 0 8px; line-height: 1.4; }
a { color: var(--azul-2); }
.escondido { display: none !important; }

/* topo azul com a faixa amarela e preta */
.topo { background: var(--azul); color: #fff; padding: 0 16px 16px; position: relative; }
.faixa { height: 8px; margin: 0 -16px 14px; background: repeating-linear-gradient(-45deg, var(--amarelo) 0 14px, var(--preto) 14px 28px); }
.topo .sub { color: var(--sobre-azul); font-size: 15px; font-weight: 500; }
.topo h1 { color: #fff; margin-top: 2px; }
.topo .linha-topo { display: flex; align-items: center; gap: 10px; }
.topo .voltar { background: none; border: 0; color: #fff; font: 500 17px var(--fonte); display: flex; align-items: center; gap: 4px; padding: 8px 8px 8px 0; min-height: var(--toque); cursor: pointer; }
.topo .acao-topo { margin-left: auto; background: rgba(255,255,255,.12); border: 0; color: #fff; border-radius: 10px; min-height: 44px; padding: 0 12px; font: 500 15px var(--fonte); display: flex; align-items: center; gap: 6px; }
.topo .logo-mini { width: 44px; height: 44px; border-radius: 50%; background: #fff; object-fit: contain; }

main { padding: 14px 16px; max-width: 760px; margin: 0 auto; }
.cartao { background: var(--branco); border-radius: var(--raio); padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.cartao.azul { background: var(--azul); color: #fff; }
.cartao.azul .suave { color: var(--sobre-azul); }
.secao { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 2px 8px; }
.secao h2 { font-size: 18px; }
.suave { color: var(--suave); }
.pequeno { font-size: 14px; }
.forte { font-weight: 700; }
.num { font-weight: 900; font-size: 28px; line-height: 1.1; }
.num.medio { font-size: 22px; }
.linha { display: flex; align-items: center; gap: 10px; }
.entre { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.cresce { flex: 1; min-width: 0; }
.grade2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.centro { text-align: center; }
hr { border: 0; border-top: 1px solid var(--linha); margin: 12px 0; }

/* ícones */
.ico { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ico.g { width: 32px; height: 32px; }
.quadro { width: 44px; height: 44px; border-radius: 12px; background: var(--azul-fundo); color: var(--azul); display: flex; align-items: center; justify-content: center; flex: none; }
.quadro.ok { background: var(--ok-fundo); color: var(--ok); } .quadro.atencao { background: var(--atencao-fundo); color: var(--atencao); } .quadro.erro { background: var(--erro-fundo); color: var(--erro); }
.quadro.amarelo { background: var(--amarelo); color: var(--preto); }
.quadro img { width: 100%; height: 100%; object-fit: cover; border-radius: 12px; }

/* selos: cor + ícone + palavra */
.selo { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 500; padding: 4px 10px; border-radius: 999px; background: var(--fundo); color: var(--suave); white-space: nowrap; }
.selo .ico { width: 16px; height: 16px; }
.selo.ok { background: var(--ok-fundo); color: var(--ok); } .selo.azul { background: var(--azul-fundo); color: var(--azul); }
.selo.atencao { background: var(--atencao-fundo); color: var(--atencao); } .selo.erro { background: var(--erro-fundo); color: var(--erro); }

/* botões */
button { font-family: var(--fonte); }
.botao { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: var(--acao); border: 0; border-radius: 12px; background: var(--amarelo); color: var(--preto); font: 900 18px var(--fonte); cursor: pointer; padding: 0 16px; text-decoration: none; }
.botao.azul { background: var(--azul-2); color: #fff; }
.botao.claro { background: var(--branco); color: var(--azul-2); border: 2px solid var(--azul-2); font-weight: 700; }
.botao.perigo { background: var(--branco); color: var(--erro); border: 2px solid var(--erro); font-weight: 700; }
.botao.whats { background: var(--whats); color: var(--whats-texto); }
.botao.google { background: #fff; color: #3c4043; border: 2px solid #dadce0; font-weight: 700; }
.botao.apple { background: #000; color: #fff; font-weight: 700; }
.botao .g { width: 22px; height: 22px; flex: none; }
.botao.pequeno { min-height: var(--toque); font-size: 16px; }
.botao:disabled { opacity: .5; }
.botoes { display: grid; gap: 10px; margin-top: 12px; }
.botao-texto { background: none; border: 0; color: var(--azul-2); font: 700 16px var(--fonte); min-height: var(--toque); padding: 0 8px; cursor: pointer; }
.grandes { display: grid; gap: 12px; }
.grande { display: flex; align-items: center; gap: 14px; min-height: 84px; border: 0; border-radius: 16px; background: var(--branco); color: var(--texto); font: 900 21px var(--fonte); padding: 12px 16px; text-align: left; text-decoration: none; box-shadow: 0 1px 3px rgba(0,0,0,.08); width: 100%; }
.grande .quadro { width: 56px; height: 56px; }
.grande .ico { width: 30px; height: 30px; }
.grande small { display: block; font: 400 15px var(--fonte); color: var(--suave); margin-top: 2px; }
.grande.amarelo { background: var(--amarelo); color: var(--preto); } .grande.amarelo small { color: #3d3300; } .grande.amarelo .quadro { background: rgba(0,0,0,.08); color: var(--preto); }

/* listas */
.lista { background: var(--branco); border-radius: var(--raio); overflow: hidden; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.lista > a, .lista > button, .lista > .item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px; color: var(--texto); text-decoration: none; border: 0; border-bottom: 1px solid var(--linha); background: none; width: 100%; text-align: left; font: inherit; }
.lista > :last-child { border-bottom: 0; }
.lista .seta { color: var(--suave); width: 20px; height: 20px; }
.vazio { text-align: center; color: var(--suave); padding: 24px 12px; }
.valor-direita { text-align: right; white-space: nowrap; }

/* avisos */
.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 8px; background: var(--atencao-fundo); color: #4a3b00; text-decoration: none; font-weight: 500; }
.aviso.erro { background: var(--erro-fundo); color: var(--erro); } .aviso.ok { background: var(--ok-fundo); color: var(--ok); } .aviso.azul { background: var(--azul-fundo); color: var(--azul); }

/* formulário */
label.campo, div.campo { display: block; margin-bottom: 14px; }
label.campo > span, div.campo > .rotulo-campo { display: block; font-weight: 500; font-size: 15px; margin-bottom: 6px; }
label.campo > small { display: block; color: var(--suave); font-size: 14px; margin-top: 4px; }
input, select, textarea { width: 100%; min-height: var(--acao); border: 2px solid var(--linha); border-radius: 12px; padding: 0 14px; font: 400 18px var(--fonte); color: var(--texto); background: #fff; }
textarea { padding: 12px 14px; min-height: 90px; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--azul-2); }
input.grande-num { font-size: 30px; font-weight: 900; text-align: center; letter-spacing: 1px; }
.grade2 input.grande-num { font-size: 22px; padding: 0 6px; letter-spacing: 0; }
.sem-valor { color: #8a96a3; }
.opcoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.opcoes.duas { grid-template-columns: 1fr 1fr; }
.opcao { min-height: var(--acao); border: 2px solid var(--linha); border-radius: 12px; background: #fff; font: 500 16px var(--fonte); color: var(--texto); display: flex; align-items: center; justify-content: center; gap: 6px; padding: 6px 8px; text-align: center; cursor: pointer; }
.opcao.marcada { border-color: var(--azul-2); background: var(--azul-fundo); color: var(--azul); font-weight: 700; }
.seletor { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 68px; border: 2px solid var(--linha); border-radius: 12px; background: #fff; padding: 8px 12px; text-align: left; cursor: pointer; }
.seletor .rotulo { font-size: 14px; color: var(--suave); font-weight: 500; }
.seletor .valor { font-size: 18px; font-weight: 700; color: var(--texto); }
.seletor.vazio-sel .valor { color: #8a96a3; font-weight: 500; }
.resultado-calc { background: var(--azul-fundo); border-radius: 12px; padding: 12px 14px; margin: 4px 0 14px; color: var(--azul); }
.resultado-calc .num { color: var(--azul); }
.foto-campo { display: flex; gap: 10px; align-items: center; }
.foto-campo img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; }
.foto-botao { min-height: var(--acao); border: 2px dashed var(--azul-2); border-radius: 12px; background: #fff; color: var(--azul-2); font: 700 16px var(--fonte); display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 14px; cursor: pointer; flex: 1; }
.assinatura { border: 2px dashed var(--linha); border-radius: 12px; background: #fff; width: 100%; height: 160px; touch-action: none; display: block; }

/* folhas que sobem de baixo */
.folha-fundo { position: fixed; inset: 0; background: rgba(10,20,35,.55); z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.folha { background: var(--fundo); width: 100%; max-width: 760px; max-height: 88vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 10px 16px 24px; display: flex; flex-direction: column; gap: 10px; }
.folha .alca { width: 44px; height: 5px; border-radius: 3px; background: var(--linha); align-self: center; margin-bottom: 4px; }
.folha .lista { margin: 0; }

/* menu de baixo (Android): Início · Máquinas · + Lançar · Dinheiro · Mais */
.menu { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--linha); display: grid; grid-template-columns: repeat(5, 1fr); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
.menu a, .menu button { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; color: var(--suave); text-decoration: none; font: 500 13px var(--fonte); background: none; border: 0; }
.menu .ativo { color: var(--azul); font-weight: 700; }
.menu .lancar .bola { width: 52px; height: 52px; border-radius: 50%; background: var(--amarelo); color: var(--preto); display: flex; align-items: center; justify-content: center; margin-top: -18px; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.menu .lancar .bola .ico { width: 30px; height: 30px; stroke-width: 2.6; }

/* desfazer */
.desfazer { position: fixed; left: 12px; right: 12px; bottom: 80px; background: var(--texto); color: #fff; border-radius: 12px; padding: 12px 14px; display: flex; align-items: center; gap: 10px; z-index: 60; box-shadow: 0 4px 12px rgba(0,0,0,.3); }
.desfazer button { background: none; border: 0; color: var(--amarelo); font: 900 16px var(--fonte); min-height: 44px; }

/* abas */
.abas { display: flex; gap: 6px; overflow-x: auto; margin: 0 0 12px; }
.abas button, .abas a { flex: none; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 2px solid var(--linha); background: #fff; font: 500 15px var(--fonte); color: var(--texto); text-decoration: none; display: flex; align-items: center; }
.abas .marcada { border-color: var(--azul-2); background: var(--azul-2); color: #fff; }
.mes-nav { display: flex; align-items: center; justify-content: space-between; background: #fff; border-radius: 12px; margin-bottom: 12px; }
.mes-nav button { min-width: 56px; min-height: 52px; border: 0; background: none; color: var(--azul-2); }
.mes-nav strong { font-size: 18px; }

/* tabela de números */
.tabela { width: 100%; border-collapse: collapse; font-size: 16px; }
.tabela td { padding: 8px 0; border-bottom: 1px solid var(--linha); }
.tabela td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
.tabela tr.total td { border-bottom: 0; font-weight: 900; font-size: 18px; }
.vermelho { color: var(--erro); } .verde { color: var(--ok); }
.barra { height: 10px; border-radius: 5px; background: var(--fundo); overflow: hidden; }
.barra > div { height: 100%; background: var(--azul-2); }

/* papel (recibo, contrato, extrato) */
.papel { background: #fff; border-radius: 6px; padding: 18px; color: #111; font-size: 15px; box-shadow: 0 1px 4px rgba(0,0,0,.12); }
.papel h2 { font-size: 19px; overflow-wrap: anywhere; } .papel .cab { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; border-bottom: 3px solid var(--azul); padding-bottom: 10px; margin-bottom: 10px; }
.papel .cab .cresce { flex: 1 1 150px; } .papel .cab > div:last-child { margin-left: auto; }
.papel .cab img { width: 64px; height: 64px; object-fit: contain; }
.papel table { width: 100%; border-collapse: collapse; } .papel td, .papel th { border: 1px solid #c9d1da; padding: 6px 8px; text-align: left; }
.papel th { background: #f2f5f8; font-size: 13px; font-weight: 500; color: #444; }
.papel .ass { border-top: 1px solid #333; margin-top: 30px; padding-top: 4px; text-align: center; font-size: 13px; }
.papel .ass img { max-height: 70px; display: block; margin: 0 auto -8px; }
.papel .fotos { display: flex; gap: 8px; margin-top: 8px; } .papel .fotos img { width: 48%; border-radius: 4px; }
@media print {
  body { background: #fff; padding: 0; } .topo, .menu, .nao-imprimir, .desfazer { display: none !important; }
  main { padding: 0; max-width: none; } .papel { box-shadow: none; padding: 0; }
}
@media (min-width: 900px) {
  body { padding-bottom: 24px; padding-left: 220px; }
  .menu { top: 0; bottom: 0; right: auto; width: 220px; grid-template-columns: none; grid-auto-rows: 64px; align-content: start; border-top: 0; border-right: 1px solid var(--linha); padding-top: 12px; }
  .menu a, .menu button { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 0 20px; font-size: 16px; }
  .menu .lancar .bola { margin: 0; width: 40px; height: 40px; }
  .desfazer { left: 232px; bottom: 16px; }
}

/* atributo hidden vence o display dos componentes */
[hidden] { display: none !important; }

/* ---- Ajuda (manual interativo, js/telas/ajuda.js) — classes próprias, prefixo .ajuda- ---- */
.ajuda-busca { position: sticky; top: 0; z-index: 5; background: var(--fundo); padding: 6px 0 10px; margin: -6px 0 4px; }
.ajuda-busca input { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' viewBox='0 0 24 24' fill='none' stroke='%231E4A7A' stroke-width='2.5' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4'/%3E%3C/svg%3E") no-repeat 12px center; padding-left: 44px; }
.ajuda-duvidas { display: grid; gap: 6px; margin-bottom: 6px; }
.ajuda-duvidas a { display: flex; align-items: center; gap: 10px; min-height: 52px; background: #fff; border: 1px solid var(--linha); border-radius: 12px; padding: 8px 12px; color: var(--azul-2); font-weight: 700; text-decoration: none; }
.ajuda-duvidas a .ico { color: var(--azul-2); width: 20px; height: 20px; }
.ajuda-grupo .secao h2 { display: flex; align-items: center; gap: 8px; color: var(--azul); }
.ajuda-topico { background: #fff; border: 1px solid var(--linha); border-radius: var(--raio); margin-bottom: 8px; scroll-margin-top: 80px; }
.ajuda-topico > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 12px 14px; font-weight: 700; font-size: 17px; color: var(--texto); }
.ajuda-topico > summary::-webkit-details-marker { display: none; }
.ajuda-topico > summary::after { content: "+"; margin-left: auto; font-size: 26px; line-height: 1; color: var(--azul-2); font-weight: 400; flex: none; }
.ajuda-topico[open] > summary::after { content: "–"; }
.ajuda-topico.ajuda-destaque { border: 3px solid var(--amarelo); }
.ajuda-corpo { padding: 0 16px 16px; }
.ajuda-para { color: var(--suave); font-size: 14px; margin: -4px 0 8px; }
.ajuda-corpo ol { padding-left: 22px; margin: 6px 0 10px; line-height: 1.45; }
.ajuda-corpo li { margin: 6px 0; }
.ajuda-foto { display: block; width: 100%; max-width: 300px; margin: 10px auto; border-radius: 18px; border: 6px solid #1b1b1b; box-shadow: 0 4px 14px rgba(0,0,0,.18); cursor: zoom-in; }
.ajuda-dica { display: flex; gap: 10px; align-items: flex-start; background: var(--atencao-fundo); color: #4a3b00; border-radius: 10px; padding: 10px 12px; font-size: 15px; margin: 10px 0; line-height: 1.4; }
.ajuda-dica .ico { color: var(--atencao); flex: none; }
.ajuda-abrir { margin: 6px 0 10px; }
.ajuda-veja { font-size: 15px; color: var(--suave); line-height: 1.5; }
.ajuda-veja a { color: var(--azul-2); font-weight: 700; }
.ajuda-nada { text-align: center; color: var(--suave); padding: 24px 0; }
.ajuda-zoom { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: none; align-items: center; justify-content: center; z-index: 70; padding: 12px; cursor: zoom-out; }
.ajuda-zoom img { max-width: 100%; max-height: 100%; border-radius: 16px; }
.ajuda-zoom.aberto { display: flex; }
