/* =========================================================
   PURCHASE QUOTATION — CARD-FIRST WHOLESALE WORKFLOW
========================================================= */
.pq-shell{max-width:1100px;margin:0 auto;padding:12px 12px 30px;box-sizing:border-box}
.pq-main-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 18px;margin-bottom:13px;border-radius:18px;background:linear-gradient(135deg,#1565c0,#1e88e5);color:#fff;box-shadow:0 7px 20px rgba(21,101,192,.18)}
.pq-main-header h2{display:flex;align-items:center;gap:8px;margin:0;font-size:20px}.pq-main-header h2 .material-icons{font-size:23px}.pq-main-header p{margin:4px 0 0;font-size:11px;opacity:.9}
.pq-reset-btn,.pq-back-btn{border:0;border-radius:9px;padding:8px 10px;display:inline-flex;align-items:center;gap:5px;cursor:pointer;font-weight:700;font-size:12px}.pq-reset-btn{background:rgba(255,255,255,.16);color:#fff}.pq-back-btn{background:#eef3f8;color:#17324d}.pq-reset-btn .material-icons,.pq-back-btn .material-icons{font-size:17px}
.pq-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:2px}
.pq-menu-card{position:relative;text-align:left;border:1px solid #e8edf3;background:#fff;border-radius:15px;padding:15px;min-height:145px;box-shadow:0 4px 13px rgba(0,0,0,.07);cursor:pointer;transition:transform .18s,box-shadow .18s,border-color .18s}.pq-menu-card:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(0,0,0,.1);border-color:#d5e3f3}.pq-menu-icon{width:44px;height:44px;border-radius:12px;display:flex;align-items:center;justify-content:center;color:#fff;margin-bottom:10px}.pq-menu-icon .material-icons{font-size:23px}.pq-blue{background:#1565c0}.pq-green{background:#2e7d32}.pq-orange{background:#ef8c00}.pq-purple{background:#6a1b9a}.pq-menu-title{display:block;color:#1d2733;font-size:15px;font-weight:800}.pq-menu-sub{display:block;color:#737d87;font-size:11px;line-height:1.45;margin-top:4px;max-width:92%}.pq-menu-badge{position:absolute;right:11px;top:11px;min-width:23px;height:23px;padding:0 6px;border-radius:20px;background:#1565c0;color:#fff;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:800}
.pq-subview{background:#f7f9fc;border:1px solid #e6ebf1;border-radius:16px;padding:12px}.pq-subview-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:3px 2px 11px}.pq-subview-head h3{display:flex;align-items:center;gap:6px;margin:0;font-size:17px;color:#1e2b38}.pq-subview-head h3 .material-icons{font-size:19px;color:#1565c0}.pq-subview-head p{margin:3px 0 0;font-size:10px;color:#7a848e}.pq-search-row{display:flex;align-items:center;gap:9px;margin-bottom:10px}.pq-search-box{flex:1;display:flex;align-items:center;gap:7px;background:#fff;border:1px solid #d9e0e7;border-radius:11px;padding:7px 10px}.pq-search-box .material-icons{font-size:19px;color:#7c8792}.pq-search-box input{width:100%;border:0;outline:0;background:transparent;font-size:14px}.pq-status{font-size:10px;color:#7b858f;white-space:nowrap}
.pq-product-list{display:flex;flex-direction:column;gap:7px;max-height:calc(100vh - 245px);overflow-y:auto;padding-right:2px}.pq-product-card{display:flex;align-items:center;gap:9px;background:#fff;border:1px solid #e2e7ec;border-radius:11px;padding:8px;box-shadow:0 2px 8px rgba(0,0,0,.045)}.pq-product-img-wrap{width:58px;height:58px;flex:0 0 58px;border-radius:9px;background:#f3f5f7;overflow:hidden;display:flex;align-items:center;justify-content:center}.pq-product-img{width:100%;height:100%;object-fit:contain}.pq-product-body{min-width:0;flex:1}.pq-product-name{font-size:13px;font-weight:800;color:#202a34;line-height:1.25}.pq-product-meta{display:flex;flex-wrap:wrap;gap:5px;margin-top:4px}.pq-meta-tag{font-size:9px;color:#58636e;background:#f0f3f6;border-radius:5px;padding:3px 5px}.pq-add{border:0;border-radius:8px;background:#1565c0;color:#fff;padding:8px 9px;font-size:10px;font-weight:800;cursor:pointer;white-space:nowrap}.pq-add.added{background:#2e7d32}.pq-cart-mini{display:inline-flex;align-items:center;gap:2px;margin-left:5px;color:#1565c0;font-size:10px}.pq-cart-mini .material-icons{font-size:17px}
.pq-catalog-status-wrap{display:flex;align-items:center;gap:7px;flex-wrap:wrap;justify-content:flex-end}.pq-go-cart{border:0;border-radius:8px;background:#1565c0;color:#fff;padding:6px 9px;display:inline-flex;align-items:center;gap:4px;font-size:10px;font-weight:800;cursor:pointer}.pq-go-cart .material-icons{font-size:15px}.pq-cart-list{display:flex;flex-direction:column;gap:8px}.pq-cart-row{display:flex;align-items:center;gap:9px;background:#f9f9f9;border:1px solid #e1e6eb;border-radius:10px;padding:8px}.pq-cart-img{width:58px;height:58px;flex:0 0 58px;border-radius:8px;background:#eee;display:flex;align-items:center;justify-content:center;overflow:hidden}.pq-cart-img img{width:100%;height:100%;object-fit:contain}.pq-cart-info{flex:1;min-width:0}.pq-cart-name{font-size:12px;font-weight:800;color:#202a34;line-height:1.25}.pq-cart-price-row{display:flex;align-items:center;gap:5px;margin-top:4px;min-height:28px}.pq-cart-price-label{font-size:9px;color:#69747e;font-weight:700}.pq-cart-price-value{font-size:11px;font-weight:800;color:#1e88e5}.pq-cart-price-input{display:none;width:78px;height:29px;box-sizing:border-box;border:1px solid #d1d5db;border-radius:6px;padding:3px 6px;font-size:11px;font-weight:700;color:#1e88e5;background:#fff;outline:none}.pq-cart-price-edit,.pq-cart-price-save{border:0;background:transparent;padding:2px;width:25px;height:25px;line-height:21px;font-size:17px;cursor:pointer;border-radius:5px;display:inline-flex;align-items:center;justify-content:center}.pq-cart-price-edit{color:#555}.pq-cart-price-save{display:none;color:#16a34a}.pq-cart-price-updated{display:none;font-size:8px;font-weight:800;color:#16a34a;letter-spacing:.2px}.pq-cart-price-updated.show{display:inline-block}.pq-cart-qty-box{display:flex;align-items:center;gap:4px;flex:0 0 auto}.pq-cart-qty-box button{background:#fff;color:#333;border:1px solid #d7dee5;width:25px;height:25px;border-radius:5px;font-weight:800;cursor:pointer}.pq-cart-qty-box input{width:38px;height:27px;text-align:center;font-size:11px;border:1px solid #ddd;border-radius:5px;padding:0;background:#fff}.pq-cart-delete{border:0;background:transparent;color:#c62828;font-size:18px;padding:4px;cursor:pointer}.pq-cart-total-line{font-size:9px;color:#7b858e;margin-top:2px}.pq-totals{margin-top:9px;background:#fff;border:1px solid #dfe5eb;border-radius:11px;padding:10px}.pq-total-row{display:flex;justify-content:space-between;gap:10px;padding:4px 0;font-size:11px;color:#515d68}.pq-total-row strong{color:#1f2a34}.pq-total-profit{border-top:1px solid #edf0f3;margin-top:4px;padding-top:7px;font-weight:800;color:#2e7d32}.pq-action-bar{display:flex;justify-content:flex-end;gap:7px;flex-wrap:wrap;margin-top:10px}.pq-btn{border:0;border-radius:9px;padding:9px 12px;display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:800;cursor:pointer}.pq-btn .material-icons{font-size:17px}.pq-btn-primary{background:#1565c0;color:#fff}.pq-btn-secondary{background:#eaf0f5;color:#17324d}.pq-btn-success{background:#2e7d32;color:#fff}
.pq-preview-paper{background:#fff;border:1px solid #dfe4e9;border-radius:9px;padding:11px;max-width:780px;margin:0 auto;box-shadow:0 4px 15px rgba(0,0,0,.06);font-size:9px}.pq-preview-title{text-align:center;font-size:15px;font-weight:900;margin:0}.pq-preview-meta{text-align:center;color:#707982;font-size:8px;margin:3px 0 10px}.pq-preview-paper table{width:100%;border-collapse:collapse;table-layout:fixed}.pq-preview-paper th,.pq-preview-paper td{border-bottom:1px solid #e7eaed;padding:5px 3px;text-align:left;word-break:break-word}.pq-preview-paper th{font-size:8px;background:#f5f7f9}.pq-preview-paper .num{text-align:right}.pq-preview-summary{max-width:220px;margin:9px 0 0 auto}.pq-preview-summary .pq-total-row{font-size:9px}.pq-preview-save-bar{border-top:1px solid #e5e9ed;padding-top:9px}
.pq-quotation-list{display:flex;flex-direction:column;gap:9px}.pq-quote-card{background:#fff;border:1px solid #dfe5eb;border-radius:11px;overflow:visible;box-shadow:0 2px 8px rgba(0,0,0,.04)}.pq-quote-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 10px;border-bottom:1px solid #edf0f3;background:#f7f9fb;border-radius:11px 11px 0 0}.pq-quote-no{font-size:12px;font-weight:900;color:#202a34}.pq-quote-date{font-size:8px;color:#7a838c;margin-top:2px}.pq-quote-menu-wrap{position:relative}.pq-quote-menu-btn{border:0;background:transparent;width:30px;height:30px;border-radius:7px;cursor:pointer;font-size:19px;color:#4d5963}.pq-quote-menu-btn:hover{background:#e8edf2}.pq-quote-menu{display:none;position:absolute;right:0;top:33px;min-width:125px;background:#fff;border:1px solid #dfe5eb;border-radius:8px;box-shadow:0 8px 22px rgba(0,0,0,.14);z-index:50;padding:4px}.pq-quote-menu.open{display:block}.pq-quote-menu button{width:100%;border:0;background:#fff;text-align:left;padding:7px 8px;border-radius:5px;font-size:10px;font-weight:700;cursor:pointer;color:#33414d;display:flex;align-items:center;gap:5px}.pq-quote-menu button:hover{background:#f2f5f8}.pq-quote-menu button.delete{color:#c62828}.pq-quote-menu .material-icons{font-size:15px}.pq-quote-items{padding:7px 10px}.pq-quote-item{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:5px 0;border-bottom:1px dashed #edf0f3}.pq-quote-item:last-child{border-bottom:0}.pq-quote-item-name{font-size:10px;font-weight:700;color:#303a44;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.pq-quote-item-meta{font-size:8px;color:#7a838c;white-space:nowrap}.pq-quote-foot{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:8px 10px;background:#f7f9fb;border-top:1px solid #edf0f3;border-radius:0 0 11px 11px}.pq-quote-foot-cell{display:flex;flex-direction:column;gap:2px}.pq-quote-foot-label{font-size:8px;color:#7a838c}.pq-quote-foot-value{font-size:10px;font-weight:900;color:#202a34}.pq-quote-foot-cell.profit .pq-quote-foot-value{color:#2e7d32}.pq-empty{text-align:center;color:#7b858e;padding:25px 12px;background:#fff;border:1px dashed #d9e0e6;border-radius:11px;font-size:11px}
@media(max-width:600px){.pq-shell{padding:8px 8px 25px}.pq-main-header{padding:13px 14px}.pq-main-header h2{font-size:17px}.pq-main-header p{font-size:9px}.pq-card-grid{gap:8px}.pq-menu-card{min-height:125px;padding:11px}.pq-menu-icon{width:38px;height:38px;border-radius:10px;margin-bottom:8px}.pq-menu-icon .material-icons{font-size:20px}.pq-menu-title{font-size:12px}.pq-menu-sub{font-size:9px}.pq-subview{padding:9px}.pq-subview-head h3{font-size:14px}.pq-subview-head p{font-size:9px}.pq-search-row{display:block}.pq-status{display:block;margin-top:5px}.pq-product-list{max-height:calc(100vh - 225px)}.pq-product-card{padding:7px}.pq-product-img-wrap{width:48px;height:48px;flex-basis:48px}.pq-product-name{font-size:11px}.pq-meta-tag{font-size:8px}.pq-add{font-size:9px;padding:7px 7px}.pq-cart-row{display:flex;align-items:flex-start;flex-wrap:wrap;gap:7px}.pq-cart-img{width:48px;height:48px;flex-basis:48px}.pq-cart-info{min-width:calc(100% - 58px)}.pq-cart-qty-box{margin-left:57px}.pq-quote-foot{grid-template-columns:1fr 1fr 1fr}.pq-preview-paper{font-size:8px;padding:7px}.pq-preview-paper th,.pq-preview-paper td{padding:4px 2px}.pq-preview-summary{max-width:170px}.pq-action-bar{justify-content:stretch}.pq-action-bar .pq-btn{flex:1;justify-content:center}}


/* Purchase Quotation — requested UI refinements */
.pq-main-header{display:flex;align-items:center;justify-content:space-between;gap:10px}.pq-header-title{min-width:0}.pq-header-actions{display:flex;align-items:center;gap:5px;flex:0 0 auto}.pq-header-icon{width:30px;height:30px;border:1px solid #d9e1e8;background:#fff;color:#45515d;border-radius:7px;display:inline-flex;align-items:center;justify-content:center;padding:0;cursor:pointer}.pq-header-icon .material-icons{font-size:18px}.pq-header-icon:hover{background:#f0f4f8}.pq-menu-badge{min-width:23px;height:23px;padding:0 6px}.pq-cart-row{flex-wrap:nowrap}.pq-cart-qty-box{gap:3px}.pq-cart-qty-box button{width:25px;height:25px;flex:0 0 25px;padding:0}.pq-cart-qty-box input{width:29px;max-width:29px;height:25px;box-sizing:border-box;padding:0 2px;flex:0 0 29px}.pq-cart-delete{width:25px;height:25px;flex:0 0 25px;padding:0;display:inline-flex;align-items:center;justify-content:center}.pq-cart-name{font-size:14px}.pq-preview-paper{font-size:10px}.pq-preview-paper th,.pq-preview-paper td{font-size:9px}.pq-preview-paper th{font-size:9px}.pq-preview-title{font-size:16px}.pq-preview-meta{font-size:9px}.pq-preview-summary .pq-total-row{font-size:10px}.pq-quote-foot-label{font-size:9px}.pq-quote-foot-value{font-size:11px}
@media(max-width:600px){.pq-cart-row{flex-wrap:nowrap;align-items:center;gap:6px}.pq-cart-img{width:44px;height:44px;flex-basis:44px}.pq-cart-info{min-width:0;flex:1}.pq-cart-name{font-size:13px}.pq-cart-qty-box{margin-left:0;gap:2px}.pq-cart-qty-box button{width:23px;height:23px;flex-basis:23px}.pq-cart-qty-box input{width:27px;max-width:27px;height:23px;flex-basis:27px;font-size:10px}.pq-cart-delete{width:23px;height:23px;flex-basis:23px;font-size:17px}.pq-preview-paper{font-size:9px}.pq-preview-paper th,.pq-preview-paper td{font-size:9px;padding:4px 2px}.pq-preview-title{font-size:16px}.pq-preview-meta{font-size:9px}.pq-preview-summary .pq-total-row{font-size:10px}.pq-header-icon{width:29px;height:29px}.pq-header-icon .material-icons{font-size:17px}}

/* Purchase Quotation — refined cart, saved preview and move controls */
.pq-cart-info{width:100%;}
.pq-cart-controls{display:flex;align-items:center;gap:5px;margin-top:5px;}
.pq-cart-qty-box{margin-left:0!important;display:inline-flex;align-items:center;gap:2px;}
.pq-cart-qty-box button{width:24px!important;height:24px!important;flex:0 0 24px!important;padding:0!important;}
.pq-cart-qty-box input{width:30px!important;max-width:30px!important;height:24px!important;flex:0 0 30px!important;padding:0 2px!important;}
.pq-cart-delete{width:24px!important;height:24px!important;flex:0 0 24px!important;padding:0!important;display:inline-flex!important;align-items:center;justify-content:center;}
.pq-cart-name{font-size:14px;}
.pq-no-preview{text-align:center;padding:30px 10px;font-size:12px;font-weight:800;color:#7b858e;}
.pq-preview-paper table.pq-saved-preview-table{min-width:100%;}
.pq-saved-preview-table th:first-child,.pq-saved-preview-table td:first-child{text-align:center;}
.pq-move-select input{width:16px;height:16px;accent-color:#1565c0;cursor:pointer;}
.pq-move-edit-row td{padding:7px 4px;background:#eef8f0;border-bottom:1px solid #cde7d2;}
.pq-move-editor{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:5px;border:1px solid #cde7d2;border-radius:7px;background:#f5fff6;}
.pq-move-editor label{font-size:9px;font-weight:700;color:#58636e;display:flex;align-items:center;gap:3px;}
.pq-move-editor input{width:58px;height:25px;border:1px solid #cfd8d2;border-radius:5px;padding:2px 4px;font-size:10px;}
.pq-move-editor label span{font-size:10px;color:#2e7d32;}
.pq-move-btn{border:0;border-radius:6px;background:#2e7d32;color:#fff;padding:6px 8px;font-size:9px;font-weight:800;cursor:pointer;}
.pq-btn:disabled{opacity:.45;cursor:not-allowed;}
@media(max-width:600px){
 .pq-cart-row{align-items:flex-start!important;flex-wrap:nowrap!important;}
 .pq-cart-img{width:44px!important;height:44px!important;flex:0 0 44px!important;}
 .pq-cart-info{min-width:0!important;flex:1!important;}
 .pq-cart-controls{margin-top:5px;}
 .pq-cart-name{font-size:14px!important;}
 .pq-saved-preview-table th,.pq-saved-preview-table td{font-size:9px;padding:4px 2px;}
 .pq-move-editor{gap:4px;}
 .pq-move-editor input{width:50px;}
 .pq-move-btn{font-size:8px;padding:5px 6px;}
}

/* Saved quotation card — compact transaction summary */
.pq-quote-summary-center{display:flex;align-items:center;justify-content:center;gap:16px;position:relative;min-height:68px;}
.pq-quote-count{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:78px;}
.pq-quote-count .material-icons{font-size:17px;color:#1565c0;}
.pq-quote-count strong{font-size:14px;color:#202a34;line-height:1.1;}
.pq-quote-count small{font-size:8px;color:#7a838c;font-weight:700;}
.pq-quote-menu-center{margin-left:4px;}
@media(max-width:600px){.pq-quote-summary-center{gap:9px;min-height:64px}.pq-quote-count{min-width:65px}.pq-quote-count strong{font-size:13px}.pq-quote-count small{font-size:8px}.pq-quote-menu-center{margin-left:0}}

.pq-preview-tabs{display:flex;gap:5px;margin-top:7px;border-bottom:1px solid #e5e9ed;padding-bottom:5px;}
.pq-preview-tab{border:1px solid #d9e1e8;background:#f7f9fb;color:#53606b;border-radius:7px;padding:6px 8px;font-size:9px;font-weight:800;cursor:pointer;}
.pq-preview-tab.active{background:#1565c0;color:#fff;border-color:#1565c0;}
@media(max-width:600px){.pq-preview-tabs{gap:4px}.pq-preview-tab{flex:1;font-size:8px;padding:6px 4px;}}

/* Sale Order Product (SOP) badge and details popup */
.pq-sop-badge{display:inline-flex;align-items:center;justify-content:center;margin-left:5px;padding:2px 5px;border:0;border-radius:999px;background:#e3f2fd;color:#075b9b;font-size:7px;font-weight:900;cursor:pointer;vertical-align:middle}
.pq-sop-badge:hover{filter:brightness(.95)}
.pq-sop-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);display:grid;place-items:center;padding:15px;z-index:100000}
.pq-sop-modal{width:min(430px,100%);max-height:82vh;overflow:auto;background:#fff;border-radius:16px;padding:18px;box-shadow:0 14px 40px rgba(0,0,0,.22);position:relative}
.pq-sop-modal h3{margin:0 0 14px;font-size:16px}
.pq-sop-close{position:absolute;right:10px;top:8px;border:0;background:#f1f3f5;border-radius:50%;width:30px;height:30px;font-size:20px;cursor:pointer}
.pq-sop-row{display:flex;justify-content:space-between;gap:15px;padding:9px 0;border-bottom:1px solid #edf0f2;font-size:10px}
.pq-sop-row span{color:#78838c}.pq-sop-row b{text-align:right;color:#26323c}


/* Purchase Quotation — compact action buttons and clear-all control */
.pq-cart-head{position:relative}
.pq-cart-head-actions{position:absolute;right:0;top:0;display:flex;align-items:center}
.pq-cart-clear-btn{width:32px;height:32px;border:1px solid #ead4d4;background:#fff7f7;color:#b3261e;border-radius:8px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer}
.pq-cart-clear-btn:hover{background:#ffecec}
.pq-cart-clear-btn .material-icons{font-size:18px}
.pq-action-bar{display:flex;align-items:stretch;gap:7px;flex-wrap:nowrap}
.pq-action-bar .pq-btn{min-height:48px;padding:7px 9px;border-radius:9px;font-size:9px;font-weight:900;display:inline-flex;align-items:center;justify-content:center;gap:4px;line-height:1.15}
.pq-action-bar .pq-btn .material-icons{font-size:18px}
.pq-action-bar .pq-btn span:last-child{white-space:nowrap}
.pq-btn-add-more{min-width:82px}
.pq-btn-sop{background:#eef5ff;color:#155ca8;border:1px solid #cfe0f4}
.pq-btn-sop:hover{background:#e1efff}
.pq-btn-preview{min-width:116px}
@media(max-width:600px){
 .pq-cart-head-actions{right:1px;top:0}
 .pq-cart-clear-btn{width:29px;height:29px}
 .pq-action-bar{gap:5px}
 .pq-action-bar .pq-btn{min-height:46px;padding:6px 6px;font-size:8px;flex:1;min-width:0}
 .pq-action-bar .pq-btn .material-icons{font-size:17px}
 .pq-btn-add-more{min-width:0}
 .pq-btn-preview{min-width:0}
}
