:root {
  --brand: #E0531F; --brand-dark: #B83F12; --brand-soft: #FDEEE6;
  --green: #1BA672; --green-soft: #E6F6EF; --amber: #E8A100; --amber-soft: #FFF5DB;
  --blue: #2F6FEB; --blue-soft: #E8F0FE; --violet: #7A4DD8; --violet-soft: #F0EAFC;
  --ink: #1C1C1C; --ink-2: #4F4F4F; --ink-3: #8A8A8A; --line: #ECECEC; --bg: #F5F6F8; --card: #FFFFFF;
  --r: 14px; --r-sm: 10px; --shadow: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.05);
  --nav-h: 64px; --side-w: 232px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", Ubuntu, sans-serif;
  color: var(--ink); -webkit-tap-highlight-color: transparent;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { font-size: 15px; line-height: 1.4; overscroll-behavior-y: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea {
  width: 100%; border: 1.5px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px;
  background: #fff; outline: none; transition: border-color .15s; min-height: 48px;
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); }
textarea { min-height: 72px; resize: vertical; }
h1, h2, h3, h4 { margin: 0; letter-spacing: -.01em; }
.hidden { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.bold { font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.tight { gap: 6px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.red { color: var(--brand); } .green { color: var(--green); } .amber { color: #B07A00; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 18px; border-radius: var(--r-sm); font-weight: 650;
  background: var(--brand); color: #fff; transition: transform .08s, background .15s; white-space: nowrap; user-select: none;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.block { width: 100%; }
.btn.lg { min-height: 56px; font-size: 17px; border-radius: var(--r); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 14px; }
.btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); }
.btn.soft { background: var(--brand-soft); color: var(--brand-dark); }
.btn.dark { background: var(--ink); }
.btn.green { background: var(--green); color: #fff; }
.btn.plain { background: transparent; color: var(--ink-2); }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-grid; place-items: center; color: var(--ink-2); flex: none; }
.icon-btn:active { background: var(--line); }
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- layout ---------- */
#app { min-height: 100%; }
.shell { min-height: 100vh; }
.side { display: none; }
.main { padding: 0 0 calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); }
.topbar {
  position: sticky; top: 0; z-index: 20; background: rgba(245,246,248,.92); backdrop-filter: blur(10px);
  display: flex; align-items: center; gap: 8px; padding: 12px 16px; min-height: 64px;
}
.topbar h1 { font-size: 22px; font-weight: 800; flex: 1; min-width: 0; }
.topbar .sub { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.page { padding: 4px 16px 16px; }
.bottomnav {
  position: fixed; inset: auto 0 0 0; z-index: 30; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--line);
  display: flex;
}
.bottomnav a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: var(--ink-3); text-decoration: none; font-size: 11.5px; font-weight: 600; position: relative; }
.bottomnav a.on { color: var(--brand); }
.badge { position: absolute; top: 6px; left: 50%; margin-left: 6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font-size: 11px; display: grid; place-items: center; font-weight: 700; }

@media (min-width: 900px) {
  .side {
    display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: var(--side-w);
    background: #fff; border-right: 1px solid var(--line); padding: 16px 12px; gap: 2px; overflow-y: auto;
  }
  .side .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 18px; font-weight: 800; font-size: 17px; }
  .side .brand .logo { width: 36px; height: 36px; border-radius: 10px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 18px; }
  .side a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-weight: 600; position: relative; }
  .side a:hover { background: var(--bg); }
  .side a.on { background: var(--brand-soft); color: var(--brand-dark); }
  .side a .badge { position: static; margin-left: auto; }
  .side .me { margin-top: auto; padding: 12px; border-top: 1px solid var(--line); }
  .main { margin-left: var(--side-w); padding-bottom: 24px; }
  .bottomnav { display: none; }
  .topbar { padding: 16px 24px; }
  .page { padding: 4px 24px 24px; }
}

/* ---------- cards & lists ---------- */
.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); padding: 16px; }
.card.flat { box-shadow: none; border: 1px solid var(--line); }
.card h3 { font-size: 16px; margin-bottom: 10px; }
.list { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.li { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); min-height: 60px; }
.li:last-child { border-bottom: 0; }
button.li, a.li { width: 100%; text-align: left; color: inherit; text-decoration: none; }
button.li:active, a.li:active { background: var(--bg); }
.section-title { font-size: 13px; font-weight: 700; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; margin: 20px 4px 8px; }
.grid { display: grid; gap: 12px; }
.grid.k2 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .grid.k4 { grid-template-columns: repeat(4, 1fr); } .grid.k3 { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 639px) { .grid.k4, .grid.k3 { grid-template-columns: repeat(2, 1fr); } }
.two-col { display: grid; gap: 16px; }
@media (min-width: 1000px) { .two-col { grid-template-columns: 1fr 1fr; } }

