/* Baasa POS - Developed by Baasa Cloud (www.baasacloud.com) */
:root{
  --brand-dark:#091a21;--brand:#103558;
  --bg:#e9eef3;--panel:#ffffff;--panel2:#f1f4f8;--line:#dce3ea;
  --text:#091a21;--mute:#5b6b78;--accent:#103558;--accent-ink:#ffffff;
  --good:#0f7a55;--bad:#c0392b;--info:#1d4ed8;
  --r:14px;--r-sm:10px;
  --font:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
}
:root{--panel3:#e0e7ee}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--text);font:15px/1.4 var(--font);overflow:hidden;-webkit-font-smoothing:antialiased}
button{font:inherit;color:inherit;border:0;background:none;cursor:pointer;touch-action:manipulation}
input,select,textarea{font:inherit;color:var(--text)}
i[data-lucide],svg.lucide{width:20px;height:20px;stroke-width:2;flex:none}
#app{height:100dvh;display:flex;flex-direction:column}
[hidden]{display:none!important}
.num{font-variant-numeric:tabular-nums}

/* top bar */
.top{display:flex;align-items:center;gap:6px;padding:10px 14px;background:var(--panel);flex:none}
.brand{display:flex;align-items:center;gap:10px;margin-right:10px}
.logo{width:34px;height:34px;border-radius:10px;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;font-weight:900;font-size:18px}
.brand b{font-size:18px;letter-spacing:-.02em}
.brand small{display:block;color:var(--mute);font-size:11px;line-height:1;margin-top:2px}
.nav{display:flex;gap:6px;flex:1;overflow-x:auto;scrollbar-width:none}
.nav::-webkit-scrollbar{display:none}
.nbtn{display:flex;align-items:center;gap:8px;padding:10px 14px;border-radius:var(--r-sm);color:var(--mute);font-weight:600;white-space:nowrap;min-height:44px}
.nbtn:hover{background:var(--panel2);color:var(--text)}
.nbtn.on{background:var(--panel3);color:var(--text)}
.who{display:flex;align-items:center;gap:10px;color:var(--mute);font-size:13px;white-space:nowrap}
.who b{color:var(--text);font-weight:600}
.clock{font-variant-numeric:tabular-nums;color:var(--mute);font-size:13px;margin-right:4px}

.page{flex:1;min-height:0;overflow:auto;padding:18px}
.foot{flex:none;text-align:center;color:var(--mute);font-size:12px;padding:8px;background:var(--panel)}
.foot a{color:var(--text);text-decoration:none;font-weight:600}

/* buttons */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:46px;padding:0 18px;border-radius:var(--r-sm);background:var(--panel3);font-weight:600;transition:transform .08s,background .15s}
.btn:hover{background:#d3dce6}
.btn:active{transform:scale(.97)}
.btn.primary{background:var(--accent);color:var(--accent-ink)}
.btn.primary:hover{background:#1b4a7b}
.btn.danger{background:#fde8e6;color:#b42318}
.btn.danger:hover{background:#fbd3cf}
.btn.ghost{background:transparent}
.btn.ghost:hover{background:var(--panel2)}
.btn.sm{min-height:38px;padding:0 12px;font-size:14px}
.btn[disabled]{opacity:.4;pointer-events:none}
.icon-btn{width:44px;height:44px;border-radius:var(--r-sm);display:grid;place-items:center;color:var(--mute)}
.icon-btn:hover{background:var(--panel2);color:var(--text)}

/* login */
.login{flex:1;display:grid;place-items:center;padding:20px;overflow:auto}
.login-box{width:100%;max-width:340px;text-align:center}
.login-box .logo{width:56px;height:56px;border-radius:16px;margin:0 auto 14px;font-size:30px}
.login-box h1{margin:0;font-size:26px;letter-spacing:-.02em}
.login-box p{color:var(--mute);margin:4px 0 22px}
.dots{display:flex;justify-content:center;gap:14px;margin-bottom:22px;height:16px}
.dots span{width:14px;height:14px;border-radius:50%;background:var(--panel3);transition:background .12s,transform .12s}
.dots span.on{background:var(--accent);transform:scale(1.15)}
.dots.bad{animation:shake .35s}
@keyframes shake{20%,60%{transform:translateX(-8px)}40%,80%{transform:translateX(8px)}}
.pad{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.pad button{height:68px;border-radius:var(--r);background:var(--panel2);font-size:24px;font-weight:600;display:grid;place-items:center;transition:background .12s,transform .08s}
.pad button:hover{background:var(--panel3)}
.pad button:active{transform:scale(.95);background:var(--panel3)}
.pad button.fn{color:var(--mute);background:transparent}

/* tables screen */
.bar{display:flex;align-items:center;gap:8px;margin-bottom:16px;flex-wrap:wrap}
.tabs{display:flex;gap:6px;flex:1;overflow-x:auto;scrollbar-width:none}
.tab{padding:10px 18px;border-radius:999px;background:var(--panel2);color:var(--mute);font-weight:600;white-space:nowrap;min-height:44px}
.tab.on{background:var(--text);color:var(--bg)}
.tgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.tbl{min-height:118px;padding:14px;border-radius:var(--r);background:var(--panel2);text-align:left;display:flex;flex-direction:column;justify-content:space-between;transition:transform .08s,background .15s}
.tbl:hover{background:var(--panel3)}
.tbl:active{transform:scale(.97)}
.tbl .n{font-size:20px;font-weight:700;letter-spacing:-.01em}
.tbl .s{color:var(--mute);font-size:13px}
.tbl.busy{background:#d5e3f3}
.tbl.busy:hover{background:#c5d8ee}
.tbl.busy .amt{color:var(--accent);font-weight:700;font-size:17px}
.tbl.add{background:transparent;color:var(--mute);align-items:center;justify-content:center;gap:6px;background:repeating-linear-gradient(135deg,var(--panel) 0 8px,var(--panel2) 8px 9px)}
.tbl.add:hover{color:var(--text)}
.empty{color:var(--mute);text-align:center;padding:50px 10px}

/* POS */
.pos{flex:1;min-height:0;display:grid;grid-template-columns:minmax(330px,400px) 1fr}
.ticket{background:var(--panel);display:flex;flex-direction:column;min-height:0}
.t-head{display:flex;align-items:center;gap:8px;padding:12px 12px 12px 8px}
.t-head .ti{flex:1;min-width:0}
.t-head b{font-size:18px;display:block}
.t-head small{color:var(--mute)}
.lines{flex:1;overflow:auto;padding:4px 10px}
.line{display:grid;grid-template-columns:1fr auto;gap:2px 10px;padding:10px;border-radius:var(--r-sm);margin-bottom:4px;background:var(--panel2)}
.line .nm{font-weight:600;text-align:left}
.line .nt{grid-column:1;color:var(--info);font-size:13px;text-align:left}
.line .amt{font-weight:700;text-align:right}
.line .ctl{grid-column:1 / -1;display:flex;align-items:center;gap:8px;margin-top:6px}
.step{display:flex;align-items:center;background:var(--panel3);border-radius:10px}
.step button{width:42px;height:38px;display:grid;place-items:center;border-radius:10px}
.step button:hover{background:#cfd8e3}
.step span{min-width:30px;text-align:center;font-weight:700}
.tagpill{font-size:11px;padding:3px 8px;border-radius:999px;background:var(--panel3);color:var(--mute);font-weight:600;text-transform:uppercase;letter-spacing:.04em}
.tagpill.sent{background:#d9f2e7;color:var(--good)}
.tagpill.ready{background:#dde7fb;color:var(--info)}
.grow{flex:1}
.totals{padding:12px 18px 6px;border-top:1px solid var(--line)}
.totals div{display:flex;justify-content:space-between;color:var(--mute);padding:2px 0}
.totals .grand{color:var(--text);font-size:26px;font-weight:800;letter-spacing:-.02em;padding-top:6px}
.acts{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;padding:10px}
.acts .btn{flex-direction:column;gap:4px;min-height:58px;font-size:12px;padding:6px}
.acts .settle{grid-column:1 / -1;flex-direction:row;font-size:18px;min-height:60px;gap:10px}
.menu{display:flex;flex-direction:column;min-height:0;padding:14px 16px 0}
.m-top{display:flex;gap:10px;align-items:center;margin-bottom:12px}
.cats{display:flex;gap:6px;overflow-x:auto;flex:1;scrollbar-width:none;padding-bottom:2px}
.cats::-webkit-scrollbar{display:none}
.cat{padding:0 18px;min-height:48px;border-radius:var(--r-sm);font-weight:700;white-space:nowrap;color:#fff;opacity:.55;transition:opacity .15s,transform .08s}
.cat.on{opacity:1}
.cat:active{transform:scale(.96)}
.search{position:relative;width:200px;flex:none}
.search i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--mute);width:18px;height:18px}
.search input{width:100%;height:48px;padding:0 12px 0 38px;border-radius:var(--r-sm);border:0;background:var(--panel2);outline:2px solid transparent}
.search input:focus{outline-color:var(--accent)}
.pgrid{flex:1;overflow:auto;display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));grid-auto-rows:104px;gap:10px;align-content:start;padding-bottom:16px}
.prod{border-radius:var(--r);padding:12px;color:#fff;text-align:left;display:flex;flex-direction:column;justify-content:space-between;transition:transform .08s,filter .15s;overflow:hidden}
.prod:hover{filter:brightness(1.12)}
.prod:active{transform:scale(.96)}
.prod .pn{font-weight:700;line-height:1.2;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.prod .pp{font-size:13px;opacity:.9;font-weight:600}

/* modal */
#modal{position:fixed;inset:0;background:rgba(9,26,33,.62);display:grid;place-items:center;padding:16px;z-index:50;animation:fade .15s}
@keyframes fade{from{opacity:0}}
.sheet{background:var(--panel);border-radius:20px;width:100%;max-width:460px;max-height:92dvh;overflow:auto;padding:22px;animation:pop .18s cubic-bezier(.2,.9,.3,1.2)}
.sheet.wide{max-width:640px}
@keyframes pop{from{transform:translateY(14px) scale(.97);opacity:0}}
.sheet h3{margin:0 0 4px;font-size:20px;letter-spacing:-.01em}
.sheet .sub{color:var(--mute);margin:0 0 16px}
.sheet .row-end{display:flex;gap:8px;justify-content:flex-end;margin-top:18px}
.sheet .row-end .btn{flex:1}
.field{margin-bottom:12px}
.field label{display:block;color:var(--mute);font-size:13px;margin-bottom:5px}
.in{width:100%;height:48px;padding:0 14px;border-radius:var(--r-sm);border:0;background:var(--panel2);outline:2px solid transparent}
textarea.in{height:90px;padding:12px 14px;resize:none}
.in:focus{outline-color:var(--accent)}
select.in{appearance:none;background-image:none}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.chip{min-height:44px;padding:0 16px;border-radius:var(--r-sm);background:var(--panel2);font-weight:600}
.chip:hover{background:var(--panel3)}
.chip.on{background:var(--accent);color:var(--accent-ink)}
.swatches{display:flex;flex-wrap:wrap;gap:8px}
.sw{width:38px;height:38px;border-radius:10px;display:grid;place-items:center;color:#fff}
.sw i{width:18px;height:18px;opacity:0}
.sw.on i{opacity:1}
.methods{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:12px 0}
.methods .btn{flex-direction:column;min-height:70px;gap:6px}
.sumrow{display:flex;justify-content:space-between;padding:8px 0;color:var(--mute)}
.sumrow b{color:var(--text)}
.sumrow.big{font-size:24px;color:var(--text);font-weight:800;padding:4px 0 12px}
.paylist{background:var(--panel2);border-radius:var(--r-sm);padding:4px 12px;margin:8px 0}
.paylist div{display:flex;justify-content:space-between;align-items:center;padding:8px 0}
.paylist div+div{border-top:1px solid var(--line)}
.ok{color:var(--good)}.warn{color:var(--accent)}

/* receipt */
.receipt{background:#fff;color:#111;border-radius:12px;padding:20px;font:13px/1.45 ui-monospace,Menlo,Consolas,monospace;max-width:340px;margin:0 auto}
.receipt h4{text-align:center;margin:0 0 2px;font-size:16px}
.receipt .c{text-align:center;color:#555}
.receipt hr{border:0;border-top:1px dashed #999;margin:10px 0}
.receipt .r{display:flex;justify-content:space-between;gap:10px}
.receipt .r.b{font-weight:800;font-size:15px}
.receipt .nt{color:#555;padding-left:10px}

/* kitchen */
.kgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(270px,1fr));gap:14px}
.kc{background:var(--panel2);border-radius:var(--r);padding:16px;display:flex;flex-direction:column;gap:10px}
.kc h4{margin:0;font-size:18px;display:flex;justify-content:space-between;align-items:baseline}
.kc .age{font-size:13px;color:var(--mute);font-weight:500}
.kc .age.late{color:var(--bad);font-weight:700}
.kl{display:flex;gap:10px;align-items:flex-start;padding:8px 10px;background:var(--panel3);border-radius:10px;text-align:left;width:100%}
.kl:hover{background:#d3dce6}
.kl b{color:var(--accent);min-width:26px}
.kl .nt{color:var(--info);font-size:13px;display:block}

/* reports and admin */
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:12px;margin-bottom:18px}
.stat{background:var(--panel2);border-radius:var(--r);padding:16px}
.stat small{color:var(--mute);display:block;margin-bottom:6px}
.stat b{font-size:26px;letter-spacing:-.02em}
.two{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:14px}
.box{background:var(--panel2);border-radius:var(--r);padding:16px;margin-bottom:14px}
.box h5{margin:0 0 10px;font-size:13px;text-transform:uppercase;letter-spacing:.07em;color:var(--mute);font-weight:600}
.tbl2{width:100%;border-collapse:collapse}
.tbl2 td,.tbl2 th{padding:10px 8px;text-align:left}
.tbl2 th{color:var(--mute);font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:.06em}
.tbl2 tr+tr td{border-top:1px solid var(--line)}
.tbl2 td.r,.tbl2 th.r{text-align:right}
.bar-row{display:flex;align-items:center;gap:10px;padding:6px 0}
.bar-row .lb{width:38%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bar-row .tr{flex:1;height:10px;background:var(--panel3);border-radius:6px;overflow:hidden}
.bar-row .tr i{display:block;height:100%;background:var(--accent);border-radius:6px}
.bar-row .vl{min-width:84px;text-align:right;font-weight:600}
.dot{display:inline-block;width:12px;height:12px;border-radius:4px;vertical-align:-1px;margin-right:8px}
.flag{padding:2px 8px;border-radius:999px;background:var(--panel3);font-size:12px;color:var(--mute)}
.flag.off{background:#fde8e6;color:#b42318}
.daterow{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.daterow .in{width:auto;height:44px}

#toast{position:fixed;left:50%;bottom:26px;transform:translateX(-50%);background:var(--text);color:var(--bg);padding:12px 18px;border-radius:12px;font-weight:600;z-index:80;max-width:90vw;animation:pop .2s}
#toast.bad{background:var(--bad);color:#2b0a0a}

@media (max-width:820px){
  .pos{grid-template-columns:1fr;grid-template-rows:minmax(0,46%) minmax(0,1fr)}
  .ticket{order:2}.menu{order:1;padding-top:10px}
  .pos{grid-template-rows:minmax(0,52%) minmax(0,1fr)}
  .search{width:140px}
  .who span{display:none}
  .brand small{display:none}
  .acts{grid-template-columns:repeat(4,1fr)}
}
@media print{
  body{overflow:visible;background:#fff}
  #app,#toast{display:none!important}
  #modal{position:static;background:none;padding:0;display:block}
  .sheet{background:none;padding:0;max-width:none;animation:none}
  .sheet>*:not(.receipt){display:none!important}
  .receipt{border-radius:0;max-width:none;padding:0}
}

/* ---- Baasa brand layer ---- */
.logo{background:none!important;border-radius:0!important;width:auto;height:auto;display:block;font-size:0}
.logo img{display:block;width:38px;height:38px}
.login-box .logo img{width:84px;height:84px;margin:0 auto}
.top{background:linear-gradient(90deg,var(--brand-dark),var(--brand));color:#fff}
.top .brand b{color:#fff}
.top .brand small{color:rgba(255,255,255,.62)}
.top .nbtn{color:rgba(255,255,255,.72)}
.top .nbtn:hover{background:rgba(255,255,255,.1);color:#fff}
.top .nbtn.on{background:rgba(255,255,255,.18);color:#fff}
.top .clock,.top .who{color:rgba(255,255,255,.7)}
.top .who b{color:#fff}
.top .icon-btn{color:rgba(255,255,255,.8)}
.top .icon-btn:hover{background:rgba(255,255,255,.12);color:#fff}
.login{background:linear-gradient(135deg,var(--brand-dark),var(--brand))}
.login-box{color:#fff}
.login-box p{color:rgba(255,255,255,.7)}
.dots span{background:rgba(255,255,255,.2)}
.dots span.on{background:#fff}
.pad button{background:rgba(255,255,255,.1);color:#fff}
.pad button:hover,.pad button:active{background:rgba(255,255,255,.2)}
.pad button.fn{background:transparent;color:rgba(255,255,255,.7)}
.foot{background:var(--panel);border-top:1px solid var(--line)}
body:has(.login) .foot{background:var(--brand-dark);border:0;color:rgba(255,255,255,.6)}
body:has(.login) .foot a{color:#fff}
.tbl{box-shadow:0 1px 0 rgba(9,26,33,.06)}
.line,.kc,.stat,.box{box-shadow:0 1px 0 rgba(9,26,33,.05)}
.line{background:var(--panel2)}
.ticket{border-right:1px solid var(--line)}
.sheet{box-shadow:0 20px 60px rgba(9,26,33,.35)}
.receipt{border:1px solid var(--line)}
.btn.primary.settle{background:var(--brand)}
.logo img{border-radius:50%;box-shadow:0 0 0 2px #fff}
.login-box .logo img{box-shadow:0 0 0 4px #fff,0 10px 30px rgba(0,0,0,.35)}
.login-box .logo{margin-bottom:18px}
.search svg,.search i{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:var(--mute);width:18px;height:18px;pointer-events:none}
.cat{opacity:.82}
.cat.on{opacity:1;box-shadow:0 0 0 3px var(--bg),0 0 0 5px var(--brand-dark)}
.methods .btn{white-space:nowrap;font-size:14px;padding:0 6px}
.cats{padding:6px;margin:-6px}
.ticket,.menu{min-width:0}
@media (max-width:820px){.pos{grid-template-columns:minmax(0,1fr)}}

.login-box{max-width:360px}
.login-logo{display:block;width:min(300px,86%);height:auto;margin:0 auto 22px}

.top .brand{margin-right:14px}
.top-logo{display:block;height:44px;width:auto}
.top .biz{color:rgba(255,255,255,.7);font-size:13px;font-weight:600;margin-right:10px;white-space:nowrap;max-width:200px;overflow:hidden;text-overflow:ellipsis}
@media (max-width:820px){.top .biz{display:none}.top-logo{height:36px}}
.foot .ver{margin-left:10px;padding-left:10px;border-left:1px solid currentColor;opacity:.75}

/* Setup screen: centred column */
.wrap{max-width:980px;margin:0 auto;width:100%}
.bar.center{justify-content:center}
.bar.center .tabs{flex:none;justify-content:center;flex-wrap:wrap}
.box.narrow{max-width:520px;margin-left:auto;margin-right:auto}
.box a{color:var(--brand);font-weight:700;text-decoration:none}
.box a:hover{text-decoration:underline}

/* Tables screen: centred tiles */
.tgrid{display:flex;flex-wrap:wrap;justify-content:center;gap:12px;max-width:1200px;margin:0 auto}
.tgrid .tbl{width:170px;flex:none}
.tgrid .empty{width:100%}
@media (max-width:480px){.tgrid .tbl{width:calc(50% - 6px)}}

/* Tables screen: tiles left-aligned inside a centred block */
.tgrid{display:grid!important;grid-template-columns:repeat(auto-fill,170px);justify-content:center;gap:12px;max-width:none;margin:0 auto}
.tgrid .tbl{width:auto}
@media (max-width:480px){.tgrid{grid-template-columns:repeat(2,minmax(0,1fr))}}
.bdg{display:inline-block;margin-top:4px;margin-right:4px;padding:3px 8px;border-radius:999px;font-size:11px;font-weight:700;letter-spacing:.02em}
.bdg.ready{background:#d9f2e7;color:var(--good)}
.bdg.pay{background:var(--brand);color:#fff}
.acts.three{grid-template-columns:repeat(3,1fr)}
#notes{position:fixed;top:74px;right:14px;width:min(360px,calc(100vw - 28px));z-index:70;display:flex;flex-direction:column;gap:10px}
.note{background:var(--panel);border-radius:var(--r);padding:12px 14px;display:grid;grid-template-columns:auto 1fr;gap:4px 12px;align-items:start;box-shadow:0 12px 36px rgba(9,26,33,.28);animation:pop .2s}
.note>i,.note>svg{color:var(--brand);margin-top:2px}
.note .nb b{display:block;font-weight:700;line-height:1.3}
.note .nb small{color:var(--mute)}
.note .na{grid-column:1 / -1;display:flex;gap:8px;margin-top:6px}
.note .na .btn{flex:1}

/* POS menu: categories in a left sidebar */
.menu{display:grid!important;grid-template-columns:168px minmax(0,1fr);gap:14px;padding:14px 16px 0}
.m-side{min-height:0;display:flex;flex-direction:column}
.m-side .cats{display:flex;flex-direction:column;gap:8px;overflow-y:auto;overflow-x:hidden;padding:6px;margin:-6px;flex:1;min-height:0;padding-bottom:16px}
.m-side .cat{width:100%;justify-content:flex-start;text-align:left;padding:0 16px;min-height:56px;display:flex;align-items:center;font-size:15px;white-space:normal;line-height:1.2}
.m-main{display:flex;flex-direction:column;min-height:0;min-width:0}
.m-main .m-top{margin-bottom:12px}
.m-main .search{width:100%;max-width:none}
.pgrid{grid-template-columns:repeat(auto-fill,minmax(140px,1fr))}
@media (max-width:820px){.menu{grid-template-columns:104px minmax(0,1fr);gap:10px;padding:10px 10px 0}.m-side .cat{padding:0 10px;font-size:14px;min-height:50px}}

/* Tables: four per row, block centred, tiles left-aligned inside it */
.tgrid{grid-template-columns:repeat(4,minmax(0,240px))!important;justify-content:center}
.tgrid .tbl{min-height:128px}
@media (max-width:760px){.tgrid{grid-template-columns:repeat(2,minmax(0,1fr))!important}}

/* Sales page */
.wrap.wide{max-width:1240px}
.s-wrap{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:16px;align-items:start}
.s-list{padding:8px 12px;margin-bottom:0}
.srow{cursor:pointer}
.srow:hover td{background:var(--panel3)}
.srow.sel td{background:#d5e3f3}
.srow td:first-child{border-radius:8px 0 0 8px}.srow td:last-child{border-radius:0 8px 8px 0}
.srow small{color:var(--mute)}
.s-side{position:sticky;top:0}
.s-receipt .receipt{max-width:none}
.s-actions{margin-top:12px;display:flex}.s-actions .btn{flex:1}
.s-empty{background:var(--panel2);border-radius:var(--r);display:flex;flex-direction:column;align-items:center;gap:10px}
@media (max-width:980px){.s-wrap{grid-template-columns:minmax(0,1fr)}.s-side{position:static}}
@media print{
  body.print-sales #app{display:block!important;height:auto}
  body.print-sales .top,body.print-sales .foot,body.print-sales .s-head,body.print-sales .cards,body.print-sales .s-list,body.print-sales .s-actions{display:none!important}
  body.print-sales .page{overflow:visible;padding:0;background:#fff}
  body.print-sales .s-wrap{display:block}
  body.print-sales .s-side{position:static}
  body.print-sales .receipt{border:0;max-width:none}
}

/* Thermal receipt printing: the receipt is copied into #print-root and printed on a roll-sized page */
#print-root{position:absolute;left:-9999px;top:0;width:var(--paper-w,72mm);background:#fff}
#print-root .receipt{width:100%;max-width:none;margin:0;padding:3mm 1mm 3mm;border:0;border-radius:0;background:#fff;color:#000;font:12px/1.35 ui-monospace,Menlo,Consolas,"Courier New",monospace}
#print-root.narrow .receipt{font-size:11px}
#print-root .receipt h4{font-size:15px;margin:0 0 3px;color:#000}
#print-root .receipt .c,#print-root .receipt .nt{color:#000}
#print-root .receipt hr{border-top:1px dashed #000;margin:6px 0}
#print-root .receipt .r{gap:6px;align-items:flex-start}
#print-root .receipt .r span:first-child{flex:1;min-width:0;overflow-wrap:anywhere}
#print-root .receipt .r span:last-child{white-space:nowrap}
#print-root .receipt .r.b{font-size:14px}
@media print{
  html,body{height:auto!important;overflow:visible!important;background:#fff!important}
  body.print-rc>*:not(#print-root){display:none!important}
  body.print-rc #print-root{position:static;left:auto;display:block}
}
.export-bar{margin:-6px 0 14px;gap:10px}

/* Waiter accounts (cashier) and My cash (waiter) */
.av{display:inline-grid;place-items:center;width:34px;height:34px;border-radius:50%;background:var(--brand);color:#fff;font-weight:700;margin-right:10px;vertical-align:middle}
.av.lg{width:42px;height:42px;font-size:18px;margin:0 4px 0 6px}
.due{color:var(--brand)}
.chev{color:var(--mute);width:40px}
.sec-h{font-size:12px;text-transform:uppercase;letter-spacing:.08em;color:var(--mute);font-weight:700;margin:20px 2px 10px}
.rcard{background:var(--panel2);border-radius:var(--r);padding:14px 16px;margin-bottom:10px;display:flex;gap:16px;align-items:center;box-shadow:0 1px 0 rgba(9,26,33,.05)}
.rc-main{flex:1;min-width:0}
.rc-t{display:flex;gap:10px;align-items:baseline;flex-wrap:wrap}
.rc-t b{font-size:17px}.rc-t .s{color:var(--mute);font-size:13px}
.rc-i{color:var(--mute);font-size:13.5px;margin-top:4px;overflow-wrap:anywhere}
.rc-side{text-align:right;display:flex;flex-direction:column;gap:8px;align-items:flex-end}
.rc-side>b{font-size:19px}
.rc-b{display:flex;gap:8px}
.bdg.cash{background:#d9f2e7;color:var(--good)}
.btn.good{background:#d9f2e7;color:var(--good)}
.btn.good:hover{background:#c8ecdb}
.stat b.due{color:var(--brand)}
@media (max-width:620px){.rcard{flex-direction:column;align-items:stretch}.rc-side{flex-direction:row;justify-content:space-between;align-items:center}}

/* Menu: search on top, categories sidebar level with the items */
.menu{display:flex!important;flex-direction:column;gap:12px;padding:14px 16px 0}
.menu .m-top{margin:0}
.menu .m-top .search{width:100%;max-width:none}
.m-body{flex:1;min-height:0;display:grid;grid-template-columns:168px minmax(0,1fr);gap:14px}
.m-body .m-side{min-height:0}
.m-body .pgrid{min-height:0;align-content:start}
.cat.pop{background:var(--brand);display:flex;align-items:center;gap:8px}
.cat.pop i,.cat.pop svg{width:18px;height:18px}
@media (max-width:820px){.m-body{grid-template-columns:104px minmax(0,1fr);gap:10px}.menu{padding:10px 10px 0}}
/* prominent back button and logo as home */
.back-btn{background:var(--brand);color:#fff;min-height:44px;padding:0 16px;gap:8px;flex:none}
.back-btn:hover{background:#1b4a7b}
.t-head{gap:10px;padding:12px}
button.brand{background:none;border:0;padding:0;cursor:pointer;border-radius:10px;color:inherit}
button.brand:hover{background:rgba(255,255,255,.08)}
.pack-row{padding:6px 14px 0}

.cat.all{background:#335070;display:flex;align-items:center;gap:8px}
.cat.all i,.cat.all svg{width:18px;height:18px}
.btn.cashbtn{border:2px solid var(--brand);background:#fff;color:var(--brand)}
.btn.cashbtn.marked{background:#0f7a55;border-color:#0f7a55;color:#fff}
.btn.cashbtn.marked:hover{background:#0c6747}

.tbl.locked{background:#e3e9f0;color:var(--mute);cursor:not-allowed;box-shadow:none}
.tbl.locked .n{color:var(--mute)}
.acts .btn{padding:6px 4px}

/* occupied tables use the brand colour */
.tbl.busy{background:var(--brand)!important;color:#fff}
.tbl.busy:hover{background:#1b4a7b!important}
.tbl.busy .n{color:#fff}
.tbl.busy .s{color:rgba(255,255,255,.74)}
.tbl.busy .amt{color:#fff}
.tbl.busy .bdg.pay{background:#fff;color:var(--brand)}
.tbl.busy .bdg.ready,.tbl.busy .bdg.cash{background:#d9f2e7;color:#0f7a55}
.pick{display:flex;flex-direction:column;gap:8px}
.pick .btn{justify-content:space-between;width:100%;padding:0 16px;min-height:52px}
.pick .btn span{color:var(--mute);font-weight:500}

/* takeaway toggle, line toggle, chips */
.seg{display:flex;background:var(--panel2);border-radius:var(--r-sm);padding:3px;flex:none}
.seg button{min-height:42px;padding:0 14px;border-radius:8px;font-weight:600;display:flex;align-items:center;gap:6px;color:var(--text)}
.seg button.on{background:var(--brand);color:#fff}
.seg button[disabled]{opacity:.45;pointer-events:none}
.m-top{display:flex;gap:10px;align-items:center}
.m-top .search{flex:1}
.tkb{display:inline-flex;align-items:center;gap:6px;min-height:38px;padding:0 12px;border-radius:10px;background:var(--panel3);font-weight:600;font-size:13px}
.tkb i,.tkb svg{width:16px;height:16px}
.tkb.on{background:var(--brand);color:#fff}
.tkchip{display:inline-block;background:var(--brand);color:#fff;border-radius:999px;font-size:11px;font-weight:700;padding:1px 8px;margin-left:4px;vertical-align:1px}
.demo-pill{background:rgba(255,255,255,.16);color:#fff;border-radius:999px;padding:5px 12px;font-size:12px;font-weight:700;margin-right:10px;text-decoration:none}
.in[disabled]{opacity:.6;cursor:not-allowed}

/* staff search */
.lsearch{width:260px;max-width:100%;margin-left:auto}
.plist{max-height:210px;overflow:auto;display:flex;flex-direction:column;gap:6px;margin-top:8px}
.pitem{display:flex;justify-content:space-between;align-items:center;gap:10px;min-height:44px;padding:0 14px;border-radius:10px;background:var(--panel2);font-weight:600;text-align:left}
.pitem small{font-weight:500;opacity:.75}
.pitem:hover{background:var(--panel3)}
.pitem.on{background:var(--brand);color:#fff}
.pitem[hidden]{display:none}
@media (max-width:620px){.lsearch{width:100%}}

/* login keypad: small utility keys */
.pad button.fn{font-size:14px;font-weight:600;letter-spacing:.02em}
.pad button.fn i,.pad button.fn svg{width:20px;height:20px}
/* ready-by time */
.eta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding:8px 10px;border-radius:10px;background:var(--panel3);font-size:13px}
.eta .et{display:flex;align-items:center;gap:5px;font-weight:700}
.eta .et i,.eta .et svg{width:15px;height:15px}
.eta.soon{background:#f6e4b8;color:#4a3300}
.eta.late{background:#f3c9c4;color:#5b130d}
.chipm{min-height:32px;min-width:38px;padding:0 10px;border-radius:9px;background:var(--panel2);font-weight:700;font-size:13px}
.chipm:hover{background:var(--brand);color:#fff}
.eta-wrap{padding:0 10px;display:flex;flex-direction:column;gap:6px;margin-bottom:6px}
.eta-b{display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:10px;background:var(--panel3);font-size:13px;font-weight:600}
.eta-b b{margin-left:auto}
.eta-b i,.eta-b svg{width:16px;height:16px}
.eta-b.soon{background:#f6e4b8;color:#4a3300}
.eta-b.late{background:#f3c9c4;color:#5b130d}
.bdg.eta{background:#fff;color:var(--brand)}
.tbl.busy .bdg.eta.soon{background:#f6e4b8;color:#4a3300}
.tbl.busy .bdg.eta.late{background:#f3c9c4;color:#5b130d}
/* refunds, sync */
.rf{color:#b42318;font-weight:600}
.syncpill{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:5px 11px;font-size:12px;font-weight:700;margin-right:8px;background:rgba(255,255,255,.16);color:#fff;white-space:nowrap}
.syncpill.warn{background:#f6e4b8;color:#4a3300}
.syncpill.off{background:#f3c9c4;color:#5b130d}
.refund-lines{display:flex;flex-direction:column;gap:6px;margin:10px 0;max-height:240px;overflow:auto}
.refund-lines .rl{display:flex;align-items:center;gap:10px;background:var(--panel2);border-radius:10px;padding:6px 8px 6px 12px}
.refund-lines .rl b{flex:1}
.reason-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:8px}

/* categories: a plain menu list, clearly different from the coloured product tiles */
.m-side .cats{gap:2px;padding:2px;margin:0;border-radius:var(--r);background:var(--panel)}
.cat2{display:flex;align-items:center;gap:8px;width:100%;min-height:44px;padding:0 12px;border-radius:10px;background:transparent;color:var(--text);font-weight:600;font-size:14px;text-align:left;transition:background .12s}
.cat2 span{flex:1;min-width:0;line-height:1.2}
.cat2 em{font-style:normal;font-weight:600;font-size:12px;opacity:.65}
.cat2 i,.cat2 svg{width:17px;height:17px;flex:none}
.cat2:hover{background:var(--panel2)}
.cat2.on{background:var(--brand);color:#fff}
.cat2.on em{opacity:.85}
.fuzzy-note{grid-column:1/-1;font-size:13px;font-weight:600;padding:2px 2px 4px}
@media (max-width:820px){.m-side .cats{flex-direction:row;overflow-x:auto;background:transparent;padding:0}.cat2{width:auto;flex:none;background:var(--panel);min-height:40px}.cat2 em{display:none}}

/* ================= phones and small tablets ================= */
.obar{display:none}
.only-m{display:none}
@media (max-width:820px){
  .only-m{display:inline-grid}
  .top{padding:6px 10px;gap:6px}
  .top-logo{height:30px}
  .top .biz,.top .clock,.top .who span{display:none}
  .nav{position:fixed;left:0;right:0;bottom:0;z-index:35;display:flex;gap:0;padding:4px 4px calc(4px + env(safe-area-inset-bottom));background:linear-gradient(90deg,#091a21,#103558);overflow-x:auto;justify-content:space-around;box-shadow:0 -10px 24px -16px rgba(9,26,33,.6)}
  .nbtn{flex:1 0 auto;flex-direction:column;gap:2px;padding:6px 8px;min-height:50px;min-width:58px;font-size:11px;justify-content:center;align-items:center}
  .nbtn span{line-height:1.1}
  body.in-pos .nav{display:none}
  .page{padding:12px 12px calc(78px + env(safe-area-inset-bottom))}
  .foot{display:none}
  #notes{top:56px;right:8px;left:8px;width:auto}
  .box{overflow-x:auto}
  .tbl2{min-width:480px}
  .in,.search input,select.in,textarea.in{font-size:16px}
  /* order screen: menu first, the order opens as a sheet */
  .pos{display:block;position:relative;flex:1;min-height:0;overflow:hidden}
  .menu{height:100%;padding:8px 8px calc(70px + env(safe-area-inset-bottom))!important}
  .menu .m-top{flex-wrap:wrap;gap:8px}
  .menu .m-top .search{flex:1 1 160px}
  .seg button{padding:0 11px}
  .ticket{position:fixed;inset:0;z-index:45;transform:translateY(105%);transition:transform .25s ease;border-right:0}
  .pos.sheet .ticket{transform:none}
  .obar{position:fixed;left:0;right:0;bottom:0;z-index:40;display:flex;padding:8px 10px calc(8px + env(safe-area-inset-bottom));background:var(--panel);box-shadow:0 -10px 24px -16px rgba(9,26,33,.5)}
  .obar .btn{flex:1;justify-content:space-between;min-height:50px;font-size:15px}
  .t-head{padding:10px 8px}
  .lines{padding:4px 8px}
  .acts{padding:8px 8px calc(8px + env(safe-area-inset-bottom))}
  .pgrid{grid-template-columns:repeat(2,minmax(0,1fr));grid-auto-rows:88px;gap:8px}
  .kgrid,.two{grid-template-columns:1fr}
  .bar{flex-wrap:wrap}
  .lsearch{margin-left:0}
}
@media (max-width:620px){
  #modal{align-items:end;padding:0}
  .sheet{max-width:none;border-radius:20px 20px 0 0;max-height:92dvh;padding-bottom:calc(20px + env(safe-area-inset-bottom));animation:slideup .22s ease}
  @keyframes slideup{from{transform:translateY(40px);opacity:.6}}
  .cards{grid-template-columns:1fr 1fr}
  .stat b{font-size:20px}
  .tab{padding:8px 14px}
  .tgrid{gap:8px}
}
@media (max-width:360px){.pgrid{grid-template-columns:1fr 1fr;grid-auto-rows:84px}}

/* categories sit on a light tint of the brand blue */
.m-side .cats{background:#dce7f3}
.cat2{color:#0a2238}
.cat2:hover{background:#c9d9ea}
.cat2.on{background:var(--brand);color:#fff}
@media (max-width:820px){.m-side .cats{background:transparent}.cat2{background:#dce7f3}.cat2:hover{background:#c9d9ea}.cat2.on{background:var(--brand)}}
.note.more{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 14px}
.note.more b{font-weight:700}
/* phones: categories become a swipeable row above the items */
@media (max-width:820px){
  .m-body{display:flex!important;flex-direction:column;gap:8px}
  .m-side{width:100%;flex:none}
  .m-side .cats{flex-direction:row!important;flex:none;overflow-x:auto;overflow-y:hidden;padding:0 0 2px!important;gap:6px;scrollbar-width:none;background:transparent!important}
  .m-side .cats::-webkit-scrollbar{display:none}
  .cat2{flex:none;width:auto;white-space:nowrap;padding:0 14px;border-radius:999px}
  .cat2 span{flex:none}
  .m-body .pgrid{flex:1;min-height:0}
}

/* stock */
.prod{position:relative}
.prod .stk{position:absolute;top:6px;right:6px;background:rgba(9,26,33,.78);color:#fff;font-size:11px;font-weight:700;padding:2px 7px;border-radius:999px}
.prod .stk.out{background:var(--danger,#b3261e)}
.prod.soldout{opacity:.45;filter:grayscale(.6);cursor:not-allowed}
.nbtn{position:relative}
.nbd{font-style:normal;background:#d93025;color:#fff;font-size:11px;font-weight:700;min-width:18px;height:18px;line-height:18px;padding:0 5px;border-radius:999px;text-align:center;margin-left:4px}
.nbtn .nbd{position:absolute;top:2px;right:2px;margin:0}
.nbd.inl{position:static;display:inline-block;margin-left:6px}
.tscroll{overflow:auto}
.plist{display:grid;gap:4px;max-height:50vh;overflow:auto}
.plist .pitem{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;border-radius:12px;background:var(--panel2);text-align:left}
.plist .pitem small{color:var(--mute)}
.chip.on{background:var(--text);color:var(--bg)}
.plist .pitem.last{background:var(--text);color:var(--bg)}
.plist .pitem.last small{color:inherit;opacity:.8}

.code{display:block;background:var(--panel2);border-radius:10px;padding:9px 11px;font:13px/1.5 ui-monospace,Menlo,Consolas,monospace;white-space:pre-wrap}

.tsel{display:flex;align-items:center;gap:6px;text-align:left;border-radius:12px;padding:4px 8px;flex-wrap:wrap}
.tsel:hover{background:var(--panel2)}
.tsel small{flex-basis:100%}
.mvwrap{max-height:60vh;overflow:auto}
.mvsec{font-weight:700;margin:10px 0 6px;color:var(--mute);font-size:13px}
.mvgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:6px}
.mv{display:flex;flex-direction:column;gap:2px;text-align:left;padding:10px 12px;border-radius:12px;background:var(--panel2)}
.mv small{color:var(--mute);font-size:12px}
.mv.busy{background:#dce7f3}
.mv.here{background:var(--text);color:var(--bg)}
.mv.here small{color:inherit;opacity:.8}
.mv[disabled]{opacity:.55;cursor:default}

.ctr{display:flex;align-items:center;gap:6px;min-height:40px;padding:0 12px;border-radius:12px;background:var(--text);color:var(--bg);font-weight:600;white-space:nowrap}
.ctr.none{background:#dce7f3;color:var(--text)}

/* links styled as buttons look like buttons */
a.btn{color:inherit;text-decoration:none}
a.btn.primary{color:var(--accent-ink)}
.s-actions .btn{white-space:nowrap;padding:0 12px}

.note-box{background:#e8eef5;border-radius:12px;padding:10px 14px;margin:0 0 12px;font-size:13px}

/* stock row buttons line up in one even set */
.stk-act{display:grid;grid-template-columns:repeat(3,112px) 38px;gap:6px;justify-content:end;align-items:center}
.stk-act .btn{width:100%;min-height:38px;padding:0 8px;white-space:nowrap;gap:6px}
.stk-act .icon-btn{width:38px;height:38px}
@media (max-width:900px){.stk-act{grid-template-columns:repeat(2,minmax(0,1fr));justify-content:stretch}.stk-act .icon-btn{width:100%}}

/* actions dropdown */
.stk-btn{min-width:112px;gap:6px}
.dd{position:fixed;z-index:90;min-width:190px;background:#ffffff;border-radius:14px;padding:6px;box-shadow:0 22px 44px -14px rgba(9,26,33,.4);animation:fade .12s ease}
.dd button{display:flex;align-items:center;gap:10px;width:100%;min-height:42px;padding:0 12px;border-radius:9px;font-weight:600;text-align:left;color:var(--text)}
.dd button:hover{background:var(--panel2)}
.dd button i,.dd button svg{width:18px;height:18px;color:var(--mute)}

/* column headings stay in view while a long list scrolls */
.tbl2 thead th{position:sticky;top:-18px;z-index:3;padding-top:22px;background:var(--panel2);box-shadow:0 1px 0 var(--line)}
@media (max-width:900px){.box{overflow-x:visible}}
@media (max-width:900px){.tbl2 thead th{top:-12px;padding-top:20px}}

.mode-box{display:flex;align-items:center;justify-content:space-between;gap:16px}
.mode-box p{margin:4px 0 0;color:var(--mute);font-size:13px;max-width:70ch}
.count-sheet{max-height:52vh;overflow:auto;margin:8px 0}
.count-sheet .cnt{width:96px;min-height:38px;text-align:right}

/* reports: clickable tiles and a statement */
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin:0 0 14px}
.kpi{position:relative;display:flex;flex-direction:column;gap:3px;text-align:left;background:var(--panel2);border-radius:var(--r);padding:14px 16px;min-height:92px;transition:transform .15s,background .15s}
button.kpi:hover{transform:translateY(-2px);background:#dce7f3}
.kpi small{font-size:12.5px;color:var(--mute);font-weight:600}
.kpi b{font-size:24px;font-weight:800;letter-spacing:-.02em;line-height:1.15}
.kpi em{font-style:normal;font-size:12px;color:var(--mute)}
.kpi .kgo{position:absolute;top:12px;right:12px;opacity:.45}
.kpi .kgo i,.kpi .kgo svg{width:16px;height:16px}
button.kpi:hover .kgo{opacity:1}
.kpi.bad b{color:#b42318}.kpi.good b{color:#0f7a4a}
.rtabs{flex:none;justify-content:center;flex-wrap:wrap;margin-bottom:12px}
.stmt{width:100%;border-collapse:collapse}
.stmt td{padding:8px 4px}
.stmt td.sub{padding-left:18px;color:var(--mute)}
.stmt tr.sum td{font-weight:700;border-top:1px solid var(--line)}
.stmt tr.grand td{font-weight:800;font-size:17px;border-top:2px solid var(--text);padding-top:12px}
.stmt tr.grand.good td:last-child{color:#0f7a4a}.stmt tr.grand.bad td:last-child{color:#b42318}

/* a menu down the left for Reports and Setup */
.side-layout{display:grid;grid-template-columns:230px minmax(0,1fr);gap:18px;align-items:start}
.smain{min-width:0}
.snav{position:sticky;top:0;display:flex;flex-direction:column;gap:3px;background:var(--panel2);border-radius:var(--r);padding:8px}
.snav button{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:0 12px;border-radius:12px;font-weight:600;text-align:left;color:var(--text);transition:background .15s}
.snav button:hover{background:#dce7f3}
.snav button.on{background:var(--text);color:var(--bg)}
.snav button i,.snav button svg{width:18px;height:18px}
.snav button span{flex:1}
.snav .nbd.inl{margin-left:0}
@media (max-width:900px){
  .side-layout{grid-template-columns:1fr;gap:10px}
  .snav{position:static;flex-direction:row;overflow-x:auto;scrollbar-width:none;padding:6px}
  .snav button{width:auto;white-space:nowrap;flex:none}
}

/* stock list: sortable headings that stay in view while the list scrolls */
.sort{display:inline-flex;align-items:center;gap:5px;font:inherit;color:inherit;text-transform:inherit;letter-spacing:inherit;padding:2px 0}
.sort i,.sort svg{width:13px;height:13px;opacity:.4}
.sort.on i,.sort.on svg{opacity:1}
.sort:hover{color:var(--text)}
.tbl2 th.r .sort{justify-content:flex-end}
@media (min-width:901px){.stock-box .tscroll{overflow:visible}}

/* the stock list gets the full width, with smaller type and tighter cells */
.wrap.full{max-width:none}
.side-layout:has(.stock-box){grid-template-columns:200px minmax(0,1fr);gap:14px}
.stock-box{padding:10px 12px}
.stock-box .tbl2{font-size:13px}
.stock-box .tbl2 th{font-size:11px;letter-spacing:.04em;white-space:nowrap}
.stock-box .tbl2 td,.stock-box .tbl2 th{padding:6px 8px}
.stock-box .tbl2 td small{font-size:11px}
.stock-box .tbl2 td:first-child{min-width:190px}
.stock-box .flag{font-size:10.5px;padding:1px 6px}
.stock-box .stk-btn{min-height:32px;min-width:96px;padding:0 10px;font-size:12.5px}

/* purchase window */
.pur-top{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.pu-search{width:100%}
.pu-results{display:grid;gap:4px;max-height:180px;overflow:auto;margin-bottom:8px}
.pu-results .pitem{display:flex;justify-content:space-between;align-items:center;padding:10px 12px;border-radius:12px;background:var(--panel2);text-align:left}
.pu-results .pitem small{color:var(--mute)}
.pu-lines{max-height:260px;overflow:auto;margin-bottom:8px}
.pu-lines .in{width:96px;min-height:36px;text-align:right}
.pu-total{flex:1;font-weight:700;align-self:center}
@media (max-width:600px){.pur-top{grid-template-columns:1fr}}
.sheet.wide{width:min(780px,100%)}

/* the search box and its buttons stay at the top while a long list scrolls */
.stick-bar{position:sticky;top:-18px;z-index:6;background:var(--bg);margin:-18px 0 0;padding:18px 0 10px}
.tbl2 thead th{top:calc(var(--sbh, 0px) - 18px)}
@media (max-width:900px){.stick-bar{top:-12px;margin-top:-12px;padding-top:12px}.tbl2 thead th{top:calc(var(--sbh, 0px) - 12px)}}

/* column headings stay on one line */
.tbl2 th{white-space:nowrap}
.tbl2 th .sort{white-space:nowrap}

/* rooms: vacant or occupied */
.roomcell{display:flex;flex-direction:column;gap:6px}
.rstat{display:flex;align-items:center;gap:8px;min-height:44px;padding:6px 12px;border-radius:12px;background:#e4ebf1;color:var(--text);font-weight:700;text-align:left;font-size:13px}
.rstat small{margin-left:auto;font-weight:500;color:var(--mute);font-size:11.5px}
.rstat.occ{background:var(--text);color:var(--bg)}
.rstat.occ small{color:inherit;opacity:.75}
.rstat i,.rstat svg{width:16px;height:16px}
.m-top .seg button{white-space:nowrap}

/* booking calendar */
.cal-box{padding:10px 12px}
.cal-scroll{overflow-x:auto}
.cal-row{display:grid;grid-template-columns:150px repeat(calc(var(--n) * 2), minmax(26px, 1fr));grid-auto-rows:46px;min-width:calc(150px + var(--n) * 56px);position:relative}
.cal-row+.cal-row{border-top:1px solid var(--line)}
.cal-head{grid-auto-rows:auto;position:sticky;top:-18px;background:var(--panel2);z-index:4}
.cal-room{display:flex;flex-direction:column;justify-content:center;gap:2px;padding:0 8px;position:sticky;left:0;background:var(--panel2);z-index:3;grid-column:1;grid-row:1}
.cal-room b{font-size:13.5px}
.cal-st{font-size:11px;color:var(--mute);font-weight:600}.cal-st.occ{color:#b45309}
.cal-day{display:flex;flex-direction:column;align-items:center;padding:6px 0;border-left:1px solid var(--line);line-height:1.15}
.cal-day small{font-size:11px;color:var(--mute);font-weight:600}.cal-day b{font-size:15px}.cal-day em{font-style:normal;font-size:10.5px;color:var(--mute);min-height:12px}
.cal-day.today{background:#dce7f3;border-radius:8px}
.cal-cell{grid-row:1;border-left:1px solid var(--line);background:transparent;transition:background .12s}
.cal-cell:hover{background:#dce7f3}.cal-cell.today{background:rgba(16,53,88,.06)}
.cal-bk{grid-row:1;margin:7px 1px;border-radius:10px;padding:0 10px;display:flex;align-items:center;gap:8px;overflow:hidden;white-space:nowrap;text-align:left;z-index:2;font-size:12.5px;transition:transform .12s}
.cal-bk:hover{transform:translateY(-1px)}
.cal-bk b{overflow:hidden;text-overflow:ellipsis;font-weight:700}
.cal-bk small{opacity:.7;font-size:11px;flex:none}
.cal-bk.booked{background:#cfe0f3;color:#0a1319}
.cal-bk.checked_in{background:#103558;color:#ffffff}
.cal-bk.checked_out{background:#d6dde4;color:#4b5b68}
.cal-key{display:flex;gap:16px;margin-top:10px;font-size:12px;color:var(--mute)}
.cal-key .k{display:inline-block;width:12px;height:12px;border-radius:4px;margin-right:6px;vertical-align:-2px}
.cal-key .k.booked{background:#cfe0f3}.cal-key .k.checked_in{background:#103558}.cal-key .k.checked_out{background:#d6dde4}

.bk-from{width:170px;flex:none}

/* the number badges: centred in a true circle (a pill when there are two digits) */
.nbd{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:20px;height:20px;padding:0 6px;line-height:1;font-size:11px;font-weight:700;font-variant-numeric:tabular-nums;text-align:center}
.nbtn .nbd{top:0;right:0}

/* the quantity on an order line can be tapped and typed */
.step .qv{min-width:36px;height:100%;font-weight:800;font-size:15px;border-radius:8px;padding:0 4px;background:transparent}
.step .qv:hover{background:rgba(9,26,33,.08)}
.qpad{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0 4px}
.qpad .chip{min-width:48px;min-height:42px;font-weight:700}
.qty-in{font-size:22px;text-align:center;min-height:54px}

/* the red count in the Setup menu: a pill that holds two digits, not squeezed to the icon size */
.snav button i.nbd{width:auto;min-width:20px;height:20px;margin-left:auto;padding:0 6px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;font-size:11px;line-height:1;stroke:none}

/* the digits sit a little low in this font, so lift them to the true middle of the circle */
.nbd,.snav button i.nbd{padding:0 6px 1px}

/* refunded receipts are marked in red */
.refd td{background:#fdf1f0}
.refd .rf,.refd .flag.off{color:#b42318;font-weight:700}
.refd .flag.off{background:#fde0dc}
.rf{color:#b42318;font-weight:700}

/* the table and room selector at the top of an order */
.t-head .ti.tsel{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"n i" "s i";align-items:center;column-gap:10px;row-gap:0;padding:6px 10px 6px 14px;border-radius:14px;background:var(--panel2);text-align:left;flex:1;min-width:0;transition:background .15s}
.t-head .ti.tsel:hover{background:#dce7f3}
.t-head .ti.tsel b{grid-area:n;font-size:18px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.t-head .ti.tsel small{grid-area:s;flex-basis:auto;font-size:12px;color:var(--mute);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.t-head .ti.tsel i,.t-head .ti.tsel svg{grid-area:i;width:20px;height:20px;opacity:.55;align-self:center}

/* room types on the tables screen */
.tgrid .rt-head{flex-basis:100%;display:flex;gap:10px;align-items:baseline;justify-content:center;margin:14px 0 0;text-align:center}
.tgrid .rt-head:first-child{margin-top:0}
.tgrid .rt-head b{font-size:16px}
.tgrid .rt-head span{color:var(--mute);font-size:13px}
.chk{display:flex;align-items:center;gap:8px;margin:6px 0;font-weight:600}

/* delete order sits beside settle, small */
.acts .settle-row{grid-column:1 / -1;display:flex;gap:8px;align-items:stretch}
.acts .settle-row .settle{flex:1;grid-column:auto}
.acts .settle-row .delbtn{flex:none;width:60px;min-height:60px;padding:0;display:grid;place-items:center}
.acts .settle-row .delbtn i,.acts .settle-row .delbtn svg{width:22px;height:22px}
/* the add stay tile reads clearly */
.prod.staytile{background:#103558;color:#fff}
.prod.staytile .pn,.prod.staytile .pp{color:#fff}

/* room types first, then the vacant rooms of the one chosen */
.tgrid .rtile{width:230px;min-height:128px}
.rtile .n{font-size:18px;font-weight:700}
.rtile .vac{font-weight:700;font-size:15px}
.rtile .vac.none{color:var(--mute);font-weight:500}
.tgrid .rt-head{gap:12px;flex-wrap:wrap}
.tgrid .rt-head .chip{display:inline-flex;align-items:center;gap:6px}

/* a stay waiting for its bill to be paid */
.cal-bk.pending{background:repeating-linear-gradient(45deg,#eef3f7,#eef3f7 7px,#dfe7ee 7px,#dfe7ee 14px);color:#0a1319}
.cal-key .k.pending{background:repeating-linear-gradient(45deg,#eef3f7,#eef3f7 3px,#cfd9e2 3px,#cfd9e2 6px)}

/* a business's own logo sits on a light chip so any logo shows on the dark header */
.top-logo.custom{height:40px;max-width:210px;object-fit:contain;background:#fff;border-radius:10px;padding:5px 12px}
.login-logo.custom{width:auto;max-width:min(300px,86%);max-height:96px;object-fit:contain;background:#fff;border-radius:16px;padding:12px 20px}
.logo-row{display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.logo-prev{width:220px;height:96px;display:grid;place-items:center;background:#0b2230;border-radius:12px;padding:10px}
.logo-prev.custom{background:#fff;box-shadow:inset 0 0 0 1px var(--line)}
.logo-prev img{max-width:100%;max-height:100%;object-fit:contain}
.logo-btns{display:flex;gap:8px;flex-wrap:wrap}
@media (max-width:820px){.top-logo.custom{height:34px;padding:4px 10px}}

/* the system on hold */
#hold{position:fixed;inset:0;z-index:99999;background:radial-gradient(120% 90% at 50% 0%,#14456d 0%,#0b2230 45%,#071318 100%);display:grid;place-items:center;padding:24px;overflow:auto}
.hold-box{width:100%;max-width:460px;text-align:center;color:#fff;display:flex;flex-direction:column;align-items:center;gap:14px}
.hold-logo{display:block;width:min(260px,70%);height:auto;margin-bottom:10px}
.hold-logo.custom{width:auto;max-width:min(300px,80%);max-height:90px;object-fit:contain;background:#fff;border-radius:16px;padding:12px 20px}
.hold-ic{width:76px;height:76px;border-radius:50%;background:rgba(255,255,255,.12);display:grid;place-items:center}
.hold-ic i,.hold-ic svg{width:36px;height:36px}
.hold-box h2{margin:6px 0 0;font-size:28px;letter-spacing:-.02em}
.hold-box p{margin:0;font-size:16px;color:#d6e3ec}
.hold-box .hold-sub{font-size:14px;color:#9db4c4;max-width:36ch}
.hold-btns{display:flex;gap:10px;flex-wrap:wrap;justify-content:center;margin-top:10px}
.licpill{display:inline-flex;align-items:center;gap:7px;border:0;border-radius:999px;padding:6px 14px;background:rgba(255,255,255,.14);color:#fff;font-weight:700;font-size:13px;cursor:pointer}
.licpill i,.licpill svg{width:15px;height:15px}
.licpill.urgent{background:#fff;color:#7a1710}
.hold-btns .btn{display:inline-flex;align-items:center;gap:8px;padding:12px 20px;border-radius:12px;font-weight:700;border:0;cursor:pointer;text-decoration:none}
.hold-btns .btn.primary{background:#fff;color:#0a1319}
.hold-btns .btn:not(.primary){background:rgba(255,255,255,.14);color:#fff}
.hold-btns .btn i,.hold-btns .btn svg{width:18px;height:18px}
