/* Parada Obrigatória - estilo do sistema */
:root {
  --amarelo: #F7B500; --amarelo-esc: #D99E00; --preto: #17110D; --preto-2: #2A1F18; --preto-3: #3B2D23;
  --laranja: #E8590C; --vermelho: #C8281E; --creme: #FFF4D6; --creme-2: #FBE9BC; --verde: #2E7D32;
  --branco: #FFFDF7; --texto: #17110D; --texto-2: #5A4A3C; --borda: #E6D3A3;
  --raio: 14px; --sombra: 0 2px 10px rgba(23,17,13,.08);
  --f-marca: 'Alfa Slab One', Georgia, serif; --f-titulo: 'Barlow Condensed', 'Arial Narrow', sans-serif;
  --f-texto: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--f-texto); color: var(--texto); background: var(--creme); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--vermelho); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--laranja); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h1, h2, h3 { font-family: var(--f-titulo); font-weight: 800; letter-spacing: .02em; margin: 0 0 .4em; line-height: 1.1; }
h1 { font-size: 2rem; } h2 { font-size: 1.5rem; } h3 { font-size: 1.2rem; }
.muted { color: var(--texto-2); } .small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }

/* Layout */
.layout { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.menu { background: var(--preto); color: var(--creme); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.menu .marca { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid var(--preto-3); text-decoration: none; color: inherit; }
.menu .marca svg { width: 44px; height: 44px; flex: none; }
.menu .marca b { font-family: var(--f-marca); font-weight: 400; color: var(--amarelo); font-size: 1.25rem; display: block; line-height: 1; }
.menu .marca span { font-family: var(--f-titulo); font-weight: 800; letter-spacing: .18em; font-size: .8rem; }
.menu nav { padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; flex: 1; }
.menu nav a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 10px; color: var(--creme); text-decoration: none; font-weight: 700; min-height: 48px; }
.menu nav a:hover { background: var(--preto-2); }
.menu nav a.ativo { background: var(--amarelo); color: var(--preto); }
.menu nav a .ic { width: 22px; text-align: center; font-size: 1.1rem; }
.menu nav a .badge { margin-left: auto; }
.menu .rodape { padding: 14px 16px; border-top: 1px solid var(--preto-3); font-size: .875rem; }
.menu .rodape b { display: block; }
.conteudo { padding: 24px clamp(14px, 3vw, 36px) 80px; min-width: 0; }
.topo { display: none; }
.faixa-suporte { background: var(--vermelho); color: var(--creme); padding: 10px 16px; font-weight: 700; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.faixa-demo { background: var(--laranja); color: var(--preto); padding: 8px 16px; font-weight: 700; font-size: .9rem; }
.cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.cab h1 { margin: 0; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .menu { position: fixed; inset: 0 auto 0 0; width: 280px; z-index: 50; transform: translateX(-100%); transition: transform .2s; }
  .menu.aberto { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.45); }
  .topo { display: flex; align-items: center; gap: 10px; background: var(--preto); color: var(--creme); padding: 8px 12px; position: sticky; top: 0; z-index: 40; }
  .topo b { font-family: var(--f-marca); font-weight: 400; color: var(--amarelo); font-size: 1.1rem; }
  .conteudo { padding-top: 16px; }
}

/* Componentes */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 18px; border-radius: 12px; border: 2px solid transparent;
  background: var(--amarelo); color: var(--preto); font-weight: 800; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--amarelo-esc); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn.sec { background: transparent; border-color: var(--preto); }
