/* PizzaDesk — basil, tomato, crust and flour */
:root {
  --basil: #17402F;
  --basil-2: #1F523C;
  --basil-3: #2E6B4B;
  --tomato: #D9432B;
  --tomato-d: #B4321D;
  --crust: #C9772E;
  --cheese: #F4C25B;
  --cheese-soft: #FFF3D2;
  --flour: #F2F4EF;
  --card: #FFFFFF;
  --ink: #1B2520;
  --ink-2: #3D4A43;
  --muted: #69766E;
  --line: #DCE2DA;
  --line-2: #EAEEE8;
  --ok: #2C8A57;
  --ok-soft: #E1F2E7;
  --warn: #B8741A;
  --warn-soft: #FCEFD8;
  --bad: #C0392B;
  --bad-soft: #FBE5E1;
  --info: #2F6F8F;
  --info-soft: #E2EFF5;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --text: "Instrument Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --r-panel: 16px;
  --r-ctl: 10px;
  --shadow: 0 1px 0 rgba(23, 64, 47, .06), 0 8px 24px -16px rgba(23, 64, 47, .35);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--text); color: var(--ink); background: var(--flour); }
a { color: var(--basil-3); }
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.num, td.r, th.r { font-variant-numeric: tabular-nums; text-align: right; }
.ico { flex: none; }
:focus-visible { outline: 3px solid var(--cheese); outline-offset: 2px; }

