/* base da página (o protótipo recebia isso pronto do Claude) */
[hidden]{display:none!important}
html{-webkit-text-size-adjust:100%}
body{margin:0;min-height:100vh}
:root{padding-top:env(safe-area-inset-top,0px);padding-bottom:env(safe-area-inset-bottom,0px)}
img,svg,canvas{max-width:100%}
button,a,input,select{-webkit-tap-highlight-color:transparent}

/* Design system "Balcão · Pedido Direto": cliente = coluna de celular; representante = painel largo com abas. */
:root{
  --surface-page:#f8f5ef; --surface-card:#ffffff; --surface-sunken:#f2ebdf; --line:#ebe2d2; --line-strong:#d6c7ae; --kraft:#e6d2a8; --kraft-dark:#c8ab72; --font-display:"Bricolage Grotesque",Nunito,system-ui,sans-serif; color-scheme:light;
  --ink:#23180c; --ink-muted:#6b5741; --ink-inverse:#fffdf8;
  --trigo:#ffc928; --trigo-strong:#e5a900; --trigo-soft:#fff1c2; --on-trigo:#2b1d0e; --focus:#2b1d0e;
  --linha-premium:#2b2a29; --linha-nobre:#c46f1c; --linha-extra:#34509e; --linha-super:#227550; --linha-congelado:#86563f;
  --linha-industrial:#b8322b; --linha-doce:#a8436f; --linha-integral:#7a5b2a; --linha-domestica:#2f7a8a;
  --ok:#1d6e43; --ok-soft:#e2f2e8; --aviso:#8a5600; --aviso-soft:#fbeed3; --erro:#b0261e; --erro-soft:#fbe4e1; --info:#2c5aa8; --info-soft:#e5edfb;
  --shadow-card:0 1px 0 #eadfcd; --shadow-float:0 8px 24px rgba(43,29,14,0.18);
  --font-sans:Nunito,"Segoe UI",system-ui,sans-serif;
  --space-1:4px; --space-2:8px; --space-3:12px; --space-4:16px; --space-5:18px; --space-6:24px;
  --radius-sm:10px; --radius-md:16px; --radius-lg:20px; --radius-xl:22px; --radius-pill:999px;
  --touch-min:44px; --touch-main:52px;
}
*{box-sizing:border-box}
body{background:var(--surface-page);color:var(--ink);font-family:var(--font-sans);font-size:15px;font-weight:600;line-height:1.45;font-variant-numeric:tabular-nums}
h1,h2,h3{margin:0;text-wrap:balance} h1{font-size:30px;line-height:1.1;font-weight:900} h2{font-size:18px;font-weight:800} h3{font-size:16px;font-weight:800}
p{margin:0} button,input,select,textarea{font:inherit;color:inherit}
:focus-visible{outline:2px solid var(--focus);outline-offset:2px}
a{color:var(--ink)}
.wrap{padding-left:max(18px,env(safe-area-inset-left,0px));padding-right:max(18px,env(safe-area-inset-right,0px))}
.muted{color:var(--ink-muted)} .small{font-size:13px;font-weight:700} .stack{display:grid;gap:var(--space-3)} .row{display:flex;gap:10px;align-items:center;flex-wrap:wrap} .between{justify-content:space-between}
.over{font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-muted)}
.err{color:var(--erro);font-size:14px;font-weight:800}

