/* 5.4 shared operations. Layout stays responsive, zoom and accessibility retained. */
[hidden]{display:none!important}
.ops-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:14px 0}
.ops-settings{display:grid;gap:14px;max-width:1000px;margin:auto}
.ops-settings h2{margin-top:12px}.ops-settings p{line-height:1.5;color:#65594f}
.ops-stat-row{display:flex;flex-wrap:wrap;gap:10px;margin:15px 0}.ops-stat-row>span{border:1px solid #e4d9ca;border-radius:10px;background:#fff;padding:10px}
.ops-review{display:flex;flex-wrap:wrap;gap:12px;align-items:center;border-top:1px solid #eadfce;padding:12px 0}
.ops-notification-link{display:inline-flex;align-items:center;justify-content:center;gap:5px;flex-shrink:0;padding:8px 10px;border:1px solid #eadabb;border-radius:10px;text-decoration:none;color:#523b12;background:#fffaf0;font-size:13px;font-weight:700}
.ops-notification-link b:empty{display:none}.ops-notification-link b{border-radius:20px;background:#af3a21;color:white;padding:2px 5px}
.ops-notice{display:block;padding:16px;border:1px solid #e7ddce;border-radius:12px;text-decoration:none;color:#251c14;margin-top:10px}.ops-notice.is-unread{border-left:4px solid #cfa126;background:#fffbef}.ops-notice strong,.ops-notice p,.ops-notice small{display:block;margin:4px 0;overflow-wrap:anywhere}.ops-notice small{color:#7b6c5d}
.ops-toast{position:fixed;right:12px;top:calc(env(safe-area-inset-top,0px) + 65px);z-index:9000;max-width:min(350px,90vw);padding:12px 16px;background:#252016;color:white;border-radius:12px;box-shadow:0 5px 20px #0004;font-size:14px;text-decoration:none}
.customer-controls{display:flex;gap:8px;align-items:center;flex-wrap:wrap;grid-column:1/-1;margin:8px 0;font-size:13px}.customer-controls small{flex-basis:100%;color:#665d52}.cancel-order-button{padding:8px 10px;border:1px solid #a84434;background:#fff5f1;color:#8e2b23;border-radius:9px;cursor:pointer}.preparation-chip{background:#f7f2e7;color:#685025;padding:5px 9px;border-radius:20px}.delivery-eta{font-size:13px;line-height:1.5;flex-basis:100%;background:#edf7ed;border:1px solid #d4e5d3;padding:9px;border-radius:10px}.message-rider-link{color:#3c6b48;font-weight:700}
.chat-messages{min-height:200px;max-height:55vh;overflow-y:auto;display:flex;flex-direction:column;gap:9px;padding:12px 0}.chat-message{align-self:flex-start;max-width:87%;padding:10px 14px;background:#f1eee8;border-radius:12px;white-space:pre-wrap;overflow-wrap:anywhere}.chat-message.mine{align-self:flex-end;background:#e5f4e5}.chat-message small{display:block;color:#756a61;font-size:11px;margin-top:5px}.ops-chat textarea{width:100%;padding:12px;font:inherit;font-size:16px;border:1px solid #d5c8b9;border-radius:12px}.ops-chat{padding-bottom:calc(20px + env(safe-area-inset-bottom,0px))}
.ops-table-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:12px}.ops-table-card{min-height:150px;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:5px;text-align:center;border:1px solid #e6d7bd;border-top:4px solid #c9c0b3;background:#fff;border-radius:15px;text-decoration:none;color:#292019;padding:12px}.table-number{font-size:30px}.table-cooking,.table-ordered{border-top-color:#d8a128;background:#fffaf0}.table-ready,.table-partial-ready{border-top-color:#dd8900;background:#fff4db}.table-served{border-top-color:#218751;background:#e9f6ec}.ops-table-card small{font-size:12px;color:#756756}.ops-table-card span{font-size:13px;max-width:100%;overflow-wrap:anywhere}
/* Desktop sidebar: collapse only the layout width; mobile drawer stays available. */
.admin-topbar #menuButton{display:inline-flex!important;flex-shrink:0}
@media(min-width:981px){body.admin-body.sidebar-collapsed .admin-sidebar{transform:translateX(-100%)}body.admin-body.sidebar-collapsed .admin-main{margin-left:0!important;width:100%!important}body.admin-body.sidebar-collapsed{grid-template-columns:0 minmax(0,1fr)}body.admin-body.sidebar-collapsed .sidebar-backdrop{display:none!important}}
.machine-pos-layout{font-size:12px;display:flex;align-items:center;gap:5px}.machine-pos-layout select{max-width:165px;padding:6px;border:1px solid var(--admin-line,#d9c49b);border-radius:8px;background:var(--admin-surface,#fff);color:var(--admin-ink,#241c18)}.machine-pos-layout option{background:var(--admin-surface,#fff);color:var(--admin-ink,#241c18)}
/* POS editor: category rail + products, current bill details first. */
.pos-heading{margin-bottom:12px}.pos-heading h1{font-size:27px!important;line-height:1.2}.pos-heading p:not(.admin-kicker){font-size:13px}.pos-layout{align-items:start;grid-template-columns:minmax(0,1fr) minmax(300px,380px)!important;gap:14px!important}
.pos-catalog{min-width:0}.pos-catalog-inner{display:grid;grid-template-columns:116px minmax(0,1fr);gap:10px}.pos-category-rail{display:flex;flex-direction:column;gap:6px;max-height:70vh;overflow-y:auto;padding:4px}.pos-category-button{min-height:48px;background:#f8f5ef;border:1px solid #e6dac7;border-radius:9px;padding:7px;color:#554227;font:inherit;font-size:12px;cursor:pointer;overflow-wrap:anywhere;text-align:left}.pos-category-button.is-selected{background:#cfa224;color:#201806;border-color:#cfa224;font-weight:800}.pos-catalog-toolbar{padding:12px!important;gap:8px!important}.pos-catalog-toolbar #posCategory{max-width:150px}.pos-catalog-inner .pos-product-grid{padding:8px!important;gap:8px!important;grid-template-columns:repeat(auto-fill,minmax(135px,1fr))!important;align-content:start;max-height:70vh;overflow-y:auto}.pos-product{min-width:0!important;overflow:hidden!important}.pos-product img{height:88px!important;object-fit:cover}.pos-product strong{font-size:13px!important;line-height:1.25!important;white-space:normal!important}.pos-product small{font-size:11px!important}.pos-product b{font-size:16px!important}
.pos-cart .card-heading{padding:12px!important}.pos-customer-fields{padding:0 12px}.pos-customer-fields .compact-grid{gap:8px!important}.pos-customer-fields .admin-field input,.pos-customer-fields .admin-field select,.pos-customer-fields .admin-field textarea{padding:8px!important;font-size:14px;min-height:38px}.pos-customer-fields .admin-field span{font-size:12px}.pos-cart-lines{max-height:300px;overflow-y:auto;padding:8px 12px!important}.pos-total-box{margin:0 12px!important;padding:9px!important}.pos-cart form#posCheckout{padding:10px 12px!important;display:grid;gap:9px}.pos-cart form#posCheckout textarea{font-size:14px;padding:8px;min-height:48px}.pos-cart .pos-create-button{min-height:48px;font-size:15px}.pos-cart-row{gap:7px!important;padding:9px 0!important}.pos-cart-row strong{font-size:13px!important}.pos-cart-row small{font-size:11px!important;overflow-wrap:anywhere}.pos-cart-row .pos-row-controls button{width:35px;height:35px}
/* Captain requested ordering: full Current bill above product search at every size. */
.pos-editor.captain-editor .pos-layout{display:flex;flex-direction:column}.captain-editor .pos-cart{order:-1;width:100%}.captain-editor .pos-catalog{width:100%}.captain-editor .pos-cart-lines{max-height:260px}.captain-editor .pos-customer-fields .compact-grid{grid-template-columns:repeat(4,minmax(0,1fr))}.captain-editor .pos-customer-fields .full{grid-column:1/-1}
/* Per-machine compact touch profile: no fixed desktop assumptions on 1024x768 POS. */
html.pos-touch .admin-content{max-width:none;padding:10px!important}html.pos-touch .admin-topbar{min-height:52px;padding:8px 12px!important}html.pos-touch .page-heading{margin:6px 0 10px}html.pos-touch .page-heading h1{font-size:23px!important}html.pos-touch .pos-heading p:not(.admin-kicker){display:none}html.pos-touch .pos-layout{grid-template-columns:minmax(0,1fr) minmax(290px,350px)!important;gap:9px!important}html.pos-touch .pos-cart-lines{max-height:175px}html.pos-touch .pos-total-box{font-size:13px}html.pos-touch .pos-catalog-inner{grid-template-columns:95px minmax(0,1fr)}html.pos-touch .pos-product img{height:68px!important}html.pos-touch .pos-catalog-inner .pos-product-grid{grid-template-columns:repeat(auto-fill,minmax(115px,1fr))!important;max-height:calc(100dvh - 190px)}html.pos-touch .pos-catalog-toolbar #posCategory{display:none}html.pos-touch .pos-cart form#posCheckout textarea{min-height:34px;height:38px}html.pos-touch .pos-customer-fields .admin-field input{min-height:34px}html.pos-touch .pos-cart .card-heading h2{font-size:19px}html.pos-touch .ops-table-card{min-height:125px}
@media(max-width:760px){.pos-layout{display:flex!important;flex-direction:column}.pos-cart,.pos-catalog{width:100%;min-width:0}.pos-cart{order:-1}.pos-catalog-inner{display:block!important}.pos-category-rail{flex-direction:row;overflow-x:auto;max-height:none}.pos-category-button{min-width:90px;max-width:120px;flex-shrink:0;text-align:center}.pos-product-grid{max-height:none!important}.captain-editor .pos-customer-fields .compact-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.machine-pos-layout{display:none}.admin-user{gap:6px}.ops-notification-link{font-size:12px;padding:6px}.ops-chat h1{font-size:23px}.ops-actions>*{max-width:100%}.pos-customer-fields input,.pos-customer-fields textarea,.pos-cart textarea{font-size:16px!important}.ops-table-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.ops-table-card{padding:8px;min-height:145px}.table-number{font-size:26px}}
/* Hide install everywhere on small/native screens; installed desktop PWA too. */
@media(max-width:900px),(pointer:coarse){[data-pwa-install],#installButton,.install-app-button{display:none!important}}
html.native-app [data-pwa-install],html.native-app #installButton,html.installed-app [data-pwa-install],html.installed-app #installButton{display:none!important}
/* Prevent CSS grid from shrinking hundreds of products into clipped strips. */
.pos-catalog-inner .pos-product-grid{grid-auto-rows:max-content!important;grid-template-columns:repeat(auto-fill,minmax(150px,1fr))!important;align-content:start!important}
.pos-product{display:flex!important;flex-direction:column;align-items:stretch;gap:7px;min-height:155px!important;padding:9px!important;overflow:visible!important}
.pos-product img{width:100%!important;height:78px!important;flex:none;object-fit:cover;grid-row:auto!important}
.pos-product span{width:100%;display:block}.pos-product strong{overflow:visible!important;text-overflow:clip!important;white-space:normal!important;overflow-wrap:anywhere}
.pos-product b{margin-top:auto;text-align:right}.pos-product small{white-space:normal!important}
.pos-catalog-toolbar{grid-template-columns:minmax(0,1fr) 145px!important;margin-bottom:5px!important}
html.pos-touch .pos-catalog-toolbar{grid-template-columns:1fr!important;padding:5px!important}
html.pos-touch .pos-catalog-inner .pos-product-grid{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))!important}
html.pos-touch .pos-product{min-height:142px!important}html.pos-touch .pos-product img{height:64px!important}
html.pos-touch .pos-product small{display:none}html.pos-touch .pos-cart{padding:10px!important;top:65px}
.pos-customer-fields fieldset{margin:0 0 8px;padding:0;border:0}.pos-customer-fields fieldset legend{padding:0 0 5px;font-size:12px;font-weight:700}
.pos-cart .card-heading{margin-bottom:6px!important}.pos-cart .card-heading p{margin:3px 0 0}
.pos-cart-lines .admin-empty.compact{min-height:76px!important;padding:10px!important}.pos-cart-lines .admin-empty.compact>span{width:34px;height:34px;font-size:18px}.pos-cart-lines .admin-empty.compact>p{margin:6px 0;font-size:12px}
.admin-topbar #menuButton{border:1px solid #ded4c6;border-radius:9px;background:#fff9ec;align-items:center;justify-content:center;width:38px;height:38px;margin-right:10px;color:#574521;cursor:pointer}
@media(max-width:600px){.pos-catalog-toolbar{grid-template-columns:1fr!important}.pos-product{min-height:145px!important}.pos-cart{position:static}}
