:root {
  --vermelho: #d71920;
  --grafite: #1b2527;
  --texto: #1b2527;
  --apagado: #6b7375;
  --linha: #dfe2e3;
  --fundo: #f3f4f4;
  --branco: #ffffff;
  --verde: #1f7a3a;
  --verde-escuro: #17602d;
  --alerta: #b42318;
  --alerta-fundo: #fdecea;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--fundo); color: var(--texto);
  font-family: Roboto, "Segoe UI", Arial, sans-serif; font-size: 18px;
  -webkit-user-select: none; user-select: none; overscroll-behavior: none;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }

.tela { position: fixed; inset: 0; display: flex; flex-direction: column; background: var(--fundo); }

/* barra de cima */
.barra { height: 64px; flex: 0 0 64px; display: flex; align-items: center; gap: 18px; padding: 0 20px; background: var(--branco); border-bottom: 1px solid var(--linha); }
.logo { height: 34px; }
.logo.pequeno { height: 28px; }
.espaco { flex: 1; }
.corredor { font-size: 22px; font-weight: 700; padding-left: 18px; border-left: 1px solid var(--linha); }
.contador { font-size: 20px; font-weight: 700; color: var(--apagado); font-variant-numeric: tabular-nums; }
.pendencia { width: 12px; height: 12px; border-radius: 50%; background: #e8a400; }
.icone { width: 48px; height: 48px; font-size: 30px; line-height: 1; color: var(--grafite); }
.link { color: var(--grafite); text-decoration: underline; font-size: 17px; padding: 10px 4px; }
.progresso { height: 6px; background: var(--linha); flex: 0 0 6px; }
.progresso > div { height: 100%; width: 0; background: var(--vermelho); transition: width .25s; }

/* tarefa */
.tarefa { flex: 1; display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr); gap: 28px; padding: 24px 28px 8px; min-height: 0; }
.foto { background: var(--branco) center / contain no-repeat; border: 1px solid var(--linha); min-height: 0; display: flex; align-items: center; justify-content: center; color: var(--apagado); font-size: 16px; }
.dados { display: flex; flex-direction: column; min-width: 0; }
.local { border-left: 8px solid var(--vermelho); padding: 2px 0 2px 16px; margin-bottom: 18px; }
.local span { display: block; font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -.5px; }
.local small { display: block; font-size: 22px; font-weight: 600; color: var(--apagado); margin-top: 6px; }
.nome { font-size: 28px; font-weight: 600; line-height: 1.2; }
.codigo { font-size: 17px; color: var(--apagado); margin-top: 8px; font-variant-numeric: tabular-nums; }
.marcas { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.marca { font-size: 16px; font-weight: 600; padding: 6px 10px; border: 1px solid var(--linha); background: var(--branco); }
.marca.forte { border-color: var(--vermelho); color: var(--vermelho); }
.qtd { margin-top: auto; display: flex; align-items: baseline; gap: 10px; }
.qtd span { font-size: 120px; font-weight: 800; line-height: .9; font-variant-numeric: tabular-nums; }
.qtd small { font-size: 26px; font-weight: 600; color: var(--apagado); }

/* acoes */
.acoes { flex: 0 0 auto; padding: 0 28px 20px; }
.linha-proximo { display: flex; align-items: center; gap: 12px; min-height: 44px; color: var(--apagado); font-size: 18px; }
.linha-proximo b { color: var(--texto); }
.botoes { display: flex; gap: 16px; }
.botao { height: 88px; padding: 0 28px; font-size: 26px; font-weight: 700; border-radius: 6px; }
.botao.confirmar { flex: 1; background: var(--verde); color: #fff; }
.botao.confirmar:active { background: var(--verde-escuro); }
.botao.secundario { flex: 0 0 30%; background: var(--branco); border: 2px solid var(--grafite); color: var(--grafite); }
.botao.primario { background: var(--grafite); color: #fff; }
.botao.primario:disabled { opacity: .45; }
.botao.enorme { height: 104px; font-size: 30px; width: min(560px, 90vw); }
.botao.largo { width: 100%; }

/* inicio / fim / entrada */
.inicio { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; text-align: center; }
.inicio h1 { margin: 0; font-size: 40px; }
.inicio .botao.secundario { flex: none; width: min(560px, 90vw); height: 72px; font-size: 22px; }
.resumo { font-size: 24px; color: var(--apagado); line-height: 1.5; }
.resumo b { color: var(--texto); }
.entrada { margin: auto; width: min(460px, 92vw); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.logo-grande { width: 280px; margin-bottom: 10px; }
.entrada h2 { margin: 0 0 14px; font-size: 26px; }
#passoSenha, #passoNome { width: 100%; display: flex; flex-direction: column; align-items: stretch; }
#passoSenha .visor { margin-bottom: 12px; }
.campo { width: 100%; height: 72px; font-size: 28px; padding: 0 18px; border: 2px solid var(--grafite); border-radius: 6px; margin-bottom: 14px; }
.erro { color: var(--alerta); font-size: 20px; min-height: 26px; margin: 0; }

/* teclado numerico */
.visor { width: 100%; height: 80px; border: 2px solid var(--grafite); border-radius: 6px; background: var(--branco); font-size: 48px; font-weight: 800; display: flex; align-items: center; justify-content: center; letter-spacing: 6px; font-variant-numeric: tabular-nums; }
.teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; }
.teclado button { height: 76px; font-size: 32px; font-weight: 700; background: var(--branco); border: 1px solid var(--linha); border-radius: 6px; }
.teclado button:active { background: var(--linha); }
.teclado button.acao { font-size: 22px; }

/* folha sobre a tela */
.folha { position: fixed; inset: 0; background: rgba(27, 37, 39, .55); display: flex; align-items: center; justify-content: center; z-index: 10; }
.folha-caixa { background: var(--branco); width: min(620px, 94vw); max-height: 94vh; overflow: auto; padding: 28px; border-radius: 8px; display: flex; flex-direction: column; gap: 16px; }
.folha-caixa h2 { margin: 0; font-size: 28px; }
.folha-caixa p { margin: 0; font-size: 20px; color: var(--apagado); line-height: 1.4; }
.folha-caixa p b { color: var(--texto); }
.folha-caixa .botoes .botao { flex: 1; height: 80px; }
.folha-produto { display: flex; gap: 16px; align-items: center; }
.folha-produto .mini { width: 92px; height: 92px; flex: 0 0 92px; background: var(--branco) center / contain no-repeat; border: 1px solid var(--linha); }
.folha-produto div { font-size: 20px; font-weight: 600; }
.lista-locais { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.lista-locais button { min-height: 64px; padding: 8px; font-size: 18px; font-weight: 700; background: var(--branco); border: 1px solid var(--linha); border-radius: 6px; }
.lista-corredor { display: flex; flex-direction: column; }
.lista-corredor div { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--linha); font-size: 19px; }
.lista-corredor div.feito { color: var(--apagado); text-decoration: line-through; }
.lista-corredor span:first-child { width: 150px; flex: 0 0 150px; font-weight: 700; }
.lista-corredor span:last-child { margin-left: auto; font-weight: 700; }
.data-grande { font-size: 44px; font-weight: 800; text-align: center; padding: 8px 0; color: var(--texto); }

/* aviso rapido */
.aviso-rapido { position: fixed; left: 50%; bottom: 150px; transform: translateX(-50%); background: var(--grafite); color: #fff; padding: 18px 28px; font-size: 24px; font-weight: 700; border-radius: 6px; z-index: 20; max-width: 90vw; text-align: center; }
.aviso-rapido.ruim { background: var(--alerta); }

/* tablet em pe */
@media (orientation: portrait) {
  .tarefa { grid-template-columns: 1fr; grid-template-rows: minmax(0, 42%) minmax(0, 1fr); }
  .local span { font-size: 56px; }
  .qtd span { font-size: 104px; }
}
