:root{--navy:#12263f;--blue:#1677ff;--ink:#172033;--muted:#697386;--line:#e7eaf0;--bg:#f5f7fb;--green:#0f9f6e}*{box-sizing:border-box}body{margin:0;font:15px/1.5 "Segoe UI",Arial,sans-serif;color:var(--ink);background:var(--bg)}aside{position:fixed;inset:0 auto 0 0;width:245px;background:var(--navy);padding:28px 18px;color:#fff}.brand{font-size:24px;font-weight:800;padding:0 14px 28px}.brand span{display:block;color:#70adff}.brand small{font-size:12px;font-weight:400;color:#aebed2}nav{display:grid;gap:6px}nav a{color:#c7d3e2;text-decoration:none;padding:11px 14px;border-radius:8px}nav a:hover{background:#203b5c;color:#fff}main{margin-left:245px;min-height:100vh}header{height:92px;background:#fff;border-bottom:1px solid var(--line);padding:18px 32px;display:flex;justify-content:space-between;align-items:center}header small,.eyebrow{font-size:11px;letter-spacing:1.4px;color:var(--blue);font-weight:700}h1{font-size:23px;margin:3px 0}h2{margin-top:0}.profile{display:flex;align-items:center;gap:15px}.profile a{color:var(--muted);font-size:13px}.content{padding:30px;max-width:1500px}.welcome{background:linear-gradient(115deg,#163150,#0c6fe8);color:#fff;border-radius:16px;padding:30px;display:flex;justify-content:space-between}.welcome h2{font-size:28px;margin:7px 0}.welcome p{margin:0;color:#dbe9fb}.date{background:#ffffff18;padding:10px 15px;border-radius:9px;height:min-content}.stats{display:grid;grid-template-columns:repeat(2,minmax(220px,1fr));gap:20px;margin-top:20px}.stats article,.panel{background:#fff;border:1px solid var(--line);border-radius:12px;padding:18px;box-shadow:0 3px 15px #1828480a}.stats span{color:var(--muted)}.stats strong{font-size:34px;display:block;margin:9px 0}.stats a{color:var(--blue);text-decoration:none}.coming{opacity:.7}.coming small{color:var(--muted)}.toolbar{display:flex;justify-content:space-between;gap:12px;margin-bottom:12px}.search{display:flex;gap:8px;max-width:600px;flex:1}.search input{margin:0}.button,button{display:inline-flex;justify-content:center;align-items:center;border:0;border-radius:8px;background:var(--blue);color:#fff;text-decoration:none;padding:8px 13px;font-weight:600;cursor:pointer;font:inherit}.secondary{background:#edf1f6;color:var(--ink)}label{display:block;font-weight:600;margin:10px 0 4px}label em{color:#d52b44}input,textarea,select{width:100%;padding:8px 10px;border:1px solid #cfd6e2;border-radius:8px;background:#fff;font:inherit;margin-top:4px}input:focus,textarea:focus,select:focus{outline:3px solid #1677ff1f;border-color:var(--blue)}.narrow{max-width:760px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px}.back{display:inline-block;margin-bottom:12px;color:var(--blue);text-decoration:none}.table-wrap{padding:0;overflow:auto}table{border-collapse:collapse;width:100%}th,td{padding:7px 9px;border-bottom:1px solid var(--line);line-height:1.3;vertical-align:middle}th{text-align:center;color:#000;text-transform:none;background:#fafbfc;font-weight:600}td{text-align:left}tr:last-child td{border-bottom:0}.row-actions{display:flex;gap:9px;white-space:nowrap}.row-actions form{margin:0}.link{background:none;padding:0;color:var(--blue)}.danger{color:#d52b44}.empty{text-align:center;color:var(--muted);padding:18px}.alert{padding:10px 12px;border-radius:8px;margin-bottom:12px}.success{background:#e7f8f1;color:#087852}.error{background:#fff0f1;color:#b21e35}.two-cols{display:grid;grid-template-columns:2fr 1fr;gap:15px}.badge{background:#e9f2ff;color:#0865d5;padding:4px 8px;border-radius:20px;font-size:12px}.public{background:linear-gradient(135deg,#0f2239,#0d65c5);min-height:100vh}.auth-shell{min-height:100vh;display:grid;place-items:center;padding:25px}.auth-card{background:#fff;width:min(420px,100%);padding:30px;border-radius:16px;box-shadow:0 24px 70px #07132266}.auth-card h1{text-align:center}.auth-logo{width:62px;height:62px;border-radius:17px;display:grid;place-items:center;margin:0 auto;background:var(--blue);color:#fff;font-size:20px;font-weight:800}.muted{text-align:center;color:var(--muted)}.auth-card button{width:100%;margin-top:12px}@media(max-width:850px){aside{position:static;width:100%;padding:15px}.brand{padding:0 10px 12px}nav{display:flex;overflow:auto}main{margin:0}header{height:auto;padding:16px;align-items:flex-start}.profile{flex-wrap:wrap;justify-content:flex-end}.content{padding:16px}.two-cols,.stats{grid-template-columns:1fr}.toolbar{align-items:stretch;flex-direction:column}.grid{grid-template-columns:1fr}}

.catalog-editor-horizontal{margin-bottom:18px;padding:18px 20px}.catalog-editor-heading{display:flex;align-items:baseline;gap:18px;margin-bottom:12px}.catalog-editor-heading h2,.catalog-editor-heading p{margin:0}.catalog-editor-heading p{color:var(--muted)}.catalog-entry-form{display:grid;grid-template-columns:minmax(280px,1.5fr) minmax(150px,.65fr) minmax(260px,1.25fr) auto;gap:14px;align-items:end}.catalog-entry-form-simple{grid-template-columns:minmax(180px,.7fr) minmax(320px,1.5fr) auto}.catalog-entry-form label{margin:0}.catalog-entry-form input,.catalog-entry-form select{margin-top:6px}.catalog-entry-form .actions{margin:0;align-self:end;white-space:nowrap}.catalog-filter-bar{align-items:center;flex-wrap:wrap}.catalog-filter-form{max-width:none;display:flex}.catalog-filter-form input[type=search]{min-width:280px;flex:1}.catalog-filter-form select{width:auto;min-width:170px}.catalog-filter-form input,.catalog-filter-form select,.search select{margin:0}.filter-count{color:var(--muted);white-space:nowrap}.catalog-layout{align-items:start}
@media(max-width:1100px){.catalog-entry-form{grid-template-columns:1fr 1fr}.catalog-entry-form .actions{grid-column:1/-1}.catalog-filter-form{display:grid;grid-template-columns:1fr 1fr}.catalog-filter-form input[type=search]{grid-column:1/-1}.catalog-filter-form select{width:100%}.catalog-editor-heading{display:block}.catalog-editor-heading p{margin-top:6px}}
@media(max-width:650px){.catalog-entry-form,.catalog-filter-form{grid-template-columns:1fr}.catalog-filter-form input[type=search],.catalog-entry-form .actions{grid-column:auto}}

.asset-level-row{background:var(--asset-level-bg);color:var(--asset-level-text)}.asset-level-row td{background:transparent;color:inherit;border-bottom-color:#dfe4eb}.asset-level-row td:first-child{border-left:6px solid var(--asset-level-accent)}.asset-level-row b,.asset-level-row a,.asset-level-row .link{color:var(--asset-level-text)}.asset-level-row:hover{background:var(--asset-level-hover)}.asset-level-badge{display:inline-block;min-width:64px;padding:4px 9px;border:1px solid var(--asset-level-accent);border-radius:999px;background:#ffffffb8;color:var(--asset-level-text);text-align:center;white-space:nowrap}.asset-level-1{--asset-level-bg:#f6faff;--asset-level-hover:#edf5ff;--asset-level-accent:#5b91cb;--asset-level-text:#174f8a}.asset-level-2{--asset-level-bg:#f5fbf7;--asset-level-hover:#eaf7ee;--asset-level-accent:#63a879;--asset-level-text:#246b3c}.asset-level-3{--asset-level-bg:#fffaf1;--asset-level-hover:#fff3dc;--asset-level-accent:#c99a4d;--asset-level-text:#85590e}.asset-level-4{--asset-level-bg:#fbf7ff;--asset-level-hover:#f4ebfc;--asset-level-accent:#9b75bc;--asset-level-text:#68418b}.asset-level-5{--asset-level-bg:#fff7f8;--asset-level-hover:#ffedef;--asset-level-accent:#ca7d89;--asset-level-text:#943849}.asset-level-6{--asset-level-bg:#f4fbfb;--asset-level-hover:#e8f7f7;--asset-level-accent:#65a7a7;--asset-level-text:#276f6f}
.payroll-detail-link{color:#0645ad!important;text-decoration:none!important;font-size:.92em;white-space:nowrap}.payroll-detail-link:hover{color:#00337a!important}

.maintenance-plan-table{min-width:1750px}.maintenance-plan-table th:nth-child(1){min-width:190px}.maintenance-plan-table th:nth-child(2){min-width:260px}.maintenance-plan-table th:nth-child(3),.maintenance-plan-table th:nth-child(4){min-width:135px}.maintenance-plan-table th:nth-child(5),.maintenance-plan-table th:nth-child(6),.maintenance-plan-table th:nth-child(7){min-width:240px}.maintenance-plan-table th:nth-child(8){min-width:160px}.plan-cost-check{display:flex;align-items:center;gap:8px;margin:0;font-weight:400;cursor:pointer}.plan-cost-check input{width:20px;height:20px;margin:0;flex:0 0 auto}.plan-cost-detail td{background:#f6f9fd;padding:16px 24px}.plan-cost-detail-inner{border-left:5px solid #5b91cb;padding-left:16px}.plan-cost-detail-inner table{margin-bottom:12px;background:#fff}.plan-cost-detail-inner th{background:#eaf2fb}.plan-cost-detail-inner .button{float:right;margin-bottom:8px}.plan-cost-detail-inner .plan-cost-manage-button{padding:6px 10px;border-radius:6px;background:var(--blue);color:#fff;font-size:13px;font-weight:600;box-shadow:0 2px 7px #1677ff33}.plan-cost-detail-inner .plan-cost-manage-button:hover{background:#0865d5}

.plan-cost-horizontal{margin-top:20px}.plan-cost-horizontal table{min-width:1050px}.plan-cost-horizontal .plan-cost-title{text-align:center;background:#fff;color:var(--ink);font-size:18px;text-transform:none}.plan-cost-horizontal th:nth-child(1){width:34%}.plan-cost-horizontal th:nth-child(2){width:12%}.plan-cost-horizontal th:nth-child(3){width:12%}.plan-cost-horizontal th:nth-child(4),.plan-cost-horizontal th:nth-child(5){width:15%}.plan-cost-entry td{background:#f8fbff;vertical-align:bottom}.plan-cost-entry input{margin:0}.plan-cost-entry td:last-child{display:flex;gap:6px;align-items:center}.plan-cost-entry .button,.plan-cost-entry button{white-space:nowrap}

.record-tabs{display:flex;grid-auto-flow:column;grid-auto-columns:max-content;gap:10px;overflow:auto;margin-bottom:20px}.record-tabs a{display:block;padding:12px 16px;border-radius:9px;background:#edf1f6;color:var(--ink);text-decoration:none;white-space:nowrap}.record-tabs a.active{background:var(--blue);color:#fff}.record-tab-panel[hidden]{display:none}.record-welcome{margin-bottom:20px}.recovery-table table{min-width:950px}.recovery-table th:first-child{width:30%}.recovery-table th:nth-child(4){width:30%}
.cost-summary-line{display:flex;align-items:center;gap:28px;flex-wrap:wrap;padding:17px 22px}.cost-summary-line span{white-space:nowrap}.cost-summary-line b{margin-left:7px}@media(max-width:850px){.cost-summary-line{display:grid;gap:10px}}

/* Giữ nguyên tiêu đề của mọi bảng khi cuộn dọc. Áp dụng cả bảng hiện tại và bảng bổ sung sau này. */
.table-wrap{max-height:70vh;overflow:auto}.table-wrap thead{position:sticky;top:0;z-index:30}.table-wrap thead th{background:#fafbfc;box-shadow:0 1px 0 var(--line)}@media(max-width:850px){.table-wrap{max-height:65vh}}

.management-expense-entry{display:grid;grid-template-columns:minmax(250px,1.2fr) minmax(120px,.45fr) minmax(240px,1fr) minmax(190px,.7fr) minmax(200px,.8fr);gap:12px;align-items:end}.management-expense-entry label{margin:0}.management-expense-entry .expense-active{display:flex;align-items:center;gap:8px;white-space:nowrap}.management-expense-entry .expense-active input{width:auto;margin:0}.management-expense-entry .actions{grid-column:1/-1;margin-top:4px}@media(max-width:1200px){.management-expense-entry{grid-template-columns:1fr 1fr}}@media(max-width:650px){.management-expense-entry{grid-template-columns:1fr}}
.expense-catalog-entry{grid-template-columns:minmax(260px,1.35fr) minmax(130px,.55fr) minmax(240px,1.15fr) minmax(115px,.45fr) auto}.expense-catalog-entry .expense-active{display:flex;align-items:center;gap:8px;white-space:nowrap}.expense-catalog-entry .expense-active input{width:auto;margin:0}@media(max-width:1200px){.expense-catalog-entry{grid-template-columns:1fr 1fr}}
.nav-group{display:block;width:100%;border-radius:8px}.nav-group summary{display:list-item;cursor:pointer;padding:11px 14px;color:#c7d3e2}.nav-group>a{display:block;width:calc(100% - 14px);margin:0 0 0 14px;padding:8px 14px;border-left:2px solid #47617f;border-radius:0;white-space:normal}.qldn-plan-table{min-width:1250px;table-layout:fixed}.qldn-plan-table col:nth-child(1){width:5%}.qldn-plan-table col:nth-child(2){width:32%}.qldn-plan-table col:nth-child(3),.qldn-plan-table col:nth-child(4),.qldn-plan-table col:nth-child(6){width:14%}.qldn-plan-table col:nth-child(5),.qldn-plan-table col:nth-child(7){width:10.5%}.qldn-plan-table thead th{text-align:center;vertical-align:middle;padding:9px 10px;line-height:1.3}.qldn-plan-table td{padding:9px 12px;vertical-align:middle;line-height:1.3}.qldn-plan-table td:nth-child(n+3):nth-child(-n+7){text-align:right;white-space:nowrap}.qldn-plan-table td:nth-child(2) a{text-decoration:none;display:inline-block}.qldn-plan-table td:nth-child(2) a:hover{text-decoration:none;opacity:.78}.center{text-align:center!important}dialog{border:0;border-radius:12px;padding:25px;min-width:min(500px,90vw);box-shadow:0 20px 70px #0005}dialog::backdrop{background:#0f172a66}
.nav-subgroup{display:block;margin:2px 0 4px 14px;width:calc(100% - 14px);border-left:2px solid #47617f}.nav-subgroup>summary{padding:8px 14px!important;color:#d7e2ef!important;white-space:nowrap}.nav-subgroup>a{display:block;margin-left:12px;padding:7px 8px;color:#c7d3e2;text-decoration:none;border-left:1px solid #47617f;border-radius:0;white-space:nowrap;font-size:14px}.nav-subgroup>a:hover{background:#203b5c;color:#fff}
.module-quick-tabs{display:flex!important;grid-auto-flow:unset!important;gap:7px;overflow-x:auto;margin:0 0 15px;padding:8px;background:#fff;border:1px solid var(--line);border-radius:11px}.module-quick-tabs a{flex:0 0 auto;min-width:50px;padding:8px 11px!important;border:1px solid #d7e0eb;border-radius:8px!important;background:#f5f7fa;color:#164f91!important;text-align:center;font-weight:700;text-decoration:none}.module-quick-tabs a:hover,.module-quick-tabs a.active{background:var(--blue)!important;border-color:var(--blue);color:#fff!important}.module-landing{min-height:160px}.bm-global-search{align-items:center;margin:0 0 12px}.bm-global-search input{max-width:620px;margin:0}.merge-form{display:flex;align-items:center;gap:5px}.merge-form select{min-width:180px;margin:0;padding:5px}.pagination{display:flex;gap:6px;align-items:center;justify-content:center;margin:14px 0;flex-wrap:wrap}.pagination a,.pagination span{padding:6px 10px;border:1px solid #d4dce8;border-radius:7px;text-decoration:none}.pagination .active{background:var(--blue);color:#fff;border-color:var(--blue)}
.contract-master-preview input[readonly]{background:#f1f5f9;color:#17395f;font-weight:600}.contract-master-preview{margin-top:10px}.import-error-text{color:#b91c1c;font-weight:600}.import-valid-text{color:#047857;font-weight:600}
.project-code-table{min-width:1250px;table-layout:fixed}.project-code-table th:nth-child(1){width:55px}.project-code-table th:nth-child(2){width:140px}.project-code-table th:nth-child(3){width:260px}.project-code-table th:nth-child(4){width:220px}.project-code-table th:nth-child(5){width:100px}.project-code-edit-form{display:grid;grid-template-columns:130px minmax(220px,1fr) minmax(220px,1fr) auto auto;gap:6px;align-items:center}.project-code-edit-form input,.project-code-edit-form select{margin:0;min-width:0}
.qldn-plan-table input{width:100%;min-width:0;margin:0;padding:7px 9px;text-align:right}.qldn-detail-toggle{text-align:left}.qldn-detail-row>td{padding:16px 24px;background:#f8fafc}.qldn-detail-box{border-left:5px solid #6b93c5;padding-left:16px}.qldn-detail-box h3{margin:0 0 12px}.qldn-detail-box table{min-width:1100px;background:#fff}.qldn-detail-box input{min-width:100px;margin:0;text-align:left}.qldn-detail-box th:first-child{width:55px}.qldn-detail-box th:nth-child(2){min-width:280px}.qldn-detail-box th:nth-child(6){min-width:220px}.qldn-detail-box td:nth-child(3) input,.qldn-detail-box td:nth-child(4) input,.qldn-detail-box td:nth-child(5) input{text-align:right}.qldn-detail-new td{background:#f2f7fd}
.qldn-plan-filters{max-width:none;align-items:flex-end;flex-wrap:wrap}.qldn-plan-filters form{min-width:230px}.qldn-plan-filters label{min-width:230px}.qldn-plan-filters input{margin-top:6px}.qldn-plan-filters .filter-count{padding-bottom:10px}@media(max-width:700px){.qldn-plan-filters,.qldn-plan-filters form,.qldn-plan-filters label{width:100%;min-width:0}.qldn-plan-filters .filter-count{padding:0}}
.qldn-detail-heading{margin-bottom:20px}.qldn-detail-page table{min-width:1250px}.qldn-detail-page input{margin:0;min-width:100px}.qldn-detail-page th:first-child{width:60px}.qldn-detail-page th:nth-child(2){min-width:300px}.qldn-detail-page th:nth-child(7){min-width:220px}.qldn-detail-page td:nth-child(4) input,.qldn-detail-page td:nth-child(5) input,.qldn-detail-page td:nth-child(6) input{text-align:right}.qldn-detail-page tfoot th{background:#eef4fb;font-size:16px;color:var(--ink)}.qldn-detail-page .detail-level-2 td:nth-child(2){padding-left:28px}.qldn-detail-page .detail-level-3 td:nth-child(2){padding-left:48px}.qldn-detail-page .detail-level-4 td:nth-child(2){padding-left:68px}.qldn-detail-page .detail-level-5 td:nth-child(2){padding-left:88px}
@media(max-width:850px){nav .nav-group{flex:0 0 100%;min-width:220px}.nav-group>a{display:block}}
.plan-edit-row{cursor:pointer}.plan-edit-row:hover td{filter:brightness(.98)}.employee-table table{min-width:1050px}.employee-edit-row{cursor:pointer}.employee-edit-row:hover td{background:#f3f7fd}.employee-source-note{text-align:left;margin-top:10px}.employee-edit{max-width:1200px}.employee-edit-grid{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:12px 18px}.employee-edit-grid label{margin:0}.employee-edit-grid .actions{grid-column:1/-1}@media(max-width:1000px){.employee-edit-grid{grid-template-columns:1fr 1fr}}@media(max-width:650px){.employee-edit-grid{grid-template-columns:1fr}}
.asset-information-form{grid-template-columns:repeat(4,minmax(180px,1fr))}.asset-information-form .asset-note-field{grid-column:1/-1}.asset-template-fields{grid-column:1/-1;border-top:1px solid var(--line);padding-top:16px}.asset-template-fields h3{margin:0 0 12px}.asset-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(220px,1fr));gap:12px 18px}.asset-detail-grid label{margin:0}.asset-information-form>.actions{grid-column:1/-1}@media(max-width:1100px){.asset-information-form,.asset-detail-grid{grid-template-columns:1fr 1fr}}@media(max-width:650px){.asset-information-form,.asset-detail-grid{grid-template-columns:1fr}}
.asset-edit-row{cursor:pointer}.asset-name-hover{display:inline-block;cursor:help}.asset-hover-card{position:fixed;z-index:3000;width:min(440px,calc(100vw - 24px));max-height:min(520px,calc(100vh - 24px));overflow:auto;padding:15px 17px;border:1px solid #bfd0e5;border-radius:10px;background:#fff;color:#111;box-shadow:0 16px 40px #10233f38;white-space:pre-line;line-height:1.55;pointer-events:none}.asset-hover-card[hidden]{display:none}
.asset-bulk-toolbar{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:8px 0;padding:10px 13px;border:1px solid #d9e1ec;border-radius:10px;background:#fff}.asset-bulk-toolbar>span{display:grid;gap:2px}.asset-bulk-toolbar small{color:var(--muted);font-weight:400}.danger-button{background:#c92b43;color:#fff}.danger-button:hover{background:#a91f34}.danger-button:disabled{background:#d9dee7;color:#7d8797;cursor:not-allowed}.asset-select-column{width:42px!important;text-align:center!important}.asset-select-column input{width:19px!important;height:19px;margin:0!important;cursor:pointer}.asset-catalog-table th:nth-child(2){width:11%}.asset-catalog-table th:nth-child(3){width:22%}.asset-catalog-table th:nth-child(4){width:13%}.asset-catalog-table th:nth-child(5){width:8%}.asset-catalog-table th:nth-child(6){width:14%}.asset-catalog-table th:nth-child(7){width:15%}.asset-catalog-table th:nth-child(8){width:9%}.asset-catalog-table th:nth-child(9){width:8%}.asset-link-warning{display:inline-block;padding:3px 7px;border-radius:7px;background:#fff1dc;color:#8a5200;font-size:12px;line-height:1.3}.asset-link-free{color:#397a56;font-size:12px}@media(max-width:850px){.asset-bulk-toolbar{align-items:stretch;flex-direction:column}.asset-bulk-toolbar button{width:100%}}
.project-edit-row{cursor:pointer}.project-edit-row:hover td{background:#f3f7fd}.searchable-select{position:relative;width:100%}.searchable-select-native{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;margin:0!important}.searchable-select-input{margin-top:6px}.searchable-select-options{position:absolute;z-index:1000;left:0;right:0;top:100%;max-height:280px;overflow:auto;background:#fff;border:1px solid #cfd6e2;border-radius:8px;box-shadow:0 12px 30px #17203326;padding:5px}.searchable-select-option{display:block;width:100%;padding:9px 11px;border-radius:5px;background:#fff;color:#111;text-align:left;font-weight:400}.searchable-select-option:hover,.searchable-select-option:focus{background:#eaf2ff;color:#064ea6}.searchable-select-empty{display:block;padding:10px;color:var(--muted);font-weight:400}.search .searchable-select{min-width:170px}.search .searchable-select-input{margin:0}
.voucher-editor{padding:18px 20px}.voucher-editor h2{margin-bottom:8px}.voucher-lines{min-width:1500px}.voucher-lines th,.voucher-lines td{padding:6px 8px;vertical-align:middle}.voucher-lines input,.voucher-lines select,.voucher-lines .searchable-select-input{min-width:135px;margin:0;padding:7px 9px}.voucher-lines td:nth-child(2) input{min-width:230px}#voucher-list th,#voucher-list td{padding:9px 12px;vertical-align:middle}.voucher-edit-row{cursor:pointer}.voucher-edit-row:hover td{background:#f0f6ff}.form-grid{display:grid;grid-template-columns:repeat(4,minmax(180px,1fr));gap:8px 12px}.voucher-editor .form-grid label{margin:5px 0 2px}.voucher-editor .form-grid input{margin-top:4px;padding:8px 10px}.form-grid .span-2{grid-column:span 2}.search-row{display:flex;gap:12px;margin:16px 0}.search-row input{width:100%}@media(max-width:900px){.form-grid{grid-template-columns:1fr 1fr}.form-grid .span-2{grid-column:span 2}}
.voucher-list-table{width:1900px;min-width:1900px;table-layout:fixed}.voucher-list-table th,.voucher-list-table td{white-space:normal;overflow-wrap:anywhere;word-break:normal;line-height:1.35}.voucher-list-table col:nth-child(1){width:115px}.voucher-list-table col:nth-child(2){width:115px}.voucher-list-table col:nth-child(3){width:190px}.voucher-list-table col:nth-child(4){width:330px}.voucher-list-table col:nth-child(5),.voucher-list-table col:nth-child(6){width:90px}.voucher-list-table col:nth-child(7){width:135px}.voucher-list-table col:nth-child(8){width:170px}.voucher-list-table col:nth-child(9){width:170px}.voucher-list-table col:nth-child(10){width:185px}.voucher-list-table col:nth-child(11){width:125px}.voucher-list-table col:nth-child(12){width:75px}.voucher-delete-cell{cursor:default}.voucher-delete-cell form{margin:0}

/* Menu gọn và thân thiện với màn hình cảm ứng */
aside{padding:22px 14px;overflow-y:auto;overscroll-behavior:contain;z-index:1000;transition:transform .22s ease}main{transition:margin-left .22s ease}.brand{padding:0 12px 18px}aside nav{gap:3px}aside nav>a,aside .nav-group summary{padding:9px 12px}aside nav a.active{background:#294867;color:#fff;font-weight:650}.nav-group>a{padding:7px 12px}.mobile-menu-toggle,.sidebar-backdrop{display:none}.desktop-sidebar-toggle{position:fixed;z-index:1050;left:224px;top:48%;width:30px;height:52px;padding:0;border:1px solid #d6dee9;border-radius:0 9px 9px 0;background:#fff;color:var(--navy);font-size:27px;box-shadow:4px 3px 14px #10233f20;transition:left .22s ease}.sidebar-collapsed aside{transform:translateX(-100%)}.sidebar-collapsed main{margin-left:0}.sidebar-collapsed .desktop-sidebar-toggle{left:0}

@media(max-width:850px){
 body:not(.public){padding-top:58px}body.menu-open{overflow:hidden}
 .desktop-sidebar-toggle{display:none}
 aside{position:fixed;inset:0 auto 0 0;width:min(86vw,320px);padding:18px 14px;transform:translateX(-105%);transition:transform .22s ease;box-shadow:12px 0 35px #07132255}body.menu-open aside{transform:translateX(0)}
 aside nav{display:grid;overflow:visible}.brand{padding:0 12px 14px}.nav-group{min-width:0!important}.nav-group>a{width:calc(100% - 12px);margin-left:12px}
 .mobile-menu-toggle{display:grid;position:fixed;z-index:1100;left:12px;top:10px;width:40px;height:38px;padding:9px;border:1px solid #d9e0e9;border-radius:9px;background:#fff;box-shadow:0 3px 12px #10233f1f;gap:4px}.mobile-menu-toggle span{display:block;width:20px;height:2px;background:var(--navy);border-radius:2px}
 .sidebar-backdrop{display:block;position:fixed;z-index:900;inset:0;background:#07132273}.sidebar-backdrop[hidden]{display:none}
 main{margin:0}header{position:fixed;z-index:800;top:0;left:0;right:0;height:58px;padding:8px 12px 8px 64px;align-items:center}header small{display:none}header h1{font-size:17px;margin:0;line-height:1.2;max-width:48vw}.profile{gap:9px;justify-content:flex-end}.profile b{display:none}.profile a{font-size:12px}.content{padding:12px}
 .panel{border-radius:10px;padding:14px}.actions{flex-wrap:wrap}.actions .button,.actions button{flex:1 1 auto;min-height:42px}.record-tabs{gap:7px;margin:0 -12px 14px;padding:0 12px 4px;scrollbar-width:none}.record-tabs::-webkit-scrollbar{display:none}.record-tabs a{padding:9px 12px}
 .table-wrap{margin-left:-14px;margin-right:-14px;border-radius:0;max-height:62vh;scrollbar-width:thin;-webkit-overflow-scrolling:touch}.table-wrap:after{content:'Vuốt ngang để xem thêm →';position:sticky;left:10px;display:inline-block;padding:5px 9px;margin:6px 10px;color:var(--muted);background:#fff;border:1px solid var(--line);border-radius:20px;font-size:11px}
 th,td{padding:10px 11px}.form-grid{grid-template-columns:1fr}.form-grid .span-2{grid-column:auto}.voucher-editor{padding:14px}.voucher-lines{min-width:1280px}.voucher-list-table{width:1600px;min-width:1600px}.search-row{margin:12px 0}.welcome{padding:20px;display:block}.welcome h2{font-size:22px}.date{margin-top:14px;display:inline-block}
}
.table-wrap{max-height:none;overflow-y:visible}
@media(max-width:430px){header h1{max-width:42vw}.profile a:first-of-type{display:none}.content{padding:10px}.panel{padding:12px}.table-wrap{margin-left:-12px;margin-right:-12px}.auth-card{padding:24px}.grid{grid-template-columns:1fr}}
.stock-lines{min-width:900px}.stock-lines th,.stock-lines td{vertical-align:middle}.stock-lines td:nth-child(2){min-width:320px}.stock-lines td:last-child{width:60px}.stock-report-table{min-width:1100px}.stock-report-table td:nth-child(n+5){white-space:nowrap;text-align:right}.stock-report-table th:nth-child(n+5){text-align:right}.stock-negative td{background:#fff0f1!important;color:#a71930}.stock-negative td:first-child{border-left:5px solid #d52b44}@media(max-width:850px){.stock-lines{min-width:820px}.stock-lines td:nth-child(2){min-width:260px}.stock-report-table{min-width:1000px}}
.vi-date-input{font-variant-numeric:tabular-nums;background-image:linear-gradient(45deg,transparent 50%,#697386 50%),linear-gradient(135deg,#697386 50%,transparent 50%);background-position:calc(100% - 15px) 50%,calc(100% - 10px) 50%;background-size:5px 5px,5px 5px;background-repeat:no-repeat;padding-right:32px}.vi-date-input::placeholder{color:#8b95a5}.vi-date-input:invalid{border-color:#d52b44}

/* Hồ sơ kế hoạch công ích nhiều năm và nhiều phương án */
.sxkd-list{min-width:900px}.sxkd-heading{display:flex;justify-content:space-between;align-items:flex-end;gap:24px;margin-bottom:16px}.sxkd-heading h2{margin:4px 0}.sxkd-heading p{margin:0;color:var(--muted)}.sxkd-heading-actions{display:flex;gap:10px;align-items:flex-end}.sxkd-heading-actions label{min-width:230px;margin:0}.sxkd-kpis{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:12px;margin-bottom:16px}.sxkd-kpis article{background:#fff;border:1px solid var(--line);border-radius:10px;padding:13px 16px}.sxkd-kpis span{display:block;color:var(--muted);font-size:12px}.sxkd-kpis strong{display:block;margin-top:3px;font-size:18px}.sxkd-matrix{min-width:1450px}.sxkd-matrix th{text-align:center;vertical-align:middle;padding:8px 10px}.sxkd-matrix td{padding:7px 9px;vertical-align:middle}.sxkd-matrix th:first-child{min-width:310px;text-align:left}.sxkd-matrix th:nth-child(2){min-width:75px}.sxkd-matrix th:last-child{min-width:220px}.sxkd-matrix input{min-width:125px;margin:0;padding:7px 8px;text-align:right}.sxkd-matrix .sxkd-note{text-align:left;min-width:200px}.sxkd-matrix td:nth-child(n+3){text-align:right;white-space:nowrap}.sxkd-total td{font-weight:700}.sxkd-percent{color:#315a88}.sxkd-sticky-actions{position:sticky;z-index:40;bottom:10px}.sxkd-sticky-actions form{display:flex;gap:10px}.status-submitted{background:#fff3d9;color:#8a5900}.status-approved{background:#e7f8f1;color:#087852}.status-locked{background:#edf1f6;color:#465467}
@media(max-width:850px){.sxkd-heading{display:block}.sxkd-heading-actions{margin-top:14px;align-items:stretch}.sxkd-heading-actions label{min-width:0;flex:1}.sxkd-kpis{grid-template-columns:1fr 1fr;gap:8px}.sxkd-kpis article{padding:10px 12px}.sxkd-matrix{min-width:1300px}.sxkd-matrix th:first-child{position:sticky;left:0;z-index:31;background:#fafbfc}.sxkd-matrix td:first-child{position:sticky;left:0;z-index:20;background:var(--asset-level-bg);box-shadow:2px 0 0 #dfe4eb}.sxkd-sticky-actions{bottom:6px;background:#fffffff2;padding:8px;border-radius:10px;box-shadow:0 6px 24px #10233f26}}
@media(max-width:480px){.sxkd-heading-actions{display:grid}.sxkd-kpis{grid-template-columns:1fr 1fr}.sxkd-kpis strong{font-size:15px}}
.bpf-header-tools{display:flex;align-items:end;gap:10px}.bpf-header-tools .button{white-space:nowrap;margin-bottom:1px}@media(max-width:850px){.bpf-header-tools{display:grid;grid-template-columns:1fr}.bpf-header-tools .button{text-align:center}}
.plan-pagination{display:flex;align-items:center;justify-content:center;gap:14px;margin:14px 0}.plan-pagination span{color:var(--muted)}.plan-cost-lazy{min-height:52px;padding:8px 0}.plan-cost-lazy table{width:100%}@media(max-width:600px){.plan-pagination{justify-content:space-between}.plan-pagination span{font-size:12px;text-align:center}}

/* Bảng tự thích nghi: không ép chiều rộng vượt quá vùng đang xem. */
.content{max-width:none;width:100%}.table-wrap{overflow-x:hidden}.table-wrap table{width:100%!important;min-width:0!important;max-width:100%!important;table-layout:fixed!important}.table-wrap col{width:auto!important}.table-wrap th,.table-wrap td{min-width:0!important;max-width:none!important;white-space:normal!important;overflow-wrap:anywhere;word-break:normal;hyphens:auto}.table-wrap input,.table-wrap select,.table-wrap textarea{min-width:0!important;max-width:100%}.maintenance-plan-table th:nth-child(1){width:13%}.maintenance-plan-table th:nth-child(2){width:20%}.maintenance-plan-table th:nth-child(3){width:10%}.maintenance-plan-table th:nth-child(4){width:9%}.maintenance-plan-table th:nth-child(5),.maintenance-plan-table th:nth-child(6),.maintenance-plan-table th:nth-child(7){width:13%}.maintenance-plan-table th:nth-child(8){width:8%}.maintenance-plan-table th:nth-child(9){width:4%}.record-tabs,.bpf-progress{scrollbar-width:none}.record-tabs::-webkit-scrollbar,.bpf-progress::-webkit-scrollbar{display:none}
@media(max-width:1200px){.table-wrap th,.table-wrap td{padding:6px 7px!important;font-size:13px}.table-wrap .button,.table-wrap button{padding:6px 8px;font-size:12px}.maintenance-plan-table th:nth-child(n){width:auto}}
@media(max-width:850px){
 .table-wrap{max-height:none!important;overflow:visible!important;margin-left:0!important;margin-right:0!important;background:transparent;border:0;box-shadow:none}.table-wrap:after{display:none!important}
 .responsive-card-table{display:block!important;background:transparent}.responsive-card-table colgroup,.responsive-card-table>thead{display:none}.responsive-card-table>tbody{display:grid;gap:10px}.responsive-card-table>tbody>tr{display:block;border:1px solid var(--line);border-radius:10px;background:#fff;overflow:hidden;box-shadow:0 2px 9px #1720330b}.responsive-card-table>tbody>tr[hidden]{display:none}.responsive-card-table>tbody>tr>td{display:grid;grid-template-columns:minmax(105px,38%) minmax(0,1fr);gap:10px;width:100%!important;padding:9px 11px!important;border-bottom:1px solid var(--line);text-align:left!important;background:transparent}.responsive-card-table>tbody>tr>td:last-child{border-bottom:0}.responsive-card-table>tbody>tr>td::before{content:attr(data-label);font-size:12px;font-weight:700;color:var(--muted);line-height:1.35}.responsive-card-table>tbody>tr>td[data-label=""]::before{display:none}.responsive-card-table>tbody>tr>td[colspan]{display:block}.responsive-card-table .row-actions{display:flex;justify-content:flex-end;flex-wrap:wrap}.responsive-card-table input,.responsive-card-table select,.responsive-card-table textarea{width:100%}
 .bpf-sheet table{font-size:10px!important}.bpf-sheet td{padding:4px!important}.bpf-sheet input{padding:4px!important;font-size:10px}.bpf-sheet .bpf-title-cell{font-size:12px!important}
}
.bpf-header{display:flex;justify-content:space-between;gap:24px;align-items:end;margin-bottom:12px}.bpf-header h2{margin:4px 0}.bpf-header p{margin:0;color:var(--muted)}.bpf-header label{min-width:310px;margin:0}.bpf-progress{display:flex;gap:5px;overflow:auto;margin-bottom:12px;padding-bottom:4px}.bpf-progress a{flex:0 0 31px;height:31px;display:grid;place-items:center;border-radius:7px;background:#e8edf4;color:#445268;text-decoration:none;font-size:12px}.bpf-progress a.active{background:var(--blue);color:#fff;font-weight:700}.bpf-cost-editor{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:12px;border-left:5px solid var(--blue)}.bpf-cost-editor h3,.bpf-cost-editor p{margin:0}.bpf-cost-editor p{margin-top:4px;color:var(--muted)}.bpf-cost-editor .button{white-space:nowrap}.bpf-sheet{max-height:68vh}.bpf-sheet table{min-width:1100px;table-layout:fixed}.bpf-sheet td{min-width:120px;padding:8px 10px;white-space:normal;line-height:1.35;vertical-align:middle}.bpf-sheet td:first-child{width:65px}.bpf-sheet td:nth-child(2){width:360px}.bpf-sheet tr:first-child td,.bpf-sheet tr:nth-child(2) td{font-weight:700}.bpf-sheet .bpf-label{background:#f8fafc}.bpf-sheet .bpf-formula{background:#f0f2f5;text-align:right;color:#334155;font-variant-numeric:tabular-nums}.bpf-sheet .bpf-input{background:#eef8ff}.bpf-sheet .bpf-merged{width:auto;max-width:none;white-space:normal}.bpf-sheet .bpf-title-cell{text-align:center!important;font-size:17px;font-weight:800!important;line-height:1.45;padding:13px 18px;background:#f4f8fd;color:#173b68}.bpf-sheet input{min-width:110px;margin:0;padding:7px 8px;text-align:right;background:#fff;font-variant-numeric:tabular-nums}.bpf-actions{position:sticky;bottom:8px;z-index:40;background:#fffffff0;padding:8px;border-radius:10px;box-shadow:0 6px 24px #10233f20}
@media(max-width:850px){.bpf-header{display:block}.bpf-header label{min-width:0;margin-top:12px}.bpf-cost-editor{display:block}.bpf-cost-editor .button{margin-top:12px;width:100%}.bpf-sheet{max-height:64vh}.bpf-sheet table{min-width:1000px}.bpf-sheet td:nth-child(2):not(.bpf-merged){position:sticky;left:0;z-index:15;min-width:280px;max-width:280px;background:#f8fafc;box-shadow:2px 0 #dfe4eb}.bpf-sheet .bpf-title-cell{font-size:15px}.bpf-actions{justify-content:stretch}.bpf-actions .button,.bpf-actions button{flex:1}}

/* Quy chuẩn chung: tiêu đề bảng gọn, kiểu câu và hàng dữ liệu vừa nội dung. */
body .table-wrap table th{padding:7px 9px;text-align:center!important;vertical-align:middle!important;color:#000!important;text-transform:none!important;line-height:1.25}
body .table-wrap table td{padding:7px 9px;vertical-align:middle;line-height:1.3}
.plan-module-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}.plan-module-tabs a{display:inline-flex;align-items:center;min-height:42px;padding:8px 16px;border-radius:10px;background:#edf1f6;color:#111;text-decoration:none}.plan-module-tabs a.active{background:#1677ff;color:#fff}.plan-module-tabs a:hover{text-decoration:none;filter:brightness(.98)}
.table-wrap{max-height:none!important;overflow-x:hidden!important;overflow-y:visible!important;scrollbar-width:none}.table-wrap::-webkit-scrollbar{display:none}
/*
 * TÙY CHỈNH ĐỘ RỘNG CÁC CỘT BẢNG KẾ HOẠCH BẢO TRÌ
 * Chỉ cần thay đổi tỷ lệ phần trăm bên dưới. Tổng 08 cột nên bằng 100%.
 */
.maintenance-plan-table col.maintenance-col-code { width: 13% !important; }       /* Cột 1: Mã công trình/gói thầu */
.maintenance-plan-table col.maintenance-col-name { width: 21% !important; }       /* Cột 2: Tên công trình/gói thầu */
.maintenance-plan-table col.maintenance-col-type { width: 10% !important; }       /* Cột 3: Loại bảo trì */
.maintenance-plan-table col.maintenance-col-last-year { width: 10% !important; }  /* Cột 4: Năm sửa chữa gần nhất */
.maintenance-plan-table col.maintenance-col-condition { width: 14% !important; }  /* Cột 5: Hiện trạng công trình */
.maintenance-plan-table col.maintenance-col-content { width: 14% !important; }    /* Cột 6: Nội dung bảo trì */
.maintenance-plan-table col.maintenance-col-quantity { width: 10% !important; }   /* Cột 7: Dự kiến khối lượng */
.maintenance-plan-table col.maintenance-col-cost { width: 8% !important; }        /* Cột 8: Dự kiến kinh phí */
.maintenance-total{text-align:right!important;font-variant-numeric:tabular-nums}.maintenance-total b{white-space:nowrap}

/* Kiểm tra công trình: sửa tỷ lệ tại đây nếu cần, tổng 06 cột bằng 100%. */
.inspection-result-table col.inspection-col-item { width: 22% !important; }       /* Cột 1: Tên hạng mục */
.inspection-result-table col.inspection-col-year { width: 10% !important; }       /* Cột 2: Năm xây dựng/bảo trì */
.inspection-result-table col.inspection-col-spec { width: 18% !important; }       /* Cột 3: Kích thước/thông số kỹ thuật */
.inspection-result-table col.inspection-col-condition { width: 18% !important; }  /* Cột 4: Hiện trạng công trình */
.inspection-result-table col.inspection-col-conclusion { width: 19% !important; } /* Cột 5: Kết luận/Đề xuất */
.inspection-result-table col.inspection-col-note { width: 13% !important; }       /* Cột 6: Ghi chú */
.inspection-tabs{margin-bottom:12px}.inspection-admin{margin-bottom:12px}.inspection-admin>summary{cursor:pointer;padding:3px}.inspection-admin-grid{margin-top:12px}.inspection-station-table{margin-top:10px;max-height:350px!important}.station-grants{max-height:470px;overflow:auto;margin:8px 0 12px;border:1px solid var(--line);border-radius:9px}.station-grants>div{padding:8px 10px;border-bottom:1px solid var(--line)}.station-grants label{display:inline-flex;align-items:center;gap:5px;margin:3px 14px 0 0;font-weight:400}.station-grants input[type=checkbox]{width:18px;height:18px;margin:0}.inspection-item-form{grid-template-columns:minmax(190px,.8fr) minmax(230px,1fr) minmax(150px,.6fr) minmax(250px,1.1fr)}.inspection-item-form textarea{min-height:38px}.inspection-catalog-table th:nth-child(1){width:13%}.inspection-catalog-table th:nth-child(2){width:25%}.inspection-catalog-table th:nth-child(3){width:8%}.inspection-catalog-table th:nth-child(4){width:11%}.inspection-catalog-table th:nth-child(5){width:22%}.inspection-catalog-table th:nth-child(6){width:9%}.inspection-catalog-table th:nth-child(7){width:12%}.inspection-report-list th:nth-child(1){width:31%}.inspection-report-list th:nth-child(2){width:14%}.inspection-report-list th:nth-child(3){width:13%}.inspection-report-list th:nth-child(4){width:10%}.inspection-report-list th:nth-child(5){width:12%}.inspection-report-list th:nth-child(6){width:9%}.inspection-report-list th:nth-child(7){width:11%}.inspection-report-list td small{display:block;color:var(--muted);margin-top:3px}.clone-report{position:relative}.clone-report summary{cursor:pointer;color:var(--blue)}.clone-report form{position:absolute;right:0;z-index:50;width:240px;padding:12px;background:#fff;border:1px solid var(--line);border-radius:9px;box-shadow:0 10px 30px #0002}.inspection-report-heading{display:flex;justify-content:space-between;align-items:center;gap:12px}.inspection-report-heading .actions{margin:0}.inspection-report-heading form,.inspection-meta form{display:inline-flex}.inspection-summary{margin-bottom:12px}.inspection-meta{margin-bottom:12px}.inspection-meta p{margin:5px 0}.inspection-result-wrap{overflow-x:auto!important}.inspection-result-table{min-width:1280px!important;table-layout:fixed!important}.inspection-result-table th,.inspection-result-table td{vertical-align:top!important}.inspection-result-table input,.inspection-result-table textarea{width:100%;margin:0;padding:6px 7px}.inspection-result-table textarea{resize:vertical;min-height:55px}.inspection-station-heading td{position:sticky;top:35px;z-index:20;background:#dfeaf7!important;color:#173b68!important;font-weight:700;padding:7px 10px!important}.inspection-item-name{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.inspection-item-name .asset-level-badge{min-width:auto;padding:2px 7px}.inspection-detail-toggle{font-size:13px}.inspection-skip{display:flex;align-items:center;gap:5px;margin:7px 0 4px;font-size:13px;font-weight:400}.inspection-skip input{width:18px;height:18px}.inspection-skip-reason{font-size:13px}.inspection-skipped{opacity:.72}.inspection-save-state{display:block;margin-top:4px;color:#637083;font-size:11px}.inspection-save-state.error-text{color:#c51f32}.inspection-detail-container>td{background:#f5f8fc!important;padding:10px!important}.inspection-detail-box{border-left:5px solid #6b93c5;padding-left:12px}.inspection-detail-box h3{margin:0 0 8px}.inspection-detail-box table{min-width:1250px!important;background:#fff}.inspection-detail-box th:first-child{width:45px}.inspection-detail-box th:nth-child(2){width:220px}.inspection-detail-box th:nth-child(3){width:120px}.inspection-detail-box th:nth-child(n+4):nth-child(-n+7){width:190px}.inspection-detail-box th:last-child{width:85px}.inspection-detail-box label{font-size:12px;font-weight:400}.inspection-detail-new td{background:#eef7ff!important}.status-dang_lap{background:#e8f1ff;color:#1459a6}.status-hoan_thanh{background:#e7f8f1;color:#087852}.status-da_khoa{background:#edf1f6;color:#465467}
.inspection-auto-fit,.auto-fit-table{width:100%!important;table-layout:fixed!important}.inspection-auto-fit th,.inspection-auto-fit td,.auto-fit-table th,.auto-fit-table td{overflow-wrap:anywhere;word-break:normal}.inspection-auto-fit input,.inspection-auto-fit textarea,.inspection-auto-fit select,.auto-fit-table input,.auto-fit-table textarea,.auto-fit-table select{min-width:0!important;max-width:100%}.inspection-auto-fit .row-actions,.auto-fit-table .row-actions{white-space:normal;flex-wrap:wrap;align-items:flex-start}
.inspection-files{display:flex;gap:5px;flex-wrap:wrap;margin-top:6px}.inspection-files>span{display:inline-flex;align-items:center;gap:2px;padding:2px 5px;background:#fff;border:1px solid #ccd8e7;border-radius:6px;font-size:11px}.inspection-files>span a{text-decoration:none;max-width:145px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.inspection-files>span button{min-height:0!important;padding:0 2px!important}.inspection-upload{display:inline-flex}.inspection-upload label{display:inline-flex;margin:0;padding:3px 7px;border:1px dashed currentColor;border-radius:6px;cursor:pointer;font-size:11px}.inspection-upload input[type=file]{display:none}
.inspection-permission-page{max-width:1200px}.inspection-account-picker{max-width:520px;margin-bottom:14px}.inspection-module-grants{padding:12px 0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);margin-bottom:12px}.permission-check-grid{display:grid;grid-template-columns:repeat(6,minmax(115px,1fr));gap:8px}.permission-check-grid label{display:flex;align-items:center;gap:6px;padding:8px;border:1px solid var(--line);border-radius:8px;font-weight:400}.permission-check-grid input,.inspection-station-grants input{width:18px;height:18px;margin:0}.inspection-station-grants>div{display:grid;grid-template-columns:minmax(260px,1.4fr) repeat(3,minmax(130px,.7fr));align-items:center;gap:8px}.inspection-station-grants label{display:flex;align-items:center;gap:5px;margin:0;font-weight:400}
@media(max-width:1100px){.inspection-item-form{grid-template-columns:1fr 1fr}.inspection-admin-grid{grid-template-columns:1fr}.inspection-report-heading{align-items:stretch;flex-direction:column}.inspection-report-heading .actions{width:100%;flex-wrap:wrap}.permission-check-grid{grid-template-columns:repeat(3,1fr)}.inspection-station-grants>div{grid-template-columns:1fr 1fr}}
@media(max-width:650px){.inspection-item-form{grid-template-columns:1fr}.inspection-result-table{min-width:0!important}.inspection-result-wrap{overflow:visible!important}.inspection-station-heading td{position:static}.inspection-detail-box{padding-left:7px}.inspection-detail-box table{min-width:0!important}}
.project-list-table th:nth-child(1){width:60%}.project-list-table th:nth-child(2){width:8%}.project-list-table th:nth-child(3){width:10%}.project-list-table th:nth-child(4){width:10%}.project-list-table th:nth-child(5){width:5%}.project-list-table th:nth-child(6){width:7%}
.project-list-table td:nth-child(2),.project-list-table td:nth-child(6){text-align:center}.project-list-table td:nth-child(3),.project-list-table td:nth-child(4){text-align:right;font-variant-numeric:tabular-nums}.money-value,.numeric-value{text-align:right!important;font-variant-numeric:tabular-nums}.money-value input,.numeric-value input,input.system-number-input,input.money-input,input.public-service-money,input.qldn-money,input.detail-price,input.detail-amount,input[data-money-ready="1"]{text-align:right!important;font-variant-numeric:tabular-nums}
.project-bulk-actions{flex-wrap:wrap}.project-import-tools{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:850px){.project-bulk-actions{display:grid;width:100%;grid-template-columns:1fr 1fr}.project-bulk-actions .button{width:100%}.project-import-tools{display:grid}.project-import-tools .button{width:100%}}@media(max-width:480px){.project-bulk-actions{grid-template-columns:1fr}}
.employee-edit{max-width:none}.employee-permissions{grid-column:1/-1;width:100%;margin-top:18px;padding-top:18px;border-top:1px solid var(--line)}.employee-permissions>label{max-width:720px}.permission-presets{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.permission-matrix{width:100%!important;table-layout:fixed!important}.permission-matrix th,.permission-matrix td{overflow-wrap:normal!important;word-break:keep-all!important;hyphens:none!important}.permission-matrix th:first-child,.permission-matrix td:first-child{text-align:left!important;width:28%}.permission-matrix th:not(:first-child),.permission-matrix td:not(:first-child){width:12%;text-align:center!important}.permission-matrix input[type=checkbox]{width:20px;height:20px;margin:0}.audit-filters{margin-bottom:14px}.audit-filters .actions{grid-column:1/-1}.audit-table th:nth-child(1){width:13%}.audit-table th:nth-child(2){width:15%}.audit-table th:nth-child(3){width:13%}.audit-table th:nth-child(4){width:9%}.audit-table th:nth-child(5){width:15%}.audit-table th:nth-child(6){width:10%}.audit-table th:nth-child(7){width:25%}.audit-table details summary{cursor:pointer;color:var(--blue)}.audit-diff{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:8px 0}.audit-diff pre{max-height:250px;overflow:auto;white-space:pre-wrap;overflow-wrap:anywhere;padding:8px;background:#f6f8fb;border-radius:7px;font-size:11px}.pagination{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:12px}.pagination>div{display:flex;gap:8px}@media(max-width:850px){.permission-matrix th,.permission-matrix td{word-break:normal!important}.audit-diff{grid-template-columns:1fr}.pagination{align-items:stretch;flex-direction:column}}

/* Nhịp hiển thị gọn dùng chung toàn phần mềm. */
body:not(.public) main>header{height:76px;padding:11px 22px}body:not(.public) main>header h1{margin:1px 0;font-size:21px}.content{padding:16px 20px}.panel:not(.table-wrap){padding:14px}.toolbar{margin-bottom:8px;align-items:center}.toolbar .actions{margin-top:0}h2{margin-bottom:8px}label{margin:6px 0 3px}input,textarea,select{padding:7px 9px;margin-top:3px}.grid{gap:10px 12px}.actions{margin-top:10px}.back{margin-bottom:8px}.stats{gap:12px;margin-top:12px}.two-cols{gap:12px}.record-tabs{margin-bottom:12px}.catalog-editor-heading{margin-bottom:8px}.plan-list-controls{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}.plan-list-controls .plan-module-tabs{margin:0}.plan-module-tabs{margin-bottom:10px}.plan-module-tabs a{min-height:38px;padding:7px 14px}.employee-permissions{margin-top:12px;padding-top:12px}.permission-presets{margin:8px 0}body .table-wrap table th,body .table-wrap table td{padding:6px 8px}@media(max-width:850px){body:not(.public) main>header{height:auto;padding:11px 14px}.content{padding:12px}.panel:not(.table-wrap){padding:12px}.plan-list-controls{align-items:stretch;flex-direction:column}.plan-list-controls button{align-self:flex-end}.plan-module-tabs{gap:6px}.plan-module-tabs a{min-height:40px;padding:7px 11px}.button,button{min-height:40px}}

/* Ma trận kế hoạch: ưu tiên nội dung chỉ tiêu, chia đều các cột số và ẩn ghi chú chi tiết. */
.sxkd-matrix th:first-child{width:36%!important;min-width:0!important}.sxkd-matrix thead tr:first-child th:last-child,.sxkd-matrix tbody td:last-child{display:none}.sxkd-matrix input{width:100%;min-width:0!important}.sxkd-matrix td:first-child{overflow-wrap:normal!important;word-break:normal!important;text-align:left!important}.sxkd-matrix th:nth-child(n+2),.sxkd-matrix td:nth-child(n+2){text-align:right}@media(max-width:850px){.sxkd-matrix th:first-child{width:40%!important}}
.plan-form-tabs{margin-top:-3px;padding:7px 0 9px;border-top:1px solid var(--line)}.plan-form-tabs a{min-width:55px;min-height:34px!important;justify-content:center;padding:5px 10px!important;font-weight:700}.plan-context-years{align-items:center!important;flex-wrap:wrap}.plan-context-year-label{font-weight:700;white-space:nowrap}.plan-context-years .active-year{box-shadow:0 0 0 2px #1677ff33}.plan-context-bm-tabs{margin-bottom:12px;padding:8px 0;border-top:0;border-bottom:1px solid var(--line)}.plan-context-bm-tabs a.active{background:var(--blue);color:#fff;box-shadow:0 0 0 2px #1677ff33}.sxkd-matrix-with-stt th:first-child{width:5%!important}.sxkd-matrix-with-stt th:nth-child(2){width:31%!important;min-width:0!important}.sxkd-matrix-with-stt tbody td:first-child{text-align:center!important;white-space:nowrap}.sxkd-matrix-with-stt tbody td:nth-child(2){text-align:left!important;overflow-wrap:normal!important;word-break:normal!important}.sxkd-matrix-with-stt th:nth-child(n+3),.sxkd-matrix-with-stt td:nth-child(n+3){text-align:right}@media(max-width:850px){.plan-context-year-label{width:100%}.sxkd-matrix-with-stt th:first-child{width:7%!important}.sxkd-matrix-with-stt th:nth-child(2){width:36%!important}}

/* Chuẩn bảng lập kế hoạch 07 cột — tổng chiều rộng đúng 100%. */
.plan-seven-column-table{width:100%!important;table-layout:fixed!important}.plan-seven-column-table col.plan-col-stt{width:6%!important}.plan-seven-column-table col.plan-col-content{width:34%!important}.plan-seven-column-table col.plan-col-previous-plan{width:13%!important}.plan-seven-column-table col.plan-col-previous-actual{width:13%!important}.plan-seven-column-table col.plan-col-previous-percent{width:10%!important}.plan-seven-column-table col.plan-col-current-plan{width:14%!important}.plan-seven-column-table col.plan-col-current-percent{width:10%!important}.plan-seven-column-table thead th{text-align:center!important;vertical-align:middle!important;overflow-wrap:normal!important;word-break:normal!important}.plan-seven-column-table tbody td:nth-child(1){text-align:center!important}.plan-seven-column-table tbody td:nth-child(2){text-align:left!important;overflow-wrap:normal!important;word-break:normal!important}.plan-seven-column-table tbody td:nth-child(n+3){text-align:right!important;font-variant-numeric:tabular-nums}.plan-seven-column-table tfoot th:nth-child(n+3){text-align:right!important;font-variant-numeric:tabular-nums}.plan-seven-column-table input{width:100%;min-width:0!important;text-align:right!important}
.plan-without-stt-table{width:100%!important;table-layout:fixed!important}.plan-without-stt-table col.plan-col-content{width:36%!important}.plan-without-stt-table col.plan-col-previous-plan{width:14%!important}.plan-without-stt-table col.plan-col-previous-actual{width:14%!important}.plan-without-stt-table col.plan-col-previous-percent{width:10%!important}.plan-without-stt-table col.plan-col-current-plan{width:16%!important}.plan-without-stt-table col.plan-col-current-percent{width:10%!important}.plan-without-stt-table thead th{text-align:center!important;vertical-align:middle!important;overflow-wrap:normal!important;word-break:normal!important}.plan-without-stt-table tbody td:first-child{text-align:left!important;overflow-wrap:normal!important;word-break:normal!important}.plan-without-stt-table tbody td:nth-child(n+2),.plan-without-stt-table tfoot th:nth-child(n+2){text-align:right!important;font-variant-numeric:tabular-nums}.plan-without-stt-table input{width:100%;min-width:0!important;text-align:right!important}

/* ĐỘ RỘNG BẢNG DANH MỤC KHOẢN CHI: có thể sửa các tỷ lệ dưới đây, tổng phải bằng 100%. */
.expense-catalog-table { width: 100% !important; table-layout: fixed !important; }
.expense-catalog-table col.expense-col-priority { width: 6% !important; }  /* Cột 1: Ưu tiên */
.expense-catalog-table col.expense-col-code { width: 10% !important; }     /* Cột 2: Mã */
.expense-catalog-table col.expense-col-name { width: 25% !important; }     /* Cột 3: Tên khoản chi */
.expense-catalog-table col.expense-col-level { width: 8% !important; }     /* Cột 4: Cấp */
.expense-catalog-table col.expense-col-parent { width: 22% !important; }   /* Cột 5: Cấp trên */
.expense-catalog-table col.expense-col-status { width: 10% !important; }   /* Cột 6: Trạng thái */
.expense-catalog-table col.expense-col-actions { width: 19% !important; }  /* Cột 7: Các nút thao tác */
.expense-catalog-table td:nth-child(1),
.expense-catalog-table td:nth-child(4),
.expense-catalog-table td:nth-child(6) { text-align: center !important; }
.expense-catalog-table td:nth-child(3),
.expense-catalog-table td:nth-child(5) { overflow-wrap: normal !important; word-break: normal !important; }
.expense-catalog-table td:last-child { white-space: normal !important; }
.expense-catalog-table td:last-child.row-actions { justify-content: flex-end; flex-wrap: wrap; }
.expense-tree-row[hidden] { display: none !important; }
.expense-tree-toggle { display: inline-flex; align-items: center; gap: 4px; margin: 0 8px 3px 0; padding: 3px 7px; border: 1px solid currentColor; border-radius: 999px; background: rgba(255,255,255,.75); color: inherit; font: inherit; font-size: .82em; line-height: 1.2; cursor: pointer; white-space: nowrap; }
.expense-tree-toggle:hover { background: #fff; }
.expense-tree-toggle [aria-hidden] { display: inline-block; width: 12px; font-weight: 700; }

/* Toàn hệ thống không dùng gạch chân để biểu thị liên kết. Màu chữ, nút và trạng thái hover vẫn giữ
   nguyên để người dùng nhận biết vị trí có thể bấm. */
a, a:link, a:visited, a:hover, a:focus, a:active, button.link, .link, summary, u, ins { text-decoration: none !important; }

/* BM10 - Trích bảo hiểm: 11 cột, giữ đủ tên cột và cho phép cuộn ngang trên màn hình nhỏ. */
.bm10-heading h2{margin-bottom:5px;text-align:center;font-size:18px}.bm10-heading p{margin:0;text-align:center}.bm10-table-wrap{overflow-x:auto!important}.bm10-plan-table{min-width:1700px!important;table-layout:fixed!important}.bm10-plan-table th,.bm10-plan-table td{text-align:center!important}.bm10-plan-table th:first-child{width:90px}.bm10-plan-table th:last-child{width:220px}.bm10-plan-table input{min-width:105px;margin:0;text-align:right}.bm10-plan-table .bm10-note{min-width:200px;text-align:left}.bm10-plan-table .bm06-computed{font-variant-numeric:tabular-nums;white-space:nowrap}.bm10-plan-table tfoot th{background:#eef4fb;font-weight:700}.bm10-plan-table tfoot th:first-child{text-align:right!important}
.plan-context-bar{display:flex;align-items:center;justify-content:space-between;gap:14px;margin-bottom:10px}.plan-context-bar>div:first-child{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.plan-context-bar .eyebrow{width:100%}.plan-context-bar .row-actions{justify-content:flex-end;flex-wrap:wrap}@media(max-width:900px){.plan-context-bar{align-items:stretch;flex-direction:column}.plan-context-bar .row-actions{justify-content:flex-start}}

/* Chuẩn bảng có khung và khoảng đệm gọn như BM15. Áp dụng cho mọi bảng nghiệp vụ đặt trong
   table-wrap: các ô liền nhau, không còn khoảng trắng giả giữa cột và vẫn đủ chỗ đọc/nhập số liệu. */
body:not(.public) .table-wrap table{border-collapse:collapse!important;border-spacing:0!important}
body:not(.public) .table-wrap table th,
body:not(.public) .table-wrap table td{border:1px solid #111!important;padding:4px 5px!important;box-shadow:none!important}
body:not(.public) .table-wrap table input,
body:not(.public) .table-wrap table select,
body:not(.public) .table-wrap table textarea{margin:0!important;padding:4px 5px!important;border-radius:2px!important}
body:not(.public) .table-wrap table .row-actions{gap:4px!important}
body:not(.public) .table-wrap table .button,
body:not(.public) .table-wrap table button{padding:4px 7px!important;min-height:0}
/* Khi table-wrap đồng thời là panel, không vẽ thêm viền/bo góc bên ngoài vì sẽ chồng lên
   viền 1px của các ô ở hàng đầu, cột đầu và cột cuối. */
body:not(.public) .panel.table-wrap{border:0!important;border-radius:0!important}
body:not(.public) .table-wrap thead th{box-shadow:none!important}
/* Không cho các lớp bố trí nút biến TD thành flex ở giao diện bảng. TD phải luôn giữ display:table-cell
   để chiều cao và đường viền của ô bằng đúng chiều cao toàn dòng. */
@media(min-width:851px){
 body:not(.public) .table-wrap td.row-actions,
 body:not(.public) .table-wrap .plan-cost-entry td:last-child{display:table-cell!important;vertical-align:middle!important;white-space:normal!important;text-align:right!important}
 body:not(.public) .table-wrap td.row-actions>a,
 body:not(.public) .table-wrap td.row-actions>form,
 body:not(.public) .table-wrap td.row-actions>button,
 body:not(.public) .table-wrap td.row-actions>span,
 body:not(.public) .table-wrap .plan-cost-entry td:last-child>*{display:inline-flex!important;vertical-align:middle;margin:2px 0 2px 5px!important}
}
/* Giữ phần thụt cấp nghiệp vụ; chỉ bỏ khoảng đệm thừa của các ô thông thường. */
body:not(.public) .table-wrap .asset-level-row td:first-child{border-left:1px solid #111!important}
body:not(.public) .table-wrap .qldn-detail-page .detail-level-2 td:nth-child(2),
body:not(.public) .table-wrap.qldn-detail-page .detail-level-2 td:nth-child(2){padding-left:28px!important}
body:not(.public) .table-wrap .qldn-detail-page .detail-level-3 td:nth-child(2),
body:not(.public) .table-wrap.qldn-detail-page .detail-level-3 td:nth-child(2){padding-left:48px!important}
body:not(.public) .table-wrap .qldn-detail-page .detail-level-4 td:nth-child(2),
body:not(.public) .table-wrap.qldn-detail-page .detail-level-4 td:nth-child(2){padding-left:68px!important}
body:not(.public) .table-wrap .qldn-detail-page .detail-level-5 td:nth-child(2),
body:not(.public) .table-wrap.qldn-detail-page .detail-level-5 td:nth-child(2){padding-left:88px!important}
.payroll-row-tools{display:flex;flex-wrap:wrap;gap:4px 10px;margin-top:4px;font-size:.82rem}.payroll-row-tools .link{padding:0;border:0;background:transparent}.payroll-row-tools .danger-link{color:#b42318}.asset-level-row input[readonly]{background:rgba(255,255,255,.45)!important;font-weight:700;cursor:not-allowed}
/* Không hiển thị chữ gợi ý mờ trong các ô nhập liệu. */
input::placeholder,textarea::placeholder{color:transparent!important;opacity:0!important}

/* ==========================================================================
   PHÂN HỆ TÀI CHÍNH — ĐỘ RỘNG CỘT THEO NỘI DUNG
   --------------------------------------------------------------------------
   Rule toàn cục phía trên ép mọi bảng về `table-layout:fixed` + `width:100%`
   đồng thời xóa mọi độ rộng cột đã khai báo (`.table-wrap col{width:auto!important}`).
   Khi không còn độ rộng nào, trình duyệt chia ĐỀU các cột: cột ngắn (ngày, mã,
   số tiền) chiếm chỗ quá lớn nên chữ trong dòng bị đẩy xa nhau và thừa khoảng
   trắng. Khối này khôi phục tỷ lệ cột theo nội dung cho RIÊNG các bảng thuộc
   phân hệ Tài chính. Bảng vẫn nằm gọn trong bề rộng khung, không cuộn ngang.
   Muốn chỉnh: sửa tỷ lệ % bên dưới; tổng các cột của mỗi bảng phải bằng 100%.
   ========================================================================== */

/* --- 1. Danh mục kho / nhóm VTHH (inventory-catalogs.php) — 4 cột -------------
   Mã | Tên | Trạng thái | thao tác                                        */
body:not(.public) .table-wrap table.finance-catalog-table th:nth-child(1){width:18%!important}
body:not(.public) .table-wrap table.finance-catalog-table th:nth-child(2){width:52%!important}
body:not(.public) .table-wrap table.finance-catalog-table th:nth-child(3){width:18%!important}
body:not(.public) .table-wrap table.finance-catalog-table th:nth-child(4){width:12%!important}

/* --- 2. Danh sách chứng từ kho (warehouse-vouchers.php) — 9 cột --------------
   Ngày | Số chứng từ | Kho xuất | Kho nhập | Diễn giải | Số lượng | Giá trị |
   Trạng thái | thao tác                                                       */
body:not(.public) .table-wrap table.finance-stock-list-table th:nth-child(1){width:9%!important}
body:not(.public) .table-wrap table.finance-stock-list-table th:nth-child(2){width:9%!important}
body:not(.public) .table-wrap table.finance-stock-list-table th:nth-child(3){width:13%!important}
body:not(.public) .table-wrap table.finance-stock-list-table th:nth-child(4){width:13%!important}
body:not(.public) .table-wrap table.finance-stock-list-table th:nth-child(5){width:24%!important}
body:not(.public) .table-wrap table.finance-stock-list-table th:nth-child(6){width:8%!important}
body:not(.public) .table-wrap table.finance-stock-list-table th:nth-child(7){width:11%!important}
body:not(.public) .table-wrap table.finance-stock-list-table th:nth-child(8){width:8%!important}
body:not(.public) .table-wrap table.finance-stock-list-table th:nth-child(9){width:5%!important}

/* --- 3. Danh sách phiếu thu/chi, tiền gửi (cash-vouchers, bank-vouchers) — 12 cột
   Khôi phục đúng tỷ lệ thiết kế gốc (.voucher-list-table col, dòng 37) nhưng
   quy về % để bảng vừa khung thay vì cố định 1900px.                            */
body:not(.public) .table-wrap table.voucher-list-table col:nth-child(1){width:6.4%!important}
body:not(.public) .table-wrap table.voucher-list-table col:nth-child(2){width:6.4%!important}
body:not(.public) .table-wrap table.voucher-list-table col:nth-child(3){width:10.6%!important}
body:not(.public) .table-wrap table.voucher-list-table col:nth-child(4){width:18.4%!important}
body:not(.public) .table-wrap table.voucher-list-table col:nth-child(5){width:5%!important}
body:not(.public) .table-wrap table.voucher-list-table col:nth-child(6){width:5%!important}
body:not(.public) .table-wrap table.voucher-list-table col:nth-child(7){width:7.5%!important}
body:not(.public) .table-wrap table.voucher-list-table col:nth-child(8){width:9.5%!important}
body:not(.public) .table-wrap table.voucher-list-table col:nth-child(9){width:9.5%!important}
body:not(.public) .table-wrap table.voucher-list-table col:nth-child(10){width:10.3%!important}
body:not(.public) .table-wrap table.voucher-list-table col:nth-child(11){width:7%!important}
body:not(.public) .table-wrap table.voucher-list-table col:nth-child(12){width:4.4%!important}

/* --- 4. Lưới hạch toán của phiếu thu/chi, tiền gửi — 10 cột -----------------
   STT | Diễn giải | TK Nợ | TK Có | Số tiền | TK ngân hàng | Khoản mục chi phí
   | Công trình | Mã thống kê | thao tác
   Dùng :not(.stock-lines) để không đụng bảng nhập kho (mục 5).                 */
body:not(.public) .table-wrap table.voucher-lines:not(.stock-lines) th:nth-child(1){width:4%!important}
body:not(.public) .table-wrap table.voucher-lines:not(.stock-lines) th:nth-child(2){width:21%!important}
body:not(.public) .table-wrap table.voucher-lines:not(.stock-lines) th:nth-child(3){width:8%!important}
body:not(.public) .table-wrap table.voucher-lines:not(.stock-lines) th:nth-child(4){width:8%!important}
body:not(.public) .table-wrap table.voucher-lines:not(.stock-lines) th:nth-child(5){width:10%!important}
body:not(.public) .table-wrap table.voucher-lines:not(.stock-lines) th:nth-child(6){width:13%!important}
body:not(.public) .table-wrap table.voucher-lines:not(.stock-lines) th:nth-child(7){width:12%!important}
body:not(.public) .table-wrap table.voucher-lines:not(.stock-lines) th:nth-child(8){width:12%!important}
body:not(.public) .table-wrap table.voucher-lines:not(.stock-lines) th:nth-child(9){width:8%!important}
body:not(.public) .table-wrap table.voucher-lines:not(.stock-lines) th:nth-child(10){width:4%!important}

/* --- 5. Lưới hàng hóa của phiếu kho (warehouse-vouchers.php) ----------------
   Số cột THAY ĐỔI theo loại phiếu: 7 cột với Nhập kho/Số dư đầu kỳ (có cột
   "Đơn giá nhập"), 6 cột với Xuất kho/Chuyển kho.
   STT | Mã hàng - Tên hàng | ĐVT | Số lượng | [Đơn giá nhập] | Diễn giải dòng | thao tác
   Vì vậy cột "Diễn giải dòng" được bám bằng :nth-last-child(2) — luôn đúng ở
   cả hai biến thể; cột "Đơn giá nhập" (chỉ có ở biến thể 7 cột) nhận phần còn
   lại. Các rule :nth-last-child phải đứng SAU :nth-child(5) để thắng khi trùng. */
body:not(.public) .table-wrap table.stock-lines th:nth-child(1){width:5%!important}
body:not(.public) .table-wrap table.stock-lines th:nth-child(2){width:30%!important}
body:not(.public) .table-wrap table.stock-lines th:nth-child(3){width:8%!important}
body:not(.public) .table-wrap table.stock-lines th:nth-child(4){width:12%!important}
body:not(.public) .table-wrap table.stock-lines th:nth-child(5){width:12%!important}
body:not(.public) .table-wrap table.stock-lines th:nth-last-child(2){width:27%!important}
body:not(.public) .table-wrap table.stock-lines th:last-child{width:6%!important}

/* --- 6. Báo cáo kho (stock-reports.php) — mỗi chế độ xem một số cột ---------- */
/* Tồn kho nhanh — 7 cột: Kho | Mã hàng | Tên hàng | ĐVT | Tồn | Đơn giá BQ | Giá trị tồn */
body:not(.public) .table-wrap table.stock-report-balance th:nth-child(1){width:17%!important}
body:not(.public) .table-wrap table.stock-report-balance th:nth-child(2){width:12%!important}
body:not(.public) .table-wrap table.stock-report-balance th:nth-child(3){width:30%!important}
body:not(.public) .table-wrap table.stock-report-balance th:nth-child(4){width:7%!important}
body:not(.public) .table-wrap table.stock-report-balance th:nth-child(5){width:10%!important}
body:not(.public) .table-wrap table.stock-report-balance th:nth-child(6){width:12%!important}
body:not(.public) .table-wrap table.stock-report-balance th:nth-child(7){width:12%!important}
/* Tổng hợp tồn — 12 cột: 4 cột mô tả + 8 cột số liệu (Đầu kỳ/Nhập/Xuất/Cuối kỳ) */
body:not(.public) .table-wrap table.stock-report-summary th:nth-child(1){width:11%!important}
body:not(.public) .table-wrap table.stock-report-summary th:nth-child(2){width:8%!important}
body:not(.public) .table-wrap table.stock-report-summary th:nth-child(3){width:18%!important}
body:not(.public) .table-wrap table.stock-report-summary th:nth-child(4){width:5%!important}
body:not(.public) .table-wrap table.stock-report-summary th:nth-child(n+5){width:7.25%!important}
/* Sổ chi tiết — 15 cột: 9 cột mô tả + 6 cột số liệu (Nhập/Xuất/Tồn) */
body:not(.public) .table-wrap table.stock-report-detail th:nth-child(1){width:8%!important}
body:not(.public) .table-wrap table.stock-report-detail th:nth-child(2){width:6%!important}
body:not(.public) .table-wrap table.stock-report-detail th:nth-child(3){width:14%!important}
body:not(.public) .table-wrap table.stock-report-detail th:nth-child(4){width:6%!important}
body:not(.public) .table-wrap table.stock-report-detail th:nth-child(5){width:6%!important}
body:not(.public) .table-wrap table.stock-report-detail th:nth-child(6){width:6%!important}
body:not(.public) .table-wrap table.stock-report-detail th:nth-child(7){width:14%!important}
body:not(.public) .table-wrap table.stock-report-detail th:nth-child(8){width:4%!important}
body:not(.public) .table-wrap table.stock-report-detail th:nth-child(9){width:6%!important}
body:not(.public) .table-wrap table.stock-report-detail th:nth-child(n+10){width:5%!important}

/* --- 7. Chứng từ kế toán (finance-journal-vouchers.php) — 2 bảng ------------- */

/* Lưới dòng hạch toán — 7 cột:
   STT | Diễn giải | TK Nợ | TK Có | Số tiền | Công trình | thao tác */
body:not(.public) .table-wrap table.finance-journal-lines th:nth-child(1){width:5%!important}
body:not(.public) .table-wrap table.finance-journal-lines th:nth-child(2){width:25%!important}
body:not(.public) .table-wrap table.finance-journal-lines th:nth-child(3){width:10%!important}
body:not(.public) .table-wrap table.finance-journal-lines th:nth-child(4){width:10%!important}
body:not(.public) .table-wrap table.finance-journal-lines th:nth-child(5){width:14%!important}
body:not(.public) .table-wrap table.finance-journal-lines th:nth-child(6){width:31%!important}
body:not(.public) .table-wrap table.finance-journal-lines th:nth-child(7){width:5%!important}
/* Danh sách chứng từ — 6 cột:
   Ngày HT | Số chứng từ | Đối tượng | Diễn giải | Số tiền | Trạng thái */
body:not(.public) .table-wrap table.finance-journal-list th:nth-child(1){width:10%!important}
body:not(.public) .table-wrap table.finance-journal-list th:nth-child(2){width:11%!important}
body:not(.public) .table-wrap table.finance-journal-list th:nth-child(3){width:20%!important}
body:not(.public) .table-wrap table.finance-journal-list th:nth-child(4){width:32%!important}
body:not(.public) .table-wrap table.finance-journal-list th:nth-child(5){width:14%!important}
body:not(.public) .table-wrap table.finance-journal-list th:nth-child(6){width:13%!important}

/* ==========================================================================
   TIỆN ÍCH DÙNG CHUNG CHO CÁC TRANG KẾ TOÁN TỔNG HỢP
   --------------------------------------------------------------------------
   .finance-kpis và .bpf-title-cell trước đây chỉ được định nghĩa cục bộ: trong
   khối <style> của finance.php và trong phạm vi .bpf-sheet. Các trang sổ cái,
   báo cáo tài chính và kiểm tra danh mục dùng lại hai lớp này nên cần bản dùng
   chung. Bản cục bộ vẫn thắng vì được nạp sau tệp này.
   ========================================================================== */
.bpf-title-cell{text-align:center!important;font-size:17px;font-weight:800!important;line-height:1.45;padding:13px 18px;background:#f4f8fd;color:#173b68}
.finance-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:12px;margin:14px 0}
.finance-kpis>div{background:#fff;border:1px solid #dce5ee;border-radius:10px;padding:14px 16px}
.finance-kpis span,.finance-kpis small{display:block;color:#66788b;font-size:12px}
.finance-kpis b{display:block;font-size:25px;color:#153c68;margin:6px 0}
.finance-kpis .warn{border-color:#f1c27b;background:#fffaf1}
@media(max-width:850px){.finance-kpis{grid-template-columns:repeat(2,1fr)}}
@media(max-width:540px){.finance-kpis{grid-template-columns:1fr}}
