/* Demonstração do sistema de balcão. Celular primeiro; PC a partir de 900 px. */
:root {
  --ground: #eceae6; --panel: #ffffff; --panel-2: #f6f5f2; --tile: #f1f0ec; --tile-press: #e7e5e0;
  --border: #e6e4df; --rule: #ebe9e5; --control: #d6d4cf;
  --text: #0a0a0a; --muted: #646464;
  --brand: #0a5cff; --brand-press: #0848cc; --on-brand: #ffffff; --brand-soft: #e6eeff; --brand-text: #0a47c7; --ring: #0a5cff;
  --positive: #247b50; --negative: #b42318; --scrim: rgba(20, 20, 20, .40);
  --neg-soft: #fbe9e7; --warn: #9a5b00; --warn-soft: #fdf1dc;
  --tone-deep: #0a5cff; --tone-bright: #6fb6ff;
  --d-tap: 100ms; --d-fast: 150ms; --d-mid: 200ms; --d-sheet: 250ms;
  --e-in: cubic-bezier(.2, 0, 0, 1); --e-out: cubic-bezier(.4, 0, 1, 1);
  --sbw: 248px; --cart: clamp(330px, 29vw, 420px);
  color-scheme: light;
}
body.dark {
  --ground: #0b0b0b; --panel: #161616; --panel-2: #1c1c1c; --tile: #232323; --tile-press: #2d2d2d;
  --border: #262626; --rule: #252525; --control: #3a3a3a;
  --text: #f4f4f4; --muted: #a6a6a6;
  --brand: #0a5cff; --brand-press: #0b52e6; --brand-soft: #0f1f45; --brand-text: #7cb2ff; --ring: #4d94ff;
  --positive: #4ccf8a; --negative: #f97066; --scrim: rgba(0, 0, 0, .6);
  --neg-soft: #3a1a17; --warn: #f5b754; --warn-soft: #3a2a10;
  color-scheme: dark;
}
/* Cor da loja (Aparência). Cada cor tem a versão do tema claro e a do escuro; texto do botão sobre a cor com contraste de 4,5:1 ou mais.
   tone-deep e tone-bright: a cor sobre fundo claro e sobre fundo escuro (aviso, barra do navegador). */
/* O azul do logo da JSTAHL (#0a5cff) é o padrão, nos tokens acima. */
body[data-cor="petroleo"] { --brand: #0f766e; --brand-press: #0c5f59; --brand-soft: #e2f1ee; --brand-text: #115e59; --ring: #0f766e; --tone-deep: #0f766e; --tone-bright: #6ee7d6; }
body.dark[data-cor="petroleo"] { --brand: #0f766e; --brand-press: #0d6a63; --brand-soft: #11312d; --brand-text: #6ee7d6; --ring: #2dd4bf; }
body[data-cor="roxo"] { --brand: #6d28d9; --brand-press: #5b21b6; --brand-soft: #eee7fc; --brand-text: #5b21b6; --ring: #6d28d9; --tone-deep: #6d28d9; --tone-bright: #c4b5fd; }
body.dark[data-cor="roxo"] { --brand: #6d28d9; --brand-press: #5f23c0; --brand-soft: #2a1d47; --brand-text: #c4b5fd; --ring: #a78bfa; }
body[data-cor="rosa"] { --brand: #be185d; --brand-press: #9d174d; --brand-soft: #fbe6ef; --brand-text: #9d174d; --ring: #be185d; --tone-deep: #be185d; --tone-bright: #f9a8d4; }
body.dark[data-cor="rosa"] { --brand: #be185d; --brand-press: #a3164f; --brand-soft: #3d1427; --brand-text: #f9a8d4; --ring: #f472b6; }
body[data-cor="laranja"] { --brand: #c2410c; --brand-press: #9a3412; --brand-soft: #fdebdd; --brand-text: #9a3412; --ring: #c2410c; --tone-deep: #c2410c; --tone-bright: #fdba74; }
body.dark[data-cor="laranja"] { --brand: #c2410c; --brand-press: #a8380b; --brand-soft: #3b1f10; --brand-text: #fdba74; --ring: #fb923c; }
body[data-cor="grafite"] { --brand: #27272a; --brand-press: #18181b; --brand-soft: #ececee; --brand-text: #27272a; --ring: #27272a; --tone-deep: #27272a; --tone-bright: #e4e4e7; }
body.dark[data-cor="grafite"] { --brand: #e4e4e7; --brand-press: #d4d4d8; --on-brand: #18181b; --brand-soft: #2c2c30; --brand-text: #f4f4f5; --ring: #a1a1aa; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 14px; line-height: 20px;
  color: var(--text); background: var(--panel); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--d-mid) var(--e-in), color var(--d-mid) var(--e-in);
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }
svg { flex: none; }

/* ---------- estrutura ---------- */
.app { min-height: 100dvh; }
.view { min-height: 100dvh; display: flex; flex-direction: column; }
.screen { flex: 1; display: flex; flex-direction: column; min-height: 0; }
/* A animação vai nos filhos: transform na tela prenderia o botão fixo de baixo. */
.screen > :not(.ibot) { animation: tela var(--d-mid) var(--e-in); }
@keyframes tela { from { opacity: 0; transform: translateY(8px); } }

/* ---------- menu lateral (gaveta no celular) ---------- */
.sb {
  position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 300px; background: var(--panel);
  border-radius: 0 16px 16px 0; padding: 16px 14px 18px; display: flex; flex-direction: column;
  transform: translateX(-105%); transition: transform var(--d-sheet) var(--e-in); overflow: hidden;
}
.sb.open { transform: none; }
.sb-top { display: flex; align-items: center; gap: 10px; padding: 2px 2px 14px; min-height: 52px; }
.mark { flex: none; width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; }
.sb-name { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 18px; }
.sb-name b { font-size: 15px; font-weight: 600; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sb-name small { font-size: 12px; color: var(--muted); }
.tw { display: inline-flex; align-items: baseline; font-size: 14px; font-weight: 700; letter-spacing: -.035em; color: var(--text); line-height: 18px; }
.tw svg { width: .56em; height: .56em; margin: 0 .02em; transform: translateY(.03em); flex: none; }
.ib { flex: none; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--muted); transition: background-color var(--d-fast); }
.ib:hover { background: var(--tile); }
.ib.on { background: var(--brand-soft); color: var(--brand-text); }
.sb-tog { display: none; }
.sb-search { text-align: left; display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--tile); color: var(--muted); margin-bottom: 14px; white-space: nowrap; }
.sb-search span { flex: 1; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 12px; border-radius: 12px; color: var(--muted);
  text-decoration: none; white-space: nowrap; transition: background-color var(--d-fast), color var(--d-fast);
}
.nav a:hover { background: var(--tile); }
.nav a.on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.nav a em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--muted); font-weight: 400; }
.sb-bottom { margin-top: auto; display: flex; flex-direction: column; gap: 4px; }
.sb-bottom hr { width: 100%; border: 0; border-top: 1px solid var(--border); margin: 0 0 6px; }
.dm { display: flex; align-items: center; gap: 11px; height: 44px; padding: 0 12px; border-radius: 12px; color: var(--muted); white-space: nowrap; width: 100%; text-align: left; }
.dm span { flex: 1; }
.sw { position: relative; width: 36px; height: 22px; border-radius: 11px; background: var(--control); transition: background-color var(--d-mid); flex: none; }
.sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform var(--d-mid) var(--e-in); }
.sw.on { background: var(--brand); }
.sw.on::after { transform: translateX(14px); background: var(--on-brand); }
.user { display: flex; align-items: center; gap: 10px; padding: 6px 8px; white-space: nowrap; }
.user div { display: flex; flex-direction: column; line-height: 18px; }
.user b { font-weight: 600; } .user small { font-size: 12px; color: var(--muted); }
.av { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); display: grid; place-items: center; font-weight: 600; }
.out { display: flex; align-items: center; justify-content: center; gap: 8px; height: 40px; border: 1px solid var(--border); border-radius: 999px; font-weight: 500; margin-top: 4px; white-space: nowrap; }
.reset { font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; padding: 8px 0 0; text-align: center; white-space: nowrap; }

.dm em { font-style: normal; font-size: 12px; color: var(--muted); }
.cor-dot { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--brand); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }

/* ---------- aparência ---------- */
.lbl-a { font-size: 13px; color: var(--muted); margin: 14px 0 8px; }
.seg3.tema { margin: 0; }
.hint-a { font-size: 12px; line-height: 17px; color: var(--muted); margin: 6px 0 0; }
.cores { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.cor { display: flex; flex-direction: column; align-items: center; gap: 7px; padding: 10px 4px; border-radius: 14px; font-size: 13px; color: var(--muted); transition: background-color var(--d-fast), color var(--d-fast); }
.cor:hover { background: var(--tile); }
.cor.on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }
.bola { width: 40px; height: 40px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); transition: box-shadow var(--d-fast); }
.bola svg { opacity: 0; transition: opacity var(--d-fast); }
.cor.on .bola { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--ring); }
.cor.on .bola svg { opacity: 1; }

