.admin-body{background:#f7f2e9;padding-bottom:25px}.admin-wrap{width:min(1100px,calc(100% - 36px));margin:25px auto}.admin-header{display:flex;align-items:center;gap:20px;padding:20px 5%;background:#fffaf3;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:10}.admin-header strong{font-size:1.125rem}.badge{margin-left:auto;min-width:32px;height:32px;padding:3px 9px;border-radius:20px;background:#f3ccdc;text-align:center}.login-card{max-width:460px;margin:55px auto}.login-card h1{font-size:28px;letter-spacing:-1px}.login-card form{margin-top:25px}.stats{display:flex;align-items:center;gap:25px;flex-wrap:wrap;margin-bottom:25px}.stats>div{background:#fffaf3;border-radius:18px;padding:15px 23px;min-width:160px}.stats small{display:block;font-size:1rem;color:var(--muted)}.stats strong{display:block;font-size:23px}.admin-tabs{display:flex;gap:10px;flex-wrap:wrap;border-bottom:1px solid var(--line);padding-bottom:20px;margin-bottom:22px}.admin-tabs button{border:0;background:#eae1d6;border-radius:24px;padding:11px 19px;font-size:1rem}.admin-tabs button.selected{background:var(--ink);color:white}.admin-tabs a{margin-left:auto}.order-tools{display:flex;gap:15px;justify-content:space-between;margin-bottom:12px}.order-tools form{display:flex;gap:8px;max-width:480px}.order-tools input{max-width:300px}.orders{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:20px;margin-top:22px}.order-card{background:#fffdf7;border:1px solid var(--line);border-radius:24px;overflow:hidden}.order-card header{padding:18px 22px;display:flex;align-items:center;gap:12px;background:#f8e0e9}.order-card.paid header{background:#dfeef6}.order-card.completed header{background:#e4eddc}.order-card h2{font-size:26px;letter-spacing:0}.order-card .identity{font-size:1rem;overflow-wrap:anywhere}.order-card .body{padding:20px}.order-meta{font-size:1rem;display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:var(--muted);margin-bottom:15px}.order-line{border-top:1px solid var(--line);padding-top:18px;margin-top:18px}.order-line:first-child{border-top:0;padding-top:0;margin-top:0}.line-top{display:flex;align-items:center;gap:15px}.line-top img{width:94px;height:94px;object-fit:contain;background:#f5ece2;border-radius:14px}.line-top h3{font-size:1.125rem}.line-top p{font-size:1rem}.order-content{white-space:pre-wrap;overflow-wrap:anywhere;background:#f6f1e8;padding:14px;border-radius:12px;font-size:1rem;margin:14px 0;max-height:220px;overflow:auto;user-select:text}.line-actions{display:flex;flex-wrap:wrap;gap:9px}.line-actions .button{flex:1;padding:12px 13px;font-size:1rem}.order-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px}.order-actions select{flex:1;min-width:130px}.order-actions .button{flex:1;white-space:nowrap}.order-card details{margin-top:14px;font-size:1rem;overflow-wrap:anywhere}.order-card details summary{cursor:pointer}.product-controls{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px}.product-controls button{flex:1}.checkbox{display:flex!important;gap:10px;align-items:center}.checkbox input{width:20px;min-height:20px}.product-form{margin-top:25px}#product-form{margin-top:25px;max-width:660px}#image-preview{width:180px;height:180px;object-fit:contain;background:#f5eadc;border-radius:15px;margin-bottom:18px}.admin-body .shop-grid{margin-top:25px}#load-more{margin-top:25px}.row-note{font-size:1rem;color:#8c643d;margin:14px 0}.manual-copy{width:100%;margin-top:10px}.admin-header .logo{font-size:24px}@media(max-width:700px){.admin-header{padding:15px 18px;gap:12px}.admin-header strong{font-size:1rem}.admin-wrap{margin-top:18px}.orders{grid-template-columns:1fr;gap:16px}.stats{gap:10px}.stats>div{padding:12px 15px;min-width:0;flex:1}.stats strong{font-size:1.375rem}.stats>span{width:100%}.admin-tabs{gap:7px}.admin-tabs button{font-size:1rem;padding:10px 13px}.admin-tabs a{margin-left:0}.order-card .body{padding:17px}.order-card header{padding:15px 17px}.line-top img{width:86px;height:86px}.order-tools{gap:8px}.order-tools form{min-width:0}.order-tools input{min-width:0}.order-tools button{white-space:nowrap}.login-card{margin-top:25px}.order-content{font-size:1.125rem}.admin-body .shop-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}

.admin-body p,.admin-body input,.admin-body select,.admin-body textarea,.admin-body button{font-size:1.125rem}.admin-body small{font-size:1rem}.order-tools{flex-wrap:wrap}.order-tools form{min-width:0;max-width:100%}.admin-header{flex-wrap:wrap}

.cms-toolbar{display:flex;flex-wrap:wrap;gap:10px;margin:24px 0}.cms-group{padding:22px;margin:22px 0;background:#fffaf3;border:1px solid var(--line);border-radius:20px}.cms-row{display:flex;align-items:center;flex-wrap:wrap;gap:12px;padding:16px 0;border-bottom:1px solid var(--line)}.cms-row strong{flex:1;min-width:140px}.cms-row button{padding:10px}.cms-image{display:block;max-width:100%;width:220px;max-height:220px;object-fit:contain;margin:16px 0}.cms-field{display:block;margin:18px 0}.cms-field span{display:block;font-weight:700;margin-bottom:8px}.cms-field textarea{width:100%;min-height:100px}.cms-hint{color:#93603b}.cms-block{border-top:1px solid var(--line);margin-top:24px;padding-top:24px}.cms-row input[type=checkbox]{width:24px;height:24px}.cms-group select{max-width:100%}.cms-toolbar .button{white-space:normal}@media(max-width:700px){.cms-toolbar .button{flex:1;min-width:130px}.cms-group{padding:16px}.admin-body .shop-grid{grid-template-columns:1fr}}

.cms-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:20px 0}.cms-tabs button{flex:1;min-width:140px;border:1px solid var(--line);padding:12px;border-radius:14px;background:#fffaf3}.cms-tabs button[aria-pressed=true]{background:var(--ink);color:#fff}.cms-group[hidden]{display:none}

/* Familiar section-list → editor workflow, preserving all saved CMS keys. */
.content-managing{padding-bottom:120px}.content-managing .admin-header{position:static}.content-managing .cms-toolbar{position:fixed;bottom:0;left:0;right:0;z-index:30;margin:0;padding:12px max(18px,calc((100vw - 1100px)/2)) calc(12px + env(safe-area-inset-bottom));background:#fffaf3;border-top:1px solid var(--line);box-shadow:0 -4px 18px #69452f0b;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.cms-toolbar .button{min-width:0;padding:12px 8px}.cms-section-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-top:24px}.cms-section-card{border:1px solid var(--line);border-radius:16px;background:#fff;display:flex;flex-direction:column;align-items:flex-start;gap:14px;text-align:left;padding:20px;min-height:110px}.cms-section-card strong{font-size:20px}.cms-section-card span{font-size:16px;color:var(--muted)}.cms-section-card img{width:100%;height:110px;object-fit:contain;border-radius:10px;background:#fff9ef}.cms-edit-screen>h3{margin:16px 0;font-size:26px}.cms-language-field{display:flex;align-items:center;gap:12px;margin:18px 0 8px}.cms-language-field select{width:auto;max-width:220px}.cms-form-section{border-top:1px solid var(--line);padding-top:20px;margin-top:24px}.cms-form-section h4,.cms-form-section summary{font-size:20px;margin:0 0 16px;font-weight:700}.cms-field>span{font-size:18px;font-weight:500}.cms-field input[type=text]{width:100%;min-height:48px;padding:12px 14px}.cms-field textarea{min-height:84px;padding:12px 14px;line-height:1.65}.cms-image{width:100%;max-width:320px;height:180px;border:1px solid var(--line);border-radius:14px;background:white}.cms-button-row+.cms-button-row{border-top:1px solid var(--line);padding-top:20px}.cms-button-settings summary{cursor:pointer}.cms-group.cms-edit-screen{background:#fffdf8}@media(max-width:700px){.cms-section-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.cms-section-card{padding:15px}.cms-section-card strong{font-size:18px}.cms-language-field{flex-wrap:wrap}.cms-tabs button{min-width:0;font-size:16px;padding:12px 7px}.content-managing .cms-toolbar .button{min-width:0;font-size:18px}.cms-section-card img{height:90px}}

/* Counter checkout shares catalog and order records with the storefront. */
.pos-search{display:flex;gap:10px;margin:18px 0}.pos-search input{min-width:0;flex:1}.pos-search button{flex-shrink:0}.pos-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:24px;margin-top:24px}.pos-products{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:16px}.pos-product{background:#fffaf3;border:1px solid var(--line);border-radius:18px;padding:12px;text-align:left;display:flex;flex-direction:column;gap:10px;overflow-wrap:anywhere}.pos-product img{width:100%;aspect-ratio:1;object-fit:contain;border-radius:12px}.pos-product strong{font-size:18px}.pos-product span{font-size:16px}.pos-basket{background:#fffaf3;border:1px solid var(--line);border-radius:22px;padding:22px;min-width:0}.pos-line{border-bottom:1px solid var(--line);padding:18px 0}.pos-line-head{display:flex;gap:12px;align-items:center}.pos-line-head img{width:64px;height:64px;object-fit:contain;border-radius:10px}.pos-line-head strong{font-size:18px}.pos-quantity{display:flex;align-items:center;gap:10px;margin-top:12px}.pos-quantity button{min-width:44px;min-height:44px}.pos-quantity input{width:82px;text-align:center}.pos-line textarea{width:100%;margin-top:10px}.pos-total{font-size:26px!important;font-weight:700;padding:18px 0}#pos-pay{width:100%;margin-top:14px}#pos-message{margin:16px 0;overflow-wrap:anywhere}#pos-cash-label button{margin-top:8px}#pos-receipt{margin:20px 0}#pos-receipt h3{margin-bottom:12px}#pos-receipt .actions{margin-top:18px}
@media(max-width:760px){.pos-layout{grid-template-columns:1fr}.pos-products{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}.pos-product{padding:9px}.pos-product strong{font-size:16px}.pos-search{flex-wrap:wrap}.pos-search input{flex-basis:190px}.pos-basket{padding:16px}}
.product-barcode{overflow-wrap:anywhere;font-size:16px!important;user-select:all}

.label-copy-fallback{width:100%;margin-top:12px}

#safety-status{padding:18px;background:#fff0cc;border:1px solid #dbc59b;border-radius:16px}#backup-status,#backup-check-status{margin:18px 0;overflow-wrap:anywhere}#backup-view h3{margin-top:24px}

.daily-export{background:#fffaf3;border:1px solid var(--line);border-radius:18px;padding:18px;margin-bottom:22px}.daily-export form{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.daily-export input{width:auto;max-width:100%;min-width:0}.daily-export p{margin-top:10px}.content-managing .daily-export{display:none}@media(max-width:700px){.daily-export label{width:100%}.daily-export button[type=submit]{width:100%}}

.pos-table-head,.pos-compact-row{display:grid;grid-template-columns:minmax(0,1fr) 110px minmax(72px,auto);gap:8px;align-items:center;padding:10px 0;border-bottom:1px solid #decbbf;font-size:16px}.pos-compact-name{display:flex;align-items:center;gap:6px;min-width:0}.pos-compact-name img{width:36px;height:36px;object-fit:cover;border-radius:6px}.pos-compact-name strong{overflow-wrap:anywhere}.pos-stepper{display:flex;align-items:center;justify-content:space-between;gap:4px}.pos-stepper button{min-width:36px;min-height:44px;border:1px solid #dcc9bd;border-radius:9px;background:#fffaf3;color:#694833;font-size:24px}.pos-basket #pos-total{position:sticky;bottom:0;background:#fffaf3;padding:12px;z-index:2}.pos-products{max-height:240px;overflow:auto}
.pos-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:start;gap:20px}.camera-open{width:100%;margin:0 0 10px}#pos-camera-video{display:block;width:100%;height:260px;object-fit:contain;background:#231d1a;border-radius:12px}#pos-camera-status{font-size:16px;line-height:1.4;margin:8px 0;min-height:2.8em}.pos-alternatives{margin-top:12px}.pos-basket{min-width:0}.pos-basket h3{margin:0 0 10px}#pos-lines{max-height:38dvh;overflow:auto}#pos-camera-panel[hidden]{display:none}.pos-compact-row strong{font-size:16px}@media(max-width:650px){.pos-layout{display:flex;flex-direction:column;gap:12px}.pos-scan-panel,.pos-basket{width:100%}.pos-basket{order:0}#pos-camera-video{height:180px}.pos-compact-name img{display:none}.pos-table-head,.pos-compact-row{grid-template-columns:minmax(0,1fr) 106px 82px;gap:4px}.pos-compact-row strong{font-size:15px}.pos-basket{padding:14px}#pos-lines{max-height:32dvh}}

#pos-cash-actions{display:grid;grid-template-columns:minmax(110px,.8fr) minmax(0,1.2fr);gap:12px;align-items:stretch;margin:10px 0 18px}#pos-cash-actions[hidden]{display:none}#pos-change{display:flex;flex-direction:column;justify-content:center;gap:4px;background:#dcefe9;color:#244e43;border:2px solid #a7cbbb;border-radius:16px;padding:12px 16px;min-height:86px}#pos-change span{font-size:18px;font-weight:700}#pos-change strong{font-size:clamp(24px,5vw,34px);line-height:1.15;overflow-wrap:anywhere}#pos-change.cash-short{background:#ffe4df;border-color:#dc9a8f;color:#85392b}#pos-exact{font-size:19px}

/* Wide landscape viewport; preserve image proportions and scanner lifecycle. */
#pos-camera-video{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;object-position:center;background:#231d1a}

/* Dedicated cashier view: management pages are reached from the header menu. */
.admin-header{padding:10px 18px;gap:12px}.admin-header .logo{font-size:20px}.admin-header .badge{display:none}#admin-menu-toggle{margin-left:auto}#admin-navigation{position:fixed;right:18px;top:72px;width:min(340px,calc(100vw - 36px));max-height:80dvh;overflow:auto;z-index:30;display:grid;grid-template-columns:1fr;background:#fffaf3;box-shadow:0 10px 40px #34231c30;border:1px solid var(--line);border-radius:18px;padding:12px}#admin-navigation[hidden]{display:none}#admin-navigation button,#admin-navigation a{text-align:left;margin:0;width:100%}.pos-active .admin-wrap{width:min(1280px,calc(100% - 24px));margin:12px auto}.pos-active .section-top{margin-bottom:8px}.pos-active .section-top h2{font-size:22px}#pos-message{font-size:14px;margin:4px 0;min-height:0}#pos-message:empty{display:none}.pos-layout{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:18px}.pos-tools{display:flex;gap:8px;margin-bottom:10px}.pos-tools input{flex:1}.pos-tools .camera-open{width:auto;white-space:nowrap;margin:0}.pos-products{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;max-height:58dvh;overflow:auto;align-content:start}.pos-product{display:flex;flex-direction:column;align-items:center;justify-content:start;min-width:0;padding:8px;background:#fffdf7;border:1px solid var(--line);border-radius:12px;gap:4px}.pos-product img{width:100%;height:82px;object-fit:contain;background:#faf4ef;border-radius:8px}.pos-product strong{font-size:14px;line-height:1.3;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.pos-product span{font-size:14px;line-height:1.3}.pos-product:active{background:#f5d8e4}.pos-alternatives{font-size:14px;margin:8px 0}.pos-alternatives summary{padding:8px 0;cursor:pointer}.pos-basket{background:#fffdf7;border:1px solid var(--line);border-radius:16px;padding:16px}#pos-lines{max-height:38dvh;overflow:auto}.pos-line-actions{display:flex;gap:5px;margin-top:3px}.pos-line-actions button{border:0;background:#f1e6dc;color:var(--ink);border-radius:8px;font-size:12px;min-height:32px;padding:4px 8px}.pos-compact-name{display:block;min-width:0}.pos-line-amount{text-align:right}.pos-line-amount strong{display:block}.pos-line-amount del{font-size:12px;color:var(--muted)}#pos-discount-panel{font-size:14px;border-block:1px solid var(--line);padding:8px 0;margin-top:8px}#pos-discount-panel summary{cursor:pointer;min-height:36px;display:flex;align-items:center}.discount-fields{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}.discount-fields label{font-size:14px;line-height:1.5}.discount-fields input{margin-top:4px;font-size:18px}.pricing-row{display:flex;justify-content:space-between;gap:8px;font-size:14px;margin:4px 0}#pos-total{margin:10px 0;font-size:23px;font-weight:800}#pos-pay-form label{display:block;margin-bottom:9px;font-size:15px}#pos-pay{width:100%;margin-top:10px}#line-discount-dialog{border:1px solid var(--line);border-radius:20px;padding:24px;width:min(460px,calc(100vw - 24px));color:var(--ink);background:#fffaf3}#line-discount-dialog::backdrop{background:#231d1a77}#line-discount-dialog .actions{margin-top:18px;gap:8px}#line-discount-result{font-size:20px;font-weight:700}.report-totals{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:14px;margin:20px 0}.report-total-card{border:1px solid #c8d9bd;background:#edf3e6;border-radius:18px;padding:20px}.report-total-card strong{display:block;font-size:34px}.report-table-scroll{overflow:auto;margin:12px 0 24px}.report-table-scroll table{min-width:480px;table-layout:auto}.report-table-scroll th,.report-table-scroll td{padding:12px;font-size:15px}.daily-export{border:0;background:none;padding:0}.daily-export form{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:16px 0}.daily-export input{width:auto}.daily-export h3{font-size:22px}#daily-report-status{font-size:14px}
@media(max-width:760px){.pos-layout{display:flex;flex-direction:column;gap:10px}.pos-products{grid-template-columns:repeat(3,minmax(0,1fr));max-height:34dvh}.pos-product img{height:65px}.pos-basket{padding:12px;width:100%}.pos-scan-panel{width:100%}#pos-lines{max-height:26dvh}.pos-compact-row{grid-template-columns:minmax(0,1fr) 102px 82px}.pos-active .admin-header strong{font-size:16px}.admin-header #logout{font-size:13px;padding:7px 10px}.pos-tools input{width:0;min-width:0}.pos-active .admin-wrap{margin-top:8px}.pos-active .section-top{margin-bottom:4px}#pos-total{font-size:21px}}

.pos-layout,.pos-products{margin-top:0}#pos-total{padding:8px 0;font-size:23px!important}

/* Cashier workspace: browsing and payment have separate space on small screens. */
body.pos-active{height:100vh;height:100dvh;overflow:hidden;padding:0;display:flex;flex-direction:column}
.pos-active .admin-header{position:relative;flex:0 0 auto;min-height:56px;padding:8px 14px;flex-wrap:nowrap}
.pos-active .admin-header .logo{font-size:20px}
.pos-active .admin-header #logout{font-size:13px;min-height:40px;padding:6px 10px}
.pos-active .admin-wrap{display:flex;flex-direction:column;flex:1;min-height:0;width:calc(100% - 24px);max-width:none;margin:0 auto;padding-bottom:max(8px,env(safe-area-inset-bottom));overflow:hidden}
.pos-active #admin-status:empty{display:none}
.pos-active #admin-status,.pos-active #safety-status{flex:none;font-size:13px;line-height:1.4;margin:4px 0}
.pos-active #workspace,.pos-active #pos-view,.pos-active #pos-edit{display:flex;flex-direction:column;flex:1;min-height:0;overflow:hidden}
.pos-active .pos-workbar{display:flex;flex:none;margin:0 0 8px;gap:8px;align-items:center}
.pos-active .pos-pane-switch{display:flex;gap:6px;min-width:0;flex:1}
.pos-pane-switch button{border:1px solid var(--line);background:#fffaf3;border-radius:10px;padding:8px 14px;min-height:44px;font-size:15px}
.pos-pane-switch button[aria-pressed=true]{background:var(--ink);color:#fffaf3}
#pos-basket-count{display:inline-flex;align-items:center;justify-content:center;border-radius:20px;min-width:22px;font-size:13px;padding:0 4px;background:#ffffff35}
.pos-active #pos-clear{min-height:44px;font-size:14px;padding:8px 10px}
.pos-active #pos-message{flex:none;max-height:44px;overflow:auto;margin:0 0 4px;font-size:13px;line-height:1.4}
.pos-active .pos-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(340px,40%);flex:1;min-height:0;gap:12px;margin:0;overflow:hidden}
.pos-active .pos-scan-panel{display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden}
.pos-active .pos-tools{flex:none;margin-bottom:8px;min-width:0}
.pos-active .pos-tools input{min-width:0;width:0;min-height:44px;padding:8px 12px;font-size:16px}
.pos-active .pos-tools button{min-height:44px;padding:8px 12px;font-size:15px}
.pos-active .pos-products{flex:1;min-height:0;max-height:none;overflow-y:auto;overscroll-behavior:contain;grid-template-columns:repeat(auto-fill,minmax(105px,1fr));margin:0;padding:0 3px 8px 0;align-content:start}
.pos-active .pos-product{min-height:128px;gap:4px;padding:8px}
.pos-active .pos-product img{height:78px}
.pos-active .pos-product strong,.pos-active .pos-product span{font-size:14px}
.pos-active .pos-alternatives{flex:0 1 auto;max-height:40%;overflow:auto;margin:4px 0 0;font-size:13px}
.pos-active .pos-alternatives>summary{min-height:40px;padding:8px 0}
.pos-active #pos-camera-panel{flex:none;max-height:190px;overflow:hidden;margin:0 0 8px}
.pos-active #pos-camera-video{width:100%;height:140px;object-fit:cover}
.pos-active #pos-camera-status{font-size:12px;margin:0}
.pos-active .pos-basket{display:grid;grid-template-rows:minmax(110px,1fr) auto;min-height:0;min-width:0;padding:12px;gap:8px;overflow:auto;overscroll-behavior:contain}
.pos-active .pos-review{display:flex;flex-direction:column;min-height:0;overflow:auto}
.pos-active #pos-order-title{font-size:16px;margin-bottom:4px;flex:none}
.pos-active #pos-lines{flex:1;min-height:60px;max-height:none;overflow:auto;overscroll-behavior:contain}
.pos-active .pos-table-head,.pos-active .pos-compact-row{grid-template-columns:minmax(0,1fr) 96px 85px;font-size:14px;gap:6px;padding:7px 0}
.pos-active .pos-stepper button{min-width:32px;min-height:44px;font-size:22px}
.pos-active .pos-line-actions{flex-wrap:wrap;gap:4px}
.pos-active .pos-line-actions button{font-size:12px;padding:4px 7px;min-height:36px}
.pos-active .pos-line-amount strong{font-size:14px;overflow-wrap:anywhere}
.pos-active #pos-discount-panel{flex:none;padding:2px 0;margin:5px 0 0;font-size:13px}
.pos-active #pos-discount-panel summary{min-height:36px}
.pos-active #pos-pricing-breakdown{flex:none}
.pos-active .pricing-row{font-size:12px;line-height:1.5;margin:2px 0}
.pos-active .pos-payment{min-width:0;border-top:1px solid var(--line);padding-top:5px}
.pos-active .pos-basket #pos-total{position:static;bottom:auto;z-index:auto;padding:3px 0;margin:0 0 6px;background:none;font-size:20px!important;line-height:1.5}
.pos-active #pos-pay-form{margin:0}
.pos-method-buttons{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:5px;margin-bottom:8px}
.pos-active .pos-method-buttons button{border:1px solid #d3bca9;background:#fffaf4;border-radius:9px;font-size:14px;line-height:1.2;min-height:44px;padding:5px 3px}
.pos-method-buttons button[aria-checked=true]{background:var(--ink);color:white;border-color:var(--ink)}
.pos-active #pos-cash-label{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 6px;font-size:14px}
.pos-active #pos-cash{width:160px;max-width:55%;text-align:right;font-size:22px;padding:5px 10px;min-height:40px;background:#f4eee3;border:1px solid var(--line);border-radius:9px;caret-color:transparent}
.pos-denominations{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:5px}
.pos-active .pos-denominations button,.pos-active #pos-keypad button{min-height:44px;border:1px solid #d4c2ae;border-radius:9px;background:#f1e5d7;font-size:16px;line-height:1;padding:8px 1px}
.pos-denominations button:active{background:#dec0a5}
.pos-cash-shortcuts{display:flex;gap:6px;margin:6px 0}
.pos-active .pos-cash-shortcuts button{min-height:36px;flex:1;font-size:13px;padding:4px;border:1px solid var(--line);background:transparent;border-radius:8px}
.pos-active #pos-cash-actions{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:4px 0}
.pos-active #pos-exact{font-size:14px;padding:6px 10px;min-height:40px;margin:0}
.pos-active #pos-change{display:flex;align-items:center;gap:8px;font-size:14px}
.pos-active #pos-change strong{font-size:19px}
.pos-active #pos-pay{min-height:48px;font-size:17px;margin-top:6px;padding:8px 14px}
#pos-keypad{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:6px 0}
.pos-active #pos-receipt,.pos-active #pos-retry{overflow:auto;max-height:100%;margin:8px 0}
.pos-active #pos-view:has(#pos-receipt:not([hidden])) #pos-edit,.pos-active #pos-view:has(#pos-retry:not([hidden])) #pos-edit{display:none}
@media(min-width:768px){.pos-pane-switch button[aria-pressed=false]{background:#fffaf3;color:var(--ink)}}
@media(max-width:767px){
 .pos-active .admin-header{padding:6px 10px;gap:10px;min-height:52px}
 .pos-active .admin-wrap{width:calc(100% - 16px)}
 .pos-active .admin-header strong{font-size:15px}
 .pos-active .pos-layout{display:flex;flex-direction:column;gap:0}
 .pos-active .pos-pane-switch button{font-size:14px;padding:7px 10px}
 .pos-active .pos-workbar{margin-bottom:6px}
 .pos-active #pos-clear{font-size:12px;padding:6px}
 .pos-active .pos-scan-panel,.pos-active .pos-basket{flex:1;width:100%;min-height:0}
 #pos-view[data-pane=products] .pos-basket{display:none}
 #pos-view[data-pane=checkout] .pos-scan-panel{display:none}
 .pos-active .pos-products{grid-template-columns:repeat(3,minmax(0,1fr));max-height:none;gap:7px}
 .pos-active .pos-product{min-height:130px}
 .pos-active .pos-product img{height:78px}
 .pos-active .pos-basket{padding:8px;gap:5px;border-radius:12px}
 .pos-active .pos-table-head,.pos-active .pos-compact-row{grid-template-columns:minmax(0,1fr) 92px 78px;font-size:13px}
 .pos-active .pos-basket #pos-total{font-size:19px!important}
 .pos-active #pos-cash{font-size:20px}
 .pos-active .pos-method-buttons button{font-size:13px}
 .pos-active .pos-denominations button{font-size:15px}
}

/* Three independent work areas: payment never consumes basket height. */
.pos-active .pos-layout{align-items:stretch;grid-template-rows:minmax(0,1fr);grid-template-columns:minmax(220px,1fr) minmax(320px,1.15fr) minmax(280px,.9fr)}
.pos-active .pos-basket{display:flex;flex-direction:column;overflow:hidden;grid-template-rows:none}
.pos-active .pos-review{flex:1;overflow:hidden;min-height:0}
.pos-active #pos-lines{flex:1;max-height:none;min-height:0;overflow:auto}
.pos-active .pos-payment{min-height:0;overflow:auto;overscroll-behavior:contain;margin:0;padding:14px;border:1px solid var(--line);border-radius:14px;background:#fffaf3}
.pos-active #pos-total{position:static;font-size:21px;margin:0 0 14px}
.pos-active .pos-method-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}
.pos-active .pos-denominations{grid-template-columns:repeat(4,minmax(0,1fr))}
.offline-bar{display:flex;align-items:center;gap:8px;flex:none;flex-wrap:wrap;font-size:13px;margin-bottom:6px}
.offline-bar span{flex:1;min-width:140px}.offline-bar button{border:1px solid var(--line);border-radius:8px;background:#fffaf3;min-height:36px;padding:5px 9px}
@media(min-width:768px) and (max-width:1023px){
 .pos-active .pos-layout{grid-template-columns:minmax(0,1fr) minmax(320px,1fr)}
 .pos-active #pos-payment-pane{display:none}
 .pos-active #pos-view[data-pane=payment] .pos-layout{grid-template-columns:minmax(0,1fr) minmax(320px,1fr)}
 .pos-active #pos-view[data-pane=payment] #pos-catalog-pane{display:none}
 .pos-active #pos-view[data-pane=payment] #pos-payment-pane{display:block}
}
@media(max-width:767px){
 .pos-active .pos-layout{display:flex}
 .pos-active #pos-catalog-pane,.pos-active #pos-basket-pane,.pos-active #pos-payment-pane{display:none;flex:1;width:100%;min-height:0}
 .pos-active #pos-view[data-pane=products] #pos-catalog-pane{display:flex}
 .pos-active #pos-view[data-pane=checkout] #pos-basket-pane{display:flex}
 .pos-active #pos-view[data-pane=payment] #pos-payment-pane{display:block}
 .pos-active .pos-pane-switch button{padding:6px 9px}
 .pos-active .pos-method-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}
 .pos-active .pos-denominations{grid-template-columns:repeat(4,minmax(0,1fr))}
 .offline-bar{gap:4px;font-size:12px}.offline-bar button{font-size:12px;padding:4px 6px}
 .pos-active #pos-discount-panel[open]{max-height:35%;overflow:auto}
}

/* v40: one counter, quantities and discounts live on the product itself. */
body.pos-active{height:auto;min-height:100dvh;overflow:auto}
.pos-active .admin-header{position:sticky;top:0;z-index:30;min-height:58px;background:#fffaf3}
.pos-active .admin-wrap{height:auto;overflow:visible}
.pos-active #workspace,.pos-active #pos-view,.pos-active #pos-edit{display:block;overflow:visible;min-height:0;flex:none}
.pos-active .pos-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;grid-template-rows:auto;align-items:start;overflow:visible}
.pos-active #pos-basket-pane,.pos-active .pos-pane-switch{display:none!important}
.pos-active #pos-view #pos-catalog-pane{display:block!important;overflow:visible;width:auto}
.pos-active #pos-view #pos-payment-pane{display:block!important;position:sticky;top:148px;max-height:calc(100dvh - 160px);overflow:auto}
#pos-fixed-summary{position:sticky;top:58px;z-index:25;background:#fff3d9;border:1px solid #dbc5aa;border-radius:10px;display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:4px 16px;padding:10px 12px;margin:6px 0;font-size:16px}
#pos-fixed-total{font-size:20px}#pos-fixed-cash{font-size:15px}
.pos-active #pos-products{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:none;overflow:visible;gap:8px;padding:0}
.pos-product-card{display:grid;grid-template-columns:86px minmax(0,1fr);gap:8px;padding:8px;border:1px solid #decbbf;border-radius:12px;background:#fffaf3;align-items:center}
.pos-product-card.is-selected{border:2px solid #96714f;background:#f6ebd9;padding:7px}
.pos-active .pos-product-card .pos-product{padding:0;border:0;background:transparent;min-height:0;width:100%;border-radius:6px;display:block}
.pos-active .pos-product-card .pos-product img{height:60px;width:100%;object-fit:contain;display:block}
.product-stepper{display:flex;align-items:center;justify-content:space-between;margin-top:3px}
.product-stepper button{width:30px;min-height:40px;border:1px solid #d4bea8;background:#fff;border-radius:7px;font-size:22px;padding:0}
.product-stepper output{font-size:17px;font-weight:800}.product-info{display:flex;flex-direction:column;gap:4px;min-width:0}.product-info strong{font-size:15px;overflow-wrap:anywhere}.product-info span{font-size:14px}
.product-inline-discounts{grid-column:1/-1}.product-discount-row{display:flex;align-items:center;gap:6px;flex-wrap:wrap;border-top:1px solid #dcc9b5;padding-top:5px;margin-top:3px;font-size:13px}
.product-discount-row label{display:flex;gap:4px;align-items:center;font-size:13px}.product-discount-row input{width:60px;padding:4px;min-height:36px;font-size:16px}.product-discount-row button{min-height:36px;border:1px solid #dcc9b5;background:#fffaf3;border-radius:6px;font-size:13px}
.pos-active #pos-discount-panel h3{font-size:15px;margin:0}.pos-active .discount-fields{gap:8px;margin:6px 0}.pos-active .discount-fields input{padding:5px;min-height:38px}
@media(max-width:1023px){.pos-active .pos-layout{grid-template-columns:minmax(0,1fr) 290px}.pos-active #pos-products{grid-template-columns:1fr}}
@media(max-width:767px){
 .pos-active .admin-header{min-height:52px}.pos-active .pos-layout{display:flex;flex-direction:column;gap:10px}
 #pos-fixed-summary{top:52px;padding:8px 10px}#pos-fixed-total{font-size:18px}#pos-fixed-cash{font-size:14px}
 .pos-active #pos-view #pos-payment-pane{position:static;order:0;max-height:none;width:100%;padding:10px;overflow:visible}
 .pos-active #pos-view #pos-catalog-pane{order:1;width:100%}
 .pos-active #pos-products{grid-template-columns:1fr;gap:6px}
 .pos-active .pos-method-buttons{grid-template-columns:repeat(5,minmax(0,1fr))}
 .pos-active .pos-denominations{grid-template-columns:repeat(6,minmax(0,1fr))}
 .pos-active .pos-payment #pos-total{display:none}.pos-active .pos-method-buttons button{font-size:13px}
 .pos-active .pos-workbar{justify-content:flex-end;margin-bottom:0}
}

/* v41: products first; a two-row horizontal shelf keeps the counter short. */
.pos-active .admin-wrap{padding-bottom:calc(88px + env(safe-area-inset-bottom))}
.pos-active #pos-view .pos-layout{display:flex;flex-direction:column;gap:12px}
.pos-active #pos-view #pos-catalog-pane{order:0;width:100%;min-width:0}
.pos-active #pos-view #pos-payment-pane{order:1;position:static;top:auto;width:100%;max-height:none;overflow:visible}
.pos-active #pos-products{display:grid;grid-template-columns:none;grid-template-rows:repeat(2,248px);grid-auto-flow:column;grid-auto-columns:calc((100% - 32px)/5);gap:8px;overflow-x:auto;overflow-y:hidden;max-height:none;padding:0 0 8px;scroll-snap-type:x proximity;overscroll-behavior-x:contain;scrollbar-width:thin;-webkit-overflow-scrolling:touch}
.pos-active .pos-product-card{display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;gap:3px;min-width:0;min-height:0;padding:6px;scroll-snap-align:start}
.pos-active .pos-product-card.is-selected{padding:5px}
.product-image-controls{flex:none;min-width:0}
.pos-active .pos-product-card .pos-product img{height:52px}
.product-stepper{gap:2px}.product-stepper button{width:32px;min-height:40px;flex:none}.product-stepper output{text-align:center;min-width:20px;font-size:16px}
.product-info{flex:none;gap:1px}.product-info strong{font-size:13px;line-height:1.25;height:32px;overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.product-info span{font-size:12px}
.product-inline-discounts{flex:1;min-height:0;overflow:auto}
.product-discount-row{gap:2px;padding-top:2px;margin-top:1px;font-size:11px}.product-discount-row>span{width:100%}
.product-discount-row label{justify-content:space-between;width:100%;font-size:11px}.product-discount-row input{width:46px;min-height:28px;padding:2px;font-size:14px}.product-discount-row button{min-height:28px;font-size:11px;padding:2px 5px}
#pos-fixed-summary{position:fixed;top:auto;bottom:0;left:0;right:0;z-index:40;margin:0;border-radius:0;border-width:1px 0 0;padding:10px max(12px,env(safe-area-inset-left)) calc(10px + env(safe-area-inset-bottom));box-shadow:0 -3px 12px #5d3f2314}
body:not(.pos-active) #pos-fixed-summary{display:none}
@media(max-width:1023px){.pos-active #pos-products{grid-auto-columns:calc((100% - 24px)/4)}}
@media(max-width:767px){
 .pos-active #pos-products{grid-template-columns:none;grid-template-rows:repeat(2,248px);grid-auto-columns:calc((100% - 12px)/3);gap:6px}
 .pos-active #pos-view #pos-catalog-pane{order:0}
 .pos-active #pos-view #pos-payment-pane{order:1}
 #pos-fixed-summary{top:auto;bottom:0}
}

.product-discount-row input::placeholder,#pos-order-rate::placeholder,#line-discount-rate::placeholder{color:#725845;opacity:1}
.staff-card{display:flex;align-items:center;gap:12px;flex-wrap:wrap;border:1px solid var(--line);border-radius:12px;padding:14px;margin-top:14px}
.staff-password{display:flex;gap:8px;flex-wrap:wrap;width:100%}.staff-password input{flex:1;min-width:180px}.staff-card>strong{flex:1}
#staff-login-form{display:grid;gap:12px}#staff-login-form label{display:grid;gap:5px}#owner-login{display:inline-block;margin-top:16px}
.staff-session #backup-download,.staff-session #backup-view{display:none!important}

#staff-code-result{margin:16px 0;padding:16px;background:#fff4d7;border-radius:14px;display:flex;gap:12px;flex-wrap:wrap;align-items:center}#staff-code-result[hidden]{display:none}#staff-code-result input{font-size:32px;font-weight:800;letter-spacing:8px;width:160px;text-align:center}#staff-code-result p{flex-basis:100%;margin:0}

.product-photo-editor{padding:16px;background:#fffaf3;border-radius:14px;margin:12px 0 20px}.product-photo-editor #image-preview{display:block;width:100%;max-width:360px;height:240px;object-fit:contain;margin:10px auto;background:white;border-radius:12px}.product-photo-editor #image-preview[hidden]{display:none}.product-photo-editor p{font-size:14px;margin:10px 0}.photo-file-input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}.product-upload-photo{font-weight:700}

body.product-modal-open{overflow:hidden}#product-dialog{width:min(760px,calc(100vw - 24px));max-width:760px;max-height:calc(100dvh - 32px);padding:0;border:1px solid #dbc5aa;border-radius:20px;background:#fffaf3;box-shadow:0 20px 80px #35241940;overflow:auto;overscroll-behavior:contain}#product-dialog::backdrop{background:#30271e80}#product-dialog #product-form{margin:0;padding:20px;border:0;box-shadow:none;max-width:none}#product-dialog-title{position:sticky;top:-20px;z-index:2;background:#fffaf3;margin:-20px -20px 16px;padding:18px 20px;border-bottom:1px solid #eadfce}#product-dialog .actions{position:sticky;bottom:-20px;z-index:2;margin:16px -20px -20px;padding:14px 20px;background:#fffaf3;border-top:1px solid #eadfce}#product-dialog #product-status{position:relative;margin:28px 0 0}#product-dialog #product-status:empty{display:none}@media(max-width:600px){#product-dialog{width:calc(100vw - 16px);max-height:calc(100dvh - 20px);border-radius:16px}#product-dialog .actions button{flex:1;min-height:48px}}

#product-dialog.dialog-fallback[open]{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);margin:0;z-index:1000;box-shadow:0 0 0 100vmax #30271e80}

/* One compact portrait card and one label format per product. */
#products-view .section-top{align-items:center;margin-bottom:18px;gap:12px}
#products-view .section-top h2{font-size:28px;line-height:1.3}
#new-product{min-height:40px;padding:8px 14px;font-size:14px;white-space:nowrap}
#product-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(152px,1fr));align-items:stretch;gap:10px;margin-top:12px}
#product-list>.empty{grid-column:1/-1}
.admin-product-card{min-width:0;display:flex;flex-direction:column;padding:9px;background:#fffdf8;border:1px solid var(--line);border-radius:12px}
.product-photo{display:flex;align-items:center;justify-content:center;width:100%;height:118px;min-height:0;padding:0;border:0;background:#fff;border-radius:8px;overflow:hidden;cursor:zoom-in}
.product-photo img{width:100%;height:100%;object-fit:contain}
.product-photo>span{font-size:13px}
.admin-product-card h3{font-size:14px;line-height:1.45;margin:9px 0 5px;min-height:2.9em;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere}
.product-card-meta{display:flex;gap:5px;flex-wrap:wrap;align-items:center;font-size:13px;line-height:1.4}
.product-draft{padding:2px 6px;background:#eee7df;color:#715f50;border-radius:5px;font-size:11px}
.product-card-actions{display:flex;justify-content:flex-end;gap:5px;margin-top:auto;padding-top:8px}
.product-icon-button{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;width:36px;height:36px;min-height:36px;border:1px solid #e7d8cb;border-radius:8px;background:transparent;padding:7px;color:var(--ink)}
.product-icon-button:hover{background:#f1e5da}
.product-icon-button svg{width:18px;height:18px;pointer-events:none}
#product-tools-dialog{width:min(480px,calc(100vw - 28px));max-height:85dvh;overflow:auto;padding:20px;border:1px solid var(--line);border-radius:18px;background:#fffaf3;color:var(--ink)}
#product-tools-dialog::backdrop{background:#30271e80}
#product-tools-dialog.dialog-fallback[open]{display:block;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);margin:0;z-index:1000;box-shadow:0 0 0 100vmax #30271e80}
.product-tools-open{overflow:hidden}
.product-tools-heading{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:14px}
.product-tools-heading h3{font-size:20px;line-height:1.5;overflow-wrap:anywhere}
.product-tools-body{text-align:center}
.product-large-photo{width:100%;max-height:60dvh;object-fit:contain;margin:0 auto 16px}
.product-label-preview{max-width:100%;width:auto;max-height:260px;object-fit:contain;margin:16px auto;background:white}
.product-label-name{font-size:16px;font-weight:700}
.product-tools-body>.button{font-size:15px;min-height:42px;padding:8px 18px}
.product-tools-body>.copy-label{display:block;width:auto;margin:12px auto 0;padding:8px;font-size:14px}
.product-tools-body>[role=status]{margin-top:10px}
@media(max-width:600px){#product-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.admin-product-card{padding:8px}.product-photo{height:120px}.product-icon-button{width:40px;height:40px;min-height:40px}#products-view .section-top h2{font-size:24px}}

#inquiries-view{max-width:950px;margin:auto}#inquiries-view>.small{margin-bottom:14px}.inquiry-card{padding:20px 0;border-bottom:1px solid var(--line);overflow-wrap:anywhere}.inquiry-card header{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.inquiry-card h3{font-size:19px}.inquiry-card time,.inquiry-topic{font-size:14px;color:var(--muted)}.inquiry-message{white-space:pre-wrap;margin-top:12px}.inquiry-email{user-select:all}#inquiries-more{margin-top:20px}
