:root {
  --green-dark: #116b35;
  --green: #1e9448;
  --green-light: #8cc63f;
  --green-tint: #f2f8ee;
  --ink: #10241a;
  --muted: #56685d;
  --line: #e1eade;
  --bg: #f7f9f5;
  --white: #ffffff;
  --whatsapp: #25d366;
  --danger: #c92a2a;
  --warn: #e8590c;
  --radius: 18px;
  --shadow-sm: 0 4px 14px rgba(16, 36, 26, .06);
  --shadow: 0 18px 40px rgba(17, 107, 53, .12);
  --gradient: linear-gradient(135deg, var(--green-dark) 0%, var(--green) 55%, var(--green-light) 100%);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.45;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Botões e campos ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 20px;
  font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--primary { background: var(--green-dark); color: #fff; }
.btn--primary:hover:not(:disabled) { background: var(--green); box-shadow: var(--shadow); }
.btn--ghost { background: transparent; border: 1.5px solid var(--line); color: var(--ink); }
.btn--ghost:hover { border-color: var(--green); }
.btn--whatsapp { background: var(--whatsapp); color: #08361a; }
.btn--danger { background: transparent; color: var(--danger); border: 1.5px solid #f1c4c4; }
.btn--small { padding: 8px 14px; font-size: 14px; }
.btn--block { width: 100%; }

.field { display: grid; gap: 6px; margin-bottom: 12px; }
.field label { font-size: 13px; font-weight: 600; color: var(--muted); }
.input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1.5px solid var(--line); background: #fff; outline: none;
}
.input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(30, 148, 72, .15); }
.input--erro { border-color: var(--danger); }
.erro-msg { color: var(--danger); font-size: 13px; margin: 4px 0 0; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--line);
  background: #fff; font-size: 14px; font-weight: 600; white-space: nowrap;
}
.chip[aria-pressed="true"], .chip.is-ativo { background: var(--ink); border-color: var(--ink); color: #fff; }

.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); background: var(--green-tint); padding: 2px 8px; border-radius: 999px; }