/* componentes (bundle.css do design system) */
.bl-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:var(--touch-main);padding:0 22px;border-radius:var(--radius-pill);border:0;font-weight:900;font-size:16px;text-decoration:none;cursor:pointer;background:var(--surface-sunken);color:var(--ink)}
.bl-btn--trigo{background:var(--trigo);color:var(--on-trigo)} .bl-btn--trigo:hover{background:var(--trigo-strong)}
.bl-btn--ink{background:var(--ink);color:var(--ink-inverse)} .bl-btn--ghost{background:none;text-decoration:underline;text-underline-offset:3px;padding:0 8px;min-height:var(--touch-min)}
.bl-btn--sm{min-height:var(--touch-min);font-size:14px;padding:0 16px} .bl-btn--block{width:100%} .bl-btn--danger{color:var(--erro)} .bl-btn[disabled]{opacity:.45;cursor:not-allowed}
.link{border:0;background:none;padding:0;font-weight:800;color:var(--ink);text-decoration:underline;text-underline-offset:3px;cursor:pointer}
.bl-chips{display:flex;gap:var(--space-2);overflow-x:auto;scrollbar-width:none;padding-bottom:2px}
.bl-chip{flex:none;border:0;border-radius:var(--radius-pill);padding:9px 16px;min-height:40px;font-weight:800;font-size:14px;background:var(--surface-sunken);color:var(--ink);cursor:pointer}
.bl-chip[aria-pressed="true"]{background:var(--ink);color:var(--ink-inverse)}
.bl-badge{width:54px;height:54px;border-radius:var(--radius-md);display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;font-weight:900;font-size:21px;line-height:1;flex:none;background:var(--linha-premium)}
.bl-badge small{font-size:10px;font-weight:800;margin-top:3px;opacity:.92}
.bl-badge[data-linha="nobre"]{background:var(--linha-nobre)}.bl-badge[data-linha="extra"]{background:var(--linha-extra)}.bl-badge[data-linha="super"]{background:var(--linha-super)}
.bl-badge[data-linha="congelado"]{background:var(--linha-congelado)}.bl-badge[data-linha="industrial"]{background:var(--linha-industrial)}.bl-badge[data-linha="doce"]{background:var(--linha-doce)}
.bl-badge[data-linha="integral"]{background:var(--linha-integral)}.bl-badge[data-linha="domestica"]{background:var(--linha-domestica)}
.bl-add{width:var(--touch-min);height:var(--touch-min);border-radius:50%;border:0;background:var(--ink);color:var(--trigo);font-size:24px;font-weight:900;cursor:pointer;flex:none}
.bl-step{display:inline-flex;align-items:center;gap:var(--space-1);background:var(--trigo);border-radius:var(--radius-pill);padding:4px;flex:none}
.bl-step button{width:38px;height:38px;border-radius:50%;border:0;background:var(--surface-page);color:var(--ink);font-size:20px;font-weight:900;cursor:pointer}
.bl-step input{width:38px;text-align:center;font-weight:900;font-size:17px;color:var(--on-trigo);background:none;border:0;padding:0}
.bl-card{background:var(--surface-card);border:1px solid var(--line);border-radius:var(--radius-lg);box-shadow:var(--shadow-card)}
.bl-prod{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3)}
.bl-prod__info{flex:1;min-width:0} .bl-prod__nome{font-weight:800;font-size:16px;line-height:1.25} .bl-prod__meta{font-weight:700;font-size:13px;color:var(--ink-muted)}
.bl-prod__uso{font-size:12px;font-weight:600;color:var(--ink-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.bl-hero{display:flex;flex-direction:column;gap:6px;padding:18px;border-radius:var(--radius-xl);background:var(--trigo);color:var(--on-trigo);text-decoration:none;border:0;text-align:left;cursor:pointer;width:100%}
.bl-hero__over{font-size:12px;font-weight:800;letter-spacing:.06em;text-transform:uppercase} .bl-hero__titulo{font-size:22px;font-weight:900;line-height:1.2} .bl-hero__resumo{font-size:14px;font-weight:700}
.bl-cartbar{display:flex;align-items:center;justify-content:space-between;gap:12px;background:var(--ink);color:var(--ink-inverse);border-radius:var(--radius-pill);padding:8px 8px 8px 22px;box-shadow:var(--shadow-float);text-decoration:none;border:0;width:100%;cursor:pointer}
.bl-cartbar__total{font-weight:800;font-size:15px;text-align:left} .bl-cartbar__acao{background:var(--trigo);color:var(--on-trigo);border-radius:var(--radius-pill);padding:12px 18px;font-weight:900;font-size:15px;flex:none}
.bl-pill{display:inline-flex;align-items:center;gap:6px;border-radius:var(--radius-pill);padding:3px 10px;font-size:12px;font-weight:800;white-space:nowrap;background:var(--surface-sunken);color:var(--ink-muted)}
.bl-pill::before{content:"";width:7px;height:7px;border-radius:50%;background:currentColor}
.bl-pill--pago{background:var(--ok-soft);color:var(--ok)} .bl-pill--avencer{background:var(--aviso-soft);color:var(--aviso)} .bl-pill--vencido{background:var(--erro-soft);color:var(--erro)} .bl-pill--info{background:var(--info-soft);color:var(--info)}
.bl-boleto{display:flex;flex-direction:column;gap:8px;padding:14px 16px}
.bl-boleto__topo{display:flex;justify-content:space-between;align-items:center;gap:8px;flex-wrap:wrap}
.bl-boleto__valor{font-size:26px;font-weight:900;line-height:1.1} .bl-boleto__venc{font-size:14px;font-weight:800} .bl-boleto__ref{font-size:13px;font-weight:700;color:var(--ink-muted)}
.bl-boleto[data-status="vencido"]{border:2px solid var(--erro)} .bl-boleto[data-status="vencido"] .bl-boleto__venc{color:var(--erro)}
.bl-field{display:grid;gap:6px;font-size:13px;font-weight:800;color:var(--ink-muted)}
.bl-field input,.bl-field select,.bl-field textarea{min-height:var(--touch-min);border:1px solid var(--line-strong);border-radius:var(--radius-sm);padding:0 14px;font-size:16px;font-weight:700;color:var(--ink);background:var(--surface-card);width:100%}
.bl-field textarea{padding:10px 14px;min-height:110px;font-size:14px}

/* moldura */
.proto{background:var(--surface-sunken);font-size:12px;font-weight:700;color:var(--ink-muted)}
.proto .in{max-width:1120px;margin:0 auto;padding-block:6px;display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.top{background:var(--surface-page);border-bottom:1px solid var(--line);position:sticky;top:env(safe-area-inset-top,0px);z-index:5}
body::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:10;background:var(--surface-page)}
.top .in{max-width:1120px;margin:0 auto;padding-block:10px;display:flex;gap:12px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.brand{display:flex;gap:10px;align-items:center;min-width:0}
.mark{width:40px;height:40px;border-radius:50%;background:var(--ink);color:var(--trigo);display:grid;place-items:center;font-weight:900;font-size:18px;flex:none}
.brand b{font-weight:900;display:block;line-height:1.15} .brand small{color:var(--ink-muted);font-size:12px;font-weight:700}
.seg{display:inline-flex;background:var(--surface-sunken);border-radius:var(--radius-pill);padding:4px;gap:2px}
.seg button{border:0;background:none;padding:8px 14px;border-radius:var(--radius-pill);font-weight:800;font-size:14px;color:var(--ink-muted);cursor:pointer}
.seg button[aria-pressed="true"]{background:var(--ink);color:var(--ink-inverse)}
.count{background:var(--trigo);color:var(--on-trigo);border-radius:var(--radius-pill);font-size:11px;font-weight:900;padding:1px 7px}

/* cliente */
.phone{max-width:480px;margin:0 auto;padding-block:20px 130px;display:grid;gap:var(--space-4)}
.bottombar{position:fixed;left:0;right:0;bottom:0;z-index:6;padding-bottom:calc(14px + env(safe-area-inset-bottom,0px));padding-top:10px;pointer-events:none}
.bottombar .in{max-width:480px;margin:0 auto;pointer-events:auto}
.tabbar{position:fixed;left:0;right:0;bottom:0;z-index:6;background:var(--surface-card);border-top:1px solid var(--line);padding-bottom:calc(8px + env(safe-area-inset-bottom,0px));padding-top:6px}
.tabbar .in{max-width:480px;margin:0 auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}
.tabbar button{border:0;background:none;display:flex;flex-direction:column;align-items:center;gap:3px;min-height:52px;justify-content:center;font-size:12px;font-weight:800;color:var(--ink-muted);cursor:pointer;position:relative}
.tabbar button[aria-current="page"]{color:var(--ink);font-weight:900}
.tabbar .ic{display:flex;padding:2px 14px;border-radius:var(--radius-pill)} .tabbar button[aria-current="page"] .ic{background:var(--trigo);color:var(--on-trigo)}
.tabbar .dot{position:absolute;top:4px;right:calc(50% - 26px);width:9px;height:9px;border-radius:50%;background:var(--erro)}
.alerta{display:flex;align-items:center;gap:12px;padding:12px 14px;border-radius:var(--radius-lg);background:var(--erro-soft);color:var(--ink);border:0;text-align:left;cursor:pointer;width:100%}
.alerta b{color:var(--erro)}
.resumo-escuro{background:var(--ink);color:var(--ink-inverse);border-radius:var(--radius-xl);padding:16px 18px;display:grid;gap:4px}
.resumo-escuro .over{color:inherit;opacity:.8} .resumo-escuro .valor{font-size:30px;font-weight:900;line-height:1.1}
.linhas{display:grid}.linhas>*{display:flex;justify-content:space-between;gap:12px;padding:12px 16px;border-bottom:1px solid var(--line)}.linhas>*:last-child{border-bottom:0}
.lista-btn{display:flex;justify-content:space-between;align-items:center;gap:12px;width:100%;padding:14px 16px;border:0;border-bottom:1px solid var(--line);background:none;text-align:left;cursor:pointer}
.lista-btn:last-child{border-bottom:0}
.copybox{font-size:14px;font-weight:700;background:var(--surface-sunken);border-radius:var(--radius-sm);padding:10px 12px;white-space:pre-wrap;word-break:break-word;user-select:all}
.timeline{display:grid;gap:8px;padding:0;margin:0;list-style:none}
.timeline li{display:flex;gap:10px;align-items:center;font-size:14px}
.timeline .dot{width:12px;height:12px;border-radius:50%;background:var(--line-strong);flex:none} .timeline li.done .dot{background:var(--ok)}

/* representante */
.panel{max-width:1120px;margin:0 auto;padding-block:20px 60px;display:grid;gap:18px}
.tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none}
.tabs button{border:0;background:var(--surface-sunken);padding:10px 16px;border-radius:var(--radius-pill);font-weight:800;font-size:14px;color:var(--ink);white-space:nowrap;display:flex;gap:6px;align-items:center;cursor:pointer}
.tabs button[aria-selected="true"]{background:var(--ink);color:var(--ink-inverse)}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px}
.kpi{padding:14px 16px} .kpi b{display:block;font-size:24px;font-weight:900;margin-top:2px}
.split{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:18px;align-items:start}
@media (max-width:860px){.split{grid-template-columns:minmax(0,1fr)}}
.tw{overflow-x:auto;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface-card)}
table{border-collapse:collapse;width:100%;font-size:14px}
th{text-align:left;font-size:11px;letter-spacing:.06em;text-transform:uppercase;color:var(--ink-muted);font-weight:800;padding:10px 12px;border-bottom:1px solid var(--line);white-space:nowrap;background:var(--surface-sunken)}
td{padding:10px 12px;border-bottom:1px solid var(--line);vertical-align:top}
tr:last-child td{border-bottom:0} td.n,th.n{text-align:right;white-space:nowrap}
tr.click{cursor:pointer} tr.click:hover td{background:var(--surface-sunken)} tr.sel td{background:var(--trigo-soft)}
.detail{padding:18px;display:grid;gap:14px;position:sticky;top:calc(env(safe-area-inset-top,0px) + 76px);max-height:calc(100vh - env(safe-area-inset-top,0px) - 92px);overflow-y:auto;overscroll-behavior:contain}
@media (max-width:860px){.detail{position:static;max-height:none;overflow:visible}}
.grid2{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
.checks{display:flex;flex-wrap:wrap;gap:6px 14px} .checks label{display:flex;gap:6px;align-items:center;font-size:14px;font-weight:700;color:var(--ink)}
.drop{border:2px dashed var(--line-strong);border-radius:var(--radius-lg);padding:22px;display:grid;gap:8px;justify-items:start;background:var(--surface-card)}
.drop.over-on{border-color:var(--trigo-strong);background:var(--trigo-soft)}
.old{color:var(--ink-muted);font-size:12px;display:block} .up{color:var(--erro)} .down{color:var(--ok)}
.tag{display:inline-block;border-radius:6px;padding:1px 7px;font-size:12px;font-weight:800}
.tag.novo{background:var(--info-soft);color:var(--info)} .tag.sumiu{background:var(--erro-soft);color:var(--erro)} .tag.alto{background:var(--aviso-soft);color:var(--aviso)} .tag.ok{background:var(--ok-soft);color:var(--ok)} .tag.off{background:var(--surface-sunken);color:var(--ink-muted)}
.filtros{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:10px}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(96px + env(safe-area-inset-bottom,0px));background:var(--ink);color:var(--ink-inverse);padding:12px 18px;border-radius:var(--radius-pill);font-weight:800;font-size:14px;z-index:20;max-width:calc(100% - 32px)}
@media (prefers-reduced-motion:no-preference){.toast{animation:pop .2s ease-out}@keyframes pop{from{opacity:0;translate:0 8px}}}
@media (max-width:420px){.bl-prod{gap:10px}.bl-badge{width:46px;height:50px;font-size:18px}.bl-step button{width:34px;height:36px}.bl-step input{width:32px}}

