/* NazaEntrega. Uso na rua, no sol, com uma mao: fundo claro, contraste alto, alvos grandes.
   Cores do app: azul profundo, azul-royal e amarelo nos destaques (o Paulo achou o app palido sem o amarelo). */
:root {
  --tinta: #071A4A;          /* azul profundo: texto e cabecalho */
  --royal: #1B4DE0;          /* acoes e links */
  --amarelo: #F5E003;        /* parada da vez (um lugar so) */
  --ciano: #58C8EA;          /* azul claro da Nazanet: marca e detalhes sobre o azul escuro */
  --papel: #F3F5FA;          /* fundo frio, nao creme */
  --branco: #FFFFFF;
  --linha: #CBD3E6;
  --suave: #5A6788;          /* texto de apoio */
  --ok: #0F7B4F;             /* entregue */
  --ok-fundo: #E2F4EC;
  --alerta: #B4410B;         /* nao entregue */
  --alerta-fundo: #FBEBE2;
  --escrit: #6B3FB8;         /* pegou no escritorio */
  --escrit-fundo: #EFE8FA;
  --raio-g: 18px;
  --raio-p: 10px;
  --sombra: 0 1px 0 rgba(7, 26, 74, .08), 0 6px 18px -10px rgba(7, 26, 74, .35);
  font-family: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--tinta);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--papel); }
body { min-height: 100dvh; font-size: 17px; line-height: 1.4; font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--royal); outline-offset: 2px; }
a { color: var(--royal); }
.oculto { display: none !important; }

/* ---------- topo ---------- */
.topo {
  position: sticky; top: 0; z-index: 10; background: var(--tinta); color: var(--branco);
  padding: calc(env(safe-area-inset-top) + 10px) 16px 12px; display: flex; align-items: center; gap: 12px;
}
.topo .marca { font-weight: 800; font-stretch: 112%; font-size: 21px; letter-spacing: -.01em; }
.topo .marca b { color: var(--amarelo); font-weight: 800; }
.topo .marca { display: flex; align-items: center; gap: 9px; }
.topo .selo { width: 30px; height: 30px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(255,255,255,.18); }
.topo .nazanet { display: none; height: 22px; width: auto; opacity: .9; padding-left: 14px; border-left: 1px solid rgba(255,255,255,.25); }
@media (min-width: 700px) { .topo .nazanet { display: block; } }
.topo .voltar { background: none; border: 0; color: var(--branco); font-size: 26px; line-height: 1; padding: 4px 6px 4px 0; }
.topo .quem { margin-left: auto; font-size: 14px; opacity: .85; text-align: right; }
.topo .quem button { background: none; border: 0; color: var(--amarelo); padding: 0; font-size: 14px; text-decoration: underline; }
.fila-off { background: var(--amarelo); color: var(--tinta); font-size: 14px; font-weight: 600; padding: 8px 16px; }

main { max-width: 760px; margin: 0 auto; padding: 16px 16px calc(env(safe-area-inset-bottom) + 96px); }
h1 { font-size: 26px; font-weight: 800; font-stretch: 108%; margin: 6px 0 4px; letter-spacing: -.01em; }
h2 { font-size: 19px; font-weight: 700; margin: 22px 0 10px; }
.apoio { color: var(--suave); font-size: 15px; margin: 0 0 14px; }

