#pos-toolbar{position:fixed;inset:0 0 auto;z-index:100000;min-height:38px;background:#3f2e0d;color:#fff7e6;display:flex;align-items:center;gap:12px;padding:7px 16px;font:12px system-ui;flex-wrap:wrap}#pos-toolbar button,#pos-toolbar a{border:1px solid #806735;background:#fff7e6;color:#3f2e0d;border-radius:6px;padding:5px 9px;font:inherit;cursor:pointer;text-decoration:none}#save-state{margin-left:auto;color:#fcc50e;max-width:320px}.signed-out .sc-host{visibility:hidden}.saving .sc-host{pointer-events:none;opacity:.65}#pos-overlay{position:fixed;inset:38px 0 0;z-index:99999;background:#3f2e0dc9;padding:24px;overflow:auto;display:flex;justify-content:center;align-items:flex-start;font:15px/1.5 system-ui;color:#3f2e0d}.pos-modal{background:#fff7e6;border-radius:20px;padding:28px;width:min(1200px,100%);box-shadow:0 16px 70px #0004;min-width:0}.pos-modal header{display:flex;justify-content:space-between;align-items:center;gap:20px}.pos-modal h1{font-size:28px;margin:0 0 12px}.pos-modal h2{font-size:20px;margin:28px 0 12px}.pos-modal button{background:#fff;border:1px solid #d9c08f;border-radius:8px;padding:10px 16px;font:600 14px system-ui;color:#3f2e0d;cursor:pointer}.pos-modal button:hover{background:#fdebc4}.pos-modal button.primary{background:#c62b28;color:white;border-color:#c62b28}.pos-modal button:disabled{opacity:.5;cursor:wait}.pos-form{display:grid;gap:16px;max-width:540px}.pos-form label,.report-filter label{display:flex;flex-direction:column;gap:6px;font-weight:600}.pos-form input,.pos-form select,.report-filter input{border:1px solid #d9c08f;border-radius:8px;padding:12px;font:16px system-ui;background:white;color:#3f2e0d}.pos-form input[type=checkbox]{width:24px;height:24px}.form-error{color:#af0d15}.auth-logo{width:92px;border-radius:16px;margin:10px 0}.report-filter,.report-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:end;margin:20px 0}.summary-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px;margin:20px 0}.summary-cards>div{background:#fdebc4;border-radius:12px;padding:20px;font-weight:700}.report-table{border-collapse:collapse;width:100%;font-size:13px;display:block;overflow:auto}.report-table th,.report-table td{text-align:left;padding:10px;border-bottom:1px solid #eedbb4;white-space:nowrap}.report-table th{background:#fcc50e;color:#3f2e0d}.report-table tr:nth-child(even){background:#fff}#print-area{display:none}@media(max-width:600px){#pos-overlay{padding:10px;top:76px}.pos-modal{padding:16px}.pos-modal h1{font-size:22px}#pos-toolbar strong{width:100%}#save-state{max-width:130px;font-size:10px}}@media print{body>*{display:none!important}body{background:white!important}#print-area{display:block!important;color:black;font:12px Arial;padding:10px}#print-area pre{white-space:pre-wrap;font:13px/1.6 monospace}#print-area table{display:table;font-size:9px}#print-area th,#print-area td{white-space:normal;padding:4px;border:1px solid #ccc}#print-area h1{font-size:18px}@page{margin:12mm}}

.signed-out #pos-overlay{background:linear-gradient(135deg,#c62b28,#af0d15);align-items:center}.pos-modal.pos-lock{max-width:480px;border-top:8px solid #fcc50e}.pos-lock .auth-logo{display:block;width:100px;margin:8px auto 20px}.pos-lock header{justify-content:center}.pos-lock header h1{margin-bottom:0}.pos-lock>p{text-align:center}