/* ---------- v3: tipografia de vitrine, saco, comanda, contador, teclado, animações ---------- */
h1,h2,.bl-hero__titulo,.bl-boleto__valor,.resumo-escuro .valor,.kpi b,.festa h2{font-family:var(--font-display);letter-spacing:-.025em;font-weight:800}
h1{font-size:32px}
.top{background:var(--surface-card)} .tabbar{background:var(--surface-card)}
.mark{background:var(--trigo);color:var(--on-trigo);box-shadow:inset 0 -3px 0 rgba(0,0,0,.12)}
.bl-card{border-color:var(--line);box-shadow:0 1px 0 var(--line),0 6px 16px -12px rgba(35,24,12,.25)}
@media (max-width:560px){.kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.kpi{padding:12px 14px}.kpi b{font-size:20px}.kpi.stack{grid-column:1/-1}}
.kpi-sel{width:100%;min-width:0;min-height:44px;border:1px solid var(--line-strong);border-radius:12px;padding:0 10px;background:var(--surface-card);color:var(--ink);font-weight:700;font-size:15px}
.kpi{min-width:0}

/* saco de farinha desenhado */
.saco{width:52px;height:62px;flex:none;display:block;filter:drop-shadow(0 3px 3px rgba(35,24,12,.14))}
.saco text{font-family:var(--font-display)}
.bl-prod{align-items:flex-start;padding:14px}
.prod-rod{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:10px;flex-wrap:wrap}
.bl-prod.tem{border-color:var(--trigo);box-shadow:0 0 0 2px var(--trigo-soft),0 6px 16px -12px rgba(35,24,12,.3)}
.bl-prod__nome{font-family:var(--font-display);font-weight:800;letter-spacing:-.01em}
.preco{font-family:var(--font-display);font-weight:800;font-size:17px;color:var(--ink)}
.preco small{font-family:var(--font-sans);font-size:12px;font-weight:700;color:var(--ink-muted)}