/* ---------- adicionar à tela inicial ---------- */
.inst-prev { flex: none; display: flex; flex-direction: column; align-items: center; gap: 6px; margin: 2px 0 12px; font-size: 12px; font-weight: 600; }
.inst-prev img { border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.inst-abas { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; margin-bottom: 4px; }
.inst-abas button { height: 34px; padding: 0 4px; font-size: 13px; }
.inst-body { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -20px 14px; padding: 0 20px; }
.inst-passos { list-style: none; margin: 0; padding: 0; }
.inst-passos li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
.inst-n { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-text); display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.inst-passos li div { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 19px; }
.inst-passos b { font-weight: 600; }
.inst-passos small { font-size: 12px; line-height: 17px; color: var(--muted); }
.inst-chip { flex: none; min-width: 42px; height: 42px; padding: 0 10px; border-radius: 12px; background: var(--tile); color: var(--text); display: grid; place-items: center; }
.inst-txt { font-size: 14px; font-weight: 600; color: var(--brand-text); }
.inst-nota { font-size: 12px; line-height: 17px; color: var(--muted); margin: 10px 0 0; }
.inst-ja { display: flex; align-items: center; justify-content: center; gap: 8px; margin: 6px 0 4px; }
.inst-ou { text-align: center; font-size: 12px; color: var(--muted); margin: 6px 0 0; }

/* ---------- topo do celular ---------- */
.ptop { flex: none; height: 64px; display: flex; align-items: center; gap: 6px; padding: 0 10px 0 6px; }
.ptop .ib { color: var(--text); width: 44px; height: 44px; }
.tt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 18px; }
.tt b { font-size: 18px; line-height: 22px; font-weight: 600; }
.tt small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--positive); margin-right: 6px; vertical-align: 1px; }

/* ---------- busca ---------- */
.sbar {
  flex: none; display: flex; align-items: center; gap: 10px; height: 46px; margin: 0 16px 12px; padding: 0 8px 0 14px;
  border-radius: 14px; background: var(--tile); color: var(--muted); transition: box-shadow var(--d-fast), background-color var(--d-fast);
}
.sbar:focus-within { background: var(--panel); box-shadow: inset 0 0 0 2px var(--ring); color: var(--brand-text); }
.sbar input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 16px; height: 100%; color: var(--text); }
.sbar input::placeholder { color: var(--muted); }
.sbar .x { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--tile); color: var(--muted); }
.sbar kbd { display: none; font-family: inherit; font-size: 12px; color: var(--muted); background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 2px 8px; white-space: nowrap; }
.sres { flex: none; padding: 0 16px; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.sres b { color: var(--text); }

/* ---------- abas ---------- */
.tabs { flex: none; display: flex; gap: 6px; padding: 0 16px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; color: var(--muted); background: var(--tile); white-space: nowrap; transition: background-color var(--d-fast), color var(--d-fast); }
.tabs button.on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }

/* ---------- grade de produtos ---------- */
.gwrap { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px 16px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-content: start; }
.grid.fade { animation: fade var(--d-fast) var(--e-in); }
@keyframes fade { from { opacity: 0; } }
.tile {
  position: relative; height: 76px; padding: 11px 12px; border-radius: 16px; background: var(--tile); text-align: left;
  display: flex; flex-direction: column; justify-content: space-between; transition: transform var(--d-tap) var(--e-in), background-color var(--d-fast), box-shadow var(--d-fast);
}
.tile:active { transform: scale(.97); }
.tile .n { font-size: 15px; font-weight: 600; line-height: 19px; }
.tile.in .n, .tile.first .n { padding-right: 28px; }
.tile .p { font-size: 13px; color: var(--muted); }
.tile.in { background: var(--panel); box-shadow: inset 0 0 0 2px var(--ring); }
.tile.first { background: var(--panel); box-shadow: inset 0 0 0 2px var(--ring); }
.tile .enter { position: absolute; right: 10px; bottom: 10px; font-size: 11px; font-weight: 600; color: var(--brand-text); background: var(--brand-soft); border-radius: 6px; padding: 1px 7px; display: none; }
.q {
  position: absolute; top: 9px; right: 9px; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 12px;
  background: var(--brand); color: var(--on-brand); font-size: 13px; font-weight: 600; display: grid; place-items: center;
}
.q.pop { animation: pop var(--d-fast) var(--e-in); }
@keyframes pop { from { transform: scale(.6); opacity: .3; } }
.tile.avulso { background: transparent; border: 1.5px dashed var(--control); flex-direction: row; justify-content: center; align-items: center; gap: 8px; color: var(--muted); }
.tile.avulso .n { font-size: 14px; color: var(--text); padding: 0; }
.vertodos { grid-column: 1 / -1; height: 44px; color: var(--brand-text); font-weight: 600; }
.vazio { grid-column: 1 / -1; padding: 28px 8px; text-align: center; color: var(--muted); }