.stat { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 14px 16px; }
.stat .k { font-size: 13px; color: var(--ink-3); font-weight: 600; }
.stat .v { font-size: 24px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stat .d { font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.stat.hero { background: var(--ink); color: #fff; }
.stat.hero .k, .stat.hero .d { color: rgba(255,255,255,.65); }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--bg); color: var(--ink-2); white-space: nowrap; }
.pill.red { background: var(--brand-soft); color: var(--brand-dark); }
.pill.green { background: var(--green-soft); color: #0E7A52; }
.pill.amber { background: var(--amber-soft); color: #8A5F00; }
.pill.blue { background: var(--blue-soft); color: #1F55C4; }
.pill.violet { background: var(--violet-soft); color: #5B33B0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }

.veg { width: 14px; height: 14px; border: 1.5px solid var(--green); border-radius: 3px; display: inline-grid; place-items: center; flex: none; }
.veg::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.veg.non { border-color: #A0522D; }
.veg.non::after { background: none; width: 0; height: 0; border-radius: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 7px solid #A0522D; }

/* segmented / chips */
.seg { display: inline-flex; background: #E9EAED; border-radius: 12px; padding: 3px; gap: 2px; }
.seg button { padding: 9px 16px; border-radius: 10px; font-weight: 650; font-size: 14px; color: var(--ink-2); min-height: 40px; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; padding: 9px 16px; border-radius: 999px; background: #fff; border: 1.5px solid var(--line); font-weight: 650; font-size: 14px; color: var(--ink-2); min-height: 40px; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }

.search { position: relative; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.search input { padding-left: 44px; background: #fff; border-color: transparent; box-shadow: var(--shadow); }
.search input:focus { border-color: var(--ink); }

/* ---------- tables screen ---------- */
.tables { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
@media (max-width: 420px) { .tables { grid-template-columns: repeat(2, 1fr); } }
.tbl { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 14px; min-height: 112px; text-align: left; display: flex; flex-direction: column; gap: 4px; border: 2px solid transparent; transition: transform .08s; }
.tbl:active { transform: scale(.97); }
.tbl .tn { font-size: 20px; font-weight: 800; }
.tbl .ts { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.tbl .ta { margin-top: auto; font-size: 17px; font-weight: 800; }
.tbl.busy { border-color: var(--amber); background: #FFFBF0; }
.tbl.ready { border-color: var(--green); background: #F2FBF7; }
.tbl.billed { border-color: var(--blue); background: #F4F8FF; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; border: 2px solid; }

/* ---------- order screen ---------- */
.order-wrap { display: grid; gap: 16px; }
@media (min-width: 1000px) { .order-wrap { grid-template-columns: 1fr 380px; align-items: start; } .cart-panel { position: sticky; top: calc(var(--tb, 64px) + 12px); } .cartbar { display: none !important; } }
@media (max-width: 999px) { .cart-panel { display: none; } }
.menu-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
/* dish card: name across the full width (up to 2 lines), price and ADD on the row below */
.mi { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 12px 10px 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 8px; min-height: 92px; text-align: left; position: relative; }
.mi .nm { display: flex; gap: 8px; align-items: flex-start; font-weight: 650; font-size: 15px; line-height: 1.3; }
.mi .nm .veg { margin-top: 2px; }
.mi .nm > span:last-child { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.mi-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mi .pr { font-weight: 700; color: var(--ink-2); font-size: 15px; }
.mi.off { opacity: .5; }
.mi.inCart { box-shadow: 0 0 0 2px var(--green) inset, var(--shadow); }
.add-btn { flex: none; min-width: 84px; height: 38px; border-radius: 10px; border: 1.5px solid var(--line); color: var(--green); font-weight: 800; background: #fff; font-size: 14px; letter-spacing: .03em; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.stepper { flex: none; display: inline-flex; align-items: center; height: 38px; border-radius: 10px; background: var(--green); color: #fff; font-weight: 800; overflow: hidden; }
.stepper button { width: 34px; height: 38px; color: #fff; font-size: 20px; font-weight: 700; display: grid; place-items: center; }
.stepper button:active { background: rgba(0,0,0,.12); }
.stepper span { min-width: 22px; text-align: center; font-variant-numeric: tabular-nums; }
.cartbar {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--nav-h) + 10px + env(safe-area-inset-bottom)); z-index: 25;
  background: var(--green); color: #fff; border-radius: var(--r); padding: 12px 16px; display: flex; align-items: center; gap: 12px;
  box-shadow: 0 8px 24px rgba(27,166,114,.35); min-height: 60px; animation: up .2s ease;
}
@media (min-width: 900px) { .cartbar { left: calc(var(--side-w) + 24px); right: 24px; bottom: 20px; } }
@keyframes up { from { transform: translateY(20px); opacity: 0; } }
.cart-line { display: flex; gap: 10px; align-items: flex-start; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.cart-line:last-child { border-bottom: 0; }
.cart-line .nm { font-weight: 650; }
.sent-tag { font-size: 11px; font-weight: 700; color: var(--ink-3); }
.sum-row { display: flex; justify-content: space-between; padding: 4px 0; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.sum-row.total { font-size: 19px; font-weight: 800; color: var(--ink); padding-top: 10px; margin-top: 6px; border-top: 1.5px solid var(--line); }

/* ---------- kitchen ---------- */
.kds { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); align-items: start; }
.kot { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; border-top: 6px solid var(--amber); }
.kot.preparing { border-top-color: var(--blue); }
.kot.ready { border-top-color: var(--green); }
.kot.late { animation: pulse 1.6s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 3px rgba(224,83,31,.35); } }
.kot-head { padding: 12px 14px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--line); }
.kot-head .t { font-size: 18px; font-weight: 800; }
.kot-items { padding: 6px 14px; }
.kot-item { display: flex; gap: 10px; padding: 7px 0; font-size: 16px; font-weight: 600; align-items: baseline; }
.kot-item .q { font-weight: 800; min-width: 30px; }
.kot-item.x { text-decoration: line-through; color: var(--ink-3); }
.kot-item .note { display: block; font-size: 13px; color: var(--brand-dark); font-weight: 600; }
.kot-foot { padding: 10px 14px 14px; }

/* ---------- order tracking board ---------- */
.board { display: grid; gap: 12px; }
@media (min-width: 800px) { .board { grid-template-columns: repeat(3, 1fr); } }
.board .col h4 { font-size: 14px; margin: 0 0 8px 4px; display: flex; gap: 8px; align-items: center; }
.token { font-size: 26px; font-weight: 900; letter-spacing: -.02em; }

/* ---------- sheet / modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.sheet { background: #fff; width: 100%; max-height: 92vh; overflow-y: auto; border-radius: 20px 20px 0 0; padding: 8px 16px calc(16px + env(safe-area-inset-bottom)); animation: slide .22s cubic-bezier(.2,.8,.2,1); }
.sheet::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: #DDD; margin: 0 auto 10px; }
@keyframes slide { from { transform: translateY(40px); opacity: .5; } }
@media (min-width: 700px) { .overlay { align-items: center; } .sheet { max-width: 520px; border-radius: 20px; padding: 20px 24px 24px; } .sheet::before { display: none; } .sheet.wide { max-width: 760px; } }
.sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.sheet-head h2 { font-size: 20px; flex: 1; }
.sheet-foot { position: sticky; bottom: calc(-16px - env(safe-area-inset-bottom)); background: #fff; padding: 12px 0 4px; margin-top: 12px; display: flex; gap: 10px; }
@media (min-width: 700px) { .sheet-foot { bottom: -24px; } }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 13px; font-weight: 650; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--ink-3); }
.fields-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0; min-height: 48px; }
.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; min-height: 0; }
.switch span { position: absolute; inset: 0; background: #D5D5D5; border-radius: 15px; transition: .2s; }
.switch span::after { content: ""; position: absolute; width: 24px; height: 24px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + span { background: var(--green); }
.switch input:checked + span::after { transform: translateX(20px); }
.opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 8px; }
.opt { padding: 12px 8px; border-radius: var(--r-sm); border: 1.5px solid var(--line); font-weight: 700; text-align: center; min-height: 52px; background: #fff; }
.opt.on { border-color: var(--ink); background: var(--ink); color: #fff; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 16px; gap: 20px; }
.login .logo { width: 64px; height: 64px; border-radius: 18px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 32px; box-shadow: 0 10px 30px rgba(224,83,31,.3); }
.login h1 { font-size: 26px; font-weight: 800; text-align: center; }
.login .logo-img { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 10px 30px rgba(224,83,31,.3); }
.link { background: none; border: 0; padding: 4px 0; color: var(--brand-dark); font-weight: 700; cursor: pointer; font: inherit; font-weight: 700; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; width: 100%; max-width: 560px; }
.person { background: #fff; border-radius: var(--r); box-shadow: var(--shadow); padding: 18px 10px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.person:active { transform: scale(.97); }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 20px; color: #fff; flex: none; }
.avatar.sm { width: 38px; height: 38px; font-size: 15px; }
.pinpad { display: grid; grid-template-columns: repeat(3, 76px); gap: 14px; justify-content: center; }
.pinpad button { width: 76px; height: 76px; border-radius: 50%; background: #fff; box-shadow: var(--shadow); font-size: 26px; font-weight: 600; }
.pinpad button:active { background: var(--line); }
.pindots { display: flex; gap: 16px; justify-content: center; margin: 4px 0 8px; }
.pindots i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--ink-3); }
.pindots i.on { background: var(--ink); border-color: var(--ink); }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-8px); } 75% { transform: translateX(8px); } }
.setup { width: 100%; max-width: 440px; }

/* ---------- reports ---------- */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; padding-top: 10px; }
.bars .b { flex: 1; background: var(--brand); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; opacity: .85; }
.bars .b:hover { opacity: 1; }
.bars .b.zero { background: var(--line); }
.bar-x { display: flex; gap: 3px; font-size: 10px; color: var(--ink-3); margin-top: 4px; }
.bar-x span { flex: 1; text-align: center; }
.hbar { height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; margin-top: 6px; }
.hbar i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.hbar.green i { background: var(--green); } .hbar.amber i { background: var(--amber); }
table.t { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
table.t th { text-align: left; font-size: 12px; color: var(--ink-3); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 8px 8px; border-bottom: 1.5px solid var(--line); }
table.t td { padding: 10px 8px; border-bottom: 1px solid var(--line); }
table.t tr:last-child td { border-bottom: 0; }
table.t .r { text-align: right; }
.scroll-x { overflow-x: auto; }
.att-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.att-grid div { aspect-ratio: 1; border-radius: 6px; display: grid; place-items: center; font-size: 11px; font-weight: 700; background: var(--bg); color: var(--ink-3); }
.att-grid .P { background: var(--green-soft); color: #0E7A52; } .att-grid .A { background: var(--brand-soft); color: var(--brand-dark); }
.att-grid .H { background: var(--amber-soft); color: #8A5F00; } .att-grid .O { background: var(--blue-soft); color: #1F55C4; }
.att-btns { display: flex; gap: 6px; }
.att-btns button { width: 42px; height: 42px; border-radius: 10px; border: 1.5px solid var(--line); font-weight: 800; color: var(--ink-3); background: #fff; }
.att-btns button.on.P { background: var(--green); border-color: var(--green); color: #fff; }
.att-btns button.on.A { background: var(--brand); border-color: var(--brand); color: #fff; }
.att-btns button.on.H { background: var(--amber); border-color: var(--amber); color: #fff; }
.att-btns button.on.O { background: var(--blue); border-color: var(--blue); color: #fff; }

.stockbar { height: 6px; border-radius: 3px; background: var(--bg); overflow: hidden; margin-top: 6px; }
.stockbar i { display: block; height: 100%; background: var(--green); }
.stockbar.low i { background: var(--brand); }

.empty { text-align: center; padding: 48px 16px; color: var(--ink-3); }
.empty .big { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft, #FBE9E1); color: var(--brand); }
.empty .big .icon { width: 30px; height: 30px; stroke-width: 1.8; }
.h-ic { display: flex; align-items: center; gap: 8px; }
.h-ic > .icon { width: 20px; height: 20px; color: var(--brand); }
.h-ic > .icon.sm { width: 18px; height: 18px; }
.h-ic > .icon.green { color: var(--green, #1BA672); } .h-ic > .icon.amber { color: var(--amber, #E8A100); } .h-ic > .icon.blue { color: var(--blue, #2F6FEB); } .h-ic > .icon.red { color: var(--red, #D6336C); }
.side .brand .logo-img { width: 36px; height: 36px; border-radius: 10px; box-shadow: none; flex: none; }
.empty h3 { color: var(--ink); margin-bottom: 4px; }

.toast-wrap { position: fixed; left: 0; right: 0; top: 12px; z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 12px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: drop .2s ease; max-width: 90vw; }
.toast.err { background: var(--brand); }
.toast.ok { background: var(--green); }
@keyframes drop { from { transform: translateY(-12px); opacity: 0; } }
.offline { position: fixed; top: 0; left: 0; right: 0; z-index: 150; background: var(--amber); color: #3D2A00; text-align: center; font-weight: 700; font-size: 13px; padding: 6px; }
.fab { position: fixed; right: 16px; bottom: calc(var(--nav-h) + 16px + env(safe-area-inset-bottom)); z-index: 24; width: 60px; height: 60px; border-radius: 18px; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(224,83,31,.4); }
@media (min-width: 900px) { .fab { bottom: 24px; right: 24px; } }

/* ---------- print (receipts) ---------- */
#print { display: none; }
@media print {
  @page { margin: 0; size: 80mm auto; }
  body * { visibility: hidden; }
  #print, #print * { visibility: visible; }
  #print { display: block; position: absolute; left: 0; top: 0; width: 76mm; padding: 2mm 3mm; font-family: "Courier New", monospace; font-size: 12px; color: #000; }
  #print.a4 { width: 100%; font-family: inherit; padding: 12mm; }
}
.rcpt h2 { text-align: center; font-size: 16px; margin: 0; }
.rcpt .c { text-align: center; }
.rcpt hr { border: 0; border-top: 1px dashed #000; margin: 6px 0; }
.rcpt table { width: 100%; border-collapse: collapse; }
.rcpt td { vertical-align: top; padding: 1px 0; }
.rcpt .r { text-align: right; }
.rcpt .big { font-size: 15px; font-weight: 700; }
a.btn { text-decoration: none; }
.pill .icon { width: 13px; height: 13px; }
.icon.big { width: 36px; height: 36px; stroke-width: 3; }
.pay-disc { flex-wrap: wrap; }

/* ================= payment celebration (feel.js) ================= */
.paid-fx { position: fixed; inset: 0; z-index: 9999; display: grid; place-items: center; color: #fff; overflow: hidden; touch-action: none; }
.paid-flood { position: absolute; inset: 0; background: radial-gradient(circle at var(--x) var(--y), #22B87F 0%, #179A68 70%);
  clip-path: circle(0 at var(--x) var(--y)); animation: paid-flood .5s cubic-bezier(.2,.8,.2,1) forwards; }
.paid-center { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.paid-badge { position: relative; width: 112px; height: 112px; transform: scale(0); animation: paid-pop .55s .18s cubic-bezier(.34,1.56,.64,1) forwards; }
.paid-badge svg { width: 100%; height: 100%; }
.paid-badge circle { fill: #fff; }
.paid-badge path { fill: none; stroke: #179A68; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: paid-draw .38s .5s cubic-bezier(.65,0,.35,1) forwards; }
.paid-badge .ring { position: absolute; inset: 0; border-radius: 50%; border: 3px solid rgba(255,255,255,.7); opacity: 0; animation: paid-ring 1s .45s ease-out forwards; }
.paid-badge .ring.r2 { animation-delay: .62s; }
.paid-bits { position: absolute; left: 50%; top: 56px; width: 0; height: 0; }
.paid-bits i { position: absolute; width: 9px; height: 14px; border-radius: 2px; opacity: 0; transform: translate(-50%,-50%);
  animation: paid-bit .9s calc(.42s + var(--d)) cubic-bezier(.15,.7,.3,1) forwards; }
.paid-amt { font-size: 44px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; opacity: 0; transform: translateY(14px); animation: paid-rise .4s .3s ease-out forwards; }
.paid-sub { font-size: 16px; font-weight: 600; opacity: 0; animation: paid-rise .4s .45s ease-out forwards; color: rgba(255,255,255,.9); }
.paid-fx.out { animation: paid-out .32s ease-in forwards; }
.paid-fx.still .paid-flood { clip-path: none; animation: none; }
.paid-fx.still .paid-badge, .paid-fx.still .paid-amt, .paid-fx.still .paid-sub { transform: none; opacity: 1; animation: none; }
.paid-fx.still .paid-badge path { stroke-dashoffset: 0; animation: none; }
@keyframes paid-flood { to { clip-path: circle(150% at var(--x) var(--y)); } }
@keyframes paid-pop { to { transform: scale(1); } }
@keyframes paid-draw { to { stroke-dashoffset: 0; } }
@keyframes paid-ring { 0% { transform: scale(1); opacity: .8; } 100% { transform: scale(2.1); opacity: 0; } }
@keyframes paid-bit { 0% { opacity: 1; transform: translate(-50%,-50%) rotate(0); } 75% { opacity: 1; } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 60px)) rotate(var(--r)); } }
@keyframes paid-rise { to { opacity: 1; transform: none; } }
@keyframes paid-out { to { opacity: 0; transform: scale(1.04); } }

/* small "pop" when a dish is added to the cart */
.bump { animation: bump .28s cubic-bezier(.34,1.56,.64,1); }
@keyframes bump { 40% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .bump { animation: none; } }

/* navigation feedback: thin bar while a screen's data loads, skeleton on first visit */
.main { position: relative; }
.loadbar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 60; pointer-events: none; opacity: 0; background: linear-gradient(90deg, transparent, var(--brand), transparent); background-size: 40% 100%; background-repeat: no-repeat; transition: opacity .15s; }
.main.loading .loadbar { opacity: 1; animation: loadbar 1s ease-in-out infinite; }
@keyframes loadbar { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.sk-row { display: flex; gap: 8px; margin-bottom: 14px; }
.sk-row i, .sk-card { display: block; border-radius: 14px; background: linear-gradient(90deg, var(--line) 0%, #F4F1EE 50%, var(--line) 100%); background-size: 200% 100%; animation: sk 1.2s ease-in-out infinite; }
.sk-row i { width: 84px; height: 36px; border-radius: 99px; }
.sk-card { height: 76px; margin-bottom: 10px; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .main.loading .loadbar, .sk-row i, .sk-card { animation: none; } .main.loading .loadbar { background-position: 50% 0; } }

/* menu import */
.import-opt { text-align: left; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; }
.import-opt > .icon:first-child { color: var(--brand); width: 26px; height: 26px; }
.scan-wait { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 28px 8px 16px; }
.scan-spin { width: 44px; height: 44px; border-radius: 50%; border: 4px solid var(--brand-soft); border-top-color: var(--brand); animation: spin .9s linear infinite; margin-bottom: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.note-box { display: flex; gap: 8px; align-items: flex-start; background: var(--amber-soft); color: #6B4A00; border-radius: 12px; padding: 10px 12px; }
.note-box .icon { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.mi-list { display: grid; gap: 8px; max-height: min(58vh, 640px); overflow: auto; padding: 2px; }
.mi-row { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; background: #fff; }
.mi-row.off { opacity: .5; }
.mi-row .mi-on { width: 20px; height: 20px; margin-top: 10px; flex: none; accent-color: var(--brand); }
.mi-fields { flex: 1; min-width: 0; display: grid; gap: 6px; }
.mi-fields input, .mi-fields select { min-height: 38px; padding: 6px 10px; font-size: 15px; }
.mi-fields input[data-f="name"] { font-weight: 700; }
.mi-sub { display: grid; grid-template-columns: 1fr 90px 110px; gap: 6px; }
@media (max-width: 420px) { .mi-sub { grid-template-columns: 1fr 80px; } .mi-sub select { grid-column: 1 / -1; } }
@media (prefers-reduced-motion: reduce) { .scan-spin { animation-duration: 3s; } }

/* type-ahead: the dish Enter would add */
.menu-list .mi.top { box-shadow: 0 0 0 2px var(--brand); }

/* search + category chips stay pinned under the title while the list scrolls */
.tools-sticky { position: sticky; top: var(--tb, 64px); z-index: 15; margin: 0 -16px; padding: 4px 16px 2px; background: rgba(245,246,248,.94); backdrop-filter: blur(10px); }
@media (min-width: 900px) { .tools-sticky { margin: 0 -24px; padding: 4px 24px 2px; } }
/* on the order screen the bar must not reach over the order panel next to it */
.order-wrap .tools-sticky { margin-right: 0; padding-right: 0; }

/* show / hide password */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 48px; width: 100%; }
.pw-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; display: grid; place-items: center; color: var(--ink-3); border-radius: 10px; }
.pw-eye:hover, .pw-eye[aria-pressed="true"] { color: var(--ink); }
.pw-eye .icon { width: 20px; height: 20px; }
