/* Core One — Point of Sale till, customer display and POS reports.
   Built on the app's tokens (style.css), so the brand colour and dark mode carry over. */

.till {
  position: fixed; inset: 0; z-index: 5; display: grid; grid-template-rows: 58px 1fr;
  background: var(--canvas); color: var(--ink); overflow: hidden;
  --t-r: 16px; --t-gap: 12px;
  --t-paper: var(--paper);
  --t-key: color-mix(in srgb, var(--paper) 92%, var(--canvas));
  --t-acc2: color-mix(in srgb, var(--accent) 82%, #000);
  user-select: none; -webkit-user-select: none;
}
.till input, .till textarea, .t-dlg input, .t-dlg textarea { user-select: text; -webkit-user-select: text; }
.till-center { display: grid; place-items: center; grid-template-rows: none; overflow: auto; padding: 24px 16px;
  background: radial-gradient(1200px 600px at 20% -10%, var(--accent-soft), transparent 60%), var(--canvas); }
.till-boot { position: fixed; inset: 0; display: grid; place-content: center; gap: 12px; text-align: center; color: var(--muted); background: var(--canvas); z-index: 5; }
.till-boot.err b { color: var(--ink); font-size: 17px; }
.till-boot.err span { max-width: 420px; }
.till-spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); margin: 0 auto 6px; animation: t-spin .8s linear infinite; }
@keyframes t-spin { to { transform: rotate(360deg); } }
.t-i { width: 20px; height: 20px; flex: none; }
.t-spacer { flex: 1; }
.t-muted { color: var(--muted); font-size: 13px; }
.t-muted.pad { padding: 18px; text-align: center; }
.t-link { color: var(--muted); font-size: 13.5px; }
.t-link:hover { color: var(--accent); }
.t-hint { color: var(--muted); font-size: 12.5px; margin-top: 12px; text-align: center; }

/* buttons */
.t-primary, .t-ghost, .t-danger {
  border-radius: 12px; padding: 10px 16px; font-weight: 600; border: 1px solid transparent; display: inline-flex;
  align-items: center; justify-content: center; gap: 8px; transition: transform .08s var(--ease), filter .15s, background .15s, border-color .15s;
}
.t-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -8px color-mix(in srgb, var(--accent) 70%, transparent); }
.t-primary:hover { filter: brightness(1.07); }
.t-primary:active, .t-ghost:active, .t-key:active, .t-card:active, .t-meth:active { transform: scale(.97); }
.t-primary:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.t-primary.big { padding: 14px 26px; font-size: 16px; }
.t-primary.sm, .t-ghost.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.t-ghost { background: var(--paper); border-color: var(--line); color: var(--ink); }
.t-ghost:hover { border-color: var(--faint); }
.t-ghost.wide { width: 100%; margin: 8px 0; }
.t-ghost.warn { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 45%, var(--line)); }
.t-danger { background: var(--danger); color: #fff; }
.t-pill { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 650;
  background: var(--line-2); color: var(--muted); white-space: nowrap; }
.t-pill.ok { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.t-pill.red { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.t-pill.amber { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); }
.t-pill.blue { background: var(--accent-soft); color: var(--accent); }
.t-pill.gold { background: color-mix(in srgb, #f59e0b 18%, transparent); color: #b45309; }
:root[data-theme="dark"] .t-pill.gold { color: #fbbf24; }
.t-avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 70%, #fff), var(--accent)); color: #fff; flex: none; }
.t-avatar.sm { width: 30px; height: 30px; font-size: 11px; }

/* header */
.t-head { display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--paper); border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(0,0,0,.02); min-width: 0; }
.t-iconbtn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); display: grid; place-items: center;
  color: var(--ink-2); flex: none; font-size: 16px; }
.t-iconbtn .ico { width: 22px; height: 22px; color: var(--accent); }
.t-iconbtn:hover, .t-hbtn:hover { border-color: var(--faint); color: var(--ink); }
.t-reg { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; background: none; border: 0; padding: 4px 8px;
  border-radius: 10px; font-weight: 700; font-size: 14.5px; max-width: 170px; flex: none; }
.t-reg small { color: var(--muted); font-weight: 500; font-size: 11.5px; }
.t-reg:hover { background: var(--line-2); }
.t-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; min-width: 0; padding: 4px 2px; }
.t-tabs::-webkit-scrollbar { display: none; }
.t-tab { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--canvas); color: var(--ink-2); font-weight: 600; font-size: 13px; white-space: nowrap; flex: none; }
.t-tab i { font-style: normal; font-size: 11px; background: var(--line); color: var(--ink-2); border-radius: 99px; padding: 1px 7px; }
.t-tab.on { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 6px 14px -8px var(--accent); }
.t-tab.on i { background: rgba(255,255,255,.25); color: #fff; }
.t-tab.refund { border-style: dashed; }
.t-tab.refund.on { background: var(--warn); border-color: var(--warn); }
.t-tab.add { width: 36px; padding: 0; justify-content: center; font-size: 19px; color: var(--muted); }
.t-hbtn { display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 13px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--paper); font-weight: 600; font-size: 13.5px; color: var(--ink-2); flex: none; }
.t-user { display: inline-flex; align-items: center; gap: 8px; padding-left: 6px; flex: none; }
.t-uname { font-weight: 600; font-size: 13.5px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* body */
.t-body { display: grid; grid-template-columns: minmax(340px, 400px) 1fr; min-height: 0; }
.t-body.pay, .t-body.rcpt, .t-body.ords, .t-body.close { grid-template-columns: 1fr; }
.t-mbar { display: none; }

/* order panel */
.t-order { display: flex; flex-direction: column; min-height: 0; background: var(--paper); border-right: 1px solid var(--line); }
.t-cust { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line-2); }
.t-cust-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 12px;
  border: 1px dashed var(--line); background: var(--canvas); color: var(--muted); font-weight: 600; }
.t-cust-btn.set { border-style: solid; background: var(--accent-soft); color: var(--ink); border-color: transparent; }
.t-cust-btn span { display: flex; flex-direction: column; min-width: 0; }
.t-cust-btn b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-cust-btn small { color: var(--muted); font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-loy { flex: none; padding: 8px 11px; border-radius: 12px; border: 1px solid color-mix(in srgb, #f59e0b 40%, transparent);
  background: color-mix(in srgb, #f59e0b 12%, transparent); color: #b45309; font-weight: 700; font-size: 12.5px; }
:root[data-theme="dark"] .t-loy { color: #fbbf24; }
.t-loy.off, :root[data-theme="dark"] .t-loy.off { color: var(--muted); border-color: var(--line); background: transparent; }
.t-onote { flex: none; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); }
.t-lines { flex: 1; overflow-y: auto; min-height: 80px; padding: 6px 8px; overscroll-behavior: contain; }
.t-lines-empty { height: 100%; min-height: 160px; display: grid; place-content: center; justify-items: center; gap: 6px; color: var(--muted); text-align: center; }
.t-lines-empty .t-i { width: 40px; height: 40px; color: var(--faint); stroke-width: 1.4; }
.t-lines-empty b { color: var(--ink-2); font-size: 15px; }
.t-line { display: flex; gap: 10px; align-items: flex-start; padding: 10px 10px 10px 12px; border-radius: 12px; cursor: pointer; position: relative;
  transition: background .12s; }
.t-line + .t-line { margin-top: 2px; }
.t-line:hover { background: var(--line-2); }
.t-line.on { background: var(--accent-soft); }
.t-line.on::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--accent); }
.t-line-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.t-line-name { font-weight: 650; font-size: 14.5px; line-height: 1.25; }
.t-line-name em { font-style: normal; color: var(--muted); font-weight: 600; }
.t-line-sub { color: var(--muted); font-size: 12.5px; }
.t-line-sub b { color: var(--ink); }
.t-line-sub s { color: var(--faint); margin-left: 2px; }
.t-line-note { font-size: 12px; color: var(--accent); font-style: italic; }
.t-line-total { font-weight: 700; font-size: 14.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.t-badge { display: inline-block; padding: 0 6px; border-radius: 6px; background: color-mix(in srgb, var(--success) 15%, transparent);
  color: var(--success); font-weight: 700; font-size: 11.5px; }
.t-sum { padding: 8px 16px 10px; border-top: 1px solid var(--line-2); }
.t-sum-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--ink-2); padding: 2px 0; }
.t-sum-row.muted { color: var(--muted); }
.t-sum-row.disc b { color: var(--success); }
.t-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 4px; }
.t-total span { font-weight: 650; color: var(--muted); }
.t-total b { font-size: 26px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.t-acts { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; padding: 8px 10px; border-top: 1px solid var(--line-2); }
.t-act { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 7px 2px; border-radius: 11px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink-2); font-size: 11px; font-weight: 600; min-width: 0; }
.t-act span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.t-act .t-i { width: 18px; height: 18px; }
.t-act:hover { border-color: var(--faint); color: var(--ink); }
.t-act.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.t-padwrap { padding: 0 10px 10px; display: flex; flex-direction: column; gap: 8px; }
.t-pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.t-key { height: 48px; border-radius: 12px; border: 1px solid var(--line); background: var(--t-key); font-size: 18px; font-weight: 600;
  color: var(--ink); font-variant-numeric: tabular-nums; transition: transform .08s var(--ease), background .12s; }
.t-key:hover { background: var(--line-2); }
.t-key.mode { font-size: 13.5px; font-weight: 700; color: var(--ink-2); background: var(--canvas); }
.t-key.mode.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.t-key.fn { color: var(--muted); }
.t-key:disabled { opacity: .4; cursor: not-allowed; }
.t-paybtn { display: flex; align-items: center; gap: 10px; height: 60px; padding: 0 18px; border-radius: 16px; border: 0; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--t-acc2)); box-shadow: 0 12px 24px -12px var(--accent); font-size: 17px; font-weight: 700; }
.t-paybtn b { margin-left: auto; font-size: 20px; font-variant-numeric: tabular-nums; }
.t-paybtn:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.t-paybtn:not(:disabled):hover { filter: brightness(1.06); }

/* products */
.t-prods { display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.t-searchbar { display: flex; align-items: center; gap: 8px; margin: 12px 14px 0; padding: 0 12px; height: 46px; border-radius: 14px;
  background: var(--paper); border: 1px solid var(--line); box-shadow: var(--e1); }
.t-searchbar:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.t-searchbar input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; }
.t-search-ico { color: var(--muted); display: grid; }
.t-searchbar.in-dlg { margin: 0 0 10px; box-shadow: none; }
.t-cats { display: flex; gap: 8px; padding: 12px 14px 4px; overflow-x: auto; scrollbar-width: none; flex: none; }
.t-cats::-webkit-scrollbar { display: none; }
.t-cat { --h: 230; display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px; border-radius: 12px; flex: none;
  border: 1px solid var(--line); background: var(--paper); font-weight: 650; font-size: 13.5px; color: var(--ink-2); }
.t-cat[data-h]::before { content: ''; width: 9px; height: 9px; border-radius: 3px; background: hsl(var(--h) 65% 55%); }
.t-cat i { font-style: normal; font-size: 11.5px; color: var(--faint); font-weight: 600; }
.t-cat.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.t-cat.on i { color: inherit; opacity: .6; }
.t-grid { flex: 1; overflow-y: auto; padding: 10px 14px 18px; display: grid; gap: 12px; align-content: start;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); grid-auto-rows: max-content; overscroll-behavior: contain; min-height: 0; }
.t-card { display: flex; flex-direction: column; text-align: left; padding: 0; border-radius: var(--t-r); overflow: hidden; background: var(--paper);
  border: 1px solid var(--line); box-shadow: var(--e1); transition: transform .12s var(--ease), box-shadow .15s, border-color .15s; min-width: 0; }