.screen.vender { flex: none; height: 100dvh; }
.v-prod { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.v-title, .v-cart { display: none; }
.cart-box { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.sheet .cart-f { margin-bottom: calc(-20px - env(safe-area-inset-bottom)); }
.pbar-l:disabled { cursor: default; }
.i-col { display: flex; flex-direction: column; gap: 12px; min-width: 0; }

/* ---------- barra de baixo (celular) ---------- */
.pbar { flex: none; background: var(--panel-2); border-top: 1px solid var(--border); padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); }
.pbar-l { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 10px; color: var(--muted); }
.pbar-l > span { display: flex; align-items: center; gap: 6px; font-weight: 500; }
.pbar-l b { color: var(--text); font-size: 24px; line-height: 30px; font-weight: 700; }
.pbar.vazio .pbar-l > span { font-weight: 400; }
.pbar.vazio .pbar-l b { color: var(--muted); }
body.kb .pbar, body.kb .ibot { display: none; }
.ppay { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ppay button { height: 50px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-weight: 600; transition: transform var(--d-tap) var(--e-in), background-color var(--d-fast); }
.ppay button:active { transform: scale(.97); }
.ppay button:disabled { background: var(--tile); color: var(--muted); transform: none; }

/* ---------- carrinho (folha no celular, painel no PC) ---------- */
.cart { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.cart-h { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 4px; }
.cart-h h2 { margin: 0; font-size: 18px; font-weight: 600; }
.cart-h h2 small { font-size: 13px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.txt { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; font-size: 14px; }
.lines { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -6px; padding: 0 6px; }
.line { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--rule); border-radius: 8px; }
.line.new { animation: novo 900ms var(--e-in); }
@keyframes novo { 0% { background: var(--brand-soft); } 100% { background: transparent; } }
.step { display: flex; align-items: center; gap: 2px; background: var(--tile); border-radius: 999px; padding: 3px; }
.step button { width: 30px; height: 30px; background: var(--panel); border-radius: 50%; font-size: 17px; line-height: 1; display: grid; place-items: center; transition: transform var(--d-tap); }
.step button:active { transform: scale(.9); }
.step button:disabled { opacity: .35; }
.step span { min-width: 22px; text-align: center; font-weight: 600; }
.ln { display: flex; flex-direction: column; min-width: 0; }
.ln small { color: var(--muted); font-size: 12px; line-height: 16px; }
.cart-empty { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 24px; }
.cart-f { flex: none; border-top: 1px solid var(--border); background: var(--panel-2); margin: 0 -20px -20px; padding: 6px 20px calc(20px + env(safe-area-inset-bottom)); }
.total { display: flex; align-items: center; gap: 10px; padding: 12px 0 12px; }
.total > span { color: var(--muted); }
.total b { margin-left: auto; font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -.01em; }
.total b.tick { animation: tick var(--d-fast) var(--e-in); }
@keyframes tick { from { transform: translateY(4px); opacity: .35; } }
.chip { height: 30px; padding: 0 12px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--control); font-size: 13px; font-weight: 500; display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.chip:disabled { opacity: .4; }
.chip kbd { display: none; font-family: inherit; font-size: 11px; color: var(--muted); }
.pay { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pay button {
  position: relative; height: 56px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 16px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 9px; transition: transform var(--d-tap) var(--e-in), background-color var(--d-fast);
}
.pay button:hover { background: var(--brand-press); }
.pay button:active { transform: scale(.97); }
.pay button:disabled { background: var(--tile); color: var(--muted); }
.pay kbd { display: none; position: absolute; right: 18px; top: 7px; font-family: inherit; font-size: 11px; font-weight: 500; opacity: .7; }

/* ---------- folhas e janelas ---------- */
.scrim { position: fixed; inset: 0; z-index: 30; background: var(--scrim); animation: fade var(--d-mid) var(--e-in); }
.scrim.top { z-index: 55; }
.scrim.out { opacity: 0; transition: opacity var(--d-mid) var(--e-out); }
.sheet {
  position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; max-height: 92dvh; background: var(--panel); border-radius: 24px 24px 0 0;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column;
  transform: translateY(100%); transition: transform var(--d-sheet) var(--e-in);
}
.sheet.top { z-index: 60; }
.sheet.in { transform: none; }
.sheet.out { transform: translateY(100%); transition: transform var(--d-mid) var(--e-out); }
.sheet.tall { top: 64px; max-height: none; }
.handle { display: block; flex: none; width: 40px; height: 4px; border-radius: 2px; background: var(--control); margin: 0 auto 10px; }
.sh-h { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.sh-h div { display: flex; flex-direction: column; line-height: 20px; min-width: 0; }
.sh-h b { font-size: 18px; font-weight: 600; }
.sh-h small { font-size: 13px; color: var(--muted); }
.sh-h .ib { margin-right: -10px; color: var(--text); }
.disp { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 8px; }
.disp span { font-size: 48px; line-height: 58px; font-weight: 700; letter-spacing: -.02em; }
.disp small { font-size: 20px; color: var(--muted); }
.disp-sub { text-align: center; font-size: 16px; color: var(--muted); min-height: 26px; margin: 2px 0 14px; }
.disp-sub b { color: var(--brand-text); font-size: 20px; font-weight: 700; margin-left: 4px; }
.disp-sub b.falta { color: var(--negative); }
.lbl-c { text-align: center; font-size: 13px; color: var(--muted); margin-top: 10px; }
.notas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.notas button { height: 44px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--control); font-weight: 500; transition: background-color var(--d-fast), box-shadow var(--d-fast); }
.notas button.on { background: var(--brand-soft); color: var(--brand-text); box-shadow: inset 0 0 0 2px var(--ring); font-weight: 600; }
.keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.keys button { height: 56px; border-radius: 16px; background: var(--tile); font-size: 24px; font-weight: 500; display: grid; place-items: center; transition: background-color var(--d-tap), transform var(--d-tap); }
.keys button:active { background: var(--tile-press); transform: scale(.97); }
.cta { flex: none; height: 56px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 17px; font-weight: 600; width: 100%; transition: transform var(--d-tap), background-color var(--d-fast); }
.cta:active { transform: scale(.98); }
.cta:disabled { background: var(--tile); color: var(--muted); }
.cta2 { width: 100%; height: 50px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--control); font-weight: 600; margin-top: 8px; }

/* ---------- venda concluída ---------- */
.done {
  position: fixed; z-index: 70; left: 50%; top: 50%; width: min(340px, calc(100vw - 48px)); transform: translate(-50%, -50%);
  background: var(--panel); border-radius: 24px; padding: 26px 22px 20px; display: flex; flex-direction: column; align-items: center; text-align: center;
  box-shadow: 0 16px 40px rgba(0,0,0,.18); animation: dlg var(--d-mid) var(--e-in);
}
body.dark .done { box-shadow: 0 0 0 1px #2c2c2c, 0 16px 40px rgba(0,0,0,.5); }
.done.out { opacity: 0; transform: translate(-50%, -50%) scale(.98); transition: opacity var(--d-mid) var(--e-out), transform var(--d-mid) var(--e-out); }
@keyframes dlg { from { opacity: 0; transform: translate(-50%, -50%) scale(.96); } }
.ck circle { transform-origin: 32px 32px; animation: ckc 260ms var(--e-in) both; }
.ck path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: ckp 260ms var(--e-in) 180ms forwards; }
@keyframes ckc { 0% { transform: scale(.6); opacity: .3; } 60% { transform: scale(1.04); opacity: 1; } 100% { transform: scale(1); } }
@keyframes ckp { to { stroke-dashoffset: 0; } }
.done .t { font-size: 22px; line-height: 28px; font-weight: 700; margin-top: 12px; animation: fade var(--d-fast) var(--e-in) 300ms both; }
.done .s { font-size: 15px; color: var(--muted); margin-top: 4px; animation: fade var(--d-fast) var(--e-in) 300ms both; }
.done .und { margin-top: 14px; font-size: 14px; font-weight: 600; color: var(--brand-text); padding: 6px 10px; }
.done .bar { display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--tile); margin-top: 16px; overflow: hidden; }
.done .bar i { display: block; height: 100%; background: var(--brand); transform-origin: left; animation: barra 1500ms linear forwards; }
@keyframes barra { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.tab-t { width: 100%; margin-top: 16px; text-align: left; animation: fade var(--d-fast) var(--e-in) 300ms both; }
.tr { display: flex; justify-content: space-between; align-items: baseline; padding: 10px 4px; font-size: 15px; border-bottom: 1px solid var(--rule); }
.tr span:first-child { color: var(--muted); }
.tr.troco { border: 0; margin-top: 8px; padding: 12px 14px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-text); }
.tr.troco span { color: var(--brand-text) !important; font-weight: 600; }
.tr.troco b { font-size: 26px; line-height: 30px; font-weight: 700; }
.done .cta { margin-top: 18px; }

/* ---------- dividir ---------- */
.seg3 { flex: none; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--tile); border-radius: 12px; padding: 3px; margin: 8px 0 14px; }
.seg3 button { height: 36px; border-radius: 10px; font-size: 14px; color: var(--muted); transition: background-color var(--d-fast); }
.seg3 button.on { background: var(--panel); color: var(--text); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg3 button:disabled:not(.on) { opacity: .45; }
.row-n { display: flex; justify-content: space-between; align-items: center; font-size: 15px; }
.row-n .step span { min-width: 92px; font-size: 14px; }
.hint { font-size: 13px; color: var(--muted); margin: 8px 0 14px; }
.part { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; margin-bottom: 8px; box-shadow: inset 0 0 0 1px var(--border); }
.part div { flex: 1; display: flex; flex-direction: column; line-height: 18px; min-width: 0; }
.part small { font-size: 12px; color: var(--muted); }
.part .v { font-weight: 600; }
.part.atual { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--ring); }
.part .desf { font-size: 12px; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.ok { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--brand); color: var(--on-brand); display: grid; place-items: center; }
.num-c { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--panel); color: var(--brand-text); display: grid; place-items: center; font-weight: 700; box-shadow: inset 0 0 0 2px var(--ring); }
.prog { flex: none; margin-top: 4px; }
.prog .bar { height: 6px; border-radius: 3px; background: var(--tile); overflow: hidden; }
.prog .bar i { display: block; height: 100%; background: var(--brand); transition: width var(--d-mid) var(--e-in); }
.prog .pl { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-top: 8px; }
.pl b { color: var(--text); font-weight: 600; }
.pessoas { flex: none; display: flex; gap: 6px; margin-bottom: 6px; overflow-x: auto; scrollbar-width: none; }
.pessoas > span, .pessoas > button { flex: none; height: 36px; padding: 0 12px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; background: var(--tile); font-size: 13px; color: var(--text); }
.pessoas .on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; box-shadow: inset 0 0 0 2px var(--ring); }
.ok.s { width: 18px; height: 18px; }
.it { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.it .nm { flex: 1; display: flex; flex-direction: column; line-height: 18px; min-width: 0; }
.it small { font-size: 12px; color: var(--muted); }
.it.dis .nm span, .it.dis .v { color: var(--muted); }
.mini { display: inline-flex; align-items: center; gap: 2px; background: var(--tile); border-radius: 999px; padding: 2px; margin-top: 5px; width: max-content; }
.mini button { width: 28px; height: 28px; border-radius: 50%; background: var(--panel); font-size: 15px; line-height: 1; }
.mini button:disabled { opacity: .35; }
.mini span { min-width: 54px; text-align: center; font-size: 12px; font-weight: 600; }
.valor-livre { text-align: center; padding: 6px 0 2px; }
.valor-livre .disp span { font-size: 40px; line-height: 48px; }

/* ---------- toast ---------- */
.toast {
  position: fixed; z-index: 80; left: 50%; bottom: calc(150px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; background: #1a1a1a; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.22); width: max-content; max-width: min(560px, calc(100vw - 32px)); animation: toast var(--d-mid) var(--e-in);
}
body.dark .toast { background: #f4f4f4; color: #0a0a0a; }
.toast button { font-weight: 600; color: var(--tone-bright); }
body.dark .toast button { color: var(--tone-deep); }
@keyframes toast { from { opacity: 0; transform: translate(-50%, 12px); } }

/* ---------- início ---------- */
.i-body { flex: 1; overflow-y: auto; padding: 4px 16px 110px; display: flex; flex-direction: column; gap: 12px; }
.screen.inicio { background: var(--ground); }
.screen.inicio .ptop { background: var(--ground); }
.loja { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 18px; }
.loja b { font-size: 16px; font-weight: 600; }
.loja small { font-size: 12px; color: var(--muted); }
.card { background: var(--panel); border-radius: 16px; padding: 16px; }
.row { display: flex; justify-content: space-between; }
.lbl { font-size: 13px; color: var(--muted); }
.big { font-size: 38px; line-height: 44px; font-weight: 700; letter-spacing: -.02em; margin: 4px 0 2px; }
.sub { font-size: 13px; color: var(--muted); }
.cmp { font-size: 13px; color: var(--muted); line-height: 18px; margin-top: 10px; }
.up { display: inline-flex; align-items: center; gap: 2px; color: var(--positive); font-weight: 600; }
.down { color: var(--negative); font-weight: 600; }
.formas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.formas div { background: var(--tile); border-radius: 12px; padding: 9px 12px; display: flex; flex-direction: column; line-height: 18px; }
.formas span { font-size: 12px; color: var(--muted); }
.formas b { font-size: 15px; font-weight: 600; }
.atalhos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.atalhos button { height: 72px; background: var(--panel); border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 500; transition: transform var(--d-tap); }
.atalhos button:active { transform: scale(.97); }
.atalhos svg { color: var(--brand-text); }
.card-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.card-h h2 { margin: 0; font-size: 15px; font-weight: 600; }
.link { font-size: 13px; color: var(--brand-text); font-weight: 500; }
.li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--rule); }
.card-h + .li { border-top: 0; }
.hora { color: var(--muted); display: inline-block; width: 52px; }
.mes { display: flex; align-items: center; justify-content: space-between; background: var(--panel); border-radius: 16px; padding: 12px 16px; color: var(--muted); text-align: left; }
.mes span { display: flex; flex-direction: column; font-size: 12px; line-height: 17px; }
.mes b { font-size: 15px; color: var(--text); font-weight: 600; }
.ibot { position: fixed; z-index: 10; left: 0; right: 0; bottom: 0; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); background: var(--panel); border-top: 1px solid var(--border); }
.nova { width: 100%; height: 56px; border-radius: 999px; background: var(--brand); color: var(--on-brand); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; font-weight: 600; transition: transform var(--d-tap), background-color var(--d-fast); }
.nova:hover { background: var(--brand-press); }
.nova:active { transform: scale(.98); }
.i-head { display: none; }
.vazio-c { color: var(--muted); padding: 10px 0 4px; }


