/* Mingle – számla, fizetés, nyitott számlák, törlések (és a rendelés-képernyő alapja) – „V22” (docs/DESIGN.md). Csak tokeneket használ.
   V22: a Fizetendő a kiemelt (sötét fenyőzöld) kártyán fehér vékony számmal; a fizetési módok 2 egyforma oszlopban (telefonon), a kiválasztott telt;
   a termékgombok pasztell kitöltésű, 16 px-es kártyák (2 egyforma oszlop, azonos magasság), a kosárban lévő menta + 2 px cselekvés-szín keret.
   Elvek: rétegek vonalak helyett (vászon → panel → kártya); egy elsődleges gomb képernyőnként (cselekvés-szín, rajta sötét tinta / világosban fehér);
   a fehér (--num) a számoké; a kiválasztás 2 px cselekvés-szín keret + félkövér (nem csak szín); kapszula, árnyék (az alsó sávon kívül), színátmenet nincs;
   nincs csupa nagybetűs címke, nincs 800-as vastagság. A telefonon alul rögzített számla-sáv a fülsáv (--tabbar-h) fölött ül; a fizetés alfolyamat, ott nincs fülsáv.
   A rendelés-felvétel (view_order.js) a fájl végén: kategória-lista / fülsor, termékgombok, kosár-sáv és számla-panel (H3 / H3-S2). */

/* ---------- közös ---------- */

.btn-ghost { background: transparent; border-color: transparent; color: var(--ink2); }
.btn-ghost:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.menu-item:disabled { opacity: 0.45; cursor: not-allowed; }
.sheet-menu .sheet-body { padding-bottom: var(--space-3); }
.sheet-menu .hint { margin: 0 0 var(--space-2); }
.chip-small { min-height: 44px; padding: 4px var(--space-3); font-size: var(--text-sm); }

/* ---------- számla ---------- */

.bill-view .bill-main { display: flex; flex-direction: column; gap: var(--space-3); padding-bottom: 150px; }
.bill-col, .bill-side { display: contents; }
.bill-col > * { order: 5; }
.bill-col > .bill-top { order: 1; }
.bill-col > .bill-note { order: 2; }
.bill-col > .bill-items { order: 3; }
.bill-side > .bill-summary { order: 4; }
.bill-col > .bill-extra { order: 5; }
.bill-col > .bill-foot { order: 7; }

/* fej: asztalszám nagy számmal, mellette az állapot; alatta a kis adatok (külön elemek, a „·” csak rajzolt elválasztó) */
.bill-top { display: flex; flex-direction: column; gap: 2px; padding: 0 0 var(--space-1); }
.bill-top.accent-bar::before { display: none; }
/* fej (70 px): asztalszám nagy számmal, mellette a tér (17 px / 700) és alatta a kis adatok; jobbra az állapot csendes szövegként */
.bill-top-row { display: flex; align-items: center; gap: var(--space-1) var(--space-3); min-height: 62px; }
.bill-table { flex: none; margin: 0; font-family: var(--font-num); font-size: 28px; font-weight: 600; line-height: 1.05; color: var(--num); letter-spacing: 0.01em; }
@media (min-width: 900px) { .bill-table { font-size: 34px; } }
.bill-who { flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.bill-who-name { color: var(--text); font-size: 17px; font-weight: 700; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-top-spacer { flex: 1 1 auto; }
.bill-top-row > .badge { flex: none; align-self: flex-start; margin-top: 6px; }
.bill-facts { display: flex; flex-wrap: wrap; gap: 0 6px; color: var(--muted); font-size: 12.5px; }
/* az elválasztó pont az elem végén: sortörésnél (telefon, „· Lezárva: …”) nem marad árván a következő sor elején */
.bill-facts > span:not(:last-child)::after { content: "·"; margin-left: 6px; }

/* jegyzet (ahol cselekedni kell): állapot-tónus + 3 px sáv + szöveg, nem csak szín */
.bill-note {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-3); padding: var(--space-2) var(--space-3);
  background: var(--surface); border: 0; box-shadow: inset 3px 0 0 var(--border-strong); border-radius: var(--radius); font-size: var(--text-sm);
}
.bill-note p { flex: 1 1 14em; margin: 0; }
.bill-note.is-warn { background: var(--warn-bg); box-shadow: inset 3px 0 0 var(--warn); }
.bill-note .btn { flex: none; min-height: 44px; padding-inline: var(--space-2); border-color: transparent; background: none; color: var(--acc-d); }
.bill-note .btn:hover:not(:disabled) { background: none; text-decoration: underline; text-underline-offset: 4px; }
.bill-note .dialog-strong { color: var(--text); font-weight: 600; }

/* szakaszok */
.bill-block { display: flex; flex-direction: column; gap: var(--space-2); }
.bill-block-head { display: flex; align-items: center; justify-content: flex-end; gap: var(--space-3); }
.bill-block-title { margin: 0; font-size: 13px; font-weight: 600; color: var(--ink2); }
.bill-add { flex: none; gap: 6px; min-height: 44px; padding-inline: var(--space-4); }
.bill-add .icon { width: 18px; height: 18px; }
.bill-empty { color: var(--muted); font-size: var(--text-sm); }

/* tétel-csoportok (küldésenként): csoportfej a vásznon pipával és a csoport összegével, alatta a sorok a panel-rétegen */
.bill-groups { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.bill-group-head {
  display: flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 var(--space-4);
  background: var(--bg); color: var(--muted); font-size: 12.5px; border-bottom: 1px solid var(--border);
}
.bill-group + .bill-group .bill-group-head { border-top: 1px solid var(--border); }
.bill-group-head .icon { width: 14px; height: 14px; stroke-width: 2.2; }
.bill-group-title { flex: 1 1 auto; min-width: 0; }
.bill-group-sum { font-family: var(--font-num); font-weight: 600; color: var(--ink2); font-size: 13px; }
.bill-lines { display: flex; flex-direction: column; }
.bill-line {
  display: grid; grid-template-columns: 30px minmax(0, 1fr) auto auto; column-gap: var(--space-2); align-items: center;
  min-height: 44px; padding: var(--space-1) var(--space-2) var(--space-1) var(--space-4); border-bottom: 1px solid var(--border);
}
.bill-line:last-child { border-bottom: 0; }
.bill-line.is-selecting { grid-template-columns: auto 30px minmax(0, 1fr) auto; }
.bill-line-qty { font-family: var(--font-num); font-size: 15.5px; font-weight: 600; color: var(--num); }
.bill-line-name { min-width: 0; padding-block: var(--space-2) var(--space-1); color: var(--ink2); font-size: 14.5px; font-weight: 400; overflow-wrap: anywhere; }
.bill-line-price { font-family: var(--font-num); font-size: 15.5px; font-weight: 600; color: var(--num); white-space: nowrap; text-align: right; }
.bill-line-select { display: inline-flex; align-items: center; justify-content: center; min-width: 48px; min-height: 48px; }
.bill-more { width: 44px; height: 44px; color: var(--muted); }
.bill-more:hover:not(:disabled) { color: var(--text); background: var(--surface-2); }
.bill-more-gap { width: 44px; height: 1px; }
.bill-line-sub, .bill-line-mods, .bill-line-note { grid-column: 2 / -1; }
.bill-line.is-selecting .bill-line-sub { grid-column: 3 / -1; }
.bill-line-sub { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); margin-top: -2px; padding-bottom: var(--space-1); color: var(--muted); font-size: 12px; }
.bill-line-unit, .bill-line-mods { color: var(--muted); font-size: 12px; }
.bill-line-note { color: var(--muted); font-size: 12px; font-style: italic; }
.bill-line.is-void .bill-line-name, .bill-line.is-void .bill-line-price, .bill-line.is-void .bill-line-qty { color: var(--dis); text-decoration: line-through; }

/* összesítő: 26 px-es sorok (címke --ink2, érték szám), a Fizetendő / Hátralék vonal alatt; a részletek összecsukva */
.bill-summary { padding: var(--space-2) var(--space-4); background: var(--surface); border-radius: var(--radius); }
.bill-summary .sum-rows { gap: 0; }
.bill-summary .sum-row { min-height: 26px; padding: 3px 0; border-bottom: 0; font-size: 14px; }
.bill-summary .sum-label { color: var(--ink2); }
.bill-summary .sum-value { color: var(--num); font-size: 15px; }
.bill-summary .sum-strong .sum-label, .bill-summary .sum-remaining .sum-label { color: var(--text); font-weight: 600; }
.bill-summary .sum-strong .sum-value, .bill-summary .sum-remaining .sum-value { font-size: 15.5px; }
.bill-vat { margin-top: 0; }                    /* v8: az összesítőben csak a „Részletek ˅” van (az összeg a sávban): nincs elválasztó vonal */
.bill-vat-toggle {
  display: flex; align-items: center; justify-content: flex-start; gap: var(--space-2); width: 100%; min-height: 44px; padding: 0;
  background: none; border: 0; color: var(--acc-d); font-size: var(--text-sm); font-weight: 600; text-align: left;
}
.bill-chev { width: 8px; height: 8px; margin-left: 2px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-2px, -2px); }
.bill-vat-toggle.is-open .bill-chev { transform: rotate(-135deg) translate(-2px, -2px); }
.bill-vat-body { padding-bottom: var(--space-2); }
.bill-vat-body .sum-rows { margin-bottom: var(--space-2); }
.bill-vat-body .vat-table { margin-top: 0; }

