/*
 * BTGV gọn như Excel (#438, mockup bản 36, anh Hiệp chốt 2026-10-24).
 * Phần đầu chép từ CSS của mockup (tiền tố mk- đổi thành bs-); phần cuối chặn CSS cũ của bảng BTGV
 * (.costing-layout, .costing-table-bar) để bảng thật hiện giống mockup.
 */
.bs-root[hidden],#btgvSolBar[hidden],#btgvModeSeg[hidden],.bs-pophost:empty{display:none!important}
.btgv-area-title{display:flex;align-items:center;justify-content:space-between;gap:12px}
.bs-modeseg{display:inline-flex;height:40px;padding:3px;border:1px solid var(--bms-border,#e0e0e0);border-radius:999px;background:var(--bms-canvas,#f0f0f0);gap:2px}
.bs-modeseg button{height:32px;padding:0 16px;border:0;border-radius:999px;background:transparent;color:var(--bms-neutral,#626262);font:600 13px Roboto,sans-serif;cursor:pointer}
.bs-modeseg button[aria-pressed="true"]{background:#fff;color:var(--bms-primary,#4080ff);box-shadow:0 1px 3px rgba(0,0,0,.15)}
.bs-solbar{display:flex;align-items:center;gap:8px;flex:1 1 auto;min-width:0;max-width:640px;margin-left:auto;margin-right:10px;height:48px;padding:0 6px 0 18px;border:1px solid var(--bms-border,#e0e0e0);border-radius:999px;background:#fff;font:13px Roboto,sans-serif}
.bs-solbar label{flex:none;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--bms-neutral,#626262)}
.bs-solbar input{flex:1 1 auto;min-width:0;height:40px!important;min-height:0!important;padding:0 8px!important;border:0!important;background:transparent!important;box-shadow:none!important;font:14px Roboto,sans-serif!important;color:#101010}
.bs-solbar input:focus{outline:none}.bs-solbar:focus-within{border-color:var(--bms-primary,#4080ff);box-shadow:0 0 0 3px var(--bms-primary-soft,#edf4ff)}
.bs-sol-chat{position:relative;flex:none;width:36px;height:36px;border:0;border-radius:50%;background:var(--bms-canvas,#f0f0f0);color:#3b3b3b;cursor:pointer;display:grid;place-items:center}
.bs-sol-chat svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linejoin:round}
.bs-sol-chat i{position:absolute;top:-5px;right:-5px;min-width:18px;height:18px;padding:0 5px;border-radius:999px;background:var(--bms-primary,#4080ff);color:#fff;font:700 10.5px/18px Roboto,sans-serif;font-style:normal;box-shadow:0 0 0 2px #fff}
.bs-lbl{font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--bms-neutral,#626262)}
.bs-root{position:relative;display:grid;gap:12px;margin-top:8px;font-family:Roboto,sans-serif;color:#101010}
:is(.bs-root,.bs-pophost) .c-num,.bs-sumpop .c-num{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
:is(.bs-root,.bs-pophost) .c-pct{text-align:right;font-variant-numeric:tabular-nums;color:var(--bms-neutral,#626262);white-space:nowrap}
.g-vt{--g:#4080ff}.g-nc{--g:#e08a00}.g-cp{--g:#348b82}
.bs-dot{display:inline-block;width:9px;height:9px;border-radius:3px;background:var(--g);margin-right:8px;vertical-align:1px}
/* Bảng hạng mục gọn */
.bs-items-wrap{border:1px solid var(--bms-border,#e0e0e0);border-radius:12px;overflow:hidden;background:#fff}
.bs-items,.bs-cv{width:100%;border-collapse:collapse;font-size:13px}
.bs-items th,.bs-cv th{height:34px;padding:0 12px;background:#f7f8fa;border-bottom:1px solid var(--bms-border,#e0e0e0);font-size:11px;font-weight:700;letter-spacing:.03em;text-transform:uppercase;color:var(--bms-neutral,#626262);text-align:left}
.bs-items th.c-num,.bs-cv th.c-num,.bs-cv th.c-pct{text-align:right}
.bs-items td{height:44px;padding:0 12px;border-bottom:1px solid #eef0f3}
.bs-items tbody tr{cursor:pointer}.bs-items tbody tr:hover{background:#f7faff}
.bs-items tr.selected{background:var(--bms-primary-soft,#edf4ff)}
.bs-items tr.selected td:first-child{box-shadow:inset 3px 0 0 var(--bms-primary,#4080ff)}
.bs-items .product-pick{display:inline-block;width:14px;height:14px;border:2px solid #b5bcc6;border-radius:50%;margin-right:10px;vertical-align:-2px}
.bs-items tr.selected .product-pick{border:4px solid var(--bms-primary,#4080ff)}
.bs-items tfoot td,.bs-cv tfoot td{height:38px;padding:0 12px;background:#f7f8fa;font-weight:600}
.bs-qm{height:32px}.bs-qm button{height:26px!important;font-size:12px!important;padding:0 10px!important}
.bs-howchip{display:inline-flex;align-items:center;height:24px;padding:0 10px;border-radius:999px;font-size:12px;font-weight:600;white-space:nowrap}
.bs-howchip.h-ref{background:#e6f5f3;color:#23746c}.bs-howchip.h-dm{background:#f1ecfb;color:#6b4bb0}.bs-howchip.h-new{background:#f0f0f0;color:#4b4b4b}
/* Thanh hạng mục đang lập */
.bs-active{display:flex;align-items:center;gap:14px;flex-wrap:nowrap;min-width:0}
.bs-active-l{display:flex;align-items:baseline;gap:8px;min-width:0;flex:1 1 auto;overflow:hidden;white-space:nowrap}
.bs-active-l strong{font-size:15px;overflow:hidden;text-overflow:ellipsis}.bs-active-l small{color:var(--bms-neutral,#626262)}
.bs-how{display:inline-flex;height:48px;padding:4px;border:1px solid var(--bms-border,#e0e0e0);border-radius:999px;background:#fff;gap:2px;flex:none}
.bs-how button{display:inline-flex;align-items:center;gap:6px;height:38px;padding:0 14px;border:0;border-radius:999px;background:transparent;color:#3b3b3b;font:600 13px Roboto,sans-serif;cursor:pointer;white-space:nowrap}
.bs-how button svg,.bs-tb svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.bs-how button:hover{background:#f3f6fb}
.bs-how button[aria-pressed="true"]{background:var(--bms-primary,#4080ff);color:#fff}
.bs-tools{display:flex;gap:8px;flex:none}
.bs-tb{position:relative;display:inline-flex!important;align-items:center;gap:6px;height:48px!important;padding:0 16px!important;border-radius:999px!important;white-space:nowrap}
.bs-tb.is-empty{border-style:dashed!important}
.bs-badge{position:absolute;top:-7px;right:-7px;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:var(--bms-primary,#4080ff);color:#fff;font:700 11px/20px Roboto,sans-serif;font-style:normal;text-align:center;box-shadow:0 0 0 2px #fff}
/* KPI một hàng + thanh tỷ lệ */
.bs-kpis{display:grid;grid-template-columns:repeat(3,1fr) 1.35fr;border:1px solid var(--bms-border,#e0e0e0);border-radius:12px;background:#fff;overflow:hidden}
.bs-kpi{display:grid;gap:2px;padding:10px 16px;border-right:1px solid #eef0f3}
.bs-kpi:last-child{border-right:0}
.bs-kpi span{font-size:12px;color:var(--bms-neutral,#626262);font-weight:600}
.bs-kpi strong{font-size:18px;font-variant-numeric:tabular-nums}
.bs-kpi em{font-style:normal;font-size:12px;color:var(--bms-neutral,#626262)}
.bs-kpi.is-total{background:var(--bms-primary-soft,#edf4ff)}.bs-kpi.is-total strong{color:var(--bms-primary-active,#245dcc)}
.bs-stack{display:flex;height:6px;border-radius:999px;overflow:hidden;background:#eef0f3;margin-top:-6px}
.bs-stack i{display:block;background:var(--g)}
/* Bảng dạng Excel */
.bs-sheet-wrap{border:1px solid #cfd5dd;border-radius:10px;overflow:auto;background:#fff;max-height:none}
.bs-sheet{width:100%;border-collapse:collapse;table-layout:fixed;font-size:13px}
.bs-sheet th{position:sticky;top:0;z-index:1;height:30px;padding:0 8px;background:#f3f5f8;border-bottom:1px solid #cfd5dd;border-right:1px solid #e3e7ec;font-size:11px;font-weight:700;letter-spacing:.02em;text-transform:uppercase;color:#5b6470;text-align:left;white-space:nowrap}
.bs-sheet th.c-num,.bs-sheet th.c-pct{text-align:right}
.bs-sheet td{height:32px;padding:0;border-bottom:1px solid #e8ebef;border-right:1px solid #eef0f3;vertical-align:middle}
.bs-sheet td.c-no{padding:0 6px;text-align:center;color:#9aa3ae;font-size:11.5px;background:#fafbfc}
.bs-sheet td.c-code{padding:0 6px}
.bs-sheet td.c-amt,.bs-sheet td.c-pct{padding:0 8px}
.bs-sheet td.c-src{padding:0 6px}
.bs-cell{width:100%;height:31px;padding:0 8px;border:0;background:transparent;font:13px Roboto,sans-serif;color:#101010;box-sizing:border-box;border-radius:0}
.bs-cell.num{text-align:right;font-variant-numeric:tabular-nums}
.bs-cell:hover{background:#f7faff}
.bs-cell:focus{outline:2px solid var(--bms-primary,#4080ff);outline-offset:-2px;background:#fff}
.bs-cell::placeholder{color:#c08a1f;font-style:italic}
.bs-sheet tr.is-noprice td.c-price{background:#fff8e6}
.bs-sheet tr.is-flash td{animation:bsflash .9s}
@keyframes bsflash{from{background:#fff3c4}to{background:transparent}}
.bs-ro{display:block;padding:0 8px;color:#626262}
.bs-pctin{display:flex;align-items:center;gap:2px;padding-right:6px;color:#626262;font-size:12px;white-space:nowrap}
.bs-pctin .bs-cell{width:44px;padding:0 4px}
.bs-dash{color:#b5bcc6;padding-left:4px}
.bs-sheet .cost-component-code{font-size:11px}
.bs-refcell{display:flex;align-items:center;gap:4px;padding-right:6px;min-width:0}
.bs-refcell .bs-cell{flex:1 1 auto;min-width:40px}
.bs-tag{flex:none;height:20px;padding:0 7px;border-radius:999px;font-size:11px;font-weight:600;line-height:20px;white-space:nowrap}
.bs-tag.t-kho{background:#e8f6ee;color:#1f7a45}.bs-tag.t-buy{background:#fff1e0;color:#b25e00}
.bs-src{display:inline-flex;align-items:center;max-width:100%;height:22px;padding:0 8px;border-radius:6px;font-size:11.5px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:help}
.bs-src.s-kho{background:#edf4ff;color:#245dcc}.bs-src.s-ok{background:#e8f6ee;color:#1f7a45}.bs-src.s-tay{background:#f0f0f0;color:#4b4b4b}
.bs-src.s-dm{background:#f1ecfb;color:#6b4bb0}.bs-src.s-ref{background:#e6f5f3;color:#23746c}.bs-src.s-pct{background:#fdf3e1;color:#9a6200}.bs-src.s-none{background:#fff0f0;color:#c62f2f}
.c-more{text-align:center}
.bs-more{width:28px;height:26px;border:0;border-radius:6px;background:transparent;color:#7a838e;cursor:pointer;vertical-align:middle}
.bs-more svg{width:16px;height:16px;fill:currentColor}.bs-more:hover{background:#eef2f7;color:#101010}
.bs-sheet .c-more,.bs-sheet th:last-child{border-right:0}
.bs-grp td{height:34px;background:#f7f8fa;border-top:1px solid #cfd5dd;border-bottom:1px solid #dfe3e8;font-weight:700}
.bs-grp td:first-child{box-shadow:inset 3px 0 0 var(--g)}
.bs-grp .c-num{padding:0 8px}.bs-grp .c-pct{padding:0 8px;font-weight:700;color:var(--g)}
.bs-grp-btn{display:inline-flex;align-items:center;gap:2px;height:32px;padding:0 10px;border:0;background:transparent;font:700 13px Roboto,sans-serif;color:#101010;text-transform:uppercase;letter-spacing:.03em;cursor:pointer}
.bs-grp-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2;margin-right:4px;transition:transform .15s}
.bs-grp.is-collapsed .bs-grp-btn svg{transform:rotate(-90deg)}
.bs-grp-btn small{margin-left:8px;font-weight:500;text-transform:none;letter-spacing:0;color:#7a838e}
.bs-sub td{height:26px;padding:0 8px;font-size:11.5px;font-weight:700;color:#5b6470;background:#fcfcfd}
.bs-sub td.c-num{color:#5b6470}
.bs-add td{height:30px;border-bottom:1px solid #e8ebef}
.bs-add-btn{height:28px;padding:0 8px;border:0;background:transparent;color:var(--bms-primary,#4080ff);font:600 12.5px Roboto,sans-serif;cursor:pointer;border-radius:6px}
.bs-add-btn:hover{background:#edf4ff}
.bs-sheet tfoot td{height:38px;padding:0 8px;background:#eef3fb;border-top:2px solid #cfd5dd;font-size:13.5px}
.bs-quick-in{width:100%;height:44px;padding:0 16px;border:1px dashed #b9c3d0;border-radius:10px;background:#fff;font:14px Roboto,sans-serif;box-sizing:border-box}
.bs-quick-in:focus{outline:2px solid var(--bms-primary,#4080ff);outline-offset:-1px;border-color:transparent}
/* Popover / menu */
.bs-scrim{position:fixed;inset:0;z-index:40;background:rgba(16,16,16,.18)}
.bs-pop{position:absolute;z-index:41;top:96px;left:50%;transform:translateX(-50%);width:min(560px,94%);display:grid;gap:12px;padding:16px 18px;border-radius:14px;background:#fff;box-shadow:0 18px 50px rgba(0,0,0,.22);font-size:13.5px}
.bs-pop header{display:flex;align-items:center;justify-content:space-between}
.bs-pop h3{margin:0;font-size:15px}
.bs-pop p{margin:0}.bs-pop-note{color:#626262;font-size:12.5px}
.bs-x{width:32px;height:32px;border:0;border-radius:8px;background:transparent;font-size:20px;cursor:pointer;color:#626262}.bs-x:hover{background:#f0f0f0}
.bs-pop footer{display:flex;justify-content:space-between;align-items:center;gap:8px}
.bs-pop footer .btn{height:40px;padding:0 18px;border-radius:999px}
.bs-mode{height:40px}
.bs-reflist{list-style:none;margin:0;padding:0;display:grid;gap:8px;max-height:300px;overflow:auto}
.bs-ref-h{padding:4px 2px;font-size:12.5px;color:#626262}.bs-ref-h strong{color:#101010}
.bs-ref-it{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;height:40px;padding:0 12px;border:1px solid #e0e0e0;border-radius:10px;cursor:pointer}
.bs-ref-it:has(input:checked){border-color:var(--bms-primary,#4080ff);background:#f5f9ff}
.bs-ref-it b{font-variant-numeric:tabular-nums;font-weight:600}
.bs-dmlist{list-style:none;margin:0;padding:0;display:grid;gap:8px}
.bs-dm{display:grid;gap:2px;width:100%;padding:12px 14px;border:1px solid #e0e0e0;border-radius:10px;background:#fff;text-align:left;font:13.5px Roboto,sans-serif;cursor:pointer}
.bs-dm span{color:#626262;font-size:12.5px}.bs-dm:hover{border-color:var(--bms-primary,#4080ff)}.bs-dm.is-off{opacity:.55;cursor:not-allowed}
.bs-menu{position:absolute;z-index:41;width:220px;padding:6px;border-radius:12px;background:#fff;box-shadow:0 12px 36px rgba(0,0,0,.2);display:grid}
.bs-menu-h{margin:6px 8px 2px;font-size:11px;font-weight:700;text-transform:uppercase;color:#7a838e}
.bs-menu button{height:32px;padding:0 10px 0 28px;border:0;border-radius:8px;background:transparent;text-align:left;font:13px Roboto,sans-serif;cursor:pointer;position:relative}
.bs-menu button:hover{background:#f3f6fb}
.bs-menu button[aria-checked="true"]::before{content:"✓";position:absolute;left:10px;color:var(--bms-primary,#4080ff);font-weight:700}
.bs-menu hr{border:0;border-top:1px solid #eee;margin:4px 0}.bs-menu .is-danger{color:#d63b3b}
/* Xem gọn */
.bs-cv{background:#fff;border:1px solid var(--bms-border,#e0e0e0);border-radius:12px;overflow:hidden;border-collapse:separate;border-spacing:0}
.bs-cv td{height:48px;padding:6px 12px;border-bottom:1px solid #eef0f3;font-variant-numeric:tabular-nums}
.bs-cv td small{display:block;color:#7a838e;font-size:11.5px}
.bs-cv-row{cursor:pointer}.bs-cv-row:hover{background:#f7faff}
.bs-caret svg{width:16px;height:16px;fill:none;stroke:#7a838e;stroke-width:2;vertical-align:-3px;margin-right:6px;transform:rotate(-90deg);transition:transform .15s}
.bs-cv-row.is-open .bs-caret svg{transform:none}
.bs-cv-det td{padding:4px 16px 14px 40px;background:#fbfcfd}
.bs-det{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.bs-det h4{display:flex;align-items:center;margin:6px 0;font-size:12.5px;text-transform:uppercase;letter-spacing:.03em}
.bs-det h4 span{margin-left:auto;font-variant-numeric:tabular-nums}
.bs-det ul{list-style:none;margin:0;padding:0;display:grid}
.bs-det li{display:grid;grid-template-columns:1fr auto;column-gap:10px;padding:5px 0;border-bottom:1px dashed #e6e9ee;font-size:12.5px}
.bs-det li em{grid-column:1;font-style:normal;color:#7a838e;font-size:11.5px}
.bs-det li b{grid-column:2;grid-row:1/3;align-self:center;font-weight:600}
.bs-cv-note{margin:0;color:#626262;font-size:12.5px}
/* Chặn CSS chung của BMS (input, td, th) để ô giống Excel */
:is(.bs-root,.bs-pophost) .bs-sheet td,:is(.bs-root,.bs-pophost) .bs-sheet th,:is(.bs-root,.bs-pophost) .bs-items td,:is(.bs-root,.bs-pophost) .bs-items th,:is(.bs-root,.bs-pophost) .bs-cv td,:is(.bs-root,.bs-pophost) .bs-cv th{min-height:0!important;line-height:1.3!important;vertical-align:middle!important}
:is(.bs-root,.bs-pophost) .bs-sheet td{padding:0!important;height:32px!important}
:is(.bs-root,.bs-pophost) .bs-sheet td.c-no,:is(.bs-root,.bs-pophost) .bs-sheet td.c-code,:is(.bs-root,.bs-pophost) .bs-sheet td.c-src{padding:0 6px!important}
:is(.bs-root,.bs-pophost) .bs-sheet td.c-amt,:is(.bs-root,.bs-pophost) .bs-sheet td.c-pct,:is(.bs-root,.bs-pophost) .bs-grp td.c-num,:is(.bs-root,.bs-pophost) .bs-sub td,:is(.bs-root,.bs-pophost) .bs-sheet tfoot td{padding:0 8px!important}
:is(.bs-root,.bs-pophost) .bs-sheet tr.bs-grp td{height:34px!important}:is(.bs-root,.bs-pophost) .bs-sheet tr.bs-sub td{height:26px!important}:is(.bs-root,.bs-pophost) .bs-sheet tr.bs-add td{height:30px!important}
:is(.bs-root,.bs-pophost) .bs-sheet tr.bs-grp td:first-child,:is(.bs-root,.bs-pophost) .bs-sheet tr.bs-add td:first-child{padding:0!important}
:is(.bs-root,.bs-pophost) input.bs-cell{height:31px!important;min-height:0!important;padding:0 8px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;font:13px Roboto,sans-serif!important;width:100%!important;margin:0!important}
:is(.bs-root,.bs-pophost) input.bs-cell:hover{background:#f7faff!important}
:is(.bs-root,.bs-pophost) input.bs-cell:focus{outline:2px solid var(--bms-primary,#4080ff)!important;outline-offset:-2px!important;background:#fff!important}
:is(.bs-root,.bs-pophost) .bs-pctin input.bs-cell{width:44px!important;padding:0 4px!important}
:is(.bs-root,.bs-pophost) .bs-items td{height:44px!important;padding:0 12px!important}
:is(.bs-root,.bs-pophost) .bs-cv td{padding:6px 12px!important}
:is(.bs-root,.bs-pophost) .bs-cv-det td{padding:4px 16px 14px 40px!important}
:is(.bs-root,.bs-pophost) .bs-items tfoot td,:is(.bs-root,.bs-pophost) .bs-cv tfoot td{padding:0 12px!important;height:38px!important}
:is(.bs-root,.bs-pophost) .bs-items th,:is(.bs-root,.bs-pophost) .bs-cv th{padding:0 12px!important;height:34px!important}
:is(.bs-root,.bs-pophost) .bs-sheet th{padding:0 8px!important;height:30px!important}
:is(.bs-root,.bs-pophost) input.bs-quick-in{height:44px!important;padding:0 16px!important;border:1px dashed #b9c3d0!important;border-radius:10px!important}
.bs-stack{margin-top:-4px}
body.bs-new #completeSolutionCostBtn{height:48px!important;min-height:48px!important;border-radius:999px!important;padding:0 22px!important}
.bs-pickbtn{display:flex;align-items:center;gap:8px;height:48px;padding:0 14px 0 16px;border:1px solid var(--bms-border,#e0e0e0);border-radius:999px;background:#fff;font:13px Roboto,sans-serif;color:#101010;cursor:pointer;text-align:left;max-width:640px}
.bs-pickbtn:hover,.bs-pickbtn[aria-expanded="true"]{border-color:var(--bms-primary,#4080ff)}
.bs-pickbtn>svg{flex:none;width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2}
.bs-pick-n{flex:none;font-style:normal;font-size:11.5px;font-weight:700;color:var(--bms-primary,#4080ff);background:var(--bms-primary-soft,#edf4ff);padding:2px 8px;border-radius:999px}
.bs-active{position:relative}
.bs-picklist{position:absolute;z-index:41;top:56px;left:0;width:min(640px,100%);padding:6px;border-radius:14px;background:#fff;box-shadow:0 16px 44px rgba(0,0,0,.22);display:grid;gap:2px}
.bs-picklist button{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:12px;padding:10px 12px;border:0;border-radius:10px;background:transparent;text-align:left;font:13px Roboto,sans-serif;cursor:pointer}
.bs-picklist button:hover{background:#f3f6fb}.bs-picklist button[aria-selected="true"]{background:var(--bms-primary-soft,#edf4ff)}
.bs-picklist .product-pick{display:inline-block;width:14px;height:14px;border:2px solid #b5bcc6;border-radius:50%}
.bs-picklist button[aria-selected="true"] .product-pick{border:4px solid var(--bms-primary,#4080ff)}
.bs-pl-main{display:grid;gap:3px;min-width:0}.bs-pl-main strong{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.bs-pl-main small{display:flex;align-items:center;gap:8px;color:#626262;font-size:12px}
.bs-picklist b{font-variant-numeric:tabular-nums}
.bs-pl-foot{display:flex;justify-content:space-between;padding:10px 12px 6px;border-top:1px solid #eee;margin-top:4px;font-weight:600;font-size:12.5px;color:#626262}.bs-pl-foot b{color:#101010}
.bs-tot-h{display:flex;align-items:center;justify-content:space-between;gap:8px}
.bs-kpi.is-total .bs-qm{height:28px}.bs-kpi.is-total .bs-qm button{height:22px!important;font-size:11.5px!important;padding:0 8px!important}
.bs-solbar{position:relative}
.bs-solbar::after{content:"";flex:none;font-size:11.5px;color:var(--bms-neutral,#626262);white-space:nowrap}
.bs-solbar[data-state="saving"]::after{content:"Đang lưu…"}
.bs-solbar[data-state="saved"]::after{content:"✓ Đã lưu";color:#1f7a45}
.bs-sol-chat{order:3}.bs-sol-chat i[hidden]{display:none}
.bs-chat{position:absolute;z-index:60;top:56px;right:0;width:420px;display:grid;grid-template-rows:auto 1fr auto;max-height:440px;border-radius:14px;background:#fff;box-shadow:0 16px 44px rgba(0,0,0,.22);overflow:hidden}
.bs-chat[hidden]{display:none}
.bs-chat header{display:flex;align-items:center;gap:8px;padding:10px 10px 10px 16px;border-bottom:1px solid #eee}
.bs-chat header span{flex:1;color:#626262;font-size:12px}
.bs-chat ul{list-style:none;margin:0;padding:12px 16px;display:grid;gap:12px;overflow:auto;max-height:300px}
.bs-chat li{display:flex;gap:10px;align-items:flex-start}
.bs-chat li i{flex:none;width:30px;height:30px;border-radius:50%;background:#e7ecf3;color:#3b4a5e;display:grid;place-items:center;font:700 11px Roboto,sans-serif;font-style:normal}
.bs-chat li small{color:#7a838e;font-size:11.5px}.bs-chat li p{margin:2px 0 0;padding:8px 12px;border-radius:4px 12px 12px 12px;background:#f3f5f8;font-size:13px}
.bs-chat li.is-me{flex-direction:row-reverse;text-align:right}.bs-chat li.is-me p{background:var(--bms-primary-soft,#edf4ff);border-radius:12px 4px 12px 12px;text-align:left}
.bs-chat form{display:flex;gap:8px;padding:10px 12px;border-top:1px solid #eee}
.bs-chat form input{flex:1;height:40px!important;min-height:0!important;padding:0 14px!important;border:1px solid #dce3ef!important;border-radius:999px!important;font:13.5px Roboto,sans-serif!important}
.bs-chat form .btn{height:40px;padding:0 18px;border-radius:999px}
.bs-sumbtn{gap:8px!important}.bs-sumbtn>span:first-child{font-weight:700;color:var(--bms-primary,#4080ff)}
.bs-sumbtn strong{color:var(--bms-primary,#4080ff);font-variant-numeric:tabular-nums}
.bs-sumbtn[aria-expanded="true"]{border-color:var(--bms-primary,#4080ff)!important}
.bs-sumpop{position:absolute;z-index:41;top:56px;right:0;width:400px;display:grid;gap:12px;padding:14px 16px 12px;border-radius:14px;background:#fff;box-shadow:0 16px 44px rgba(0,0,0,.22);font-size:13px}
.bs-sumpop header{display:flex;justify-content:space-between;align-items:flex-start}
.bs-sumpop h3{margin:0;font-size:15px}.bs-sumpop header p{margin:2px 0 0;color:#626262;font-size:12.5px}
.bs-sum-mode{display:flex;align-items:center;gap:10px}.bs-sum-mode small{color:#626262;font-size:12px}
.bs-sum-head,.bs-sumlist li{display:grid;grid-template-columns:1fr 54px 104px 110px;align-items:center;column-gap:8px}
.bs-sumlist.is-once li,.bs-sumpop:has(.is-once) .bs-sum-head{grid-template-columns:1fr 54px 120px}
.bs-sum-head{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.03em;color:#7a838e;padding:0 2px}
.bs-sum-head span:not(:first-child){text-align:right}
.bs-sumlist{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.bs-sumlist li{row-gap:5px;padding:0 2px}
.bs-sumlist em{font-style:normal;text-align:right;color:var(--g);font-weight:700;font-variant-numeric:tabular-nums}
.bs-sumlist strong,.bs-sumlist small{text-align:right;font-variant-numeric:tabular-nums}.bs-sumlist small{font-size:13px;color:#101010;font-weight:600}
.bs-sumbar{grid-column:1/-1;display:block;height:5px;border-radius:9px;background:#eef0f3;overflow:hidden}.bs-sumbar i{display:block;height:100%;background:var(--g)}
.bs-sum-total{display:flex;justify-content:space-between;align-items:baseline;padding:10px 12px;border-radius:10px;background:var(--bms-primary-soft,#edf4ff);font-weight:600}
.bs-sum-total strong{font-size:18px;color:var(--bms-primary-active,#245dcc);font-variant-numeric:tabular-nums}
.bs-sum-proj{display:flex;justify-content:space-between;color:#626262;font-size:12.5px;padding:0 2px}.bs-sum-proj b{color:#101010}
.bs-tools{flex-wrap:nowrap}
.bs-sumpop{width:460px}.bs-sumlist li>span{white-space:nowrap}
.bs-solbar label{max-width:230px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-transform:none!important;letter-spacing:0!important;font-size:12.5px!important;color:var(--bms-primary-active,#245dcc)!important}
.bs-sol-count{order:3;flex:none;display:inline-flex;align-items:center;gap:4px;height:36px;padding:0 10px 0 12px;border:0;border-radius:999px;background:#fff4e0;color:#9a5a00;font:600 12px Roboto,sans-serif;cursor:pointer;white-space:nowrap}
.bs-sol-count.is-full{background:#e8f6ee;color:#1f7a45}
.bs-sol-count svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2}
.bs-qa{grid-template-rows:auto auto auto!important}
.bs-qa ol{list-style:none;margin:0;padding:10px 14px;display:grid;gap:10px}
.bs-qa li{display:grid;gap:4px}
.bs-qa li label{font-size:12.5px;font-weight:600;color:#3b3b3b}
.bs-qa li.is-done label::after{content:" ✓";color:#1f7a45}
.bs-qa li.is-cur label{color:var(--bms-primary-active,#245dcc)}
.bs-qa li input{height:38px!important;min-height:0!important;padding:0 12px!important;border:1px solid #dce3ef!important;border-radius:10px!important;font:13.5px Roboto,sans-serif!important;background:#fff!important}
.bs-qa li input:focus{outline:2px solid var(--bms-primary,#4080ff)!important;outline-offset:-1px;border-color:transparent!important}
.bs-qa-note{margin:0;padding:8px 16px 12px;color:#7a838e;font-size:12px;border-top:1px solid #eee}
:is(.bs-root,.bs-pophost) .bs-sheet tfoot tr.bs-quick-row td{height:34px!important;padding:0!important;background:#fff;border-top:1px dashed #b9c3d0;font-size:13px}
:is(.bs-root,.bs-pophost) .bs-sheet tfoot tr.bs-quick-row td.c-no{color:var(--bms-primary,#4080ff);font-weight:700;padding:0 6px!important;background:#fafbfc}
:is(.bs-root,.bs-pophost) .bs-sheet tfoot input.bs-quick-in{height:33px!important;border:0!important;border-radius:0!important;padding:0 8px!important;font-style:normal}
:is(.bs-root,.bs-pophost) .bs-sheet tfoot input.bs-quick-in::placeholder{color:#8a94a0;font-style:normal}
:is(.bs-root,.bs-pophost) .bs-sheet tfoot tr.bs-total-row td{border-top:2px solid #cfd5dd}
.bs-tb.bs-ico{width:48px!important;padding:0!important;justify-content:center}.bs-tb.bs-ico svg{width:18px;height:18px}
/* Thanh thao tác liền với bảng */
.bs-sheetbox{position:relative;border:1px solid #cfd5dd;border-radius:12px;background:#fff;overflow:visible}
.bs-sheetbox .bs-active{gap:10px;padding:8px 10px;background:#f3f5f8;border-bottom:1px solid #cfd5dd;border-radius:12px 12px 0 0}
.bs-sheetbox .bs-sheet-wrap{border:0;border-radius:0 0 12px 12px}
.bs-sheetbox .bs-sheet th{background:#f9fafb}
.bs-sheetbox .bs-pickbtn,.bs-sheetbox .bs-how,.bs-sheetbox .bs-tb{height:40px!important;background:#fff;border:1px solid #dce1e8!important;box-shadow:none!important}
.bs-sheetbox .bs-how{padding:3px}.bs-sheetbox .bs-how button{height:32px}
.bs-sheetbox .bs-tb.bs-ico{width:40px!important}
.bs-sheetbox .bs-pickbtn{padding:0 12px 0 14px}
.bs-pophost>.bs-picklist{top:52px;left:10px}
.bs-sheetbox>.bs-sumpop{top:52px;right:10px}
/* Cân đối thanh thao tác: trái = hạng mục; phải = cách lập | công cụ */
.bs-sheetbox .bs-active{justify-content:flex-start;gap:8px;padding:8px}
.bs-sheetbox .bs-pickbtn{flex:0 1 560px;min-width:240px;max-width:none}
.bs-sheetbox .bs-how{margin-left:auto}
.bs-sheetbox .bs-tools{gap:8px;padding-left:8px;margin-left:0;border-left:1px solid #dce1e8;height:40px;align-items:center}
.bs-sheetbox .bs-how button,.bs-sheetbox .bs-tb{font-size:13px}
.bs-sheetbox .bs-how button{padding:0 12px}
.bs-sheetbox .bs-tb{padding:0 14px!important}
.bs-sheetbox .bs-tb.bs-ico{padding:0!important;width:40px!important;min-width:40px}.bs-sheetbox .bs-tb.bs-ico svg{width:18px!important;height:18px!important;flex:none}
.bs-cv-bottom{display:grid;gap:0}.bs-cv-bottom .bs-stack{margin-top:-6px}
.bs-pl-add{display:grid;grid-template-columns:auto 1fr 70px 64px auto;gap:6px;align-items:center;margin-top:4px;padding:8px 6px 4px;border-top:1px solid #eee}
.bs-pl-plus{width:22px;text-align:center;color:var(--bms-primary,#4080ff);font-weight:700;font-size:16px}
.bs-pl-add input{height:36px!important;min-height:0!important;padding:0 10px!important;border:1px solid #dce3ef!important;border-radius:999px!important;font:13px Roboto,sans-serif!important;background:#fff!important;min-width:0}
.bs-pl-add input:focus{outline:2px solid var(--bms-primary,#4080ff)!important;outline-offset:-1px}
.bs-pl-add .btn{height:36px;padding:0 16px;border-radius:999px}
:is(.bs-root,.bs-pophost) .bs-cv tfoot tr.bs-cv-total td{height:auto!important;padding:10px 12px!important;background:#f3f6fb;font-weight:600}
.bs-cv-total td small{display:block;font-weight:500;color:#626262;font-size:11.5px}
.bs-cv-total td.c-num strong{font-size:15px}
.bs-cv-total td.bs-cv-all strong{font-size:18px;color:var(--bms-primary-active,#245dcc)}
:is(.bs-root,.bs-pophost) .bs-cv tfoot tr.bs-cv-bar td{height:auto!important;padding:0 12px 10px!important;background:#f3f6fb}
.bs-cv-bar .bs-stack{margin:0}
.bs-pop.bs-plate{width:min(760px,96%);top:40px;gap:10px}
.bs-plate header p{margin:2px 0 0;color:#626262;font-size:12.5px}
.bs-pt-label{font-size:12px;font-weight:700;color:#3b3b3b;margin-bottom:6px}.bs-pt-label small{font-weight:500;color:var(--bms-primary,#4080ff)}
.bs-pt-pills{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.bs-pt-pills button{display:grid;gap:0;justify-items:center;height:44px;border:1px solid #dce3ef;border-radius:10px;background:#fff;cursor:pointer;font:13px Roboto,sans-serif}
.bs-pt-pills button small{font-size:10.5px;color:#7a838e}
.bs-pt-pills button[aria-checked="true"]{border-color:var(--bms-primary,#4080ff);background:var(--bms-primary,#4080ff);color:#fff}.bs-pt-pills button[aria-checked="true"] small{color:#dbe7ff}
.bs-pt-row{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap}
.bs-pt-step{display:flex;align-items:center;gap:6px}
.bs-pt-step button{width:36px;height:36px;border:1px solid #dce3ef;border-radius:50%;background:#fff;font-size:18px;cursor:pointer}
.bs-pt-step input{width:72px;height:36px!important;min-height:0!important;padding:0 8px!important;border:1px solid #dce3ef!important;border-radius:999px!important;text-align:center;font:600 14px Roboto,sans-serif!important}
.bs-pt-step span{color:#626262;font-size:12.5px;margin-left:4px}
.bs-pt-tablewrap{max-height:280px;overflow:auto;border:1px solid #e3e7ec;border-radius:10px}
.bs-pt-table{width:100%;border-collapse:collapse;font-size:12.5px}
:is(.bs-root,.bs-pophost) .bs-pt-table th{position:sticky;top:0;background:#f3f5f8;height:30px!important;padding:0 10px!important;font-size:11px;text-transform:uppercase;color:#5b6470;text-align:left}
:is(.bs-root,.bs-pophost) .bs-pt-table th.c-num{text-align:right}
:is(.bs-root,.bs-pophost) .bs-pt-table td{height:30px!important;padding:0 10px!important;border-top:1px solid #eef0f3}
:is(.bs-root,.bs-pophost) .bs-pt-table tr.bs-pt-sub td{height:24px!important;background:#fafbfc;font-weight:700;color:#5b6470;font-size:11.5px}
.bs-pt-table .cost-component-code{font-size:10.5px;margin-left:4px}
.bs-pt-sum{font-weight:600}.bs-pt-sum em{font-style:normal;color:#c62f2f}
.bs-plate footer>div{display:flex;gap:8px}
:is(.bs-root,.bs-pophost) .bs-pt-step input{width:72px!important;flex:none!important}
.bs-pt-pills button.is-empty{border-style:dashed;color:#9aa3ad;background:#fafbfc}.bs-pt-pills button.is-empty small{color:#c0542b}
.bs-pt-pills button.is-empty[aria-checked="true"]{background:#fff4ec;border-color:#e8833a;color:#a6491a}
:is(.bs-root,.bs-pophost) .bs-pt-table td.bs-pt-empty{height:64px!important;text-align:center;color:#a6491a;background:#fff8f2}
.bs-solbar{align-self:center!important;height:48px!important;min-height:48px!important;box-sizing:border-box!important;margin-top:0!important;margin-bottom:0!important}
.bs-ask{margin:12px 0 0;padding:14px 16px;border:1px solid #f1d3b5;border-radius:12px;background:#fff8f0}
.bs-ask p{margin:0 0 12px;font:13.5px/1.5 Roboto,sans-serif;color:#3b3b3b}
.bs-ask-btns{display:flex;justify-content:flex-end;gap:8px}
.bs-ask{border:2px solid #e8833a!important;background:#fff6ee!important;box-shadow:0 0 0 4px rgba(232,131,58,.14)}.bs-ask p b{color:#a6491a}
.bs-pop.bs-done{position:fixed;top:50%;left:50%;transform:translate(-50%,-50%);width:min(1040px,94vw);max-height:88vh;overflow:auto;z-index:60}
.bs-scrim:has(+.bs-done){z-index:59;background:rgba(16,16,16,.32)}
.bs-done header p{margin:2px 0 0;font-size:12.5px;color:#626262}
.bs-done .bs-items{width:100%}
.bs-done-note{margin:0;font-size:12.5px;color:#626262}
.bs-done footer{display:flex;justify-content:flex-end;gap:8px}
.bs-done .product-pick{display:none!important}.bs-done .bs-items tr.selected td{background:transparent!important;box-shadow:none!important}.bs-done .bs-items tr.selected td:first-child{border-left-color:transparent!important}
.bs-solbar{max-width:780px!important;flex:1 1 780px!important}.bs-solbar label{max-width:300px!important}
.bs-pop.bs-refpop{width:min(720px,94%)}
.bs-kbtn{all:unset;cursor:pointer;display:inline-flex;align-items:center;min-height:24px;border-radius:6px}
.bs-kbtn:hover .cost-component-code,.bs-kbtn:focus-visible{outline:2px solid var(--bms-primary,#4080ff);outline-offset:1px}
.bs-kadd{font-size:11.5px;color:var(--bms-primary,#4080ff);font-weight:600;white-space:nowrap}
.bs-pop.bs-khopop{width:min(720px,94%)}
.bs-khopop header p{margin:2px 0 0;font-size:12.5px;color:#626262}
.bs-klist{list-style:none;margin:0;padding:0;max-height:330px;overflow:auto;border:1px solid #e6e9ef;border-radius:10px}
.bs-klist li+li{border-top:1px solid #eef0f4}.bs-klist li[hidden]{display:none}
.bs-klist button{all:unset;box-sizing:border-box;cursor:pointer;display:grid;grid-template-columns:96px 1fr 110px 150px;align-items:center;gap:10px;width:100%;padding:9px 12px;font-size:13px}
.bs-klist button:hover{background:#f5f8ff}.bs-klist button.is-cur{background:#edf4ff}
.bs-kname em.bs-ksug{font-style:normal;font-size:11px;color:#1f7a45;background:#e8f6ee;border-radius:999px;padding:1px 7px;margin-left:4px}
.bs-kstock{font-size:12px;color:#1f7a45}.bs-kstock.is-out{color:#c0542b}
.bs-kprice{text-align:right;font-weight:600}.bs-kprice small{display:block;font-weight:400;font-size:11px;color:#7a838e}
.bs-khopop footer{display:flex;justify-content:space-between;gap:8px}
.bs-ksugg{position:absolute;z-index:45;width:560px;max-width:90%;padding:6px;border:1px solid #dce3ef;border-radius:12px;background:#fff;box-shadow:0 14px 40px rgba(0,0,0,.18);font:13px Roboto,sans-serif}
.bs-ksugg-h{margin:2px 8px 6px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#7a838e}
.bs-ksugg button{all:unset;box-sizing:border-box;cursor:pointer;display:grid;grid-template-columns:92px 1fr 100px 80px;gap:8px;align-items:center;width:100%;padding:7px 8px;border-radius:8px}
.bs-ksugg button b{text-align:right}
.bs-ksugg button:hover,.bs-ksugg button.is-act{background:#edf4ff}
.bs-ksugg .bs-ksugg-buy{display:block;margin-top:4px;border-top:1px solid #eef0f4;border-radius:0 0 8px 8px;color:#a6491a;font-weight:600;font-size:12.5px}
:is(.bs-root,.bs-pophost) tr.cost-search-expansion>td{height:0!important;min-height:0!important;padding:0!important;border:0!important;background:transparent!important}
.bs-howchip.h-ai{background:#ede9fe;color:#5b21b6}.bs-src.s-ai{background:#ede9fe;color:#5b21b6}
.bs-how button[data-how="ai"]{color:#6d28d9}.bs-how button[data-how="ai"][aria-pressed="true"]{background:#7c3aed;color:#fff}
.bs-pop.bs-aipop{width:min(980px,96%);top:30px;gap:10px}
.bs-aipop h3{display:flex;align-items:center;gap:8px}.bs-ai-ico svg{width:18px;height:18px;fill:none;stroke:#7c3aed;stroke-width:1.9;stroke-linejoin:round}
.bs-aipop header p{margin:2px 0 0;font-size:12.5px;color:#626262}
.bs-ai-basis{padding:10px 12px;border-radius:10px;background:linear-gradient(180deg,#faf8ff,#f5f3ff);border:1px solid #ddd6fe;font-size:12.5px;line-height:1.5;color:#3b3b3b}
.bs-ai-table .bs-ai-why{font-size:11.5px;color:#7a838e;white-space:nowrap}
.bs-ai-table tr.is-off td{color:#a8afb8}.bs-ai-table tr.is-off td .cost-component-code{opacity:.5}
.bs-ai-table input[type=checkbox]{width:16px;height:16px;margin:0}
.bs-aipop .bs-pt-tablewrap{max-height:380px;overflow:auto}
/* ===== Bảng thật: chặn CSS cũ của bảng BTGV (.costing-layout, .costing-table-bar, input chung) ===== */
.bs-pophost{display:contents}
.bs-wrap{position:relative}
.panel[data-panel="costing"] :where(.btgv-overview-header):is(.btgv-overview-header,#productOverview,.solution-area,.btgv-section-divider)[hidden], .panel[data-panel="costing"] :where(#productOverview):is(.btgv-overview-header,#productOverview,.solution-area,.btgv-section-divider)[hidden], .panel[data-panel="costing"] :where(.solution-area):is(.btgv-overview-header,#productOverview,.solution-area,.btgv-section-divider)[hidden], .panel[data-panel="costing"] :where(.btgv-section-divider):is(.btgv-overview-header,#productOverview,.solution-area,.btgv-section-divider)[hidden],#btgvPickerBtn[hidden],#btgvHowSeg[hidden],#costSummaryScrim[hidden],.bs-sheetbox>.bs-sumpop[hidden]{display:none!important}
body .panel[data-panel="costing"] .costing-layout.bs-sheetbox{display:block!important;gap:0!important;grid-template-columns:none!important;position:relative;min-width:0;border:1px solid #cfd5dd;border-radius:12px;background:#fff;overflow:visible}
body .panel[data-panel="costing"] .costing-layout.bs-sheetbox>.costing-table-bar.bs-active{display:flex!important;flex-wrap:nowrap;justify-content:flex-start!important;align-items:center;gap:8px!important;margin:0;padding:8px!important;background:#f3f5f8;border-bottom:1px solid #cfd5dd;border-radius:12px 12px 0 0}
body .panel[data-panel="costing"] .costing-layout.bs-sheetbox>.table-wrap.bs-sheet-wrap{border:0!important;border-radius:0 0 12px 12px!important;box-shadow:none!important;background:#fff!important;max-height:none!important;overflow:auto;cursor:auto}
body .panel[data-panel="costing"] .costing-layout.bs-sheetbox table.bs-sheet{min-width:980px}
body .panel[data-panel="costing"] .costing-layout.bs-sheetbox table.bs-sheet :where(th):is(th,td), body .panel[data-panel="costing"] .costing-layout.bs-sheetbox table.bs-sheet :where(td):is(th,td){min-width:0!important}
body .panel[data-panel="costing"] .bs-sheet tr.cost-placeholder-row{opacity:1;background:transparent}
.bs-sheetbox>.bs-sumpop{z-index:41}
.bs-sheetbox>.bs-sumpop header{display:flex;justify-content:space-between;align-items:flex-start}
.bs-sheetbox>.btgv-qi-panel{top:52px!important;right:10px!important;z-index:41!important}
.bs-sum-head.is-once{grid-template-columns:1fr 54px 120px}
.bs-how button:disabled{opacity:.5;cursor:not-allowed}
.bs-how button:disabled:hover{background:transparent}
.bs-active .bs-tools .btn.bs-tb{margin:0}
:is(.bs-root,.bs-pophost) input.bs-cell.is-ro,:is(.bs-root,.bs-pophost) input.bs-cell[readonly]{color:#626262}
:is(.bs-root,.bs-pophost) input.bs-cell:disabled{color:#101010;-webkit-text-fill-color:#101010;opacity:1;cursor:default}
.bs-pctin span{flex:none}
.bs-sheet td.c-src{white-space:nowrap}
.bs-sheet td.c-src .price-confirm-btn{flex:none;width:22px;height:22px;margin-left:4px;border-radius:6px;font-size:12px;vertical-align:middle}
.bs-sheet td.c-amt .line-total{font-weight:600}
.bs-ref-empty,.bs-kempty{padding:14px;color:#626262;text-align:center;list-style:none}
.bs-pop>p:not(.bs-pop-note){margin:0}
.bs-ai-basis{white-space:normal}
.bs-quick{display:block}
.bs-quick #addCostRowBtn{display:none}
:is(.bs-root,.bs-pophost) input.bs-quick-in:disabled{background:#f7f8fa!important;cursor:not-allowed}
#btgvSolBar .bs-sol-count b{font-weight:700}
.workflow-page-title[data-workflow-page-title="costing"]{display:flex;align-items:center;gap:12px}
.workflow-page-title[data-workflow-page-title="costing"] .cost-page-title{flex:0 1 auto;min-width:0}
body.bs-new #completeSolutionCostBtn{flex:none}
body .panel[data-panel="costing"] .costing-layout .bs-pophost table{min-width:0!important}
body .panel[data-panel="costing"] .costing-layout .bs-pophost table :where(th):is(th,td), body .panel[data-panel="costing"] .costing-layout .bs-pophost table :where(td):is(th,td){min-width:0!important}
.bs-sheetbox .bs-tb.is-empty{border-style:dashed!important}
:is(.bs-root,.bs-pophost) .bs-ai-table input[type=checkbox]{width:16px!important;height:16px!important;min-height:0!important;margin:0!important;vertical-align:middle}
/* Điện thoại: header xếp dọc nên thanh câu hỏi không được giãn theo flex-basis. */
html.bms-phone-v2 .bs-solbar{flex:none!important;align-self:stretch!important;width:auto!important;max-width:none!important;margin:0!important;height:44px!important;min-height:44px!important;padding-left:12px!important}
html.bms-phone-v2 .bs-solbar label{max-width:42%!important}
html.bms-phone-v2 .bs-solbar::after{display:none}
/* Điện thoại (#438, mockup phone-1/2/3): thẻ theo nhóm thay cho bảng 10 cột. */
#btgvPhone{display:none}
html.bms-phone-v2 #btgvPhone{display:block;margin:0;font:14px/1.4 Roboto,system-ui,sans-serif;color:#101010}
html.bms-phone-v2 body .panel[data-panel="costing"] :where(.btgv-area-title):is(.btgv-area-title,.btgv-overview-header,#productOverview,#btgvCompactView):not(#\#), html.bms-phone-v2 body .panel[data-panel="costing"] :where(.btgv-overview-header):is(.btgv-area-title,.btgv-overview-header,#productOverview,#btgvCompactView):not(#\#), html.bms-phone-v2 body .panel[data-panel="costing"] :where(#productOverview):is(.btgv-area-title,.btgv-overview-header,#productOverview,#btgvCompactView):not(#\#), html.bms-phone-v2 body .panel[data-panel="costing"] :where(#btgvCompactView):is(.btgv-area-title,.btgv-overview-header,#productOverview,#btgvCompactView):not(#\#){display:none!important}
html.bms-phone-v2 body .panel[data-panel="costing"] #btgvSheetRoot .bs-sheetbox:not(#\#){display:block!important;padding:0!important;margin:0!important;border:0!important;background:none!important;box-shadow:none!important;min-height:0!important}
html.bms-phone-v2 body .panel[data-panel="costing"] #btgvSheetRoot :where(.costing-table-bar):is(.costing-table-bar,.bs-sheet-wrap,.bs-quick):not(#\#), html.bms-phone-v2 body .panel[data-panel="costing"] #btgvSheetRoot :where(.bs-sheet-wrap):is(.costing-table-bar,.bs-sheet-wrap,.bs-quick):not(#\#), html.bms-phone-v2 body .panel[data-panel="costing"] #btgvSheetRoot :where(.bs-quick):is(.costing-table-bar,.bs-sheet-wrap,.bs-quick):not(#\#){display:none!important}
.bp-head{display:grid;gap:1px;width:100%;padding:10px 16px;border:0;border-bottom:1px solid #e0e0e0;background:#fff;text-align:left;font:inherit;color:inherit}
.bp-head b{font-size:16px;font-weight:700}.bp-head small{color:#626262;font-size:12.5px}.bp-head em{font-style:normal;font-weight:700;color:#245dcc}
.bp-head-btn{position:relative;padding-right:40px;cursor:pointer}.bp-head-btn>svg{position:absolute;right:14px;top:50%;width:20px;height:20px;margin-top:-10px;fill:none;stroke:#626262;stroke-width:2}
.bp-seg{display:flex;margin:10px 14px;padding:3px;height:40px;border:1px solid #e0e0e0;border-radius:999px;background:#fff}
.bp-seg button{flex:1;border:0;border-radius:999px;background:transparent;font:600 13px Roboto,sans-serif;color:#626262}
.bp-seg button[aria-pressed="true"]{background:#4080ff;color:#fff}
.bp-act{display:flex;gap:8px;margin:10px 0;padding:0 14px;overflow-x:auto;scrollbar-width:none}.bp-act::-webkit-scrollbar{display:none}
.bp-act button{flex:none;height:40px;padding:0 14px;border:1px solid #e0e0e0;border-radius:999px;background:#fff;font:600 13px Roboto,sans-serif;color:#101010}
.bp-act button.is-primary{background:#4080ff;border-color:#4080ff;color:#fff}.bp-act button:disabled{opacity:.5}
.bp-grp{display:flex;justify-content:space-between;align-items:center;padding:10px 14px 6px;font-weight:700;font-size:12.5px;text-transform:uppercase;letter-spacing:.03em;background:#f0f0f0}
.bp-grp em{font-style:normal;color:#626262;font-weight:600;text-transform:none;font-variant-numeric:tabular-nums}
.bp-ln{background:#fff;border-bottom:1px solid #eef0f3}
.bp-ln-main{display:grid;grid-template-columns:1fr auto;gap:2px 10px;padding:9px 14px;cursor:pointer}
.bp-ln-main b{font-weight:500;min-width:0}.bp-ln-main strong{text-align:right;font-variant-numeric:tabular-nums}
.bp-ln-main small{color:#626262;font-size:12px;min-width:0}.bp-ln-main .bs-src{justify-self:end;height:20px;font-size:11px;cursor:inherit}
.bp-ln.is-open{box-shadow:inset 3px 0 0 #4080ff}
.bp-ed{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding:0 14px 12px}
.bp-ed label{display:grid;gap:3px;font-size:11.5px;color:#626262}.bp-ed label:first-child,.bp-ed label:last-of-type{grid-column:1/-1}
.bp-ed input{height:40px!important;min-height:0!important;padding:0 10px!important;border:1px solid #d6dae0!important;border-radius:10px!important;font:14px Roboto,sans-serif!important;color:#101010;background:#fff!important}
.bp-ed-btns{grid-column:1/-1;display:flex;gap:8px;flex-wrap:wrap}.bp-ed-btns .bs-tb{height:36px;padding:0 12px;border:1px solid #e0e0e0;border-radius:999px;background:#fff;font:600 12.5px Roboto,sans-serif}
.bp-ed-btns .is-primary{margin-left:auto;background:#4080ff;border-color:#4080ff;color:#fff}
.bp-add{display:block;width:calc(100% - 28px);margin:8px 14px 16px;height:40px;border:1px dashed #b9c3d0;border-radius:10px;background:#fff;text-align:center;font:600 13px Roboto,sans-serif;color:#101010}
.bp-add::placeholder{color:#4080ff;opacity:1}.bp-add:focus{text-align:left;padding:0 12px;outline:none;border-style:solid;border-color:#4080ff}
.bp-kpi{margin:0 14px;background:#fff;border:1px solid #e0e0e0;border-radius:12px;padding:12px 14px}
.bp-kpi-tot{display:flex;justify-content:space-between;align-items:baseline}.bp-kpi-tot small{color:#626262}.bp-kpi-tot strong{font-size:22px;color:#245dcc}
.bp-kpi-row{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin:10px 0 14px;font-size:11.5px;color:#626262}.bp-kpi-row strong{display:block;font-size:14px;color:#101010}
.bp-kpi .bs-stack{margin-top:0}
.bp-cards{display:grid;gap:8px;margin:10px 14px}
.bp-card{background:#fff;border:1px solid #e0e0e0;border-radius:12px;padding:12px 14px;cursor:pointer}
.bp-card-h{display:flex;justify-content:space-between;gap:10px}.bp-card-h strong{white-space:nowrap}
.bp-card>small{display:block;color:#626262;font-size:12px;margin-top:2px}.bp-card .bs-howchip{height:18px;padding:0 8px;font-size:11px;margin-right:4px}
.bp-mix{display:flex;gap:10px;margin-top:8px;font-size:12px;color:#626262}.bp-mix .bs-dot{width:8px;height:8px;margin-right:5px}
.bp-card .bs-det{grid-template-columns:1fr;gap:6px;margin-top:10px}
/* Hộp nổi thành bảng kéo từ dưới lên trên điện thoại. */
html.bms-phone-v2 .bs-pophost .bs-scrim{z-index:1190;background:rgba(16,16,16,.35)}
html.bms-phone-v2 :is(.bs-pophost :is(.bs-pop,.bs-picklist,.bs-menu),.btgv-qi-panel,#costSummaryPanel){position:fixed!important;left:0!important;right:0!important;bottom:0!important;top:auto!important;transform:none!important;width:auto!important;max-width:none!important;max-height:84vh;overflow:auto;border-radius:20px 20px 0 0!important;z-index:1200!important;padding-bottom:calc(20px + env(safe-area-inset-bottom))!important;box-shadow:0 -10px 40px rgba(0,0,0,.2)!important}
html.bms-phone-v2 .bs-pophost table{display:block;overflow-x:auto}
.bp-sheet{padding:10px 16px 34px!important}.bp-sheet h3{font-size:16px;margin:0 0 4px}
.bp-grab{width:40px;height:5px;border-radius:9px;background:#d0d4da;margin:0 auto 4px}
.bp-opt{display:grid;gap:2px;width:100%;padding:14px;border:1px solid #e0e0e0;border-radius:12px;background:#fff;text-align:left;font:inherit}
.bp-opt b{font-size:15px}.bp-opt small{color:#626262}.bp-opt.is-on{border-color:#4080ff;background:#f5f9ff}
html.bms-phone-v2 body #btgvPhone .bp-seg button:not(#\#){min-height:0!important;height:auto!important;padding:0!important}
html.bms-phone-v2 body #btgvPhone .bp-act button:not(#\#){min-height:0!important;height:40px!important}
.bs-plate .bs-pt-table thead th{text-align:center!important}

/* Cột NCC tách khỏi cột Tham chiếu (#438). */
.bs-sheet td.c-ref{white-space:nowrap}.bs-sheet td.c-ref .bs-tag+.bs-tag{margin-left:4px}
.bs-tag.t-fg{background:#edf4ff;color:#245dcc}
/* Định mức mẫu dịch vụ D-Service (#438, 2026-10-24) */
.bs-svc .bs-pt-table td.c-chk,.bs-svc .bs-pt-table th.c-chk{width:28px;text-align:center}
.bs-svc .bs-pt-table tr.is-off td:not(.c-chk){opacity:.45}
.bs-pop.bs-plate.bs-svc{width:min(940px,96%)}
.bs-pop.bs-svc .bs-pt-tablewrap{max-height:min(48vh,460px)}
.bs-pop.bs-svc .bs-pt-table td{vertical-align:middle;padding-top:3px;padding-bottom:3px}
.bs-pop.bs-svc input.bs-svc-in{width:104px!important;min-width:0!important;height:30px!important;min-height:0!important;padding:0 8px!important;border:1px solid var(--bms-border);border-radius:8px;background:var(--bms-surface);font:inherit;font-size:13px;text-align:right;box-shadow:none}
.bs-pop.bs-svc input[type=checkbox]{width:16px;height:16px;margin:0}
.bs-svc .bs-svc-in:focus{outline:2px solid #245dcc33;border-color:#245dcc}

/* Mặt hàng kho chưa có mã vật tư: chip "Thiếu mã" màu cảnh báo; mã dài không đè lên cột tên */
.bs-sheet .cost-component-code,.bs-pop .cost-component-code{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:middle}
.cost-component-code.bs-nocode{border-color:var(--bd)}
.bs-kbtn{max-width:100%}

/* Anh Hiệp 2026-10-24: mọi nhãn chữ màu trong BTGV (Mã, Tham chiếu, Nguồn giá, Thiếu mã, Mua bổ sung…) cùng một kiểu:
   cao 22px, bo 6px, viền 1px, chữ 11.5px đậm; chỉ khác màu theo ý nghĩa. */
:is(.bs-sheet,.bs-pop,.bs-pophost) :where(.cost-component-code):is(.cost-component-code,.bs-tag,.bs-src), :is(.bs-sheet,.bs-pop,.bs-pophost) :where(.bs-tag):is(.cost-component-code,.bs-tag,.bs-src), :is(.bs-sheet,.bs-pop,.bs-pophost) :where(.bs-src):is(.cost-component-code,.bs-tag,.bs-src){--c:#4b4b4b;--bg:#f3f4f6;--bd:#d9dce1;display:inline-flex;align-items:center;box-sizing:border-box;height:22px;max-width:100%;padding:0 8px;border:1px solid var(--bd)!important;border-radius:6px;background:var(--bg)!important;color:var(--c)!important;font-size:11.5px;font-weight:600;line-height:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;vertical-align:middle;font-variant-numeric:tabular-nums}
:is(.bs-sheet,.bs-pop,.bs-pophost) :where(.cost-component-code):is(.cost-component-code.is-linked,.bs-tag.t-fg,.bs-src.s-kho), :is(.bs-sheet,.bs-pop,.bs-pophost) :where(.bs-tag):is(.cost-component-code.is-linked,.bs-tag.t-fg,.bs-src.s-kho), :is(.bs-sheet,.bs-pop,.bs-pophost) :where(.bs-src):is(.cost-component-code.is-linked,.bs-tag.t-fg,.bs-src.s-kho){--c:#245dcc;--bg:#edf4ff;--bd:#b9d3ff}
:is(.bs-sheet,.bs-pop,.bs-pophost) :where(.bs-tag):is(.bs-tag.t-kho,.bs-src.s-ok), :is(.bs-sheet,.bs-pop,.bs-pophost) :where(.bs-src):is(.bs-tag.t-kho,.bs-src.s-ok){--c:#1f7a45;--bg:#e8f6ee;--bd:#a9dcbc}
:is(.bs-sheet,.bs-pop,.bs-pophost) .bs-tag.t-buy{--c:#b25e00;--bg:#fff1e0;--bd:#f6c58e}
:is(.bs-sheet,.bs-pop,.bs-pophost) .cost-component-code.bs-nocode{--c:#be185d;--bg:#fdf2f8;--bd:#f5b8d6}
:is(.bs-sheet,.bs-pop,.bs-pophost) .bs-src.s-tay{--c:#4b4b4b;--bg:#f3f4f6;--bd:#d9dce1}
:is(.bs-sheet,.bs-pop,.bs-pophost) .bs-src.s-dm{--c:#6b4bb0;--bg:#f1ecfb;--bd:#d6c8f2}
:is(.bs-sheet,.bs-pop,.bs-pophost) .bs-src.s-ref{--c:#23746c;--bg:#e6f5f3;--bd:#a8dad3}
:is(.bs-sheet,.bs-pop,.bs-pophost) .bs-src.s-pct{--c:#9a6200;--bg:#fdf3e1;--bd:#ecd09a}
:is(.bs-sheet,.bs-pop,.bs-pophost) .bs-src.s-none{--c:#c62f2f;--bg:#fff0f0;--bd:#f3b8b8}
:is(.bs-sheet,.bs-pop,.bs-pophost) .bs-src.s-ai{--c:#5b21b6;--bg:#ede9fe;--bd:#cdbff8}
.bs-pt-table .cost-component-code{margin-left:4px}
