:root {
  --laranja: #e8590c;
  --laranja-esc: #c2410c;
  --amarelo: #ffc93c;
  --creme: #fff8ee;
  --papel: #ffffff;
  --tinta: #2b1d0e;
  --tinta-2: #6b5845;
  --borda: #f0e2cf;
  --verde: #15803d;
  --verde-claro: #dcfce7;
  --azul: #1d4ed8;
  --azul-claro: #dbeafe;
  --vermelho: #b91c1c;
  --vermelho-claro: #fee2e2;
  --amarelo-claro: #fef3c7;
  --raio: 14px;
  --sombra: 0 1px 2px rgba(43, 29, 14, .06), 0 6px 20px rgba(43, 29, 14, .07);
  --fonte: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --titulo: 'Baloo 2', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--fonte); color: var(--tinta); background: var(--creme); font-size: 15px; line-height: 1.4; -webkit-tap-highlight-color: transparent; }
h1, h2, h3 { font-family: var(--titulo); line-height: 1.1; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--laranja-esc); }
img { max-width: 100%; display: block; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 999px; padding: 10px 16px; font-weight: 600; cursor: pointer; background: var(--borda); color: var(--tinta); text-decoration: none; transition: transform .08s, filter .15s; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primario { background: var(--laranja); color: #fff; }
.btn-primario:hover { filter: brightness(1.05); }
.btn-verde { background: var(--verde); color: #fff; }
.btn-azul { background: var(--azul); color: #fff; }
.btn-claro { background: #fff; border: 1px solid var(--borda); }
.btn-perigo { background: var(--vermelho-claro); color: var(--vermelho); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-lg { padding: 14px 22px; font-size: 17px; }
.btn-bloco { width: 100%; }

.card { background: var(--papel); border-radius: var(--raio); box-shadow: var(--sombra); }
.campo { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
.campo label { font-size: 13px; font-weight: 600; color: var(--tinta-2); }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--borda); background: #fff; border-radius: 10px; padding: 10px 12px; outline: none; }
.input:focus { border-color: var(--laranja); box-shadow: 0 0 0 3px rgba(232, 89, 12, .15); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--borda); white-space: nowrap; }
.st-recebido { background: var(--amarelo-claro); color: #92400e; }
.st-preparo { background: var(--azul-claro); color: var(--azul); }
.st-pronto { background: var(--verde-claro); color: var(--verde); }
.st-entregue { background: #ede9e3; color: var(--tinta-2); }
.st-cancelado { background: var(--vermelho-claro); color: var(--vermelho); }
.st-pendente { background: var(--amarelo-claro); color: #92400e; }
.st-confirmado { background: var(--verde-claro); color: var(--verde); }

.muted { color: var(--tinta-2); }
.pequeno { font-size: 13px; }
.preco { font-weight: 700; font-variant-numeric: tabular-nums; }
.linha { display: flex; align-items: center; gap: 8px; }
.entre { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.oculto { display: none !important; }
.vazio { text-align: center; padding: 30px 16px; color: var(--tinta-2); }

/* topo da equipe */
.topo { position: sticky; top: 0; z-index: 20; background: var(--tinta); color: #fff; display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.topo .marca { font-family: var(--titulo); font-size: 22px; font-weight: 800; display: flex; align-items: center; gap: 8px; }
.topo .marca span { color: var(--amarelo); }
.topo .papel { font-size: 12px; background: rgba(255,255,255,.12); padding: 3px 10px; border-radius: 999px; }
.topo .espaco { flex: 1; }
.topo .ao-vivo { font-size: 12px; display: flex; align-items: center; gap: 6px; opacity: .85; }
.ponto { width: 8px; height: 8px; border-radius: 50%; background: #9ca3af; }
.ponto.on { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.25); }
.topo .btn { background: rgba(255,255,255,.12); color: #fff; }
.topo .marca { white-space: nowrap; }
@media (max-width: 600px) {
  .topo { gap: 8px; padding: 10px 12px; }
  .topo .marca { font-size: 19px; }
  .oculto-sm { display: none !important; }
}

/* toast */
#toasts { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: calc(100% - 32px); max-width: 420px; }
.toast { background: var(--tinta); color: #fff; padding: 11px 16px; border-radius: 12px; box-shadow: var(--sombra); font-weight: 600; animation: sobe .2s ease-out; text-align: center; }
.toast.ok { background: var(--verde); }
.toast.erro { background: var(--vermelho); }
@keyframes sobe { from { transform: translateY(12px); opacity: 0; } }

/* modal */
.modal-fundo { position: fixed; inset: 0; background: rgba(43, 29, 14, .45); z-index: 60; display: flex; align-items: flex-end; justify-content: center; animation: aparece .15s; }
.modal { background: var(--creme); width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; border-radius: 20px 20px 0 0; padding: 18px 16px 22px; animation: sobe .2s ease-out; }
@media (min-width: 700px) { .modal-fundo { align-items: center; } .modal { border-radius: 20px; } }
.modal h2 { font-size: 24px; margin-bottom: 12px; }
@keyframes aparece { from { opacity: 0; } }

.pix-qr { background: #fff; border-radius: 16px; padding: 14px; width: min(280px, 100%); margin: 0 auto; }
.copia { font-family: ui-monospace, Consolas, monospace; font-size: 11px; word-break: break-all; background: #fff; border: 1px dashed var(--borda); border-radius: 10px; padding: 10px; max-height: 90px; overflow: auto; }

.status-mesa-livre { background: #fff; }
.status-mesa-aberta { background: var(--amarelo-claro); }
.status-mesa-conta { background: #ffedd5; }
.status-mesa-pagamento { background: var(--azul-claro); }

@media print {
  .nao-imprime { display: none !important; }
  body { background: #fff; }
}