/* contador */
.add{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 16px 0 12px;border-radius:999px;border:2px solid var(--ink);background:var(--surface-card);color:var(--ink);font-weight:900;font-size:14px;cursor:pointer;flex:none;touch-action:manipulation}
.add b{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:var(--trigo);font-size:17px;line-height:1}
.add:hover{background:var(--trigo-soft)}
.qtd{display:inline-flex;align-items:center;gap:2px;background:var(--trigo);border-radius:999px;padding:4px;flex:none;box-shadow:inset 0 -3px 0 rgba(0,0,0,.1)}
.qtd__b{width:40px;height:40px;border-radius:50%;border:0;background:transparent;color:var(--on-trigo);font-size:24px;font-weight:900;cursor:pointer;touch-action:manipulation;user-select:none;-webkit-user-select:none;-webkit-touch-callout:none}
.qtd__b:active{background:rgba(255,255,255,.55)}
.qtd__n{min-width:50px;height:40px;border-radius:14px;border:0;background:var(--surface-card);font-family:var(--font-display);font-size:20px;font-weight:800;color:var(--ink);cursor:pointer;padding:0 8px;box-shadow:0 1px 0 rgba(0,0,0,.08)}
.pop{animation:qpop .3s cubic-bezier(.3,1.7,.5,1)}
@keyframes qpop{0%{transform:scale(.55) translateY(5px)}100%{transform:none}}