.t-card:hover { box-shadow: var(--e2); border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); transform: translateY(-1px); }
.t-card.bump { animation: t-bump .32s var(--ease); }
@keyframes t-bump { 40% { transform: scale(.95); box-shadow: 0 0 0 3px var(--accent-soft); } }
.t-card > span { flex: none; }
.t-card-img { position: relative; aspect-ratio: 4 / 3; width: 100%; background: var(--canvas); display: grid; place-items: center; overflow: hidden; }
.t-card-img img { width: 100%; height: 100%; object-fit: cover; }
.t-ph { --h: 230; width: 100%; height: 100%; display: grid; place-items: center; font-size: 26px; font-weight: 750; letter-spacing: -.02em;
  color: hsl(var(--h) 55% 38%); background: linear-gradient(145deg, hsl(var(--h) 70% 93%), hsl(var(--h) 60% 84%)); }
:root[data-theme="dark"] .t-ph { color: hsl(var(--h) 70% 78%); background: linear-gradient(145deg, hsl(var(--h) 30% 20%), hsl(var(--h) 35% 14%)); }
.t-stock { position: absolute; top: 8px; left: 8px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: rgba(255,255,255,.92); color: var(--warn); }
.t-stock.out { color: #fff; background: var(--danger); }
.t-var { position: absolute; bottom: 8px; right: 8px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; background: rgba(14,16,23,.66); color: #fff; }
.t-card-name { padding: 9px 11px 0; font-weight: 650; font-size: 13.5px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.6em; }
.t-card-price { padding: 3px 11px 11px; color: var(--accent); font-weight: 750; font-size: 14px; font-variant-numeric: tabular-nums; }
.t-grid.arranging .t-card { cursor: grab; outline: 2px dashed color-mix(in srgb, var(--accent) 45%, transparent); outline-offset: -4px; }
.t-card.dragging { opacity: .4; }
.t-card.over { box-shadow: 0 0 0 3px var(--accent); }
.t-empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--muted); }
.t-flash { position: fixed; left: 50%; top: 70px; transform: translateX(-50%); z-index: 300; padding: 9px 16px; border-radius: 99px;
  background: var(--ink); color: var(--paper); font-weight: 650; font-size: 13.5px; box-shadow: var(--e3); animation: t-fl 1.1s var(--ease) forwards; pointer-events: none; }
@keyframes t-fl { 0% { opacity: 0; transform: translate(-50%, -6px); } 15%, 75% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

.t-hh { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 750; color: #fff;
  background: linear-gradient(135deg, #f59e0b, #ef4444); box-shadow: 0 4px 10px -4px #ef4444; }
.t-hh.off { background: var(--success); box-shadow: none; }
.t-card-price s { color: var(--faint); font-weight: 600; font-size: 12px; margin-left: 4px; }
.t-var.combo { left: 8px; right: auto; background: color-mix(in srgb, var(--accent) 88%, #000); }
.t-plbtn { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 150px; padding: 8px 10px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font-weight: 650; font-size: 12.5px; }
.t-plbtn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-plbtn .t-i { width: 16px; height: 16px; }
.t-plbtn.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.t-badge.pl { background: var(--accent-soft); color: var(--accent); }
.t-line-kids { display: flex; flex-direction: column; font-size: 12.5px; color: var(--ink-2); padding-left: 2px; }
.t-line-kids span::before { content: '· '; color: var(--faint); }
.t-line-kids i { font-style: normal; color: var(--muted); font-size: 11.5px; }
.t-sum-row.promo { color: #b45309; font-weight: 600; }
:root[data-theme="dark"] .t-sum-row.promo { color: #fbbf24; }
.t-sum-row.promo b { color: inherit; }
.t-sum-row.save { color: var(--success); font-weight: 650; }
.t-sum-row.save b { color: var(--success); }
.t-cgroups { display: flex; flex-direction: column; gap: 16px; max-height: 60vh; overflow-y: auto; margin: 8px -4px 0; padding: 0 4px; }
.t-cgroup-h { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.t-cgroup-h b { font-size: 15px; }
.t-cchoices { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.t-cchoice { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 8px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--canvas); text-align: center; font-size: 13px; min-width: 0; }
.t-cchoice img, .t-cchoice .t-ph { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.t-ph.sm { font-size: 17px; }
.t-cchoice b { font-weight: 650; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.t-cchoice small { color: var(--accent); font-weight: 700; }
.t-cchoice:hover { border-color: var(--faint); }
.t-cchoice.on { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent-soft); }
.t-paper-lines .kid { padding-left: 8px; }

/* dialogs and menus */
.t-dlg-back { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px;
  background: rgba(10, 12, 18, .46); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); animation: fade .16s var(--ease); }
.t-dlg { width: min(440px, 100%); max-height: calc(100vh - 32px); overflow: auto; background: var(--paper); border-radius: 22px; padding: 22px;
  box-shadow: var(--e3); border: 1px solid var(--line); animation: t-pop .2s var(--ease); }
.t-dlg.wide { width: min(620px, 100%); }
@keyframes t-pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.t-dlg h3 { font-size: 19px; letter-spacing: -.02em; }
.t-dlg-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }
.t-dlg-sub { color: var(--muted); font-size: 13.5px; margin: 4px 0 14px; }
.t-dlg-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.t-dlg textarea, .t-field input, .t-field select, .t-dlg textarea, .t-tixname input { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 11px 12px;
  background: var(--canvas); font-size: 15px; outline: 0; }
.t-dlg textarea:focus, .t-field input:focus, .t-field select:focus, .t-tixname input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); background: var(--paper); }
.t-field { display: block; margin-top: 12px; }
.t-field > span { display: block; font-size: 12px; font-weight: 650; color: var(--muted); margin-bottom: 6px; letter-spacing: .01em; }
.t-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.t-form .wide { grid-column: 1 / -1; }
.t-check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 550; margin-top: 14px; }
.t-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.t-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 6px; }
.t-chip { padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--canvas); font-weight: 600; font-size: 13px; color: var(--ink-2); }
.t-chip small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.t-chips.big .t-chip { padding: 10px 16px; font-size: 15px; border-radius: 14px; }
.t-chip:hover { border-color: var(--faint); }
.t-chip.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.t-chip.sm { padding: 3px 9px; font-size: 12px; }
.t-chip:disabled { opacity: .35; }
.t-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--canvas); border: 1px solid var(--line); gap: 2px; margin-bottom: 10px; max-width: 100%; overflow-x: auto; }
.t-seg button { padding: 7px 12px; border-radius: 9px; border: 0; background: none; font-weight: 600; font-size: 13px; color: var(--muted); white-space: nowrap; }
.t-seg button.on { background: var(--paper); color: var(--ink); box-shadow: var(--e1); }
.t-seg.sm button { padding: 5px 10px; font-size: 12.5px; }
.t-pop { position: fixed; z-index: 250; min-width: 220px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 6px;
  box-shadow: var(--e3); animation: t-pop .14s var(--ease); }
.t-pop button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; border-radius: 9px; font-size: 14px; font-weight: 550; }
.t-pop button:hover { background: var(--line-2); }
.t-pop button.danger { color: var(--danger); }
.t-pop hr { border: 0; border-top: 1px solid var(--line-2); margin: 5px 4px; }
.t-clist { max-height: min(52vh, 440px); overflow-y: auto; margin: 0 -6px; }
.t-crow { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 10px; border: 0; background: none; border-radius: 12px; }
.t-crow:hover { background: var(--line-2); }
.t-crow.on { background: var(--accent-soft); }
.t-crow.static:hover { background: none; }
.t-crow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.t-crow-main b { font-size: 14.5px; }
.t-crow-main small { color: var(--muted); font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-vars, .t-rewards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.t-varbtn, .t-reward { display: flex; flex-direction: column; gap: 2px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--canvas); text-align: left; }
.t-varbtn:hover, .t-reward:hover { border-color: var(--accent); }
.t-varbtn span, .t-reward span { color: var(--accent); font-weight: 700; }
.t-varbtn small, .t-reward small { color: var(--muted); font-size: 12px; }
.t-reward.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.t-banner { margin: 10px 0; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: 13.5px; font-weight: 550; }
.t-banner.warn { background: color-mix(in srgb, var(--warn) 14%, transparent); }

.t-dlg.narrowish { width: min(400px, 100%); }
.t-act.ask, .t-chip.ask { position: relative; }
.t-chip.ask::after { content: '🔒'; font-size: 9px; margin-left: 4px; opacity: .7; }
.t-act.ask::after { content: '🔒'; position: absolute; top: 3px; right: 4px; font-size: 9px; opacity: .7; }
.t-user { border: 0; background: none; padding: 4px 6px; border-radius: 12px; cursor: default; }
.t-user.staff { cursor: pointer; border: 1px solid var(--line); background: var(--paper); }
.t-user.staff:hover { border-color: var(--faint); }
.t-uname small { display: block; font-size: 10.5px; font-weight: 650; color: var(--muted); text-align: left; }
.t-avatar.lg { width: 56px; height: 56px; font-size: 18px; }
/* the lock screen */
.t-lock { position: fixed; inset: 0; z-index: 150; display: grid; place-items: center; padding: 20px; overflow: auto;
  background: radial-gradient(900px 500px at 20% -10%, var(--accent-soft), transparent 60%), color-mix(in srgb, var(--canvas) 94%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); animation: fade .2s var(--ease); }
.t-lock-card { width: min(720px, 100%); background: var(--paper); border: 1px solid var(--line); border-radius: 26px; padding: 26px; box-shadow: var(--e3); }
.t-lock-card.narrow { width: min(380px, 100%); text-align: center; }
.t-lock-head { display: flex; gap: 14px; align-items: center; margin-bottom: 18px; }
.t-lock-head h1 { font-size: 22px; letter-spacing: -.02em; }
.t-lock-head p { color: var(--muted); }
.t-lock-people { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.t-lock-people.small { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); margin-bottom: 4px; }
.t-person { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 10px; border-radius: 18px; border: 1px solid var(--line);
  background: var(--canvas); text-align: center; transition: transform .08s var(--ease), border-color .15s; }
.t-person:hover { border-color: var(--accent); }
.t-person:active { transform: scale(.97); }
.t-person b { font-size: 14px; }
.t-person small { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.t-person.nopin { opacity: .55; }
.t-lock-foot { display: flex; align-items: center; gap: 12px; margin-top: 18px; flex-wrap: wrap; }
.t-lock-foot .t-muted { margin-left: auto; }
.t-lock-back { margin-bottom: 8px; }
.t-lock-me { display: flex; flex-direction: column; align-items: center; gap: 4px; margin: 6px 0 12px; }
.t-lock-me b { font-size: 16px; }
.t-lock-me small { color: var(--muted); font-weight: 600; }
/* the PIN pad */
.t-pin { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.t-pin-label { font-weight: 650; color: var(--ink-2); font-size: 14px; }
.t-pin-dots { display: flex; gap: 12px; height: 18px; align-items: center; }
.t-pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--faint); transition: background .1s, border-color .1s; }
.t-pin-dots i.on { background: var(--accent); border-color: var(--accent); }
.t-pin-err { min-height: 18px; color: var(--danger); font-weight: 650; font-size: 13px; text-align: center; }
.t-pin-keys { display: grid; grid-template-columns: repeat(3, 72px); gap: 10px; }
.t-pin-key { height: 64px; border-radius: 50%; border: 1px solid var(--line); background: var(--canvas); font-size: 24px; font-weight: 600;
  display: grid; place-items: center; transition: transform .08s var(--ease), background .12s; }