/* kiigazítások, fizetések: panel-rétegen sorok */
.bill-extra .section-title, .bill-extra .bill-block-title { padding-top: var(--space-2); }
.bill-rows { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.bill-row { display: flex; flex-direction: column; gap: 2px; padding: var(--space-2) var(--space-4); border-bottom: 1px solid var(--border); }
.bill-row:last-child { border-bottom: 0; }
.bill-row-main { display: flex; align-items: center; gap: var(--space-2); font-weight: 600; }
.bill-row-label { flex: 1 1 auto; min-width: 0; }
.bill-row-amount { font-family: var(--font-num); font-weight: 600; color: var(--num); white-space: nowrap; }
.bill-row-meta { display: flex; flex-wrap: wrap; gap: 0 var(--space-3); color: var(--muted); font-size: 12.5px; }
.bill-row-reason { color: var(--ink2); font-size: 12.5px; }
.bill-row.is-void { opacity: 0.6; }
.bill-row.is-void .bill-row-amount { text-decoration: line-through; }
.bill-row-action {
  align-self: flex-start; min-height: 44px; padding: 0; background: none; border: 0; color: var(--acc-d); font-size: var(--text-sm); font-weight: 600;
}
.bill-row-action:hover:not(:disabled) { text-decoration: underline; text-underline-offset: 4px; }
.bill-row-action:disabled { opacity: 0.45; }

.bill-foot { margin-top: var(--space-2); }
.bill-foot .hint { margin-top: var(--space-1); font-size: var(--text-xs); }
.bill-foot .notice-banner { margin-top: 0; padding-top: 0; border-top: 0; }

/* alsó művelet-sor: telefonon a fülsáv fölött rögzített (panel-réteg + egyetlen árnyék); balra a hátralék nagy számmal, jobbra a fő gomb */
.bill-bar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); z-index: 12;
  display: flex; flex-direction: column; gap: var(--space-2);
  padding: var(--space-2) calc(var(--space-4) + env(safe-area-inset-right)) var(--space-2) calc(var(--space-4) + env(safe-area-inset-left));
  background: var(--surface); border-top: 1px solid var(--border-strong); box-shadow: var(--shadow-bar);
}
.bill-bar-main { display: flex; align-items: center; gap: var(--space-2); }
.bill-bar-amount { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; line-height: 1.15; }
.bill-bar-label { color: var(--muted); font-size: 12.5px; }
/* a hátralék / végösszeg a számla legnagyobb adata (telefonon 30, széles képernyőn 40 px; az asztalszám 28 / 34 px) */
.bill-bar-value { font-family: var(--font-num); font-size: 30px; font-weight: 300; color: var(--num); white-space: nowrap; letter-spacing: 0.01em; line-height: 1.1; }
.shell[data-route="bill"] .bill-bar { bottom: env(safe-area-inset-bottom); }
.bill-bar .bill-add { flex: none; min-height: 52px; padding-inline: var(--space-3); gap: 4px; }
.bill-line.is-tappable { cursor: pointer; }
.bill-line.is-tappable:hover { background: var(--surface-2); }
.bill-top-row .bill-bar-more { width: 44px; height: 44px; }
.bill-bar-more { flex: none; width: 52px; height: 52px; background: var(--surface-2); border: 1px solid var(--control-line); border-radius: var(--radius); color: var(--text); }
.bill-bar-main .btn-primary, .bill-bar .bill-pay { flex: 0 0 auto; min-height: 52px; padding-inline: var(--space-5); font-size: 17px; font-weight: 600; }
.bill-bar-amount { min-width: 0; overflow: hidden; }
.bill-bar-aux { display: flex; gap: var(--space-2); }
.bill-bar-aux .btn { flex: 1 1 0; min-height: 44px; font-size: var(--text-sm); padding-inline: var(--space-2); }
.bill-select-note { flex: 1 1 auto; margin: 0; color: var(--text); font-size: var(--text-sm); font-weight: 600; }
.bill-bar.is-selecting .btn-primary { min-height: 52px; }

@media (min-width: 900px) {
  .bill-bar { left: var(--nav-w); bottom: 0; align-items: center; padding-inline: var(--space-6); }
  .bill-bar > * { width: 100%; max-width: 560px; }
}

/* két hasáb: bal oldalt a tételek, jobb oldalt a számla-panel (összesítő + művelet-sor), a panel-rétegen */
@media (min-width: 1080px) {
  .bill-view .bill-main { display: grid; grid-template-columns: minmax(0, 1fr) 392px; column-gap: var(--space-5); align-items: start; padding-bottom: 0; }
  .bill-col { display: flex; flex-direction: column; gap: var(--space-3); grid-column: 1; min-width: 0; }
  .bill-col > * { order: 0; }
  .bill-side {
    display: flex; flex-direction: column; grid-column: 2; position: sticky; top: 76px; order: 0;
    background: var(--surface); border-radius: var(--radius); overflow: hidden;
  }
  .bill-side > .bill-summary { order: 0; border-radius: 0; padding: var(--space-3) var(--space-4); }
  .bill-bar { position: static; left: auto; z-index: auto; padding: var(--space-3) var(--space-4) var(--space-4); background: var(--surface); border-top: 1px solid var(--border); box-shadow: none; align-items: stretch; }
  .bill-bar > * { max-width: none; }
  .bill-bar-main .btn-primary, .bill-bar .bill-pay { min-height: 60px; }
  /* a panelben a végösszeg sor: címke 16 / 700, szám 40 px – a számla legnagyobb adata */
  .bill-bar-main { flex-wrap: wrap; }
  .bill-bar-amount { flex: 1 1 100%; flex-direction: row; align-items: baseline; justify-content: space-between; gap: var(--space-3); min-height: 56px; }
  .bill-bar-label { color: var(--text); font-size: 16px; font-weight: 700; }
  .bill-bar-value { font-size: 40px; }
  .bill-bar-main .btn-primary, .bill-bar-main .bill-pay { flex: 1 1 auto; }
}

/* ---------- nyitott számlák: sorok a panel-rétegen ---------- */

