/* 0170. Danh sách sản phẩm báo giá */

/* Khung image-tools góc phải trên của Flatsome bị ẩn tới khi rê chuột → luôn hiện để nút mờ vẫn thấy */
.product-small .image-tools.top.right:has(.kbq-add) { opacity: 1 !important; transform: none !important; visibility: visible !important; }

.kbq-add {
	display: inline-flex; align-items: center; justify-content: center;
	width: 34px; height: 34px; min-height: 0; margin: 0; padding: 0;
	border: 1px solid #d5dbe5; border-radius: 8px;
	background: rgba(255, 255, 255, .92); color: #1f4fd1;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .12);
	opacity: .22; cursor: pointer; line-height: 1;
	transition: opacity .2s, background-color .2s, color .2s, transform .15s;
}
.kbq-add svg { display: block; }
.kbq-add .kbq-ic-ok { display: none; }
.product-small:hover .kbq-add, .kbq-add:focus-visible { opacity: 1; }
.kbq-add:hover { background: #1f4fd1; color: #fff; border-color: #1f4fd1; transform: scale(1.06); }
.kbq-add.is-added { opacity: 1; background: #16a34a; border-color: #16a34a; color: #fff; }
.kbq-add.is-added .kbq-ic-add { display: none; }
.kbq-add.is-added .kbq-ic-ok { display: block; }
.kbq-add.is-added:hover { background: #dc2626; border-color: #dc2626; }
@media (hover: none) { .kbq-add { opacity: .6; } }

/* Nút nổi góc trái dưới */
.kbq-fab {
	position: fixed; left: 18px; bottom: 22px; z-index: 9990;
	display: none; align-items: center; gap: 8px;
	min-height: 0; margin: 0; padding: 10px 14px 10px 12px;
	border: 0; border-radius: 999px; background: #1f4fd1; color: #fff;
	font-size: 14px; font-weight: 600; line-height: 1; text-transform: none; letter-spacing: 0;
	box-shadow: 0 6px 18px rgba(31, 79, 209, .35); cursor: pointer;
}
.kbq-fab.is-show { display: inline-flex; }
.kbq-fab .kbq-count {
	min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px;
	background: #f26b1d; color: #fff; font-size: 12px;
	display: inline-flex; align-items: center; justify-content: center;
}
.kbq-fab.kbq-bump { animation: kbq-bump .45s ease; }
@keyframes kbq-bump { 40% { transform: scale(1.12); } }

/* Khung danh sách */
.kbq-panel {
	position: fixed; left: 18px; bottom: 78px; z-index: 9991;
	width: 360px; max-width: calc(100vw - 32px); max-height: min(70vh, 560px);
	display: none; flex-direction: column;
	background: #fff; border-radius: 12px; overflow: hidden;
	box-shadow: 0 12px 40px rgba(15, 23, 42, .25); border: 1px solid #e5e9f0;
	font-size: 14px; color: #1e293b;
}
.kbq-panel.is-open { display: flex; }
.kbq-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: #f4f7fc; border-bottom: 1px solid #e5e9f0; }
.kbq-head strong { font-size: 15px; }
.kbq-close, .kbq-del {
	min-height: 0; margin: 0; padding: 0; width: 28px; height: 28px; line-height: 26px;
	border: 0; background: transparent; color: #64748b; font-size: 22px; cursor: pointer; border-radius: 6px;
}
.kbq-close:hover, .kbq-del:hover { background: #fee2e2; color: #dc2626; }
.kbq-items { overflow-y: auto; padding: 4px 0; }
.kbq-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f1f4f8; }
.kbq-item:last-child { border-bottom: 0; }
.kbq-item img { width: 46px; height: 46px; object-fit: contain; border: 1px solid #eef1f5; border-radius: 6px; background: #fff; flex-shrink: 0; }
.kbq-info { flex: 1; min-width: 0; }
.kbq-name { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kbq-meta { display: flex; gap: 8px; margin-top: 3px; font-size: 12px; color: #64748b; }
.kbq-meta b { color: #f26b1d; }
.kbq-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-top: 1px solid #e5e9f0; background: #fafbfd; }


.kbq-go { padding: 9px 16px; border-radius: 8px; background: #f26b1d; color: #fff !important; font-weight: 600; font-size: 14px; text-decoration: none; }
.kbq-go:hover { background: #d95a10; }

@media (max-width: 549px) {
	.kbq-fab { left: 12px; bottom: 14px; }
	.kbq-fab .kbq-fab-txt { display: none; }
	.kbq-panel { left: 12px; right: 12px; bottom: 66px; width: auto; }
}

/* Nhãn "Danh mục - SKU": cắt phần danh mục, SKU luôn đủ */
.product-small .kbq-cat { display: flex; min-width: 0; white-space: nowrap; }
.kbq-cat .kbq-cat-name { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.kbq-cat .kbq-cat-sku { flex-shrink: 0; }

/* Khung xem nhanh: nút sang trang */
.kbq-foot .kbq-go { flex: 1; text-align: center; }
.kbq-meta span:last-child { margin-left: auto; color: #334155; font-weight: 600; }

/* Nút ở trang chi tiết SP */
.kbq-single-wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 14px; margin: 4px 0 16px; }
.kbq-add.kbq-add-single {
	width: auto; height: auto; padding: 10px 18px; gap: 8px; opacity: 1;
	border: 1.5px solid #1f4fd1; color: #1f4fd1; background: #fff; box-shadow: none;
	font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0;
}
.kbq-add-single .kbq-t-ok, .kbq-add-single.is-added .kbq-t-add { display: none; }
.kbq-add-single.is-added .kbq-t-ok { display: inline; }
.kbq-add.kbq-add-single:hover { transform: none; }
.kbq-add.kbq-add-single.is-added:hover { background: #dc2626; border-color: #dc2626; color: #fff; }
.kbq-single-link { font-size: 14px; color: #1f4fd1; }

/* ===== Trang Yêu cầu báo giá ===== */
.kbq-page { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; margin: 10px 0 40px; color: #1e293b; }
.kbq-page [hidden] { display: none !important; }
.kbq-search { position: relative; display: flex; gap: 8px; margin-bottom: 14px; }
.kbq-search input { flex: 1; margin: 0; height: 44px; border-radius: 8px; padding: 0 14px; box-shadow: none; }
.kbq-search button { margin: 0; height: 44px; min-height: 0; padding: 0 20px; border-radius: 8px; background: #1f4fd1; color: #fff; border: 0; text-transform: none; font-weight: 600; }
.kbq-search-results {
	position: absolute; top: 50px; left: 0; right: 0; z-index: 50; max-height: 380px; overflow-y: auto;
	background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 12px 30px rgba(15, 23, 42, .18);
}
.kbq-sr { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f1f5f9; cursor: pointer; }
.kbq-sr:hover { background: #f5f8ff; }
.kbq-sr img { width: 44px; height: 44px; object-fit: contain; flex-shrink: 0; }
.kbq-sr-info { flex: 1; min-width: 0; font-size: 14px; line-height: 1.35; }
.kbq-sr-info small { color: #64748b; }
.kbq-sr-add { margin: 0; min-height: 0; padding: 6px 12px; border-radius: 6px; border: 1px solid #1f4fd1; background: #fff; color: #1f4fd1; font-size: 13px; text-transform: none; white-space: nowrap; }
.kbq-sr-add.is-on { border-color: #16a34a; color: #16a34a; }
.kbq-sr-empty { padding: 14px; color: #64748b; font-size: 14px; }

.kbq-empty { padding: 36px 20px; text-align: center; border: 1px dashed #cbd5e1; border-radius: 12px; color: #475569; }
.kbq-empty-ic { display: inline-block; width: 22px; height: 22px; line-height: 22px; border-radius: 5px; background: #1f4fd1; color: #fff; font-size: 13px; }
.kbq-btn-line { display: inline-block; margin-top: 6px; padding: 9px 18px; border: 1.5px solid #1f4fd1; border-radius: 8px; color: #1f4fd1; font-weight: 600; }

.kbq-form { position: sticky; top: 90px; padding: 18px; border: 1px solid #e5e9f0; border-radius: 12px; background: #fff; box-shadow: 0 4px 18px rgba(15, 23, 42, .06); }
.kbq-form h3 { margin: 0 0 12px; font-size: 18px; }
.kbq-form label { display: block; margin-bottom: 10px; font-size: 13px; font-weight: 600; color: #334155; }
.kbq-form label em { color: #dc2626; font-style: normal; }
.kbq-form input, .kbq-form textarea { margin: 4px 0 0; width: 100%; border-radius: 8px; box-shadow: none; font-weight: 400; }
.kbq-form input { height: 40px; }
.kbq-form .is-err { border-color: #dc2626; }
.kbq-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.kbq-form-msg { color: #dc2626; font-size: 13px; min-height: 18px; margin-bottom: 4px; }
.kbq-submit { width: 100%; margin: 0; height: 48px; border: 0; border-radius: 10px; background: #f26b1d; color: #fff; font-size: 16px; font-weight: 700; text-transform: none; }
.kbq-submit:hover { background: #d95a10; }
.kbq-submit:disabled { background: #cbd5e1; cursor: not-allowed; }
.kbq-form-hint { margin: 10px 0 0; font-size: 12px; color: #64748b; }
.kbq-done { grid-column: 1 / -1; text-align: center; padding: 40px 20px; border: 1px solid #e5e9f0; border-radius: 12px; }
.kbq-done-ic { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 50%; background: #dcfce7; color: #16a34a; font-size: 34px; line-height: 64px; }

@media (max-width: 849px) {
	.kbq-page { grid-template-columns: 1fr; }
	.kbq-form { position: static; }
}
.kbq-page-head { grid-column: 1 / -1; }
.kbq-page-head h1 { margin: 0 0 4px; font-size: 26px; color: #1f4fd1; }
.kbq-page-head p { margin: 0; color: #64748b; font-size: 14px; }
.kbq-page-head:has(~ .kbq-done:not([hidden])) p { display: none; }
.kbq-field-err { display: block; margin-top: 4px; color: #dc2626; font-size: 12px; font-weight: 500; }
.kbq-form input.is-err, .kbq-form textarea.is-err { border-color: #dc2626 !important; box-shadow: 0 0 0 1px #dc2626 !important; }

/* Mã số thuế + Tra cứu */
.kbq-opt { font-weight: 400; color: #94a3b8; }
.kbq-tax-row { display: flex; gap: 6px; margin-top: 4px; }
.kbq-form .kbq-tax-row input { margin: 0; flex: 1; min-width: 0; }
.kbq-tax-row button { margin: 0; min-height: 0; height: 40px !important; line-height: 1; box-sizing: border-box; padding: 0 14px; border: 1.5px solid #1f4fd1; border-radius: 8px; background: #fff; color: #1f4fd1; font-weight: 600; font-size: 13px; text-transform: none; white-space: nowrap; }
.kbq-tax-row button:hover { background: #1f4fd1; color: #fff; }
.kbq-tax-row button:disabled { opacity: .6; }
.kbq-tax-msg { display: block; margin-top: 4px; font-size: 12px; font-weight: 500; }
.kbq-tax-msg.is-ok { color: #16a34a; }
.kbq-tax-msg.is-bad { color: #dc2626; }


/* ===== Giỏ báo giá (v2.4) ===== */
.kbq-form input:not([type=hidden]) { height: 40px !important; box-sizing: border-box; }
.kbq-form .kbq-tax-row input { margin: 0 !important; }
.kbq-form .kbq-tax-row { align-items: stretch; }

.kbq-cart { background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(15, 23, 42, .04); }
.kbq-cart-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #eef1f5; }
.kbq-cart-top h2 { margin: 0; font-size: 17px; font-weight: 700; color: #0f172a; }
.kbq-cart-count { color: #64748b; font-weight: 500; }
.kbq-clear-all { margin: 0; min-height: 0; padding: 6px 10px; border: 0; border-radius: 6px; background: transparent; color: #64748b; font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; line-height: 1.4; }
.kbq-clear-all:hover { background: #fef2f2; color: #dc2626; }
.kbq-cart-head, .kbq-line { display: grid; grid-template-columns: 84px minmax(0, 1fr) 104px 128px 112px; column-gap: 16px; }
.kbq-cart-head { padding: 9px 18px; background: #f7f9fc; border-bottom: 1px solid #eef1f5; font-size: 12px; font-weight: 600; color: #64748b; text-transform: uppercase; letter-spacing: .03em; }
.kbq-cart-head span:first-child { grid-column: 1 / 3; }
.kbq-cart-head span:nth-child(n+2) { text-align: center; }
.kbq-cart-head span:last-child { text-align: right; }

.kbq-line { align-items: start; padding: 16px 18px; border-bottom: 1px solid #eef1f5; row-gap: 10px; }
.kbq-line:last-child { border-bottom: 0; }
.kbq-line-img { display: block; width: 84px; height: 84px; border: 1px solid #eef1f5; border-radius: 8px; overflow: hidden; background: #fff; }
.kbq-line-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.kbq-line-info { min-width: 0; }
.kbq-line-name { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: #0f172a; font-weight: 600; font-size: 15px; line-height: 1.4; }
.kbq-line-name:hover { color: #1f4fd1; }
.kbq-line-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 12.5px; color: #64748b; }
.kbq-chip { display: inline-block; padding: 2px 8px; border-radius: 4px; background: #f1f5f9; color: #334155; font-weight: 600; letter-spacing: .02em; }
.kbq-m-price { display: none; }
.kbq-m-price b { color: #f26b1d; }
.kbq-line-actions { display: flex; gap: 4px; margin-top: 8px; margin-left: -8px; }
.kbq-line-actions button { display: inline-flex; align-items: center; gap: 5px; margin: 0; min-height: 0; padding: 4px 8px; border: 0; border-radius: 6px; background: transparent; color: #64748b; font-size: 13px; font-weight: 500; line-height: 1.4; text-transform: none; letter-spacing: 0; width: auto; height: auto; }
.kbq-note-toggle:hover { background: #eff4ff; color: #1f4fd1; }
.kbq-line-actions .kbq-line-del:hover { background: #fef2f2; color: #dc2626; }
.kbq-col-price, .kbq-col-qty, .kbq-col-total { align-self: center; }
.kbq-col-price { text-align: center; color: #334155; font-size: 14px; white-space: nowrap; }
.kbq-col-qty { display: flex; justify-content: center; }
.kbq-col-total { text-align: right; }
.kbq-line-total { font-weight: 700; font-size: 15px; color: #0f172a; white-space: nowrap; }
.kbq-qty { display: inline-flex; align-items: stretch; height: 36px; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; background: #fff; }
.kbq-qty button { flex: 0 0 34px; width: 34px; margin: 0; padding: 0; min-height: 0; border: 0; background: #f8fafc; color: #334155; font-size: 18px; line-height: 1; }
.kbq-qty button:hover { background: #e2e8f0; }
.kbq-qty input.kbq-q-input { flex: 0 0 56px; width: 56px !important; max-width: 56px; height: 100% !important; margin: 0; padding: 0 4px; border: 0; border-left: 1px solid #e2e8f0; border-right: 1px solid #e2e8f0; border-radius: 0; box-shadow: none; text-align: center; font-weight: 600; font-size: 14px; }

.kbq-line-note-wrap { display: none; grid-column: 2 / -1; }
.kbq-line.has-note .kbq-line-note-wrap, .kbq-line.note-open .kbq-line-note-wrap { display: block; }
.kbq-line-note { width: 100%; margin: 0; min-height: 40px; padding: 8px 12px; font-size: 13px; line-height: 1.45; border: 1px solid #fde68a; border-radius: 8px; background: #fffbeb; box-shadow: none; resize: vertical; color: #78350f; }
.kbq-line-note:focus { border-color: #f59e0b; background: #fff; outline: none; box-shadow: 0 0 0 3px rgba(245, 158, 11, .15); }

.kbq-sum { display: block; margin-top: 14px; padding: 16px 18px; background: #fff; border: 1px solid #e3e8ef; border-radius: 12px; }
.kbq-sum-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 4px 0; font-size: 14px; color: #475569; }
.kbq-sum-row b { color: #0f172a; }
.kbq-sum-total { margin-top: 6px; padding-top: 12px; border-top: 1px dashed #e2e8f0; color: #0f172a; font-weight: 600; }
.kbq-sum-total small { font-weight: 400; color: #94a3b8; font-size: 12px; }
.kbq-sum-total strong { font-size: 20px; color: #f26b1d; white-space: nowrap; }
.kbq-sum-note { margin: 8px 0 0; font-size: 12.5px; color: #64748b; }

/* Thẻ kết quả tra MST */
.kbq-tax-card { margin: -2px 0 12px; padding: 12px 14px; border: 1px solid #bbf7d0; border-radius: 10px; background: #f0fdf4; font-size: 13px; line-height: 1.45; }
.kbq-tax-card-badge { font-size: 11.5px; font-weight: 600; color: #15803d; margin-bottom: 4px; }
.kbq-tax-card-name { font-weight: 700; color: #14532d; margin-bottom: 6px; }
.kbq-tax-card-row { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 8px; padding: 2px 0; color: #64748b; }
.kbq-tax-card-row b { color: #1e293b; font-weight: 500; }
.kbq-tax-card-status b { color: #b91c1c; }
.kbq-tax-msg.is-ok { display: none; }
.kbq-addr-hint { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: #15803d; }

.kbq-line-actions button, .kbq-clear-all { white-space: nowrap; }
@media (max-width: 1199px) {
	.kbq-cart-head, .kbq-line { grid-template-columns: 72px minmax(0, 1fr) 124px 104px; column-gap: 12px; }
	.kbq-cart-head span:nth-child(2), .kbq-col-price { display: none; }
	.kbq-m-price { display: inline; }
	.kbq-line-img { width: 72px; height: 72px; }
}
@media (max-width: 649px) {
	.kbq-cart-head { display: none; }
	.kbq-cart-top { padding: 12px 14px; }
	.kbq-line { grid-template-columns: 72px minmax(0, 1fr) auto; grid-template-areas: "img info info" "qty qty total" "note note note"; padding: 14px; column-gap: 12px; }
	.kbq-line-img { grid-area: img; }
	.kbq-line-info { grid-area: info; }
	.kbq-col-price { display: none; }
	.kbq-m-price { display: inline; }
	.kbq-col-qty { grid-area: qty; justify-content: flex-start; }
	.kbq-col-total { grid-area: total; }
	.kbq-line-note-wrap { grid-area: note; grid-column: 1 / -1; }
	.kbq-line-name { font-size: 14px; }
	.kbq-search button { padding: 0 14px; }
	.kbq-sum-total { flex-wrap: wrap; }
	.kbq-sum-total strong { white-space: normal; text-align: right; font-size: 18px; margin-left: auto; }
}

/* Căn chỉnh (v2.4.5): ô tìm cao bằng nút Tìm; chữ "Xoá tất cả" thẳng mép phải cột Thành tiền */
.kbq-search input#kbq-search-input { height: 44px !important; box-sizing: border-box; }
.kbq-clear-all { margin-right: -10px; }

/* ===== v2.5: chữ thường + cột Ghi chú cùng dòng ===== */
.kbq-line-name { font-weight: 400; -webkit-line-clamp: 3; font-size: 14.5px; }
.kbq-chip { font-weight: 400; }
.kbq-cart-head, .kbq-line { grid-template-columns: 64px minmax(0, 1fr) minmax(150px, 210px) 84px 104px 96px; column-gap: 12px; }
.kbq-cart-head span:first-child { grid-column: 1 / 3; }
.kbq-cart-head span:nth-child(2) { text-align: left; }
.kbq-line-img { width: 64px; height: 64px; }
.kbq-line-note-wrap { display: block; grid-column: auto; align-self: stretch; }
.kbq-line-note { height: 100%; min-height: 64px; padding: 6px 10px; font-size: 13px; resize: none; }
.kbq-col-price { font-size: 13.5px; }
.kbq-qty { height: 32px; }
.kbq-qty button { flex-basis: 28px; width: 28px; font-size: 16px; }
.kbq-qty input.kbq-q-input { flex-basis: 44px; width: 44px !important; max-width: 44px; font-size: 13.5px; }
.kbq-line-total { font-size: 14px; }
.kbq-line-actions { margin-top: 6px; }
@media (max-width: 1199px) {
	.kbq-cart-head, .kbq-line { grid-template-columns: 64px minmax(0, 1fr) 104px 96px; grid-template-areas: "img info qty total" "img note note note"; }
	.kbq-cart-head { grid-template-areas: none; }
	.kbq-cart-head span:nth-child(2), .kbq-cart-head span:nth-child(3), .kbq-col-price { display: none; }
	.kbq-line-img { grid-area: img; } .kbq-line-info { grid-area: info; }
	.kbq-col-qty { grid-area: qty; } .kbq-col-total { grid-area: total; }
	.kbq-line-note-wrap { grid-area: note; }
	.kbq-line-note { min-height: 40px; height: auto; resize: vertical; }
	.kbq-m-price { display: inline; }
}
@media (max-width: 649px) {
	.kbq-line { grid-template-columns: 64px minmax(0, 1fr) auto; grid-template-areas: "img info info" "qty qty total" "note note note"; }
}
/* v2.5.1: ô ghi chú hẹp lại, nhường chỗ cho tên SP */
@media (min-width: 1200px) {
	.kbq-cart-head, .kbq-line { grid-template-columns: 64px minmax(0, 1fr) minmax(130px, 170px) 84px 104px 96px; }
}

/* ===== v2.6: dòng gọn, căn giữa, ghi chú 1 dòng, xoá ở cột cuối ===== */
.kbq-cart-head, .kbq-line { grid-template-columns: 56px minmax(0, 1fr) 170px 88px 104px 100px 32px !important; column-gap: 14px; }
.kbq-cart-head span:first-child { grid-column: 1 / 3; }
.kbq-cart-head span:nth-child(2) { text-align: left; }
.kbq-line { align-items: center; padding: 14px 18px; row-gap: 8px; }
.kbq-line-img { width: 56px; height: 56px; border-radius: 6px; }
.kbq-line-name { font-size: 14px; font-weight: 400; line-height: 1.4; -webkit-line-clamp: 2; }
.kbq-line-meta { margin-top: 3px; font-size: 12.5px; }
.kbq-sku { color: #94a3b8; }
.kbq-line-note-wrap { display: block; align-self: center; grid-column: auto; }
.kbq-line-note {
	display: block; width: 100%; height: 36px !important; min-height: 0; margin: 0; padding: 8px 10px;
	font-size: 13px; line-height: 1.4; color: #334155; background: #fff;
	border: 1px solid #dbe2ea; border-radius: 8px; box-shadow: none; resize: none; overflow: hidden;
	transition: height .15s, border-color .15s;
}
.kbq-line-note::placeholder { color: #a3adbb; }
.kbq-line-note:hover { border-color: #b8c3d1; }
.kbq-line-note:focus { height: 84px !important; overflow: auto; background: #fff; border-color: #1f4fd1; box-shadow: 0 0 0 3px rgba(31, 79, 209, .12); outline: none; }
.kbq-line.has-note .kbq-line-note { border-color: #f5c46b; background: #fffdf5; }
.kbq-col-price { font-size: 13.5px; color: #475569; }
.kbq-line-total { font-size: 14px; }
.kbq-line > .kbq-line-del { width: 32px; height: 32px; margin: 0; padding: 0; min-height: 0; border: 0; border-radius: 8px; background: transparent; color: #94a3b8; display: inline-flex; align-items: center; justify-content: center; }
.kbq-line > .kbq-line-del:hover { background: #fef2f2; color: #dc2626; }
.kbq-line > .kbq-line-del svg { width: 17px; height: 17px; }
@media (max-width: 1199px) {
	.kbq-cart-head, .kbq-line { grid-template-columns: 56px minmax(0, 1fr) 104px 96px 32px !important; grid-template-areas: "img info qty total del" "img note note note note"; column-gap: 12px; }
	.kbq-cart-head { grid-template-areas: none; }
	.kbq-cart-head span:nth-child(2), .kbq-cart-head span:nth-child(3), .kbq-col-price { display: none; }
	.kbq-line-img { grid-area: img; align-self: start; } .kbq-line-info { grid-area: info; }
	.kbq-col-qty { grid-area: qty; } .kbq-col-total { grid-area: total; } .kbq-line > .kbq-line-del { grid-area: del; }
	.kbq-line-note-wrap { grid-area: note; }
	.kbq-m-price { display: inline; }
}
@media (max-width: 649px) {
	.kbq-line { grid-template-columns: 56px minmax(0, 1fr) auto !important; grid-template-areas: "img info del" "qty qty total" "note note note"; padding: 14px; }
	.kbq-line-img { align-self: start; }
	.kbq-line > .kbq-line-del { align-self: start; }
}
/* v2.6.1: bỏ cột Đơn giá riêng → đơn giá dưới tên, cột tên rộng hơn */
@media (min-width: 1200px) {
	.kbq-cart-head, .kbq-line { grid-template-columns: 56px minmax(0, 1fr) 160px 104px 104px 32px !important; }
	.kbq-cart-head span:nth-child(3), .kbq-col-price { display: none; }
	.kbq-m-price { display: inline; }
}
.kbq-line-meta { gap: 4px 12px; }
.kbq-m-price { color: #64748b; }
.kbq-line-note { white-space: nowrap; text-overflow: ellipsis; }
.kbq-line-note:focus { white-space: pre-wrap; }

/* ===== v2.8: Trang danh sách yêu cầu cho nhân viên (mã truy cập) ===== */
.kbs-gate { display: flex; justify-content: center; padding: 60px 16px 80px; }
.kbs-gate-box { width: 100%; max-width: 380px; padding: 32px 28px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; box-shadow: 0 10px 30px rgba(15, 23, 42, .07); text-align: center; }
.kbs-gate-ic { font-size: 34px; line-height: 1; margin-bottom: 10px; }
.kbs-gate-box h1 { font-size: 20px; margin: 0 0 6px; color: #0f172a; }
.kbs-gate-box p { margin: 0 0 18px; color: #64748b; font-size: 14px; }
.kbs-gate-box input { width: 100%; height: 44px !important; margin: 0 0 10px; padding: 0 14px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 16px; text-align: center; letter-spacing: 2px; box-shadow: none; }
.kbs-gate-box input:focus { border-color: #1f4fd1; box-shadow: 0 0 0 3px rgba(31, 79, 209, .12); outline: none; }
.kbs-gate-box button { width: 100%; height: 44px; margin: 0; border: 0; border-radius: 8px; background: #1f4fd1; color: #fff; font-size: 15px; font-weight: 600; text-transform: none; letter-spacing: 0; cursor: pointer; }
.kbs-gate-box button:disabled { opacity: .6; }
.kbs-gate-box small { display: block; min-height: 18px; margin-top: 10px; color: #dc2626; font-size: 13px; }


/* ===== v2.9: danh sách dạng bảng gọn ===== */
.kbs { max-width: 1280px; margin: 0 auto; padding: 22px 0 60px; color: #0f172a; font-size: 13.5px; line-height: 1.4; }
.kbs-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.kbs-title { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.kbs-title h1 { margin: 0; font-size: 20px; font-weight: 700; color: #0f172a; }
.kbs-sub { color: #64748b; font-size: 13px; }
.kbs-sub b { color: #b45309; }
.kbs-top-r { display: flex; gap: 8px; flex: 1 1 300px; justify-content: flex-end; }
.kbs-top-r input { flex: 0 1 340px; height: 36px !important; margin: 0; padding: 0 12px; border: 1px solid #d5dce5; border-radius: 6px; box-shadow: none; font-size: 13px; }
.kbs-top-r input:focus { border-color: #1f4fd1; box-shadow: 0 0 0 3px rgba(31, 79, 209, .1); outline: none; }
.kbs-out { height: 36px; margin: 0; padding: 0 12px; border: 1px solid #d5dce5; border-radius: 6px; background: #fff; color: #475569; font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; line-height: 34px; }
.kbs-tabs { display: flex; gap: 2px; flex-wrap: wrap; margin: 0; padding: 0 4px; border: 1px solid #e3e8ef; border-bottom: 0; border-radius: 8px 8px 0 0; background: #f8fafc; }
.kbs-tabs button { position: relative; height: 40px; margin: 0; padding: 0 12px; border: 0; border-radius: 0; background: transparent; color: #64748b; font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; line-height: 40px; }
.kbs-tabs button b { margin-left: 4px; padding: 1px 6px; border-radius: 4px; background: #e9eef4; color: #475569; font-size: 11.5px; font-weight: 600; }
.kbs-tabs button:hover { color: #0f172a; }
.kbs-tabs button.on { color: #1f4fd1; }
.kbs-tabs button.on::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; background: #1f4fd1; border-radius: 2px; }
.kbs-tabs button.on b { background: #e0e8fd; color: #1f4fd1; }

.kbs-table { border: 1px solid #e3e8ef; border-radius: 0 0 8px 8px; background: #fff; overflow: hidden; }
.kbs-thead, .kbs-r { display: grid; grid-template-columns: 92px minmax(170px, 1.1fr) minmax(220px, 1.6fr) 110px 150px 196px; column-gap: 16px; align-items: center; padding: 0 14px; }
.kbs-thead { height: 34px; border-top: 1px solid #e3e8ef; border-bottom: 1px solid #e3e8ef; background: #f8fafc; color: #64748b; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
.kbs-num { text-align: right; }
.kbs-row { border-bottom: 1px solid #eef2f6; }
.kbs-row:last-child { border-bottom: 0; }
.kbs-r { min-height: 56px; padding-top: 8px; padding-bottom: 8px; cursor: pointer; }
.kbs-row:hover .kbs-r { background: #fafcff; }
.kbs-row.open .kbs-r { background: #f5f8ff; }
.kbs-row[data-s="new"] .kbs-r { box-shadow: inset 3px 0 0 #f59e0b; }
.kbs-r > div { min-width: 0; }
.kbs-r small { display: block; margin-top: 2px; color: #64748b; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbs-c-code b { color: #1f4fd1; font-weight: 700; }
.kbs-c-cust b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbs-c-cust a { color: #334155; }
.kbs-c-cust a:hover { color: #1f4fd1; }
.kbs-i1 { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbs-i1 em { font-style: normal; font-weight: 600; color: #0f172a; }
.kbs-hasnote { color: #b45309; }
.kbs-c-sum { font-weight: 600; white-space: nowrap; }
.kbs-mute { color: #94a3b8; font-weight: 400; }

.kbs-sel { width: 100%; height: 30px !important; margin: 0 !important; padding: 0 26px 0 10px !important; border: 1px solid transparent !important; border-radius: 999px !important; font-size: 12.5px; font-weight: 600; box-shadow: none !important; cursor: pointer; background-color: #eef1f5; background-position: right 8px center !important; background-size: 10px !important; }
.kbs-sel:focus { outline: 2px solid rgba(31, 79, 209, .25); }
.kbs-st-new { background-color: #fef3c7 !important; color: #92400e; }
.kbs-st-contacted { background-color: #dbeafe !important; color: #1e40af; }
.kbs-st-quoted { background-color: #e0e7ff !important; color: #3730a3; }
.kbs-st-won { background-color: #dcfce7 !important; color: #166534; }
.kbs-st-lost { background-color: #f1f5f9 !important; color: #64748b; }

.kbs-c-act { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.kbs-go { display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 10px; margin-right: 4px; border-radius: 6px; background: #1f4fd1; color: #fff !important; font-size: 12.5px; font-weight: 600; white-space: nowrap; text-decoration: none; }
.kbs-go:hover { background: #1a43b3; }
.kbs-ib { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; min-height: 0; margin: 0; padding: 0; border: 1px solid #e3e8ef; border-radius: 6px; background: #fff; color: #94a3b8; line-height: 1; }
.kbs-ib:hover { border-color: #cbd5e1; color: #334155; background: #f8fafc; }
.kbs-quoted.on { border-color: #a5b4fc; background: #eef2ff; color: #3730a3; }
.kbs-del:hover { border-color: #fecaca; background: #fef2f2; color: #dc2626; }
.kbs-more svg { transition: transform .15s; }
.kbs-row.open .kbs-more svg { transform: rotate(180deg); }

.kbs-detail { display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 2.2fr); gap: 20px; padding: 14px 14px 16px 122px; background: #f8fafc; border-top: 1px dashed #e3e8ef; }
.kbs-detail[hidden] { display: none; }
.kbs-d-info > div { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; padding: 3px 0; font-size: 13px; }
.kbs-d-info span { color: #64748b; font-size: 12px; }
.kbs-d-info a { color: #1f4fd1; }
.kbs-d-info p { margin: 0; }
.kbs-d-info i { color: #94a3b8; font-style: normal; font-size: 12px; }
.kbs-d-note { color: #78350f; }
.kbs-d-items { width: 100%; margin: 0; border-collapse: collapse; background: #fff; border: 1px solid #e3e8ef; border-radius: 6px; font-size: 13px; }
.kbs-d-items th { padding: 7px 10px; border-bottom: 1px solid #e3e8ef; background: #fff; color: #64748b; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .3px; text-align: left; }
.kbs-d-items th.kbs-num { text-align: right; }
.kbs-d-items td { padding: 7px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: top; }
.kbs-d-items tr:last-child td { border-bottom: 0; }
.kbs-d-items a { color: #0f172a; }
.kbs-d-items a:hover { color: #1f4fd1; }
.kbs-d-img { width: 40px; padding-right: 0 !important; }
.kbs-d-img img { width: 34px; height: 34px; object-fit: contain; border: 1px solid #eef2f6; border-radius: 4px; }
.kbs-d-inote { margin-top: 2px; color: #b45309; font-size: 12px; }
.kbs-empty, .kbs-none { margin: 0; padding: 36px; text-align: center; color: #64748b; }

@media (max-width: 1100px) {
	.kbs-thead, .kbs-r { grid-template-columns: 84px minmax(150px, 1fr) minmax(180px, 1.3fr) 96px 140px 178px; column-gap: 12px; }
	.kbs-detail { padding-left: 14px; grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 849px) {
	.kbs { padding-top: 14px; }
	.kbs-top-r input { flex: 1 1 auto; }
	.kbs-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
	.kbs-tabs::-webkit-scrollbar { display: none; }
	.kbs-tabs button { flex: 0 0 auto; }
	.kbs-thead { display: none; }
	.kbs-r { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "code st" "cust sum" "items items" "act act"; row-gap: 6px; padding: 12px; }
	.kbs-c-code { grid-area: code; display: flex; gap: 8px; align-items: baseline; }
	.kbs-c-code small { margin: 0; }
	.kbs-c-st { grid-area: st; } .kbs-c-st .kbs-sel { width: auto; }
	.kbs-c-cust { grid-area: cust; } .kbs-c-sum { grid-area: sum; align-self: start; }
	.kbs-c-items { grid-area: items; }
	.kbs-c-act { grid-area: act; justify-content: flex-start; }
	.kbs-go { flex: 1 1 auto; justify-content: center; height: 34px; }
	.kbs-ib { width: 34px; height: 34px; }
	.kbs-d-items th:nth-child(2), .kbs-d-items td:nth-child(3), .kbs-d-items th:nth-child(4), .kbs-d-items td:nth-child(5) { display: none; }
}

/* v2.9.2: tô sáng yêu cầu mở từ link Zalo */
.kbs-row.kbs-flash .kbs-r { animation: kbsFlash 2.4s ease-out; }
@keyframes kbsFlash { 0%, 40% { background: #fff4c2; } 100% { background: #f5f8ff; } }

/* ===== v2.10: trang cảm ơn / xem lại yêu cầu đã gửi ===== */
.kbq-ty { max-width: 1180px; margin: 0 auto; padding: 28px 0 60px; color: #0f172a; font-size: 14px; }
.kbq-ty-head { display: flex; gap: 18px; align-items: flex-start; padding: 24px 26px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; }
.kbq-ty-ic { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 50%; background: #16a34a; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 8px #dcfce7; }
.kbq-ty-head h1 { margin: 2px 0 6px; font-size: 22px; line-height: 1.3; color: #0f172a; }
.kbq-ty-head p { margin: 0 0 4px; color: #475569; }
.kbq-ty-head p b { color: #0f172a; }
.kbq-ty-lead { margin-top: 8px !important; }
.kbq-ty-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; margin: 16px 0; padding: 18px 20px; list-style: none; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; counter-reset: none; }
.kbq-ty-steps li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0; text-align: center; color: #94a3b8; font-size: 13px; font-weight: 500; }
.kbq-ty-steps li::before { content: ""; position: absolute; top: 15px; left: -50%; right: 50%; height: 2px; background: #e2e8f0; z-index: 0; }
.kbq-ty-steps li:first-child::before { display: none; }
.kbq-ty-steps li span { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: #fff; border: 2px solid #e2e8f0; color: #94a3b8; font-weight: 700; }
.kbq-ty-steps li.is-done { color: #166534; }
.kbq-ty-steps li.is-done span { background: #16a34a; border-color: #16a34a; color: #fff; }
.kbq-ty-steps li.is-done::before, .kbq-ty-steps li.is-cur::before { background: #16a34a; }
.kbq-ty-steps li.is-cur { color: #1f4fd1; font-weight: 600; }
.kbq-ty-steps li.is-cur span { border-color: #1f4fd1; color: #1f4fd1; box-shadow: 0 0 0 4px #e0e8fd; }
.kbq-ty-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.kbq-ty-box { padding: 20px 22px; background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; }
.kbq-ty-box h2 { margin: 0 0 12px; font-size: 16px; color: #0f172a; }
.kbq-ty-box h2 small { margin-left: 6px; color: #64748b; font-size: 13px; font-weight: 400; }
.kbq-ty-it { display: grid; grid-template-columns: 52px minmax(0, 1fr) 60px 110px; gap: 14px; align-items: center; padding: 12px 0; border-top: 1px solid #f1f5f9; }
.kbq-ty-it img { width: 52px; height: 52px; object-fit: contain; border: 1px solid #eef2f6; border-radius: 8px; background: #fff; }
.kbq-ty-it-info a { color: #0f172a; font-size: 14px; line-height: 1.4; }
.kbq-ty-it-info a:hover { color: #1f4fd1; }
.kbq-ty-it-info small { display: block; margin-top: 2px; color: #64748b; font-size: 12.5px; }
.kbq-ty-note { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 6px; background: #fffbeb; color: #92400e; font-size: 12.5px; }
.kbq-ty-qty { text-align: center; color: #334155; font-weight: 600; }
.kbq-ty-line { text-align: right; font-weight: 600; white-space: nowrap; }
.kbq-ty-total { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 4px; padding-top: 14px; border-top: 1px dashed #e2e8f0; }
.kbq-ty-total small { color: #94a3b8; font-size: 12px; font-weight: 400; }
.kbq-ty-total b { color: #ea580c; font-size: 18px; }
.kbq-ty-hint { margin: 6px 0 0; color: #64748b; font-size: 12.5px; }
.kbq-ty-side dl { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 8px 10px; margin: 0 0 18px; font-size: 13.5px; }
.kbq-ty-side dt { margin: 0; color: #64748b; font-weight: 400; font-size: 13px; text-transform: none; letter-spacing: 0; }
.kbq-ty-side dd { margin: 0; color: #0f172a; font-size: 13.5px; text-transform: none; letter-spacing: 0; word-break: break-word; }
.kbq-ty-acts { display: flex; flex-direction: column; gap: 8px; }
.kbq-ty-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 42px; margin: 0; padding: 0 14px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; color: #334155 !important; font-size: 14px; font-weight: 600; text-transform: none; letter-spacing: 0; text-decoration: none; cursor: pointer; }
.kbq-ty-btn:hover { background: #f8fafc; }
.kbq-ty-btn-pri { border-color: #1f4fd1; background: #1f4fd1; color: #fff !important; }
.kbq-ty-btn-pri:hover { background: #1a43b3; }
.kbq-ty-btn-link { height: 34px; border: 0; background: transparent; color: #64748b !important; font-weight: 500; font-size: 13px; }
.kbq-ty-save { margin: 12px 0 0; color: #64748b; font-size: 12.5px; line-height: 1.5; }
.kbq-ty-save a { color: #1f4fd1; }
.kbq-ty-missing { max-width: 520px; padding: 50px 20px; text-align: center; }
.kbq-ty-missing .kbq-ty-btn { display: inline-flex; width: auto; margin-top: 10px; }

.kbq-sent { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 16px; padding: 10px 14px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; font-size: 13px; color: #166534; }
.kbq-sent[hidden] { display: none; }
.kbq-sent a { display: inline-flex; gap: 4px; align-items: baseline; padding: 3px 10px; border-radius: 999px; background: #fff; border: 1px solid #bbf7d0; color: #166534; font-weight: 600; text-decoration: none; }
.kbq-sent a:hover { border-color: #16a34a; }
.kbq-sent small { color: #64748b; font-weight: 400; font-size: 12px; }

@media (max-width: 899px) {
	.kbq-ty-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 599px) {
	.kbq-ty { padding-top: 16px; }
	.kbq-ty-head { flex-direction: column; gap: 12px; padding: 18px; }
	.kbq-ty-head h1 { font-size: 19px; }
	.kbq-ty-steps { grid-template-columns: repeat(2, 1fr); row-gap: 16px; padding: 16px 10px; }
	.kbq-ty-steps li:nth-child(3)::before { display: none; }
	.kbq-ty-box { padding: 16px; }
	.kbq-ty-it { grid-template-columns: 46px minmax(0, 1fr) auto; grid-template-areas: "img info info" "img qty line"; row-gap: 4px; }
	.kbq-ty-it img { grid-area: img; width: 46px; height: 46px; align-self: start; }
	.kbq-ty-it-info { grid-area: info; } .kbq-ty-qty { grid-area: qty; text-align: left; } .kbq-ty-line { grid-area: line; }
}
@media print {
	header, footer, #header, #footer, .kbq-fab, .kbq-panel, .kbq-ty-acts, .kbq-ty-save, #wpadminbar { display: none !important; }
	.kbq-ty-grid { grid-template-columns: 1fr 280px; }
}

/* ===== v2.11: lịch sử yêu cầu đã gửi ===== */
.kbq-hist { grid-column: 1 / -1; padding: 16px 18px; background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; scroll-margin-top: 120px; }
.kbq-hist[hidden] { display: none !important; }
.kbq-hist-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.kbq-hist-top h2 { margin: 0; font-size: 16px; color: #0f172a; }
.kbq-hist-note { color: #94a3b8; font-size: 12px; white-space: nowrap; }
.kbq-hist-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 110px 52px; gap: 12px; align-items: center; padding: 10px 6px; border-top: 1px solid #f1f5f9; color: #0f172a !important; text-decoration: none; border-radius: 8px; }
.kbq-hist-row:hover { background: #f8fafc; }
.kbq-hist-row img, .kbq-hist-img { width: 44px; height: 44px; object-fit: contain; border: 1px solid #eef2f6; border-radius: 6px; background: #fff; }
.kbq-hist-main { min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; }
.kbq-hist-main b { color: #1f4fd1; font-size: 14px; }
.kbq-hist-main small { color: #64748b; font-size: 12px; }
.kbq-hist-first { flex: 1 1 100%; min-width: 0; color: #334155; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kbq-hist-first em { color: #64748b; font-style: normal; }
.kbq-hist-st { padding: 3px 10px; border-radius: 999px; background: #eef1f5; color: #64748b; font-size: 12px; font-weight: 600; white-space: nowrap; }
.kbq-hist-st-new { background: #fef3c7; color: #92400e; }
.kbq-hist-st-contacted { background: #dbeafe; color: #1e40af; }
.kbq-hist-st-quoted { background: #e0e7ff; color: #3730a3; }
.kbq-hist-st-won { background: #dcfce7; color: #166534; }
.kbq-hist-sum { text-align: right; font-weight: 600; white-space: nowrap; font-size: 13.5px; }
.kbq-hist-go { color: #1f4fd1; font-size: 13px; font-weight: 600; text-align: right; }
.kbq-hist-more { display: block; width: 100%; height: 34px; margin: 6px 0 0; padding: 0; border: 0; border-top: 1px solid #f1f5f9; border-radius: 0; background: none; color: #1f4fd1; font-size: 13px; font-weight: 600; text-transform: none; letter-spacing: 0; }
.kbq-hist-more[hidden] { display: none; }
@media (max-width: 649px) {
	.kbq-hist { padding: 14px; }
	.kbq-hist-row { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "img main go" "img st sum"; row-gap: 4px; padding: 10px 2px; }
	.kbq-hist-row img, .kbq-hist-img { grid-area: img; width: 40px; height: 40px; align-self: start; }
	.kbq-hist-main { grid-area: main; } .kbq-hist-go { grid-area: go; }
	.kbq-hist-st { grid-area: st; justify-self: start; } .kbq-hist-sum { grid-area: sum; }
}
/* Khung nút nổi: mục "Yêu cầu đã gửi" */
.kbq-hist-link { display: flex; align-items: center; gap: 8px; margin: 0; padding: 12px 16px; border-top: 1px solid #eef2f6; background: #f8fafc; color: #0f172a !important; font-size: 13.5px; text-decoration: none; border-radius: 0 0 12px 12px; }
.kbq-hist-link[hidden] { display: none; }
.kbq-hist-link:hover { background: #eef4ff; }
.kbq-hist-link b { padding: 1px 7px; border-radius: 999px; background: #e0e8fd; color: #1f4fd1; font-size: 12px; }
.kbq-hist-link i { margin-left: auto; color: #1f4fd1; font-style: normal; font-weight: 600; font-size: 13px; }
.kbq-items-empty { margin: 0; padding: 18px 16px; color: #64748b; font-size: 13px; text-align: center; }

/* ===== v2.12: khách huỷ yêu cầu ===== */
.kbq-ty-btn-cancel { height: 38px; border-color: #fecaca; color: #b91c1c !important; font-weight: 500; }
.kbq-ty-btn-cancel:hover { background: #fef2f2; }
.kbq-ty-btn-cancel[hidden], .kbq-ty-cbox[hidden], .kbq-ty-steps[hidden] { display: none !important; }
.kbq-ty-cbox { padding: 12px; border: 1px solid #fecaca; border-radius: 10px; background: #fff7f7; }
.kbq-ty-cbox p { margin: 0 0 8px; color: #7f1d1d; font-size: 13px; line-height: 1.5; }
.kbq-ty-cbox textarea { width: 100%; min-height: 56px; margin: 0 0 8px; padding: 8px 10px; border: 1px solid #e5c4c4; border-radius: 8px; font-size: 13px; box-shadow: none; resize: vertical; }
.kbq-ty-cbox-acts { display: flex; gap: 8px; }
.kbq-ty-cbox-acts .kbq-ty-btn { height: 38px; font-size: 13.5px; }
.kbq-ty-btn-danger { border-color: #dc2626; background: #dc2626; color: #fff !important; }
.kbq-ty-btn-danger:hover { background: #b91c1c; }
.kbq-ty-btn-danger:disabled { opacity: .6; }
.kbq-ty-cmsg { display: block; margin-top: 6px; color: #dc2626; font-size: 12.5px; }
.kbq-ty-head.is-cancelled .kbq-ty-ic { background: #94a3b8; box-shadow: 0 0 0 8px #f1f5f9; }
.kbq-ty-head.is-cancelled h1 { color: #475569; }
.kbq-hist-st-cancelled { background: #fee2e2; color: #991b1b; }
.kbs-st-cancelled { background-color: #fee2e2 !important; color: #991b1b; }
.kbs-row[data-s="cancelled"] .kbs-r { opacity: .65; }
.kbs-row[data-s="cancelled"].open .kbs-r, .kbs-row[data-s="cancelled"]:hover .kbs-r { opacity: 1; }
.kbs-d-cancel { color: #991b1b; }

/* ===== v2.13: gắn bộ hồ sơ + trạng thái Đang xử lý / Hoàn thành ===== */
.kbs-st-processing { background-color: #cffafe !important; color: #155e75; }
.kbq-hist-st-processing { background: #cffafe; color: #155e75; }
.kbs-d-wds i { font-style: normal; color: #64748b; font-size: 12.5px; }
.kbs-d-wds i.is-signed { color: #166534; font-weight: 600; }
.kbq-bind { margin: 0 0 12px; padding: 10px 14px; border: 1px solid #bfdbfe; border-radius: 8px; background: #eff6ff; color: #1e3a8a; font-size: 14px; }
.kbq-bind.is-off { border-color: #fde68a; background: #fffbeb; color: #92400e; }

/* ===== v2.14: nút "＋ Báo giá" cùng hàng giá trên thẻ SP (thay icon mờ góc ảnh) ===== */
.product-small .price-wrapper:has(.kbq-add-card) { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 8px; }
.product-small .price-wrapper:has(.kbq-add-card) > .price { margin: 0; min-width: 0; }
.kbq-add.kbq-add-card {
	flex: 0 0 auto; width: auto; height: 30px; margin: 0 0 0 auto; padding: 0 10px; gap: 2px;
	border: 1px solid #1f4fd1; border-radius: 6px; background: #fff; color: #1f4fd1;
	font-size: 12.5px; font-weight: 600; line-height: 1; letter-spacing: 0; text-transform: none; white-space: nowrap;
	box-shadow: none; opacity: 1 !important; transform: none !important; transition: none;
}
.kbq-add-card b { font-size: 15px; font-weight: 700; margin-right: 1px; }
.kbq-add-card:hover { background: #1f4fd1; color: #fff; }
.kbq-add-card .kbq-t-ok, .kbq-add-card .kbq-t-del { display: none; }
.kbq-add-card.is-added { background: #16a34a; border-color: #16a34a; color: #fff; }
.kbq-add-card.is-added .kbq-t-add { display: none; }
.kbq-add-card.is-added .kbq-t-ok { display: inline; }
@media (hover: hover) {
	.kbq-add-card.is-added:hover { background: #fff; border-color: #dc2626; color: #dc2626; }
	.kbq-add-card.is-added:hover .kbq-t-ok { display: none; }
	.kbq-add-card.is-added:hover .kbq-t-del { display: inline; }
}
@media (max-width: 549px) {
	/* Điện thoại: thẻ hẹp → nút luôn nằm riêng 1 hàng, rộng hết thẻ cho đều và dễ bấm */
	.kbq-add.kbq-add-card { flex: 1 1 100%; height: 34px; margin: 2px 0 0; font-size: 13px; }
}

/* ===== v2.15: thanh liên hệ cố định đáy màn hình điện thoại (Zalo | Gọi ngay | Báo giá) ===== */
.kbq-mbar { display: none; }
@media (max-width: 849px) {
	.kbq-mbar {
		position: fixed; left: 0; right: 0; bottom: 0; z-index: 9989;
		display: grid; grid-template-columns: 1fr 1fr 1.25fr;
		height: calc(44px + env(safe-area-inset-bottom)); padding: 0 0 env(safe-area-inset-bottom);
		background: #fff; border-top: 1px solid #e5e9f0; box-shadow: 0 -4px 16px rgba(15, 23, 42, .08);
		font-family: inherit;
	}
	.kbq-mbar-i {
		position: relative; display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 7px;
		min-height: 0; height: 44px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent;
		color: #334155 !important; font-size: 13px; font-weight: 600; line-height: 1; text-transform: none; letter-spacing: 0;
		text-decoration: none !important; cursor: pointer; -webkit-tap-highlight-color: transparent;
	}
	.kbq-mbar-i + .kbq-mbar-i::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: #e5e9f0; }
	.kbq-mbar-i:active { background: #f1f5f9; }
	.kbq-mbar-ic { position: relative; display: flex; align-items: center; justify-content: center; height: 24px; }
	.kbq-mbar-call .kbq-mbar-ic { color: #16a34a; }
	.kbq-mbar-call .kbq-mbar-ic svg { animation: kbq-ring 2.4s ease-in-out infinite; transform-origin: 50% 50%; }
	.kbq-mbar-quote { background: #f26b1d; color: #fff !important; }
	.kbq-mbar-quote::before { display: none; }
	.kbq-mbar-quote:active, body:has(.kbq-panel.is-open) .kbq-mbar-quote { background: #d95a10; }
	.kbq-mbar-n {
		position: absolute; top: -7px; right: -10px;
		min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; border: 2px solid #f26b1d;
		background: #fff; color: #f26b1d; font-size: 11px; font-weight: 700; line-height: 14px; text-align: center; box-sizing: border-box;
	}
	.kbq-mbar-n[hidden] { display: none; }
	.kbq-mbar-quote .kbq-mbar-ic.kbq-bump { animation: kbq-bump .45s ease; }

	/* Ẩn nút tròn Zalo/Gọi (button-contact-vr) + nút nổi Báo giá; chừa chỗ cho thanh */
	#button-contact-vr, .kbq-fab, .kbq-fab.is-show { display: none !important; }
	body { padding-bottom: calc(44px + env(safe-area-inset-bottom)); }
	#top-link.back-to-top { bottom: calc(56px + env(safe-area-inset-bottom)) !important; right: 12px !important; }
	.kbq-panel { left: 8px; right: 8px; width: auto; bottom: calc(52px + env(safe-area-inset-bottom)); max-height: calc(100vh - 140px); }
	/* Menu/lightbox Flatsome đang mở thì ẩn thanh */
	body:has(.mfp-ready) .kbq-mbar, html.mfp-active .kbq-mbar { display: none; }
}
@keyframes kbq-ring { 0%, 70%, 100% { transform: rotate(0); } 74% { transform: rotate(-14deg); } 78% { transform: rotate(12deg); } 82% { transform: rotate(-10deg); } 86% { transform: rotate(8deg); } 90% { transform: rotate(0); } }
@media print { .kbq-mbar { display: none !important; } }

/* ===== v2.15.3: thẻ SP có giảm giá — giá cũ nhỏ nằm trên giá mới, nút "Báo giá" luôn cùng hàng như thẻ không giảm giá ===== */
@media (min-width: 550px) {
	.product-small .price-wrapper:has(.kbq-add-card):has(del) { flex-wrap: nowrap; align-items: flex-end; }
	.product-small .price-wrapper:has(.kbq-add-card) > .price:has(del) { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
	.product-small .price-wrapper:has(.kbq-add-card) > .price:has(del) del { order: 0; font-size: 12px; margin: 0; }
	.product-small .price-wrapper:has(.kbq-add-card) > .price:has(del) ins { order: 1; margin: 0; }
}
