/* The hall (/staff/, web/staff/): tables, a table's orders and bill, the «Меню» tiles, the editor. On top of ops.css. */
/* Hall, built around the table. Desktop: table list on the left, the chosen table on the right.
   Phone: tables or a table. «Потребує уваги» above the tables; at the bottom of a table a dock with
   «Меню» and the most urgent action; «Меню» mode shows tiles with a section rail (web/staff/menu.ts). */
.hall{display:grid;grid-template-columns:320px minmax(0,1fr);gap:22px;align-items:start;padding-block:18px 40px}
.side{position:sticky;top:76px;display:grid;gap:10px;max-height:calc(100vh - 96px);overflow:auto;padding-bottom:6px}
.newbar{display:flex;align-items:center;gap:10px;width:100%;border:0;cursor:pointer;background:var(--tomato);color:#fff;border-radius:16px;padding:12px 14px;font:600 14px/1.25 var(--f-body);text-align:left}
.newbar b{font:600 20px/1 var(--f-data);min-width:28px}
.newbar.call{background:var(--ink)}
.newbar.ready{background:var(--ok)}
.pill.ready{background:var(--ok-fill);color:#fff}
.od.ready{border-color:color-mix(in oklab,var(--ok-fill) 55%,var(--line))}
.callrow{display:flex;align-items:center;gap:12px;flex-wrap:wrap;background:var(--badbg);color:var(--bad);border-radius:16px;padding:10px 12px;font-weight:600}
.callrow .btn{margin-left:auto;min-height:48px}
.wait{font:500 14px/1 var(--f-data);padding:4px 8px;border-radius:10px;background:var(--flour);color:var(--ink-2)}
.wait.slow{background:var(--warnbg);color:var(--warn)}
.wait.late{background:var(--badbg);color:var(--bad)}
.toast{top:calc(70px + var(--safe-top));bottom:auto}
.od .wish{font-size:16px;font-weight:600;background:var(--disc);padding:8px 10px;border-radius:10px}
.tl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
/* every table is the same tile, two in a row: number and sum on top, its state under them; a free one is quiet */
.trow{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 1fr;gap:8px;align-items:start;width:100%;min-height:92px;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:16px;padding:12px 14px;cursor:pointer;text-align:left}
.trow .st{grid-column:1/-1;align-self:end}
.trow:hover{border-color:var(--ink-2)}
@media (min-width:900px){.trow[aria-current="true"]{border-color:var(--ink);box-shadow:inset 0 0 0 1px var(--ink)}}
.trow .no{font:800 20px/1 var(--f-display)}
.trow .st{display:grid;gap:3px;min-width:0;font-size:14px;color:var(--ink-2)}
.trow .st i{font-style:normal;display:flex;gap:6px;align-items:center;flex-wrap:wrap}
.trow .sum{font:500 14px/1 var(--f-data)}
.dot{width:8px;height:8px;border-radius:50%;display:inline-block;background:var(--line)}
.dot.on{background:#2E7D4F}.dot.hot{background:var(--tomato)}
.trow.free{background:none;border-style:dashed}.trow.free .no{color:var(--ink-2)}
/* «+ Замовлення на виніс» in the place of table 8, and the open takeaway orders after it (a cheese marker) */
.trow.free.out{border-color:var(--tomato);color:var(--tomato)}.trow.free.out .no{color:var(--tomato)}.trow.free.out .st{color:var(--tomato)}.trow.free.out .st b{font-size:16px}
.trow.open.out{border-left:6px solid var(--cheese)}

.main{min-width:0;display:grid;grid-template-columns:minmax(0,1fr);gap:18px}
.thead{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:10px 12px;display:grid;gap:6px}
.thead .r1{display:flex;align-items:center;gap:10px}
.thead h2{font:800 20px/1 var(--f-display);white-space:nowrap}
.codechip{font:500 18px/1 var(--f-data);letter-spacing:.14em;background:var(--disc);border-radius:10px;padding:8px 8px 8px 11px}
.thead .qr{margin-left:auto}
.btn.ic{width:44px;min-width:44px;padding:0;font-size:18px}
.thead .r2{display:flex;align-items:center;gap:8px;min-height:36px;font-size:14px;color:var(--ink-2);padding-left:4px;flex-wrap:wrap}
.thead .r2 .meta{flex:1 1 200px;min-width:0}
.thead .r2 b{color:var(--ink);font-weight:600}
.thead .r2>.lnk{margin-left:auto;font-size:14px;min-height:44px}
.thead .r2 .lnk.mute{min-height:0;padding:0;font-size:inherit}
.back{display:none}
.grp{display:grid;grid-template-columns:minmax(0,1fr);gap:10px}
.grp>header{display:flex;align-items:center;gap:10px}
.grp>header h3{font:600 16px/1.2 var(--f-body)}
.grp>header .btn{margin-left:auto}
.od{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:14px 16px;display:grid;gap:10px}
.od.new{border-color:var(--tomato)}
.od .h{display:flex;align-items:center;gap:8px;flex-wrap:wrap;font-size:14px;color:var(--ink-2)}
.od .h b{font:600 16px/1 var(--f-data);color:var(--ink)}
.od .h .who{color:var(--ink)}
.od .h .ol{font:500 14px/1 var(--f-body);color:var(--ink-2)}
/* a served order: one line; a tap opens the full card under it */
.srv{background:var(--surface);border:1px solid var(--line);border-radius:16px}
.srv>summary{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:10px;align-items:center;min-height:52px;padding:0 16px;cursor:pointer;list-style:none;font-size:14px}
.srv>summary::-webkit-details-marker{display:none}
.srv>summary .what{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ink)}
.srv>summary .mono:first-child{color:var(--ink-2)}
.srv>summary .mono:last-child::after{content:"▾";margin-left:8px;color:var(--ink-2)}.srv[open]>summary .mono:last-child::after{content:"▴"}
.srv>.od{border:0;border-top:1px dashed var(--line);border-radius:0;background:none}
.thead .r3{font-size:14px;color:var(--ink-2);padding-left:4px}.thead .r3 b{color:var(--ink);font-weight:600}
.od ul{margin:0;padding:0;list-style:none;display:grid;gap:6px}
.od li{display:flex;gap:10px;justify-content:space-between;align-items:baseline}
.od li .q{font:500 14px/1 var(--f-data);min-width:30px}
.od li .n{flex:1;min-width:0}
.od li small{color:var(--ink-2)}
.od .tot{display:flex;justify-content:space-between;border-top:1px dashed var(--line);padding-top:8px;font-weight:600}
.od .note{font-size:14px;background:var(--warnbg);color:var(--warn);padding:8px 10px;border-radius:10px}
.od .act{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}
/* the waiter's main action: full width, big enough to hit with a tray in the other hand */
.od .act .btn{min-height:48px}
.od .act .btn:first-child{grid-column:1/-1}
.od .act [data-accept],.od .act [data-served]{min-height:52px;font-size:16px}
.od .act .lnk{justify-self:end;margin:0}
.od .act [data-ban]{grid-column:1/-1;font-size:14px;min-height:44px;color:var(--ink-2)}
.lnk{border:0;background:none;color:var(--bad);font:500 14px/1 var(--f-body);cursor:pointer;text-decoration:underline;text-underline-offset:3px;min-height:44px;padding:0 4px}
.lnk.mute{color:var(--ink-2)}
/* inline editor (edit an order / add to the table) */
.edl{display:grid;gap:6px}
.er{display:grid;grid-template-columns:minmax(0,1fr) auto auto 44px;gap:8px;align-items:center;padding:8px 10px;border:1px solid var(--line);border-radius:10px;background:var(--flour)}
.er small{display:block;color:var(--ink-2);font-size:12px}
.er.gone{opacity:.45}.er.gone .nm{text-decoration:line-through}
.er .x{width:44px;height:44px;border-radius:50%;border:1px solid var(--line);background:var(--surface);cursor:pointer;color:var(--bad)}
.qty{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:999px;background:var(--surface)}
.qty button{width:44px;height:44px;border:0;background:none;cursor:pointer;font:500 16px/1 var(--f-data)}
.qty output{min-width:22px;text-align:center;font-family:var(--f-data)}
.search{display:grid;gap:6px}
.search input{min-height:44px;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:var(--surface);font-size:16px;width:100%}
.found{display:grid;gap:4px;max-height:240px;overflow:auto}
.found button{display:flex;justify-content:space-between;align-items:center;gap:8px;text-align:left;border:1px solid var(--line);background:var(--surface);border-radius:10px;min-height:44px;padding:9px 12px;cursor:pointer;font-size:14px}
.found button:hover{border-color:var(--ink)}
.found button.out{opacity:.5;cursor:not-allowed;text-decoration:line-through}
.found small{color:var(--ink-2)}
.edfoot{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.edfoot .sum{font-weight:600;margin-right:auto}
.edfoot input{flex:1 1 220px;min-height:44px;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:var(--surface)}
.hint{font-size:14px;color:var(--ink-2)}
.addbox{border:2px dashed var(--line);border-radius:16px;padding:14px 16px;display:grid;gap:10px}
.addbox.on{border-style:solid;border-color:var(--ink);background:var(--surface)}
/* bill */
.bill{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:10px 18px}
.bill[open]{padding-bottom:16px}.bill[open]>*+*{margin-top:10px}
.bill>summary{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:44px;cursor:pointer;list-style:none}
.bill>summary::-webkit-details-marker{display:none}
.bill>summary>span:first-child{display:grid;gap:3px;min-width:0}.bill>summary b{font:600 16px/1.2 var(--f-body)}
.bill>summary small{color:var(--ink-2);font-size:14px}
.bill>summary .mono{font:600 18px/1 var(--f-data);white-space:nowrap}
.bill>summary .mono::after{content:"▾";margin-left:8px;color:var(--ink-2);font-size:14px}.bill[open]>summary .mono::after{content:"▴"}
.bill[open]>summary .mono{color:var(--ink-2);font-size:14px}
.bill ul{margin:0;padding:0;list-style:none;display:grid;gap:5px;font-size:14px}
.bill li{display:flex;gap:10px;justify-content:space-between}
.bill li small{color:var(--ink-2)}
.bill .tot{display:flex;justify-content:space-between;align-items:baseline;border-top:1px solid var(--line);padding-top:10px;font-weight:600}
.bill .tot .mono{font-size:20px;color:var(--tomato)}
.bill .pay{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.bill .pay .btn{min-height:52px;white-space:normal;line-height:1.15;padding:8px 12px;display:grid;gap:2px;justify-items:center}
.bill .pay .btn small{font:500 12px/1 var(--f-data);opacity:.75;text-transform:uppercase;letter-spacing:.06em}
.free-main{background:var(--surface);border:1px dashed var(--line);border-radius:16px;padding:30px;display:grid;gap:12px;justify-items:start}
.free-main h2{font:800 26px/1 var(--f-display)}
details.done summary{cursor:pointer;color:var(--ink-2);font-size:14px}
details.done .od{margin-top:8px;opacity:.75}
/* attention stack */
.attn{display:grid;gap:6px}
.attn h3{font:600 12px/1 var(--f-data);letter-spacing:.06em;text-transform:uppercase;color:var(--ink-2);margin:2px 2px 2px}
.att{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:center;border-radius:16px;padding:6px 6px 6px 4px;background:var(--surface);border:1px solid var(--line)}
.att.new{border-color:var(--tomato);background:var(--badbg)}.att.call{border-color:var(--ink)}.att.ready{border-color:var(--ok-fill);background:var(--okbg)}.att.bill{border-color:var(--cheese)}
.atx{display:flex;gap:10px;align-items:center;border:0;background:none;text-align:left;cursor:pointer;padding:6px 8px;min-width:0;font:500 14px/1.3 var(--f-body);color:var(--ink)}
.atx b{font:800 20px/1 var(--f-display);min-width:26px;flex:none;white-space:nowrap}
.att .btn{min-height:48px;padding:0 14px;white-space:nowrap}
.btn.go{background:var(--ok-fill);color:#fff}
.trow.hot{border-color:var(--tomato)}
/* the dock: «Меню» and the most urgent action, always at the bottom */
.dock{position:sticky;bottom:calc(10px + var(--safe-bottom));z-index:20;display:flex;gap:8px;align-items:center;padding:8px;border-radius:16px;background:var(--surface);border:1px solid var(--line);box-shadow:0 14px 34px -14px rgba(27,23,19,.45)}
.dock .btn{min-height:54px;font-size:16px;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.dock{max-width:100%;box-sizing:border-box}
.od .h .who{flex-basis:100%}
.dock .btn.main{flex:1;font-size:16px}
.dock .btn.ghost{flex:0 0 auto}
.dock .btn.ghost.main{flex:1}
.dock .chk{flex:1;min-width:0;border:1px solid var(--line);background:var(--surface);color:var(--ink);border-radius:16px;min-height:54px;padding:6px 14px;text-align:left;cursor:pointer;display:grid}
.dock .chk b{font-size:16px}.dock .chk span{font-size:12px;opacity:.75}
.dock .dempty{flex:1;color:var(--ink);font-size:14px;padding-left:8px}
/* «Меню» mode */
.mstrip{display:flex;align-items:center;gap:10px;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:8px 12px}
.mstrip .btn{min-height:44px;min-width:44px}
.mstrip b{font:800 18px/1 var(--f-display);white-space:nowrap}.mstrip span{color:var(--ink-2);font-size:14px;margin-left:auto;text-align:right}
.mwrap{display:grid;grid-template-columns:76px minmax(0,1fr);gap:8px;align-items:start}
.mrail{position:sticky;top:76px;display:grid;gap:4px;max-height:calc(100vh - 190px);overflow:auto;scrollbar-width:none;background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:5px}
.mrail::-webkit-scrollbar{display:none}
.mrail button{position:relative;display:grid;justify-items:center;gap:4px;border:0;background:none;border-radius:10px;padding:7px 2px 8px;font:600 12px/1.15 var(--f-body);color:var(--ink-2);cursor:pointer;min-height:48px;overflow-wrap:anywhere}
.mrail button[aria-pressed="true"]{background:var(--ink);color:var(--flour)}
.mrail .ri{width:42px;height:42px;border-radius:50%;background:var(--disc) center/cover no-repeat;display:grid;place-items:center;font-size:20px;color:var(--ink)}
.mrail button i{position:absolute;top:3px;right:3px;font:600 10.5px/1 var(--f-data);font-style:normal;background:var(--tomato);color:#fff;border-radius:999px;padding:3px 5px}
.mtiles{min-width:0;display:grid;gap:4px}
.mgrp{font:600 12px/1 var(--f-data);letter-spacing:.06em;text-transform:uppercase;color:var(--ink-2);margin:10px 2px 4px}
.tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:6px}
.tile{position:relative;display:flex;flex-direction:column;text-align:left;border:1px solid var(--line);background:var(--surface);border-radius:16px;overflow:hidden;padding:0;cursor:pointer;min-width:0;font:inherit;color:inherit;user-select:none;-webkit-user-select:none;touch-action:manipulation}
.tile.on{border-color:var(--tomato);box-shadow:inset 0 0 0 1px var(--tomato)}
.tile .ph{aspect-ratio:2/1;background:var(--disc) center/contain no-repeat;display:block}
.tile .bd{padding:7px 9px 9px;display:grid;gap:2px;min-width:0}
.tile .nm{font-weight:600;font-size:14px;line-height:1.25;overflow-wrap:anywhere}
.tile .mt{display:flex;justify-content:space-between;gap:6px;font-size:12px;color:var(--ink-2);align-items:baseline}
.tile .mt b{font:600 14px var(--f-data);color:var(--ink)}
.tile.text .bd{min-height:64px;align-content:space-between}
.tile .qb{position:absolute;top:6px;right:6px;min-width:26px;height:26px;padding:0 7px;border-radius:999px;background:var(--tomato);color:#fff;font:600 14px/26px var(--f-data);font-style:normal;text-align:center}
.tile.off{cursor:not-allowed;background:var(--flour);opacity:.6}
.tile.off .nm{text-decoration:line-through}.tile.off .ph{filter:grayscale(1)}
.tile.pizza .sz{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line)}
.tile.pizza .sz button{position:relative;border:0;background:none;padding:7px 4px 8px;cursor:pointer;display:grid;justify-items:center;min-height:48px;font:inherit;color:inherit}
.tile.pizza .sz button+button{border-left:1px solid var(--line)}
.tile.pizza .sz small{font-size:12px;color:var(--ink-2)}.tile.pizza .sz b{font:600 14px var(--f-data)}
.tile.pizza .sz button.on{background:var(--badbg)}.tile.pizza .sz button.on small{color:var(--bad);font-weight:600}
.tile.pizza .sz i{position:absolute;top:-11px;right:4px;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--tomato);color:#fff;font:600 12px/22px var(--f-data);font-style:normal}
.mfind input{width:100%;min-height:48px;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:var(--surface);font-size:16px}
.mcheck{position:sticky;bottom:calc(86px + var(--safe-bottom));z-index:21;max-height:58vh;overflow:auto;background:var(--surface);border:1px solid var(--ink);border-radius:16px;padding:12px 14px;display:grid;gap:10px;box-shadow:0 18px 40px -16px rgba(27,23,19,.5)}
.mch{display:flex;align-items:center;justify-content:space-between;gap:8px}.mch b{font:800 16px var(--f-display)}
.sugg{display:grid;gap:6px}.sugg small{font:600 12px var(--f-data);letter-spacing:.06em;text-transform:uppercase;color:var(--ink-2)}
.sugg div{display:flex;gap:6px;flex-wrap:wrap}
/* the guest's wishes the waiter heard: quick chips (44 px) and a line of their own words */
.mwish{display:grid;gap:6px}.mwish small{font:600 12px var(--f-data);letter-spacing:.06em;text-transform:uppercase;color:var(--ink-2)}
.mwish .chips button{min-height:44px;padding:0 14px;font-size:14px}
.mwish input{min-height:46px;padding:0 12px;border-radius:10px;border:1px solid var(--line);background:var(--surface);font-size:16px;min-width:0;width:100%}
.att.bill.seen{border-color:var(--line);opacity:.75}
.sugg button{border:1px solid var(--line);background:var(--flour);border-radius:10px;min-height:44px;padding:0 12px;cursor:pointer;font-weight:600}
/* the bar's «⋯»: only on a phone */

@media (max-width:899px){
  .hall{grid-template-columns:1fr;padding-bottom:96px}
  .side{position:static;max-height:none;overflow:visible}
  .hall[data-view="table"] .side,.hall[data-view="new"] .side{display:none}
  .hall[data-view="list"] .main{display:none}
  .back{display:inline-flex}
  .thead .qr .t{display:none}
  .tiles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .mwrap{grid-template-columns:70px minmax(0,1fr);gap:6px}
  .toast{top:calc(64px + var(--safe-top));bottom:auto}
  .hall{padding-bottom:0}
  /* the bottom panel is a solid strip from edge to edge down to the screen's end: nothing shows through or under it */
  .dock{bottom:0;margin:12px calc(-1 * max(16px,env(safe-area-inset-right,0px))) 0 calc(-1 * max(16px,env(safe-area-inset-left,0px)));padding:10px max(16px,env(safe-area-inset-right,0px)) calc(10px + var(--safe-bottom)) max(16px,env(safe-area-inset-left,0px));max-width:none;border:0;border-top:1px solid var(--line);border-radius:0;background:var(--flour);box-shadow:none}
  .hall[data-view="list"]{padding-bottom:24px}
  /* a short table page still keeps the panel at the very bottom of the screen */
  .hall:not([data-view="list"])>#main{display:flex;flex-direction:column;gap:18px;min-height:calc(100dvh - 75px - var(--safe-top))}
  .hall:not([data-view="list"])>#main>.dock{margin-top:auto}
  .mrail{top:64px;max-height:calc(100vh - 180px)}
  .er{grid-template-columns:minmax(0,1fr) auto 44px}
  .er .mono{display:none}
  #bill{scroll-margin-top:calc(80px + var(--safe-top))}
}
/* Drinks the waiter pours (variant A, 15 Nov 2026): blue, apart from the kitchen's green «готово» */
.pill.drink{background:var(--drinkbg);color:var(--drink)}
.btn.drink{background:var(--drink-fill);color:#fff}
.att.drink{border-color:var(--drink-fill);background:var(--drinkbg)}
.od .drs{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px;align-items:center;background:var(--drinkbg);border-radius:12px;padding:10px 10px 10px 14px}
.od .drs span{display:grid;gap:2px;min-width:0;font-size:14px}.od .drs b{color:var(--drink);font-size:14px}
.od .drs .btn{min-height:44px;white-space:nowrap}

/* Poster options in the «which milk?» dialog (Vanilla cafe) */
.mods{display:grid;gap:6px;margin-bottom:12px}
.mods small{color:var(--ink-2);font-size:13px}
.mods .chips button{min-height:44px;padding:0 14px}