.tabs-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-2) var(--space-4); }
.tabs-count { margin: 0; }
/* rendezés: összeérő szegmensek a kártya-rétegen (a kiválasztott: kiválasztás-háttér + 2 px cselekvés-szín keret) */
.tabs-sort { flex: 1 1 300px; max-width: 480px; gap: 0; background: var(--surface-2); border-radius: var(--radius); box-shadow: inset 0 0 0 1px var(--control-line); }
.tabs-sort .seg-btn { position: relative; padding: 0 10px; background: transparent; border: 0; border-radius: var(--radius); box-shadow: none; white-space: nowrap; }
.tabs-sort .seg-btn + .seg-btn::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: var(--border-strong); }
.tabs-sort .seg-btn.is-active { z-index: 1; background: var(--sel-bg); box-shadow: inset 0 0 0 2px var(--accent); }
.tabs-sort .seg-btn.is-active::before, .tabs-sort .seg-btn.is-active + .seg-btn::before { display: none; }
.tabs-view .tab-list { display: block; }
.tab-rows { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.tab-row {
  display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 64px; padding: var(--space-2) var(--space-4);
  background: none; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; color: var(--text); text-align: left;
}
.tab-row:last-child { border-bottom: 0; }
.tab-row:hover { background: var(--surface-2); }
.tab-row:active { background: var(--surface-3); }
.tab-row-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tab-row-head { display: flex; align-items: baseline; gap: var(--space-3); }
.tab-row-table { font-family: var(--font-num); font-size: 20px; font-weight: 600; line-height: 1.15; color: var(--num); }
.tab-row-age { color: var(--muted); font-size: 12.5px; }
.tab-row-meta { display: flex; flex-wrap: wrap; gap: 0 var(--space-3); color: var(--muted); font-size: 12.5px; }
.tab-row-sum { flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.tab-row-remaining { font-family: var(--font-num); font-size: 20px; font-weight: 600; color: var(--num); white-space: nowrap; }
.tab-row-paid { color: var(--muted); font-size: 12px; white-space: nowrap; }
.tabs-empty { display: flex; flex-direction: column; align-items: center; gap: var(--space-2); }

/* Nyitott számlák, széles képernyő (≥ 1100 px): lista + részlet egymás mellett (view_tabs.js) */
.tabs-split { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: var(--space-5); align-items: start; }
.tabs-master { display: flex; flex-direction: column; gap: var(--space-3); min-width: 0; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; }
/* kiválasztott sor: kártya-réteg + bal 3 px cselekvés-szín sáv (nem csak szín) */
.tab-row.is-selected, .tab-row.is-selected:hover { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--primary); }
.tabs-detail { min-width: 0; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; background: var(--bg); border-radius: var(--radius); padding: 0 var(--space-2) 0 0; }
/* a görgethető panelek: vékony, témához illő görgetősáv (nyilak nélkül), a tartalomtól 8 px-re. Szándékosan NINCS scrollbar-width / -color:
   Chrome-ban azok elsőbbséget kapnának, és a vékony sávon a nyilak megmaradnának; a ::-webkit-scrollbar szabályok nyilak nélkül rajzolnak.
   (A scrollbar-color öröklődik a html-ről: itt „auto”-ra állítjuk vissza.) */
.tabs-detail, .tabs-master { scrollbar-color: auto; }
.tabs-detail::-webkit-scrollbar, .tabs-master::-webkit-scrollbar { width: 6px; }
.tabs-detail::-webkit-scrollbar-thumb, .tabs-master::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.tabs-detail::-webkit-scrollbar-button, .tabs-master::-webkit-scrollbar-button { display: none; height: 0; }
.tabs-detail::-webkit-scrollbar-track, .tabs-master::-webkit-scrollbar-track { background: transparent; }
/* beágyazott számla (panel): egy hasáb, az alsó sáv a panel aljához tapad (nem a nézetablakéhoz) */
.bill-view.is-embedded { gap: 0; }
.bill-view.is-embedded .bill-main { display: flex; flex-direction: column; gap: var(--space-3); padding-bottom: 0; align-items: stretch; }
.bill-view.is-embedded .bill-col, .bill-view.is-embedded .bill-side { display: contents; }
.bill-view.is-embedded .bill-col > * { order: 5; }
.bill-view.is-embedded .bill-col > .bill-top { order: 1; }
.bill-view.is-embedded .bill-col > .bill-note { order: 2; }
.bill-view.is-embedded .bill-col > .bill-items { order: 3; }
.bill-view.is-embedded .bill-side > .bill-summary { order: 4; }
.bill-view.is-embedded .bill-col > .bill-foot { order: 7; }
.bill-view.is-embedded .bill-side > .bill-bar {
  order: 9; position: sticky; left: auto; right: auto; bottom: 0; z-index: 3; margin: 0; padding: var(--space-3) var(--space-4);
  background: var(--surface); border-top: 1px solid var(--border-strong); box-shadow: var(--shadow-bar); align-items: stretch;
}
.bill-view.is-embedded .bill-bar > * { width: auto; max-width: none; }
/* a panelben a ragadós sáv egy sor marad (balra a hátralék, jobbra a gombok), hogy kevés tartalmat takarjon; a hátralék akkor is nagyobb az asztalszámnál */
.bill-view.is-embedded .bill-table { font-size: 28px; }
.bill-view.is-embedded .bill-bar-main { flex-wrap: nowrap; }
.bill-view.is-embedded .bill-bar-amount { flex: 1 1 auto; flex-direction: column; align-items: flex-start; justify-content: center; gap: 0; min-height: 0; }
.bill-view.is-embedded .bill-bar-label { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.bill-view.is-embedded .bill-bar-value { font-size: 32px; }
.bill-view.is-embedded .bill-bar-main .btn-primary, .bill-view.is-embedded .bill-bar-main .bill-pay { flex: 0 0 auto; }
@media print {
  .tabs-master, .tabs-view .tabs-toolbar { display: none !important; }
  .tabs-split { display: block; }
  .tabs-detail { position: static; max-height: none; overflow: visible; border: 0; padding: 0; background: none; }
}

/* ---------- törlések: sorok a panel-rétegen, borostyán bal sáv (jóváhagyásra vár) ---------- */

.voids-view .void-list { display: block; }
.void-rows { display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.void-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--border); box-shadow: inset 3px 0 0 var(--amb-b); }
.void-row:last-child { border-bottom: 0; }
.void-row-body { flex: 1 1 18em; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.void-row-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); font-weight: 600; }
.void-row .void-table { color: var(--ink2); font-weight: 600; }
.void-row .void-reason { font-weight: 400; }
.void-row .void-meta { display: flex; flex-wrap: wrap; gap: 0 var(--space-3); color: var(--muted); font-size: 12.5px; }
.void-row { flex-wrap: nowrap; min-height: 56px; cursor: pointer; }
.void-row:hover { background: var(--surface-2); }
.void-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.void-row .void-go { flex: none; width: 18px; height: 18px; color: var(--muted); }
.void-decide .void-links { display: flex; flex-wrap: wrap; align-items: center; column-gap: var(--space-5, 24px); row-gap: var(--space-1, 4px); }
.void-decide .void-bill-link { display: inline-flex; align-items: center; min-height: 44px; color: var(--primary); font-weight: 600; text-decoration: none; }
.void-decide .void-note-add { align-self: flex-start; min-height: 44px; padding: 0; }

/* ---------- Teendők (v8): szakaszonként a beágyazott nézetek; az üres szakasz nem látszik ---------- */
.todo-view { display: flex; flex-direction: column; gap: var(--space-5, 24px); }
.todo-section { display: flex; flex-direction: column; gap: var(--space-2); }
.todo-section[hidden], .todo-empty[hidden] { display: none; }
.todo-head { display: flex; align-items: baseline; gap: var(--space-2); }
.todo-count { color: var(--amb); font-family: var(--font-num); font-weight: 600; }
.todo-body > .page { padding: 0; }

/* fizetés-lap (régi lap-forma): a kijelölt mód a közös kiválasztás-jelölés */
.sheet-pay .seg-btn.is-active { background: var(--sel-bg); border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); color: var(--sel-fg); }

