/* Экран бариста: планшет в альбомной ориентации (iPad mini 1133 × 744) и десктоп.
   Три колонки — как рейка с чеками на кухне: талоны «висят» на рейке и переезжают вправо. */
html, body { height: 100%; }
body { overflow: hidden; }
.bar { display: grid; grid-template-rows: auto minmax(0, 1fr); height: 100%; }

/* ---------- верхняя полоса ---------- */
.top { display: flex; align-items: center; gap: 14px; min-height: 68px; padding: 10px 18px; background: var(--surface); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 12px; margin-right: auto; min-width: 0; }
.logo { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); }
.logo svg { width: 32px; height: 32px; }
.logo-lid, .logo-cup { fill: var(--surface); stroke: var(--ink); stroke-width: 1.8; stroke-linejoin: round; }
.logo-sleeve { fill: var(--accent); }
.name { font-size: 24px; line-height: 1; }
.sub { margin-top: 3px; font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.load { font-size: 15px; color: var(--muted); white-space: nowrap; }
.load b { color: var(--ink); font-weight: 700; }
.accept { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px 0 8px; border-radius: 12px; font-weight: 700; font-size: 15px; }
.accept:hover { background: var(--surface-2); }
.accept[aria-checked="false"] span { color: var(--warn); }
.accept[aria-checked="false"] .switch { background: var(--warn); }
.shift { min-height: 44px; padding: 0 14px; font-size: 15px; }
.stop-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--warn); color: #fff; font: 600 12px/1 var(--f-mono); }
:root[data-theme="dark"] .stop-count { color: #2A1208; }
.clock { min-width: 64px; text-align: right; font-size: 22px; font-weight: 600; letter-spacing: -.02em; }

/* ---------- рейка с талонами ---------- */
.rail { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 0; }
.col { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; border-right: 1px solid var(--line); }
.col:last-child { border-right: 0; }
.col-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 10px; border-bottom: 5px solid var(--ink); }
.col-head h2 { font-size: 19px; font-weight: 800; letter-spacing: -.005em; }
.count { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 8px; border-radius: 15px; background: var(--surface-2); font-size: 15px; font-weight: 600; }
.col[data-col="new"] .count:not(:empty):not([data-zero]) { background: var(--accent); color: var(--on-accent); }
.tickets { display: grid; align-content: start; gap: 16px; padding: 0 16px 24px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }

