/* Tela do ponto no celular — mesma identidade da tela de login */
:root {
  --degrade: linear-gradient(135deg, #22a9e1 0%, #1287c8 50%, #0b5e9a 100%);
  --surface: #ffffff;
  --text: #0d2236;
  --muted: #557086;
  --border: #d8e6f0;
  --accent: #0f7fc0;
  --ok: #157a3c;
  --ok-soft: #e1f5e8;
  --err: #c0262d;
  --err-soft: #fde8e8;
  --warn: #9a6200;
  --warn-soft: #fdf1dc;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #112130; --text: #e6f0f7; --muted: #93abbe; --border: #213b50; --accent: #4cc0f0;
    --ok: #5fd08f; --ok-soft: #12321f; --err: #ff7b7b; --err-soft: #3a1618; --warn: #f0b44c; --warn-soft: #36290f;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 16px/1.5 "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--degrade); color: var(--text); min-height: 100vh; min-height: 100dvh;
  display: flex; justify-content: center; align-items: flex-start;
  padding: max(20px, env(safe-area-inset-top)) 16px max(20px, env(safe-area-inset-bottom));
  position: relative; overflow-x: hidden;
}
body::before {
  content: ""; position: fixed; width: 420px; height: 340px; left: -120px; bottom: -80px;
  background: url("/img/baloes.png") no-repeat center / contain; opacity: .10; pointer-events: none;
}
.caixa { width: 100%; max-width: 420px; position: relative; z-index: 1; }
.marca { position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; margin: 4px 0 18px; }
.marca .icone { width: 46px; height: 46px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .85); }
.marca .palavra { height: 34px; }
.cartao { background: var(--surface); border-radius: 22px; padding: 22px 20px; box-shadow: 0 20px 50px rgba(6, 40, 70, .35); }
.cartao[hidden] { display: none; }
h1 { font-size: 22px; font-weight: 800; margin: 0 0 2px; }
.sub { color: var(--muted); margin: 0 0 16px; }
.relogio { text-align: center; margin: 2px 0 18px; }
.relogio span { display: block; font-size: 54px; font-weight: 800; letter-spacing: .02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.relogio small { color: var(--muted); font-weight: 700; text-transform: capitalize; }
label { display: block; font-size: 14px; font-weight: 700; color: var(--muted); margin-bottom: 14px; }
input:not([type="checkbox"]) {
  display: block; width: 100%; margin-top: 6px; font: inherit; font-size: 20px; font-weight: 700; color: var(--text);
  background: transparent; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; letter-spacing: .04em;
}
input:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
label.check { display: flex; gap: 10px; align-items: center; font-weight: 600; }
label.check input { width: 20px; height: 20px; accent-color: var(--accent); }
.botao {
  width: 100%; border: 0; border-radius: 999px; padding: 15px 20px; cursor: pointer;
  background: var(--degrade); color: #fff; font: inherit; font-weight: 800; font-size: 18px;
  box-shadow: 0 6px 16px rgba(14, 104, 166, .3);
}
.botao:disabled { opacity: .7; }
.link { display: block; margin: 14px auto 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 800; cursor: pointer; padding: 6px; }
.aviso { border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 15px; margin-bottom: 14px; }
.aviso[hidden] { display: none; }
.aviso.erro { background: var(--err-soft); color: var(--err); }
.aviso.warn { background: var(--warn-soft); color: var(--warn); }
.termo { border: 1px solid var(--border); border-radius: 14px; padding: 10px 14px; margin-bottom: 14px; font-size: 14px; }
.termo summary { font-weight: 800; cursor: pointer; }
.termo ul { padding-left: 18px; margin: 6px 0 0; }
.termo p { margin: 8px 0 0; }

/* Câmera */
.camera { padding: 14px; }
.video-wrap { position: relative; border-radius: 18px; overflow: hidden; background: #000; aspect-ratio: 3 / 4; }
video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; opacity: 0; transition: opacity .2s; }
video.ligada { opacity: 1; }
.atualizar { position: absolute; right: 0; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border-radius: 50%; border: 0; padding: 9px; background: rgba(255, 255, 255, .18); color: #fff; cursor: pointer; }
.atualizar svg { width: 100%; height: 100%; display: block; }
.atualizar:active { background: rgba(255, 255, 255, .35); }
.atualizar.girando svg { animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.moldura {
  position: absolute; left: 50%; top: 46%; width: 62%; aspect-ratio: 3 / 4; transform: translate(-50%, -50%);
  border: 4px solid rgba(255, 255, 255, .85); border-radius: 50%; box-shadow: 0 0 0 999px rgba(0, 0, 0, .35);
  transition: border-color .2s;
}
.moldura.ativa { border-color: #4cd98a; }
.instrucao { text-align: center; font-size: 20px; font-weight: 800; margin: 14px 0 10px; min-height: 60px; }
.progresso { height: 8px; border-radius: 99px; background: var(--border); overflow: hidden; }
.progresso span { display: block; height: 100%; width: 0; background: var(--degrade); transition: width .2s linear; }

/* Resultado */
.res { text-align: center; }
.res .icone-res { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; margin: 4px auto 10px; font-size: 42px; font-weight: 800; }
.res.ok .icone-res { background: var(--ok-soft); color: var(--ok); }
.res.erro .icone-res { background: var(--err-soft); color: var(--err); }
.res h2 { margin: 0 0 4px; font-size: 22px; font-weight: 800; }
.res .hora-grande { font-size: 44px; font-weight: 800; font-variant-numeric: tabular-nums; line-height: 1.1; }
.comprovante { text-align: left; border: 1px dashed var(--border); border-radius: 14px; padding: 12px 14px; margin: 14px 0; font-size: 14px; }
.comprovante div { display: flex; justify-content: space-between; gap: 10px; padding: 2px 0; }
.comprovante span { color: var(--muted); }
.comprovante strong { text-align: right; }
.hoje { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin: 6px 0 16px; }
.hoje b { background: var(--ok-soft); color: var(--ok); border-radius: 99px; padding: 3px 12px; font-variant-numeric: tabular-nums; }
.rodape { color: rgba(255, 255, 255, .85); text-align: center; font-size: 13px; margin-top: 16px; }

/* Convite para instalar o app */
.instalar[hidden] { display: none; }
.instalar {
  display: flex; gap: 14px; align-items: flex-start; margin-top: 14px; padding: 14px 16px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3); border-radius: 18px; color: #fff;
}
.instalar img { width: 52px; height: 52px; border-radius: 12px; flex-shrink: 0; }
.instalar strong { display: block; font-size: 16px; }
.instalar p { margin: 2px 0 8px; font-size: 14px; opacity: .95; }
.instalar .compartilhar { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; }
.instalar-acoes { display: flex; gap: 10px; align-items: center; }
.instalar .link { color: #fff; margin: 0; padding: 4px 2px; font-size: 14px; }
.mini-botao[hidden] { display: none; }
.mini-botao { text-decoration: none; border: 0; border-radius: 999px; padding: 8px 18px; background: #fff; color: #0f7fc0; font: inherit; font-weight: 800; cursor: pointer; }
/* Aberto como app instalado: sem o rodapé de site */
@media (display-mode: standalone) { .rodape { display: none; } }
.fora-do-inicio .instalar { display: none; }

/* Botão secundário e batidas guardadas no celular */
.botao-sec {
  display: block; width: 100%; margin-top: 12px; border: 1px solid var(--border); border-radius: 16px; padding: 12px 16px;
  background: transparent; color: var(--accent); font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; text-align: center;
}
.botao-sec small { display: block; font-weight: 600; font-size: 13px; color: var(--muted); }
.pendentes { margin-top: 14px; padding: 10px 14px; border-radius: 14px; background: var(--warn-soft); color: var(--warn); font-size: 14px; }
.pendentes[hidden], #avisos-sinc[hidden] { display: none; }
.pendentes strong { display: block; }
#avisos-sinc { margin-top: 12px; }
#avisos-sinc .aviso { font-size: 14px; margin-bottom: 8px; }
.aviso.ok { background: var(--ok-soft); color: var(--ok); }
.res.offline .icone-res { background: var(--warn-soft); color: var(--warn); }
.nota { color: var(--muted); font-size: 13.5px; margin: 12px 0; }
.carregando, .vazio { color: var(--muted); text-align: center; padding: 18px 0; }

/* Minha área */
.minha-topo { display: flex; justify-content: space-between; align-items: center; }
.minha-topo .link { margin: 0; }
.abas-minha { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; background: var(--border); border-radius: 14px; padding: 4px; margin: 12px 0 14px; }
.abas-minha button { border: 0; background: none; border-radius: 10px; padding: 9px 4px; font: inherit; font-size: 14px; font-weight: 800; color: var(--muted); cursor: pointer; }
.abas-minha button.ativo { background: var(--surface); color: var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .12); }
.seletor-mes { width: 100%; font: inherit; font-weight: 700; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); background: transparent; color: var(--text); margin-bottom: 12px; }
.mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.mini-cards div { background: rgba(15, 127, 192, .08); border-radius: 12px; padding: 8px 10px; }
.mini-cards span { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.mini-cards strong { font-size: 18px; font-variant-numeric: tabular-nums; }
.pos { color: var(--ok); } .neg { color: var(--err); } .atr { color: var(--warn); }
.destaque { text-align: center; padding: 14px; border-radius: 16px; background: rgba(15, 127, 192, .08); margin-bottom: 12px; }
.destaque span, .destaque small { display: block; color: var(--muted); font-weight: 700; font-size: 13px; }
.destaque strong { font-size: 40px; font-weight: 800; font-variant-numeric: tabular-nums; }
.lista-dias { list-style: none; margin: 0; padding: 0; }
.lista-dias li { display: grid; grid-template-columns: 52px 1fr auto; gap: 10px; align-items: center; padding: 10px 2px; border-bottom: 1px solid var(--border); }
.lista-dias .dia strong { display: block; font-size: 15px; }
.lista-dias .dia small { color: var(--muted); }
.lista-dias .marcas span { display: inline-block; margin: 0 6px 3px 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.lista-dias .marcas span.inc { color: var(--accent); }
.lista-dias .marcas em { color: var(--muted); font-size: 14px; }
.lista-dias .horas { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 14px; }
.chip { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 12px; font-weight: 800; }
.chip.info { background: rgba(15, 127, 192, .12); color: var(--accent); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.err { background: var(--err-soft); color: var(--err); }
.chip.neutro { background: var(--border); color: var(--muted); }
.lista-simples { list-style: none; padding: 0; margin: 0 0 8px; font-size: 14px; }
.lista-simples li { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
h3 { font-size: 16px; margin: 16px 0 8px; }
.botoes-pedido { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.botoes-pedido button {
  border: 1px solid var(--border); background: transparent; color: var(--text); border-radius: 16px; padding: 14px 8px;
  font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; line-height: 1.3;
}
.botoes-pedido span { display: block; font-size: 26px; margin-bottom: 4px; }
.lista-pedidos { list-style: none; padding: 0; margin: 0; }
.lista-pedidos li { border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; font-size: 14px; }
.lista-pedidos .topo-pedido { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 2px; }
.lista-pedidos .texto { color: var(--muted); }
.lista-pedidos .decisao { margin-top: 4px; font-weight: 700; }
.lista-pedidos .link { margin: 4px 0 0; padding: 2px 0; font-size: 14px; }
.lista-pedidos a { color: var(--accent); font-weight: 700; }
textarea { display: block; width: 100%; margin-top: 6px; font: inherit; color: var(--text); background: transparent; border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; }
.duas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.duas input { font-size: 16px !important; }
#form-pedido input[type="date"], #form-pedido input[type="time"] { font-size: 17px; }
label.anexo input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; }
label.anexo .botao-sec { margin-top: 6px; }
#pedido-previa { width: 100%; border-radius: 12px; margin: -4px 0 12px; }
.visor { position: fixed; inset: 0; background: rgba(0, 0, 0, .88); z-index: 20; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #fff; padding: 16px; }
.visor[hidden] { display: none; }
.visor img { max-width: 100%; max-height: 85vh; border-radius: 8px; }
.toast { position: fixed; left: 16px; right: 16px; bottom: max(20px, env(safe-area-inset-bottom)); z-index: 30; background: #0d2236; color: #fff; border-radius: 14px; padding: 12px 16px; font-weight: 700; text-align: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .3); }
.toast[hidden] { display: none; }
.icone-inline { display: inline-block; width: 1.15em; height: 1.15em; vertical-align: -0.2em; }
.icone-inline svg, .botoes-pedido span svg, .icone-titulo svg, .icone-res svg { width: 100%; height: 100%; }
.botoes-pedido span { width: 30px; height: 30px; margin: 0 auto 6px; color: var(--accent); }
.icone-titulo { display: inline-block; width: 26px; height: 26px; vertical-align: -4px; margin-right: 8px; color: var(--accent); }
.res .icone-res svg { width: 44px; height: 44px; }
.duas input { min-width: 0; font-size: 15px !important; padding-left: 10px; padding-right: 8px; }
.duas label { min-width: 0; }

/* Quantidade de dias, parte do dia, PDF e assinatura */
.abas-minha { grid-template-columns: repeat(4, 1fr); }
.abas-minha button { font-size: 13px; padding: 9px 2px; }
.qtd-dias { margin: -4px 0 12px; padding: 8px 12px; border-radius: 12px; background: rgba(15, 127, 192, .08); color: var(--accent); font-weight: 700; }
.qtd-dias:empty { display: none; }
.qtd-dias strong { font-size: 20px; }
.qtd-dias.alerta { background: var(--warn-soft); color: var(--warn); }
.parte-dia { margin: 0 0 12px; }
.parte-dia summary { color: var(--accent); font-weight: 800; cursor: pointer; margin-bottom: 8px; }
.pdf-acoes { display: grid; gap: 8px; margin: 10px 0 12px; }
.pdf-acoes .botao-sec { margin-top: 0; }
.pdf-acoes [hidden] { display: none; }
.pdf-paginas { display: grid; gap: 10px; }
.pdf-paginas canvas { border: 1px solid var(--border); border-radius: 8px; background: #fff; }
.quadro-assinatura { display: block; width: 100%; height: 190px; border: 2px dashed var(--border); border-radius: 14px; background: #fff; touch-action: none; }
#tela-assinar .botao { margin-top: 10px; }
#tela-assinar .check { margin: 10px 0; }

/* Lembrete do próximo ponto */
.lembrete { text-align: left; border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; margin: 14px 0; background: rgba(15, 127, 192, .06); }
.lembrete-topo { display: flex; gap: 10px; align-items: flex-start; }
.lembrete-topo .icone-inline { width: 26px; height: 26px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.lembrete-topo strong { display: block; }
.lembrete-topo small { color: var(--muted); font-size: 14px; }
.lembrete-acoes { display: flex; gap: 12px; align-items: center; margin: 10px 0 8px; }
.lembrete-acoes .link { margin: 0; }
.mini-botao.azul { background: var(--accent); color: #fff; }
.lembrete-ok { color: var(--ok); font-weight: 700; font-size: 14px; }
.lembrete .check { font-size: 14px; margin: 0; }
/* Confirmação "fora do local" */
.sobreposicao { position: fixed; inset: 0; z-index: 25; background: rgba(4, 20, 35, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sobreposicao[hidden] { display: none; }
.cartao.confirmar { max-width: 380px; text-align: center; }
.cartao.confirmar .icone-res { width: 70px; height: 70px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 8px; }
.icone-res.alerta { background: var(--warn-soft); color: var(--warn); }
.icone-res.alerta svg { width: 38px; height: 38px; }
.cartao.confirmar h2 { margin: 0 0 6px; }
