
.mkbg-app{font-family:Arial,sans-serif;color:#111;background:#f3f4f6;padding:12px}
.mkbg-toolbar-title{display:flex;justify-content:space-between;align-items:center;background:#173b67;color:#fff;padding:10px 14px;margin-bottom:10px;border-radius:4px}
.mkbg-actions{display:flex;gap:8px;flex-wrap:wrap;margin:0 auto 12px;max-width:1200px}
.mkbg-actions button{border:1px solid #999;background:#fff;padding:9px 13px;border-radius:4px;cursor:pointer}
.mkbg-actions .mkbg-primary{background:#173b67;color:#fff;border-color:#173b67}
.mkbg-actions .mkbg-save-btn{background:#198754;color:#fff;border-color:#198754;font-weight:700}
.mkbg-actions .mkbg-list-btn{background:#fff7df;color:#7a4b00;border-color:#d99b22;font-weight:700}
.mkbg-paper{background:#fff;max-width:1200px;margin:auto;padding:22px 26px;box-shadow:0 1px 8px #bbb;font-family:"Times New Roman",serif;font-size:13px}
.mkbg-head{display:flex;align-items:center;border-bottom:3px double #222;padding-bottom:8px}
.mkbg-logo{width:155px;height:82px;display:flex;align-items:center;justify-content:flex-start;flex:none}
.mkbg-logo img{display:block;max-width:150px;max-height:80px;width:auto;height:auto;object-fit:contain}
.mkbg-company{flex:1;text-align:center;color:#173b67;line-height:1.25}
.mkbg-company-name{font-weight:700;font-size:21px;text-transform:uppercase}
.mkbg-company-sub{font-weight:700;font-size:16px;margin-top:2px}
.mkbg-company-slogan{font-style:italic;font-size:15px;margin:2px 0}
.mkbg-hotline{font-weight:700;font-size:16px;margin-top:2px}
.mkbg-title{text-align:center;text-decoration:underline;font-size:19px;margin:13px 0 10px;text-transform:uppercase}
.mkbg-meta{display:grid;grid-template-columns:1fr 1fr;border:1px solid #222;margin-bottom:10px}
.mkbg-meta>div{padding:4px 7px;line-height:20px}
.mkbg-meta>div+div{border-left:1px solid #222}
.mkbg-meta input{border:0;border-bottom:1px dotted #777;min-width:170px;font:inherit;padding:0 2px}
.mkbg-note{font-style:italic;font-weight:600;color:#4c5663;margin:7px 3px 9px}
.mkbg-paper table{width:100%;border-collapse:collapse;table-layout:fixed}
.mkbg-paper th,.mkbg-paper td{border:1px solid #222;padding:4px 4px;vertical-align:middle;word-wrap:break-word;overflow-wrap:anywhere}
.mkbg-paper th{background:#173b67;color:#fff;text-align:center;font-weight:700;line-height:1.05}
.mkbg-paper th:nth-child(1){width:4%}
.mkbg-paper th:nth-child(2){width:34%}
.mkbg-paper th:nth-child(3){width:11%}
.mkbg-paper th:nth-child(4){width:7%}
.mkbg-paper th:nth-child(5){width:6%}
.mkbg-paper th:nth-child(6),.mkbg-paper th:nth-child(7),.mkbg-paper th:nth-child(8),.mkbg-paper th:nth-child(9){width:9.5%}
.mkbg-paper th:nth-child(10){width:24px}
.mkbg-paper td:nth-child(1),.mkbg-paper td:nth-child(3),.mkbg-paper td:nth-child(4),.mkbg-paper td:nth-child(5),.mkbg-paper td:nth-child(n+6){text-align:center}
.mkbg-paper td:nth-child(2){text-align:left;white-space:pre-line}
.mkbg-paper tbody tr.item-row{min-height:30px}
.mkbg-paper tbody tr.category-row td{background:#fff200!important;text-align:center!important;font-weight:700;padding:2px}
.mkbg-paper tfoot td{font-weight:700}
.mkbg-subtotal td{background:#b7d2e5}
.mkbg-subtotal td:first-child{text-align:center}
.mkbg-summary td,.mkbg-total td{padding:3px 6px;text-align:right!important}
.mkbg-summary td{background:#f2f2f2}
.mkbg-summary span,.mkbg-total span{display:inline-block;min-width:65%;text-align:right}
.mkbg-summary strong,.mkbg-total strong{display:inline-block;min-width:25%;text-align:right}
.mkbg-total td{background:#dceaf3;font-size:14px}
.mkbg-row-select{width:100%;font:inherit;border:1px solid #aaa;padding:3px}
.mkbg-row-input{width:92%;font:inherit;border:1px solid #bbb;text-align:right;padding:3px;box-sizing:border-box}
.material-price,.labor-price{width:100%}
.mkbg-delete{border:1px solid #c62828;background:#fff;color:#c62828;font-size:12px;font-weight:700;cursor:pointer;border-radius:3px;padding:4px 6px;white-space:nowrap}.mkbg-delete:hover{background:#c62828;color:#fff}.mkbg-action-cell{text-align:center!important}
.mkbg-preview{display:none;width:42px;height:30px;object-fit:contain;margin:0 auto 2px}
.mkbg-words-line{margin:8px 2px}
.mkbg-signature{width:42%;margin-left:auto;text-align:center;margin-top:18px;min-height:65px}
.mkbg-signature span{display:block;margin-top:7px;font-style:italic}
.mkbg-paper footer{text-align:center;margin-top:10px;font-style:italic}
.mkbg-vat{width:32px;border:0;border-bottom:1px dotted #777;text-align:center;font:inherit}
.mkbg-login-box{max-width:420px;margin:30px auto;padding:24px;border:1px solid #ddd;border-radius:8px;background:#fff}
.mkbg-login-box input[type=text],.mkbg-login-box input[type=password]{width:100%;padding:9px;box-sizing:border-box}
.mkbg-login-box input[type=submit]{background:#173b67;color:#fff;border:0;padding:10px 20px;border-radius:4px}
@media(max-width:800px){
 .mkbg-app{padding:6px}.mkbg-toolbar-title{padding:10px;font-size:13px;gap:8px}.mkbg-toolbar-title span{font-size:11px}
 .mkbg-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px}.mkbg-actions button{width:100%;padding:10px 7px;font-size:13px}
 .mkbg-paper{padding:8px;overflow:visible;box-shadow:none;border-radius:0}.mkbg-head{display:block;text-align:center;padding-bottom:7px}
 .mkbg-logo{width:100%;height:55px;justify-content:center}.mkbg-logo img{max-width:125px;max-height:52px}
 .mkbg-company-name{font-size:15px}.mkbg-company-sub{font-size:12px}.mkbg-company-slogan{font-size:11px}.mkbg-hotline{font-size:12px}
 .mkbg-title{font-size:16px;margin:9px 0 8px}.mkbg-meta{grid-template-columns:1fr}.mkbg-meta>div{padding:5px 6px}.mkbg-meta>div+div{border-left:0;border-top:1px solid #222}.mkbg-meta input{min-width:0;width:calc(100% - 95px);max-width:100%;box-sizing:border-box}
 .mkbg-note{font-size:12px;margin:6px 2px 8px}
 /* Chế độ thẻ trên điện thoại: dễ nhập hơn, không cần kéo ngang */
 .mkbg-paper table{display:block;width:100%;table-layout:auto}.mkbg-paper thead{display:none}.mkbg-paper tbody{display:block;width:100%}
 .mkbg-paper tbody tr.item-row{display:grid;grid-template-columns:1fr 1fr;gap:0;margin:0 0 8px;border:1px solid #222;border-radius:5px;overflow:hidden;background:#fff}
 .mkbg-paper tbody tr.item-row td{display:block;width:auto;border:0;border-bottom:1px solid #ddd;padding:6px 7px;text-align:left!important;min-width:0}
 .mkbg-paper tbody tr.item-row td:nth-child(1){display:none}
 .mkbg-paper tbody tr.item-row td:nth-child(2){grid-column:1 / -1;border-bottom:1px solid #222;font-weight:600}
 .mkbg-paper tbody tr.item-row td:nth-child(3)::before{content:'Mã hàng: ';font-weight:700}.mkbg-paper tbody tr.item-row td:nth-child(4)::before{content:'ĐVT: ';font-weight:700}
 .mkbg-paper tbody tr.item-row td:nth-child(5)::before{content:'Số lượng: ';font-weight:700}.mkbg-paper tbody tr.item-row td:nth-child(6)::before{content:'Giá vật tư: ';font-weight:700}.mkbg-paper tbody tr.item-row td:nth-child(7)::before{content:'Giá nhân công: ';font-weight:700}
 .mkbg-paper tbody tr.item-row td:nth-child(8)::before{content:'Thành tiền VT: ';font-weight:700}.mkbg-paper tbody tr.item-row td:nth-child(9)::before{content:'Thành tiền NC: ';font-weight:700}
 .mkbg-paper tbody tr.item-row td:nth-child(10){position:absolute;right:7px;top:5px;border:0;padding:0}.mkbg-paper tbody tr.item-row{position:relative}
 .mkbg-row-input{width:100%;min-height:32px;font-size:14px;padding:5px}.mkbg-row-select{width:100%;min-height:34px;font-size:14px}.mkbg-preview{width:48px;height:36px;float:left;margin-right:7px}
 .mkbg-paper tbody tr.category-row{display:block;margin:5px 0 4px}.mkbg-paper tbody tr.category-row td{display:block;width:100%;border:1px solid #222;padding:5px}
 .mkbg-paper tfoot{display:block}.mkbg-paper tfoot tr{display:grid;grid-template-columns:1fr}.mkbg-paper tfoot td{display:block;width:100%;border-left:1px solid #222;border-right:1px solid #222}
 .mkbg-subtotal td{font-size:12px}.mkbg-summary td,.mkbg-total td{text-align:left!important}.mkbg-summary span,.mkbg-total span{display:inline;width:auto}.mkbg-summary strong,.mkbg-total strong{float:right;min-width:0;width:auto}.mkbg-total td{font-size:13px}
 .mkbg-signature{width:70%;margin-left:auto}.mkbg-paper footer{font-size:11px}
}
@media(max-width:430px){
 .mkbg-actions{grid-template-columns:1fr}.mkbg-toolbar-title{display:block}.mkbg-toolbar-title span{display:block;margin-top:3px}.mkbg-paper{padding:6px}.mkbg-company-name{font-size:14px}.mkbg-meta input{width:100%;margin-top:3px}.mkbg-meta b{display:block}.mkbg-signature{width:90%}
}
/* Responsive theo thiết bị: máy tính / tablet / điện thoại */
@media (min-width:801px){
 .mkbg-paper{max-width:1200px}
 .mkbg-actions{max-width:1200px}
}
@media (min-width:481px) and (max-width:800px){
 .mkbg-app{padding:8px}
 .mkbg-paper{padding:12px}
 .mkbg-actions{grid-template-columns:repeat(2,1fr)}
 .mkbg-company-name{font-size:17px}
}
/* Fix VAT rate position in printed/exported quotation */
@media print{
 .mkbg-summary td{white-space:nowrap!important;}
 .mkbg-summary span{min-width:65%!important;white-space:nowrap!important;}
 .mkbg-summary .mkbg-vat{display:inline-block!important;width:24px!important;min-width:24px!important;max-width:24px!important;height:16px!important;padding:0!important;margin:0 2px!important;border:0!important;border-bottom:1px dotted #777!important;vertical-align:baseline!important;text-align:center!important;position:static!important;transform:none!important;}
}

@media print{
 .mkbg-app{background:#fff;padding:0}.mkbg-toolbar-title,.mkbg-actions{display:none!important}
 .mkbg-paper{box-shadow:none;max-width:none;padding:0;font-size:10px}
 .mkbg-paper input,.mkbg-row-select{border:0!important;appearance:none;background:transparent}
 .mkbg-delete,.mkbg-action-col{display:none!important}
 @page{size:A4 portrait!important;margin:0.5mm!important}
}

/* MKBG 1.4.3 - giao diện theo mẫu */
.mkbg-logo{width:190px;height:105px;justify-content:center}
.mkbg-logo img{max-width:185px;max-height:100px}
.mkbg-company-name{font-size:24px}
.mkbg-title{font-size:23px;color:#a72b25;text-decoration:none;font-weight:700;letter-spacing:.2px}
.mkbg-title:after{content:"";display:block;width:220px;border-bottom:2px solid #173b67;margin:8px auto 0}
.mkbg-meta{border:1px solid #b9c1cc;border-radius:4px;overflow:hidden}
.mkbg-meta>div{padding:8px 10px}
.mkbg-meta b{min-width:105px;display:inline-block}
.mkbg-meta input,.mkbg-meta select{border:1px dotted #9aa3ad;background:#fff;padding:4px 6px;min-width:180px}
.mkbg-customer-line{display:flex;align-items:center;gap:5px}
.mkbg-customer-line #mkbg-customer{flex:1}
.mkbg-mini-btn{border:1px solid #9aa3ad;background:#fff;border-radius:4px;padding:4px 7px;cursor:pointer}
@media(max-width:800px){
 .mkbg-logo{width:100%;height:85px}
 .mkbg-logo img{max-width:165px;max-height:82px}
 .mkbg-company-name{font-size:18px}
 .mkbg-title{font-size:18px}
 .mkbg-customer-line{flex-wrap:wrap}
 .mkbg-customer-line #mkbg-customer{min-width:0;width:calc(100% - 0px)}
 .mkbg-mini-btn{margin-left:0}
}
@media(max-width:430px){
 .mkbg-logo{height:75px}
 .mkbg-logo img{max-width:145px;max-height:72px}
 .mkbg-company-name{font-size:16px}
 .mkbg-title{font-size:16px}
}
@media print{
 .mkbg-logo{width:175px;height:95px}
 .mkbg-logo img{max-width:170px;max-height:92px}
 .mkbg-company-name{font-size:18px}
 .mkbg-title{font-size:16px;color:#a72b25}
 .mkbg-title:after{display:none}
 .mkbg-mini-btn{display:none!important}
}

/* 1.4.4 - ảnh sản phẩm và tiêu đề chỉnh trực tiếp */
.mkbg-image-field{min-width:150px}
.mkbg-image-field .mkbg-image-preview{display:block;width:72px;height:55px;object-fit:contain;margin:0 auto 6px;border:1px solid #ddd;background:#fff}
.mkbg-image-field .mkbg-media-button{display:block;margin:0 auto 4px}
.mkbg-image-field .mkbg-remove-image{display:block;margin:auto}
.mkbg-title-edit{display:flex;align-items:center;justify-content:center;gap:7px;margin:7px 0}
.mkbg-title-edit label{font-weight:700;color:#173b67}
.mkbg-title-edit input{min-width:360px;border:1px solid #c5ccd5;border-radius:4px;padding:7px 9px;font-size:14px}
@media(max-width:600px){
 .mkbg-title-edit{flex-wrap:wrap}
 .mkbg-title-edit input{min-width:0;width:100%}
 .mkbg-image-field{min-width:0}
}
@media print{.mkbg-title-edit{display:none!important}}

.mkbg-google-btn{border:1px solid #1b4b82;background:#fff;color:#173b67;border-radius:4px;padding:8px 12px;cursor:pointer}
.mkbg-google-modal{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:99999;align-items:center;justify-content:center;padding:20px}
.mkbg-google-box{background:#fff;width:min(900px,96vw);max-height:88vh;overflow:auto;border-radius:8px;box-shadow:0 15px 50px rgba(0,0,0,.25)}
.mkbg-google-head{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;background:#173b67;color:#fff}
.mkbg-google-head button{border:0;background:transparent;color:#fff;font-size:28px;cursor:pointer}
.mkbg-google-searchbar{display:flex;gap:8px;padding:14px;border-bottom:1px solid #ddd}
.mkbg-google-searchbar input{flex:1;padding:9px;border:1px solid #bbb;border-radius:4px}
.mkbg-google-searchbar button{padding:9px 16px;background:#173b67;color:#fff;border:0;border-radius:4px}
#mkbg-google-status{padding:8px 14px;color:#555}
.mkbg-google-result{display:grid;grid-template-columns:90px 1fr auto;gap:12px;align-items:center;padding:12px 14px;border-top:1px solid #eee}
.mkbg-google-result img,.mkbg-google-noimg{width:78px;height:65px;object-fit:contain;border:1px solid #ddd;background:#fafafa}
.mkbg-google-noimg{display:flex;align-items:center;justify-content:center;font-size:11px;color:#888}
.mkbg-google-result-body b{display:block;color:#173b67;margin-bottom:4px}
.mkbg-google-result-body p{margin:0 0 4px;font-size:13px}
.mkbg-google-result-body small{color:#777;word-break:break-all}
.mkbg-google-result>button{background:#173b67;color:#fff;border:0;border-radius:4px;padding:7px 14px;cursor:pointer}
.mkbg-google-note{padding:10px 14px;color:#666;font-size:12px}
.mkbg-error{color:#b42318}
@media(max-width:600px){.mkbg-google-result{grid-template-columns:60px 1fr}.mkbg-google-result img,.mkbg-google-noimg{width:55px;height:50px}.mkbg-google-result>button{grid-column:2;justify-self:start}.mkbg-google-searchbar{flex-wrap:wrap}.mkbg-google-searchbar input{width:100%;flex-basis:100%}}

.mkbg-save-btn{border:1px solid #1f6b3a;background:#fff;color:#1f6b3a;border-radius:4px;padding:8px 12px;cursor:pointer}
.mkbg-google-btn{border:1px solid #173b67;background:#fff;color:#173b67;border-radius:4px;padding:8px 12px;cursor:pointer}
.mkbg-login-form button[type="submit"],.mkbg-login-wrap button[type="submit"]{display:block!important;width:100%!important;max-width:320px!important;min-height:46px!important;margin:14px auto!important;text-align:center!important}

.mkbg-web-search-actions{display:flex;gap:10px;padding:15px}.mkbg-web-search-actions button{flex:1;min-height:42px;border:1px solid #173b67;background:#173b67;color:#fff;border-radius:5px;cursor:pointer}
.mkbg-google-box{max-width:920px}
@media(max-width:600px){.mkbg-web-search-actions{flex-direction:column}.mkbg-google-result{grid-template-columns:64px 1fr}.mkbg-google-result>button{grid-column:2;justify-self:start}}

/* 1.4.9 web product search - no Google CSE/API required */
.mkbg-google-modal{z-index:99999!important}
.mkbg-google-box{width:min(900px,calc(100vw - 30px));max-height:90vh;overflow:auto}
.mkbg-google-searchbar{display:flex!important;gap:8px!important;align-items:center!important}
.mkbg-google-searchbar input{flex:1!important;min-width:0!important}
.mkbg-google-searchbar button{white-space:nowrap!important}
.mkbg-web-search-actions{display:flex;gap:12px;padding:15px 0}
.mkbg-web-search-actions button{flex:1;min-height:44px;border:1px solid #173b67;background:#173b67;color:#fff;border-radius:5px;cursor:pointer}
.mkbg-google-result{display:grid!important;grid-template-columns:90px 1fr auto;gap:14px;align-items:center;border:1px solid #ddd;padding:12px;margin-top:12px;background:#fff}
.mkbg-google-result img{width:80px;height:80px;object-fit:contain}
.mkbg-google-result button{white-space:nowrap;min-height:40px}
@media(max-width:600px){
 .mkbg-google-searchbar{flex-direction:column!important;align-items:stretch!important}
 .mkbg-google-result{grid-template-columns:64px 1fr!important}
 .mkbg-google-result>button{grid-column:1/-1}
 .mkbg-web-search-actions{flex-direction:column}
}

/* MK Báo Giá 1.5.1 */
.mkbg-web-search-actions button{cursor:pointer;min-height:42px}.mkbg-google-result button{cursor:pointer}

/* 1.5.2 - web imported product row */
.mkbg-web-name-edit{width:100%;min-height:42px;border:1px solid #d7dde5;padding:5px;font-family:inherit;font-size:inherit;resize:vertical;box-sizing:border-box}
.mkbg-row-select{max-width:100%}

/* MK Báo Giá 1.5.3 - A4/PDF print fixes */
@media print{
  .mkbg-company{min-width:0;overflow:visible}
  .mkbg-company-name{white-space:nowrap!important;word-break:keep-all!important;font-size:15px!important;color:#173b67!important}
  .mkbg-company-sub{white-space:nowrap!important;color:#b52a23!important}
  .mkbg-company-slogan,.mkbg-hotline{white-space:nowrap!important;color:#173b67!important}
  .mkbg-preview{display:block!important;width:62px!important;height:48px!important;max-width:62px!important;max-height:48px!important;object-fit:contain!important}
  .mkbg-paper tbody tr.item-row{break-inside:avoid;page-break-inside:avoid}
}

/* MK Báo Giá 1.5.4 - FORM chuẩn theo mẫu PDF HỆ THỐNG CAMERA */
.mkbg-paper{
  max-width:1100px;
  margin:0 auto;
  background:#fff;
  font-family:"Times New Roman",serif;
}
.mkbg-head{
  display:flex;
  align-items:center;
  gap:10px;
  border-bottom:3px double #222;
  padding:4px 8px 8px;
}
.mkbg-logo{
  width:135px;
  height:82px;
  flex:0 0 135px;
  display:flex;
  align-items:center;
  justify-content:flex-start;
}
.mkbg-logo img{
  max-width:125px;
  max-height:78px;
  width:auto;
  height:auto;
  object-fit:contain;
}
.mkbg-company{
  flex:1;
  min-width:0;
  text-align:center;
  color:#173b67;
  line-height:1.2;
}
.mkbg-company-name{
  font-weight:700;
  font-size:19px;
  text-transform:uppercase;
  white-space:nowrap;
  word-break:keep-all;
}
.mkbg-company-sub{
  font-weight:700;
  font-size:14px;
  color:#b52a23;
  white-space:nowrap;
}
.mkbg-company-slogan{
  font-style:italic;
  font-size:13px;
  color:#173b67;
  white-space:nowrap;
}
.mkbg-hotline{
  font-weight:700;
  font-size:14px;
  color:#173b67;
  white-space:nowrap;
}
.mkbg-title{
  font-size:19px;
  font-weight:700;
  text-align:center;
  text-decoration:underline;
  color:#222;
  margin:10px 0 9px;
}
.mkbg-meta{
  display:grid;
  grid-template-columns:1fr 1fr;
  border:1px solid #222;
  margin-bottom:10px;
}
.mkbg-meta>div{padding:4px 7px;line-height:19px}
.mkbg-meta>div+div{border-left:1px solid #222}
.mkbg-meta input,.mkbg-meta select{
  font-family:"Times New Roman",serif;
  font-size:13px;
}
.mkbg-note{
  font-size:12px;
  font-style:italic;
  font-weight:600;
  margin:7px 3px 9px;
}
.mkbg-paper th{
  background:#173b67!important;
  color:#fff!important;
  font-weight:700;
  text-align:center!important;
}
.mkbg-paper tbody tr.category-row td{
  background:#fff200!important;
  color:#111!important;
  text-align:center!important;
  font-weight:700;
}
.mkbg-subtotal td{background:#b7d2e5!important}
.mkbg-summary td{background:#f2f2f2!important}
.mkbg-total td{background:#dceaf3!important}
.mkbg-total strong{color:#b42318}
.mkbg-words-line{font-size:12px}
.mkbg-signature{margin-top:16px}

/* Khi in / lưu PDF: đúng khổ A4 và không kéo giãn form */
@media print{
  @page{size:A4 portrait!important;margin:0.5mm!important}
  html,body{margin:0!important;padding:0!important;background:#fff!important}
  .mkbg-app{padding:0!important;background:#fff!important}
  .mkbg-paper{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    box-shadow:none!important;
  }
  .mkbg-head{padding:0 4px 5px!important}
  .mkbg-logo{width:105px!important;height:65px!important;flex-basis:105px!important}
  .mkbg-logo img{max-width:98px!important;max-height:62px!important}
  .mkbg-company-name{font-size:15px!important;white-space:nowrap!important}
  .mkbg-company-sub{font-size:11px!important}
  .mkbg-company-slogan{font-size:10px!important}
  .mkbg-hotline{font-size:11px!important}
  .mkbg-title{font-size:16px!important;margin:7px 0!important}
  .mkbg-meta{margin-bottom:6px!important}
  .mkbg-meta>div{padding:2px 5px!important;line-height:15px!important}
  .mkbg-note{font-size:9px!important;margin:4px 2px 5px!important}
  .mkbg-paper table{font-size:9px!important}
  .mkbg-paper th,.mkbg-paper td{padding:2px 3px!important}
  .mkbg-preview{
    display:block!important;
    width:48px!important;height:36px!important;
    max-width:48px!important;max-height:36px!important;
    object-fit:contain!important;
    margin:0 auto 2px!important;
  }
  .mkbg-paper tbody tr.item-row{
    break-inside:avoid!important;
    page-break-inside:avoid!important;
  }
  .mkbg-words-line{font-size:9px!important;margin:4px 2px!important}
  .mkbg-signature{font-size:9px!important;margin-top:8px!important;min-height:45px!important}
  .mkbg-paper footer{font-size:9px!important;margin-top:5px!important}
}
@media(max-width:800px){
  .mkbg-head{display:block;text-align:center}
  .mkbg-logo{width:100%;height:62px;justify-content:center}
  .mkbg-logo img{max-width:110px;max-height:58px}
  .mkbg-company-name{font-size:15px;white-space:normal}
  .mkbg-company-sub{font-size:12px}
  .mkbg-company-slogan{font-size:10px}
  .mkbg-hotline{font-size:11px}
  .mkbg-meta{grid-template-columns:1fr}
  .mkbg-meta>div+div{border-left:0;border-top:1px solid #222}
}

/* MK Báo Giá 1.5.6 - FIX màu phần đầu báo giá theo logo Minh Khang */
.mkbg-head .mkbg-company-name{
  color:#173b67 !important;
  font-weight:700 !important;
  white-space:nowrap !important;
  word-break:normal !important;
  overflow:visible !important;
  text-transform:uppercase !important;
}
.mkbg-head .mkbg-company-sub{
  color:#173b67 !important;
  font-weight:700 !important;
}
.mkbg-head .mkbg-company-slogan,
.mkbg-head .mkbg-hotline{
  color:#173b67 !important;
}
.mkbg-head .mkbg-company{
  color:#173b67 !important;
}
@media print{
  .mkbg-head .mkbg-company-name{
    color:#173b67 !important;
    font-size:14px !important;
    white-space:nowrap !important;
    word-break:normal !important;
    letter-spacing:0 !important;
  }
  .mkbg-head .mkbg-company-sub{color:#173b67 !important;font-size:10.5px !important;}
  .mkbg-head .mkbg-company-slogan{color:#173b67 !important;font-size:9.5px !important;}
  .mkbg-head .mkbg-hotline{color:#173b67 !important;font-size:10.5px !important;}
}


/* MK BÁO GIÁ 1.5.11 — TÙY CHỈNH CĂN ĐẦU TRANG & TIÊU ĐỀ */
.mkbg-paper.mkbg-reference-form .mkbg-head{
  min-height:var(--mkbg-header-height,110px)!important;
  padding-top:var(--mkbg-header-pad-top,4px)!important;
  padding-bottom:var(--mkbg-header-pad-bottom,8px)!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-logo{
  width:var(--mkbg-logo-width,185px)!important;
  flex-basis:var(--mkbg-logo-width,185px)!important;
  height:var(--mkbg-logo-height,96px)!important;
  transform:translate(var(--mkbg-logo-offset,0px),var(--mkbg-logo-offset-y,0px));
}
.mkbg-paper.mkbg-reference-form .mkbg-logo img{
  max-width:calc(var(--mkbg-logo-width,185px) - 10px)!important;
  max-height:calc(var(--mkbg-logo-height,96px) - 6px)!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-company{
  transform:translate(var(--mkbg-company-offset-x,0px),var(--mkbg-company-offset-y,0px));
}
.mkbg-paper.mkbg-reference-form .mkbg-title{
  text-align:var(--mkbg-title-align,center)!important;
  font-size:var(--mkbg-title-size,17px)!important;
  color:var(--mkbg-title-color,#222)!important;
  margin-top:var(--mkbg-title-margin-top,9px)!important;
  margin-bottom:var(--mkbg-title-margin-bottom,8px)!important;
  transform:translate(var(--mkbg-title-offset-x,0px),var(--mkbg-title-offset-y,0px));
}
@media print{
 .mkbg-paper.mkbg-reference-form .mkbg-head{min-height:var(--mkbg-header-height,110px)!important;padding-top:var(--mkbg-header-pad-top,4px)!important;padding-bottom:var(--mkbg-header-pad-bottom,8px)!important}
 .mkbg-paper.mkbg-reference-form .mkbg-logo{width:var(--mkbg-logo-width,105px)!important;flex-basis:var(--mkbg-logo-width,105px)!important;height:var(--mkbg-logo-height,65px)!important;transform:translate(var(--mkbg-logo-offset,0px),var(--mkbg-logo-offset-y,0px))}
 .mkbg-paper.mkbg-reference-form .mkbg-company{transform:translate(var(--mkbg-company-offset-x,0px),var(--mkbg-company-offset-y,0px))}
 .mkbg-paper.mkbg-reference-form .mkbg-title{margin-top:var(--mkbg-title-margin-top,7px)!important;margin-bottom:var(--mkbg-title-margin-bottom,7px)!important;transform:translate(var(--mkbg-title-offset-x,0px),var(--mkbg-title-offset-y,0px))}
}

/* MK BÁO GIÁ 1.5.7 — FORM 100% THEO MẪU "MK - BG NC&VT LHC CAMERA FIX" */
.mkbg-paper.mkbg-reference-form{
  max-width:1200px!important;
}
.mkbg-paper .mkbg-head{
  display:flex!important;
  align-items:center!important;
  justify-content:flex-start!important;
  min-height:96px!important;
  padding:4px 6px 8px!important;
  border-bottom:3px double #222!important;
  box-sizing:border-box!important;
}
.mkbg-paper .mkbg-logo{
  width:185px!important;
  height:96px!important;
  flex:0 0 185px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
}
.mkbg-paper .mkbg-logo img{
  display:block!important;
  width:auto!important;
  height:auto!important;
  max-width:175px!important;
  max-height:90px!important;
  object-fit:contain!important;
}
.mkbg-paper .mkbg-company{
  flex:1 1 auto!important;
  min-width:0!important;
  text-align:center!important;
  color:#173b67!important;
  line-height:1.16!important;
  overflow:visible!important;
}
.mkbg-paper .mkbg-company-name{
  display:block!important;
  margin:0!important;
  padding:0!important;
  color:#173b67!important;
  font-family:"Times New Roman",serif!important;
  font-size:19px!important;
  line-height:1.1!important;
  font-weight:700!important;
  text-transform:uppercase!important;
  white-space:nowrap!important;
  word-break:keep-all!important;
  overflow:visible!important;
  letter-spacing:0!important;
}
.mkbg-paper .mkbg-company-sub{
  display:block!important;
  margin:3px 0 0!important;
  color:#173b67!important;
  font-size:13px!important;
  line-height:1.1!important;
  font-weight:700!important;
  white-space:nowrap!important;
}
.mkbg-paper .mkbg-company-slogan{
  display:block!important;
  margin:2px 0!important;
  color:#173b67!important;
  font-size:12px!important;
  line-height:1.1!important;
  font-style:italic!important;
  white-space:nowrap!important;
}
.mkbg-paper .mkbg-company > div:not(.mkbg-company-name):not(.mkbg-company-sub):not(.mkbg-company-slogan):not(.mkbg-hotline){
  color:#173b67!important;
  font-size:11px!important;
  line-height:1.1!important;
}
.mkbg-paper .mkbg-hotline{
  display:block!important;
  margin:2px 0 0!important;
  color:#173b67!important;
  font-size:13px!important;
  line-height:1.1!important;
  font-weight:700!important;
  white-space:nowrap!important;
}
.mkbg-paper .mkbg-title{
  color:#222!important;
  font-family:"Times New Roman",serif!important;
  font-size:17px!important;
  line-height:1.15!important;
  font-weight:700!important;
  text-decoration:underline!important;
  text-transform:uppercase!important;
  letter-spacing:0!important;
  margin:9px 0 8px!important;
}
.mkbg-paper .mkbg-title:after{display:none!important;content:none!important}
.mkbg-paper .mkbg-meta{
  grid-template-columns:1fr 1fr!important;
  border:1px solid #222!important;
  border-radius:0!important;
  margin:0 0 8px!important;
  overflow:hidden!important;
}
.mkbg-paper .mkbg-meta>div{
  padding:4px 7px!important;
  line-height:16px!important;
}
.mkbg-paper .mkbg-meta>div+div{border-left:1px solid #222!important}
.mkbg-paper .mkbg-meta b{min-width:105px;display:inline-block;color:#111!important}
.mkbg-paper .mkbg-meta input,.mkbg-paper .mkbg-meta select{
  border:0!important;
  border-bottom:1px dotted #777!important;
  border-radius:0!important;
  background:#fff!important;
  padding:1px 2px!important;
  font:inherit!important;
  color:#111!important;
}
.mkbg-paper .mkbg-note{
  color:#333!important;
  font-size:11px!important;
  font-weight:600!important;
  margin:5px 2px 7px!important;
}
.mkbg-paper #mkbg-items th,
.mkbg-paper #mkbg-items td{
  border:1px solid #222!important;
}
.mkbg-paper #mkbg-items th{
  background:#173b67!important;
  color:#fff!important;
  font-size:11px!important;
  line-height:1.05!important;
  padding:4px 3px!important;
}
.mkbg-paper #mkbg-items th:nth-child(1){width:5%!important}
.mkbg-paper #mkbg-items th:nth-child(2){width:34%!important}
.mkbg-paper #mkbg-items th:nth-child(3){width:12%!important}
.mkbg-paper #mkbg-items th:nth-child(4){width:7%!important}
.mkbg-paper #mkbg-items th:nth-child(5){width:6%!important}
.mkbg-paper #mkbg-items th:nth-child(6){width:9%!important}
.mkbg-paper #mkbg-items th:nth-child(7){width:9%!important}
.mkbg-paper #mkbg-items th:nth-child(8){width:9%!important}
.mkbg-paper #mkbg-items th:nth-child(9){width:9%!important}
.mkbg-paper #mkbg-items th:nth-child(10){width:0!important}
.mkbg-paper #mkbg-items td{font-size:10.5px!important;padding:3px!important;vertical-align:middle!important}
.mkbg-paper #mkbg-items tbody tr.category-row td{
  background:#fff200!important;color:#111!important;font-weight:700!important;padding:2px!important;
}
.mkbg-paper .mkbg-subtotal td{background:#b7d2e5!important;font-weight:700!important}
.mkbg-paper .mkbg-summary td{background:#f2f2f2!important;font-weight:700!important;padding:3px 5px!important}
.mkbg-paper .mkbg-total td{background:#dceaf3!important;font-weight:700!important;padding:3px 5px!important}
.mkbg-paper .mkbg-total strong{color:#222!important}
.mkbg-paper .mkbg-words-line{font-size:10px!important;margin:6px 2px!important}
.mkbg-paper .mkbg-signature{width:42%!important;margin-top:14px!important;min-height:60px!important;font-size:10px!important}
.mkbg-paper footer{font-size:10px!important;margin-top:7px!important}

@media print{
  @page{size:A4 portrait!important;margin:0.5mm!important}
  html,body{background:#fff!important}
  .mkbg-paper .mkbg-head{min-height:76px!important;height:76px!important;padding:0 3px 5px!important}
  .mkbg-paper .mkbg-logo{width:150px!important;height:74px!important;flex-basis:150px!important}
  .mkbg-paper .mkbg-logo img{max-width:145px!important;max-height:72px!important}
  .mkbg-paper .mkbg-company-name{font-size:16px!important;line-height:1.05!important;white-space:nowrap!important}
  .mkbg-paper .mkbg-company-sub{font-size:10.5px!important;margin-top:2px!important}
  .mkbg-paper .mkbg-company-slogan{font-size:9.5px!important;margin:1px 0!important}
  .mkbg-paper .mkbg-company > div:not(.mkbg-company-name):not(.mkbg-company-sub):not(.mkbg-company-slogan):not(.mkbg-hotline){font-size:8.5px!important}
  .mkbg-paper .mkbg-hotline{font-size:10px!important;margin-top:1px!important}
  .mkbg-paper .mkbg-title{font-size:13.5px!important;margin:6px 0 5px!important}
  .mkbg-paper .mkbg-meta{margin-bottom:5px!important}
  .mkbg-paper .mkbg-meta>div{padding:2px 4px!important;line-height:12px!important}
  .mkbg-paper .mkbg-meta b{min-width:70px!important}
  .mkbg-paper .mkbg-meta input,.mkbg-paper .mkbg-meta select{font-size:8.5px!important}
  .mkbg-paper .mkbg-note{font-size:8.5px!important;margin:3px 1px 4px!important}
  .mkbg-paper #mkbg-items th{font-size:7.5px!important;padding:2px 2px!important}
  .mkbg-paper #mkbg-items td{font-size:7.5px!important;padding:2px!important;line-height:1.12!important}
  .mkbg-paper #mkbg-items tbody tr.item-row{break-inside:avoid!important;page-break-inside:avoid!important}
  .mkbg-paper .mkbg-summary td,.mkbg-paper .mkbg-total td,.mkbg-paper .mkbg-subtotal td{font-size:8px!important;padding:2px 3px!important}
  .mkbg-paper .mkbg-words-line{font-size:8px!important;margin:4px 1px!important}
  .mkbg-paper .mkbg-signature{font-size:8px!important;margin-top:7px!important;min-height:43px!important}
  .mkbg-paper footer{font-size:8px!important;margin-top:3px!important}
}

@media(max-width:800px){
  .mkbg-paper .mkbg-head{display:block!important;height:auto!important;min-height:0!important;text-align:center!important}
  .mkbg-paper .mkbg-logo{width:100%!important;height:75px!important;flex-basis:auto!important;justify-content:center!important}
  .mkbg-paper .mkbg-logo img{max-width:150px!important;max-height:72px!important}
  .mkbg-paper .mkbg-company-name{font-size:17px!important;white-space:normal!important}
  .mkbg-paper .mkbg-company-sub{font-size:12px!important;white-space:normal!important}
  .mkbg-paper .mkbg-company-slogan,.mkbg-paper .mkbg-hotline{font-size:10.5px!important;white-space:normal!important}
}

/* MK BÁO GIÁ 1.5.8 - Header theo đúng mẫu PDF Minh Khang */
.mkbg-head{
  display:flex;
  align-items:center;
  min-height:118px;
  padding:8px 12px 10px;
  border-bottom:3px double #222;
}
.mkbg-logo{
  width:190px;
  height:105px;
  flex:0 0 190px;
  display:flex;
  align-items:center;
  justify-content:center;
}
.mkbg-logo img{
  display:block;
  width:auto;
  height:auto;
  max-width:185px;
  max-height:100px;
  object-fit:contain;
}
.mkbg-company{
  flex:1;
  min-width:0;
  text-align:center;
  color:#173b67;
  line-height:1.15;
  overflow:visible;
}
.mkbg-company-name{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  font-family:"Times New Roman",serif;
  font-weight:700;
  font-size:24px;
  line-height:1.12;
  color:#173b67;
  text-transform:uppercase;
  white-space:normal;
  word-break:normal;
  overflow-wrap:normal;
}
.mkbg-company-main{
  display:block;
  white-space:nowrap;
}
.mkbg-brand-name{
  display:block;
  white-space:nowrap;
  color:#173b67;
  font-weight:700;
}
.mkbg-brand-minh{color:#173b67!important}
.mkbg-brand-khang{color:#e32922!important}
.mkbg-company-sub{
  font-family:"Times New Roman",serif;
  font-weight:700;
  font-size:17px;
  line-height:1.2;
  color:#173b67;
  white-space:nowrap;
}
.mkbg-company-slogan{
  font-family:"Times New Roman",serif;
  font-style:italic;
  font-size:16px;
  line-height:1.2;
  color:#173b67;
  white-space:nowrap;
}
.mkbg-company > div:not(.mkbg-company-name):not(.mkbg-company-sub):not(.mkbg-company-slogan):not(.mkbg-hotline){
  color:#173b67;
  font-size:14px;
  line-height:1.2;
}
.mkbg-hotline{
  font-family:"Times New Roman",serif;
  font-weight:700;
  font-size:17px;
  line-height:1.2;
  color:#1768d2;
  white-space:nowrap;
}
@media(max-width:800px){
  .mkbg-head{min-height:0; padding:8px 5px 9px;}
  .mkbg-logo{width:135px;height:85px;flex-basis:135px;}
  .mkbg-logo img{max-width:130px;max-height:80px;}
  .mkbg-company-name{font-size:18px;}
  .mkbg-company-sub{font-size:13px;white-space:normal;}
  .mkbg-company-slogan{font-size:12px;white-space:normal;}
  .mkbg-company > div:not(.mkbg-company-name):not(.mkbg-company-sub):not(.mkbg-company-slogan):not(.mkbg-hotline){font-size:11px;}
  .mkbg-hotline{font-size:13px;white-space:normal;}
}
@media(max-width:520px){
  .mkbg-head{display:block;text-align:center;}
  .mkbg-logo{width:100%;height:70px;}
  .mkbg-logo img{max-width:125px;max-height:68px;}
  .mkbg-company-name{font-size:16px;}
  .mkbg-company-main,.mkbg-brand-name{white-space:nowrap;}
  .mkbg-company-sub{font-size:12px;}
  .mkbg-company-slogan{font-size:11px;}
  .mkbg-hotline{font-size:12px;}
}
@media print{
  .mkbg-head{
    min-height:92px;
    padding:2px 0 6px;
    border-bottom:3px double #222;
  }
  .mkbg-logo{width:120px;height:75px;flex-basis:120px;}
  .mkbg-logo img{max-width:115px;max-height:72px;}
  .mkbg-company-name{font-size:16px;line-height:1.05;}
  .mkbg-company-main,.mkbg-brand-name{white-space:nowrap;}
  .mkbg-company-sub{font-size:11px;}
  .mkbg-company-slogan{font-size:10px;}
  .mkbg-company > div:not(.mkbg-company-name):not(.mkbg-company-sub):not(.mkbg-company-slogan):not(.mkbg-hotline){font-size:9px;}
  .mkbg-hotline{font-size:11px;}
}

/* MK BÁO GIÁ 1.5.9 - Tùy chỉnh logo/tiêu đề */
.mkbg-reference-form .mkbg-head{min-height:var(--mkbg-logo-height,90px)}
.mkbg-reference-form .mkbg-logo{width:var(--mkbg-logo-width,155px);height:var(--mkbg-logo-height,90px);flex-basis:var(--mkbg-logo-width,155px);transform:translateX(var(--mkbg-logo-offset,0px))}
.mkbg-reference-form .mkbg-logo img{max-width:calc(var(--mkbg-logo-width,155px) - 8px);max-height:calc(var(--mkbg-logo-height,90px) - 8px)}
.mkbg-reference-form .mkbg-title{text-align:var(--mkbg-title-align,center);font-size:var(--mkbg-title-size,19px);color:var(--mkbg-title-color,#222)}
@media print{.mkbg-reference-form .mkbg-head{min-height:var(--mkbg-logo-height,90px)!important}.mkbg-reference-form .mkbg-logo{width:var(--mkbg-logo-width,155px)!important;height:var(--mkbg-logo-height,90px)!important;flex-basis:var(--mkbg-logo-width,155px)!important;transform:translateX(var(--mkbg-logo-offset,0px))!important}.mkbg-reference-form .mkbg-logo img{max-width:calc(var(--mkbg-logo-width,155px) - 8px)!important;max-height:calc(var(--mkbg-logo-height,90px) - 8px)!important}.mkbg-reference-form .mkbg-title{text-align:var(--mkbg-title-align,center)!important;font-size:var(--mkbg-title-size,19px)!important;color:var(--mkbg-title-color,#222)!important}}

/* MK BÁO GIÁ 1.5.12 — Căn logo và khối thông tin công ty */
.mkbg-paper.mkbg-reference-form .mkbg-logo{
  justify-content:var(--mkbg-logo-align,left)!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-company{
  text-align:var(--mkbg-company-align,center)!important;
}
@media print{
  .mkbg-paper.mkbg-reference-form .mkbg-logo{justify-content:var(--mkbg-logo-align,left)!important}
  .mkbg-paper.mkbg-reference-form .mkbg-company{text-align:var(--mkbg-company-align,center)!important}
}

/* MK Báo Giá 1.5.14 */
.mkbg-primary-action{background:#173b67!important;color:#fff!important;border:0!important;border-radius:4px!important;padding:9px 14px!important;font-weight:700!important;cursor:pointer!important}
.mkbg-primary-action:hover{opacity:.9}

/* MK Báo Giá 1.5.15 - logo uploader */
#mkbg-logo-preview{max-width:180px;max-height:100px;width:auto;height:auto;object-fit:contain;border:1px solid #ddd;padding:4px;background:#fff}
#mkbg-logo-upload,#mkbg-select-logo,#mkbg-change-logo,#mkbg-logo-remove,#mkbg-delete-logo{cursor:pointer}

/* MK Báo Giá 1.5.17 - stability */
.mkbg-primary-action:disabled{opacity:.65!important;cursor:wait!important}


/* MK Báo Giá 1.5.18 - Đầu trang theo mẫu chuẩn */
.mkbg-paper.mkbg-reference-form .mkbg-head{
  display:flex!important;
  align-items:center!important;
  border-bottom:3px double #222!important;
  min-height:110px!important;
  box-sizing:border-box!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-company-name{
  color:#173b67!important;
  font-family:"Times New Roman",serif!important;
  font-weight:700!important;
  text-transform:uppercase!important;
  line-height:1.08!important;
  white-space:normal!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-company-main,
.mkbg-paper.mkbg-reference-form .mkbg-brand-name{
  display:block!important;
  white-space:nowrap!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-brand-name{
  color:#e32922!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-title{
  text-align:center!important;
  color:#222!important;
  font-family:"Times New Roman",serif!important;
  font-weight:700!important;
  text-decoration:underline!important;
  text-transform:uppercase!important;
  letter-spacing:0!important;
}

/* MK BÁO GIÁ 1.5.20 — KHUNG VIỀN/LỀ/CỘT THEO MẪU PDF */
.mkbg-paper.mkbg-reference-form{
  box-sizing:border-box!important;
  background:#fff!important;
  font-family:"Times New Roman",serif!important;
  color:#111!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-head{
  border-bottom:3px double #222!important;
  padding:0 0 7px!important;
  margin:0!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-logo{
  flex:0 0 170px!important;
  width:170px!important;
  height:100px!important;
  justify-content:flex-start!important;
  align-items:center!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-logo img{
  max-width:165px!important;
  max-height:94px!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-company{
  text-align:center!important;
  line-height:1.16!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-company-name{
  font-size:21px!important;
  line-height:1.08!important;
  white-space:normal!important;
  color:#173b67!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-company-main,
.mkbg-paper.mkbg-reference-form .mkbg-brand-name{
  display:block!important;
  white-space:nowrap!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-brand-name{color:#173b67!important}
.mkbg-paper.mkbg-reference-form .mkbg-brand-minh{color:#173b67!important}
.mkbg-paper.mkbg-reference-form .mkbg-brand-khang{color:#e32922!important}
.mkbg-paper.mkbg-reference-form .mkbg-company-sub{font-size:15px!important}
.mkbg-paper.mkbg-reference-form .mkbg-company-slogan{font-size:14px!important}
.mkbg-paper.mkbg-reference-form .mkbg-hotline{font-size:15px!important;color:#1765c0!important}

.mkbg-paper.mkbg-reference-form .mkbg-title-edit{
  margin:0!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-title{
  margin:9px 0 8px!important;
  font-size:18px!important;
  color:#222!important;
  text-decoration:underline!important;
  font-weight:700!important;
  line-height:1.15!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-title:after{display:none!important}

.mkbg-paper.mkbg-reference-form .mkbg-meta{
  grid-template-columns:1fr 1fr!important;
  border:1px solid #222!important;
  border-radius:0!important;
  margin:0 0 8px!important;
  overflow:hidden!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-meta>div{
  padding:3px 6px!important;
  line-height:17px!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-meta>div+div{
  border-left:1px solid #222!important;
  border-top:0!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-meta b{
  min-width:92px!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-meta input,
.mkbg-paper.mkbg-reference-form .mkbg-meta select{
  border:0!important;
  border-bottom:1px dotted #777!important;
  border-radius:0!important;
  padding:0 2px!important;
  min-width:150px!important;
  background:#fff!important;
}

.mkbg-paper.mkbg-reference-form .mkbg-note{
  margin:5px 2px 7px!important;
  font-size:11px!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items{
  width:100%!important;
  border-collapse:collapse!important;
  table-layout:fixed!important;
  border:1px solid #222!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items th,
.mkbg-paper.mkbg-reference-form #mkbg-items td{
  border:1px solid #222!important;
  padding:3px 4px!important;
  font-size:10px!important;
  line-height:1.12!important;
  vertical-align:middle!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items th{
  background:#173b67!important;
  color:#fff!important;
  text-align:center!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(1){width:6%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(2){width:34%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(3){width:11%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(4){width:6%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(5){width:6%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(6){width:10%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(7){width:10%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(8){width:9%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(9){width:9%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(10){width:24px!important}
.mkbg-paper.mkbg-reference-form #mkbg-items td:nth-child(n+3){
  text-align:center!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items td:nth-child(2){
  text-align:left!important;
  white-space:pre-line!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-subtotal td{
  background:#b7d2e5!important;
  font-weight:700!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-summary td{
  background:#f2f2f2!important;
  font-weight:700!important;
  padding:3px 6px!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-total td{
  background:#dceaf3!important;
  font-weight:700!important;
  padding:3px 6px!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-total strong{color:#222!important}
.mkbg-paper.mkbg-reference-form .mkbg-words-line{
  font-size:10px!important;
  margin:5px 1px!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-signature{
  width:42%!important;
  margin:14px 0 0 auto!important;
  min-height:62px!important;
  text-align:center!important;
  font-size:10px!important;
}
.mkbg-paper.mkbg-reference-form footer{
  display:none!important;
}

@media print{
  @page{size:A4 portrait!important;margin:4mm 4mm 3mm 4mm!important}
  html,body{margin:0!important;padding:0!important;background:#fff!important}
  .mkbg-app{padding:0!important;background:#fff!important}
  .mkbg-paper.mkbg-reference-form{
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    padding:0!important;
    box-shadow:none!important;
  }
  .mkbg-paper.mkbg-reference-form .mkbg-title-edit{
    display:none!important;
  }
  .mkbg-paper.mkbg-reference-form .mkbg-head{
    min-height:92px!important;
    height:92px!important;
    padding:0 0 6px!important;
  }
  .mkbg-paper.mkbg-reference-form .mkbg-logo{
    flex-basis:145px!important;
    width:145px!important;
    height:88px!important;
  }
  .mkbg-paper.mkbg-reference-form .mkbg-logo img{
    max-width:140px!important;
    max-height:84px!important;
  }
  .mkbg-paper.mkbg-reference-form .mkbg-company-name{
    font-size:17px!important;
    line-height:1.05!important;
    white-space:normal!important;
  }
  .mkbg-paper.mkbg-reference-form .mkbg-company-sub{font-size:11px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-company-slogan{font-size:10px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-company > div:not(.mkbg-company-name):not(.mkbg-company-sub):not(.mkbg-company-slogan):not(.mkbg-hotline){font-size:9px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-hotline{font-size:11px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-title{
    font-size:14px!important;
    margin:6px 0 6px!important;
  }
  .mkbg-paper.mkbg-reference-form .mkbg-meta{
    margin-bottom:6px!important;
  }
  .mkbg-paper.mkbg-reference-form .mkbg-meta>div{
    padding:2px 5px!important;
    line-height:13px!important;
    font-size:9px!important;
  }
  .mkbg-paper.mkbg-reference-form .mkbg-meta b{min-width:72px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-meta input,
  .mkbg-paper.mkbg-reference-form .mkbg-meta select{font-size:9px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-note{
    font-size:8.5px!important;
    margin:3px 1px 4px!important;
  }
  .mkbg-paper.mkbg-reference-form #mkbg-items th,
  .mkbg-paper.mkbg-reference-form #mkbg-items td{
    font-size:8px!important;
    padding:2px 3px!important;
    line-height:1.12!important;
  }
  .mkbg-paper.mkbg-reference-form .mkbg-words-line{font-size:8.5px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-signature{font-size:8.5px!important;margin-top:10px!important}
}


/* MK Báo Giá 1.5.21 - Căn lề ô/cột theo mẫu báo giá chuẩn
   - Tính cả cột thao tác để tổng chiều rộng luôn = 100%
   - Tên sản phẩm căn trái
   - Mã hàng/ĐVT/Số lượng căn giữa
   - Các cột đơn giá/thành tiền căn phải như mẫu
   - Viền và khoảng đệm ô đồng đều
*/
.mkbg-paper table#mkbg-items{
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
}
.mkbg-paper table#mkbg-items th,
.mkbg-paper table#mkbg-items td{
  border:1px solid #222;
  box-sizing:border-box;
  vertical-align:middle;
  padding:4px 5px;
}
.mkbg-paper table#mkbg-items th{
  text-align:center !important;
  vertical-align:middle;
}
.mkbg-paper table#mkbg-items th:nth-child(1){width:4.5%}
.mkbg-paper table#mkbg-items th:nth-child(2){width:34.5%}
.mkbg-paper table#mkbg-items th:nth-child(3){width:11%}
.mkbg-paper table#mkbg-items th:nth-child(4){width:6.5%}
.mkbg-paper table#mkbg-items th:nth-child(5){width:5.5%}
.mkbg-paper table#mkbg-items th:nth-child(6),
.mkbg-paper table#mkbg-items th:nth-child(7),
.mkbg-paper table#mkbg-items th:nth-child(8),
.mkbg-paper table#mkbg-items th:nth-child(9){width:8.875%}
.mkbg-paper table#mkbg-items th:nth-child(10){width:2.5%}

.mkbg-paper table#mkbg-items td:nth-child(1),
.mkbg-paper table#mkbg-items td:nth-child(3),
.mkbg-paper table#mkbg-items td:nth-child(4),
.mkbg-paper table#mkbg-items td:nth-child(5){
  text-align:center;
}
.mkbg-paper table#mkbg-items td:nth-child(2){
  text-align:left;
  white-space:pre-line;
  overflow-wrap:break-word;
  word-break:normal;
}
.mkbg-paper table#mkbg-items td:nth-child(6),
.mkbg-paper table#mkbg-items td:nth-child(7),
.mkbg-paper table#mkbg-items td:nth-child(8),
.mkbg-paper table#mkbg-items td:nth-child(9){
  text-align:right;
  white-space:nowrap;
}
.mkbg-paper table#mkbg-items td:nth-child(10){
  text-align:center;
  padding-left:2px;
  padding-right:2px;
}
.mkbg-paper table#mkbg-items .mkbg-row-input{
  display:block;
  width:100%;
  margin:0 auto;
  box-sizing:border-box;
}
.mkbg-paper table#mkbg-items .mkbg-row-select{
  display:block;
  width:100%;
  box-sizing:border-box;
}
.mkbg-paper table#mkbg-items tfoot td{
  padding:4px 6px;
}
.mkbg-paper table#mkbg-items .mkbg-summary td,
.mkbg-paper table#mkbg-items .mkbg-total td{
  text-align:right !important;
}
.mkbg-paper table#mkbg-items .mkbg-summary span,
.mkbg-paper table#mkbg-items .mkbg-total span{
  text-align:right;
}
.mkbg-paper table#mkbg-items .mkbg-summary strong,
.mkbg-paper table#mkbg-items .mkbg-total strong{
  text-align:right;
}

/* Bản in/PDF: bỏ cột thao tác và chia lại đúng 9 cột của mẫu */
@media print{
  .mkbg-paper table#mkbg-items th:nth-child(10),
  .mkbg-paper table#mkbg-items td:nth-child(10){
    display:none !important;
  }
  .mkbg-paper table#mkbg-items th:nth-child(1){width:6.5% !important}
  .mkbg-paper table#mkbg-items th:nth-child(2){width:35% !important}
  .mkbg-paper table#mkbg-items th:nth-child(3){width:11% !important}
  .mkbg-paper table#mkbg-items th:nth-child(4){width:6.5% !important}
  .mkbg-paper table#mkbg-items th:nth-child(5){width:6% !important}
  .mkbg-paper table#mkbg-items th:nth-child(6),
  .mkbg-paper table#mkbg-items th:nth-child(7),
  .mkbg-paper table#mkbg-items th:nth-child(8),
  .mkbg-paper table#mkbg-items th:nth-child(9){width:8.75% !important}
  .mkbg-paper table#mkbg-items td:nth-child(6),
  .mkbg-paper table#mkbg-items td:nth-child(7),
  .mkbg-paper table#mkbg-items td:nth-child(8),
  .mkbg-paper table#mkbg-items td:nth-child(9){
    text-align:right !important;
  }
  .mkbg-paper table#mkbg-items td:nth-child(2){
    text-align:left !important;
  }
}


/* MK Báo Giá 1.5.22 - FIX CANH Ô THEO MẪU PDF */
.mkbg-paper table#mkbg-items{
  width:100% !important;
  table-layout:fixed !important;
  border-collapse:collapse !important;
}
.mkbg-paper table#mkbg-items th,
.mkbg-paper table#mkbg-items td{
  box-sizing:border-box !important;
  border:1px solid #222 !important;
  vertical-align:middle !important;
  padding:3px 5px !important;
  line-height:1.15 !important;
}
.mkbg-paper table#mkbg-items th{
  text-align:center !important;
}
.mkbg-paper table#mkbg-items td:nth-child(1),
.mkbg-paper table#mkbg-items td:nth-child(3),
.mkbg-paper table#mkbg-items td:nth-child(4),
.mkbg-paper table#mkbg-items td:nth-child(5){
  text-align:center !important;
}
.mkbg-paper table#mkbg-items td:nth-child(2){
  text-align:left !important;
  white-space:pre-line !important;
  overflow-wrap:anywhere !important;
}
.mkbg-paper table#mkbg-items td:nth-child(6),
.mkbg-paper table#mkbg-items td:nth-child(7),
.mkbg-paper table#mkbg-items td:nth-child(8),
.mkbg-paper table#mkbg-items td:nth-child(9){
  text-align:right !important;
  white-space:nowrap !important;
}
.mkbg-paper table#mkbg-items td:nth-child(10),
.mkbg-paper table#mkbg-items th:nth-child(10){
  display:none !important;
}

/* 9-column widths after removing Thao tác */
.mkbg-paper table#mkbg-items th:nth-child(1){width:6.5% !important}
.mkbg-paper table#mkbg-items th:nth-child(2){width:34.5% !important}
.mkbg-paper table#mkbg-items th:nth-child(3){width:11% !important}
.mkbg-paper table#mkbg-items th:nth-child(4){width:6.5% !important}
.mkbg-paper table#mkbg-items th:nth-child(5){width:6% !important}
.mkbg-paper table#mkbg-items th:nth-child(6){width:8.75% !important}
.mkbg-paper table#mkbg-items th:nth-child(7){width:8.75% !important}
.mkbg-paper table#mkbg-items th:nth-child(8){width:8.75% !important}
.mkbg-paper table#mkbg-items th:nth-child(9){width:8.75% !important}

.mkbg-paper table#mkbg-items .mkbg-row-input,
.mkbg-paper table#mkbg-items .mkbg-row-select{
  width:100% !important;
  max-width:100% !important;
  box-sizing:border-box !important;
  margin:0 !important;
}

@media print{
  @page{
    size:A4 portrait;
    margin:0.5mm !important;
  }
  .mkbg-paper{
    width:100% !important;
    max-width:none !important;
    margin:0 !important;
  }
  .mkbg-paper table#mkbg-items{
    width:100% !important;
    table-layout:fixed !important;
  }
  .mkbg-paper table#mkbg-items th:nth-child(1){width:6.5% !important}
  .mkbg-paper table#mkbg-items th:nth-child(2){width:34.5% !important}
  .mkbg-paper table#mkbg-items th:nth-child(3){width:11% !important}
  .mkbg-paper table#mkbg-items th:nth-child(4){width:6.5% !important}
  .mkbg-paper table#mkbg-items th:nth-child(5){width:6% !important}
  .mkbg-paper table#mkbg-items th:nth-child(6){width:8.75% !important}
  .mkbg-paper table#mkbg-items th:nth-child(7){width:8.75% !important}
  .mkbg-paper table#mkbg-items th:nth-child(8){width:8.75% !important}
  .mkbg-paper table#mkbg-items th:nth-child(9){width:8.75% !important}
  .mkbg-paper table#mkbg-items th:nth-child(10),
  .mkbg-paper table#mkbg-items td:nth-child(10){
    display:none !important;
  }
}
/* 1.5.23 - danh sách báo giá đã lưu */
.mkbg-saved-box{max-width:900px!important;width:94%;max-height:86vh;overflow:auto}
.mkbg-saved-row{display:flex;justify-content:space-between;gap:18px;align-items:center;border:1px solid #d8dee8;border-radius:8px;padding:12px 14px;margin:8px 0;background:#fff}
.mkbg-saved-row b{color:#173b67}.mkbg-saved-row small{color:#667085}.mkbg-saved-actions{display:flex;gap:8px;flex-shrink:0}.mkbg-saved-actions button{border:1px solid #173b67;background:#173b67;color:#fff;border-radius:5px;padding:7px 11px;cursor:pointer}.mkbg-saved-actions .mkbg-load-saved{background:#fff;color:#173b67}
#mkbg-saved-btn{font-weight:600}
@media(max-width:700px){.mkbg-saved-row{display:block}.mkbg-saved-actions{margin-top:10px;flex-wrap:wrap}.mkbg-saved-actions button{flex:1}.mkbg-actions{flex-wrap:wrap}}

/* MK Báo Giá 1.5.30 - Trang đăng nhập báo giá */
.mkbg-login-shell{
  min-height:calc(100vh - 40px);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:32px 16px;
  box-sizing:border-box;
  background:linear-gradient(135deg,#f5f8fc 0%,#eef3f9 100%);
}
.mkbg-login-box{
  width:min(430px,100%);
  max-width:none;
  margin:0;
  padding:34px 34px 24px;
  box-sizing:border-box;
  border:1px solid #dce4ee;
  border-radius:16px;
  background:#fff;
  box-shadow:0 18px 55px rgba(8,45,99,.14);
  text-align:center;
}
.mkbg-login-brand{height:82px;display:flex;align-items:center;justify-content:center;margin-bottom:5px}
.mkbg-login-brand img{max-width:170px;max-height:78px;width:auto;height:auto;object-fit:contain}
.mkbg-login-company{font-size:18px;font-weight:800;letter-spacing:1.5px;color:#082d63}
.mkbg-login-title{margin-top:7px;font-size:22px;font-weight:800;color:#d02b25;letter-spacing:.3px}
.mkbg-login-desc{font-size:13px;line-height:1.55;color:#697586;margin:10px 0 22px}
.mkbg-login-form{text-align:left}
.mkbg-login-form form{margin:0}
.mkbg-login-form p{margin:0 0 14px}
.mkbg-login-form label{display:block;font-size:13px;font-weight:700;color:#243447;margin:0 0 6px}
.mkbg-login-form input[type=text],
.mkbg-login-form input[type=password]{
  width:100%;height:44px;padding:0 12px;border:1px solid #cbd5e1;border-radius:7px;
  background:#fff;box-sizing:border-box;font-size:14px;outline:none;
}
.mkbg-login-form input[type=text]:focus,.mkbg-login-form input[type=password]:focus{
  border-color:#173b67;box-shadow:0 0 0 3px rgba(23,59,103,.10)
}
.mkbg-login-form .login-remember{display:flex;align-items:center;gap:7px;margin:2px 0 16px!important}
.mkbg-login-form .login-remember label{display:inline;margin:0;font-weight:500;color:#667085}
.mkbg-login-form .login-remember input{margin:0}
.mkbg-login-form input[type=submit],.mkbg-login-submit{
  display:block;width:100%;height:44px;line-height:44px;padding:0;border:0;border-radius:7px;
  background:#173b67;color:#fff!important;font-size:14px;font-weight:700;text-align:center;text-decoration:none;
  box-sizing:border-box;cursor:pointer;transition:.15s ease;
}
.mkbg-login-form input[type=submit]:hover,.mkbg-login-submit:hover{background:#082d63;transform:translateY(-1px)}
.mkbg-login-links{margin-top:16px;font-size:13px}
.mkbg-login-links a{color:#173b67;text-decoration:none}
.mkbg-login-links a:hover{text-decoration:underline}
.mkbg-login-footer{border-top:1px solid #edf0f4;margin-top:22px;padding-top:14px;font-size:11px;color:#98a2b3}
.mkbg-login-success .mkbg-login-icon{
  width:42px;height:42px;line-height:42px;margin:8px auto 8px;border-radius:50%;
  background:#eaf7ee;color:#218838;font-weight:800;font-size:20px
}
.mkbg-login-success h2{margin:0 0 7px;color:#082d63}
.mkbg-login-success p{color:#667085;font-size:13px;margin:0 0 18px}
.mkbg-login-success .mkbg-login-logout{display:inline-block;margin-top:12px;color:#697586;font-size:13px;text-decoration:none}
@media(max-width:480px){
 .mkbg-login-shell{padding:18px 10px;min-height:calc(100vh - 20px)}
 .mkbg-login-box{padding:26px 20px 20px;border-radius:12px}
 .mkbg-login-brand{height:72px}.mkbg-login-brand img{max-width:150px;max-height:68px}
 .mkbg-login-title{font-size:19px}.mkbg-login-company{font-size:16px}
}


/* MK Báo Giá 1.5.31 - FIX logo phóng lớn + nút đăng nhập rõ */
.mkbg-login-shell .mkbg-login-brand{
  width:100% !important; height:100px !important; overflow:hidden !important;
  display:flex !important; align-items:center !important; justify-content:center !important;
  margin:0 0 8px !important;
}
.mkbg-login-shell .mkbg-login-brand img{
  display:block !important; width:auto !important; height:auto !important;
  max-width:190px !important; max-height:92px !important;
  min-width:0 !important; object-fit:contain !important; margin:0 auto !important;
}
.mkbg-login-slogan{
  margin:8px auto 16px !important; max-width:380px !important;
  font-size:14px !important; line-height:1.55 !important; font-weight:700 !important;
  color:#173b67 !important; text-align:center !important;
}
.mkbg-login-form input[type=submit],
.mkbg-login-submit{
  width:100% !important; min-height:56px !important; height:56px !important;
  line-height:56px !important; padding:0 20px !important;
  border-radius:9px !important; font-size:17px !important;
  font-weight:800 !important; letter-spacing:.2px !important;
  box-shadow:0 8px 18px rgba(23,59,103,.18) !important;
}
.mkbg-login-success .mkbg-login-icon{margin:12px auto 8px !important}
.mkbg-login-success h2{font-size:23px !important}
@media(max-width:480px){
  .mkbg-login-shell .mkbg-login-brand{height:88px !important}
  .mkbg-login-shell .mkbg-login-brand img{max-width:165px !important;max-height:82px !important}
  .mkbg-login-slogan{font-size:13px !important}
  .mkbg-login-form input[type=submit],.mkbg-login-submit{min-height:54px !important;height:54px !important;line-height:54px !important;font-size:16px !important}
}

/* MK Báo Giá 1.5.32 - Responsive login desktop/tablet/mobile */
.mkbg-login-shell,
.mkbg-login-shell *{box-sizing:border-box}
.mkbg-login-shell{
  width:100%;
  min-height:calc(100svh - 40px);
  padding:clamp(24px,5vh,56px) 20px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.mkbg-login-box{
  width:min(100%,500px) !important;
  padding:38px 38px 28px !important;
  margin:0 auto !important;
}
.mkbg-login-brand{
  width:100% !important;
  height:clamp(92px,12vw,125px) !important;
  margin:0 0 10px !important;
}
.mkbg-login-brand img{
  width:auto !important;
  height:auto !important;
  max-width:min(220px,70vw) !important;
  max-height:115px !important;
  min-width:0 !important;
  object-fit:contain !important;
}
.mkbg-login-company{font-size:clamp(17px,2vw,21px) !important}
.mkbg-login-title{font-size:clamp(21px,2.7vw,28px) !important;margin-top:9px !important}
.mkbg-login-slogan{
  max-width:430px !important;
  margin:10px auto 18px !important;
  font-size:clamp(13px,1.5vw,15px) !important;
  line-height:1.55 !important;
}
.mkbg-login-desc{font-size:14px !important;margin-bottom:24px !important}
.mkbg-login-form input[type=text],
.mkbg-login-form input[type=password]{
  height:50px !important;
  font-size:16px !important;
  border-radius:9px !important;
}
.mkbg-login-form label{font-size:14px !important}
.mkbg-login-form input[type=submit],
.mkbg-login-submit{
  height:58px !important;
  min-height:58px !important;
  line-height:58px !important;
  font-size:17px !important;
  border-radius:10px !important;
}
.mkbg-login-links{font-size:14px !important}

/* Tablet */
@media (max-width: 900px){
  .mkbg-login-shell{padding:32px 16px}
  .mkbg-login-box{width:min(100%,470px) !important;padding:32px 30px 25px !important}
}

/* Phone */
@media (max-width: 600px){
  .mkbg-login-shell{
    min-height:calc(100svh - 20px);
    padding:18px 12px !important;
    align-items:center;
  }
  .mkbg-login-box{
    width:100% !important;
    max-width:440px !important;
    padding:25px 18px 20px !important;
    border-radius:14px !important;
  }
  .mkbg-login-brand{height:78px !important;margin-bottom:5px !important}
  .mkbg-login-brand img{max-width:155px !important;max-height:74px !important}
  .mkbg-login-company{font-size:16px !important;letter-spacing:1px !important}
  .mkbg-login-title{font-size:20px !important;margin-top:6px !important}
  .mkbg-login-slogan{font-size:13px !important;margin:8px auto 14px !important}
  .mkbg-login-desc{font-size:12.5px !important;line-height:1.5 !important;margin:8px 0 19px !important}
  .mkbg-login-form p{margin-bottom:12px !important}
  .mkbg-login-form input[type=text],
  .mkbg-login-form input[type=password]{height:48px !important;font-size:16px !important}
  .mkbg-login-form input[type=submit],
  .mkbg-login-submit{
    height:54px !important;
    min-height:54px !important;
    line-height:54px !important;
    font-size:16px !important;
  }
  .mkbg-login-footer{margin-top:17px !important;padding-top:11px !important;font-size:10px !important}
}

/* Small phones: prevent horizontal overflow */
@media (max-width: 380px){
  .mkbg-login-shell{padding:10px 8px !important}
  .mkbg-login-box{padding:20px 15px 16px !important}
  .mkbg-login-brand{height:68px !important}
  .mkbg-login-brand img{max-width:135px !important;max-height:64px !important}
  .mkbg-login-title{font-size:18px !important}
  .mkbg-login-slogan{font-size:12px !important}
  .mkbg-login-desc{font-size:12px !important}
}

/* MK Báo Giá 1.5.33 - Layout báo giá A4 chuẩn, kẻ ô thẳng và cân đối */
.mkbg-paper.mkbg-reference-form{
  box-sizing:border-box!important;
  width:min(210mm,100%)!important;
  max-width:210mm!important;
  margin:18px auto!important;
  padding:9mm 8mm 10mm!important;
  background:#fff!important;
  border:1px solid #9aa4b2!important;
  box-shadow:0 3px 14px rgba(16,24,40,.14)!important;
  color:#111!important;
  font-family:Arial,Helvetica,sans-serif!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-head{
  box-sizing:border-box!important;
  min-height:32mm!important;
  height:auto!important;
  padding:0 0 3mm!important;
  border-bottom:1.4px solid #1d3557!important;
  display:grid!important;
  grid-template-columns:34mm 1fr!important;
  gap:4mm!important;
  align-items:center!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-logo{
  width:34mm!important;height:29mm!important;flex:none!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-logo img{
  display:block!important;width:auto!important;height:auto!important;
  max-width:31mm!important;max-height:27mm!important;object-fit:contain!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-company{text-align:center!important;line-height:1.18!important}
.mkbg-paper.mkbg-reference-form .mkbg-company-name{font-size:17px!important;line-height:1.08!important;font-weight:700!important;color:#123d70!important}
.mkbg-paper.mkbg-reference-form .mkbg-company-sub{font-size:11px!important;font-weight:700!important;margin-top:2px!important}
.mkbg-paper.mkbg-reference-form .mkbg-company-slogan{font-size:9.5px!important;font-style:italic!important;margin-top:2px!important}
.mkbg-paper.mkbg-reference-form .mkbg-hotline{font-size:11px!important;font-weight:700!important;color:#1459a6!important;margin-top:2px!important}
.mkbg-paper.mkbg-reference-form .mkbg-title{
  margin:3mm 0 2.5mm!important;padding:2mm 2mm!important;
  border:1px solid #1f2937!important;
  background:#f5f7fa!important;
  text-align:center!important;text-decoration:underline!important;
  font-size:13px!important;line-height:1.15!important;font-weight:700!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-meta{
  display:grid!important;grid-template-columns:1fr 1fr!important;
  margin:0!important;border:1px solid #1f2937!important;
  border-radius:0!important;overflow:hidden!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-meta>div{padding:2.2mm 2.5mm!important;line-height:1.35!important;min-height:20mm!important;box-sizing:border-box!important}
.mkbg-paper.mkbg-reference-form .mkbg-meta>div+div{border-left:1px solid #1f2937!important}
.mkbg-paper.mkbg-reference-form .mkbg-meta>div>div{min-height:5mm!important;border-bottom:1px dotted #c4c9d1!important;padding:1px 0!important}
.mkbg-paper.mkbg-reference-form .mkbg-meta>div>div:last-child{border-bottom:0!important}
.mkbg-paper.mkbg-reference-form .mkbg-meta b{display:inline-block!important;min-width:24mm!important;font-size:8.5px!important}
.mkbg-paper.mkbg-reference-form .mkbg-meta input,
.mkbg-paper.mkbg-reference-form .mkbg-meta select{font-size:8.5px!important;max-width:calc(100% - 25mm)!important;min-width:0!important;padding:1px 2px!important;border:0!important;border-bottom:0!important;background:#fff!important;box-shadow:none!important;vertical-align:middle!important}
.mkbg-paper.mkbg-reference-form .mkbg-note{margin:2.5mm 0!important;padding:1.5mm 2mm!important;border:1px solid #b9c1cc!important;background:#fafafa!important;font-size:8.5px!important;font-style:italic!important}
.mkbg-paper.mkbg-reference-form #mkbg-items{
  width:100%!important;border-collapse:collapse!important;border-spacing:0!important;
  table-layout:fixed!important;border:1.2px solid #1f2937!important;
  margin:0!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items th,
.mkbg-paper.mkbg-reference-form #mkbg-items td{
  border:1px solid #1f2937!important;box-sizing:border-box!important;
  padding:1.7mm 1.4mm!important;vertical-align:middle!important;
  font-size:8px!important;line-height:1.18!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items th{background:#173b67!important;color:#fff!important;text-align:center!important;font-weight:700!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(1){width:5%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(2){width:31%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(3){width:10%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(4){width:7%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(5){width:7%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(6){width:10%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(7){width:10%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(8){width:10%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(9){width:10%!important}
.mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(10){width:24px!important}
.mkbg-paper.mkbg-reference-form #mkbg-items td:nth-child(1),
.mkbg-paper.mkbg-reference-form #mkbg-items td:nth-child(3),
.mkbg-paper.mkbg-reference-form #mkbg-items td:nth-child(4),
.mkbg-paper.mkbg-reference-form #mkbg-items td:nth-child(5){text-align:center!important}
.mkbg-paper.mkbg-reference-form #mkbg-items td:nth-child(2){text-align:left!important;white-space:pre-line!important;overflow-wrap:anywhere!important}
.mkbg-paper.mkbg-reference-form #mkbg-items td:nth-child(6),
.mkbg-paper.mkbg-reference-form #mkbg-items td:nth-child(7),
.mkbg-paper.mkbg-reference-form #mkbg-items td:nth-child(8),
.mkbg-paper.mkbg-reference-form #mkbg-items td:nth-child(9){text-align:right!important;white-space:nowrap!important}
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-subtotal td{background:#d9e7f3!important;font-weight:700!important}
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-summary td{background:#f5f6f7!important;font-weight:700!important;padding:1.6mm 2mm!important}
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-total td{background:#e3eef7!important;font-weight:700!important;padding:1.8mm 2mm!important;border-top:1.4px solid #1f2937!important}
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-summary span,
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-total span{display:inline-block!important;text-align:left!important;float:left!important}
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-summary strong,
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-total strong{float:right!important;text-align:right!important}
.mkbg-paper.mkbg-reference-form .mkbg-words-line{margin:2.5mm 0!important;padding:1mm 0!important;font-size:8.5px!important;border-bottom:1px dotted #9aa4b2!important}
.mkbg-paper.mkbg-reference-form .mkbg-signature{width:48%!important;min-height:24mm!important;margin:7mm 0 0 auto!important;text-align:center!important;font-size:8.5px!important}
.mkbg-paper.mkbg-reference-form .mkbg-signature span{display:block!important;margin-top:1mm!important;font-style:italic!important}
.mkbg-paper.mkbg-reference-form footer{display:block!important;text-align:center!important;font-size:8px!important;font-style:italic!important;margin-top:5mm!important;color:#555!important}

@media(max-width:700px){
  .mkbg-paper.mkbg-reference-form{width:calc(100% - 16px)!important;max-width:none!important;margin:8px auto!important;padding:14px!important;overflow:hidden!important}
  .mkbg-paper.mkbg-reference-form .mkbg-head{grid-template-columns:74px 1fr!important;gap:10px!important;min-height:100px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-logo{width:74px!important;height:74px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-logo img{max-width:68px!important;max-height:68px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-company-name{font-size:13px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-company-sub{font-size:9px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-company-slogan{font-size:8px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-hotline{font-size:9px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-meta{grid-template-columns:1fr!important}
  .mkbg-paper.mkbg-reference-form .mkbg-meta>div+div{border-left:0!important;border-top:1px solid #1f2937!important}
  .mkbg-paper.mkbg-reference-form #mkbg-items{font-size:7px!important;min-width:760px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-note{font-size:9px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-words-line{font-size:9px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-signature{width:65%!important}
}

@media print{
  @page{size:A4 portrait!important;margin:7mm 6mm 6mm 6mm!important}
  html,body{background:#fff!important;margin:0!important;padding:0!important}
  .mkbg-app{padding:0!important;background:#fff!important}
  .mkbg-paper.mkbg-reference-form{width:100%!important;max-width:none!important;margin:0!important;padding:0!important;border:0!important;box-shadow:none!important}
  .mkbg-paper.mkbg-reference-form .mkbg-title-edit{display:none!important}
  .mkbg-paper.mkbg-reference-form .mkbg-head{min-height:31mm!important;padding-bottom:2.5mm!important}
  .mkbg-paper.mkbg-reference-form .mkbg-logo{width:33mm!important;height:28mm!important}
  .mkbg-paper.mkbg-reference-form .mkbg-logo img{max-width:30mm!important;max-height:27mm!important}
  .mkbg-paper.mkbg-reference-form .mkbg-company-name{font-size:16px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-company-sub{font-size:10px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-company-slogan{font-size:9px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-hotline{font-size:10px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-title{font-size:12px!important;margin:2.5mm 0 2mm!important;padding:1.6mm!important}
  .mkbg-paper.mkbg-reference-form .mkbg-meta>div{padding:1.7mm 2mm!important;min-height:18mm!important}
  .mkbg-paper.mkbg-reference-form .mkbg-meta b{font-size:8px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-meta input,.mkbg-paper.mkbg-reference-form .mkbg-meta select{font-size:8px!important}
  .mkbg-paper.mkbg-reference-form .mkbg-note{font-size:8px!important;margin:2mm 0!important;padding:1.2mm 1.5mm!important}
  .mkbg-paper.mkbg-reference-form #mkbg-items th,.mkbg-paper.mkbg-reference-form #mkbg-items td{font-size:7.6px!important;padding:1.35mm 1.2mm!important}
  .mkbg-paper.mkbg-reference-form .mkbg-words-line{font-size:8px!important;margin:2mm 0!important}
  .mkbg-paper.mkbg-reference-form .mkbg-signature{font-size:8px!important;margin-top:6mm!important;min-height:21mm!important}
  .mkbg-paper.mkbg-reference-form footer{font-size:7.5px!important;margin-top:4mm!important}
  .mkbg-paper.mkbg-reference-form #mkbg-items th:nth-child(10),.mkbg-paper.mkbg-reference-form #mkbg-items td:nth-child(10){display:none!important}
}

/* MK BÁO GIÁ 1.5.34 — Cố định lề in A4: nội dung luôn nằm trong vùng an toàn */
@media print{
  @page{
    size:A4 portrait!important;
    margin:0!important;
  }
  html,body{
    width:210mm!important;
    min-width:210mm!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
  }
  .mkbg-app{
    width:210mm!important;
    min-width:210mm!important;
    margin:0!important;
    padding:0!important;
    background:#fff!important;
  }
  .mkbg-paper.mkbg-reference-form{
    box-sizing:border-box!important;
    width:210mm!important;
    min-height:297mm!important;
    max-width:none!important;
    margin:0!important;
    padding:7mm 7mm 8mm!important;
    border:0!important;
    box-shadow:none!important;
    overflow:visible!important;
  }
  .mkbg-paper.mkbg-reference-form .mkbg-head,
  .mkbg-paper.mkbg-reference-form .mkbg-title,
  .mkbg-paper.mkbg-reference-form .mkbg-meta,
  .mkbg-paper.mkbg-reference-form .mkbg-note,
  .mkbg-paper.mkbg-reference-form #mkbg-items,
  .mkbg-paper.mkbg-reference-form .mkbg-words-line,
  .mkbg-paper.mkbg-reference-form .mkbg-signature,
  .mkbg-paper.mkbg-reference-form footer{
    box-sizing:border-box!important;
  }
  .mkbg-paper.mkbg-reference-form #mkbg-items{
    width:100%!important;
    max-width:100%!important;
    table-layout:fixed!important;
  }
  .mkbg-paper.mkbg-reference-form .mkbg-meta{
    width:100%!important;
  }
  .mkbg-paper.mkbg-reference-form .mkbg-head{
    width:100%!important;
  }
  .mkbg-paper.mkbg-reference-form .mkbg-signature{
    margin-right:0!important;
  }
}


/* MK Báo Giá 1.5.36 — Các ô dữ liệu dòng báo giá đều có thể nhập/chỉnh sửa */
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-edit,
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-row-input,
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-row-select{
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
  border:1px solid #aeb8c5!important;
  background:#fff!important;
  border-radius:2px!important;
  padding:4px 5px!important;
  font-family:"Times New Roman",serif!important;
  font-size:11px!important;
  line-height:1.25!important;
  color:#111!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items textarea.mkbg-edit{
  min-height:42px!important;
  resize:vertical!important;
  white-space:pre-wrap!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items .name-cell{
  vertical-align:top!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-row-select{
  margin-bottom:4px!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-category-input{
  width:100%!important;
  border:0!important;
  outline:0!important;
  background:transparent!important;
  text-align:center!important;
  font-family:"Times New Roman",serif!important;
  font-weight:700!important;
  font-size:11px!important;
  padding:3px 5px!important;
  color:#111!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-delete{
  width:100%!important;
  min-width:62px!important;
  padding:5px 6px!important;
  border:1px solid #b42318!important;
  border-radius:3px!important;
  background:#fff!important;
  color:#b42318!important;
  cursor:pointer!important;
  font-size:10px!important;
  font-weight:700!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-delete:hover{
  background:#b42318!important;color:#fff!important;
}
@media(max-width:800px){
 .mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-edit,
 .mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-row-input,
 .mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-row-select{font-size:12px!important;min-height:34px!important}
}
@media print{
 .mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-edit,
 .mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-row-input,
 .mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-row-select,
 .mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-category-input{
   border:0!important;background:transparent!important;padding:0!important;box-shadow:none!important;outline:0!important;
 }
 .mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-row-select{appearance:none!important;-webkit-appearance:none!important}
 .mkbg-paper.mkbg-reference-form #mkbg-items textarea.mkbg-edit{resize:none!important;overflow:visible!important}
 .mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-delete{display:none!important}
}


/* MK Báo Giá 1.5.37 — FIX ẢNH SẢN PHẨM TRONG DÒNG BÁO GIÁ
 * Ảnh luôn nhỏ, đồng đều và nằm gọn bên trái tên sản phẩm; không làm vỡ chiều cao dòng.
 */
.mkbg-paper.mkbg-reference-form #mkbg-items .name-cell{
  vertical-align:top!important;
  padding:4px 5px!important;
  min-width:0!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items .name-cell:not(.has-image){
  display:block!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items .name-cell.has-image{
  display:grid!important;
  grid-template-columns:58px minmax(0,1fr)!important;
  align-items:start!important;
  column-gap:6px!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items .name-cell .mkbg-preview{
  grid-column:1!important;
  grid-row:1!important;
  display:block!important;
  width:56px!important;
  height:46px!important;
  max-width:56px!important;
  max-height:46px!important;
  min-width:56px!important;
  min-height:46px!important;
  margin:0!important;
  padding:2px!important;
  box-sizing:border-box!important;
  object-fit:contain!important;
  background:#fff!important;
  border:1px solid #e1e5ea!important;
  border-radius:3px!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items .name-cell .mkbg-name-controls{
  grid-column:2!important;
  grid-row:1!important;
  min-width:0!important;
  width:100%!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items .name-cell .mkbg-name-controls .mkbg-row-select,
.mkbg-paper.mkbg-reference-form #mkbg-items .name-cell .mkbg-name-controls .name-edit{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items .name-cell .mkbg-name-controls .mkbg-row-select{
  margin:0 0 4px!important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items .name-cell .mkbg-name-controls .name-edit{
  min-height:42px!important;
  height:42px!important;
}
@media(max-width:800px){
  .mkbg-paper.mkbg-reference-form #mkbg-items .name-cell.has-image{
    grid-template-columns:52px minmax(0,1fr)!important;
    column-gap:6px!important;
  }
  .mkbg-paper.mkbg-reference-form #mkbg-items .name-cell .mkbg-preview{
    width:50px!important;height:42px!important;
    max-width:50px!important;max-height:42px!important;
    min-width:50px!important;min-height:42px!important;
  }
}
@media print{
  /* Ảnh sản phẩm không xuất ra PDF báo giá; chỉ dùng làm ảnh xem trước khi nhập liệu. */
  .mkbg-paper.mkbg-reference-form #mkbg-items .name-cell .mkbg-preview{display:none!important}
  .mkbg-paper.mkbg-reference-form #mkbg-items .name-cell.has-image{display:block!important}
}


/* MK Báo Giá 1.5.38 — FINAL IMAGE SIZE OVERRIDE
 * Must be last in the stylesheet so theme/admin global img rules cannot enlarge product images.
 */
#mkbg-items .name-cell img.mkbg-preview,
.mkbg-paper.mkbg-reference-form #mkbg-items img.mkbg-preview{
  display:block!important;
  width:56px!important;
  height:46px!important;
  max-width:56px!important;
  max-height:46px!important;
  min-width:56px!important;
  min-height:46px!important;
  padding:2px!important;
  margin:0!important;
  box-sizing:border-box!important;
  object-fit:contain!important;
  object-position:center!important;
  background:#fff!important;
  border:1px solid #dfe3e8!important;
  border-radius:3px!important;
}
#mkbg-items .name-cell.has-image{
  display:grid!important;
  grid-template-columns:58px minmax(0,1fr)!important;
  align-items:start!important;
  column-gap:6px!important;
  min-width:0!important;
}
#mkbg-items .name-cell.has-image .mkbg-preview{grid-column:1!important;grid-row:1!important}
#mkbg-items .name-cell.has-image .mkbg-name-controls{grid-column:2!important;grid-row:1!important;min-width:0!important;width:100%!important}
.mkbg-image-field img.mkbg-image-preview,
#mkbg-product-image-preview{
  display:block!important;
  width:90px!important;
  height:70px!important;
  max-width:90px!important;
  max-height:70px!important;
  object-fit:contain!important;
  box-sizing:border-box!important;
}
@media(max-width:800px){
 #mkbg-items .name-cell.has-image{grid-template-columns:52px minmax(0,1fr)!important}
 #mkbg-items .name-cell.has-image img.mkbg-preview{width:50px!important;height:42px!important;max-width:50px!important;max-height:42px!important;min-width:50px!important;min-height:42px!important}
}


/* MK Báo Giá 1.5.42 — PDF: phần ký tên canh phải, chữ đậm rõ */
.mkbg-paper.mkbg-reference-form .mkbg-signature{
  width:48%!important;
  margin-left:auto!important;
  margin-right:0!important;
  text-align:center!important;
  color:#111!important;
  font-weight:700!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-signature b{
  display:block!important;
  text-align:center!important;
  font-weight:700!important;
  color:#111!important;
  line-height:1.15!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-signature span{
  display:block!important;
  text-align:center!important;
  font-weight:700!important;
  color:#111!important;
}
@media print{
  .mkbg-paper.mkbg-reference-form .mkbg-signature{
    width:48%!important;
    margin-left:auto!important;
    margin-right:0!important;
    text-align:right!important;
    font-size:8.5pt!important;
    font-weight:700!important;
  }
  .mkbg-paper.mkbg-reference-form .mkbg-signature b,
  .mkbg-paper.mkbg-reference-form .mkbg-signature span{
    text-align:right!important;
    font-weight:700!important;
  }
}


/* MK Báo Giá 1.5.43 — PDF: khôi phục ảnh sản phẩm và căn ảnh trong cột tên */
@media print{
  .mkbg-paper.mkbg-reference-form #mkbg-items .name-cell.has-image{
    display:grid!important;
    grid-template-columns:19mm minmax(0,1fr)!important;
    align-items:start!important;
    column-gap:2mm!important;
    padding:1.2mm 1.3mm!important;
  }
  .mkbg-paper.mkbg-reference-form #mkbg-items .name-cell.has-image .mkbg-preview{
    display:block!important;
    grid-column:1!important;
    grid-row:1!important;
    width:17mm!important;
    height:13mm!important;
    min-width:17mm!important;
    min-height:13mm!important;
    max-width:17mm!important;
    max-height:13mm!important;
    margin:0!important;
    padding:0.5mm!important;
    object-fit:contain!important;
    object-position:center!important;
    box-sizing:border-box!important;
    background:#fff!important;
    border:0.25mm solid #ddd!important;
  }
  .mkbg-paper.mkbg-reference-form #mkbg-items .name-cell.has-image .mkbg-name-controls{
    grid-column:2!important;
    grid-row:1!important;
    min-width:0!important;
    width:100%!important;
  }
}


/* MK Báo Giá 1.5.48 — khóa bố cục khối đại diện công ty khi xuất PDF */
.mkbg-paper.mkbg-reference-form .mkbg-signature{
  width:42%!important;
  max-width:42%!important;
  margin:7mm 0 0 auto!important;
  padding:0!important;
  text-align:right!important;
  box-sizing:border-box!important;
  font-family:"Times New Roman",serif!important;
  font-size:8.5pt!important;
  line-height:1.15!important;
  font-weight:700!important;
  color:#111!important;
  float:none!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-signature b,
.mkbg-paper.mkbg-reference-form .mkbg-signature span{
  display:block!important;
  width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  text-align:right!important;
  font-weight:700!important;
  color:#111!important;
}
.mkbg-paper.mkbg-reference-form .mkbg-signature span{margin-top:1mm!important;font-style:italic!important}
@media print{
 .mkbg-paper.mkbg-reference-form .mkbg-signature{width:42%!important;max-width:42%!important;margin:7mm 0 0 auto!important;text-align:right!important}
 .mkbg-paper.mkbg-reference-form .mkbg-signature b,.mkbg-paper.mkbg-reference-form .mkbg-signature span{text-align:right!important;font-weight:700!important}
}


/* MK Báo Giá 1.5.54 — Hiển thị nút Xóa dòng trong form chỉnh sửa; cột này tự loại khi xuất PDF/Excel */
.mkbg-paper.mkbg-reference-form #mkbg-items th.mkbg-action-col,
.mkbg-paper.mkbg-reference-form #mkbg-items td.mkbg-action-cell{
  display:table-cell !important;
  width:58px !important;
  min-width:58px !important;
  max-width:58px !important;
  text-align:center !important;
  vertical-align:middle !important;
  padding:3px !important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items th.mkbg-action-col{
  font-size:7px !important;
  white-space:nowrap !important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-delete{
  display:inline-block !important;
  width:52px !important;
  min-width:52px !important;
  box-sizing:border-box !important;
  padding:5px 3px !important;
  border:1px solid #b42318 !important;
  border-radius:3px !important;
  background:#fff !important;
  color:#b42318 !important;
  cursor:pointer !important;
  font-size:9px !important;
  font-weight:700 !important;
  line-height:1.1 !important;
}
.mkbg-paper.mkbg-reference-form #mkbg-items .mkbg-delete:hover{
  background:#b42318 !important; color:#fff !important;
}
@media print{
  .mkbg-paper.mkbg-reference-form #mkbg-items th.mkbg-action-col,
  .mkbg-paper.mkbg-reference-form #mkbg-items td.mkbg-action-cell{display:none !important;}
}

/* MK Báo Giá 1.5.55 - Ghi chú & chế độ bảo hành */
.mkbg-quote-terms{margin:8px 2px 6px;padding:0;display:block}
.mkbg-term-row{display:grid;grid-template-columns:125px 1fr;gap:7px;align-items:start;margin:4px 0}
.mkbg-term-row label{font-size:12px;line-height:1.4}
.mkbg-term-row textarea{width:100%;min-height:34px;resize:vertical;border:1px solid #b9c1cc;border-radius:3px;padding:5px 7px;font:12px/1.35 "Times New Roman",serif;color:#111;background:#fff;box-sizing:border-box}
@media(max-width:700px){.mkbg-term-row{grid-template-columns:1fr;gap:2px}.mkbg-term-row textarea{min-height:42px}}


/* MK Báo Giá 1.5.66-FIXED-v2 — print-only control suppression.
 * Editor controls remain unchanged on screen; only the browser print view hides them.
 */
@media print{
  .mkbg-paper.mkbg-reference-form button,
  .mkbg-paper.mkbg-reference-form .mkbg-action-col,
  .mkbg-paper.mkbg-reference-form .mkbg-action-cell,
  .mkbg-paper.mkbg-reference-form .mkbg-mini-btn,
  .mkbg-paper.mkbg-reference-form .mkbg-row-select{
    display:none!important;
  }
}