/* ---------- fizetés-képernyő (#/pay): a terv fizetés-képernyője ----------
   Felül a „Fizetendő” címke és a 72 px-es végösszeg (balra zárva), alatta vonal nélküli 35 px-es összesítő sorok; a fizetési mód négy összeérő
   szegmens (kiválasztva 2 px cselekvés-szín keret + félkövér); az átvett összeg süllyesztett mező jobbra zárt nagy számmal, alatta egyenlő
   gyorsgombok; a visszajáró 68 px-es vászon-doboz; alul a rögzített sáv: fő gomb (balra felirat, jobbra összeg) és „Nem adóügyi bizonylat.”.
   Alfolyamat: nincs fülsáv. A lap a panel-rétegen áll, a vezérlők a kártya-rétegen. */

.shell[data-route="pay"] .shell-main { background: var(--surface); }
.pay-view .pay-main { display: flex; flex-direction: column; gap: 0; padding-bottom: 150px; }
.pay-side { display: contents; }
.pay-col { display: flex; flex-direction: column; gap: 0; min-width: 0; order: 2; }
.pay-side > .pay-summary { order: 1; }
.pay-side > .pay-bar { order: 3; }

.pay-summary { display: flex; flex-direction: column; gap: 0; padding: 0 0 var(--space-3); background: none; border: 0; border-bottom: 1px solid var(--border); }
.pay-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-3); padding-bottom: var(--space-2); }
.pay-table { font-family: var(--font-num); font-size: 20px; font-weight: 600; color: var(--num); }
.pay-tabno { color: var(--muted); font-size: 12.5px; }
@media (max-width: 1079px) { .pay-head { display: none; } }          /* telefonon az asztal a felső sávban áll */
.pay-total {
  display: flex; flex-direction: column; align-items: flex-start; gap: 0; margin-bottom: var(--space-2); padding: 18px 16px;
  border-radius: 22px; background: var(--hero); box-shadow: var(--hero-sh); color: var(--on-hero);
}
.pay-total-label { color: var(--on-hero-2); font-size: 13.5px; }
.pay-total-value .ft { color: var(--on-hero-2); }
.pay-total-value { font-family: var(--font-num); font-size: var(--text-hero); font-weight: 200; line-height: 1.05; letter-spacing: -0.02em; color: var(--on-hero); white-space: nowrap; }
.pay-total-value .ft { font-size: 0.42em; }
.pay-rows { display: flex; flex-direction: column; gap: 0; margin: 0; padding: var(--space-2) 0 0; border-top: 1px solid var(--border); }
.pay-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: 35px; min-width: 0; font-size: 14px; }
.pay-row dt { color: var(--ink2); min-width: 0; }
.pay-row dd { margin: 0; font-family: var(--font-num); font-size: 15.5px; font-weight: 600; color: var(--num); white-space: nowrap; }
.pay-void-warn { margin: var(--space-2) 0 0; padding: var(--space-2) var(--space-3); border-radius: var(--radius); background: var(--warn-bg); color: var(--warn); font-size: 13.5px; font-weight: 600; }
.pay-remaining { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 35px; }
.pay-remaining-label { font-size: 14px; color: var(--text); font-weight: 600; }
.pay-remaining-value { font-family: var(--font-num); font-size: 15.5px; font-weight: 600; color: var(--num); white-space: nowrap; }

.pay-block { display: flex; flex-direction: column; gap: var(--space-2); padding: var(--space-3) 0; border-bottom: 1px solid var(--border); }
.pay-block-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-1) var(--space-3); min-height: 32px; }
.pay-block-title { margin: 0; }
.pay-current { color: var(--muted); font-size: 12.5px; }
.pay-tools { display: flex; flex: 1 1 100%; gap: var(--space-2); }
.pay-tools .btn { flex: 1 1 0; min-height: 44px; gap: 6px; padding-inline: var(--space-2); font-size: var(--text-sm); white-space: nowrap; }
.pay-tools .icon, .pay-apply .icon { width: 18px; height: 18px; }
/* a ritka műveletek: szöveges gomb (cselekvés-szín, keret nélkül) */
.pay-more { gap: 4px; min-height: 44px; padding: 0 var(--space-1); background: none; border-color: transparent; color: var(--acc-d); font-size: 15px; }
.pay-more:hover:not(:disabled) { background: none; text-decoration: underline; text-underline-offset: 4px; }
.pay-more .icon { width: 18px; height: 18px; }

/* fizetési mód (V22): külön kártyák, telefonon 2 egyforma oszlop (7 px köz, egy soron belül azonos magasság), szélesebben 4;
   kiválasztva TELT cselekvés-szín + 2 px keret + félkövér (alak és vastagság, nem csak szín) */
.pay-modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
@media (min-width: 600px) { .pay-modes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.pay-mode {
  position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 8px; min-height: 50px; min-width: 0; padding: 0 12px;
  background: var(--surface-2); border: 1px solid var(--tile-line); border-radius: var(--radius); box-shadow: var(--shadow-card); color: var(--text); text-align: left;
}
.pay-mode:hover:not(.is-selected) { background: var(--surface-3); }
.pay-mode-icon { display: inline-flex; flex: none; color: var(--muted); }
.pay-mode-icon .icon { width: 18px; height: 18px; }
.pay-mode.is-selected .pay-mode-icon { color: inherit; }
.pay-mode-label { font-size: clamp(12px, 3.25vw, 14px); font-weight: 600; line-height: 1.15; letter-spacing: -0.005em; white-space: nowrap; }
.pay-mode-check { display: none; }
.pay-mode.is-selected { background: var(--primary); border: 2px solid var(--accent); color: var(--on-primary); z-index: 1; }
.pay-mode.is-selected .pay-mode-label { font-weight: 700; }

/* átvett összeg (süllyesztett mező, jobbra zárt nagy szám), gyors-összegek (egyenlő oszlopok), visszajáró (68 px-es vászon-doboz) */
.pay-amount { border-bottom: 0; }
.pay-amount .check-row { margin-top: 0; min-height: 44px; }
.pay-amount .field { margin-top: 0; gap: 6px; }
.pay-amount .field-label { color: var(--ink2); font-size: 13px; font-weight: 600; }
.pay-amount .input-amount { min-height: 56px; padding: 0 var(--space-4); background: var(--field-bg); text-align: right; font-size: 30px; }
.pay-amount .input-amount::placeholder { font-size: 17px; }
.pay-cash { display: flex; flex-direction: column; gap: var(--space-2); }
.pay-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 6px; }
.pay-quick:empty { display: none; }
.pay-quick .chip {
  justify-content: center; min-height: 48px; padding: 0 4px; background: var(--surface-2); border: 1px solid var(--control-line); border-radius: var(--radius);
  color: var(--text); font-family: var(--font-num); font-size: 15px; font-weight: 600; white-space: nowrap;
}
.pay-quick .chip:first-child { font-family: var(--font); font-size: 13.5px; }
.pay-quick .chip.is-selected { background: var(--surface-2); border: 2px solid var(--text); box-shadow: none; color: var(--num); }
.pay-change {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 68px; margin: 0; padding: 0 var(--space-4);
  background: var(--bg); border: 0; border-radius: var(--radius);
}
.pay-change-label { color: var(--text); font-size: 15px; font-weight: 600; }
.pay-change-value { font-family: var(--font-num); font-size: 38px; font-weight: 300; line-height: 1; letter-spacing: 0.01em; color: var(--num); white-space: nowrap; }
.pay-change-value .ft { font-size: 0.4em; }
.pay-change:not(.has-value) .pay-change-value { color: var(--muted); font-size: 22px; }
/* a fizetés-eredmény lapján (view_bill.js) a visszajáró egyszerű, nagy szöveg */
.result .pay-change { display: block; min-height: 0; padding: 0; background: none; font-family: var(--font-num); font-size: var(--text-xl); font-weight: 600; color: var(--num); }