.pin-keypad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.pin-keypad button{min-height:48px;font-size:22px;background:#fdebc4;border-color:#d9c08f}.pin-keypad button:hover{background:#fcc50e}

/* App shell fills the window; utility actions live in the main navigation. */
html,body{width:100%;height:100%;overflow:hidden;overscroll-behavior:none}
#pos-toolbar{display:none!important}
#pos-stage{left:0!important;top:0!important;width:1280px!important;height:var(--pos-height,800px)!important;transform:scale(var(--pos-scale,1))!important;transform-origin:top left;border-radius:0!important;box-shadow:none!important}
.pos-app-header{gap:10px!important;padding:0 12px!important}
.pos-app-header>img{flex-shrink:0}.pos-app-header>div:nth-child(2){flex-shrink:1}
.pos-app-header>div:nth-child(2)>span:first-child{font-size:20px!important}
.pos-app-header>button{flex-shrink:0}
#pos-connection{font:10px/1.3 system-ui;color:#ffe3a0;max-width:170px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin-top:3px}
#pos-overlay{inset:0;padding:max(24px,env(safe-area-inset-top)) max(24px,env(safe-area-inset-right)) max(24px,env(safe-area-inset-bottom)) max(24px,env(safe-area-inset-left));z-index:100001;backdrop-filter:blur(6px)}
.pos-modal{max-height:calc(100dvh - 48px);overflow:auto}.pos-modal header{position:sticky;top:-28px;background:#fff7e6;padding:8px 0;z-index:2}
.pos-menu-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:14px;margin-top:24px}
.pos-menu-grid button,.pos-menu-grid a{display:flex;align-items:center;justify-content:center;min-height:76px;background:#fdebc4;border:1px solid #d9c08f;border-radius:14px;color:#3f2e0d;font:700 16px system-ui;text-decoration:none;text-align:center;padding:16px}
.pos-menu-grid button:hover,.pos-menu-grid a:hover{background:#fcc50e}
.signed-out #pos-overlay{background:radial-gradient(ellipse at top,#d7372e,#a70d14 75%);align-items:center}
.pos-modal.pos-lock{width:min(460px,100%);border:0;border-radius:28px;box-shadow:0 24px 90px #48050966;padding:28px 36px}
.pos-lock::before{content:'HOTEL SHREE JAY AMBA';display:block;text-align:center;font:800 15px/1.4 system-ui;letter-spacing:.4px;margin-bottom:16px;color:#af0d15}
.pos-modal-brand{display:block;color:#c62b28;font:900 12px/1.2 system-ui;letter-spacing:.05em;margin-bottom:4px}.pos-modal header h1{margin-bottom:0}
.pos-lock .pos-form{gap:12px}.pos-lock input[name=pin]{text-align:center;font-size:26px;letter-spacing:10px;height:56px;background:#fff}
.pos-lock .pin-keypad button{min-height:54px;border:0;border-radius:12px}.pos-lock .primary{min-height:54px;border-radius:12px}
.pos-lock .auth-logo{width:88px;height:88px;object-fit:contain;margin:12px auto}.pos-lock>p{margin:10px 0 18px}
.pos-install-lock{display:block;margin:18px auto 0;background:transparent!important;border:none!important;color:#af0d15!important}
button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid #048327;outline-offset:3px}
@media(max-width:600px){#pos-overlay{inset:0;padding:12px}.pos-modal{max-height:calc(100dvh - 24px);padding:20px}.pos-modal.pos-lock{padding:20px}.pos-modal header{top:-20px}.pos-menu-grid{grid-template-columns:1fr 1fr;gap:10px}.pos-menu-grid button,.pos-menu-grid a{font-size:14px;min-height:68px}}
@media(max-height:650px){.signed-out #pos-overlay{align-items:flex-start}.pos-lock .auth-logo{width:56px;height:56px}.pos-lock .pin-keypad button{min-height:42px}}
.pos-categories{overflow-y:auto!important;min-height:0}.pos-categories>button{flex-shrink:0;position:relative;z-index:1}.pos-categories>div{flex-shrink:0}
.pos-empty-cart{min-height:200px}.pos-empty-cart img{width:clamp(64px,calc(var(--pos-height,800px) - 600px),150px)!important;height:auto!important;min-height:0;object-fit:contain;flex-shrink:1}
@media(min-aspect-ratio:8/5){.pos-categories>img{display:none}}

.pos-menu-grid button,.pos-menu-grid a{justify-content:flex-start;gap:16px;text-align:left;padding:16px 20px}.pos-menu-grid .mi{font-family:'Material Symbols Rounded';font-weight:400;font-size:38px;line-height:1;color:#c62b28;flex-shrink:0}.pos-menu-grid .mt{display:flex;flex-direction:column;align-items:flex-start;line-height:1.25}.pos-menu-grid .mt b{font-size:17px}.pos-menu-grid .mt small{font-size:19px;font-weight:700;color:#c62b28}

/* ---- responsive: <html data-bp="phone|tablet|desktop"> is set from the window width; the stage is laid out at 440 / 1000 / 1280 css px and scaled to fit ---- */
#pos-stage{width:var(--pos-width,1280px)!important}
.msi{font-family:'Material Symbols Rounded';font-weight:400;line-height:1;display:inline-block;font-size:26px}
.pos-phonebar,.pos-cart-close{display:none}
/* pop-up sheets never exceed the layout width */
[style*="width: 1060px"]{width:min(1060px,calc(var(--pos-width,1280px) - 24px))!important}
[style*="width: 760px"]{width:min(760px,calc(var(--pos-width,1280px) - 24px))!important}
[style*="width: 720px"]{width:min(720px,calc(var(--pos-width,1280px) - 24px))!important}

/* ---------- tablet (640-999px wide) ---------- */
html[data-bp="tablet"] .pos-app-header>div:nth-of-type(1){display:flex!important;max-width:210px}
html[data-bp="tablet"] .pos-app-header>div:nth-of-type(1)>span:first-child{font-size:15px!important}
html[data-bp="tablet"] .pos-app-header>div:nth-of-type(1)>span:last-child{font-size:11px!important}
html[data-bp="tablet"] [data-screen-label="01 Billing"]{grid-template-columns:176px minmax(0,1fr) 340px!important}
html[data-bp="tablet"] .pos-categories{padding:12px 10px!important}
html[data-bp="tablet"] .pos-products [style*="grid-auto-rows: 440px"]{grid-template-columns:minmax(0,1fr)!important}

/* ---------- phone (<640px wide) ---------- */
html[data-bp="phone"] .pos-app-header{padding:0 8px!important;gap:8px!important}
html[data-bp="phone"] .pos-app-header>img{width:44px!important;height:44px!important;border-radius:12px!important}
html[data-bp="phone"] .pos-app-header>div:nth-of-type(4){display:none!important}
html[data-bp="phone"] .pos-app-header>div:nth-of-type(1){display:flex!important;position:absolute;left:58px;right:6px;top:1px;height:13px;z-index:2;align-items:center!important;text-align:center;pointer-events:none}
html[data-bp="phone"] .pos-app-header>div:nth-of-type(1)>span:first-child{font-size:10px!important;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
html[data-bp="phone"] .pos-app-header>div:nth-of-type(1)>span:last-child{display:none!important}
html[data-bp="phone"] .pos-app-header>div:nth-of-type(3){margin-top:12px}
html[data-bp="phone"] .pos-app-header>div:nth-of-type(3){padding:4px!important;gap:4px!important}
html[data-bp="phone"] .pos-app-header>div:nth-of-type(3) button{min-width:50px!important;padding:0 4px!important}
html[data-bp="phone"] .pos-app-header>div:nth-of-type(3) button[style*="min-width: 170px"]{min-width:0!important;padding:0 8px!important}
html[data-bp="phone"] .pos-app-header>div:nth-of-type(3) button[style*="min-width: 170px"] span span:nth-child(2){display:none}
html[data-bp="phone"] .pos-app-header>button{width:46px!important;min-width:0!important;padding:0!important}

html[data-bp="phone"] [data-screen-label="01 Billing"]{display:flex!important;flex-direction:column;position:relative;overflow:hidden}
html[data-bp="phone"] .pos-categories{flex:0 0 auto;flex-direction:row!important;align-items:center;overflow-x:auto!important;overflow-y:hidden!important;padding:8px 10px!important;gap:8px!important;height:auto!important}
html[data-bp="phone"] .pos-categories>*{flex:0 0 auto}
html[data-bp="phone"] .pos-categories>div:first-child{width:250px}
html[data-bp="phone"] .pos-categories>div[style*="letter-spacing: 1.2px"],html[data-bp="phone"] .pos-categories>div[style*="margin-top: auto"]{display:none!important}
html[data-bp="phone"] .pos-categories>button{height:56px!important;min-width:132px}
html[data-bp="phone"] .pos-products{flex:1 1 0;padding:10px 10px 96px!important}
html[data-bp="phone"] .pos-products [style*="grid-auto-rows: 440px"]{grid-template-columns:minmax(0,1fr)!important}
html[data-bp="phone"] .pos-cart{display:none!important}
html[data-bp="phone"] .pos-cart.open{display:flex!important;position:absolute;inset:0;z-index:30}
html[data-bp="phone"] .pos-cart-close{display:flex;align-items:center;gap:8px;flex:0 0 auto;height:52px;padding:0 16px;background:#FDEBC4;color:#3F2E0D;font-weight:800;font-size:17px;text-align:left}
html[data-bp="phone"] .pos-phonebar{display:flex;position:absolute;left:0;right:0;bottom:0;z-index:20;padding:10px 12px;gap:10px;background:#fff;box-shadow:0 -6px 20px rgba(63,46,13,.15)}
.pos-pb-cart{flex:1;min-width:0;height:60px;border-radius:16px;background:#FDEBC4;display:flex;align-items:center;gap:10px;padding:0 14px;color:#3F2E0D;text-align:left}
.pos-pb-txt{flex:1;display:flex;flex-direction:column;line-height:1.15;min-width:0}.pos-pb-txt b{font-size:19px}.pos-pb-txt small{font-size:13px;font-weight:700;color:#7A6342}
.pos-pb-charge{flex:0 0 auto;min-width:150px;height:60px;border-radius:16px;color:#fff;display:flex;align-items:center;justify-content:center;gap:10px;font:600 22px/1 'Oswald',sans-serif;text-transform:uppercase;padding:0 16px}
.pos-pb-charge b{font-size:26px;font-weight:600}
.pos-pb-charge:disabled{opacity:.7}

html[data-bp="phone"] [data-screen-label="02 Payment"],html[data-bp="phone"] [data-screen-label="03 Success"]{grid-template-columns:minmax(0,1fr)!important;grid-auto-rows:min-content;overflow-y:auto!important}
html[data-bp="phone"] [data-screen-label="04 Today's Sales"],html[data-bp="phone"] [data-screen-label="08 Expense"],html[data-bp="phone"] [data-screen-label="10 Staff"]{grid-template-columns:minmax(0,1fr)!important;grid-auto-rows:minmax(420px,auto);overflow-y:auto!important;padding:12px!important}
html[data-bp="phone"] [data-screen-label="07 Stock"],html[data-bp="phone"] [data-screen-label="09 Kitchen"]{overflow:auto!important;padding:12px!important}
html[data-bp="phone"] [style*="gap: 28px"][style*="overflow-y: auto"]{flex-direction:column}

html[data-bp="phone"] .pos-app-header>div:nth-of-type(2){display:none!important}
html[data-bp="phone"] .pos-app-header>div:nth-of-type(3){flex:1 1 0;min-width:0;overflow-x:auto;justify-content:flex-start}
html[data-bp="phone"] .pos-app-header>div:nth-of-type(3)>*{flex:0 0 auto}
html[data-bp="phone"] .pos-app-header>button{display:none!important}
/* phone: compact product cards so three size buttons fit in a half-width card */
html[data-bp="phone"] .pos-products button[style*="height: 76px"]{height:60px!important;padding:0 2px!important}
html[data-bp="phone"] .pos-products button[style*="height: 76px"] span:nth-child(1){font-size:19px!important}
html[data-bp="phone"] .pos-products button[style*="height: 76px"] span:nth-child(2){font-size:14px!important}
html[data-bp="phone"] .pos-products div[style*="font-size: 22px; font-weight: 800"]{font-size:18px!important}
html[data-bp="phone"] .pos-products div[style*="font-size: 25px; font-weight: 800"]{font-size:20px!important}
html[data-bp="phone"] .pos-products span[style*="font-size: 30px; font-weight: 600; flex-shrink: 0"]{font-size:24px!important}
html[data-bp="phone"] .pos-products [style*="repeat(2, minmax(0px, 1fr))"][style*="gap: 12px"]{gap:10px!important}

/* phone: payment screen stacks (summary, then payment modes, amount, keypad) */
html[data-bp="phone"] [data-screen-label="02 Payment"]>div:nth-child(1){overflow:visible!important}
html[data-bp="phone"] [data-screen-label="02 Payment"]>div:nth-child(2){min-height:max-content;overflow:visible!important;padding:14px!important}
html[data-bp="phone"] [data-screen-label="02 Payment"] [style*="grid-template-columns: minmax(0px, 1fr) 372px"]{grid-template-columns:minmax(0,1fr)!important;flex:none!important;min-height:auto!important}
html[data-bp="phone"] [data-screen-label="02 Payment"] [style*="grid-template-columns: auto minmax(0px, 1fr)"]{grid-template-columns:minmax(0,1fr)!important;flex:none!important;justify-items:center}
html[data-bp="phone"] [data-screen-label="02 Payment"] [style*="grid-template-columns: repeat(3, 1fr)"]{grid-auto-rows:72px!important}
html[data-bp="phone"] [data-screen-label="02 Payment"] [style*="repeat(4, minmax(0px, 1fr))"][style*="gap: 12px"]{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html[data-bp="phone"] [data-screen-label="02 Payment"] [style*="flex: 1 1 0%"]{flex:none!important}

/* phone: stock KPIs 2x2, kitchen board swipes sideways */
html[data-bp="phone"] [data-screen-label="07 Stock"]>div[style*="repeat(4, minmax(0px, 1fr))"]{grid-template-columns:repeat(2,minmax(0,1fr))!important}
html[data-bp="phone"] [data-screen-label="09 Kitchen"]>div[style*="repeat(3, minmax(0px, 1fr))"]{grid-template-columns:repeat(3,minmax(270px,1fr))!important;overflow-x:auto!important;scroll-snap-type:x proximity}
html[data-bp="phone"] [data-screen-label="09 Kitchen"]>div[style*="repeat(3, minmax(0px, 1fr))"]>div{scroll-snap-align:start}

html[data-bp="phone"] [data-screen-label="07 Stock"]>div:nth-child(3)>div{grid-template-columns:56px minmax(0,1fr) auto auto!important;gap:10px!important}
html[data-bp="phone"] [data-screen-label="07 Stock"]>div:nth-child(3)>div>div:nth-child(3),html[data-bp="phone"] [data-screen-label="07 Stock"]>div:nth-child(3)>div>span:nth-child(5){display:none!important}
html[data-bp="phone"] [data-screen-label="07 Stock"]>div:nth-child(3)>div>div:nth-child(6) button:nth-child(2){display:none!important}

/* pop-ups that live outside the scaled stage (POS menu, staff, reports...) */
@media (max-width:640px){.pos-menu-grid{grid-template-columns:minmax(0,1fr)!important;gap:10px}.pos-menu-grid button,.pos-menu-grid a{min-height:64px!important;padding:10px 16px!important}.pos-modal{padding:18px!important}}

/* phone: two-column report screens become one scrolling page */
html[data-bp="phone"] [data-screen-label="04 Today's Sales"],html[data-bp="phone"] [data-screen-label="08 Expense"],html[data-bp="phone"] [data-screen-label="10 Staff"]{grid-auto-rows:max-content!important;align-content:start}
html[data-bp="phone"] [data-screen-label="04 Today's Sales"]>div,html[data-bp="phone"] [data-screen-label="08 Expense"]>div,html[data-bp="phone"] [data-screen-label="10 Staff"]>div{min-height:max-content!important;overflow:visible!important}
html[data-bp="phone"] [data-screen-label="04 Today's Sales"] [style*="overflow-y: auto"],html[data-bp="phone"] [data-screen-label="08 Expense"] [style*="overflow-y: auto"]{overflow:visible!important;min-height:max-content!important;flex:none!important}
/* expense entry: the flexible keypad used to collapse to zero height on portrait phones,
   so its last row overflowed behind the Add expense button */
html[data-bp="phone"] .pos-exp-entry{min-height:auto!important;overflow:visible!important}
html[data-bp="phone"] .pos-exp-keypad{flex:none!important;grid-template-rows:repeat(4,72px)!important;grid-auto-rows:72px!important;min-height:312px!important}
html[data-bp="phone"] .pos-exp-add{position:static!important;width:100%;margin-top:4px}

/* POS menu: Reports + Expense on their own first row, in their own colours */
.pos-menu-top{grid-template-columns:repeat(2,minmax(0,1fr))!important;margin-bottom:0}
.pos-menu-top+.pos-menu-grid{margin-top:14px}
.pos-menu-grid button.mn-reports{background:#dff3e4;border-color:#6fbf86}.pos-menu-grid button.mn-reports:hover{background:#c4e8cd}
.pos-menu-grid button.mn-reports .mi,.pos-menu-grid button.mn-reports .mt small{color:#04752f}
.pos-menu-grid button.mn-expense{background:#dcebf7;border-color:#7db4dc}.pos-menu-grid button.mn-expense:hover{background:#c3dcf0}
.pos-menu-grid button.mn-expense .mi,.pos-menu-grid button.mn-expense .mt small{color:#1f6f9a}
@media (max-width:640px){.pos-menu-top+.pos-menu-grid{margin-top:10px}.pos-menu-top{gap:10px}}

/* header lock button dropdown */
#pos-usermenu{position:fixed;z-index:100001;min-width:270px;background:#fff7e6;border:1px solid #d9c08f;border-radius:16px;padding:8px;box-shadow:0 16px 40px rgba(63,46,13,.35);display:flex;flex-direction:column;gap:6px}
#pos-usermenu .um-who{padding:8px 12px 6px;font:700 13px system-ui;color:#7a6342;text-transform:capitalize}
#pos-usermenu button{display:flex;align-items:center;gap:14px;min-height:60px;padding:8px 14px;background:#fdebc4;border:1px solid #d9c08f;border-radius:12px;color:#3f2e0d;font:700 16px system-ui;text-align:left;cursor:pointer}
#pos-usermenu button:hover{background:#fcc50e}
#pos-usermenu .mi{font-family:'Material Symbols Rounded';font-weight:400;font-size:30px;line-height:1;color:#c62b28;flex-shrink:0}
#pos-usermenu .mt{display:flex;flex-direction:column;align-items:flex-start;line-height:1.2}
#pos-usermenu .mt b{font-size:16px}#pos-usermenu .mt small{font-size:17px;font-weight:700;color:#c62b28}

/* day closing */
.pos-menu-grid button.mn-closing{grid-column:1/-1;background:#efe3fb;border-color:#b48ae0}.pos-menu-grid button.mn-closing:hover{background:#e2d0f6}
.pos-menu-grid button.mn-closing .mi,.pos-menu-grid button.mn-closing .mt small{color:#6a3fa3}
.closing{display:flex;flex-direction:column;gap:8px;margin-top:14px}.closing h3{margin:14px 0 2px;font:800 15px system-ui;color:#7a6342;text-transform:uppercase;letter-spacing:.06em}
.cl-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 14px;background:#fff;border:1px solid #eedbb4;border-radius:12px}
.cl-row span,.cl-big span{display:flex;flex-direction:column;line-height:1.25}.cl-row b,.cl-big b{font:700 16px system-ui}.cl-row small,.cl-big small{font:600 14px system-ui;color:#7a6342}
.cl-row strong{font:600 24px 'Oswald',sans-serif}.cl-row.tot{background:#fdebc4;border-color:#d9c08f}
.cl-big{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 18px;border-radius:16px;color:#fff;margin-top:6px}.cl-big b{font-size:19px}.cl-big small{color:rgba(255,255,255,.85)}.cl-big strong{font:600 40px 'Oswald',sans-serif}
.cl-big.cash{background:#048327}.cl-big.online{background:#2a6fa5}
.closing input[type=number]{padding:12px 14px;border:2px solid #d9c08f;border-radius:12px;font:600 18px system-ui;background:#fff}
.cl-diff{min-height:24px;font:800 18px system-ui}.cl-diff.ok{color:#048327}.cl-diff.bad{color:#c62b28}

/* barcode scanner and connected cash-drawer setup */
.hardware-status{padding:12px 14px;border-radius:12px;background:#fdebc4;border:1px solid #d9c08f;font-weight:750;color:#3f2e0d}
.scanner-video{display:block;width:100%;max-height:420px;margin-top:14px;border-radius:16px;background:#18120a;object-fit:cover}
.scanner-video[hidden]{display:none}
.billing-tools{display:flex;align-items:flex-start;gap:10px}.billing-tool-column{width:58px;height:108px;flex:0 0 58px;display:flex;flex-direction:column;gap:8px}.billing-search-icon{width:58px;height:58px;flex:0 0 58px;border-radius:17px;background:#fff;color:#8a6b3e;display:flex;align-items:center;justify-content:center;border:2px solid #eedbb4;box-shadow:0 2px 6px rgba(63,46,13,.08)}.billing-camera-flip{width:58px;height:42px;flex:0 0 42px;border-radius:14px;background:#eedbb4;color:#3f2e0d;display:flex;align-items:center;justify-content:center;border:2px solid #d9c08f;box-shadow:0 2px 5px rgba(63,46,13,.08)}
.billing-scanner-tile{position:relative;width:108px;height:108px;flex:0 0 108px;overflow:hidden;border-radius:20px;background:#fcc50e;color:#3f2e0d;display:flex;align-items:center;justify-content:center;border:2px solid #d79e00;box-shadow:0 3px 8px rgba(63,46,13,.2)}
.billing-scanner-video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;background:transparent;opacity:0;transition:opacity .15s}.billing-scanner-video[hidden]{display:none}.billing-scanner-tile[data-ready="1"] .billing-scanner-video{opacity:1}.billing-scanner-label{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-size:15px;font-weight:800;line-height:1}.billing-scanner-icon{display:block;width:42px;height:42px;fill:none;stroke:currentColor;stroke-width:3;stroke-linecap:round;stroke-linejoin:round}.billing-scanner-status{position:absolute;z-index:2;left:5px;right:5px;bottom:5px;padding:3px 4px;border-radius:8px;background:rgba(24,18,10,.82);color:#fff;font-size:10px;font-weight:700;line-height:1.1;text-align:center}.billing-scanner-tile[data-ready="1"] .billing-scanner-label{display:none}
.billing-search-popover{height:52px;background:#fff;border:2px solid #eedbb4;border-radius:15px;display:flex;align-items:center;gap:6px;padding:0 8px;box-shadow:0 2px 6px rgba(63,46,13,.08)}.billing-search-popover input{flex:1;min-width:0;height:100%;font-size:16px;font-weight:700;color:#3f2e0d}.billing-search-popover button{width:34px;height:34px;display:flex;align-items:center;justify-content:center;border-radius:10px;color:#8a6b3e}
.hardware-toggle{display:flex!important;flex-direction:row!important;align-items:center;gap:10px;padding:12px 0;font-weight:800}.hardware-toggle input{width:22px;height:22px}
.report-presets{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr));gap:10px;margin:18px 0 4px}.report-presets button{min-height:64px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;border:2px solid #d9c08f!important;background:#fff!important}.report-presets button b{font-size:16px}.report-presets button small{font-size:13px;color:#7a6342}.report-presets button.active{background:#c62b28!important;border-color:#c62b28!important;color:#fff}.report-presets button.active small{color:#ffe3a0}@media(max-width:600px){.report-presets{grid-template-columns:1fr}.report-presets button{min-height:52px}}

/* tablet/system receipt printing */
.tablet-receipt{box-sizing:border-box;width:72mm;margin:0 auto;background:#fff;color:#000;font:12px/1.35 Arial,"Noto Sans Devanagari",sans-serif}.tr-head,.tr-foot{display:flex;flex-direction:column;align-items:center;text-align:center;gap:2px}.tr-head img{width:22mm;height:22mm;object-fit:contain}.tr-head h1{font-size:17px!important;line-height:1.15;margin:2px 0 0;text-transform:uppercase}.tr-head h2{font-size:20px;margin:0}.tr-head p{margin:1px 0}.tr-row{display:flex;justify-content:space-between;gap:8px}.tr-row span{min-width:0}.tr-row strong{text-align:right;white-space:nowrap}.tr-meta,.tr-items,.tr-summary,.tr-foot{border-top:1px dashed #777;margin-top:7px;padding-top:7px}.tr-tag{padding-top:4px}.tr-items,.tr-summary{display:flex;flex-direction:column;gap:5px}.tr-total{border-top:2px solid #111;margin-top:7px;padding-top:6px;font-size:18px;font-weight:800}.tr-total span{font-size:14px}.tr-paid,.tr-change{padding-top:5px}.tr-foot img{width:29mm;height:29mm;margin:4px 0}.tr-foot b:last-child{font-size:14px;margin-top:5px}
@media print{#print-area{padding:0!important}.tablet-receipt{display:block!important}@page{size:80mm auto;margin:4mm}}
/* offline status pill: small count of receipts waiting to sync */
#pos-sync{position:fixed;left:6px;bottom:calc(6px + env(safe-area-inset-bottom));z-index:100002;border:1px solid #fff;border-radius:999px;padding:5px 10px;background:#3f2e0d;color:#fff7e6;font:700 11px/1.2 system-ui;box-shadow:0 2px 8px #0005}#pos-sync.is-offline{background:#af0d15}html[data-bp="phone"] #pos-sync{bottom:calc(82px + env(safe-area-inset-bottom))}@media print{#pos-sync{display:none!important}}

/* ========== tablet polish ========== */
/* smooth touch: no accidental text selection or page bounce, quick press feedback */
body{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
input,textarea,select,.report-table,.tablet-receipt{-webkit-user-select:text;user-select:text}
button,input,select,label{touch-action:manipulation;-webkit-tap-highlight-color:transparent}
/* only real scrolling lists contain the scroll; on every element it blocks the mouse wheel over cards (overflow:hidden) */
.pos-products,.pos-categories,#pos-stage [style*="overflow-y: auto"],.pos-modal,#pos-overlay{overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#pos-stage button{transition:transform .08s ease,background-color .12s ease,filter .12s ease}
.pos-modal button{min-height:48px;transition:transform .08s ease,filter .12s ease}
.pos-modal button:active{transform:scale(.97);filter:brightness(.95)}
.pos-modal input:not([type=checkbox]),.pos-modal select{min-height:48px;font-size:16px}
.pos-modal input[type=checkbox]{width:24px;height:24px}
.pos-modal .report-table{display:block;max-width:100%;overflow-x:auto;white-space:nowrap}
.pos-modal{animation:pos-in .16s ease-out}
@keyframes pos-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){.pos-modal{animation:none}#pos-stage button,.pos-modal button{transition:none}}
/* the lock card already shows the hotel name once */
.pos-lock .pos-modal-brand{display:none}
/* cart item names wrap to two lines instead of being cut off */
.pos-line-text>div:first-child{white-space:normal!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
/* a single favourite dish uses the full row */
html:not([data-bp="phone"]) .pos-fav-cafe>div:only-child{grid-column:1/-1;flex-direction:row!important}
html:not([data-bp="phone"]) .pos-fav-cafe>div:only-child>div:first-child{width:190px;height:auto!important;min-height:150px;flex:0 0 190px}
html:not([data-bp="phone"]) .pos-fav-cafe>div:only-child>div:nth-child(2){flex:1;min-width:0;justify-content:center}

/* short landscape tablets: compact bill panel so more items stay visible */
@media (min-width:1000px) and (max-height:860px){
 .pos-cart-head{padding:8px 14px 6px!important}
 .pos-cart-head button{height:46px!important}
 .pos-cart-actions{padding:0 12px 6px!important}
 .pos-cart-actions button{height:56px!important;font-size:18px!important}
 .pos-cart-actions button:last-child{flex-direction:row!important;width:130px!important}
 .pos-cart-actions button:last-child>span{font-size:28px!important}
 .pos-line{padding:5px 8px!important;gap:8px!important}
 .pos-line-img{width:40px!important;height:44px!important}
 .pos-line-img img{height:40px!important;max-width:38px!important}
 .pos-line-text>div:first-child{font-size:15px!important;-webkit-line-clamp:1}
 .pos-line-text>div:last-child{font-size:17px!important}
 .pos-step button{width:46px!important;height:46px!important}
 .pos-cart-foot{padding:8px 14px 10px!important;gap:5px!important}
 .pos-cart-foot>button{height:42px!important;min-height:0!important}
 .pos-cart-foot>div:last-child>button{height:68px!important}
}

/* tablet held upright */
html[data-bp="tablet"] .billing-tools{gap:6px}
html[data-bp="tablet"] .billing-tool-column,html[data-bp="tablet"] .billing-search-icon,html[data-bp="tablet"] .billing-camera-flip{width:52px!important;flex-basis:52px!important}
html[data-bp="tablet"] .billing-scanner-tile{width:96px!important;flex-basis:96px!important}
html[data-bp="tablet"] [data-screen-label="02 Payment"]{grid-template-columns:300px minmax(0,1fr)!important}
/* cash and split: amounts on top, large keypad in the middle, confirm button at the bottom */
html[data-bp="tablet"] [data-screen-label="02 Payment"] [style*="minmax(0px, 1fr) 372px"]{display:flex!important;flex-direction:column;gap:14px!important}
html[data-bp="tablet"] [data-screen-label="02 Payment"] [style*="minmax(0px, 1fr) 372px"]>div:first-child{display:contents!important}
html[data-bp="tablet"] [data-screen-label="02 Payment"] [style*="minmax(0px, 1fr) 372px"]>div:first-child>*{order:1;flex:0 0 auto!important}
html[data-bp="tablet"] [data-screen-label="02 Payment"] [style*="minmax(0px, 1fr) 372px"]>div:first-child>button{order:3}
html[data-bp="tablet"] [data-screen-label="02 Payment"] [style*="minmax(0px, 1fr) 372px"]>div:last-child{order:2;flex:1 1 0;min-height:340px}
/* UPI: QR above, amount and confirm button below */
html[data-bp="tablet"] [data-screen-label="02 Payment"] [style*="grid-template-columns: auto minmax(0px, 1fr)"]{display:flex!important;flex-direction:column;justify-content:center;align-items:center;text-align:center}
html[data-bp="tablet"] [data-screen-label="02 Payment"] [style*="grid-template-columns: auto minmax(0px, 1fr)"]>div:last-child{width:100%;max-width:520px}
/* today's sales: one column so nothing is stretched or squeezed */
html[data-bp="tablet"] [data-screen-label="04 Today's Sales"]{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:auto minmax(0,1fr)}
html[data-bp="tablet"] [data-screen-label="04 Today's Sales"]>div:first-child>div:last-child{flex:0 0 280px!important}
/* the bill line just added */
.pos-line-new{animation:pos-line-new 1.2s ease-out}@keyframes pos-line-new{0%,40%{background-color:#ffe27a}}
/* small reload button: a new release has arrived */
#pos-update{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(6px + env(safe-area-inset-bottom));z-index:100002;display:flex;align-items:center;gap:6px;min-height:36px;border:2px solid #fff;border-radius:999px;padding:5px 14px;background:#048327;color:#fff;font:800 13px/1.2 system-ui;box-shadow:0 3px 10px #0006;white-space:nowrap;animation:pos-update-in 1.4s ease-in-out 3}
#pos-update .upd-icon{font-size:18px;line-height:1}
@keyframes pos-update-in{50%{box-shadow:0 0 0 8px #04832755}}
html[data-bp="phone"] #pos-update{bottom:calc(82px + env(safe-area-inset-bottom))}
@media (prefers-reduced-motion:reduce){#pos-update{animation:none}}
@media print{#pos-update{display:none!important}}
/* while the camera is scanning, the tile opens into a larger preview beside the camera-switch button */
html[data-bp] .billing-scanner-tile[data-active="1"]{position:fixed!important;left:80px;top:84px;z-index:40;width:360px!important;height:360px!important;flex-basis:360px!important;border:4px solid #fcc50e;box-shadow:0 18px 48px rgba(40,20,0,.5);transform:none!important}
html[data-bp="tablet"] .billing-scanner-tile[data-active="1"]{left:72px}
html[data-bp="phone"] .billing-scanner-tile[data-active="1"]{left:12px;top:150px;width:416px!important;height:416px!important;flex-basis:416px!important}
.billing-scanner-tile[data-active="1"]::after{content:'✕ Tap to close';position:absolute;z-index:3;top:8px;right:8px;padding:6px 12px;border-radius:999px;background:rgba(24,18,10,.82);color:#fff;font:800 14px/1.2 system-ui}
.billing-scanner-tile[data-active="1"] .billing-scanner-status{left:10px;right:10px;bottom:10px;padding:8px 10px;font-size:15px}
.billing-scanner-tile[data-active="1"][data-ready="1"]::before{content:'';position:absolute;z-index:2;left:10%;right:10%;top:50%;height:3px;margin-top:-1px;background:#ff3b30;box-shadow:0 0 8px #ff3b30;pointer-events:none}
/* owner: change rates */
.pos-menu-grid button.mn-rates{grid-column:1/-1;background:#fff0cc;border-color:#e0ac2b}.pos-menu-grid button.mn-rates .mi,.pos-menu-grid button.mn-rates .mt small{color:#8a5a00}
.rate-search{width:100%;box-sizing:border-box;padding:0 14px;border:2px solid #d9c08f;border-radius:12px;font:600 17px system-ui;background:#fff;margin-bottom:10px}
.rate-list{display:flex;flex-direction:column;gap:8px}
.rate-row{display:grid;grid-template-columns:minmax(0,1fr) auto 140px;align-items:center;gap:14px;padding:8px 14px;background:#fff;border:2px solid #eedbb4;border-radius:12px}
.rate-row[hidden]{display:none}.rate-row.changed{border-color:#048327;background:#effaf0}
.rate-name{display:flex;flex-direction:column;min-width:0}.rate-name b{font:700 16px system-ui}.rate-name small{font:600 13px system-ui;color:#7a6342}
.rate-now{font:700 15px system-ui;color:#7a6342;white-space:nowrap}
.rate-new{display:flex!important;flex-direction:row!important;align-items:center;gap:6px;margin:0!important;font:800 18px system-ui}.rate-new input{width:100%;min-width:0;box-sizing:border-box;padding:0 10px;border:2px solid #d9c08f;border-radius:10px;font:700 20px system-ui;text-align:right}
.rate-foot{position:sticky;bottom:-28px;background:#fff7e6;padding:8px 0 4px}.rate-foot button{width:100%}.rate-foot button:disabled{opacity:.5}
@media (max-width:640px){.rate-row{grid-template-columns:minmax(0,1fr) 120px}.rate-now{display:none}}
/* owner: rearrange categories and products */
.pos-menu-grid button.mn-rates{grid-column:auto}
.pos-menu-grid button.mn-arrange{background:#e3f4f2;border-color:#5fb5aa}.pos-menu-grid button.mn-arrange .mi,.pos-menu-grid button.mn-arrange .mt small{color:#0f6f64}
.arr-tabs,.arr-groups{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}.arr-groups[hidden]{display:none}
.arr-tabs button{flex:1}.arr-tabs button,.arr-groups button{border:2px solid #d9c08f!important;background:#fff!important;font-weight:800}
.arr-tabs button.active,.arr-groups button.active{background:#c62b28!important;border-color:#c62b28!important;color:#fff!important}
.arr-list{display:flex;flex-direction:column;gap:8px}
.arr-row{display:grid;grid-template-columns:34px minmax(0,1fr) 64px 56px 56px;align-items:center;gap:8px;padding:6px 10px;background:#fff;border:2px solid #eedbb4;border-radius:12px;font:700 16px system-ui}
.arr-row.moved{border-color:#048327;background:#effaf0}.arr-no{color:#7a6342;text-align:center}.arr-row button:disabled{opacity:.3}
.arr-foot{position:sticky;bottom:-28px;display:flex;flex-wrap:wrap;gap:10px;background:#fff7e6;padding:10px 0 4px}.arr-foot p{flex:1 0 100%;margin:0}.arr-foot p:empty{display:none}.arr-foot button{flex:1}
/* day closing: counted cash keypad, then Save and Print */
.closing input.cash-amount{width:100%;box-sizing:border-box;min-height:64px;padding:6px 16px;border:3px solid #3f2e0d;border-radius:14px;background:#fff;color:#3f2e0d;font:600 30px 'Oswald',system-ui;text-align:right;caret-color:#c62b28}
.closing input.cash-amount::placeholder{font:600 17px system-ui;text-align:left}
.closing>*{flex-shrink:0}
.cash-keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;width:100%;max-width:520px;align-self:center}
.pos-modal .cash-keypad button{min-height:58px;font:600 24px 'Oswald',system-ui;background:#fff;border:2px solid #eedbb4;border-radius:12px}
.pos-modal .cash-keypad button.wide{font:800 15px system-ui;background:#fdebc4}
.cash-keypad button.wide:last-child{grid-column:span 2}
.cl-actions{position:sticky;bottom:-28px;z-index:1;display:grid;grid-template-columns:1fr 1fr;gap:10px;background:#fff7e6;padding:10px 0 4px}
.cl-saved{grid-column:1/-1;margin:0;font:700 14px system-ui;color:#7a6342}
.pos-modal .cl-actions button{min-height:60px;font-size:18px;font-weight:800}
.pos-modal .cl-actions button.cl-print{background:#3f2e0d;border-color:#3f2e0d;color:#fff7e6}
@media (max-width:640px){.cl-actions{bottom:-20px}}
/* owner: one screen for rates, categories and order */
.pos-menu-grid button.mn-manage{grid-column:1/-1;background:#fff0cc;border-color:#e0ac2b}.pos-menu-grid button.mn-manage .mi,.pos-menu-grid button.mn-manage .mt small{color:#8a5a00}
.rate-search[hidden]{display:none}
.mng-body{display:flex;flex-direction:column;gap:8px}
.mng-row{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:8px 14px;background:#fff;border:2px solid #eedbb4;border-radius:12px}
.mng-row.changed{border-color:#048327;background:#effaf0}
.mng-choices{display:flex;flex-wrap:wrap;gap:6px}
.pos-modal .mng-choices button{min-width:92px;border:2px solid #d9c08f;background:#fff;font-weight:800}
.pos-modal .mng-choices button.active{background:#c62b28;border-color:#c62b28;color:#fff}
@media (max-width:760px){.mng-row{grid-template-columns:minmax(0,1fr)}.mng-choices button{flex:1}}
/* expenses: six categories, employee choice for labour advance */
.pos-exp-cats button{min-width:0;padding:0 4px;text-align:center}
@media (max-height:860px) and (min-width:1000px){.pos-exp-cats button{height:54px!important}[data-screen-label="08 Expense"]>div:last-child{gap:6px!important;padding:12px!important}[data-screen-label="08 Expense"]>div:last-child [style*="grid-template-columns: repeat(3, 1fr)"]:not(.pos-exp-cats) button{min-height:40px!important}}
/* owner: labour employees */
.pos-menu-grid button.mn-employees{grid-column:1/-1;background:#fde7e4;border-color:#e08a7d}.pos-menu-grid button.mn-employees .mi,.pos-menu-grid button.mn-employees .mt small{color:#a33425}
.emp-row{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:10px;padding:8px 10px;background:#fff;border:2px solid #eedbb4;border-radius:12px}
.emp-row input{width:100%;box-sizing:border-box;padding:0 12px;border:2px solid #d9c08f;border-radius:10px;font:700 17px system-ui}
.pos-modal button.emp-remove{background:#fff0ee;border-color:#e0a29a;color:#af0d15;font-weight:800}
/* owner: expense types and pigmi names */
.pos-menu-grid button.mn-expenses{grid-column:1/-1;background:#e8f0ff;border-color:#8fb0e8}.pos-menu-grid button.mn-expenses .mi,.pos-menu-grid button.mn-expenses .mt small{color:#244f9e}
.emp-row.pig-row{grid-template-columns:34px minmax(0,1fr) 120px auto}.emp-row input{min-height:48px;min-width:0}
@media (max-width:640px){.emp-row.pig-row{grid-template-columns:minmax(0,1fr) 100px auto}.emp-row.pig-row .arr-no{display:none}}
.pos-exp-cats button{overflow:hidden;overflow-wrap:anywhere}
@media (max-height:860px) and (min-width:1000px){.pos-exp-cats button{font-size:12px!important;line-height:1!important}.pos-exp-cats button>span:first-child{font-size:18px!important}}
/* owner: edit a saved expense */
.ee-body{display:flex;flex-direction:column;gap:10px}.ee-body>*{flex-shrink:0}.ee-body [hidden]{display:none}
.ee-body input.ee-note{width:100%;box-sizing:border-box;min-height:52px;padding:0 14px;border:2px solid #d9c08f;border-radius:12px;font:700 17px system-ui}
.ee-body input.cash-amount{width:100%;box-sizing:border-box;min-height:60px;padding:6px 16px;border:3px solid #3f2e0d;border-radius:14px;background:#fff;color:#3f2e0d;font:600 30px 'Oswald',system-ui;text-align:right}
html:not([data-bp="desktop"]) .pos-exp-row{gap:8px!important}html:not([data-bp="desktop"]) .pos-exp-icon{display:none!important}html:not([data-bp="desktop"]) .pos-exp-row button{width:56px!important;height:56px!important;flex-shrink:0}
html:not([data-bp="desktop"]) .pos-exp-row>span{min-width:0!important;font-size:12px}html:not([data-bp="desktop"]) .pos-exp-row>span:nth-last-of-type(1){font-size:21px!important}
/* opening cash in the counter */
.pos-menu-grid button.mn-opening{grid-column:1/-1;background:#dff3e4;border-color:#6fbf86}.pos-menu-grid button.mn-opening .mi,.pos-menu-grid button.mn-opening .mt small{color:#04752f}
.pos-modal .cl-last{background:#fdebc4;font-weight:800}
.cash-keypad button.wide.full:last-child{grid-column:1/-1}
.cl-actions.single{grid-template-columns:1fr}
/* compulsory day closing */
.pos-modal button.cl-field{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:64px;padding:8px 16px;background:#fff;border:3px solid #eedbb4;border-radius:14px;color:#3f2e0d;font:800 16px system-ui;text-align:left}
.pos-modal button.cl-field strong{font:600 30px 'Oswald',system-ui}.pos-modal button.cl-field.active{border-color:#c62b28;background:#fff6f4}
.cl-out{min-height:22px;font:800 16px system-ui;color:#7a6342}
.pos-modal button.cl-reopen{background:#fff0ee;border-color:#e0a29a;color:#af0d15}
#pos-day{position:fixed;right:8px;bottom:calc(8px + env(safe-area-inset-bottom));z-index:100000;border:2px solid #fff;border-radius:999px;padding:9px 14px;background:#c62b28;color:#fff;font:800 13px/1.2 system-ui;box-shadow:0 3px 10px #0006}
body.signed-out #pos-day{display:none}
.pos-modal.day-gate>button.primary{width:100%;min-height:64px;font-size:18px}
@media print{#pos-day{display:none!important}}
/* Wider Orders list so item names stay readable beside the Reprint button. */
html[data-bp="desktop"] [data-screen-label="04 Today's Sales"]{grid-template-columns:minmax(0,1fr) minmax(0,520px)!important}