/* ---------- resumo ---------- */
.screen.resumo { background: var(--ground); }
.screen.resumo .ptop { background: var(--ground); }
.r-head { display: none; }
.r-seg { flex: none; padding: 0 16px; }
.r-seg .seg3 { margin: 0 0 12px; background: var(--control); }
.i-body.r-body { padding-bottom: 24px; }
.achado { margin: 4px 0 6px; font-size: 13px; line-height: 18px; color: var(--muted); }
.achado b { color: var(--text); font-weight: 600; }
.chart { position: relative; height: 180px; margin-top: 8px; }
.chart .gl { position: absolute; left: 38px; right: 0; height: 0; border-top: 1px solid var(--rule); font-style: normal; }
.chart .gl span { position: absolute; left: -38px; top: -8px; width: 32px; text-align: right; font-size: 11px; line-height: 16px; color: var(--muted); }
.bars { position: absolute; left: 38px; right: 0; top: 0; bottom: 22px; display: flex; align-items: flex-end; gap: 3px; }
.bars button { flex: 1; min-width: 0; height: var(--h); background: var(--brand); border-radius: 4px 4px 1px 1px; transform-origin: bottom; animation: crescer var(--d-sheet) var(--e-in) both; transition: background-color var(--d-fast); }
.bars button:hover { background: var(--brand-press); }
.bars button.zero { height: 2px; background: var(--control); border-radius: 1px; }
.bars button.parcial { background: var(--brand-soft); box-shadow: inset 0 0 0 1.5px var(--ring); }
.bars button.futuro { height: 0; }
.bars button.sel { background: var(--brand-text); }
@keyframes crescer { from { transform: scaleY(0); } }
.xl { position: absolute; left: 38px; right: 0; bottom: 0; height: 18px; display: flex; gap: 3px; }
.xl span { flex: 1; min-width: 0; display: flex; justify-content: center; font-size: 11px; color: var(--muted); white-space: nowrap; }
.chart-cap { font-size: 13px; color: var(--muted); margin-top: 8px; min-height: 20px; }
.chart-cap b { color: var(--text); font-weight: 600; }
.fp { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; padding: 8px 0; }
.fp b { font-weight: 600; }
.fp > i { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--tile); overflow: hidden; }
.fp > i i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.li small { display: block; font-size: 12px; color: var(--muted); line-height: 16px; }
.li .r { text-align: right; }
.li .r b { font-weight: 600; }
.nota { font-size: 12px; color: var(--muted); margin: 10px 0 0; line-height: 17px; }
.nota b { color: var(--text); font-weight: 600; }
.card-h.c { align-items: center; gap: 10px; }
.achado + .li { border-top: 0; }
.seg2 { flex: none; display: inline-grid; grid-template-columns: 1fr 1fr; gap: 2px; background: var(--tile); border-radius: 10px; padding: 3px; }
.seg2 button { height: 30px; padding: 0 10px; border-radius: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; transition: background-color var(--d-fast), color var(--d-fast); }
.seg2 button.on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; }

