:root{--green:#2f6f4e;--green2:#3f7d5d;--blue:#1877f2;--bg:#f7f7f4;--card:#fff;--line:#e7e4dc;--text:#173027;--muted:#6b7d76;--danger:#dc2626;--warn:#b45309}*{box-sizing:border-box}html{font-family:"Noto Sans Bengali","Hind Siliguri",system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:var(--bg);color:var(--text)}body{margin:0;background:var(--bg)}button,input,select,textarea{font:inherit}.topbar{position:sticky;top:0;z-index:30;background:rgba(255,255,255,.96);backdrop-filter:blur(10px);border-bottom:1px solid var(--line)}.topbar-inner{max-width:1200px;margin:auto;padding:10px 16px;display:flex;align-items:center;gap:12px;justify-content:space-between}.brand{display:flex;align-items:center;gap:10px}.fbmark{width:38px;height:38px;border-radius:12px;background:var(--blue);display:grid;place-items:center;color:#fff;font:bold 26px Arial}.brand h1{font-size:18px;margin:0}.brand small{display:block;color:var(--muted);font-size:11px}.adminback{border:1px solid var(--line);background:#fff;border-radius:10px;padding:9px 12px;text-decoration:none;color:var(--text);font-weight:700;font-size:13px}.shell{max-width:1200px;margin:0 auto;padding:16px}.auth-warning{display:none;max-width:650px;margin:60px auto;background:#fff;border:1px solid #fed7aa;border-radius:16px;padding:24px;text-align:center}.tabs{display:flex;gap:8px;overflow:auto;padding:4px 0 14px}.tab{border:1px solid var(--line);background:#fff;color:var(--text);padding:10px 14px;border-radius:12px;font-weight:700;white-space:nowrap;cursor:pointer}.tab.active{background:var(--green);border-color:var(--green);color:#fff}.panel{display:none}.panel.active{display:block}.grid{display:grid;gap:14px}.grid2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid3{grid-template-columns:repeat(3,minmax(0,1fr))}.card{background:var(--card);border:1px solid var(--line);border-radius:16px;padding:16px;box-shadow:0 3px 14px rgba(29,48,39,.04)}.card h2,.card h3{margin:0 0 14px}.section-title{font-size:18px}.field label{display:block;font-size:12px;font-weight:700;color:var(--muted);margin-bottom:6px}.field input,.field select,.field textarea,.searchbox{width:100%;border:1px solid #d9dedb;background:#fff;border-radius:10px;padding:11px 12px;color:var(--text);outline:none}.field input:focus,.field select:focus,.field textarea:focus,.searchbox:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(47,111,78,.09)}.product-picker{position:relative}.suggestions{display:none;position:absolute;z-index:20;left:0;right:0;top:100%;margin-top:5px;background:#fff;border:1px solid var(--line);border-radius:12px;max-height:300px;overflow:auto;box-shadow:0 14px 30px rgba(0,0,0,.12)}.suggestions.show{display:block}.suggestion{padding:10px 12px;border-bottom:1px solid #f0eee8;cursor:pointer}.suggestion:hover{background:#f3f7f4}.suggestion:last-child{border:0}.suggestion b{display:block;font-size:13px}.suggestion small{color:var(--muted)}.btn{border:0;border-radius:10px;padding:10px 14px;font-weight:800;cursor:pointer}.btn-primary{background:var(--green);color:#fff}.btn-blue{background:var(--blue);color:#fff}.btn-outline{background:#fff;color:var(--text);border:1px solid var(--line)}.btn-danger{background:#fee2e2;color:#b91c1c}.btn:disabled{opacity:.55;cursor:not-allowed}.row-actions{display:flex;gap:8px;flex-wrap:wrap}.table-wrap{overflow:auto;border:1px solid var(--line);border-radius:14px}.table{width:100%;border-collapse:collapse;min-width:720px;background:#fff}.table th,.table td{text-align:left;padding:11px 12px;border-bottom:1px solid #eeeae2;font-size:13px;vertical-align:middle}.table th{background:#f4f6f4;color:#52645c;font-size:12px}.table tr:last-child td{border-bottom:0}.money{font-weight:800;color:var(--green)}.muted{color:var(--muted)}.badge{display:inline-block;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:800}.badge-blue{background:#e7f0ff;color:#1457b3}.badge-green{background:#e5f5ea;color:#236641}.cart-total{display:grid;gap:7px;max-width:360px;margin-left:auto;margin-top:14px}.total-line{display:flex;justify-content:space-between;gap:20px}.total-line.grand{font-size:18px;font-weight:900;border-top:1px solid var(--line);padding-top:9px}.notice{border-radius:12px;padding:10px 12px;font-size:12px;background:#eef7f1;color:#315b45;margin-bottom:12px}.error{background:#fff1f2;color:#9f1239}.toolbar{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin-bottom:12px}.toolbar .searchbox{max-width:430px}.stock-ok{color:#15803d;font-weight:800}.stock-low{color:#b45309;font-weight:800}.stock-zero{color:#b91c1c;font-weight:800}.empty{padding:28px;text-align:center;color:var(--muted)}.loading{display:none;position:fixed;inset:0;background:rgba(255,255,255,.72);z-index:100;place-items:center}.loading.show{display:grid}.spinner{width:42px;height:42px;border:4px solid #d8e6dd;border-top-color:var(--green);border-radius:50%;animation:spin .8s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.toast{position:fixed;right:16px;bottom:16px;z-index:110;max-width:360px;padding:12px 14px;border-radius:12px;background:#173027;color:#fff;display:none;box-shadow:0 10px 30px rgba(0,0,0,.2)}.toast.show{display:block}.invoice-print{display:none}.statusbar{font-size:12px;color:var(--muted)}@media(max-width:700px){.shell{padding:10px}.topbar-inner{padding:8px 10px}.brand h1{font-size:15px}.brand small{font-size:10px}.fbmark{width:34px;height:34px}.adminback{padding:8px 9px;font-size:11px}.grid2,.grid3{grid-template-columns:1fr}.card{padding:12px;border-radius:14px}.tabs{padding-bottom:10px}.tab{padding:9px 11px;font-size:12px}.table{min-width:640px}.btn{min-height:42px}.row-actions .btn{flex:1}.mobile-stack{display:grid!important;grid-template-columns:1fr!important}}@media print{body>*:not(.invoice-print){display:none!important}.invoice-print{display:block!important;padding:10mm;background:#fff;color:#111}.invoice-print h1{font-size:20px;text-align:center;margin:0 0 4px}.invoice-print .print-meta{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:12px 0}.invoice-print table{width:100%;border-collapse:collapse}.invoice-print th,.invoice-print td{border:1px solid #bbb;padding:6px;font-size:11px}.invoice-print .print-total{margin-top:10px;text-align:right;font-weight:700}}
/* V13 legacy server archive + product reference */
.badge-gray{background:#eef0f2;color:#475569}.badge-amber{background:#fff3cd;color:#8a5a00}.source-select{max-width:170px!important}.history-tools{align-items:center}.history-tools .searchbox{width:auto;min-width:180px}.linkbtn{text-decoration:none;display:inline-flex;align-items:center;justify-content:center}.statusbox{margin-top:12px;padding:12px;border:1px solid var(--line);border-radius:10px;background:#f8faf9;color:var(--muted);font-size:13px;line-height:1.55}.progress{display:none;height:10px;background:#e8ece9;border-radius:999px;overflow:hidden;margin-top:12px}.progress.show{display:block}.progress>div{height:100%;width:0;background:linear-gradient(90deg,var(--green),#38b277);transition:width .15s ease}.summary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.summary-card{border:1px solid var(--line);border-radius:12px;padding:14px;background:#fafbf9}.summary-card span{display:block;color:var(--muted);font-size:12px}.summary-card b{display:block;font-size:24px;margin-top:4px;color:var(--green)}.archive-meta{font-size:12px;color:var(--muted);line-height:1.6;margin-top:12px}@media(max-width:700px){.history-tools{width:100%}.history-tools>*{flex:1;min-width:0!important}.source-select{max-width:none!important}.summary-grid{grid-template-columns:1fr 1fr}}


/* V16 invoice actions + A5 invoice design */
.save-order-actions{display:flex;gap:10px;margin-top:14px}.edit-mode-note{border-left:4px solid #2563eb;background:#eff6ff;color:#1e40af}.cart-qty-input{width:68px;padding:7px 8px;border:1px solid #d9dedb;border-radius:8px}.invoice-actions{display:flex;flex-direction:column;gap:5px;align-items:center}.invoice-action{width:38px;height:34px;border:0;border-radius:8px;color:#fff;font-weight:900;font-size:18px;display:grid;place-items:center;cursor:pointer;box-shadow:0 4px 10px rgba(15,23,42,.12);line-height:1}.invoice-action.view{background:#7c8797}.invoice-action.edit{background:#2f80ed}.invoice-action.del{background:#ef5350}.invoice-action:hover{filter:brightness(.96);transform:translateY(-1px)}
.invoice-modal{display:none;position:fixed;inset:0;z-index:200;background:rgba(0,0,0,.92);overflow:auto;padding:82px 18px 28px}.invoice-modal.show{display:block}.invoice-modal-toolbar{position:fixed;top:0;left:0;right:0;z-index:210;display:flex;justify-content:center;gap:10px;padding:14px;background:rgba(255,255,255,.98);border-bottom:1px solid #e5e7eb;box-shadow:0 3px 16px rgba(0,0,0,.15)}.invoice-print{display:block;width:148mm;min-height:210mm;margin:0 auto;background:#fff;color:#111;box-shadow:0 10px 35px rgba(0,0,0,.35)}.invoice-print.paper-4x6-host{width:101.6mm;min-height:152.4mm}.invoice-print.paper-a4-host{width:210mm;min-height:297mm}.invoice-sheet{width:148mm;min-height:210mm;padding:8mm 7mm 7mm;font-family:"Noto Sans Bengali","Hind Siliguri",Arial,sans-serif;background:#fff}.a5-head{text-align:center;border-bottom:1.5px solid #2563eb;padding-bottom:3mm;margin-bottom:3mm}.a5-head img{display:block;width:17mm;height:17mm;object-fit:contain;margin:0 auto 1.2mm}.a5-shop-name{font-size:17px;line-height:1.15;color:#2563eb;font-weight:900}.a5-shop-sub{font-size:7.5px;color:#64748b;margin-top:1mm}.a5-info-grid{display:grid;grid-template-columns:1fr 1fr;gap:3mm;margin-bottom:3mm}.a5-info-card{border:1.2px solid;border-radius:4px;padding:2mm;min-height:31mm}.a5-info-card.customer{border-color:#2563eb}.a5-info-card.invoice{border-color:#10b981}.a5-info-title{color:#fff;border-radius:3px;padding:1.4mm 2mm;font-size:9px;font-weight:900;margin-bottom:1.8mm}.a5-info-card.customer .a5-info-title{background:#2563eb}.a5-info-card.invoice .a5-info-title{background:#10b981}.a5-info-row{display:grid;grid-template-columns:23mm 1fr;gap:1.5mm;font-size:8px;line-height:1.35;margin:1mm 0}.a5-info-row b{color:#334155}.a5-info-row span{overflow-wrap:anywhere}.a5-product-table{width:100%;border-collapse:collapse;font-size:8px;margin-top:2mm}.a5-product-table th{background:#2563eb;color:#fff;border:1px solid #2563eb;padding:1.7mm 1.3mm;text-align:center;font-weight:800}.a5-product-table td{border:1px solid #d9e0ea;padding:1.6mm 1.3mm;vertical-align:middle}.a5-product-table th:first-child,.a5-product-table td:first-child{width:7mm;text-align:center}.a5-product-table th:nth-child(4),.a5-product-table td:nth-child(4){width:14mm;text-align:center}.a5-product-table th:nth-child(5),.a5-product-table td:nth-child(5),.a5-product-table th:nth-child(6),.a5-product-table td:nth-child(6){width:20mm;text-align:right}.a5-product-table tbody tr:nth-child(even){background:#f8fafc}.a5-product-table .qty-multiple{background:#fff1f2!important;color:#b91c1c;font-weight:800}.a5-totals{border:1.2px solid #2563eb;border-radius:4px;margin-top:3mm;overflow:hidden;margin-left:auto;width:100%}.a5-totals>div{display:flex;justify-content:space-between;align-items:center;padding:1.6mm 3mm;border-bottom:1px solid #dbe4ef;font-size:8.5px}.a5-totals>div:last-child{border-bottom:0}.a5-totals .grand{background:#eff6ff;color:#1d4ed8;font-size:10px;font-weight:900}.a5-footer{text-align:center;border-top:1px dashed #d6dbe2;margin-top:5mm;padding-top:2.5mm}.a5-footer strong{display:block;color:#059669;font-size:9px}.a5-footer small{display:block;margin-top:1mm;color:#6b7280;font-size:6.5px;line-height:1.4}
@media(max-width:700px){.save-order-actions{flex-direction:column}.invoice-modal{padding:70px 8px 18px}.invoice-print{width:100%;min-height:auto}.invoice-sheet{width:100%;min-height:auto;padding:14px}.a5-info-grid{grid-template-columns:1fr}.a5-info-card{min-height:0}.a5-product-table{font-size:7px}.a5-info-row{grid-template-columns:78px 1fr}.invoice-actions{flex-direction:row}.invoice-action{width:34px;height:32px}}
/* V52: invoice print size is fixed to the user index: 4in x 6in Portrait. */
@media print{
  html,body{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
  .a5-info-card.customer,.a5-info-card.invoice,.a5-totals{break-inside:avoid}
  .a5-product-table thead{display:table-header-group}
  .a5-product-table tr{break-inside:avoid}
  .a5-info-card.customer .a5-info-title,.a5-info-card.invoice .a5-info-title,.a5-product-table th,.a5-totals .grand{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important}
}

/* V17 invoice preview/print reliability fix */
body.invoice-open{overflow:hidden}.invoice-modal.show{display:block!important}.invoice-modal.show .invoice-print{display:block!important}.invoice-modal-toolbar button{min-width:120px}.invoice-print-frame{position:fixed;right:0;bottom:0;width:1px;height:1px;border:0;opacity:0;pointer-events:none}


/* V18 backup product search + invoice-to-invoice filters */
.history-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.range-panel{background:#f7f9fb;border-radius:14px;padding:18px;margin-bottom:18px;border:1px solid #eef1f4}
.range-panel input,.range-panel select{width:100%;min-height:50px;border:1px solid #dfe4ea;border-radius:10px;background:#fff;padding:0 16px;font:inherit;color:var(--text);outline:none}
.range-panel input:focus{border-color:#5a83d9;box-shadow:0 0 0 3px rgba(37,99,235,.08)}
.range-search{width:100%;min-height:52px!important;margin-bottom:14px}
.range-grid{display:grid;gap:12px}
.history-range-grid{grid-template-columns:1fr 1fr 1fr}
.range-filter-btn{background:#8b96a8;color:#fff;border:0;min-height:50px;font-weight:800}
.range-label-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:10px;color:#334155;font-size:13px}
.packing-range-grid{grid-template-columns:1fr 1fr 1fr 1fr}
.packing-actions{display:grid;grid-template-columns:1fr 130px;gap:12px;margin-top:14px}
.packing-create{min-height:52px;font-size:15px}
.suggestion.legacy-suggestion{background:#fffdf7}.suggestion.legacy-suggestion:hover{background:#fff7df}
.source-dot{display:inline-block;border-radius:999px;padding:2px 6px;font-size:10px;font-weight:800;margin-right:4px}.source-dot.current{background:#e5f5ea;color:#236641}.source-dot.legacy{background:#fff3cd;color:#8a5a00}
@media(max-width:800px){.history-range-grid,.packing-range-grid{grid-template-columns:1fr 1fr}.history-range-grid .range-filter-btn{grid-column:1/-1}.range-label-grid{display:none}.packing-actions{grid-template-columns:1fr 110px}}
@media(max-width:520px){.history-range-grid,.packing-range-grid{grid-template-columns:1fr}.packing-actions{grid-template-columns:1fr}.range-panel{padding:12px}.history-heading .row-actions{width:100%}.history-heading .row-actions>*{flex:1}}


/* V21 - full legacy feature parity + mobile app-like admin */
.sub-title{font-size:15px;margin:18px 0 10px;color:var(--text)}
.stock-adjust-panel{padding:14px;background:#f7faf8;border:1px solid var(--line);border-radius:14px;margin-bottom:16px}
.stock-adjust-grid{grid-template-columns:2fr 1fr 1fr 1fr;gap:10px}.stock-note-grid{grid-template-columns:1fr 200px;gap:10px;align-items:end;margin-top:10px}.stock-toolbar{margin-top:6px}.stock-history-title{margin-top:22px}
.settings-form{display:grid;grid-template-columns:1fr 1fr;gap:14px}.settings-form .full{grid-column:1/-1}.settings-note{margin-top:16px}
.print-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:14px 0}.mini-stat{padding:14px;border:1px solid var(--line);border-radius:14px;background:#fafbf9;text-align:center}.mini-stat b{display:block;font-size:24px;color:var(--green)}.mini-stat span{font-size:11px;color:var(--muted)}.print-filter-grid{grid-template-columns:2fr 1fr 1fr 1fr 140px;gap:10px}
.mobile-bottom-nav,.mobile-menu-sheet{display:none}
.mobile-menu-sheet{position:fixed;inset:0;z-index:260}.mobile-menu-sheet.show{display:block}.mobile-menu-backdrop{position:absolute;inset:0;background:rgba(15,23,42,.48)}.mobile-menu-card{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:22px 22px 0 0;padding:14px 14px calc(18px + env(safe-area-inset-bottom));box-shadow:0 -10px 40px rgba(0,0,0,.2)}.mobile-menu-head{display:flex;align-items:center;justify-content:space-between;padding:4px 4px 12px}.mobile-menu-close{border:0;background:#eef2f0;border-radius:50%;width:36px;height:36px;font-size:18px}.mobile-menu-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.mobile-menu-grid button,.mobile-menu-grid a{min-height:74px;border:1px solid var(--line);background:#f8faf9;border-radius:14px;text-decoration:none;color:var(--text);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;font-size:22px;font-weight:800}.mobile-menu-grid span{font-size:12px}
@media(max-width:760px){
  body{padding-bottom:74px;background:#f3f5f4}.desktop-tabs{display:none!important}.topbar{position:sticky;top:0;z-index:80;background:#fff}.topbar-inner{padding:7px 10px}.brand h1{font-size:15px}.brand small{font-size:9px}.adminback{font-size:10px;padding:7px 8px}.shell{padding:8px}.notice{font-size:11px;margin-bottom:8px}.card{padding:11px;border-radius:13px;margin-bottom:8px}.section-title{font-size:18px}.grid2{gap:9px}.field label{font-size:11px}.field input,.field textarea,.field select,.searchbox,.range-panel input,.range-panel select{font-size:14px;min-height:44px;padding:10px 11px}.btn{min-height:44px;padding:10px 12px}.save-order-actions{position:sticky;bottom:76px;background:rgba(255,255,255,.94);padding:8px;margin:8px -2px -2px;z-index:30;border-top:1px solid #e8ece9}.cart-total{max-width:none;margin-left:0}.range-panel{padding:10px;margin-bottom:10px}.history-range-grid,.packing-range-grid{grid-template-columns:1fr 1fr}.packing-actions{grid-template-columns:1fr 92px}.table-wrap{border-radius:12px}.table{min-width:650px}.history-heading{margin-bottom:8px}.row-actions{gap:6px}.source-select{min-width:130px!important}.stock-adjust-grid{grid-template-columns:1fr 1fr}.stock-note-grid{grid-template-columns:1fr}.settings-form{grid-template-columns:1fr}.settings-form .full{grid-column:auto}.print-stats{grid-template-columns:1fr 1fr}.print-filter-grid{grid-template-columns:1fr 1fr}.print-filter-grid .range-filter-btn{grid-column:1/-1}.invoice-modal{padding:58px 5px 82px}.invoice-modal-toolbar{padding:8px;gap:6px}.invoice-modal-toolbar .btn{min-height:40px;font-size:11px;min-width:0}.invoice-sheet{padding:10px}.a5-info-grid{grid-template-columns:1fr 1fr;gap:5px}.a5-info-row{grid-template-columns:64px 1fr;font-size:7px}.a5-info-card{padding:6px}.a5-product-table{font-size:7px}.mobile-bottom-nav{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:240;background:#fff;border-top:1px solid #dfe5e1;box-shadow:0 -5px 20px rgba(15,23,42,.10);padding:5px 4px calc(5px + env(safe-area-inset-bottom))}.mobile-nav-btn{border:0;background:transparent;color:#64748b;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-height:52px;border-radius:12px}.mobile-nav-btn span{font-size:20px;line-height:1}.mobile-nav-btn b{font-size:10px}.mobile-nav-btn.active{color:var(--green);background:#edf7f0}.mobile-menu-sheet{display:none}.mobile-menu-sheet.show{display:block}
}
@media(max-width:420px){.a5-info-grid{grid-template-columns:1fr}.history-range-grid,.packing-range-grid,.print-filter-grid{grid-template-columns:1fr}.stock-adjust-grid{grid-template-columns:1fr 1fr}.print-stats{gap:6px}.mini-stat{padding:9px}.mini-stat b{font-size:20px}}
@media(max-width:760px){
  #panel-history .table,#panel-packing .table,#panel-stock .table,#panel-products .table,#panel-prints .table{min-width:0;border-collapse:separate;border-spacing:0 8px;background:transparent}
  #panel-history .table thead,#panel-packing .table thead,#panel-stock .table thead,#panel-products .table thead,#panel-prints .table thead{display:none}
  #panel-history .table tbody,#panel-packing .table tbody,#panel-stock .table tbody,#panel-products .table tbody,#panel-prints .table tbody{display:block;padding:4px}
  #panel-history .table tr,#panel-packing .table tr,#panel-stock .table tr,#panel-products .table tr,#panel-prints .table tr{display:grid;grid-template-columns:1fr 1fr;background:#fff;border:1px solid #e6e9e7;border-radius:13px;padding:8px 10px;margin-bottom:8px;box-shadow:0 2px 8px rgba(15,23,42,.04)}
  #panel-history .table td,#panel-packing .table td,#panel-stock .table td,#panel-products .table td,#panel-prints .table td{display:block;border:0!important;padding:5px 4px;font-size:12px;min-width:0;overflow-wrap:anywhere}
  #panel-history .table td:last-child,#panel-prints .table td:last-child{grid-column:1/-1;border-top:1px dashed #e7e9e8!important;margin-top:3px;padding-top:8px}
  #panel-history .table td:nth-child(1)::before{content:'Invoice: ';color:#64748b}#panel-history .table td:nth-child(2)::before{content:'তারিখ: ';color:#64748b}#panel-history .table td:nth-child(3)::before{content:'গ্রাহক: ';color:#64748b}#panel-history .table td:nth-child(4)::before{content:'ফোন: ';color:#64748b}#panel-history .table td:nth-child(5)::before{content:'মোট: ';color:#64748b}#panel-history .table td:nth-child(6)::before{content:'উৎস: ';color:#64748b}
  #panel-packing .table td:nth-child(1)::before{content:'পণ্য: ';color:#64748b}#panel-packing .table td:nth-child(2)::before{content:'সাইজ: ';color:#64748b}#panel-packing .table td:nth-child(3)::before{content:'Qty: ';color:#64748b}
  #panel-stock .table td:nth-child(1)::before{content:'পণ্য: ';color:#64748b}#panel-stock .table td:nth-child(2)::before{content:'SKU: ';color:#64748b}#panel-stock .table td:nth-child(3)::before{content:'Stock: ';color:#64748b}#panel-stock .table td:nth-child(4)::before{content:'Status: ';color:#64748b}
  #panel-products .table td:nth-child(1)::before{content:'পণ্য: ';color:#64748b}#panel-products .table td:nth-child(2)::before{content:'সাইজ: ';color:#64748b}#panel-products .table td:nth-child(3)::before{content:'দাম: ';color:#64748b}#panel-products .table td:nth-child(4)::before{content:'Stock: ';color:#64748b}#panel-products .table td:nth-child(5)::before{content:'উৎস: ';color:#64748b}#panel-products .table td:nth-child(6)::before{content:'নোট: ';color:#64748b}
  #panel-prints .table td:nth-child(1)::before{content:'Invoice: ';color:#64748b}#panel-prints .table td:nth-child(2)::before{content:'গ্রাহক: ';color:#64748b}#panel-prints .table td:nth-child(3)::before{content:'প্রকার: ';color:#64748b}#panel-prints .table td:nth-child(4)::before{content:'সময়: ';color:#64748b}#panel-prints .table td:nth-child(5)::before{content:'টাকা: ';color:#64748b}#panel-prints .table td:nth-child(6)::before{content:'কতবার: ';color:#64748b}
  #panel-history .invoice-actions{justify-content:flex-end}.print-open-btn{width:100%}
  #panel-stock .stock-history-title+ .table-wrap .table tr{grid-template-columns:1fr 1fr}
  #panel-stock .stock-history-title+ .table-wrap .table td:nth-child(1)::before{content:'তারিখ: '}#panel-stock .stock-history-title+ .table-wrap .table td:nth-child(2)::before{content:'পণ্য: '}#panel-stock .stock-history-title+ .table-wrap .table td:nth-child(3)::before{content:'টাইপ: '}#panel-stock .stock-history-title+ .table-wrap .table td:nth-child(4)::before{content:'পরিমাণ: '}#panel-stock .stock-history-title+ .table-wrap .table td:nth-child(5)::before{content:'নোট: '}
}
.product-add-panel{padding:14px;border:1px solid var(--line);border-radius:14px;background:#f8faf9;margin:12px 0}.product-add-grid{grid-template-columns:repeat(3,1fr);gap:10px}.product-add-save{width:100%;margin-top:10px}
.product-variant-editor{margin-top:13px;padding:12px;border:1px solid #cfe2d8;border-radius:13px;background:#f4fbf7}.product-variant-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:10px}.product-variant-heading small{display:block;margin-top:3px;color:#64748b}.product-variant-labels,.product-variant-row{display:grid;grid-template-columns:minmax(120px,1.25fr) minmax(110px,1fr) minmax(95px,.75fr) 58px;gap:8px;align-items:center}.product-variant-labels{padding:0 3px 5px;font-size:12px;font-weight:700;color:#52675f}.product-variant-row{margin-top:7px}.product-variant-row input{width:100%;min-width:0}.product-variant-remove{height:44px;padding:0!important;font-size:18px}.product-variant-empty-note{padding:10px;color:#64748b;text-align:center}
@media(max-width:760px){.product-add-grid{grid-template-columns:1fr 1fr}#panel-products .table td:nth-child(7){grid-column:1/-1;border-top:1px dashed #e7e9e8!important}#panel-products .table td:nth-child(7)::before{content:''}}
@media(max-width:420px){.product-add-grid{grid-template-columns:1fr}}
@media(max-width:620px){.product-variant-heading{align-items:flex-start;flex-direction:column}.product-variant-heading .btn{width:100%}.product-variant-labels{display:none}.product-variant-row{grid-template-columns:1fr 1fr}.product-variant-row input[data-variant-price]{grid-column:1/2}.product-variant-remove{grid-column:2/3}.product-variant-row input::placeholder{opacity:1}}


/* V23 - clean header + bulk invoice print/PDF */
.bulk-toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:10px 12px;margin:10px 0 6px;border:1px solid var(--line);border-radius:12px;background:#f8faf9}.bulk-select-all{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:800;color:var(--text);cursor:pointer}.bulk-select-all input,.history-select-box{width:18px;height:18px;accent-color:var(--green);cursor:pointer}.bulk-toolbar strong{font-size:12px;color:var(--green);margin-right:auto}.bulk-help{font-size:11px;color:var(--muted);margin:0 2px 9px}.history-select-wrap{display:inline-flex;align-items:center;gap:8px;cursor:pointer}.bulk-pdf-stage{position:fixed!important;left:-10000px!important;top:0!important;width:148mm!important;background:#fff!important;z-index:-1!important;pointer-events:none!important}.bulk-pdf-stage .invoice-sheet{box-shadow:none!important;margin:0!important}
@media(max-width:760px){.bulk-toolbar{position:sticky;top:58px;z-index:55;background:rgba(255,255,255,.98);box-shadow:0 4px 14px rgba(15,23,42,.06);padding:8px}.bulk-toolbar .btn{flex:1 1 calc(50% - 6px);font-size:11px;min-height:40px}.bulk-select-all{flex:1 1 auto}.bulk-toolbar strong{margin-right:0}.bulk-help{font-size:10px}.history-select-wrap{width:100%}.history-select-box{flex:0 0 auto}}


/* V25 - mobile product search stays above Android/iOS keyboard */
@media(max-width:760px){
  body.product-keyboard-open{padding-bottom:0!important}
  body.product-keyboard-open .mobile-bottom-nav{display:none!important}
  body.product-keyboard-open .save-order-actions{position:static!important}
  body.product-keyboard-open #suggestions.suggestions{border-radius:12px;box-shadow:0 12px 32px rgba(15,23,42,.24);overscroll-behavior:contain;-webkit-overflow-scrolling:touch;background:#fff}
  body.product-keyboard-open #suggestions .suggestion{padding:12px 13px;min-height:58px;background:#fff}
  body.product-keyboard-open #suggestions .suggestion:active{background:#edf7f0}
  body.product-keyboard-open .product-picker{z-index:1000}
}


/* V27 - fit 18-20 products on a single A5 invoice page */

/* V27: compact A5 layout for 12-20 products on one A5 page */
.invoice-sheet.compact-20{padding:4mm 5mm 3.5mm!important}
.invoice-sheet.compact-20 .a5-head{padding-bottom:1.2mm!important;margin-bottom:1.4mm!important}
.invoice-sheet.compact-20 .a5-head img{width:10mm!important;height:10mm!important;margin:0 auto .5mm!important}
.invoice-sheet.compact-20 .a5-shop-name{font-size:13px!important;line-height:1.05!important}
.invoice-sheet.compact-20 .a5-shop-sub{font-size:5.8px!important;margin-top:.35mm!important;line-height:1.1!important}
.invoice-sheet.compact-20 .a5-info-grid{gap:1.6mm!important;margin-bottom:1.2mm!important}
.invoice-sheet.compact-20 .a5-info-card{padding:1mm 1.2mm!important;min-height:21mm!important;border-width:1px!important}
.invoice-sheet.compact-20 .a5-info-title{padding:.65mm 1.1mm!important;font-size:7px!important;margin-bottom:.55mm!important}
.invoice-sheet.compact-20 .a5-info-row{grid-template-columns:18mm 1fr!important;gap:.7mm!important;font-size:6.4px!important;line-height:1.08!important;margin:.28mm 0!important}
.invoice-sheet.compact-20 .a5-product-table{font-size:6.6px!important;margin-top:.7mm!important;line-height:1.05!important}
.invoice-sheet.compact-20 .a5-product-table th{padding:.7mm .65mm!important}
.invoice-sheet.compact-20 .a5-product-table td{padding:.58mm .65mm!important}
.invoice-sheet.compact-20 .a5-product-table th:first-child,.invoice-sheet.compact-20 .a5-product-table td:first-child{width:5.5mm!important}
.invoice-sheet.compact-20 .a5-product-table th:nth-child(4),.invoice-sheet.compact-20 .a5-product-table td:nth-child(4){width:11mm!important}
.invoice-sheet.compact-20 .a5-product-table th:nth-child(5),.invoice-sheet.compact-20 .a5-product-table td:nth-child(5),.invoice-sheet.compact-20 .a5-product-table th:nth-child(6),.invoice-sheet.compact-20 .a5-product-table td:nth-child(6){width:17mm!important}
.invoice-sheet.compact-20 .a5-totals{margin-top:1.1mm!important;border-width:1px!important}
.invoice-sheet.compact-20 .a5-totals>div{padding:.55mm 2mm!important;font-size:6.8px!important;line-height:1.05!important}
.invoice-sheet.compact-20 .a5-totals .grand{font-size:7.8px!important}
.invoice-sheet.compact-20 .a5-footer{margin-top:1.2mm!important;padding-top:.7mm!important}
.invoice-sheet.compact-20 .a5-footer strong{font-size:7px!important;line-height:1.05!important}
.invoice-sheet.compact-20 .a5-footer small{font-size:5.1px!important;margin-top:.25mm!important;line-height:1.1!important}

@media print{
  .invoice-sheet.compact-20{width:148mm!important;min-height:210mm!important;max-height:210mm!important;overflow:hidden!important}
  .invoice-sheet.compact-20 .a5-product-table tr{break-inside:avoid!important;page-break-inside:avoid!important}
}


/* V33 — mobile-first Facebook Order Entry */
.mobile-step-head{display:flex;align-items:flex-start;gap:10px;margin-bottom:14px}.mobile-step-head .section-title{margin:0!important}.mobile-step-head small{display:block;margin-top:2px;color:var(--muted);font-size:11px}.step-no{display:none;width:30px;height:30px;border-radius:10px;background:var(--green);color:#fff;font-weight:900;align-items:center;justify-content:center;flex:0 0 auto}.mobile-save-status{display:none}
@media(max-width:760px){
  body{background:linear-gradient(180deg,#eef5f0 0,#f5f7f6 160px,#f4f6f5 100%);padding-bottom:82px}
  .topbar{box-shadow:0 3px 16px rgba(15,23,42,.06);border-bottom:0}.topbar-inner{min-height:56px;padding:7px 10px}.fbmark{width:34px;height:34px;border-radius:11px;font-size:23px}.brand h1{font-size:15px;line-height:1.05}.brand small{font-size:9px;margin-top:2px}.adminback{border:0;background:#edf7f0;color:var(--green);padding:8px 9px;border-radius:10px;font-size:10px}
  .shell{padding:9px 8px 14px}.panel#panel-new>.grid{gap:9px}.order-step-card{padding:12px;border:0;border-radius:17px;box-shadow:0 5px 20px rgba(15,23,42,.055);margin-bottom:0}.cart-card{margin-top:9px!important}
  .mobile-step-head{margin-bottom:11px;gap:9px}.mobile-step-head .step-no{display:flex}.mobile-step-head .section-title{font-size:16px;line-height:1.15}.mobile-step-head small{font-size:9.5px}
  #panel-new .grid2{grid-template-columns:1fr 1fr;gap:8px}#panel-new .field label{font-size:10.5px;margin-bottom:4px}#panel-new .field input,#panel-new .field textarea,#panel-new .field select{border-color:#dfe7e2;background:#fbfdfc;border-radius:12px;min-height:43px;padding:9px 10px;font-size:13px}#panel-new .field textarea{min-height:76px;resize:vertical}
  #panel-new .product-picker input{font-size:15px;font-weight:650;background:#fff;border:1.5px solid #bdd5c7;box-shadow:0 0 0 3px rgba(47,111,78,.045)}#panel-new #addCartBtn{width:100%;border-radius:12px;box-shadow:0 5px 13px rgba(47,111,78,.16)}#panel-new .product-card .row-actions{display:grid;grid-template-columns:1fr;gap:5px}#selectedStock{text-align:center;font-size:10px}
  #panel-new .table-wrap{border:0;background:transparent;overflow:visible}#panel-new .table{min-width:0;border-collapse:separate;border-spacing:0;background:transparent}#panel-new .table thead{display:none}#panel-new .table tbody{display:block}#panel-new .table tr{display:grid;grid-template-columns:1fr 1fr;gap:0 8px;background:#f8fbf9;border:1px solid #e3ebe6;border-radius:13px;padding:8px 9px;margin-bottom:7px}#panel-new .table td{display:block;border:0!important;padding:4px 2px;font-size:11.5px;min-width:0;overflow-wrap:anywhere}#panel-new .table td:nth-child(1){grid-column:1/-1;font-size:13px;padding-bottom:6px;border-bottom:1px dashed #dfe7e2!important;margin-bottom:3px}#panel-new .table td:nth-child(2)::before{content:'সাইজ: ';color:#718078;font-size:10px}#panel-new .table td:nth-child(3)::before{content:'Qty: ';color:#718078;font-size:10px}#panel-new .table td:nth-child(4)::before{content:'দাম: ';color:#718078;font-size:10px}#panel-new .table td:nth-child(5)::before{content:'মোট: ';color:#718078;font-size:10px}#panel-new .table td:nth-child(5){font-weight:900;color:var(--green)}#panel-new .table td:nth-child(6){grid-column:2;grid-row:4;text-align:right}#panel-new .table .cart-qty-input{width:70px;min-height:34px;border-radius:9px;padding:5px 7px}#panel-new .table .btn-danger{min-height:32px;padding:5px 9px;font-size:10px;border-radius:9px}
  .cart-card>.grid.grid2{grid-template-columns:1fr!important;margin-top:9px!important}.cart-card>.grid.grid2>div:first-child{display:none}.cart-card .cart-total{background:#f7faf8;border:1px solid #e1eae5;border-radius:13px;padding:5px 10px;margin-top:8px}.cart-card .total-line{padding:6px 1px;font-size:11px}.cart-card .total-line.grand{margin:2px -4px -1px;padding:9px 7px;border-radius:10px;background:#eaf6ee;color:#155d3e;font-size:16px}
  .mobile-save-status{display:block;text-align:center;margin:8px 0 6px;padding:6px 8px;border-radius:10px;background:#f0f7f3;color:#537064;font-size:10px;font-weight:750}.mobile-save-status.ok{background:#e7f7ed;color:#137044}
  .save-order-actions{position:sticky!important;bottom:70px!important;margin:6px -4px -4px!important;padding:7px 4px 5px!important;background:rgba(255,255,255,.97)!important;border-top:0!important;backdrop-filter:blur(9px)}#saveOrderBtn{min-height:49px!important;border-radius:13px!important;font-size:14px!important;box-shadow:0 7px 18px rgba(24,119,242,.20)}#saveOrderBtn:disabled{opacity:.72}
  .mobile-bottom-nav{border-top:0;border-radius:18px 18px 0 0;box-shadow:0 -8px 28px rgba(15,23,42,.11);padding-top:6px}.mobile-nav-btn{min-height:54px}.mobile-nav-btn.active{background:#e9f5ed;color:#206744}.mobile-nav-btn span{font-size:19px}.mobile-nav-btn b{font-size:9.5px}
}
@media(max-width:390px){#panel-new .grid2{grid-template-columns:1fr}.customer-card .grid2:last-of-type{grid-template-columns:1fr 1fr}.product-card .grid2{grid-template-columns:1.25fr .75fr}}

/* V35 — transaction fast engine status */
.fast-engine-card{border-left-color:#1877f2!important;background:linear-gradient(135deg,#f5f9ff,#f0f8f3)!important}
.fast-engine-card code{font-size:10px;overflow-wrap:anywhere;color:#174a7c}
@media(max-width:760px){.fast-engine-card{font-size:11px}.fast-engine-card .statusbar{font-size:10px}}


/* V42 — app-like mobile UI + 4 primary bottom buttons + packing download */
.mobile-more-btn{display:none;border:0;background:#eef4f1;color:#244c3a;width:40px;height:40px;border-radius:13px;font-size:20px;font-weight:900;align-items:center;justify-content:center;cursor:pointer}.topbar-actions{display:flex;align-items:center;gap:8px}
.btn-packing-download{background:#efe8ff;color:#5b21b6;border:1px solid #ddd0ff}.btn-packing-print{background:#fff3df;color:#9a4d00;border:1px solid #ffd9a3}
@media(max-width:760px){
  :root{--app-green:#1f8a5b;--app-blue:#2376e5;--app-purple:#7c4dde;--app-orange:#e98221}
  body{background:linear-gradient(180deg,#edf7f1 0,#f7f8f7 220px,#f3f5f4 100%)!important;padding-bottom:88px!important}
  .topbar{background:rgba(255,255,255,.96)!important;backdrop-filter:blur(16px);box-shadow:0 5px 22px rgba(26,58,44,.08)!important}.topbar-inner{min-height:60px!important;padding:8px 10px!important}.fbmark{background:linear-gradient(145deg,#1877f2,#0e5fd0)!important;box-shadow:0 5px 14px rgba(24,119,242,.24)}.brand h1{font-size:16px!important;font-weight:900}.brand small{font-size:9px!important}.adminback{display:none!important}.mobile-more-btn{display:flex}.mobile-more-btn:active{transform:scale(.94);background:#e2eee7}
  .shell{padding:10px 8px 18px!important}.card{border:0!important;border-radius:19px!important;box-shadow:0 7px 24px rgba(25,54,42,.065)!important}.order-step-card{position:relative;overflow:hidden}.order-step-card:before{content:'';position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--app-green)}.product-card:before{background:#2f80ed}.cart-card:before{background:#7c4dde}
  #panel-history>.card{border-top:4px solid var(--app-blue)!important}#panel-packing>.card{border-top:4px solid var(--app-purple)!important}#panel-stock>.card{border-top:4px solid var(--app-orange)!important}#panel-products>.card{border-top:4px solid #0d9488!important}#panel-settings>.card{border-top:4px solid #64748b!important}#panel-backup .card{border-top:4px solid #b45309!important}
  .section-title{font-weight:900!important}.field input,.field select,.field textarea,.searchbox,.range-panel input{border-radius:14px!important;background:#fbfdfc!important}.field input:focus,.field select:focus,.field textarea:focus,.searchbox:focus{box-shadow:0 0 0 4px rgba(31,138,91,.10)!important}
  .btn{border-radius:13px!important}.btn-primary{background:linear-gradient(135deg,#278a5e,#176c48)!important}.btn-blue{background:linear-gradient(135deg,#2e82ef,#1762c9)!important}.btn-packing-download{background:linear-gradient(135deg,#8b5cf6,#6d3fc7)!important;color:#fff!important;border:0!important}.btn-packing-print{background:linear-gradient(135deg,#f59e45,#d97706)!important;color:#fff!important;border:0!important}
  .packing-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}.packing-actions .packing-create{grid-column:1/-1}.packing-actions .range-filter-btn{grid-column:1/-1;background:#f1f3f2!important;color:#52645c!important}
  .mobile-bottom-nav{grid-template-columns:repeat(4,1fr)!important;gap:7px!important;left:8px!important;right:8px!important;bottom:7px!important;border-radius:22px!important;padding:7px!important;background:rgba(255,255,255,.96)!important;box-shadow:0 10px 38px rgba(15,23,42,.18)!important;border:1px solid rgba(222,229,225,.95)!important;backdrop-filter:blur(16px)}
  .mobile-nav-btn{min-height:60px!important;border-radius:16px!important;position:relative;overflow:hidden;background:#f7f8f8!important;transition:transform .15s ease,box-shadow .15s ease,color .15s ease!important}.mobile-nav-btn span{font-size:21px!important}.mobile-nav-btn b{font-size:10px!important;font-weight:900!important}.mobile-nav-btn:active{transform:scale(.94)}
  .nav-order{color:var(--app-green)!important;background:#eaf7f0!important}.nav-history{color:var(--app-blue)!important;background:#eaf2ff!important}.nav-packing{color:var(--app-purple)!important;background:#f1ecff!important}.nav-stock{color:var(--app-orange)!important;background:#fff1e3!important}
  .nav-order.active{background:linear-gradient(145deg,#2b9968,#19764f)!important;color:#fff!important;box-shadow:0 7px 16px rgba(31,138,91,.25)}.nav-history.active{background:linear-gradient(145deg,#3488ee,#1e68ca)!important;color:#fff!important;box-shadow:0 7px 16px rgba(35,118,229,.25)}.nav-packing.active{background:linear-gradient(145deg,#9165ef,#7145cf)!important;color:#fff!important;box-shadow:0 7px 16px rgba(124,77,222,.25)}.nav-stock.active{background:linear-gradient(145deg,#f29a43,#d87414)!important;color:#fff!important;box-shadow:0 7px 16px rgba(233,130,33,.25)}
  .mobile-menu-card{border-radius:28px 28px 0 0!important;padding:16px 14px calc(22px + env(safe-area-inset-bottom))!important}.mobile-menu-grid{grid-template-columns:repeat(2,1fr)!important}.mobile-menu-grid button,.mobile-menu-grid a{border:0!important;box-shadow:0 4px 14px rgba(15,23,42,.06)!important}.mobile-menu-grid button:nth-child(1){background:#eaf7f6!important;color:#0f766e}.mobile-menu-grid button:nth-child(2){background:#eef2f7!important;color:#475569}.mobile-menu-grid button:nth-child(3){background:#fff6e8!important;color:#a15c00}.mobile-menu-grid a{background:#eaf2ff!important;color:#1d5fae!important}
  .toast{left:12px!important;right:12px!important;bottom:96px!important;max-width:none!important;border-radius:16px!important;text-align:center!important}
  .save-order-actions{bottom:90px!important}
}
@media(max-width:390px){.mobile-bottom-nav{left:5px!important;right:5px!important;gap:4px!important;padding:5px!important}.mobile-nav-btn{min-height:56px!important}.mobile-nav-btn b{font-size:9px!important}}

/* V47 invoice English labels + dynamic A5/A4 sizing */
.invoice-sheet.paper-a5{width:148mm;min-height:210mm}.invoice-sheet.paper-a4{width:210mm;min-height:297mm;padding:9mm 10mm 8mm}.invoice-sheet.paper-a4 .a5-shop-name{font-size:19px}.invoice-sheet.paper-a4 .a5-shop-sub{font-size:8px}.invoice-sheet.paper-a4 .a5-info-card{min-height:32mm}.invoice-sheet.paper-a4 .a5-info-row{font-size:8.7px}.invoice-sheet.paper-a4 .a5-product-table{font-size:8.7px}.invoice-sheet.paper-a4 .a5-totals>div{font-size:9px}.invoice-sheet.paper-a4 .a5-totals .grand{font-size:10.5px}


/* V48 invoice paper rules: 1-4 = 4x6, 5-15 = A5, 16-25 = A4 */
.invoice-sheet.paper-4x6{width:101.6mm;min-height:152.4mm;padding:4mm 4mm 3.5mm}
.invoice-sheet.paper-4x6 .a5-head{padding-bottom:1.2mm;margin-bottom:1.4mm}
.invoice-sheet.paper-4x6 .a5-head img{width:10mm;height:10mm;margin-bottom:.5mm}
.invoice-sheet.paper-4x6 .a5-shop-name{font-size:12px}.invoice-sheet.paper-4x6 .a5-shop-sub{font-size:5.6px}
.invoice-sheet.paper-4x6 .a5-info-grid{gap:1.6mm;margin-bottom:1.3mm}.invoice-sheet.paper-4x6 .a5-info-card{padding:1mm 1.2mm;min-height:22mm}.invoice-sheet.paper-4x6 .a5-info-title{padding:.7mm 1.1mm;font-size:6.7px;margin-bottom:.55mm}.invoice-sheet.paper-4x6 .a5-info-row{grid-template-columns:16mm 1fr;gap:.7mm;font-size:5.9px;line-height:1.08;margin:.3mm 0}
.invoice-sheet.paper-4x6 .a5-product-table{font-size:6.2px;margin-top:.8mm;line-height:1.05}.invoice-sheet.paper-4x6 .a5-product-table th{padding:.75mm .55mm}.invoice-sheet.paper-4x6 .a5-product-table td{padding:.7mm .55mm}.invoice-sheet.paper-4x6 .a5-product-table th:first-child,.invoice-sheet.paper-4x6 .a5-product-table td:first-child{width:5mm}.invoice-sheet.paper-4x6 .a5-product-table th:nth-child(4),.invoice-sheet.paper-4x6 .a5-product-table td:nth-child(4){width:9mm}.invoice-sheet.paper-4x6 .a5-product-table th:nth-child(5),.invoice-sheet.paper-4x6 .a5-product-table td:nth-child(5),.invoice-sheet.paper-4x6 .a5-product-table th:nth-child(6),.invoice-sheet.paper-4x6 .a5-product-table td:nth-child(6){width:15mm}
.invoice-sheet.paper-4x6 .a5-totals{margin-top:1.2mm}.invoice-sheet.paper-4x6 .a5-totals>div{padding:.65mm 1.6mm;font-size:6.4px}.invoice-sheet.paper-4x6 .a5-totals .grand{font-size:7.5px}.invoice-sheet.paper-4x6 .a5-footer{margin-top:1.3mm;padding-top:.7mm}.invoice-sheet.paper-4x6 .a5-footer strong{font-size:6.6px}.invoice-sheet.paper-4x6 .a5-footer small{font-size:4.8px;margin-top:.25mm}

/* V49: keep Server Edit/Delete visible while background sync is pending */
.sync-mini{font-size:9px!important;line-height:1.1;text-align:center;color:#64748b;white-space:nowrap}

/* V50 - preview sizing copied from the user-provided legacy print reference */
.invoice-sheet.paper-4x6{width:101.6mm!important;min-height:152.4mm!important;padding:3mm!important}
.invoice-sheet.paper-4x6 .a5-head{padding:1mm 0 1.5mm!important;margin-bottom:1.5mm!important}
.invoice-sheet.paper-4x6 .a5-head img{width:25mm!important;height:12mm!important;max-height:12mm!important;object-fit:contain!important;margin:0 auto 1mm!important}
.invoice-sheet.paper-4x6 .a5-shop-name{font-size:10px!important;line-height:1.2!important}
.invoice-sheet.paper-4x6 .a5-shop-sub{font-size:6px!important;line-height:1.2!important}
.invoice-sheet.paper-4x6 .a5-info-grid{gap:1.5mm!important;margin-bottom:2mm!important}
.invoice-sheet.paper-4x6 .a5-info-card{padding:1.5mm!important;min-height:0!important}
.invoice-sheet.paper-4x6 .a5-info-title{padding:.8mm 1.5mm!important;font-size:7px!important;margin-bottom:.8mm!important}
.invoice-sheet.paper-4x6 .a5-info-row{grid-template-columns:18mm 1fr!important;gap:.8mm!important;font-size:6.5px!important;line-height:1.18!important;margin:.3mm 0!important}
.invoice-sheet.paper-4x6 .a5-product-table{font-size:6.5px!important;margin:1.5mm 0!important}
.invoice-sheet.paper-4x6 .a5-product-table th{padding:2px 1.5px!important;font-size:6px!important}
.invoice-sheet.paper-4x6 .a5-product-table td{padding:1.5px!important;font-size:6.5px!important}
.invoice-sheet.paper-4x6 .a5-totals{margin-top:2mm!important}.invoice-sheet.paper-4x6 .a5-totals>div{padding:1.5px 2.5mm!important;font-size:7px!important}.invoice-sheet.paper-4x6 .a5-totals .grand{font-size:8px!important}
.invoice-sheet.paper-4x6 .a5-footer{margin-top:2.5mm!important;padding-top:1.5mm!important}.invoice-sheet.paper-4x6 .a5-footer strong{font-size:7px!important}.invoice-sheet.paper-4x6 .a5-footer small{font-size:5.5px!important;margin-top:.5mm!important}


/* V54 - print placement follows the original user index: top aligned, horizontally centered. */

/* V59 Bulk Courier Entry */
.btn-courier{background:linear-gradient(135deg,#7c3aed,#5b21b6);color:#fff;border-color:#6d28d9;box-shadow:0 4px 12px rgba(109,40,217,.18)}
.btn-courier:hover{filter:brightness(.98)}
.courier-select{min-width:145px;height:40px;border:1px solid var(--line);border-radius:9px;padding:0 10px;background:#fff;color:var(--text);font-weight:800;font-size:12px}
.courier-weight{width:72px;height:40px;border:1px solid var(--line);border-radius:9px;padding:0 9px;background:#fff;color:var(--text);font-weight:800;font-size:12px;text-align:center}
.courier-progress{display:none;margin:7px 2px 9px;padding:9px 11px;border-radius:10px;background:#f5f3ff;color:#5b21b6;font-size:11px;font-weight:800;border:1px solid #ddd6fe}
.courier-progress.show{display:block}
.invoice-action.courier{background:#7c3aed}.invoice-action.courier.booked{background:#059669}.invoice-action.courier:disabled{opacity:.8;cursor:default;filter:none;transform:none}
.courier-mini{display:block;max-width:108px;margin-top:3px;padding:3px 5px;border-radius:6px;background:#ecfdf5;color:#047857;font-size:8.5px;line-height:1.2;font-weight:800;word-break:break-all;text-align:center}
.courier-mini.failed{background:#fff1f2;color:#be123c}
@media(max-width:760px){.courier-select{flex:1 1 calc(55% - 6px);min-width:0}.courier-weight{flex:0 0 66px}.btn-courier{flex:1 1 100%!important}.courier-progress{font-size:10px}.courier-mini{max-width:92px}}

/* V63 — round invoice logo */
.a5-head img{border-radius:50%;border:1px solid #dbe4ef;background:#fff;padding:1mm;box-sizing:border-box;object-fit:cover}
.invoice-sheet.compact-20 .a5-head img{border-radius:50%!important;border:1px solid #dbe4ef!important;background:#fff!important;padding:.6mm!important;box-sizing:border-box!important;object-fit:cover!important}
.invoice-sheet.paper-4x6 .a5-head img{width:14mm!important;height:14mm!important;max-height:14mm!important;object-fit:cover!important;margin:0 auto 1mm!important;border-radius:50%!important;border:1px solid #dbe4ef!important;background:#fff!important;padding:.7mm!important;box-sizing:border-box!important}

/* V64 — mobile app UI, screen only; print rules stay untouched */
@media screen and (max-width:760px){
  :root{--app-bg:#f3f6f4;--app-card:#fff;--app-green:#18734d;--app-blue:#1976e8;--app-purple:#7a4ed8;--app-orange:#df7b20;--app-ink:#173027;--app-muted:#6c7d75;--app-line:#e3e9e5}
  html{background:var(--app-bg);overscroll-behavior-y:none}
  body{min-height:100dvh;background:var(--app-bg)!important;padding:0 0 calc(86px + env(safe-area-inset-bottom))!important;overflow-x:hidden;-webkit-tap-highlight-color:transparent}
  button,.btn,a,input,select,textarea{touch-action:manipulation}

  /* App header */
  .topbar{position:sticky!important;top:0!important;z-index:180!important;background:rgba(255,255,255,.97)!important;border:0!important;box-shadow:0 1px 0 rgba(20,50,38,.07),0 6px 22px rgba(20,50,38,.06)!important;backdrop-filter:blur(18px)!important}
  .topbar-inner{height:62px!important;min-height:62px!important;padding:8px 12px!important;max-width:none!important}
  .brand{gap:9px!important;min-width:0}
  .fbmark{width:38px!important;height:38px!important;border-radius:13px!important;font-size:25px!important;box-shadow:0 5px 14px rgba(24,119,242,.22)!important;flex:0 0 auto}
  .brand h1{font-size:16px!important;line-height:1.05!important;font-weight:900!important;white-space:nowrap}
  .brand small{font-size:9px!important;line-height:1.15!important;margin-top:3px!important;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:220px}
  .adminback{display:none!important}
  .mobile-more-btn{display:flex!important;width:40px!important;height:40px!important;border-radius:13px!important;background:#edf4f0!important;color:#244f3a!important;box-shadow:inset 0 0 0 1px #e0e9e3!important}

  /* Screen containers */
  .shell{width:100%!important;max-width:none!important;margin:0!important;padding:10px 9px 18px!important}
  .desktop-tabs{display:none!important}
  .panel.active{animation:v64In .16s ease both}
  @keyframes v64In{from{opacity:.55;transform:translateY(3px)}to{opacity:1;transform:none}}
  .card{background:var(--app-card)!important;border:0!important;border-radius:20px!important;padding:13px!important;margin-bottom:10px!important;box-shadow:0 5px 18px rgba(19,48,36,.06)!important}
  .section-title{font-size:18px!important;line-height:1.15!important;font-weight:900!important;color:var(--app-ink)!important}
  .statusbar,.muted{font-size:10.5px!important;color:var(--app-muted)!important}
  .notice{border:0!important;border-radius:14px!important;padding:10px 11px!important;font-size:11px!important}

  /* Fields = native app controls */
  .field label{font-size:11px!important;margin-bottom:5px!important;color:#60736a!important;font-weight:800!important}
  .field input,.field textarea,.field select,.searchbox,.range-panel input,.range-panel select,.range-search,.courier-select,.courier-weight{min-height:48px!important;border:1px solid #dce5df!important;border-radius:14px!important;background:#fbfdfc!important;padding:11px 12px!important;font-size:14px!important;color:var(--app-ink)!important;box-shadow:none!important;outline:none!important}
  .field textarea{min-height:86px!important}
  .field input:focus,.field textarea:focus,.field select:focus,.searchbox:focus,.range-panel input:focus,.range-panel select:focus,.range-search:focus{border-color:#75ad91!important;box-shadow:0 0 0 4px rgba(24,115,77,.08)!important;background:#fff!important}
  .btn{min-height:46px!important;border-radius:14px!important;padding:10px 13px!important;font-size:12px!important;font-weight:900!important;box-shadow:none!important}
  .btn-primary{background:linear-gradient(135deg,#23845c,#176845)!important;color:#fff!important}
  .btn-blue{background:linear-gradient(135deg,#2585f0,#1767cb)!important;color:#fff!important}
  .btn-outline{background:#fff!important;border:1px solid #dde5e0!important;color:#334a40!important}
  .btn-danger{background:#fff0f0!important;color:#c62828!important}

  /* Order entry */
  #panel-new>.grid.grid2{display:block!important}
  #panel-new .order-step-card{margin-bottom:10px!important;overflow:hidden!important;position:relative!important}
  #panel-new .order-step-card:before{width:4px!important}
  .mobile-step-head{align-items:center!important;margin-bottom:12px!important}
  .step-no{display:grid!important;place-items:center!important;width:34px!important;height:34px!important;border-radius:12px!important;font-size:13px!important;background:linear-gradient(145deg,#23845c,#176845)!important;box-shadow:0 5px 12px rgba(24,115,77,.16)!important}
  .product-card .step-no{background:linear-gradient(145deg,#2b86ef,#1767cb)!important}
  .cart-card .step-no{background:linear-gradient(145deg,#8a60e9,#7045c9)!important}
  .mobile-step-head .section-title{font-size:16px!important}.mobile-step-head small{font-size:9.5px!important}
  #panel-new .grid2{grid-template-columns:1fr 1fr!important;gap:9px!important}
  #panel-new .product-picker input{font-size:15px!important;font-weight:700!important;background:#fff!important}
  #panel-new #addCartBtn{width:100%!important;min-height:50px!important}
  #panel-new .table-wrap{border:0!important;background:transparent!important;overflow:visible!important}
  #panel-new .table tbody{padding:0!important}
  #panel-new .table tr{border:1px solid #e1e9e4!important;border-radius:16px!important;padding:9px 10px!important;box-shadow:none!important;background:#fafcfb!important}
  #panel-new .table td:nth-child(1){font-size:13px!important;font-weight:850!important}
  .cart-card .cart-total{border:0!important;border-radius:16px!important;background:#f1f7f3!important;padding:8px 11px!important}
  .cart-card .total-line{font-size:12px!important;padding:6px 2px!important}.cart-card .total-line.grand{font-size:17px!important;background:#e2f2e8!important;color:#145f3e!important}
  .mobile-save-status{border-radius:12px!important;margin:8px 0 6px!important}
  .save-order-actions{position:sticky!important;bottom:calc(82px + env(safe-area-inset-bottom))!important;z-index:120!important;background:rgba(255,255,255,.96)!important;margin:7px -5px -5px!important;padding:8px 5px 5px!important;border-radius:15px!important;backdrop-filter:blur(16px)!important}
  #saveOrderBtn{min-height:52px!important;font-size:14px!important}

  /* Section top controls */
  .history-heading{display:flex!important;align-items:flex-start!important;gap:9px!important;margin-bottom:10px!important}
  .history-heading>div:first-child{flex:1 1 100%!important;min-width:0}
  .history-heading .row-actions{width:100%!important;display:grid!important;grid-template-columns:1fr 74px!important;gap:8px!important}
  .source-select{max-width:none!important;width:100%!important}
  .range-panel{border:0!important;border-radius:17px!important;background:#f6f9f7!important;padding:10px!important;margin-bottom:10px!important}
  .history-range-grid,.packing-range-grid,.print-filter-grid{grid-template-columns:1fr 1fr!important;gap:8px!important}
  .history-range-grid .range-filter-btn,.print-filter-grid .range-filter-btn{grid-column:1/-1!important}

  /* Bulk courier workspace */
  .bulk-toolbar{position:static!important;display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important;padding:10px!important;border:0!important;border-radius:17px!important;background:#f7faf8!important;box-shadow:inset 0 0 0 1px #e7ece9!important;margin:8px 0!important}
  .bulk-select-all{grid-column:1!important;min-height:42px!important;padding:8px 9px!important;background:#fff!important;border-radius:12px!important;border:1px solid #e4eae6!important;font-size:11px!important}
  .bulk-toolbar strong{grid-column:2!important;margin:0!important;display:flex!important;align-items:center!important;justify-content:flex-end!important;padding:0 4px!important;font-size:11px!important}
  #bulkPrintBtn,#bulkPdfBtn{width:100%!important}
  .bulk-toolbar .courier-select{grid-column:1!important;width:100%!important;min-width:0!important}
  .bulk-toolbar .courier-weight{grid-column:2!important;width:100%!important;min-width:0!important}
  .btn-courier{grid-column:1/-1!important;width:100%!important;background:linear-gradient(135deg,#7b4bdd,#5f36bf)!important;color:#fff!important}
  #bulkClearBtn{grid-column:1/-1!important;width:100%!important}
  .bulk-help{font-size:9.5px!important;line-height:1.45!important;padding:0 3px!important}.courier-progress{font-size:10px!important;border-radius:13px!important}

  /* Data tables as app cards */
  #panel-history .table-wrap,#panel-packing .table-wrap,#panel-stock .table-wrap,#panel-products .table-wrap,#panel-prints .table-wrap{border:0!important;border-radius:0!important;overflow:visible!important;background:transparent!important}
  #panel-history .table,#panel-packing .table,#panel-stock .table,#panel-products .table,#panel-prints .table{min-width:0!important;width:100%!important;background:transparent!important}
  #panel-history .table tbody,#panel-packing .table tbody,#panel-stock .table tbody,#panel-products .table tbody,#panel-prints .table tbody{padding:0!important}
  #panel-history .table tr,#panel-packing .table tr,#panel-stock .table tr,#panel-products .table tr,#panel-prints .table tr{border:0!important;border-radius:17px!important;padding:10px 11px!important;margin-bottom:9px!important;box-shadow:0 4px 15px rgba(20,49,38,.055)!important;background:#fff!important}
  #panel-history .table td,#panel-packing .table td,#panel-stock .table td,#panel-products .table td,#panel-prints .table td{font-size:11.5px!important;padding:4px 3px!important}
  #panel-history .table td:last-child,#panel-prints .table td:last-child{padding-top:9px!important}
  .invoice-actions{gap:7px!important;display:flex!important;flex-wrap:wrap!important}
  .invoice-action{width:44px!important;height:42px!important;border-radius:12px!important}

  /* Packing */
  .packing-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:8px!important}
  .packing-actions .packing-create{grid-column:1/-1!important;min-height:50px!important}.packing-actions .range-filter-btn{grid-column:1/-1!important}

  /* Stock */
  .stock-adjust-panel{border:0!important;border-radius:18px!important;background:#f6f9f7!important;padding:11px!important}
  .stock-adjust-grid{grid-template-columns:1fr 1fr!important;gap:8px!important}.stock-note-grid{grid-template-columns:1fr!important}
  .stock-toolbar{display:grid!important;grid-template-columns:1fr 86px!important;gap:8px!important}.stock-toolbar>div{grid-column:1/-1!important}.stock-toolbar .searchbox{max-width:none!important}

  /* Settings/products/backup */
  .settings-form,.product-add-grid{grid-template-columns:1fr!important}.settings-form .full{grid-column:auto!important}
  .summary-grid,.print-stats{grid-template-columns:1fr 1fr!important;gap:8px!important}.summary-card,.mini-stat{border:0!important;border-radius:16px!important;background:#f5f8f6!important}

  /* Bottom app bar: 5 tabs */
  .mobile-bottom-nav{display:grid!important;grid-template-columns:repeat(5,1fr)!important;position:fixed!important;left:0!important;right:0!important;bottom:0!important;z-index:300!important;gap:0!important;padding:5px 5px calc(5px + env(safe-area-inset-bottom))!important;background:rgba(255,255,255,.98)!important;border:0!important;border-top:1px solid #e2e8e4!important;border-radius:0!important;box-shadow:0 -8px 24px rgba(15,23,42,.09)!important;backdrop-filter:blur(20px)!important}
  .mobile-nav-btn{min-height:58px!important;border-radius:13px!important;background:transparent!important;gap:2px!important;color:#6c7a74!important;position:relative!important;overflow:visible!important;box-shadow:none!important}
  .mobile-nav-btn span{font-size:20px!important;line-height:1!important}.mobile-nav-btn b{font-size:9.5px!important;font-weight:900!important}
  .nav-order{color:#27815c!important}.nav-history{color:#2877d8!important}.nav-packing{color:#7c50d8!important}.nav-stock{color:#dd7a24!important}.nav-more{color:#58667f!important}
  .mobile-nav-btn.active{background:#eef6f1!important;color:#135f3f!important;box-shadow:none!important;transform:none!important}
  .nav-history.active{background:#edf4ff!important;color:#1c64bd!important}.nav-packing.active{background:#f3efff!important;color:#6f43c7!important}.nav-stock.active{background:#fff4e9!important;color:#bc6419!important}.nav-more.active{background:#f0f2f7!important;color:#414e68!important}

  /* More sheet */
  .mobile-menu-sheet{z-index:360!important}.mobile-menu-backdrop{background:rgba(12,27,20,.50)!important;backdrop-filter:blur(2px)!important}.mobile-menu-card{border-radius:28px 28px 0 0!important;padding:12px 12px calc(18px + env(safe-area-inset-bottom))!important;box-shadow:0 -18px 45px rgba(10,30,20,.22)!important}
  .mobile-menu-head{padding:5px 4px 12px!important}.mobile-menu-head strong{font-size:18px!important}.mobile-menu-close{width:40px!important;height:40px!important;border-radius:14px!important}
  .mobile-menu-grid{grid-template-columns:1fr 1fr!important;gap:9px!important}
  .mobile-menu-grid button,.mobile-menu-grid a{min-height:82px!important;border:0!important;border-radius:18px!important;font-size:25px!important;box-shadow:none!important}.mobile-menu-grid span{font-size:11px!important}
  #installAppBtn{background:#eaf7ef!important;color:#176b48!important}

  /* Invoice = full-screen app preview, but print CSS is unchanged */
  body.invoice-open{overflow:hidden!important;padding-bottom:0!important}
  body.invoice-open .topbar,body.invoice-open .mobile-bottom-nav{display:none!important}
  .invoice-modal{padding:62px 0 14px!important;background:#edf1ef!important;overflow-x:hidden!important}
  .invoice-modal-toolbar{height:62px!important;padding:8px 9px!important;gap:7px!important;justify-content:stretch!important;background:rgba(255,255,255,.98)!important;box-shadow:0 4px 18px rgba(15,23,42,.10)!important}
  .invoice-modal-toolbar .btn{flex:1!important;min-width:0!important;min-height:45px!important;padding:8px 7px!important;font-size:11px!important;border-radius:13px!important}
  .invoice-print,.invoice-print.paper-4x6-host,.invoice-print.paper-a4-host{display:block!important;width:100%!important;min-height:0!important;margin:0!important;padding:8px!important;background:transparent!important;box-shadow:none!important;overflow:visible!important}
  .invoice-sheet,.invoice-sheet.paper-a5,.invoice-sheet.paper-a4,.invoice-sheet.paper-4x6,.invoice-sheet.compact-20{width:100%!important;min-height:0!important;max-height:none!important;height:auto!important;padding:12px 10px 13px!important;margin:0!important;border-radius:18px!important;box-shadow:0 5px 18px rgba(15,23,42,.08)!important;background:#fff!important;overflow:visible!important}
  .invoice-sheet .a5-head{padding:4px 0 10px!important;margin-bottom:10px!important}.invoice-sheet .a5-head img{width:54px!important;height:54px!important;max-height:54px!important;border-radius:50%!important;object-fit:cover!important;padding:3px!important;margin:0 auto 5px!important}.invoice-sheet .a5-shop-name{font-size:20px!important;line-height:1.12!important}.invoice-sheet .a5-shop-sub{font-size:8px!important;line-height:1.25!important}
  .invoice-sheet .a5-info-grid{grid-template-columns:1fr!important;gap:8px!important;margin-bottom:10px!important}.invoice-sheet .a5-info-card{min-height:0!important;padding:9px!important;border-radius:12px!important}.invoice-sheet .a5-info-title{font-size:11px!important;padding:7px 9px!important;margin-bottom:7px!important;border-radius:8px!important}.invoice-sheet .a5-info-row{display:grid!important;grid-template-columns:82px 1fr!important;gap:7px!important;font-size:10.5px!important;line-height:1.35!important;margin:4px 0!important}.invoice-sheet .a5-info-row b,.invoice-sheet .a5-info-row span{font-size:10.5px!important}
  .invoice-sheet .a5-product-table{width:100%!important;table-layout:fixed!important;font-size:8.5px!important;margin:10px 0!important;line-height:1.15!important}.invoice-sheet .a5-product-table th,.invoice-sheet .a5-product-table td{font-size:8.5px!important;padding:5px 3px!important;overflow-wrap:anywhere!important}.invoice-sheet .a5-product-table th:first-child,.invoice-sheet .a5-product-table td:first-child{width:6%!important}.invoice-sheet .a5-product-table th:nth-child(2),.invoice-sheet .a5-product-table td:nth-child(2){width:35%!important}.invoice-sheet .a5-product-table th:nth-child(3),.invoice-sheet .a5-product-table td:nth-child(3){width:15%!important}.invoice-sheet .a5-product-table th:nth-child(4),.invoice-sheet .a5-product-table td:nth-child(4){width:10%!important}.invoice-sheet .a5-product-table th:nth-child(5),.invoice-sheet .a5-product-table td:nth-child(5){width:17%!important}.invoice-sheet .a5-product-table th:nth-child(6),.invoice-sheet .a5-product-table td:nth-child(6){width:17%!important}
  .invoice-sheet .a5-totals{width:100%!important;margin-top:10px!important;border-radius:12px!important}.invoice-sheet .a5-totals>div{font-size:10.5px!important;padding:7px 10px!important}.invoice-sheet .a5-totals .grand{font-size:13px!important}.invoice-sheet .a5-footer{margin-top:12px!important;padding-top:8px!important}.invoice-sheet .a5-footer strong{font-size:11px!important}.invoice-sheet .a5-footer small{font-size:7.5px!important;line-height:1.35!important}

  /* Loading / toast */
  .loading{z-index:500!important;background:rgba(244,248,246,.78)!important;backdrop-filter:blur(4px)!important}.toast{z-index:520!important;left:12px!important;right:12px!important;bottom:calc(84px + env(safe-area-inset-bottom))!important;max-width:none!important;border-radius:15px!important;text-align:center!important;font-size:12px!important}
  body.invoice-open .toast{bottom:12px!important}
}

@media screen and (max-width:390px){
  .brand small{max-width:175px!important}
  #panel-new .grid2{grid-template-columns:1fr!important}
  .customer-card .grid2:last-of-type,.product-card .grid2{grid-template-columns:1fr 1fr!important}
  .history-range-grid,.packing-range-grid,.print-filter-grid{grid-template-columns:1fr!important}
  .invoice-sheet .a5-product-table th,.invoice-sheet .a5-product-table td{font-size:7.6px!important;padding:4px 2px!important}
}

/* ======================================================================
   V65 — MOBILE UI MATCHED TO USER REFERENCE: index (2)(3).html
   Screen-only skin. Server, courier, backup and print rules are untouched.
   ====================================================================== */
@media screen and (max-width:760px){
  :root{
    --ref-blue:#1d4ed8;
    --ref-blue2:#3b82f6;
    --ref-green:#10b981;
    --ref-red:#ef4444;
    --ref-orange:#f59e0b;
    --ref-ink:#1a1a1a;
    --ref-muted:#6b7280;
    --ref-line:#e5e7eb;
    --ref-soft:#f8fafc;
  }

  html{background:#eef2f7!important}
  body{
    background:linear-gradient(135deg,#f5f7fa 0%,#c3cfe2 100%)!important;
    color:var(--ref-ink)!important;
    padding-bottom:calc(94px + env(safe-area-inset-bottom))!important;
  }

  /* Reference-style top card */
  .topbar{
    position:sticky!important;top:0!important;z-index:180!important;
    background:transparent!important;border:0!important;box-shadow:none!important;
    padding:8px 9px 0!important;backdrop-filter:none!important;
  }
  .topbar-inner{
    width:100%!important;max-width:none!important;height:auto!important;min-height:62px!important;
    margin:0!important;padding:10px 12px!important;
    background:#fff!important;border-radius:15px!important;
    border-left:5px solid var(--ref-blue)!important;
    box-shadow:0 10px 30px rgba(0,0,0,.10)!important;
  }
  .brand{gap:10px!important;min-width:0!important}
  .fbmark{
    width:40px!important;height:40px!important;border-radius:11px!important;
    background:linear-gradient(135deg,var(--ref-blue),var(--ref-blue2))!important;
    box-shadow:0 4px 12px rgba(59,130,246,.32)!important;
  }
  .brand h1{
    font-size:17px!important;line-height:1.08!important;font-weight:900!important;
    color:var(--ref-blue)!important;
    background:linear-gradient(90deg,var(--ref-blue),var(--ref-blue2));
    -webkit-background-clip:text;background-clip:text;-webkit-text-fill-color:transparent;
  }
  .brand small{font-size:9px!important;color:#4b5563!important;max-width:220px!important}
  .mobile-more-btn{
    display:flex!important;width:40px!important;height:40px!important;border-radius:10px!important;
    background:#eef2ff!important;color:var(--ref-blue)!important;
    box-shadow:inset 0 0 0 1px #dbeafe!important;
  }

  /* Main app canvas */
  .shell{padding:10px!important}
  .card{
    background:#fff!important;border:1px solid var(--ref-line)!important;
    border-radius:15px!important;padding:15px!important;margin-bottom:12px!important;
    box-shadow:0 8px 25px rgba(0,0,0,.08)!important;
  }
  .section-title{
    color:var(--ref-blue)!important;font-size:18px!important;font-weight:900!important;
  }
  .muted,.statusbar{color:var(--ref-muted)!important}
  .notice{background:#f8fafc!important;border:1px solid var(--ref-line)!important;border-radius:10px!important}

  /* Section headings copied to the visual language of the reference */
  .mobile-step-head{
    gap:10px!important;align-items:center!important;margin-bottom:14px!important;
    padding-bottom:10px!important;border-bottom:3px solid var(--ref-blue)!important;
  }
  .mobile-step-head small{font-size:10px!important;color:#6b7280!important}
  .step-no{
    display:grid!important;place-items:center!important;width:34px!important;height:34px!important;
    border-radius:9px!important;background:linear-gradient(135deg,var(--ref-blue),var(--ref-blue2))!important;
    color:#fff!important;box-shadow:0 4px 12px rgba(59,130,246,.28)!important;
  }
  .product-card .step-no{background:linear-gradient(135deg,var(--ref-green),#34d399)!important}
  .cart-card .step-no{background:linear-gradient(135deg,#7c3aed,#a78bfa)!important}

  /* Forms: same squared-soft mobile controls as the reference */
  .field label{font-size:13px!important;color:#374151!important;font-weight:700!important;margin-bottom:6px!important}
  .field input,.field textarea,.field select,.searchbox,.range-panel input,.range-panel select,.range-search,.courier-select,.courier-weight{
    width:100%!important;min-height:46px!important;padding:11px 13px!important;
    border:2px solid var(--ref-line)!important;border-radius:8px!important;
    background:#fff!important;color:#111827!important;font-size:14px!important;
    transition:border-color .18s ease,box-shadow .18s ease!important;
  }
  .field textarea{min-height:82px!important}
  .field input:focus,.field textarea:focus,.field select:focus,.searchbox:focus,.range-panel input:focus,.range-panel select:focus,.range-search:focus{
    border-color:var(--ref-blue2)!important;box-shadow:0 0 0 3px rgba(59,130,246,.16)!important;background:#fff!important;
  }

  /* Buttons */
  .btn{
    min-height:45px!important;border-radius:8px!important;padding:10px 13px!important;
    font-size:13px!important;font-weight:800!important;
    box-shadow:0 4px 12px rgba(59,130,246,.18)!important;
  }
  .btn-primary,.btn-blue{
    background:linear-gradient(135deg,var(--ref-blue),var(--ref-blue2))!important;
    color:#fff!important;border:0!important;
  }
  .btn-outline,.btn-secondary{background:#f3f4f6!important;color:#374151!important;border:1px solid #e5e7eb!important;box-shadow:none!important}
  .btn-danger{background:linear-gradient(135deg,#ef4444,#f87171)!important;color:#fff!important;border:0!important}
  .btn-courier{background:linear-gradient(135deg,#7c3aed,#a855f7)!important;color:#fff!important}

  /* Order screen */
  #panel-new>.grid.grid2{display:block!important}
  #panel-new .grid2{grid-template-columns:1fr!important;gap:10px!important}
  .customer-card .grid2:last-of-type,.product-card .grid2{grid-template-columns:1fr 1fr!important}
  #panel-new .order-step-card:before{display:none!important}
  #panel-new #addCartBtn{min-height:48px!important}
  #panel-new .product-picker input{font-size:15px!important}
  #panel-new .table tr{
    background:#fff!important;border:1px solid var(--ref-line)!important;border-radius:10px!important;
    box-shadow:0 5px 15px rgba(0,0,0,.05)!important;
  }
  #panel-new .table td:nth-child(1){color:#1e40af!important}
  #panel-new .table td:nth-child(5){color:#111827!important}
  .cart-card .cart-total{background:#f8fafc!important;border:1px solid #e5e7eb!important;border-radius:10px!important}
  .cart-card .total-line.grand{
    background:linear-gradient(135deg,#dbeafe,#eff6ff)!important;color:#1d4ed8!important;border-radius:8px!important;
  }
  .save-order-actions{
    bottom:calc(88px + env(safe-area-inset-bottom))!important;background:rgba(255,255,255,.97)!important;
    border-top:1px solid #e5e7eb!important;border-radius:12px!important;padding:8px!important;
    box-shadow:0 -3px 14px rgba(0,0,0,.05)!important;
  }
  #saveOrderBtn{background:linear-gradient(135deg,#10b981,#34d399)!important;box-shadow:0 4px 12px rgba(16,185,129,.25)!important}

  /* Search/filter cards */
  .range-panel,.bulk-toolbar,.stock-adjust-panel,.product-add-panel{
    background:#f8fafc!important;border:1px solid var(--ref-line)!important;border-radius:10px!important;
    box-shadow:none!important;
  }
  .history-heading{margin-bottom:10px!important}
  .history-heading .row-actions{grid-template-columns:1fr 76px!important}
  .bulk-toolbar{gap:8px!important}
  .bulk-select-all{border:1px solid #e5e7eb!important;border-radius:8px!important;background:#fff!important}
  .bulk-toolbar strong{color:var(--ref-blue)!important}

  /* History/Packing/Stock/Product cards */
  #panel-history .table tr,#panel-packing .table tr,#panel-stock .table tr,#panel-products .table tr,#panel-prints .table tr{
    border:1px solid var(--ref-line)!important;border-radius:10px!important;background:#fff!important;
    box-shadow:0 5px 15px rgba(0,0,0,.05)!important;padding:10px 11px!important;
  }
  #panel-history .table td,#panel-packing .table td,#panel-stock .table td,#panel-products .table td,#panel-prints .table td{font-size:12px!important}
  #panel-history .table td::before,#panel-packing .table td::before,#panel-stock .table td::before,#panel-products .table td::before,#panel-prints .table td::before{color:#6b7280!important;font-weight:700!important}
  .invoice-action{border-radius:8px!important;width:42px!important;height:40px!important}

  /* Summary blocks */
  .summary-card,.mini-stat{
    background:#fff!important;border:1px solid var(--ref-line)!important;border-radius:10px!important;
    box-shadow:0 4px 12px rgba(0,0,0,.04)!important;
  }
  .mini-stat b,.summary-card b{color:var(--ref-blue)!important}

  /* Floating bottom app tabs: same blue active treatment as reference tabs */
  .mobile-bottom-nav{
    display:grid!important;grid-template-columns:repeat(5,1fr)!important;
    left:8px!important;right:8px!important;bottom:7px!important;
    border:1px solid #e5e7eb!important;border-radius:16px!important;
    padding:7px!important;gap:5px!important;background:rgba(255,255,255,.98)!important;
    box-shadow:0 8px 28px rgba(0,0,0,.16)!important;backdrop-filter:blur(16px)!important;
  }
  .mobile-nav-btn{
    min-height:58px!important;border-radius:9px!important;background:#e5e7eb!important;
    color:#374151!important;box-shadow:none!important;gap:2px!important;
  }
  .mobile-nav-btn span{font-size:19px!important}.mobile-nav-btn b{font-size:9.5px!important;font-weight:800!important}
  .mobile-nav-btn.active{
    background:linear-gradient(135deg,var(--ref-blue),var(--ref-blue2))!important;
    color:#fff!important;box-shadow:0 4px 12px rgba(59,130,246,.35)!important;transform:translateY(-2px)!important;
  }
  .nav-order,.nav-history,.nav-packing,.nav-stock,.nav-more{color:#374151!important}

  /* More sheet */
  .mobile-menu-backdrop{background:rgba(0,0,0,.55)!important}
  .mobile-menu-card{border-radius:20px 20px 0 0!important;background:#fff!important;box-shadow:0 -10px 35px rgba(0,0,0,.22)!important}
  .mobile-menu-head strong{color:var(--ref-blue)!important}
  .mobile-menu-close{background:#f3f4f6!important;color:#374151!important;border-radius:10px!important}
  .mobile-menu-grid button,.mobile-menu-grid a{
    background:#f8fafc!important;color:#1e40af!important;border:1px solid #e5e7eb!important;
    border-radius:10px!important;box-shadow:0 4px 12px rgba(0,0,0,.05)!important;
  }
  #installAppBtn{background:#ecfdf5!important;color:#047857!important}

  /* Invoice preview: like the user's reference index — dark stage, centered 4x6 card,
     action bar at the bottom. PRINT CSS remains completely unchanged. */
  body.invoice-open{overflow:hidden!important;padding-bottom:0!important}
  body.invoice-open .topbar,body.invoice-open .mobile-bottom-nav{display:none!important}
  .invoice-modal{
    padding:14px 8px calc(82px + env(safe-area-inset-bottom))!important;
    background:rgba(0,0,0,.95)!important;overflow:auto!important;
    display:none;align-items:flex-start!important;justify-content:center!important;
  }
  .invoice-modal.show{display:flex!important}
  .invoice-modal-toolbar{
    position:fixed!important;top:auto!important;bottom:0!important;left:0!important;right:0!important;height:auto!important;
    padding:10px 10px calc(10px + env(safe-area-inset-bottom))!important;gap:8px!important;
    background:rgba(255,255,255,.98)!important;border-top:1px solid #e5e7eb!important;border-bottom:0!important;
    box-shadow:0 -5px 20px rgba(0,0,0,.12)!important;justify-content:center!important;
  }
  .invoice-modal-toolbar .btn{flex:1 1 0!important;max-width:160px!important;min-height:46px!important;border-radius:8px!important;font-size:11px!important}
  #invoicePrintBtn{background:linear-gradient(135deg,var(--ref-blue),var(--ref-blue2))!important;color:#fff!important}
  #invoiceJpgBtn{background:linear-gradient(135deg,#10b981,#34d399)!important;color:#fff!important}
  #invoiceCloseBtn{background:#6b7280!important;color:#fff!important;border:0!important}
  .invoice-print,.invoice-print.paper-4x6-host,.invoice-print.paper-a4-host{
    width:100%!important;max-width:4in!important;min-height:0!important;margin:0 auto!important;padding:0!important;
    background:transparent!important;box-shadow:none!important;overflow:visible!important;
  }
  .invoice-sheet,.invoice-sheet.paper-a5,.invoice-sheet.paper-a4,.invoice-sheet.paper-4x6,.invoice-sheet.compact-20{
    width:100%!important;max-width:4in!important;min-height:0!important;max-height:none!important;height:auto!important;
    margin:0 auto!important;padding:10px!important;border-radius:8px!important;background:#fff!important;
    box-shadow:0 10px 30px rgba(0,0,0,.22)!important;overflow:hidden!important;
  }
  .invoice-sheet .a5-head{padding:2px 0 8px!important;margin-bottom:8px!important}
  .invoice-sheet .a5-head img{width:48px!important;height:48px!important;max-height:48px!important;border-radius:50%!important;object-fit:cover!important;padding:3px!important;margin:0 auto 4px!important}
  .invoice-sheet .a5-shop-name{font-size:17px!important;line-height:1.1!important;color:var(--ref-blue)!important}
  .invoice-sheet .a5-shop-sub{font-size:7px!important}
  .invoice-sheet .a5-info-grid{grid-template-columns:1fr!important;gap:8px!important;margin-bottom:9px!important}
  .invoice-sheet .a5-info-card{padding:6px!important;border-radius:7px!important;min-height:0!important}
  .invoice-sheet .a5-info-title{font-size:10.5px!important;padding:6px 8px!important;margin-bottom:6px!important;border-radius:6px!important}
  .invoice-sheet .a5-info-row{grid-template-columns:74px 1fr!important;gap:6px!important;font-size:10px!important;line-height:1.3!important;margin:3px 0!important}
  .invoice-sheet .a5-info-row b,.invoice-sheet .a5-info-row span{font-size:10px!important}
  .invoice-sheet .a5-product-table{font-size:8.5px!important;margin:9px 0!important;table-layout:fixed!important}
  .invoice-sheet .a5-product-table th,.invoice-sheet .a5-product-table td{font-size:8.5px!important;padding:5px 3px!important}
  .invoice-sheet .a5-totals{margin-top:7px!important;border-radius:7px!important}
  .invoice-sheet .a5-totals>div{font-size:10px!important;padding:6px 8px!important}.invoice-sheet .a5-totals .grand{font-size:12px!important}
  .invoice-sheet .a5-footer{margin-top:9px!important;padding-top:6px!important}.invoice-sheet .a5-footer strong{font-size:10px!important}.invoice-sheet .a5-footer small{font-size:7px!important;line-height:1.35!important}

  .toast{bottom:calc(92px + env(safe-area-inset-bottom))!important;border-radius:10px!important}
}

@media screen and (max-width:390px){
  .brand small{max-width:165px!important}
  .customer-card .grid2:last-of-type,.product-card .grid2{grid-template-columns:1fr!important}
  .history-range-grid,.packing-range-grid,.print-filter-grid{grid-template-columns:1fr!important}
  .invoice-sheet .a5-info-grid{grid-template-columns:1fr!important}
  .mobile-bottom-nav{left:5px!important;right:5px!important;gap:4px!important;padding:5px!important}
  .mobile-nav-btn{min-height:55px!important}.mobile-nav-btn b{font-size:9px!important}
}

/* ==================== V66 INDEX-STYLE MOBILE PRODUCT SEARCH ==================== */
@media(max-width:760px){
  #suggestions.suggestions{
    background:#fff!important;
    border:1px solid #e5e7eb!important;
    border-radius:10px!important;
    max-height:300px!important;
    overflow-y:auto!important;
    box-shadow:0 10px 25px rgba(0,0,0,.14)!important;
    padding:0!important;
  }
  #suggestions .suggestion.v66-search-row{
    padding:13px 15px!important;
    min-height:72px!important;
    border-bottom:1px solid #f1f5f9!important;
    background:#fff!important;
    display:block!important;
  }
  #suggestions .suggestion.v66-search-row:last-child{border-bottom:0!important}
  #suggestions .suggestion.v66-search-row:active{background:#f0f7ff!important}
  #suggestions .suggestion.v66-search-row b{
    display:block!important;
    color:#1554aa!important;
    font-size:16px!important;
    line-height:1.3!important;
    font-weight:800!important;
    margin:0 0 7px!important;
    white-space:normal!important;
  }
  #suggestions .suggestion.v66-search-row small{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:14px!important;
    color:#6b7280!important;
    font-size:14px!important;
    line-height:1.2!important;
  }
  #suggestions .suggestion.v66-search-row small strong{
    color:#6b7280!important;
    font-size:14px!important;
    font-weight:500!important;
    white-space:nowrap!important;
  }
  body.product-keyboard-open #suggestions.suggestions{max-height:300px!important;border-radius:10px!important}
  body.product-keyboard-open #suggestions .suggestion.v66-search-row{padding:13px 15px!important;min-height:72px!important}
}

/* ==================== V67 SEARCH RESULTS ALWAYS BELOW INPUT ==================== */
@media(max-width:760px){
  body.product-keyboard-open #suggestions.suggestions{
    transform:none!important;
    bottom:auto!important;
    margin-top:0!important;
    transform-origin:top center!important;
  }
}
\n\n/* ==================== V68 SEARCH DROPDOWN ATTACHED BELOW INPUT ==================== */\n@media(max-width:760px){\n  #panel-new .product-card{position:relative!important;overflow:visible!important}\n  #panel-new .product-picker{position:relative!important;overflow:visible!important;z-index:1200!important;scroll-margin-top:76px!important}\n  #suggestions.suggestions,\n  body.product-keyboard-open #suggestions.suggestions{\n    position:absolute!important;\n    left:0!important;\n    right:0!important;\n    top:calc(100% + 6px)!important;\n    bottom:auto!important;\n    width:100%!important;\n    transform:none!important;\n    margin:0!important;\n    z-index:5000!important;\n    max-height:300px!important;\n    overflow-y:auto!important;\n  }\n  body.product-keyboard-open #panel-new .product-card{z-index:1100!important}\n  body.product-keyboard-open #panel-new .cart-card{position:relative;z-index:1}\n}\n

/* ==================== V70 SEARCH: 3 VISIBLE + SCROLL ALL MATCHES ==================== */
@media(max-width:760px){
  #suggestions.suggestions,
  body.product-keyboard-open #suggestions.suggestions{
    max-height:238px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-y!important;
  }
  #suggestions .suggestion.v66-search-row{
    min-height:72px!important;
    flex:none!important;
  }
}

/* V74 order refresh / clear controls */
.order-reset-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:10px}.order-reset-actions .btn{min-height:44px;font-weight:800}.order-clear-btn{color:#b91c1c!important;border-color:#fecaca!important;background:#fff7f7!important}@media(max-width:700px){.order-reset-actions{position:relative;z-index:121;margin:8px 0 2px}.order-reset-actions .btn{min-height:46px;font-size:13px}}

/* V75 refresh-only order action */
.order-reset-actions{grid-template-columns:1fr!important}
#refreshOrderBtn{width:100%!important}

/* ======================================================================
   V77 — Mobile UI cleanup + fixed 4x6 invoice, 15–18 items one page
   Screen changes are mobile-only. Server/API/data logic stays unchanged.
   ====================================================================== */
@media screen and (max-width:760px){
  html,body{max-width:100%;overflow-x:hidden!important}
  body{padding-bottom:84px!important;background:#eef3f9!important}
  .shell{width:100%!important;max-width:100%!important;padding:8px 8px 96px!important}
  .topbar-inner{width:100%!important;max-width:100%!important;padding:8px 10px!important}
  .brand{min-width:0!important;flex:1!important}.brand>div:last-child{min-width:0!important}
  .brand h1{font-size:16px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
  .brand small{font-size:9px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;max-width:230px!important}
  .card{width:100%!important;max-width:100%!important;padding:12px!important;margin:0 0 10px!important;border-radius:16px!important;overflow:visible!important}
  #panel-new .grid2,.customer-card .grid2,.product-card .grid2{grid-template-columns:1fr!important;gap:10px!important}
  .field input,.field select,.field textarea,.searchbox{width:100%!important;min-height:48px!important;font-size:16px!important;padding:11px 12px!important;border-radius:12px!important}
  .field textarea{min-height:76px!important}
  .product-picker{width:100%!important;position:relative!important;z-index:40!important}
  .suggestions{left:0!important;right:0!important;width:100%!important;max-height:44vh!important;border-radius:14px!important;z-index:500!important}
  .suggestion{padding:12px!important}.suggestion b{font-size:14px!important}.suggestion small{font-size:11px!important}
  #addCartBtn{width:100%!important;min-height:50px!important;font-size:15px!important}
  .table-wrap{width:100%!important;max-width:100%!important;overflow-x:auto!important;-webkit-overflow-scrolling:touch!important;border-radius:14px!important}
  #panel-new .table{min-width:610px!important}
  .cart-total{width:100%!important;max-width:none!important;margin:12px 0 0!important;padding:12px!important;border-radius:14px!important;background:#f8fafc!important}
  .total-line{font-size:15px!important}.total-line.grand{font-size:20px!important;color:#1d4ed8!important}
  .order-reset-actions{display:block!important;width:100%!important;margin:8px 0 0!important;padding:0!important;position:static!important}
  .order-reset-actions .btn,#refreshOrderBtn{width:100%!important;min-height:48px!important;margin:0!important;border-radius:13px!important}
  .save-order-actions{display:flex!important;flex-direction:column!important;gap:8px!important;width:100%!important;position:static!important;bottom:auto!important;margin:8px 0 0!important;padding:0!important;background:transparent!important;border:0!important;z-index:auto!important}
  .save-order-actions .btn,#saveOrderBtn,#cancelEditBtn{width:100%!important;min-height:52px!important;margin:0!important;border-radius:14px!important;font-size:15px!important}
  #saveOrderBtn{box-shadow:0 8px 18px rgba(24,119,242,.18)!important}
  .mobile-save-status{margin:8px 0!important;min-height:32px!important;display:flex!important;align-items:center!important;justify-content:center!important}
  .mobile-bottom-nav{left:0!important;right:0!important;bottom:0!important;width:100%!important;border-radius:18px 18px 0 0!important;padding:6px 5px calc(6px + env(safe-area-inset-bottom))!important;grid-template-columns:repeat(5,minmax(0,1fr))!important}
  .mobile-nav-btn{min-width:0!important;min-height:58px!important}.mobile-nav-btn b{white-space:nowrap!important;font-size:9px!important}
  body.invoice-open{padding-bottom:0!important}
  .invoice-modal{padding:62px 0 12px!important}
  .invoice-modal-toolbar{height:62px!important;padding:8px!important;gap:6px!important}
  .invoice-modal-toolbar .btn{min-height:44px!important;font-size:11px!important;padding:7px 6px!important}
  .invoice-print,.invoice-print.paper-4x6-host{width:100%!important;min-height:0!important;padding:7px!important;background:transparent!important}
  .invoice-sheet.paper-4x6{width:100%!important;min-height:0!important;height:auto!important;max-height:none!important;padding:10px 8px 12px!important;border-radius:16px!important;overflow:visible!important}
}

/* Fixed 4x6 invoice. 18 product rows are kept on one physical page. */
.invoice-sheet.paper-4x6.compact-15,
.invoice-sheet.paper-4x6.compact-18{width:101.6mm!important;min-height:152.4mm!important;max-height:152.4mm!important;height:152.4mm!important;overflow:hidden!important;box-sizing:border-box!important}
.invoice-sheet.paper-4x6.compact-15{padding:2.2mm 2.4mm 2mm!important}
.invoice-sheet.paper-4x6.compact-18{padding:1.8mm 2.1mm 1.6mm!important}
.invoice-sheet.paper-4x6.compact-15 .a5-head,.invoice-sheet.paper-4x6.compact-18 .a5-head{padding:0 0 .7mm!important;margin-bottom:.7mm!important}
.invoice-sheet.paper-4x6.compact-15 .a5-head img,.invoice-sheet.paper-4x6.compact-18 .a5-head img{width:15mm!important;height:7mm!important;max-height:7mm!important;margin:0 auto .3mm!important}
.invoice-sheet.paper-4x6.compact-15 .a5-shop-name{font-size:8.3px!important}.invoice-sheet.paper-4x6.compact-18 .a5-shop-name{font-size:7.8px!important}
.invoice-sheet.paper-4x6.compact-15 .a5-shop-sub,.invoice-sheet.paper-4x6.compact-18 .a5-shop-sub{font-size:4.7px!important;line-height:1.05!important;margin-top:.15mm!important}
.invoice-sheet.paper-4x6.compact-15 .a5-info-grid,.invoice-sheet.paper-4x6.compact-18 .a5-info-grid{gap:.8mm!important;margin-bottom:.7mm!important;grid-template-columns:1fr 1fr!important}
.invoice-sheet.paper-4x6.compact-15 .a5-info-card,.invoice-sheet.paper-4x6.compact-18 .a5-info-card{padding:.55mm .7mm!important;border-width:.7px!important;border-radius:2px!important;min-height:0!important}
.invoice-sheet.paper-4x6.compact-15 .a5-info-title,.invoice-sheet.paper-4x6.compact-18 .a5-info-title{padding:.32mm .7mm!important;font-size:5.2px!important;margin-bottom:.28mm!important;line-height:1.05!important}
.invoice-sheet.paper-4x6.compact-15 .a5-info-row,.invoice-sheet.paper-4x6.compact-18 .a5-info-row{grid-template-columns:13mm 1fr!important;gap:.35mm!important;font-size:4.9px!important;line-height:1.03!important;margin:.12mm 0!important}
.invoice-sheet.paper-4x6.compact-15 .a5-product-table,.invoice-sheet.paper-4x6.compact-18 .a5-product-table{width:100%!important;table-layout:fixed!important;margin:.55mm 0!important;line-height:1!important;border-collapse:collapse!important}
.invoice-sheet.paper-4x6.compact-15 .a5-product-table{font-size:5.25px!important}.invoice-sheet.paper-4x6.compact-18 .a5-product-table{font-size:4.85px!important}
.invoice-sheet.paper-4x6.compact-15 .a5-product-table th,.invoice-sheet.paper-4x6.compact-15 .a5-product-table td{padding:.30mm .35mm!important;font-size:5.15px!important;line-height:1.02!important}
.invoice-sheet.paper-4x6.compact-18 .a5-product-table th,.invoice-sheet.paper-4x6.compact-18 .a5-product-table td{padding:.22mm .30mm!important;font-size:4.75px!important;line-height:1!important}
.invoice-sheet.paper-4x6.compact-15 .a5-product-table th:nth-child(2),.invoice-sheet.paper-4x6.compact-15 .a5-product-table td:nth-child(2),.invoice-sheet.paper-4x6.compact-18 .a5-product-table th:nth-child(2),.invoice-sheet.paper-4x6.compact-18 .a5-product-table td:nth-child(2){width:42%!important;overflow-wrap:anywhere!important}
.invoice-sheet.paper-4x6.compact-15 .a5-product-table th:nth-child(3),.invoice-sheet.paper-4x6.compact-15 .a5-product-table td:nth-child(3),.invoice-sheet.paper-4x6.compact-18 .a5-product-table th:nth-child(3),.invoice-sheet.paper-4x6.compact-18 .a5-product-table td:nth-child(3){width:13%!important}
.invoice-sheet.paper-4x6.compact-15 .a5-product-table th:nth-child(4),.invoice-sheet.paper-4x6.compact-15 .a5-product-table td:nth-child(4),.invoice-sheet.paper-4x6.compact-18 .a5-product-table th:nth-child(4),.invoice-sheet.paper-4x6.compact-18 .a5-product-table td:nth-child(4){width:8%!important}
.invoice-sheet.paper-4x6.compact-15 .a5-product-table th:nth-child(5),.invoice-sheet.paper-4x6.compact-15 .a5-product-table td:nth-child(5),.invoice-sheet.paper-4x6.compact-15 .a5-product-table th:nth-child(6),.invoice-sheet.paper-4x6.compact-15 .a5-product-table td:nth-child(6),.invoice-sheet.paper-4x6.compact-18 .a5-product-table th:nth-child(5),.invoice-sheet.paper-4x6.compact-18 .a5-product-table td:nth-child(5),.invoice-sheet.paper-4x6.compact-18 .a5-product-table th:nth-child(6),.invoice-sheet.paper-4x6.compact-18 .a5-product-table td:nth-child(6){width:16%!important}
.invoice-sheet.paper-4x6.compact-15 .a5-totals,.invoice-sheet.paper-4x6.compact-18 .a5-totals{margin-top:.55mm!important;border-width:.7px!important;border-radius:2px!important}
.invoice-sheet.paper-4x6.compact-15 .a5-totals>div,.invoice-sheet.paper-4x6.compact-18 .a5-totals>div{padding:.28mm 1.2mm!important;font-size:5.1px!important;line-height:1!important}
.invoice-sheet.paper-4x6.compact-15 .a5-totals .grand,.invoice-sheet.paper-4x6.compact-18 .a5-totals .grand{font-size:5.9px!important}
.invoice-sheet.paper-4x6.compact-15 .a5-footer,.invoice-sheet.paper-4x6.compact-18 .a5-footer{margin-top:.55mm!important;padding-top:.35mm!important}
.invoice-sheet.paper-4x6.compact-15 .a5-footer strong,.invoice-sheet.paper-4x6.compact-18 .a5-footer strong{font-size:5.4px!important;line-height:1!important}
.invoice-sheet.paper-4x6.compact-15 .a5-footer small,.invoice-sheet.paper-4x6.compact-18 .a5-footer small{font-size:4px!important;line-height:1!important;margin-top:.15mm!important}

@media print{
  @page{size:4in 6in!important;margin:0!important}
  html,body{width:4in!important;height:6in!important;margin:0!important;padding:0!important;overflow:hidden!important}
  #invoicePrint .invoice-sheet.paper-4x6{width:4in!important;min-height:6in!important;max-height:6in!important;height:6in!important;margin:0!important;overflow:hidden!important;page-break-after:avoid!important;page-break-inside:avoid!important}
  #invoicePrint .a5-product-table tr{page-break-inside:avoid!important;break-inside:avoid!important}
}

/* V96 responsive A4 preview for invoices containing more than 20 items. */
.invoice-sheet.paper-a4{width:210mm;min-height:297mm;max-height:none;height:auto;overflow:visible;background:#fff}
.invoice-sheet.paper-a4.compact-a4{min-height:297mm}
@media print{
  #invoicePrint.paper-a4-host .invoice-sheet.paper-a4{width:210mm!important;min-height:297mm!important;max-height:none!important;height:auto!important;overflow:visible!important}
  #invoicePrint.paper-a4-host .a5-product-table thead{display:table-header-group!important}
  #invoicePrint.paper-a4-host .a5-product-table tr{break-inside:avoid!important;page-break-inside:avoid!important}
}
@media screen and (max-width:760px){
  #invoicePrint.paper-a4-host .invoice-sheet.paper-a4{width:100%!important;min-height:0!important;height:auto!important;padding:11px 10px 12px!important}
}

/* ======================================================================
   V78 — Mobile product search results in normal document flow
   Results appear row-by-row directly under the search input and push
   Variant/Qty controls downward instead of floating over them.
   ====================================================================== */
@media screen and (max-width:760px){
  #panel-new .product-card,
  #panel-new .product-picker,
  body.product-keyboard-open #panel-new .product-card,
  body.product-keyboard-open #panel-new .product-picker{
    position:relative!important;
    overflow:visible!important;
    z-index:auto!important;
  }
  #suggestions.suggestions,
  body.product-keyboard-open #suggestions.suggestions{
    position:static!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;
    width:100%!important;
    transform:none!important;
    margin:8px 0 0!important;
    z-index:auto!important;
    max-height:310px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    border:1px solid #dbe3ec!important;
    border-radius:12px!important;
    box-shadow:0 5px 16px rgba(15,23,42,.08)!important;
    background:#fff!important;
    -webkit-overflow-scrolling:touch!important;
    overscroll-behavior:contain!important;
  }
  #suggestions .suggestion,
  #suggestions .suggestion.v66-search-row,
  body.product-keyboard-open #suggestions .suggestion.v66-search-row{
    display:block!important;
    width:100%!important;
    min-height:68px!important;
    padding:12px 14px!important;
    margin:0!important;
    border:0!important;
    border-bottom:1px solid #edf0f4!important;
    border-radius:0!important;
    background:#fff!important;
    box-shadow:none!important;
  }
  #suggestions .suggestion:last-child,
  #suggestions .suggestion.v66-search-row:last-child{border-bottom:0!important}
  #suggestions .suggestion b,
  #suggestions .suggestion.v66-search-row b{font-size:15px!important;line-height:1.35!important;margin-bottom:5px!important}
  #suggestions .suggestion small,
  #suggestions .suggestion.v66-search-row small{font-size:13px!important;line-height:1.25!important}
  #suggestions.show + *{clear:both!important}
}

/* V80 independent Facebook admin login */
.fb-login-card{max-width:520px;margin:50px auto;padding:28px;text-align:center;background:#fff;border-radius:22px;box-shadow:0 18px 55px rgba(15,23,42,.15)}
.fb-login-logo{width:68px;height:68px;margin:0 auto 10px;border-radius:18px;background:#2563eb;color:#fff;display:grid;place-items:center;font:700 44px/1 Arial}
#fbLogoutBtn{border:0;cursor:pointer}
@media(max-width:760px){.fb-login-card{margin:26px 14px;padding:24px 18px}.fb-login-card input{font-size:18px;min-height:54px}.fb-login-card .btn{min-height:52px;width:100%}}

/* ======================================================================
   V81 — MOBILE PRODUCT SEARCH: REAL ROW FLOW (NOT FLOATING/OVERLAY)
   Search results become part of document flow on phones, so Variant/Qty
   are pushed downward and every match appears as a clean stacked row.
   ====================================================================== */
@media screen and (max-width:760px){
  #panel-new .product-card,
  #panel-new .product-picker{
    overflow:visible!important;
  }
  #panel-new .product-picker{
    position:relative!important;
    z-index:auto!important;
  }
  #suggestions.suggestions,
  body.product-keyboard-open #suggestions.suggestions{
    position:static!important;
    inset:auto!important;
    left:auto!important;
    right:auto!important;
    top:auto!important;
    bottom:auto!important;
    width:100%!important;
    transform:none!important;
    margin:8px 0 2px!important;
    z-index:auto!important;
    max-height:320px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    border:1px solid #dbe4ee!important;
    border-radius:12px!important;
    background:#fff!important;
    box-shadow:0 8px 20px rgba(15,23,42,.08)!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
  }
  #suggestions.suggestions:not(.show){display:none!important}
  #suggestions.suggestions.show{display:block!important}
  #suggestions .suggestion,
  #suggestions .suggestion.v66-search-row{
    display:block!important;
    width:100%!important;
    min-height:64px!important;
    padding:11px 12px!important;
    margin:0!important;
    border:0!important;
    border-bottom:1px solid #edf1f5!important;
    border-radius:0!important;
    background:#fff!important;
    box-shadow:none!important;
  }
  #suggestions .suggestion:last-child,
  #suggestions .suggestion.v66-search-row:last-child{border-bottom:0!important}
  #suggestions .suggestion b,
  #suggestions .suggestion.v66-search-row b{
    display:block!important;
    margin:0 0 5px!important;
    color:#1554aa!important;
    font-size:15px!important;
    line-height:1.3!important;
    font-weight:800!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  #suggestions .suggestion small,
  #suggestions .suggestion.v66-search-row small{
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
    gap:12px!important;
    font-size:13px!important;
    line-height:1.25!important;
    color:#64748b!important;
  }
  #suggestions .suggestion small strong,
  #suggestions .suggestion.v66-search-row small strong{
    color:#0f172a!important;
    font-size:13px!important;
    font-weight:800!important;
    white-space:nowrap!important;
  }
  /* Results are in normal flow: these controls naturally stay below them. */
  #variantSelect,#qtyInput,#addCartBtn{position:relative!important;z-index:auto!important}
}
/* V83 Professional: staff, customer history, category/color and combo tools */
.current-staff-badge{display:inline-flex;align-items:center;gap:5px;padding:7px 11px;border-radius:999px;background:#ede9fe;color:#5b21b6;font-size:12px;font-weight:900;border:1px solid #ddd6fe;white-space:nowrap}
.login-fields{max-width:420px;margin:16px auto 10px;display:grid;gap:10px;text-align:left}
.customer-history-card{margin-top:10px;padding:10px 12px;border:1px solid #a7f3d0;border-radius:10px;background:#ecfdf5;color:#065f46;font-size:12px}
.customer-history-card[hidden]{display:none!important}.customer-history-card strong{font-size:13px}.customer-history-orders{display:flex;gap:6px;flex-wrap:wrap;margin-top:7px}.customer-order-chip{border:1px solid #6ee7b7;background:#fff;border-radius:8px;padding:5px 7px;font-size:11px;color:#065f46;cursor:pointer}
.product-filter-grid{margin-top:9px}.product-card #productSearch{border:2px solid #f43f5e!important;background:#fff7ed!important;box-shadow:0 0 0 3px rgba(244,63,94,.09);font-weight:800}.product-card #productSearch:focus{border-color:#e11d48!important;box-shadow:0 0 0 4px rgba(225,29,72,.15)!important}
.staff-pill{display:inline-flex;align-items:center;gap:5px;padding:4px 8px;border-radius:999px;color:#fff;font-size:11px;font-weight:900;white-space:nowrap}.staff-pill.old{background:#64748b}
.category-add-panel,.combo-item-add{display:grid;grid-template-columns:minmax(180px,1fr) 90px auto;gap:9px;align-items:end;margin:13px 0;padding:12px;border:1px dashed #93c5fd;border-radius:12px;background:#eff6ff}
.combo-builder,.staff-management-card{margin-top:18px;padding:15px;border:1px solid #ddd6fe;border-radius:14px;background:#fafaff}.combo-item-add{grid-template-columns:minmax(180px,.9fr) minmax(250px,1.3fr) 90px auto;background:#fff;border-color:#c4b5fd}.combo-items-list{display:grid;gap:6px;margin:10px 0}.combo-item-row{display:grid;grid-template-columns:1fr 110px 100px 44px;gap:8px;align-items:center;padding:8px 10px;background:#fff;border:1px solid #e5e7eb;border-radius:9px}.combo-item-row small{display:block;color:#64748b;margin-top:3px}.combo-item-row button{border:0;background:#ffe4e6;color:#be123c;border-radius:7px;height:32px;font-weight:900;cursor:pointer}.combo-price-summary{margin:10px 0;padding:11px 12px;border-radius:10px;background:#ecfdf5;color:#166534;font-weight:800}.combo-discount-line{color:#15803d}
.staff-form-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.staff-management-card .table-wrap{margin-top:14px}.staff-report-title{margin-top:18px}.staff-report-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px}.staff-report-card{padding:11px;border:1px solid #e5e7eb;border-radius:11px;background:#fff}.staff-report-card strong{display:block;margin-bottom:5px}.staff-report-card b{color:#1d4ed8;font-size:16px}.product-meta-tags{display:flex;gap:4px;flex-wrap:wrap}.meta-tag{display:inline-flex;padding:3px 6px;border-radius:6px;background:#f1f5f9;color:#334155;font-size:10px;font-weight:800}.meta-tag.combo{background:#f3e8ff;color:#7e22ce}
.role-hidden{display:none!important}
@media(max-width:760px){.current-staff-badge{max-width:145px;overflow:hidden;text-overflow:ellipsis;padding:6px 8px}.product-filter-grid{grid-template-columns:1fr 1fr!important}.category-add-panel{grid-template-columns:1fr 70px}.category-add-panel .btn{grid-column:1/-1}.staff-form-grid{grid-template-columns:1fr 1fr}.staff-report-grid{grid-template-columns:1fr 1fr}.combo-item-add{grid-template-columns:1fr 78px}.combo-item-add select:nth-child(2){grid-column:1/-1}.combo-item-add .btn{grid-column:1/-1}.combo-builder,.staff-management-card{padding:11px}.history-heading .row-actions{width:100%}.history-heading .source-select{flex:1;min-width:120px}}
@media(max-width:420px){.staff-form-grid,.staff-report-grid{grid-template-columns:1fr}.product-filter-grid{grid-template-columns:1fr!important}}


/* ======================================================================
   V87 — Invoice mobile preview + JPG compact output
   Screen preview is content-height; PRINT remains fixed 4x6 via @media print.
   ====================================================================== */
@media screen and (max-width:760px){
  #invoicePrint.invoice-print,#invoicePrint.invoice-print.paper-4x6-host{
    width:calc(100vw - 16px)!important;max-width:4in!important;min-height:0!important;height:auto!important;
    margin:0 auto!important;padding:0!important;background:transparent!important;overflow:visible!important;
  }
  #invoicePrint .invoice-sheet,#invoicePrint .invoice-sheet.paper-4x6{
    width:100%!important;max-width:4in!important;min-height:0!important;height:auto!important;max-height:none!important;
    padding:10px!important;margin:0 auto!important;border-radius:14px!important;overflow:visible!important;
  }
  #invoicePrint .a5-info-grid{grid-template-columns:1fr 1fr!important;gap:6px!important}
  #invoicePrint .a5-info-card{min-height:0!important}
  #invoicePrint .a5-footer{margin-bottom:2px!important}
}
@media screen and (max-width:420px){
  #invoicePrint .invoice-sheet,#invoicePrint .invoice-sheet.paper-4x6{padding:9px 8px!important}
  #invoicePrint .a5-shop-name{font-size:16px!important}
  #invoicePrint .a5-info-title{font-size:7.6px!important;padding:4px 5px!important}
  #invoicePrint .a5-info-row{grid-template-columns:56px 1fr!important;gap:4px!important;font-size:8px!important;margin:2px 0!important}
  #invoicePrint .a5-info-row b,#invoicePrint .a5-info-row span{font-size:8px!important}
  #invoicePrint .a5-product-table th,#invoicePrint .a5-product-table td{font-size:7.2px!important;padding:4px 2px!important}
  #invoicePrint .a5-totals>div{font-size:9px!important;padding:5px 8px!important}
  #invoicePrint .a5-totals .grand{font-size:11px!important}
}


/* ======================================================================
   V88 — Final invoice screen/JPG consistency
   Mobile preview is content-height and readable. Fixed 4x6 applies only to print.
   ====================================================================== */
@media screen {
  #invoicePrint.invoice-print,#invoicePrint.invoice-print.paper-4x6-host,#invoicePrint.invoice-print.paper-a4-host{
    min-height:0!important;height:auto!important;max-height:none!important;overflow:visible!important;
  }
  #invoicePrint .invoice-sheet,#invoicePrint .invoice-sheet.paper-4x6,#invoicePrint .invoice-sheet.compact-15,#invoicePrint .invoice-sheet.compact-18{
    min-height:0!important;height:auto!important;max-height:none!important;overflow:visible!important;
  }
}
@media screen and (max-width:760px){
  .invoice-modal{padding-top:18px!important;padding-bottom:calc(78px + env(safe-area-inset-bottom))!important}
  #invoicePrint.invoice-print{width:calc(100vw - 12px)!important;max-width:430px!important}
  #invoicePrint .invoice-sheet,#invoicePrint .invoice-sheet.paper-4x6{
    width:100%!important;max-width:430px!important;padding:11px 10px 12px!important;border-radius:16px!important;
  }
  #invoicePrint .a5-head{padding:1px 0 7px!important;margin-bottom:7px!important}
  #invoicePrint .a5-head img{width:54px!important;height:54px!important;max-height:54px!important;margin-bottom:4px!important}
  #invoicePrint .a5-shop-name{font-size:18px!important;line-height:1.12!important}
  #invoicePrint .a5-shop-sub{font-size:8px!important;line-height:1.2!important}
  #invoicePrint .a5-info-grid{grid-template-columns:1fr 1fr!important;gap:7px!important;margin-bottom:8px!important}
  #invoicePrint .a5-info-card{padding:7px!important;border-radius:8px!important}
  #invoicePrint .a5-info-title{font-size:9px!important;padding:5px 6px!important;margin-bottom:5px!important}
  #invoicePrint .a5-info-row{grid-template-columns:58px minmax(0,1fr)!important;gap:4px!important;font-size:8.4px!important;line-height:1.2!important;margin:2px 0!important}
  #invoicePrint .a5-info-row b,#invoicePrint .a5-info-row span{font-size:8.4px!important;overflow-wrap:anywhere!important}
  #invoicePrint .a5-product-table{margin:8px 0!important}
  #invoicePrint .a5-product-table th,#invoicePrint .a5-product-table td{font-size:7.8px!important;padding:4px 2px!important;line-height:1.15!important}
  #invoicePrint .a5-totals{margin-top:8px!important}
  #invoicePrint .a5-totals>div{font-size:9.5px!important;padding:5px 8px!important}
  #invoicePrint .a5-totals .grand{font-size:11.5px!important}
  #invoicePrint .a5-footer{margin-top:9px!important;padding-top:6px!important}
  #invoicePrint .a5-footer strong{font-size:9px!important}
  #invoicePrint .a5-footer small{font-size:6.2px!important;line-height:1.25!important}
}
@media screen and (max-width:360px){
  #invoicePrint .invoice-sheet,#invoicePrint .invoice-sheet.paper-4x6{padding:9px 7px 10px!important}
  #invoicePrint .a5-info-grid{gap:5px!important}
  #invoicePrint .a5-info-card{padding:5px!important}
  #invoicePrint .a5-info-title{font-size:8px!important;padding:4px!important}
  #invoicePrint .a5-info-row{grid-template-columns:50px minmax(0,1fr)!important;font-size:7.5px!important}
  #invoicePrint .a5-info-row b,#invoicePrint .a5-info-row span{font-size:7.5px!important}
  #invoicePrint .a5-product-table th,#invoicePrint .a5-product-table td{font-size:7px!important;padding:3px 1px!important}
}


/* V89 final invoice mobile overrides: content-height preview, no forced 4x6 blank space */
@media screen and (max-width:760px){
  .invoice-modal{align-items:flex-start!important;overflow-y:auto!important;}
  .invoice-print,.invoice-print.paper-4x6-host,.invoice-print.paper-a4-host{min-height:0!important;height:auto!important;}
  .invoice-sheet,.invoice-sheet.paper-a5,.invoice-sheet.paper-a4,.invoice-sheet.paper-4x6,.invoice-sheet.compact-20{
    min-height:0!important;height:auto!important;max-height:none!important;overflow:visible!important;
  }
  .invoice-sheet .a5-info-grid{grid-template-columns:1fr!important;}
}

/* V89 readable mobile invoice — final specificity override */
@media screen and (max-width:760px){
  #invoicePrint .a5-info-grid{grid-template-columns:1fr!important;gap:8px!important;margin-bottom:9px!important}
  #invoicePrint .a5-info-card{padding:8px!important;border-radius:9px!important;min-height:0!important}
  #invoicePrint .a5-info-title{font-size:10.5px!important;padding:6px 8px!important;margin-bottom:6px!important;border-radius:6px!important}
  #invoicePrint .a5-info-row{grid-template-columns:76px minmax(0,1fr)!important;gap:6px!important;font-size:10px!important;line-height:1.3!important;margin:3px 0!important}
  #invoicePrint .a5-info-row b,#invoicePrint .a5-info-row span{font-size:10px!important}
  #invoicePrint .a5-product-table{font-size:8.6px!important;margin:9px 0!important;table-layout:fixed!important}
  #invoicePrint .a5-product-table th,#invoicePrint .a5-product-table td{font-size:8.6px!important;padding:5px 3px!important;line-height:1.18!important}
  #invoicePrint .a5-totals>div{font-size:10.5px!important;padding:6px 9px!important}
  #invoicePrint .a5-totals .grand{font-size:13px!important}
  #invoicePrint .a5-footer strong{font-size:10px!important}
  #invoicePrint .a5-footer small{font-size:7.2px!important;line-height:1.35!important}
}
@media screen and (max-width:360px){
  #invoicePrint .a5-info-row{grid-template-columns:68px minmax(0,1fr)!important;font-size:9px!important}
  #invoicePrint .a5-info-row b,#invoicePrint .a5-info-row span{font-size:9px!important}
  #invoicePrint .a5-product-table th,#invoicePrint .a5-product-table td{font-size:7.8px!important;padding:4px 2px!important}
}

/* V90 — reference-style compact mobile invoice */
@media (max-width:700px){
  #invoicePrint.invoice-print{width:calc(100vw - 18px)!important;max-width:492px!important;}
  #invoicePrint .invoice-sheet,#invoicePrint .invoice-sheet.paper-4x6{
    width:100%!important;max-width:492px!important;min-height:0!important;height:auto!important;max-height:none!important;
    padding:12px 12px 14px!important;border-radius:11px!important;overflow:visible!important;
  }
  #invoicePrint .a5-head{padding:0 0 8px!important;margin:0 0 8px!important;}
  #invoicePrint .a5-head img{width:52px!important;height:52px!important;max-height:52px!important;object-fit:cover!important;border-radius:50%!important;padding:2px!important;margin:0 auto 4px!important;}
  #invoicePrint .a5-shop-name{font-size:16px!important;line-height:1.05!important;}
  #invoicePrint .a5-shop-sub{font-size:7px!important;line-height:1.15!important;margin-top:3px!important;}
  #invoicePrint .a5-info-grid{grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:7px!important;margin-bottom:9px!important;}
  #invoicePrint .a5-info-card{padding:6px!important;border-radius:7px!important;min-height:108px!important;}
  #invoicePrint .a5-info-title{font-size:8px!important;padding:5px 6px!important;margin-bottom:5px!important;border-radius:4px!important;}
  #invoicePrint .a5-info-row{grid-template-columns:52px minmax(0,1fr)!important;gap:4px!important;font-size:7.4px!important;line-height:1.18!important;margin:2px 0!important;}
  #invoicePrint .a5-info-row b,#invoicePrint .a5-info-row span{font-size:7.4px!important;}
  #invoicePrint .a5-product-table{font-size:7px!important;margin:8px 0!important;table-layout:fixed!important;}
  #invoicePrint .a5-product-table th,#invoicePrint .a5-product-table td{font-size:7px!important;padding:3px 2px!important;line-height:1.12!important;}
  #invoicePrint .a5-totals{margin-top:7px!important;border-radius:5px!important;}
  #invoicePrint .a5-totals>div{font-size:8px!important;padding:4px 7px!important;}
  #invoicePrint .a5-totals .grand{font-size:9.5px!important;}
  #invoicePrint .a5-footer{margin-top:8px!important;padding-top:5px!important;}
  #invoicePrint .a5-footer strong{font-size:8px!important;}
  #invoicePrint .a5-footer small{font-size:5.7px!important;line-height:1.25!important;}
}
@media (max-width:360px){
  #invoicePrint .a5-info-grid{gap:5px!important;}
  #invoicePrint .a5-info-card{padding:5px!important;}
  #invoicePrint .a5-info-row{grid-template-columns:46px minmax(0,1fr)!important;font-size:6.7px!important;}
  #invoicePrint .a5-info-row b,#invoicePrint .a5-info-row span{font-size:6.7px!important;}
}

/* ======================================================================
   V91 — Reference full-page invoice behavior
   - Mobile preview keeps a full 4x6 white page.
   - Short invoices leave controlled white space below the footer.
   - Long invoices may grow beyond 6in instead of clipping products.
   ====================================================================== */
@media screen {
  #invoicePrint.invoice-print,
  #invoicePrint.invoice-print.paper-4x6-host {
    min-height:6in!important;
    height:auto!important;
    overflow:visible!important;
    background:#fff!important;
  }
  #invoicePrint .invoice-sheet,
  #invoicePrint .invoice-sheet.paper-4x6,
  #invoicePrint .invoice-sheet.compact-15,
  #invoicePrint .invoice-sheet.compact-18 {
    min-height:6in!important;
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    background:#fff!important;
  }
}
@media screen and (max-width:760px){
  #invoicePrint.invoice-print,
  #invoicePrint.invoice-print.paper-4x6-host{
    width:calc(100vw - 18px)!important;
    max-width:4in!important;
    min-height:calc((100vw - 18px) * 1.5)!important;
    margin:0 auto!important;
    background:#fff!important;
    border-radius:11px!important;
  }
  #invoicePrint .invoice-sheet,
  #invoicePrint .invoice-sheet.paper-4x6{
    width:100%!important;
    max-width:4in!important;
    min-height:calc((100vw - 18px) * 1.5)!important;
    height:auto!important;
    background:#fff!important;
    border-radius:11px!important;
  }
}
@media screen and (min-width:761px){
  #invoicePrint.invoice-print.paper-4x6-host,
  #invoicePrint .invoice-sheet.paper-4x6{
    min-height:6in!important;
  }
}

/* ======================================================================
   V92 — Mobile-first app shell: four core actions, distinct colors,
   thumb-friendly controls. Existing desktop and invoice rules untouched.
   ====================================================================== */
@media screen and (max-width:760px){
  :root{
    --v92-order:#2563eb;
    --v92-order2:#3b82f6;
    --v92-history:#7c3aed;
    --v92-history2:#8b5cf6;
    --v92-product:#059669;
    --v92-product2:#10b981;
    --v92-settings:#ea580c;
    --v92-settings2:#f97316;
  }
  body{background:#f3f6fb!important;padding-bottom:98px!important}
  .shell{padding:10px 10px 106px!important}
  .topbar{background:rgba(255,255,255,.96)!important;backdrop-filter:blur(16px);-webkit-backdrop-filter:blur(16px);box-shadow:0 1px 0 rgba(15,23,42,.06),0 8px 24px rgba(15,23,42,.05)!important}
  .topbar-inner{min-height:58px!important;padding:8px 12px!important}
  .brand .brand-icon{border-radius:14px!important;box-shadow:0 7px 18px rgba(37,99,235,.20)!important}
  .mobile-more-btn{width:42px!important;height:42px!important;border-radius:13px!important;background:#eef2ff!important;color:#3730a3!important;border:1px solid #e0e7ff!important;font-size:20px!important}

  .card{border:1px solid #e8edf5!important;border-radius:20px!important;box-shadow:0 8px 28px rgba(15,23,42,.055)!important;background:#fff!important}
  .section-title{font-size:17px!important;letter-spacing:-.15px!important;color:#172033!important}
  .field label{font-size:13px!important;font-weight:800!important;color:#334155!important;margin-bottom:6px!important}
  .field input,.field select,.field textarea,.searchbox{
    min-height:52px!important;border:1.5px solid #dce3ec!important;border-radius:15px!important;background:#fff!important;
    box-shadow:0 2px 8px rgba(15,23,42,.035)!important;font-size:16px!important;padding:12px 14px!important;
  }
  .field input:focus,.field select:focus,.field textarea:focus,.searchbox:focus{
    border-color:#60a5fa!important;box-shadow:0 0 0 4px rgba(59,130,246,.12)!important;outline:0!important;
  }
  .btn{min-height:48px!important;border-radius:14px!important;font-weight:850!important;box-shadow:none!important}
  .btn-primary,.btn-blue{box-shadow:0 7px 18px rgba(37,99,235,.16)!important}

  /* Product manager becomes usable like an app on a phone. */
  #panel-products .card{padding:13px!important}
  #panel-products .grid2,#panel-products .grid3{grid-template-columns:1fr!important;gap:10px!important}
  #panel-products #saveNewProduct,#panel-products #saveCombo{width:100%!important;min-height:52px!important;border-radius:15px!important;font-size:15px!important}
  #panel-products .combo-item-row{border:1px solid #e7ebf2!important;border-radius:14px!important;padding:12px!important;background:#f8fafc!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto 42px!important;align-items:center!important;gap:8px!important}
  #panel-products .combo-item-row button{width:42px!important;height:42px!important;border-radius:12px!important;border:0!important;background:#fee2e2!important;color:#be123c!important;font-size:20px!important}
  #panel-products .row-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important;min-width:148px!important}
  #panel-products .row-actions .btn{min-height:42px!important;padding:8px 10px!important;border-radius:12px!important}

  /* Four-button app dock. Exactly: Order / History / Product / Settings. */
  .mobile-bottom-nav{
    display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important;
    position:fixed!important;left:8px!important;right:8px!important;bottom:8px!important;width:auto!important;
    padding:8px 8px calc(8px + env(safe-area-inset-bottom))!important;border-radius:24px!important;
    background:rgba(255,255,255,.94)!important;backdrop-filter:blur(20px)!important;-webkit-backdrop-filter:blur(20px)!important;
    border:1px solid rgba(226,232,240,.95)!important;box-shadow:0 14px 40px rgba(15,23,42,.18)!important;z-index:9998!important;
  }
  .mobile-nav-btn{
    min-width:0!important;min-height:66px!important;border:0!important;border-radius:18px!important;padding:7px 3px 6px!important;
    display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:4px!important;
    color:#64748b!important;background:#f8fafc!important;transition:transform .12s ease,box-shadow .12s ease,background .12s ease!important;
  }
  .mobile-nav-btn .nav-icon,.mobile-nav-btn>span{font-size:22px!important;line-height:1!important;filter:none!important}
  .mobile-nav-btn b{font-size:10.5px!important;line-height:1.1!important;font-weight:900!important;white-space:nowrap!important}
  .mobile-nav-btn:active{transform:scale(.96)!important}
  .mobile-nav-btn.nav-order{background:#eff6ff!important;color:#1d4ed8!important}
  .mobile-nav-btn.nav-history{background:#f5f3ff!important;color:#6d28d9!important}
  .mobile-nav-btn.nav-products{background:#ecfdf5!important;color:#047857!important}
  .mobile-nav-btn.nav-settings{background:#fff7ed!important;color:#c2410c!important}
  .mobile-nav-btn.nav-order.active{background:linear-gradient(145deg,var(--v92-order),var(--v92-order2))!important;color:#fff!important;box-shadow:0 8px 20px rgba(37,99,235,.28)!important}
  .mobile-nav-btn.nav-history.active{background:linear-gradient(145deg,var(--v92-history),var(--v92-history2))!important;color:#fff!important;box-shadow:0 8px 20px rgba(124,58,237,.26)!important}
  .mobile-nav-btn.nav-products.active{background:linear-gradient(145deg,var(--v92-product),var(--v92-product2))!important;color:#fff!important;box-shadow:0 8px 20px rgba(5,150,105,.25)!important}
  .mobile-nav-btn.nav-settings.active{background:linear-gradient(145deg,var(--v92-settings),var(--v92-settings2))!important;color:#fff!important;box-shadow:0 8px 20px rgba(234,88,12,.25)!important}
  .role-hidden.mobile-nav-btn{display:none!important}

  .mobile-menu-card{border-radius:26px 26px 0 0!important;padding:16px!important;background:#fff!important;box-shadow:0 -16px 42px rgba(15,23,42,.20)!important}
  .mobile-menu-head{padding:2px 2px 14px!important}.mobile-menu-head strong{font-size:18px!important}
  .mobile-menu-close{width:40px!important;height:40px!important;border-radius:13px!important;background:#f1f5f9!important}
  .mobile-menu-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .mobile-menu-grid button{min-height:78px!important;border-radius:18px!important;border:1px solid #e7ebf2!important;background:#f8fafc!important;font-weight:850!important;font-size:15px!important}
  .mobile-menu-grid button>span{font-size:12px!important;margin-top:5px!important}

  .toast{left:12px!important;right:12px!important;max-width:none!important;bottom:calc(102px + env(safe-area-inset-bottom))!important;border-radius:16px!important;padding:13px 15px!important;font-size:14px!important}
}

@media screen and (max-width:380px){
  .mobile-bottom-nav{left:5px!important;right:5px!important;gap:5px!important;padding-left:5px!important;padding-right:5px!important}
  .mobile-nav-btn{min-height:62px!important;border-radius:16px!important}.mobile-nav-btn b{font-size:9.5px!important}.mobile-nav-btn .nav-icon,.mobile-nav-btn>span{font-size:20px!important}
}


/* ======================================================================
   V93 — TRUE MOBILE FULL-WIDTH UI + EDIT-CART REMOVE + CLEAN PRODUCT FORM
   Final overrides deliberately placed last to beat legacy mobile rules.
   ====================================================================== */
@media screen and (max-width:760px){
  html,body{width:100%!important;max-width:100%!important;overflow-x:hidden!important;background:#f4f7fb!important}
  #app.shell{width:100vw!important;max-width:none!important;margin:0!important;padding:8px 8px calc(104px + env(safe-area-inset-bottom))!important;overflow-x:hidden!important}
  .panel,.panel.active{width:100%!important;max-width:100%!important;min-width:0!important}
  #panel-new>.grid.grid2{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;width:100%!important}
  #panel-new .card{width:100%!important;max-width:100%!important;margin-left:0!important;margin-right:0!important;padding:12px!important}
  #panel-new .grid2,.customer-card .grid2,.product-card .grid2{grid-template-columns:1fr!important;gap:10px!important}
  #panel-new .product-filter-grid{grid-template-columns:1fr 1fr!important}
  .topbar-inner{width:100%!important;max-width:none!important}

  /* Edit cart: never horizontal-scroll; each product is a touch-friendly card. */
  #panel-new .cart-card .table-wrap{width:100%!important;max-width:100%!important;overflow:visible!important;border:0!important}
  #panel-new .cart-card .table{display:block!important;width:100%!important;min-width:0!important;max-width:100%!important;background:transparent!important}
  #panel-new .cart-card .table thead{display:none!important}
  #panel-new .cart-card .table tbody{display:block!important;width:100%!important}
  #panel-new .cart-card .table tr{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;width:100%!important;max-width:100%!important;gap:6px 10px!important;padding:11px!important;margin:0 0 9px!important;border:1px solid #e3eaf2!important;border-radius:16px!important;background:#fff!important;box-shadow:0 4px 15px rgba(15,23,42,.045)!important}
  #panel-new .cart-card .table td{display:block!important;min-width:0!important;padding:2px 0!important;border:0!important;font-size:13px!important;overflow-wrap:anywhere!important}
  #panel-new .cart-card .table td:nth-child(1){grid-column:1/-1!important;font-size:14px!important;color:#172033!important;padding-bottom:7px!important;margin-bottom:1px!important;border-bottom:1px dashed #e5eaf0!important}
  #panel-new .cart-card .table td:nth-child(2)::before{content:'সাইজ: ';font-size:11px;color:#64748b;font-weight:700}
  #panel-new .cart-card .table td:nth-child(3)::before{content:'Qty: ';font-size:11px;color:#64748b;font-weight:700}
  #panel-new .cart-card .table td:nth-child(4)::before{content:'দাম: ';font-size:11px;color:#64748b;font-weight:700}
  #panel-new .cart-card .table td:nth-child(5)::before{content:'মোট: ';font-size:11px;color:#64748b;font-weight:700}
  #panel-new .cart-card .table td:nth-child(5){color:#0f766e!important;font-weight:900!important}
  #panel-new .cart-card .table td:nth-child(6){grid-column:1/-1!important;grid-row:auto!important;text-align:stretch!important;padding-top:5px!important}
  #panel-new .cart-card .cart-qty-input{width:86px!important;max-width:100%!important;min-height:40px!important;border:1.5px solid #d7e0ea!important;border-radius:11px!important;font-size:16px!important;padding:6px 8px!important}
  #panel-new .cart-card .cart-remove-btn{display:flex!important;width:100%!important;min-height:44px!important;align-items:center!important;justify-content:center!important;background:#fff1f2!important;color:#be123c!important;border:1px solid #fecdd3!important;border-radius:12px!important;font-size:13px!important;font-weight:900!important}

  /* Product management: simple first screen, advanced fields on demand. */
  #panel-products{width:100%!important;max-width:100%!important}
  #panel-products>.card{padding:10px!important;border-radius:18px!important}
  #panel-products .toolbar{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
  #panel-products .toolbar .row-actions{display:grid!important;grid-template-columns:1fr!important;width:100%!important}
  #panel-products .toolbar .searchbox{max-width:none!important;width:100%!important}
  #panel-products .category-add-panel{display:none!important}
  #panel-products .product-add-panel{border:1px solid #e6ebf2!important;border-radius:18px!important;padding:12px!important;background:#fff!important;margin:0 0 10px!important}
  #panel-products .product-mobile-title{display:block!important;font-size:17px!important;font-weight:900!important;color:#172033!important;margin-bottom:10px!important}
  #panel-products .product-add-grid,#panel-products .product-basic-grid{display:grid!important;grid-template-columns:1fr!important;gap:9px!important}
  #panel-products .product-advanced-field{display:none!important}
  #panel-products .product-add-panel.show-advanced .product-advanced-field{display:block!important}
  #panel-products .product-advanced-toggle{display:flex!important;width:100%!important;align-items:center!important;justify-content:center!important;margin:10px 0!important;min-height:44px!important;background:#f1f5f9!important;color:#334155!important;border:1px solid #e2e8f0!important}
  #panel-products .product-save-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;width:100%!important}
  #panel-products #saveNewProduct,#panel-products #cancelProductEdit{width:100%!important;min-height:52px!important;font-size:15px!important}
  #panel-products .combo-builder-details{border:1px solid #e8defd!important;border-radius:18px!important;background:#faf8ff!important;padding:0!important;overflow:hidden!important;margin-bottom:10px!important}
  #panel-products .combo-summary{list-style:none!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:8px!important;padding:15px!important;cursor:pointer!important;font-weight:900!important;color:#6d28d9!important}
  #panel-products .combo-summary::-webkit-details-marker{display:none!important}
  #panel-products .combo-summary small{font-size:11px!important;color:#7c6f9d!important;font-weight:700!important}
  #panel-products .combo-builder-details[open]{padding:0 12px 12px!important}
  #panel-products .combo-builder-details[open] .combo-summary{margin:0 -12px 10px!important;border-bottom:1px solid #ebe4fb!important;background:#f5f3ff!important}
  #panel-products .combo-inner-heading{display:none!important}
  #panel-products .combo-builder-details .product-add-grid{grid-template-columns:1fr!important}
  #panel-products .combo-item-add{display:grid!important;grid-template-columns:1fr 86px!important;gap:8px!important}
  #panel-products .combo-item-add select:nth-child(2){grid-column:1/-1!important}
  #panel-products .combo-item-add .btn{grid-column:1/-1!important;width:100%!important}
  #panel-products .notice{font-size:11px!important}

  /* Product list becomes cards, no 700px desktop table squeezed on phone. */
  #panel-products .table-wrap{overflow:visible!important;border:0!important}
  #panel-products .table{display:block!important;min-width:0!important;width:100%!important;background:transparent!important}
  #panel-products .table thead{display:none!important}
  #panel-products .table tbody{display:block!important}
  #panel-products .table tr{display:grid!important;grid-template-columns:1fr 1fr!important;gap:6px 10px!important;border:1px solid #e5eaf1!important;border-radius:16px!important;background:#fff!important;padding:11px!important;margin-bottom:9px!important}
  #panel-products .table td{display:block!important;border:0!important;padding:2px 0!important;font-size:12px!important;min-width:0!important;overflow-wrap:anywhere!important}
  #panel-products .table td:first-child{grid-column:1/-1!important;font-size:14px!important;font-weight:900!important;color:#172033!important;border-bottom:1px dashed #e5e7eb!important;padding-bottom:7px!important}
  #panel-products .table td:nth-child(2)::before{content:'Category: ';color:#64748b;font-weight:700}
  #panel-products .table td:nth-child(3)::before{content:'Color: ';color:#64748b;font-weight:700}
  #panel-products .table td:nth-child(4)::before{content:'Unit: ';color:#64748b;font-weight:700}
  #panel-products .table td:nth-child(5)::before{content:'দাম: ';color:#64748b;font-weight:700}
  #panel-products .table td:nth-child(6)::before{content:'Stock: ';color:#64748b;font-weight:700}
  #panel-products .table td:nth-child(7)::before{content:'উৎস: ';color:#64748b;font-weight:700}
  #panel-products .table td:nth-child(8){grid-column:1/-1!important}
  #panel-products .table td:nth-child(9){grid-column:1/-1!important}
  #panel-products .table td:nth-child(9) .row-actions{display:grid!important;grid-template-columns:1fr 1fr!important;gap:7px!important;width:100%!important}
  #panel-products .table td:nth-child(9) .btn{width:100%!important;min-height:42px!important}

  /* Bottom app dock: full-width but not oversized. */
  .mobile-bottom-nav{left:6px!important;right:6px!important;bottom:6px!important;gap:6px!important;padding:7px 7px calc(7px + env(safe-area-inset-bottom))!important;border-radius:20px!important}
  .mobile-nav-btn{min-height:60px!important;border-radius:15px!important;padding:6px 2px!important}
  .mobile-nav-btn .nav-icon,.mobile-nav-btn>span{font-size:20px!important}
  .mobile-nav-btn b{font-size:10px!important}
}
@media screen and (max-width:390px){
  #panel-new .product-filter-grid{grid-template-columns:1fr!important}
}
@media screen and (min-width:761px){
  .product-mobile-title,.product-advanced-toggle{display:none!important}
  .product-advanced-field{display:block!important}
  .combo-builder-details>summary{display:flex!important}
  .combo-builder-details{display:block!important}
}

/* =========================================================
   V94 MOBILE APP UI — CART + BEAUTIFUL ACTION BUTTONS
   Final mobile-only overrides. Desktop remains unchanged.
   ========================================================= */
@media screen and (max-width:760px){
  :root{
    --v94-blue:#2563eb;--v94-blue2:#60a5fa;
    --v94-violet:#7c3aed;--v94-violet2:#a78bfa;
    --v94-green:#059669;--v94-green2:#34d399;
    --v94-orange:#ea580c;--v94-orange2:#fb923c;
    --v94-red:#e11d48;--v94-red2:#fb7185;
    --v94-ink:#0f172a;--v94-muted:#64748b;--v94-line:#e5e7eb;
  }

  /* Main touch buttons: large, rounded, app-like. */
  #addCartBtn,#saveOrderBtn,#refreshOrderBtn,#cancelEditBtn,
  #panel-products #saveNewProduct,#panel-products #saveCombo,
  #panel-products .product-advanced-toggle{
    min-height:52px!important;border-radius:16px!important;font-size:15px!important;font-weight:900!important;
    letter-spacing:.1px!important;box-shadow:0 8px 22px rgba(15,23,42,.10)!important;
    transition:transform .12s ease,box-shadow .12s ease!important;
  }
  #addCartBtn{width:100%!important;background:linear-gradient(135deg,var(--v94-green),var(--v94-green2))!important;color:#fff!important;border:0!important}
  #addCartBtn::before{content:'＋';font-size:21px;margin-right:7px;font-weight:900}
  #saveOrderBtn{background:linear-gradient(135deg,var(--v94-blue),var(--v94-blue2))!important;color:#fff!important;border:0!important}
  #saveOrderBtn::before{content:'✓ ';font-weight:1000}
  #refreshOrderBtn{background:#fff!important;border:1.5px solid #cbd5e1!important;color:#334155!important}
  #cancelEditBtn{background:#fff1f2!important;border:1.5px solid #fecdd3!important;color:#be123c!important}
  #addCartBtn:active,#saveOrderBtn:active,#refreshOrderBtn:active,#cancelEditBtn:active{transform:scale(.98)!important;box-shadow:0 3px 10px rgba(15,23,42,.10)!important}

  /* Cart becomes real app cards. Force all product data visible. */
  #panel-new .cart-card{padding:12px!important;border-radius:22px!important;overflow:visible!important}
  #panel-new .cart-card .table-wrap{overflow:visible!important;width:100%!important;border:0!important;background:transparent!important}
  #panel-new .cart-card .table{display:block!important;width:100%!important;min-width:0!important;border:0!important;background:transparent!important}
  #panel-new .cart-card .table thead{display:none!important}
  #panel-new .cart-card .table tbody{display:block!important;width:100%!important}
  #panel-new .cart-card .table tr:not(:has(.empty)){
    display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:9px 12px!important;
    width:100%!important;margin:0 0 12px!important;padding:13px!important;background:#fff!important;
    border:1px solid #e4eaf2!important;border-radius:18px!important;box-shadow:0 6px 20px rgba(15,23,42,.06)!important;
  }
  #panel-new .cart-card .table td{
    display:block!important;visibility:visible!important;opacity:1!important;position:static!important;width:auto!important;max-width:none!important;
    min-width:0!important;padding:0!important;border:0!important;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;
    font-size:13px!important;color:var(--v94-ink)!important;
  }
  #panel-new .cart-card .table td:nth-child(1){
    grid-column:1/-1!important;font-size:16px!important;font-weight:900!important;line-height:1.35!important;padding-bottom:9px!important;
    border-bottom:1px dashed #dbe3ec!important;color:#111827!important;
  }
  #panel-new .cart-card .table td:nth-child(1) small{display:block!important;margin-top:4px!important;font-size:11px!important;color:var(--v94-muted)!important;font-weight:700!important}
  #panel-new .cart-card .table td:nth-child(2){grid-column:1/2!important;background:#f8fafc!important;border-radius:10px!important;padding:8px 10px!important;color:#475569!important}
  #panel-new .cart-card .table td:nth-child(2)::before{content:'সাইজ / ইউনিট';display:block!important;font-size:10px!important;color:#94a3b8!important;font-weight:800!important;margin-bottom:2px!important}
  #panel-new .cart-card .table td:nth-child(3){grid-column:2/3!important;grid-row:2/4!important;align-self:stretch!important;display:flex!important;flex-direction:column!important;justify-content:center!important;align-items:center!important;min-width:82px!important;background:#eff6ff!important;border-radius:12px!important;padding:7px!important}
  #panel-new .cart-card .table td:nth-child(3)::before{content:'পরিমাণ';font-size:10px!important;color:#2563eb!important;font-weight:900!important;margin-bottom:4px!important}
  #panel-new .cart-card .cart-qty-input{width:58px!important;min-height:40px!important;text-align:center!important;border:1.5px solid #bfdbfe!important;background:#fff!important;border-radius:11px!important;font-size:16px!important;font-weight:900!important;color:#1d4ed8!important;padding:5px!important}
  #panel-new .cart-card .table td:nth-child(4){grid-column:1/2!important;padding:7px 10px!important;background:#fff7ed!important;border-radius:10px!important;color:#9a3412!important;font-weight:800!important}
  #panel-new .cart-card .table td:nth-child(4)::before{content:'দাম: ';font-size:11px!important;color:#c2410c!important;font-weight:700!important}
  #panel-new .cart-card .table td:nth-child(5){grid-column:1/2!important;padding:7px 10px!important;background:#ecfdf5!important;border-radius:10px!important;color:#047857!important;font-weight:1000!important;font-size:14px!important}
  #panel-new .cart-card .table td:nth-child(5)::before{content:'মোট: ';font-size:11px!important;color:#059669!important;font-weight:800!important}
  #panel-new .cart-card .table td:nth-child(6){grid-column:1/-1!important;padding-top:2px!important}
  #panel-new .cart-card .cart-remove-btn{
    width:100%!important;min-height:46px!important;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px!important;
    background:linear-gradient(135deg,#fff1f2,#ffe4e6)!important;color:#be123c!important;border:1.5px solid #fecdd3!important;
    border-radius:13px!important;font-size:13px!important;font-weight:900!important;box-shadow:none!important;
  }
  #panel-new .cart-card .cart-remove-btn:active{transform:scale(.98)!important;background:#ffe4e6!important}

  /* Empty cart */
  #panel-new .cart-card .table tr:has(.empty){display:block!important;border:1px dashed #cbd5e1!important;border-radius:16px!important;background:#f8fafc!important;padding:22px 12px!important}
  #panel-new .cart-card .table .empty{display:block!important;text-align:center!important;color:#64748b!important;font-weight:800!important}

  /* Discount / delivery + summary as a clean mobile card. */
  #panel-new .cart-card>.grid.grid2{display:block!important;margin-top:8px!important}
  #panel-new .cart-card>.grid.grid2>div:first-child{display:none!important}
  #panel-new .cart-card>.grid.grid2>div:last-child>.grid.grid2{grid-template-columns:1fr 1fr!important;gap:9px!important}
  #panel-new .cart-card .cart-total{margin-top:11px!important;border:1px solid #dbe5f0!important;border-radius:16px!important;overflow:hidden!important;background:#fff!important;box-shadow:0 5px 16px rgba(15,23,42,.05)!important}
  #panel-new .cart-card .total-line{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;min-height:45px!important;padding:10px 13px!important;border-bottom:1px solid #eef2f7!important;font-size:14px!important}
  #panel-new .cart-card .total-line strong,#panel-new .cart-card .total-line>span:last-child{white-space:nowrap!important;font-size:15px!important;font-weight:900!important}
  #panel-new .cart-card .total-line.grand{min-height:54px!important;background:linear-gradient(135deg,#1d4ed8,#3b82f6)!important;color:#fff!important;border-bottom:0!important;font-size:16px!important;font-weight:900!important}
  #panel-new .cart-card .total-line.grand #grandText{font-size:19px!important;color:#fff!important}
  .save-order-actions{display:grid!important;grid-template-columns:1fr!important;gap:8px!important;margin-top:12px!important}
  .order-reset-actions{margin-top:10px!important}.order-reset-actions #refreshOrderBtn{width:100%!important}

  /* Bottom dock — colorful, modern app navigation. */
  .mobile-bottom-nav{
    display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px!important;
    left:8px!important;right:8px!important;bottom:8px!important;padding:8px 8px calc(8px + env(safe-area-inset-bottom))!important;
    border-radius:24px!important;background:rgba(255,255,255,.97)!important;backdrop-filter:blur(18px)!important;
    border:1px solid rgba(226,232,240,.95)!important;box-shadow:0 18px 46px rgba(15,23,42,.20)!important;
  }
  .mobile-nav-btn{
    position:relative!important;min-width:0!important;min-height:66px!important;border:0!important;border-radius:18px!important;
    padding:7px 2px 6px!important;display:flex!important;flex-direction:column!important;align-items:center!important;justify-content:center!important;gap:5px!important;
    box-shadow:inset 0 0 0 1px rgba(255,255,255,.55)!important;overflow:hidden!important;
  }
  .mobile-nav-btn .nav-icon{display:flex!important;align-items:center!important;justify-content:center!important;width:31px!important;height:31px!important;border-radius:11px!important;font-size:18px!important;background:rgba(255,255,255,.78)!important;box-shadow:0 3px 10px rgba(15,23,42,.08)!important}
  .mobile-nav-btn b{font-size:10.5px!important;font-weight:1000!important;letter-spacing:.05px!important;line-height:1!important}
  .mobile-nav-btn.nav-order{background:linear-gradient(145deg,#eff6ff,#dbeafe)!important;color:#1d4ed8!important}
  .mobile-nav-btn.nav-history{background:linear-gradient(145deg,#f5f3ff,#ede9fe)!important;color:#6d28d9!important}
  .mobile-nav-btn.nav-products{background:linear-gradient(145deg,#ecfdf5,#d1fae5)!important;color:#047857!important}
  .mobile-nav-btn.nav-settings{background:linear-gradient(145deg,#fff7ed,#ffedd5)!important;color:#c2410c!important}
  .mobile-nav-btn.active{color:#fff!important;transform:translateY(-2px)!important}
  .mobile-nav-btn.active .nav-icon{background:rgba(255,255,255,.20)!important;color:#fff!important;box-shadow:none!important}
  .mobile-nav-btn.nav-order.active{background:linear-gradient(145deg,#2563eb,#3b82f6)!important;box-shadow:0 9px 22px rgba(37,99,235,.30)!important}
  .mobile-nav-btn.nav-history.active{background:linear-gradient(145deg,#7c3aed,#8b5cf6)!important;box-shadow:0 9px 22px rgba(124,58,237,.28)!important}
  .mobile-nav-btn.nav-products.active{background:linear-gradient(145deg,#059669,#10b981)!important;box-shadow:0 9px 22px rgba(5,150,105,.28)!important}
  .mobile-nav-btn.nav-settings.active{background:linear-gradient(145deg,#ea580c,#f97316)!important;box-shadow:0 9px 22px rgba(234,88,12,.28)!important}
  .mobile-nav-btn:active{transform:scale(.96)!important}
}
.managed-product-name{display:flex;align-items:center;gap:8px;min-width:180px}.managed-product-name img{width:38px;height:38px;object-fit:cover;border:1px solid #dbe4ef;border-radius:7px;background:#fff}.invoice-product-name{display:flex;align-items:center;gap:1.2mm;min-width:0}.invoice-product-name img{width:8mm;height:8mm;flex:0 0 8mm;object-fit:cover;border:1px solid #d9e0ea;border-radius:1mm;background:#fff}.invoice-product-name span{overflow-wrap:anywhere}.invoice-sheet.compact-15 .invoice-product-name img,.invoice-sheet.compact-18 .invoice-product-name img,.invoice-sheet.compact-20 .invoice-product-name img{width:5mm;height:5mm;flex-basis:5mm}

/* V103 Finance */
.finance-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:14px 0}.finance-range-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.finance-net{border:2px solid #15803d}.finance-filter{margin-top:8px}.finance-split{grid-template-columns:1.2fr .8fr;gap:18px;align-items:start}.finance-variant-row{grid-template-columns:1.2fr 1fr .8fr .8fr auto!important}.finance-variant-labels{grid-template-columns:1.2fr 1fr .8fr .8fr auto!important}.finance-card small{display:block;color:#64748b;font-size:11px;margin-top:2px}@media(max-width:900px){.finance-kpis,.finance-range-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.finance-split{grid-template-columns:1fr}.finance-variant-row{grid-template-columns:1fr 1fr!important}.finance-variant-labels{display:none!important}.finance-variant-row .product-variant-remove{grid-column:2}}
