:root {
  --bg: #f6f5f2; --surface: #fff; --ink: #1f2328; --muted: #646b74; --line: #e3e1db;
  --brand: #c8141a; --ok: #2b7a4b; --danger: #b42318; --radius: 10px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1 { font-size: 1.45rem; margin: 0; } h2 { font-size: 1.1rem; margin: 0 0 .6rem; } h3 { font-size: .95rem; margin: .9rem 0 .4rem; }
p { margin: .35rem 0; }
a { color: var(--brand); }
small, .small { font-size: .84rem; }
.muted { color: var(--muted); } .center { text-align: center; } .right { text-align: right; }
.error { color: var(--danger); } .ok { color: var(--ok); }
.empty { color: var(--muted); padding: .6rem 0; text-align: center; }
.faded { opacity: .55; }

input, select, textarea { width: 100%; padding: .55rem .65rem; font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-height: 40px; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; accent-color: var(--brand); }
input[type=color] { padding: 2px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
label { display: block; font-size: .88rem; font-weight: 500; }
label > input, label > select, label > textarea { margin-top: .2rem; font-weight: 400; }
label.check { display: flex; gap: .5rem; align-items: center; font-weight: 400; }
label.check input { margin: 0; }

button, .button { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px; border: 1px solid transparent; padding: .5rem .9rem; min-height: 40px; text-decoration: none; background: none; color: inherit; }
button:disabled { opacity: .55; cursor: default; }
.primary { background: var(--brand); color: #fff; }
.ghost { border-color: var(--line); background: var(--surface); color: var(--ink); }
.link { padding: 0; min-height: 0; border: 0; font-weight: 500; color: var(--brand); text-decoration: underline; }
.danger { color: var(--danger); }
button.small, .button.small { padding: .25rem .6rem; min-height: 32px; font-size: .84rem; }
button.link.small { padding: 0; min-height: 0; }
.wide { width: 100%; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; margin-bottom: 1rem; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: .75rem; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.two > .card { margin-bottom: 0; }
.two { margin-bottom: 1rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .75rem; align-items: end; }
.inline-form { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; }
.inline-form label { flex: 1 1 150px; }
.inline-form.tight { flex-wrap: nowrap; align-items: center; }
.inline-form.tight select, .inline-form.tight input { min-width: 120px; }
.top-line { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.qty { width: 80px; flex: none; }
.preview { max-width: 180px; border-radius: 8px; }

.flash { padding: .6rem .8rem; border-radius: 8px; background: #e7f4ec; color: #17603a; }
.flash.erro { background: #fdecea; color: #8f1d13; }

/* Painel */
.app-shell { display: flex; align-items: stretch; min-height: 100dvh; }
.sidebar { flex: 0 0 216px; width: 216px; display: flex; flex-direction: column; gap: 1rem; padding: 1rem .75rem; background: var(--surface); border-right: 1px solid var(--line); position: sticky; top: 0; height: 100dvh; overflow-y: auto; z-index: 5; }
.brand { font-weight: 700; color: var(--ink); text-decoration: none; padding: 0 .55rem; overflow-wrap: anywhere; }
.brand img { display: block; width: 100%; max-width: 176px; height: auto; margin: 0 auto .35rem; }
.brand small { display: block; font-weight: 400; color: var(--muted); text-align: center; }
.auth-logo { display: block; width: 100%; max-width: 240px; height: auto; margin: 0 auto .9rem; }
.sidebar nav { display: flex; flex-direction: column; gap: .15rem; flex: 1 1 auto; }
.sidebar nav a { padding: .5rem .65rem; border-radius: 7px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.sidebar nav a:hover { background: #f4f2ee; color: var(--ink); }
.sidebar nav a.on { background: #fde8e8; color: var(--brand); font-weight: 600; }
.who { display: flex; flex-direction: column; align-items: flex-start; gap: .4rem; font-size: .84rem; padding: .7rem .55rem 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.wrap { flex: 1 1 auto; min-width: 0; max-width: 1320px; padding: 1rem 1.25rem; }
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .55rem; margin: .4rem 0 .5rem; }
.module-option { display: flex; gap: .55rem; align-items: flex-start; border: 1px solid var(--line); border-radius: 8px; padding: .55rem .65rem; font-weight: 400; cursor: pointer; }
.module-option input { margin: .2rem 0 0; flex: none; }
.module-option:has(input:checked) { border-color: var(--brand); background: #fef0f0; }
.module-option small { display: block; }
.module-option.soon { opacity: .6; cursor: default; }
.created-store { border-color: #9fd0b2; background: #f3faf6; }
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; align-items: start; margin-bottom: 1rem; }
.bank-grid .card { margin-bottom: 0; }
.bank-head { display: flex; align-items: center; gap: .6rem; }
.bank-head h2 { margin: 0; flex: 1; }
.bank-logo { flex: none; width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; overflow: hidden; }
.bank-logo img { width: 100%; height: 100%; object-fit: contain; }
.logo-sicredi { background: #3fa110; padding: 9px; }
.logo-sicoob { background: #003641; padding: 7px; }
.bank-card details form { margin-top: .7rem; }
.bank-card summary { cursor: pointer; }
.pay-box { border: 1px solid var(--line); border-radius: 8px; padding: .8rem; display: flex; flex-direction: column; gap: .5rem; }
.pay-box h2 { margin: 0; }
.pix-qr { align-self: center; max-width: 100%; height: auto; }
.head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .8rem; }
.head h2, .head h3 { margin: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: .8rem; }
.head .chips { margin-bottom: 0; }
.chip { padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); text-decoration: none; font-size: .86rem; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.badge { display: inline-block; padding: .05rem .45rem; border-radius: 5px; background: #eef0f2; font-size: .75rem; font-weight: 600; }
.badge.off { background: #fdecea; color: #8f1d13; }

.board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: .8rem; overflow-x: auto; align-items: start; }
.column { background: #ecebe6; border-radius: var(--radius); padding: .6rem; min-height: 200px; }
.column h2 { font-size: .92rem; display: flex; justify-content: space-between; margin-bottom: .5rem; }
.count { background: var(--surface); border-radius: 999px; padding: 0 .5rem; font-size: .8rem; }
.column[data-status=novo]:not([data-count="0"]) { background: #fddcdc; }
.order { background: var(--surface); border-radius: 8px; padding: .65rem; margin-bottom: .55rem; border: 1px solid var(--line); }
.order header { display: flex; align-items: center; gap: .4rem; }
.order time { margin-left: auto; color: var(--muted); font-size: .82rem; }
.order .name { font-size: .88rem; }
.items { list-style: none; margin: .35rem 0; padding: 0; font-size: .9rem; }
.items small { display: block; color: var(--muted); padding-left: 1.2rem; }
.note, .items small.note { color: #8a4b08; }
.total { font-weight: 700; }
.order-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .4rem; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: .8rem; }
th.right { text-align: right; }
th, td { padding: .5rem .55rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: 0; }

.product-list, .option-list { list-style: none; margin: 0; padding: 0; }
.product-list li { display: flex; align-items: center; gap: .6rem; padding: .45rem 0; border-top: 1px solid var(--line); }
.product-list img, .thumb-empty { width: 44px; height: 44px; object-fit: cover; border-radius: 6px; background: #eeece6; flex: none; }
.product-list .price { margin-left: auto; font-weight: 600; }
.option-list li { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .9rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.option-list li > :first-child { flex: 1 1 140px; }
.option-list { margin-top: .6rem; }
.group { border: 1px solid var(--line); border-radius: 8px; padding: .7rem; margin-bottom: .7rem; }
.row-line { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: .25rem 0; font-weight: 400; }
.row-line input { margin: 0; }
.hours { display: grid; grid-template-columns: auto 1fr 1fr; gap: .4rem .6rem; align-items: center; max-width: 420px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; }
.stats strong { display: block; font-size: 1.4rem; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 .9rem; border-left: 2px solid var(--line); }
.timeline li { padding: .35rem 0; }
.timeline li span { display: block; }

.funnel { list-style: none; margin: .8rem 0 0; padding: 0; display: grid; gap: .55rem; }
.funnel li { display: grid; grid-template-columns: minmax(150px, 210px) 1fr 80px; gap: .7rem; align-items: center; }
.funnel .track { height: 14px; display: block; }
.funnel .bar { display: block; height: 100%; background: var(--brand); border-radius: 0 4px 4px 0; }
.funnel .value { text-align: right; }

#wa-qr-img { display: block; background: #fff; border-radius: 8px; max-width: 100%; height: auto; margin: .5rem 0; }
details.card summary { cursor: pointer; }
details.card[open] summary { margin-bottom: .5rem; }
.verify button.link { text-align: left; }
#co-verify-msg:empty { display: none; }

.form-section { border: 0; border-top: 1px solid var(--line); padding: .9rem 0 .2rem; margin: 0 0 .4rem; }
.form-section:first-of-type { border-top: 0; padding-top: 0; }
.form-section legend { font-weight: 700; padding: 0 .5rem 0 0; }
.form-section .segmented { margin-bottom: .7rem; max-width: 520px; }
.form-section .form-grid { align-items: start; }
.form-section label.check { padding-top: 1.6rem; }
.form-section > label { margin-top: .7rem; }
.form-grid .span-2 { grid-column: span 2; }
.fiscal-form { display: block; }
input:disabled { background: #f0efeb; color: var(--muted); }
.status-ativa { background: #dcefff; color: #0b4f8a; }
.status-off-neutral { background: #eef0f2; color: var(--muted); }
.invoice-amount { font-size: 2rem; font-weight: 700; margin: .2rem 0; }
.row-actions { min-width: 150px; }
.row-actions > * { display: block; margin-bottom: .25rem; }
.danger-zone { border-color: #eab8b3; }
.status-teste { background: #e7f4ec; color: #17603a; }
.status-vencido { background: #fdf1d8; color: #7a4d00; }
.status-bloqueada { background: #fdecea; color: #8f1d13; }
.break { overflow-wrap: anywhere; }

/* Entrar e cadastro */
.auth { display: grid; place-items: center; min-height: 100dvh; padding: 16px; }
.narrow { width: 100%; max-width: 400px; }
.narrow h1 { margin-bottom: .6rem; }
.auth .stack { margin: .8rem 0; }

/* Cores do logo nas telas do sistema. O cardápio do cliente usa a cor de cada loja. */
.panel, .auth { --line: #ecd9d3; --accent: #ffc400; --accent-ink: #3a2500; --brand-dark: #8f0c12; }
.panel { --bg: #fdf6f1; background: var(--bg); }
.sidebar { background: linear-gradient(180deg, #c8141a 0%, #8f0c12 100%); border-right: 0; color: #fff; }
.brand { background: #fff; border-radius: 12px; padding: .5rem; color: var(--ink); }
.sidebar nav a { color: #fff; font-weight: 500; }
.sidebar nav a:hover { background: rgb(255 255 255 / .16); color: #fff; }
.sidebar nav a.on, .sidebar nav a.on:hover { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.who { border-top-color: rgb(255 255 255 / .3); color: #fff; }
.who .muted { color: #fff; opacity: .9; }
.who a, .who .link { color: var(--accent); }
.panel h1 { color: var(--brand-dark); }
.panel .primary:hover, .auth .primary:hover { background: var(--brand-dark); }
.panel .chip.on { background: var(--brand); border-color: var(--brand); }
.panel .column { background: #f8e9e1; }
.panel .column[data-status=novo]:not([data-count="0"]) { background: #ffe9a8; }
.panel th { color: var(--brand-dark); }
.auth { background: linear-gradient(160deg, #d71920 0%, #8f0c12 100%); }
.auth h1 { color: var(--brand-dark); }
.auth > main { border-color: transparent; border-top: 5px solid var(--accent); box-shadow: 0 12px 34px rgb(60 0 0 / .32); }

/* Logins dos restaurantes: cada formato de tela abre a sua foto, e o cartão fica abaixo da logo que já vem nela. */
.auth-fundo { place-items: start center; padding-top: 31dvh; padding-bottom: 24px; }
.auth-fundo::before { content: ""; position: fixed; inset: 0; z-index: -1; background: #8f0c12 url(/fundo-login-computador.webp) center top / cover no-repeat; }
@media (min-aspect-ratio: 17/10) { .auth-fundo::before { background-image: url(/fundo-login-medio.webp); } }
@media (min-aspect-ratio: 193/100) { .auth-fundo::before { background-image: url(/fundo-login-largo.webp); } }
@media (max-aspect-ratio: 4/5) {
  .auth-fundo { padding-top: 28dvh; }
  .auth-fundo::before { background-image: url(/fundo-login-celular.webp); background-position: center 25%; }
}

.temp-password { font: 700 1.15rem ui-monospace, Consolas, monospace; letter-spacing: .03em; }

.caixa-abrir { max-width: 460px; }

/* Tela da cozinha: fundo escuro e letra grande, para ler de longe. */
.kds { background: #15171a; color: #f2f3f5; min-height: 100dvh; font-size: 17px; padding: 12px; }
.kds-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; margin-bottom: .7rem; }
.kds-top h1 { font-size: 1.4rem; }
.kds-loja { color: #a9aeb6; font-size: 1rem; font-weight: 400; margin-left: .4rem; }
.kds-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.kds-botao { background: #2a2e34; color: #f2f3f5; border: 1px solid #434852; font-size: .9rem; text-decoration: none; }
.kds-botao:hover { background: #363b43; }
.kds-conexao { color: #ffc400; font-weight: 600; font-size: .9rem; }
.kds-aviso { margin-bottom: .7rem; }
.kds-link { background: #22252a; border-radius: 8px; padding: .6rem .8rem; margin-bottom: .7rem; font-size: .9rem; }
.kds-link summary { cursor: pointer; font-weight: 600; }
.kds-colunas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .7rem; align-items: start; }
.kds-coluna h2 { display: flex; justify-content: space-between; font-size: 1.05rem; margin-bottom: .5rem; padding: .35rem .6rem; background: #22252a; border-radius: 8px; }
.kds-vazio { color: #8b9098; text-align: center; padding: 1rem 0; }
.kds-pedido { background: #fff; color: #1a1c1f; border-radius: 10px; border-top: 7px solid #2b7a4b; padding: .65rem .75rem; margin-bottom: .6rem; }
.kds-pedido.alerta { border-top-color: #ffc400; background: #fff9e0; }
.kds-pedido.atrasado { border-top-color: #d71920; background: #ffe7e5; }
.kds-prontos .kds-pedido { opacity: .85; border-top-color: #8b9098; }
.kds-pedido header { display: flex; align-items: center; gap: .5rem; }
.kds-numero { font-size: 1.45rem; }
.kds-tipo { background: #1a1c1f; color: #fff; border-radius: 5px; padding: .05rem .45rem; font-size: .8rem; font-weight: 600; }
.kds-tempo { margin-left: auto; font-weight: 700; font-size: 1.1rem; }
.kds-nome { font-size: .95rem; color: #4a4f57; margin: .1rem 0 .3rem; }
.kds-itens { list-style: none; margin: 0; padding: 0; font-size: 1.15rem; }
.kds-itens li { padding: .25rem 0; border-top: 1px solid #e6e4df; }
.kds-itens small { display: block; font-size: .92rem; color: #4a4f57; }
.kds-obs, .kds-itens small.kds-obs { color: #b42318; font-weight: 700; }
.kds-avancar { width: 100%; margin-top: .5rem; min-height: 52px; font-size: 1.1rem; background: #c8141a; color: #fff; }
.kds-avancar.pronto { background: #2b7a4b; }
.kds-voltar { width: 100%; margin-top: .5rem; }
@media (max-width: 760px) { .kds-colunas { grid-template-columns: minmax(0, 1fr); } }

/* Impressoras */
.pr-passos { margin: 0; padding-left: 1.2rem; }
.pr-passos li { margin-bottom: .3rem; }
.pr-lista { display: flex; flex-direction: column; gap: .6rem; }
.pr-item { border: 1px solid var(--line); border-radius: 8px; padding: .65rem .8rem; display: flex; flex-direction: column; gap: .4rem; }
.pr-item header { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.pr-item summary { cursor: pointer; font-size: .9rem; }
.pr-form { margin-top: .7rem; }
.pr-canais { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.pr-canais legend { font-size: .88rem; font-weight: 500; padding: 0; margin-bottom: .25rem; }
.pr-conexao:has([value=rede]:checked) .so-windows, .pr-conexao:has([value=windows]:checked) .so-rede { display: none; }

/* Seções do cardápio */
.link-cardapio { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem 1rem; }
.link-cardapio h2 { margin-bottom: .15rem; }
.secoes { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: .6rem; }
.secoes legend { font-size: .88rem; font-weight: 500; padding: 0; margin-bottom: .5rem; }
.secoes label { position: relative; display: block; border-radius: 12px; cursor: pointer; line-height: 0; }
.secoes img { display: block; width: 100%; height: auto; border-radius: 12px; }
.secoes input { position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; min-height: 0; margin: 0; accent-color: var(--brand); z-index: 1; }
.secoes label:hover img { filter: brightness(1.12); }
.secoes label:has(input:checked) { outline: 4px solid var(--accent, #ffc400); outline-offset: 1px; }
.secoes label:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.secoes .secao-existe { outline: 0 !important; cursor: default; }
.secoes .secao-existe img { filter: grayscale(.75) brightness(.7); }
.secao-selo { position: absolute; left: 8px; top: 8px; background: #fff; color: var(--ink); border-radius: 6px; padding: .1rem .45rem; font-size: .75rem; font-weight: 700; line-height: 1.5; }

/* Seções em imagem: são o menu do cardápio do cliente e ficam presas no topo ao rolar */
.carrossel { position: relative; }
.menu-secoes-faixa { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--line); }
.menu-secoes { display: flex; gap: .55rem; overflow-x: auto; padding: .35rem 1rem .55rem; scroll-snap-type: x proximity; scroll-padding-inline: 1rem; scrollbar-width: none; }
.menu-secoes a { flex: none; width: 138px; aspect-ratio: 425 / 275; border-radius: 12px; overflow: hidden; scroll-snap-align: start; box-shadow: 0 2px 8px rgb(0 0 0 / .18); }
.menu-secoes a.ativa { outline: 3px solid var(--brand); outline-offset: 1px; }
.menu-secoes img { display: block; width: 100%; height: 100%; object-fit: cover; }
.menu-secoes .sem-imagem { display: flex; align-items: center; justify-content: center; padding: .4rem; text-align: center; background: #15171a; border: 2px solid #ee7f1b; color: #fff; font-weight: 700; text-decoration: none; }
@media (min-width: 800px) { .menu-secoes a { width: 160px; } }

/* Carrossel dos mais vendidos */
.vendidos { display: flex; gap: .65rem; overflow-x: auto; padding: .15rem 0 .6rem; scroll-snap-type: x proximity; scrollbar-width: none; }
.vendido { flex: none; display: flex; flex-direction: column; align-items: flex-start; gap: .2rem; width: 168px; padding: 0 0 .65rem; overflow: hidden; text-align: left; font-weight: 400; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; scroll-snap-align: start; box-shadow: 0 2px 8px rgb(0 0 0 / .1); }
.vendido img, .vendido-sem-foto { display: block; width: 100%; height: auto; aspect-ratio: 425 / 275; object-fit: cover; background: #eeece6; }
.vendido-sem-foto { display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; color: #fff; background: var(--brand); }
.vendido strong { padding: .35rem .65rem 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.vendido .price { padding: 0 .65rem; margin-top: auto; font-weight: 700; }
@media (min-width: 800px) { .vendido { width: 190px; } }
.carrossel-seta { position: absolute; top: 50%; transform: translateY(-50%); z-index: 1; width: 38px; min-height: 38px; padding: 0; border-radius: 50%; font-size: 1.5rem; line-height: 1; color: var(--ink); background: var(--surface); border: 1px solid var(--line); box-shadow: 0 2px 8px rgb(0 0 0 / .25); }
.carrossel-seta.anterior { left: 4px; }
.carrossel-seta.proxima { right: 4px; }
@media (hover: none) { .carrossel-seta { display: none; } }
.menu-categoria-topo { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .2rem .8rem; }

/* Mesas e comandas */
.salao { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .6rem; }
.mesa { display: flex; flex-direction: column; gap: .4rem; border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 8px; padding: .55rem .65rem; background: var(--surface); }
.mesa.ocupada { border-left-color: #ffc400; background: #fffbea; }
.mesa header { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.mesa form { margin-top: auto; }
.mesa-comanda { display: flex; justify-content: space-between; gap: .5rem; color: inherit; text-decoration: none; padding: .3rem 0; border-top: 1px solid var(--line); }
.mesa-comanda:hover span:first-child { text-decoration: underline; }
.badge.pronto, .badge.rodada-pronto { background: #e7f4ec; color: #17603a; }
.badge.rodada-novo { background: #fdecea; color: #8f1d13; }
.badge.rodada-preparo { background: #fdf1d8; color: #7a4d00; }
.comanda-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .comanda-grid { grid-template-columns: minmax(0, 1fr); } }
.rodada { border-bottom: 1px solid var(--line); padding: .5rem 0; }
.rodada header { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .6rem; }
.rodada-itens { list-style: none; margin: .35rem 0 0; padding: 0; }
.rodada-itens li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .1rem .7rem; padding: .15rem 0; }
.rodada-itens li > span:first-child { flex: 1 1 60%; min-width: 0; }
.rodada-itens small { display: block; }
.lc-lista { max-height: 340px; overflow-y: auto; }
.lc-produto { display: flex; justify-content: space-between; gap: .6rem; width: 100%; text-align: left; font-weight: 500; border: 1px solid var(--line); background: var(--surface); margin-bottom: .3rem; }
.lc-nota-item { margin-top: .25rem; min-height: 32px; padding: .2rem .45rem; font-size: .84rem; }
.at-table .only-delivery { display: none !important; }
.menu-mesa { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.qr-folha { background: #fff; padding: 16px; }
.qr-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-top: 12px; }
.qr-cartao { border: 1px solid #bbb; border-radius: 10px; padding: 14px; text-align: center; break-inside: avoid; }
.qr-cartao h2 { font-size: 1.5rem; margin: .1rem 0 .4rem; }
.qr-cartao img { display: block; margin: 0 auto .4rem; }
.qr-loja { font-weight: 600; margin: 0; }
@media print { .qr-folha .no-print { display: none; } .qr-folha { padding: 0; } .qr-grade { grid-template-columns: repeat(2, 1fr); } }

/* Cardápio */
.menu { background: #fafaf8; }
.menu-top { display: flex; align-items: center; gap: .8rem; padding: 1rem; background: var(--surface); }
/* Fundo padrão dos cardápios. Com espaço dos lados, o topo fica estreito para a logo e os lanches da imagem aparecerem. */
.menu-fundo::before { content: ""; position: fixed; inset: 0; z-index: -1; background: #fdf6ee url(/fundo-cardapio.webp) center / cover no-repeat; }
@media (min-width: 800px) {
  .menu-fundo .menu-top, .menu-fundo .menu-secoes-faixa { max-width: 728px; margin-inline: auto; }
  .menu-fundo .menu-top { margin-top: 12px; border-radius: 12px 12px 0 0; }
}
@media (min-width: 1200px) { .menu-fundo::before { background-position: left 30%; } }
/* Tela em pé abre a foto própria, e o topo desce para não cobrir a logo que vem nela. */
@media (max-aspect-ratio: 4/5) {
  .menu-fundo { padding-top: 22dvh; }
  .menu-fundo::before { background-image: url(/fundo-cardapio-celular.webp); background-position: center top; }
  .menu-fundo .menu-top { margin-top: 0; border-radius: 12px 12px 0 0; }
}
.menu-top img { border-radius: 12px; object-fit: cover; }
.status { font-size: .85rem; font-weight: 600; margin: .1rem 0 0; }
.status.open { color: var(--ok); } .status.closed { color: var(--danger); }
.menu-body { max-width: 760px; margin: 0 auto; padding: 1rem 1rem 6rem; }
.menu-body section { scroll-margin-top: 136px; margin-bottom: 1.4rem; }
.dish { display: flex; justify-content: space-between; gap: .8rem; width: 100%; text-align: left; font-weight: 400; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; margin-bottom: .55rem; }
.dish-text { display: flex; flex-direction: column; gap: .15rem; min-width: 0; align-items: flex-start; }
.dish-text .muted { font-size: .86rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.dish .price { font-weight: 700; margin-top: .15rem; }
.dish img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; flex: none; background: #eeece6; }
.dish-sem-foto { display: flex; align-items: center; justify-content: center; width: 88px; height: 88px; flex: none; border-radius: 8px; font-size: 2rem; font-weight: 700; color: #fff; background: var(--brand); }
.cart-bar { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(12px, env(safe-area-inset-bottom)); width: min(728px, calc(100% - 32px)); justify-content: space-between; background: var(--brand); color: #fff; padding: .85rem 1rem; border-radius: 12px; box-shadow: 0 6px 20px rgb(0 0 0 / .22); z-index: 4; }

.sheet { border: 0; border-radius: 14px; padding: 1rem; width: min(560px, calc(100% - 16px)); max-height: calc(100dvh - 16px); color: inherit; }
.sheet::backdrop { background: rgb(0 0 0 / .45); }
.sheet-close { float: right; }
.sheet-close button { font-size: 1.4rem; min-height: 36px; padding: 0 .6rem; line-height: 1; }
#pd-image { width: 100%; max-height: 240px; object-fit: cover; border-radius: 10px; margin-bottom: .6rem; }
.option-group { border: 0; padding: 0; margin: 0 0 .9rem; }
.option-group legend { font-weight: 700; padding: 0; margin-bottom: .25rem; width: 100%; }
.option-group legend small { display: block; font-weight: 400; }
.option { display: flex; align-items: center; gap: .55rem; padding: .55rem 0; border-bottom: 1px solid var(--line); font-weight: 400; }
.option span:nth-of-type(2) { margin-left: auto; }
.sheet-foot { display: flex; gap: .7rem; margin-top: .9rem; position: sticky; bottom: 0; background: var(--surface); padding-top: .5rem; }
.sheet-foot .primary { flex: 1; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; }
.stepper button { min-width: 40px; padding: 0; }
.stepper span { min-width: 26px; text-align: center; font-weight: 600; }
.stepper.small button { min-width: 30px; min-height: 30px; }
.cart-items { list-style: none; margin: 0 0 .6rem; padding: 0; }
.cart-items li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.cart-items li > span:first-child { flex: 1; min-width: 0; }
.cart-items small { display: block; }
.upsell { display: flex; justify-content: space-between; width: 100%; font-weight: 500; border: 1px dashed var(--brand); margin-bottom: .4rem; }
.segmented { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.segmented legend { font-size: .88rem; font-weight: 500; padding: 0; margin-bottom: .25rem; }
.segmented label { flex: 1 1 90px; display: flex; gap: .4rem; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; padding: .55rem; font-weight: 500; }
.segmented label:has(input:checked) { border-color: var(--brand); background: #fef0f0; }
.coupon { display: flex; gap: .5rem; align-items: flex-end; }
.coupon label { flex: 1; }
#co-coupon-msg:empty { display: none; }
.nudge { background: #fef0f0; border-radius: 8px; padding: .5rem .7rem; font-size: .88rem; margin: .7rem 0; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: .2rem .6rem; margin: .7rem 0; }
.totals dd { margin: 0; text-align: right; }
.totals .grand { font-weight: 700; font-size: 1.1rem; padding-top: .3rem; }

/* Rastreio e entregador */
.narrow-page { max-width: 560px; margin: 0 auto; padding: 1rem; }
.tracking .menu-top { background: none; padding: 0 0 1rem; }
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; padding: .4rem 0 .4rem 1.6rem; color: var(--muted); }
.steps li::before { content: ""; position: absolute; left: .2rem; top: .75rem; width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.steps li.done { color: var(--ink); }
.steps li.done::before { background: var(--ok); }
.steps li.current { color: var(--ink); font-weight: 700; }
.steps li.current::before { background: var(--brand); box-shadow: 0 0 0 3px #fac9c9; }
.steps time { font-weight: 400; }

/* Comanda térmica de 80 mm */
.ticket { background: #fff; color: #000; width: 72mm; margin: 0 auto; padding: 2mm; font: 12px/1.35 ui-monospace, Consolas, monospace; }
.ticket h1 { font-size: 15px; text-align: center; }
.ticket p { margin: 1px 0; overflow: hidden; }
.ticket .right { float: right; }
.ticket .big { font-size: 15px; font-weight: 700; }
.ticket .sub { padding-left: 10px; }
.ticket hr { border: 0; border-top: 1px dashed #000; margin: 5px 0; }
@media print {
  @page { size: 80mm auto; margin: 0; }
  .no-print { display: none !important; }
}

@media (max-width: 760px) {
  .app-shell { flex-direction: column; }
  .brand { display: flex; align-items: center; gap: .5rem; padding: 0; }
  .brand img { width: 64px; margin: 0; }
  .brand small { text-align: left; padding-right: .6rem; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats .card { padding: .7rem; margin-bottom: 0; }
  .stats { margin-bottom: 1rem; }
  .sidebar { flex: none; width: 100%; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; padding: .55rem .75rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar nav { order: 3; flex: 1 0 100%; flex-direction: row; overflow-x: auto; }
  .who { flex-direction: row; align-items: center; margin-left: auto; padding: 0; border-top: 0; }
  .who .muted { display: none; }
  .wrap { padding: 1rem; width: 100%; }
  .bank-grid { grid-template-columns: 1fr; }
  .two, .grid-2 { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: auto; }
  .form-section label.check { padding-top: 0; }
  .funnel li { grid-template-columns: 1fr 70px; }
  .funnel .label { grid-column: 1 / -1; }
  .board { grid-template-columns: repeat(4, 82vw); }
  .sheet { margin: auto auto 0; width: 100%; max-width: none; border-radius: 14px 14px 0 0; max-height: 92dvh; }
}
