/* DPM Tính giá in — giao diện */
.dpm-tgi {
	--dpm-tgi-chinh: #1d4ed8;
	--dpm-tgi-nen-phu: #f5f7fb;
	--dpm-tgi-vien: #d9dee8;
	--dpm-tgi-chu: #1f2937;
	--dpm-tgi-chu-phu: #6b7280;
	max-width: 720px;
	margin: 1.5em 0;
	padding: 20px 22px;
	background: #fff;
	border: 1px solid var(--dpm-tgi-vien);
	border-radius: 12px;
	color: var(--dpm-tgi-chu);
	font-size: 15px;
	line-height: 1.5;
	box-sizing: border-box;
}
.dpm-tgi *, .dpm-tgi *::before, .dpm-tgi *::after { box-sizing: border-box; }
.dpm-tgi [hidden] { display: none !important; }
.dpm-tgi-tieu-de { margin: 0 0 14px; font-size: 1.3em; }
/* Khối và dòng ô */
.dpm-tgi-khoi { margin: 0 0 14px; padding: 12px 14px; background: var(--dpm-tgi-nen-phu); border-radius: 10px; }
.dpm-tgi-khoi-ten { margin-bottom: 8px; font-weight: 600; color: var(--dpm-tgi-chinh); }
.dpm-tgi-dong-o { display: grid; grid-template-columns: 90px 1fr; gap: 10px; align-items: center; margin: 0 0 8px; }
.dpm-tgi-dong-o:last-child { margin-bottom: 0; }
.dpm-tgi-nhan { font-size: 14px; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-cum-o { display: flex; gap: 8px; align-items: center; }
.dpm-tgi-cum-o em, .dpm-tgi-kho2 em { font-style: normal; color: var(--dpm-tgi-chu-phu); font-size: 14px; }
.dpm-tgi input[type="text"], .dpm-tgi select {
	width: 100%;
	min-height: 42px;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid var(--dpm-tgi-vien);
	border-radius: 8px;
	background: #fff;
	color: var(--dpm-tgi-chu);
	font-size: 15px;
	line-height: 1.3;
}
.dpm-tgi input[type="text"]:focus, .dpm-tgi select:focus {
	outline: none;
	border-color: var(--dpm-tgi-chinh);
	box-shadow: 0 0 0 3px rgba(29, 78, 216, .15);
}
.dpm-tgi input.dpm-tgi-o-gia { flex: 1; font-size: 18px; font-weight: 600; }
.dpm-tgi .dpm-tgi-cum-o select { width: auto; min-width: 110px; }
.dpm-tgi input.dpm-tgi-o-sl { width: 140px; flex: none; }
.dpm-tgi-kho2 { display: grid; grid-template-columns: minmax(110px, 1.2fr) 1fr 1fr auto; gap: 8px; align-items: center; }
.dpm-tgi-kho2 label { display: flex; align-items: center; gap: 6px; margin: 0; }
.dpm-tgi-kho2 label span { font-size: 13px; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-kho2 input[type="text"] { text-align: center; font-weight: 600; }
.dpm-tgi-chon-giay { max-width: 420px; }
.dpm-tgi-thong-tin { margin: -2px 0 8px 100px; font-size: 13px; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-thong-tin:empty { display: none; }

/* Ô kết quả to */
.dpm-tgi-kq {
	padding: 16px 18px;
	background: #eef3ff;
	border: 1px solid #c7d6fb;
	border-radius: 10px;
}
.dpm-tgi-kq-nhan { font-size: 14px; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-kq-hang { display: flex; flex-wrap: wrap; gap: 8px 32px; margin-top: 2px; }
.dpm-tgi-kq-cot { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.dpm-tgi-kq-ten { width: 100%; font-size: 13px; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-kq-so { font-size: 30px; font-weight: 700; color: var(--dpm-tgi-chinh); line-height: 1.2; }
.dpm-tgi-kq-cot small { color: var(--dpm-tgi-chu-phu); font-size: 14px; }
.dpm-tgi-kq-tong { width: 100%; font-size: 15px; }
.dpm-tgi-kq-phu { margin-top: 6px; font-size: 12px; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-goi-y { min-height: 1em; margin: 6px 0; font-size: 13px; color: #b45309; }
.dpm-tgi-goi-y:empty { margin: 0; }

/* Cắt giấy */
.dpm-tgi-cat { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin-top: 12px; }
.dpm-tgi-cat:empty { display: none; }
.dpm-tgi-cat-chu { flex: 1 1 260px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.dpm-tgi-cat-tieu-de { font-size: 15px; }
.dpm-tgi-can-mua { padding: 8px 10px; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 8px; }
.dpm-tgi-thua { color: #111827; font-size: 13px; }
.dpm-tgi-so-do { flex: 0 1 220px; text-align: center; }
.dpm-tgi-so-do svg { display: block; width: 100%; max-width: 220px; max-height: 280px; margin: 0 auto; }
.dpm-tgi-so-do-chu { margin-top: 4px; font-size: 12px; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-thong-dung { margin-top: 12px; }
.dpm-tgi-thong-dung > summary { cursor: pointer; color: var(--dpm-tgi-chinh); font-size: 14px; }

/* Bảng nhỏ các khổ */
.dpm-tgi-bang { width: 100%; margin: 0; border-collapse: collapse; font-size: 14px; }
.dpm-tgi-bang th, .dpm-tgi-bang td {
	padding: 6px 8px;
	border: 0;
	border-bottom: 1px solid #edf0f5;
	text-align: right;
	white-space: nowrap;
	background: none;
}
.dpm-tgi-bang th:first-child, .dpm-tgi-bang td:first-child { text-align: left; }
.dpm-tgi-bang th { font-size: 12px; font-weight: 600; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-bang td small { margin-left: 6px; font-size: 12px; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-bang tr.dpm-tgi-trung td { background: #eef3ff; font-weight: 600; }

@media (max-width: 600px) {
	.dpm-tgi { padding: 14px; }
	.dpm-tgi-dong-o { grid-template-columns: 1fr; gap: 4px; }
	.dpm-tgi-kho2 { grid-template-columns: 1fr 1fr auto; }
	.dpm-tgi-kho2 select { grid-column: 1 / -1; }
	.dpm-tgi-thong-tin { margin-left: 0; }
	.dpm-tgi-kq-so { font-size: 26px; }
	.dpm-tgi-bang td small { display: block; margin: 0; }
}

/* ---------- Trang quản trị ---------- */
.dpm-tgi-qt .dpm-tgi { max-width: 760px; }
.dpm-tgi-huong-dan { max-width: 1100px; }
.dpm-tgi-hop {
	max-width: 1200px;
	margin: 16px 0;
	padding: 14px 16px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
}
.dpm-tgi-hop h2 { margin-top: 0; font-size: 1.15em; }
.dpm-tgi-ma { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dpm-tgi-ma code { padding: 6px 10px; font-size: 14px; }

.dpm-tgi-kho-dau { display: flex; gap: 14px; align-items: center; margin: 12px 0; }
.dpm-tgi-dm {
	max-width: 1200px;
	margin: 0 0 8px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
}
.dpm-tgi-dm > summary {
	display: flex;
	gap: 14px;
	align-items: baseline;
	padding: 12px 16px;
	cursor: pointer;
	list-style: none;
}
.dpm-tgi-dm > summary::-webkit-details-marker { display: none; }
.dpm-tgi-dm > summary::before { content: "▸"; color: #2271b1; width: 12px; }
.dpm-tgi-dm[open] > summary::before { content: "▾"; }
.dpm-tgi-dm > summary strong { font-size: 15px; min-width: 120px; }
.dpm-tgi-dm-tt { color: #646970; font-size: 13px; }
.dpm-tgi-dm[open] > summary { border-bottom: 1px solid #f0f0f1; }
.dpm-tgi-dm-than { padding: 12px 16px 14px; }
.dpm-tgi-dm-dau { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 10px; }
.dpm-tgi-dm-dau label { display: flex; flex-direction: column; gap: 3px; }
.dpm-tgi-dm-dau label span { font-size: 12px; color: #646970; }
.dpm-tgi-dm-dau input[type="text"] { min-width: 170px; }
.dpm-tgi-dm-dau .dpm-tgi-hep input { min-width: 0; width: 70px; }
.dpm-tgi-dm-dau .dpm-tgi-rong { flex: 1; }
.dpm-tgi-dm-dau .dpm-tgi-rong input { width: 100%; }

.dpm-tgi-bang-kho { width: 100%; border-collapse: collapse; }
.dpm-tgi-bang-kho th, .dpm-tgi-bang-kho td { padding: 4px 5px; border-bottom: 1px solid #f0f0f1; vertical-align: middle; text-align: left; }
.dpm-tgi-bang-kho th { font-size: 12px; font-weight: 600; color: #50575e; background: #f6f7f7; }
.dpm-tgi-bang-kho input[type="text"], .dpm-tgi-bang-kho select { width: 100%; min-height: 32px; }
.dpm-tgi-bang-kho .c-dl { width: 14%; }
.dpm-tgi-bang-kho .c-hang { width: 12%; }
.dpm-tgi-bang-kho .c-kho { width: 11%; }
.dpm-tgi-bang-kho .c-cach { width: 12%; }
.dpm-tgi-bang-kho .c-gia { width: 12%; }
.dpm-tgi-bang-kho .c-a4 { width: 12%; text-align: right; white-space: nowrap; font-size: 13px; }
.dpm-tgi-bang-kho .c-ngay { width: 8%; white-space: nowrap; font-size: 13px; }
.dpm-tgi-bang-kho .c-xoa { width: 3%; text-align: center; }
.dpm-tgi-bang-kho tr.dpm-tgi-cu .c-ngay { color: #b32d2e; font-weight: 600; }
.dpm-tgi-bang-kho input.dpm-tgi-tay { border-color: #dba617; background: #fcf9e8; }
.dpm-tgi-rd { display: flex; align-items: center; gap: 3px; }
.dpm-tgi-rd i { font-style: normal; color: #646970; }
.dpm-tgi-bang-kho .dpm-tgi-rd input[type="text"] { width: 50%; min-width: 0; text-align: center; }
.dpm-tgi-rd.dpm-tgi-can input { border-color: #d63638; }
.dpm-tgi-toram { display: flex; align-items: center; gap: 4px; margin-top: 3px; font-size: 12px; color: #646970; }
.dpm-tgi-toram[hidden] { display: none; }
.dpm-tgi-toram input[type="text"] { width: 64px; min-height: 26px; }
.dpm-tgi-nut-xoa { border: 0; background: none; color: #b32d2e; font-size: 18px; cursor: pointer; line-height: 1; }
.dpm-tgi-dm-cong-cu { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 10px; }
.dpm-tgi-cum { display: inline-flex; gap: 6px; align-items: center; color: #50575e; }
.dpm-tgi-cum input[type="text"] { width: 110px; }
.dpm-tgi-xoa-dm { margin-left: auto !important; }

.dpm-tgi-thanh-luu {
	position: sticky;
	bottom: 0;
	z-index: 5;
	display: flex;
	gap: 14px;
	align-items: center;
	justify-content: flex-end;
	max-width: 1200px;
	margin-top: 12px;
	padding: 10px 16px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	box-shadow: 0 -2px 8px rgba(0, 0, 0, .05);
}
#dpm-tgi-trang-thai { color: #b45309; }

/* 1.2.1: kết quả chữ đơn giản + bảng so sánh tờ to */
.dpm-tgi-kq-lon { font-size: 20px; line-height: 1.35; color: var(--dpm-tgi-chu); }
.dpm-tgi-kq-lon b { color: var(--dpm-tgi-chinh); font-size: 24px; }
.dpm-tgi-kq-bang { width: 100%; margin: 10px 0 0; border-collapse: collapse; font-size: 15px; }
.dpm-tgi-kq-bang th, .dpm-tgi-kq-bang td { padding: 5px 0; border: 0; border-top: 1px solid #d6e0fb; background: none; text-align: left; vertical-align: top; }
.dpm-tgi-kq-bang th { width: 45%; font-weight: normal; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-kq-tien td b { font-size: 18px; color: #047857; }
.dpm-tgi-cat .dpm-tgi-so-do { order: -1; }
.dpm-tgi-so-sanh { margin-top: 16px; }
.dpm-tgi-so-sanh:empty { display: none; }
.dpm-tgi-so-sanh-ten { margin-bottom: 6px; font-weight: 600; }
.dpm-tgi-so-sanh-ten span { font-weight: normal; font-size: 13px; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-cuon { overflow-x: auto; }
.dpm-tgi-so-sanh .dpm-tgi-bang tbody tr { cursor: pointer; }
.dpm-tgi-so-sanh .dpm-tgi-bang tbody tr:hover td { background: #f5f7fb; }
.dpm-tgi-so-sanh .dpm-tgi-bang tr.dpm-tgi-dang-chon td { background: #eef3ff; font-weight: 600; }
.dpm-tgi-so-sanh .dpm-tgi-bang tr.dpm-tgi-tot td { background: #ecfdf5; }
.dpm-tgi-so-sanh .dpm-tgi-bang tr.dpm-tgi-tot.dpm-tgi-dang-chon td { background: #d1fae5; }
.dpm-tgi-bang td em { margin-left: 4px; padding: 1px 6px; border-radius: 10px; background: #047857; color: #fff; font-size: 11px; font-style: normal; font-weight: 600; }
.dpm-tgi-bang td.dpm-tgi-mo { color: var(--dpm-tgi-chu-phu); text-align: left; }
.dpm-tgi-cum-o em { font-size: 13px; }
@media (max-width: 600px) {
	.dpm-tgi-kq-lon { font-size: 17px; }
	.dpm-tgi-kq-lon b { font-size: 20px; }
	.dpm-tgi-kq-bang th { width: 50%; }
	.dpm-tgi-so-sanh .dpm-tgi-phu { display: none; }
	.dpm-tgi-so-sanh .dpm-tgi-bang td em { display: table; margin: 2px 0 0; }
	.dpm-tgi-so-sanh .dpm-tgi-bang { font-size: 13px; }
	.dpm-tgi-so-sanh .dpm-tgi-bang th, .dpm-tgi-so-sanh .dpm-tgi-bang td { padding: 6px 5px; }
}

/* 1.2.2: sơ đồ tự xoay theo màn hình */
.dpm-tgi-cat-ngang .dpm-tgi-so-do { flex: 0 1 340px; }
.dpm-tgi-cat-ngang .dpm-tgi-so-do svg { max-width: 340px; max-height: 260px; }
.dpm-tgi-cat:not(.dpm-tgi-cat-ngang) .dpm-tgi-so-do { flex: 1 1 100%; }
.dpm-tgi-cat:not(.dpm-tgi-cat-ngang) .dpm-tgi-so-do svg { max-width: 100%; max-height: 75vh; }

/* 1.2.2: nhập / xuất kho giấy */
.dpm-tgi-nhap-xuat .dpm-tgi-hang-nut { align-items: center; margin-top: 0; }
.dpm-tgi-tt-nhap { margin: 8px 0 0; color: #1d4ed8; }
.dpm-tgi-tt-nhap:empty { display: none; }
.dpm-tgi-tt-nhap.dpm-tgi-tt-loi { color: #b32d2e; }
.dpm-tgi-khoi-phuc { margin-top: 6px; }
.dpm-tgi-xem-truoc { border-color: #2271b1; box-shadow: 0 0 0 1px #2271b1; }
.dpm-tgi-xem-truoc h2 small { font-weight: normal; color: #646970; }
.dpm-tgi-xt-vat { margin: 0 0 10px; padding: 8px 12px; background: #fcf9e8; border-left: 4px solid #dba617; }
.dpm-tgi-bang-kho tr.dpm-tgi-loi-dong td { background: #fcf0f1; }
.dpm-tgi-che-do label { line-height: 2; }
.dpm-tgi-qt .dpm-tgi-ma { margin-bottom: 8px; }
.dpm-tgi-qt .dpm-tgi-ma .description { flex: 1 1 300px; }
.dpm-tgi-hang-nut { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.dpm-tgi-xem-truoc .dpm-tgi-bang-kho .c-kho { width: 13%; }
.dpm-tgi-xem-truoc .dpm-tgi-bang-kho .c-loai { width: 16%; }

/* 1.2.3: lãi cho đơn, bảng lãi tịnh tiến */
.dpm-tgi-nut-nho { padding: 4px 10px; border: 1px solid var(--dpm-tgi-vien); border-radius: 6px; background: #fff; color: var(--dpm-tgi-chinh); font-size: 13px; cursor: pointer; white-space: nowrap; }
.dpm-tgi-ghi-nho { margin: 4px 0 0 100px; font-size: 12px; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-ghi-nho:empty { display: none; }
.dpm-tgi [hidden] { display: none !important; }
.dpm-tgi-bang-lai { max-width: 900px; }
.dpm-tgi-bang-lai input[type="text"] { width: 100%; }
.dpm-tgi-bang-lai td[data-vi-du] { font-size: 13px; color: #50575e; }
.dpm-tgi-thu-lai { margin-top: 10px; }
.dpm-tgi-thu-lai input[type="text"] { width: 130px; }
@media (max-width: 600px) { .dpm-tgi-ghi-nho { margin-left: 0; } }

/* 1.2.4: dòng giá nhập / giá bán trong kho (2 ô) */
.dpm-tgi-hai-o { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.dpm-tgi-hai-o output {
	display: flex;
	align-items: center;
	min-height: 42px;
	padding: 8px 10px;
	border: 1px solid var(--dpm-tgi-vien);
	border-radius: 8px;
	background: #fff;
	font-weight: 600;
	font-size: 15px;
}
.dpm-tgi-chon-gia { display: flex; align-items: center; gap: 6px; cursor: pointer; line-height: 1.25; }
.dpm-tgi-chon-gia input { margin: 0; }
.dpm-tgi-dong-gia:has(input[data-tu]:checked) output { border-color: var(--dpm-tgi-chinh); background: #eef3ff; color: var(--dpm-tgi-chinh); }
.dpm-tgi-dong-gia:has(input[data-tu]:checked) .dpm-tgi-chon-gia { color: var(--dpm-tgi-chinh); font-weight: 600; }
.dpm-tgi-kq-bang td small { color: var(--dpm-tgi-chu-phu); font-size: 12px; }
@media (max-width: 600px) { .dpm-tgi-hai-o output { font-size: 14px; } }

/* 1.2.5: dòng hướng dẫn dưới tiêu đề khối */
.dpm-tgi-huong-dan-nho { margin: -4px 0 10px; font-size: 13px; color: var(--dpm-tgi-chu-phu); line-height: 1.45; }
.dpm-tgi-huong-dan-nho span { font-style: italic; }
.dpm-tgi-ghi-nho[data-ghi-gia] { margin: -2px 0 8px 100px; color: #b45309; }
@media (max-width: 600px) { .dpm-tgi-ghi-nho[data-ghi-gia] { margin-left: 0; } }

/* 1.3.0: trạng thái AI, lời nhắc, so sánh giá cũ / mới */
.dpm-tgi-tt-co { color: #047857; }
.dpm-tgi-tt-chua { color: #b45309; }
.dpm-tgi-dong-tt { margin: 0 0 10px; }
.dpm-tgi-hop-tt p { margin: 6px 0; font-size: 14px; }
.dpm-tgi-loi-nhac textarea { font-size: 13px; line-height: 1.5; }
.dpm-tgi-lan-truoc { align-items: center; }
.dpm-tgi-lan-truoc form { margin: 0; }
.dpm-tgi-xt-tom-tat { margin: 6px 0 10px; font-weight: 600; }
.dpm-tgi-bang-ss .c-cu { width: 11%; white-space: nowrap; font-size: 13px; color: #50575e; }
.dpm-tgi-bang-ss .c-chenh { width: 13%; white-space: nowrap; font-size: 13px; font-weight: 600; }
.dpm-tgi-ss-tang { color: #b91c1c; }
.dpm-tgi-ss-giam { color: #047857; }
.dpm-tgi-ss-moi { color: #1d4ed8; }
.dpm-tgi-ss-xoa { color: #b32d2e; }
.dpm-tgi-ss-bang, .dpm-tgi-ss-doi { color: #646970; font-weight: normal !important; }
.dpm-tgi-dong-xoa td { color: #8c8f94; text-decoration: line-through; }
#dpm-tgi-xt-bi-xoa h3 { margin: 14px 0 6px; font-size: 14px; color: #b32d2e; }

/* 1.3.2 – Tiền giấy chia ra, cạnh sơ đồ cắt: chữ nhỏ, đen bình thường */
.dpm-tgi-chia { margin-top: 6px; font-size: 13px; line-height: 1.6; color: #111827; }
.dpm-tgi-chia b { font-size: 14px; }

/* ---------- 1.4.0: Tính giá sản phẩm ---------- */
.dpm-tgi.dpm-tgi-sp, .dpm-tgi-qt .dpm-tgi.dpm-tgi-sp { max-width: 900px; }
.dpm-tgi-sp .dpm-tgi-dong-o { grid-template-columns: 120px 1fr; }
.dpm-tgi-sp .dpm-tgi-thong-tin { margin-left: 130px; }
.dpm-tgi-cum-mau { flex-wrap: wrap; }
.dpm-tgi-cum-mau label { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.dpm-tgi .dpm-tgi-cum-mau input[type="text"] { width: 60px; text-align: center; font-weight: 600; }
.dpm-tgi-tich { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; cursor: pointer; }
.dpm-tgi-gc { padding: 6px 8px; border-bottom: 1px solid var(--dpm-tgi-vien); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.dpm-tgi-gc:last-child { border-bottom: 0; }
.dpm-tgi-gc-chon { background: #fff; border-radius: 8px; }
.dpm-tgi-gc-ten { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.dpm-tgi-gc-ten small { color: var(--dpm-tgi-chu-phu); font-size: 12px; }
.dpm-tgi .dpm-tgi-gc-ten input[type="text"] { flex: 1; }
.dpm-tgi-gc-tien { font-weight: 700; color: var(--dpm-tgi-chinh); }
.dpm-tgi-gc-o { width: 100%; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; padding: 4px 0 4px 26px; }
.dpm-tgi-gc-o label { display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: #111827; }
.dpm-tgi-gc-o label.dpm-tgi-tich { flex-direction: row; font-size: 13px; }
.dpm-tgi .dpm-tgi-gc-o input[type="text"] { padding: 4px 6px; min-height: 30px; text-align: right; }
.dpm-tgi .dpm-tgi-gc-o select { width: auto; min-height: 30px; padding: 2px 6px; }
.dpm-tgi-gc-ghi { width: 100%; font-size: 12px; color: #111827; }
.dpm-tgi-xoa-gc { color: #b91c1c; font-size: 16px; text-decoration: none; }
.dpm-tgi-bang-cp td { vertical-align: top; }
.dpm-tgi-bang .dpm-tgi-cp-chi { text-align: left; font-size: 13px; color: #111827; }
.dpm-tgi-hai-dau { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 10px; }
.dpm-tgi-hai-dau > div { padding: 10px 12px; background: #fff; border: 1px solid var(--dpm-tgi-vien); border-radius: 8px; display: flex; flex-direction: column; gap: 6px; }
.dpm-tgi-hai-dau label { display: grid; grid-template-columns: 70px 1fr; align-items: center; gap: 6px; font-size: 14px; }
.dpm-tgi-lai-dau { font-size: 13px; color: #111827; line-height: 1.5; }
.dpm-tgi-am { color: #b91c1c; }
.dpm-tgi-duong { color: #047857; }
.dpm-tgi-ds-dl { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.dpm-tgi-cuon { overflow-x: auto; margin-top: 8px; }
.dpm-tgi-bang-gia td { vertical-align: top; }
.dpm-tgi .dpm-tgi-bang-gia input[type="text"] { width: 100px; min-height: 30px; padding: 3px 6px; text-align: right; font-weight: 600; }
.dpm-tgi .dpm-tgi-bang-gia td small { display: block; margin: 2px 0 0; font-size: 12px; color: #111827; text-align: right; }
.dpm-tgi .dpm-tgi-bang-gia td small.dpm-tgi-am { color: #b91c1c; }
.dpm-tgi-nut-bang { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.dpm-tgi-bang-may input[type="text"] { min-width: 60px; }
.dpm-tgi-bang-may td:first-child input { min-width: 170px; }
.dpm-tgi-bang-kho .c-giua { text-align: center; }
@media (max-width: 600px) {
	.dpm-tgi-sp .dpm-tgi-dong-o { grid-template-columns: 1fr; }
	.dpm-tgi-sp .dpm-tgi-thong-tin { margin-left: 0; }
	.dpm-tgi-hai-dau { grid-template-columns: 1fr; }
	.dpm-tgi-gc-o { padding-left: 0; }
}

/* ---------- 1.4.1: Nhà in, kỹ thuật số, so sánh cách in ---------- */
.dpm-tgi-pt { margin-top: 14px; }
.dpm-tgi-khuyen { margin: 0 0 6px; padding: 8px 10px; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 8px; font-size: 15px; }
.dpm-tgi-khuyen-phu { margin: 0 0 8px; font-size: 14px; color: #111827; }
.dpm-tgi-bang-pt tbody tr { cursor: pointer; }
.dpm-tgi-bang-pt tbody tr:hover td { background: #f3f6fc; }
.dpm-tgi-bang tr.dpm-tgi-re td { background: #ecfdf5; }
.dpm-tgi-bang-pt td small { color: #111827; }
.dpm-tgi-bang-gia td small.dpm-tgi-cach { display: block; margin: 2px 0 0; font-size: 12px; font-weight: 400; color: #111827; text-align: left; }
.dpm-tgi-bang-hep { width: auto; min-width: 360px; }
.dpm-tgi-bang-hep td { white-space: nowrap; }
.dpm-tgi-nut-khoi { display: flex; gap: 16px; align-items: center; margin: 10px 0 0; }
.dpm-tgi-nut-khoi .dpm-tgi-xoa-dong { color: #b91c1c; }
.dpm-tgi-bang-may th { font-size: 11px; }

/* ---------- 1.4.2: bảng giá nhà in, bảng giá & chênh lệch ---------- */
.dpm-tgi-may { margin: 0 0 12px; padding: 10px 12px; border: 1px solid #dcdcde; border-left: 4px solid #2271b1; border-radius: 6px; background: #fbfbfc; }
.dpm-tgi-bang-gia-in { width: auto; min-width: 680px; }
.dpm-tgi-bang-gia-in th { font-size: 11px; }
.dpm-tgi-bang-gia-in input[type="text"] { width: 110px; }
.dpm-tgi-xoa-may { color: #b91c1c; }
.dpm-tgi-hop-gia { margin: 0 0 10px; padding: 8px 10px; background: #fff; border: 1px dashed var(--dpm-tgi-vien); border-radius: 8px; }
.dpm-tgi .dpm-tgi-hop-gia input[type="text"] { width: 90px; text-align: right; }
.dpm-tgi .dpm-tgi-hop-gia input.dpm-tgi-o-tien { width: 120px; }
.dpm-tgi .dpm-tgi-hop-gia select { width: auto; }
.dpm-tgi-hop-gia .dpm-tgi-kq-phu { margin: 0 0 6px; }
.dpm-tgi .dpm-tgi-cum-mau input[type="text"].dpm-tgi-o-tien { width: 120px; }
.dpm-tgi-tra { font-size: 15px; }
.dpm-tgi-bang-gia td.dpm-tgi-sua { background: #fef9c3; }
.dpm-tgi-bang-gia td.dpm-tgi-lo { background: #fee2e2; }
.dpm-tgi-khach .dpm-tgi-noi-bo { display: none !important; }
.dpm-tgi-khach .dpm-tgi-bang-gia td.dpm-tgi-sua, .dpm-tgi-khach .dpm-tgi-bang-gia td.dpm-tgi-lo { background: transparent; }
.dpm-tgi-nut-tren { margin: 4px 0 6px; }

/* ---------- 1.4.3: chữ dài tự xuống dòng ---------- */
.dpm-tgi-bang-cp { table-layout: auto; }
.dpm-tgi-bang .dpm-tgi-cp-chi, .dpm-tgi-bang-cp td:nth-child(2), .dpm-tgi-bang-pt td:first-child, .dpm-tgi-bang-gia th { white-space: normal; overflow-wrap: anywhere; }
.dpm-tgi-bang-cp td:first-child { white-space: normal; min-width: 70px; }
.dpm-tgi-bang-cp td:last-child, .dpm-tgi-bang-cp th:last-child { width: 1%; }
.dpm-tgi-kq-nhan, .dpm-tgi-kq-tong, .dpm-tgi-khuyen, .dpm-tgi-khuyen-phu, .dpm-tgi-thong-tin { overflow-wrap: anywhere; }
.dpm-tgi-bang-gia small { white-space: normal; }

/* ---------- 1.4.5: phải trả cho ai, điểm hòa ---------- */
.dpm-tgi-phai-tra { margin-top: 10px; padding: 8px 12px; background: #fff; border: 1px solid var(--dpm-tgi-vien); border-radius: 8px; font-size: 14px; }
.dpm-tgi-phai-tra > div { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; border-bottom: 1px dashed #edf0f5; }
.dpm-tgi-phai-tra > div:last-child { border-bottom: 0; }
.dpm-tgi-phai-tra span { overflow-wrap: anywhere; }
.dpm-tgi-bang-hoa { max-width: 560px; }
.dpm-tgi-bang td.dpm-tgi-re-o { color: #047857; font-weight: 700; }
.dpm-tgi-goi-moc { margin-top: 8px; }

/* ---------- 1.4.6: giá báo khách, hai bảng giá ---------- */
.dpm-tgi-gb { margin-top: 10px; }
.dpm-tgi-bang-gb { max-width: 560px; }
.dpm-tgi-bang-gb td:first-child { white-space: normal; }
.dpm-tgi-bang-gb tr.dpm-tgi-trung td { font-size: 16px; color: var(--dpm-tgi-chinh); }
.dpm-tgi-canh-bao { margin: 6px 0; padding: 6px 10px; background: #fef9c3; border: 1px solid #fde68a; border-radius: 8px; font-size: 14px; color: #111827; }
.dpm-tgi-tab { display: flex; gap: 6px; margin: 0 0 10px; flex-wrap: wrap; }
.dpm-tgi-tab-nut { padding: 6px 14px; border: 1px solid var(--dpm-tgi-vien); border-radius: 18px; background: #fff; color: #111827; font-size: 14px; cursor: pointer; }
.dpm-tgi-tab-nut.dpm-tgi-tab-chon { background: var(--dpm-tgi-chinh); border-color: var(--dpm-tgi-chinh); color: #fff; font-weight: 600; }
.dpm-tgi-khoi-gb .dpm-tgi-cum-mau input[type="text"] { width: 80px; text-align: right; }

/* ---------- 1.4.7: bảng gọn kiểu "Đại Phúc Minh – Đỏ trắng" (như DPM Bảng Báo Giá) ---------- */
.dpm-tgi .dpm-tgi-bg { width: auto; min-width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; line-height: 1.35; background: #fff; border: 1px solid #ead0d2; border-radius: 8px; overflow: hidden; }
.dpm-tgi .dpm-tgi-bg th, .dpm-tgi .dpm-tgi-bg td { padding: 6px 10px; text-align: right; white-space: nowrap; border: 0; border-right: 1px solid #ead0d2; border-bottom: 1px solid #ead0d2; background: none; color: #253242; }
.dpm-tgi .dpm-tgi-bg th:last-child, .dpm-tgi .dpm-tgi-bg td:last-child { border-right: 0; }
.dpm-tgi .dpm-tgi-bg tbody tr:last-child td { border-bottom: 0; }
.dpm-tgi .dpm-tgi-bg th:first-child, .dpm-tgi .dpm-tgi-bg td:first-child { text-align: left; }
.dpm-tgi .dpm-tgi-bg thead th { background: #b5121b; color: #fff; font-weight: 700; font-size: 13px; }
.dpm-tgi .dpm-tgi-bg tbody tr:nth-child(even) td { background: #fff5f5; }
/* 1.13.3: bỏ tô hồng cả dòng khi rê chuột — thay bằng thước chữ thập (.dpm-tgi-ro) */
.dpm-tgi .dpm-tgi-bg td.dpm-tgi-co-mau { background: var(--mau) !important; }
.dpm-tgi .dpm-tgi-bg td.dpm-tgi-sua { box-shadow: inset 0 0 0 2px #facc15; }
.dpm-tgi .dpm-tgi-bg td.dpm-tgi-lo { background: #fee2e2 !important; color: #b91c1c; }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-hoa td { background: #fee2e2 !important; color: #b91c1c; font-weight: 700; border-top: 2px solid #dc2626; border-bottom: 2px solid #dc2626; }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-trung td { background: #fee2e2; color: #b91c1c; font-weight: 700; }
.dpm-tgi .dpm-tgi-bg td small { margin-left: 4px; font-size: 11px; color: #374151; }
.dpm-tgi .dpm-tgi-bg td.dpm-tgi-re-o { color: #047857; font-weight: 700; }
.dpm-tgi-o-gia span[contenteditable] { outline: 0; padding: 0 2px; border-radius: 3px; cursor: text; }
.dpm-tgi-o-gia span[contenteditable]:focus { background: #fff; box-shadow: 0 0 0 2px #b5121b; }
.dpm-tgi-bg .dpm-tgi-cl { display: none; }
.dpm-tgi-hien-cl .dpm-tgi-bg .dpm-tgi-cl { display: block; margin: 1px 0 0; font-size: 11px; color: #374151; }
.dpm-tgi-khach .dpm-tgi-bg td.dpm-tgi-co-mau, .dpm-tgi-khach .dpm-tgi-bg td.dpm-tgi-lo { background: inherit !important; color: inherit; }
.dpm-tgi-khach .dpm-tgi-bg td.dpm-tgi-sua { box-shadow: none; }
.dpm-tgi-khach .dpm-tgi-noi-bo-nut [data-hien-cl] { display: none; }
.dpm-tgi-bang-dau { margin: 2px 0 6px; font-size: 14px; }
.dpm-tgi-bang-chan { margin-top: 6px; font-size: 12px; color: #374151; }
.dpm-tgi-goi-moc { margin-top: 6px; padding: 6px 10px; border-left: 3px solid #b5121b; background: #fff5f5; font-size: 13px; }
.dpm-tgi-kho-chip { padding: 3px 8px; border-radius: 6px; border: 1px solid rgba(0,0,0,.08); }
.dpm-tgi-kho-chip small { font-size: 12px; color: #374151; }
.dpm-tgi-tom-kho { width: 100%; margin-top: 4px; font-size: 13px; }
.dpm-tgi-tom-kho span { display: inline-block; margin: 2px 4px 2px 0; padding: 1px 8px; border-radius: 10px; }
.dpm-tgi-khoi-bang .dpm-tgi-cuon { margin-top: 4px; }

/* ---------- 1.4.8: giao diện gọn, 2 cột ---------- */
.dpm-tgi.dpm-tgi-sp, .dpm-tgi-qt .dpm-tgi.dpm-tgi-sp { max-width: 1440px; padding: 14px 16px; }
.dpm-tgi-sp .dpm-tgi-khoi { margin: 0 0 10px; padding: 8px 12px 10px; }
.dpm-tgi-sp .dpm-tgi-khoi-ten { margin-bottom: 4px; font-size: 14px; }
.dpm-tgi-i { display: inline-block; cursor: help; color: var(--dpm-tgi-chinh); font-weight: 400; font-size: 13px; }
.dpm-tgi-hang { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: flex-end; margin: 0 0 6px; }
.dpm-tgi-hang:last-child { margin-bottom: 0; }
.dpm-tgi-o { display: flex; flex-direction: column; gap: 2px; margin: 0; min-width: 0; }
.dpm-tgi-o > span:first-child { font-size: 12px; color: #374151; white-space: nowrap; }
.dpm-tgi-sp .dpm-tgi-o input[type="text"], .dpm-tgi-sp .dpm-tgi-o select { min-height: 32px; padding: 4px 8px; font-size: 14px; }
.dpm-tgi-o-rong { flex: 1 1 170px; }
.dpm-tgi-o-rong input, .dpm-tgi-o-rong select { width: 100%; }
.dpm-tgi .dpm-tgi-o input.dpm-tgi-o-nho { width: 58px; text-align: center; }
.dpm-tgi .dpm-tgi-o input.dpm-tgi-o-so { width: 104px; text-align: right; }
.dpm-tgi-sp .dpm-tgi-o select { width: auto; min-width: 110px; max-width: 260px; }
.dpm-tgi-o-kho .dpm-tgi-kho2 { grid-template-columns: 86px 64px 64px auto; gap: 4px; }
.dpm-tgi-o-kho .dpm-tgi-kho2 label span { display: none; }
.dpm-tgi .dpm-tgi-o-kho .dpm-tgi-kho2 select { min-width: 0; width: 86px; }
.dpm-tgi .dpm-tgi-o-kho .dpm-tgi-kho2 input[type="text"] { width: 64px; padding: 4px; }
.dpm-tgi-cum-tich { display: flex; gap: 10px; min-height: 32px; align-items: center; }
.dpm-tgi-o em[data-chu="con"] { font-style: normal; font-size: 11px; color: #374151; }
.dpm-tgi-cum-ct { gap: 4px; }
.dpm-tgi .dpm-tgi-cum-ct input[type="text"] { width: 58px; text-align: right; }
.dpm-tgi-cum-ct em { font-style: normal; font-size: 12px; color: #374151; }
/* Gia công: chip hàng ngang */
.dpm-tgi-gc-hang { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dpm-tgi-gc-hang [data-ds-gc] { display: contents; }
.dpm-tgi-sp .dpm-tgi-gc { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; width: auto; padding: 3px 9px; border: 1px solid var(--dpm-tgi-vien); border-radius: 16px; background: #fff; font-size: 14px; }
.dpm-tgi-sp .dpm-tgi-gc:last-child { border-bottom: 1px solid var(--dpm-tgi-vien); }
.dpm-tgi-sp .dpm-tgi-gc-chon { border-color: var(--dpm-tgi-chinh); background: #eef3ff; border-radius: 10px; }
.dpm-tgi-sp .dpm-tgi-gc-ten { flex: none; gap: 5px; font-weight: 600; }
.dpm-tgi-sp .dpm-tgi-gc-o { display: inline-flex; flex-wrap: wrap; width: auto; padding: 0; gap: 4px; align-items: center; }
.dpm-tgi.dpm-tgi-sp .dpm-tgi-gc-o input[type="text"] { width: 70px; min-height: 26px; padding: 2px 5px; font-size: 13px; text-align: right; }
.dpm-tgi.dpm-tgi-sp .dpm-tgi-gc-o input.dpm-tgi-o-x { width: 34px; text-align: center; }
.dpm-tgi.dpm-tgi-sp .dpm-tgi-gc-o select { min-height: 26px; padding: 1px 4px; font-size: 13px; width: auto; }
.dpm-tgi.dpm-tgi-sp .dpm-tgi-gc-tenmoi { width: 110px; min-height: 26px; padding: 2px 5px; }
.dpm-tgi-sp .dpm-tgi-gc-tien { font-size: 13px; }
/* Giá báo một dòng */
.dpm-tgi-gb-tom > summary { display: flex; flex-wrap: wrap; gap: 4px 16px; align-items: baseline; padding: 8px 12px; background: #fff; border: 1px solid var(--dpm-tgi-vien); border-left: 4px solid #b5121b; border-radius: 8px; cursor: pointer; list-style: none; font-size: 14px; }
.dpm-tgi-gb-tom > summary::-webkit-details-marker { display: none; }
.dpm-tgi-gb-tom > summary b { font-size: 17px; color: var(--dpm-tgi-chinh); }
.dpm-tgi-gb-tom > summary b.dpm-tgi-duong { color: #047857; }
.dpm-tgi-gb-tom > summary b.dpm-tgi-am { color: #b91c1c; }
.dpm-tgi-gb-mo { margin-left: auto; font-size: 12px; color: #374151; }
.dpm-tgi-gb-tom[open] .dpm-tgi-bang-gb { margin-top: 6px; }
.dpm-tgi-cot-phai .dpm-tgi-gb { margin: 0 0 10px; }
.dpm-tgi-cot-phai .dpm-tgi-kq { margin-top: 0; padding: 10px 12px; }
.dpm-tgi-cot-phai .dpm-tgi-kq-so { font-size: 24px; }
/* Bảng giá: tiêu đề một hàng */
.dpm-tgi-hang-bang { align-items: center; }
.dpm-tgi-hang-bang .dpm-tgi-khoi-ten { margin: 0; }
.dpm-tgi-hang-bang .dpm-tgi-tab { margin: 0; }
.dpm-tgi-o-ngang { flex-direction: row; align-items: center; gap: 6px; margin-left: auto; }
/* Dòng điểm hòa: nền đỏ sậm, chữ vàng, chỉ ghi số */
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-hoa td, .dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-hoa td.dpm-tgi-co-mau { background: #7f1d1d !important; color: #fde047 !important; font-weight: 700; border-top: 0; border-bottom: 1px solid #7f1d1d; }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-hoa td.dpm-tgi-re-o, .dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-hoa td.dpm-tgi-am { color: #fde047 !important; }
.dpm-tgi .dpm-tgi-bg thead tr + tr th { font-size: 12px; font-weight: 600; background: #c9252e; }
.dpm-tgi .dpm-tgi-bang-hoa th[colspan] { text-align: center; }
.dpm-tgi .dpm-tgi-bg td.dpm-tgi-am { color: #b91c1c; font-weight: 700; }

/* ---------- 1.4.9: tự co theo chỗ trống (có sidebar vẫn đẹp), ô giãn đều ---------- */
.dpm-tgi.dpm-tgi-sp { container-type: inline-size; container-name: dpmtgi; max-width: none; }
.dpm-tgi-hai-cot { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; align-items: start; }
.dpm-tgi-cot-phai { min-width: 0; }
@container dpmtgi (min-width: 1100px) {
	.dpm-tgi-hai-cot { grid-template-columns: minmax(0, 1fr) 300px; }
	.dpm-tgi-cot-phai { position: sticky; top: 40px; max-height: calc(100vh - 56px); overflow: auto; }
	.dpm-tgi-cot-phai .dpm-tgi-gb-tom > summary { flex-direction: column; gap: 4px; }
	.dpm-tgi-cot-phai .dpm-tgi-gb-tom > summary > span { display: flex; justify-content: space-between; gap: 8px; }
	.dpm-tgi-cot-phai .dpm-tgi-gb-mo { margin-left: 0; justify-content: flex-end !important; }
	.dpm-tgi-cot-phai .dpm-tgi-bang-gb td { font-size: 12px; }
}
.dpm-tgi-duoi { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 16px; align-items: start; }
@container dpmtgi (min-width: 1000px) { .dpm-tgi-duoi { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.dpm-tgi-duoi > div:empty { display: none; }
.dpm-tgi-duoi .dpm-tgi-kq { margin: 0 0 10px; }
.dpm-tgi-duoi .dpm-tgi-pt { margin-top: 0; }
/* Ô trong một hàng giãn đều, đủ chiều ngang */
.dpm-tgi-sp .dpm-tgi-hang { gap: 8px 14px; flex-wrap: wrap; }
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o { flex: 1 1 110px; }
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o-rong { flex: 3 1 220px; }
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o-kho { flex: 0 0 auto; }
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o[data-hien="offset"] { flex: 0 0 auto; }
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o:has(.dpm-tgi-cum-ct) { flex: 4 1 330px; }
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o[hidden] { display: none; }
.dpm-tgi.dpm-tgi-sp .dpm-tgi-hang .dpm-tgi-o > input[type="text"],
.dpm-tgi.dpm-tgi-sp .dpm-tgi-hang .dpm-tgi-o > select,
.dpm-tgi.dpm-tgi-sp .dpm-tgi-hang .dpm-tgi-o input.dpm-tgi-o-nho,
.dpm-tgi.dpm-tgi-sp .dpm-tgi-hang .dpm-tgi-o input.dpm-tgi-o-so { width: 100%; max-width: none; min-width: 0; }
.dpm-tgi-sp .dpm-tgi-hang .dpm-tgi-o > .dpm-tgi-cum-o { display: flex; gap: 4px; width: 100%; }
.dpm-tgi.dpm-tgi-sp .dpm-tgi-hang .dpm-tgi-o > .dpm-tgi-cum-o > input { flex: 1 1 auto; width: 100%; }
.dpm-tgi-sp .dpm-tgi-cum-ct { width: 100%; }
.dpm-tgi.dpm-tgi-sp .dpm-tgi-cum-ct input[type="text"] { flex: 1 1 50px; width: auto; min-width: 0; }
.dpm-tgi-sp .dpm-tgi-gc-hang { gap: 8px 10px; }
/* Cột phải: tóm tắt */
.dpm-tgi-tom { margin: 0 0 10px; padding: 10px 12px; background: #fff; border: 1px solid var(--dpm-tgi-vien); border-radius: 8px; font-size: 14px; }
.dpm-tgi-tom-nhan { font-size: 12px; color: #374151; margin-bottom: 4px; }
.dpm-tgi-tom-dong { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; border-bottom: 1px dashed #e5e7eb; }
.dpm-tgi-tom-dong b { color: var(--dpm-tgi-chinh); }
.dpm-tgi-tom-hoa { margin-top: 8px; padding: 6px 8px; background: #7f1d1d; color: #fde047; border-radius: 6px; font-size: 13px; }
.dpm-tgi-tom-hoa b { color: #fde047; }
.dpm-tgi-tom-phu { margin-top: 6px; font-size: 12px; color: #6b7280; }
.dpm-tgi-cot-phai .dpm-tgi-goi-y:empty { display: none; }
.dpm-tgi-cot-phai .dpm-tgi-goi-y { padding: 10px 12px; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 8px; margin: 0 0 10px; }
/* Plugin khác (ví dụ Thuật ngữ) tự gắn link vào chữ trong bảng: giữ nguyên chữ thường */
.dpm-tgi.dpm-tgi-sp .dpm-tgi-bg a, .dpm-tgi.dpm-tgi-sp .dpm-tgi-ds-dl a, .dpm-tgi.dpm-tgi-sp .dpm-tgi-bang-chan a, .dpm-tgi.dpm-tgi-sp .dpm-tgi-khuyen a, .dpm-tgi.dpm-tgi-sp .dpm-tgi-khuyen-phu a, .dpm-tgi.dpm-tgi-sp .dpm-tgi-kq-phu a, .dpm-tgi.dpm-tgi-sp .dpm-tgi-goi-y-bang a, .dpm-tgi.dpm-tgi-sp [data-bang] a { color: inherit !important; text-decoration: none !important; border: 0 !important; background: none !important; font-weight: inherit; pointer-events: none; }

/* ---------- 1.4.10: màu nền từng vùng (anh đổi ở trang Giao diện & phiếu in) ---------- */
.dpm-tgi-sp [data-vung].dpm-tgi-khoi { border: 1px solid rgba(15, 23, 42, .08); border-left-width: 4px; }
.dpm-tgi-sp .dpm-tgi-khoi[data-vung="v1"] { background: var(--tgi-n-v1, #eaf2ff); border-left-color: var(--tgi-d-v1, #3b82f6); }
.dpm-tgi-sp .dpm-tgi-khoi[data-vung="v2"] { background: var(--tgi-n-v2, #e9f9ef); border-left-color: var(--tgi-d-v2, #22c55e); }
.dpm-tgi-sp .dpm-tgi-khoi[data-vung="v3"] { background: var(--tgi-n-v3, #fff7df); border-left-color: var(--tgi-d-v3, #eab308); }
.dpm-tgi-sp .dpm-tgi-khoi[data-vung="v4"] { background: var(--tgi-n-v4, #f3edff); border-left-color: var(--tgi-d-v4, #8b5cf6); }
.dpm-tgi-sp .dpm-tgi-khoi[data-vung="v5"] { background: var(--tgi-n-v5, #fff0f3); border-left-color: var(--tgi-d-v5, #e11d48); }
.dpm-tgi-sp .dpm-tgi-khoi[data-vung="v6"] { background: var(--tgi-n-v6, #ffffff); border-left-color: var(--tgi-d-v6, #94a3b8); }
.dpm-tgi-sp .dpm-tgi-cot-phai[data-vung="phai"] > div:not(:empty) { background-color: var(--tgi-n-phai, #f8fafc); }
.dpm-tgi-sp .dpm-tgi-cot-phai .dpm-tgi-gb-tom > summary, .dpm-tgi-sp .dpm-tgi-cot-phai .dpm-tgi-tom { background: var(--tgi-n-phai, #f8fafc); }
.dpm-tgi-sp .dpm-tgi-cot-phai[data-vung="phai"] > [data-gb], .dpm-tgi-sp .dpm-tgi-cot-phai[data-vung="phai"] > [data-tom] { background: none; }
/* Ô sửa trên nền màu: giữ nền trắng cho dễ đọc */
.dpm-tgi-sp [data-vung] input[type="text"], .dpm-tgi-sp [data-vung] select { background-color: #fff; }

/* Sửa: ô Thuế không bị kéo dài một mình; ô Ghi giá gọn */
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o { flex: 1 1 96px; }
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o:has(.dpm-tgi-cum-ct) { flex: 4 1 290px; }
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o:has(input.dpm-tgi-o-nho),
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o:has(input.dpm-tgi-o-so) { max-width: 240px; }
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o-rong { max-width: none; }
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o-thue { flex: 0 1 120px; max-width: 160px; }
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o-ngang { flex: 0 0 auto; margin-left: auto; max-width: none; }
.dpm-tgi.dpm-tgi-sp .dpm-tgi-hang .dpm-tgi-o-ngang > select { width: auto; min-width: 120px; }

/* Trang Giao diện & phiếu in */
.dpm-tgi-gd-mau { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin: 10px 0; }
.dpm-tgi-gd-o { display: flex; gap: 10px; align-items: center; padding: 12px; border: 1px solid #dcdcde; border-left: 5px solid #94a3b8; border-radius: 8px; cursor: pointer; font-weight: 600; }
.dpm-tgi-gd-o input[type="color"] { width: 42px; height: 32px; padding: 0; border: 1px solid #c3c4c7; border-radius: 4px; cursor: pointer; }

/* ---------- 1.5.0: bài sản phẩm ---------- */
.dpm-tgi-thanh-bai { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin: 0 0 12px; padding: 10px 12px; background: #ecfdf5; border: 1px solid #a7f3d0; border-radius: 8px; position: sticky; top: 32px; z-index: 5; }
.dpm-tgi-thanh-bai.dpm-tgi-chua-luu { background: #fffbeb; border-color: #fcd34d; }
.dpm-tgi-thanh-ten { font-size: 14px; }
.dpm-tgi-thanh-bai .dpm-tgi-nut-luu { font-weight: 700; }
.dpm-tgi-thanh-bai a.dpm-tgi-nut-nho { text-decoration: none; }
.dpm-tgi-trang-luu { margin-left: auto; font-size: 13px; color: #374151; }
.dpm-tgi-chua-luu .dpm-tgi-trang-luu { color: #b45309; font-weight: 600; }
.dpm-tgi .dpm-tgi-bg td.dpm-tgi-o-tay span { text-decoration: underline dotted #2563eb; }
.dpm-tgi-bao-nv { padding: 8px 12px; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; font-size: 14px; }
/* Bảng giá chuẩn (trang khách) */
.dpm-tgi.dpm-tgi-bang-chuan { margin: 16px 0; }
.dpm-tgi-bang-chuan .dpm-tgi-khoi { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(15,23,42,.08); border-left: 4px solid var(--tgi-d-v6, #94a3b8); background: var(--tgi-n-v6, #fff); }
.dpm-tgi-bang-chuan caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dpm-tgi-bang-chuan .dpm-tgi-bg tbody th { text-align: left; font-weight: 400; background: transparent; color: inherit; }
.dpm-tgi-bang-chuan .dpm-tgi-bg tr.dpm-tgi-dong-hoa th { background: #7f1d1d; color: #fde047; font-weight: 700; }
.dpm-tgi-bang-chuan details > summary { cursor: pointer; }

/* ---------- 1.5.1: chữ ghi trên ô gia công ---------- */
.dpm-tgi-sp .dpm-tgi-gc-o { align-items: flex-end; }
.dpm-tgi-gc-o1 { display: inline-flex; flex-direction: column; gap: 1px; margin: 0; }
.dpm-tgi-gc-o1 small { font-size: 10.5px; line-height: 1.2; color: #4b5563; font-weight: 400; white-space: nowrap; }
.dpm-tgi-gc-o1.dpm-tgi-so0 input { opacity: .5; }
.dpm-tgi-gc-o1.dpm-tgi-so0 small { opacity: .7; }
.dpm-tgi-sp .dpm-tgi-gc-tien { align-self: center; }

/* ---------- 1.5.1: trang khách ---------- */
.dpm-tgi.dpm-tgi-khach-trang { container-type: inline-size; margin: 16px 0; }
.dpm-tgi-khach-trang .dpm-tgi-khoi { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(15,23,42,.08); border-left: 4px solid #94a3b8; }
.dpm-tgi-khach-trang .dpm-tgi-khoi[data-vung="v1"] { background: var(--tgi-n-v1); border-left-color: var(--tgi-d-v1); }
.dpm-tgi-khach-trang .dpm-tgi-khoi[data-vung="v5"] { background: var(--tgi-n-v5); border-left-color: var(--tgi-d-v5); }
.dpm-tgi-khach-trang .dpm-tgi-khoi[data-vung="v6"] { background: var(--tgi-n-v6); border-left-color: var(--tgi-d-v6); }
.dpm-tgi-khach-trang .dpm-tgi-khoi-ten { font-weight: 700; color: var(--dpm-tgi-chinh, #1d4ed8); margin-bottom: 6px; }
.dpm-tgi-khach-trang .dpm-tgi-hang { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: flex-end; margin-bottom: 8px; }
.dpm-tgi-khach-trang .dpm-tgi-hang > .dpm-tgi-o { flex: 1 1 120px; }
.dpm-tgi-khach-trang .dpm-tgi-hang > .dpm-tgi-o-rong { flex: 2 1 220px; }
.dpm-tgi-khach-trang .dpm-tgi-o > span:first-child { font-size: 12px; color: #374151; }
.dpm-tgi-khach-trang .dpm-tgi-o select, .dpm-tgi-khach-trang .dpm-tgi-o input[type="text"] { width: 100%; min-height: 36px; padding: 4px 8px; font-size: 15px; background: #fff; border: 1px solid #cbd5e1; border-radius: 6px; box-sizing: border-box; }
.dpm-tgi-khach-trang .dpm-tgi-cum-o { display: flex; gap: 4px; align-items: center; }
.dpm-tgi-khach-trang .dpm-tgi-gc-hang { display: flex; flex-wrap: wrap; gap: 8px; }
.dpm-tgi-khach-trang label.dpm-tgi-gc { display: inline-flex; gap: 6px; align-items: center; padding: 5px 12px; border: 1px solid #cbd5e1; border-radius: 18px; background: #fff; cursor: pointer; font-size: 14px; }
.dpm-tgi-khach-trang label.dpm-tgi-gc-chon { border-color: var(--dpm-tgi-chinh, #1d4ed8); background: #eef3ff; font-weight: 600; }
.dpm-tgi-kq-khach { display: flex; flex-wrap: wrap; gap: 6px 28px; align-items: baseline; margin: 0 0 12px; padding: 12px 16px; border-radius: 8px; background: var(--tgi-n-phai, #f8fafc); border: 1px solid rgba(15,23,42,.08); border-left: 4px solid #b5121b; transition: opacity .15s; }
.dpm-tgi-kq-khach.dpm-tgi-dang-tinh { opacity: .55; }
.dpm-tgi-kq-khach-so span { font-size: 13px; color: #374151; margin-right: 8px; }
.dpm-tgi-kq-khach-so b { font-size: 24px; color: #b5121b; }
.dpm-tgi-kq-khach-phu { font-size: 12.5px; color: #4b5563; flex-basis: 100%; }
.dpm-tgi-kq-khach-loi { flex-basis: 100%; color: #b45309; font-size: 14px; }
.dpm-tgi-khach-trang .dpm-tgi-bg tbody th { text-align: left; font-weight: 400; background: transparent; color: inherit; }
.dpm-tgi-khach-trang .dpm-tgi-bg tr.dpm-tgi-dong-hoa th { background: #7f1d1d; color: #fde047; font-weight: 700; }
.dpm-tgi-khach-trang caption { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.dpm-tgi-khach-trang details > summary { cursor: pointer; }
.dpm-tgi-ghi-chu p { margin: 0 0 6px; font-size: 14px; } .dpm-tgi-ghi-chu ul { margin: 0 0 6px 18px; font-size: 14px; }
/* Thanh nhân viên: khách được chọn */
.dpm-tgi-hop-khach { flex-basis: 100%; padding: 8px 10px; background: #fff; border: 1px dashed #94a3b8; border-radius: 6px; font-size: 13px; }
.dpm-tgi-hop-khach > div { margin: 4px 0; } .dpm-tgi-hop-khach .dpm-tgi-tich { margin-right: 10px; white-space: nowrap; }
/* Danh sách / danh mục */
.dpm-tgi-gia-tu { margin: 6px 0; color: #b5121b; } .dpm-tgi-gia-tu b { font-size: 1.1em; }
.dpm-tgi-luoi { display: grid; grid-template-columns: repeat(var(--cot, 3), minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
@media (max-width: 700px) { .dpm-tgi-luoi { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dpm-tgi-o-bai { display: flex; flex-direction: column; gap: 6px; padding: 10px; border: 1px solid #e2e8f0; border-radius: 10px; background: #fff; text-decoration: none !important; color: inherit; transition: box-shadow .15s, border-color .15s; }
.dpm-tgi-o-bai:hover { border-color: #b5121b; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.dpm-tgi-o-bai img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 6px; }
.dpm-tgi-o-bai-ten { font-weight: 700; font-size: 16px; color: #1f2937; }
.dpm-tgi-o-bai-mo { font-size: 13px; color: #4b5563; }
.dpm-tgi-o-bai .dpm-tgi-gia-tu { margin: auto 0 0; }
/* 1.5.2: trình tính trong trang sửa bài */
#dpm-tgi-may-tinh-bai .inside { padding: 0 8px 8px; margin: 0; }
#dpm-tgi-may-tinh-bai .dpm-tgi.dpm-tgi-sp { max-width: none; border: 0; box-shadow: none; padding: 8px 4px; }
.dpm-tgi-thanh-qt { font-size: 13px; color: #065f46; }
/* 1.5.3: tính ngược chênh lệch */
.dpm-tgi-tn { margin-top: 6px; padding: 8px 10px; background: #fff; border: 1px dashed #e11d48; border-radius: 8px; }
.dpm-tgi-tn-kq { font-size: 13.5px; margin-top: 6px; }
.dpm-tgi .dpm-tgi-canh-do { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.dpm-tgi-nut-dung:not(:empty) { margin: 6px 0; padding: 8px 10px; background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px; }
.dpm-tgi-nut-dung .button { font-weight: 700; }
/* 1.5.5: giấy ở mục 1, nút tính ngược nổi bật */
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o-ten { flex: 1 1 110px; max-width: 200px; }
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o-giay { flex: 3 1 220px; max-width: none; }
.dpm-tgi-sp .dpm-tgi-hang > .dpm-tgi-o-giay > select { width: 100%; }
.dpm-tgi .dpm-tgi-nut-tn { margin-left: 10px; padding: 5px 12px; background: #b5121b; color: #fff; border: 0; border-radius: 6px; font-weight: 700; font-size: 13px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.dpm-tgi .dpm-tgi-nut-tn:hover { background: #8f0e15; }
.dpm-tgi-goi-dung { margin: 4px 0; font-size: 12.5px; color: #92400e; }
/* 1.5.6: phương pháp in ghi rõ, dòng số lượng khách chọn */
.dpm-tgi-kq-khach { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px 20px; }
@container (min-width: 620px) { .dpm-tgi-kq-khach { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: stretch; } }
.dpm-tgi-kq-khach-trai { display: flex; flex-wrap: wrap; gap: 6px 28px; align-items: baseline; align-content: center; }
.dpm-tgi-kq-khach-pp { padding: 10px 14px; border-radius: 8px; border: 2px solid #94a3b8; background: #fff; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.dpm-tgi-kq-khach-pp[hidden] { display: none; }
.dpm-tgi-pp-cau { font-size: 15px; font-weight: 800; color: #111827; }
.dpm-tgi-pp-moc { font-size: 13px; color: #374151; }
.dpm-tgi-pp-k { border-color: #2563eb; background: #eff6ff; } .dpm-tgi-pp-k .dpm-tgi-pp-cau { color: #1d4ed8; }
.dpm-tgi-pp-o { border-color: #b5121b; background: #fff1f2; } .dpm-tgi-pp-o .dpm-tgi-pp-cau { color: #b5121b; }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-chon th, .dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-chon td { background: #fef9c3 !important; font-weight: 700; }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-chon th small { font-weight: 400; color: #92400e; }
/* 1.5.7: màu theo phương pháp in, thẻ chuyển bảng, dòng giải thích màu */
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-pp th { text-align: center !important; font-size: 15px; letter-spacing: .5px; background: #8f0e15; color: #fff; padding: 7px 10px; }
.dpm-tgi .dpm-tgi-bg.dpm-tgi-bg-k thead th { background: #1d4ed8; color: #fff; }
.dpm-tgi .dpm-tgi-bg.dpm-tgi-bg-k tr.dpm-tgi-dong-pp th { background: #1e3a8a; }
.dpm-tgi-giai-mau { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0; font-size: 12.5px; color: #374151; }
.dpm-tgi-giai-mau span { display: inline-flex; align-items: center; gap: 5px; }
.dpm-tgi-o-mau { display: inline-block; width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(0,0,0,.15); }
.dpm-tgi-mau-k { background: #1d4ed8; } .dpm-tgi-mau-o { background: #b5121b; } .dpm-tgi-mau-hoa { background: #7f1d1d; } .dpm-tgi-mau-chon { background: #fef9c3; }
.dpm-tgi-the-hang { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.dpm-tgi .dpm-tgi-the { flex: 1 1 200px; padding: 10px 14px; border-radius: 8px; border: 2px solid; background: #fff; font-weight: 700; font-size: 15px; cursor: pointer; }
.dpm-tgi .dpm-tgi-the-k { border-color: #1d4ed8; color: #1d4ed8; } .dpm-tgi .dpm-tgi-the-o { border-color: #b5121b; color: #b5121b; }
.dpm-tgi .dpm-tgi-the-k.dpm-tgi-the-mo { background: #1d4ed8; color: #fff; } .dpm-tgi .dpm-tgi-the-o.dpm-tgi-the-mo { background: #b5121b; color: #fff; }
.dpm-tgi-the-than[hidden] { display: none; }
.dpm-tgi-the-than > .dpm-tgi-khoi-ten { margin: 6px 0; }
.dpm-tgi .dpm-tgi-tab-k { border-color: #1d4ed8; color: #1d4ed8; } .dpm-tgi .dpm-tgi-tab-k.dpm-tgi-tab-chon { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.dpm-tgi .dpm-tgi-tab-o { border-color: #b5121b; color: #b5121b; } .dpm-tgi .dpm-tgi-tab-o.dpm-tgi-tab-chon { background: #b5121b; color: #fff; border-color: #b5121b; }
.dpm-tgi .dpm-tgi-nut-pdf { font-weight: 700; }

/* ---------- 1.5.8: màu bảng giá theo Cài đặt chung (biến màu đặt ở khung) ---------- */
.dpm-tgi .dpm-tgi-bg thead th { background: var(--tgi-o, #b5121b); color: #fff; }
.dpm-tgi .dpm-tgi-bg.dpm-tgi-bg-k thead th { background: var(--tgi-k, #1d4ed8); }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-pp th { background: var(--tgi-o2, #8f0e15); }
.dpm-tgi .dpm-tgi-bg.dpm-tgi-bg-k tr.dpm-tgi-dong-pp th { background: var(--tgi-k2, #1e3a8a); }
.dpm-tgi .dpm-tgi-bg th, .dpm-tgi .dpm-tgi-bg td { border-color: var(--tgi-vien, #ead0d2); }
.dpm-tgi .dpm-tgi-bg { border-color: var(--tgi-vien, #ead0d2); }
.dpm-tgi .dpm-tgi-bg tbody tr:nth-child(even) td, .dpm-tgi .dpm-tgi-bg tbody tr:nth-child(even) th { background-color: var(--tgi-sole, #fff5f5); }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-hoa td, .dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-hoa th, .dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-hoa td.dpm-tgi-co-mau { background: var(--tgi-hoa, #7f1d1d) !important; color: var(--tgi-hoa-c, #fde047) !important; border-color: var(--tgi-hoa, #7f1d1d); }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-chon th, .dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-chon td { background: var(--tgi-chon, #fef9c3) !important; }
.dpm-tgi .dpm-tgi-the-k { border-color: var(--tgi-k); color: var(--tgi-k); } .dpm-tgi .dpm-tgi-the-k.dpm-tgi-the-mo { background: var(--tgi-k); color: #fff; }
.dpm-tgi .dpm-tgi-the-o { border-color: var(--tgi-o); color: var(--tgi-o); } .dpm-tgi .dpm-tgi-the-o.dpm-tgi-the-mo { background: var(--tgi-o); color: #fff; }
.dpm-tgi .dpm-tgi-tab-k { border-color: var(--tgi-k); color: var(--tgi-k); } .dpm-tgi .dpm-tgi-tab-k.dpm-tgi-tab-chon { background: var(--tgi-k); border-color: var(--tgi-k); color: #fff; }
.dpm-tgi .dpm-tgi-tab-o { border-color: var(--tgi-o); color: var(--tgi-o); } .dpm-tgi .dpm-tgi-tab-o.dpm-tgi-tab-chon { background: var(--tgi-o); border-color: var(--tgi-o); color: #fff; }
.dpm-tgi .dpm-tgi-mau-k { background: var(--tgi-k); } .dpm-tgi .dpm-tgi-mau-o { background: var(--tgi-o); } .dpm-tgi .dpm-tgi-mau-hoa { background: var(--tgi-hoa); } .dpm-tgi .dpm-tgi-mau-chon { background: var(--tgi-chon); }
.dpm-tgi .dpm-tgi-pp-k { border-color: var(--tgi-k); background: color-mix(in srgb, var(--tgi-k) 7%, #fff); } .dpm-tgi .dpm-tgi-pp-k .dpm-tgi-pp-cau { color: var(--tgi-k); }
.dpm-tgi .dpm-tgi-pp-o { border-color: var(--tgi-o); background: color-mix(in srgb, var(--tgi-o) 7%, #fff); } .dpm-tgi .dpm-tgi-pp-o .dpm-tgi-pp-cau { color: var(--tgi-o); }
.dpm-tgi .dpm-tgi-kq-khach-so b { color: var(--tgi-tien, #b5121b); }
.dpm-tgi .dpm-tgi-kq-khach { border-left-color: var(--tgi-o, #b5121b); }
.dpm-tgi .dpm-tgi-nut-tn { background: var(--tgi-btn, #b5121b); color: var(--tgi-btn-text, #fff); }
/* Hàng nút giống DPM Bảng Báo Giá */
.dpm-tgi-hang-nut { display: flex; flex-wrap: wrap; gap: 9px; margin: 14px 0; }
.dpm-tgi .dpm-tgi-nut { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; height: 42px; padding: 8px 16px; border: 2px solid var(--tgi-btn, #2455e6); border-radius: 7px; background: #fff; color: var(--tgi-btn, #2455e6) !important; font: inherit; font-size: 14px; font-weight: 600; line-height: 1.2; text-decoration: none !important; cursor: pointer; white-space: nowrap; }
.dpm-tgi .dpm-tgi-nut-dac { background: var(--tgi-btn, #2455e6); color: var(--tgi-btn-text, #fff) !important; }
.dpm-tgi .dpm-tgi-nut:hover { filter: brightness(.94); }
.dpm-tgi .dpm-tgi-nut[disabled] { opacity: .6; cursor: wait; }
@media (max-width: 640px) { .dpm-tgi-hang-nut { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 3px; } }
/* Khung ghi chú giống "Điều kiện chung" */
.dpm-tgi .dpm-tgi-dieu-kien { margin: 14px 0; padding: 16px 18px; border: 1px solid #dfe5ec; border-radius: 10px; background: #fff; }
.dpm-tgi .dpm-tgi-dieu-kien h3 { margin: 0 0 10px; font-size: 18px; text-transform: uppercase; }
.dpm-tgi .dpm-tgi-dieu-kien > :last-child { margin-bottom: 0; }
.dpm-tgi .dpm-tgi-dieu-kien p { margin: 0 0 6px; } .dpm-tgi .dpm-tgi-dieu-kien ul { margin: 0 0 6px 18px; }
/* Form yêu cầu báo giá */
.dpm-tgi-yc { margin-top: 12px; padding: 18px; border: 1px solid #dce3eb; border-radius: 10px; background: #f8fafc; }
.dpm-tgi-yc[hidden] { display: none; }
.dpm-tgi-yc h3 { margin: 0 0 6px; font-size: 18px; }
.dpm-tgi-yc-tom { margin: 0 0 12px; padding: 8px 10px; background: #fff; border: 1px dashed #cbd5e1; border-radius: 6px; font-size: 13.5px; white-space: pre-line; }
.dpm-tgi-yc-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.dpm-tgi-yc-form label { display: flex; flex-direction: column; gap: 5px; font-weight: 600; }
.dpm-tgi-yc-form label em { color: #c52233; font-style: normal; }
.dpm-tgi-yc-form input, .dpm-tgi-yc-form textarea { box-sizing: border-box; width: 100%; min-height: 42px; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; font: inherit; }
.dpm-tgi-yc-form textarea { min-height: 80px; resize: vertical; }
.dpm-tgi-yc-rong, .dpm-tgi-yc-nut, .dpm-tgi-yc-tt { grid-column: 1 / -1; }
.dpm-tgi-yc-nut { display: flex; flex-wrap: wrap; gap: 8px; }
.dpm-tgi-yc-tt { margin: 0; font-weight: 600; } .dpm-tgi-yc-tt.loi { color: #b91c1c; } .dpm-tgi-yc-tt.ok { color: #08783e; }
.dpm-tgi-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 640px) { .dpm-tgi-yc-form { grid-template-columns: 1fr; } }
/* Cài đặt: màu bảng */
.dpm-tgi-bo-mau .button { margin: 0 6px 6px 0; display: inline-flex; align-items: center; gap: 4px; }
.dpm-tgi-cham { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.dpm-tgi-mb-hang { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.dpm-tgi-mb-o { display: grid; gap: 6px; min-width: 320px; }
.dpm-tgi-mb-o label { display: flex; align-items: center; gap: 8px; }
.dpm-tgi-mb-o input[type="color"] { width: 42px; height: 28px; padding: 0; border: 1px solid #c3c4c7; border-radius: 4px; cursor: pointer; }
.dpm-tgi-mb-xem table { border-collapse: collapse; font-size: 13px; min-width: 300px; }
.dpm-tgi-mb-xem th, .dpm-tgi-mb-xem td { padding: 5px 10px; border: 1px solid #ddd; text-align: right; }
.dpm-tgi-mb-xem th:first-child, .dpm-tgi-mb-xem td:first-child { text-align: left; }
.dpm-tgi-xem-nhan { display: inline-block; padding: 4px 10px; border-radius: 6px; font-weight: 700; font-size: 12px; }

/* ===== 1.5.9 — mục 4 chia nhóm, hai mốc Đơn ít / Đơn nhiều, tính ngược ===== */
.dpm-tgi-hai-nhom { display: flex; flex-wrap: wrap; gap: 10px; align-items: stretch; }
.dpm-tgi-nhom { flex: 3 1 360px; min-width: 0; border: 1px solid var(--dpm-tgi-vien, #dcdcde); border-radius: 8px; background: rgba(255,255,255,.75); padding: 8px 10px 10px; }
.dpm-tgi-nhom-kh { flex: 1 1 220px; }
.dpm-tgi-nhom-ten { font-size: 13px; font-weight: 700; color: #1f2937; margin: 0 0 6px; text-transform: uppercase; letter-spacing: .02em; }
.dpm-tgi-ct { margin-top: 8px; }
.dpm-tgi-ct-ten { font-size: 12px; color: #374151; margin: 0 0 4px; }
.dpm-tgi-moc { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 6px 8px; border-radius: 6px; margin: 0 0 4px; border-left: 4px solid; }
.dpm-tgi-moc-1 { background: #ecfdf5; border-color: #10b981; }
.dpm-tgi-moc-2 { background: #fffbeb; border-color: #f59e0b; }
.dpm-tgi-moc > b { min-width: 76px; font-size: 13px; color: #111827; }
.dpm-tgi-cau { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 13px; color: #374151; }
.dpm-tgi .dpm-tgi-cau input[type="text"] { width: 84px; text-align: right; margin: 0; }
.dpm-tgi .dpm-tgi-cau input.dpm-tgi-o-tien { width: 120px; }
.dpm-tgi-moc small { font-size: 12px; color: #047857; flex-basis: 100%; padding-left: 86px; }
.dpm-tgi-moc small:empty { display: none; }
.dpm-tgi-ct-vd { font-size: 12px; color: #4b5563; margin-top: 4px; line-height: 1.45; }
.dpm-tgi-hang-tn { align-items: stretch; }
.dpm-tgi-hang-tn > .dpm-tgi-moc { flex: 1 1 300px; margin: 0; flex-direction: column; align-items: flex-start; }
.dpm-tgi-hang-tn > .dpm-tgi-moc small { padding-left: 0; }
.dpm-tgi-hang-tn > .dpm-tgi-o-ngang { display: flex; gap: 6px; align-items: flex-end; }
@container (max-width: 520px) { .dpm-tgi-moc > b { min-width: 0; flex-basis: 100%; } .dpm-tgi-moc small { padding-left: 0; } }

/* ===== 1.5.10 — điểm hòa riêng từng cột giấy ===== */
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-diem-hoa th { background: var(--tgi-hoa, #7f1d1d) !important; color: var(--tgi-hoa-c, #fde047) !important; font-size: 12px; font-weight: 700; padding-top: 3px; padding-bottom: 3px; text-align: right; }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-diem-hoa th:first-child { text-align: left; }
.dpm-tgi .dpm-tgi-bg td.dpm-tgi-o-hoa, .dpm-tgi .dpm-tgi-bg td.dpm-tgi-o-hoa.dpm-tgi-co-mau { background: var(--tgi-hoa, #7f1d1d) !important; color: var(--tgi-hoa-c, #fde047) !important; font-weight: 700; }
.dpm-tgi .dpm-tgi-bg td.dpm-tgi-o-hoa span, .dpm-tgi .dpm-tgi-bg td.dpm-tgi-o-hoa small { color: inherit !important; }

/* ===== 1.5.10 — nút gọn, cùng cỡ ===== */
.dpm-tgi .dpm-tgi-hang-nut { gap: 6px; margin: 12px 0; flex-wrap: wrap; overflow: visible; }
.dpm-tgi .dpm-tgi-hang-nut .dpm-tgi-nut, .dpm-tgi .dpm-tgi-nut { height: 34px; min-height: 0; margin: 0 !important; padding: 0 12px !important; border-width: 1.5px; border-radius: 6px; font-size: 13.5px; font-weight: 600; line-height: 1; letter-spacing: 0; box-shadow: none; }
.dpm-tgi .dpm-tgi-the { flex: 1 1 180px; padding: 6px 12px; border-width: 1.5px; border-radius: 6px; font-size: 14px; line-height: 1.3; }
@media (max-width: 640px) { .dpm-tgi-hang-nut { flex-wrap: wrap; overflow: visible; } }
@container (max-width: 560px) {
	.dpm-tgi .dpm-tgi-hang-nut { display: grid; grid-template-columns: repeat(3, 1fr); }
	.dpm-tgi .dpm-tgi-hang-nut > .dpm-tgi-nut { width: 100%; padding: 0 6px !important; font-size: 13px; }
	.dpm-tgi .dpm-tgi-hang-nut > .dpm-tgi-nut-dac:first-child { grid-column: 1 / -1; }
}
/* Quy đổi giấy: mỗi vùng một màu (Cài đặt chung) */
.dpm-tgi-qd .dpm-tgi-khoi[data-vung] { border: 1px solid rgba(15, 23, 42, .08); border-left: 4px solid; }
.dpm-tgi-qd .dpm-tgi-khoi[data-vung="q1"] { background: var(--tgi-n-q1, #fff7df); border-left-color: var(--tgi-d-q1, #eab308); }
.dpm-tgi-qd .dpm-tgi-khoi[data-vung="q2"] { background: var(--tgi-n-q2, #e9f9ef); border-left-color: var(--tgi-d-q2, #22c55e); }
.dpm-tgi-qd .dpm-tgi-khoi[data-vung="q3"] { background: var(--tgi-n-q3, #fff0f3); border-left-color: var(--tgi-d-q3, #e11d48); }
.dpm-tgi-qd .dpm-tgi-khoi[data-vung] input[type="text"], .dpm-tgi-qd .dpm-tgi-khoi[data-vung] select { background-color: #fff; }
/* Dòng tên cột theo màu đã chọn (trước đây dòng thứ 2 luôn đỏ) */
.dpm-tgi .dpm-tgi-bg thead tr + tr th { background: var(--tgi-o, #c9252e); }
.dpm-tgi .dpm-tgi-bg.dpm-tgi-bg-k thead tr + tr th { background: var(--tgi-k, #1d4ed8); }
.dpm-tgi-qd .dpm-tgi-dong-o { grid-template-columns: 118px 1fr; }
.dpm-tgi-qd .dpm-tgi-nhan { white-space: nowrap; }
@media (max-width: 600px) { .dpm-tgi-qd .dpm-tgi-dong-o { grid-template-columns: 1fr; } }

/* ===== 1.5.11 — dùng hết bề ngang nội dung trang ===== */
.dpm-tgi.dpm-tgi-khach-trang, .dpm-tgi.dpm-tgi-bang-chuan, .dpm-tgi.dpm-tgi-qd, .dpm-tgi.dpm-tgi-ds { max-width: none; width: auto; box-sizing: border-box; }
.dpm-tgi.dpm-tgi-qd .dpm-tgi-chon-giay { max-width: none; }
/* Dòng điểm hòa nổi bật hơn */
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-diem-hoa th { font-size: 13px; padding-top: 5px; padding-bottom: 5px; }
/* Cột "Số lượng" đứng yên khi kéo bảng ngang */
.dpm-tgi .dpm-tgi-cuon .dpm-tgi-bg tr > :first-child { position: sticky; left: 0; z-index: 1; }
.dpm-tgi .dpm-tgi-cuon .dpm-tgi-bg tbody tr > :first-child { background-color: #fff; box-shadow: 1px 0 0 var(--tgi-vien, #ead0d2); }
.dpm-tgi .dpm-tgi-cuon .dpm-tgi-bg tbody tr:nth-child(even) > :first-child { background-color: var(--tgi-sole, #fff5f5); }
.dpm-tgi .dpm-tgi-cuon .dpm-tgi-bg tbody tr.dpm-tgi-dong-chon > :first-child { background-color: var(--tgi-chon, #fef9c3) !important; }
.dpm-tgi .dpm-tgi-cuon .dpm-tgi-bg thead tr > :first-child { z-index: 2; }
.dpm-tgi .dpm-tgi-cuon .dpm-tgi-bg thead tr.dpm-tgi-dong-pp > :first-child { position: static; }
.dpm-tgi .dpm-tgi-cuon > .dpm-tgi-bg { overflow: visible; }
.dpm-tgi .dpm-tgi-cuon { border-radius: 8px; }

/* ===== 1.5.13 — trang Nhà in & gia công: mỗi khổ máy gập / mở ===== */
details.dpm-tgi-may { padding: 0; }
details.dpm-tgi-may > summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 8px 12px; cursor: pointer; list-style: none; }
details.dpm-tgi-may > summary::-webkit-details-marker { display: none; }
details.dpm-tgi-may > summary::before { content: "▸"; color: #2271b1; width: 12px; }
details.dpm-tgi-may[open] > summary::before { content: "▾"; }
details.dpm-tgi-may > summary strong { min-width: 110px; }
details.dpm-tgi-may > .dpm-tgi-dm-than { padding: 0 12px 10px; }
details.dpm-tgi-may[open] > summary { border-bottom: 1px solid #e5e7eb; margin-bottom: 8px; }
.dpm-tgi-qt .dpm-tgi-kho-dau { display: flex; gap: 14px; margin: 6px 0 10px; }
.dpm-tgi-qt .dpm-tgi-dm { max-width: none; }
.dpm-tgi-qt .dpm-tgi-dm > summary { flex-wrap: wrap; }

/* ===== 1.5.14 — Đối tác & giá chi phí (kiểu CRM) ===== */
.dpm-tgi-crm .dpm-tgi-tab-crm { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 12px; }
.dpm-tgi-crm .dpm-tgi-tab-crm a { padding: 5px 12px; border: 1px solid #c3c4c7; border-radius: 6px; background: #fff; text-decoration: none; font-weight: 600; }
.dpm-tgi-crm .dpm-tgi-tab-crm a:hover { border-color: #2271b1; }
.dpm-tgi-crm .dpm-tgi-nhan-md { padding: 1px 8px; border-radius: 10px; background: #e7f5ea; color: #1e7b34; font-size: 12px; font-weight: 600; }
.dpm-tgi-crm .dpm-tgi-dv { margin: 12px 0 0; padding: 10px 12px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fbfbfc; }
.dpm-tgi-crm .dpm-tgi-dv > h4, .dpm-tgi-crm .dpm-tgi-dm-than > h4 { margin: 0 0 8px; font-size: 14px; }
.dpm-tgi-crm .dpm-tgi-dv > .button { margin-top: 6px; }
.dpm-tgi-crm .dpm-tgi-bang-so { margin: 4px 0 8px; }
.dpm-tgi-crm .dpm-tgi-bang-so td { padding: 4px 10px; }
.dpm-tgi-crm .dpm-tgi-hop { scroll-margin-top: 40px; }
.dpm-tgi-crm .dpm-tgi-kho-dau { align-items: center; flex-wrap: wrap; }

/* 1.5.17: hai khung chênh lệch (offset / kỹ thuật số) + dòng cách ra giá */
.dpm-tgi-sp .dpm-tgi-hai-nhom { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 12px; }
.dpm-tgi-sp .dpm-tgi-nhom-cl-k { border-left: 3px solid #0f766e; }
.dpm-tgi-cach-ra { margin-top: 8px; padding: 6px 10px; border-left: 3px solid #1d4ed8; background: #eff6ff; font-size: 13px; line-height: 1.5; }
.dpm-tgi-crm .dpm-tgi-guong-canh { color: #b91c1c; font-weight: 600; font-size: 12px; }
.dpm-tgi-crm .dpm-tgi-bang-guong input[type="text"] { width: 100%; min-width: 70px; max-width: 160px; }
.dpm-tgi-crm .dpm-tgi-guong-trong { color: #b91c1c; }
.dpm-tgi-crm .dpm-tgi-guong-them { margin: 6px 0 10px; }
/* 1.5.38: bảng gia công chia vùng In offset | In kỹ thuật số, cuộn ngang khi hẹp; nút xóa đối tác */
.dpm-tgi-crm .dpm-tgi-cuon-ngang { overflow-x: auto; max-width: 100%; padding-bottom: 4px; }
.dpm-tgi-crm .dpm-tgi-cuon-ngang > table { min-width: 100%; }
.dpm-tgi-crm .dpm-tgi-bang-guong th, .dpm-tgi-crm .dpm-tgi-bang-gc2 th { white-space: nowrap; }
.dpm-tgi-crm th.dpm-tgi-vung-o, .dpm-tgi-crm td.dpm-tgi-vung-o { background: #fef2f2; }
.dpm-tgi-crm th.dpm-tgi-vung-k, .dpm-tgi-crm td.dpm-tgi-vung-k { background: #eff6ff; }
.dpm-tgi-crm .dpm-tgi-bang-gc2 input[type="text"] { min-width: 80px; }
.dpm-tgi-crm .dpm-tgi-guong-xoa { color: #b91c1c; white-space: nowrap; text-decoration: none; }
.dpm-tgi-crm .dpm-tgi-guong-xoa:hover { text-decoration: underline; }

/* 1.5.18–1.5.19: gập / mở khu vực trang tính giá — dải tiêu đề màu (màu đậm của từng vùng, đổi theo Cài đặt chung) */
.dpm-tgi-sp .dpm-tgi-gap-nut { display: flex; gap: 6px; justify-content: flex-end; margin: 0 0 8px; }
.dpm-tgi-sp .dpm-tgi-co-gap { --dai: #334155; }
.dpm-tgi-sp .dpm-tgi-co-gap[data-vung="v1"] { --dai: var(--tgi-d-v1, #3b82f6); }
.dpm-tgi-sp .dpm-tgi-co-gap[data-vung="v2"] { --dai: var(--tgi-d-v2, #22c55e); }
.dpm-tgi-sp .dpm-tgi-co-gap[data-vung="v4"] { --dai: var(--tgi-d-v4, #8b5cf6); }
.dpm-tgi-sp .dpm-tgi-co-gap[data-vung="v5"] { --dai: var(--tgi-d-v5, #e11d48); }
.dpm-tgi-sp .dpm-tgi-co-gap[data-vung="v6"] { --dai: var(--tgi-d-v6, #64748b); }
.dpm-tgi-sp .dpm-tgi-co-gap.dpm-tgi-pt { --dai: #0f766e; }
.dpm-tgi-sp .dpm-tgi-co-gap.dpm-tgi-kq { --dai: #1e3a8a; }
.dpm-tgi-sp .dpm-tgi-co-gap > .dpm-tgi-khoi-ten,
.dpm-tgi-sp .dpm-tgi-co-gap > .dpm-tgi-kq-nhan,
.dpm-tgi-sp .dpm-tgi-co-gap[data-vung="v6"] > .dpm-tgi-hang-bang {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
	margin: -12px -14px 12px; padding: 10px 14px;
	background-color: var(--dai); background-image: linear-gradient(rgba(0, 0, 0, .16), rgba(0, 0, 0, .16));
	color: #fff; font-size: 20px; font-weight: 700; line-height: 1.3; border-radius: 9px 9px 0 0;
	cursor: pointer; user-select: none;
}
.dpm-tgi-sp .dpm-tgi-co-gap[data-vung="v6"] > .dpm-tgi-hang-bang > .dpm-tgi-khoi-ten { color: #fff; font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.dpm-tgi-sp .dpm-tgi-co-gap[data-vung="v6"] > .dpm-tgi-hang-bang label, .dpm-tgi-sp .dpm-tgi-co-gap[data-vung="v6"] > .dpm-tgi-hang-bang span { color: #fff; }
.dpm-tgi-sp .dpm-tgi-co-gap[data-vung="v6"] .dpm-tgi-tab button:not(.dpm-tgi-tab-chon) { background: #fff; }
.dpm-tgi-sp .dpm-tgi-co-gap > .dpm-tgi-khoi-ten .dpm-tgi-i, .dpm-tgi-sp .dpm-tgi-co-gap .dpm-tgi-hang-bang .dpm-tgi-i { color: #fff; opacity: .85; font-size: 15px; font-weight: 400; }
/* Nút gập / mở: tròn trắng, mũi tên to */
.dpm-tgi-sp .dpm-tgi-co-gap > .dpm-tgi-khoi-ten::before,
.dpm-tgi-sp .dpm-tgi-co-gap > .dpm-tgi-kq-nhan::before,
.dpm-tgi-sp .dpm-tgi-co-gap > .dpm-tgi-hang-bang > .dpm-tgi-khoi-ten::before {
	content: "▾"; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
	width: 30px; height: 30px; border-radius: 50%; background: #fff; color: var(--dai); font-size: 20px; line-height: 1; box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
}
.dpm-tgi-sp .dpm-tgi-gap > .dpm-tgi-khoi-ten::before, .dpm-tgi-sp .dpm-tgi-gap > .dpm-tgi-kq-nhan::before, .dpm-tgi-sp .dpm-tgi-gap > .dpm-tgi-hang-bang > .dpm-tgi-khoi-ten::before { content: "▸"; }
.dpm-tgi-sp .dpm-tgi-gap > *:not(:first-child) { display: none !important; }
.dpm-tgi-sp .dpm-tgi-co-gap.dpm-tgi-gap { padding-bottom: 0; }
.dpm-tgi-sp .dpm-tgi-gap > .dpm-tgi-khoi-ten, .dpm-tgi-sp .dpm-tgi-gap > .dpm-tgi-kq-nhan, .dpm-tgi-sp .dpm-tgi-gap[data-vung="v6"] > .dpm-tgi-hang-bang { margin-bottom: 0; border-radius: 9px; }
.dpm-tgi-sp .dpm-tgi-tom-gap { font-weight: 400; color: rgba(255, 255, 255, .9); font-size: 15px; }
.dpm-tgi-sp .dpm-tgi-co-gap > .dpm-tgi-khoi-ten .dpm-tgi-nut-tn { font-size: 13px; }
.dpm-tgi-sp .dpm-tgi-co-gap.dpm-tgi-kq > .dpm-tgi-kq-nhan { margin: -16px -18px 14px; padding: 10px 18px; }
.dpm-tgi-sp .dpm-tgi-gap.dpm-tgi-kq { padding-bottom: 0; }
.dpm-tgi-sp .dpm-tgi-gap.dpm-tgi-kq > .dpm-tgi-kq-nhan { margin-bottom: 0; }
.dpm-tgi-sp [data-ds-moc] .dpm-tgi-moc { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.dpm-tgi-sp .dpm-tgi-xoa-moc { margin-left: auto; color: #b91c1c; }
.dpm-tgi-sp .dpm-tgi-them-moc { margin: 4px 0 6px; }
.dpm-tgi-sp [data-ds-moc] .dpm-tgi-moc { display: flex !important; flex-wrap: nowrap; align-items: center; gap: 8px; margin-bottom: 6px; }
.dpm-tgi-sp [data-ds-moc] .dpm-tgi-moc > b { flex: 0 0 52px; }
.dpm-tgi-sp [data-ds-moc] .dpm-tgi-cau { flex: 1 1 auto; }
.dpm-tgi-sp [data-ds-moc] .dpm-tgi-xoa-moc { flex: 0 0 auto; margin: 0; padding: 2px 8px; }
.dpm-tgi-sp .dpm-tgi-co-gap.dpm-tgi-kq > .dpm-tgi-kq-nhan { font-size: 18px; flex-wrap: nowrap; }
.dpm-tgi-sp [data-ds-moc] .dpm-tgi-cau { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; white-space: nowrap; min-width: 0; }
.dpm-tgi-sp [data-ds-moc] input[type="text"] { width: 74px !important; min-width: 0; padding-left: 6px; padding-right: 6px; }
.dpm-tgi-sp [data-ds-moc] .dpm-tgi-moc > b { flex: 0 0 auto; }

/* 1.5.20: hàng "Điểm hòa giá" (số chính xác), dòng chữ ngang tại điểm hòa, ô bên kia điểm hòa */
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-hang-hoa th, .dpm-tgi .dpm-tgi-bg tr.dpm-tgi-hang-hoa td { background: var(--tgi-hoa, #7f1d1d) !important; color: var(--tgi-hoa-c, #fde047) !important; font-weight: 700; }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-ngan td { text-align: left !important; font-weight: 700; color: #fff !important; padding: 6px 10px; }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-ngan-k td { background: var(--tgi-o, #b5121b) !important; }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-ngan-o td { background: var(--tgi-k, #1d4ed8) !important; }
.dpm-tgi .dpm-tgi-bg td.dpm-tgi-o-ben-kia { color: #64748b !important; font-style: italic; font-weight: 400; }
.dpm-tgi .dpm-tgi-bg td.dpm-tgi-o-ben-kia-nv { color: #94a3b8 !important; }
/* 1.5.20: mục 4 — dải "Cộng cho khách" một hàng; hai khung chênh lệch chia đôi; khung tính ngược ở đầu */
.dpm-tgi-sp [data-vung="v5"] .dpm-tgi-hai-nhom { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 12px; }
.dpm-tgi-sp [data-vung="v5"] .dpm-tgi-nhom-kh { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 16px; padding: 8px 12px; }
.dpm-tgi-sp [data-vung="v5"] .dpm-tgi-nhom-kh .dpm-tgi-nhom-ten { align-self: center; margin: 0; }
.dpm-tgi-sp [data-vung="v5"] .dpm-tgi-nhom-kh .dpm-tgi-o { flex: 0 0 180px; }
.dpm-tgi-sp [data-vung="v5"] .dpm-tgi-nhom-kh .dpm-tgi-ct-vd { align-self: center; margin: 0; }
.dpm-tgi-sp [data-ds-moc] input[data-moc="q"] { width: 100px !important; }
.dpm-tgi-sp [data-ds-moc] input[data-moc="c"] { width: 86px !important; }
.dpm-tgi-sp .dpm-tgi-tn { margin: 0 0 12px; padding: 10px 12px; border: 2px solid #2563eb; border-radius: 10px; background: #eff6ff; }
.dpm-tgi-sp .dpm-tgi-tn-ten { font-size: 17px; font-weight: 700; color: #1d4ed8; margin-bottom: 4px; }
.dpm-tgi-sp [data-tn-ds] .dpm-tgi-moc { display: flex; flex-wrap: nowrap; align-items: center; gap: 8px; }
.dpm-tgi-sp [data-tn-ds] input { width: 110px !important; }
.dpm-tgi-sp [data-tn-ds] input[data-tnm="p"] { width: 140px !important; }
.dpm-tgi-sp [data-tn-ds] small { color: #475569; }
.dpm-tgi .dpm-tgi-bg td.dpm-tgi-o-hoa.dpm-tgi-o-ben-kia, .dpm-tgi .dpm-tgi-bg td.dpm-tgi-o-hoa.dpm-tgi-o-ben-kia-nv { color: var(--tgi-hoa-c, #fde047) !important; }
/* 1.5.21: sắp lại trang — mục 4 → so sánh → bảng giá → tính ngược → chi phí chi tiết (gập sẵn); nút chế độ chỉnh giá */
.dpm-tgi-sp .dpm-tgi-gap-nut { justify-content: flex-start; align-items: center; }
.dpm-tgi-sp .dpm-tgi-gap-cach { flex: 1 1 auto; }
.dpm-tgi-sp .dpm-tgi-nut-cg { font-weight: 700; font-size: 14px; padding: 6px 14px; border: 2px solid #b5121b; color: #b5121b; background: #fff; border-radius: 8px; cursor: pointer; }
.dpm-tgi-sp .dpm-tgi-nut-cg.dpm-tgi-cg-bat { background: #b5121b; color: #fff; }
.dpm-tgi-sp .dpm-tgi-cot-trai > [data-pt] > .dpm-tgi-pt, .dpm-tgi-sp .dpm-tgi-cot-trai > [data-kq] > .dpm-tgi-kq { margin: 0 0 12px; }
.dpm-tgi-sp .dpm-tgi-cot-trai > [data-pt]:empty, .dpm-tgi-sp .dpm-tgi-cot-trai > [data-kq]:empty { display: none; }
.dpm-tgi-sp [data-vung="v6"] .dpm-tgi-tn { margin: 12px 0 0; }
.dpm-tgi-sp [data-tn-ds] .dpm-tgi-cau { flex-wrap: nowrap; white-space: nowrap; }
.dpm-tgi-sp [data-tn-ds] .dpm-tgi-moc small { flex: 0 0 auto; flex-basis: auto; padding-left: 0; white-space: nowrap; }
.dpm-tgi-sp [data-tn-ds] .dpm-tgi-moc { overflow-x: auto; }
.dpm-tgi-sp [data-tn-ds] .dpm-tgi-xoa-moc { margin-left: auto; }
.dpm-tgi-sp [data-ds-moc] .dpm-tgi-moc { overflow-x: auto; }
.dpm-tgi-sp .dpm-tgi-pt .dpm-tgi-bang-hoa { max-width: 640px; }
.dpm-tgi-sp [data-tn-ap] { font-weight: 700; padding: 5px 18px; background: #2563eb; color: #fff; border: 0; border-radius: 6px; cursor: pointer; }
.dpm-tgi-sp [data-tn-ap]:hover { background: #1d4ed8; }
/* 1.5.22: mục 2 tách hai khung In offset / In kỹ thuật số; mục 5 hai thẻ to như trang khách; mốc số lượng theo bài; tính ngược riêng từng bảng */
.dpm-tgi-sp .dpm-tgi-hai-cach { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 12px; margin: 6px 0 10px; }
.dpm-tgi-sp .dpm-tgi-cach, .dpm-tgi-sp .dpm-tgi-don-nay { padding: 8px 12px 10px; border-radius: 8px; background: #fff; border: 1px solid #e5e7eb; border-left: 5px solid; }
.dpm-tgi-sp .dpm-tgi-cach-o { border-left-color: var(--tgi-o, #b5121b); }
.dpm-tgi-sp .dpm-tgi-cach-k { border-left-color: var(--tgi-k, #1d4ed8); }
.dpm-tgi-sp .dpm-tgi-don-nay { border-left-color: #94a3b8; background: #f8fafc; }
.dpm-tgi-sp .dpm-tgi-cach-ten { font-size: 15px; font-weight: 700; margin: 0 0 6px; }
.dpm-tgi-sp .dpm-tgi-cach-o .dpm-tgi-cach-ten { color: var(--tgi-o, #b5121b); }
.dpm-tgi-sp .dpm-tgi-cach-k .dpm-tgi-cach-ten { color: var(--tgi-k, #1d4ed8); }
.dpm-tgi-sp .dpm-tgi-cach-ten small { font-weight: 400; color: #64748b; font-size: 12.5px; }
.dpm-tgi-sp .dpm-tgi-cach .dpm-tgi-ct-vd { margin-top: 4px; }
.dpm-tgi-sp .dpm-tgi-the-hang { display: flex; gap: 8px; margin: 8px 0 8px; }
.dpm-tgi-sp .dpm-tgi-the-hang .dpm-tgi-the { flex: 1 1 0; padding: 10px 14px; border-radius: 8px; border: 2px solid; background: #fff; font-weight: 700; font-size: 16px; cursor: pointer; }
.dpm-tgi-sp .dpm-tgi-the-hang .dpm-tgi-the-o { border-color: var(--tgi-o, #b5121b); color: var(--tgi-o, #b5121b); }
.dpm-tgi-sp .dpm-tgi-the-hang .dpm-tgi-the-k { border-color: var(--tgi-k, #1d4ed8); color: var(--tgi-k, #1d4ed8); }
.dpm-tgi-sp .dpm-tgi-the-hang .dpm-tgi-the-o.dpm-tgi-the-mo { background: var(--tgi-o, #b5121b); color: #fff; }
.dpm-tgi-sp .dpm-tgi-the-hang .dpm-tgi-the-k.dpm-tgi-the-mo { background: var(--tgi-k, #1d4ed8); color: #fff; }
.dpm-tgi-sp .dpm-tgi-moc-sl { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 4px 0 8px; font-size: 13px; }
.dpm-tgi-sp .dpm-tgi-moc-sl label { display: flex; align-items: center; gap: 8px; flex: 1 1 420px; font-weight: 600; }
.dpm-tgi-sp .dpm-tgi-moc-sl label span { white-space: nowrap; }
.dpm-tgi-sp .dpm-tgi-moc-sl input { flex: 1 1 auto; min-width: 200px; margin: 0; letter-spacing: .2px; }
.dpm-tgi-sp .dpm-tgi-moc-sl small { flex-basis: 100%; color: #64748b; }
.dpm-tgi-sp .dpm-tgi-pt .dpm-tgi-moc-sl { margin-top: 10px; }
.dpm-tgi-sp .dpm-tgi-tn-o { border-color: var(--tgi-o, #b5121b); background: #fff5f5; }
.dpm-tgi-sp .dpm-tgi-tn-o .dpm-tgi-tn-ten { color: var(--tgi-o, #b5121b); }
.dpm-tgi-sp .dpm-tgi-tn-k { border-color: var(--tgi-k, #1d4ed8); background: #eff6ff; }
.dpm-tgi-sp .dpm-tgi-tn-k .dpm-tgi-tn-ten { color: var(--tgi-k, #1d4ed8); }
.dpm-tgi-sp .dpm-tgi-tn-nhac { font-weight: 700; font-size: 13.5px; margin: 0 0 4px; }
.dpm-tgi-sp .dpm-tgi-tn-o [data-tn-ap] { background: var(--tgi-o, #b5121b); }
.dpm-tgi-sp .dpm-tgi-tn-k [data-tn-ap] { background: var(--tgi-k, #1d4ed8); }
.dpm-tgi-sp [data-tn][hidden], .dpm-tgi-sp [data-khoi-pt][hidden] { display: none !important; }
.dpm-tgi-sp .dpm-tgi-luon-mo > .dpm-tgi-hang-bang > .dpm-tgi-khoi-ten::before { display: none !important; }
.dpm-tgi-sp .dpm-tgi-luon-mo > .dpm-tgi-hang-bang { cursor: default; }
/* 1.5.23: so sánh — mỗi cách in một bộ cột; cột phải hai cách in cạnh nhau */
.dpm-tgi-sp .dpm-tgi-bang-ss { max-width: none; }
.dpm-tgi .dpm-tgi-bang-ss th.dpm-tgi-ss-k, .dpm-tgi .dpm-tgi-hai-gb th.dpm-tgi-ss-k { background: var(--tgi-k, #1d4ed8) !important; color: #fff; }
.dpm-tgi .dpm-tgi-bang-ss th.dpm-tgi-ss-o, .dpm-tgi .dpm-tgi-hai-gb th.dpm-tgi-ss-o { background: var(--tgi-o, #b5121b) !important; color: #fff; }
.dpm-tgi .dpm-tgi-bang-ss td.dpm-tgi-ss-re { text-align: center; font-weight: 600; white-space: nowrap; }
.dpm-tgi .dpm-tgi-bang-ss tbody td:nth-child(5) { border-left: 3px solid var(--tgi-o, #b5121b); }
.dpm-tgi .dpm-tgi-bang-ss tbody td:nth-child(8) { border-left: 3px solid #94a3b8; }
.dpm-tgi-sp .dpm-tgi-hai-gb { margin: 0 0 10px; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.dpm-tgi-sp .dpm-tgi-hai-gb-ten { font-weight: 700; font-size: 14px; margin: 0 0 6px; }
.dpm-tgi-sp .dpm-tgi-hai-gb table { width: 100%; font-size: 13px; }
.dpm-tgi-sp .dpm-tgi-hai-gb td:not(:first-child), .dpm-tgi-sp .dpm-tgi-hai-gb th:not(:first-child) { text-align: right; white-space: nowrap; }
.dpm-tgi-sp .dpm-tgi-hai-gb th { font-size: 12px; padding: 4px 6px; }
.dpm-tgi-sp .dpm-tgi-gb-ct > summary { font-size: 13px; }
.dpm-tgi-sp .dpm-tgi-mo-mat { opacity: .45; }
.dpm-tgi-sp .dpm-tgi-hang-mat { align-items: flex-end; gap: 8px 16px; }
.dpm-tgi-sp .dpm-tgi-hang-mat .dpm-tgi-tich-mat { align-self: center; font-weight: 600; }
.dpm-tgi-thanh-bai.dpm-tgi-chua-luu { background: #fee2e2; border: 2px solid #dc2626; }
.dpm-tgi-chua-luu .dpm-tgi-trang-luu { color: #b91c1c; font-weight: 700; font-size: 14px; }
.dpm-tgi-sp .dpm-tgi-hai-gb { padding: 6px; }
.dpm-tgi-sp .dpm-tgi-hai-gb table { font-size: 12.5px; table-layout: auto; }
.dpm-tgi-sp .dpm-tgi-hai-gb td, .dpm-tgi-sp .dpm-tgi-hai-gb th { padding: 4px 5px !important; }
.dpm-tgi-sp .dpm-tgi-cot-phai { overflow-x: hidden; }
/* 1.5.24: thẻ bảng giá chữ IN HOA, cao hơn; thẻ chọn cách in ở khung tính giá khách */
.dpm-tgi .dpm-tgi-the { text-transform: uppercase; letter-spacing: .3px; padding: 13px 14px !important; font-size: 15px !important; min-height: 50px; }
.dpm-tgi-the-pp:empty { display: none; }
.dpm-tgi-the-pp { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; margin: 10px 0 8px; }
.dpm-tgi .dpm-tgi-pp-the { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 2px; flex: 1 1 220px; padding: 10px 14px; border-radius: 10px; border: 2px solid; background: #fff; cursor: pointer; text-align: left; line-height: 1.3; }
.dpm-tgi .dpm-tgi-pp-the b { font-size: 16px; letter-spacing: .3px; }
.dpm-tgi .dpm-tgi-pp-the small { font-size: 12.5px; opacity: .85; }
.dpm-tgi .dpm-tgi-pp-the span { font-size: 18px; font-weight: 700; }
.dpm-tgi .dpm-tgi-pp-the em { position: absolute; top: 8px; right: 10px; font-style: normal; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 10px; background: #16a34a; color: #fff; }
.dpm-tgi .dpm-tgi-pp-the-k { border-color: var(--tgi-k, #1d4ed8); color: var(--tgi-k, #1d4ed8); }
.dpm-tgi .dpm-tgi-pp-the-o { border-color: var(--tgi-o, #b5121b); color: var(--tgi-o, #b5121b); }
.dpm-tgi .dpm-tgi-pp-the-noi { flex-grow: 1.4; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.dpm-tgi .dpm-tgi-pp-the-chim { opacity: .7; padding: 8px 12px; }
.dpm-tgi .dpm-tgi-pp-the-chim b { font-size: 14px; } .dpm-tgi .dpm-tgi-pp-the-chim span { font-size: 15px; }
.dpm-tgi .dpm-tgi-pp-the-mo { opacity: 1; color: #fff !important; }
.dpm-tgi .dpm-tgi-pp-the-k.dpm-tgi-pp-the-mo { background: var(--tgi-k, #1d4ed8); }
.dpm-tgi .dpm-tgi-pp-the-o.dpm-tgi-pp-the-mo { background: var(--tgi-o, #b5121b); }
.dpm-tgi .dpm-tgi-pp-the-mo em { background: #fff; color: #15803d; }
.dpm-tgi-pp-goi-y { flex-basis: 100%; font-size: 13px; color: #475569; padding: 2px 4px; }
.dpm-tgi .dpm-tgi-o-ndung input { max-width: 140px; }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-chon td.dpm-tgi-o-hoa { background: var(--tgi-hoa, #7f1d1d) !important; color: var(--tgi-hoa-c, #fde047) !important; }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-ngan td { white-space: normal; text-align: left; }
/* 1.5.25: chi tiết giá trên thẻ cách in (khách); ô số lượng từng mẫu */
.dpm-tgi .dpm-tgi-pp-the { outline: none; }
.dpm-tgi .dpm-tgi-pp-ct { align-self: stretch; margin-top: 4px; }
.dpm-tgi .dpm-tgi-pp-ct > summary { list-style: none; text-align: right; font-size: 12.5px; font-weight: 600; cursor: pointer; text-decoration: underline; }
.dpm-tgi .dpm-tgi-pp-ct > summary::-webkit-details-marker { display: none; }
.dpm-tgi .dpm-tgi-pp-ct table { width: 100%; margin-top: 6px; background: #fff; color: #172033; border-radius: 6px; border-collapse: collapse; font-size: 13px; }
.dpm-tgi .dpm-tgi-pp-ct td { padding: 4px 8px; border-bottom: 1px solid #e5e7eb; }
.dpm-tgi .dpm-tgi-pp-ct td:last-child { text-align: right; white-space: nowrap; }
.dpm-tgi .dpm-tgi-pp-ct tr:last-child td { font-weight: 700; border-bottom: 0; }
.dpm-tgi-khach-trang .dpm-tgi-hang > .dpm-tgi-o-ds { flex: 0 1 110px; }
/* 1.5.37: ô "Giấy của khách" cao bằng và thẳng hàng với các ô chọn bên cạnh */
.dpm-tgi-khach-trang .dpm-tgi-hang > .dpm-tgi-o-tu-giay { flex: 0 0 auto; display: flex; flex-direction: column; }
.dpm-tgi-khach-trang .dpm-tgi-o-tu-giay > .dpm-tgi-gc { display: flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; margin: 0; border: 1px solid #cbd5e1; border-radius: 6px; background: #fff; box-sizing: border-box; white-space: nowrap; cursor: pointer; font-size: 15px; }
.dpm-tgi-khach-trang .dpm-tgi-o-tu-giay > .dpm-tgi-gc-chon { border-color: var(--dpm-tgi-chinh, #1d4ed8); }
.dpm-tgi-sp .dpm-tgi-ct-nv { margin: 0 0 8px; font-size: 12.5px; }
.dpm-tgi-sp .dpm-tgi-ct-nv > summary { cursor: pointer; font-weight: 600; color: #1d4ed8; }
.dpm-tgi-sp .dpm-tgi-ct-nv table { width: 100%; margin-top: 4px; font-size: 12px; }
.dpm-tgi-sp .dpm-tgi-ct-nv td, .dpm-tgi-sp .dpm-tgi-ct-nv th { padding: 3px 4px !important; }
.dpm-tgi-sp .dpm-tgi-ct-nv td:not(:first-child), .dpm-tgi-sp .dpm-tgi-ct-nv th:not(:first-child) { text-align: right; white-space: nowrap; }
.dpm-tgi-sp .dpm-tgi-ct-nv tr.dpm-tgi-ct-lo td { background: #fee2e2 !important; }
/* 1.5.26: bảng lũy tiến */
.dpm-tgi-sp .dpm-tgi-lt-hang { align-items: flex-end; gap: 8px 12px; padding: 6px 8px; background: #f8fafc; border-radius: 8px; margin-bottom: 6px; }
.dpm-tgi-sp .dpm-tgi-lt-hang .dpm-tgi-o { flex: 1 1 220px; }
.dpm-tgi-sp .dpm-tgi-lt-nut { display: flex; flex-wrap: wrap; gap: 6px; }
.dpm-tgi-sp .dpm-tgi-lt-nut a { text-decoration: none; }
.dpm-tgi-sp .dpm-tgi-lt-khoa { opacity: .55; pointer-events: none; position: relative; }
.dpm-tgi-sp .dpm-tgi-lt-khoa::before { content: "🔒 Đang lấy theo bảng lũy tiến — sửa ở trang Bảng lũy tiến"; display: block; font-size: 12px; font-weight: 700; color: #1d4ed8; margin: 0 0 4px; }
.dpm-tgi-sp .dpm-tgi-tn-dk { flex-wrap: wrap; gap: 6px 14px; margin: 6px 0; font-size: 13px; }
.dpm-tgi-sp .dpm-tgi-tn-dc { width: 100%; margin-top: 8px; font-size: 13px; }
.dpm-tgi-sp .dpm-tgi-tn-dc td:not(:first-child), .dpm-tgi-sp .dpm-tgi-tn-dc th:not(:first-child) { text-align: right; white-space: nowrap; }
.dpm-tgi-sp .dpm-tgi-tn-dc tr.dpm-tgi-ct-lo td { background: #fee2e2 !important; }
.dpm-tgi-sp .dpm-tgi-tn-luu { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.dpm-tgi-lt-trang .dpm-tgi-lt-hop { background: #fff; border: 1px solid #dcdcde; border-radius: 8px; padding: 10px 14px; margin: 0 0 10px; }
.dpm-tgi-lt-trang .dpm-tgi-lt-hop > summary { cursor: pointer; font-size: 15px; }
.dpm-tgi-lt-trang .dpm-tgi-lt-moc td { padding: 3px 8px 3px 0; }

/* ===== 1.5.27: Quy đổi giá giấy — bố cục hai cột, ô gọn ===== */
.dpm-tgi-qd .dpm-tgi-khoi-ten small { margin-left: 6px; font-weight: 400; font-size: 12px; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-qd .dpm-tgi-khoi { margin-bottom: 10px; padding: 10px 12px; }
.dpm-tgi-qd .dpm-tgi-dong-o { margin-bottom: 6px; }
.dpm-tgi-qd .dpm-tgi-khoi input[type="text"], .dpm-tgi-qd .dpm-tgi-khoi select { height: 34px; min-height: 34px; padding-top: 0; padding-bottom: 0; }
/* Khổ: ô chọn nhanh + hai ô số nhỏ, không kéo hết bề ngang */
.dpm-tgi-qd .dpm-tgi-kho2 { grid-template-columns: 130px auto auto auto; justify-content: start; gap: 6px; }
.dpm-tgi-qd .dpm-tgi-kho2 label span { display: none; }
.dpm-tgi-qd .dpm-tgi-kho2 input[type="text"] { width: 72px; padding-left: 4px; padding-right: 4px; }
.dpm-tgi-qd .dpm-tgi-kho2 label + label::before { content: "×"; margin-right: 6px; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-qd .dpm-tgi-kho2 label + label { margin-left: -2px; }
.dpm-tgi-qd .dpm-tgi-cum-o .dpm-tgi-o-sl { width: 96px; flex: none; }
.dpm-tgi-qd .dpm-tgi-cum-o .dpm-tgi-o-gia { width: 150px; flex: none; }
.dpm-tgi-qd .dpm-tgi-cum-o { flex-wrap: wrap; }
.dpm-tgi-qd .dpm-tgi-nhan-giua { margin-left: 10px; }
.dpm-tgi-qd .dpm-tgi-thong-tin { margin: -2px 0 6px 128px; font-size: 12px; }
.dpm-tgi-qd .dpm-tgi-ghi-nho[data-ghi-gia] { margin-left: 128px; }
/* Tính theo: hai ô bấm, mỗi ô ghi luôn giá */
.dpm-tgi-o-bam-gia { display: flex; flex-wrap: wrap; gap: 8px; }
.dpm-tgi-bam-gia { position: relative; display: flex; flex-direction: column; min-width: 150px; padding: 5px 12px; border: 1px solid var(--dpm-tgi-vien); border-radius: 8px; background: #fff; cursor: pointer; line-height: 1.3; }
.dpm-tgi-bam-gia input { position: absolute; opacity: 0; pointer-events: none; }
.dpm-tgi-bam-gia b { font-size: 13px; font-weight: 600; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-bam-gia output { font-size: 15px; font-weight: 700; }
.dpm-tgi-bam-gia small { font-size: 12px; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-bam-gia:hover { border-color: var(--dpm-tgi-chinh); }
.dpm-tgi-bam-gia:has(input:checked) { border-color: var(--dpm-tgi-chinh); background: #eef3ff; box-shadow: 0 0 0 1px var(--dpm-tgi-chinh); }
.dpm-tgi-bam-gia:has(input:checked) b, .dpm-tgi-bam-gia:has(input:checked) output { color: var(--dpm-tgi-chinh); }
.dpm-tgi-bam-gia:has(input:focus-visible) { outline: 2px solid var(--dpm-tgi-chinh); outline-offset: 2px; }
/* Hai cột: trái ô nhập, phải kết quả đi theo màn hình */
.dpm-tgi-qd-rong .dpm-tgi-qd-hai { display: grid; grid-template-columns: minmax(0, 1fr) minmax(340px, 400px); gap: 16px; align-items: start; }
.dpm-tgi-qd-rong .dpm-tgi-qd-phai { position: sticky; top: 46px; }
.dpm-tgi-qd-rong .dpm-tgi-qd-trai > .dpm-tgi-khoi:last-child { margin-bottom: 0; }
.dpm-tgi-qd-rong .dpm-tgi-kq { padding: 12px 14px; }
.dpm-tgi-qd-rong .dpm-tgi-kq-lon { font-size: 17px; }
.dpm-tgi-qd-rong .dpm-tgi-kq-lon b { font-size: 21px; }
.dpm-tgi-qd-rong .dpm-tgi-kq-bang { font-size: 14px; }
.dpm-tgi-qd-rong .dpm-tgi-kq-bang th { width: 46%; }
.dpm-tgi-qd-rong .dpm-tgi-cat { flex-direction: column; gap: 6px; margin-top: 10px; }
.dpm-tgi-qd-rong .dpm-tgi-cat .dpm-tgi-so-do { flex: none; width: 100%; }
.dpm-tgi-qd-rong .dpm-tgi-cat .dpm-tgi-so-do svg { max-width: 100%; max-height: 200px; }
.dpm-tgi-qd-rong .dpm-tgi-cat-chu { flex: none; gap: 3px; font-size: 13px; }
.dpm-tgi-qd-rong .dpm-tgi-cat-tieu-de { font-size: 14px; font-weight: 600; }
.dpm-tgi-qd .dpm-tgi-so-sanh { margin-top: 14px; }
.dpm-tgi-qd .dpm-tgi-goi-y:empty { display: none; }
@media (max-width: 600px) {
	.dpm-tgi-qd .dpm-tgi-thong-tin, .dpm-tgi-qd .dpm-tgi-ghi-nho[data-ghi-gia] { margin-left: 0; }
	.dpm-tgi-qd .dpm-tgi-kho2 { grid-template-columns: 1fr 1fr auto; }
	.dpm-tgi-qd .dpm-tgi-kho2 input[type="text"] { width: 100%; }
	.dpm-tgi-bam-gia { flex: 1 1 140px; min-width: 0; }
}

/* ===== 1.5.28: giá 1 sản phẩm dưới mỗi ô bảng giá ===== */
.dpm-tgi .dpm-tgi-bg td small.dpm-tgi-1sp { display: block; margin: 1px 0 0; font-size: 11.5px; font-weight: 400; line-height: 1.2; color: inherit; opacity: .72; }

/* ===== 1.5.29: Quy đổi giá giấy — ô bấm nhà cung cấp, so sánh nhà ===== */
.dpm-tgi-o-bam-ncc { display: flex; flex-wrap: wrap; gap: 6px; }
.dpm-tgi .dpm-tgi-bam-ncc { min-height: 34px; padding: 4px 14px; border: 1px solid var(--dpm-tgi-vien); border-radius: 17px; background: #fff; color: var(--dpm-tgi-chu); font: inherit; font-size: 14px; line-height: 1.2; cursor: pointer; }
.dpm-tgi .dpm-tgi-bam-ncc:hover { border-color: var(--dpm-tgi-chinh); }
.dpm-tgi .dpm-tgi-bam-ncc.dpm-tgi-bam-chon { border-color: var(--dpm-tgi-chinh); background: var(--dpm-tgi-chinh); color: #fff; font-weight: 600; }
.dpm-tgi .dpm-tgi-bam-tu { border-style: dashed; }
.dpm-tgi-qd .dpm-tgi-so-ncc:empty { display: none; }
.dpm-tgi-qd .dpm-tgi-so-ncc { margin-top: 14px; }
.dpm-tgi-qd .dpm-tgi-so-ncc th:nth-child(2), .dpm-tgi-qd .dpm-tgi-so-ncc td:nth-child(2) { text-align: left; }

/* ===== 1.5.30: Giấy / gia công khách được chọn (mục 1, mục 3 trang soạn bài) ===== */
.dpm-tgi-hop-kc { margin-top: 8px; }
.dpm-tgi-hop-kc .dpm-tgi-kc-nha { margin: 6px 0 2px; }
.dpm-tgi-hop-kc .dpm-tgi-kc-nha > b { display: block; margin-bottom: 2px; color: var(--dpm-tgi-chinh); }
.dpm-tgi-hop-kc .dpm-tgi-hop-khach-giay i { display: inline-block; min-width: 92px; font-style: normal; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-hop-kc .dpm-tgi-kc-bai { font-weight: 700; }
.dpm-tgi-hop-kc .dpm-tgi-kc-ca { font-size: 12px; }
.dpm-tgi-hop-kc .dpm-tgi-kc-trung { opacity: .45; }

/* ===== 1.5.31: giá gia công riêng cho in offset và in kỹ thuật số ===== */
.dpm-tgi-gc-dong { display: inline-flex; flex-wrap: wrap; align-items: flex-end; gap: 4px; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .7); }
.dpm-tgi-gc-dong > b { align-self: center; min-width: 46px; font-size: 12px; color: var(--dpm-tgi-chinh); }
.dpm-tgi-gc-o1.dpm-tgi-gc-sua input { background: #fef3c7 !important; border-color: #f59e0b !important; }
.dpm-tgi-gc-ve { font-size: 12px; white-space: nowrap; }

/* ===== 1.5.32: khung "Giấy khách được chọn" gập gọn, đủ mọi giấy ===== */
.dpm-tgi-kc-ngoai > summary { cursor: pointer; list-style: revert; padding: 2px 0; }
.dpm-tgi-kc-ngoai > summary .dpm-tgi-kc-tom { margin-left: 6px; font-size: 12px; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-kc-giai { margin: 4px 0 6px; }
.dpm-tgi-kc-nhom { margin: 2px 0 2px 8px; }
.dpm-tgi-kc-nhom > summary { cursor: pointer; padding: 2px 0; }
.dpm-tgi-kc-nhom > summary i { display: inline-block; min-width: 92px; font-style: normal; font-weight: 600; color: #374151; }
.dpm-tgi-kc-nhom > summary .dpm-tgi-kc-dem { font-size: 12px; color: var(--dpm-tgi-chu-phu); }
.dpm-tgi-kc-nhom[open] > summary { margin-bottom: 2px; }
.dpm-tgi-kc-nhom .dpm-tgi-hop-khach-giay { padding: 2px 0 4px 18px; }
.dpm-tgi-hop-kc .dpm-tgi-kc-chua-gia { opacity: .45; cursor: not-allowed; }
.dpm-tgi-hop-kc .dpm-tgi-kc-chua-gia small { font-size: 11px; }

/* ===== 1.5.33: gia công xếp theo nhóm ===== */
.dpm-tgi-gc-nhom-dong { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 4px 0; border-bottom: 1px dashed rgba(15, 23, 42, .1); }
.dpm-tgi-gc-nhom-ten { min-width: 110px; font-weight: 600; }
.dpm-tgi-gc-nhom-dong > select { min-width: 150px; }
.dpm-tgi-gc-nhom-co > select { border-color: var(--dpm-tgi-chinh); font-weight: 600; }
.dpm-tgi-gc.dpm-tgi-gc-trong { padding: 0; border: 0; background: none; box-shadow: none; }
.dpm-tgi-gc-moi { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.dpm-tgi-gc-nhom-k { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-right: 10px; }
.dpm-tgi-gc-nhom-k > b { font-size: 13px; font-weight: 600; }
.dpm-tgi-sp .dpm-tgi-gc-hang { display: block; }
.dpm-tgi-sp .dpm-tgi-gc-hang [data-ds-gc] { display: block; margin-bottom: 6px; }
.dpm-tgi .dpm-tgi-gc-nhom-dong { flex-wrap: nowrap; }
.dpm-tgi .dpm-tgi-gc-nhom-dong > select { width: auto; min-width: 150px; max-width: 220px; flex: 0 0 auto; }
.dpm-tgi .dpm-tgi-gc-nhom-dong > .dpm-tgi-gc-trong { flex: 1 1 auto; }
.dpm-tgi .dpm-tgi-gc-nhom-dong > .dpm-tgi-gc-trong .dpm-tgi-gc-o { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 4px; }
@media (max-width: 900px) { .dpm-tgi .dpm-tgi-gc-nhom-dong { flex-wrap: wrap; } }

/* ===== 1.5.34: nút "Xem chi tiết" (giá 1 sản phẩm) ở hàng chú thích màu ===== */
.dpm-tgi-giai-mau .dpm-tgi-xem-ct { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border: 1px solid var(--dpm-tgi-vien); border-radius: 14px; background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.dpm-tgi-giai-mau .dpm-tgi-xem-ct input { margin: 0; }
.dpm-tgi-an-1sp small.dpm-tgi-1sp { display: none !important; }

/* 1.5.38: trang khách — hai tab IN NHANH | IN OFFSET liền khung giá; nút XEM CHI TIẾT GIÁ; bảng chi tiết; lời nhắn */
.dpm-tgi .dpm-tgi-the-pp { display: block; margin: 0; }
.dpm-tgi .dpm-tgi-pp-tabs { display: flex; gap: 6px; align-items: flex-end; }
.dpm-tgi .dpm-tgi-pp-tab { flex: 1 1 0; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 8px 16px; border: 2px solid; border-bottom: 0; border-radius: 10px 10px 0 0; background: #fff; cursor: pointer; outline: none; line-height: 1.2; min-width: 0; }
.dpm-tgi .dpm-tgi-pp-tab b { font-size: 20px; font-weight: 800; letter-spacing: .3px; white-space: nowrap; }
.dpm-tgi .dpm-tgi-pp-tab span { font-size: 20px; font-weight: 800; white-space: nowrap; }
.dpm-tgi .dpm-tgi-pp-tab.dpm-tgi-pp-the-k { border-color: var(--tgi-k, #1d4ed8); color: var(--tgi-k, #1d4ed8); }
.dpm-tgi .dpm-tgi-pp-tab.dpm-tgi-pp-the-o { border-color: var(--tgi-o, #b5121b); color: var(--tgi-o, #b5121b); }
.dpm-tgi .dpm-tgi-pp-tab.dpm-tgi-pp-the-mo { color: #fff !important; padding-top: 11px; }
.dpm-tgi .dpm-tgi-pp-tab.dpm-tgi-pp-the-k.dpm-tgi-pp-the-mo { background: var(--tgi-k, #1d4ed8); }
.dpm-tgi .dpm-tgi-pp-tab.dpm-tgi-pp-the-o.dpm-tgi-pp-the-mo { background: var(--tgi-o, #b5121b); }
.dpm-tgi .dpm-tgi-pp-tab:focus-visible { box-shadow: 0 0 0 3px rgba(37,99,235,.35); }
.dpm-tgi .dpm-tgi-the-pp + .dpm-tgi-kq-khach { border-top-left-radius: 0; border-top-right-radius: 0; }
.dpm-tgi .dpm-tgi-pp-goi-y { font-size: 12.5px; margin: 4px 0; }
@media (max-width: 520px) { .dpm-tgi .dpm-tgi-pp-tab { flex-direction: column; gap: 2px; padding: 6px 10px; } .dpm-tgi .dpm-tgi-pp-tab b, .dpm-tgi .dpm-tgi-pp-tab span { font-size: 16px; } }
.dpm-tgi .dpm-tgi-nut-ct { align-self: center; padding: 6px 14px; border: 0; border-radius: 6px; background: #1e1b8a; color: #fff; font-weight: 800; font-size: 14px; letter-spacing: .3px; cursor: pointer; }
.dpm-tgi .dpm-tgi-nut-ct:hover { filter: brightness(1.15); }
.dpm-tgi .dpm-tgi-nut-ct[hidden] { display: none; }
.dpm-tgi .dpm-tgi-ct-khach-hop { grid-column: 1 / -1; flex-basis: 100%; }
.dpm-tgi .dpm-tgi-ct-khach-hop[hidden] { display: none; }
.dpm-tgi .dpm-tgi-ct-khach { width: 100%; max-width: 560px; border-collapse: collapse; background: #fff; color: #172033; border-radius: 6px; overflow: hidden; font-size: 14px; }
.dpm-tgi .dpm-tgi-ct-khach td { padding: 5px 12px; border-bottom: 1px solid #e5e7eb; }
.dpm-tgi .dpm-tgi-ct-khach td:last-child { text-align: right; white-space: nowrap; font-weight: 600; }
.dpm-tgi .dpm-tgi-ct-khach tr:last-child td { font-weight: 800; border-bottom: 0; background: #f1f5f9; }
.dpm-tgi .dpm-tgi-loi-nhan { margin: -4px 0 12px; padding: 6px 14px; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; text-align: center; font-size: 14.5px; color: #172033; }

/* 1.5.39: trang báo giá gia công cho khách [dpm_bao_gia_gia_cong] */
.dpm-tgi-gck { display: flex; flex-direction: column; gap: 16px; max-width: 1100px; margin: 0 auto; color: #0f172a; }
.dpm-tgi-gck * { box-sizing: border-box; }
.dpm-tgi-gck-menu { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px; border-radius: 12px; background: #0f172a; }
.dpm-tgi-gck-chip { min-height: 40px; padding: 6px 16px; border-radius: 999px; border: 1.5px solid #334155; background: transparent; color: #e2e8f0; font-size: 14px; font-weight: 700; cursor: pointer; }
.dpm-tgi-gck-chip-mo { background: #5eead4; border-color: #5eead4; color: #0f172a; }
.dpm-tgi-gck-dau h2 { margin: 0 0 4px; font-size: 30px; font-weight: 800; }
.dpm-tgi-gck-dau p { margin: 0; font-size: 15px; color: #475569; }
.dpm-tgi-gck-loai { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dpm-tgi-gck-loai > span { font-size: 13px; font-weight: 700; color: #334155; margin-right: 4px; }
.dpm-tgi-gck-pill { min-height: 40px; padding: 6px 16px; border-radius: 8px; border: 1.5px solid #cbd5e1; background: #fff; color: #334155; font-size: 14px; font-weight: 700; cursor: pointer; }
.dpm-tgi-gck-pill-mo { background: #0f766e; border-color: #0f766e; color: #fff; }
.dpm-tgi-gck-h3 { margin: 0 0 10px; font-size: 18px; font-weight: 800; }
.dpm-tgi-gck-the { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: -4px; }
.dpm-tgi-gck-cach { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 12px; background: #fff; border: 1px solid #e2e8f0; border-top: 6px solid #0f766e; }
.dpm-tgi-gck-cach > b { font-size: 17px; }
.dpm-tgi-gck-cach > small { font-size: 12.5px; color: #475569; margin-top: -6px; }
.dpm-tgi-gck-cach-n { border-top-color: var(--tgi-k, #1d4ed8); } .dpm-tgi-gck-cach-n > b { color: var(--tgi-k, #1d4ed8); }
.dpm-tgi-gck-cach-k { border-top-color: var(--tgi-o, #b5121b); } .dpm-tgi-gck-cach-k > b { color: var(--tgi-o, #b5121b); }
.dpm-tgi-gck-dong { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 14px; padding: 8px 12px; border-radius: 8px; background: #f8fafc; font-size: 14px; }
.dpm-tgi-gck-dong > span { color: #334155; }
.dpm-tgi-gck-dong > b { white-space: nowrap; font-size: 15px; }
.dpm-tgi-gck-tinh { padding: 18px; border-radius: 14px; background: #fff; border: 1px solid #e2e8f0; }
.dpm-tgi-gck-o-hang { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; align-items: end; margin-bottom: 14px; }
.dpm-tgi-gck-o { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: #334155; }
.dpm-tgi-gck-o input, .dpm-tgi-gck-o select { width: 100%; min-height: 44px; padding: 0 12px; font-size: 17px; font-weight: 700; border: 1.5px solid #cbd5e1; border-radius: 8px; background: #fff; }
.dpm-tgi-gck-nut2 { display: flex; gap: 6px; } .dpm-tgi-gck-nut2 .dpm-tgi-gck-pill { min-height: 44px; flex: 1; }
.dpm-tgi-gck-quy { display: flex; flex-direction: column; justify-content: center; gap: 2px; min-height: 44px; padding: 8px 12px; border-radius: 10px; background: #f0fdfa; border: 1px dashed #5eead4; }
.dpm-tgi-gck-quy span { font-size: 12px; color: #115e59; font-weight: 600; } .dpm-tgi-gck-quy b { font-size: 15px; }
.dpm-tgi-gck-tabs { display: flex; gap: 6px; align-items: flex-end; }
.dpm-tgi-gck-tab { flex: 1 1 0; display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 9px 16px; border: 2px solid #0f766e; border-bottom: 0; border-radius: 10px 10px 0 0; background: #fff; color: #0f766e; cursor: pointer; min-width: 0; text-align: left; }
.dpm-tgi-gck-tab b { font-size: 18px; font-weight: 800; } .dpm-tgi-gck-tab span { font-size: 19px; font-weight: 800; white-space: nowrap; }
.dpm-tgi-gck-tab-n { border-color: var(--tgi-k, #1d4ed8); color: var(--tgi-k, #1d4ed8); }
.dpm-tgi-gck-tab-k { border-color: var(--tgi-o, #b5121b); color: var(--tgi-o, #b5121b); }
.dpm-tgi-gck-tab-mo { color: #fff !important; padding-top: 12px; background: #0f766e; }
.dpm-tgi-gck-tab-n.dpm-tgi-gck-tab-mo { background: var(--tgi-k, #1d4ed8); } .dpm-tgi-gck-tab-k.dpm-tgi-gck-tab-mo { background: var(--tgi-o, #b5121b); }
@media (max-width: 520px) { .dpm-tgi-gck-tab { flex-direction: column; gap: 2px; padding: 6px 10px; } .dpm-tgi-gck-tab b, .dpm-tgi-gck-tab span { font-size: 15px; } }
.dpm-tgi-gck-khung { display: flex; flex-direction: column; gap: 12px; padding: 16px; border: 2px solid #0f766e; border-top: 0; border-radius: 0 0 12px 12px; background: var(--tgi-n-phai, #d1fae5); }
.dpm-tgi-gck-khung-n { border-color: var(--tgi-k, #1d4ed8); } .dpm-tgi-gck-khung-k { border-color: var(--tgi-o, #b5121b); }
.dpm-tgi-gck-so { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 26px; font-size: 14px; color: #334155; }
.dpm-tgi-gck-so b { font-size: 26px; color: var(--tgi-tien, #b5121b); margin-left: 6px; }
.dpm-tgi-gck-so small { font-size: 12.5px; color: #475569; }
.dpm-tgi-gck-goi-y { margin: 0; font-size: 13.5px; color: #334155; }
.dpm-tgi-gck-ct { background: #fff; border-radius: 10px; overflow: hidden; }
.dpm-tgi-gck-ct-dau { padding: 9px 12px; background: #f1f5f9; font-weight: 800; font-size: 14px; }
.dpm-tgi-gck-ct .dpm-tgi-gck-dong { border-radius: 0; background: #fff; border-top: 1px solid #e2e8f0; }
.dpm-tgi-gck-ct .dpm-tgi-gck-dong-tong { background: #f8fafc; border-top: 2px solid #cbd5e1; font-weight: 800; }
.dpm-tgi-gck-bang-hop { padding: 18px; border-radius: 14px; background: #fff; border: 1px solid #e2e8f0; }
.dpm-tgi-gck-cuon { overflow-x: auto; }
.dpm-tgi-gck-bang { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 14.5px; }
.dpm-tgi-gck-bang th, .dpm-tgi-gck-bang td { padding: 8px 12px; text-align: right; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.dpm-tgi-gck-bang th:first-child { text-align: left; }
.dpm-tgi-gck-bang thead th { background: #0f172a; color: #fff; font-weight: 700; }
.dpm-tgi-gck-bang thead th.dpm-tgi-gck-th-n { background: var(--tgi-k, #1d4ed8); } .dpm-tgi-gck-bang thead th.dpm-tgi-gck-th-k { background: var(--tgi-o, #b5121b); }
.dpm-tgi-gck-bang tr.dpm-tgi-gck-dang { background: #fef9c3; }
.dpm-tgi-gck-bang td.dpm-tgi-gck-re { background: #bbf7d0; font-weight: 800; }
.dpm-tgi-gck-ghi { margin: 8px 0 0; font-size: 12.5px; color: #64748b; }
.dpm-tgi-gck-mau-re, .dpm-tgi-gck-mau-dang { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: -1px; background: #bbf7d0; border: 1px solid #16a34a; }
.dpm-tgi-gck-mau-dang { background: #fef9c3; border-color: #ca8a04; }
.dpm-tgi-gck-trong { padding: 16px; border: 2px dashed #cbd5e1; border-radius: 12px; text-align: center; color: #475569; }

/* 1.5.41: trang Đối tác — 5 mục lớn gập gọn */
.dpm-tgi-crm .dpm-tgi-hop > h2 { margin: 0; }
.dpm-tgi-crm .dpm-tgi-hop-nut { display: flex; align-items: baseline; gap: 8px; width: 100%; padding: 4px 0; border: 0; background: transparent; font: inherit; font-size: 15px; font-weight: 600; color: #1d2327; text-align: left; cursor: pointer; }
.dpm-tgi-crm .dpm-tgi-hop-nut small { font-weight: 400; color: #50575e; font-size: 13px; }
.dpm-tgi-crm .dpm-tgi-hop-mui { display: inline-block; transition: transform .15s; color: #2271b1; }
.dpm-tgi-crm .dpm-tgi-hop-mo .dpm-tgi-hop-mui { transform: rotate(90deg); }
.dpm-tgi-crm .dpm-tgi-hop-mo > h2 { margin-bottom: 10px; }
.dpm-tgi-crm .dpm-tgi-tc-gap > summary { cursor: pointer; }
.dpm-tgi-crm .dpm-tgi-tc-gap[open] > summary { margin-bottom: 6px; }
/* 1.5.41: báo giá tổng hợp gia công + đang tính */
.dpm-tgi-gck.dpm-tgi-dang-tinh .dpm-tgi-gck-khung, .dpm-tgi-gck.dpm-tgi-dang-tinh .dpm-tgi-gck-tabs, .dpm-tgi-gck.dpm-tgi-dang-tinh .dpm-tgi-gck-bang-hop { opacity: .55; transition: opacity .15s; }
.dpm-tgi-gck-h3 small { font-weight: 500; font-size: 13px; color: #64748b; }
.dpm-tgi-gck-buoc { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.dpm-tgi-gck-cot { display: flex; flex-direction: column; gap: 0; padding: 10px 12px; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0; }
.dpm-tgi-gck-cot-ten { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; }
.dpm-tgi-gck-cot-ten i { width: 26px; height: 26px; border-radius: 50%; background: #0f172a; color: #fff; font-style: normal; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.dpm-tgi-gck-viec { display: flex; align-items: center; gap: 8px; padding: 4px 2px; cursor: pointer; font-size: 15px; } /* 1.5.54: một dòng, không khung */
.dpm-tgi-gck-viec input { margin: 0; width: 18px; height: 18px; flex: none; accent-color: #0f766e; }
.dpm-tgi-gck-viec span { display: flex; flex-direction: column; } .dpm-tgi-gck-viec small { font-size: 12px; color: #64748b; }
.dpm-tgi-gck-viec-mo { color: #0f766e; }
.dpm-tgi-gck-ct .dpm-tgi-gck-dong > span > small { display: block; font-size: 12.5px; color: #64748b; font-weight: 400; margin-top: 2px; }

/* 1.5.42: bảng lũy tiến của khâu gia công */
.dpm-tgi-crm .dpm-tgi-o-lt-khau { display: flex; flex-direction: column; gap: 2px; }
.dpm-tgi-crm .dpm-tgi-lt-sai { color: #b91c1c; font-weight: 600; max-width: 260px; }
.dpm-tgi-lt-dv-nhan { color: #50575e; font-weight: 400; }

/* 1.5.43: khổ khác = 2 ô Rộng × Dài (trang khách gia công) */
.dpm-tgi-gck-rd { display: flex; align-items: center; gap: 6px; }
.dpm-tgi-gck-rd input { min-width: 0; flex: 1; }
.dpm-tgi-gck-rd i { font-style: normal; color: #64748b; font-weight: 600; }

/* 1.5.43: ô khổ 2 ô và ô "Mỗi lượt thêm" có đơn vị (trang Đối tác) */
.dpm-tgi-kho2 { display: inline-flex; }
.dpm-tgi-kho2 input[type="text"], .dpm-tgi-dm-dau .dpm-tgi-hep .dpm-tgi-kho2 input[type="text"] { width: 58px; min-width: 0; text-align: center; }
.dpm-tgi-gia-luot { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.dpm-tgi-gia-luot input[type="text"] { width: 80px; min-width: 0; }
.dpm-tgi-gia-luot select { min-width: 0; max-width: 120px; font-size: 12px; }

/* 1.5.43: trang Đối tác kiểu CRM */
.dpm-tgi-crm [hidden] { display: none !important; }
.dpm-tgi-lui { margin: 8px 0 0; }
.dpm-tgi-crm-mot h1.wp-heading-inline { margin-right: 8px; }
.dpm-tgi-dt-tim { margin: 12px 0 8px; }
.dpm-tgi-dt-tim input { min-width: 260px; }
.dpm-tgi-ds-dt .c-ten { width: 30%; }
.dpm-tgi-ds-dt .c-lam { width: 26%; }
.dpm-tgi-ds-dt .c-so { width: 70px; text-align: right; }
.dpm-tgi-ds-dt .row-title { font-size: 14px; }
.dpm-tgi-nhan { display: inline-block; font-size: 11.5px; line-height: 1.6; padding: 0 8px; border-radius: 10px; margin: 1px 2px 1px 0; white-space: nowrap; background: #e7f0f9; color: #135e96; vertical-align: middle; }
.dpm-tgi-nhan-giay { background: #edfaef; color: #00703c; }
.dpm-tgi-nhan-kem { background: #f3eefc; color: #5b3a9a; }
.dpm-tgi-nhan-gc { background: #fcf0f1; color: #8a2424; }
h2.dpm-tgi-dt-chung { margin-top: 28px; }
.dpm-tgi-dt-mot { background: transparent; border: 0; box-shadow: none; }
.dpm-tgi-dt-mot > summary { display: none; }
.dpm-tgi-dt-mot > .dpm-tgi-dm-than { padding: 0; }
.dpm-tgi-lh, .dpm-tgi-dt-mot .dpm-tgi-dv { background: #fff; border: 1px solid #dcdcde; padding: 12px 16px; margin: 0 0 12px; }
h2.dpm-tgi-dt-h2 { font-size: 16px; margin: 4px 0 10px; display: flex; align-items: center; gap: 10px; }
.dpm-tgi-dt-mot > .dpm-tgi-dm-than > h2.dpm-tgi-dt-h2 { margin: 20px 0 8px; }
.dpm-tgi-lh-ds { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px 24px; margin: 0 0 6px; }
.dpm-tgi-lh-ds div { display: flex; gap: 10px; align-items: baseline; }
.dpm-tgi-lh-ds dt { color: #646970; font-size: 12.5px; width: 110px; flex: none; }
.dpm-tgi-lh-ds dd { margin: 0; }
.dpm-tgi-lh-rong { grid-column: 1 / -1; }
.dpm-tgi-lh-sua { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px 18px; }
.dpm-tgi-lh-sua label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: #50575e; }
.dpm-tgi-lh-sua input, .dpm-tgi-lh-sua select { width: 100%; }
.dpm-tgi-bang-giay-dt { max-width: 900px; }

/* 1.5.43: Kho giấy lọc theo nhà cung cấp */
.dpm-tgi-loc-ncc { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; background: #fff; border: 1px solid #dcdcde; padding: 10px 12px; margin: 0 0 12px; }
.dpm-tgi-loc-ncc select { min-width: 200px; }
.dpm-tgi-bang-kho tr[hidden], details.dpm-tgi-dm[hidden] { display: none !important; }
.dpm-tgi-bang-kho .c-ncc { width: 17%; white-space: nowrap; }
.dpm-tgi-bang-kho .c-ncc select { max-width: calc(100% - 52px); }
.dpm-tgi-ncc-xem { font-size: 12px; margin-left: 4px; }
tr.dpm-tgi-nhay td { animation: dpmTgiNhay 2.5s ease-out; }
@keyframes dpmTgiNhay { 0%, 40% { background: #fff3c4; } 100% { background: transparent; } }
.dpm-tgi-bang-kho .c-dl { width: 10%; } .dpm-tgi-bang-kho .c-hang { width: 9%; }
.dpm-tgi-bang-kho .dpm-tgi-kho2 input[type="text"], .dpm-tgi-dm-dau .dpm-tgi-kho2 input[type="text"] { width: 58px; min-width: 0; text-align: center; flex: none; }
.dpm-tgi-bang-kho .dpm-tgi-gia-luot input[type="text"] { width: 80px; min-width: 0; flex: none; }
.dpm-tgi-bang-kho .dpm-tgi-gia-luot select { width: auto; }

/* 1.5.44: hộp ít dùng gập sẵn + "Hướng dẫn" gập */
details.dpm-tgi-gap > summary { cursor: pointer; padding: 2px 0; }
details.dpm-tgi-gap:not([open]) { padding-top: 12px; padding-bottom: 12px; }
details.dpm-tgi-gap[open] > summary { margin-bottom: 10px; }
.dpm-tgi-huong-dan-gap { margin: 6px 0 12px; }
.dpm-tgi-huong-dan-gap > summary { cursor: pointer; color: #2271b1; font-size: 13px; }
.dpm-tgi-huong-dan-gap .dpm-tgi-huong-dan { margin-top: 6px; }
/* 1.5.44: danh mục đang lọc một nhà cung cấp → ẩn cột Nhà cung cấp (dòng nào cũng của người đó) */
.dpm-tgi-dm.dpm-tgi-dang-loc .dpm-tgi-bang-kho .c-ncc { display: none; }
.dpm-tgi-trong-ncc { margin: 8px 0; padding: 10px 12px; background: #f6f7f7; border: 1px dashed #c3c4c7; color: #50575e; }

/* 1.5.44: báo giá tổng hợp — mỗi việc bấm được để xem bảng giá của việc đó */
button.dpm-tgi-gck-dong-bam { width: 100%; border: 0; border-top: 1px solid #e5e7eb; background: transparent; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.dpm-tgi-gck-ct button.dpm-tgi-gck-dong-bam:hover { background: #f8fafc; }
.dpm-tgi-gck-ct button.dpm-tgi-gck-dong-bam.dpm-tgi-gck-dong-mo { background: #f1f5f9; }
.dpm-tgi-gck-mui { font-style: normal; color: #2563eb; display: inline-block; width: 1em; }
.dpm-tgi-gck-ct-viec { margin: 0 0 6px 18px; border-left: 3px solid #93c5fd; background: #fff; }
.dpm-tgi-gck-ct-viec .dpm-tgi-gck-dong { font-size: 13px; }

/* 1.5.45: trang Dịch vụ — thẻ đang chọn; liên kết "Xem dịch vụ →" */
.dpm-tgi-tab-dv a.dpm-tgi-tab-mo { background: #2271b1; color: #fff; border-color: #2271b1; }
.dpm-tgi-xem-dv { font-size: 12px; font-weight: 400; margin-left: 8px; white-space: nowrap; }
details.dpm-tgi-nhay-dv > summary { animation: dpmTgiNhay 2.5s ease-out; }
.dpm-tgi-sang-dv { margin-top: 14px; }

/* 1.5.46: báo giá tổng hợp — bảng dưới đổi theo việc đang xem */
.dpm-tgi-gck-chon-bang { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 10px; }
.dpm-tgi-gck-chon-bang > span { font-size: 13px; font-weight: 600; color: #334155; margin-right: 4px; }
.dpm-tgi-gck-chon-bang .dpm-tgi-gck-pill { min-height: 34px; padding: 0 14px; font-size: 13px; }
.dpm-tgi-gck-ct .dpm-tgi-gck-ct-dau small { font-weight: 400; color: #64748b; margin-left: 4px; }
.dpm-tgi-gck-ct button.dpm-tgi-gck-dong-bam.dpm-tgi-gck-dong-xem { box-shadow: inset 4px 0 0 #2563eb; background: #eff6ff; }
.dpm-tgi-gck-viec.dpm-tgi-gck-viec-xem b { text-decoration: underline; text-underline-offset: 3px; }
.dpm-tgi-gck-ghi-viec { font-size: 12.5px; color: #2563eb; padding: 6px 12px 8px; }
/* 1.5.46: tiêu đề bảng (bảng nào cũng ghi rõ là của cái gì) */
.dpm-tgi .dpm-tgi-ct-khach caption { caption-side: top; text-align: left; font-weight: 700; padding: 8px 10px; background: #f1f5f9; color: #0f172a; }
.dpm-tgi-bang-gia-in caption { caption-side: top; text-align: left; font-weight: 600; padding: 6px 0; color: #1d2327; }

/* 1.5.47: ô kích thước hình (tiền bản) ở trang báo giá gia công */
.dpm-tgi-gck-o-hep input { max-width: 120px; }
.dpm-tgi-gck-ghi-ban { margin: -6px 0 14px; font-size: 13px; color: #64748b; }

/* 1.5.49: đơn vị trong từng ô giá gia công; ô không áp dụng hiện "—"; ghi chú gọn */
.dpm-tgi-o-co { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.dpm-tgi-o-co[hidden], .dpm-tgi-o-gach[hidden] { display: none; }
.dpm-tgi-o-dv { color: #64748b; font-size: 11px; }
.dpm-tgi-o-dv:empty { display: none; }
.dpm-tgi-o-gach { display: inline-block; min-width: 60px; text-align: center; color: #94a3b8; }
.dpm-tgi-crm .dpm-tgi-o-ghi input[type="text"] { min-width: 70px; width: 90px; font-size: 12px; color: #475569; }
/* 1.5.49: bảng nhỏ "Thêm đơn vị tính" ngay tại ô chọn */
.dpm-tgi-dvt-hop { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; background: rgba(15, 23, 42, .35); }
.dpm-tgi-dvt-hop[hidden] { display: none; }
.dpm-tgi-dvt-hop-than { background: #fff; border-radius: 8px; padding: 16px 18px; width: 340px; max-width: 92vw; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); }
.dpm-tgi-dvt-hop-than h3 { margin: 0 0 10px; font-size: 15px; }
.dpm-tgi-dvt-hop-than label { display: block; margin-bottom: 10px; }
.dpm-tgi-dvt-hop-than label > span:first-child { display: block; font-weight: 600; font-size: 12px; margin-bottom: 3px; }
.dpm-tgi-dvt-hop-than input[type="text"], .dpm-tgi-dvt-hop-than select { width: 100%; }
.dpm-tgi-dvt-hop-than .dpm-tgi-dvt-quy input { width: 90px; }
.dpm-tgi-dvt-hop-than label[hidden] { display: none; }
.dpm-tgi-dvt-loi { color: #b91c1c; margin: 0 0 8px; }
.dpm-tgi-dvt-nut { margin: 4px 0 0; text-align: right; }
.dpm-tgi-bang-dvt input[type="text"] { width: 160px; }
.dpm-tgi-dvt-dung { font-size: 12px; color: #475569; }

/* 1.5.51: bảng số lượng từng việc (báo giá gia công tổng hợp) */
.dpm-tgi-gck-quy-bang { display: block; min-height: 0; margin: 0 0 14px; padding: 10px 12px; }
.dpm-tgi-gck-quy-bang > span { display: block; margin-bottom: 6px; }
.dpm-tgi-gck-quy-bang > span small { font-weight: 400; color: #4b5563; }
.dpm-tgi-gck-quy-bang table { width: 100%; border-collapse: collapse; font-size: 14px; }
.dpm-tgi-gck-quy-bang th { text-align: left; font-size: 12px; font-weight: 600; color: #115e59; padding: 4px 6px; border-bottom: 1px solid #99f6e4; }
.dpm-tgi-gck-quy-bang td { padding: 5px 6px; border-bottom: 1px solid #ccfbf1; vertical-align: middle; }
.dpm-tgi-gck-quy-bang tr:last-child td { border-bottom: 0; }
.dpm-tgi-gck-quy-bang td b { font-size: 14px; }
.dpm-tgi-gck-rso { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.dpm-tgi-gck .dpm-tgi-gck-rso input { width: 90px; height: auto; min-height: 0; font-size: 14px; line-height: 1.3; padding: 4px 6px; border: 1px solid #94a3b8; border-radius: 6px; font: inherit; text-align: right; }
.dpm-tgi-gck .dpm-tgi-gck-rso input.dpm-tgi-gck-da-sua { border-color: #0f766e; background: #fefce8; font-weight: 600; }
.dpm-tgi-gck-ve { border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; padding: 1px 6px; cursor: pointer; font-size: 13px; line-height: 1.4; }
.dpm-tgi-gck-nhac { display: block; color: #b45309; font-size: 11px; }
.dpm-tgi-gck-mo-chu { color: #6b7280; font-style: normal; }
.dpm-tgi-gck-nut2-nho { display: inline-flex; gap: 4px; }
.dpm-tgi-gck-nut2-nho .dpm-tgi-gck-pill { padding: 3px 8px; font-size: 12px; min-height: 0; }
.dpm-tgi-gck-quy-bang { overflow-x: auto; }

/* 1.5.52: báo giá kiểu hóa đơn — dòng hàng, chi tiết gập, bảng hóa đơn */
.dpm-tgi-gck-ct-ghi { margin: 6px 0; font-size: 12px; color: #475569; }
.dpm-tgi-gck .dpm-tgi-gck-rso input::placeholder { color: #94a3b8; font-weight: 400; }
.dpm-tgi-gck .dpm-tgi-gck-rso input.dpm-tgi-gck-o-cm { width: 58px; }
.dpm-tgi-gck-rso i { font-style: normal; color: #64748b; }
.dpm-tgi-gck-tr-sua td:first-child { font-weight: 700; }
.dpm-tgi-gck-nut2-nho .dpm-tgi-gck-pill-nhat { opacity: .55; }

/* 1.5.53: nút to "Sửa chi tiết / Thêm mặt hàng" + khung mặt hàng thêm */
.dpm-tgi-gck-khung-sua { margin: 4px 0 18px; }
.dpm-tgi-gck-nut-sua { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; width: 100%; padding: 14px 18px; border: 2px solid #0f766e; border-radius: 12px; background: #fff; color: #0f766e; cursor: pointer; font: inherit; text-align: left; box-shadow: 0 2px 0 rgba(15,118,110,.25); }
.dpm-tgi-gck-nut-sua:hover { background: #f0fdfa; }
.dpm-tgi-gck-nut-sua span { font-size: 18px; font-weight: 800; }
.dpm-tgi-gck-nut-sua small { font-size: 14px; color: #334155; }
.dpm-tgi-gck-nut-sua i { margin-left: auto; font-style: normal; font-size: 14px; }
.dpm-tgi-gck-khung-sua-mo .dpm-tgi-gck-nut-sua { background: #0f766e; color: #fff; border-radius: 12px 12px 0 0; }
.dpm-tgi-gck-khung-sua-mo .dpm-tgi-gck-nut-sua small { color: #ccfbf1; }
.dpm-tgi-gck-khung-than { padding: 14px 16px; border: 2px solid #0f766e; border-top: 0; border-radius: 0 0 12px 12px; background: #f8fafc; }
.dpm-tgi-gck-khung-than .dpm-tgi-gck-quy-bang { background: #fff; }

/* 1.5.54: bảng sửa chi tiết của một đơn — nút bỏ việc, ô thêm việc */
.dpm-tgi-gck-cot-ten { margin-bottom: 4px; }
.dpm-tgi-gck-td-nut { white-space: nowrap; text-align: right; }
.dpm-tgi-gck-bo { border: 1px solid #fecaca; border-radius: 6px; background: #fff; color: #b91c1c; padding: 1px 7px; cursor: pointer; font-size: 13px; line-height: 1.4; }
.dpm-tgi-gck .dpm-tgi-gck-tr-them select { width: auto; min-height: 0; padding: 6px 10px; border: 1.5px dashed #0f766e; border-radius: 8px; background: #fff; color: #0f766e; font: inherit; font-size: 14px; font-weight: 700; }

/* ===== 1.5.55: Báo giá thiết kế (khách) ===== */
.dpm-tgi-tk .dpm-tgi-gck-tinh { display: flex; flex-direction: column; gap: 14px; }
.dpm-tgi-tk .dpm-tgi-gck-o-hang { margin-bottom: 0; }
.dpm-tgi-tk-phan { font-size: 12px; font-weight: 400; color: #64748b; }
.dpm-tgi-tk-in { display: flex; align-items: center; gap: 8px; font-size: 15px; cursor: pointer; }
.dpm-tgi-tk-in input { width: 20px; height: 20px; }
.dpm-tgi-tk .dpm-tgi-gck-khung-sua { margin: 0; }
.dpm-tgi-tk .dpm-tgi-gck-nut-sua span { font-size: 13px; color: #475569; }
.dpm-tgi-tk-sua { margin-top: 10px; }
.dpm-tgi-tk-ghi { margin: 4px 0 0; padding-left: 20px; font-size: 13.5px; color: #475569; }
.dpm-tgi-tk-ghi li { margin: 2px 0; }
.dpm-tgi-tk-dang .dpm-tgi-gck-ct { opacity: .55; transition: opacity .15s; }

/* ===== 1.5.55: Quản trị — dữ liệu tạm, Giá thiết kế, Tùy chọn ===== */
.dpm-tgi-nhan-tam { display: inline-block; padding: 0 6px; border-radius: 4px; background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 600; line-height: 18px; vertical-align: middle; }
tr.dpm-tgi-dong-tam > td { background: #fffbeb; }
.dpm-tgi-o-tien { width: 96px; text-align: right; }
.dpm-tgi-nut-cuoi { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.dpm-tgi-nut-xoa-tam { color: #b32d2e !important; border-color: #b32d2e !important; }
.dpm-tgi-tk-cuon { overflow-x: auto; }
.dpm-tgi-tk-bang { min-width: 1180px; }
.dpm-tgi-tk-bang th { font-size: 12px; line-height: 1.3; vertical-align: bottom; }
.dpm-tgi-tk-bang td { padding: 4px 6px; vertical-align: middle; }
.dpm-tgi-tk-bang select { max-width: 110px; }
.dpm-tgi-tk-bang tr.dpm-tgi-tk-nhom th { background: #f0f0f1; font-size: 13px; font-weight: 700; }
.dpm-tgi-tk-ten { white-space: nowrap; font-weight: 600; }
.dpm-tgi-tk-ngay, .dpm-tgi-tk-in { white-space: nowrap; }
.dpm-tgi-tc-nhom { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #dcdcde; border-radius: 8px; background: #fff; max-width: 900px; }
.dpm-tgi-tc-dau { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin-bottom: 8px; }
.dpm-tgi-tc-dung { font-size: 12.5px; color: #50575e; flex: 1; }
.dpm-tgi-xoa-nhom { color: #b32d2e !important; }
.dpm-tgi-tc-bang td { padding: 4px 6px; vertical-align: middle; }
.dpm-tgi-sp-phan td { padding: 2px 6px 2px 0; }
.dpm-tgi-tk .dpm-tgi-gck-o-hang { align-items: start; }

/* ===== 1.5.56: bảng "Sửa chi tiết từng việc" — tên việc rõ, kết quả nhạt, số lượng gọn ===== */
.dpm-tgi-gck-quy-bang tbody tr:nth-child(even) td { background: #f8fafc; }
.dpm-tgi-gck-quy-bang td { border-bottom: 1px solid #cbd5e1; }
.dpm-tgi-gck-quy-bang th:first-child { color: #0f172a; font-size: 13px; }
.dpm-tgi-gck-td-ten { font-weight: 700; font-size: 15px; color: #0f172a; white-space: nowrap; }
.dpm-tgi-gck-stt { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 50%; background: #0f766e; color: #fff; font-size: 12px; font-weight: 700; vertical-align: middle; }
.dpm-tgi-gck-td-quy { font-size: 13px; font-weight: 400; color: #64748b; white-space: nowrap; }
.dpm-tgi-gck .dpm-tgi-gck-rso input:not(.dpm-tgi-gck-o-cm) { width: 66px; }

/* ===== 1.5.56: Báo giá sản phẩm (trọn gói) ===== */
.dpm-tgi-tg-khoi { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 12px; border: 1px solid #99f6e4; border-radius: 10px; background: #f0fdfa; }
.dpm-tgi-tg-khoi > span { font-weight: 700; color: #115e59; }
.dpm-tgi-tg-khoi label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 15px; }
.dpm-tgi-tg-khoi input[type=checkbox] { width: 18px; height: 18px; }
.dpm-tgi-gck .dpm-tgi-tg-sl { width: 90px; text-align: right; }
.dpm-tgi-tg-nhom { padding: 8px 14px 2px; font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: #0f766e; }
.dpm-tgi-tg-phan { width: 100%; margin-top: 10px; border-collapse: collapse; font-size: 14px; }
.dpm-tgi-tg-phan th { text-align: left; font-size: 12px; color: #115e59; padding: 4px 6px; border-bottom: 1px solid #99f6e4; }
.dpm-tgi-tg-phan td { padding: 6px; border-bottom: 1px solid #e2e8f0; }
.dpm-tgi-tg-phan select { max-width: 200px; }
.dpm-tgi-tg-phan select.dpm-tgi-tg-cl { max-width: 320px; margin: 2px 0; }

/* ===== 1.5.57: In báo giá (nút In / PDF ở báo giá gia công, thiết kế, sản phẩm) ===== */
@media print {
	body.dpm-tgi-dang-in * { visibility: hidden !important; }
	body.dpm-tgi-dang-in .dpm-tgi-in-nay, body.dpm-tgi-dang-in .dpm-tgi-in-nay * { visibility: visible !important; }
	body.dpm-tgi-dang-in .dpm-tgi-in-nay { position: absolute; left: 0; top: 0; width: 100%; }
	body.dpm-tgi-dang-in .dpm-tgi-in-nay .dpm-tgi-hang-nut, body.dpm-tgi-dang-in .dpm-tgi-in-nay [data-yc-hop], body.dpm-tgi-dang-in .dpm-tgi-in-nay .dpm-tgi-gck-nut-sua { display: none !important; }
}
.dpm-tgi-gck-quy-bang .dpm-tgi-gck-stt { background: #ccfbf1 !important; color: #0f766e !important; border: 1px solid #5eead4; }
@media (max-width: 640px) {
	.dpm-tgi-tg-phan thead { display: none; }
	.dpm-tgi-tg-phan tr { display: block; padding: 6px 0; border-bottom: 1px solid #99f6e4; }
	.dpm-tgi-tg-phan td { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 0; border: 0; }
	.dpm-tgi-tg-phan td::before { content: attr(data-n); font-size: 12px; color: #64748b; }
	.dpm-tgi-tg-phan td.dpm-tgi-gck-td-ten::before { content: none; }
	.dpm-tgi-tg-phan select { max-width: 64%; }
}

/* ===== 1.5.59: Báo giá in bạt, decal nhiều tấm ===== */
.dpm-tgi-kl .dpm-tgi-gck-dong.dpm-tgi-kl-phu { padding-left: 28px; font-size: 13px; color: #334155; }
.dpm-tgi-kl .dpm-tgi-gck-quy-bang { overflow-x: auto; }
.dpm-tgi-kl .dpm-tgi-gck-quy-bang td select { min-width: 140px; max-width: 200px; font-size: 13px; min-height: 30px; padding: 0 6px; }
.dpm-tgi-kl .dpm-tgi-gck-cot { max-height: 420px; overflow-y: auto; }
@media (max-width: 640px) {
	.dpm-tgi-kl .dpm-tgi-gck-quy-bang table, .dpm-tgi-kl .dpm-tgi-gck-quy-bang tbody { display: block; width: 100%; }
	.dpm-tgi-kl .dpm-tgi-gck-quy-bang thead { display: none; }
	.dpm-tgi-kl .dpm-tgi-gck-quy-bang tr { display: block; padding: 8px 0; border-bottom: 1px solid #99f6e4; }
	.dpm-tgi-kl .dpm-tgi-gck-quy-bang td { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 3px 0; border: 0; }
	.dpm-tgi-kl .dpm-tgi-gck-quy-bang td[data-n]::before { content: attr(data-n); font-size: 12px; color: #64748b; }
	.dpm-tgi-kl .dpm-tgi-gck-quy-bang td.dpm-tgi-gck-td-ten::before { content: none; }
	.dpm-tgi-kl .dpm-tgi-gck-quy-bang td.dpm-tgi-gck-td-nut { justify-content: flex-end; }
	.dpm-tgi-kl .dpm-tgi-gck-quy-bang td select { max-width: 64%; }
}

/* 1.6.0 — Giá Đại Phúc Minh: một cột giá, không còn nhà cung cấp (quản lý ở DPM Vật liệu in) */
.dpm-tgi-gd-the { margin: 10px 20px 0 2px; }
.dpm-tgi-gd .dpm-tgi-gd-bang { max-width: 980px; margin: 12px 0 18px; }
.dpm-tgi-gd-hop { background: #fff; border: 1px solid #dcdcde; padding: 4px 16px 12px; margin: 0 0 16px; max-width: 948px; }
.dpm-tgi-gd-hop h2 { font-size: 15px; }
.dpm-tgi-loc-ncc, .dpm-tgi-bang-kho .c-ncc, .dpm-tgi-dm-dau label:has(> select[data-dm="ncc"]), [data-ncc-hien] { display: none !important; }

/* 1.7.0 — Vật tư & dịch vụ: danh sách mặt hàng theo khung chung */
.dpm-tgi-gd .dpm-tgi-huong-dan { max-width: 980px; }
.dpm-tgi-gd .dpm-tgi-huong-dan p { margin: .4em 0; }
.dpm-tgi-gd-hop > summary { cursor: pointer; padding: 10px 0; }
.dpm-tgi-vt { max-width: 1200px; }
.dpm-tgi-vt-loc input { min-height: 34px; }
.dpm-tgi-vt-loai { font-size: 16px; margin: 22px 0 6px; padding-bottom: 4px; border-bottom: 2px solid #2271b1; }
.dpm-tgi-vt-nhom { background: #fff; border: 1px solid #dcdcde; border-radius: 6px; margin: 0 0 8px; }
.dpm-tgi-vt-nhom > summary { cursor: pointer; padding: 9px 12px; font-size: 14px; }
.dpm-tgi-vt-nhom[open] > summary { border-bottom: 1px solid #dcdcde; background: #f6f7f7; }
.dpm-tgi-vt-bang { border: 0; box-shadow: none; }
.dpm-tgi-vt-bang th:nth-child(1) { width: 26%; }
.dpm-tgi-vt-bang th:nth-child(2) { width: 34%; }
.dpm-tgi-vt-bang th:nth-child(4) { width: 18%; }
.dpm-tgi-vt-bang th:nth-child(5) { width: 50px; }

/* 1.7.2: lũy tiến giấy */
.dpm-tgi-bang-kho .c-lt { width: 13%; }
.dpm-tgi-bang-kho .c-lt select { width: 100%; max-width: 100%; }
.dpm-tgi-bang-kho .c-a4 { width: 14%; }
.dpm-tgi-cl-dong { display: block; font-size: 11.5px; line-height: 1.3; color: #50575e; margin-top: 2px; white-space: normal; }
.dpm-tgi-cl-canh { color: #b32d2e; font-weight: 600; }
.dpm-tgi-vt-ban-so { font-weight: 600; white-space: nowrap; }
.dpm-tgi-vt-ban-phu { display: block; font-size: 12px; color: #50575e; }
.dpm-tgi-vt-canh td { background: #fcf0f1 !important; }
.dpm-tgi-vt-canh .dpm-tgi-vt-ban-phu { color: #b32d2e; font-weight: 600; }
.dpm-tgi-ltg-tieu-de { margin-top: 32px; padding-top: 16px; border-top: 2px solid #2271b1; }
.dpm-tgi-ltg-bang td, .dpm-tgi-ltg-bang th { vertical-align: middle; }
.dpm-tgi-ltg-bang [data-ltg-vd-o] { font-size: 12.5px; color: #1d2327; }
.dpm-tgi-ltg-canh { color: #b32d2e; font-weight: 600; }
.dpm-tgi-dm-dau [data-tu-dat][hidden] { display: none !important; }

/* 1.8.0: trang Lãi & giá báo khách — bảng gọn sát trái kiểu bảng tính. */
.dpm-tgi-lg { max-width: none; }
.dpm-tgi-lg-cay > summary { cursor: pointer; font-size: 15px; font-weight: 700; padding: 8px 4px; border-bottom: 2px solid #2271b1; margin-bottom: 6px; }
.dpm-tgi-lg-cay2 { margin: 0 0 8px 14px; }
.dpm-tgi-lg-cay2 > summary { cursor: pointer; font-size: 14px; font-weight: 600; padding: 6px 4px; }
.dpm-tgi-lg-nhom { margin: 0 0 6px 18px; background: #fff; border: 1px solid #dcdcde; border-radius: 5px; }
.dpm-tgi-lg-nhom > summary { cursor: pointer; padding: 6px 10px; }
.dpm-tgi-lg-nhom[open] > summary { border-bottom: 1px solid #dcdcde; background: #f6f7f7; }
.dpm-tgi-lg-dau { margin: 8px 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dpm-tgi-mx { border-collapse: separate; border-spacing: 0; width: auto; background: #fff; font-size: 13px; margin: 0 0 6px; }
.dpm-tgi-mx th, .dpm-tgi-mx td { border-right: 1px solid #e2e4e7; border-bottom: 1px solid #e2e4e7; padding: 4px 8px; vertical-align: middle; white-space: nowrap; text-align: left; }
.dpm-tgi-mx thead th { background: #f6f7f7; font-size: 12px; font-weight: 600; }
.dpm-tgi-mx .c-ten { min-width: 180px; max-width: 260px; white-space: normal; }
.dpm-tgi-mx .c-so { text-align: right; font-variant-numeric: tabular-nums; }
.dpm-tgi-mx .c-phu { color: #50575e; font-size: 12px; white-space: normal; max-width: 420px; }
.dpm-tgi-mx select { max-width: 260px; }
.dpm-tgi-mx tr.lg-canh td { background: #fcf0f1; }
.dpm-tgi-mx tr.lg-canh .c-phu { color: #b32d2e; font-weight: 600; }
.dpm-tgi-lg-luu { position: sticky; bottom: 0; background: #fff; border-top: 1px solid #dcdcde; padding: 10px; margin: 10px 0 0; z-index: 5; }
input.dpm-tgi-khoa, select.dpm-tgi-khoa { background: #f6f7f7 !important; color: #50575e; }
.dpm-tgi-chi-xem input, .dpm-tgi-chi-xem select { background: #f6f7f7; }
.dpm-tgi-lg .dpm-tgi-lg-dau select, .dpm-tgi-lg .dpm-tgi-mx select { width: auto !important; max-width: 280px; min-height: 30px; }
.dpm-tgi-lg .dpm-tgi-lg-dau input[type=text], .dpm-tgi-lg .dpm-tgi-mx input[type=text] { width: auto; min-height: 30px; }

/* 1.8.1: báo giá vật tư (trang khách). */
.dpm-tgi-vt-khach { max-width: 900px; }
.dpm-tgi-vt-tb { background: #fff8e5; border-left: 4px solid #dba617; padding: 10px 14px; margin: 0 0 14px; border-radius: 4px; }
.dpm-tgi-vt-tb p { margin: 0 0 6px; }
.dpm-tgi-vt-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 10px 0; }
.dpm-tgi-vt-form label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.dpm-tgi-vt-form label > span:first-child { font-weight: 600; }
.dpm-tgi-vt-form select, .dpm-tgi-vt-form input { min-height: 36px; padding: 4px 8px; }
.dpm-tgi-vt-form input[data-n] { width: 110px; }
.dpm-tgi-vt-rd { display: flex; align-items: center; gap: 4px; }
.dpm-tgi-vt-rd input { width: 70px; }
.dpm-tgi-vt-tong { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; background: #f0fdf4; border: 1px solid #86efac; border-radius: 6px; padding: 10px 14px; margin: 8px 0; }
.dpm-tgi-vt-tong b { font-size: 22px; color: #166534; }
.dpm-tgi-vt-tong small { color: #50575e; }
.dpm-tgi-vt-bang { border-collapse: collapse; margin: 8px 0; font-size: 14px; }
.dpm-tgi-vt-bang th, .dpm-tgi-vt-bang td { border: 1px solid #e2e4e7; padding: 6px 12px; text-align: right; white-space: nowrap; }
.dpm-tgi-vt-bang th:first-child, .dpm-tgi-vt-bang td:first-child { text-align: left; }
.dpm-tgi-vt-bang thead th { background: #f6f7f7; }
.dpm-tgi-vt-nho { color: #646970; }
.dpm-tgi-vt-rd input { width: 70px !important; min-width: 0 !important; }

/* 1.8.2: báo giá giấy / vật tư khổ lớn (trang khách) — cùng kiểu với báo giá gia công */
.dpm-tgi-vt-khach.dpm-tgi-gck { max-width: 1000px; }
.dpm-tgi-vt-dau h2 { margin-bottom: 8px; }
.dpm-tgi-vt-nhan { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.dpm-tgi-vt-nhan span { display: inline-block; padding: 3px 10px; border-radius: 999px; background: #e0f2fe; color: #075985; font-size: 12.5px; font-weight: 700; }
.dpm-tgi-vt-nhan span + span { background: #f1f5f9; color: #334155; }
.dpm-tgi-vt-khach .dpm-tgi-vt-tb { margin: 0; font-size: 14.5px; }
.dpm-tgi-vt-chon { display: flex; flex-direction: column; gap: 12px; }
.dpm-tgi-vt-hang > span:first-child { min-width: 92px; }
.dpm-tgi-vt-hang .dpm-tgi-gck-pill { min-height: 38px; padding: 5px 14px; }
.dpm-tgi-vt-goi-y { margin: -6px 0 0 100px; font-size: 13px; color: #0f766e; }
.dpm-tgi-vt-rd { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.dpm-tgi-vt-rd input, .dpm-tgi-vt-sl { width: 84px; min-height: 40px; padding: 0 10px; font-size: 16px; font-weight: 700; border: 1.5px solid #cbd5e1; border-radius: 8px; }
.dpm-tgi-vt-sl { width: 120px; }
.dpm-tgi-vt-dv { display: inline-flex; gap: 0; }
.dpm-tgi-vt-dv .dpm-tgi-gck-pill { border-radius: 0; } .dpm-tgi-vt-dv .dpm-tgi-gck-pill:first-child { border-radius: 8px 0 0 8px; } .dpm-tgi-vt-dv .dpm-tgi-gck-pill:last-child { border-radius: 0 8px 8px 0; margin-left: -1.5px; }
.dpm-tgi-vt-dv-chu { font-weight: 600; color: #334155; }
.dpm-tgi-vt-nhanh { display: inline-flex; flex-wrap: wrap; gap: 6px; margin-left: 6px; }
.dpm-tgi-vt-nhanh .dpm-tgi-gck-pill { min-height: 32px; padding: 3px 10px; font-size: 13px; }
.dpm-tgi-vt-kq.dpm-tgi-gck-khung { border-top: 2px solid #0f766e; border-radius: 12px; }
.dpm-tgi-vt-kq .dpm-tgi-vt-b2 { font-size: 18px; color: #0f172a; }
.dpm-tgi-vt-vat { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; cursor: pointer; }
.dpm-tgi-vt-vat input { width: 18px; height: 18px; accent-color: #0f766e; }
.dpm-tgi-vt-mx td small { display: block; font-size: 11.5px; color: #64748b; font-weight: 400; }
.dpm-tgi-vt-mx tbody tr { cursor: pointer; }
.dpm-tgi-vt-mx tbody tr:hover { background: #f0fdfa; }
.dpm-tgi-vt-mx tbody tr.dpm-tgi-gck-dang td:first-child { font-weight: 800; }
@media (max-width: 600px) { .dpm-tgi-vt-hang > span:first-child { min-width: 100%; } .dpm-tgi-vt-goi-y { margin-left: 0; } .dpm-tgi-vt-nhanh { margin-left: 0; } }
.dpm-tgi-vt-khach .dpm-tgi-vt-rd input { width: 84px !important; flex: none; }
.dpm-tgi-vt-khach input.dpm-tgi-vt-sl { width: 120px !important; flex: none; }
.dpm-tgi-vt-mx td:first-child { text-align: left; }
/* 1.8.3: trang Khổ giấy */
.dpm-tgi-kc-bang { max-width: 820px; }
.dpm-tgi-kc-bang td { vertical-align: middle; }
.dpm-tgi-kc-so { width: 70px; text-align: right; }
.dpm-tgi-kc-keo { width: 44px; white-space: nowrap; } .dpm-tgi-kc-keo .button-link { padding: 0 3px; text-decoration: none; }
/* 1.8.3: báo giá vật tư — ô sổ xuống, nhãn trên ô */
.dpm-tgi-vt-luoi { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px 16px; align-items: end; }
.dpm-tgi-vt-o { display: flex; flex-direction: column; gap: 6px; margin: 0; min-width: 0; }
.dpm-tgi-vt-o > span:first-child { font-size: 13px; font-weight: 700; color: #334155; letter-spacing: .01em; }
.dpm-tgi-vt-khach .dpm-tgi-vt-o select { width: 100%; height: 46px; padding: 0 38px 0 14px; font-size: 16px; font-weight: 700; color: #0f172a; border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%230f766e' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; -webkit-appearance: none; appearance: none; cursor: pointer; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.dpm-tgi-vt-khach .dpm-tgi-vt-o select:hover, .dpm-tgi-vt-so:hover { border-color: #0f766e; }
.dpm-tgi-vt-khach .dpm-tgi-vt-o select:focus, .dpm-tgi-vt-so:focus-within { outline: none; border-color: #0f766e; box-shadow: 0 0 0 3px rgba(15,118,110,.18); }
.dpm-tgi-vt-so { display: inline-flex; align-items: center; height: 46px; border: 1.5px solid #cbd5e1; border-radius: 10px; background: #fff; overflow: hidden; box-shadow: 0 1px 2px rgba(15,23,42,.05); flex: 1 1 auto; min-width: 0; }
.dpm-tgi-vt-khach .dpm-tgi-vt-so input { flex: 1 1 auto; width: 100% !important; min-width: 0; height: 100%; min-height: 0; padding: 0 6px 0 14px; border: 0 !important; box-shadow: none !important; background: transparent; font-size: 17px; font-weight: 700; color: #0f172a; text-align: right; outline: none; }
.dpm-tgi-vt-so i { font-style: normal; padding: 0 12px 0 4px; font-size: 13px; font-weight: 600; color: #64748b; white-space: nowrap; }
.dpm-tgi-vt-khach .dpm-tgi-vt-rd { display: flex; align-items: center; gap: 6px; width: 100%; }
.dpm-tgi-vt-rd b { color: #94a3b8; }
.dpm-tgi-vt-sl-hop { display: flex; gap: 8px; align-items: center; }
.dpm-tgi-vt-sl-hop .dpm-tgi-vt-dv .dpm-tgi-gck-pill { min-height: 46px; padding: 0 14px; }
.dpm-tgi-vt-duoi { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #e2e8f0; }
.dpm-tgi-vt-duoi .dpm-tgi-vt-nhanh { margin: 0; align-items: center; }
.dpm-tgi-vt-duoi .dpm-tgi-vt-nhanh small { font-size: 12.5px; color: #64748b; margin-right: 2px; }
.dpm-tgi-vt-duoi .dpm-tgi-vt-goi-y { margin: 0; }
.dpm-tgi-vt-sl-hop { width: 100%; min-width: 0; }
.dpm-tgi-vt-sl-hop .dpm-tgi-vt-so { flex: 1 1 0; }
.dpm-tgi-vt-sl-hop .dpm-tgi-vt-dv { flex: none; }
.dpm-tgi-vt-sl-hop .dpm-tgi-vt-dv .dpm-tgi-gck-pill { padding: 0 11px; }
/* 1.8.4: trang Bảng lãi theo số lượng dùng hết bề ngang; bảng lũy tiến giấy có cột giá / lãi 1 tờ A4 và cả đơn */
.wrap.dpm-tgi.dpm-tgi-lt-trang { max-width: none; margin-right: 20px; }
.dpm-tgi-ltg-bang { table-layout: auto; }
.dpm-tgi-ltg-bang caption { caption-side: top; text-align: left; padding: 8px 10px; background: #f6f7f7; border: 1px solid #c3c4c7; border-bottom: 0; font-weight: 600; }
.dpm-tgi-ltg-bang caption select { max-width: 360px; margin-left: 6px; }
.dpm-tgi-ltg-bang .dpm-tgi-ltg-th-so, .dpm-tgi-ltg-bang .dpm-tgi-ltg-so { text-align: right; white-space: nowrap; }
.dpm-tgi-ltg-bang .dpm-tgi-ltg-so { font-variant-numeric: tabular-nums; font-size: 14px; }
.dpm-tgi-ltg-bang .dpm-tgi-ltg-lai { color: #00733b; font-weight: 700; background: #f0faf3; }
.dpm-tgi-ltg-bang .dpm-tgi-ltg-th-lai { color: #00733b; }
/* 1.8.5: trang Lãi & giá báo khách — bảng giãn hết bề ngang, cột Chênh lệch không xuống dòng */
.dpm-tgi-lg .dpm-tgi-mx { width: 100%; }
.dpm-tgi-lg .dpm-tgi-mx .c-phu { white-space: nowrap; max-width: none; }
.dpm-tgi-lg .dpm-tgi-mx .c-ten { white-space: nowrap; }
/* 1.8.5: gia công khách tự chọn */
.dpm-tgi-kc-gc-o { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; }
.dpm-tgi-kc-gc-md { font-size: 12px; min-height: 24px; padding: 0 20px 0 4px; }
.dpm-tgi-gc-ghi { display: block; margin-top: 4px; font-size: 12.5px; color: #475569; }
/* 1.8.6: bảng lũy tiến — nút từng mốc, mốc sai tô đỏ */
.dpm-tgi-lt-moc .dpm-tgi-lt-nut { white-space: nowrap; }
.dpm-tgi-lt-moc .dpm-tgi-lt-nut .button-link { padding: 0 3px; text-decoration: none; }
.dpm-tgi-lt-moc .dpm-tgi-lt-don { font-size: 12.5px; color: #50575e; white-space: nowrap; padding-left: 8px; }
.dpm-tgi-lt-moc tr.dpm-tgi-lt-sai td { background: #fcf0f1; }
.dpm-tgi-lt-moc tr.dpm-tgi-lt-sai .dpm-tgi-lt-don { color: #b32d2e; font-weight: 600; }
.dpm-tgi-ltg-bang tr.dpm-tgi-lt-sai td { background: #fcf0f1 !important; }
.dpm-tgi-ltg-bang .dpm-tgi-ltg-loi { display: block; color: #b32d2e; font-weight: 600; font-size: 12px; white-space: normal; }
/* 1.8.6: dải tiêu đề khung "Tính giá nhanh" (trang khách) */
.dpm-tgi-khach-trang .dpm-tgi-khoi[data-vung="v1"] { padding-top: 0; overflow: hidden; }
.dpm-tgi-khach-trang .dpm-tgi-khoi-ten.dpm-tgi-tg-dau { margin: 0 -14px 12px; padding: 10px 16px; background: var(--tgi-dai, #0f766e); color: #fff; font-size: 17px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; border-radius: 0; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12); }
/* 1.8.6: bảng giá gia công của nhà cung cấp — ô vừa số, mọi dòng đủ ô, thanh cuộn ngang, cột tên khâu đứng yên */
.dpm-tgi-cuon-ngang { overflow-x: auto; max-width: 100%; }
.dpm-tgi-bang-gc2 { width: auto; border-collapse: separate; border-spacing: 0; }
.dpm-tgi-bang-gc2 th, .dpm-tgi-bang-gc2 td { padding: 3px 4px; white-space: nowrap; vertical-align: middle; }
.dpm-tgi-bang-gc2 tbody tr:nth-child(even) td { background: #f9fafb; }
.dpm-tgi-bang-gc2 td.dpm-tgi-gc2-ten { position: sticky; left: 0; z-index: 2; background: #fff; min-width: 200px; max-width: 240px; box-shadow: 2px 0 0 #e2e4e7; }
.dpm-tgi-bang-gc2 tbody tr:nth-child(even) td.dpm-tgi-gc-ten { background: #f9fafb; }
.dpm-tgi-bang-gc2 .dpm-tgi-gc2-ten select { max-width: 200px; }
.dpm-tgi-bang-gc2 .dpm-tgi-gc-dvt select { width: 96px; max-width: 96px; }
.dpm-tgi-bang-gc2 td[data-o] input[type="text"] { width: 84px; text-align: right; }
.dpm-tgi-bang-gc2 td[data-o="goc_luot"] input[type="text"], .dpm-tgi-bang-gc2 td[data-o="k_goc"] input[type="text"], .dpm-tgi-bang-gc2 td[data-o="ban_cm2"] input[type="text"] { width: 64px; }
.dpm-tgi-bang-gc2 td[data-o] select { width: 92px; }
.dpm-tgi-bang-gc2 .dpm-tgi-o-dv { margin-left: 2px; color: #646970; font-size: 11px; }
.dpm-tgi-bang-gc2 .dpm-tgi-o-ghi input { width: 110px; }
.dpm-tgi-bang-gc2 th.dpm-tgi-vung-o { background: #fdecec; } .dpm-tgi-bang-gc2 th.dpm-tgi-vung-k { background: #eaf2ff; }
.dpm-tgi-crm .dpm-tgi-bang-gc2 td[data-o] input[type="text"], .dpm-tgi-crm .dpm-tgi-bang-gc2 .dpm-tgi-o-ghi input { min-width: 0; }
.dpm-tgi-crm .dpm-tgi-cuon-ngang > table.dpm-tgi-bang-gc2 { min-width: 0; }
.dpm-tgi-bang-gc2 td.dpm-tgi-gc2-ten { white-space: nowrap; }
.dpm-tgi-bang-gc2 td.dpm-tgi-gc2-ten select { max-width: 190px; }
.dpm-tgi-bang-gc2 td.dpm-tgi-gc2-ten a { display: inline-block; width: 18px; overflow: hidden; vertical-align: middle; font-size: 0; text-decoration: none; }
.dpm-tgi-bang-gc2 td.dpm-tgi-gc2-ten a::after { content: "↗"; font-size: 14px; }
.dpm-tgi-bang-gc2 td.dpm-tgi-gc2-ten { min-width: 210px; }
.dpm-tgi-bang-gc2 td.dpm-tgi-gc2-ten select { max-width: 180px; }
/* 1.8.7: khung bảng cuộn — giới hạn chiều cao, tiêu đề đứng yên, thanh cuộn ngang ở đầu bảng */
.dpm-tgi-cuon-ngang { max-height: 70vh; overflow: auto; }
.dpm-tgi-cuon-ngang > table > thead th { position: sticky; top: 0; z-index: 3; }
:where(.dpm-tgi-cuon-ngang) > table > thead th { background: #f6f7f7; }
.dpm-tgi-cuon-ngang > table > thead th.dpm-tgi-gc2-ten { left: 0; z-index: 5; background: #f6f7f7; }
.dpm-tgi-cuon-tren { overflow-x: auto; overflow-y: hidden; height: 16px; margin-bottom: 2px; }
.dpm-tgi-cuon-tren > div { height: 1px; }
.dpm-tgi-cuon-tren[hidden] { display: none; }
/* 1.8.7: khâu một giá — vùng ô chung; dòng trùng */
.dpm-tgi-khau-mot { display: inline-flex; align-items: center; gap: 4px; align-self: flex-end; padding-bottom: 8px; }
th.dpm-tgi-vung-mot { background: #ecfdf5 !important; }
.dpm-tgi-bang-guong td.dpm-tgi-vung-mot { background: #f0fdf4; }
tr.dpm-tgi-dong-trung > td { background: #fee2e2 !important; }
.dpm-tgi-canh-trung { color: #b91c1c; font-weight: 600; margin: 6px 0; }
/* 1.9.0: trang Lũy tiến — thẻ nhóm, thẻ bảng gọn, cửa sổ đường cong, dán Excel */
.dpm-tgi-lt-the { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 2px solid #0f766e; margin: 14px 0 12px; }
.dpm-tgi-lt-the-nut { border: 1px solid #c3c4c7; border-bottom: 0; background: #f6f7f7; padding: 8px 16px; font-size: 14px; border-radius: 8px 8px 0 0; cursor: pointer; color: #1d2327; }
.dpm-tgi-lt-the-nut.dang-mo { background: #0f766e; border-color: #0f766e; color: #fff; font-weight: 600; }
.dpm-tgi-lt-the-so { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 9px; background: rgba(0,0,0,.08); font-size: 12px; margin-left: 4px; }
.dpm-tgi-lt-the-nut.dang-mo .dpm-tgi-lt-the-so { background: rgba(255,255,255,.25); }
.dpm-tgi-lt-cong-cu { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.dpm-tgi-lt-cong-cu form { margin: 0; }
.dpm-tgi-lt-cong-cu-phai { display: flex; gap: 6px; }
.dpm-tgi-lt-trong { background: #fff; border: 1px dashed #c3c4c7; border-radius: 8px; padding: 18px; color: #50575e; }
.dpm-tgi-lt-giai { margin: 0 0 8px; } .dpm-tgi-lt-giai > summary { cursor: pointer; color: #2271b1; }
.dpm-tgi-lt-trang .dpm-tgi-lt-hop > summary.dpm-tgi-lt-the-nho { display: flex; align-items: center; gap: 14px; list-style: none; }
.dpm-tgi-lt-trang .dpm-tgi-lt-hop > summary.dpm-tgi-lt-the-nho::-webkit-details-marker { display: none; }
.dpm-tgi-lt-trang .dpm-tgi-lt-hop > summary.dpm-tgi-lt-the-nho::before { content: "▸"; color: #646970; font-size: 13px; }
.dpm-tgi-lt-trang .dpm-tgi-lt-hop[open] > summary.dpm-tgi-lt-the-nho::before { content: "▾"; }
.dpm-tgi-lt-trang .dpm-tgi-lt-hop[open] > summary.dpm-tgi-lt-the-nho { border-bottom: 1px solid #eef0f2; padding-bottom: 8px; margin-bottom: 8px; }
.dpm-tgi-lt-mini { flex: 0 0 120px; height: 36px; background: #f8fafc; border-radius: 4px; display: inline-block; }
.dpm-tgi-lt-ten-hop { flex: 1; line-height: 1.4; }
.dpm-tgi-lt-tom { color: #50575e; font-size: 13px; }
.dpm-tgi-lt-dung-nho { color: #646970; font-size: 12px; white-space: nowrap; background: #f0f0f1; border-radius: 10px; padding: 2px 10px; }
.dpm-tgi-dc-nut { margin-right: 6px !important; }
.button.dpm-tgi-dc-nhac { box-shadow: 0 0 0 3px #fbbf24 !important; }
.dpm-tgi-dc-da-ap { background: #ecfdf5; border-left: 4px solid #10b981; padding: 6px 10px; margin: 8px 0; }
body.dpm-tgi-dc-mo { overflow: hidden; }
.dpm-tgi-dc-nen { position: fixed; inset: 0; z-index: 100000; background: rgba(15,23,42,.45); display: flex; align-items: center; justify-content: center; padding: 20px; }
.dpm-tgi-dc-hop { background: #fff; border-radius: 12px; width: min(1100px, 100%); max-height: 94vh; overflow: auto; box-shadow: 0 20px 50px rgba(0,0,0,.3); padding: 16px 20px; }
.dpm-tgi-ex-hop { width: min(820px, 100%); }
.dpm-tgi-dc-dau { display: flex; align-items: center; justify-content: space-between; }
.dpm-tgi-dc-dau h2 { margin: 0; font-size: 19px; }
.dpm-tgi-dc-x { border: 0; background: none; font-size: 20px; cursor: pointer; color: #646970; }
.dpm-tgi-dc-huong { background: #f0f9ff; border-radius: 8px; padding: 8px 12px; margin: 10px 0; }
.dpm-tgi-dc-than { display: grid; grid-template-columns: 360px 1fr; gap: 16px; align-items: start; }
@media (max-width: 900px) { .dpm-tgi-dc-than { grid-template-columns: 1fr; } }
.dpm-tgi-dc-o { border: 1px solid #dcdcde; border-radius: 8px; padding: 8px 12px 10px; margin: 0 0 10px; }
.dpm-tgi-dc-o legend { font-weight: 600; padding: 0 4px; }
.dpm-tgi-dc-o label { display: inline-block; margin: 4px 6px 4px 0; }
.dpm-tgi-dc-o input[type="text"] { width: 86px; text-align: right; }
.dpm-tgi-dc-moc-ds { display: block !important; } .dpm-tgi-dc-moc-ds input[type="text"] { width: 100%; text-align: left; }
.dpm-tgi-dc-o small { color: #646970; display: block; }
.dpm-tgi-dc-mui { color: #646970; }
.dpm-tgi-dc-cong { margin-top: 6px; }
.dpm-tgi-dc-cong .button { margin-right: 2px; }
.dpm-tgi-dc-cong .button.dang-chon { background: #0f766e; color: #fff; border-color: #0f766e; }
.dpm-tgi-dc-cong input[type="range"] { width: 110px; vertical-align: middle; }
[data-dc-chi].tat { opacity: .4; pointer-events: none; }
.dpm-tgi-dc-svg { display: block; background: #fcfcfd; border: 1px solid #eef0f2; border-radius: 8px; margin-bottom: 6px; touch-action: none; }
.dpm-tgi-dc-cham { cursor: ns-resize; } .dpm-tgi-dc-cham:hover { r: 8; }
.dpm-tgi-dc-chu-thich { font-size: 12px; color: #646970; margin-bottom: 6px; }
.dpm-tgi-dc-chu-thich span { display: inline-block; width: 22px; height: 0; vertical-align: middle; margin: 0 4px 0 10px; }
.dpm-tgi-dc-chu-thich .ct-moi { border-top: 3px solid #0f766e; } .dpm-tgi-dc-chu-thich .ct-cu { border-top: 2px dashed #94a3b8; }
.dpm-tgi-dc-bang-hop { max-height: 260px; overflow: auto; border: 1px solid #eef0f2; border-radius: 8px; }
.dpm-tgi-dc-bang { width: 100%; border-collapse: collapse; }
.dpm-tgi-dc-bang th { position: sticky; top: 0; background: #f6f7f7; text-align: right; padding: 4px 8px; font-size: 12px; }
.dpm-tgi-dc-bang td { text-align: right; padding: 2px 8px; border-top: 1px solid #f0f0f1; }
.dpm-tgi-dc-bang input { width: 96px; text-align: right; }
.dpm-tgi-dc-bang input.tay { background: #fef9c3; }
.dpm-tgi-dc-canh, .dpm-tgi-ex-hop .loi { color: #b91c1c; }
.dpm-tgi-dc-chan { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 12px; border-top: 1px solid #eef0f2; padding-top: 12px; }
.dpm-tgi-dc-nho-luu { margin-right: auto; color: #646970; }
.dpm-tgi-ex-o { width: 100%; font-family: monospace; }
.dpm-tgi-ex-bang { display: flex; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid #f0f0f1; }
.dpm-tgi-ex-bang .moi { color: #047857; font-weight: 600; } .dpm-tgi-ex-bang .cn { color: #b45309; font-weight: 600; }
.dpm-tgi-lt-cong-cu form { display: flex; gap: 6px; align-items: center; }
.dpm-tgi-dc-cong [data-dc-k-so] { display: inline-block; min-width: 26px; }
/* 1.9.1: cửa sổ đường cong làm lại */
.dpm-tgi-dc-dothi-dau { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.dpm-tgi-dc-mau { color: #b45309; }
.dpm-tgi-dc-svg { user-select: none; }
.dpm-tgi-dc-svg [data-dc-nam]:active { cursor: grabbing; }
.dpm-tgi-dc-chan [data-dc-ve-cu] { margin-right: auto; }
.dpm-tgi-dc-hop .dpm-tgi-dc-chan { position: sticky; bottom: -16px; background: #fff; padding-bottom: 12px; z-index: 2; }

/* 1.9.2: phần in kỹ thuật số đậm màu hơn, khác hẳn offset; nút nhỏ chép giá từ offset. */
.dpm-tgi-crm th.dpm-tgi-vung-k { background: #c9dcfb; color: #1e3a8a; }
.dpm-tgi-crm td[data-o^="k_"] { background: #e3edfd; }
.dpm-tgi-crm th.dpm-tgi-vung-k:first-of-type, .dpm-tgi-crm td[data-o="k_dau"] { border-left: 3px solid #3b6fd8; }
.dpm-tgi-crm td[data-o="k_dau"] { position: relative; white-space: nowrap; }
.dpm-tgi-chep-o { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-right: 4px; padding: 0; vertical-align: middle; border: 1px solid #93b4ee; border-radius: 6px; background: #fff; color: #2459c4; cursor: pointer; }
.dpm-tgi-chep-o:hover, .dpm-tgi-chep-o:focus-visible { background: #2459c4; color: #fff; border-color: #2459c4; }
.dpm-tgi-chep-o .dashicons { width: 16px; height: 16px; font-size: 16px; }
.dpm-tgi-chep-o[data-tip]:hover::after, .dpm-tgi-chep-o[data-tip]:focus-visible::after { content: attr(data-tip); position: absolute; left: calc(100% + 6px); top: 50%; transform: translateY(-50%); padding: 4px 8px; border-radius: 6px; background: #1f2937; color: #fff; font-size: 12px; white-space: nowrap; z-index: 20; pointer-events: none; }
.dpm-tgi-crm tr.dpm-tgi-vua-chep td[data-o^="k_"] { background: #bfe8c9; transition: background .2s; }
/* 1.9.2: bảng kẽm của từng máy. */
.dpm-tgi-kem-tong { margin: 4px 0 12px; max-width: 900px; }
.dpm-tgi-kem-tong caption { text-align: left; font-weight: 600; padding: 4px 0; }
.dpm-tgi-kem-tong tr.dpm-tgi-kem-thieu td { background: #fde8e8; color: #b42318; font-weight: 600; }
/* 1.9.2: nút "Chỉnh theo tiếp tuyến" + tay kéo. */
.dpm-tgi-dc-nut-phai { display: inline-flex; gap: 6px; }
.dpm-tgi-dc-dothi-dau [data-dc-tt].dang-chon { background: #2563eb; border-color: #2563eb; color: #fff; }
.dpm-tgi-dc-svg .dpm-tgi-dc-tay:hover { fill: #dbeafe; }
/* 1.9.3: cửa sổ đường cong — trái: mốc + bảng số; phải: đồ thị to. */
.dpm-tgi-dc-hop { width: min(1320px, 100%); }
.dpm-tgi-dc-huong { padding: 6px 12px; margin: 8px 0; font-size: 13px; }
.dpm-tgi-dc-i { display: inline-block; width: 18px; height: 18px; line-height: 18px; text-align: center; border-radius: 50%; background: #dbeafe; color: #1d4ed8; font-size: 12px; cursor: help; }
.dpm-tgi-dc-than { grid-template-columns: 330px 1fr; }
.dpm-tgi-dc-hang { display: flex; gap: 8px; flex-wrap: wrap; }
.dpm-tgi-dc-hang input[type="text"] { width: 72px !important; }
.dpm-tgi-dc-hang input[type="number"] { width: 54px; }
.dpm-tgi-dc-moc-ds { margin: 6px 0 4px !important; }
.dpm-tgi-dc-nhanh { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 13px; }
.dpm-tgi-dc-nhanh label { margin: 0 !important; }
.dpm-tgi-dc-nhanh input[type="text"] { width: 70px !important; }
.dpm-tgi-dc-muc legend { color: var(--mau, #1d2327); }
.dpm-tgi-dc-muc input[type="text"] { width: 80px !important; }
.dpm-tgi-dc-trai .dpm-tgi-dc-bang-hop { max-height: calc(94vh - 420px); min-height: 160px; }
.dpm-tgi-dc-bang input { width: 78px; }
.dpm-tgi-dc-dothi { position: relative; }
.dpm-tgi-dc-svg .dpm-tgi-dc-q { cursor: pointer; }
.dpm-tgi-dc-svg .dpm-tgi-dc-q:hover { fill: #2563eb; text-decoration: underline; }
.dpm-tgi-dc-svg .dpm-tgi-dc-cham-go { cursor: pointer; }
.dpm-tgi-dc-svg .dpm-tgi-dc-cham-go:hover { stroke: #1d4ed8; stroke-width: 3; }
.dpm-tgi-dc-o-noi { position: absolute; z-index: 5; width: 90px; text-align: right; font-weight: 600; border: 2px solid #2563eb !important; border-radius: 6px; box-shadow: 0 4px 12px rgba(0,0,0,.18); }
.dpm-tgi-dc-chu-thich .ct-ghim { width: 10px !important; height: 10px !important; border-radius: 50%; background: #f59e0b; }
@media (max-width: 1000px) { .dpm-tgi-dc-than { grid-template-columns: 1fr; } }
.dpm-tgi-dc-muc label { margin: 2px 4px 2px 0 !important; }
.dpm-tgi-dc-muc input[type="text"] { width: 62px !important; }
.dpm-tgi-dc-muc .dpm-tgi-dc-mui { margin: 0 2px; }
/* 1.9.4: cột trái đứng yên khi lăn; đồ thị cao; dấu + chen mốc; ô gõ gọn. */
.dpm-tgi-dc-trai { position: sticky; top: 0; align-self: start; max-height: calc(94vh - 130px); overflow: auto; padding-right: 4px; }
.dpm-tgi-dc-trai .dpm-tgi-dc-bang-hop { max-height: none; min-height: 0; }
.dpm-tgi-dc-svg .dpm-tgi-dc-chen { cursor: pointer; opacity: .55; }
.dpm-tgi-dc-svg .dpm-tgi-dc-chen circle { fill: #fff; stroke: #2563eb; stroke-width: 1.5; }
.dpm-tgi-dc-svg .dpm-tgi-dc-chen text { fill: #2563eb; pointer-events: none; }
.dpm-tgi-dc-svg .dpm-tgi-dc-chen:hover { opacity: 1; }
.dpm-tgi-dc-svg .dpm-tgi-dc-chen:hover circle { fill: #2563eb; }
.dpm-tgi-dc-svg .dpm-tgi-dc-chen:hover text { fill: #fff; }
.dpm-tgi-dc-o-noi { width: 72px !important; height: 26px; min-height: 26px !important; padding: 0 6px !important; font-size: 13px; line-height: 22px; }
/* 1.9.4: trang Lũy tiến — danh sách gọn, danh mục, tìm / lọc, so sánh. */
.dpm-tgi-lt-loc { position: sticky; top: 32px; z-index: 5; background: #f0f0f1; padding: 8px 0; margin-bottom: 8px; }
.dpm-tgi-lt-loc-trai { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.dpm-tgi-lt-tim { width: 240px; }
.dpm-tgi-lt-dem { color: #646970; font-size: 12px; margin-left: 4px; }
.dpm-tgi-lt-tao { display: flex; gap: 6px; align-items: center; flex-basis: 100%; background: #fff; border: 1px solid #c3c4c7; border-radius: 8px; padding: 8px; }
.dpm-tgi-lt-tao[hidden] { display: none; }
.dpm-tgi-lt-dm { margin: 0 0 10px; }
.dpm-tgi-lt-dm-dau { display: flex; align-items: center; gap: 10px; padding: 4px 2px; border-bottom: 2px solid #dbe2ea; margin-bottom: 4px; }
.dpm-tgi-lt-dm-gap { border: 0; background: none; cursor: pointer; font-size: 15px; padding: 2px 4px; color: #1d2327; }
.dpm-tgi-lt-dm-gap .mui { color: #646970; display: inline-block; width: 12px; }
.dpm-tgi-lt-dm-so { display: inline-block; min-width: 18px; padding: 0 7px; border-radius: 9px; background: #e2e8f0; font-size: 12px; text-align: center; }
.dpm-tgi-lt-dm.gap .dpm-tgi-lt-dm-than { display: none; }
.dpm-tgi-lt-trang .dpm-tgi-lt-dm .dpm-tgi-lt-hop { margin: 0 0 3px; padding: 4px 10px; border-radius: 6px; }
.dpm-tgi-lt-trang .dpm-tgi-lt-dm .dpm-tgi-lt-hop > summary.dpm-tgi-lt-the-nho { gap: 10px; font-size: 14px; min-height: 30px; }
.dpm-tgi-lt-trang .dpm-tgi-lt-dm .dpm-tgi-lt-hop[open] { padding: 8px 12px; border-color: #2563eb; }
.dpm-tgi-lt-trang .dpm-tgi-lt-dm .dpm-tgi-lt-mini { flex: 0 0 84px; height: 26px; }
.dpm-tgi-lt-trang .dpm-tgi-lt-dm .dpm-tgi-lt-ten-hop { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
.dpm-tgi-lt-trang .dpm-tgi-lt-dm .dpm-tgi-lt-tom { margin-left: 8px; font-size: 12.5px; }
.dpm-tgi-lt-trang .dpm-tgi-lt-dm .dpm-tgi-lt-hop:hover { border-color: #93b4ee; }
.dpm-tgi-lt-nut-dong { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.dpm-tgi-lt-menu-boc { position: relative; }
.dpm-tgi-lt-menu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 20; display: flex; flex-direction: column; min-width: 210px; background: #fff; border: 1px solid #c3c4c7; border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.15); padding: 4px; }
.dpm-tgi-lt-menu[hidden] { display: none; }
.dpm-tgi-lt-menu button { border: 0; background: none; text-align: left; padding: 7px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.dpm-tgi-lt-menu button:hover { background: #f0f6fc; }
.dpm-tgi-lt-menu button.xoa { color: #b32d2e; }
.dpm-tgi-ss-hop { width: min(1180px, 100%); }
.dpm-tgi-ss-dau { display: flex; gap: 12px; align-items: center; margin: 8px 0; }
.dpm-tgi-ss-cot .button.dang-chon { background: #0f766e; color: #fff; border-color: #0f766e; }
.dpm-tgi-ss-chu { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.dpm-tgi-ss-ten { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #dcdcde; background: #fff; border-radius: 14px; padding: 3px 10px; cursor: pointer; font-size: 13px; }
.dpm-tgi-ss-ten i { width: 18px; height: 4px; border-radius: 2px; background: var(--mau); display: inline-block; }
.dpm-tgi-ss-ten.an { opacity: .4; text-decoration: line-through; }
.dpm-tgi-dc-chu-thich .ct-tk { border-top: 2px solid #7c8aa5 !important; opacity: .6; }
.dpm-tgi-dc-dothi-dau [data-dc-tk].dang-chon { background: #e2e8f0; }
.dpm-tgi-lt-loc select, .dpm-tgi-lt-loc input[type="search"] { width: auto !important; min-width: 0; max-width: 240px; height: 32px; min-height: 32px; padding: 0 8px; font-size: 13px; line-height: 30px; }
.dpm-tgi-lt-loc .dpm-tgi-lt-tim { width: 240px !important; }
.dpm-tgi-lt-loc-trai { flex: 1 1 auto; }
.dpm-tgi-lt-trang .dpm-tgi-lt-dm .dpm-tgi-lt-hop { max-width: none; }
/* 1.9.5: cửa sổ cao kín màn hình; chọn bảng đang sửa; áp dáng. */
.dpm-tgi-dc-hop.dpm-tgi-dc-cao { height: 94vh; }
.dpm-tgi-dc-dau { gap: 12px; position: relative; }
.dpm-tgi-dc-dang { display: flex; align-items: center; gap: 8px; margin-left: auto; margin-right: 12px; }
.dpm-tgi-dc-dang select { min-width: 240px; max-width: 360px; font-weight: 600; }
.dpm-tgi-dc-ap { position: absolute; right: 40px; top: calc(100% + 6px); z-index: 30; width: 420px; max-height: 60vh; overflow: auto; background: #fff; border: 1px solid #c3c4c7; border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.2); padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.dpm-tgi-dc-ap[hidden] { display: none; }
.dpm-tgi-dc-ap-ds { display: flex; flex-direction: column; gap: 4px; padding: 6px 0; border-top: 1px solid #eef0f2; border-bottom: 1px solid #eef0f2; }
.dpm-tgi-dc-ap-ds label.het { border-bottom: 1px dashed #e2e8f0; padding-bottom: 4px; }
.dpm-tgi-dc-ap small { color: #646970; }
.dpm-tgi-dc-ap-nut { display: flex; gap: 6px; justify-content: flex-end; }
.dpm-tgi-dc-svg .dpm-tgi-dc-tk { cursor: pointer; pointer-events: stroke; }
.dpm-tgi-dc-svg .dpm-tgi-dc-tk:hover { stroke: rgba(37, 99, 235, .25); }
.dpm-tgi-dc-dothi-dau { gap: 10px; }
.dpm-tgi-dc-nut-phai { flex-wrap: nowrap; }
.dpm-tgi-dc-nut-phai .button { white-space: nowrap; }
/* 1.9.6: thanh nút đứng yên trên cùng; cột trái hẹp; tên bảng ở đầu đường. */
.dpm-tgi-dc-thanh { position: sticky; top: -16px; z-index: 12; background: #fff; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; margin: 0 0 6px; border-bottom: 1px solid #eef0f2; }
.dpm-tgi-dc-thanh .dpm-tgi-dc-dang { margin: 0; position: relative; }
.dpm-tgi-dc-thanh .dpm-tgi-dc-ap { left: 0; right: auto; top: calc(100% + 6px); }
.dpm-tgi-dc-thanh-phai { display: flex; align-items: center; gap: 10px; margin-left: auto; flex-wrap: wrap; }
.dpm-tgi-dc-thanh .dpm-tgi-dc-chu-thich { margin: 0; }
.dpm-tgi-dc-than { grid-template-columns: 270px 1fr; }
.dpm-tgi-dc-trai { top: 46px; max-height: calc(94vh - 150px); }
.dpm-tgi-dc-trai .dpm-tgi-dc-hang input[type="text"] { width: 64px !important; }
.dpm-tgi-dc-trai .dpm-tgi-dc-muc input[type="text"] { width: 56px !important; }
.dpm-tgi-dc-trai .dpm-tgi-dc-bang input { width: 64px; }
.dpm-tgi-dc-trai .dpm-tgi-dc-bang th, .dpm-tgi-dc-trai .dpm-tgi-dc-bang td { padding: 2px 4px; }
.dpm-tgi-dc-svg .dpm-tgi-dc-tk-ten { cursor: pointer; }
.dpm-tgi-dc-svg .dpm-tgi-dc-tk-ten:hover { text-decoration: underline; }
.dpm-tgi-dc-dang select { font-weight: 700; }
/* 1.9.8: đồ thị "Giá theo số lượng" cho khách. */
.dpm-tgi .dpm-tgi-nut-dt { display: inline-flex; align-items: center; gap: 6px; margin: 8px 0 0; padding: 7px 14px; border: 2px solid #ca8a04; border-radius: 999px; background: #fffbeb; color: #92400e; font-weight: 700; font-size: 14px; cursor: pointer; }
.dpm-tgi .dpm-tgi-nut-dt:hover { background: #fde68a; }
.dpm-tgi .dpm-tgi-dt-cot { border: 0; background: rgba(255,255,255,.2); color: inherit; border-radius: 4px; padding: 0 4px; margin-left: 4px; cursor: pointer; font-size: 13px; line-height: 1.4; }
.dpm-tgi .dpm-tgi-dt-cot:hover { background: rgba(255,255,255,.45); }
.dpm-tgi-dt-nen { position: fixed; inset: 0; z-index: 100000; background: rgba(15,23,42,.5); display: flex; align-items: center; justify-content: center; padding: 12px; }
.dpm-tgi-dt-hop { background: #fff; border-radius: 12px; width: min(900px, 100%); max-height: 96vh; overflow: auto; padding: 14px 16px; box-shadow: 0 20px 50px rgba(0,0,0,.3); color: #1e293b; }
.dpm-tgi-dt-dau { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 17px; }
.dpm-tgi-dt-x { border: 0; background: none; font-size: 22px; cursor: pointer; color: #64748b; }
.dpm-tgi-dt-cot-chon { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 4px; }
.dpm-tgi-dt-cot-chon button { border: 1px solid #cbd5e1; background: #f8fafc; border-radius: 999px; padding: 4px 12px; cursor: pointer; font-size: 13px; }
.dpm-tgi-dt-cot-chon button.chon { background: #0f172a; color: #fff; border-color: #0f172a; }
.dpm-tgi-dt-svg { display: block; touch-action: none; margin-top: 6px; }
.dpm-tgi-dt-chu { font-size: 14px; line-height: 1.6; }
.dpm-tgi-dt-hoa { background: #fef2f2; border-left: 4px solid #7f1d1d; padding: 6px 10px; margin: 6px 0; }
.dpm-tgi-dt-dong { padding: 4px 0; }
.dpm-tgi-dt-tro { background: #f1f5f9; border-radius: 6px; padding: 4px 8px; }
.dpm-tgi-dt-nho { color: #64748b; font-size: 12.5px; margin-top: 4px; }
/* 1.9.9: đồ thị khách — ô số nổi cạnh con trỏ; nút chọn giấy đậm; nút cạnh "Xem chi tiết giá". */
.dpm-tgi .dpm-tgi-nut-ct + .dpm-tgi-nut-dt { margin: 0 0 0 8px; vertical-align: middle; }
.dpm-tgi-dt-ve { position: relative; }
.dpm-tgi-dt-noi { position: absolute; z-index: 3; pointer-events: none; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,.18); padding: 6px 10px; font-size: 13.5px; line-height: 1.5; white-space: nowrap; }
.dpm-tgi-dt-noi[hidden] { display: none; }
.dpm-tgi-dt-noi span { color: #475569; font-weight: 400; }
.dpm-tgi-dt-cot-chon button { font-weight: 700; font-size: 14.5px; padding: 6px 14px; color: #0f172a; border-width: 2px; }
/* 1.9.10: đồ thị khách — cột đều theo mức số lượng; màn hẹp vuốt ngang */
.dpm-tgi-dt-cuon { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.dpm-tgi-dt-cuon .dpm-tgi-dt-svg { display: block; max-width: none; height: auto; touch-action: pan-x pan-y; }
.dpm-tgi-dt-tren { font-size: 13.5px; line-height: 1.55; margin: 4px 0 6px; }
/* 1.10.0: cửa sổ đồ thị rộng hơn (máy tính không phải vuốt); nút chọn giấy gọn trên điện thoại */
.dpm-tgi-dt-hop { width: min(1100px, 100%); }
.dpm-tgi-dt-dau b { font-size: 17px; line-height: 1.35; }
@media (max-width: 600px) {
	.dpm-tgi-dt-hop { padding: 10px 10px; }
	.dpm-tgi-dt-dau b { font-size: 15px; }
	.dpm-tgi-dt-cot-chon { gap: 4px; margin: 8px 0 2px; }
	.dpm-tgi-dt-cot-chon button { font-size: 12.5px; padding: 3px 9px; border-width: 1px; }
}

/* ===================== 1.11.0 ===================== */
/* Trang báo giá in: "CHI TIẾT GIÁ" + "📈 So sánh giá" — cùng kiểu vuông, luôn một hàng */
.dpm-tgi .dpm-tgi-hai-nut { display: flex; flex-wrap: nowrap; gap: 8px; align-self: flex-start; max-width: 100%; }
.dpm-tgi .dpm-tgi-hai-nut .dpm-tgi-nut-ct, .dpm-tgi .dpm-tgi-hai-nut .dpm-tgi-nut-dt { display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 36px; margin: 0; padding: 0 14px; border: 0; border-radius: 6px; font-weight: 800; font-size: 14px; letter-spacing: .3px; white-space: nowrap; line-height: 1; cursor: pointer; }
.dpm-tgi .dpm-tgi-hai-nut .dpm-tgi-nut-dt { background: #b45309; color: #fff; }
.dpm-tgi .dpm-tgi-hai-nut .dpm-tgi-nut-dt:hover { background: #92400e; }
@media (max-width: 400px) { .dpm-tgi .dpm-tgi-hai-nut .dpm-tgi-nut-ct, .dpm-tgi .dpm-tgi-hai-nut .dpm-tgi-nut-dt { padding: 0 10px; font-size: 12.5px; letter-spacing: 0; } }

/* Hàng nút dùng chung: kéo hết chiều ngang, nút chia đều, có biểu tượng; điện thoại 2 hàng đều */
.dpm-tgi.dpm-tgi-hn-hop { max-width: none; }
.dpm-tgi .dpm-tgi-hang-nut[class*="dpm-tgi-hn-"] { display: flex; flex-wrap: nowrap; gap: 8px; width: 100%; overflow: visible; }
.dpm-tgi .dpm-tgi-hang-nut[class*="dpm-tgi-hn-"] > .dpm-tgi-nut { flex: 1 1 0; min-width: 0; width: auto; height: 42px; gap: 6px; padding: 0 8px !important; font-size: clamp(12px, 1.15vw, 14.5px); font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-radius: 8px; text-decoration: none; }
.dpm-tgi .dpm-tgi-hang-nut[class*="dpm-tgi-hn-"] > .dpm-tgi-nut-dac:first-child { grid-column: auto; flex-grow: 1.35; }
.dpm-tgi-hang-nut > .dpm-tgi-nut::before { font-size: 1.1em; line-height: 1; flex: none; }
.dpm-tgi-nb-yc::before { content: "📝"; } .dpm-tgi-nb-pdf::before { content: "📄"; } .dpm-tgi-nb-in::before { content: "🖨️"; }
.dpm-tgi-nb-goi::before { content: "📞"; } .dpm-tgi-nb-zalo::before { content: "💬"; } .dpm-tgi-nb-dat::before { content: "🛒"; } .dpm-tgi-nb-lien_he::before { content: "✉️"; }
@media (min-width: 601px) and (max-width: 860px) { .dpm-tgi-hang-nut[class*="dpm-tgi-hn-"] > .dpm-tgi-nut::before { display: none; } }
@media (max-width: 600px) {
	.dpm-tgi .dpm-tgi-hang-nut[class*="dpm-tgi-hn-"] { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
	.dpm-tgi .dpm-tgi-hang-nut[class*="dpm-tgi-hn-"] > .dpm-tgi-nut { width: 100%; height: 40px; font-size: 12.5px; padding: 0 4px !important; gap: 4px; }
	.dpm-tgi .dpm-tgi-hang-nut.dpm-tgi-hn-7 > .dpm-tgi-nut-dac:first-child, .dpm-tgi .dpm-tgi-hang-nut.dpm-tgi-hn-5 > .dpm-tgi-nut-dac:first-child { grid-column: span 2; }
	.dpm-tgi .dpm-tgi-hang-nut.dpm-tgi-hn-6, .dpm-tgi .dpm-tgi-hang-nut.dpm-tgi-hn-5, .dpm-tgi .dpm-tgi-hang-nut.dpm-tgi-hn-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.dpm-tgi .dpm-tgi-hang-nut.dpm-tgi-hn-4, .dpm-tgi .dpm-tgi-hang-nut.dpm-tgi-hn-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.dpm-tgi .dpm-tgi-hang-nut.dpm-tgi-hn-1 { grid-template-columns: 1fr; }
}

/* Báo giá vật tư (giấy): dải tiêu đề, lưu ý, khung chọn, kết quả, bảng */
.dpm-tgi-vt-khach .dpm-tgi-vt-dai { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 14px 20px; border-radius: 14px; background: var(--tgi-dai, #0f766e); background-image: linear-gradient(120deg, rgba(255,255,255,.12), rgba(0,0,0,.12)); color: #fff; box-shadow: 0 6px 18px rgba(15,23,42,.12); }
.dpm-tgi-vt-khach .dpm-tgi-vt-dai h2 { margin: 0 !important; color: #fff !important; font-size: 23px; line-height: 1.25; font-weight: 800; letter-spacing: .01em; }
.dpm-tgi-vt-khach .dpm-tgi-vt-dai .dpm-tgi-vt-nhan { margin: 0; }
.dpm-tgi-vt-khach .dpm-tgi-vt-dai .dpm-tgi-vt-nhan span { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.4); }
.dpm-tgi-vt-khach .dpm-tgi-vt-tb { display: flex; gap: 12px; align-items: flex-start; margin: 12px 0 0; padding: 12px 16px; background: #fffbeb; border: 1px solid #fde68a; border-left: 5px solid #f59e0b; border-radius: 10px; color: #78350f; font-size: 15px; line-height: 1.55; }
.dpm-tgi-vt-tb-i { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-top: 1px; border-radius: 50%; background: #f59e0b; color: #fff; font: italic 800 15px/1 Georgia, serif; }
.dpm-tgi-vt-tb p:last-child { margin-bottom: 0; }
.dpm-tgi-vt-khach .dpm-tgi-vt-chon { background: #f8fafc; border: 1px solid #e2e8f0; box-shadow: inset 0 1px 0 #fff; }
.dpm-tgi-vt-khach .dpm-tgi-vt-luoi { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.dpm-tgi-vt-khach .dpm-tgi-vt-o-sl { grid-column: 1 / -1; }
.dpm-tgi-vt-khach .dpm-tgi-vt-sl-hop { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dpm-tgi-vt-khach .dpm-tgi-vt-sl-hop .dpm-tgi-vt-nhanh { margin: 0 0 0 4px; padding-left: 12px; border-left: 2px solid #e2e8f0; }
.dpm-tgi-vt-khach .dpm-tgi-vt-chon > .dpm-tgi-vt-goi-y { margin: 2px 0 0; font-size: 13px; color: #64748b; }
.dpm-tgi-vt-khach .dpm-tgi-vt-kq.dpm-tgi-gck-khung { background: #fff; border: 2px solid var(--tgi-dai, #0f766e); border-radius: 14px; box-shadow: 0 8px 24px rgba(15,23,42,.08); }
.dpm-tgi-vt-khach .dpm-tgi-vt-so-kq { display: grid; grid-template-columns: minmax(0, 1.7fr) repeat(3, minmax(0, 1fr)); gap: 10px; align-items: stretch; }
.dpm-tgi-vt-so-kq > span { display: flex; flex-direction: column; justify-content: center; gap: 4px; min-width: 0; padding: 10px 14px; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0; }
.dpm-tgi-vt-so-kq > span > i { font-style: normal; font-size: 12.5px; font-weight: 700; color: #64748b; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.dpm-tgi-vt-so-kq > span > b, .dpm-tgi-vt-kq .dpm-tgi-vt-so-kq .dpm-tgi-vt-b2 { margin: 0; font-size: 20px; font-weight: 800; color: #0f172a; white-space: nowrap; }
.dpm-tgi-vt-so-kq > .dpm-tgi-vt-tong { background: var(--tgi-dai, #0f766e); background-image: linear-gradient(135deg, rgba(255,255,255,.14), rgba(0,0,0,.18)); border: 0; color: #fff; padding: 12px 18px; }
.dpm-tgi-vt-so-kq > .dpm-tgi-vt-tong > i { color: rgba(255,255,255,.85); }
.dpm-tgi-vt-so-kq > .dpm-tgi-vt-tong > b { font-size: 34px; color: #fff; line-height: 1.1; }
.dpm-tgi-vt-th > i::before { margin-right: 5px; }
.dpm-tgi-vt-th-to > i::before { content: "🧾"; } .dpm-tgi-vt-th-ram > i::before { content: "📦"; } .dpm-tgi-vt-th-kg > i::before { content: "⚖️"; } .dpm-tgi-vt-th-m2 > i::before { content: "📐"; }
.dpm-tgi-vt-kq-duoi { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; }
.dpm-tgi-vt-kq-ghi { flex: 1 1 220px; font-size: 13.5px; color: #475569; }
.dpm-tgi-vt-kq-duoi .dpm-tgi-vt-vat { margin: 0; }
.dpm-tgi-vt-nut-ct { height: 36px; padding: 0 14px; border: 0; border-radius: 6px; background: #1e1b8a; color: #fff; font-weight: 800; font-size: 13.5px; letter-spacing: .3px; cursor: pointer; white-space: nowrap; }
.dpm-tgi-vt-nut-ct:hover { filter: brightness(1.15); }
.dpm-tgi-vt-kq .dpm-tgi-gck-ct[hidden] { display: none; }
.dpm-tgi-vt-kq .dpm-tgi-gck-ct { border: 1px solid #e2e8f0; }
.dpm-tgi-vt-khach .dpm-tgi-gck-bang-hop { box-shadow: 0 4px 14px rgba(15,23,42,.05); }
.dpm-tgi-vt-khach .dpm-tgi-gck-h3 { color: var(--tgi-dai, #0f766e); }
.dpm-tgi-vt-khach .dpm-tgi-gck-bang thead th { background: var(--tgi-dai, #0f766e); }
.dpm-tgi-vt-khach .dpm-tgi-gck-bang thead th.dpm-tgi-vt-cot { background-image: linear-gradient(rgba(0,0,0,.22), rgba(0,0,0,.22)); box-shadow: inset 0 -4px 0 #facc15; }
.dpm-tgi-vt-khach .dpm-tgi-gck-bang tbody tr { cursor: pointer; }
.dpm-tgi-vt-khach .dpm-tgi-gck-bang tbody td { background: #fff; }
.dpm-tgi-vt-khach .dpm-tgi-gck-bang tbody tr:nth-child(even) td { background: #f8fafc; }
.dpm-tgi-vt-khach .dpm-tgi-gck-bang tbody tr:hover td { background: #f1f5f9; }
.dpm-tgi-vt-khach .dpm-tgi-gck-bang tbody td.dpm-tgi-vt-cot { background: #ecfeff; }
.dpm-tgi-vt-khach .dpm-tgi-gck-bang tbody tr.dpm-tgi-gck-dang td { background: #fef9c3; }
.dpm-tgi-vt-khach .dpm-tgi-gck-bang tbody tr.dpm-tgi-gck-dang td.dpm-tgi-vt-cot { background: #fde047; font-weight: 800; box-shadow: inset 0 0 0 2px #ca8a04; }
.dpm-tgi-vt-khach .dpm-tgi-gck-bang th:first-child, .dpm-tgi-vt-khach .dpm-tgi-gck-bang td:first-child { position: sticky; left: 0; z-index: 1; box-shadow: 2px 0 0 #e2e8f0; }
@media (max-width: 700px) {
	.dpm-tgi-vt-khach .dpm-tgi-vt-so-kq { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.dpm-tgi-vt-so-kq > .dpm-tgi-vt-tong { grid-column: 1 / -1; flex-direction: row; align-items: baseline; justify-content: space-between; }
	.dpm-tgi-vt-so-kq > .dpm-tgi-vt-tong > b { font-size: 28px; }
	.dpm-tgi-vt-so-kq > span { padding: 8px 10px; }
	.dpm-tgi-vt-so-kq > span > b, .dpm-tgi-vt-kq .dpm-tgi-vt-so-kq .dpm-tgi-vt-b2 { font-size: 16px; }
	.dpm-tgi-vt-so-kq > span > i { font-size: 11px; letter-spacing: 0; }
	.dpm-tgi-vt-khach .dpm-tgi-vt-dai h2 { font-size: 19px; }
	.dpm-tgi-vt-khach .dpm-tgi-vt-sl-hop .dpm-tgi-vt-nhanh { margin: 0; padding: 0; border: 0; }
}
.dpm-tgi .dpm-tgi-hai-nut [hidden] { display: none; }
/* 1.11.0 (tinh chỉnh sau khi thử) */
.dpm-tgi .dpm-tgi-hang-nut[class*="dpm-tgi-hn-"] > .dpm-tgi-nut { flex: 1 1 auto; text-overflow: clip; }
.dpm-tgi-vt-khach .dpm-tgi-vt-luoi { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.dpm-tgi-vt-khach .dpm-tgi-vt-o-sl .dpm-tgi-vt-so { flex: 0 0 170px; width: 170px; }
@media (max-width: 600px) {
	.dpm-tgi .dpm-tgi-hang-nut[class*="dpm-tgi-hn-"] > .dpm-tgi-nut { flex-direction: column; height: 54px; gap: 3px; font-size: 11.5px; line-height: 1.15; white-space: normal; text-align: center; padding: 2px 3px !important; }
	.dpm-tgi-hang-nut[class*="dpm-tgi-hn-"] > .dpm-tgi-nut::before { font-size: 17px; }
	.dpm-tgi-vt-khach .dpm-tgi-vt-luoi { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
	.dpm-tgi-vt-khach .dpm-tgi-vt-o select { height: 44px; padding: 0 30px 0 10px; font-size: 15px; }
	.dpm-tgi-vt-khach .dpm-tgi-vt-o-sl .dpm-tgi-vt-so { flex: 1 1 120px; width: auto; }
	.dpm-tgi-vt-so-kq > span > i { white-space: normal; line-height: 1.2; }
	.dpm-tgi-vt-th > i::before { display: block; margin: 0 0 2px; }
}

/* 1.12.0: nút "▶ Video hướng dẫn" ở dải tiêu đề + khung video bật lên */
.dpm-tgi-khach-trang .dpm-tgi-khoi-ten.dpm-tgi-tg-dau { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.dpm-tgi .dpm-tgi-nut-video { flex: none; margin: 0; padding: 5px 12px; border: 1.5px solid rgba(255,255,255,.75); border-radius: 999px; background: rgba(255,255,255,.15); color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: 0; text-transform: none; cursor: pointer; line-height: 1.3; }
.dpm-tgi .dpm-tgi-nut-video:hover { background: #fff; color: var(--tgi-d-v1, #0f766e); }
.dpm-tgi-video-nen .dpm-tgi-video-hop { position: relative; width: min(960px, 100%); }
.dpm-tgi-video-x { position: absolute; top: -42px; right: 0; width: 36px; height: 36px; border: 0; border-radius: 50%; background: #fff; color: #0f172a; font-size: 18px; cursor: pointer; }
.dpm-tgi-video-khung { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: #000; box-shadow: 0 20px 50px rgba(0,0,0,.4); }
.dpm-tgi-video-khung iframe, .dpm-tgi-video-khung video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* 1.13.3: bảng giá in — tô sáng cả DÒNG số lượng chọn lẫn CỘT giấy chọn, ô giao đậm; rê chuột: thước chữ thập */
.dpm-tgi table.dpm-tgi-bg thead th.dpm-tgi-cot-chon { box-shadow: inset 0 -4px 0 #facc15; filter: brightness(.85); }
.dpm-tgi table.dpm-tgi-bg tbody td.dpm-tgi-cot-chon { box-shadow: inset 0 0 0 999px rgba(250,204,21,.16), inset 1px 0 0 #facc15, inset -1px 0 0 #facc15; }
.dpm-tgi table.dpm-tgi-bg tbody tr.dpm-tgi-dong-chon td.dpm-tgi-cot-chon { background: #fde047 !important; font-weight: 800; box-shadow: inset 0 0 0 2px #ca8a04; }

.dpm-tgi table.dpm-tgi-bg tbody .dpm-tgi-ro { background-image: linear-gradient(rgba(37,99,235,.10), rgba(37,99,235,.10)); }
.dpm-tgi table.dpm-tgi-bg tbody td.dpm-tgi-ro:hover { outline: 2px solid #2563eb; outline-offset: -2px; }

/* 1.14.0: khung sửa / tạo bảng lũy tiến tại chỗ (dùng chung trang Lãi & giá báo + bảng Gia công) */
	.dpm-tgi-lg-sua { min-height: 28px; height: 28px; padding: 0 8px; margin-left: 4px; line-height: 26px; font-size: 14px; vertical-align: middle; }
	.dpm-tgi-lg-sua[hidden] { display: none; }
	.dpm-tgi-lg-nen { position: fixed; inset: 0; z-index: 100100; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; padding: 1.5vh 1.5vw; }
	.dpm-tgi-lg-hop { display: flex; flex-direction: column; width: 100%; height: 100%; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
	.dpm-tgi-lg-tren { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: #0f172a; color: #fff; }
	.dpm-tgi-lg-tren b { font-size: 15px; } .dpm-tgi-lg-tren small { color: #cbd5e1; font-size: 13px; }
	.dpm-tgi-lg-tren .dau-phai { margin-left: auto; display: flex; gap: 8px; align-items: center; }
	.dpm-tgi-lg-tren a { color: #fff; border: 1px solid rgba(255,255,255,.5); border-radius: 6px; padding: 4px 10px; text-decoration: none; font-weight: 600; }
	.dpm-tgi-lg-tren a:hover { background: rgba(255,255,255,.15); color: #fff; }
	.dpm-tgi-lg-tren button { border: 0; background: #fff; color: #0f172a; border-radius: 50%; width: 30px; height: 30px; font-size: 16px; cursor: pointer; }
	.dpm-tgi-lg-hop iframe { flex: 1; width: 100%; border: 0; background: #f0f0f1; }
	.dpm-tgi-lg-cho { position: absolute; inset: 52px 0 0; display: flex; align-items: center; justify-content: center; color: #475569; font-size: 15px; pointer-events: none; }
	.dpm-tgi-lg-cho[hidden] { display: none; }
	.dpm-tgi-lg-hop { position: relative; }
/* cột "Lũy tiến" trong bảng Gia công */
.dpm-tgi-bang-gc2 th.dpm-tgi-gc2-lt-dau { min-width: 210px; background: #fef3c7; }
.dpm-tgi-bang-gc2 th.dpm-tgi-gc2-lt-dau small { display: block; font-weight: 400; color: #92400e; }
.dpm-tgi-bang-gc2 td.dpm-tgi-gc2-lt { background: #fffbeb; }
.dpm-tgi-gc2-lt-hop { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.dpm-tgi-gc2-lt-hop select { max-width: 190px; }
.dpm-tgi-gc2-lt-hop .dpm-tgi-lg-sua { margin-left: 0; }
/* ô "Làm tròn giá lên" trong cửa sổ đường cong */
.dpm-tgi-dc-tron { display: inline-flex; align-items: center; gap: 6px; margin: 0 10px; font-weight: 600; white-space: nowrap; }
.dpm-tgi-dc-tron[hidden] { display: none; }
.dpm-tgi-canh-vang { background: #fffbeb; border-left: 4px solid #f59e0b; padding: 6px 10px; color: #78350f; }
/* 1.17.0 */
.dpm-tgi-canh-do { background: #fef2f2; border-left: 4px solid #dc2626; padding: 6px 10px; color: #991b1b; font-weight: 600; }
.dpm-tgi-lg-hai { display: flex; align-items: center; gap: 6px; margin: 2px 0; flex-wrap: wrap; }
.dpm-tgi-lg-hai > small { min-width: 108px; color: #475569; }
.dpm-tgi-tao-hop { background: #fff; border-radius: 10px; padding: 18px 20px; width: min(460px, 92vw); margin: 12vh auto 0; box-shadow: 0 18px 50px rgba(0,0,0,.3); }
.dpm-tgi-tao-hop h2 { margin: 0 0 12px; font-size: 17px; }
.dpm-tgi-tao-hop label { display: block; margin: 0 0 12px; }
.dpm-tgi-tao-hop label > span { display: block; font-weight: 600; margin-bottom: 4px; }
.dpm-tgi-tao-hop label small { font-weight: 400; color: #64748b; }
.dpm-tgi-tao-hop input, .dpm-tgi-tao-hop select { width: 100%; max-width: none; }
.dpm-tgi-tao-nut { text-align: right; margin: 14px 0 0; }
th.dpm-tgi-gc2-lt-dau { background: #fef3c7; white-space: nowrap; }
th.dpm-tgi-gc2-lt-dau small { display: block; font-weight: 400; font-size: 11px; color: #78350f; }
td.dpm-tgi-gc2-lt-o { background: #fdf2f8; }
td.dpm-tgi-gc2-lt-n { background: #eff6ff; }
.dpm-tgi-gc2-lt-hop { display: inline-flex; gap: 4px; align-items: center; }
.dpm-tgi-gc2-lt-hop select { max-width: 190px; }
/* Máy offset: cơ bản + Nâng cao */
.dpm-tgi-may-cb { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-start; }
.dpm-tgi-may-cb > label { display: flex; flex-direction: column; min-width: 150px; }
.dpm-tgi-may-cb > label > span { font-weight: 600; }
.dpm-tgi-goi-y { display: block; color: #64748b; font-size: 12px; font-weight: 400; margin-top: 2px; max-width: 230px; }
.dpm-tgi-may-nc { margin: 10px 0; border: 1px dashed #cbd5e1; border-radius: 6px; padding: 4px 10px; }
.dpm-tgi-may-nc > summary { cursor: pointer; font-weight: 600; color: #334155; padding: 4px 0; }
.dpm-tgi-thu { background: #f0fdf4; border-left: 4px solid #16a34a; padding: 8px 12px; margin: 10px 0; color: #14532d; }
.dpm-tgi-thu small { display: block; color: #3f6212; margin-top: 3px; }
.dpm-tgi-bg-dt:not(.nc) .c-nc { display: none; }
/* 1.17.1 */
.dpm-tgi-o-lt-may { display: flex; flex-direction: column; min-width: 240px; }
.dpm-tgi-o-lt-may > span { font-weight: 600; }
.dpm-tgi-nhom-cach select { max-width: 100%; }
.dpm-tgi-khac { margin-top: 10px; border-top: 1px dashed #cbd5e1; padding-top: 8px; }
.dpm-tgi-khac-dong { display: flex; gap: 6px; align-items: center; margin: 4px 0; flex-wrap: wrap; }
.dpm-tgi-khac-dong [data-khac="ten"] { flex: 1 1 160px; }
.dpm-tgi-khac-dong input, .dpm-tgi-khac-dong select { width: auto !important; min-width: 0; }
.dpm-tgi-khac-dong [data-khac="ten"] { flex: 1 1 140px !important; }
.dpm-tgi-khac-dong [data-khac="tien"] { width: 90px !important; flex: 0 0 90px; }
.dpm-tgi-khac-dong select { flex: 0 0 auto; }
/* 1.17.2: lãi cùng một kiểu ở mọi khung */
.dpm-tgi-nhan-lai { display: inline-block; margin-left: 8px; background: #fef3c7; color: #78350f; border-radius: 4px; padding: 1px 8px; font-size: 12px; font-weight: 600; }
.dpm-tgi-nhan-lai-0 { background: #fee2e2; color: #991b1b; }
.dpm-tgi-may-phan { margin: 14px 0 6px; font-size: 13px; }
.dpm-tgi-may-phan small { font-weight: 400; color: #64748b; }
.dpm-tgi-may-lai { background: #fef3c7; border-radius: 6px; padding: 8px 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: #78350f; }
.dpm-tgi-may-lai select { max-width: 320px; }
.dpm-tgi-may-lai small { flex-basis: 100%; color: #92400e; }
.dpm-tgi-o-lt-may select { background: #fffbeb; }
.dpm-tgi-do { color: #b91c1c; }
.dpm-tgi-lg-md > table { margin: 6px 0 4px; }
/* 1.18.4: gia công khách được chọn — mỗi nhóm một hàng */
.dpm-tgi-kc-gc-hang { display: flex; align-items: flex-start; gap: 8px 14px; padding: 6px 0; border-bottom: 1px dashed #e2e8f0; }
.dpm-tgi-kc-gc-hang.mo { opacity: .55; }
.dpm-tgi-kc-gc-dau { flex: 0 0 300px; display: flex; align-items: center; gap: 10px; }
.dpm-tgi-kc-gc-dau i { flex: 0 0 96px; font-style: normal; font-weight: 600; color: #334155; }
.dpm-tgi-kc-gc-dau .dpm-tgi-tich { font-size: 12px; white-space: nowrap; }
.dpm-tgi-kc-tu { color: #6d28d9; }
.dpm-tgi-kc-gc-ds { flex: 1; display: flex; flex-wrap: wrap; gap: 4px 4px; }
.dpm-tgi-kc-gc-o { padding: 2px 8px; border: 1px solid #e2e8f0; border-radius: 6px; background: #fff; }
.dpm-tgi-kc-san { display: inline-flex; align-items: center; gap: 2px; font-size: 11px; color: #64748b; cursor: pointer; margin-left: 2px; }
.dpm-tgi-kc-san input { -webkit-appearance: none; appearance: none; width: 15px; height: 15px; margin: 0; border: 2px solid #94a3b8; border-radius: 50%; background: #fff; cursor: pointer; }
.dpm-tgi-kc-san input:checked { border-color: #1d4ed8; background: radial-gradient(#1d4ed8 45%, #fff 50%); }
.dpm-tgi-kc-san input:disabled { opacity: .35; cursor: default; }
.dpm-tgi-kc-san input:checked + span { color: #1d4ed8; font-weight: 600; }
@media (max-width: 900px) { .dpm-tgi-kc-gc-hang { flex-direction: column; } .dpm-tgi-kc-gc-dau { flex-basis: auto; } }
.dpm-tgi-gc-lai { margin: -2px 0 6px 0; padding: 0 0 4px 4px; border-bottom: 1px dashed rgba(15,23,42,.1); font-size: 12px; color: #6d28d9; }
.dpm-tgi-gc-lai.chua { color: #b91c1c; font-weight: 600; }
/* 1.18.6: bảng Gia công ra dạng bảng thật — tiêu đề đậm có kẻ, kẻ cột, hàng xen màu, cột Khâu + tiêu đề đứng yên */
.dpm-tgi-bang-gc2 { border: 1px solid #cbd5e1; border-radius: 8px; overflow: visible; font-size: 13px; }
.dpm-tgi-bang-gc2 thead th { position: sticky; top: 32px; z-index: 3; background: #1e293b !important; color: #fff !important; font-weight: 700; font-size: 12.5px; text-align: center; padding: 8px 6px !important; border-right: 1px solid #475569; border-bottom: 1px solid #475569; white-space: normal !important; line-height: 1.3; vertical-align: middle; }
.dpm-tgi-bang-gc2 thead tr:first-child th.dpm-tgi-gc2-nhom { background: #9f1239 !important; font-size: 13px; letter-spacing: .2px; }
.dpm-tgi-bang-gc2 thead tr:nth-child(2) th { background: #be123c !important; font-weight: 600; }
.dpm-tgi-bang-gc2 thead th.dpm-tgi-gc2-lt-dau { background: #a16207 !important; }
.dpm-tgi-bang-gc2 thead th small { display: block; font-weight: 400; opacity: .85; font-size: 11px; }
.dpm-tgi-bang-gc2 thead th.dpm-tgi-gc2-ten { left: 0; z-index: 4; text-align: left; }
.dpm-tgi-bang-gc2 tbody td { border-right: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; padding: 6px 6px !important; background: #fff; }
.dpm-tgi-bang-gc2 tbody tr:nth-child(even) td { background: #f8fafc; }
.dpm-tgi-bang-gc2 tbody tr:hover td { background: #fff7ed; }
.dpm-tgi-bang-gc2 tbody td[data-o] { background: #fff5f5; }
.dpm-tgi-bang-gc2 tbody tr:nth-child(even) td[data-o] { background: #fdeeee; }
.dpm-tgi-bang-gc2 td[data-o="mot_lan"] .dpm-tgi-o-dv, .dpm-tgi-bang-gc2 td[data-o="ban_cm2"] .dpm-tgi-o-dv, .dpm-tgi-bang-gc2 td[data-o="toi_thieu"] .dpm-tgi-o-dv { display: none; } /* đơn vị đã ghi trên tiêu đề cột */
.dpm-tgi-bang-gc2 td.dpm-tgi-gc2-lt { background: #fefce8 !important; }
.dpm-tgi-bang-gc2 td.dpm-tgi-o-ghi { text-align: center; }
.dpm-tgi-gc-ghi-nut { border: 1px solid #cbd5e1; background: #fff; border-radius: 6px; padding: 3px 7px; cursor: pointer; opacity: .45; font-size: 15px; line-height: 1; }
.dpm-tgi-gc-ghi-nut.co { opacity: 1; border-color: #7c3aed; background: #f5f3ff; box-shadow: 0 0 0 2px #ede9fe; }
.dpm-tgi-gc-ghi-nut:hover { opacity: 1; }
.dpm-tgi-ghi-hop { width: min(640px, 92vw); }
.dpm-tgi-ghi-hop textarea { width: 100%; font-size: 14px; line-height: 1.5; }
/* trang soạn bài: ô giá gia công chỉ xem */
.dpm-tgi-gc-chi-xem input[readonly] { background: #f1f5f9 !important; color: #334155; border-style: dashed !important; cursor: default; }
.dpm-tgi-gc-sua-chung { font-size: 12px; margin-left: 6px; white-space: nowrap; }
.dpm-tgi-gc-cu { font-size: 11px; color: #b45309; margin-left: 6px; }
.dpm-tgi-gc-ghi-i { color: #7c3aed; cursor: help; font-weight: 700; }
/* 1.18.6: nút +/− nhỏ dưới đồ thị */
.dpm-tgi-dc-svg .dpm-tgi-dc-chen { opacity: .4; }
.dpm-tgi-dc-svg .dpm-tgi-dc-chen circle { stroke-width: 1; }
.dpm-tgi-dc-svg .dpm-tgi-dc-bo circle { stroke: #dc2626; }
.dpm-tgi-dc-svg .dpm-tgi-dc-bo text { fill: #dc2626; }
.dpm-tgi-dc-svg .dpm-tgi-dc-bo:hover circle { fill: #dc2626; }
.dpm-tgi-soat-gc td, .dpm-tgi-soat-gc th { vertical-align: top; white-space: nowrap; }
.dpm-tgi-soat-gc tr.dpm-tgi-soat-xau td { background: #fef2f2 !important; }
.dpm-tgi-soat-gc td:last-child { white-space: normal; min-width: 240px; }
/* 1.18.7: Giá là cột chính, phần thêm nhạt màu */
.dpm-tgi-bang-gc2 thead th.dpm-tgi-gc2-gia { background: #9f1239 !important; font-size: 14px; min-width: 190px; }
.dpm-tgi-bang-gc2 thead th.dpm-tgi-gc2-them-dau { background: #64748b !important; font-weight: 600; }
.dpm-tgi-bang-gc2 thead tr:nth-child(2) th { background: #94a3b8 !important; color: #0f172a !important; font-weight: 600; }
.dpm-tgi-bang-gc2 tbody td[data-o="don_gia"] { background: #fff1f2 !important; border-left: 2px solid #be123c; }
.dpm-tgi-bang-gc2 tbody td[data-o="don_gia"] input[type="text"] { font-weight: 700; font-size: 14px; width: 96px; }
.dpm-tgi-bang-gc2 tbody td[data-o="mot_lan"], .dpm-tgi-bang-gc2 tbody td[data-o="ban_cm2"], .dpm-tgi-bang-gc2 tbody td[data-o="toi_thieu"], .dpm-tgi-bang-gc2 tbody td[data-o="goc_luot"] { background: #f8fafc !important; }
.dpm-tgi-bang-gc2 tbody td[data-o="mot_lan"] input, .dpm-tgi-bang-gc2 tbody td[data-o="ban_cm2"] input, .dpm-tgi-bang-gc2 tbody td[data-o="toi_thieu"] input, .dpm-tgi-bang-gc2 tbody td[data-o="goc_luot"] input { color: #475569; }
.dpm-tgi-gc-gia-chinh { font-weight: 700; }
.dpm-tgi-gia-nho { display:block; color:#b91c1c; font-size:11px; font-style:normal; font-weight:700; }

/* 1.18.9: Công xén + tìm / gom nhóm / lọc bảng gia công */
.dpm-tgi-xen-hop{border:1px solid #fcd34d;background:#fffbeb;border-radius:8px;padding:10px 14px;margin:0 0 16px}
.dpm-tgi-xen-hop h4{margin:0 0 4px}
.dpm-tgi-xen-o{display:flex;flex-wrap:wrap;gap:10px 16px;align-items:flex-end;margin:8px 0}
.dpm-tgi-xen-o label{display:flex;flex-direction:column;gap:3px;font-size:12px;color:#475569}
.dpm-tgi-xen-o label.dpm-tgi-tich{flex-direction:row;align-items:center;gap:6px;color:#1e293b;font-size:13px}
.dpm-tgi-xen-o input[type=text]{width:110px}
.dpm-tgi-xen-hop details summary{cursor:pointer;color:#92400e;font-size:12px}
.dpm-tgi-loc-thanh{display:flex;flex-wrap:wrap;gap:8px 12px;align-items:center;margin:6px 0 8px}
.dpm-tgi-loc-thanh input[type=search]{min-width:320px;padding:4px 10px;border-radius:6px}
.dpm-tgi-loc-nut{display:inline-flex;gap:4px;flex-wrap:wrap}
.dpm-tgi-loc-nut small{opacity:.75}
tr.dpm-tgi-loc-nhom td{background:#f1f5f9!important;border-top:2px solid #cbd5e1;padding:5px 10px!important}
tr.dpm-tgi-loc-nhom .button-link{text-decoration:none;color:#0f172a;font-size:13px}
tr.dpm-tgi-loc-nhom small{color:#64748b;font-weight:400}
tr.dpm-tgi-loc-gap td{border-bottom:1px solid #e2e8f0}
.dpm-tgi-tay-xen{display:flex;align-items:center;gap:4px;margin-top:3px;font-size:12px;color:#92400e}
.dpm-tgi-tay-xen input[type="text"]{width:64px;min-height:26px}
.dpm-tgi-xen-phan{border-top:1px dashed #fcd34d;padding:8px 0 2px;margin-top:6px}
.dpm-tgi-xen-phan>summary{cursor:pointer;font-size:13px;color:#92400e}
.dpm-tgi-xen-so{display:inline-flex;width:20px;height:20px;border-radius:50%;background:#f59e0b;color:#fff;align-items:center;justify-content:center;font-size:12px;margin-right:4px}
.dpm-tgi-xen-tb{background:#fff;border:1px solid #fde68a;border-radius:6px;padding:6px 10px;margin:6px 0}
.dpm-tgi-xen-cao-sua{background:#fff7ed;border-radius:6px;padding:6px 10px;margin:4px 0}
.dpm-tgi-xen-o label span{max-width:220px}

/* 1.18.13: trang Báo giá xén — cột trái nhập, cột phải hình cắt */
.dpm-tgi-xbg-luoi { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin: 14px 0 18px; }
@media (min-width: 760px) { .dpm-tgi-xbg-luoi { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); align-items: start; } }
.dpm-tgi-xbg-nhap .dpm-tgi-gck-o-hang { margin-bottom: 12px; }
.dpm-tgi-xbg-tich { display: flex; gap: 8px; align-items: baseline; font-size: 14px; font-weight: 600; color: #334155; cursor: pointer; }
.dpm-tgi-xbg-tich input { width: 18px; height: 18px; flex: none; transform: translateY(3px); }
.dpm-tgi-xbg-tich small { font-weight: 400; color: #64748b; }
@media (max-width: 520px) { .dpm-tgi-xbg-tich { flex-wrap: wrap; } .dpm-tgi-xbg-tich small { flex-basis: 100%; padding-left: 26px; } }
.dpm-tgi-xbg-hinh { padding: 12px; border: 1.5px solid #cbd5e1; border-radius: 12px; background: #f8fafc; }
.dpm-tgi-xbg-hinh .dpm-tgi-so-do svg { max-width: 100%; max-height: 260px; }
.dpm-tgi-xbg-hinh-chu { margin: 8px 0 0; text-align: center; font-size: 14px; color: #1e293b; }
.dpm-tgi-xbg-hinh-chu small { color: #64748b; font-size: 12px; }
.dpm-tgi-xbg-hinh-trong { margin: 0; padding: 24px 8px; text-align: center; color: #64748b; }
/* 1.18.13: khung Công xén — bảng giá theo vật liệu */
.dpm-tgi-xen-bang{max-width:900px;margin:8px 0 6px}
.dpm-tgi-xen-bang th{font-size:12px;padding:6px 8px}
.dpm-tgi-xen-bang td{padding:4px 8px;vertical-align:middle}
.dpm-tgi-xen-bang input[type=text]{width:100px}
.dpm-tgi-xen-dm{font-size:12px;color:#475569;max-width:260px}
.dpm-tgi-xen-dm summary{cursor:pointer;color:#2271b1}
.dpm-tgi-xen-dm details label{display:block;margin:2px 0}
.dpm-tgi-xen-bo{color:#b91c1c!important;text-decoration:none!important;font-size:16px}
.dpm-tgi-xen-tb div{margin:2px 0}
/* 1.18.14: Báo giá xén — chọn tờ giấy / thành phẩm, hộp quy đổi */
.dpm-tgi-xbg-theo { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dpm-tgi-xbg-qd { margin: 0 0 12px; padding: 10px 12px; border-left: 4px solid #2563eb; background: #eff6ff; border-radius: 6px; font-size: 14px; line-height: 1.6; color: #1e293b; }
.dpm-tgi-xbg-qd small { color: #64748b; }
.dpm-tgi-xbg-sl { margin-bottom: 8px !important; }
/* 1.18.15: lề tràn nằm cạnh ô số lượng, một hàng; hộp quy đổi đứng trên hình cắt */
.dpm-tgi-xbg-sl .dpm-tgi-xbg-tich { align-self: end; min-height: 44px; align-items: center; white-space: nowrap; }
.dpm-tgi-xbg-sl .dpm-tgi-xbg-tich input { transform: none; }
.dpm-tgi-xbg-hinh .dpm-tgi-xbg-qd { margin: 0 0 10px; }
.dpm-tgi-xbg-theo .dpm-tgi-gck-pill { white-space: nowrap; }
/* 1.18.16: khung Công xén — 5 cột giá, danh sách danh mục nổi (không đẩy cao hàng) */
.dpm-tgi-xen-bang{max-width:1100px}
.dpm-tgi-xen-bang input[type=text]{width:92px}
.dpm-tgi-xen-bang td{vertical-align:top}
.dpm-tgi-xen-dm{position:relative;min-width:200px}
.dpm-tgi-xen-dm details[open]>summary{font-weight:600}
.dpm-tgi-xen-dm details[open]>label:first-of-type{margin-top:6px}
.dpm-tgi-xen-dm details[open]{position:absolute;z-index:20;top:4px;left:8px;min-width:220px;max-height:260px;overflow:auto;background:#fff;border:1px solid #c3c4c7;border-radius:6px;padding:6px 10px;box-shadow:0 6px 18px rgba(0,0,0,.15)}
.dpm-tgi-xen-dm details{display:block}
.dpm-tgi-xen-dm summary{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:240px}
.dpm-tgi-xen-rd input{width:56px!important}
/* trang Soát công xén */
.dpm-tgi-sx-bang{max-width:1200px}
.dpm-tgi-sx-bang td,.dpm-tgi-sx-bang th{vertical-align:middle;padding:6px 8px}
.dpm-tgi-sx-bang input[type=text]{width:58px}
.dpm-tgi-sx-bang .so{text-align:right;white-space:nowrap}
.dpm-tgi-sx-bang tr.dpm-tgi-sx-sua td{background:#fffbeb}
.dpm-tgi-sx-bang .dpm-tgi-sx-nhom td{background:#f0f0f1;font-weight:600}

/* 1.18.16: tên trang Báo giá gia công / xén theo màu dải tiêu đề chung */
.dpm-tgi-gck > .dpm-tgi-gck-dau h2 { color: var(--tgi-dai, inherit); }
.dpm-tgi-gd-dung { display: block; margin-top: 2px; font-size: 11px; line-height: 1.3; color: #475569; font-weight: 400; }
.dpm-tgi-gd-o { flex-wrap: wrap; }
.dpm-tgi-gd-o .dpm-tgi-gd-dung { flex-basis: 100%; }
/* 1.18.17: lãi chỉ xem ở trang vật tư — sửa ở trang Tính lãi & báo giá */
.dpm-tgi-lai-xem { display: inline-flex; flex-wrap: wrap; gap: 4px 6px; align-items: baseline; padding: 4px 10px; border-radius: 6px; background: #fef9c3; border: 1px solid #fde68a; font-size: 13px; color: #422006; }
.dpm-tgi-lai-xem > span { color: #713f12; }
.dpm-tgi-lai-xem a { font-weight: 600; white-space: nowrap; }
.dpm-tgi-lai-xem.dpm-tgi-lai-xem-chua { background: #fee2e2; border-color: #fecaca; color: #7f1d1d; }
.dpm-tgi-o-lt-khau-o { display: flex; flex-direction: column; gap: 4px; }
.dpm-tgi-o-lt-khau-o > span:first-child { font-size: 13px; color: #50575e; }
.dpm-tgi-gd-the-lai { float: right; margin: 6px 4px 0 0; padding: 5px 12px; border-radius: 6px; background: #fef9c3; border: 1px solid #fde68a; color: #713f12 !important; font-weight: 600; text-decoration: none; }
.dpm-tgi-gd-the-lai:hover { background: #fde68a; }

/* 1.18.18: tiền thiết kế trong báo giá in */
.dpm-tgi .dpm-tgi-kq-tk b { font-size: 17px; }
.dpm-tgi .dpm-tgi-kq-tk b span { font-size: inherit; color: inherit; margin: 0; }
.dpm-tgi .dpm-tgi-kq-tk s { color: #9ca3af; font-weight: 400; font-size: 14px; }
.dpm-tgi .dpm-tgi-kq-tk-mien b { color: #15803d; }
.dpm-tgi .dpm-tgi-kq-tk small { display: block; font-size: 12px; color: #6b7280; }
.dpm-tgi .dpm-tgi-kq-tong-ca { border-top: 1px dashed #d1d5db; padding-top: 4px; margin-top: 2px; }

/* 1.18.19: ô Thiết kế ở cột phải trang Tính giá nhanh (nhân viên) */
.dpm-tgi-tk-nv { margin: 0 0 10px; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; }
.dpm-tgi-tk-nv-ten { margin: 0 0 6px; font-weight: 700; font-size: 14px; }
.dpm-tgi-tk-nv .dpm-tgi-hang { flex-wrap: wrap; gap: 6px 8px; }
.dpm-tgi-tk-nv .dpm-tgi-o { min-width: 0; flex: 1 1 120px; }
.dpm-tgi-tk-nv .dpm-tgi-o select { width: 100%; }
.dpm-tgi-tk-nv-kq { margin-top: 8px; padding-top: 6px; border-top: 1px dashed #d1d5db; font-size: 13px; }
.dpm-tgi-tk-nv-kq.dang { opacity: .55; }
.dpm-tgi-tk-nv-dong { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.dpm-tgi-tk-nv-dong b { white-space: nowrap; font-size: 15px; }
.dpm-tgi-tk-nv-dong s { color: #9ca3af; font-weight: 400; font-size: 13px; }
.dpm-tgi-tk-nv-dong.mien b { color: #15803d; }
.dpm-tgi-tk-nv-kq small { display: block; margin: 2px 0 4px; color: #6b7280; font-size: 12px; }
.dpm-tgi-tk-nv-tong { margin-top: 4px; }
.dpm-tgi-tk-nv-tong b { font-size: 16px; color: #0f172a; }

/* 1.18.21: bảng lỗ lãi theo từng cách in (thẻ In offset / In kỹ thuật số) */
.dpm-tgi-sp .dpm-tgi-pt-tab { margin: 10px 0 8px; }
.dpm-tgi-ln-cd { margin: 6px 0 8px; padding: 8px 12px; border: 1px dashed #94a3b8; border-radius: 8px; background: #f8fafc; font-size: 13.5px; line-height: 1.6; }
.dpm-tgi-ln-cd small { color: #64748b; }
.dpm-tgi .dpm-tgi-bang-ln { font-size: 13.5px; }
.dpm-tgi .dpm-tgi-bang-ln th, .dpm-tgi .dpm-tgi-bang-ln td { white-space: nowrap; }
.dpm-tgi .dpm-tgi-bang-ln th small { display: block; font-weight: 400; font-size: 11px; opacity: .85; }
.dpm-tgi .dpm-tgi-bang-ln th.dpm-tgi-ln-nhom { border-left: 2px solid rgba(255,255,255,.6); }
.dpm-tgi .dpm-tgi-bang-ln td:first-child, .dpm-tgi .dpm-tgi-bang-ln thead tr:first-child th:first-child { position: sticky; left: 0; z-index: 1; }
.dpm-tgi .dpm-tgi-bang-ln td:first-child { background: #fff; font-weight: 600; }
.dpm-tgi .dpm-tgi-bang-ln td.dpm-tgi-ln-cp { color: #475569; }
.dpm-tgi .dpm-tgi-bang-ln td.dpm-tgi-ln-lt { color: #166534; }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-lo td { background: #fecaca !important; color: #7f1d1d; font-weight: 700; }
.dpm-tgi .dpm-tgi-bg tr.dpm-tgi-dong-lo td:first-child { color: #b91c1c; box-shadow: inset 4px 0 0 #dc2626; }
/* 1.18.21: Lũy tiến đang áp cho bài này (mục 4, cách "Theo dịch vụ") */
.dpm-tgi-lt-ap { margin: 8px 0 4px; padding: 8px 10px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; font-size: 13px; }
.dpm-tgi-lt-ap[hidden] { display: none; }
/* 1.18.22: khung "Lãi của bài" rộng hết hàng; mỗi dòng có ✎; dòng cuối chọn Lũy tiến bổ sung */
.dpm-tgi-sp [data-vung="v5"] .dpm-tgi-nhom-cach { grid-column: 1 / -1; }
.dpm-tgi-sp [data-vung="v5"] .dpm-tgi-nhom-cach > select[data-s="cl_cach"], .dpm-tgi-sp [data-vung="v5"] .dpm-tgi-nhom-cach .dpm-tgi-o { max-width: 420px; }
.dpm-tgi .dpm-tgi-lt-ap-bang { margin: 6px 0; width: 100%; table-layout: auto; }
.dpm-tgi .dpm-tgi-lt-ap-bang td { padding: 5px 10px; text-align: left; white-space: normal; vertical-align: middle; }
.dpm-tgi .dpm-tgi-lt-ap-bang td:first-child { color: #475569; width: 42%; }
.dpm-tgi .dpm-tgi-lt-ap-bang td:first-child small { display: block; font-size: 11.5px; color: #64748b; }
.dpm-tgi .dpm-tgi-lt-ap-bang td.c-sua { width: 1%; white-space: nowrap; text-align: center; }
.dpm-tgi .dpm-tgi-lt-ap-bang td.c-sua .dpm-tgi-lg-sua { margin: 0; text-decoration: none; }
.dpm-tgi .dpm-tgi-lt-ap-bang tr.dpm-tgi-lt-ap-bs td { background: #fffbeb !important; border-top: 2px solid #f59e0b; }
.dpm-tgi .dpm-tgi-lt-ap-bang select[data-lt-ap-bs] { width: 100%; max-width: 420px; }
.dpm-tgi-lt-ap-bao { margin: 6px 0; padding: 6px 10px; border-radius: 6px; background: #ecfdf5; color: #065f46; font-size: 13px; }

/* 1.18.23: nút "H.dẫn xem" ở dòng tiêu đề bảng giá (cả hai thẻ) + khung bài viết hướng dẫn */
.dpm-tgi .dpm-tgi-dong-pp th .dpm-tgi-hd-xem { margin-left: 12px; padding: 3px 12px; border: 0; border-radius: 4px; background: #f1f5f9; color: #0f172a; font-size: 13px; font-weight: 700; line-height: 1.5; cursor: pointer; vertical-align: middle; }
.dpm-tgi .dpm-tgi-dong-pp th .dpm-tgi-hd-xem:hover { background: #fff; }
.dpm-tgi-hd-hop { width: min(1000px, 96vw); }
.dpm-tgi-hd-trang { width: 100%; height: min(78vh, 900px); background: #fff; }
.dpm-tgi-hd-trang iframe { width: 100%; height: 100%; border: 0; display: block; }
.dpm-tgi-hd-mo { margin: 6px 0 0; text-align: center; font-size: 13px; }
.dpm-tgi-hd-mo a { color: #fff; }
/* 1.18.23: dòng "Giá in KTS / = in Offset" hai dòng — số ở trên, "Sản phẩm" ở dưới */
.dpm-tgi .dpm-tgi-hang-hoa th, .dpm-tgi .dpm-tgi-hang-hoa td { line-height: 1.25; }
.dpm-tgi .dpm-tgi-hang-hoa td small, .dpm-tgi table.dpm-tgi-bg .dpm-tgi-hang-hoa td small { display: inline-block; font-size: 12px; font-style: italic; font-weight: 700; color: inherit !important; opacity: 1; }

/* 1.18.26: lãi (lũy tiến) sửa / đổi / tạo tại chỗ */
.dpm-tgi-nhan-lai[data-lai-cho] { cursor: pointer; border: 1px solid #f59e0b; }
.dpm-tgi-nhan-lai[data-lai-cho]::after { content: ' ✎'; font-weight: 400; }
.dpm-tgi-nhan-lai[data-lai-cho]:hover, .dpm-tgi-nhan-lai[data-lai-cho]:focus { background: #fde68a; outline: none; }
.dpm-tgi-nhan-lai-0[data-lai-cho] { border-color: #f87171; }
.dpm-tgi-nhan-lai-0[data-lai-cho]:hover, .dpm-tgi-nhan-lai-0[data-lai-cho]:focus { background: #fecaca; }
a.dpm-tgi-lai-cho-nut { display: inline-block; margin-left: 6px; padding: 0 8px; border: 1px solid #2271b1; border-radius: 4px; background: #f0f6fc; text-decoration: none; font-weight: 600; font-size: 12px; line-height: 20px; cursor: pointer; }
a.dpm-tgi-lai-cho-nut:hover, a.dpm-tgi-lai-cho-nut:focus { background: #2271b1; color: #fff; }
.dpm-tgi-lc-hop { position: absolute; z-index: 100050; background: #fff; border: 1px solid #c3c4c7; border-radius: 8px; box-shadow: 0 12px 36px rgba(0,0,0,.22); padding: 10px 14px 6px; font-size: 13px; line-height: 1.45; }
.dpm-tgi-lc-hop p { margin: 0 0 9px; }
.dpm-tgi-lc-hop small { color: #50575e; }
.dpm-tgi-lc-tren { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 14px; }
.dpm-tgi-lc-x { margin-left: auto; border: 0; background: none; font-size: 16px; cursor: pointer; color: #50575e; }
.dpm-tgi-lc-chua { color: #991b1b; }
.dpm-tgi-lc-doi label { display: block; margin-bottom: 4px; font-weight: 600; }
.dpm-tgi-lc-doi select { display: block; width: 100%; max-width: none; margin: 3px 0 6px; font-weight: 400; }
.dpm-tgi-lc-cuoi { border-top: 1px solid #f0f0f1; padding-top: 6px; }
#dpm-tgi-lc-bao { position: fixed; right: 20px; bottom: 20px; z-index: 100200; max-width: 460px; padding: 10px 14px; margin: 0; font-weight: 600; box-shadow: 0 6px 20px rgba(0,0,0,.18); }
/* trang Giấy: ô Lũy tiến chọn tại chỗ */
.dpm-tgi-ltg-cum { display: inline-flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.dpm-tgi-ltg-cum select { max-width: 210px; }
.dpm-tgi-ltg-nut { min-height: 26px; height: 26px; padding: 0 7px; line-height: 24px; }
.dpm-tgi-cl-nut { display: inline-flex; gap: 4px; margin-left: 4px; vertical-align: middle; }
.dpm-tgi-cl-nut button { font-size: 11px !important; min-height: 22px !important; height: 22px !important; line-height: 20px !important; padding: 0 6px !important; }
.dpm-tgi-ltg-sang { box-shadow: 0 0 0 3px #f59e0b !important; }
