.qt{max-width:1540px;margin:auto;color:#182238;font:12.5px "IBM Plex Sans Thai",sans-serif}.qt button,.qt input,.qt select,.qt textarea{font:inherit}.qt-title{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.qt-title>div{display:flex;align-items:center;gap:12px}.qt-title>div>span{font-size:31px;color:#9c741c}.qt-title h1{margin:0;font-size:23px}.qt-title p{margin:2px 0;color:#6c7480}.qt-title nav{display:flex;gap:8px}.qt button{border:1px solid #cbb78d;border-radius:8px;background:#fff;padding:7px 12px;cursor:pointer}.qt button:disabled{opacity:.5;cursor:not-allowed}.qt .qt-primary{border-color:#aa812e;background:linear-gradient(135deg,#bd9645,#937020);color:#fff}.qt-back{border:0!important;font-size:17px;padding:5px!important}.qt-list,.qt-head,.qt-customer,.qt-main,.qt-summary{background:#fff;border:1px solid #dfe2e6;border-radius:11px}.qt-list{padding:14px}.qt-list form{display:grid;grid-template-columns:1fr 210px 90px;gap:8px}.qt-list input,.qt-list select,.qt-head input,.qt-head select,.qt-customer input,.qt-section-title input,.qt-line input,.qt-summary input,.qt-summary select,.qt-note textarea{width:100%;border:1px solid #cbd2dc;border-radius:7px;padding:7px 8px;background:#fff}.qt-table{overflow:auto;margin-top:12px}.qt table{width:100%;border-collapse:collapse}.qt th,.qt td{padding:8px;border-bottom:1px solid #e7e8ea;text-align:left}.qt th{background:#f6f1e6;color:#5b4d31}.qt td small{display:block;color:#7a8492}.qt .num{text-align:right}.qt-badge{display:inline-block;border-radius:999px;padding:4px 8px;background:#f2eee5}.qt-badge.DRAFT{background:#f1f1f1}.qt-badge.PENDING_REVIEW{background:#fff0d7;color:#8c5900}.qt-badge.READY_TO_SEND,.qt-badge.CUSTOMER_CONFIRMED{background:#e5f3e7;color:#24613a}.qt-head{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:13px;margin-bottom:12px}.qt-head label{display:grid;gap:5px;font-weight:600}.qt-status{padding:10px;border-radius:7px;background:#f5f1e9;color:#765618}.qt-customer{display:grid;grid-template-columns:1.3fr 1fr;gap:12px;padding:13px;margin-bottom:12px}.qt-searchbox{position:relative}.qt-searchbox>label{display:block;font-weight:700;margin-bottom:5px}.qt-searchbox>div:nth-of-type(1){display:flex;gap:7px}.qt-results,.qt-product-results{position:absolute;z-index:8;background:#fff;border:1px solid #d5d9df;border-radius:8px;box-shadow:0 12px 30px #17203322;max-height:330px;overflow:auto}.qt-results{width:100%;top:72px}.qt-results button{width:100%;display:grid;text-align:left;border:0;border-bottom:1px solid #eee;border-radius:0}.qt-results small{color:#667084}.qt-customer-card,.qt-customer-empty{padding:12px;border-radius:8px;background:#f3f7f2;display:grid;gap:3px}.qt-customer-card span,.qt-customer-card small{color:#5f6976}.qt-customer-empty{place-items:center;color:#7c8490}.qt-work{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:12px}.qt-main{padding:13px;min-width:0}.qt-section-title{display:flex;justify-content:space-between;align-items:center;gap:15px}.qt-section-title h2{margin:0}.qt-section-title p{margin:2px 0;color:#748091}.qt-section-title form{display:flex;min-width:470px}.qt-product-results{position:relative;margin:8px 0;width:100%;display:grid;grid-template-columns:1fr 1fr;max-height:310px}.qt-product-results button{border:0;border-bottom:1px solid #eee;border-radius:0;display:grid;grid-template-columns:58px 90px 1fr 1fr 90px;align-items:center;text-align:left;gap:8px}.qt-thumb{width:58px;height:48px;background:#f0efeb;border-radius:7px;display:grid;place-items:center;font-size:10px;color:#7b818a;overflow:hidden}.qt-thumb img{width:100%;height:100%;object-fit:contain}.qt-lines{margin-top:12px}.qt-line{display:grid;grid-template-columns:58px minmax(190px,1.4fr) 82px 82px 110px minmax(210px,1.2fr) 115px 34px;gap:9px;align-items:center;padding:10px 0;border-bottom:1px solid #e5e7eb}.qt-line-product{display:grid;gap:2px}.qt-line-product>b{font-size:13px}.qt-line-product>strong{font-weight:500}.qt-line-product>small{font-size:10px;color:#7b8490}.qt-line-product>button{border:0;padding:0;text-align:left;color:#8b661b;background:none;font-size:11px}.qt-line label{display:grid;gap:3px;font-size:11px;color:#687384}.qt-discounts{display:grid;grid-template-columns:repeat(3,1fr);gap:4px}.qt-discounts label{position:relative}.qt-discounts input{padding-right:20px}.qt-discounts i{position:absolute;right:7px;bottom:9px;font-style:normal}.qt-line-net{display:grid;text-align:right}.qt-line-net span{font-size:11px;color:#717b88}.qt-line-net strong{font-size:14px;color:#176742}.qt-line-note{grid-column:2/8}.qt-remove{border-color:#f2c9c4!important;color:#a34237;padding:7px!important}.qt-add{margin-top:12px}.qt-note{display:grid;margin-top:14px;gap:5px;font-weight:600}.qt-note textarea{min-height:72px}.qt-summary{padding:14px;height:max-content;position:sticky;top:8px}.qt-summary h3{margin-top:0}.qt-summary>div,.qt-summary>label{display:flex;justify-content:space-between;align-items:center;padding:7px 0;border-bottom:1px dashed #ddd}.qt-summary>label input,.qt-summary>label select{width:145px}.qt-summary .grand{margin-top:8px;padding:12px;background:#eaf4eb;border-radius:8px;border:0}.qt-summary .grand b{font-size:17px;color:#176742}.qt-summary>small{display:block;margin-top:12px;color:#7a6542}.qt-footer{display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:15px 0}.qt-footer .qt-msg{margin-right:auto}.qt-msg{color:#21643d}.qt-drawer-backdrop{position:fixed;inset:0;background:#17203355;z-index:40}.qt-drawer{position:fixed;right:0;top:0;bottom:0;width:min(570px,96vw);background:#fff;z-index:41;padding:18px;overflow:auto;box-shadow:-12px 0 30px #17203333}.qt-drawer>header{display:flex;justify-content:space-between;align-items:flex-start;border-bottom:1px solid #ddd;padding-bottom:12px}.qt-drawer h2{margin:0}.qt-drawer p{margin:3px 0;color:#697586}.qt-price-table{overflow:auto;margin-top:14px}.qt-price-table table{font-size:11px}.qt-price-table button{background:#af8735;color:#fff}.qt-price-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:14px 0}.qt-price-stats article{padding:10px;border-radius:8px;background:#f2f6f1;display:grid}.qt-price-stats span{font-size:11px;color:#647080}.qt-price-stats b{font-size:15px}.qt-price-options{display:flex;gap:8px;flex-wrap:wrap}.qt-price-note,.qt-no-history{padding:12px;background:#fff7df;border:1px solid #eed49a;border-radius:8px}.empty{text-align:center;padding:35px;color:#808793}.qt-product-results+ .qt-lines{margin-top:8px}
@media(max-width:1100px){.qt-work{grid-template-columns:1fr}.qt-summary{position:static}.qt-line{grid-template-columns:58px 1fr 80px 80px 105px}.qt-discounts{grid-column:2/5}.qt-line-net{grid-column:5}.qt-line-note{grid-column:2/5}.qt-remove{grid-column:5}.qt-section-title{align-items:flex-start}.qt-section-title form{min-width:360px}.qt-head{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.qt-title{align-items:flex-start}.qt-title nav{position:fixed;bottom:0;left:0;right:0;z-index:20;background:#fff;padding:8px;justify-content:center;box-shadow:0 -4px 18px #0002}.qt-head,.qt-customer{grid-template-columns:1fr}.qt-work{padding-bottom:70px}.qt-section-title{display:grid}.qt-section-title form{min-width:0}.qt-product-results{grid-template-columns:1fr}.qt-product-results button{grid-template-columns:50px 75px 1fr 70px}.qt-product-results small{display:none}.qt-line{grid-template-columns:52px 1fr 32px;border:1px solid #e0e2e5;border-radius:10px;padding:10px;margin-bottom:10px}.qt-line-product{grid-column:2}.qt-remove{grid-column:3;grid-row:1}.qt-line>label{grid-column:1/4}.qt-discounts{grid-column:1/4}.qt-line-net{grid-column:1/4;display:flex;justify-content:space-between}.qt-line-note{grid-column:1/4}.qt-footer{display:none}.qt-list form{grid-template-columns:1fr}.qt-table table{min-width:850px}.qt-price-stats{grid-template-columns:1fr 1fr}.qt-title h1{font-size:19px}}

/* Modern single-row product picker */
.qt-section-title{display:grid;grid-template-columns:minmax(220px,1fr) minmax(430px,620px);align-items:end}
.qt-section-title form{display:grid;grid-template-columns:minmax(0,1fr) auto;min-width:0;gap:8px}
.qt-section-title form button{white-space:nowrap;min-width:104px}
.qt-product-results{display:grid;grid-template-columns:1fr;max-height:360px;border:1px solid #dfe3e8;border-radius:10px;overflow-y:auto;overflow-x:hidden;background:#fff;box-shadow:0 10px 24px #18223814}
.qt-product-results button{width:100%;min-height:66px;grid-template-columns:54px 105px minmax(230px,1fr) minmax(180px,.8fr) 90px;padding:8px 12px;gap:12px;border:0;border-bottom:1px solid #e8eaed;border-radius:0;background:#fff;transition:background .15s ease,box-shadow .15s ease}
.qt-product-results button:last-child{border-bottom:0}
.qt-product-results button:hover,.qt-product-results button:focus-visible{background:#f8f4e9;box-shadow:inset 3px 0 #aa812e;outline:0}
.qt-product-results button>b{font-size:13px;color:#15223a}
.qt-product-results button>span:not(.qt-thumb){font-weight:500;color:#263247}
.qt-product-results button>small{font-size:10px;line-height:1.35;color:#667386;overflow-wrap:anywhere}
.qt-product-results button>strong{text-align:right;color:#8b6319;font-size:13px;font-variant-numeric:tabular-nums}
.qt-product-results .qt-thumb{width:54px;height:50px}
@media(max-width:700px){
  .qt-section-title{grid-template-columns:1fr}
  .qt-section-title form{grid-template-columns:minmax(0,1fr) auto}
  .qt-section-title form button{min-width:82px;padding-inline:9px}
  .qt-product-results button{grid-template-columns:48px 78px minmax(0,1fr) 64px;min-height:60px;padding:7px 8px;gap:8px}
  .qt-product-results button>small{display:none}
  .qt-product-results button>span:not(.qt-thumb){line-height:1.35}
}

/* POS-style quotation line table */
.qt-lines{margin-top:10px;overflow:auto;border:1px solid #dfe3e8;border-radius:9px;background:#fff}
.qt-line-table{min-width:1040px;table-layout:fixed}
.qt-line-table th{padding:8px 7px;background:#f3eee2;color:#50462f;font-weight:600;white-space:nowrap;border-bottom:1px solid #cdb77d}
.qt-line-table th:nth-child(1){width:64px}.qt-line-table th:nth-child(2){width:96px}.qt-line-table th:nth-child(3){width:220px}.qt-line-table th:nth-child(4){width:72px}.qt-line-table th:nth-child(5){width:70px}.qt-line-table th:nth-child(6){width:92px}.qt-line-table th:nth-child(7){width:190px}.qt-line-table th:nth-child(8){width:90px}.qt-line-table th:nth-child(9){width:94px}.qt-line-table th:nth-child(10){width:42px}
.qt-line-table td{padding:7px;vertical-align:middle}
.qt-item-row td{border-bottom:0}
.qt-item-row:hover td,.qt-item-row:hover+.qt-item-note td{background:#fbf8f0}
.qt-line-table input{width:100%;min-width:0;border:1px solid #cbd2dc;border-radius:6px;padding:7px;background:#fff;font:inherit}
.qt-line-table input[readonly]{background:#f7f8f8;color:#475366}
.qt-line-table .qt-thumb{width:48px;height:44px;margin:auto}
.qt-code{font-size:12px;color:#17233a}
.qt-line-product{gap:1px}
.qt-line-product>strong{font-size:12px;line-height:1.3}
.qt-line-product>small{white-space:normal;overflow-wrap:anywhere}
.qt-line-product>button{margin-top:3px}
.qt-line-table .qt-discounts{grid-template-columns:repeat(3,minmax(0,1fr));gap:3px}
.qt-line-table .qt-discounts label>span{display:none}
.qt-line-table .qt-discounts input{padding:7px 17px 7px 5px;text-align:right}
.qt-line-table .qt-discounts i{right:5px;bottom:8px;font-size:9px}
.qt-net,.qt-total{text-align:right!important;font-variant-numeric:tabular-nums;white-space:nowrap}
.qt-net b{color:#354253}.qt-total strong{font-size:13px;color:#176742}
.qt-item-note td{padding-top:0;border-bottom:1px solid #e4e7eb}
.qt-item-note label{display:grid;grid-template-columns:92px 1fr;align-items:center;gap:7px;color:#727c89;font-size:10px}
.qt-item-note input{padding-block:5px}
.qt-line-table .qt-remove{width:30px;height:30px;border-radius:7px!important}
@media(max-width:700px){
  .qt-lines{border:0;overflow:visible;background:transparent}
  .qt-line-table{display:block;min-width:0}.qt-line-table thead{display:none}.qt-line-table tbody{display:grid;gap:10px}
  .qt-item-row{display:grid;grid-template-columns:52px 80px 1fr 32px;gap:7px;padding:9px;border:1px solid #dfe3e8;border-radius:10px 10px 0 0;background:#fff}
  .qt-item-row td{display:block;padding:0;border:0}.qt-item-row td:nth-child(1){grid-column:1}.qt-item-row td:nth-child(2){grid-column:2}.qt-item-row td:nth-child(3){grid-column:3}.qt-item-row td:nth-child(10){grid-column:4;grid-row:1}
  .qt-item-row td:nth-child(4),.qt-item-row td:nth-child(5),.qt-item-row td:nth-child(6){grid-column:span 1}.qt-item-row td:nth-child(7){grid-column:1/5}.qt-item-row td:nth-child(8),.qt-item-row td:nth-child(9){grid-column:span 2}
  .qt-item-row td:nth-child(4)::before{content:'จำนวน'}.qt-item-row td:nth-child(5)::before{content:'หน่วย'}.qt-item-row td:nth-child(6)::before{content:'ราคาเสนอ'}.qt-item-row td:nth-child(7)::before{content:'ส่วนลด 1 / 2 / 3'}.qt-item-row td:nth-child(8)::before{content:'ราคาสุทธิ  '}.qt-item-row td:nth-child(9)::before{content:'รวม  '}
  .qt-item-row td:nth-child(n+4):nth-child(-n+9)::before{display:block;margin-bottom:3px;font-size:9px;color:#77818e}
  .qt-item-note{display:block;margin-top:-10px}.qt-item-note td:first-child{display:none}.qt-item-note td:last-child{display:block!important;padding:8px;border:1px solid #dfe3e8;border-top:0;border-radius:0 0 10px 10px;background:#fff}
  .qt-item-note label{grid-template-columns:1fr}.qt-item-note label span{display:none}
}

/* Quotation without product images and with one discount */
.qt-product-results button{grid-template-columns:105px minmax(260px,1fr) minmax(180px,.8fr) 90px}
.qt-line-table{min-width:920px}
.qt-line-table th:nth-child(1){width:100px}.qt-line-table th:nth-child(2){width:250px}.qt-line-table th:nth-child(3){width:76px}.qt-line-table th:nth-child(4){width:74px}.qt-line-table th:nth-child(5){width:100px}.qt-line-table th:nth-child(6){width:92px}.qt-line-table th:nth-child(7){width:96px}.qt-line-table th:nth-child(8){width:100px}.qt-line-table th:nth-child(9){width:42px}
.qt-line-table .qt-discounts{display:block}
.qt-line-table .qt-discounts input{padding-right:20px}
@media(max-width:700px){
  .qt-product-results button{grid-template-columns:78px minmax(0,1fr) 64px}
  .qt-item-row{grid-template-columns:82px 1fr 32px}
  .qt-item-row td:nth-child(1){grid-column:1}.qt-item-row td:nth-child(2){grid-column:2}.qt-item-row td:nth-child(9){grid-column:3;grid-row:1}
  .qt-item-row td:nth-child(3),.qt-item-row td:nth-child(4),.qt-item-row td:nth-child(5){grid-column:span 1}.qt-item-row td:nth-child(6){grid-column:1/4}.qt-item-row td:nth-child(7),.qt-item-row td:nth-child(8){grid-column:span 1}
  .qt-item-row td:nth-child(3)::before{content:'จำนวน'}.qt-item-row td:nth-child(4)::before{content:'หน่วย'}.qt-item-row td:nth-child(5)::before{content:'ราคาเสนอ'}.qt-item-row td:nth-child(6)::before{content:'ส่วนลด'}.qt-item-row td:nth-child(7)::before{content:'ราคาสุทธิ  '}.qt-item-row td:nth-child(8)::before{content:'รวม  '}
  .qt-item-row td:nth-child(n+3):nth-child(-n+8)::before{display:block;margin-bottom:3px;font-size:9px;color:#77818e}
}

/* Quotation workspace redesign — compact document editor. */
#quotationModule{padding:14px 16px 86px;background:linear-gradient(180deg,#f7f9fb 0,#f5f1e8 100%);min-height:calc(100vh - 150px)}
.qt-editor{max-width:1600px}.qt-card{border:1px solid #dbe1e8;border-radius:12px;background:#fff;box-shadow:0 2px 8px rgba(23,34,56,.04)}
.qt-editor-title{display:flex;align-items:flex-end;justify-content:space-between;gap:20px;margin-bottom:12px}.qt-editor-heading{display:flex;align-items:center;gap:11px}.qt-doc-icon{display:grid;width:42px;height:42px;place-items:center;border-radius:11px;background:#fff3d4;color:#9a6e15;font-size:22px}.qt-title-line{display:flex;align-items:center;gap:10px}.qt-title-line h1{margin:0;font-size:25px}.qt-editor-heading p{margin:2px 0 0;color:#77818f}.qt-draft-pill,.qt-selected-pill{display:inline-flex;padding:4px 10px;border-radius:999px;background:#e9f1fb;color:#315f91;font-size:10px;font-weight:700}.qt-document-meta{display:grid;grid-template-columns:235px 185px;gap:10px}.qt-document-meta label,.qt-terms-fields label{display:grid;gap:5px;font-weight:600}.qt-document-meta label>span,.qt-terms-fields label>span{font-size:10px;color:#576375}.qt-document-meta input,.qt-terms-fields input{width:100%;height:38px;border:1px solid #cbd4df;border-radius:7px;background:#fff;padding:7px 10px}.qt-document-meta input[readonly]{background:#f3f6f9;color:#26344a;font-weight:700}
.qt-overview{display:grid;grid-template-columns:minmax(0,1.55fr) minmax(310px,.75fr);gap:12px;margin-bottom:12px}.qt-card-title{display:flex;align-items:center;justify-content:space-between;padding:13px 15px;border-bottom:1px solid #e4e8ed}.qt-card-title>div{display:flex;align-items:center;gap:9px}.qt-card-title h2{margin:0;font-size:15px}.qt-card-title p{margin:1px 0 0;color:#7a8491;font-size:10px}.qt-card-icon{display:grid;width:29px;height:29px;place-items:center;border-radius:8px;background:#fff4d8;color:#98701f;font-size:15px}.qt-customer{display:block;margin:0;padding:0}.qt-customer-content{display:grid;grid-template-columns:minmax(280px,.8fr) minmax(340px,1.2fr);gap:12px;padding:13px}.qt-searchbox>label{font-size:10px;color:#566274}.qt-searchbox>div:nth-of-type(1){margin-top:5px}.qt-searchbox input{height:39px}.qt-searchbox button{white-space:nowrap;background:#fffaf0}.qt-results{top:67px}.qt-customer-card{display:grid;grid-template-columns:1.3fr .8fr;padding:12px 14px;background:#f5f8fa;border:1px solid #e5e9ee}.qt-customer-card>div{display:grid;gap:2px;padding:4px 10px;border-left:1px solid #e0e5ea}.qt-customer-card>div:nth-child(odd){border-left:0}.qt-customer-card span{font-size:9px}.qt-customer-card b{font-size:10.5px}.qt-customer-name{grid-column:1/-1!important;display:flex!important;grid-template-columns:1fr auto!important;align-items:center;border-left:0!important;padding-bottom:7px!important;border-bottom:1px solid #e0e5ea}.qt-customer-name b{font-size:14px}.qt-customer-name small{font-size:10px;color:#6f7b8a}.qt-customer-empty{min-height:112px}.qt-customer-empty span{font-size:22px}.qt-customer-empty b,.qt-customer-empty small{display:block}.qt-customer-empty small{font-size:10px}
.qt-terms-card{min-width:0}.qt-terms-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:13px}.qt-terms-fields .wide{grid-column:1/-1}.qt-status-row{display:flex;align-items:center;justify-content:space-between;margin:0 13px 13px;padding-top:10px;border-top:1px dashed #dce1e7}.qt-status-row>span{font-size:10px;color:#6d7887}.qt-status{padding:5px 9px;font-size:10px}
.qt-work{grid-template-columns:minmax(0,1fr) 290px;gap:12px}.qt-main{padding:0;overflow:hidden}.qt-section-title{grid-template-columns:minmax(250px,1fr) minmax(400px,560px);padding:13px 15px;border-bottom:1px solid #e4e8ed}.qt-section-title h2{font-size:15px}.qt-section-title p{font-size:10px}.qt-section-title input{height:38px}.qt-add-product{background:linear-gradient(135deg,#f5dfaa,#e7c36d)!important;border-color:#c49b43!important;color:#382b12}.qt-lines{margin:0;border:0;border-radius:0}.qt-line-table{min-width:1040px}.qt-line-table th{height:38px;background:#edf2f6;color:#405068;border-bottom:1px solid #d8e0e8;text-align:center}.qt-line-table th:nth-child(1){width:42px}.qt-line-table th:nth-child(2){width:95px}.qt-line-table th:nth-child(3){width:245px}.qt-line-table th:nth-child(4){width:72px}.qt-line-table th:nth-child(5){width:70px}.qt-line-table th:nth-child(6){width:98px}.qt-line-table th:nth-child(7){width:86px}.qt-line-table th:nth-child(8){width:108px}.qt-line-table th:nth-child(9){width:105px}.qt-line-table th:nth-child(10){width:40px}.qt-line-table td{padding:7px 8px}.qt-seq{text-align:center!important;color:#667386}.qt-item-row:nth-of-type(4n+1) td,.qt-item-row:nth-of-type(4n+1)+.qt-item-note td{background:#fffdf8}.qt-net b{color:#785b20}.qt-total strong{color:#17243a}.qt-empty{height:170px}.qt-empty>*{display:block;margin:auto}.qt-empty .qt-empty-icon{display:grid;width:34px;height:34px;place-items:center;border-radius:50%;background:#fff0c5;color:#99701a;font-size:19px}.qt-empty b{margin-top:8px}.qt-empty small{margin-top:3px}.qt-add-row{margin:11px 15px}.qt-note{margin:0;padding:12px 15px 15px;border-top:1px solid #e7ebef}.qt-note>span{font-size:11px}.qt-note textarea{min-height:58px}
.qt-summary{padding:0;overflow:hidden;top:10px}.qt-summary>header{display:flex;align-items:center;gap:9px;padding:14px 15px;border-bottom:1px solid #e3e7ec}.qt-summary>header>span{display:grid;width:30px;height:30px;place-items:center;border-radius:8px;background:#fff2ce;color:#916815;font-weight:700}.qt-summary h3{margin:0;font-size:16px}.qt-summary header small{color:#788391}.qt-summary>div,.qt-summary>label{margin:0 14px;padding:9px 0}.qt-summary>label input,.qt-summary>label select{width:128px;height:33px}.qt-summary .discount{color:#a24c40}.qt-summary .grand{margin:7px 0 0;padding:15px;background:linear-gradient(110deg,#fff7e4,#f4e7c5);border-radius:0}.qt-summary .grand b{font-size:21px;color:#8d6414}.qt-total-words{background:#f4f7fa;margin:0!important;padding:11px 14px!important}.qt-stock-note{margin:11px 14px 14px!important;padding:9px 10px;border-radius:8px;background:#eef7f1;color:#287248!important;font-size:9px}
.qt-footer{position:fixed;z-index:18;left:250px;right:0;bottom:0;margin:0;padding:10px 22px;background:rgba(255,255,255,.96);border-top:1px solid #d8dee6;box-shadow:0 -7px 24px rgba(23,34,56,.08);backdrop-filter:blur(10px)}body.sidebar-collapsed .qt-footer{left:76px}.qt-footer button{min-height:38px}.qt-footer-separator{width:1px;height:25px;background:#d8dee6}.qt-footer .qt-primary{min-width:130px}
@media(max-width:1100px){.qt-overview{grid-template-columns:1fr}.qt-work{grid-template-columns:1fr}.qt-summary{position:static}.qt-footer{left:0}.qt-section-title{grid-template-columns:1fr}.qt-customer-content{grid-template-columns:1fr 1fr}}
@media(max-width:700px){#quotationModule{padding:10px 9px 82px}.qt-editor-title{display:grid}.qt-document-meta{grid-template-columns:1fr 1fr}.qt-overview,.qt-customer-content,.qt-terms-fields{grid-template-columns:1fr}.qt-terms-fields .wide{grid-column:auto}.qt-section-title{padding:12px}.qt-section-title form{grid-template-columns:1fr auto}.qt-footer{display:flex;overflow:auto;padding:8px}.qt-footer .qt-msg,.qt-footer [data-back],.qt-footer-separator{display:none}.qt-footer button{white-space:nowrap}.qt-title-line h1{font-size:20px}.qt-line-table{min-width:0}.qt-item-row{grid-template-columns:35px 82px 1fr 32px}.qt-item-row td:nth-child(1){grid-column:1}.qt-item-row td:nth-child(2){grid-column:2}.qt-item-row td:nth-child(3){grid-column:3}.qt-item-row td:nth-child(10){grid-column:4;grid-row:1}.qt-item-row td:nth-child(4),.qt-item-row td:nth-child(5),.qt-item-row td:nth-child(6){grid-column:span 1}.qt-item-row td:nth-child(7){grid-column:1/5}.qt-item-row td:nth-child(8),.qt-item-row td:nth-child(9){grid-column:span 2}.qt-item-row td:nth-child(4)::before{content:'จำนวน'}.qt-item-row td:nth-child(5)::before{content:'หน่วย'}.qt-item-row td:nth-child(6)::before{content:'ราคา/หน่วย'}.qt-item-row td:nth-child(7)::before{content:'ส่วนลด'}.qt-item-row td:nth-child(8)::before{content:'ราคาสุทธิ'}.qt-item-row td:nth-child(9)::before{content:'รวม'}.qt-item-row td:nth-child(n+4):nth-child(-n+9)::before{display:block;margin-bottom:3px;font-size:9px;color:#77818e}.qt-item-note td:last-child{display:block!important}}

/* Customer search lives in the card header; details use the full card width. */
.qt-customer-heading{position:relative;display:grid;grid-template-columns:auto minmax(330px,1fr) auto;gap:14px;align-items:end}.qt-customer-title{display:flex;align-items:center;gap:9px;white-space:nowrap}.qt-customer-header-search{width:100%;max-width:620px;justify-self:end}.qt-customer-header-search>label{display:block;margin-bottom:3px;font-size:9px}.qt-customer-header-search>div:nth-of-type(1){margin:0}.qt-customer-header-search .qt-results{top:55px;right:0;width:min(620px,70vw);z-index:20}.qt-customer-detail-full{display:block}.qt-customer-detail-full .qt-customer-card{width:100%;grid-template-columns:minmax(250px,1.5fr) minmax(150px,.65fr) minmax(150px,.65fr)}.qt-customer-detail-full .qt-customer-name{grid-column:1/-1!important}.qt-customer-detail-full .qt-customer-address{grid-column:auto!important}.qt-customer-detail-full .qt-customer-empty{width:100%}
@media(max-width:900px){.qt-customer-heading{grid-template-columns:1fr auto;align-items:center}.qt-customer-header-search{grid-column:1/-1;grid-row:2;max-width:none}.qt-customer-header-search .qt-results{top:105px;width:100%}.qt-customer-detail-full .qt-customer-card{grid-template-columns:1fr 1fr}.qt-customer-detail-full .qt-customer-address{grid-column:1/-1!important}}
@media(max-width:560px){.qt-customer-heading{grid-template-columns:1fr}.qt-customer-heading .qt-selected-pill{display:none}.qt-customer-header-search{grid-column:1}.qt-customer-detail-full .qt-customer-card{grid-template-columns:1fr}.qt-customer-detail-full .qt-customer-card>div{border-left:0}.qt-customer-header-search .qt-results{top:105px}}

/* Quotation product search mirrors Product Catalog search and supports display-code selection. */
.qt-live-search{position:relative;min-width:0}.qt-live-search>input{padding-right:92px}.qt-live-search>span{position:absolute;right:10px;top:50%;transform:translateY(-50%);display:flex;align-items:center;gap:4px;color:#8a7a62;font-size:9px;pointer-events:none}.qt-live-search kbd{display:grid;place-items:center;min-width:18px;height:18px;border:1px solid #d7c9aa;border-radius:5px;background:#fffaf0;color:#765613;font:600 10px inherit}.qt-code-picker{display:grid;gap:3px}.qt-code-picker>span{font-size:8px;color:#7a8492}.qt-code-picker select{width:100%;min-width:0;height:32px;border:1px solid #cbd2dc;border-radius:6px;background:#fff;padding:4px 5px;color:#17233a;font:600 10px inherit}.qt-line-table th:nth-child(2){width:155px}.qt-product-results button small{overflow-wrap:anywhere}
@media(max-width:700px){.qt-live-search>span{display:none}.qt-live-search>input{padding-right:8px}.qt-code-picker>span{display:none}.qt-code-picker select{height:35px}}