/* hero com sacos */
.bl-hero{position:relative;overflow:hidden;padding-right:118px;box-shadow:inset 0 -4px 0 rgba(0,0,0,.08)}
.hero-sacos{position:absolute;right:10px;bottom:-6px;display:flex}
.hero-sacos .saco{width:48px;height:58px;margin-left:-16px}
.hero-sacos .saco:nth-child(1){transform:rotate(-8deg)} .hero-sacos .saco:nth-child(2){transform:translateY(-6px) rotate(4deg)} .hero-sacos .saco:nth-child(3){transform:rotate(10deg)}

/* comanda */
.comanda{position:relative;background:var(--surface-card);border:1px solid var(--line);border-bottom:0;border-radius:18px 18px 0 0;padding:16px 18px 20px;margin-bottom:12px}
.comanda::after{content:"";position:absolute;left:-1px;right:-1px;bottom:-10px;height:10px;background:linear-gradient(135deg,var(--surface-card) 50%,transparent 50%) 0 0/14px 10px repeat-x,linear-gradient(225deg,var(--surface-card) 50%,transparent 50%) 0 0/14px 10px repeat-x}
.comanda__l{display:flex;justify-content:space-between;gap:12px;font-size:14px;padding:3px 0}
.comanda__sep{border-top:2px dashed var(--line-strong);margin:10px 0}
.comanda__tot{display:flex;justify-content:space-between;align-items:baseline;font-family:var(--font-display);font-size:30px;font-weight:800;letter-spacing:-.02em}