.t-pin-key:hover { background: var(--line-2); }
.t-pin-key:active { transform: scale(.94); }
.t-pin-key.fn { color: var(--muted); font-size: 20px; }
.t-pin-key.ok { background: var(--accent); color: #fff; border-color: var(--accent); }
.t-pin.shake { animation: t-shake .36s; }
@keyframes t-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

/* picker, opening */
.t-pick, .t-open, .t-closed { width: min(560px, 100%); background: var(--paper); border-radius: 26px; padding: 28px; border: 1px solid var(--line); box-shadow: var(--e3); }
.t-open { width: min(760px, 100%); }
.t-pick-head { display: flex; gap: 14px; align-items: center; margin-bottom: 20px; }
.t-pick-head h1 { font-size: 24px; letter-spacing: -.025em; }
.t-pick-head p { color: var(--muted); }
.t-logo { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; flex: none; color: #fff;
  background: linear-gradient(140deg, color-mix(in srgb, var(--accent) 72%, #fff), var(--accent) 55%, color-mix(in srgb, var(--accent) 75%, #000)); }
.t-logo .ico { width: 28px; height: 28px; }
.t-pick-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.t-pick-row { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--canvas); text-align: left; }
.t-pick-row:hover { border-color: var(--accent); }
.t-pick-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--paper); font-size: 20px; }
.t-pick-name { flex: 1; display: flex; flex-direction: column; font-weight: 700; font-size: 15.5px; }
.t-pick-name small { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.t-counts { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.t-count { border: 1px solid var(--line); border-radius: 18px; padding: 14px; background: var(--canvas); }
.t-count-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.t-count-head b { font-size: 16px; }
.t-count-head .t-coins-toggle { margin-left: auto; }
.t-count-head .t-coins-toggle.on { background: var(--accent-soft); border-color: transparent; color: var(--accent); }
.t-count-exp { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.t-count-exp b { color: var(--ink); }
.t-count-in { display: block; }
.t-count-in span { display: block; font-size: 12px; color: var(--muted); font-weight: 650; margin-bottom: 5px; }
.t-count-in input { width: 100%; font-size: 22px; font-weight: 700; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper);
  outline: 0; font-variant-numeric: tabular-nums; }
.t-count-in input::placeholder { color: var(--faint); font-weight: 500; }
.t-count-in input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.t-count-diff { margin-top: 8px; font-size: 13px; font-weight: 700; min-height: 18px; }
.t-count-diff.ok { color: var(--success); }
.t-count-diff.over { color: var(--warn); }
.t-count-diff.short { color: var(--danger); }
.t-coins { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-top: 10px; }
.t-coin { display: flex; align-items: center; gap: 6px; padding: 5px 6px 5px 10px; border-radius: 10px; background: var(--paper); border: 1px solid var(--line-2); }
.t-coin span { font-size: 12px; font-weight: 700; color: var(--ink-2); flex: 1; }
.t-coin input { width: 46px; border: 1px solid var(--line); border-radius: 7px; padding: 4px; text-align: center; background: var(--canvas); }
.t-open-foot { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.t-open-foot .t-primary { margin-left: auto; }

/* payment */
.t-paysc { display: flex; flex-direction: column; min-height: 0; overflow-y: auto; padding: 18px 22px 14px; gap: 16px; max-width: 1180px; width: 100%; margin: 0 auto; }
.t-paysc > * { flex: none; }
.t-pay-top { display: flex; align-items: center; gap: 16px; }
.t-due { margin-left: auto; text-align: right; display: flex; flex-direction: column; }
.t-due span { color: var(--muted); font-weight: 650; font-size: 13px; }
.t-due b { font-size: 40px; font-weight: 780; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.t-due small { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.t-due.refund b { color: var(--warn); }
.t-pay-grid { display: grid; grid-template-columns: 230px 1fr 300px; gap: 16px; min-height: 0; }
.t-meths { display: flex; flex-direction: column; gap: 8px; }
.t-meth { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 16px; border: 1px solid var(--line); background: var(--paper); font-weight: 650;
  font-size: 15px; text-align: left; box-shadow: var(--e1); transition: transform .08s, border-color .15s; }
.t-meth:hover { border-color: var(--accent); }
.t-meth-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.t-meth.k-cash .t-meth-ico { background: color-mix(in srgb, var(--success) 15%, transparent); color: var(--success); }
.t-meth.k-account .t-meth-ico { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.t-plines { background: var(--paper); border: 1px solid var(--line); border-radius: 20px; padding: 10px; display: flex; flex-direction: column; min-height: 260px; box-shadow: var(--e1); }
.t-plines-empty { flex: 1; display: grid; place-content: center; text-align: center; color: var(--muted); padding: 24px; line-height: 1.6; }
.t-pline { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 14px; cursor: pointer; border: 1px solid transparent; }
.t-pline + .t-pline { margin-top: 4px; }
.t-pline.on { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.t-pline-m { flex: 1; font-weight: 650; }
.t-pline-m em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.t-pline-v { font-size: 20px; font-weight: 750; font-variant-numeric: tabular-nums; }
.t-x { width: 30px; height: 30px; border-radius: 50%; border: 0; background: var(--line-2); color: var(--muted); }
.t-x:hover { background: var(--danger); color: #fff; }
.t-pstat { margin-top: auto; border-top: 1px solid var(--line-2); padding: 12px 6px 4px; display: flex; flex-direction: column; gap: 6px; }
.t-pstat > div { display: flex; justify-content: space-between; align-items: baseline; font-weight: 650; color: var(--muted); }
.t-pstat b { font-size: 18px; color: var(--ink); font-variant-numeric: tabular-nums; }
.t-pstat .due b { color: var(--danger); }
.t-pstat .change b { color: var(--success); font-size: 24px; }
.t-chcur { gap: 6px; justify-content: flex-start !important; align-items: center !important; font-size: 13px; }
.t-pay-pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; align-content: start; }
.t-pay-pad .t-key { height: 60px; font-size: 20px; }
.t-pay-pad .t-key.quick { font-size: 14px; color: var(--accent); font-weight: 700; background: var(--accent-soft); border-color: transparent; }
.t-pay-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding-top: 6px; }
.t-foot-btn { display: inline-flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--paper); font-weight: 650; color: var(--ink-2); max-width: 240px; }
.t-foot-btn span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-foot-btn.set, .t-foot-btn.on { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.t-lbp { color: var(--muted); font-size: 13px; font-weight: 600; }
.t-reason { flex: 1; min-width: 200px; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); padding: 0 14px; font-size: 14.5px; outline: 0; }
.t-validate { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 60px; padding: 0 30px; border-radius: 18px; border: 0; color: #fff; font-size: 18px; font-weight: 750;
  background: linear-gradient(135deg, var(--success), color-mix(in srgb, var(--success) 75%, #000)); box-shadow: 0 14px 26px -14px var(--success); }
.t-validate:disabled { opacity: .4; box-shadow: none; cursor: not-allowed; }
.t-validate.busy { opacity: .7; pointer-events: none; }
.t-validate.wide { width: 100%; }

/* receipt screen */
.t-rcpt-sc { display: grid; grid-template-columns: minmax(300px, 420px) minmax(0, 1fr); gap: 22px; padding: 22px; overflow-y: auto; max-width: 1080px; width: 100%; margin: 0 auto; align-items: start; }
.t-rcpt-side { display: flex; flex-direction: column; gap: 14px; }
.t-done { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 24px; text-align: center; box-shadow: var(--e2); }
.t-done h2 { font-size: 24px; letter-spacing: -.025em; margin-top: 10px; }
.t-done p { color: var(--muted); margin-top: 4px; }
.t-tick { width: 64px; height: 64px; border-radius: 50%; display: inline-grid; place-items: center; color: #fff; background: var(--success);
  box-shadow: 0 10px 24px -10px var(--success); animation: t-pop .3s var(--ease); }
.t-tick .t-i { width: 34px; height: 34px; stroke-width: 2.6; }
.t-tick.big { width: 84px; height: 84px; }
.t-tick.big .t-i { width: 44px; height: 44px; }
.t-done.refund .t-tick { background: var(--warn); box-shadow: 0 10px 24px -10px var(--warn); }
.t-change { background: color-mix(in srgb, var(--success) 12%, var(--paper)); border-radius: 18px; padding: 16px 20px; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.t-change span { font-weight: 650; color: var(--muted); }
.t-change b { font-size: 30px; font-weight: 780; color: var(--success); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.t-loyres { padding: 12px 16px; border-radius: 14px; background: color-mix(in srgb, #f59e0b 12%, var(--paper)); font-weight: 650; font-size: 14px; }
.t-rcpt-acts { display: flex; flex-direction: column; gap: 8px; }
.t-big { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper);
  font-weight: 650; font-size: 15px; color: var(--ink); }
.t-big:hover { border-color: var(--accent); }
.t-mailrow { display: flex; gap: 6px; }
.t-mailrow input { flex: 1; min-width: 0; height: 48px; border-radius: 14px; border: 1px solid var(--line); background: var(--paper); padding: 0 14px; font-size: 14.5px; outline: 0; }
.t-mailrow input:focus { border-color: var(--accent); }
.t-rcpt-paper { display: flex; justify-content: center; }
.t-rcpt-paper.in-dlg { max-height: 62vh; overflow-y: auto; background: var(--canvas); border-radius: 14px; padding: 14px 0; }

/* the paper receipt (screen and print) */
.t-paper { width: 340px; max-width: 100%; background: #fff; color: #111; font: 13px/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  padding: 22px 20px 26px; border-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 18px 40px -18px rgba(0,0,0,.35); position: relative; }
.t-paper::after { content: ''; position: absolute; left: 0; right: 0; bottom: -8px; height: 8px;
  background: linear-gradient(-45deg, transparent 6px, #fff 0) 0 0 / 12px 8px repeat-x, linear-gradient(45deg, transparent 6px, #fff 0) 0 0 / 12px 8px repeat-x; }
.t-paper .pre { white-space: pre-wrap; }
.t-paper-head { text-align: center; margin-bottom: 10px; }
.t-paper-head b { display: block; font-size: 16px; font-family: -apple-system, "Segoe UI", Roboto, sans-serif; letter-spacing: -.01em; }
.t-paper-meta { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 11.5px; color: #444; padding-bottom: 10px; border-bottom: 1px dashed #bbb; }
.t-paper-lines { width: 100%; border-collapse: collapse; margin: 8px 0; }
.t-paper-lines td { padding: 4px 0; vertical-align: top; }
.t-paper-lines .amt { text-align: right; white-space: nowrap; padding-left: 10px; }
.t-paper-lines .sub { color: #555; font-size: 11.5px; }
.t-paper-lines .note { font-style: italic; }
.t-paper-tot { border-top: 1px dashed #bbb; padding-top: 6px; }
.t-paper-tot > div, .t-paper-pay > div { display: flex; justify-content: space-between; gap: 12px; }
.t-paper-tot .grand { font-weight: 800; font-size: 15px; padding: 4px 0; }
.t-paper-tot .tax { color: #555; font-size: 11.5px; }
.t-paper-pay { border-top: 1px dashed #bbb; margin-top: 6px; padding-top: 6px; }
.t-paper-loy, .t-paper-note { margin-top: 8px; text-align: center; font-size: 12px; }
.t-paper-foot { margin-top: 12px; text-align: center; color: #444; font-size: 12px; border-top: 1px dashed #bbb; padding-top: 10px; }
.t-paper-sec { margin: 12px 0 2px; font-weight: 800; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; }
.t-paper.report .t-paper-tot { border-top: 0; padding-top: 0; }
.t-print { display: none; }
@media print {
  body.t-printing > *:not(.t-print) { display: none !important; }
  body.t-printing .t-print { display: block !important; }
  body.t-printing .t-paper { box-shadow: none; width: 72mm; padding: 0; margin: 0 auto; border-radius: 0; }
  body.t-printing .t-paper::after { display: none; }
  @page { margin: 4mm; }
}

/* orders */
.t-ords { display: grid; grid-template-columns: minmax(320px, 440px) 1fr; min-height: 0; }
.t-ords-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--paper); padding: 12px 12px 0; }
.t-ords-top { display: flex; align-items: center; gap: 8px; }
.t-ords-top .t-searchbar { flex: 1; margin: 0; box-shadow: none; }
.t-ords-list .t-seg { margin: 10px 0 6px; }
.t-orows { flex: 1; overflow-y: auto; margin: 0 -6px; padding-bottom: 12px; }
.t-orow { display: flex; gap: 10px; width: 100%; text-align: left; padding: 11px 12px; border-radius: 14px; border: 0; background: none; }
.t-orow:hover { background: var(--line-2); }
.t-orow.on { background: var(--accent-soft); }
.t-orow-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.t-orow-main b { font-size: 14.5px; }
.t-orow-main small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-orow-r { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.t-orow-r b { font-variant-numeric: tabular-nums; }
.t-orow-r b.neg { color: var(--danger); }
.t-ords-detail { overflow-y: auto; padding: 16px 22px 30px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.t-odet-acts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.t-odet-acts a { text-decoration: none; }
.t-odet-refs { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); text-align: center; }
.t-odet-refs b { color: var(--ink); }
.t-rlines { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.t-rline { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; border: 1px solid var(--line); background: var(--canvas); }
.t-rline.on { border-color: var(--warn); background: color-mix(in srgb, var(--warn) 9%, var(--paper)); }
.t-rline-name { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.t-rline-name small { color: var(--muted); font-size: 12px; }
.t-step { display: inline-flex; align-items: center; gap: 6px; }
.t-step > button:not(.t-ghost) { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); font-size: 18px; font-weight: 700; }
.t-step b { min-width: 28px; text-align: center; font-size: 16px; }

/* close */
.t-close { overflow-y: auto; padding: 18px 22px 30px; max-width: 1180px; width: 100%; margin: 0 auto; }
.t-close-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 12px; }
.t-close-top h2 { font-size: 24px; letter-spacing: -.025em; }
.t-close-grid { display: grid; grid-template-columns: minmax(280px, 380px) 1fr; gap: 18px; align-items: start; }
.t-close-sum, .t-close-count { background: var(--paper); border: 1px solid var(--line); border-radius: 22px; padding: 18px; box-shadow: var(--e1); }
.t-close-count h3 { margin-bottom: 12px; }
.t-kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.t-kpis > div { background: var(--canvas); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; }
.t-kpis span { color: var(--muted); font-size: 12px; font-weight: 650; }
.t-kpis b { font-size: 20px; font-variant-numeric: tabular-nums; }
.t-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: 12px; }
.t-tbl th { text-align: left; color: var(--muted); font-weight: 650; font-size: 12px; padding: 6px 4px; border-bottom: 1px solid var(--line); }
.t-tbl td { padding: 7px 4px; border-bottom: 1px solid var(--line-2); }
.t-tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.t-tbl em { font-style: normal; color: var(--muted); font-size: 12px; }
.t-close-tot { margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: var(--canvas); font-weight: 650; color: var(--muted); }
.t-close-tot.ok { background: color-mix(in srgb, var(--success) 12%, var(--paper)); color: var(--success); }
.t-close-tot.over { background: color-mix(in srgb, var(--warn) 12%, var(--paper)); color: var(--warn); }
.t-close-tot.short { background: color-mix(in srgb, var(--danger) 10%, var(--paper)); color: var(--danger); }
.t-closed { text-align: center; width: min(620px, 100%); }
.t-closed h1 { font-size: 26px; letter-spacing: -.025em; margin-top: 14px; }
.t-closed p { color: var(--muted); }
.t-closed-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin: 18px 0 22px; }

/* phones and narrow tablets: products first, the order slides up */
@media (max-width: 900px) {
  .till { grid-template-rows: 54px 1fr; }
  .t-hbtn span, .t-uname, .t-reg small { display: none; }
  .t-hbtn { width: 40px; padding: 0; justify-content: center; }
  .t-reg { max-width: 110px; font-size: 13px; }
  .t-body { grid-template-columns: 1fr; position: relative; }
  .t-order { position: absolute; inset: 0; z-index: 3; transform: translateY(102%); transition: transform .28s var(--ease); border-right: 0; padding-bottom: 70px; }
  .t-order.open { transform: none; }
  .t-mbar { display: flex; align-items: center; justify-content: space-between; position: absolute; left: 12px; right: 12px; bottom: 10px; height: 52px; z-index: 4;
    padding: 0 18px; border-radius: 16px; border: 0; color: #fff; font-weight: 700; font-size: 15px;
    background: linear-gradient(135deg, var(--accent), var(--t-acc2)); box-shadow: 0 12px 26px -12px var(--accent); }
  .t-mbar b { font-size: 17px; }
  .t-grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); padding-bottom: 80px; gap: 10px; }
  .t-pay-grid { grid-template-columns: 1fr; }
  .t-meths { display: grid; grid-template-columns: 1fr 1fr; }
  .t-due b { font-size: 30px; }
  .t-paysc { padding: 12px; }
  .t-validate { flex: 1; }
  .t-plines { min-height: 150px; }
  .t-pay-foot { position: sticky; bottom: 0; z-index: 2; background: var(--canvas); margin: 0 -12px -12px; padding: 10px 12px 12px;
    border-top: 1px solid var(--line); }
  .t-rcpt-sc, .t-ords, .t-close-grid { grid-template-columns: 1fr; }
  .t-rcpt-sc { padding: 14px; }
  .t-ords-list { border-right: 0; max-height: 46vh; }
  .t-acts { grid-template-columns: repeat(3, 1fr); }
  .t-form { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .t-tabs .t-tab:not(.on):not(.add) { display: none; }
  .t-head { gap: 6px; padding: 0 8px; }
  .t-user, #t-theme { display: none; }
  .t-tabs { flex: 1; min-width: 70px; }
  .t-reg { max-width: 92px; padding: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
  .t-iconbtn, .t-hbtn { width: 38px; height: 38px; }
  .t-grid { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 8px; padding: 8px 10px 80px; }
  .t-card-name { font-size: 12.5px; padding: 7px 8px 0; }
  .t-card-price { font-size: 13px; padding: 2px 8px 8px; }
  .t-ph { font-size: 20px; }
  .t-searchbar { margin: 10px 10px 0; }
  .t-cats { padding: 10px 10px 2px; }
  .t-pay-pad .t-key { height: 52px; }
  .t-due small { display: none; }
}

/* ---------- customer display ---------- */
.cdisp { position: fixed; inset: 0; background: radial-gradient(1000px 600px at 80% -10%, var(--accent-soft), transparent 60%), var(--canvas); color: var(--ink); z-index: 5; }
.cd-idle, .cd-thanks { height: 100%; display: grid; place-content: center; justify-items: center; text-align: center; gap: 10px; }
.cd-idle h1, .cd-thanks h1 { font-size: 48px; letter-spacing: -.03em; }
.cd-idle p, .cd-thanks p { color: var(--muted); font-size: 18px; }
.cd-logo { width: 84px; height: 84px; border-radius: 24px; display: grid; place-items: center; color: #fff; background: var(--accent); }
.cd-logo .ico { width: 46px; height: 46px; }
.cd-change { font-size: 24px !important; color: var(--ink) !important; }
.cd-change b { color: var(--success); font-size: 34px; }
.cd-wrap { height: 100%; display: grid; grid-template-columns: 1fr minmax(320px, 36%); }
.cd-lines { overflow-y: auto; padding: 32px 36px; }
.cd-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 18px; font-size: 22px; }
.cd-head span { color: var(--muted); font-size: 18px; }
.cd-line { display: flex; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 20px; }
.cd-line img, .cd-ph { width: 54px; height: 54px; border-radius: 14px; object-fit: cover; background: var(--line-2); flex: none; }
.cd-name { flex: 1; font-weight: 600; }
.cd-name i { font-style: normal; color: var(--success); font-size: 15px; }
.cd-qty { color: var(--muted); }
.cd-side { background: var(--paper); border-left: 1px solid var(--line); display: flex; flex-direction: column; justify-content: center; padding: 40px; gap: 8px; }
.cd-side span { color: var(--muted); font-size: 22px; font-weight: 650; }
.cd-side b { font-size: 64px; letter-spacing: -.03em; font-weight: 800; font-variant-numeric: tabular-nums; }
.cd-saved { color: var(--success); font-weight: 700; font-size: 18px; }
.cd-paid { margin-top: 18px; padding: 14px 18px; border-radius: 16px; background: var(--canvas); font-size: 18px; font-weight: 650; }

/* ---------- POS reporting ---------- */
.pd { padding: 22px 26px 40px; max-width: 1400px; margin: 0 auto; }
.pd-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.pd-head h1 { font-size: 26px; letter-spacing: -.025em; }
.pd-sub { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.pd-ctl { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-ctl input[type=date], .pd-ctl select { border: 1px solid var(--line); border-radius: 10px; padding: 6px 9px; background: var(--paper); font-size: 13px; }
.pd-to { color: var(--faint); }
.pd-sep { width: 1px; height: 22px; background: var(--line); }
.pd-lab { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.pd-seg { display: inline-flex; background: var(--paper); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.pd-seg button { border: 0; background: none; padding: 5px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.pd-seg button.on { background: var(--accent); color: #fff; }
.pd-loading, .pd-none { color: var(--muted); padding: 30px; text-align: center; }
.pd-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 14px; }
.pd-kpi { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--e1); display: flex; flex-direction: column; gap: 4px; }
.pd-kpi > span { color: var(--muted); font-size: 12.5px; font-weight: 650; }
.pd-kpi > b { font-size: 26px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.pd-kpi > div { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pd-kpi small { color: var(--muted); font-size: 11.5px; }
.pd-kpi.hero { background: linear-gradient(140deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #000)); border-color: transparent; color: #fff; }
.pd-kpi.hero > span, .pd-kpi.hero small { color: rgba(255,255,255,.78); }
.pd-kpi.hero .pd-d { background: rgba(255,255,255,.18); color: #fff; }
.pd-d { font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--line-2); color: var(--muted); }
.pd-d.up { background: color-mix(in srgb, var(--success) 14%, transparent); color: var(--success); }
.pd-d.down { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); }
.pd-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pd-card { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: var(--e1); min-width: 0; }
.pd-card.span2 { grid-column: span 2; }
.pd-card.flush { padding: 0; overflow: hidden; }
.pd-card-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.pd-card-h b { font-size: 14.5px; }
.pd-card-h span, .pd-card-h a { color: var(--muted); font-size: 12.5px; }
.pd-bars { display: flex; align-items: flex-end; gap: 4px; height: 190px; }
.pd-bar { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.pd-bar-v { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.pd-bar-v i { display: block; width: 100%; border-radius: 6px 6px 3px 3px; background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 80%, #fff), var(--accent));
  min-height: 0; transition: height .4s var(--ease); }
.pd-bar:hover .pd-bar-v i { filter: brightness(1.12); }
.pd-bar em { font-style: normal; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.pd-bars.dense em { display: none; }
.pd-bars.dense .pd-bar:nth-child(7n+1) em { display: block; }
.pd-stack { display: flex; height: 14px; border-radius: 99px; overflow: hidden; margin-bottom: 12px; background: var(--line-2); }
.pd-stack span { height: 100%; }
.c0 { background: var(--accent); } .c1 { background: #10b981; } .c2 { background: #f59e0b; } .c3 { background: #ef4444; } .c4 { background: #8b5cf6; } .c5 { background: #06b6d4; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 8px; vertical-align: 0; }
.pd-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.pd-tbl th { text-align: left; color: var(--muted); font-weight: 650; font-size: 12px; padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.pd-tbl td { padding: 8px; border-bottom: 1px solid var(--line-2); }
.pd-tbl td small { display: block; color: var(--muted); font-size: 11.5px; }
.pd-tbl .r { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-tbl .muted { color: var(--muted); }
.pd-tbl .neg { color: var(--danger); }
.pd-tbl tr.tot td { font-weight: 750; border-top: 2px solid var(--line); background: var(--raised); }
.pd-tbl.big td, .pd-tbl.big th { padding: 10px 14px; }
.pd-link { cursor: pointer; }
.pd-link:hover td { background: var(--line-2); }
.pd-scroll { overflow-x: auto; }
.pd-hbar { position: relative; display: flex; justify-content: space-between; padding: 8px 10px; margin-bottom: 6px; border-radius: 10px; overflow: hidden; font-size: 13.5px; }
.pd-hbar i { position: absolute; inset: 0 auto 0 0; background: var(--accent-soft); z-index: 0; border-radius: 10px; }
.pd-hbar span, .pd-hbar b { position: relative; z-index: 1; }
@media (max-width: 1000px) { .pd-grid { grid-template-columns: 1fr; } .pd-card.span2 { grid-column: auto; } .pd { padding: 16px; } }

/* ---------- restaurant: the floor plan ---------- */
.t-body.floor { grid-template-columns: 1fr; }
.f-wrap { display: flex; flex-direction: column; min-height: 0; padding: 12px 16px 14px; gap: 10px; }
.f-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.f-floors { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.f-name { font-size: 16px; }
.f-stage { flex: 1; min-height: 0; display: flex; align-items: flex-start; justify-content: center; overflow: auto; }
.f-plan { position: relative; width: min(100%, calc((100vh - 200px) * 1000 / 640)); aspect-ratio: 1000 / 640; border-radius: 22px;
  background: linear-gradient(var(--line-2) 1px, transparent 1px) 0 0 / 40px 40px, linear-gradient(90deg, var(--line-2) 1px, transparent 1px) 0 0 / 40px 40px, var(--paper);
  border: 1px solid var(--line); box-shadow: var(--e1); }
.f-table { --tc: var(--accent); position: absolute; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 16px; border: 2px solid color-mix(in srgb, var(--tc) 35%, var(--line)); background: var(--canvas); color: var(--ink);
  padding: 4px; text-align: center; overflow: hidden; transition: transform .1s var(--ease), box-shadow .15s; }
.f-table.round { border-radius: 50%; }
.f-table b { font-size: clamp(13px, 1.5vw, 20px); letter-spacing: -.02em; }
.f-table .f-meta { font-size: 11px; color: var(--muted); font-weight: 600; }
.f-table .f-amt { font-weight: 750; font-size: 13px; font-variant-numeric: tabular-nums; }
.f-table:hover { transform: translateY(-1px); box-shadow: var(--e2); }
.f-table.busy { background: color-mix(in srgb, var(--accent) 14%, var(--paper)); border-color: var(--accent); }
.f-table.billed { background: color-mix(in srgb, var(--warn) 16%, var(--paper)); border-color: var(--warn); }
.f-table.ready { background: color-mix(in srgb, var(--success) 16%, var(--paper)); border-color: var(--success); animation: f-pulse 1.6s infinite; }
@keyframes f-pulse { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--success) 25%, transparent); } }
.f-dot { position: absolute; top: 8px; right: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--danger); }
.f-ready { position: absolute; bottom: 6px; font-style: normal; font-size: 10px; font-weight: 800; color: var(--success); text-transform: uppercase; letter-spacing: .06em; }
.f-away { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; min-height: 0; }
.f-empty { display: grid; justify-items: center; gap: 8px; padding: 80px 20px; color: var(--muted); text-align: center; }
.f-empty b { color: var(--ink); font-size: 17px; }
/* editing the plan */
.f-edit { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 260px; gap: 14px; }
.f-side { background: var(--paper); border: 1px solid var(--line); border-radius: 18px; padding: 14px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.f-side hr { border: 0; border-top: 1px solid var(--line-2); margin: 8px 0; }
.f-plan.editing .f-table { cursor: grab; touch-action: none; user-select: none; }
.f-table.edit.sel { box-shadow: 0 0 0 3px var(--accent); }
.f-handle { position: absolute; right: 2px; bottom: 2px; width: 16px; height: 16px; border-radius: 4px; background: var(--accent); cursor: nwse-resize; opacity: .7; }
.f-table.round .f-handle { right: 14%; bottom: 14%; }
.t-primary.wide { width: 100%; }
.f-guests { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; justify-items: center; }
.f-guests .t-pin-key { width: 60px; height: 60px; font-size: 20px; }
.f-pick { display: flex; flex-direction: column; gap: 12px; max-height: 55vh; overflow-y: auto; }
.f-pick-floor > div { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-top: 6px; }
.f-pick-t { display: flex; flex-direction: column; padding: 10px; border-radius: 12px; border: 1px solid var(--line); background: var(--canvas); font-weight: 700; }
.f-pick-t small { color: var(--muted); font-weight: 600; }
.f-pick-t.busy { border-color: var(--accent); background: var(--accent-soft); }
.t-tablebar { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line-2); background: color-mix(in srgb, var(--accent) 7%, var(--paper)); }
.t-tablebar b { font-size: 15px; }
.t-tablebar .t-muted { font-size: 12.5px; }
.t-line-course { font-size: 11px; font-weight: 700; color: var(--accent); }
.t-line-sent { font-size: 11px; font-weight: 700; color: var(--success); }
.t-paper.kitchen .big { font-size: 18px; font-weight: 800; color: #000; }
.t-paper.kitchen .kq { font-size: 16px; font-weight: 800; width: 34px; vertical-align: top; }
@media (max-width: 900px) { .f-edit { grid-template-columns: 1fr; } .f-plan { width: 100%; } }

/* ---------- the kitchen display ---------- */
.kds { position: fixed; inset: 0; z-index: 5; display: flex; flex-direction: column; background: #0b0d12; color: #e8eaf0; }
.kds-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid #1f2430; }
.kds-head b { font-size: 17px; }
.kds-head select { background: #151924; color: #e8eaf0; border: 1px solid #2a3040; border-radius: 10px; padding: 6px 10px; }
.kds-clock { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.kds-cols { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; padding: 12px; }
.kds-cols section { display: flex; flex-direction: column; min-height: 0; background: #11141c; border-radius: 16px; padding: 10px; }
.kds-cols h2 { font-size: 14px; text-transform: uppercase; letter-spacing: .08em; color: #8b93a7; margin: 2px 4px 10px; }
.kds-cols h2 i { font-style: normal; color: #e8eaf0; margin-left: 6px; }
.kds-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.kds-t { background: #1a1f2b; border-radius: 14px; border-top: 4px solid #3b82f6; padding: 10px 12px; }
.kds-t.slow { border-top-color: #f59e0b; }
.kds-t.late { border-top-color: #ef4444; }
.kds-t.void { border-top-color: #ef4444; background: #2a1518; }
.kds-t-head { display: flex; align-items: baseline; gap: 8px; }
.kds-t-head b { font-size: 18px; }
.kds-t-head span { color: #8b93a7; font-size: 12px; }
.kds-t-head em { margin-left: auto; font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.kds-t ul { list-style: none; padding: 0; margin: 8px 0; }
.kds-t li { padding: 6px 4px; border-bottom: 1px dashed #2a3040; font-size: 15px; cursor: pointer; }
.kds-t li b { color: #93c5fd; margin-right: 4px; }
.kds-t li small { display: block; color: #fbbf24; font-size: 12px; margin-left: 24px; }
.kds-t li.done { opacity: .4; text-decoration: line-through; }
.kds-t-foot { display: flex; align-items: center; gap: 6px; }
.kds-t-foot span { color: #8b93a7; font-size: 12px; margin-right: auto; }
.kds-none { color: #4b5263; text-align: center; padding: 30px; }
@media (max-width: 900px) { .kds-cols { grid-template-columns: 1fr; } }
.t-ap-list { margin: 4px 0 8px; padding-left: 18px; color: var(--ink); font-size: 14px; line-height: 1.5; }
.t-ap-list li + li { margin-top: 2px; }

/* ---------- restaurant: the order panel ---------- */
.t-tablechip { flex: none; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-radius: 12px; border: 0;
  background: var(--accent); color: #fff; font-weight: 700; }
.t-tablechip .t-i { width: 16px; height: 16px; }
.t-tablechip b { font-size: 14px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-tablechip small { font-size: 12px; opacity: .85; font-weight: 600; }
.t-racts { display: grid; grid-template-columns: 1.5fr repeat(4, 1fr); gap: 6px; padding: 8px 10px 0; border-top: 1px solid var(--line-2); }
.t-ract { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; padding: 7px 2px;
  border-radius: 11px; border: 1px solid var(--line); background: var(--paper); color: var(--ink-2); font-size: 11px; font-weight: 650; min-width: 0; }
.t-ract span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.t-ract .t-i { width: 18px; height: 18px; }
.t-ract > b { font-size: 15px; line-height: 18px; color: var(--accent); }
.t-ract:hover:not(:disabled) { border-color: var(--faint); color: var(--ink); }
.t-ract:disabled { opacity: .45; }
.t-ract.send.hot { background: var(--accent); border-color: transparent; color: #fff; }
.t-ract i { position: absolute; top: 4px; right: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; font-style: normal;
  font-size: 11px; line-height: 18px; background: #fff; color: var(--accent); font-weight: 800; }
.t-badge.course { background: var(--accent-soft); color: var(--accent); }
.t-badge.new { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.t-badge.void { background: var(--danger); color: #fff; }

/* ---------- restaurant: split bill ---------- */
.t-split { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.t-split-row { display: grid; grid-template-columns: 1fr auto 44px auto auto; align-items: center; gap: 6px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 12px; }
.t-split-row.on { border-color: var(--accent); background: var(--accent-soft); }
.t-split-row > b { text-align: center; font-variant-numeric: tabular-nums; }
.t-split-name { display: flex; flex-direction: column; min-width: 0; font-weight: 650; }
.t-split-name small { color: var(--muted); font-weight: 500; font-size: 12px; }
.t-split-sum { font-size: 17px; font-variant-numeric: tabular-nums; }
.t-paper.kitchen .big, .t-paper-meta .big { font-size: 16px; font-weight: 800; color: #000; }
.t-paper.kitchen .kq { width: 38px; font-weight: 800; font-size: 15px; vertical-align: top; }
.t-paper.kitchen + .t-paper.kitchen { break-before: page; }

@media (max-width: 560px) {
  .t-racts { grid-template-columns: repeat(5, 1fr); }
  .t-tablechip small { display: none; }
}
.t-line.gone .t-line-name { text-decoration: line-through; color: var(--muted); }
.t-body.held .t-order, .t-body.held .t-prods { pointer-events: none; opacity: .62; transition: opacity .15s; }
.kds-head select#k-reg { font-weight: 700; font-size: 15px; }
.kds-sound { color: #fbbf24; border-color: #fbbf24; }
.kds-recall { margin-top: 10px; padding-top: 8px; border-top: 1px dashed #2a3040; display: flex; flex-direction: column; gap: 6px; }
.kds-recall h3 { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #8b93a7; margin: 0 2px; }
.kds-rc { text-align: left; padding: 8px 10px; border-radius: 10px; border: 1px solid #2a3040; background: #151924; color: #8b93a7; font-size: 13px; }
.kds-rc:hover { color: #e8eaf0; }

/* ---------- presets ---------- */
.t-preset { --pc: var(--accent); flex: none; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 1px;
  padding: 7px 11px; border-radius: 12px; border: 0; background: color-mix(in srgb, var(--pc) 16%, var(--paper)); color: var(--ink);
  font-weight: 700; font-size: 13px; max-width: 140px; box-shadow: inset 3px 0 0 var(--pc); }
.t-preset small { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.t-slotdays { flex-wrap: wrap; margin-bottom: 10px; }
.t-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; max-height: 50vh; overflow-y: auto; }
.t-slot { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 6px; border-radius: 12px; border: 1px solid var(--line); background: var(--canvas); }
.t-slot b { font-size: 16px; font-variant-numeric: tabular-nums; }
.t-slot small { font-size: 11.5px; color: var(--muted); }
.t-slot.on { border-color: var(--accent); background: var(--accent-soft); }
.t-slot.full { opacity: .45; }
.t-slot:hover:not(:disabled) { border-color: var(--faint); }

/* ---------- offline ---------- */
.t-net { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--paper); color: var(--ink-2); font-size: 12.5px; font-weight: 700; }
.t-net[hidden] { display: none; }
.t-net .t-i { width: 17px; height: 17px; }
.t-net.off { background: color-mix(in srgb, var(--danger) 14%, var(--paper)); border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); color: var(--danger); }
.t-net.busy .t-i { animation: t-pulse 1s ease-in-out infinite; }
@keyframes t-pulse { 50% { opacity: .35; } }
.t-done.offline .t-tick { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); }
.t-err { color: var(--danger); }
/* The till says itself what offline means here: the app-wide bar is not needed over it. */
body:has(.till) .m-offline { display: none; }
.kds-preset { margin: 4px 0 2px; display: inline-block; padding: 2px 8px; border-radius: 8px; background: #2a2f1a; color: #fde68a; font-size: 12.5px; font-weight: 700; }

/* ---------- gift cards, eWallets, coupons ---------- */
.t-line-card { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 650; color: var(--accent); letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.t-line-card .t-i { width: 14px; height: 14px; flex: none; }
.t-sum-row.reward { width: 100%; gap: 10px; margin: 2px 0 6px; padding: 7px 10px; border-radius: 10px; cursor: pointer; text-align: start;
  border: 1px dashed color-mix(in srgb, #f59e0b 55%, var(--line)); background: color-mix(in srgb, #f59e0b 9%, transparent); color: #b45309; font-weight: 650; }
.t-sum-row.reward b { color: inherit; font-size: 15px; }
.t-sum-row.reward:hover { background: color-mix(in srgb, #f59e0b 16%, transparent); }
:root[data-theme="dark"] .t-sum-row.reward { color: #fbbf24; }
.t-meth.k-giftcard .t-meth-ico { background: color-mix(in srgb, #db2777 14%, transparent); color: #db2777; }
.t-meth.k-wallet .t-meth-ico { background: color-mix(in srgb, #7c3aed 14%, transparent); color: #7c3aed; }
:root[data-theme="dark"] .t-meth.k-giftcard .t-meth-ico { color: #f472b6; }
:root[data-theme="dark"] .t-meth.k-wallet .t-meth-ico { color: #a78bfa; }
.t-gcbox { display: grid; gap: 4px; padding: 14px 16px; margin-bottom: 4px; border-radius: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 14%, var(--paper)), var(--paper)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
.t-gcbox-k { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 13px; }
.t-gcbox-k .t-i { width: 18px; height: 18px; color: var(--accent); flex: none; }
.t-gcbox-k b { letter-spacing: .04em; }
.t-gcbox-v { font-size: 26px; font-weight: 800; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.t-gcbox small { color: var(--muted); font-size: 12.5px; }
.t-gcbox.bad { background: color-mix(in srgb, var(--danger) 8%, var(--paper)); border-color: color-mix(in srgb, var(--danger) 40%, var(--line)); }
.t-gcbox.bad small { color: var(--danger); font-weight: 650; }
.t-gcbad { padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--danger) 10%, var(--paper)); color: var(--danger); font-weight: 650; font-size: 13.5px; }
.t-paper-cards { border-top: 1px dashed #bbb; margin-top: 6px; padding-top: 6px; }
.t-paper-cards .t-gline { display: flex; justify-content: space-between; gap: 12px; }
.t-paper-cards .t-gline.tax { color: #555; font-size: 11.5px; }
.t-gcard { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; padding: 10px; border: 1.5px dashed #444; border-radius: 8px; text-align: center; }
.t-gcard span { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; }
.t-gcard b { font-size: 16px; letter-spacing: .08em; }
.t-gcard small { font-size: 11.5px; color: #444; }
.t-gcard.coupon { border-style: dotted; }

/* ---------- customer accounts and sales orders ---------- */
.t-pill.owe { background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn); white-space: nowrap; }
.t-pill.bad { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); white-space: nowrap; }
.t-cust-btn small.t-owes { color: var(--warn); font-weight: 650; }
.t-cust-btn small.t-over { color: var(--danger); font-weight: 700; }
.t-tab.settle { border-style: dashed; }
.t-tab.settle.on { background: var(--success); border-color: var(--success); }
.t-tab.so.on { box-shadow: inset 0 -3px 0 color-mix(in srgb, #fff 55%, transparent); }
.t-settle-list { display: inline-flex; align-items: center; gap: 8px; min-width: 0; color: var(--ink-2); font-size: 13px; }
.t-settle-list .t-i { width: 18px; height: 18px; flex: none; color: var(--muted); }
.t-settle-list > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-invs { display: grid; gap: 6px; max-height: 52vh; overflow-y: auto; margin-bottom: 4px; }
.t-inv { display: grid; grid-template-columns: 1fr 110px; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); }
.t-inv.off { opacity: .55; }
.t-inv-main { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer; }
.t-inv-main input { width: 18px; height: 18px; flex: none; accent-color: var(--accent); }
.t-inv-main > span { display: flex; flex-direction: column; min-width: 0; }
.t-inv-main small { color: var(--muted); font-size: 12px; }
.t-inv-amt { height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--canvas); padding: 0 10px; font-size: 14.5px; font-weight: 650;
  text-align: end; font-variant-numeric: tabular-nums; min-width: 0; color: var(--ink); }
.t-inv-amt:focus { outline: 0; border-color: var(--accent); }
.t-sochip { flex: none; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 6px 10px; border-radius: 12px; max-width: 150px;
  background: color-mix(in srgb, var(--accent) 12%, var(--paper)); box-shadow: inset 3px 0 0 var(--accent); color: var(--ink); font-size: 13px; }
.t-sochip .t-i { display: none; }
.t-sochip small { color: var(--muted); font-size: 11.5px; font-weight: 650; }
.t-badge.so { background: var(--accent-soft); color: var(--accent); }
.t-line.dp { cursor: default; background: color-mix(in srgb, var(--success) 6%, transparent); }
.t-line.dp .t-line-total { color: var(--success); }
.t-solines { display: grid; gap: 4px; max-height: 36vh; overflow-y: auto; margin: 4px 0 10px; }
.t-soline { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: baseline; padding: 7px 4px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.t-soline small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.t-soline b { font-variant-numeric: tabular-nums; }
.t-soline.done { opacity: .5; }
.t-sototals { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 10px 12px; border-radius: 12px; background: var(--canvas); font-size: 13.5px; color: var(--ink-2); }
.t-sototals b { text-align: end; font-variant-numeric: tabular-nums; color: var(--ink); }
.t-sototals .big { font-weight: 750; font-size: 15px; color: var(--ink); }
.t-sodp { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.t-sodp > span { font-weight: 650; font-size: 13.5px; }
.t-sodp input { height: 40px; width: 140px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper); padding: 0 12px; font-size: 15px; color: var(--ink); }
.t-sodp input:focus { outline: 0; border-color: var(--accent); }
@media (max-width: 640px) {
  .t-inv { grid-template-columns: 1fr 96px; }
}

/* ---------- guests ordering for themselves (QR codes, kiosk) ---------- */
.t-badge.guest { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
/* a guest order: a dot in the corner opposite the unsent dot, never over the table's name */
.f-guest { position: absolute; top: 8px; left: 10px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 30%, transparent); }
/* (a table with dishes ready keeps its green cue; the QR badge says the rest) */
.f-table.guest:not(.ready) { border-color: var(--accent); animation: f-guest 1.8s ease-in-out infinite; }
@keyframes f-guest { 50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--accent) 28%, transparent); } }
.t-chip.guest { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 25%, transparent); }
.t-chip.guest::before { content: "New"; margin-right: 6px; padding: 1px 6px; border-radius: 6px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 750; }

/* the QR codes page (public/pos-qr.js) */
.qrp { position: fixed; inset: 0; z-index: 5; display: grid; grid-template-rows: auto 1fr; overflow: hidden; background: var(--canvas); color: var(--ink); }
.qrp .lbl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; min-height: 58px; background: var(--paper); border-bottom: 1px solid var(--line); }
.qrp .lbl-head h1 { font-size: 19px; letter-spacing: -.02em; margin: 0; }
.qrp .lbl-back { text-decoration: none; }
.qrp-reg { margin: 0; flex-direction: row; align-items: center; gap: 8px; }
.qrp-reg select { padding: 7px 10px; font-size: 14px; color: var(--ink); }
.qrp-main { overflow-y: auto; padding: 18px 16px 40px; }
.qrp-note { max-width: 1100px; margin: 0 auto 16px; padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--ink); font-size: 14px; }
.qrp-note a { color: var(--accent); font-weight: 650; }
.qrp-empty { max-width: 520px; margin: 40px auto; display: flex; flex-direction: column; gap: 6px; text-align: center; color: var(--muted); }
.qrp-empty b { color: var(--ink); font-size: 16px; }
.qrp-grid { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.qrp-card { background: #fff; color: #17130f; border-radius: 18px; padding: 18px 16px 14px; text-align: center; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 6px 18px rgba(0, 0, 0, .06);
  border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; }
.qrp-brand { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; color: #6f655b; }
.qrp-title { margin: 4px 0 10px; font-family: "Iowan Old Style", "Palatino Linotype", Georgia, serif; font-size: 28px; font-weight: 600; line-height: 1.1; }
.qrp-code { width: 100%; max-width: 190px; aspect-ratio: 1; }
.qrp-code svg { width: 100%; height: 100%; display: block; }
.qrp-call { margin: 10px 0 2px; font-weight: 650; font-size: 13.5px; }
.qrp-url { margin: 2px 0 10px; font-size: 11px; color: #8a8076; word-break: break-all; }
.qrp-acts { display: flex; gap: 8px; }
.qrp-card.kiosk .qrp-title { color: var(--accent); }
.qrp-print { display: none; }
@page qrp-a4 { size: 210mm 297mm; margin: 0; }
@media print {
  html.qrp-printing, body.qrp-printing { margin: 0 !important; padding: 0 !important; width: auto !important; height: auto !important;
    min-height: 0 !important; overflow: visible !important; background: #fff !important; }
  body.qrp-printing > *:not(.qrp-print) { display: none !important; }
  body.qrp-printing > .qrp-print { display: block !important; }
  .qrp-page { page: qrp-a4; width: 210mm; height: 297mm; display: grid; grid-template-columns: 105mm 105mm; grid-template-rows: 148.5mm 148.5mm;
    break-after: page; page-break-after: always; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .qrp-page:last-child { break-after: auto; page-break-after: auto; }
  .qrp-page .qrp-card { border-radius: 0; box-shadow: none; border: .2mm dashed #c9c2ba; padding: 12mm 8mm 8mm; justify-content: center; }
  .qrp-page .qrp-brand { font-size: 10pt; }
  .qrp-page .qrp-title { font-size: 30pt; margin: 2mm 0 5mm; }
  .qrp-page .qrp-code { width: 66mm; max-width: none; }
  .qrp-page .qrp-call { font-size: 12pt; margin-top: 5mm; }
}

/* Sales Details (public/pos-reports.js): the page is the printout */
.sd-paper { background: #fff; color: #17130f; max-width: 900px; margin: 0 auto; border-radius: 14px; padding: 34px 38px 40px; box-shadow: var(--e2); }
.sd-paper h3 { font-size: 15px; letter-spacing: .02em; text-transform: uppercase; color: #5d544b; margin: 26px 0 8px; }
.sd-top { display: flex; justify-content: space-between; gap: 20px; border-bottom: 2px solid #17130f; padding-bottom: 14px; }
.sd-top h2 { font-size: 26px; margin: 0 0 4px; letter-spacing: -.02em; }
.sd-top p { margin: 2px 0; color: #5d544b; font-size: 13.5px; }
.sd-co { text-align: end; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #5d544b; }
.sd-co b { color: #17130f; font-size: 15px; }
.sd-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 18px; }
.sd-kpis div { border: 1px solid #e3ddd6; border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.sd-kpis span { font-size: 12px; color: #7a7066; font-weight: 650; }
.sd-kpis b { font-size: 19px; font-variant-numeric: tabular-nums; }
.sd-kpis em { font-style: normal; font-size: 12px; color: #7a7066; }
.sd-tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sd-tbl th { text-align: start; font-size: 12px; color: #7a7066; font-weight: 650; border-bottom: 1px solid #d9d2ca; padding: 6px 8px; }
.sd-tbl td { padding: 5px 8px; border-bottom: 1px solid #f0ebe5; font-variant-numeric: tabular-nums; }
.sd-tbl .r { text-align: end; }
.sd-tbl .muted { color: #8a8076; }
.sd-tbl .neg { color: #b4312a; }
.sd-tbl small { color: #8a8076; }
.sd-tbl .sd-cat td { font-weight: 700; background: #f7f4f0; }
.sd-tbl .tot td { font-weight: 750; border-top: 1.5px solid #17130f; border-bottom: 0; }
.sd-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.sd-sum { max-width: 360px; margin: 18px 0 0 auto; }
.sd-none { color: #8a8076; font-size: 13.5px; }
.sd-print { display: none; }
@media (max-width: 720px) { .sd-paper { padding: 20px 16px; } .sd-kpis { grid-template-columns: 1fr 1fr; } .sd-cols { grid-template-columns: 1fr; } }
@media print {
  html.sd-printing, body.sd-printing { margin: 0 !important; padding: 0 !important; background: #fff !important; height: auto !important; overflow: visible !important; }
  body.sd-printing > *:not(.sd-print) { display: none !important; }
  body.sd-printing > .sd-print { display: block !important; }
  .sd-print .sd-paper { box-shadow: none; border-radius: 0; max-width: none; padding: 12mm 12mm; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sd-print .sd-tbl tr { break-inside: avoid; }
}

/* weighing a product sold by the kilogram */
.t-weigh { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin: 6px 0 2px; }
.t-weigh output { font-size: 40px; font-weight: 750; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.t-weigh span { font-size: 18px; color: var(--muted); font-weight: 650; }
.t-weigh-total { text-align: center; color: var(--muted); font-size: 13.5px; min-height: 18px; margin: 0 0 10px; font-variant-numeric: tabular-nums; }
.t-weigh-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.t-weigh-pad .t-pin-key { border-radius: 16px; height: 58px; }
.t-pstat .rounding b { color: var(--muted); font-weight: 650; }

/* loyalty: one section per program running at the register */
.t-loyprogs { display: flex; flex-direction: column; gap: 14px; max-height: 60vh; overflow-y: auto; margin: 6px 0 4px; }
.t-loyprog { border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: var(--paper); }
.t-loyprog-h { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-bottom: 10px; }
.t-loyprog-h b { font-size: 15px; }
.t-loyprog-h span { color: var(--muted); font-size: 13px; }
.t-loyprog-h em { font-style: normal; margin-inline-start: auto; color: var(--success); font-weight: 700; font-size: 13px; }
.t-reward:disabled { opacity: .45; cursor: default; }
.t-reward:disabled:hover { border-color: var(--line); }

/* ---------- batch 11: product info, ship later, order numbers, order status ---------- */
.t-card { position: relative; }
/* (beside the price, clear of the image's badges; a touch till always shows it) */
.t-info { position: absolute; bottom: 9px; right: 9px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  font: italic 700 12px/1 Georgia, serif; color: var(--ink-2); background: var(--paper);
  border: 1px solid var(--line); box-shadow: var(--e1); opacity: 0; transition: opacity .15s, transform .12s var(--ease); cursor: pointer; }
.t-card:hover .t-info, .t-card:focus-visible .t-info { opacity: 1; }
.t-info:hover { transform: scale(1.12); color: var(--accent); border-color: var(--accent); }
@media (any-pointer: coarse) { .t-info { opacity: .85; } }

.t-pi-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.t-pi-head h3 { margin: 0; }
.t-pi-price { text-align: right; display: grid; gap: 2px; }
.t-pi-price b { font-size: 26px; font-weight: 780; letter-spacing: -.02em; color: var(--accent); font-variant-numeric: tabular-nums; }
.t-pi-price b small { font-size: 13px; color: var(--muted); font-weight: 600; }
.t-pi-price > small { color: var(--muted); font-size: 12px; }
.t-pi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.t-pi-card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--paper); }
.t-pi-card.mgr { background: color-mix(in srgb, var(--accent) 6%, var(--paper)); border-color: color-mix(in srgb, var(--accent) 30%, var(--line)); }
.t-pi-card h4 { margin: 0 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.t-pi-card h4 small { text-transform: none; letter-spacing: 0; font-weight: 600; margin-left: 4px; }
.t-pi-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 5px 0; border-bottom: 1px dashed var(--line); font-size: 13.5px; }
.t-pi-row:last-child { border-bottom: 0; }
.t-pi-row span { color: var(--ink-2); }
.t-pi-row span small, .t-pi-row b small { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.t-pi-row b { font-variant-numeric: tabular-nums; }
.t-pi-row.bad b { color: var(--danger); }
.t-pi-row.strong b { color: var(--success); }
.t-pi-desc { margin: 12px 2px 0; color: var(--ink-2); font-size: 13px; line-height: 1.5; }

.t-tab b.t-trk { font-size: 11.5px; font-weight: 800; padding: 1px 6px; border-radius: 6px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.t-tab.on b.t-trk { background: rgba(255,255,255,.22); color: #fff; }
.t-trackno { border-radius: 18px; padding: 14px 20px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  background: color-mix(in srgb, var(--accent) 10%, var(--paper)); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
.t-trackno span { font-weight: 650; color: var(--muted); }
.t-trackno b { font-size: 40px; font-weight: 820; letter-spacing: -.03em; color: var(--accent); font-variant-numeric: tabular-nums; line-height: 1; }
.t-shipres { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; font-weight: 650; font-size: 14px;
  background: color-mix(in srgb, #0ea5e9 12%, var(--paper)); }
.t-shipres svg { width: 20px; height: 20px; flex: none; }
.t-paper-meta .trk { font-size: 22px; font-weight: 800; letter-spacing: .04em; border: 2px solid currentColor; border-radius: 8px; padding: 2px 10px; justify-self: start; }

.kds-no { font-style: normal; font-weight: 800; font-size: 18px; color: #0b0d12; background: #fbbf24; border-radius: 8px; padding: 1px 8px; font-variant-numeric: tabular-nums; }
.kds-note { margin: 6px 0 2px; padding: 6px 8px; border-radius: 8px; background: #2b1d1d; color: #fca5a5; font-size: 13px; font-weight: 600; }

.kds-cols.two { grid-template-columns: 1fr 1.2fr; }
.kds-cols section.ready { background: linear-gradient(180deg, rgba(52,211,153,.09), transparent 50%), #11141c; }
.pick-list { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); align-content: start; gap: 10px; }
.pick-o { background: #1a1f2b; border-radius: 14px; padding: 12px; display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; gap: 4px 10px; align-items: center;
  border-top: 4px solid #64748b; }
.pick-o.ready { border-top-color: #34d399; }
.pick-no { grid-row: span 2; font-size: 38px; font-weight: 820; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: #f5f7fb; min-width: 2ch; }
.pick-o.ready .pick-no { color: #34d399; }
.pick-name { font-weight: 650; font-size: 13.5px; color: #c7cedc; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pick-o em { font-style: normal; color: #8b93a7; font-size: 12px; font-variant-numeric: tabular-nums; }
.pick-o button { grid-column: 1 / -1; margin-top: 6px; }
@media (max-width: 760px) { .kds-cols.two { grid-template-columns: 1fr; } }

/* ---------- batch 12: lots and serial numbers ---------- */
.t-lots { display: grid; gap: 8px; max-height: 46vh; overflow-y: auto; margin-top: 10px; }
.t-lotrow { display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; gap: 2px 12px; text-align: left; padding: 10px 14px;
  border-radius: 12px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.t-lotrow:hover { border-color: var(--accent); box-shadow: var(--e1); }
.t-lotrow b { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.t-lotrow span { grid-column: 1; font-size: 12.5px; color: var(--muted); }
.t-lotrow em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-weight: 700; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.t-lotrow.soon span { color: var(--warn); font-weight: 650; }
.t-lotrow.expired { border-color: color-mix(in srgb, var(--danger) 45%, var(--line)); }
.t-lotrow.expired span { color: var(--danger); font-weight: 700; }
.t-line-lot { display: block; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; margin-top: 2px; }
.t-line-lot.none { color: var(--warn); font-weight: 650; }

.t-line-lot.pick { display: inline-flex; margin-top: 3px; padding: 2px 9px; border-radius: 99px; border: 1px dashed var(--warn);
  background: color-mix(in srgb, var(--warn) 10%, transparent); cursor: pointer; font: inherit; font-size: 12px; font-weight: 650; color: var(--warn); }
.t-line-lot.pick:hover { background: color-mix(in srgb, var(--warn) 18%, transparent); }

/* ---------- batch 12: event tickets at the till ---------- */
.t-line-tix { display: flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--accent); margin-top: 2px; overflow-wrap: anywhere; }
.t-line-tix .t-i { width: 14px; height: 14px; flex: none; }
.t-evs { display: grid; gap: 8px; max-height: 52vh; overflow-y: auto; margin-top: 10px; }
.t-ev { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; text-align: left; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--paper); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.t-ev:hover { border-color: var(--accent); box-shadow: var(--e1); }
.t-ev b { font-size: 15px; font-weight: 700; }
.t-ev span { grid-column: 1; font-size: 12.5px; color: var(--muted); }
.t-ev em { grid-column: 2; grid-row: 1 / span 2; align-self: center; font-style: normal; font-weight: 700; font-size: 12.5px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.t-ev em.low { color: var(--warn); }
.t-tix { display: grid; gap: 6px; margin-top: 10px; }
.t-tix-row { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); }
.t-tix-row.off { opacity: .55; }
.t-tix-row span:first-child { display: grid; gap: 1px; }
.t-tix-row b { font-weight: 700; }
.t-tix-row small { font-size: 12px; color: var(--muted); }
.t-tix-row em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; }
.t-step { display: inline-flex; align-items: center; gap: 8px; }
.t-step b { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; font-size: 16px; }
.t-step button { min-width: 38px; min-height: 38px; font-size: 18px; }
.t-tixnames { display: grid; gap: 8px; max-height: 52vh; overflow-y: auto; margin-top: 10px; }
.t-tixname { display: grid; grid-template-columns: minmax(80px, 1fr) 2fr 2fr; align-items: center; gap: 8px; }
.t-tixname span { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.t-tixname input { min-width: 0; }
@media (max-width: 640px) { .t-tixname { grid-template-columns: 1fr; gap: 4px; padding-bottom: 6px; border-bottom: 1px solid var(--line); } }
.t-paper-tix { display: grid; gap: 8px; margin: 8px 0; }
.t-ptix { display: grid; justify-items: center; gap: 2px; padding: 10px; border: 1.5px dashed #444; border-radius: 8px; text-align: center; break-inside: avoid; }
.t-ptix span { font-size: 10.5px; font-weight: 800; letter-spacing: .14em; }
.t-ptix b { font-size: 15px; }
.t-ptix small { font-size: 11.5px; color: #444; }
.t-ptix-qr { display: block; width: 128px; height: 128px; margin-top: 4px; }
.t-ptix-qr svg { width: 100%; height: 100%; display: block; }
.t-ptix code { font-size: 15px; font-weight: 800; letter-spacing: .12em; }

/* ---------- batch 12: table bookings on the floor plan ---------- */
.f-table .f-bk { max-width: 100%; padding: 1px 6px; border-radius: 999px; font-size: 10.5px; font-weight: 700; color: var(--ink-2);
  background: color-mix(in srgb, var(--accent) 10%, var(--paper)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.f-table .f-bk.soon { color: var(--warn); background: color-mix(in srgb, var(--warn) 14%, var(--paper)); }
.f-table.booked { border-style: dashed; border-color: var(--warn); }
.f-table.later { border-style: dashed; }
.f-bkday { display: inline-flex; align-items: center; gap: 6px; }
.f-bkday b { min-width: 96px; text-align: center; }
.f-bks { display: grid; gap: 6px; max-height: 56vh; overflow-y: auto; margin-top: 8px; }
.f-bk-row { display: grid; grid-template-columns: 54px 1fr auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--paper); }
.f-bk-row.cancelled, .f-bk-row.no_show { opacity: .6; }
.f-bk-row.completed { background: color-mix(in srgb, var(--success) 7%, var(--paper)); }
.f-bk-t { font-weight: 800; font-size: 16px; font-variant-numeric: tabular-nums; }
.f-bk-who { display: grid; gap: 1px; min-width: 0; }
.f-bk-who b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.f-bk-who small { font-size: 12px; color: var(--muted); }
.f-bk-who .f-bk-note { color: var(--ink-2); font-style: italic; }
.f-bk-acts { display: inline-flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.f-bk-acts .sure { color: var(--danger); border-color: var(--danger); }
.f-bkform { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 8px 0; }
.f-bktimes { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; max-height: 30vh; overflow-y: auto; }
.f-bktimes .t-chip { display: inline-grid; justify-items: center; gap: 0; min-width: 64px; font-variant-numeric: tabular-nums; }
.f-bktimes .t-chip small { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.f-bktimes .t-chip.on { background: var(--accent); color: var(--on-accent, #fff); border-color: var(--accent); }
.f-bktimes .t-chip.on small { color: inherit; opacity: .85; }
@media (max-width: 640px) { .f-bk-row { grid-template-columns: 48px 1fr; } .f-bk-acts { grid-column: 1 / -1; justify-content: flex-start; } }

/* ---------- batch 13: exchanges, returns without a receipt, the receipt's barcode ---------- */
.t-xback { margin: 0 12px 6px; padding: 8px 10px; border-radius: 12px; border: 1px dashed color-mix(in srgb, var(--warn) 55%, var(--line));
  background: color-mix(in srgb, var(--warn) 7%, var(--paper)); display: grid; gap: 4px; }
.t-xback-h { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.t-xback-h .t-i { width: 15px; height: 15px; flex: none; color: var(--warn); }
.t-xback-h b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.t-xback-h span { font-weight: 750; font-variant-numeric: tabular-nums; color: var(--ink-2); font-size: 12.5px; }
.t-xback-l { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); }
.t-xback-l b { font-weight: 650; font-variant-numeric: tabular-nums; }
.t-paper-x { margin: 6px 0; padding-top: 6px; border-top: 1px dashed #999; display: grid; gap: 2px; font-size: 12px; }
.t-paper-x > div { display: flex; justify-content: space-between; gap: 8px; }
.t-paper-x-h { font-weight: 800; letter-spacing: .06em; font-size: 10.5px; }
.t-paper-bar { display: grid; justify-items: center; gap: 2px; margin-top: 10px; }
.t-paper-bar-svg { display: block; width: 100%; max-width: 260px; height: 44px; }
.t-paper-bar-svg svg { display: block; width: 100%; height: 100%; }
.t-paper-bar span { font-family: ui-monospace, Menlo, monospace; font-size: 11px; letter-spacing: .08em; }
.t-paper-iqr { display: grid; grid-template-columns: 76px 1fr; align-items: center; gap: 10px; margin: 10px 0 4px; font-size: 11.5px; }
.t-paper-iqr-svg { display: block; width: 76px; height: 76px; }
.t-paper-iqr-svg svg { display: block; width: 100%; height: 100%; }

/* POS reports pack: payments by day, product mix, busy hours, cashiers, exceptions */
.pr-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin: -4px 0 16px; padding: 4px; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; width: fit-content; max-width: 100%; }
.pr-tabs a { padding: 7px 13px; border-radius: 10px; font-size: 13px; font-weight: 650; color: var(--muted); text-decoration: none; white-space: nowrap; }
.pr-tabs a:hover { color: var(--ink); background: var(--line-2); }
.pr-tabs a.on { background: var(--accent); color: #fff; }
.pr-gap { margin-top: 12px; }
.pr-note { color: var(--muted); font-size: 12.5px; margin: 10px 4px 0; max-width: 900px; }
.pr-muted { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.pr-nowrap { white-space: nowrap; }
.pr-detail { max-width: 340px; color: var(--muted); }
.pr-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; }
.pr-legend b { font-variant-numeric: tabular-nums; }
.pr-legend em { font-style: normal; color: var(--muted); font-size: 12px; }
.pd-kpi > b small { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 0; }
.pd-kpi.warn { border-color: color-mix(in srgb, var(--warning, #d97706) 45%, var(--line)); background: color-mix(in srgb, var(--warning, #d97706) 7%, var(--paper)); }
.pr-abc { display: inline-grid; place-items: center; width: 24px; height: 22px; border-radius: 7px; font-size: 12px; font-weight: 800; }
.pr-abc.a { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }
.pr-abc.b { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.pr-abc.c { background: var(--line-2); color: var(--muted); }
.pr-cum { min-width: 150px; }
.pr-cum span { display: inline-block; vertical-align: middle; width: 90px; height: 7px; border-radius: 99px; background: var(--line-2); overflow: hidden; margin-inline-end: 8px; }
.pr-cum i { display: block; height: 100%; border-radius: 99px; background: var(--muted); }
.pr-cum i.a { background: var(--success); } .pr-cum i.b { background: var(--accent); }
.pr-cum em { font-style: normal; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.pr-heat { border-collapse: separate; border-spacing: 3px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.pr-heat th { color: var(--muted); font-weight: 650; padding: 2px 4px; text-align: center; }
.pr-heat tr th:first-child { text-align: start; padding-inline-end: 8px; }
.pr-heat td { --a: 0; min-width: 38px; height: 34px; border-radius: 8px; text-align: center; color: var(--ink);
  background: color-mix(in srgb, var(--accent) calc(var(--a) * 100%), var(--line-2)); }
.pr-heat td.hot { color: #fff; font-weight: 700; }
.pr-heat td.z { background: var(--line-2); opacity: .5; }
.pr-flag { color: var(--warning, #b45309); }
.pr-flag small { color: var(--warning, #b45309); }
.pr-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.pr-chips button { border: 1px solid var(--line); background: var(--paper); border-radius: 99px; padding: 5px 12px; font-size: 12.5px; font-weight: 650; color: var(--muted); }
.pr-chips button em { font-style: normal; margin-inline-start: 4px; color: var(--faint); font-variant-numeric: tabular-nums; }
.pr-chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pr-chips button.on em { color: rgba(255,255,255,.8); }
.pr-type { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--line-2); color: var(--muted); }
.pr-type.discount { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }
.pr-type.refund, .pr-type.payout { background: color-mix(in srgb, var(--danger) 11%, transparent); color: var(--danger); }
.pr-type.noreceipt, .pr-type.cash_diff { background: color-mix(in srgb, var(--warning, #d97706) 15%, transparent); color: var(--warning, #b45309); }
.pr-type.exchange { background: color-mix(in srgb, #8b5cf6 13%, transparent); color: #7c3aed; }
.pr-type.void { background: color-mix(in srgb, #ef4444 9%, transparent); color: #b91c1c; }
@media (max-width: 720px) { .pr-tabs { width: auto; } .pr-detail { max-width: 200px; } }
@media print {
  .sd-print .no-print { display: none !important; }
  .sd-print .pr-sheet { color: #17130f; }
  .sd-print .pr-sheet .pd-kpis { grid-template-columns: repeat(4, 1fr); margin-top: 16px; }
  .sd-print .pr-sheet .pd-kpi, .sd-print .pr-sheet .pd-card { background: #fff; color: #17130f; box-shadow: none; border-color: #e3ddd6; break-inside: avoid; }
  .sd-print .pr-sheet .pd-kpi.hero { background: #fff; color: #17130f; border-color: #17130f; }
  .sd-print .pr-sheet .pd-kpi.hero > span, .sd-print .pr-sheet .pd-kpi.hero small { color: #5d544b; }
  .sd-print .pr-sheet .pd-tbl th, .sd-print .pr-sheet .pr-note, .sd-print .pr-sheet .muted { color: #7a7066; }
  .sd-print .pr-sheet .pd-tbl td { border-color: #f0ebe5; }
  .sd-print .pr-sheet .pd-tbl tr { break-inside: avoid; }
  .sd-print .pr-sheet .pd-scroll { overflow: visible; }
}

/* add-ons on an order line and in their dialog */
.t-line-addons { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.t-line-addons.pick { display: inline-flex; margin-top: 3px; padding: 2px 9px; border-radius: 99px; border: 1px dashed var(--line);
  background: none; color: var(--accent); font-weight: 600; cursor: pointer; text-align: start; }
.t-line-addons.pick:hover { border-color: var(--accent); }
.t-ainput { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 15px; background: var(--paper); color: var(--ink); }
.t-ainput:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.t-achoice { min-height: 64px; }

/* the receipt designer: settings beside the receipt itself */
.rd-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.rd-form { display: flex; flex-direction: column; gap: 16px; }
.rd-sec { display: flex; flex-direction: column; gap: 6px; }
.rd-sec > b { font-size: 13.5px; }
.rd-sec > span { color: var(--muted); font-size: 12.5px; }
.rd-sec textarea, .rd-sec select { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--paper); color: var(--ink); font: inherit; font-size: 14px; resize: vertical; }
.rd-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rd-logo { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rd-logo-img { display: inline-grid; place-items: center; width: 120px; height: 64px; border: 1px dashed var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.rd-logo-img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.rd-logo-img em { color: #8a8076; font-size: 12px; font-style: normal; }
.rd-checks { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; font-size: 13.5px; }
.rd-checks label { display: flex; align-items: center; gap: 8px; }
.rd-preview { position: sticky; top: 12px; }
.rd-paper { background: var(--line-2); border-radius: 16px; padding: 18px; display: flex; justify-content: center; }
.rd-paper .t-paper { box-shadow: 0 6px 24px rgba(0, 0, 0, .12); max-width: 320px; width: 100%; }
@media (max-width: 900px) { .rd-grid { grid-template-columns: 1fr; } .rd-preview { position: static; } .rd-checks, .rd-row { grid-template-columns: 1fr; } }
/* the receipt's logo, and a receipt printed in two languages */
.t-paper-logo { display: block; max-width: 70%; max-height: 90px; margin: 0 auto 8px; object-fit: contain; }
.t-paper.bi .t-paper-tot span:first-child, .t-paper.bi .t-paper-pay span:first-child { font-size: .95em; }

/* click and collect: the online orders waiting at the counter */
.t-collect { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; margin: 6px 0 4px; }
.t-collect-row { display: flex; align-items: center; gap: 12px; text-align: start; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--paper); cursor: pointer; }
.t-collect-row:hover { border-color: var(--accent); }
.t-collect-main { flex: 1; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.t-collect-main small { flex-basis: 100%; color: var(--muted); font-size: 12.5px; }
.t-collect-row em { font-style: normal; font-weight: 750; font-variant-numeric: tabular-nums; }