/* ---------- App shell ---------- */
.app { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--basil) 248px, var(--flour) 248px); }
.side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column;
  background: var(--basil); color: #DCE8DF;
  background-image: radial-gradient(circle at 20% 0%, rgba(244, 194, 91, .10), transparent 40%);
}
.brand { display: flex; align-items: center; gap: 10px; padding: 20px 20px 14px; color: #fff; text-decoration: none; font: 800 1.2rem/1 var(--display); }
.brand.big { color: var(--ink); padding: 0 0 18px; font-size: 1.5rem; }
.side nav { flex: 1; padding: 4px 12px 16px; }
.nav-group { margin-top: 14px; }
.nav-h { display: block; padding: 0 10px 6px; font-size: .78rem; color: #8FB09C; font-weight: 600; }
.side nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 9px; color: #DCE8DF; text-decoration: none; font-weight: 500; }
.side nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.side nav a.on { background: var(--cheese); color: var(--basil); font-weight: 700; }
.side nav a.on .ico { stroke-width: 2.2; }
.side-foot { display: flex; align-items: center; gap: 8px; padding: 14px; border-top: 1px solid rgba(255, 255, 255, .08); }
.who { display: flex; gap: 10px; align-items: center; flex: 1; color: #fff; text-decoration: none; min-width: 0; }
.who b { display: block; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { color: #8FB09C; font-size: .78rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--tomato); color: #fff; font: 700 .95rem var(--display); flex: none; }
.side .icon-btn { color: #DCE8DF; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px;
  padding: 12px 28px; background: rgba(242, 244, 239, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line);
}
.top h1 { font-size: 1.35rem; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.top-tools form { margin: 0; }
.branch-switch select { width: auto; min-width: 160px; padding: 7px 34px 7px 12px; font-weight: 600; }
.content { padding: 24px 28px 60px; max-width: 1480px; width: 100%; }
.only-m { display: none; }
.scrim { display: none; }

@media (max-width: 960px) {
  .app { grid-template-columns: 1fr; background: var(--flour); }
  .side { position: fixed; inset: 0 auto 0 0; width: 270px; z-index: 50; transform: translateX(-100%); transition: transform .2s ease; }
  .nav-open .side { transform: none; }
  .nav-open .scrim { display: block; position: fixed; inset: 0; background: rgba(10, 25, 18, .45); z-index: 40; }
  .only-m { display: inline-grid; }
  .top { padding: 10px 16px; flex-wrap: wrap; }
  .top h1 { font-size: 1.15rem; }
  .content { padding: 16px 16px 60px; }
  .branch-switch select { min-width: 0; max-width: 160px; }
}
@media (max-width: 560px) { .top-tools .chip { display: none; } .top-tools .btn.sm { padding: 6px 9px; } }

/* ---------- Controls ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: var(--r-ctl);
  border: 1px solid var(--line); background: var(--card); color: var(--ink); font: 600 .92rem var(--text);
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s, transform .05s;
}
.btn:hover { border-color: #B9C4BA; background: #FAFBF9; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--tomato); border-color: var(--tomato); color: #fff; }
.btn.primary:hover { background: var(--tomato-d); border-color: var(--tomato-d); }
.btn.basil { background: var(--basil); border-color: var(--basil); color: #fff; }
.btn.basil:hover { background: var(--basil-2); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.danger { color: var(--bad); border-color: #EBC3BC; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { background: transparent; }
.btn.sm { padding: 6px 11px; font-size: .84rem; border-radius: 8px; }
.btn.lg { padding: 13px 22px; font-size: 1.02rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.on-shift { border-color: var(--ok); color: var(--ok); background: var(--ok-soft); }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: rgba(0, 0, 0, .06); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

input, select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl);
  background: #fff; color: var(--ink); font: 15px var(--text);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--basil-3); box-shadow: 0 0 0 3px rgba(46, 107, 75, .15); }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2369766E' stroke-width='1.6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--tomato); }
label { display: block; font-weight: 600; font-size: .86rem; color: var(--ink-2); }
label > input, label > select, label > textarea { margin-top: 5px; font-weight: 400; }
label.check { display: flex; align-items: center; gap: 9px; font-weight: 500; font-size: .92rem; }
.stack > * + * { margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.span2 { grid-column: span 2; }
@media (max-width: 720px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }

.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 18px; }
.filters label { min-width: 140px; }
.filters input, .filters select { padding: 8px 11px; }

/* ---------- Surfaces ---------- */
.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); padding: 20px; box-shadow: var(--shadow); }
.panel + .panel, .panel + .cols, .cols + .panel, .kpis + .panel, .kpis + .cols, .tabs + .panel { margin-top: 18px; }
.panel-h { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }
.panel-h h2, .panel-h h3 { margin: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols > .panel, .cols > div > .panel:first-child { margin-top: 0; }
.cols > div > .panel + .panel { margin-top: 18px; }
@media (max-width: 1100px) { .cols, .cols.even { grid-template-columns: 1fr; } }

.flash { padding: 11px 14px; border-radius: 10px; margin-bottom: 14px; font-weight: 500; border: 1px solid transparent; }
.flash.ok { background: var(--ok-soft); color: #1D5E3B; border-color: #BFE0CB; }
.flash.error { background: var(--bad-soft); color: #8E2A1E; border-color: #F0C3BB; }
.flash.warn { background: var(--warn-soft); color: #7A4B0E; border-color: #F0D7A8; }

.empty { text-align: center; padding: 56px 20px; color: var(--muted); }
.empty h2 { color: var(--ink); }

/* KPI strip: a single bordered band with dividers rather than a row of floating cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); background: var(--card); border: 1px solid var(--line); border-radius: var(--r-panel); box-shadow: var(--shadow); overflow: hidden; }
.kpi { padding: 16px 20px; border-right: 1px solid var(--line-2); }
.kpi:last-child { border-right: 0; }
.kpi span { display: block; color: var(--muted); font-size: .85rem; font-weight: 500; }
.kpi b { display: block; font: 800 1.65rem/1.2 var(--display); margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.kpi small { color: var(--muted); }
.kpi.hot { background: var(--cheese-soft); }
.kpi.hot b { color: var(--tomato-d); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th { text-align: left; font-weight: 600; color: var(--muted); font-size: .82rem; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #FAFBF8; }
tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
td .btn-row { flex-wrap: nowrap; }
tr.low td { background: #FFF7F5; }
tr.low td:first-child { box-shadow: inset 3px 0 var(--tomato); }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 700; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.st-new { background: var(--info-soft); color: var(--info); }
.st-preparing { background: var(--warn-soft); color: var(--warn); }
.st-ready { background: var(--cheese-soft); color: #8A5B07; }
.st-out_for_delivery { background: #EDE7F8; color: #5B3F99; }
.st-delivered, .st-completed { background: var(--ok-soft); color: var(--ok); }
.st-cancelled { background: var(--bad-soft); color: var(--bad); }
.pay-paid { background: var(--ok-soft); color: var(--ok); }
.pay-due { background: var(--bad-soft); color: var(--bad); }
.badge.plain::before { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-weight: 600; font-size: .86rem; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a.on { color: var(--ink); border-color: var(--tomato); }

/* ---------- Bars (simple charts) ---------- */
.bars { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 20px; }
.bars .bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.bars .bar i { display: block; width: 100%; max-width: 46px; background: var(--basil-3); border-radius: 6px 6px 2px 2px; min-height: 2px; position: relative; }
.bars .bar.today i { background: var(--tomato); }
.bars .bar em { font-style: normal; font-size: .72rem; color: var(--muted); margin-top: 6px; white-space: nowrap; }
.bars .bar i b { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); font-size: .7rem; font-weight: 600; color: var(--ink-2); padding-bottom: 3px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hbars { display: grid; gap: 10px; }
.hbar { display: grid; grid-template-columns: minmax(90px, 1fr) 2fr auto; gap: 10px; align-items: center; font-size: .9rem; }
.hbar .track { height: 10px; background: var(--line-2); border-radius: 5px; overflow: hidden; }
.hbar .track i { display: block; height: 100%; background: var(--crust); border-radius: 5px; }
.hbar b { font-variant-numeric: tabular-nums; }

.alert-list { list-style: none; padding: 0; margin: 0; }
.alert-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.alert-list li:last-child { border-bottom: 0; }
.alert-list .ico { color: var(--tomato); margin-top: 2px; }

/* ---------- POS ---------- */
.page-pos .content { max-width: none; padding: 0; }
.pos { display: grid; grid-template-columns: minmax(0, 1fr) 400px; height: calc(100vh - 61px); }
.pos-menu { display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.pos-cats { display: flex; gap: 8px; padding: 16px 20px 12px; overflow-x: auto; flex: none; }
.pos-cats button { border: 1px solid var(--line); background: #fff; padding: 9px 16px; border-radius: 999px; font: 600 .92rem var(--text); cursor: pointer; white-space: nowrap; color: var(--ink-2); }
.pos-cats button.on { background: var(--basil); color: #fff; border-color: var(--basil); }
.pos-search { padding: 0 20px 12px; flex: none; }
.pos-grid { flex: 1; overflow-y: auto; padding: 0 20px 24px; display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; align-content: start; }
.tile {
  position: relative; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 14px 14px 12px 18px;
  cursor: pointer; font: inherit; color: inherit; min-height: 118px; display: flex; flex-direction: column; overflow: hidden;
  transition: border-color .12s, box-shadow .12s;
}
.tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--c, var(--tomato)); }
.tile:hover { border-color: #B9C4BA; box-shadow: var(--shadow); }
.tile:active { transform: scale(.985); }
.tile b { font: 700 1.02rem/1.25 var(--display); }
.tile small { color: var(--muted); font-size: .8rem; line-height: 1.35; margin-top: 4px; flex: 1; }
.tile .price { font: 800 1.05rem var(--display); color: var(--tomato-d); margin-top: 8px; font-variant-numeric: tabular-nums; }

.pos-cart { background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.cart-head { padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.seg { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--flour); border-radius: 11px; padding: 4px; gap: 4px; }
.seg button { border: 0; background: transparent; padding: 8px 4px; border-radius: 8px; font: 600 .9rem var(--text); color: var(--muted); cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.cart-fields { display: grid; gap: 8px; margin-top: 10px; }
.cart-fields input { padding: 8px 11px; font-size: .92rem; }
.cust-note { font-size: .82rem; color: var(--ok); font-weight: 600; min-height: 1em; }
.cart-lines { flex: 1; overflow-y: auto; padding: 6px 18px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; padding: 11px 0; border-bottom: 1px dashed var(--line); }
.cart-line .nm b { font-weight: 700; }
.cart-line .nm small { display: block; color: var(--muted); font-size: .8rem; }
.cart-line .qty { justify-self: start; }
.cart-line .amt { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { width: 30px; height: 28px; border: 0; background: var(--flour); font-size: 1.05rem; cursor: pointer; color: var(--ink); }
.qty span { min-width: 30px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }
.cart-empty { text-align: center; color: var(--muted); padding: 44px 10px; }
.cart-foot { border-top: 1px solid var(--line); padding: 12px 18px 16px; background: #FCFCFA; }
.sum-row { display: flex; justify-content: space-between; font-size: .9rem; padding: 2px 0; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.sum-row.total { font: 800 1.45rem var(--display); color: var(--ink); padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--line-2); }
.cart-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 10px 0; }
.cart-opts .inline { display: flex; gap: 6px; }
.cart-opts .inline select { width: 76px; flex: none; }
.cart-opts input, .cart-opts select { padding: 8px 10px; font-size: .9rem; }
.pay-methods { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.pay-methods button { flex: 1; min-width: 70px; border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 9px 6px; font: 600 .86rem var(--text); cursor: pointer; }
.pay-methods button.on { border-color: var(--basil); background: var(--basil); color: #fff; }
@media (max-width: 1000px) {
  .pos { grid-template-columns: 1fr; height: auto; }
  .pos-grid { overflow: visible; }
  .pos-cart { border-left: 0; border-top: 1px solid var(--line); }
  .cart-lines { max-height: 50vh; }
}

/* Modal */
.modal { position: fixed; inset: 0; z-index: 100; display: none; place-items: center; background: rgba(12, 28, 20, .5); padding: 16px; }
.modal.open { display: grid; }
.modal-card { background: #fff; border-radius: 18px; width: min(520px, 100%); max-height: 90vh; overflow-y: auto; padding: 22px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .4); animation: pop .16s ease-out; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
.modal-card h3 { font-size: 1.35rem; }
.modal-card h4 { margin: 16px 0 6px; font-size: .95rem; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 8px 0 16px; }
.opt { border: 1.5px solid var(--line); border-radius: 11px; padding: 10px 12px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; font-weight: 600; font-size: .92rem; background: #fff; text-align: left; font-family: inherit; }
.opt span { color: var(--muted); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.opt.on { border-color: var(--tomato); background: #FFF6F3; }
.opt.on span { color: var(--tomato-d); }
.allergen { display: inline-block; font-size: .78rem; background: var(--cheese-soft); color: #7A5206; border-radius: 6px; padding: 2px 8px; margin: 2px 4px 2px 0; font-weight: 600; }

/* ---------- Kitchen display ---------- */
body.kds { background: #0F2A1F; }
body.kds .top { background: rgba(15, 42, 31, .95); border-color: #24483A; }
body.kds .top h1 { color: #fff; }
body.kds .top .btn { background: transparent; color: #DCE8DF; border-color: #335C4B; }
body.kds .top .icon-btn { color: #DCE8DF; }
body.kds .chip, body.kds .branch-switch select { background-color: #1A3B2E; color: #fff; border-color: #335C4B; }
body.kds .content { max-width: none; }
body.kds.full .side { display: none; }
body.kds.full.app { grid-template-columns: 1fr; }
.kds-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; color: #A9C5B4; }
.kds-bar .count { font: 700 1rem var(--display); color: #fff; }
.kds-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
.kds-col h2 { color: #fff; font-size: 1.05rem; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.kds-col h2 i { font-style: normal; background: rgba(255, 255, 255, .12); border-radius: 999px; padding: 1px 10px; font-size: .85rem; }
.kds-list { display: grid; gap: 14px; }
@media (max-width: 1000px) { .kds-cols { grid-template-columns: 1fr; } }

/* Order ticket: a printed kitchen chit with a torn top edge */
.ticket {
  position: relative; background: #FFFDF6; color: var(--ink); border-radius: 0 0 6px 6px; padding: 18px 16px 14px;
  box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .6);
}
.ticket::before {
  content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px;
  background: radial-gradient(circle at 6px 0, transparent 5px, #FFFDF6 5.5px) 0 0 / 12px 8px repeat-x;
}
.ticket-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; border-bottom: 2px dashed #E3DCCB; padding-bottom: 8px; margin-bottom: 8px; }
.ticket-h .no { font: 800 1.6rem/1 var(--display); letter-spacing: -.02em; }
.ticket-h .tm { font: 700 1rem var(--display); font-variant-numeric: tabular-nums; padding: 3px 9px; border-radius: 7px; background: var(--ok-soft); color: var(--ok); }
.ticket.warn .ticket-h .tm { background: var(--warn-soft); color: var(--warn); }
.ticket.late .ticket-h .tm { background: var(--tomato); color: #fff; }
.ticket.late { box-shadow: 0 0 0 3px var(--tomato), 0 10px 24px -14px rgba(0, 0, 0, .6); }
.ticket-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; font-size: .82rem; }
.ticket-meta span { background: #F1EBDD; padding: 2px 8px; border-radius: 6px; font-weight: 600; }
.ticket-meta .online { background: var(--tomato); color: #fff; }
.ticket ul { list-style: none; padding: 0; margin: 0 0 12px; }
.ticket li { padding: 6px 0; border-bottom: 1px dotted #E3DCCB; font-size: 1rem; }
.ticket li b { font: 800 1.05rem var(--display); margin-right: 6px; }
.ticket li small { display: block; color: #7A6A4A; font-size: .84rem; margin-left: 26px; }
.ticket li .nt { color: var(--tomato-d); font-weight: 700; }
.ticket .note { background: var(--cheese-soft); padding: 7px 10px; border-radius: 8px; font-weight: 600; font-size: .9rem; margin-bottom: 10px; }
.ticket .btn { width: 100%; }

/* ---------- Order view / tracking ---------- */
.pizza-ring { display: block; filter: drop-shadow(0 12px 18px rgba(120, 60, 10, .25)); }
.journey { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; }
.steps-v { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.steps-v li { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--muted); font-weight: 500; }
.steps-v li::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); flex: none; }
.steps-v li.done { color: var(--ink); }
.steps-v li.done::before { background: var(--ok); border-color: var(--ok); }
.steps-v li.now { color: var(--ink); font-weight: 700; }
.steps-v li.now::before { background: var(--cheese); border-color: var(--crust); box-shadow: 0 0 0 4px rgba(244, 194, 91, .35); }
.steps-v li time { margin-left: auto; font-size: .82rem; color: var(--muted); font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .journey { grid-template-columns: 1fr; justify-items: center; } .journey ul { width: 100%; } }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
.map { width: 100%; height: 260px; border: 0; border-radius: 12px; background: var(--line-2); }

/* Receipt */
.receipt-page { background: #fff; }
.receipt { width: 300px; margin: 0 auto; padding: 14px 6px; font: 13px/1.4 ui-monospace, Menlo, Consolas, monospace; color: #000; }
.receipt h1 { font: 800 18px var(--display); text-align: center; margin: 0; }
.receipt .c { text-align: center; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 8px 0; }
.receipt table { font-size: 12.5px; }
.receipt td { padding: 2px 0; border: 0; }
.receipt .tot td { font-weight: 800; font-size: 15px; }
.no-print { text-align: center; margin: 14px; }
@media print { .no-print { display: none; } @page { margin: 4mm; } }

/* ---------- Login & install ---------- */
.login-page, .install-page { background: var(--flour); }
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--basil); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 40px; position: relative; overflow: hidden; }
.login-art::after { content: ""; position: absolute; inset: auto -20% -40% -20%; height: 60%; background: radial-gradient(ellipse at center, rgba(244, 194, 91, .22), transparent 65%); }
.peel { animation: spin 60s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .peel { animation: none; } * { transition: none !important; animation: none !important; } }
.login-quote { color: #fff; font: 700 clamp(1.6rem, 3vw, 2.4rem)/1.15 var(--display); text-align: center; max-width: 13ch; margin: 0; position: relative; z-index: 1; }
.login-card { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(24px, 6vw, 88px); max-width: 560px; }
.login-card h2 { font-size: 1.9rem; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-art { padding: 28px; } .login-art .pizza-ring { width: 150px; height: 150px; } .login-quote { font-size: 1.4rem; } }
.install { max-width: 760px; margin: 0 auto; padding: 40px 16px 80px; }
.install-head { display: flex; gap: 14px; align-items: center; margin-bottom: 22px; }
.install-head h1 { font-size: 2rem; margin: 0; }
.install h2 { margin-top: 10px; }
.steps { padding-left: 20px; }
.steps li { margin-bottom: 8px; }

/* ---------- Customer ordering pages ---------- */
.shop { background: var(--flour); }
.shop-hero { background: var(--basil); color: #fff; padding: 28px 20px 70px; position: relative; overflow: hidden; }
.shop-hero .in { max-width: 1100px; margin: 0 auto; display: flex; align-items: center; gap: 24px; justify-content: space-between; flex-wrap: wrap; }
.shop-hero h1 { font-size: clamp(2rem, 5vw, 3.4rem); margin: 0 0 6px; letter-spacing: -.03em; }
.shop-hero p { color: #C9DDD0; margin: 0; }
.shop-hero .pizza-ring { position: absolute; right: -60px; top: -40px; opacity: .9; }
.shop-hero .in { position: relative; z-index: 1; }
@media (max-width: 700px) { .shop-hero .pizza-ring { width: 170px; height: 170px; right: -70px; top: -60px; opacity: .35; } }
.shop-body { max-width: 1100px; margin: -44px auto 0; padding: 0 16px 120px; position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.shop-body > main { min-width: 0; }
.shop-body .pos-cats { padding: 0 0 12px; }
.shop-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.shop-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.shop-card h3 { margin: 0; font-size: 1.12rem; }
.shop-card p { color: var(--muted); font-size: .88rem; margin: 0; flex: 1; }
.shop-card .row { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.shop-card .price { font: 800 1.15rem var(--display); color: var(--tomato-d); }
.shop-cart { position: sticky; top: 16px; }
@media (max-width: 900px) { .shop-body { grid-template-columns: 1fr; } .shop-cart { position: static; } }
.trackpage { max-width: 640px; margin: 0 auto; padding: 28px 16px 60px; }
.trackpage-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.trackpage-head h1 { font-size: 1.6rem; margin: 0; }
.trackpage .status-line { font: 800 clamp(1.6rem, 5vw, 2.2rem)/1.1 var(--display); letter-spacing: -.02em; margin-bottom: 4px; }

/* Rider */
.rider-card { border-left: 6px solid var(--tomato); }
.rider-card.on-way { border-left-color: #5B3F99; }
.rider-card .amount { font: 800 1.5rem var(--display); }
.big-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.big-actions .btn { padding: 14px; font-size: 1rem; }

/* Checklist */
.checklist label.check { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.checklist label.check:has(input:checked) { border-color: var(--ok); background: var(--ok-soft); }

/* Line-item editor rows */
.line-rows .line-row { display: grid; grid-template-columns: 2fr 1fr 1fr auto; gap: 8px; margin-bottom: 8px; align-items: center; }
.line-rows.recipe .line-row { grid-template-columns: 3fr 1fr auto; }
.line-rows.variants .line-row { grid-template-columns: 2fr 1fr auto; }
@media (max-width: 600px) { .line-rows .line-row { grid-template-columns: 1fr 1fr; } }

details.fold { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: #fff; margin-bottom: 10px; }
details.fold summary { padding: 12px 0; cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
details.fold summary::-webkit-details-marker { display: none; }
details.fold[open] summary { border-bottom: 1px solid var(--line-2); margin-bottom: 12px; }
details.fold > :last-child { padding-bottom: 14px; }
.swatch { display: inline-block; width: 12px; height: 12px; border-radius: 4px; vertical-align: -1px; margin-right: 6px; }

@media print {
  .side, .top, .filters, .btn, .no-print { display: none !important; }
  .app { display: block; }
  .panel { box-shadow: none; border: 0; }
}
.st-awaiting_payment { background: #F1ECE2; color: #7A6A4A; }

/* ---------- v1.1: offline bar, extras, tables, QR, gift cards ---------- */
.net-bar { padding: 10px 18px; background: var(--cheese-soft); border-bottom: 1px solid #F0D7A8; font-size: .86rem; line-height: 1.45; }
.net-bar.off { background: #FBE5E1; border-color: #F0C3BB; }
.net-bar .btn { margin: 2px 2px 0 0; }
details.more { border: 1px dashed var(--line); border-radius: 10px; padding: 0 10px; margin-bottom: 10px; }
details.more summary { cursor: pointer; padding: 8px 0; font-weight: 600; font-size: .86rem; color: var(--basil-3); }
details.more[open] { padding-bottom: 4px; }
details.more .cart-opts { margin-top: 0; }
.cart-opts .inline .btn { flex: none; }
.cart-opts .adv[hidden] { display: none; }

.floor { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.tbl { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: flex; flex-direction: column; gap: 8px; box-shadow: var(--shadow); border-top: 6px solid var(--line); }
.tbl header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tbl header b { font: 800 1.5rem/1 var(--display); }
.tbl header span { font-size: .8rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; background: var(--line-2); color: var(--ink-2); }
.tbl-free { border-top-color: var(--ok); }
.tbl-busy { border-top-color: var(--crust); }
.tbl-busy header span { background: var(--warn-soft); color: var(--warn); }
.tbl-bill { border-top-color: #5B3F99; }
.tbl-bill header span { background: #EDE7F8; color: #5B3F99; }
.tbl-booked { border-top-color: var(--info); }
.tbl-booked header span { background: var(--info-soft); color: var(--info); }
.tbl-call { border-top-color: var(--tomato); box-shadow: 0 0 0 3px rgba(217, 67, 43, .25), var(--shadow); }
.tbl-call header span { background: var(--tomato); color: #fff; }
.tbl-req { background: var(--bad-soft); color: #8E2A1E; border-radius: 9px; padding: 7px 9px; font-weight: 600; font-size: .86rem; display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.tbl-order { display: flex; justify-content: space-between; text-decoration: none; color: var(--ink); background: var(--flour); border-radius: 8px; padding: 6px 9px; font-size: .88rem; font-weight: 600; }
.tbl-order.due { background: #EDE7F8; }
.tbl-res { font-size: .84rem; color: var(--info); font-weight: 600; }
.tbl .btn.block { margin-top: auto; }

.qr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.qr-card { background: #fff; border: 2px dashed var(--line); border-radius: 16px; padding: 18px; text-align: center; break-inside: avoid; }
.qr-card .qr { display: grid; place-items: center; margin: 10px auto; min-height: 180px; }
.qr-card .qr img, .qr-card .qr canvas { margin: 0 auto; }
.qr-t { display: block; font: 800 1.6rem var(--display); margin: 6px 0 4px; }
.qr-card p { font-size: .9rem; margin: 0 0 6px; }
.qr-card small { word-break: break-all; font-size: .68rem; }
@media print { .qr-grid { grid-template-columns: repeat(3, 1fr); } .qr-card { border-color: #999; } .tabs { display: none; } }

.giftcard { position: relative; overflow: hidden; border-radius: 20px; padding: 24px; color: #fff; min-height: 210px; display: flex; flex-direction: column; justify-content: space-between; margin-bottom: 18px;
  background: radial-gradient(circle at 90% 10%, rgba(244, 194, 91, .45), transparent 40%), linear-gradient(135deg, var(--basil) 0%, #0F2A1F 100%); box-shadow: 0 20px 40px -24px rgba(23, 64, 47, .9); max-width: 420px; }
.giftcard::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 160px; height: 160px; border-radius: 50%; border: 18px solid rgba(201, 119, 46, .5); }
.gc-amt { font: 800 2.4rem var(--display); letter-spacing: -.02em; }
.gc-code { font: 600 1.15rem ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; }
.giftcard small { color: #C9DDD0; position: relative; z-index: 1; }
fieldset.pay-choice { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin: 0; }
fieldset.pay-choice legend { font-weight: 600; font-size: .86rem; color: var(--ink-2); padding: 0 4px; }
fieldset.pay-choice label.check { margin: 6px 0; }
.ticket .due { background: #EDE7F8; color: #5B3F99; }
details.more[open] > .cart-opts { max-height: 40vh; overflow-y: auto; padding-right: 2px; }

/* ---------- v1.2: forecast, kiosk, language ---------- */
.fc-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.fc-day { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: #fff; justify-content: flex-end; min-height: 190px; }
.fc-day span { font-weight: 700; text-align: center; line-height: 1.2; }
.fc-day span small { display: block; font-weight: 500; color: var(--muted); }
.fc-day i { display: block; width: 60%; background: var(--basil-3); border-radius: 6px 6px 2px 2px; margin-top: auto; }
.fc-day b { font: 800 .95rem var(--display); font-variant-numeric: tabular-nums; }
.fc-day small { color: var(--muted); font-size: .76rem; }
.fc-day.on { border-color: var(--tomato); box-shadow: 0 0 0 2px var(--tomato) inset; }
.fc-day.on i { background: var(--tomato); }
@media (max-width: 760px) { .fc-days { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.lang-switch { display: inline-block; margin-left: 12px; padding: 4px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .4); color: inherit; font: 600 .85rem var(--text); text-decoration: none; }
.trackpage-head .lang-switch { margin-left: auto; border-color: var(--line); color: var(--ink-2); background: #fff; }
.lang-bn { --text: "Hind Siliguri", "Noto Sans Bengali", "Instrument Sans", system-ui, sans-serif; }
.lang-bn h1, .lang-bn h2, .lang-bn h3, .lang-bn .status-line { font-family: "Hind Siliguri", "Noto Sans Bengali", var(--display); }

body.kiosk { margin: 0; background: var(--flour); overflow: hidden; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
.k-screen { height: 100vh; }
.k-screen[hidden] { display: none; }
.k-welcome { background: var(--basil); color: #fff; display: grid; place-items: center; position: relative; overflow: hidden; }
.k-welcome .pizza-ring { position: absolute; right: -90px; bottom: -90px; opacity: .9; animation: spin 80s linear infinite; }
.k-welcome-in { position: relative; z-index: 1; text-align: center; display: grid; gap: 28px; justify-items: center; padding: 24px; }
.k-welcome h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); max-width: 12ch; margin: 0; letter-spacing: -.03em; }
.k-start { display: flex; gap: 18px; flex-wrap: wrap; justify-content: center; }
.k-big { border: 0; border-radius: 18px; background: var(--tomato); color: #fff; font: 800 1.4rem var(--display); padding: 22px 34px; cursor: pointer; min-width: 220px; box-shadow: 0 10px 24px -12px rgba(0, 0, 0, .5); }
.k-big.alt { background: var(--cheese); color: var(--basil); }
.k-big[disabled] { opacity: .45; }
.k-welcome .lang-switch { font-size: 1.1rem; padding: 10px 22px; }
.k-menu { display: grid; grid-template-columns: 220px minmax(0, 1fr) 380px; }
.k-cats { background: var(--basil); padding: 18px 12px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.k-cats button { text-align: left; border: 0; border-radius: 14px; padding: 18px 16px; font: 700 1.1rem var(--display); background: rgba(255, 255, 255, .08); color: #DCE8DF; cursor: pointer; border-left: 6px solid var(--c); }
.k-cats button.on { background: var(--cheese); color: var(--basil); }
.k-grid { overflow-y: auto; padding: 20px; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; align-content: start; }
.k-tile { position: relative; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 20px; padding: 20px; min-height: 190px; display: flex; flex-direction: column; gap: 6px; cursor: pointer; font: inherit; box-shadow: var(--shadow); }
.k-tile .k-dot { width: 46px; height: 46px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #F6D27A 0 45%, var(--c) 46% 55%, #E7B25A 56%); margin-bottom: 4px; }
.k-tile b { font: 800 1.3rem/1.2 var(--display); }
.k-tile small { color: var(--muted); flex: 1; }
.k-tile .price { font: 800 1.25rem var(--display); color: var(--tomato-d); }
.k-tile:active { transform: scale(.98); }
.k-cart { background: #fff; border-left: 1px solid var(--line); padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.k-cart h2 small { font: 600 .9rem var(--text); color: var(--muted); }
.k-lines { flex: 1; overflow-y: auto; }
.k-cart .k-big { width: 100%; }
.k-qty button { width: 44px; height: 40px; font-size: 1.3rem; }
.k-modal { width: min(680px, 100%); }
.k-modal .opt { padding: 16px; font-size: 1.05rem; }
.k-done { display: grid; place-items: center; background: var(--cheese-soft); text-align: center; }
.k-done-in { display: grid; gap: 14px; justify-items: center; padding: 24px; max-width: 640px; }
.k-done p { font-size: 1.3rem; margin: 0; }
.k-number { font: 800 clamp(5rem, 18vw, 10rem)/1 var(--display); color: var(--tomato-d); letter-spacing: -.04em; }
@media (max-width: 1100px) { .k-menu { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; } .k-cats { flex-direction: row; overflow-x: auto; } .k-cart { max-height: 42vh; border-left: 0; border-top: 1px solid var(--line); } }
td.r, th.r { white-space: nowrap; }

/* ---------- v1.3: roles, features, dashboard ---------- */
.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.dash-cell.wide, .dash > .wide { grid-column: 1 / -1; }
.dash-cell > .panel + .panel { margin-top: 18px; }
@media (max-width: 1000px) { .dash { grid-template-columns: 1fr; } }
.customize { margin-bottom: 18px; border-color: var(--cheese); }
.pipeline { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pipe { display: flex; flex-direction: column; align-items: center; padding: 14px 6px; border-radius: 12px; text-decoration: none; }
.pipe b { font: 800 1.8rem/1 var(--display); }
.pipe span { font-size: .8rem; font-weight: 600; margin-top: 4px; }
.shortcut-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.shortcut-grid .btn { justify-content: flex-start; }

.matrix-panel { padding-bottom: 0; }
table.matrix th.c, table.matrix td.c { text-align: center; }
table.matrix th.c a { color: var(--ink); text-decoration: none; font-weight: 700; display: block; }
table.matrix th.c small { display: block; font-weight: 500; color: var(--muted); }
table.matrix td:first-child { white-space: nowrap; }
table.matrix input[type=checkbox] { width: 18px; height: 18px; }
tr.mgroup td { background: var(--flour); font-weight: 700; font-size: .8rem; color: var(--muted); padding: 6px 10px; }
tr.off td { opacity: .55; }
.tick.on { color: var(--ok); font-weight: 800; }
.matrix-save { position: sticky; bottom: 0; background: #fff; padding: 14px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.perm-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 16px; margin-top: 6px; }
.perm-groups > div { display: grid; gap: 2px; align-content: start; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.plain > * + * { margin-top: 14px; }
fieldset.plain[disabled] { opacity: .6; }

.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: none; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.switch span { position: absolute; inset: 0; background: #C9D1C8; border-radius: 999px; transition: background .15s; }
.switch span::after { content: ""; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(18px); }
.switch input:focus-visible + span { outline: 3px solid var(--cheese); outline-offset: 2px; }
.switch input:disabled + span { opacity: .6; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line); font-weight: 500; }
.toggle-row small { display: block; font-weight: 400; }
.line-rows.links .line-row { grid-template-columns: 1.2fr 2fr 1fr 1.4fr auto; }
.prose { max-width: 820px; }
.prose ul { padding-left: 20px; }
.prose li { margin: 4px 0; }
.prose h2 { margin-top: 18px; }
.prose h2:first-child { margin-top: 0; }

/* ---------- v1.3.1: till layout ---------- */
.pos { height: calc(100dvh - 61px); }
.pos-cart { min-height: 0; overflow: hidden; }
.cart-head { padding: 12px 16px; }
.cart-fields { gap: 6px; margin-top: 8px; }
.cart-fields .two { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.cust-note:empty { display: none; }
.cart-title { display: flex; align-items: center; gap: 8px; padding: 8px 16px 4px; }
.cart-title b { font: 700 .95rem var(--display); }
.cart-title .count { background: var(--flour); border-radius: 999px; padding: 1px 9px; font-size: .78rem; font-weight: 700; color: var(--ink-2); }
.cart-title .btn { margin-left: auto; padding: 3px 9px; }
.cart-lines { flex: 1 1 auto; min-height: 140px; padding: 0 16px; }
.cart-line { grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 0; }
.cart-line .nm { min-width: 0; line-height: 1.25; }
.cart-line .nm b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: .93rem; }
.cart-line .nm small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-line .qty button { width: 28px; height: 28px; }
.cart-line .qty span { min-width: 24px; }
.cart-line .rm { border: 0; background: none; width: 28px; height: 28px; border-radius: 8px; font-size: 1.3rem; line-height: 1; color: var(--muted); cursor: pointer; }
.cart-line .rm:hover { background: var(--bad-soft); color: var(--bad); }
.cart-foot { flex: 0 1 auto; overflow-y: auto; padding: 10px 16px 14px; }
.cart-foot details.more { margin-bottom: 8px; }
.sum-row { padding: 1px 0; }
.sum-row.total { font-size: 1.3rem; padding-top: 6px; margin-top: 4px; }
.pay-methods { flex-wrap: nowrap; gap: 5px; margin: 8px 0; }
.pay-methods button { min-width: 0; padding: 9px 4px; font-size: .82rem; }
.m-cartbar { display: none; }
@media (max-height: 760px) and (min-width: 1001px) { .cart-head .seg button { padding: 6px 4px; } .cart-fields input { padding: 6px 10px; } .btn.lg#place { padding: 11px 18px; } }
@media (max-width: 1000px) {
  .pos { height: auto; }
  .pos-cart { overflow: visible; scroll-margin-top: 70px; }
  .cart-lines { max-height: none; min-height: 0; }
  .pos-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); padding-bottom: 90px; }
  .tile { min-height: 100px; }
  .m-cartbar { display: flex; position: fixed; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); z-index: 30; justify-content: space-between; align-items: center; gap: 10px;
    border: 0; border-radius: 14px; padding: 14px 18px; background: var(--basil); color: #fff; font: 700 1rem var(--text); box-shadow: 0 14px 30px -12px rgba(0, 0, 0, .55); cursor: pointer; transition: transform .2s, opacity .2s; }
  .m-cartbar[hidden], .m-cartbar.away { transform: translateY(140%); opacity: 0; pointer-events: none; display: flex; }
  .m-cartbar b { font: 800 1.05rem var(--display); }
  .pay-methods { flex-wrap: wrap; }
  .pay-methods button { flex: 1 1 28%; }
}

/* ---------- v1.3.1: notifications and account menu ---------- */
.side { height: 100vh; height: 100dvh; }
.side nav a { position: relative; }
.nav-badge { margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgba(255, 255, 255, .16); color: #fff; font: 700 .74rem/20px var(--text); font-style: normal; text-align: center; }
.nav-badge.urgent { background: var(--tomato); }
.side nav a.on .nav-badge { background: var(--basil); color: #fff; }
.side nav a.on .nav-badge.urgent { background: var(--tomato); }
.side-foot { flex-wrap: wrap; padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
.side-out { color: #DCE8DF; border-color: rgba(255, 255, 255, .2); }
.side-out:hover { background: rgba(255, 255, 255, .08); color: #fff; }

details.pop { position: relative; }
details.pop > summary { list-style: none; cursor: pointer; }
details.pop > summary::-webkit-details-marker { display: none; }
.bell { position: relative; }
.bell.has { color: var(--tomato-d); }
.bell-n { position: absolute; top: 1px; right: 0; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 999px; background: var(--tomato); color: #fff; font: 700 .68rem/18px var(--text); font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--flour); }
.acct { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; }
.avatar.sm { width: 32px; height: 32px; font-size: .85rem; }
.pop-card { position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: min(340px, calc(100vw - 24px)); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 20px 40px -18px rgba(12, 28, 20, .45); padding: 8px; }
.pop-h { display: flex; justify-content: space-between; align-items: center; padding: 6px 8px 8px; border-bottom: 1px solid var(--line-2); }
.pop-list { list-style: none; margin: 4px 0 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.pop-list a { display: flex; gap: 10px; align-items: center; padding: 9px 8px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: .9rem; }
.pop-list a:hover, .pop-item:hover { background: var(--flour); }
.pop-list a.urgent { font-weight: 700; }
.pop-list a.urgent::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tomato); flex: none; }
.pop-list a .ico { display: none; }
.pop-empty { padding: 10px 8px; margin: 0; }
.acct-who { padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.acct-who b, .acct-who small { display: block; }
.pop-card form { margin: 0; }
.pop-item { display: flex; width: 100%; gap: 10px; align-items: center; padding: 10px; border: 0; background: none; border-radius: 9px; color: var(--ink); text-decoration: none; font: 500 .92rem var(--text); text-align: left; cursor: pointer; }
.pop-item.out { color: var(--bad); font-weight: 600; }
body.kds .bell, body.kds .acct { color: #DCE8DF; }
@media (max-width: 560px) {
  .hide-s { display: none; }
  .top { gap: 8px; }
  .top-tools { flex-wrap: nowrap; gap: 4px; }
}
@media (max-width: 1000px) { .page-pos #pd-toast { bottom: calc(86px + env(safe-area-inset-bottom)) !important; } }
.page-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.bell.quiet::after { content: ""; position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--crust); }
.side-foot { flex-direction: column; align-items: stretch; gap: 10px; }
.side-out { justify-content: center; }
@media (max-width: 560px) {
  .top { flex-wrap: wrap; row-gap: 8px; }
  .top h1 { flex: 1 1 0; }
  .page-tools { order: 5; flex-basis: 100%; }
  .page-tools .btn { flex: 1 1 auto; }
}

/* ---------- 1.4: add-on groups ---------- */
.mod-group h4 { display: flex; align-items: baseline; gap: 8px; margin: 14px 0 0; }
.mod-group h4 small { font: 600 .74rem var(--text); color: var(--muted); background: var(--flour); padding: 2px 8px; border-radius: 999px; }
.mod-group h4 small.req { background: var(--bad-soft); color: var(--tomato-d); }
.opt.rm.on { border-color: var(--ink-2); background: #F1F2EF; text-decoration: line-through; text-decoration-color: var(--tomato); }
.modal-card { max-height: calc(100dvh - 32px); overflow-y: auto; }
.chip-list { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.chip-list span { font-size: .72rem; font-weight: 600; background: var(--flour); color: var(--ink-2); padding: 2px 7px; border-radius: 999px; }
.group-pick { border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 10px 14px; display: grid; gap: 6px; }
.group-pick legend { font-weight: 700; padding: 0 6px; }
.intro-panel .kind-list { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.intro-panel .kind-list li { background: var(--flour); border-radius: 10px; padding: 10px 12px; font-size: .88rem; }
.intro-panel .kind-list b { display: block; }
.mod-admin { border-left: 5px solid var(--cheese); }
.grid-mod { display: grid; grid-template-columns: 2fr 1.4fr 1.6fr 1fr 1fr .7fr; gap: 10px; }
@media (max-width: 900px) { .grid-mod { grid-template-columns: 1fr 1fr; } }
.mod-head .btn-row { margin-top: 10px; align-items: center; }
.opt-table input:not([type=checkbox]) { min-width: 90px; }
.nowrap { white-space: nowrap; }

/* ---------- 1.4: changing orders ---------- */
.edit-bar { padding: 10px 18px; background: var(--info-soft); border-bottom: 1px solid #BFDCEA; font-size: .88rem; }
.edit-bar a { font-weight: 700; margin-left: 6px; }
.pos-edit #more, .pos-edit #pays { display: none; }
.pos-edit #types.locked { opacity: .55; pointer-events: none; }
.cart-line em.chg, .chg-tag { font-style: normal; font: 700 .68rem var(--text); letter-spacing: .04em; background: var(--cheese); color: var(--ink); padding: 2px 6px; border-radius: 6px; vertical-align: 2px; }
.chg-tag.rm { background: var(--tomato); color: #fff; }
.ticket.changed { box-shadow: 0 0 0 3px var(--cheese), 0 10px 30px -12px rgba(0, 0, 0, .5); }
.ticket .changed-bar { display: flex; align-items: center; gap: 6px; margin: -18px -16px 10px; padding: 7px 12px; background: var(--cheese); color: var(--ink); font-weight: 800; font-size: .86rem; letter-spacing: .01em; }
.ticket li.chg { background: #FFF3D2; border-radius: 6px; margin-left: -6px; padding-left: 6px; }
.ticket li.removed { color: #B9A99A; }
.ticket li.removed s { text-decoration-thickness: 2px; text-decoration-color: var(--tomato); }
.change-log { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; }
.change-log h4 { margin: 0 0 6px; }
.change-log ul { margin: 4px 0 10px; padding-left: 18px; }
.change-log li.add { color: var(--ok); }
.change-log li.rm { color: var(--bad); }

/* ---------- 1.4: loyalty ---------- */
.tier-badge { display: inline-flex; align-items: center; gap: 6px; font: 800 .82rem var(--display); letter-spacing: .06em; text-transform: uppercase; padding: 5px 12px; border-radius: 999px; background: #E9E3D6; color: #6E5A3A; }
.tier-badge.sm { font-size: .68rem; padding: 2px 8px; }
.tier-badge.tier-bronze { background: linear-gradient(135deg, #E8C6A0, #C98E5A); color: #4A2B10; }
.tier-badge.tier-silver { background: linear-gradient(135deg, #EEF1F3, #B9C3CB); color: #34404A; }
.tier-badge.tier-gold { background: linear-gradient(135deg, #FBE29A, #E0A92E); color: #4F3600; }
.tier-badge.tier-platinum { background: linear-gradient(135deg, #E4E9F7, #9DA9C9); color: #26304F; }
.tier-pill { font: 800 .66rem var(--text); text-transform: uppercase; letter-spacing: .05em; background: var(--cheese); color: var(--ink); padding: 1px 6px; border-radius: 5px; }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; max-width: 360px; margin: 10px 0; }
.stamp { aspect-ratio: 1; border-radius: 50%; border: 2px dashed #D9CBB0; display: grid; place-items: center; background: #FFFCF4; font-size: 1.1rem; }
.stamp.on { border: 2px solid var(--crust); background: #FFF0CC; }
.reward-ticket { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin: 8px 0; border-radius: 12px; background: var(--cheese-soft); border: 1.5px dashed #E4B95A; position: relative; }
.reward-ticket b { display: block; }
.reward-ticket small { color: var(--muted); }
.reward-ticket code { font: 800 1.05rem var(--display); letter-spacing: .08em; background: #fff; padding: 6px 10px; border-radius: 8px; }
.rw-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.rw-chips:empty { display: none; }
.rw-chip { border: 1.5px dashed #E4B95A; background: var(--cheese-soft); border-radius: 10px; padding: 6px 10px; font: 600 .82rem var(--text); cursor: pointer; text-align: left; }
.rw-chip b { margin-left: 4px; }
.rw-chip small { display: block; color: var(--muted); font-weight: 500; }
.rw-chip.on { border-style: solid; border-color: var(--tomato); background: #FFF0EC; }
.loyalty-hero { background: linear-gradient(135deg, var(--basil), var(--basil-3)); color: #fff; display: grid; gap: 14px; }
.loyalty-hero .muted { color: #CFE0D6; }
.loyalty-hero .pts { font: 800 1.1rem var(--display); margin: 10px 0 2px; }
.loyalty-hero .pts b { font-size: 3rem; letter-spacing: -.03em; }
.tier-next .bar { height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.tier-next .bar i { display: block; height: 100%; background: var(--cheese); border-radius: 999px; }
.tier-next small { display: block; margin-top: 6px; color: #CFE0D6; }
.rewards-page .how ul { padding-left: 18px; line-height: 1.6; }
.loyalty-strip { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ---------- 1.4: attendance ---------- */
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.fs { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; margin: 0; min-width: 0; }
.fs legend { font-weight: 700; padding: 0 6px; color: var(--ink-2); }
.fs > * + * { margin-top: 10px; }
.warn-t { color: var(--warn); font-weight: 600; }
.nowrap { white-space: nowrap; }

.clock-card { position: relative; overflow: hidden; }
.clock-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px; background: var(--line); }
.clock-card.state-on::before { background: var(--ok); }
.clock-card.state-break::before { background: var(--cheese); }
.clock-now { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.clock-now span { font: 800 3rem/1 var(--display); letter-spacing: -.03em; color: var(--basil); font-variant-numeric: tabular-nums; }
.clock-now small { color: var(--muted); font-weight: 600; }
.clock-state { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0 6px; font-size: 1.02rem; }
.clock-state .dot { width: 14px; height: 14px; border-radius: 50%; background: var(--line); margin-top: 5px; flex: none; }
.clock-state .dot.on { background: var(--ok); box-shadow: 0 0 0 6px var(--ok-soft); }
.clock-state .dot.brk { background: var(--cheese); box-shadow: 0 0 0 6px var(--cheese-soft); }
.clock-state small { color: var(--muted); }
.clock-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.clock-actions .btn { justify-content: center; min-height: 58px; font-size: 1.05rem; }
.clock-msg { min-height: 1.4em; margin-top: 10px; font-weight: 600; }
.clock-msg.ok { color: var(--ok); }
.clock-msg.bad { color: var(--bad); }
.clock-hint { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: var(--info-soft); color: var(--info); }
.clock-hint b { color: var(--ink); }
.selfie { margin-top: 12px; display: flex; gap: 12px; align-items: center; }
.selfie video { width: 96px; height: 96px; object-fit: cover; border-radius: 50%; background: #111; transform: scaleX(-1); border: 3px solid var(--cheese); }
.mini-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mini-kpis div { background: var(--flour); border-radius: 12px; padding: 10px 12px; }
.mini-kpis b { display: block; font: 800 1.5rem var(--display); color: var(--basil); }
.mini-kpis span { font-size: .8rem; color: var(--muted); font-weight: 600; }
.shift-list { list-style: none; margin: 0; padding: 0; }
.shift-list li { display: flex; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.shift-list li:first-child { border-top: 0; }
.shift-list .day { width: 56px; text-align: center; background: var(--flour); border-radius: 10px; padding: 6px 4px; flex: none; }
.shift-list .day b { display: block; font: 800 1rem var(--display); color: var(--basil); }
.shift-list .day span { font-size: .75rem; color: var(--muted); }
.swap-pop { position: relative; }
.swap-pop > summary { list-style: none; cursor: pointer; }
.swap-pop > summary::-webkit-details-marker { display: none; }
.swap-pop[open] > form { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 260px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; box-shadow: 0 18px 40px -18px rgba(0,0,0,.4); }
.swap-ask, .req-card { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.swap-ask:first-of-type, .req-card:first-of-type { border-top: 0; }
.req-main { flex: 1; min-width: 220px; display: grid; gap: 3px; }
.people { list-style: none; padding: 0; margin: 0; }
.people li { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line-2); }
.people li:first-child { border-top: 0; }
.ph { display: inline-block; width: 38px; height: 38px; border-radius: 10px; overflow: hidden; vertical-align: middle; border: 2px solid var(--line); flex: none; background: var(--flour); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.people .ph { width: 44px; height: 44px; border-radius: 50%; }
.sheet table input[type=datetime-local] { width: 196px; min-width: 0; font-size: .86rem; padding: 7px 8px; }
.sheet table input[type=number] { padding: 7px 8px; }
.sheet th, .sheet td { padding-left: 7px; padding-right: 7px; }
.sheet td { vertical-align: middle; }
.warn-row td { background: #FFF9EE; }
.fix-form { display: flex; gap: 6px; align-items: center; }
.fix-form input { width: 112px; padding: 7px 8px; }
.sticky-bar { position: sticky; bottom: 12px; z-index: 30; margin-top: 18px; display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 16px; border-radius: 14px; background: var(--basil); color: #fff; box-shadow: 0 18px 40px -18px rgba(0,0,0,.6); }
.shift-strip { display: flex; gap: 12px; align-items: center; padding: 12px 16px; border-radius: 14px; margin-bottom: 16px; background: var(--warn-soft); color: var(--ink); flex-wrap: wrap; }
.shift-strip span { flex: 1; min-width: 180px; }
.shift-strip.on { background: var(--ok-soft); }
.tc-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: var(--flour); color: var(--basil); flex: none; }
.inline-edit { display: grid; gap: 2px; }
.inline-edit input { border: 1px solid transparent; background: transparent; font-weight: 700; padding: 4px 6px; margin-left: -6px; }
.inline-edit input:hover, .inline-edit input:focus { border-color: var(--line); background: #fff; }
.ticks { list-style: none; padding: 0; margin: 0 0 12px; display: grid; gap: 6px; }
.ticks li { padding-left: 24px; position: relative; }
.ticks li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 800; }

/* rota */
.rota-nav { align-items: center; gap: 10px; }
.rota-nav b { font-family: var(--display); font-size: 1.1rem; }
.rota-t th { text-align: left; white-space: nowrap; }
.rota-t th small { display: block; font-weight: 500; color: var(--muted); }
.rota-t td, .rota-t th { border-left: 1px solid var(--line-2); }
.rota-t td:first-child, .rota-t th:first-child { border-left: 0; min-width: 150px; }
.rota-t td { vertical-align: top; min-width: 104px; padding: 8px 6px; }
.rota-t .today { background: #FFFBEF; }
.sh { position: relative; display: block; white-space: nowrap; font-size: .8rem; font-weight: 700; padding: 5px 20px 5px 8px; border-radius: 8px; background: var(--info-soft); color: var(--info); margin: 2px 0; font-variant-numeric: tabular-nums; }
.sh em { display: block; font-style: normal; font-weight: 600; opacity: .85; }
.sh form { position: absolute; top: 3px; right: 3px; }
.sh button { border: 0; background: none; color: inherit; font-size: 1rem; line-height: 1; cursor: pointer; padding: 0 2px; opacity: .6; }
.sh button:hover { opacity: 1; }
.sh.done { background: var(--ok-soft); color: var(--ok); }
.sh.late { background: var(--warn-soft); color: var(--warn); }
.sh.missing { background: var(--cheese-soft); color: #8A5B07; }
.sh.absent { background: var(--bad-soft); color: var(--bad); }
.sh.leave { background: #EFEAF7; color: #5B4790; }
.legend { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.legend .sh { display: inline-block; padding-right: 8px; }
.day-picks { display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* time clock tablet */
.tc-body { margin: 0; min-height: 100vh; background: radial-gradient(1000px 700px at 80% 0%, #1F5A42 0%, var(--basil) 45%, #0C261B 100%); color: #fff; font-family: var(--text); -webkit-user-select: none; user-select: none; }
.tc { min-height: 100vh; display: grid; grid-template-rows: auto 1fr auto; padding: 22px clamp(16px, 4vw, 48px); gap: 18px; box-sizing: border-box; }
.tc-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.tc-brand { display: flex; gap: 12px; align-items: center; }
.tc-brand b { display: block; font: 800 1.3rem var(--display); }
.tc-brand small { color: #B9D2C4; font-weight: 600; }
.tc-time { text-align: right; }
.tc-time b { display: block; font: 800 2.6rem/1 var(--display); letter-spacing: -.03em; color: var(--cheese); font-variant-numeric: tabular-nums; }
.tc-time small { color: #B9D2C4; font-weight: 600; }
.tc-main { display: grid; grid-template-columns: minmax(220px, 340px) minmax(300px, 460px); gap: clamp(20px, 5vw, 64px); align-items: center; justify-content: center; }
.tc-cam { position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #0A1F16; border: 6px solid rgba(244, 194, 91, .9); box-shadow: 0 30px 70px -30px rgba(0,0,0,.8); }
.tc-cam.off { opacity: .25; border-color: rgba(255,255,255,.2); }
.tc-cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.tc-cam-note { position: absolute; inset: auto 12% 16% 12%; text-align: center; font-size: .9rem; font-weight: 600; color: #DDE9E2; }
.tc-cam-note.bad { color: #fff; background: var(--bad); padding: 8px 10px; border-radius: 10px; bottom: 30%; }
.tc-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; }
.tc-flash.go { animation: tcflash .5s ease-out; }
@keyframes tcflash { 0% { opacity: .9; } 100% { opacity: 0; } }
.tc-panel { text-align: center; }
.tc-panel h1 { font: 800 clamp(1.8rem, 4vw, 2.6rem) var(--display); margin: 0 0 14px; letter-spacing: -.02em; }
.tc-dots { display: flex; justify-content: center; gap: 14px; height: 22px; }
.tc-dots i { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.55); transition: .15s; }
.tc-dots i.on { background: var(--cheese); border-color: var(--cheese); transform: scale(1.1); }
.tc-msg { min-height: 1.5em; margin: 12px 0; font-weight: 600; color: #DDE9E2; }
.tc-msg.bad { color: #FFB4A6; }
.tc-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 400px; margin: 0 auto; }
.tc-pad button { height: clamp(62px, 10vh, 84px); border-radius: 18px; border: 1.5px solid rgba(255,255,255,.16); background: rgba(255,255,255,.08); color: #fff; font: 700 1.9rem var(--display); cursor: pointer; touch-action: manipulation; transition: transform .08s, background .15s; }
.tc-pad button:active { transform: scale(.95); background: rgba(255,255,255,.2); }
.tc-pad button.soft { font-size: 1.05rem; color: #DDE9E2; }
.tc-pad button.go { background: var(--cheese); color: var(--basil); border-color: var(--cheese); font-size: 1.3rem; }
.tc-info { font-size: 1.15rem; color: #DDE9E2; margin: 0 0 22px; }
.tc-acts { display: grid; gap: 12px; max-width: 420px; margin: 0 auto; }
.tc-act { height: 82px; border-radius: 20px; border: 0; font: 800 1.6rem var(--display); cursor: pointer; touch-action: manipulation; }
.tc-act.go { background: #3FB073; color: #fff; }
.tc-act.soft { background: var(--cheese); color: var(--basil); }
.tc-act.stop { background: var(--tomato); color: #fff; }
.tc-act:disabled { opacity: .6; }
.tc-back { margin-top: 18px; background: none; border: 0; color: #B9D2C4; font-weight: 600; font-size: 1rem; text-decoration: underline; cursor: pointer; }
.tc-tick { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto 18px; display: grid; place-items: center; background: #3FB073; color: #fff; animation: tcpop .4s cubic-bezier(.3,1.6,.5,1); }
.tc-tick.bad { background: var(--tomato); }
@keyframes tcpop { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.tc-foot { text-align: center; color: #9FBCAC; font-size: .9rem; }
.tc-setup { max-width: 560px; margin: 0 auto; min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 14px; padding: 24px; }
.tc-setup h1 { font: 800 2rem var(--display); margin: 0; }
.tc-setup p { color: #DDE9E2; line-height: 1.5; }
@media (max-width: 760px) {
  .tc-main { grid-template-columns: 1fr; }
  .tc-cam { width: 160px; margin: 0 auto; }
  .tc-time b { font-size: 2rem; }
}

/* =====================================================================
   1.5: friendlier interface, food photos and richer categories
   ===================================================================== */
:root {
  --line: #DFE5DD;
  --shadow: 0 1px 2px rgba(23, 64, 47, .05), 0 10px 28px -18px rgba(23, 64, 47, .35);
  --shadow-lg: 0 2px 4px rgba(23, 64, 47, .06), 0 24px 48px -24px rgba(23, 64, 47, .45);
}
body { letter-spacing: .002em; }
::placeholder { color: #9AA59E; }
input, select, textarea { min-height: 42px; transition: border-color .12s, box-shadow .12s; }
input:hover:not(:focus), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: #C5CEC4; }
input[type=checkbox], input[type=radio], input[type=color] { min-height: 0; }
input[type=color] { height: 42px; padding: 4px; cursor: pointer; }
input:disabled, select:disabled { background: #F5F7F4; color: var(--muted); }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.label { display: block; font-weight: 600; font-size: .86rem; color: var(--ink-2); margin-bottom: 8px; }
.grow { flex: 1; }
.center { justify-content: center; }
.span4 { grid-column: 1 / -1; }
.panel { border-color: var(--line); }
.panel h2 { font-size: 1.22rem; }
.tabs a { border-radius: 8px 8px 0 0; transition: color .12s, background .12s; }
.tabs a:hover { color: var(--ink); background: rgba(23, 64, 47, .04); }
tbody tr:hover td { background: #F8FAF7; }
.btn { min-height: 40px; }
.btn.sm { min-height: 32px; }
.btn.lg { min-height: 50px; }
.btn.primary { box-shadow: 0 6px 16px -8px rgba(217, 67, 43, .7); }
.btn.busy { position: relative; color: transparent !important; pointer-events: none; }
.btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .55); border-top-color: #fff; animation: spin .7s linear infinite; }
.btn:not(.primary):not(.basil):not(.ok).busy::after { border-color: rgba(23, 64, 47, .25); border-top-color: var(--basil); }
@keyframes spin { to { transform: rotate(360deg); } }

/* Messages */
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 12px 12px 14px; box-shadow: 0 6px 18px -14px rgba(0, 0, 0, .35); transition: opacity .35s, transform .35s; }
.flash.bye { opacity: 0; transform: translateY(-6px); }
.flash-ic { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font: 800 .8rem/1 var(--text); color: #fff; background: currentColor; }
.flash-ic { background: var(--ok); }
.flash.error .flash-ic { background: var(--bad); }
.flash.warn .flash-ic { background: var(--warn); }
.flash-t { flex: 1; padding-top: 1px; }
.flash-x { flex: none; border: 0; background: none; font-size: 1.3rem; line-height: 1; color: inherit; opacity: .55; cursor: pointer; padding: 0 4px; }
.flash-x:hover { opacity: 1; }

/* Sidebar: folding sections */
.side { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, .18) transparent; }
.nav-group { margin-top: 10px; }
.nav-h { width: 100%; display: flex; align-items: center; justify-content: space-between; border: 0; background: none; cursor: pointer; padding: 6px 10px; border-radius: 8px;
  font: 700 .7rem/1 var(--text); text-transform: uppercase; letter-spacing: .09em; color: #84A893; }
.nav-h:hover { color: #CFE0D6; background: rgba(255, 255, 255, .04); }
.nav-h .ico { transition: transform .15s; opacity: .7; }
.nav-group.closed .nav-h .ico { transform: rotate(-90deg); }
.nav-group.closed .nav-links { display: none; }
.nav-links { display: grid; gap: 1px; margin-top: 2px; }
.side nav a { position: relative; padding: 8px 10px; transition: background .12s, color .12s; }
.side nav a.on { background: rgba(244, 194, 91, .16); color: #fff; font-weight: 700; }
.side nav a.on::before { content: ""; position: absolute; left: -12px; top: 7px; bottom: 7px; width: 4px; border-radius: 0 4px 4px 0; background: var(--cheese); }
.side nav a.on .ico { color: var(--cheese); }
.side nav a.on .nav-badge { background: rgba(255, 255, 255, .2); }

/* Top bar */
.top { min-height: 64px; }
.top-title { flex: 1; min-width: 0; }
.top-title h1 { font-size: 1.35rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumb { display: block; font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.qs-btn { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 8px 0 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); font: 500 .9rem var(--text); cursor: pointer; min-width: 200px; }
.qs-btn:hover { border-color: #B9C4BA; color: var(--ink-2); }
.qs-btn span { flex: 1; text-align: left; }
kbd { font: 600 .7rem var(--text); color: var(--muted); background: var(--flour); border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 6px; padding: 2px 6px; white-space: nowrap; }
@media (max-width: 1200px) { .qs-btn { min-width: 0; } .qs-btn span, .qs-btn kbd { display: none; } .qs-btn { width: 38px; padding: 0; justify-content: center; } }
@media (max-width: 960px) { .crumb { display: none; } .top { min-height: 56px; } }

/* Quick search */
.qs { position: fixed; inset: 0; z-index: 120; background: rgba(12, 28, 20, .45); display: grid; justify-items: center; align-items: start; padding: 12vh 16px 16px; backdrop-filter: blur(2px); }
.qs[hidden] { display: none; }
.qs-card { width: min(620px, 100%); background: #fff; border-radius: 18px; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .5); overflow: hidden; animation: pop .14s ease-out; }
.qs-in { display: flex; align-items: center; gap: 10px; padding: 6px 16px; border-bottom: 1px solid var(--line-2); color: var(--muted); }
.qs-in input { border: 0; box-shadow: none !important; font-size: 1.05rem; padding: 14px 0; min-height: 0; }
.qs-list { list-style: none; margin: 0; padding: 8px; max-height: 50vh; overflow-y: auto; }
.qs-list a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 600; }
.qs-list a span { flex: 1; }
.qs-list a small { color: var(--muted); font-weight: 500; font-size: .78rem; }
.qs-list a.sel, .qs-list a:hover { background: var(--cheese-soft); }
.qs-list a .ico { color: var(--basil-3); }
.qs-none { padding: 18px; color: var(--muted); text-align: center; }
.qs-foot { margin: 0; padding: 8px 16px; border-top: 1px solid var(--line-2); background: #FAFBF9; }

/* Phone shortcut bar */
.tabbar { display: none; }
@media (max-width: 960px) {
  .tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: rgba(255, 255, 255, .97); backdrop-filter: blur(10px);
    border-top: 1px solid var(--line); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); box-shadow: 0 -8px 24px -18px rgba(0, 0, 0, .35); }
  .tabbar a, .tabbar button { position: relative; display: grid; justify-items: center; gap: 2px; padding: 6px 2px; border: 0; background: none; color: var(--muted); font: 600 .7rem var(--text); text-decoration: none; border-radius: 10px; cursor: pointer; }
  .tabbar a.on { color: var(--tomato-d); }
  .tabbar a.on .ico { stroke-width: 2.3; }
  .tabbar .nav-badge { position: absolute; top: 2px; left: 50%; margin-left: 6px; background: var(--tomato); min-width: 18px; height: 18px; line-height: 18px; font-size: .68rem; }
  .app:has(.tabbar) .content { padding-bottom: 96px; }
  .kds .tabbar, .page-pos .tabbar { display: none; }
  .app:has(.tabbar) .m-cartbar { bottom: calc(76px + env(safe-area-inset-bottom)) !important; }
  .page-pos .m-cartbar { bottom: 16px !important; }
  .app:has(.tabbar) #pd-toast { bottom: calc(84px + env(safe-area-inset-bottom)) !important; }
}

/* Switches, pills, check cards */
.tswitch { position: relative; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: .9rem; cursor: pointer; user-select: none; flex: none; white-space: nowrap; }
.tswitch input { position: absolute; opacity: 0; width: 0; height: 0; }
.tswitch > span { position: relative; width: 42px; height: 24px; border-radius: 999px; background: #CBD3CA; transition: background .15s; flex: none; }
.tswitch > span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.tswitch input:checked + span { background: var(--ok); }
.tswitch input:checked + span::after { transform: translateX(18px); }
.tswitch input:focus-visible + span { outline: 3px solid var(--cheese); outline-offset: 2px; }
.pill-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.pill-pick input { position: absolute; opacity: 0; }
.pill-pick span { display: inline-flex; align-items: center; padding: 7px 13px; border-radius: 999px; border: 1.5px solid var(--line); background: #fff; font-weight: 600; font-size: .88rem; cursor: pointer; transition: .12s; }
.pill-pick input:checked + span { border-color: var(--basil-3); background: var(--ok-soft); color: var(--basil); }
.pill-pick input:focus-visible + span { outline: 3px solid var(--cheese); }
.group-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; border: 0; padding: 0; margin: 0; }
.check-card { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; font-weight: 500; transition: .12s; }
.check-card:has(input:checked) { border-color: var(--basil-3); background: #F4FAF6; }
.check-card input { margin-top: 3px; }
.check-card b { display: block; color: var(--ink); }
.check-card small { color: var(--muted); font-weight: 500; }
details.more > summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
details.more > summary::before { content: "+"; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--flour); font-weight: 800; }
details.more[open] > summary::before { content: "−"; }
.money-in { display: flex; align-items: center; border: 1px solid var(--line); border-radius: var(--r-ctl); background: #fff; overflow: hidden; }
.money-in i { font-style: normal; padding: 0 0 0 12px; color: var(--muted); font-weight: 600; }
.money-in input { border: 0; box-shadow: none !important; }
.money-in:focus-within { border-color: var(--basil-3); box-shadow: 0 0 0 3px rgba(46, 107, 75, .15); }

/* Search boxes and category chips */
.search-box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 0 12px; color: var(--muted); font-weight: 400; transition: border-color .12s, box-shadow .12s; }
.search-box:focus-within { border-color: var(--basil-3); box-shadow: 0 0 0 3px rgba(46, 107, 75, .15); }
.search-box input { border: 0; box-shadow: none !important; padding-left: 0; background: transparent; margin: 0; }
.cat-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.cat-chips::-webkit-scrollbar { display: none; }
.cchip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px 7px 10px; font: 600 .88rem var(--text); color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.cchip i { font-style: normal; font-size: 1rem; }
.cchip span { background: var(--flour); border-radius: 999px; padding: 0 7px; font-size: .75rem; color: var(--muted); }
.cchip.on { background: var(--basil); border-color: var(--basil); color: #fff; }
.cchip.on span { background: rgba(255, 255, 255, .18); color: #fff; }

/* Food pictures */
.food-img { display: block; width: 100%; height: 100%; object-fit: cover; background: #EDE6DA; }
.food-ph { display: grid; place-items: center; background-color: #F6E3C4; background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, .35), transparent 55%), linear-gradient(135deg, color-mix(in srgb, var(--c) 18%, #FFF8EC), color-mix(in srgb, var(--c) 42%, #FFF1DA)); }
.food-ph span { font-size: clamp(1.6rem, 5vw, 2.6rem); filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .15)); }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .94); color: var(--ink); font: 700 .7rem/1.3 var(--text); box-shadow: 0 2px 6px rgba(0, 0, 0, .12); white-space: nowrap; }
.tag-popular { background: var(--cheese); color: #5C3B00; }
.tag-new { background: var(--basil); color: #fff; }
.tag-spicy { background: var(--tomato); color: #fff; }
.tag-veg { background: #E2F3E5; color: #1F6B35; }
.tag-chef { background: #fff; color: var(--crust); }
.m-pic { margin: -22px -22px 16px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 18px 18px 0 0; background: #EDE6DA; }
.m-pic .food-img { width: 100%; height: 100%; }

/* Menu page */
.menu-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; position: sticky; top: 64px; z-index: 10; background: var(--flour); padding: 8px 0; }
.menu-toolbar .search-box { width: 280px; }
.menu-toolbar .cat-chips { flex: 1; min-width: 0; }
.tip-bar { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: 14px; background: var(--cheese-soft); border: 1px solid #F1DDA9; margin-bottom: 18px; color: #5C4614; }
.tip-ic { font-size: 1.4rem; line-height: 1; }
.menu-sec + .menu-sec { margin-top: 28px; }
.menu-sec[hidden] { display: none; }
.menu-sec-h { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.menu-sec-h > div { flex: 1; min-width: 180px; }
.menu-sec-h h2 { margin: 0; font-size: 1.3rem; }
.menu-sec-h p { margin: 2px 0 0; }
.cat-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; background-color: #FBEFE6; background: color-mix(in srgb, var(--c) 16%, #fff); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 30%, transparent); flex: none; }
.food-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.food-card { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: box-shadow .15s, transform .15s; scroll-margin-top: 140px; }
.food-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.food-card[hidden] { display: none; }
.food-card:target { outline: 3px solid var(--cheese); }
.food-card.off { opacity: .62; }
.food-card.off .food-img { filter: grayscale(.8); }
.fc-pic { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #EDE6DA; }
.fc-pic .food-img { transition: transform .3s; }
.food-card:hover .fc-pic .food-img { transform: scale(1.04); }
.fc-tags { position: absolute; left: 10px; top: 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.fc-hidden, .fc-addpic { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border-radius: 999px; font: 700 .76rem var(--text); }
.fc-hidden { background: rgba(27, 37, 32, .85); color: #fff; }
.fc-addpic { background: rgba(255, 255, 255, .92); color: var(--basil); box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.fc-body { padding: 14px 16px 8px; flex: 1; display: flex; flex-direction: column; gap: 6px; }
.fc-top { display: flex; gap: 10px; align-items: baseline; justify-content: space-between; }
.fc-top h3 { margin: 0; font-size: 1.08rem; }
.fc-price { font: 800 1.05rem var(--display); color: var(--tomato-d); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fc-price small, .price small { font: 600 .72rem var(--text); color: var(--muted); }
.fc-desc { color: var(--muted); font-size: .86rem; margin: 0; flex: 1; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fc-meta { display: flex; flex-wrap: wrap; gap: 6px; font-size: .76rem; font-weight: 600; color: var(--muted); }
.fc-meta > * { background: var(--flour); padding: 3px 8px; border-radius: 999px; text-decoration: none; color: inherit; }
.fc-cost.ok { background: var(--ok-soft); color: var(--ok); }
.fc-cost.warn { background: var(--warn-soft); color: var(--warn); }
.fc-cost.bad { background: var(--bad-soft); color: var(--bad); }
.fc-cost.none { background: var(--info-soft); color: var(--info); }
.fc-actions { display: flex; gap: 8px; padding: 10px 16px 14px; }
.fc-actions .btn { flex: 1; }
.fc-actions form { flex: 1; display: flex; }
.empty-filter { text-align: center; padding: 30px; }
.empty-state { text-align: center; padding: 56px 24px; }
.empty-state .es-art { width: 96px; height: 96px; border-radius: 28px; margin: 0 auto 18px; display: grid; place-items: center; font-size: 3rem; background: var(--cheese-soft); }
.empty-state p { color: var(--muted); max-width: 46ch; margin: 0 auto 18px; }
@media (max-width: 720px) { .menu-toolbar { top: 56px; } .menu-toolbar .search-box { width: 100%; } .food-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; } .fc-actions { padding: 8px 12px 12px; } .fc-body { padding: 12px 12px 6px; } }

/* Item editor */
.item-editor { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.ie-main > .panel + .panel { margin-top: 18px; }
.ie-side { position: sticky; top: 84px; display: grid; gap: 18px; }
.ie-side .panel + .panel { margin-top: 0; }
.drop { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; border: 2px dashed #C9D2C7; border-radius: 14px; background: #FAFBF8; cursor: pointer; overflow: hidden; text-align: center; transition: border-color .12s, background .12s; }
.drop:hover, .drop.over { border-color: var(--basil-3); background: #F2F8F3; }
.drop-pic { position: absolute; inset: 0; }
.drop-pic img { width: 100%; height: 100%; object-fit: cover; }
.drop-txt { position: relative; display: grid; gap: 4px; justify-items: center; padding: 16px; font-weight: 500; }
.drop-txt b { color: var(--ink); }
.drop-txt small { color: var(--muted); }
.drop-ic { font-size: 2rem; }
.pv-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.pv-pic { aspect-ratio: 4 / 3; background: #EDE6DA; }
.pv-pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-body { padding: 12px 14px; display: grid; gap: 4px; }
.pv-body b { font: 700 1.05rem var(--display); }
.pv-body small { color: var(--muted); }
.pv-body span { font: 800 1.05rem var(--display); color: var(--tomato-d); }
.variants .line-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) 36px; }
@media (max-width: 1000px) { .item-editor { grid-template-columns: 1fr; } .ie-side { position: static; } .preview-panel { display: none; } }

/* Category manager */
.cat-list { display: grid; gap: 14px; }
.cat-card { padding: 16px 18px; scroll-margin-top: 90px; }
.cat-card + .cat-card { margin-top: 0; }
.cc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.cc-order { display: grid; gap: 2px; }
.cc-order .icon-btn { width: 30px; height: 26px; font-size: .7rem; color: var(--muted); border: 1px solid var(--line); background: #fff; }
.cc-order .icon-btn[disabled] { opacity: .3; pointer-events: none; }
.cc-cover { position: relative; width: 84px; height: 63px; border-radius: 12px; overflow: hidden; cursor: pointer; flex: none; font-weight: 400; }
.cc-cover .food-img { width: 100%; height: 100%; }
.cc-cover .food-ph span { font-size: 1.6rem; }
.cc-cover > span:last-child { position: absolute; inset: auto 0 0 0; background: rgba(0, 0, 0, .55); color: #fff; font: 700 .68rem var(--text); text-align: center; padding: 2px; opacity: 0; transition: opacity .12s; }
.cc-cover:hover > span:last-child, .cc-cover.changed > span:last-child { opacity: 1; }
.cc-cover.changed { outline: 3px solid var(--cheese); }
.cc-title h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 1.15rem; }
.cc-fields { grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr) 90px; }
.cc-foot { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line-2); }
.icon-in { display: flex; align-items: stretch; margin-top: 5px; position: relative; }
.icon-in input { margin: 0; border-radius: var(--r-ctl) 0 0 var(--r-ctl); text-align: center; font-size: 1.2rem; padding: 6px; }
.emoji-pop { position: relative; }
.emoji-pop > summary { list-style: none; height: 100%; display: grid; place-items: center; padding: 0 10px; border: 1px solid var(--line); border-left: 0; border-radius: 0 var(--r-ctl) var(--r-ctl) 0; cursor: pointer; background: #fff; color: var(--muted); }
.emoji-pop > summary::-webkit-details-marker { display: none; }
.emoji-pop > div { position: absolute; z-index: 30; top: calc(100% + 6px); left: -120px; width: 240px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; padding: 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); }
.emoji-pop button { border: 0; background: none; font-size: 1.35rem; padding: 6px; border-radius: 8px; cursor: pointer; }
.emoji-pop button:hover { background: var(--flour); }
.cat-new { margin-top: 18px; }
.cat-new .grid4 { grid-template-columns: 110px minmax(0, 2fr) 90px; }
.cat-new .span2 { grid-column: auto; }
.cat-intro p { margin: 0 0 14px; }
@media (max-width: 720px) { .cc-fields, .cat-new .grid4 { grid-template-columns: 1fr 1fr; } .cc-fields .span4 { grid-column: 1 / -1; } }

/* Till with photos */
.pos-cats { gap: 8px; padding: 14px 20px 10px; scrollbar-width: none; }
.pos-cats::-webkit-scrollbar { display: none; }
.pos-cats button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 10px; border-radius: 14px; }
.pos-cats button i { font-style: normal; font-size: 1.15rem; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background-color: #F6EFE6; background: color-mix(in srgb, var(--c) 14%, #fff); }
.pos-cats button small { font-size: .74rem; color: var(--muted); font-weight: 700; }
.pos-cats button.on { background: var(--basil); border-color: var(--basil); }
.pos-cats button.on i { background: rgba(255, 255, 255, .14); }
.pos-cats button.on small { color: #B9D2C4; }
.pos-search { display: flex; gap: 8px; align-items: center; }
.pos-search .search-box { flex: 1; }
.pics-t.on { background: var(--ok-soft); border-color: #BFE0CB; color: var(--basil); }
.pos-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.tile { padding: 0; min-height: 0; border-radius: 14px; }
.tile::before { display: none; }
.tile-pic { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #EDE6DA; }
.tile-pic .tag { position: absolute; left: 8px; top: 8px; }
.tile-body { display: flex; flex-direction: column; padding: 10px 12px 12px; flex: 1; border-top: 3px solid var(--c, var(--tomato)); }
.tile b { font-size: .98rem; }
.tile .price { margin-top: 6px; font-size: 1rem; }
.no-pics .tile { min-height: 108px; }
.no-pics .tile-body { border-top: 0; border-left: 5px solid var(--c, var(--tomato)); padding: 12px 12px 12px 14px; }
.tile.has { border-color: var(--basil-3); box-shadow: 0 0 0 2px rgba(46, 107, 75, .25); }
.tile-n { position: absolute; right: 8px; top: 8px; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 999px; background: var(--basil); color: #fff; font: 800 .9rem/28px var(--display); text-align: center; font-style: normal; box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .5); }
.cart-line { align-items: center; }
.cart-lines .cart-empty { padding: 56px 10px; }
.cart-lines .cart-empty::before { content: "🛒"; display: block; font-size: 2.2rem; margin-bottom: 8px; opacity: .6; }
#pays { display: grid; grid-template-columns: repeat(auto-fit, minmax(70px, 1fr)); gap: 6px; }

/* Online menu */
.shop-nav { position: sticky; top: 0; z-index: 15; display: flex; gap: 10px; align-items: center; background: rgba(242, 244, 239, .96); backdrop-filter: blur(8px); margin: 0 -16px 8px; padding: 10px 16px; border-bottom: 1px solid transparent; }
.shop-cats { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; scroll-behavior: smooth; }
.shop-cats::-webkit-scrollbar { display: none; }
.shop-cats a { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .92rem; white-space: nowrap; }
.shop-cats a i { font-style: normal; }
.shop-cats a.on { background: var(--basil); border-color: var(--basil); color: #fff; }
.shop-search { width: 220px; flex: none; }
.shop-sec { scroll-margin-top: 80px; }
.shop-sec + .shop-sec { margin-top: 28px; }
.shop-sec-h { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; }
.shop-sec-h h2 { margin: 0; font-size: 1.4rem; }
.shop-sec-h p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }
.shop-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.shop-card { padding: 0; overflow: hidden; gap: 0; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.shop-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.shop-card:focus-visible { outline: 3px solid var(--cheese); }
.sc-pic { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: #EDE6DA; }
.sc-tags { position: absolute; left: 10px; top: 10px; display: flex; gap: 5px; flex-wrap: wrap; }
.sc-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.shop-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.add-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--tomato); color: #fff; font: 800 1.4rem/1 var(--display); box-shadow: 0 6px 14px -6px rgba(217, 67, 43, .8); transition: transform .12s; }
.shop-card:hover .add-btn { transform: scale(1.08); }
.add-btn.has { background: var(--basil); font-size: 1rem; }
.shop-none { text-align: center; padding: 30px; }
.basket-bar { display: none; }
@media (max-width: 900px) {
  .shop-search { width: 44px; }
  .shop-search input { width: 0; padding: 0; }
  .shop-search:focus-within { width: 100%; position: absolute; left: 16px; right: 16px; z-index: 2; }
  .shop-search:focus-within input { width: 100%; padding: 9px 0; }
  .basket-bar:not([hidden]) { position: fixed; left: 12px; right: 12px; bottom: 14px; z-index: 50; display: flex; align-items: center; gap: 12px; border: 0; border-radius: 16px; padding: 14px 18px;
    background: var(--tomato); color: #fff; font: 700 1rem var(--text); box-shadow: 0 16px 30px -12px rgba(217, 67, 43, .8); cursor: pointer; }
  .basket-bar span:nth-child(2) { flex: 1; text-align: left; }
  .bb-n { min-width: 28px; height: 28px; border-radius: 999px; background: rgba(255, 255, 255, .22); display: grid; place-items: center; font-size: .9rem; }
}
@media (max-width: 560px) {
  .shop-grid { grid-template-columns: 1fr; gap: 12px; }
  .shop-card { flex-direction: row-reverse; align-items: stretch; }
  .sc-pic { width: 128px; aspect-ratio: auto; flex: none; margin: 12px 12px 12px 0; border-radius: 12px; }
  .sc-tags { left: 6px; top: 6px; }
  .sc-tags .tag:nth-child(n+2) { display: none; }
  .sc-body { padding: 14px 4px 14px 14px; }
  .shop-card h3 { font-size: 1.02rem; }
  .add-btn { width: 34px; height: 34px; font-size: 1.2rem; }
}

/* Kiosk with photos */
.k-cats button { display: flex; align-items: center; gap: 12px; padding: 12px 14px; }
.k-cat-ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-style: normal; font-size: 1.5rem; background: rgba(255, 255, 255, .1); overflow: hidden; flex: none; }
.k-cat-ic img { width: 100%; height: 100%; object-fit: cover; }
.k-cats button.on .k-cat-ic { background: rgba(23, 64, 47, .1); }
.k-tile { padding: 0; overflow: hidden; gap: 0; min-height: 0; }
.k-pic { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #EDE6DA; }
.k-pic .tag { position: absolute; left: 12px; top: 12px; font-size: .8rem; padding: 4px 10px; }
.k-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 18px 18px; flex: 1; border-top: 4px solid var(--c); }
.k-tile .price small { font-size: .8rem; }

body:has(.basket-bar:not([hidden])) #pd-toast { bottom: 92px !important; }
.page-pos .m-pic { aspect-ratio: 3 / 1; }
.page-pos .modal-card { width: min(600px, 100%); }
@media (max-width: 720px) {
  .filters { display: grid; grid-template-columns: 1fr 1fr; align-items: end; }
  .filters label { min-width: 0; }
  .filters > .btn, .filters > button, .filters > label.check { width: 100%; }
}