/* százalék-gyorsgombok (kedvezmény, szervizdíj): egy sorban, ha elférnek, különben törnek */
.pay-pcts { display: flex; flex-wrap: wrap; gap: 6px; }
.pct {
  flex: 1 1 4.2em; min-height: 44px; padding: 0 var(--space-2); background: var(--surface-2); border: 1px solid var(--control-line); border-radius: var(--radius);
  color: var(--text); font-family: var(--font-num); font-weight: 600; white-space: nowrap;
}
.pct:hover:not(:disabled) { background: var(--surface-3); }
.pct.is-selected, .pct.is-selected:hover { background: var(--sel-bg); border: 2px solid var(--accent); color: var(--sel-fg); }
.pct:disabled { opacity: 0.4; cursor: not-allowed; text-decoration: line-through; }
.pay-reset { align-self: flex-start; }
.pay-discount .field, .pay-service .field { margin-top: 0; }
.pay-reason .chip-row { margin: 0; }
.pay-discount-preview { margin: 0; min-height: 1.4em; color: var(--text); font-weight: 600; }
.pay-discount-preview.is-err { color: var(--warn); }
.pay-limit { margin: 0; }
.pay-apply-row { display: flex; }
.pay-apply { gap: 6px; flex: 1 1 auto; }

/* kedvezmény és szervizdíj: egy összecsukható sor, alapból zárva */
.pay-collapse { border-bottom: 1px solid var(--border); }
.pay-collapse-toggle {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-2); width: 100%; min-height: 52px; padding: var(--space-2) 0;
  background: none; border: 0; color: var(--text); font-weight: 600; text-align: left;
}
.pay-collapse-title { grid-column: 1; }
.pay-collapse-summary { grid-column: 1; min-width: 0; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.pay-chev { grid-column: 2; grid-row: 1 / span 2; width: 8px; height: 8px; margin-right: 6px; border-right: 2px solid var(--ink2); border-bottom: 2px solid var(--ink2); transform: rotate(45deg) translate(-2px, -2px); }
.pay-collapse-toggle.is-open .pay-chev { transform: rotate(-135deg) translate(-2px, -2px); }
.pay-collapse-body { display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-2) 0 var(--space-4); }
.pay-collapse-body[hidden] { display: none; }
.pay-collapse-body .pay-block { padding: 0; border-bottom: 0; }

.pay-state { margin-top: var(--space-2); }
.pay-foot { margin-top: var(--space-3); }
/* a „Nem adóügyi bizonylat.” a fő gomb alatt áll (a sávban); a lap alján nem ismétlődik */
.pay-main:has(.pay-bar) .pay-foot .notice-banner { display: none; }

/* alsó sáv: a fő gomb (56 px; balra „Fizetek”, jobbra az összeg) és alatta a lábjegyzet; a rögzített sáv fölött az egyetlen árnyék */
.pay-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 12;
  display: flex; flex-direction: column; align-items: stretch; gap: 6px;
  padding: var(--space-3) calc(var(--space-4) + env(safe-area-inset-right)) calc(var(--space-2) + env(safe-area-inset-bottom)) calc(var(--space-4) + env(safe-area-inset-left));
  background: var(--surface); border-top: 1px solid var(--border-strong); box-shadow: var(--shadow-bar);
}
.pay-btn { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); width: 100%; min-height: 56px; padding: 0 var(--space-5); font-size: 17px; font-weight: 600; white-space: nowrap; }
.pay-btn-amount { font-family: var(--font-num); font-size: 18px; font-weight: 600; letter-spacing: 0.01em; }
.pay-btn:disabled { opacity: 1; }
.pay-bar-note { margin: 0; text-align: center; color: var(--muted); font-size: 12.5px; }

@media (min-width: 900px) {
  .pay-bar { left: var(--nav-w); align-items: center; padding-inline: var(--space-6); }
  .pay-bar > * { width: 100%; max-width: 560px; }
}

/* széles képernyő: bal oldalt a döntések, jobb oldalt a sticky számla-panel (összesítő + fő gomb) */
@media (min-width: 1080px) {
  .shell[data-route="pay"] .shell-main { background: var(--bg); }
  .pay-view .pay-main { display: grid; grid-template-columns: minmax(0, 1fr) 392px; column-gap: var(--space-5); align-items: start; padding-bottom: 0; }
  .pay-side {
    display: flex; flex-direction: column; grid-column: 2; grid-row: 1; position: sticky; top: 76px;
    background: var(--surface); border-radius: var(--radius); overflow: hidden;
  }
  .pay-side > .pay-summary { padding: var(--space-4) var(--space-4) var(--space-3); }
  .pay-col { grid-column: 1; grid-row: 1; order: 0; padding: 0 var(--space-5) var(--space-4); background: var(--surface); border-radius: var(--radius); }
  .pay-bar { position: static; padding: var(--space-3) var(--space-4) var(--space-4); background: var(--surface); border-top: 0; box-shadow: none; }
  .pay-bar > * { max-width: none; }
  .pay-btn { min-height: 60px; }
  .pay-total-value { font-size: 56px; }
}

@media print { .pay-view > :not(.print-area) { display: none !important; } }

/* ---------- rendelés-felvétel (view_order.js): a H3 / H3-S2 terv klasszikus pénztár-elrendezése ----------
   Telefon (< 1100 px): a felső sávhoz tapadó, aláhúzott kategória-fülsor (pont + név; a kiválasztott alatt 3 px sáv a kategória színével,
   a végén kereső-gomb), alcsoport-címek, két oszlopos termékgombok (84 px), alul rögzített kosár-sáv (az asztal számlája + az új tételek +
   „Küldés”), a számla felhúzható lapon. Széles képernyő (≥ 1100 px): kategória-lista (192 px) | termékgombok (alul „Gyors gombok”) |
   számla-panel (340–392 px), a képernyő magasságában, oszloponként görgetve.
   A termékgomb bal sávja és halvány tónusa a kategória színe (--c-* / --t-*: style.css, mindkét módra); a kosárban lévő gomb: 2 px
   cselekvés-szín keret (a sáv marad) + darabszám (széles) / léptető (telefon); elfogyott: kitöltés nélkül, --border-strong sávval. */

.order-view { --gutter: 12px; padding-bottom: 132px; }
@media (min-width: 900px) { .order-view { --gutter: 16px; } }
.order-layout { display: block; }
.order-products { min-width: 0; }

/* kategóriák – telefon: aláhúzott fülsor a panel-rétegen, vízszintesen görgethető (a jobb szélen a következő név levágva) */
.order-cats {
  position: sticky; top: var(--topwrap-h, 52px); z-index: 6; display: flex; align-items: stretch;
  margin: 0 calc(-1 * var(--gutter)); padding-left: calc(var(--gutter) - var(--space-3)); background: var(--surface); border-bottom: 1px solid var(--border);
}
.cat-chips { flex: 1 1 auto; display: flex; min-width: 0; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip {
  --tile-color: var(--c-gy); --tile-bg: var(--t-gy);
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 var(--space-3);
  background: transparent; border: 0; border-radius: 0; color: var(--ink2); font-size: 14.5px; font-weight: 600; white-space: nowrap; text-align: left;
}
.cat-dot { flex: none; width: 8px; height: 8px; border-radius: 2px; background: var(--tile-color); }
.cat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.cat-count { display: none; color: var(--muted); font-family: var(--font); font-size: 13px; font-weight: 400; }
.cat-chip:hover { color: var(--text); }
.cat-chip.is-active { color: var(--text); font-weight: 700; }
.cat-chip.is-active::after { content: ""; position: absolute; left: var(--space-3); right: var(--space-3); bottom: 0; height: 3px; background: var(--tile-color); }
.order-search-btn { flex: none; width: 44px; height: 44px; min-height: 44px; border-radius: 0; color: var(--ink2); }
.order-search-btn[aria-expanded="true"] { color: var(--primary); }
.order-cats-edit { display: none; }
/* V22 (telefon, tablet): a kategóriák kapszulák a vásznon (a minta szerint); a kiválasztott a cselekvés-színnel kitöltve, félkövér (nem csak szín) */
@media (max-width: 1099px) {
  .order-cats { align-items: center; padding: 8px 0 8px var(--gutter); background: color-mix(in srgb, var(--bg) 86%, transparent); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); border-bottom: 0; }
  .cat-chips { gap: 6px; }
  .cat-chip { min-height: 38px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--surface-2); border: 1px solid var(--control-line); font-size: 14px; }
  .cat-chip.is-active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
  .cat-chip.is-active::after { content: none; }
  .order-search-btn { border-radius: var(--radius-pill); }
}

