/* v0.23.0: Quản lý tiêu đề bảng */
#dialog:has(#th-form){width:min(1000px,calc(100vw - 32px));max-width:none}
.th-form fieldset{border:0;padding:0;margin:0;min-width:0}
.th-top{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1.2fr) auto;gap:12px;align-items:end}
.th-top label{display:grid;gap:4px;font-weight:600}
.th-top .th-active{display:flex;align-items:center;gap:6px;padding-bottom:9px;font-weight:500}
.th-used{display:flex;gap:8px;align-items:flex-start;margin-top:12px;padding:8px 10px;border-radius:8px;background:color-mix(in srgb,var(--brand,#1f5fbf) 8%,#fff);color:#344054;font-size:13px}
.th-used .solid-icon{flex:0 0 auto;width:16px;height:16px;margin-top:2px;color:var(--brand,#1f5fbf)}
.th-form h3{margin:18px 0 8px;font-size:15px}
.th-preview{overflow-x:auto;padding:8px;border:1px solid #d0d5dd;border-radius:8px;background:#fff}
.th-table{width:100%;min-width:680px;border-collapse:collapse;table-layout:fixed;font-family:'Times New Roman',Times,serif;font-size:13px}
.th-table th{padding:6px 4px;border:1px solid #000;background:#B4C6E7;color:#000;font-weight:700;text-align:center;vertical-align:middle;word-break:break-word}
.th-table td{padding:6px 4px;border:1px solid #000;color:#344054;font-size:12px;word-break:break-word;vertical-align:top}
.th-table .thc-price,.th-table .thc-total,.th-table .thc-length,.th-table .thc-width,.th-table .thc-height{text-align:right}
.th-table .thc-stt,.th-table .thc-unit,.th-table .thc-quantity,.th-table .thc-image{text-align:center}
.th-head-row,.th-col{display:grid;grid-template-columns:28px minmax(0,1.2fr) minmax(0,1.3fr) 88px 116px;gap:8px;align-items:center}
.th-head-row{padding:0 7px 4px;color:#475467;font-size:12px;font-weight:600}
.th-cols{display:grid;gap:6px}
.th-col{padding:6px;border:1px solid #e4e7ec;border-radius:8px;background:#fff}
.th-col:hover,.th-col:focus-within{border-color:color-mix(in srgb,var(--brand,#1f5fbf) 50%,#e4e7ec)}
.th-col input[type=text],.th-col select{width:100%;min-width:0}
.th-width{display:flex;align-items:center;gap:4px;color:#475467}
.th-width input{width:66px}
.th-actions{display:flex;gap:4px;align-items:center;justify-content:flex-end}
.th-actions .th-up .solid-icon{transform:rotate(180deg)}
.th-req{padding:2px 8px;border-radius:999px;background:#f2f4f7;color:#475467;font-size:12px;white-space:nowrap}
.th-tools{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.th-note{min-height:18px;margin:6px 0 0;color:#b54708;font-size:13px}
.lb-header-set{display:grid;gap:8px;margin-bottom:12px;padding-bottom:12px;border-bottom:1px solid #e4e7ec}
.lb-header-linked-note{display:flex;gap:8px;align-items:flex-start;color:#344054;font-size:13px}
.lb-header-linked-note .solid-icon{flex:0 0 auto;width:16px;height:16px;margin-top:2px;color:var(--brand,#1f5fbf)}
.lb-header-actions{display:flex;flex-wrap:wrap;gap:8px}
.lb-header-actions:empty{display:none}
.lb-header-linked #lb-columns{opacity:.62}
@media (max-width:700px){
 .th-top{grid-template-columns:1fr}
 .th-head-row{display:none}
 .th-col{grid-template-columns:28px minmax(0,1fr)}
 .th-col select,.th-width,.th-actions{grid-column:2}
 .th-actions{justify-content:flex-start}
}
/* Printing from the browser: the table header repeats at the top of every page, rows are not cut in half. */
@media print{
 .quote-paper table thead{display:table-header-group}
 .quote-paper table tfoot{display:table-footer-group}
 .quote-paper table tr{break-inside:avoid;page-break-inside:avoid}
}