/* ---------- produtos ---------- */
.screen.produtos { flex: none; height: 100dvh; }
.p-main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.p-title { display: none; }
.pnovo {
  flex: none; margin-left: auto; height: 40px; padding: 0 16px 0 12px; border-radius: 999px; background: var(--brand); color: var(--on-brand);
  font-weight: 600; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; transition: transform var(--d-tap), background-color var(--d-fast);
}
.pnovo:hover { background: var(--brand-press); }
.pnovo:active { transform: scale(.97); }
.pmeta { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 16px; margin-bottom: 8px; min-height: 24px; font-size: 13px; color: var(--muted); }
.pmeta button { color: var(--brand-text); font-weight: 600; font-size: 13px; white-space: nowrap; padding: 4px 0; }
.plist { flex: 1; min-height: 0; overflow-y: auto; padding: 0 16px calc(24px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; }
.pcard { flex: none; display: flex; align-items: center; gap: 2px; padding-right: 4px; border-radius: 16px; background: var(--tile); transition: transform var(--d-tap) var(--e-in), background-color var(--d-fast); }
.pcard:active { transform: scale(.985); }
.pmain { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; min-height: 70px; padding: 10px 4px 10px 14px; text-align: left; border-radius: 16px; }
.pmain .pn { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pmain .pn b { font-size: 16px; font-weight: 600; line-height: 21px; }
.pmain .pn small { font-size: 13px; color: var(--muted); line-height: 17px; }
.pmain .pp { font-size: 16px; font-weight: 600; line-height: 21px; text-align: right; white-space: nowrap; }
.pmain .pp small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.pcard.off { background: transparent; box-shadow: inset 0 0 0 1px var(--border); }
.pcard.off .pn b, .pcard.off .pp { color: var(--muted); }
.st { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; color: var(--muted); transition: background-color var(--d-mid), color var(--d-fast); }
.st:hover { color: var(--brand-text); }
.st.on { color: var(--brand-text); }
.st.pop { background: var(--brand-soft); }
.st.pop svg { animation: pop var(--d-mid) var(--e-in); }
.flash { animation: flashk 1100ms var(--e-in); }
@keyframes flashk { from { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--ring); } }
.p-vazio { padding: 28px 8px; text-align: center; color: var(--muted); }
.p-vazio .cta2 { display: block; max-width: 320px; margin: 14px auto 0; padding: 0 16px; color: var(--text); }
.tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: var(--tile); color: var(--muted); margin-left: 8px; vertical-align: 1px; }

/* formulário do produto */
.pf { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pf-h { flex: none; display: flex; flex-direction: column; margin-bottom: 6px; }
.pf-h h2 { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; }
.pf-h small { font-size: 13px; color: var(--muted); }
.pf-body { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -20px; padding: 10px 20px 12px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; min-width: 0; }
.field > label, .field > .lb { font-size: 13px; color: var(--muted); }
.field label em { font-style: normal; }
.inp { height: 48px; border-radius: 12px; background: var(--tile); display: flex; align-items: center; gap: 8px; padding: 0 14px; font-size: 16px; min-width: 0; transition: box-shadow var(--d-fast), background-color var(--d-fast); }
.inp:focus-within { background: var(--panel); box-shadow: inset 0 0 0 2px var(--ring); }
input.inp { width: 100%; border: 0; outline: 0; }
.inp input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 16px; }
.inp input::placeholder, input.inp::placeholder { color: var(--muted); }
.inp .pre { color: var(--muted); }
.field.bad .inp { box-shadow: inset 0 0 0 2px var(--negative); }
.err { font-size: 12px; line-height: 16px; color: var(--negative); }
.ler { flex: none; height: 34px; margin-right: -6px; padding: 0 12px; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 1px var(--control); display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cats { display: flex; flex-wrap: wrap; gap: 6px; }
.cats button { height: 36px; padding: 0 13px; border-radius: 999px; background: var(--tile); color: var(--muted); font-size: 14px; transition: background-color var(--d-fast), color var(--d-fast); }
.cats button.on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; box-shadow: inset 0 0 0 2px var(--ring); }
.catin { height: 36px; width: 180px; padding: 0 14px; border: 0; outline: 0; border-radius: 999px; background: var(--panel); box-shadow: inset 0 0 0 2px var(--ring); font-size: 16px; }
.lucro { margin: -4px 0 16px; padding: 10px 12px; border-radius: 12px; background: var(--panel-2); font-size: 13px; line-height: 18px; color: var(--muted); }
.lucro b { color: var(--brand-text); font-weight: 600; }
.lucro.neg b { color: var(--negative); }
.trow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 0; border-top: 1px solid var(--rule); text-align: left; }
.trow > span { flex: 1; display: flex; flex-direction: column; line-height: 19px; min-width: 0; }
.trow b { font-weight: 600; }
.trow small { font-size: 12px; line-height: 16px; color: var(--muted); }
.pf-cod { font-size: 12px; line-height: 17px; color: var(--muted); margin: 6px 0 0; }
.pf-foot { flex: none; margin: 0 -20px; padding: 12px 20px 0; border-top: 1px solid var(--border); }
.pf-acts { display: flex; justify-content: center; gap: 8px; margin-top: 6px; }
.pf-acts:empty { display: none; }
.pf-acts button { height: 40px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 7px; font-weight: 600; transition: background-color var(--d-fast); }
.pf-acts button:hover { background: var(--tile); }
.pf-acts .neg { color: var(--negative); }
.pf-vazio { flex: 1; display: grid; place-items: center; text-align: center; color: var(--muted); padding: 24px; }
.pf-vazio b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* tabela (PC) */
.thead, .trw { display: grid; grid-template-columns: 40px minmax(0, 1fr) 112px 52px 104px 92px 68px; gap: 10px; align-items: center; padding: 0 24px 0 18px; }
.thead { flex: none; height: 32px; font-size: 12px; color: var(--muted); }
.trows { flex: 1; min-height: 0; overflow-y: auto; padding-bottom: 16px; }
.trw { height: 52px; border-top: 1px solid var(--rule); cursor: pointer; transition: background-color var(--d-fast); }
.trw:hover { background: var(--panel-2); }
.trw:focus-visible { outline-offset: -2px; }
.trw.sel { background: var(--brand-soft); }
.trw.sel .n { color: var(--brand-text); }
.trw .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trw .b { font-weight: 600; }
.trw small { font-size: 12px; font-weight: 400; color: var(--muted); }
.trw.off .n, .trw.off .b { color: var(--muted); }
.mut { color: var(--muted); }
.thead .r, .trw .r { text-align: right; }
.st.sm { width: 36px; height: 36px; }