/* a terméklap feje: telefonon csak a kereső (a nagyító-gombra, illetve keresés közben) */
.order-head { display: flex; align-items: center; gap: var(--space-4); }
.order-cat-title { display: none; align-items: baseline; gap: var(--space-2); min-width: 0; margin: 0; font-size: 18px; font-weight: 700; }
.order-cat-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-cat-count { flex: none; color: var(--muted); font-size: 13px; font-weight: 400; }
.order-search { position: relative; flex: 1 1 auto; padding: var(--space-2) 0 0; }
.order-search > .icon { position: absolute; left: 12px; bottom: 13px; width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.order-search .input-search { position: static; min-height: 44px; padding-left: 38px; font-size: 15px; }
.order-view:not(.is-searching) .order-search { display: none; }

/* alcsoport-cím: 30 px, név 13 / 600 --ink2, darabszám --muted, utána a sor végéig futó vonal */
.order-view .dest-group + .dest-group { margin-top: 6px; }
.order-view .dest-title { display: flex; align-items: center; gap: 6px; min-height: 30px; margin: var(--space-1) 0 0; font-size: 13px; font-weight: 600; color: var(--ink2); }
.order-view .dest-title::after { content: ""; flex: 1 1 auto; height: 1px; margin-left: var(--space-1); background: var(--border); }
.dest-name { font-size: 13px; font-weight: 600; }
.dest-count { color: var(--muted); font-size: 13px; font-weight: 400; }
.product-list { padding-top: var(--space-2); }
.product-list > .state { padding-top: var(--space-6); }

/* termékgombok: telefonon két egyforma oszlop, egyforma magassággal (V22: 94 px), szélesebben automatikusan több */
.product-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2); }
@media (min-width: 600px) { .product-tiles { grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); } }
.ptile-cell { position: relative; display: flex; min-width: 0; }
.ptile {
  --tile-color: var(--c-gy); --tile-bg: var(--t-gy);
  position: relative; display: flex; flex: 1 1 auto; flex-direction: column; align-items: stretch; gap: 1px;
  min-width: 0; min-height: 94px; padding: 10px;
  background: var(--tile-bg); border: 1px solid var(--tile-line);
  border-radius: 16px; box-shadow: var(--shadow-card); color: var(--text); text-align: left; transition: background-color var(--ease);
}
.ptile:active:not(:disabled) { background: var(--bg); }
.ptile-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; line-height: 1.3; }
.ptile-sub { display: flex; gap: 0 6px; min-width: 0; overflow: hidden; white-space: nowrap; color: var(--muted); font-size: 12px; line-height: 1.35; }
.ptile-serving { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ptile-flag { color: var(--muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.ptile-sub .ptile-flag { font-weight: 400; }
.ptile-sub .ptile-serving + .ptile-flag::before { content: "· "; }
.ptile-flag.is-out { color: var(--red); }
.ptile-flag.is-low { color: var(--amb); }
.ptile-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-2); margin-top: auto; padding-top: var(--space-1); }
.ptile-price { margin-left: auto; color: var(--num); font-family: var(--font-num); font-size: 17px; font-weight: 600; line-height: 1.1; white-space: nowrap; }
/* kosárban: 2 px cselekvés-szín keret (a jelölő sáv megmarad), sötétben a halvány kék pár, világosban fehér */
.ptile.is-in-cart { padding: 9px; background: var(--tile-sel-bg); border: 2px solid var(--primary); }
.ptile-badge {
  position: absolute; top: -2px; right: -2px; display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; padding: 0 6px;
  border-radius: 0 16px 0 var(--radius-sm); background: var(--primary); color: var(--on-primary); font-family: var(--font-num); font-size: 15px; font-weight: 600;
}
/* elfogyott: kitöltés nélkül, a jelölő sáv a vonal színe, név és ár halvány; nem koppintható */
.ptile.is-unavailable { background: transparent; border: 1px solid var(--border-strong); box-shadow: none; cursor: not-allowed; }
.ptile.is-unavailable .ptile-name, .ptile.is-unavailable .ptile-price, .ptile.is-unavailable .ptile-sub { color: var(--dis); }
/* telefonon a kosárban lévő gombon alul balra léptető (a gomb fölött álló külön elem, a névvel egy vonalban; 30 px magas,
   34 px-es gombok, az érintési cél függőlegesen 44 px; szélessége 102 px) */
.ptile-step {
  position: absolute; left: 11px; bottom: 9px; z-index: 1; display: flex; align-items: stretch; height: 30px;
  border: 1px solid var(--primary); border-radius: var(--radius-sm); background: var(--field-bg);
}
.ptile-step-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; padding: 0; border: 0; background: transparent; color: var(--primary); }
.ptile-step-btn::after { content: ""; position: absolute; left: 0; right: 0; top: -7px; bottom: -7px; }
.ptile-step-btn .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.ptile-step-val { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); color: var(--num); font-size: 15px; }
.ptile.is-in-cart .ptile-state { visibility: hidden; }
@media (max-width: 1099px) {
  .ptile-badge { display: none; }
  /* A léptető és az ár soha nem takarhatja egymást. A kosárban lévő gomb rácsa: név | kiszerelés + ár | (léptető helye).
     Alapból az ár a léptető fölé, a kiszerelés sorának jobb végére kerül; ha a gomb elég széles az ár hosszához (data-pw:
     számjegyek), az ár lent jobbra, a léptető mellett áll (h3_spec 2.6). Küszöb: 15 (bal) + 102 (léptető) + 8 (köz) + az ár
     szélessége + 11 (jobb margó) px, néhány px tartalékkal. */
  .ptile-cell { container: ptile / inline-size; }
  .ptile.is-in-cart {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto minmax(0, 1fr); align-content: stretch; column-gap: var(--space-2); row-gap: 1px;
  }
  .ptile.is-in-cart .ptile-name { grid-column: 1 / -1; }
  .ptile.is-in-cart .ptile-sub { grid-row: 2; grid-column: 1 / var(--ptile-sub-end, 2); }
  .ptile.is-in-cart .ptile-foot { display: contents; }
  .ptile.is-in-cart .ptile-foot > :not(.ptile-price) { display: none; }
  .ptile.is-in-cart .ptile-price { grid-row: var(--ptile-price-row, 2); grid-column: 2; align-self: var(--ptile-price-align, center); margin: 0; line-height: 1; }
  @container ptile (min-width: 182px) { .ptile-cell[data-pw="3"] > .ptile { --ptile-price-row: 3; --ptile-price-align: end; --ptile-sub-end: -1; } }
  @container ptile (min-width: 196px) { .ptile-cell[data-pw="4"] > .ptile { --ptile-price-row: 3; --ptile-price-align: end; --ptile-sub-end: -1; } }
  @container ptile (min-width: 206px) { .ptile-cell[data-pw="5"] > .ptile { --ptile-price-row: 3; --ptile-price-align: end; --ptile-sub-end: -1; } }
  @container ptile (min-width: 216px) { .ptile-cell[data-pw="6"] > .ptile { --ptile-price-row: 3; --ptile-price-align: end; --ptile-sub-end: -1; } }
  @container ptile (min-width: 230px) { .ptile-cell[data-pw="7"] > .ptile { --ptile-price-row: 3; --ptile-price-align: end; --ptile-sub-end: -1; } }
}