.segmented { display: inline-flex; background: #eef2ec; border-radius: 999px; padding: 4px; }
.segmented button { border: 0; background: transparent; padding: 8px 18px; border-radius: 999px; font-weight: 700; color: var(--muted); }
.segmented button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.switch { position: relative; display: inline-block; vertical-align: middle; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch span { position: absolute; inset: 0; background: #cfd8cc; border-radius: 999px; transition: background .2s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px;
  font-weight: 600; opacity: 0; pointer-events: none; transition: .25s; z-index: 200;
  max-width: calc(100% - 32px);
}
.toast.is-visivel { opacity: 1; transform: translate(-50%, 0); }

.demo-bar {
  background: var(--ink); color: #dfe9e2; font-size: 13px; text-align: center;
  padding: 8px 16px;
}
.demo-bar a { color: var(--green-light); font-weight: 700; }

/* ---------- Cardápio do cliente ---------- */

.loja-capa {
  background: var(--gradient); color: #fff;
  padding: 28px 16px 64px; position: relative; overflow: hidden;
}
.loja-capa::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px;
  border-radius: 0 60% 0 60%; background: rgba(255,255,255,.08);
}
.loja-capa__inner { max-width: 1140px; margin: 0 auto; }

.loja-card {
  max-width: 1108px; width: calc(100% - 32px); margin: -44px auto 0; position: relative; z-index: 2;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px; display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.loja-card__logo {
  width: 72px; height: 72px; border-radius: 20px; background: var(--green-tint);
  display: grid; place-items: center; font-size: 38px; flex: none;
}
.loja-card__info { flex: 1; min-width: 200px; }
.loja-card h1 { margin: 0; font-size: 24px; letter-spacing: -.02em; }
.loja-card p { margin: 2px 0 0; color: var(--muted); }
.loja-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.status-dot { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--green); }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-dot.is-fechado { color: var(--danger); }

.cardapio-layout {
  max-width: 1140px; margin: 0 auto; padding: 16px;
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px;
}
@media (min-width: 980px) {
  .cardapio-layout { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
}

.aviso {
  display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: #fff; border: 1.5px dashed var(--green-light); border-radius: 14px; padding: 12px 14px; margin-bottom: 16px;
}
.aviso--fechado { border-color: #f1c4c4; background: #fff5f5; }

.busca { position: relative; margin: 4px 0 12px; }
.busca .input { padding-left: 42px; border-radius: 999px; }
.busca svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }

.filtros { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.filtros::-webkit-scrollbar { display: none; }

.cat-nav {
  position: sticky; top: 0; z-index: 20; background: var(--bg);
  display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; margin: 8px 0 4px; scrollbar-width: none;
  border-bottom: 1px solid var(--line);
}
.cat-nav::-webkit-scrollbar { display: none; }
.cat-nav a { padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--muted); text-decoration: none; white-space: nowrap; }
.cat-nav a.is-ativo { background: var(--green-dark); color: #fff; }

.secao-titulo { font-size: 20px; margin: 24px 0 10px; letter-spacing: -.01em; scroll-margin-top: 64px; }

.destaques { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 12px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.destaques::-webkit-scrollbar { display: none; }
.destaque {
  flex: 0 0 168px; scroll-snap-align: start; background: #fff; border: 0; border-radius: 16px;
  box-shadow: var(--shadow-sm); text-align: left; padding: 0; overflow: hidden;
}
.destaque__img { height: 96px; display: grid; place-items: center; font-size: 46px; }
.destaque__txt { padding: 10px 12px 12px; }
.destaque__txt strong { display: block; font-size: 14px; line-height: 1.25; }
.destaque__txt span { font-size: 14px; color: var(--green-dark); font-weight: 700; }

.itens { display: grid; gap: 10px; }
@media (min-width: 680px) { .itens { grid-template-columns: 1fr 1fr; } }
.item {
  display: flex; gap: 12px; align-items: stretch; text-align: left;
  background: #fff; border: 1.5px solid transparent; border-radius: 16px; padding: 14px;
  box-shadow: var(--shadow-sm); transition: border-color .15s, transform .15s; width: 100%;
}
.item:hover:not(:disabled) { border-color: var(--green-light); transform: translateY(-1px); }
.item:disabled { opacity: .55; cursor: not-allowed; }
.item__txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.item__nome { font-weight: 700; }
.item__desc { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item__preco { margin-top: auto; font-weight: 800; color: var(--green-dark); }
.item__preco small { font-weight: 600; color: var(--muted); }
.item__tags { display: flex; gap: 4px; flex-wrap: wrap; }
.item__img { width: 88px; height: 88px; border-radius: 14px; display: grid; place-items: center; font-size: 42px; flex: none; position: relative; }
.item__esgotado { position: absolute; inset: auto 4px 4px; background: var(--ink); color: #fff; font-size: 11px; font-weight: 700; border-radius: 8px; text-align: center; padding: 2px 0; }
.vazio { color: var(--muted); text-align: center; padding: 32px 0; }

/* Sacola */
.sacola {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  display: flex; flex-direction: column; max-height: calc(100vh - 32px);
}
@media (min-width: 980px) { .sacola { position: sticky; top: 16px; } }
@media (max-width: 979px) {
  .sacola {
    position: fixed; inset: auto 0 0 0; z-index: 90; border-radius: 22px 22px 0 0;
    max-height: 92vh; transform: translateY(105%); transition: transform .28s ease;
  }
  .sacola.is-aberta { transform: none; }
}
.sacola__topo { display: flex; align-items: center; justify-content: space-between; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.sacola__topo h2 { margin: 0; font-size: 18px; }
.sacola__corpo { overflow-y: auto; padding: 14px 18px; flex: 1; }
.sacola__rodape { padding: 14px 18px 18px; border-top: 1px solid var(--line); }
.fechar { border: 0; background: #eef2ec; width: 36px; height: 36px; border-radius: 50%; font-size: 18px; line-height: 1; }
@media (min-width: 980px) { .sacola .fechar--mobile { display: none; } }

.linha { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.linha:last-child { border-bottom: 0; }
.linha__info { flex: 1; min-width: 0; }
.linha__info strong { display: block; font-size: 14px; }
.linha__info small { display: block; color: var(--muted); font-size: 12px; }
.linha__preco { font-weight: 700; font-size: 14px; white-space: nowrap; }

.qtd { display: inline-flex; align-items: center; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.qtd button { border: 0; background: transparent; width: 32px; height: 32px; font-size: 18px; color: var(--green-dark); font-weight: 700; }
.qtd span { min-width: 22px; text-align: center; font-weight: 700; font-size: 14px; }
.qtd--grande button { width: 42px; height: 44px; }

.progresso { margin: 6px 0 14px; font-size: 13px; color: var(--muted); }
.progresso__barra { height: 8px; border-radius: 999px; background: #eef2ec; overflow: hidden; margin-top: 6px; }
.progresso__barra span { display: block; height: 100%; background: var(--gradient); border-radius: 999px; transition: width .3s; }

.upsell { margin: 10px 0 4px; }
.upsell h3 { font-size: 14px; margin: 0 0 8px; }
.upsell__lista { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.upsell__lista::-webkit-scrollbar { display: none; }
.upsell__item { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; background: var(--green-tint); border: 0; border-radius: 12px; padding: 8px 10px; font-size: 13px; text-align: left; }
.upsell__item b { display: block; color: var(--green-dark); }

.cupom { display: flex; gap: 8px; margin: 12px 0 4px; }
.cupom .input { text-transform: uppercase; }
.cupom-ok { color: var(--green); font-size: 13px; font-weight: 600; margin: 4px 0 0; }

.totais { font-size: 14px; display: grid; gap: 4px; margin-bottom: 12px; }
.totais div { display: flex; justify-content: space-between; }
.totais .total { font-size: 18px; font-weight: 800; margin-top: 4px; }
.totais .verde { color: var(--green); }

.opcoes-pg { display: grid; gap: 8px; margin-bottom: 12px; }
.opcao {
  display: flex; gap: 10px; align-items: center; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer;
}
.opcao:has(input:checked) { border-color: var(--green); background: var(--green-tint); }
.opcao input { accent-color: var(--green); width: 18px; height: 18px; }
.opcao span { flex: 1; }
.opcao small { color: var(--muted); }

.barra-sacola {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--green-dark); color: #fff; border: 0; border-radius: 16px; padding: 14px 18px;
  box-shadow: 0 16px 40px rgba(17, 107, 53, .35); font-weight: 700;
}
.barra-sacola .badge { background: rgba(255,255,255,.2); border-radius: 999px; padding: 2px 10px; font-size: 13px; }
@media (min-width: 980px) { .barra-sacola { display: none !important; } }
.espaco-barra { height: 88px; }
@media (min-width: 980px) { .espaco-barra { display: none; } }

.veu { position: fixed; inset: 0; background: rgba(16, 36, 26, .45); z-index: 85; opacity: 0; pointer-events: none; transition: opacity .25s; }
.veu.is-visivel { opacity: 1; pointer-events: auto; }
@media (min-width: 980px) { .veu--sacola { display: none; } }

/* Modal do item */
dialog.modal {
  border: 0; padding: 0; border-radius: 22px; width: min(520px, calc(100% - 24px));
  max-height: calc(100vh - 24px); box-shadow: 0 30px 80px rgba(0,0,0,.3); color: var(--ink);
}
dialog.modal::backdrop { background: rgba(16, 36, 26, .5); }
.modal__form { display: flex; flex-direction: column; max-height: calc(100vh - 24px); }
.modal__img { height: 170px; display: grid; place-items: center; font-size: 84px; position: relative; flex: none; }
.modal__img .fechar { position: absolute; top: 12px; right: 12px; background: #fff; }
.modal__corpo { padding: 18px 20px; overflow-y: auto; }
.modal__corpo h2 { margin: 0 0 4px; font-size: 22px; }
.modal__corpo > p { margin: 0 0 12px; color: var(--muted); }
.grupo { margin: 16px 0; }
.grupo__topo { display: flex; justify-content: space-between; align-items: center; background: #f1f4ef; margin: 0 -20px 6px; padding: 10px 20px; }
.grupo__topo strong { display: block; }
.grupo__topo small { color: var(--muted); }
.grupo__badge { font-size: 11px; font-weight: 800; background: var(--ink); color: #fff; padding: 3px 8px; border-radius: 6px; text-transform: uppercase; }
.grupo__badge.ok { background: var(--green); }
.escolha { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.escolha:last-child { border-bottom: 0; }
.escolha span { flex: 1; }
.escolha small { color: var(--muted); }
.escolha input { accent-color: var(--green); width: 20px; height: 20px; }
.escolha:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.modal__rodape { display: flex; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); align-items: center; flex: none; }
.modal__rodape .btn { flex: 1; justify-content: space-between; }

/* Acompanhamento */
.acompanhar {
  position: fixed; inset: 0; z-index: 120; background: var(--bg); overflow-y: auto;
}
.acompanhar__inner { max-width: 560px; margin: 0 auto; padding: 24px 16px 40px; }
.acompanhar__hero { background: var(--gradient); color: #fff; border-radius: var(--radius); padding: 22px; text-align: center; }
.acompanhar__hero h2 { margin: 6px 0 2px; font-size: 26px; }
.acompanhar__hero p { margin: 0; opacity: .9; }
.cartao { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; margin-top: 14px; }
.cartao h3 { margin: 0 0 10px; font-size: 16px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; position: relative; padding-bottom: 18px; color: var(--muted); }
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 3px solid var(--line); background: #fff; flex: none; margin-top: 3px; position: relative; z-index: 1; }
.timeline li:not(:last-child)::after { content: ""; position: absolute; left: 6px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.timeline li.is-feito { color: var(--ink); }
.timeline li.is-feito::before { border-color: var(--green); background: var(--green); }
.timeline li.is-feito:not(:last-child)::after { background: var(--green); }
.timeline li.is-atual::before { box-shadow: 0 0 0 6px rgba(30,148,72,.2); }
.timeline li span { flex: 1; font-weight: 600; }
.timeline li time { font-size: 13px; }
.pix { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.pix canvas { width: 140px; height: 140px; image-rendering: pixelated; border: 8px solid #fff; box-shadow: var(--shadow-sm); border-radius: 8px; }
.pix__txt { flex: 1; min-width: 180px; font-size: 14px; }
.pix__codigo { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: #f1f4ef; border-radius: 8px; padding: 8px; word-break: break-all; margin: 8px 0; }
.pago { color: var(--green); font-weight: 700; }

/* ---------- Painel do restaurante ---------- */

.painel { min-height: 100vh; display: flex; flex-direction: column; }
.painel-topo {
  background: var(--ink); color: #fff; padding: 12px 20px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
}
.painel-topo .marca { font-weight: 800; font-size: 17px; display: flex; align-items: center; gap: 10px; margin-right: auto; }
.painel-topo .marca small { font-weight: 500; color: #9fb3a6; }
.painel-abas { display: flex; gap: 4px; }
.painel-abas button { border: 0; background: transparent; color: #b8c9be; padding: 8px 14px; border-radius: 999px; font-weight: 700; }
.painel-abas button[aria-selected="true"] { background: rgba(255,255,255,.12); color: #fff; }
.painel-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.painel-acoes .btn--ghost { color: #fff; border-color: rgba(255,255,255,.25); }
.loja-toggle { display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; }

.painel-corpo { padding: 20px; flex: 1; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.kpi small { color: var(--muted); font-weight: 600; font-size: 13px; }
.kpi strong { display: block; font-size: 24px; letter-spacing: -.02em; margin-top: 2px; }

.kanban { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.coluna { background: #eef2ec; border-radius: 16px; padding: 12px; min-height: 240px; }
.coluna__topo { display: flex; align-items: center; justify-content: space-between; margin: 2px 4px 10px; }
.coluna__topo h2 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.coluna__topo h2::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--cor, var(--muted)); }
.contagem { background: #fff; border-radius: 999px; padding: 2px 10px; font-weight: 800; font-size: 13px; }
.coluna__lista { display: grid; gap: 10px; }
.coluna__vazia { color: var(--muted); font-size: 13px; text-align: center; padding: 24px 8px; }

.pedido { background: #fff; border-radius: 14px; padding: 12px 14px; box-shadow: var(--shadow-sm); border-left: 4px solid var(--cor, var(--line)); }
.pedido.is-novo { animation: pisca 1.2s ease-in-out 3; }
@keyframes pisca { 50% { box-shadow: 0 0 0 4px rgba(232, 89, 12, .35); } }
.pedido__topo { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pedido__topo strong { font-size: 16px; }
.tempo { font-size: 12px; font-weight: 700; color: var(--muted); }
.tempo.is-atrasado { color: var(--danger); }
.pedido__cliente { font-size: 13px; color: var(--muted); margin: 2px 0 8px; }
.modo { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; padding: 2px 8px; border-radius: 6px; background: var(--green-tint); color: var(--green-dark); }
.modo--retirada { background: #fff4e6; color: #a34e00; }
.modo--mesa { background: #e7f5ff; color: #1864ab; }
.pedido ul { margin: 0 0 8px; padding: 0; list-style: none; font-size: 13px; }
.pedido li { padding: 2px 0; }
.pedido li small { display: block; color: var(--muted); padding-left: 20px; }
.pedido__pg { display: flex; justify-content: space-between; font-size: 13px; padding-top: 8px; border-top: 1px dashed var(--line); }
.pedido__pg b { font-size: 15px; }
.pg-pendente { color: var(--warn); font-weight: 700; }
.pg-ok { color: var(--green); font-weight: 700; }
.pedido__acoes { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.pedido__acoes .btn { flex: 1; padding: 8px 10px; font-size: 13px; }
.icone-btn { border: 1.5px solid var(--line); background: #fff; border-radius: 999px; width: 36px; height: 36px; flex: none !important; display: grid; place-items: center; padding: 0 !important; }

.tabela { width: 100%; border-collapse: collapse; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); }
.tabela th, .tabela td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.tabela th { background: #f1f4ef; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.tabela tr.cat td { background: #fafcf9; font-weight: 800; }
.tabela .preco-input { width: 110px; padding: 8px 10px; }
.tabela-wrap { overflow-x: auto; }

.relatorio { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.barras { display: grid; gap: 8px; }
.barra { display: grid; grid-template-columns: 140px 1fr 70px; gap: 10px; align-items: center; font-size: 13px; }
.barra__trilho { height: 12px; background: #eef2ec; border-radius: 999px; overflow: hidden; }
.barra__trilho span { display: block; height: 100%; background: var(--green); border-radius: 999px; }
.barra b { text-align: right; }
.horas { display: flex; align-items: flex-end; gap: 4px; height: 140px; padding-top: 8px; }
.horas div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; font-size: 10px; color: var(--muted); }
.horas span { width: 100%; background: var(--green-light); border-radius: 4px 4px 0 0; min-height: 2px; }

@media (max-width: 720px) {
  .painel-corpo { padding: 14px; }
  .painel-topo { padding: 12px 14px; }
  .barra { grid-template-columns: 100px 1fr 60px; }
}

/* Comanda impressa */
#comanda { display: none; }
@media print {
  body * { visibility: hidden; }
  #comanda, #comanda * { visibility: visible; }
  #comanda { display: block; position: absolute; left: 0; top: 0; width: 80mm; font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: #000; }
  #comanda pre { white-space: pre-wrap; margin: 0; }
}

/* ---------- Página inicial do protótipo ---------- */

.hub { max-width: 980px; margin: 0 auto; padding: 40px 16px 60px; }
.hub__hero { background: var(--gradient); color: #fff; border-radius: 28px; padding: 36px 28px; }
.hub__hero h1 { font-size: clamp(28px, 5vw, 44px); margin: 8px 0; letter-spacing: -.03em; line-height: 1.1; }
.hub__hero p { font-size: 17px; max-width: 620px; opacity: .92; margin: 0; }
.hub__selo { display: inline-block; background: rgba(255,255,255,.18); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.hub__acoes { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-top: 20px; }
.hub__card { background: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow-sm); text-decoration: none; color: inherit; border: 1.5px solid transparent; transition: .15s; display: block; }
.hub__card:hover { border-color: var(--green-light); transform: translateY(-2px); }
.hub__card .emoji { font-size: 36px; }
.hub__card h2 { margin: 8px 0 4px; font-size: 20px; }
.hub__card p { margin: 0; color: var(--muted); }
.hub h3 { margin: 36px 0 12px; font-size: 22px; }
.difs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.dif { background: #fff; border-radius: 16px; padding: 16px; box-shadow: var(--shadow-sm); }
.dif strong { display: block; margin-bottom: 4px; }
.dif p { margin: 0; color: var(--muted); font-size: 14px; }
.roteiro { background: #fff; border-radius: 16px; padding: 18px 22px; box-shadow: var(--shadow-sm); }
.roteiro ol { margin: 0; padding-left: 20px; }
.roteiro li { margin: 6px 0; }
.roteiro code { background: var(--green-tint); padding: 1px 6px; border-radius: 6px; font-weight: 700; }

/* ======================= Versão com servidor ======================= */

code { background: var(--green-tint); padding: 1px 6px; border-radius: 6px; font-size: .92em; word-break: break-all; }
.link-btn { border: 0; background: none; padding: 4px 0; color: var(--green-dark); font-weight: 700; font-size: 13px; text-align: left; }
.link-btn:hover { text-decoration: underline; }
.sub { font-size: 15px; margin: 18px 0 8px; }
.dica { color: var(--muted); font-size: 13px; }
.aviso--leve { border-style: solid; border-color: var(--line); }
.grade-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 0 12px; }
.mini { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.mini .input { width: 80px; padding: 8px 10px; }

/* Cardápio: fotos */
.loja-capa.tem-foto { background-size: cover; background-position: center; padding-bottom: 110px; }
.loja-card__logo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.item__img-wrap { position: relative; flex: none; }
.item__img img, .destaque__img img, .item-linha__img img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.destaque__img { overflow: hidden; }
.item__img--grande { width: 140px; height: 140px; font-size: 64px; }
.modal__img--foto { padding: 0; background: #eef2ec; }
.modal__img--foto img { width: 100%; height: 100%; object-fit: cover; }
.pix__qr { width: 160px; height: 160px; border-radius: 8px; box-shadow: var(--shadow-sm); }
.rodape-loja { text-align: center; color: var(--muted); font-size: 14px; padding: 32px 0 8px; }
.rodape-loja a { color: var(--green-dark); font-weight: 600; }
.rodape-loja .feito { font-size: 12px; margin-top: 16px; }

/* Painel */
.painel-topo { position: sticky; top: 0; z-index: 30; }
.painel-topo .painel-abas { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
.painel-topo .painel-abas::-webkit-scrollbar { display: none; }
.painel-abas button { white-space: nowrap; }
.conexao { color: var(--green-light); font-size: 14px; }
.conexao.is-off { color: #ff6b6b; animation: pisca-txt 1s infinite; }
@keyframes pisca-txt { 50% { opacity: .3; } }
.filtro-pedidos { display: flex; gap: 8px; margin-bottom: 12px; }
.kanban { display: block; overflow: visible; }
.kanban__colunas { display: grid; grid-template-columns: repeat(4, minmax(260px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; }
.agendados { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: #e3fafc; border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; }
.modo--origem { background: #f3f0ff; color: #5f3dc4; }
.pedido__agenda { font-size: 12px; color: #0b7285; font-weight: 700; margin-bottom: 6px; }
.pedido__end { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.pedido__end a { color: var(--green-dark); }
.historico { margin: 0; padding-left: 18px; font-size: 14px; color: var(--muted); }
dialog.modal--largo { width: min(820px, calc(100% - 24px)); }
dialog.modal--largo .modal__corpo { max-height: calc(100vh - 40px); overflow-y: auto; }
.modal__acoes { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; position: sticky; bottom: -18px; background: #fff; padding: 12px 0; }
.barra-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.config-grade { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }
.config-grade .cartao { margin: 0; }
.miniatura { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; display: block; margin-bottom: 6px; }
.linha-edit { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.linha-edit--wrap { flex-wrap: wrap; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.linha-edit .input { padding: 9px 10px; }
.horarios { display: grid; gap: 6px; margin: 10px 0; }
.horario { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 14px; }
.horario strong { width: 70px; }
.horario .input { width: 110px; padding: 8px; }
.link-copiar { display: flex; gap: 8px; }
.qr-box svg { width: 160px; height: 160px; margin-top: 12px; }
.qr-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 10px; }
.qr-mesa { text-align: center; border: 1px dashed var(--line); border-radius: 12px; padding: 10px; }
.qr-mesa svg { width: 120px; height: 120px; }
.qr-mesa strong { display: block; }
.qr-mesa small { color: var(--muted); font-size: 11px; }
.links-camp { display: flex; flex-wrap: wrap; gap: 6px; }

/* Editor de cardápio */
.cat-bloco { background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); padding: 6px 14px 10px; margin-bottom: 14px; }
.cat-bloco__topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.cat-bloco__topo h3 { margin: 0; font-size: 17px; }
.cat-bloco__topo h3 small { color: var(--muted); font-weight: 600; font-size: 13px; }
.cat-bloco__acoes { display: flex; gap: 6px; align-items: center; }
.item-linha { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px dashed var(--line); }
.item-linha:last-child { border-bottom: 0; }
.item-linha.is-esgotado { opacity: .55; }
.item-linha__img { width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; font-size: 24px; flex: none; overflow: hidden; }
.item-linha__txt { flex: 1; min-width: 0; }
.item-linha__txt strong { display: block; font-size: 14px; }
.item-linha__txt small { color: var(--muted); font-size: 12px; }
.icone-btn:disabled { opacity: .3; cursor: default; }
.editor-item { display: grid; grid-template-columns: 200px 1fr; gap: 18px; }
.editor-item__foto { display: grid; justify-items: start; gap: 6px; align-content: start; }
@media (max-width: 640px) { .editor-item { grid-template-columns: 1fr; } }
.grupo-ed { border: 1.5px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; }
.grupo-ed__topo { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 8px; }
.grupo-ed__topo .input { padding: 9px 10px; width: auto; flex: 1 1 140px; }
.escolha-ed { display: flex; gap: 6px; align-items: center; margin: 4px 0 4px 12px; }
.escolha-ed .input { padding: 8px 10px; }

/* Montador (garçom e lançar pedido) */
.montador { display: grid; grid-template-columns: 1.4fr 1fr; gap: 14px; margin: 10px 0; }
@media (max-width: 700px) { .montador { grid-template-columns: 1fr; } }
.montador__itens { display: grid; gap: 6px; max-height: 340px; overflow-y: auto; }
.montador__item { display: grid; grid-template-columns: 28px 1fr auto; gap: 8px; align-items: center; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 10px; }
.montador__item:hover { border-color: var(--green); }
.montador__opcoes { background: var(--green-tint); border-radius: 12px; padding: 12px; }
.montador__sacola { background: #f7f9f5; border-radius: 12px; padding: 10px 12px; }
.montador__sacola h4 { margin: 0 0 6px; }

/* Garçom */
.garcom__corpo { padding: 16px; max-width: 900px; margin: 0 auto; }
.mesas { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 10px; }
.mesa { aspect-ratio: 1; border-radius: 16px; border: 2px solid var(--line); background: #fff; display: grid; place-content: center; gap: 2px; }
.mesa strong { font-size: 26px; }
.mesa small { color: var(--muted); font-size: 12px; }
.mesa.is-ocupada { border-color: var(--green); background: var(--green-tint); }
.mesa.is-pronto { border-color: #7048e8; background: #f3f0ff; animation: pisca 1.2s infinite; }

/* Conta (entrar e cadastro) */
body.conta { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--gradient); }
.conta__card { background: #fff; border-radius: 22px; padding: 28px 24px; width: min(440px, 100%); box-shadow: var(--shadow); }
.conta__card h1 { margin: 6px 0 16px; font-size: 26px; }
.conta__marca { font-weight: 800; color: var(--green-dark); text-decoration: none; }
.conta__alt { text-align: center; font-size: 14px; margin: 16px 0 0; color: var(--muted); }
.conta__alt a { color: var(--green-dark); font-weight: 700; }
.slug { display: flex; align-items: center; gap: 4px; font-size: 14px; color: var(--muted); }
.slug .input { flex: 1; }

/* Página inicial */
.hub__nav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; gap: 12px; flex-wrap: wrap; }
.hub__nav a { color: var(--ink); font-weight: 700; text-decoration: none; margin-left: 8px; }
.hub__nav a.btn { color: #fff; }
.hub__cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.btn--outline-claro { border: 1.5px solid rgba(255,255,255,.6); color: #fff; }

/* Tela da cozinha (KDS) */
body.kds { background: #0b1510; color: #f1f5f2; min-height: 100vh; }
.kds__topo { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 12px 18px; background: #10241a; position: sticky; top: 0; z-index: 5; font-size: 18px; }
.kds__topo .btn--ghost { color: #fff; border-color: rgba(255,255,255,.25); }
.kds__acoes { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.kds__grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; padding: 16px; align-items: start; }
.kds__pedido { background: #16271d; border-radius: 16px; padding: 14px; border-top: 8px solid #e8590c; }
.kds__pedido--preparo { border-top-color: #1971c2; }
.kds__pedido.atencao { box-shadow: 0 0 0 3px #f59f00; }
.kds__pedido.atrasado { box-shadow: 0 0 0 3px #fa5252; }
.kds__pedido header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.kds__pedido header strong { font-size: 30px; }
.kds__pedido header span { font-weight: 800; font-size: 15px; }
.kds__tempo { color: #9fb3a6; }
.kds__pedido.atrasado .kds__tempo { color: #ff8787; }
.kds__cliente { color: #9fb3a6; font-size: 14px; margin: 2px 0 10px; }
.kds__pedido ul { list-style: none; margin: 0 0 12px; padding: 0; font-size: 20px; }
.kds__pedido li { padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.kds__pedido li small { display: block; font-size: 15px; color: #c3d3c8; padding-left: 28px; }
.kds__pedido li em { display: block; font-size: 15px; color: #ffd43b; font-style: normal; font-weight: 700; padding-left: 28px; }
.kds__brinde { color: #63e6be; font-weight: 700; margin-bottom: 10px; }
.kds__pedido .btn { font-size: 18px; padding: 14px; }
.kds__vazio { grid-column: 1/-1; text-align: center; font-size: 22px; color: #9fb3a6; padding: 80px 0; }

details.ferramenta { border: 1.5px solid var(--line); border-radius: 12px; padding: 8px 12px; margin: 8px 0; }
details.ferramenta summary { cursor: pointer; padding: 4px 0; }
details.ferramenta .link-copiar textarea { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

.incluso { list-style: none; margin: 0; padding: 18px 22px; background: #fff; border-radius: 20px; box-shadow: var(--shadow-sm);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px 24px; }
.incluso li { position: relative; padding-left: 28px; font-size: 15px; }
.incluso li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }

/* Assinatura */
.faixa-aviso { background: #e6fcf5; color: #0b5d3b; padding: 10px 20px; font-size: 14px; font-weight: 600; }
.faixa-aviso a { color: inherit; font-weight: 800; }
.faixa-aviso--alerta { background: #fff4e6; color: #8a3c00; }
.faixa-aviso--perigo { background: #fff0f0; color: var(--danger); }
.selo { display: inline-block; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--green-tint); color: var(--green-dark); }
.selo--alerta { background: #fff4e6; color: #a34e00; }
.selo--perigo { background: #fff0f0; color: var(--danger); }
.acoes-admin { display: flex; flex-wrap: wrap; gap: 6px; }
.planos { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.plano { background: #fff; border-radius: 20px; padding: 22px; box-shadow: var(--shadow-sm); border: 1.5px solid transparent; }
.plano--destaque { border-color: var(--green-light); }
.plano h4 { margin: 0 0 4px; font-size: 16px; }
.plano .preco { font-size: 30px; font-weight: 800; letter-spacing: -.02em; color: var(--green-dark); }
.plano .preco small { font-size: 14px; color: var(--muted); font-weight: 600; }
.plano p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

@media print { .painel, .toast, dialog { display: none !important; } }