/* teclado de quantidade */
.sheet-bg{position:fixed;inset:0;background:rgba(35,24,12,.42);z-index:40;animation:fadeIn .2s}
.sheet{position:fixed;left:0;right:0;bottom:0;z-index:41;max-width:520px;margin:0 auto;background:var(--surface-card);border-radius:28px 28px 0 0;padding:10px max(18px,env(safe-area-inset-left,0px)) calc(18px + env(safe-area-inset-bottom,0px)) max(18px,env(safe-area-inset-right,0px));box-shadow:0 -12px 40px rgba(35,24,12,.25);animation:sobe .34s cubic-bezier(.2,.9,.3,1.08)}
.sheet.sai{animation:desce .2s ease-in forwards} .sheet-bg.sai{animation:fadeOut .2s forwards}
.sheet__alca{width:44px;height:5px;border-radius:9px;background:var(--line-strong);margin:0 auto 12px}
.sheet__topo{display:flex;gap:12px;align-items:center}
.sheet__visor{display:flex;align-items:baseline;justify-content:center;gap:8px;padding:12px 0 2px}
.sheet__num{font-family:var(--font-display);font-size:68px;font-weight:800;line-height:1;letter-spacing:-.03em}
.sheet__un{font-size:18px;font-weight:800;color:var(--ink-muted)}
.sheet__sub{text-align:center;font-weight:800;color:var(--ink-muted);font-size:14px;min-height:20px}
.presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0 10px}
.presets button{min-height:48px;border-radius:14px;border:2px solid var(--line);background:var(--surface-page);font-family:var(--font-display);font-weight:800;font-size:20px;color:var(--ink);cursor:pointer}
.presets button[aria-pressed="true"]{border-color:var(--ink);background:var(--trigo)}
.ultima{display:flex;justify-content:center;margin-top:8px}
.ultima button{border:0;background:var(--trigo-soft);border-radius:999px;padding:8px 14px;font-weight:800;font-size:14px;color:var(--ink);cursor:pointer}
.teclado{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:12px}
.teclado button{min-height:50px;border-radius:14px;border:0;background:var(--surface-sunken);font-size:22px;font-weight:900;color:var(--ink);cursor:pointer;touch-action:manipulation}
.teclado button:active,.presets button:active,.add:active{transform:scale(.95)}

/* moscas animadas */
.voa{position:fixed;z-index:60;pointer-events:none;width:52px;height:62px}
.tr-dir{animation:entraDir .3s cubic-bezier(.2,.8,.3,1)} .tr-esq{animation:entraEsq .3s cubic-bezier(.2,.8,.3,1)} .tr-fade{animation:fadeIn .25s}
@keyframes entraDir{from{opacity:0;transform:translateX(32px)}} @keyframes entraEsq{from{opacity:0;transform:translateX(-32px)}}
@keyframes fadeIn{from{opacity:0}} @keyframes fadeOut{to{opacity:0}}
@keyframes sobe{from{transform:translateY(100%)}} @keyframes desce{to{transform:translateY(100%)}}