/* „Gyors gombok”: csak széles képernyőn (telefonon a „Gyakori” kategória ugyanez) */
.order-quick { display: none; }
.order-quick-title { margin: 0 0 var(--space-2); font-size: 13px; font-weight: 600; color: var(--ink2); }
/* hat oszlop, ha elfér (legalább 112 px); keskenyebben csak egy sor látszik (a többi gomb a „Gyakori” kategóriában van) */
.quick-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); grid-template-rows: auto; grid-auto-rows: 0; row-gap: 0; column-gap: var(--space-2); overflow: hidden; }
.qbtn {
  --tile-color: var(--c-gy); --tile-bg: var(--t-gy);
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px; min-width: 0; min-height: 54px; padding: 6px 8px 6px 11px;
  background: var(--tile-bg); border: 1px solid var(--tile-line); border-left: 4px solid var(--tile-color); border-radius: 2px var(--radius) var(--radius) 2px;
  color: var(--text); text-align: left;
}
.qbtn:active:not(:disabled) { background: var(--bg); }
.qbtn-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; font-weight: 600; line-height: 1.25; }
.qbtn-price { color: var(--ink2); font-family: var(--font-num); font-size: 14.5px; font-weight: 600; line-height: 1.2; white-space: nowrap; }
.qbtn.is-unavailable { background: transparent; border-color: var(--border-strong); color: var(--dis); }
.qbtn.is-unavailable .qbtn-price { color: var(--dis); }

/* kosár-sáv (telefon, v8): egy sor – balra „T1 számla ˄” + egy összeg (koppintva nyílik a számla lapja), jobbra az EGY fő gomb */
.cart-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: var(--space-3); min-height: 76px;
  padding: var(--space-2) calc(var(--space-4) + env(safe-area-inset-right)) calc(var(--space-2) + env(safe-area-inset-bottom)) calc(var(--space-4) + env(safe-area-inset-left));
  background: var(--surface); border-top: 1px solid var(--border-strong); box-shadow: var(--shadow-bar);
}
.cart-bar.bump { animation: bump 0.35s ease; }
@keyframes bump { 50% { transform: translateY(-6px); } }
@media (min-width: 900px) and (max-width: 1099px) { .shell.is-main .cart-bar, .shell.is-main .order-cart { left: var(--nav-w); } }
.cart-bar-bill {
  flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; min-height: 52px; padding: 0;
  background: none; border: 0; color: var(--text); text-align: left;
}
.cart-bar-bill-name { display: inline-flex; align-items: center; gap: 4px; color: var(--ink2); font-size: 12.5px; font-weight: 600; }
.cart-bar-bill-name .icon { width: 14px; height: 14px; }
.cart-bar-bill-total { color: var(--num); font-family: var(--font-num); font-size: 24px; font-weight: 600; line-height: 1.1; white-space: nowrap; }
.cart-bar-tag { color: var(--amb); font-size: 12px; font-weight: 600; }
.cart-bar-send { flex: none; min-width: 148px; min-height: 52px; padding: 0 var(--space-4); }

