/* App MIJ: preto e branco como o logo, vermelho só nos destaques */
:root {
  --fundo: #f3f3f1;
  --cartao: #ffffff;
  --tinta: #0d0d0e;
  --tinta-2: #1c1c1f;
  --texto: #111113;
  --suave: #6c6c72;
  --linha: #e8e8e4;
  --mij: #e3262f;
  --mij-escuro: #b31b23;
  --mij-claro: #fdeceb;
  --verde: #12a150;
  --verde-claro: #e5f6ec;
  --amarelo: #b26b00;
  --amarelo-claro: #fdf3df;
  --azul: #2459d6;
  --azul-claro: #e8eefc;
  --raio: 20px;
  --sombra: 0 1px 2px rgba(0, 0, 0, .04), 0 6px 24px rgba(0, 0, 0, .05);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;
  background: var(--fundo); color: var(--texto); font-size: 16px; line-height: 1.4;
  -webkit-tap-highlight-color: transparent; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--texto); }
.escondido { display: none !important; }
.ic { width: 22px; height: 22px; flex-shrink: 0; display: block; }
.carregando-tela { min-height: 100vh; display: grid; place-items: center; background: var(--tinta); color: #fff; }

/* ---------- Cabeçalho ---------- */
.cabecalho {
  background: var(--tinta); color: #fff; padding: calc(10px + env(safe-area-inset-top)) 16px 12px;
  display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 20;
}
.cabecalho .logo { height: 30px; display: block; }
.cabecalho h1 { font-size: 17px; font-weight: 700; margin: 0; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.cabecalho .espaco { flex: 1; }
.cabecalho .voltar, .cabecalho .icone-botao {
  background: rgba(255, 255, 255, .1); border: 0; color: #fff; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; position: relative; flex-shrink: 0; text-decoration: none;
}
.bolinha {
  position: absolute; top: -3px; right: -3px; background: var(--mij); color: #fff; font-size: 11px; font-weight: 800;
  min-width: 19px; height: 19px; border-radius: 10px; display: grid; place-items: center; padding: 0 5px; border: 2px solid var(--tinta);
}

/* Faixa preta da tela inicial */
.hero { background: var(--tinta); color: #fff; padding: 4px 16px 22px; border-radius: 0 0 28px 28px; margin-bottom: 4px; }
.hero .ola { color: #a1a1a8; font-size: 15px; }
.hero .nome { font-size: 30px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.hero .sub { color: #a1a1a8; font-size: 14px; margin-top: 2px; }
.painel-ponto { background: var(--tinta-2); border-radius: 22px; padding: 16px; margin-top: 18px; }
.painel-ponto .estado { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 15px; }
.painel-ponto .estado .ponto-luz { width: 10px; height: 10px; border-radius: 50%; background: #6c6c72; }
.painel-ponto .estado.ativo .ponto-luz { background: #22c55e; box-shadow: 0 0 0 4px rgba(34, 197, 94, .2); }
.painel-ponto .numeros { display: flex; gap: 22px; margin: 12px 0 14px; }
.painel-ponto .numeros div span { display: block; color: #a1a1a8; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.painel-ponto .numeros div strong { font-size: 22px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

.conteudo { max-width: 640px; margin: 0 auto; padding: 16px 16px 120px; }
.conteudo.largo { max-width: 1040px; }
h2 { font-size: 17px; margin: 0 0 12px; letter-spacing: -.01em; }
.secao { font-size: 13px; font-weight: 700; color: var(--suave); text-transform: uppercase; letter-spacing: .06em; margin: 22px 4px 10px; }
.suave { color: var(--suave); font-size: 14px; }
.centro { text-align: center; }
.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cartao { background: var(--cartao); border-radius: var(--raio); padding: 18px; box-shadow: var(--sombra); margin-bottom: 14px; }
.linha { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--linha); }
.linha:first-child { border-top: 0; }
.total { font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.numero { font-variant-numeric: tabular-nums; }
.grande { font-size: 34px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }

/* ---------- Botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 14px;
  padding: 12px 18px; min-height: 50px; background: var(--tinta); color: #fff; font-weight: 700; cursor: pointer; text-decoration: none;
  transition: transform .08s;
}
.botao .ic { width: 20px; height: 20px; }
.botao:active { transform: scale(.97); }
.botao:disabled { background: #d4d4d2; color: #8a8a8f; cursor: not-allowed; transform: none; }
.botao.vermelho { background: var(--mij); }
.botao.verde { background: var(--verde); }
.botao.secundario, .botao.cinza { background: #ececea; color: var(--texto); }
.botao.branco { background: #fff; color: var(--tinta); }
.botao.leve { background: transparent; color: var(--suave); padding: 8px 10px; min-height: 40px; font-weight: 600; }
.botao.pequeno { min-height: 40px; padding: 8px 14px; font-size: 14px; border-radius: 12px; }
.botao.cheio { width: 100%; }
.botoes { display: flex; gap: 8px; flex-wrap: wrap; }
.topo > .botao { white-space: nowrap; flex-shrink: 0; }

/* ---------- Atalhos ---------- */
.atalhos { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.atalho {
  background: var(--cartao); border-radius: var(--raio); padding: 16px; box-shadow: var(--sombra); text-decoration: none; color: var(--texto);
  display: flex; flex-direction: column; gap: 4px; min-height: 120px; border: 2px solid transparent; position: relative;
}
.atalho .chip { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 8px; background: #f0f0ee; color: var(--tinta); }
.atalho .chip.vermelho { background: var(--mij-claro); color: var(--mij); }
.atalho .chip.verde { background: var(--verde-claro); color: var(--verde); }
.atalho .chip.azul { background: var(--azul-claro); color: var(--azul); }
.atalho .chip.amarelo { background: var(--amarelo-claro); color: var(--amarelo); }
.atalho strong { font-size: 16px; letter-spacing: -.01em; }
.atalho span.suave { font-size: 13px; }
.atalho.destaque { border-color: var(--mij); }
.atalho .bolinha { top: 12px; right: 12px; border-color: #fff; }

/* ---------- Ponto ---------- */
.relogio { font-size: 56px; font-weight: 800; text-align: center; letter-spacing: -.04em; font-variant-numeric: tabular-nums; margin-top: 8px; }
.data-hoje { text-align: center; color: var(--suave); margin-bottom: 26px; }
.data-hoje::first-letter { text-transform: uppercase; }
.bater-area { display: grid; place-items: center; margin: 6px 0 18px; }
.bater {
  width: 220px; height: 220px; border-radius: 50%; border: 0; color: #fff; background: var(--tinta); cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; position: relative;
  box-shadow: 0 18px 40px rgba(0, 0, 0, .22); font-size: 24px; font-weight: 800; letter-spacing: -.01em; transition: transform .1s;
}
.bater .ic { width: 40px; height: 40px; }
.bater small { font-size: 14px; font-weight: 500; opacity: .75; }
.bater:active { transform: scale(.97); }
.bater.saida { background: var(--mij); box-shadow: 0 18px 40px rgba(227, 38, 47, .35); }
.bater.saida::after { content: ""; position: absolute; inset: -10px; border-radius: 50%; border: 3px solid var(--mij); opacity: .35; animation: pulsar 2s ease-out infinite; }
@keyframes pulsar { 0% { transform: scale(.94); opacity: .5; } 100% { transform: scale(1.12); opacity: 0; } }
.bater:disabled { opacity: .75; }
.status { text-align: center; margin: 0; font-size: 15px; color: var(--suave); }
.status.trabalhando { color: var(--verde); font-weight: 700; }
.opcao { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border: 1.5px solid var(--linha); border-radius: 16px; margin-top: 12px; cursor: pointer; }
.opcao input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--mij); }

/* ---------- Etiquetas ---------- */
.etiqueta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.etiqueta.amarela { background: var(--amarelo-claro); color: var(--amarelo); }
.etiqueta.verde { background: var(--verde-claro); color: var(--verde); }
.etiqueta.vermelha { background: var(--mij-claro); color: var(--mij); }
.etiqueta.azul { background: var(--azul-claro); color: var(--azul); }
.etiqueta.cinza { background: #ececea; color: var(--suave); }
.etiqueta.preta { background: var(--tinta); color: #fff; }

/* ---------- Formulários ---------- */
.campo { display: block; margin-bottom: 14px; }
.campo > span { display: block; font-size: 13px; font-weight: 600; color: var(--suave); margin-bottom: 6px; }
.campo input, .campo select, .campo textarea {
  width: 100%; border: 1.5px solid var(--linha); border-radius: 14px; padding: 13px 14px; background: #fff; min-height: 52px; font-size: 16px;
}
.campo textarea { min-height: 90px; resize: vertical; }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--tinta); }
.campo small { display: block; margin-top: 5px; font-size: 13px; color: var(--suave); }
.campo small.ok { color: var(--verde); font-weight: 600; }
.campo small.ruim { color: var(--mij); font-weight: 600; }
.grade2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.escolha { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.escolha button { border: 1.5px solid var(--linha); background: #fff; border-radius: 14px; padding: 15px 8px; font-weight: 700; cursor: pointer; }
.escolha button.marcado { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.checagem { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.checagem input { width: 20px; height: 20px; accent-color: var(--tinta); }
.erro { color: var(--mij); font-size: 14px; min-height: 20px; margin: 4px 0 8px; font-weight: 600; }
.busca { width: 100%; border: 1.5px solid var(--linha); border-radius: 14px; padding: 13px 14px; min-height: 50px; background: #fff; font-size: 16px; }

/* ---------- Barra de baixo ---------- */
.abas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-top: 1px solid var(--linha); display: flex; justify-content: center; align-items: flex-end;
  padding: 0 6px env(safe-area-inset-bottom);
}
.abas a {
  flex: 1; max-width: 120px; text-decoration: none; padding: 9px 2px 9px; font-size: 11px; font-weight: 600; color: #8e8e93;
  display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; position: relative;
}
.abas a.ativa { color: var(--tinta); }
.abas a.centro-ponto { padding-top: 0; }
.abas a.centro-ponto .bola {
  width: 60px; height: 60px; border-radius: 50%; background: var(--tinta); color: #fff; display: grid; place-items: center;
  margin-top: -22px; box-shadow: 0 8px 20px rgba(0, 0, 0, .25); border: 4px solid var(--fundo);
}
.abas a.centro-ponto .bola .ic { width: 26px; height: 26px; }
.abas a.centro-ponto.trabalhando .bola { background: var(--mij); box-shadow: 0 8px 20px rgba(227, 38, 47, .4); }
.abas a .bolinha { top: 2px; right: calc(50% - 22px); border-color: #fff; }

/* ---------- Modal ---------- */
.fundo-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); display: flex; align-items: flex-end; justify-content: center; z-index: 50; }
.modal {
  background: #fff; width: 100%; max-width: 560px; border-radius: 28px 28px 0 0;
  padding: 26px 20px calc(22px + env(safe-area-inset-bottom)); max-height: 92vh; overflow: auto; animation: subir .2s ease-out;
}
.modal::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: #dcdcd8; margin: -12px auto 14px; }
@media (min-width: 640px) { .fundo-modal { align-items: center; } .modal { border-radius: 28px; } .modal::before { display: none; } }
@keyframes subir { from { transform: translateY(30px); opacity: .5; } }
.modal .destaque { font-size: 44px; font-weight: 800; color: var(--texto); text-align: center; margin: 4px 0; letter-spacing: -.03em; }
.modal h2 { text-align: center; font-size: 21px; }
.modal p.centro { text-align: center; }
.selo { width: 68px; height: 68px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 12px; background: var(--tinta); color: #fff; }
.selo .ic { width: 32px; height: 32px; }
.selo.verde { background: var(--verde); }
.selo.vermelho { background: var(--mij); }
.selo.amarelo { background: #f5a524; }
.acoes { display: grid; gap: 10px; margin-top: 18px; }

.aviso { display: flex; gap: 10px; align-items: flex-start; padding: 13px 14px; border-radius: 16px; font-size: 14px; margin-bottom: 12px; text-decoration: none; }
.aviso > .ic { width: 20px; height: 20px; margin-top: 1px; }
.aviso.info { background: var(--azul-claro); color: var(--azul); }
.aviso.atencao { background: var(--amarelo-claro); color: var(--amarelo); }
.aviso.ok { background: var(--verde-claro); color: var(--verde); }
.aviso.perigo { background: var(--mij-claro); color: var(--mij-escuro); }
.aviso a { color: inherit; font-weight: 700; }

.toast {
  position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--tinta); color: #fff;
  padding: 13px 18px; border-radius: 16px; z-index: 60; max-width: calc(100% - 32px); box-shadow: 0 10px 30px rgba(0, 0, 0, .25); font-weight: 600;
}

/* ---------- Câmera ---------- */
.camera { position: fixed; inset: 0; background: #000; z-index: 70; display: flex; flex-direction: column; }
.camera video { flex: 1; width: 100%; object-fit: cover; min-height: 0; }
.camera .moldura { position: absolute; inset: 12% 8% 24%; border: 3px solid rgba(255, 255, 255, .95); border-radius: 22px; box-shadow: 0 0 0 9999px rgba(0, 0, 0, .4); pointer-events: none; }
.camera .dica { position: absolute; top: calc(4% + env(safe-area-inset-top)); left: 0; right: 0; text-align: center; color: #fff; font-weight: 700; text-shadow: 0 1px 4px #000; padding: 0 16px; }
.camera .controles { display: flex; align-items: center; justify-content: space-around; padding: 18px 16px calc(18px + env(safe-area-inset-bottom)); background: #000; }
.camera .disparo { width: 76px; height: 76px; border-radius: 50%; border: 5px solid #fff; background: #fff; box-shadow: inset 0 0 0 3px #000; cursor: pointer; }
.camera .botao.leve { color: #fff; }

.foto { width: 100%; max-height: 300px; object-fit: contain; background: #111; border-radius: 16px; margin-bottom: 12px; }
.miniatura { width: 54px; height: 54px; border-radius: 14px; object-fit: cover; background: #e5e5e2; flex-shrink: 0; cursor: pointer; }
.item { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--linha); }
.item:first-child { border-top: 0; }
.item .meio { flex: 1; min-width: 0; }
.item .titulo { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item.clicavel { cursor: pointer; text-decoration: none; color: inherit; }
.item .seta { color: #b4b4b0; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--tinta); color: #fff; display: grid; place-items: center; font-weight: 800; flex-shrink: 0; font-size: 15px; }

.carregando { display: inline-block; width: 18px; height: 18px; border: 3px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: girar .8s linear infinite; vertical-align: middle; }
@keyframes girar { to { transform: rotate(360deg); } }
.vazio { text-align: center; color: var(--suave); padding: 18px 0; font-size: 14px; }

.tabela { width: 100%; border-collapse: collapse; font-size: 14px; }
.tabela th, .tabela td { text-align: left; padding: 10px 6px; border-top: 1px solid var(--linha); vertical-align: top; }
.tabela th { color: var(--suave); font-weight: 700; border-top: 0; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.tabela td.dir, .tabela th.dir { text-align: right; }
.rolar { overflow-x: auto; }

.guias { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 12px; padding-bottom: 2px; scrollbar-width: none; }
.guias button { border: 0; background: #e7e7e4; border-radius: 999px; padding: 9px 15px; font-weight: 700; color: var(--texto); white-space: nowrap; cursor: pointer; font-size: 14px; }
.guias button.ativa { background: var(--tinta); color: #fff; }

/* ---------- Eventos ---------- */
.evento { position: relative; overflow: hidden; }
.evento .faixa { display: flex; align-items: center; gap: 6px; font-weight: 700; color: var(--mij); font-size: 13px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 6px; }
.evento.hoje { background: var(--tinta); color: #fff; }
.evento.hoje .suave, .evento.hoje .botao.leve { color: #a1a1a8; }
.evento .quando { display: flex; align-items: center; gap: 6px; color: var(--suave); font-size: 14px; }
.evento.hoje .quando { color: #d4d4d8; }
.evento .quando .ic, .evento .onde .ic { width: 16px; height: 16px; }
.evento .onde { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--suave); margin-top: 2px; }
.evento .titulo-ev { font-weight: 800; font-size: 19px; letter-spacing: -.01em; margin: 2px 0 4px; }

/* ---------- Entrada ---------- */
.boas-vindas { min-height: 100vh; min-height: 100dvh; background: var(--tinta); color: #fff; display: flex; flex-direction: column; padding: calc(28px + env(safe-area-inset-top)) 22px calc(24px + env(safe-area-inset-bottom)); }
.boas-vindas .logo-grande { width: min(300px, 78vw); margin: 12vh auto 10px; display: block; }
.boas-vindas .subtitulo { text-align: center; color: #a1a1a8; margin: 0 0 auto; padding-bottom: 40px; }
.boas-vindas .botao { width: 100%; min-height: 58px; font-size: 17px; border-radius: 18px; }
.boas-vindas .botao.vazado { background: transparent; border: 1.5px solid #3a3a3f; color: #fff; }
.boas-vindas .rodape { margin-top: 22px; text-align: center; color: #6c6c72; font-size: 12px; }
.boas-vindas .rodape a { color: #a1a1a8; }
.boas-vindas form { background: #fff; color: var(--texto); border-radius: 24px; padding: 20px; }
.passos { display: flex; gap: 6px; margin-bottom: 16px; }
.passos span { flex: 1; height: 5px; border-radius: 3px; background: var(--linha); }
.passos span.feito { background: var(--tinta); }

.logos-marcas { background: var(--tinta); border-radius: var(--raio); padding: 22px; text-align: center; }
.logos-marcas img { width: 100%; max-width: 340px; }

.chat { display: flex; flex-direction: column; gap: 10px; min-height: 40vh; }
.balao { max-width: 88%; padding: 11px 14px; border-radius: 20px; white-space: pre-wrap; font-size: 15px; }
.balao.eu { align-self: flex-end; background: var(--tinta); color: #fff; border-bottom-right-radius: 6px; }
.balao.ia { align-self: flex-start; background: #fff; box-shadow: var(--sombra); border-bottom-left-radius: 6px; }

@media print {
  .cabecalho, .abas, .nao-imprimir, .botao { display: none !important; }
  body { background: #fff; }
  .cartao { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
  .conteudo { padding: 0; max-width: none; }
}