/* organizar Favoritos */
.org { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.pronto { flex: none; height: 38px; padding: 0 18px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-weight: 600; }
.hintp { flex: none; font-size: 13px; line-height: 18px; color: var(--muted); margin: 0 0 10px; }
.sug { flex: none; display: flex; align-items: center; gap: 6px; margin-bottom: 10px; padding: 8px 4px 8px 14px; border-radius: 14px; background: var(--brand-soft); color: var(--brand-text); font-size: 13px; line-height: 18px; }
.sug div { flex: 1; }
.sug b { font-weight: 600; }
.sug .add { flex: none; height: 34px; padding: 0 12px; border-radius: 999px; background: var(--brand); color: var(--on-brand); font-size: 13px; font-weight: 600; white-space: nowrap; }
.sug .ib { width: 34px; height: 34px; color: var(--brand-text); }
.olist { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -20px; padding: 2px 20px 16px; }
.orow { position: relative; display: flex; align-items: center; gap: 6px; height: 54px; margin-bottom: 6px; padding: 0 8px 0 2px; border-radius: 14px; background: var(--tile); }
.orow .h { flex: none; width: 40px; height: 46px; border-radius: 10px; display: grid; place-items: center; color: var(--muted); cursor: grab; touch-action: none; }
.orow .pos { flex: none; width: 22px; font-size: 13px; color: var(--muted); }
.orow .n { flex: 1; min-width: 0; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.orow .n small { font-size: 12px; font-weight: 400; color: var(--muted); margin-left: 6px; }
.orow .rm { flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--panel); color: var(--muted); display: grid; place-items: center; }
.orow.moved { animation: flashk 900ms var(--e-in); }
.olist.dragging { user-select: none; -webkit-user-select: none; }
.olist.dragging .orow { transition: transform var(--d-fast) var(--e-in); }
.olist.dragging .orow.drag { transition: none; z-index: 2; background: var(--panel); box-shadow: 0 10px 24px rgba(0,0,0,.16), inset 0 0 0 2px var(--ring); }
.olist.dragging .orow.drag .h { cursor: grabbing; }
.addp { width: 100%; height: 50px; margin-top: 4px; border-radius: 14px; border: 1.5px dashed var(--control); display: flex; align-items: center; justify-content: center; gap: 8px; font-weight: 600; }
.sheet .sbar { margin: 6px 0 8px; }
.pkrow { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 4px; border-bottom: 1px solid var(--rule); text-align: left; color: var(--brand-text); }
.pkrow span { flex: 1; display: flex; flex-direction: column; line-height: 19px; color: var(--text); }
.pkrow b { font-weight: 600; }
.pkrow small { font-size: 12px; color: var(--muted); }
body[data-route="produtos"] .toast { bottom: calc(24px + env(safe-area-inset-bottom)); }

/* ---------- caixa ---------- */
.dot.off { background: var(--control); }
.screen > .quieto, .screen.quieto > * { animation: none !important; }
.user { width: 100%; text-align: left; border-radius: 12px; transition: background-color var(--d-fast); }
.user:hover { background: var(--tile); }
.screen.caixa { background: var(--ground); }
.screen.caixa .ptop { background: var(--ground); }
.c-head { display: none; }
.cx-seg-m { flex: none; padding: 0 16px 12px; }
.cx-seg-m .seg2 { display: grid; width: 100%; background: var(--control); }
.cx-seg-m .seg2 button, .c-head .seg2 button { height: 36px; font-size: 14px; }
.cx-seg-m .seg2 button.on, .c-head .seg2 button.on { background: var(--panel); color: var(--text); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.c-body { flex: 1; overflow-y: auto; padding: 4px 16px 110px; display: flex; flex-direction: column; gap: 12px; }
.c-body.fech { padding-bottom: 24px; }
.big.md { font-size: 30px; line-height: 36px; }
.conta { margin-top: 10px; border-top: 1px solid var(--rule); }
.cl { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.cl:last-child { border-bottom: 0; }
.cl span:first-child { color: var(--muted); }
.cl small { font-size: 12px; color: var(--muted); margin-left: 6px; }
.cego .ct, .fechado .ct { display: block; font-size: 18px; line-height: 24px; font-weight: 600; margin: 6px 0 4px; }
.fechado .ct { font-size: 22px; line-height: 28px; font-weight: 700; }
.cego p, .fechado p { margin: 0; color: var(--muted); line-height: 20px; }
.mv { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 0; border-top: 1px solid var(--rule); text-align: left; border-radius: 8px; transition: background-color var(--d-fast); }
.card-h + .mv { border-top: 0; }
button.mv:active { background: var(--tile); }
.mv .h { flex: none; width: 44px; color: var(--muted); }
.mv .d { flex: 1; display: flex; flex-direction: column; line-height: 18px; min-width: 0; }
.mv .d small { font-size: 12px; color: var(--muted); }
.mv .v { font-weight: 600; white-space: nowrap; }
.ultimo { display: flex; justify-content: space-between; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--rule); }
.ultimo span { color: var(--muted); }
.ultimo b { font-weight: 600; text-align: right; }
.fe { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 16px; background: var(--panel); text-align: left; transition: background-color var(--d-fast); }
.fe .d { flex: 1; display: flex; flex-direction: column; line-height: 19px; min-width: 0; }
.fe .d b { font-weight: 600; }
.fe .d small { font-size: 12px; color: var(--muted); }
.fe .d em { font-style: normal; font-size: 12px; line-height: 17px; margin-top: 2px; }
.bd { flex: none; display: flex; flex-direction: column; align-items: flex-end; text-align: right; line-height: 18px; }
.bd b { font-size: 13px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-text); white-space: nowrap; }
.bd small { font-size: 12px; color: var(--muted); margin-top: 3px; }
.bd.neg b { background: var(--neg-soft); color: var(--negative); }
.bd.warn b { background: var(--warn-soft); color: var(--warn); }
.card .fe { padding: 10px 0; border-radius: 0; background: transparent; border-top: 1px solid var(--rule); }
.card .card-h + .fe { border-top: 0; }
.fe-sum .big { font-size: 32px; line-height: 38px; }
.lbl-s { font-size: 13px; color: var(--muted); margin: 4px 2px 0; }
.motivos { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 8px 0 14px; }
.motivos button { height: 38px; padding: 0 14px; border-radius: 999px; box-shadow: inset 0 0 0 1px var(--control); font-size: 14px; transition: background-color var(--d-fast), box-shadow var(--d-fast); }
.motivos button.on { background: var(--brand-soft); color: var(--brand-text); font-weight: 600; box-shadow: inset 0 0 0 2px var(--ring); }
.cnt-box { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -20px; padding: 0 20px 8px; }
.cnt { display: flex; align-items: center; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--rule); }
.cnt.last { border-bottom: 0; }
.cnt .nv { flex: none; width: 70px; font-size: 16px; font-weight: 600; }
.cnt .step span { min-width: 30px; }
.cnt .sv { margin-left: auto; color: var(--muted); }
.cnt .inp { flex: 1; height: 44px; }
.cnt-f { flex: none; margin: 0 -20px calc(-20px - env(safe-area-inset-bottom)); padding: 4px 20px calc(16px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--panel-2); }
.cnt-box[data-modo="total"] + .cnt-f .total { display: none; }
.cnt-box[data-modo="total"] + .cnt-f { padding-top: 14px; }
.txt-l { display: block; width: 100%; text-align: center; margin-top: 10px; padding: 4px 0; font-size: 14px; font-weight: 600; color: var(--brand-text); }
.fc { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.fc-body { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -20px 12px; padding: 0 20px; }
.res { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0 2px; }
.res .t { font-size: 24px; line-height: 30px; font-weight: 700; margin-top: 10px; }
.res .t.neg { color: var(--negative); }
.res .s { font-size: 14px; line-height: 19px; color: var(--muted); margin-top: 4px; max-width: 320px; }
.tr .neg { color: var(--negative); font-weight: 600; }
.fc .field { margin: 16px 0 0; }
.fx { display: flex; align-items: center; gap: 10px; margin: 4px 0 12px; font-size: 15px; font-weight: 600; }
.lbl-m { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.wmsg { background: var(--tile); border-radius: 16px; padding: 12px 16px; font-size: 14px; line-height: 20px; }
.wmsg p { margin: 0; }
.wmsg p + p, .wmsg ul + p { margin-top: 12px; }
.wmsg b { font-weight: 600; }
.wmsg ul { margin: 4px 0 0; padding-left: 18px; }
.wmsg li::marker { color: var(--muted); }
.cta.ico, .cta2.ico { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; }

/* ---------- configurações ---------- */
.screen.config { background: var(--ground); }
.screen.config .ptop { background: var(--ground); }
.c-body.cfg { padding-bottom: 24px; }
.cfg .field { margin: 8px 0 6px; }
.cf-item { display: flex; flex-direction: column; line-height: 19px; }
.cf-item b { font-weight: 600; }
.cf-item small { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
.cf-m { justify-content: flex-start; margin: 12px 0 2px; }
.cf-outro { width: 128px; height: 38px; padding: 0 12px; border-radius: 999px; background: transparent; box-shadow: inset 0 0 0 1px var(--control); font-size: 14px; cursor: text; }
.cf-outro.on { background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--ring); }
.cf-outro input { font-size: 16px; }
.cfg .trow { margin-top: 14px; }
.cf-n { margin-top: 0; }
.cf-zerar { color: var(--negative); margin-top: 12px; }

/* ---------- Pix com QR e comprovante ---------- */
.pix-box { flex: none; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 4px 0 14px; }
.pix-qr { width: 232px; height: 232px; padding: 12px; border-radius: 16px; background: #fff; box-shadow: inset 0 0 0 1px var(--border); display: grid; place-items: center; }
.pix-qr svg { display: block; width: 100%; height: 100%; }
.pix-load { font-size: 13px; color: #666; padding: 0 12px; }
.pix-valor { font-size: 30px; line-height: 36px; font-weight: 700; margin-top: 12px; }
.pix-quem { font-size: 13px; color: var(--muted); margin: 2px 0 12px; }
.pix-box .cta2 { margin-top: 0; padding: 0 16px; }
.done-acts { display: flex; justify-content: center; gap: 4px; margin-top: 10px; }
.done .done-acts .und { margin-top: 0; }
.li-b { width: 100%; text-align: left; cursor: pointer; border-radius: 0; transition: background-color var(--d-fast); }
.li-b:active { background: var(--tile); }
.vd-tot { font-weight: 600; }
.vd-tot b { font-size: 18px; }
.cf-pix-acoes { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.cf-pix-acoes .cta2 { flex: 1; margin-top: 0; }
.cf-pix-tirar { display: block; margin: 12px auto 0; }
.pix-box.rola { flex: 1 1 auto; min-height: 0; overflow-y: auto; margin: 0 -20px; padding: 4px 20px 14px; }
.pix-cod { width: 100%; margin: 0 0 12px; padding: 8px 10px; border-radius: 10px; background: var(--tile); color: var(--muted); font-family: ui-monospace, Consolas, monospace; font-size: 11px; line-height: 15px; text-align: left; word-break: break-all; }
#cf-pix .cats { margin-top: 2px; }

/* ---------- carregando (esqueleto) ---------- */
/* Pulso suave só de transparência (sem brilho correndo); com "reduzir movimento", fica parado. */
:root { --sk: #e6e4df; --sk-forte: #dcd9d3; }
body.dark { --sk: #2a2a2a; --sk-forte: #333333; }
.sk { display: block; flex: none; max-width: 100%; background: var(--sk); border-radius: 7px; animation: skp 1.1s ease-in-out infinite alternate; }
@keyframes skp { to { opacity: .45; } }
.sk-tile .sk, .sk-sbar .sk, .tabs .sk, .sk-pcard .sk, .ptop .sk { background: var(--sk-forte); }
.sk-card .sk-ch { margin-bottom: 6px; }
.sk-li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-top: 1px solid var(--rule); }
.sk-ch + .sk-li { border-top: 0; }
.sk-at { height: 72px; border-radius: 16px; background: var(--panel); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.sk-formas { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.sk-tile { justify-content: center; gap: 10px; }
.sk-pcard .pmain, .sk-trw { cursor: default; }
.sk-trw:hover { background: transparent; }
.sk-field { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.sk-chart { display: flex; align-items: flex-end; gap: 4px; height: 180px; margin-top: 14px; }
.sk-bar { flex: 1; border-radius: 4px 4px 1px 1px; }
.sk-fp { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; padding: 9px 0; }
.sk-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.sk-vazio { flex: 1; display: grid; place-items: center; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .sk { animation: none !important; } }

/* ---------- em breve ---------- */
.breve { flex: 1; display: grid; place-items: center; text-align: center; padding: 32px; color: var(--muted); }
.breve b { display: block; color: var(--text); font-size: 20px; margin-bottom: 6px; }

/* ---------- PC ---------- */
@media (min-width: 900px) {
  body { background: var(--ground); }
  .app { display: grid; grid-template-columns: var(--sbw) 1fr; gap: 12px; padding: 12px; height: 100dvh; min-height: 0; transition: grid-template-columns var(--d-mid) var(--e-in); }
  .app.col { --sbw: 72px; }
  .sb { position: static; width: auto; transform: none; border-radius: 16px; padding: 14px 12px; transition: none; }
  .view { min-height: 0; height: calc(100dvh - 24px); background: var(--panel); border-radius: 16px; overflow: hidden; }
  .ptop .ib.menu { display: none; }
  .app.col .sb { align-items: center; padding: 14px 0; }
  .app.col .sb-top { flex-direction: column; padding: 0 0 8px; gap: 6px; }
  .app.col .sb-name, .app.col .nav a span, .app.col .nav a em, .app.col .sb-search span, .app.col .dm span, .app.col .dm .sw, .app.col .dm em, .app.col .dm .cor-dot,
  .app.col .user div, .app.col .out span, .app.col .reset { display: none; }
  .app.col .sb-search { width: 40px; padding: 0; justify-content: center; margin-bottom: 8px; }
  .app.col .nav a { width: 44px; height: 44px; padding: 0; justify-content: center; }
  .app.col .sb-bottom { align-items: center; width: 100%; padding: 0 12px; }
  .app.col .dm { width: 40px; padding: 0; justify-content: center; }
  .app.col .dm.on { background: var(--brand-soft); color: var(--brand-text); }
  .app.col .user { padding: 4px 0; }
  .app.col .out { width: 40px; height: 40px; border: 0; padding: 0; }
  .sb-close { display: none; }
  .sb-tog { display: grid; }
  .screen.vender { flex: 1; height: auto; min-height: 0; }

  /* vender */
  .screen.vender { display: grid; grid-template-columns: minmax(0, 1fr) var(--cart); }
  .v-prod { display: flex; flex-direction: column; min-height: 0; padding: 22px 0 0; }
  .v-prod .ptop { display: none; }
  .v-title { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 0 24px 0 28px; margin-bottom: 14px; }
  .v-title h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
  .today { color: var(--muted); font-size: 13px; white-space: nowrap; }
  .today b { color: var(--text); font-size: 16px; font-weight: 600; margin: 0 2px; }
  .sbar { margin: 0 24px 14px 28px; height: 48px; }
  .sbar kbd { display: inline-block; }
  .sres { padding: 0 24px 0 28px; height: 36px; line-height: 36px; margin-bottom: 12px; font-size: 14px; }
  .tabs { padding: 0 24px 0 28px; margin-bottom: 16px; }
  .tabs button { background: transparent; }
  .tabs button.on { background: var(--brand-soft); }
  .gwrap { padding: 0 24px 24px 28px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(176px, 1fr)); gap: 10px; }
  .tile { height: 84px; padding: 12px 14px; }
  .tile .p { font-size: 14px; }
  .tile.first .enter { display: block; }
  .vertodos { display: none; }
  .pbar { display: none; }
  .v-cart { display: flex; background: var(--panel-2); border-radius: 12px; margin: 8px; padding: 20px; display: flex; flex-direction: column; min-height: 0; }
  .cart-f { margin: 0 -20px -20px; padding: 4px 20px 20px; border-radius: 0 0 12px 12px; }
  .pay button { height: 60px; border-radius: 20px; }
  .pay kbd, .chip kbd { display: inline; }
  .toast { bottom: 28px; }
  .sheet { left: 50%; top: 50%; right: auto; bottom: auto; width: 420px; max-height: calc(100dvh - 48px); border-radius: 24px; padding: 20px 22px 22px;
    transform: translate(-50%, -48%); opacity: 0; transition: transform var(--d-mid) var(--e-in), opacity var(--d-mid) var(--e-in); }
  .sheet.in { transform: translate(-50%, -50%); opacity: 1; }
  .sheet.out { transform: translate(-50%, -48%); opacity: 0; transition: transform var(--d-mid) var(--e-out), opacity var(--d-mid) var(--e-out); }
  .sheet .handle { display: none; }
  .sheet.tall { top: 50%; height: min(760px, calc(100dvh - 48px)); width: 460px; }

  /* resumo */
  .screen.resumo { background: var(--panel); }
  .screen.resumo > .ptop, .r-seg { display: none; }
  .r-head { display: flex; align-items: center; gap: 16px; padding: 22px 28px 18px; }
  .r-head h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
  .r-head .today { flex: 1; }
  .r-head .seg3 { margin: 0; width: 300px; }
  .chart { height: 230px; }
  .fp > i { background: var(--panel); }

  /* produtos */
  .screen.produtos { flex: 1; height: auto; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) clamp(360px, 30vw, 440px); }
  .p-main { padding: 22px 0 0; }
  .p-main > .ptop { display: none; }
  .p-title { display: flex; align-items: center; gap: 12px; padding: 0 24px 0 28px; margin-bottom: 14px; }
  .p-title h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
  .p-title .today { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .p-title .lnk { flex: none; height: 44px; padding: 0 14px; border-radius: 999px; color: var(--brand-text); font-weight: 600; white-space: nowrap; transition: background-color var(--d-fast); }
  .p-title .lnk:hover { background: var(--brand-soft); }
  .p-title .pnovo { margin-left: 0; height: 44px; padding: 0 18px 0 14px; }
  .p-main .sbar { margin: 0 24px 14px 28px; height: 48px; }
  .p-main .tabs { padding: 0 24px 0 28px; margin-bottom: 12px; }
  .p-main .pmeta { padding: 0 24px 0 28px; }
  .pc-edit { background: var(--panel-2); border-radius: 12px; margin: 8px; padding: 20px; display: flex; flex-direction: column; min-height: 0; }
  .pc-edit .inp, .pc-edit .cats button, .pc-edit .lucro { background: var(--panel); }
  .pc-edit .cats button.on { background: var(--brand-soft); }
  .pc-edit .pf-acts button:hover { background: var(--panel); }
  .pc-edit .pf-foot { padding-top: 14px; }
  .sheet.tall .org, .sheet.tall .pf { margin-top: -4px; }

  .sk-at { height: 84px; background: var(--panel-2); }
  .sk-chart { height: 230px; }

  /* caixa */
  .screen.caixa { background: var(--panel); }
  .screen.caixa > .ptop, .cx-seg-m, .screen.config > .ptop { display: none; }
  .screen.config { background: var(--panel); }
  .screen.config .inp:not(.cf-outro) { background: var(--panel); }
  .screen.config .inp:not(.cf-outro):focus-within { background: var(--panel); }
  .c-head { display: flex; align-items: center; gap: 16px; padding: 22px 28px 18px; }
  .c-head h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
  .c-head .today { flex: 1; }
  .c-head .seg2 { width: 260px; display: grid; background: var(--tile); }
  .c-head .nova { width: auto; height: 48px; padding: 0 22px; font-size: 16px; }
  .c-body { padding: 0 28px 28px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 14px; align-content: start; }
  .c-body.fech { grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr); padding-bottom: 28px; }
  .c-body > .i-col > .fe { background: var(--panel-2); }
  .c-body > .i-col > .fe:hover { background: var(--tile); }
  .sheet .cnt-box, .sheet .fc-body { margin-left: -22px; margin-right: -22px; padding-left: 22px; padding-right: 22px; }
  .sheet .cnt-f { margin: 0 -22px -22px; padding: 4px 22px 18px; border-radius: 0 0 24px 24px; }

  /* início */
  .screen.inicio { background: var(--panel); }
  .screen.inicio > .ptop, .ibot { display: none; }
  .i-head { display: flex; align-items: center; gap: 16px; padding: 22px 28px 18px; }
  .i-head h1 { margin: 0; font-size: 24px; font-weight: 600; letter-spacing: -.01em; }
  .i-head .today { flex: 1; }
  .i-head .nova { width: auto; height: 48px; padding: 0 24px; font-size: 16px; }
  .i-head .nova kbd { font-family: inherit; font-size: 11px; opacity: .75; font-weight: 500; }
  .i-body { padding: 0 28px 28px; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px; align-content: start; }
  .i-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
  .card, .atalhos button, .mes { background: var(--panel-2); }
  .formas div { background: var(--panel); }
  .big { font-size: 44px; line-height: 50px; }
  .atalhos button { height: 84px; }
}
@media (min-width: 900px) and (max-width: 1239px) {
  .c-cat, .c-custo, .p-title .today { display: none; }
  .p-title h1 { flex: 1; }
  .thead, .trw { grid-template-columns: 40px minmax(0, 1fr) 52px 104px 68px; }
}
@media (min-width: 1600px) {
  .tile { height: 104px; padding: 15px 16px; }
  .tile .n { font-size: 17px; line-height: 22px; }
  .tile .p { font-size: 15px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; transition-duration: 1ms !important; }
}