.btn.sec:hover { background: var(--creme-2); }
.btn.escuro { background: var(--preto); color: var(--amarelo); }
.btn.perigo { background: var(--vermelho); color: var(--creme); }
.btn.ok { background: var(--verde); color: #fff; }
.btn.laranja { background: var(--laranja); color: var(--preto); }
.btn.peq { min-height: 38px; padding: 6px 12px; font-size: .9rem; border-radius: 10px; }
.btn.grande { min-height: 60px; font-size: 1.15rem; padding: 14px 24px; }
.btn.bloco { width: 100%; }
.icone-btn { background: none; border: 0; color: inherit; font-size: 1.6rem; min-width: 48px; min-height: 48px; cursor: pointer; }

.cartao { background: var(--branco); border: 1px solid var(--borda); border-radius: var(--raio); padding: 18px; box-shadow: var(--sombra); }
.grade { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.kpi .rot { font-weight: 700; color: var(--texto-2); font-size: .9rem; }
.kpi .val { font-family: var(--f-titulo); font-weight: 800; font-size: 2.1rem; line-height: 1.1; }
.kpi.destaque { background: var(--preto); color: var(--creme); border-color: var(--preto); }
.kpi.destaque .rot { color: var(--amarelo); }

.badge { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-weight: 800; font-size: .8rem; background: var(--creme-2); color: var(--preto); white-space: nowrap; }
.st-recebido { background: var(--amarelo); color: var(--preto); }
.st-em_preparo { background: var(--laranja); color: var(--preto); }
.st-pronto { background: var(--verde); color: #fff; }
.st-saiu_entrega { background: #1F4E8C; color: #fff; }
.st-concluido { background: #D8CDB4; color: var(--preto); }
.st-cancelado { background: var(--vermelho); color: var(--creme); }
.b-vermelho { background: var(--vermelho); color: var(--creme); }
.b-verde { background: var(--verde); color: #fff; }
.b-preto { background: var(--preto); color: var(--amarelo); }

label.campo { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: .95rem; }
label.campo .dica { font-weight: 400; color: var(--texto-2); font-size: .85rem; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=tel], input[type=date], input[type=search], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 12px; border: 2px solid var(--borda); border-radius: 10px; background: #fff; }
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--preto); outline: none; box-shadow: 0 0 0 3px rgba(247,181,0,.5); }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-weight: 700; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--preto); }
.form { display: grid; gap: 14px; }
.linha { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }

.tabela-wrap { overflow-x: auto; border: 1px solid var(--borda); border-radius: var(--raio); background: var(--branco); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--borda); vertical-align: middle; }
th { font-family: var(--f-titulo); font-weight: 800; letter-spacing: .03em; font-size: 1rem; background: var(--creme-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.r, th.r { text-align: right; }

.vazio { text-align: center; padding: 40px 16px; color: var(--texto-2); }
.vazio .grande { font-size: 2.5rem; }
.carregando { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 40px; color: var(--texto-2); font-weight: 700; }
.giro { width: 26px; height: 26px; border: 4px solid var(--borda); border-top-color: var(--laranja); border-radius: 50%; animation: giro .8s linear infinite; }
@keyframes giro { to { transform: rotate(360deg); } }
.erro-box { background: #FDE3DF; border: 2px solid var(--vermelho); color: #6E120C; padding: 12px 14px; border-radius: 10px; font-weight: 700; }
.aviso-box { background: #FFF0C2; border: 2px solid var(--amarelo); padding: 12px 14px; border-radius: 10px; }

.chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.chip { flex: none; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--preto); background: transparent; font-weight: 800; cursor: pointer; }
.chip.ativo { background: var(--preto); color: var(--amarelo); }

/* Toasts e modais */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--preto); color: var(--creme); padding: 14px 16px; border-radius: 12px; font-weight: 700; box-shadow: 0 6px 20px rgba(0,0,0,.25); border-left: 6px solid var(--amarelo); }
.toast.erro { border-left-color: var(--vermelho); } .toast.ok { border-left-color: var(--verde); }
dialog.modal { border: 0; border-radius: 18px; padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 24px); background: var(--branco); color: var(--texto); }
dialog.modal::backdrop { background: rgba(23,17,13,.6); }
.modal .m-cab { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--preto); color: var(--amarelo); position: sticky; top: 0; z-index: 1; }
.modal .m-cab h2 { margin: 0; }
.modal .m-cab button { color: var(--creme); }
.modal .m-corpo { padding: 18px; }
.modal .m-rodape { padding: 14px 18px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; border-top: 1px solid var(--borda); position: sticky; bottom: 0; background: var(--branco); }