/* ---------- entrar ---------- */
.entrar { max-width: 420px; margin: 0 auto; padding-top: 8vh; }
.entrar .selo-grande { width: 84px; height: 84px; border-radius: 22px; display: block; margin-bottom: 18px; box-shadow: 0 10px 24px -12px rgba(7, 26, 74, .6); }
.entrar .assina { display: flex; align-items: center; justify-content: center; gap: 10px; margin: 34px 0 8px; color: var(--suave); font-size: 13px; }
.entrar .assina img { height: 26px; width: auto; }
.entrar .logo { font-size: 40px; font-weight: 800; font-stretch: 115%; letter-spacing: -.02em; line-height: 1; }
.entrar .logo b { color: var(--royal); }
.entrar .logo i { display: block; width: 64px; height: 8px; background: var(--amarelo); margin: 12px 0 18px; border-radius: 4px; }
.nomes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 18px 0; }
.nomes button {
  min-height: 56px; border: 2px solid var(--linha); background: var(--branco); border-radius: var(--raio-p);
  font-weight: 600; text-align: left; padding: 10px 12px;
}
.nomes button small { display: block; font-weight: 400; color: var(--suave); font-size: 13px; }
.nomes button[aria-pressed="true"] { border-color: var(--royal); box-shadow: inset 0 0 0 1px var(--royal); }
.pin { display: flex; gap: 10px; justify-content: center; margin: 18px 0 8px; }
.pin span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--tinta); }
.pin span.cheio { background: var(--tinta); }
.teclado { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.teclado button {
  height: 64px; font-size: 26px; font-weight: 700; border: 0; border-radius: var(--raio-p);
  background: var(--branco); box-shadow: var(--sombra);
}
.teclado button.fraco { background: transparent; box-shadow: none; font-size: 16px; color: var(--suave); }
.erro { color: var(--alerta); font-weight: 600; min-height: 24px; text-align: center; }

/* ---------- listas de escolha (cidades, pacotes) ---------- */
.lista { display: grid; gap: 10px; }
.item {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; width: 100%;
  background: var(--branco); border: 0; border-radius: var(--raio-g); padding: 14px 16px; text-align: left; box-shadow: var(--sombra);
}
.item .titulo { font-weight: 700; font-size: 18px; }
.item .sub { color: var(--suave); font-size: 14px; grid-column: 1 / -1; }
.item .num { font-weight: 800; font-size: 18px; }
.item .etiqueta { font-size: 13px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--papel); }
.item .etiqueta.seu { background: var(--amarelo); }
.item .etiqueta.outro { background: #E6E9F2; color: var(--suave); }
.item[disabled] { opacity: .55; }

/* barra de progresso: trilho e o que ja foi */
.barra { grid-column: 1 / -1; height: 8px; border-radius: 4px; background: #E3E8F3; overflow: hidden; display: flex; }
.barra i { display: block; height: 100%; background: var(--ok); }
.barra i.esc { background: var(--escrit); }

/* ---------- rota (a coisa que marca o app: linha de paradas) ---------- */
.cab-rota { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cab-rota .contagem { margin-left: auto; font-weight: 800; font-size: 20px; }
.cab-rota .contagem small { font-weight: 500; color: var(--suave); font-size: 14px; }
.rota { list-style: none; margin: 16px 0 0; padding: 0; position: relative; }
.rota::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 4px; background: var(--linha); border-radius: 2px; }
.parada { position: relative; padding: 0 0 12px 46px; }
.parada .ponto {
  position: absolute; left: 4px; top: 14px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--branco); border: 4px solid var(--linha); display: grid; place-items: center; font-size: 13px; font-weight: 800;
}
.parada .cartao { background: var(--branco); border-radius: var(--raio-g); padding: 12px 14px; box-shadow: var(--sombra); }
.parada .nome { font-weight: 700; font-size: 18px; line-height: 1.25; }
.parada .end { font-size: 15px; margin-top: 2px; }
.parada .ref { font-size: 14px; color: var(--suave); margin-top: 4px; }
.parada .carnes { font-size: 13px; color: var(--suave); margin-top: 4px; }
.parada .estado { font-size: 14px; font-weight: 600; margin-top: 6px; }
.parada.feita .ponto { border-color: var(--ok); background: var(--ok); color: var(--branco); }
.parada.feita .cartao { background: transparent; box-shadow: none; padding: 6px 4px; }
.parada.feita .nome { font-size: 16px; font-weight: 600; color: var(--suave); }
.parada.feita .end, .parada.feita .ref, .parada.feita .carnes { display: none; }
.parada.feita .estado { color: var(--ok); margin-top: 0; }
.parada.esc .ponto { border-color: var(--escrit); background: var(--escrit); }
.parada.esc .estado { color: var(--escrit); }
.parada.falhou .ponto { border-color: var(--alerta); background: var(--alerta-fundo); color: var(--alerta); }
.parada.falhou .estado { color: var(--alerta); }
.parada.falhou .cartao { background: transparent; box-shadow: none; padding: 6px 4px; }
.parada.falhou .end, .parada.falhou .ref, .parada.falhou .carnes { display: none; }
.parada .tentou { display: inline-block; font-size: 13px; font-weight: 600; color: var(--alerta); background: var(--alerta-fundo);
  padding: 2px 8px; border-radius: 999px; margin-top: 6px; }

/* a parada da vez: o unico amarelo da tela */
.parada.vez .ponto { border-color: var(--tinta); background: var(--amarelo); width: 34px; height: 34px; left: 0; top: 12px; }
.parada.vez .cartao { box-shadow: 0 0 0 3px var(--tinta), var(--sombra); padding: 16px; }
.parada.vez .nome { font-size: 22px; font-weight: 800; }
.parada.vez .end { font-size: 17px; font-weight: 600; }
.atalhos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.atalhos a, .atalhos button {
  display: grid; place-items: center; min-height: 48px; border-radius: var(--raio-p); border: 2px solid var(--linha);
  background: var(--branco); font-weight: 600; font-size: 15px; text-decoration: none; color: var(--tinta);
}
.atalhos [aria-disabled="true"] { opacity: .4; pointer-events: none; }
.decidir { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.decidir .btn { padding: 0 8px; white-space: nowrap; font-size: 17px; }
.btn {
  min-height: 60px; border-radius: 14px; border: 0; font-weight: 800; font-size: 18px; padding: 0 16px;
}
.btn.entregue { background: var(--ok); color: var(--branco); }
.btn.nao { background: var(--branco); color: var(--alerta); border: 2px solid var(--alerta); }
.btn.azul { background: var(--royal); color: var(--branco); }
.btn.claro { background: var(--branco); color: var(--tinta); border: 2px solid var(--linha); }
.btn.largo { width: 100%; }
.btn[disabled] { opacity: .5; }
.link { background: none; border: 0; padding: 8px 0; color: var(--royal); font-weight: 600; text-decoration: underline; font-size: 15px; }
.acabou { text-align: center; background: var(--branco); border-radius: var(--raio-g); padding: 22px 16px; box-shadow: var(--sombra); margin-top: 12px; }
.acabou strong { display: block; font-size: 22px; }

/* ---------- folha de baixo (nao entregue, quem recebeu) ---------- */
.veu { position: fixed; inset: 0; background: rgba(7, 26, 74, .45); z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.folha {
  background: var(--branco); width: 100%; max-width: 760px; border-radius: 22px 22px 0 0; max-height: 92dvh; overflow: auto;
  padding: 18px 16px calc(env(safe-area-inset-bottom) + 18px); animation: sobe .18s ease-out;
}
@keyframes sobe { from { transform: translateY(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.folha h3 { margin: 0 0 4px; font-size: 21px; }
.folha .quem { color: var(--suave); margin: 0 0 14px; }
.opcoes { display: grid; gap: 8px; margin: 8px 0 16px; }
.opcoes.duas { grid-template-columns: 1fr 1fr; }
.opcoes label {
  display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 12px; border: 2px solid var(--linha);
  border-radius: var(--raio-p); font-weight: 600; font-size: 16px;
}
.opcoes label small { display: block; font-weight: 400; color: var(--suave); font-size: 13px; }
.opcoes input { width: 22px; height: 22px; accent-color: var(--royal); flex: none; }
.opcoes label:has(input:checked) { border-color: var(--royal); background: #EEF2FD; }
.campo { width: 100%; min-height: 52px; border: 2px solid var(--linha); border-radius: var(--raio-p); padding: 10px 12px; background: var(--branco); }
textarea.campo { min-height: 72px; resize: vertical; }
.rotulo { font-weight: 700; font-size: 15px; margin: 6px 0 2px; display: block; }
.linha-btn { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 16px; }

/* aviso que some (com desfazer) */
.aviso {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom) + 16px); z-index: 40;
  background: var(--tinta); color: var(--branco); border-radius: 14px; padding: 12px 14px; display: flex; gap: 14px; align-items: center;
  width: min(92vw, 520px); box-shadow: 0 10px 30px -10px rgba(7,26,74,.6); font-weight: 600;
}
.aviso button { margin-left: auto; background: none; border: 0; color: var(--amarelo); font-weight: 800; text-decoration: underline; font-size: 16px; }

/* ---------- escritorio ---------- */
.abas {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--branco); border-top: 1px solid var(--linha);
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-bottom: env(safe-area-inset-bottom);
}
.abas button { background: none; border: 0; min-height: 60px; font-weight: 600; font-size: 14px; color: var(--suave); border-top: 4px solid transparent; }
.abas button[aria-current="page"] { color: var(--tinta); border-top-color: var(--royal); }
@media (min-width: 900px) {
  .abas { position: sticky; top: 64px; bottom: auto; max-width: 760px; margin: 0 auto; border: 0; background: transparent; padding: 0 16px; }
  .abas button { border-top: 0; border-bottom: 4px solid transparent; }
  .abas button[aria-current="page"] { border-bottom-color: var(--royal); }
}

/* o numero grande do painel: quanto ja foi entregue de tudo */
.total { background: var(--tinta); color: var(--branco); border-radius: var(--raio-g); padding: 18px 18px 16px; margin-top: 6px; }
.total .linha1 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.total .pct { font-size: 52px; font-weight: 800; font-stretch: 115%; line-height: 1; letter-spacing: -.02em; }
.total .falta { font-size: 18px; font-weight: 700; color: var(--amarelo); }
.total .detalhe { font-size: 15px; opacity: .85; margin-top: 8px; }
.total .estrada { height: 14px; border-radius: 7px; background: rgba(255,255,255,.18); margin-top: 14px; overflow: hidden; display: flex; }
.total .estrada i { background: var(--amarelo); }
.total .estrada i.esc { background: #B9A1EA; }
.legenda { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; margin-top: 8px; opacity: .9; }
.legenda span::before { content: ""; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; background: var(--amarelo); }
.legenda span.esc::before { background: #B9A1EA; }

.tabela { width: 100%; border-collapse: collapse; background: var(--branco); border-radius: var(--raio-g); overflow: hidden; box-shadow: var(--sombra); }
.tabela th, .tabela td { padding: 11px 12px; text-align: left; border-bottom: 1px solid #E6EAF3; font-size: 15px; vertical-align: top; }
.tabela th { font-size: 13px; color: var(--suave); font-weight: 600; background: #F8F9FC; }
.tabela td.n { text-align: right; font-weight: 700; white-space: nowrap; }
.tabela tr:last-child td { border-bottom: 0; }
.mini { height: 6px; border-radius: 3px; background: #E3E8F3; margin-top: 6px; overflow: hidden; display: flex; min-width: 80px; }
.mini i { background: var(--ok); }
.mini i.esc { background: var(--escrit); }
.vazio { background: var(--branco); border-radius: var(--raio-g); padding: 18px; color: var(--suave); box-shadow: var(--sombra); }
.chip { display: inline-block; font-size: 13px; font-weight: 600; padding: 2px 8px; border-radius: 999px; }
.chip.entregue { background: var(--ok-fundo); color: var(--ok); }
.chip.escritorio { background: var(--escrit-fundo); color: var(--escrit); }
.chip.pendente { background: #E6E9F2; color: var(--suave); }
.chip.repescagem, .chip.devolvido { background: var(--alerta-fundo); color: var(--alerta); }
.res { background: var(--branco); border-radius: var(--raio-g); padding: 14px; box-shadow: var(--sombra); display: grid; gap: 6px; }
.res .nome { font-weight: 700; font-size: 17px; }
.res .sub { color: var(--suave); font-size: 14px; }
.sep { display: flex; gap: 12px; align-items: center; background: var(--branco); border-radius: var(--raio-p); padding: 10px 12px; min-height: 58px; }
.sep input { width: 28px; height: 28px; accent-color: var(--ok); flex: none; }
.sep .nome { font-weight: 700; }
.sep .sub { color: var(--suave); font-size: 13px; }
.sep.feito { background: var(--ok-fundo); }
.filtros { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filtros select, .filtros input { min-height: 48px; border: 2px solid var(--linha); border-radius: var(--raio-p); padding: 0 10px; background: var(--branco); flex: 1 1 200px; }
.grade2 { display: grid; gap: 10px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* celular: tabelas do escritorio cabem na tela */
@media (max-width: 560px) {
  .tabela .barra { min-width: 48px; }
  .tabela select { max-width: 132px; font-size: 14px; }
  .tabela th, .tabela td { padding: 10px 8px; font-size: 14px; }
  .tabela th { font-size: 12px; }
}

/* Embalar (aba Separar): o numero da caixa e o que importa, entao ele e grande */
.embalar { background: var(--branco); border-radius: var(--raio-g); box-shadow: var(--sombra); padding: 16px; margin: 0 0 24px; border-top: 6px solid var(--royal); }
.embalar h2 { margin-top: 0; }
.emb-res { display: grid; gap: 10px; margin-top: 12px; }
.emb { display: flex; gap: 12px; align-items: stretch; border: 1px solid #E1E6F0; border-radius: var(--raio-p); padding: 12px; }
.emb-quem { flex: 1; min-width: 0; display: grid; gap: 6px; align-content: start; }
.emb-quem .btn { min-height: 48px; font-size: 16px; justify-self: start; padding: 0 22px; }
.emb-caixa { flex: 0 0 auto; min-width: 96px; background: var(--tinta); color: var(--branco); border-radius: var(--raio-p); display: grid; place-content: center; text-align: center; padding: 8px 12px; }
.emb-caixa small { font-size: 12px; opacity: .8; }
.emb-caixa b { font-size: 56px; line-height: 1; font-weight: 800; font-stretch: 85%; color: var(--amarelo); }
.emb-caixa b.texto { font-size: 18px; line-height: 1.2; }
.emb-ok { color: var(--ok); font-weight: 600; }
.emb-aviso { color: var(--alerta); font-weight: 700; }
.emb.parar { border-color: var(--alerta); background: var(--alerta-fundo); }
.recado { font-size: 14px; background: #FFF8D6; border-radius: 8px; padding: 6px 8px; }
.emb-quem .nome { font-weight: 700; font-size: 18px; line-height: 1.2; }
.emb-quem .sub { font-size: 14px; color: var(--suave); }
.emb-caixa { align-self: start; min-height: 104px; }

/* Carne que voltou: so entra em rota nova depois que o escritorio confirma que recebeu */
.btn.verde { background: var(--ok); color: var(--branco); }
.chip.com-ele { background: #FFF3C4; color: #7A5A00; }
.chip.recebido { background: var(--ok-fundo); color: var(--ok); }
.res.com-ele { border-left: 5px solid #E0B000; }
.receber { background: #FFFBEA; border: 1px solid #F1DE8A; border-radius: var(--raio-g); padding: 16px; margin-top: 24px; }
.receber h2 { margin-top: 0; }
.receber-grupo + .receber-grupo { margin-top: 18px; }
.receber-cab { display: flex; align-items: center; gap: 12px; margin: 8px 0 10px; }
.receber-cab .btn { margin-left: auto; min-height: 44px; font-size: 15px; padding: 0 16px; }