/* confirmação do pedido */
.festa{position:fixed;inset:0;z-index:70;background:var(--surface-page);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;text-align:center;padding:24px;animation:fadeIn .2s;cursor:pointer}
.festa.sai{animation:fadeOut .3s forwards}
.festa__cena{position:relative;width:180px;height:180px;margin-bottom:14px}
.festa__disco{position:absolute;inset:28px;border-radius:50%;background:var(--trigo);box-shadow:inset 0 -6px 0 rgba(0,0,0,.1);animation:disco .55s cubic-bezier(.3,1.6,.5,1) both}
.festa__check{position:absolute;left:28px;top:28px;width:124px;height:124px}
.festa__check path{fill:none;stroke:var(--ink);stroke-width:11;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:90;stroke-dashoffset:90;animation:traco .42s .4s ease-out forwards}
.festa__p{position:absolute;left:50%;top:50%;width:12px;height:12px;margin:-6px;border-radius:50%;background:var(--kraft-dark);opacity:0;animation:poeira .9s .3s cubic-bezier(.2,.7,.3,1) forwards}
.festa__p:nth-child(3n){background:var(--trigo)} .festa__p:nth-child(4n){width:7px;height:7px;margin:-3.5px;background:var(--line-strong)} .festa__p:nth-child(5n){border-radius:3px;background:var(--linha-super)}
@keyframes poeira{0%{opacity:1;transform:rotate(var(--a)) translateY(-30px) scale(1)}100%{opacity:0;transform:rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(.4)}}
@keyframes disco{from{transform:scale(0)}} @keyframes traco{to{stroke-dashoffset:0}}
.festa h2{font-size:34px;animation:sobeT .4s .5s both} .festa p{font-weight:800;animation:sobeT .4s .6s both} .festa .festa__sub{color:var(--ink-muted);font-size:14px;animation-delay:.7s}
@keyframes sobeT{from{opacity:0;transform:translateY(12px)}}
/* v4: ±1, copiado, mensagem, abas, pagamentos */
.sheet__visor{justify-content:space-between;align-items:center}
.pm{width:56px;height:56px;border-radius:50%;border:0;background:var(--trigo);color:var(--on-trigo);font-size:28px;font-weight:900;cursor:pointer;box-shadow:inset 0 -3px 0 rgba(0,0,0,.1);touch-action:manipulation}
.pm:active{transform:scale(.92)}
.toast{display:flex;align-items:center;gap:10px;padding:10px 18px 10px 12px;box-shadow:0 10px 30px -8px rgba(35,24,12,.45)}
.toast.in{animation:toastIn .42s cubic-bezier(.2,.9,.3,1.3)} .toast.out{animation:toastOut .22s ease-in forwards}
.toast.erro .toast__ic path{stroke-dasharray:10;stroke-dashoffset:10;animation:traco .25s .2s ease-out forwards}
.toast.erro.in{animation:toastIn .42s cubic-bezier(.2,.9,.3,1.3),treme .35s .35s ease-in-out}
@keyframes treme{25%{translate:-5px 0}50%{translate:5px 0}75%{translate:-3px 0}}
.toast.in .toast__ic{animation:icIn .45s .08s cubic-bezier(.3,1.6,.5,1) both}
@keyframes toastIn{from{opacity:0;translate:0 20px;scale:.9}} @keyframes toastOut{to{opacity:0;translate:0 12px;scale:.96}}
@keyframes icIn{from{transform:scale(0) rotate(-40deg)}}
.copiado{background:var(--ok)!important;color:#fff!important;animation:qpop .3s cubic-bezier(.3,1.6,.5,1)}
.copiado .tic{stroke-dasharray:24;stroke-dashoffset:24;animation:traco .3s .05s ease-out forwards}
.tr-tabdir{animation:tabDir .26s cubic-bezier(.2,.8,.3,1)} .tr-tabesq{animation:tabEsq .26s cubic-bezier(.2,.8,.3,1)}
@keyframes tabDir{from{opacity:0;transform:translateX(14px)}} @keyframes tabEsq{from{opacity:0;transform:translateX(-14px)}}
.tabbar button[aria-current="page"] .ic{animation:pilula .32s cubic-bezier(.3,1.5,.5,1)}
@keyframes pilula{from{transform:scaleX(.4);opacity:.3}}
.grupo{display:grid;gap:8px}
.grupo__cab{display:flex;justify-content:space-between;gap:12px;border:0;background:none;padding:4px 4px 0;text-align:left;cursor:pointer;color:var(--ink)}
.bl-boleto[data-status="aguardando"]{border-style:dashed;border-color:var(--line-strong);box-shadow:none;background:var(--surface-page)}
.anexo-st{font-size:13px;font-weight:700;color:var(--ink-muted)} .anexo-st.ok{color:var(--ok)}
.parc{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap;padding:10px 0;border-bottom:1px solid var(--line)} .parc:last-child{border-bottom:0}
.pdf-canvas{width:100%;height:auto;border:1px solid var(--line);border-radius:12px;background:#fff}
@media (prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-delay:0s!important}}

/* auditoria: carregando, toque e pedidos no celular */
html.ocupado, html.ocupado *{cursor:progress!important}
html.ocupado body::after{content:"";position:fixed;left:0;right:0;top:env(safe-area-inset-top,0px);height:3px;z-index:80;background:linear-gradient(90deg,transparent,var(--trigo-strong),transparent);background-size:40% 100%;background-repeat:no-repeat;animation:carregando 1s linear infinite}
@keyframes carregando{from{background-position:-40% 0}to{background-position:140% 0}}
.link{min-height:var(--touch-min);display:inline-flex;align-items:center}
@media (max-width:560px){
  .t-ped thead{display:none}
  .t-ped tr{display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"num cli st" "num quando total";gap:2px 12px;padding:12px 14px;border-bottom:1px solid var(--line)}
  .t-ped tr:last-child{border-bottom:0}
  .t-ped td{padding:0;border:0}
  .t-ped td:nth-child(1){grid-area:num;font-size:18px} .t-ped td:nth-child(2){grid-area:cli} .t-ped td:nth-child(3){grid-area:quando}
  .t-ped td:nth-child(4){grid-area:total;text-align:right;font-weight:800} .t-ped td:nth-child(5){grid-area:st;text-align:right}
}

/* observacao do pedido (carrinho e detalhe do pedido) */
.obs{display:grid;gap:8px}
.obs .bl-field textarea{min-height:92px;font-size:16px;line-height:1.4;resize:vertical}
.obs__topo{display:flex;justify-content:space-between;align-items:baseline;gap:10px}
.obs__op{font-weight:700;opacity:.8}
.obs__cont{font-size:12px;font-weight:700;font-variant-numeric:tabular-nums}
.obs__chips{display:flex;flex-wrap:wrap;gap:8px}
.obs__chips .bl-chip{min-height:40px;font-size:13px;padding:8px 14px}
.obs__chips .bl-chip[aria-pressed="true"]::before{content:"✓ ";color:var(--trigo)}
.comanda__obs{font-size:14px;padding:8px 10px;margin-top:8px;border-radius:10px;background:var(--trigo-soft);overflow-wrap:anywhere}
.obs-ped{background:var(--trigo-soft);border-radius:var(--radius-md);padding:12px 14px;display:grid;gap:4px}
.obs-ped p{font-weight:700;overflow-wrap:anywhere}

/* historico (painel) */
.hist-filtros{display:grid;gap:10px}
.t-hist td{vertical-align:top}
.t-hist td:nth-child(3){min-width:220px}
.hist-item span:first-child{min-width:0}
.hist-item{display:flex;justify-content:space-between;gap:12px;font-size:14px;font-weight:700;padding:1px 0}
.hist-item span:last-child{white-space:nowrap;font-weight:800}
.hist-item small,.linhas small{font-size:12px;font-weight:700;color:var(--ink-muted)}
.hist-cli{display:grid;gap:10px;border-top:1px solid var(--line);padding-top:14px}
.hist-cli__nums{display:grid;grid-template-columns:repeat(4,1fr);gap:8px}
.hist-cli__nums div{background:var(--surface-sunken);border-radius:var(--radius-sm);padding:10px 12px;display:grid;gap:2px}
.hist-cli__nums b{font-family:var(--font-display);font-size:18px;font-weight:800;line-height:1.1}
.hist-cli__nums span{font-size:12px;font-weight:700;color:var(--ink-muted)}
.hist-cli__ped{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;width:100%;text-align:left;background:var(--surface-card);border:1px solid var(--line);border-radius:var(--radius-sm);padding:10px 12px;cursor:pointer;min-height:44px}
.hist-cli__ped:hover{border-color:var(--line-strong)}
.hist-cli__ped b:last-child{white-space:nowrap}
@media (max-width:560px){.hist-cli__nums{grid-template-columns:repeat(2,1fr)}}
.hist-grid{display:grid;gap:18px;align-items:start}
@media (min-width:1280px){.hist-grid{grid-template-columns:minmax(0,1fr) 380px}}