/* Login */
.tela-login { min-height: 100vh; display: grid; place-items: center; background: var(--preto); padding: 20px; }
.caixa-login { width: min(420px, 100%); background: var(--creme); border-radius: 22px; padding: 28px; border-top: 8px solid var(--amarelo); }
.caixa-login .logo { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.caixa-login .logo svg { width: 72px; height: 72px; }
.caixa-login .logo b { font-family: var(--f-marca); font-weight: 400; font-size: 2rem; color: var(--vermelho); display: block; line-height: 1; }
.caixa-login .logo span { font-family: var(--f-titulo); font-weight: 800; letter-spacing: .2em; }
.slogan { font-family: var(--f-titulo); font-weight: 800; color: var(--amarelo); letter-spacing: .06em; font-size: 1.3rem; text-align: center; margin-top: 18px; }

/* Atendimento (novo pedido) */
.pdv { display: grid; grid-template-columns: 1fr 380px; gap: 16px; align-items: start; }
.pdv .produtos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.prod-btn { background: var(--branco); border: 2px solid var(--borda); border-radius: 14px; padding: 12px; text-align: left; cursor: pointer; min-height: 96px; display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.prod-btn:hover { border-color: var(--preto); }
.prod-btn b { font-size: 1rem; line-height: 1.2; }
.prod-btn .preco { font-family: var(--f-titulo); font-weight: 800; font-size: 1.2rem; }
.prod-btn.indisp { opacity: .45; cursor: not-allowed; }
.carrinho { position: sticky; top: 16px; }
.carrinho .item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--borda); }
.carrinho .item .info { flex: 1; min-width: 0; }
.carrinho .item .det { font-size: .85rem; color: var(--texto-2); }
.qtd { display: inline-flex; align-items: center; gap: 4px; }
.qtd button { width: 38px; height: 38px; border-radius: 10px; border: 2px solid var(--preto); background: transparent; font-weight: 800; font-size: 1.1rem; cursor: pointer; }
.qtd span { min-width: 26px; text-align: center; font-weight: 800; }
.totais { display: grid; gap: 4px; margin-top: 10px; }
.totais div { display: flex; justify-content: space-between; }
.totais .total { font-family: var(--f-titulo); font-weight: 800; font-size: 1.7rem; border-top: 2px solid var(--preto); padding-top: 6px; margin-top: 4px; }
.opcoes { display: flex; gap: 8px; flex-wrap: wrap; }
.opcao { flex: 1 1 auto; min-height: 52px; padding: 10px 14px; border: 2px solid var(--preto); border-radius: 12px; background: transparent; font-weight: 800; cursor: pointer; }
.opcao.ativo { background: var(--preto); color: var(--amarelo); }
@media (max-width: 1100px) { .pdv { grid-template-columns: 1fr; } .carrinho { position: static; } }

/* Pedidos e cozinha */
.quadro { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.ped { background: var(--branco); border: 2px solid var(--borda); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.ped.urgente { border-color: var(--vermelho); box-shadow: 0 0 0 3px rgba(200,40,30,.2); }
.ped.novo { animation: pisca 1.2s ease-in-out 4; }
@keyframes pisca { 50% { box-shadow: 0 0 0 6px rgba(247,181,0,.8); } }
.ped .p-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ped .p-num { font-family: var(--f-titulo); font-weight: 800; font-size: 1.8rem; line-height: 1; }
.ped ul { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 6px; }
.ped li b { font-size: 1.05rem; }
.obs { background: #FFF0C2; border-left: 5px solid var(--laranja); padding: 6px 10px; border-radius: 6px; font-weight: 700; }
.tempo { font-weight: 800; }
.tempo.atrasado { color: var(--vermelho); }
.cozinha-modo .conteudo { background: var(--preto); color: var(--creme); }
.cozinha-modo .ped { background: var(--preto-2); border-color: var(--preto-3); color: var(--creme); }
.cozinha-modo .ped .obs { color: var(--preto); }
.cozinha-modo h1 { color: var(--amarelo); }

/* Cardápio público */
.pub { max-width: 820px; margin: 0 auto; padding-bottom: 120px; }
.pub-cab { background: var(--preto); color: var(--creme); padding: 20px 18px; display: flex; gap: 14px; align-items: center; }
.pub-cab svg { width: 64px; height: 64px; flex: none; }
.pub-cab b { font-family: var(--f-marca); font-weight: 400; color: var(--amarelo); font-size: 1.6rem; display: block; line-height: 1; }
.pub-cat { position: sticky; top: 0; background: var(--creme); z-index: 5; padding: 10px 14px; border-bottom: 1px solid var(--borda); }
.pub-lista { padding: 12px 14px; display: grid; gap: 10px; }
.pub-prod { display: flex; gap: 12px; background: var(--branco); border: 1px solid var(--borda); border-radius: 14px; padding: 12px; cursor: pointer; text-align: left; width: 100%; }
.pub-prod img { width: 88px; height: 88px; object-fit: cover; border-radius: 10px; flex: none; background: var(--creme-2); }
.pub-prod .preco { font-family: var(--f-titulo); font-weight: 800; font-size: 1.2rem; }
.barra-carrinho { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); background: var(--preto); z-index: 20; }
.barra-carrinho .btn { width: 100%; max-width: 820px; margin: 0 auto; display: flex; }
.passos { display: flex; gap: 6px; justify-content: center; margin: 12px 0; }
.passos span { width: 36px; height: 6px; border-radius: 4px; background: var(--borda); }
.passos span.feito { background: var(--verde); }

@media print {
  .menu, .topo, .acoes, .btn, #toasts, .faixa-suporte, .faixa-demo { display: none !important; }
  .layout { display: block; } body { background: #fff; }
  .cartao, .tabela-wrap { box-shadow: none; border-color: #999; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