.tk-wrap { position: relative; }
/* прищепка рейки */
.tk-wrap::before { content: ""; position: relative; z-index: 2; display: block; width: 46px; height: 12px; margin: 0 auto -6px; border-radius: 0 0 4px 4px; background: var(--ink); }
.tk { display: grid; gap: 8px; padding: 16px 16px 24px; font-size: 16px; line-height: 1.35; }
.tk-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.tk-no { font: 600 26px/1 var(--f-mono); letter-spacing: -.02em; }
.tk-age { display: inline-flex; align-items: center; gap: 5px; font: 600 15px/1 var(--f-mono); color: var(--paper-muted); }
.tk-age .icon { width: 16px; height: 16px; }
.tk.late .tk-age { color: #A33F17; }
.tk-who { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; font-size: 16px; }
.tk-who b { font-size: 19px; font-weight: 800; }
.tk-who .when { font: 600 13.5px/1 var(--f-mono); padding: 4px 7px; border-radius: 6px; background: rgba(34, 26, 20, .07); }
.tk-who .when.later { background: #E2E6F6; color: #2743C8; }
.tk-tag { display: inline-flex; align-items: center; gap: 5px; justify-self: start; padding: 4px 8px 4px 6px; border-radius: 6px; background: #2743C8; color: #fff; font: 600 12.5px/1 var(--f-mono); }
.tk-tag .icon { width: 15px; height: 15px; }
.tk-lines { display: grid; gap: 8px; margin: 2px 0; padding: 10px 0; border-block: 1.5px dashed var(--paper-line); }
.tk-lines li { display: grid; grid-template-columns: 30px 28px minmax(0, 1fr); gap: 8px; align-items: start; }
.tk-lines .q { font: 600 17px/1.2 var(--f-mono); }
.tk-lines .pic .cup { width: 28px; height: 38px; color: var(--paper-ink); }
.tk-lines .pic .cup--pastry { height: 28px; }
.tk-lines .n { font-weight: 800; font-size: 17px; line-height: 1.2; }
.tk-lines .n small { display: block; margin-top: 2px; font: 600 13.5px/1.35 var(--f-mono); color: var(--paper-ink); }
.tk-comment { font-style: italic; font-size: 15px; color: var(--paper-muted); }
.tk-acts { display: flex; gap: 8px; align-items: center; margin-top: 4px; }
.tk-acts .btn { flex: 1; min-height: 50px; font-size: 16px; }
.tk-acts .btn-line { border-color: var(--paper-line); color: var(--paper-ink); }
.tk-acts .btn-line:hover { background: rgba(34, 26, 20, .06); }
.tk-acts .btn-ghost { flex: none; background: transparent; color: var(--paper-muted); padding: 0 10px; font-size: 14.5px; }
.tk-acts .btn-ghost:hover { color: #A33F17; }
.tk.is-guest { box-shadow: inset 5px 0 0 #2743C8; }
.col[data-col="ready"] .tk { background: #F2FAF4; }
:root[data-theme="dark"] .col[data-col="ready"] .tk { background: #DDEBDD; }
.tk-wrap.fresh { animation: print 1s steps(14) both; }
@keyframes print { from { clip-path: inset(0 0 100% 0); translate: 0 -10px; } to { clip-path: inset(0 0 -30px 0); translate: 0 0; } }
.tk-wrap.leaving { animation: leave .28s var(--ease) both; }
@keyframes leave { to { opacity: 0; translate: 40px 0; } }

.col-empty { display: grid; gap: 6px; justify-items: center; margin-top: 28px; padding: 26px 16px; border: 1.5px dashed var(--line-2); border-radius: var(--r); text-align: center; color: var(--muted); font-size: 15px; line-height: 1.4; }
.col-empty b { color: var(--ink); font-size: 16px; }

/* ---------- смена: выдвижная панель ---------- */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgba(21, 17, 14, .38); }
.panel { position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; display: flex; flex-direction: column; width: min(420px, 100%); background: var(--bg); border-left: 1px solid var(--line); transform: translateX(100%); visibility: hidden; transition: transform .3s var(--ease), visibility 0s .3s; }
.panel.open { transform: none; visibility: visible; transition: transform .3s var(--ease), visibility 0s; }
.panel-head { display: flex; align-items: center; justify-content: space-between; min-height: 64px; padding: 8px 12px 8px 20px; border-bottom: 1px solid var(--line); }
.panel-head h2 { font-size: 22px; font-weight: 800; outline: 0; }
.icon-btn { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; }
.icon-btn:hover { background: var(--surface-2); }
.panel-body { flex: 1; overflow-y: auto; padding: 8px 20px 28px; }
.panel-body section { padding: 14px 0 18px; border-bottom: 1px solid var(--line); }
.panel-body section:last-child { border-bottom: 0; }
.panel-body h3 { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.panel-body h4 { margin: 16px 0 2px; font: 600 12.5px/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.hint { font-size: 13.5px; line-height: 1.45; color: var(--muted); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; min-height: 56px; padding: 8px 0; text-align: left; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row span { display: grid; gap: 2px; }
.row b { font-size: 15.5px; font-weight: 700; }
.row small { font-size: 13px; line-height: 1.35; color: var(--muted); }
.row[aria-checked="false"] small.stock { color: var(--warn); font-weight: 600; }
.reset { margin-top: 14px; min-height: 44px; }
.panel-body .reset + .hint { margin-top: 12px; }

/* тост — в верхней полосе, чтобы не закрывать кнопки на талонах */
.toast { top: 10px; bottom: auto; translate: -50% -12px; }
.toast.show { translate: -50% 0; }

/* узкий экран: колонки листаются вбок */
@media (max-width: 760px) {
  .top { flex-wrap: wrap; gap: 8px 12px; }
  .load { order: 5; width: 100%; font-size: 14px; }
  .sub { display: none; }
  .clock { display: none; }
  .rail { grid-template-columns: repeat(3, 86vw); overflow-x: auto; scroll-snap-type: x mandatory; }
  .col { scroll-snap-align: start; }
}
