.product-live-page{max-width:1340px;margin:0 auto;padding-bottom:20px}.product-live-title{display:flex;align-items:flex-end;justify-content:space-between;gap:16px;margin:0 2px 20px}.product-live-title>div>span{color:#287ee8;font-size:9px;font-weight:800;letter-spacing:.6px}.product-live-title h1{margin:7px 0 4px;color:#15253c;font:800 25px Manrope,sans-serif}.product-live-title p{margin:0;color:#6b7a90;font-size:12px}.product-live-title button,.product-live-card header button,.product-live-pagination button,.product-live-form footer button{height:35px;border:1px solid #d1e1f5;border-radius:7px;background:#fff;color:#2479e6;padding:0 11px;font:700 10px "DM Sans",sans-serif;cursor:pointer}.product-live-primary{border-color:#197df0!important;background:#197df0!important;color:#fff!important;box-shadow:0 7px 13px #197df034}.product-live-title-actions{display:flex;gap:8px}.product-live-filters{display:flex;align-items:end;gap:8px;flex-wrap:wrap;margin:0 0 13px}.product-live-filters label{display:flex;align-items:center;gap:6px;height:35px;border:1px solid #dce5ef;border-radius:7px;background:#fff;padding:0 9px;color:#58708d;font-size:10px}.product-live-filters label:first-child{width:300px}.product-live-filters input,.product-live-filters select{height:31px;border:0;outline:0;background:transparent;color:#31435b;font:10px "DM Sans",sans-serif;min-width:110px}.product-live-filters label:first-child input{width:100%;min-width:0}.product-live-filters>button{height:35px;border:1px solid #d2e2f7;border-radius:7px;background:#f6faff;color:#287be8;padding:0 12px;font:700 10px "DM Sans";cursor:pointer}.product-live-card,.product-live-detail-head,.product-live-info,.product-live-summary article,.product-live-form{background:#fff;border:1px solid #e2e8f0;border-radius:10px;box-shadow:0 3px 11px #15305008}.product-live-card{overflow:hidden}.product-live-card>header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:14px 16px 10px}.product-live-card h2,.product-live-form h2{margin:0;color:#1a2a40;font:800 14px Manrope,sans-serif}.product-live-card header small,.product-live-form header small{display:block;margin-top:4px;color:#8996a7;font-size:9px}.product-live-table{overflow:auto}.product-live-table table{width:100%;min-width:1160px;border-collapse:collapse;font-size:10px}.product-live-table th{padding:11px 10px;background:#f7f9fc;color:#64738a;text-align:left;font-size:9px;white-space:nowrap}.product-live-table td{padding:10px;border-top:1px solid #edf1f5;color:#445268;vertical-align:middle}.product-live-table td button{border:0;background:transparent;color:#197deb;font:700 10px "DM Sans";cursor:pointer;margin-right:7px}.product-live-name{font-size:10.5px!important}.product-live-rx{display:block;margin-top:3px;color:#d85b4d;font-size:8px}.product-live-barcode{font-size:9px;color:#53657d}.product-live-status{display:inline-block;padding:4px 8px;border-radius:13px;font-size:8.5px;font-weight:800}.product-live-status.active{background:#e6f8ed;color:#15955d}.product-live-status.inactive{background:#f0f3f6;color:#748294}.product-live-pagination{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:11px 16px;border-top:1px solid #edf1f5}.product-live-pagination span{margin-right:auto;color:#718096;font-size:9px}.product-live-pagination button:disabled{opacity:.45;cursor:not-allowed}.product-live-empty{text-align:center!important;padding:30px!important;color:#718096!important}.product-live-detail-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px;margin-bottom:12px}.product-live-detail-head h2{margin:7px 0 4px;color:#17263d;font:800 20px Manrope}.product-live-detail-head p{margin:0;color:#708096;font-size:11px}.product-live-summary{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:9px;margin-bottom:12px}.product-live-summary article{padding:12px}.product-live-summary span,.product-live-summary small{display:block;color:#738197;font-size:9px}.product-live-summary b{display:block;margin:6px 0;color:#1d2d43;font:800 17px Manrope}.product-live-info{display:grid;grid-template-columns:repeat(6,1fr);gap:0;margin-bottom:12px;overflow:hidden}.product-live-info div{padding:12px;border-right:1px solid #edf1f5}.product-live-info div:last-child{border:0}.product-live-info span{display:block;color:#748299;font-size:9px}.product-live-info b{display:block;margin-top:5px;color:#26364d;font-size:10px}.product-live-form{max-width:980px;overflow:hidden}.product-live-form>section>header{padding:17px 18px 10px}.product-live-form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:11px;padding:8px 18px 18px}.product-live-form-grid>label:not(.product-live-switch){display:grid;gap:5px;color:#64738a;font-size:9px;font-weight:700}.product-live-form-grid input{height:35px;border:1px solid #dce5ef;border-radius:6px;padding:0 9px;background:#fbfdff;color:#293950;font:10.5px "DM Sans";outline-color:#8abbf5}.product-live-switch{display:flex!important;align-items:center;gap:9px;padding:10px;border:1px solid #e1e8f0;border-radius:7px;cursor:pointer}.product-live-switch input{display:none}.product-live-switch>span{width:33px;height:18px;border-radius:10px;background:#ccd5df;position:relative;flex:none}.product-live-switch>span:after{content:"";position:absolute;width:14px;height:14px;top:2px;left:2px;border-radius:50%;background:#fff;transition:.18s}.product-live-switch input:checked+span{background:#1a9bdf}.product-live-switch input:checked+span:after{left:17px}.product-live-switch b{display:block;color:#2c3b51;font-size:10px}.product-live-switch small{display:block;margin-top:3px;color:#8190a3;font-size:8.5px}.product-live-form footer{display:flex;justify-content:flex-end;gap:8px;padding:13px 18px;border-top:1px solid #e9eef3}@media(max-width:1050px){.product-live-summary{grid-template-columns:repeat(3,1fr)}.product-live-info{grid-template-columns:repeat(3,1fr)}.product-live-form-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:700px){.product-live-title{align-items:flex-start;flex-direction:column}.product-live-title h1{font-size:20px}.product-live-filters label:first-child{width:100%}.product-live-filters>*{flex:1}.product-live-summary{grid-template-columns:repeat(2,1fr)}.product-live-info{grid-template-columns:repeat(2,1fr)}.product-live-form-grid{grid-template-columns:1fr;padding:10px 14px}.product-live-form>section>header,.product-live-form footer{padding-left:14px;padding-right:14px}}
.product-live-form>section.product-price-card{margin:0 18px 18px;border:1px solid #dce7f3;border-radius:10px;background:#fff;box-shadow:0 3px 11px #15305008}.product-price-card h2{color:#197df0}.product-price-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.product-price-grid input{width:100%;min-width:0;box-sizing:border-box}@media(max-width:700px){.product-live-form>section.product-price-card{margin:0 14px 14px}.product-price-grid{grid-template-columns:1fr}}
.product-barcode-control{display:flex;align-items:center;gap:7px;min-width:0}
.product-opening-card>header{display:flex;align-items:center;justify-content:space-between;gap:16px}.product-opening-toggle{display:flex;align-items:center;gap:8px;white-space:nowrap;color:#197df0;font-size:12px;font-weight:700}.product-opening-toggle input{width:17px;height:17px;accent-color:#197df0}.product-opening-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;border:0;min-width:0;margin:0;padding:10px 18px 18px}.product-opening-grid:disabled{display:none}.product-opening-grid label{display:flex;flex-direction:column;gap:6px;color:#58708d;font-size:11px;font-weight:700;min-width:0}.product-opening-grid input{width:100%;min-width:0;box-sizing:border-box;height:42px;padding:0 12px;border:1px solid #d1e1f5;border-radius:9px;background:#f8fcff;color:#243b57;font:inherit;outline:none}.product-opening-grid input:focus{border-color:#197df0;box-shadow:0 0 0 3px #197df018}@media(max-width:700px){.product-opening-card>header{align-items:flex-start;flex-direction:column}.product-opening-grid{grid-template-columns:1fr;padding:10px 14px 18px}.product-opening-toggle{white-space:normal}}
/* Retail Inventory Add Product only. New unnamed controls are presentation-only. */
#app [data-product-form]:not([data-purchase-product]):not([data-manual-entry]) > .product-opening-card[data-inventory-add-opening] .product-opening-retail-grid:not(:disabled){display:grid!important;grid-template-columns:repeat(6,minmax(0,1fr))!important;gap:10px!important;margin:0;padding:12px 14px 16px;--retail-opening-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 24' fill='none' stroke='%230080ef' stroke-width='2'%3E%3Cpath d='M4 2h8l4 4v16H4zM12 2v5h4M7 12h6M7 16h6'/%3E%3C/svg%3E")}
#app [data-product-form]:not([data-purchase-product]):not([data-manual-entry]) > .product-opening-card[data-inventory-add-opening] .product-opening-retail-grid > label{position:relative;display:flex;flex-direction:column;grid-column:span 2;min-width:0;gap:0!important;margin:0;padding:0!important;overflow:hidden;border:1px solid #cce0ff;border-radius:12px;background:linear-gradient(120deg,#e7f2ff,#d0e2ff);box-shadow:0 2px 4px #3b7bc31c;color:#0b174d!important;font:700 12px/1.25 Arial!important}
#app [data-product-form]:not([data-purchase-product]):not([data-manual-entry]) > .product-opening-card[data-inventory-add-opening] .product-opening-retail-grid > [data-retail-opening-span="3"]{grid-column:span 3}
#app [data-product-form]:not([data-purchase-product]):not([data-manual-entry]) > .product-opening-card[data-inventory-add-opening] .product-opening-retail-grid > [data-retail-opening-span="6"]{grid-column:span 6}
#app [data-product-form]:not([data-purchase-product]):not([data-manual-entry]) > .product-opening-card[data-inventory-add-opening] .product-opening-retail-label{display:block;padding:6px 10px;min-width:0;overflow-wrap:anywhere}
#app [data-product-form]:not([data-purchase-product]):not([data-manual-entry]) > .product-opening-card[data-inventory-add-opening] .product-opening-retail-grid input{display:block;width:100%;min-width:0;max-width:100%;height:36px!important;min-height:36px!important;margin:0;padding:0 9px 0 31px!important;box-sizing:border-box;border:1px solid #b8cff4!important;border-radius:10px!important;background:linear-gradient(120deg,#fff,#f4f9ff)!important;color:#0b174d!important;font:500 13px/1.25 Arial!important}
#app [data-product-form]:not([data-purchase-product]):not([data-manual-entry]) > .product-opening-card[data-inventory-add-opening] .product-opening-retail-grid > label::after{content:'';position:absolute;pointer-events:none;left:11px;bottom:10px;width:13px;height:16px;background:var(--retail-opening-icon) center/contain no-repeat}
.product-live-form-grid .product-barcode-control input{min-width:0;flex:1}
/* Separate from the positional field grid: existing mobile field order stays intact. */
.product-live-form .product-gst-master{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:center;gap:12px;margin:10px 0 0;padding:10px;border:1px solid #d8e9fb;border-radius:10px;background:linear-gradient(120deg,#f7fbff,#f0faf7)}
.product-live-form .product-gst-master>label{display:grid;gap:6px;min-width:0;margin:0;color:#174778;font-weight:700}
.product-live-form .product-gst-master select{box-sizing:border-box;width:100%;max-width:100%;min-width:0;height:36px;padding:6px 9px;border:1px solid #bbd7f5;border-radius:8px;background:#fff;color:#173356;font:inherit}
.product-live-form .product-gst-master>small{display:block;margin:0;color:#607b95;font-size:11px;line-height:1.45;overflow-wrap:anywhere}
.product-live-form .product-master-review{margin:10px 0 0;padding:9px 11px;border:1px solid #f3c987;border-radius:8px;background:#fff8e9;color:#825113;font-size:12px;line-height:1.45}
.product-live-form .product-master-review[hidden]{display:none}
.purchase-import-product-fields select[name="gst_tax_treatment"]{box-sizing:border-box;width:100%;max-width:100%;min-width:0;height:34px;padding:0 9px;border:1px solid #cde2f5;border-radius:7px;background:#fff;color:#213f64;font:600 11px "DM Sans",sans-serif}
@media(max-width:767px){.purchase-import-product-fields select[name="gst_tax_treatment"]{height:44px;font-size:16px}}
@media(max-width:767px){.product-live-form .product-gst-master{grid-template-columns:minmax(0,1fr);gap:6px;padding:9px}.product-live-form .product-gst-master select{height:44px;font-size:16px}.product-live-form .product-gst-master>small{font-size:11px}}
.product-barcode-scan-button{display:inline-flex;align-items:center;justify-content:center;gap:5px;height:35px;padding:0 10px;border:1px solid #a9d7ff;border-radius:7px;background:linear-gradient(135deg,#fff,#e5f4ff);color:#086ed8;font:700 10px "DM Sans",sans-serif;cursor:pointer;white-space:nowrap}
.product-barcode-scan-button svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:2}
.product-barcode-scan-button:hover{border-color:#5eaef7;background:linear-gradient(135deg,#f7fcff,#dcefff)}
.product-barcode-scan-button:focus-visible,.product-barcode-scanner-close:focus-visible,.product-barcode-scanner footer button:focus-visible{outline:2px solid rgba(20,125,232,.55);outline-offset:2px}
.product-barcode-scanner{position:fixed;inset:0;z-index:1200;display:grid;place-items:center;padding:20px;box-sizing:border-box}
.product-barcode-scanner-overlay{position:absolute;inset:0;background:rgba(7,27,53,.58)}
.product-barcode-scanner-panel{position:relative;width:min(560px,100%);overflow:hidden;border:1px solid #cfe8ff;border-radius:18px;background:#fff;box-shadow:0 24px 70px rgba(8,38,78,.32)}
.product-barcode-scanner-panel header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:19px 20px 14px;border-bottom:1px solid #e1efff}
.product-barcode-scanner-panel h2{margin:0;color:#10235c;font:800 20px/1.2 Manrope,sans-serif}
.product-barcode-scanner-panel header p{margin:5px 0 0;color:#607da7;font-size:12px;line-height:1.45}
.product-barcode-scanner-close{display:grid;place-items:center;width:32px;height:32px;padding:0;border:1px solid #d4e8fb;border-radius:9px;background:#f8fcff;color:#295989;font-size:23px;line-height:1;cursor:pointer}
.product-barcode-scanner-preview{position:relative;display:grid;min-height:280px;place-items:center;overflow:hidden;background:#0b1f37;color:#c3ddf5}
.product-barcode-scanner-preview video{display:block;width:100%;max-height:55vh;object-fit:cover}
.product-barcode-scanner-shade{position:absolute;inset:0;background:linear-gradient(rgba(5,21,39,.44),rgba(5,21,39,.18) 24%,rgba(5,21,39,.12) 76%,rgba(5,21,39,.44));pointer-events:none}
.product-barcode-scanner-frame{position:absolute;left:50%;top:47%;width:min(78%,390px);aspect-ratio:1.72;transform:translate(-50%,-50%);border:1px solid rgba(179,230,255,.32);border-radius:13px;box-shadow:0 0 0 999px rgba(5,22,40,.12);pointer-events:none}
.product-barcode-scanner-frame .corner{position:absolute;width:29px;height:29px;border:3px solid #6dd4ff;filter:drop-shadow(0 0 5px rgba(60,195,255,.8))}
.product-barcode-scanner-frame .top-left{left:-2px;top:-2px;border-right:0;border-bottom:0;border-radius:11px 0 0}.product-barcode-scanner-frame .top-right{right:-2px;top:-2px;border-left:0;border-bottom:0;border-radius:0 11px 0 0}.product-barcode-scanner-frame .bottom-left{left:-2px;bottom:-2px;border-right:0;border-top:0;border-radius:0 0 0 11px}.product-barcode-scanner-frame .bottom-right{right:-2px;bottom:-2px;border-left:0;border-top:0;border-radius:0 0 11px}
.product-barcode-scanner-line{position:absolute;left:8px;right:8px;top:10px;height:2px;border-radius:999px;background:#42ceff;box-shadow:0 0 12px #72ddff;animation:productBarcodeScannerSweep 2s ease-in-out infinite}
.product-barcode-scanner-guide{position:absolute;left:18px;right:18px;bottom:18px;display:grid;gap:3px;text-align:center;text-shadow:0 1px 3px #06192d}.product-barcode-scanner-guide b{color:#fff;font:800 13px Manrope,sans-serif}.product-barcode-scanner-guide span{color:#d4edff;font-size:11px}
.product-barcode-scanner-preview.is-detected .product-barcode-scanner-frame{border-color:#51e2a2}.product-barcode-scanner-preview.is-detected .corner{border-color:#51e2a2;filter:drop-shadow(0 0 6px rgba(81,226,162,.9))}.product-barcode-scanner-preview.is-detected .product-barcode-scanner-line{background:#51e2a2;box-shadow:0 0 12px #51e2a2;animation:none;top:50%}
.product-barcode-scanner-status{min-height:20px;margin:0;padding:14px 20px;color:#41658f;font-size:12px;line-height:1.45}.product-barcode-scanner-status.is-error{color:#bd3e4b}.product-barcode-scanner-status.is-success{color:#079768;font-weight:700}
.product-barcode-scanner-panel footer{display:flex;justify-content:flex-end;padding:0 20px 18px}.product-barcode-scanner-panel footer button{padding:9px 15px;border:1px solid #bddcff;border-radius:9px;background:#fff;color:#126bca;font:800 12px Manrope,sans-serif;cursor:pointer}
@keyframes productBarcodeScannerSweep{0%,100%{top:10px;opacity:.6}50%{top:calc(100% - 12px);opacity:1}}
@media(max-width:700px){.product-barcode-scanner{align-items:stretch;padding:max(10px,env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) max(10px,env(safe-area-inset-bottom)) max(10px,env(safe-area-inset-left))}.product-barcode-scanner-panel{width:100%;min-height:calc(100dvh - 20px);border-radius:16px;display:flex;flex-direction:column}.product-barcode-scanner-preview{flex:1;min-height:0}.product-barcode-scanner-preview video{height:100%;max-height:none}.product-barcode-scanner-panel footer{padding-bottom:max(18px,env(safe-area-inset-bottom))}}
.product-camera-zoom{position:absolute;z-index:1;left:50%;bottom:64px;display:flex;align-items:center;gap:7px;max-width:calc(100% - 28px);padding:6px 8px;border:1px solid rgba(191,229,255,.45);border-radius:12px;background:rgba(5,27,51,.74);box-shadow:0 8px 22px rgba(0,0,0,.22);transform:translateX(-50%);backdrop-filter:blur(8px)}
.product-camera-zoom[hidden]{display:none}.product-camera-zoom button{display:grid;place-items:center;width:29px;height:29px;padding:0;border:1px solid rgba(194,229,255,.56);border-radius:8px;background:rgba(255,255,255,.12);color:#fff;font:800 18px/1 Manrope,sans-serif;cursor:pointer}.product-camera-zoom input{width:min(150px,34vw);accent-color:#4acfff;cursor:pointer}.product-camera-zoom output{min-width:31px;color:#e7f7ff;font:800 11px Manrope,sans-serif;text-align:right}
.product-live-form > section.product-price-card:not(.product-opening-card) { display: none; }
@media(max-width:700px){.product-camera-zoom{bottom:max(74px,calc(env(safe-area-inset-bottom) + 58px))}.product-camera-zoom input{width:min(154px,38vw)}}
.purchase-inventory-product-overlay{position:fixed;inset:0;z-index:300;display:grid;place-items:center;padding:18px;background:rgba(16,38,68,.42);backdrop-filter:blur(4px);box-sizing:border-box}
.purchase-inventory-product-dialog{width:min(1050px,100%);max-height:calc(100dvh - 36px);min-height:0;display:flex;flex-direction:column;overflow:hidden;border:1px solid #cfe5fa;border-radius:18px;background:#f5faff;box-shadow:0 20px 70px #132b5540;padding:18px;box-sizing:border-box}
.purchase-inventory-product-dialog>[data-popup-form]{min-height:0;overflow:auto;overscroll-behavior:contain}
.purchase-inventory-product-dialog>:is(header,footer,[data-popup-status]){flex-shrink:0}
.purchase-inventory-product-dialog>header,.purchase-inventory-product-dialog>footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.purchase-inventory-product-dialog>header h2{margin:0;font-size:20px;color:#14335d}
.purchase-inventory-product-dialog>footer{justify-content:flex-end;margin-top:14px}
.purchase-inventory-product-dialog :is([data-popup-close],[data-popup-another]){border:1px solid #c9ddf4;border-radius:9px;padding:10px 16px;background:white;color:#126de0;cursor:pointer}
.purchase-inventory-product-dialog [data-popup-status]{color:#166b48;font-size:13px;overflow-wrap:anywhere}
.purchase-inventory-product-dialog .product-live-form>section.product-price-card:not(.product-opening-card){display:block}
/* Purchase creates stock only on Purchase Save; retain opening stock in all other forms. */
.purchase-inventory-product-dialog [data-product-form][data-purchase-product="true"] > section.product-opening-card {
  display:none!important;
}
.purchase-product-search-group{display:block;color:#1767bf;font-weight:800;border-bottom:1px solid #dce9f8;margin-bottom:5px;padding:4px 0}
@media(max-width:600px){.purchase-inventory-product-overlay{padding:8px}.purchase-inventory-product-dialog{padding:12px;max-height:calc(100dvh - 16px)}.purchase-inventory-product-dialog .product-live-form-grid{grid-template-columns:1fr 1fr}.purchase-inventory-product-dialog input{max-width:100%;min-width:0;font-size:16px}}

/* Mobile Purchase popup only: the live shared form is outside #app. Keep its DOM,
   names and handlers; CSS grid presents the reference order without moving nodes. */
@media screen and (max-width:767px) {
 html[data-medaliza-ui-mode="mobile"] .purchase-inventory-product-overlay {
  padding:max(8px,env(safe-area-inset-top)) max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left));
  & .purchase-inventory-product-dialog {
   width:100%;max-width:620px;max-height:calc(100dvh - 16px);padding:10px;border-radius:16px;
   background:linear-gradient(135deg,#fff,#edf5ff);border:1px solid #d0e8ff;box-shadow:0 12px 42px #12366440;
   color:#17305f;font-family:Arial,sans-serif;
   & >header {align-items:center;gap:8px;padding:0 0 6px;}
   & >header h2 {font:800 20px/1.2 Arial,sans-serif;color:#0b1949;}
   & >header>[data-popup-close] {display:grid;place-items:center;width:32px;height:32px;min-width:32px;padding:0;font:400 24px/1 Arial;color:#0066e8;border:1px solid #bddcff;border-radius:10px;background:linear-gradient(#fff,#f0f8ff);box-shadow:0 3px 8px #1374d322;}
   & >[data-popup-status] {margin:0 0 6px;font:400 10px/1.4 Arial;}
   & >[data-popup-status]:empty {display:none;}
   & >[data-popup-form] {overflow-x:hidden;overflow-y:auto;scroll-padding:10px;min-height:0;}
   & >footer {display:none;gap:7px;margin-top:7px;}
   & >footer:has([data-popup-another]:not([hidden])) {display:flex;}
   & >footer button {height:32px;min-height:32px;padding:4px 9px;font:700 11px Arial;border-radius:7px;}
   & .product-live-page {padding:0;max-width:none;}
   & .product-live-title {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:6px;margin:0 0 9px;padding:0;}
   & .product-live-title>div {min-width:0;}
   & .product-live-title>div>span {display:block;color:#0078f7;font:800 9px/1.35 Arial;letter-spacing:0;}
   & .product-live-title h1 {font:800 21px/1.2 Arial;color:#0b1949;margin:3px 0;}
   & .product-live-title p {font:400 9px/1.4 Arial;color:#425e8e;margin:0;}
   & .product-live-title>[data-popup-close] {height:29px;min-height:29px;padding:4px 8px;border:1px solid #b8cfee;border-radius:15px;background:linear-gradient(#fff,#edf5ff);color:#132651;font:700 10px Arial;white-space:nowrap;box-shadow:0 2px 5px #1b6cb51a;}
   & .product-live-title>[data-popup-close]::before {content:'×';margin-right:4px;font-size:15px;vertical-align:-1px;}
  }
 }
 html[data-medaliza-ui-mode="mobile"] .purchase-inventory-product-dialog [data-product-form][data-purchase-product="true"] {
  --popup-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23125286' stroke-width='1.8' stroke-linejoin='round'%3E%3Cpath d='m3 7 9-5 9 5v10l-9 5-9-5zM3 7l9 5 9-5M12 12v10'/%3E%3C/svg%3E");
  display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:8px 7px;width:100%;min-width:0;max-width:none;
  padding:0 9px 9px;border:1px solid #d0e6ff;border-radius:12px;background:linear-gradient(145deg,#fff,#f3f8ff);box-shadow:0 3px 8px #2379b615;overflow:visible;
  & *, & *::before, & *::after {box-sizing:border-box;}
  & >section:first-child, & >section:first-child>.product-live-form-grid {display:contents!important;}
  & >section:first-child>header {grid-area:1/1/2/13;display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 -9px;padding:9px 10px;border-radius:11px 11px 0 0;background:linear-gradient(125deg,#00b8ff,#0078df 55%,#004da9);border-bottom:1px solid #57b9ff;}
  & >section:first-child>header h2 {display:flex;align-items:center;gap:6px;flex:none;color:#fff;font:800 14px/1.2 Arial;margin:0;}
  & >section:first-child>header h2::before {content:'';width:20px;height:21px;flex:none;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='1.8'%3E%3Cpath d='M4 20a5 5 0 0 1 0-7L13 4a5 5 0 0 1 7 7l-9 9a5 5 0 0 1-7 0zM8 9l7 7'/%3E%3C/svg%3E") center/contain no-repeat;}
  & >section:first-child>header small {max-width:52%;margin:0;padding-left:7px;border-left:1px solid #bce9ff;color:#eef9ff;font:400 8px/1.35 Arial;}
  & .product-live-form-grid>label:not(.product-live-switch), & .product-live-master-field, & .medaliza-category-field {
   display:grid!important;grid-template-rows:minmax(13.5px,auto) 31px;gap:4px;align-self:stretch;min-width:0;margin:0;padding:0;
   color:#425e8e;font:800 10px/1.35 Arial,sans-serif;text-align:left;letter-spacing:0;
  }
  & .product-live-form-grid>label:not(.product-live-switch) {position:relative;}
  & :is(.product-live-master-field,.medaliza-category-field)>label {color:#425e8e;font:800 10px/1.35 Arial,sans-serif;margin:0;}
  & .product-live-form-grid>label:not(.product-live-switch), & :is(.product-live-master-field,.medaliza-category-field)>label {position:relative;text-indent:16px;}
  & .product-live-form-grid>label:not(.product-live-switch)::before, & :is(.product-live-master-field,.medaliza-category-field)>label::before {content:'';position:absolute;top:0;left:0;width:12px;height:14px;background:var(--popup-icon) center/contain no-repeat;pointer-events:none;}
  & label:has([name=generic_composition]) {--popup-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23125286' stroke-width='1.8'%3E%3Cpath d='M8 3h8M10 3v6L4 20h16L14 9V3M8 15h8M10 17h1'/%3E%3C/svg%3E");}
  & label:has([name=manufacturer]) {--popup-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23125286' stroke-width='1.8'%3E%3Cpath d='M3 21V10l6 4v-4l6 4V3h5v18zM6 18h1m4 0h1m4 0h1'/%3E%3C/svg%3E");}
  & label:has([name=barcode]), & label:has([name=hsn]) {--popup-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' stroke='%23125286' stroke-width='1.8'%3E%3Cpath d='M3 3v18M6 3v18M10 3v18M14 3v18M17 3v18M21 3v18'/%3E%3C/svg%3E");}
  & label:has([name=gst_percentage]) {--popup-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23125286' stroke-width='1.8'%3E%3Cpath d='M4 20 20 4'/%3E%3Ccircle cx='6' cy='6' r='3'/%3E%3Ccircle cx='18' cy='18' r='3'/%3E%3C/svg%3E");}
  & label:has([name=default_sales_discount_percentage]), & label:has([name=default_mrp]) {--popup-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23125286' stroke-width='1.8'%3E%3Cpath d='m3 13 10-10h8v8L11 21z'/%3E%3Ccircle cx='17' cy='7' r='1'/%3E%3C/svg%3E");}
  & .medaliza-category-field>label, & label:has([name=unit]) {--popup-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23125286' stroke-width='1.8'%3E%3Cpath d='m2 7 10-5 10 5-10 5zM2 12l10 5 10-5M2 17l10 5 10-5'/%3E%3C/svg%3E");}
  & .product-live-master-field:has([name=rack_location])>label {--popup-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23125286' stroke-width='1.8'%3E%3Cpath d='M12 22S4 13 4 9a8 8 0 1 1 16 0c0 4-8 13-8 13z'/%3E%3Ccircle cx='12' cy='9' r='3'/%3E%3C/svg%3E");}
  & label:has([name=default_purchase_rate]) {--popup-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23125286' stroke-width='1.8'%3E%3Cpath d='M2 3h3l3 13h12l2-10H6M9 20h1m8 0h1'/%3E%3C/svg%3E");}
  & label:has([name=default_selling_rate]) {--popup-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23125286' stroke-width='1.8'%3E%3Cpath d='M3 22V12h4v10m4 0V8h4v14m4 0V3h3v19M2 9l7-5 5 1 7-4'/%3E%3C/svg%3E");}
  & :is(input:not([type=checkbox]),select) {
   display:block;box-sizing:border-box!important;width:100%!important;max-width:100%!important;min-width:0!important;
   height:31px!important;min-height:31px!important;padding:5px 6px!important;
   border:1px solid #c4dfff!important;border-radius:7px!important;background:linear-gradient(145deg,#fff,#f6fbff)!important;
   color:#17305f!important;font:400 11px Arial!important;letter-spacing:0!important;box-shadow:0 2px 4px #3974b00c;text-align:start;text-indent:0;
  }
  & input::placeholder {color:#17305f!important;opacity:1;}
  & input[type=number] {appearance:textfield;-moz-appearance:textfield;}
  & input[type=number]::-webkit-inner-spin-button, & input[type=number]::-webkit-outer-spin-button {-webkit-appearance:none;margin:0;}
  & :is(input,select,button):focus-visible {outline:2px solid #087cff;outline-offset:1px;}
  & .product-live-form-grid>label:has([name=name]) {grid-area:2/1/3/13;}
  & .product-live-form-grid>label:has([name=generic_composition]) {grid-area:3/1/4/7;}
  & .product-live-form-grid>label:has([name=manufacturer]) {grid-area:3/7/4/13;}
  & .product-live-form-grid>label:has([name=barcode]) {grid-area:4/1/5/6;}
  & .product-live-form-grid>label:has([name=gst_percentage]) {grid-area:4/6/5/9;}
  & .product-live-form-grid>label:has([name=minimum_stock]) {grid-area:4/9/5/13;}
  & .product-live-form-grid>label:has([name=default_sales_discount_percentage]) {grid-area:5/1/6/5;}
  & .product-live-form-grid>label:has([name=hsn]) {grid-area:5/5/6/9;}
  & .medaliza-category-field {grid-area:5/9/6/13;}
  & .product-live-form-grid>label:has([name=unit]) {grid-area:6/1/7/5;}
  & .product-live-form-grid>label:has([name=pack_size]) {grid-area:6/5/7/9;}
  & .product-live-master-field:has([name=rack_location]) {grid-area:6/9/7/13;}
  & .product-live-form-grid>label:has([name=default_sales_discount_percentage]) {grid-template-rows:minmax(27px,auto) 31px;}
  & .product-live-form-grid>label:has([name=default_sales_discount_percentage])>small {position:absolute;width:1px;height:1px;margin:0;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;}
  & :is(.product-barcode-control,.product-live-master-control,.medaliza-category-control) {display:flex;align-items:center;gap:4px;min-width:0;}
  & :is(.product-barcode-control,.product-live-master-control,.medaliza-category-control)>input {flex:1;min-width:0!important;width:0!important;}
  & :is(.product-live-master-add,.medaliza-category-add,.product-barcode-scan-button) {display:grid;place-items:center;flex:0 0 27px;width:27px;min-width:27px;height:31px;min-height:31px;margin:0;padding:3px;border:1px solid #9acaff;border-radius:7px;background:linear-gradient(#fff,#e4f3ff);color:#0079f8;font:700 19px/1 Arial;box-shadow:0 2px 5px #137be51a;}
  & .product-barcode-scan-button svg {width:19px;height:19px;}
  & .product-barcode-scan-button>span {display:none;}
  & >section.product-price-card:not(.product-opening-card) {grid-area:7/1/8/13;display:block;margin:0;padding:0 7px 8px;border:1px solid #c5e4ff;border-radius:10px;background:linear-gradient(125deg,#f4fbff,#d1e8ff);box-shadow:0 2px 5px #2978b51a;}
  & .product-price-card>header {display:flex;align-items:center;gap:7px;margin:0 -7px 7px;padding:7px 9px;border-radius:9px 9px 0 0;background:linear-gradient(125deg,#00a8f6,#0069ca);}
  & .product-price-card>header h2 {color:#fff;font:800 13px/1.2 Arial;margin:0;white-space:nowrap;flex:none;}
  & .product-price-card>header small {margin:0;color:#ebf8ff;font:400 8px/1.3 Arial;max-width:62%;}
  & .product-price-grid {display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:7px;padding:0;}
  & .product-live-switch {position:relative;display:flex!important;align-items:flex-start;gap:7px;min-width:0;min-height:61px;padding:8px 7px;border:1px solid #c5dfff;border-radius:9px;background:linear-gradient(125deg,#fff,#eef5ff);box-shadow:0 2px 4px #1e6cba13;}
  & .product-live-switch:has([name=prescription_required]) {grid-area:8/1/9/7;}
  & .product-live-switch:has([name=active]) {grid-area:8/7/9/13;}
  & .product-live-switch>input {position:absolute;inset:0;display:block;width:100%;height:100%;min-height:0;margin:0;opacity:0;cursor:pointer;z-index:1;}
  & .product-live-switch>span {width:29px;height:17px;margin-top:2px;flex:none;background:#b4bdcb;}
  & .product-live-switch>span::after {width:13px;height:13px;top:2px;left:2px;}
  & .product-live-switch>input:checked+span {background:linear-gradient(130deg,#00b6ff,#0066ff);}
  & .product-live-switch>input:checked+span::after {left:14px;}
  & .product-live-switch:focus-within {outline:2px solid #087cff;outline-offset:1px;}
  & .product-live-switch>div {min-width:0;}
  & .product-live-switch b {color:#132951;font:800 10px/1.25 Arial;}
  & .product-live-switch small {margin-top:3px;color:#536c92;font:400 8px/1.35 Arial;}
  & .product-gst-master {grid-area:9/1/10/13;margin:0;padding:9px;border:1px solid #c1e8f2;border-radius:10px;background:linear-gradient(125deg,#eefcff,#d6f5f5);box-shadow:0 2px 5px #2b91b619;}
  & .product-gst-master>label {display:grid;gap:5px;color:#425e8e;font:800 10px/1.35 Arial;}
  & .product-gst-master>small {display:block;color:#536c92;font:400 8px/1.4 Arial;margin-top:4px;}
  & .product-master-review:not([hidden]) {grid-area:10/1/11/13;margin:0;padding:7px;border-radius:7px;font:400 10px/1.4 Arial;}
  & >footer {grid-area:11/1/12/13;display:flex;justify-content:flex-end;gap:7px;margin:0;padding:7px 0 0;border-top:1px solid #dfebff;background:none;}
  & >footer button {height:34px;min-height:34px;padding:5px 13px;border:1px solid #9acaff;border-radius:9px;color:#0074ef;font:700 11px Arial;background:linear-gradient(#fff,#eef7ff);}
  & >footer .product-live-primary {background:linear-gradient(130deg,#00b6ff,#0066ff)!important;border-color:#078dff!important;color:#fff!important;box-shadow:0 3px 7px #1684e329;}
  & >footer .product-live-primary::before {content:'✓';margin-right:5px;font-size:14px;}
  & [hidden] {display:none!important;}
 }
 /* Give the two searchable selectors full rows on narrow phones, instead
    of shrinking their input plus add button to an unreadable third. */
 @media(max-width:419px) {
  html[data-medaliza-ui-mode="mobile"] .purchase-inventory-product-dialog [data-product-form][data-purchase-product="true"] {
   & .product-live-form-grid>label:has([name=default_sales_discount_percentage]) {grid-area:5/1/6/7;}
   & .product-live-form-grid>label:has([name=hsn]) {grid-area:5/7/6/13;}
   & .medaliza-category-field {grid-area:6/1/7/13;}
   & .product-live-form-grid>label:has([name=unit]) {grid-area:7/1/8/7;}
   & .product-live-form-grid>label:has([name=pack_size]) {grid-area:7/7/8/13;}
   & .product-live-master-field:has([name=rack_location]) {grid-area:8/1/9/13;}
   & >section.product-price-card:not(.product-opening-card) {grid-area:9/1/10/13;}
   & .product-live-switch:has([name=prescription_required]) {grid-area:10/1/11/7;}
   & .product-live-switch:has([name=active]) {grid-area:10/7/11/13;}
   & .product-gst-master {grid-area:11/1/12/13;}
   & .product-master-review:not([hidden]) {grid-area:12/1/13/13;}
   & >footer {grid-area:13/1/14/13;}
  }
 }
}
