/* Master Pedidos — mobile-first, vermelho do bloco TOC MIX. */
:root {
  --vermelho: #c8102e;
  --vermelho-escuro: #9b0c23;
  --fundo: #f7f4f2;
  --carta: #ffffff;
  --texto: #2b2b2b;
  --cinza: #6b6b6b;
  --borda: #e2dcd8;
  --ok: #1c7c3c;
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: var(--fundo); color: var(--texto); }
main { max-width: 720px; margin: 0 auto; padding: 16px; }

.topo { background: var(--vermelho); color: #fff; display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
.marca { color: #fff; text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.marca span { font-weight: 300; }
.marca small { display: block; font-size: .65rem; letter-spacing: .18em; opacity: .85; }
.topo nav { display: flex; gap: 14px; align-items: center; }
.topo a, .topo .link { color: #fff; text-decoration: none; font-size: .95rem; background: none; border: 0; cursor: pointer; padding: 0; }
.inline { display: inline; }

h1 { font-size: 1.35rem; margin: 8px 0 16px; }
h2 { font-size: 1.05rem; margin: 20px 0 8px; }

.carta { background: var(--carta); border: 1px solid var(--borda); border-radius: 12px; padding: 16px; margin-bottom: 16px; }

.botoes-home { display: grid; gap: 12px; margin: 16px 0; }
.botao { display: block; text-align: center; background: var(--vermelho); color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; padding: 18px; border-radius: 12px; border: 0; cursor: pointer; width: 100%; }
.botao:active { background: var(--vermelho-escuro); }
.botao.claro { background: #fff; color: var(--vermelho); border: 2px solid var(--vermelho); }
.botao.mini { font-size: .9rem; padding: 8px 14px; width: auto; display: inline-block; }

label { display: block; font-size: .85rem; font-weight: 600; color: var(--cinza); margin: 12px 0 4px; }
input[type=text], input[type=password], input[type=number], input[type=tel], input[type=email], textarea, select {
  width: 100%; padding: 12px; font-size: 1rem; border: 1px solid var(--borda); border-radius: 8px; background: #fff;
}
textarea { min-height: 80px; }

.tabela-produtos { width: 100%; border-collapse: collapse; }
.tabela-produtos td { padding: 10px 6px; border-bottom: 1px solid var(--borda); vertical-align: middle; }
.tabela-produtos .nome { font-weight: 600; font-size: .95rem; }
.tabela-produtos .det { color: var(--cinza); font-size: .78rem; }
.tabela-produtos input { width: 74px; text-align: center; font-size: 1.05rem; padding: 10px 4px; }
.tabela-produtos .preco { text-align: right; white-space: nowrap; font-size: .9rem; }

.total-linha { display: flex; justify-content: space-between; font-size: 1.2rem; font-weight: 800; padding: 12px 4px; }

.lista-pedidos { list-style: none; margin: 0; padding: 0; }
.lista-pedidos li { background: var(--carta); border: 1px solid var(--borda); border-radius: 10px; margin-bottom: 10px; }
.lista-pedidos a { display: block; padding: 12px 14px; color: inherit; text-decoration: none; }
.lista-pedidos .linha1 { display: flex; justify-content: space-between; font-weight: 700; }
.lista-pedidos .linha2 { display: flex; justify-content: space-between; color: var(--cinza); font-size: .85rem; margin-top: 4px; }

.selo { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .75rem; font-weight: 700; color: #fff; }
.selo.enviado { background: #b78909; }
.selo.confirmado { background: #1565c0; }
.selo.faturado { background: var(--ok); }
.selo.cancelado { background: #8d8d8d; }
.selo.foto { background: #6a4fa3; }

.alerta { background: #fdecec; border: 1px solid #f5b5b5; color: #8f1f1f; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }
.sucesso { background: #e8f6ec; border: 1px solid #b3dfc0; color: #14532d; padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; }

.busca-caixa { position: relative; }
.sugestoes { position: absolute; z-index: 10; left: 0; right: 0; background: #fff; border: 1px solid var(--borda); border-radius: 0 0 10px 10px; max-height: 260px; overflow-y: auto; box-shadow: 0 8px 16px rgba(0,0,0,.08); }
.sugestoes button { display: block; width: 100%; text-align: left; padding: 10px 12px; background: none; border: 0; border-bottom: 1px solid var(--borda); cursor: pointer; font-size: .95rem; }
.sugestoes button small { color: var(--cinza); display: block; }
.sugestoes button:hover { background: var(--fundo); }

.foto-preview { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.foto-preview img { width: 90px; height: 90px; object-fit: cover; border-radius: 8px; border: 1px solid var(--borda); }
.foto-grande { max-width: 100%; border-radius: 10px; border: 1px solid var(--borda); }

.tabela { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tabela th { text-align: left; color: var(--cinza); font-size: .75rem; text-transform: uppercase; padding: 8px 6px; border-bottom: 2px solid var(--borda); }
.tabela td { padding: 8px 6px; border-bottom: 1px solid var(--borda); }
.dir { text-align: right; }

.filtros { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filtros select { width: auto; padding: 8px; }

.resumo { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.resumo .box { background: var(--carta); border: 1px solid var(--borda); border-radius: 10px; padding: 10px 16px; text-align: center; flex: 1; min-width: 90px; }
.resumo .box b { display: block; font-size: 1.3rem; }
.resumo .box span { font-size: .75rem; color: var(--cinza); }

.rodape { text-align: center; color: var(--cinza); font-size: .75rem; padding: 24px 16px; }

@media (min-width: 600px) {
  .botoes-home { grid-template-columns: 1fr 1fr; }
}