/* számla-panel: telefonon alulról felhúzható lap, széles képernyőn állandó jobb oldali oszlop */
.order-cart {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; flex-direction: column; max-height: 88vh; overflow: hidden;
  background: var(--surface); border-radius: var(--radius-lg) var(--radius-lg) 0 0; box-shadow: var(--shadow-float);
  visibility: hidden; transform: translateY(100%); transition: transform 0.2s ease, visibility 0.2s;
}
.order-cart.is-open { visibility: visible; transform: translateY(0); }
.order-bill-head { flex: none; display: flex; align-items: center; gap: var(--space-3); min-height: 70px; padding: var(--space-2) var(--space-3) var(--space-2) var(--space-4); border-bottom: 1px solid var(--border); }
.order-bill-head .bill-table { font-size: 34px; }
.order-bill-head .bill-who { flex: 1 1 auto; }
.order-bill-head .bill-top-spacer { display: none; }
.order-more { flex: none; width: 44px; height: 44px; background: var(--surface-2); border: 1px solid var(--control-line); border-radius: var(--radius); color: var(--text); }
.cart-close { flex: none; }
.order-tools { flex: none; display: flex; border-bottom: 1px solid var(--border); }
.order-tool {
  flex: 1 1 0; min-width: 0; min-height: 44px; padding: 0 var(--space-1); background: transparent; border: 0; border-radius: 0;
  color: var(--ink2); font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.order-tool + .order-tool { border-left: 1px solid var(--border); }
.order-tool:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.order-tool:disabled { color: var(--dis); }
.order-cart .cart-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* a görgethető oszlopok: vékony, témához illő görgetősáv nyilak nélkül (mint a nyitott számlák panelje) */
.order-cart .cart-body, .order-view .product-list, .order-view .order-cats { scrollbar-color: auto; }
.order-cart .cart-body::-webkit-scrollbar, .order-view .product-list::-webkit-scrollbar, .order-view .order-cats::-webkit-scrollbar { width: 6px; }
.order-cart .cart-body::-webkit-scrollbar-thumb, .order-view .product-list::-webkit-scrollbar-thumb, .order-view .order-cats::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 3px; }
.order-cart .cart-body::-webkit-scrollbar-button, .order-view .product-list::-webkit-scrollbar-button, .order-view .order-cats::-webkit-scrollbar-button { display: none; height: 0; }
.order-cart .cart-body::-webkit-scrollbar-track, .order-view .product-list::-webkit-scrollbar-track, .order-view .order-cats::-webkit-scrollbar-track { background: transparent; }
.order-cart .cart-body > .bill-note { margin: var(--space-2) var(--space-4); }
.order-cart .cart-body > .state { padding: var(--space-5) var(--space-4); font-size: var(--text-sm); }
.order-cart .cart-body > .result, .order-cart .cart-body > .notice-banner, .order-cart .cart-body > .result-actions { margin: var(--space-3) var(--space-4) 0; }
.order-cart .cart-body > .result-actions:last-child { margin-bottom: var(--space-4); }
/* elküldött körök: csoportfej a vásznon pipával és a kör összegével; a sorok halványabban (név --ink2, nem szerkeszthetők) */
.order-cart .bill-groups { border-radius: 0; }
.order-cart .bill-line { grid-template-columns: 30px minmax(0, 1fr) auto; padding-right: var(--space-4); }
.order-cart .bill-line-sub { grid-column: 2 / -1; }
/* új tételek: csoportfej a halvány kék páron, sorok a leghalványabb páron 3 px cselekvés-szín sávval, léptetővel */
.order-new-head {
  display: flex; align-items: center; gap: var(--space-2); min-height: 30px; padding: 0 var(--space-4);
  background: var(--acc-t); color: var(--acc-l); font-size: 12.5px; font-weight: 600;
}
.order-new-tags { font-weight: 400; }
.order-new-sum { margin-left: auto; font-family: var(--font-num); font-size: 13px; font-weight: 600; white-space: nowrap; }
.order-cart .cart-lines { display: flex; flex-direction: column; }
.order-cart .cart-line {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; column-gap: var(--space-3); min-height: 54px;
  padding: var(--space-2) var(--space-4); background: var(--acc-w); border-bottom: 1px solid var(--border); box-shadow: inset 3px 0 0 var(--primary);
}
.order-cart .cart-line.is-unavailable { box-shadow: inset 3px 0 0 var(--err); }
.cart-line-main { display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 44px; padding: 0; background: none; border: 0; color: var(--text); text-align: left; }
.cart-line-name { overflow-wrap: anywhere; font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.cart-line-sub { display: flex; flex-wrap: wrap; gap: 0 6px; color: var(--muted); font-size: 12px; line-height: 1.35; }
.cart-line-note { font-style: italic; }
.cart-line-price { color: var(--num); font-family: var(--font-num); font-size: 15.5px; font-weight: 600; white-space: nowrap; text-align: right; }
.cart-line-warn { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); flex-wrap: wrap; }
/* a sor léptetője: három összeérő rész, 1 px cselekvés-szín keret, 6 px sarok, süllyesztett háttér (36 px magas) */
.order-cart .cart-line .stepper { gap: 0; height: 36px; border: 1px solid var(--primary); border-radius: var(--radius-sm); background: var(--field-bg); overflow: hidden; }
.order-cart .cart-line .btn-step { width: 34px; min-width: 34px; height: 34px; min-height: 34px; border: 0; border-radius: 0; background: transparent; color: var(--primary); }
.order-cart .cart-line .btn-step .icon { width: 16px; height: 16px; stroke-width: 2.2; }
.order-cart .cart-line .stepper-value { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; border-left: 1px solid var(--border); border-right: 1px solid var(--border); font-size: 15.5px; }
/* v8: egy összeg („Fizetendő”, alatta kis szöveggel: szervizdíjjal) és EGY fő gomb a teljes szélességben */
.order-cart .cart-foot { flex: none; padding: var(--space-2) var(--space-4) calc(var(--space-2) + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
.order-sum .sum-row { min-height: 26px; padding: 2px 0; font-size: 14px; }
.order-sum .sum-label { color: var(--ink2); }
.order-sum .sum-detail { margin-left: 6px; color: var(--muted); }
.order-sum .sum-detail::before { content: "· "; }
.order-sum .sum-value { color: var(--num); font-size: 15px; }
.order-cart .cart-total { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: 56px; margin-top: var(--space-1); border-top: 1px solid var(--border); }
.cart-total-label { display: flex; flex-direction: column; color: var(--text); font-size: 16px; font-weight: 700; }
.cart-total-sub { color: var(--muted); font-size: 12px; font-weight: 500; }
.cart-total-amount { font-family: var(--font-num); font-size: 32px; font-weight: 400; line-height: 1; letter-spacing: 0.01em; color: var(--num); white-space: nowrap; }
.cart-total-amount .ft { font-size: 0.42em; }
.order-cart .cart-foot .hint { margin: 0 0 var(--space-1); font-size: 12.5px; }
.order-cart .cart-foot .cart-offline-note { color: var(--warn); }
.order-actions { display: flex; gap: var(--space-2); margin-top: var(--space-2); }
.order-actions .btn { min-height: 52px; }
.order-actions .btn-primary { flex: 1 1 auto; }
.order-send { flex: 1 1 auto; min-width: 0; justify-content: center; gap: var(--space-2); padding: 0 var(--space-4); white-space: nowrap; }
.order-send.has-count { justify-content: space-between; }
.order-send-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.order-send-count { flex: none; font-family: var(--font-num); font-size: 15px; font-weight: 600; opacity: 0.85; }
.order-send.has-count:only-child { justify-content: center; }
.order-send:only-child .order-send-count { margin-left: var(--space-3); }
.order-cart .cart-foot .notice-banner { padding-top: var(--space-1); text-align: center; }
.sheet-order-options .order-options-links { margin-top: var(--space-4); }
.cart-total-note { margin: 0; }

/* ---------- széles képernyő (≥ 1100 px): kategória-lista | termékgombok | számla-panel, a képernyő magasságában ---------- */
@media (min-width: 1100px) {
  .shell.is-main[data-route="order"] .view { max-width: none; padding: 0; }
  .order-view { height: calc(100vh - var(--topwrap-h, 52px)); padding-bottom: 0; }
  .order-layout { display: grid; grid-template-columns: minmax(0, 1fr) clamp(360px, 28vw, 392px); height: 100%; }
  .order-layout.has-cats { grid-template-columns: 192px minmax(0, 1fr) clamp(360px, 28vw, 392px); }
  .order-layout:not(.has-cats) .order-cats { display: none; }
  /* kategória-lista: 58 px-es sorok a vásznon; kiválasztva a kategória tónusa (világosban fehér), a pont a bal szélen 4 px-es sávvá nyúlik */
  .order-cats { position: static; flex-direction: column; margin: 0; padding: 0; min-height: 0; overflow-y: auto; background: var(--bg); border-bottom: 0; border-right: 1px solid var(--border); }
  .cat-chips { flex: none; flex-direction: column; overflow: visible; }
  .cat-chip { display: flex; gap: 10px; width: 100%; min-height: 58px; padding: 0 var(--space-4); border-bottom: 1px solid var(--border); font-size: 15px; }
  .cat-name { flex: 1 1 auto; }
  .cat-count { display: inline; }
  .cat-chip:hover:not(.is-active) { background: var(--surface); }
  .cat-chip.is-active { z-index: 1; margin-right: -1px; background: var(--tile-bg); }
  .cat-chip.is-active::after { left: 0; right: auto; top: 0; bottom: 0; width: 4px; height: auto; }
  .cat-chip.is-active .cat-dot { visibility: hidden; }
  .order-search-btn { display: none; }
  .order-cats-edit {
    display: flex; align-items: center; min-height: 44px; margin-top: auto; padding: 0 var(--space-4); border-top: 1px solid var(--border);
    color: var(--ink2); font-size: 13px; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .order-cats-edit:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
  /* terméklap: fej (kategória-cím + darabszám, jobbra a kereső), görgethető gomb-rács (4 oszlop, 76 px), alul rögzített „Gyors gombok” */
  .order-products { display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
  .order-head { flex: none; justify-content: space-between; padding: var(--space-3) var(--space-4) var(--space-1); }
  .order-cat-title { display: flex; flex: none; max-width: 55%; }
  .order-search { flex: 0 1 340px; min-width: 160px; padding: 0; }
  .order-search > .icon { bottom: 9px; }
  .order-view:not(.is-searching) .order-search { display: block; }
  .order-search .input-search { min-height: 36px; font-size: 14px; }
  .product-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 0 var(--space-4) var(--space-4); }
  .product-tiles { grid-template-columns: repeat(auto-fill, minmax(164px, 1fr)); }
  .ptile { min-height: 76px; }
  .ptile.is-in-cart .ptile-name { padding-right: 22px; }
  .ptile-step { display: none; }
  .ptile.is-in-cart .ptile-state { visibility: visible; }
  .order-quick:not([hidden]) { display: block; flex: none; padding: var(--space-2) var(--space-4) var(--space-3); background: var(--surface); border-top: 1px solid var(--border); }
  /* számla-panel: teljes magasságú oszlop a panel-rétegen */
  .order-cart {
    position: static; z-index: auto; max-height: none; height: 100%; min-height: 0; border-radius: 0; box-shadow: none; border-left: 1px solid var(--border);
    visibility: visible; transform: none; transition: none;
  }
  .cart-bar, .cart-close { display: none; }
  .order-actions .btn { min-height: 60px; }
  .cart-total-amount { font-size: 40px; }
}
/* kisebb fekvő tablet (1100–1279 px): keskenyebb kategória-lista, tömörebb művelet-sor, hogy a terméklap két-három oszlopos maradjon */
@media (min-width: 1100px) and (max-width: 1279px) {
  .order-layout.has-cats { grid-template-columns: 176px minmax(0, 1fr) 360px; }
  .cat-chip { padding: 0 var(--space-3); }
  .order-cats-edit { padding: 0 var(--space-3); font-size: 12.5px; }
  .order-tool { font-size: 12.5px; }
  .order-pay { flex-basis: 104px; }
  .order-send { padding: 0 var(--space-3); font-size: 16px; }
}

/* v8 (3. ütem): a Teendők az Áttekintés tetején (beágyazva): kis cím, üresen egy halk sor; a szakaszok címe kisebb */
.brief-todo { display: flex; flex-direction: column; gap: var(--space-2); margin-bottom: var(--space-4, 16px); padding-bottom: var(--space-4, 16px); border-bottom: 1px solid var(--border); }
.brief-todo-title { font-size: var(--text-md); }
.todo-view.is-embedded { gap: var(--space-4, 16px); }
.todo-view.is-embedded .todo-empty { margin: 0; }
