/* GENERATED FILE — run npm run build:styles after editing a source stylesheet. */
html{scrollbar-gutter:stable}
/* Preserved cascade order: styles.css -> v5.css -> v6.css -> v7.css -> v7_2.css -> v7_3.css -> v7_4.css -> v7_5.css -> v7_6.css -> v7_7.css -> v7_8.css -> v7_9.css -> v7_9_1.css -> v7_10.css -> v7_10_1.css -> v7_10_3.css -> v7_11.css -> v7_12.css -> v7_13.css -> qscm-layout.css */

/* ===== Legacy stylesheet boundary: styles.css ===== */
:root{--bg:#f3f7f8;--surface:#fff;--text:#172129;--muted:#66757f;--line:#d9e4e7;--primary:#0f766e;--primary-dark:#0b5b55;--secondary:#e6f5f2;--danger:#b42318;--warning:#b54708;--success:#067647;--blue:#175cd3;--shadow:0 12px 34px rgba(20,34,40,.08);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button,input,select,textarea{font:inherit}button{cursor:pointer}.hidden{display:none!important}.muted{color:var(--muted)}.full{width:100%}.mobile-only{display:none}.login-view{min-height:100vh;display:grid;place-items:center;padding:24px;background:radial-gradient(circle at top right,rgba(15,118,110,.16),transparent 35%),linear-gradient(135deg,#eef8f7,#f7fafb)}.login-card{width:min(450px,100%);background:var(--surface);border:1px solid var(--line);border-radius:24px;padding:32px;box-shadow:var(--shadow)}.login-card h1{margin:16px 0 4px}.login-card label,.dialog-form label{display:grid;gap:7px;margin-top:16px;font-weight:650}.brand-mark{width:58px;height:58px;border-radius:18px;display:grid;place-items:center;background:var(--primary);color:#fff;font-weight:850}.brand-mark.small{width:42px;height:42px;border-radius:13px}input,select,textarea{width:100%;border:1px solid var(--line);border-radius:11px;padding:11px 12px;background:#fff;color:var(--text)}textarea{resize:vertical}input:focus,select:focus,textarea:focus{outline:3px solid rgba(15,118,110,.13);border-color:var(--primary)}input[readonly]{background:#f4f6f7}.demo-note{margin-top:18px;padding:12px 14px;background:#f8fafb;border-radius:12px;color:var(--muted)}.app{min-height:100vh;display:grid;grid-template-columns:275px 1fr}.sidebar{position:sticky;top:0;height:100vh;background:#0b292c;color:#fff;padding:22px 16px;display:flex;flex-direction:column;gap:20px;overflow-y:auto}.sidebar-brand{display:flex;gap:12px;align-items:center;padding:0 8px}.sidebar-brand small{display:block;color:#a9c0c2;margin-top:2px}.sidebar nav{display:grid;gap:5px}.nav-btn{border:0;color:#c8d9da;background:transparent;text-align:left;padding:11px 14px;border-radius:11px}.nav-btn:hover,.nav-btn.active{background:rgba(255,255,255,.1);color:#fff}.sidebar-bottom{margin-top:auto;display:grid;gap:8px}.main{min-width:0}.topbar{min-height:82px;padding:16px 28px;background:rgba(255,255,255,.94);border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:16px;position:sticky;top:0;z-index:10;backdrop-filter:blur(10px)}.topbar h2{margin:0;font-size:1.3rem}.topbar p{margin:3px 0 0;font-size:.9rem}.user-box{display:flex;align-items:center;gap:14px;text-align:right}.user-box small{display:block;color:var(--muted)}.view{padding:26px 28px 44px}.btn{border:1px solid transparent;border-radius:10px;padding:10px 14px;font-weight:750;background:#fff}.btn.primary{background:var(--primary);color:#fff}.btn.primary:hover{background:var(--primary-dark)}.btn.secondary{background:var(--secondary);color:var(--primary-dark)}.btn.ghost{border-color:var(--line);background:transparent;color:inherit}.btn.accent{background:#d7f2ee;color:#073f3b;border-color:#84cfc5}.btn.danger{background:#fee4e2;color:var(--danger)}.sidebar .btn.ghost{border-color:rgba(255,255,255,.2);color:#fff}.btn.danger-outline{border-color:rgba(255,255,255,.28);color:#ffd5d2;background:transparent}.icon-btn{border:0;background:transparent;border-radius:8px;padding:8px;font-size:1.1rem}.file-label{text-align:center;display:block}.stats-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}.stat-card,.panel,.project-card{background:var(--surface);border:1px solid var(--line);border-radius:16px;box-shadow:0 5px 18px rgba(21,32,40,.04)}.stat-card{padding:20px}.stat-card strong{display:block;font-size:1.8rem;margin-top:6px}.stat-card small{color:var(--muted)}.panel{margin-top:18px;overflow:hidden}.panel-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 18px;border-bottom:1px solid var(--line)}.panel-header h3{margin:0}.toolbar{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.cards-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.project-card{padding:18px}.project-card h3{margin:8px 0 6px}.project-card .meta{display:grid;gap:6px;color:var(--muted);font-size:.92rem}.project-card .actions{margin-top:16px;display:flex;justify-content:space-between;align-items:center}.code-pill{display:inline-flex;padding:5px 9px;border-radius:999px;background:var(--secondary);color:var(--primary-dark);font-size:.82rem;font-weight:800}.table-wrap{overflow-x:auto}table{border-collapse:collapse;width:100%;min-width:900px}th,td{padding:12px 14px;border-bottom:1px solid var(--line);text-align:left;vertical-align:top}th{color:var(--muted);font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;background:#fbfcfc}tr:hover td{background:#fcfefe}.link-btn{border:0;background:transparent;padding:0;color:var(--primary);font-weight:800;text-align:left}.status{display:inline-flex;align-items:center;padding:6px 9px;border-radius:999px;font-size:.76rem;font-weight:800;white-space:nowrap}.status.draft{background:#eef2f5;color:#475467}.status.pending{background:#fff4e5;color:var(--warning)}.status.returned{background:#fee4e2;color:var(--danger)}.status.approved{background:#e7f6ec;color:var(--success)}.status.paid{background:#e6f4ff;color:var(--blue)}.status.cancelled{background:#f2f4f7;color:#667085}.empty-state{padding:38px 20px;text-align:center;color:var(--muted)}dialog{width:min(700px,calc(100% - 24px));border:0;border-radius:18px;padding:0;box-shadow:0 25px 80px rgba(0,0,0,.25);max-height:94vh}dialog.large-dialog{width:min(1240px,calc(100% - 24px))}dialog::backdrop{background:rgba(8,20,23,.55);backdrop-filter:blur(3px)}.dialog-form{padding:20px;max-height:92vh;overflow-y:auto}.dialog-form.wide{width:100%}.dialog-header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.dialog-header h3{margin:0}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:22px}.sticky-actions{position:sticky;bottom:-20px;background:#fff;padding:14px 0 4px;border-top:1px solid var(--line);z-index:2}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 14px}.span-2{grid-column:1/-1}.section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-top:22px;padding-top:18px;border-top:1px solid var(--line)}.section-heading h4{margin:0 0 2px}.check-row{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center;gap:9px!important;font-weight:700!important}.check-row input{width:auto}.request-item{margin-top:12px;border:1px solid var(--line);background:#f8fafb;border-radius:14px;padding:12px}.request-item-head{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-bottom:8px}.item-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));gap:10px;align-items:end}.item-grid label{margin:0;font-size:.84rem}.col-2{grid-column:span 2}.col-3{grid-column:span 3}.col-4{grid-column:span 4}.remove-item{border:0;background:#fee4e2;color:var(--danger);border-radius:9px;padding:8px 10px;font-weight:800}.line-total{display:flex;gap:18px;flex-wrap:wrap;font-weight:800;color:var(--primary-dark);padding:10px 0}.invoice-options{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr 1fr;gap:10px;padding:10px;border:1px dashed #aacbc7;border-radius:11px;background:#f4fbfa}.inline-control{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}.debt-preview-box{margin-top:18px;padding:14px;border:1px dashed #9bcac5;border-radius:14px;background:#f7fcfb}.debt-preview-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:10px}.mini-kpi{background:#fff;border:1px solid var(--line);border-radius:11px;padding:10px}.mini-kpi strong{display:block;margin-top:3px}.existing-files{margin-top:8px;display:grid;gap:8px}.existing-file{display:flex;justify-content:space-between;gap:8px;align-items:center;padding:9px 11px;border:1px solid var(--line);border-radius:10px;background:#fff}.detail-grid{display:grid;grid-template-columns:1.4fr .6fr;gap:18px}.detail-list{display:grid;grid-template-columns:190px 1fr;gap:12px 18px;padding:18px}.detail-list dt{color:var(--muted)}.detail-list dd{margin:0;font-weight:650}.timeline{list-style:none;padding:0 18px 18px;margin:0}.timeline li{position:relative;padding:0 0 18px 24px;border-left:2px solid var(--line)}.timeline li:last-child{border-left-color:transparent}.timeline li::before{content:"";position:absolute;left:-6px;top:2px;width:10px;height:10px;border-radius:50%;background:var(--primary)}.timeline time{color:var(--muted);font-size:.82rem}.action-stack{display:grid;gap:10px;padding:18px}.notice{padding:14px 16px;border-radius:12px;background:#fff8e8;color:#7a4a00;border:1px solid #f2ddb0}.warning{padding:12px 14px;border-radius:11px;background:#fff1f0;border:1px solid #ffc9c3;color:#8a1c14}.success-box{padding:12px 14px;border-radius:11px;background:#edf9f1;border:1px solid #b8e5c7;color:#05603a}.category-tree{display:grid;gap:8px}.category-node{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff}.category-indent{display:inline-block;width:calc(var(--level) * 22px)}.filters{display:grid;grid-template-columns:repeat(4,minmax(160px,1fr));gap:10px}.debt-totals{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-top:14px}.debt-totals .stat-card strong{font-size:1.25rem}.allocation-row{display:grid;grid-template-columns:42px 1.35fr 1fr .9fr .9fr;gap:10px;align-items:center;padding:11px;border-bottom:1px solid var(--line)}.allocation-row input[type=checkbox]{width:auto}.allocation-row .money-input{min-width:120px}.allocation-header{font-weight:800;background:#f8fafb}.payment-total-box{font-size:1.2rem;color:var(--primary-dark)}.attachment-list{display:grid;gap:9px}.attachment-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--line);border-radius:11px;background:#f8fafb}.attachment-main{min-width:0}.attachment-main strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attachment-main small{color:var(--muted)}.attachment-actions{display:flex;gap:7px;flex-shrink:0}.mini-btn{border:1px solid var(--line);background:#fff;border-radius:8px;padding:7px 9px;font-weight:700}.permission-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:12px}.permission-item{display:flex!important;grid-template-columns:auto 1fr!important;align-items:flex-start;gap:9px!important;margin:0!important;padding:11px;border:1px solid var(--line);border-radius:11px;background:#f8fafb}.permission-item input{width:auto;margin-top:3px}.permission-item small{display:block;color:var(--muted);font-weight:400;margin-top:2px}.payable-actions{display:flex;gap:8px;align-items:center}.toast{position:fixed;right:18px;bottom:18px;z-index:1000;background:#112d31;color:#fff;padding:12px 16px;border-radius:10px;opacity:0;pointer-events:none;transform:translateY(10px);transition:.2s}.toast.show{opacity:1;transform:translateY(0)}@media(max-width:1150px){.stats-grid{grid-template-columns:repeat(2,1fr)}.cards-grid{grid-template-columns:repeat(2,1fr)}.detail-grid{grid-template-columns:1fr}.item-grid{grid-template-columns:repeat(6,1fr)}.col-4{grid-column:span 3}.filters{grid-template-columns:repeat(2,1fr)}.permission-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:760px){.mobile-only{display:inline-block}.app{display:block}.sidebar{position:fixed;left:-285px;z-index:50;width:275px;transition:.2s}.sidebar.open{left:0;box-shadow:20px 0 60px rgba(0,0,0,.25)}.topbar{padding:12px 14px}.view{padding:18px 14px 34px}.user-box>div{display:none}.stats-grid,.cards-grid,.debt-preview-grid,.debt-totals,.permission-grid{grid-template-columns:1fr}.form-grid,.filters,.invoice-options{grid-template-columns:1fr}.span-2{grid-column:auto}.item-grid{grid-template-columns:1fr 1fr}.col-2,.col-3,.col-4{grid-column:span 2}.detail-list{grid-template-columns:1fr;gap:3px}.detail-list dd{margin-bottom:10px}.allocation-row{grid-template-columns:32px 1fr}.allocation-row>*:nth-child(n+3){grid-column:2}.dialog-actions{flex-wrap:wrap}.dialog-actions .btn{flex:1 1 140px}.attachment-row{align-items:flex-start;flex-direction:column}.attachment-actions{width:100%}.attachment-actions .mini-btn{flex:1}.section-heading{align-items:flex-start;flex-direction:column}}


/* ===== Legacy stylesheet boundary: v5.css ===== */
/* V5 additions */
button:disabled { opacity: .62; cursor: wait; }
.quick-customer-btn { margin-top: 7px; width: fit-content; }
.danger-text { color: #b42318; }
#paymentNumberPreview { margin: 14px 0 0; }
.virtual-table { max-height: 560px; overflow: auto; }
.virtual-table thead th { position: sticky; top: 0; z-index: 2; }
.virtual-table.qscm-paginated-table { max-height: none; overflow-x: auto; overflow-y: visible; }
.qscm-payment-history-panel .table-pager { position: relative; z-index: 0; }
.qscm-payment-history-panel .qscm-paginated-table tbody tr:last-child td { border-bottom: 0; }
.qscm-request-detail-title { display:flex; align-items:center; gap:16px; flex-wrap:wrap; }
.qscm-request-detail-title h4 { margin:0; }
.qscm-counterparty-advance-check { margin:0!important; padding:6px 10px; border:1px solid #f79009; border-radius:999px; background:#fffaeb; color:#93370d; }
.qscm-counterparty-advance-notice { margin-top:12px; }
.qscm-multi-requested-field { min-width:230px; }
.qscm-multi-requested-field input { border-color:#84adff; background:#f5f8ff; font-weight:800; }
.qscm-multi-requested-field small { display:block; min-height:1.2em; }
#requestForm.qscm-multi-supplier-mode .request-payment-amount-box { display:none; }
#requestForm.qscm-multi-supplier-mode .request-item { border-color:#b2ccff; background:#f8faff; }
#requestForm.qscm-multi-supplier-mode .item-number-row { grid-template-columns:repeat(5,minmax(150px,1fr)); }
#requestForm.qscm-counterparty-advance-mode .item-tax-row { opacity:.62; }
@media(max-width:1000px){#requestForm.qscm-multi-supplier-mode .item-number-row{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.qscm-request-detail-title{align-items:flex-start;flex-direction:column;gap:8px}#requestForm.qscm-multi-supplier-mode .item-number-row{grid-template-columns:1fr}.qscm-multi-requested-field{min-width:0}}
#companySettingsForm { padding-top: 8px; }
#credentialsBtn { white-space: nowrap; }
@media (max-width: 760px) {
  #credentialsBtn { padding: 8px 9px; font-size: .82rem; }
  .user-box { gap: 6px; }
  .inline-control { align-items: stretch; }
  .inline-control .btn { white-space: nowrap; }
}

/* P13.3H6: danh sách biến động mới nhất và khung nhìn ổn định */
.qscm-h6-list-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.qscm-h6-list-actions > label {
  display: grid;
  gap: 4px;
  min-width: 210px;
  color: var(--muted, #64748b);
  font-size: .78rem;
  font-weight: 700;
}
.qscm-h6-list-actions select { min-height: 38px; }
[data-h6-stable-key] { overflow-anchor: auto; }
/* Chỉ giữ cuộn ngang bên trong bảng. Khóa cả hai chiều khiến bánh xe dọc bị
   giữ lại khi con trỏ nằm trên bảng và trang Tổng quan trông như bị đứng. */
.table-wrap {
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
}
@media (max-width: 720px) {
  .qscm-h6-list-actions,
  .qscm-h6-list-actions > label,
  .qscm-h6-list-actions select,
  .qscm-h6-list-actions .btn { width: 100%; }
}

/* Build 08C.1-P3P5: scoped additions; preserve the accepted shell/layout. */
.qscm-request-select-all-08c1p5{display:inline-flex;align-items:center;gap:7px;min-height:38px;padding:0 12px;border:1px solid var(--border,#d8e0ec);border-radius:10px;background:#fff;color:var(--text,#172033);font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap}
.qscm-request-select-all-08c1p5 input{width:16px;height:16px;margin:0;accent-color:var(--primary,#1769e0)}
.qscm-request-line-actions-08c1p13h2{display:inline-flex;align-items:stretch;gap:10px;flex-wrap:nowrap}
#requestForm .qscm-request-line-actions-08c1p13h2>.qscm-request-select-all-08c1p5,#requestForm .qscm-request-line-actions-08c1p13h2>.qscm-request-line-action-08c1p13h2{display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:46px;margin:0;padding:0 14px;border:1px solid var(--line,#d9e4e7);border-radius:9px;background:#fff;color:var(--text,#172129);font-size:14px;font-weight:650;line-height:1;white-space:nowrap;box-shadow:0 1px 2px rgba(16,24,40,.03)}
#requestForm .qscm-request-line-actions-08c1p13h2>.qscm-request-line-action-08c1p13h2:hover,#requestForm .qscm-request-line-actions-08c1p13h2>.qscm-request-select-all-08c1p5:hover{border-color:#aebbc8;background:#f8fafc}
#requestForm .qscm-request-line-actions-08c1p13h2>.qscm-request-select-all-08c1p5 input{width:20px;height:20px;flex:0 0 auto}
.qscm-request-line-action-icon-08c1p13h2{display:inline-flex;width:21px;height:21px;align-items:center;justify-content:center;flex:0 0 auto}
.qscm-request-line-action-icon-08c1p13h2 svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
@media(max-width:720px){#requestForm .qscm-request-line-actions-08c1p13h2{width:100%;gap:7px;flex-wrap:wrap}#requestForm .qscm-request-line-actions-08c1p13h2>.qscm-request-select-all-08c1p5,#requestForm .qscm-request-line-actions-08c1p13h2>.qscm-request-line-action-08c1p13h2{min-height:42px;padding:0 10px;font-size:12.5px;flex:1 1 auto}.qscm-request-line-action-icon-08c1p13h2{width:19px;height:19px}}
.qscm-category-template-menu-08c1p4{position:relative}
.qscm-category-template-menu-08c1p4>summary{list-style:none;cursor:pointer;user-select:none}
.qscm-category-template-menu-08c1p4>summary::-webkit-details-marker{display:none}
.qscm-category-template-popover-08c1p4{position:absolute;z-index:45;top:calc(100% + 6px);right:0;min-width:220px;padding:7px;border:1px solid var(--border,#d8e0ec);border-radius:11px;background:#fff;box-shadow:0 14px 36px rgba(22,34,55,.16)}
.qscm-category-template-popover-08c1p4 a,.qscm-category-template-popover-08c1p4 button{display:block;width:100%;padding:9px 10px;border:0;border-radius:8px;background:transparent;color:var(--text,#172033);font:inherit;text-align:left;text-decoration:none;cursor:pointer}
.qscm-category-template-popover-08c1p4 a:hover,.qscm-category-template-popover-08c1p4 button:hover{background:#f1f5fb}
.qscm-supplier-correction-rows-08c1p5{display:grid;gap:9px;max-height:42vh;overflow:auto;padding-right:3px}
.qscm-supplier-correction-row-08c1p5{display:grid;grid-template-columns:minmax(220px,1fr) minmax(300px,1.25fr);gap:14px;align-items:end;padding:11px 12px;border:1px solid var(--border,#d8e0ec);border-radius:11px;background:#fbfcfe}
.qscm-supplier-correction-row-08c1p5>div{display:grid;gap:3px}
.qscm-supplier-correction-row-08c1p5>div span{font-size:12px;color:var(--muted,#64748b)}
.qscm-request-revisions-08c1p5 .timeline{max-height:360px;overflow:auto}
@media(max-width:800px){.qscm-supplier-correction-row-08c1p5{grid-template-columns:1fr}.qscm-category-template-popover-08c1p4{left:0;right:auto}}
.table-pager { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 15px; border-top:1px solid var(--line); background:#fbfcfc; }
.table-pager > div { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.table-pager .btn { min-width:38px; padding:7px 10px; }
.table-pager .qscm-page-number.active { color:#fff; background:var(--primary); border-color:var(--primary); }
.table-pager .qscm-page-ellipsis { min-width:24px; text-align:center; color:var(--muted); }
.qscm-shared-list-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:12px 15px; border-bottom:1px solid var(--line); background:#fbfcfc; }
.qscm-shared-list-head small { color:var(--muted); font-weight:700; }
.qscm-shared-list-head label { display:flex; align-items:center; gap:8px; margin:0; color:var(--muted); font-size:.86rem; font-weight:700; }
.qscm-shared-list-head select { width:auto; min-width:190px; padding:8px 10px; }
@media (max-width: 560px) {
  .table-pager { align-items:flex-start; flex-direction:column; }
  .table-pager > div { width:100%; }
  .table-pager .btn { min-width:44px; min-height:44px; }
  .qscm-shared-list-head { align-items:stretch; flex-direction:column; }
  .qscm-shared-list-head label { display:grid; grid-template-columns:1fr; }
  .qscm-shared-list-head select { width:100%; min-height:44px; }
}


/* ===== Legacy stylesheet boundary: v6.css ===== */
/* V6 - đầu ra công trình, thông báo lỗi rõ ràng và chứng từ PDF */
.alert-stack{position:fixed;right:18px;top:92px;z-index:2000;display:grid;gap:10px;width:min(420px,calc(100vw - 28px));pointer-events:none}
.alert-card{pointer-events:auto;background:#fff;border:1px solid var(--line);border-left:5px solid var(--danger);border-radius:12px;box-shadow:0 18px 50px rgba(0,0,0,.16);padding:13px 14px;animation:alertIn .2s ease}
.alert-card.success{border-left-color:var(--success)}
.alert-card.warning{border-left-color:var(--warning)}
.alert-card strong{display:block;margin-bottom:3px}.alert-card small{color:var(--muted);line-height:1.45}.alert-card button{float:right;border:0;background:transparent;font-size:18px;margin:-4px -4px 0 8px}
@keyframes alertIn{from{opacity:0;transform:translateY(-8px)}to{opacity:1;transform:none}}
.field-error{border-color:#d92d20!important;box-shadow:0 0 0 3px rgba(217,45,32,.12)!important}
.field-error-text{display:block;color:#b42318;font-size:.8rem;margin-top:5px;font-weight:600}
.output-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.output-table-actions{display:flex;gap:6px;flex-wrap:wrap}
.metric-positive{color:#067647}.metric-negative{color:#b42318}.metric-neutral{color:#175cd3}
.project-financial-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.receipt-allocation-row{display:grid;grid-template-columns:42px 1.4fr 1fr 1fr;gap:10px;align-items:center;padding:11px 12px;border-bottom:1px solid var(--line)}
.receipt-allocation-row.header{font-weight:800;background:#f8fafb;color:var(--muted);font-size:.82rem;text-transform:uppercase}
.receipt-allocation-row input[type="text"]{text-align:right}
.pdf-preview-card{background:white;color:#111;border:1px solid #aaa;padding:18px;font-family:"Times New Roman",serif}
.kpi-note{font-size:.82rem;color:var(--muted);margin-top:5px}
.outgoing-status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:.78rem;font-weight:800}
.outgoing-status.unpaid{background:#fff4e5;color:#b54708}.outgoing-status.partial{background:#e6f4ff;color:#175cd3}.outgoing-status.paid{background:#e7f6ec;color:#067647}
@media(max-width:1050px){.output-summary-grid,.project-financial-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.output-summary-grid,.project-financial-grid{grid-template-columns:1fr}.receipt-allocation-row{grid-template-columns:36px 1fr}.receipt-allocation-row>*:nth-child(n+3){grid-column:2}.alert-stack{top:72px;right:14px}}


/* ===== Legacy stylesheet boundary: v7.css ===== */
/* QSCM V7 - giao diện, tìm kiếm và phân tích công trình */
:root{--primary:#155eef;--primary-dark:#1849a9;--secondary:#eff4ff;--bg:#f5f7fb;--line:#e1e7ef;--text:#182230;--muted:#667085;--success:#079455;--warning:#dc6803;--danger:#d92d20;--shadow:0 8px 26px rgba(16,24,40,.07)}
body{background:linear-gradient(180deg,#f8faff 0,#f4f6fa 280px);letter-spacing:-.005em}.app{grid-template-columns:286px 1fr}.sidebar{background:linear-gradient(180deg,#101828 0,#17213a 100%);padding:18px 14px;gap:14px}.sidebar-brand{padding:4px 8px 14px;border-bottom:1px solid rgba(255,255,255,.1)}.brand-mark{background:linear-gradient(135deg,#2e90fa,#155eef);box-shadow:0 8px 20px rgba(21,94,239,.3)}.sidebar-brand strong{font-size:1.02rem}.sidebar-brand small{color:#98a2b3}.v7-nav{display:grid!important;gap:16px!important}.nav-section{display:grid;gap:4px}.nav-section-label{padding:0 12px 5px;color:#7f8ca5;font-size:.68rem;font-weight:800;text-transform:uppercase;letter-spacing:.12em}.nav-btn{display:flex;align-items:center;gap:11px;padding:10px 12px;color:#cbd5e1;border-radius:9px;font-weight:650}.nav-btn:hover{background:rgba(255,255,255,.07)}.nav-btn.active{background:linear-gradient(90deg,rgba(46,144,250,.25),rgba(21,94,239,.12));color:#fff;box-shadow:inset 3px 0 #53b1fd}.nav-icon{width:19px;text-align:center;font-size:1rem;color:#98a2b3}.nav-btn.active .nav-icon{color:#84caff}.topbar{min-height:76px;border-bottom:1px solid rgba(225,231,239,.9);box-shadow:0 1px 2px rgba(16,24,40,.03)}.topbar h2{font-size:1.38rem;letter-spacing:-.025em}.view{max-width:1600px;width:100%;margin:0 auto;padding:26px 30px 48px}.stat-card,.panel,.project-card{border-color:#e6eaf0;border-radius:14px;box-shadow:var(--shadow)}.stat-card{position:relative;overflow:hidden}.stat-card::after{content:"";position:absolute;right:-18px;bottom:-28px;width:80px;height:80px;border-radius:50%;background:rgba(21,94,239,.045)}.stat-card strong{font-size:1.65rem;letter-spacing:-.025em}.panel-header{background:linear-gradient(180deg,#fff,#fbfcfe);padding:16px 18px}.panel-header h3{font-size:1rem}.btn{border-radius:9px;transition:.15s ease;box-shadow:none}.btn:hover{transform:translateY(-1px)}.btn.primary{background:linear-gradient(135deg,#1570ef,#155eef)}.btn.primary:hover{background:linear-gradient(135deg,#175cd3,#1849a9)}.btn.ghost{background:#fff}.code-pill{background:#eff4ff;color:#1849a9}.project-card{transition:.18s ease}.project-card:hover{transform:translateY(-2px);box-shadow:0 12px 30px rgba(16,24,40,.1)}th{background:#f8fafc;color:#475467}.toast{display:none}.alert-card{border-left-width:4px}.notice{background:#fffaeb;color:#7a2e0e;border-color:#fedf89}.success-box{background:#ecfdf3;border-color:#abefc6}.stats-grid.v7-stats{grid-template-columns:repeat(5,minmax(0,1fr))}.v7-page-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:18px}.v7-page-intro h3{margin:0;font-size:1.08rem}.v7-page-intro p{margin:5px 0 0;color:var(--muted)}
/* searchable select */
.v7-search-select{position:relative;width:100%;font-weight:400}.v7-search-input{padding-right:38px;background:#fff}.v7-search-select::after{content:"⌄";position:absolute;right:13px;top:12px;color:#667085;pointer-events:none}.v7-native-select{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;pointer-events:none!important;left:0;bottom:0;padding:0!important;border:0!important}.v7-search-menu{position:absolute;z-index:3500;left:0;right:0;top:calc(100% + 5px);display:none;max-height:270px;overflow:auto;background:#fff;border:1px solid #d0d5dd;border-radius:10px;box-shadow:0 14px 40px rgba(16,24,40,.18);padding:5px}.v7-search-select.open .v7-search-menu{display:block}.v7-search-option{display:block;width:100%;border:0;background:transparent;text-align:left;padding:9px 10px;border-radius:7px;color:#344054}.v7-search-option:hover,.v7-search-option.active{background:#eff4ff;color:#1849a9}.v7-search-empty{padding:12px;color:#667085;text-align:center;font-size:.88rem}.v7-search-code{font-weight:800;color:#175cd3;margin-right:6px}
/* project analysis */
.v7-project-picker{display:grid;grid-template-columns:minmax(280px,520px) auto;gap:12px;align-items:end}.v7-tabs{display:flex;gap:6px;flex-wrap:wrap;padding:6px;background:#eef2f6;border-radius:11px;width:fit-content}.v7-tab{border:0;background:transparent;padding:9px 14px;border-radius:8px;font-weight:750;color:#475467}.v7-tab.active{background:#fff;color:#175cd3;box-shadow:0 2px 8px rgba(16,24,40,.08)}.v7-finance-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.v7-profit-card{background:linear-gradient(135deg,#eff8ff,#eef4ff);border-color:#b2ddff}.v7-profit-card.negative{background:#fff1f0;border-color:#fecdca}.v7-margin-pill{display:inline-flex;margin-top:7px;padding:4px 8px;border-radius:999px;background:#fff;color:#175cd3;font-size:.78rem;font-weight:800}.risk-list{display:grid;gap:10px}.risk-item{display:grid;grid-template-columns:42px 1fr;gap:10px;align-items:start;border:1px solid var(--line);border-radius:11px;padding:12px;background:#fff}.risk-dot{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-weight:900}.risk-low .risk-dot{background:#dcfae6;color:#067647}.risk-medium .risk-dot{background:#fef0c7;color:#b54708}.risk-high .risk-dot{background:#fee4e2;color:#b42318}.risk-item strong{display:block}.risk-item p{margin:3px 0 0;color:var(--muted);font-size:.9rem}
/* advances */
.advance-status{display:inline-flex;padding:5px 9px;border-radius:999px;font-size:.76rem;font-weight:800}.advance-open{background:#fff4e5;color:#b54708}.advance-partial{background:#e6f4ff;color:#175cd3}.advance-settled{background:#e7f6ec;color:#067647}.advance-overdue{background:#fee4e2;color:#b42318}.advance-progress{height:7px;border-radius:999px;background:#eaecf0;overflow:hidden;margin-top:6px}.advance-progress span{display:block;height:100%;background:linear-gradient(90deg,#2e90fa,#155eef)}
/* settings */
.numbering-preview{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.numbering-chip{padding:11px;border:1px solid var(--line);border-radius:10px;background:#f8fafc}.numbering-chip strong{display:block;margin-top:3px;color:#175cd3}
@media(max-width:1250px){.stats-grid.v7-stats{grid-template-columns:repeat(3,1fr)}.v7-finance-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:900px){.app{grid-template-columns:255px 1fr}.v7-project-picker{grid-template-columns:1fr}.numbering-preview{grid-template-columns:repeat(2,1fr)}}
@media(max-width:760px){.sidebar{width:286px;left:-296px}.view{padding:18px 14px 36px}.stats-grid.v7-stats,.v7-finance-grid,.numbering-preview{grid-template-columns:1fr}.v7-page-intro{align-items:stretch;flex-direction:column}.v7-tabs{width:100%;overflow:auto;flex-wrap:nowrap}.v7-tab{white-space:nowrap}.v7-project-picker{grid-template-columns:1fr}}


/* ===== Legacy stylesheet boundary: v7_2.css ===== */
/* QSCM V7.2 - invoice, import and request usability refinements */
.request-advance-box {
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f8fbfb;
}
.request-advance-box > .check-row { margin: 0; }
.compact-notice { margin: 0; align-self: end; padding: 11px 13px; }

.request-item .item-grid-v72 {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}
.request-item .item-grid-v72 > label,
.request-item .item-grid-v72 > div { min-width: 0; }
.request-item .item-primary-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(250px, 5fr) minmax(180px, 3fr) minmax(180px, 3fr);
  gap: 12px;
  align-items: end;
}
.request-item .item-number-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(130px, 1fr) minmax(160px, 1.25fr) minmax(180px, 1.4fr);
  gap: 12px;
  align-items: end;
  padding-top: 2px;
}
.request-item .item-tax-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(0, 2.2fr);
  gap: 12px;
  align-items: start;
  padding-top: 4px;
}
.request-item .auto-calc-note {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: .78rem;
}
.request-item .supplier-field.hidden { display: none !important; }

.import-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0;
}
.import-template-card {
  display: grid;
  gap: 5px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #f8fbfb;
  color: var(--text);
  text-decoration: none;
  transition: .16s ease;
}
.import-template-card:hover {
  border-color: var(--primary);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 118, 110, .08);
}
.import-template-card span { color: var(--muted); font-size: .86rem; }
.import-result { min-height: 52px; white-space: pre-line; }
.import-result.success { background: #ecfdf3; border-color: #abefc6; color: #067647; }
.import-result.error { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.import-result.warning { background: #fffaeb; border-color: #fedf89; color: #b54708; }

.invoice-id-stack { display: grid; gap: 2px; min-width: 150px; }
.invoice-id-stack strong { font-size: .92rem; }
.invoice-id-stack small { color: var(--muted); }
.invoice-summary-table td { vertical-align: top; }
.invoice-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--primary-dark);
  font-weight: 800;
}
.advance-request-panel .advance-progress { margin-top: 7px; }
.advance-request-label {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff4e5;
  color: #b54708;
  font-size: .76rem;
  font-weight: 800;
}

@media (max-width: 820px) {
  .request-item .item-primary-row,
  .request-item .item-number-row,
  .request-item .item-tax-row,
  .import-template-grid { grid-template-columns: 1fr; }
}


/* ===== Legacy stylesheet boundary: v7_3.css ===== */
/* QSCM V7.3 - compact request lines, dual-mode dropdown and employee advance ledger */
.v7-search-select::after { content: none !important; }
.v7-search-input { padding-right: 42px !important; }
.v73-select-toggle {
  position: absolute; right: 3px; top: 3px; z-index: 3;
  width: 34px; height: calc(100% - 6px); min-height: 32px;
  border: 0; border-left: 1px solid var(--line); border-radius: 0 8px 8px 0;
  background: #f8fafc; color: #475467; font-size: 1rem; font-weight: 800;
}
.v73-select-toggle:hover { background: #eef4ff; color: var(--primary); }

/* Dòng đề nghị gọn hơn để nhìn được nhiều dữ liệu trên một màn hình */
#requestDialog .dialog-form.wide { width: min(1120px, 100%); }
.request-item { padding: 10px 12px !important; margin-top: 8px !important; border-radius: 11px !important; }
.request-item-head { min-height: 28px; margin-bottom: 7px !important; }
.request-item-head strong { font-size: .84rem; color: #475467; }
.request-item .item-grid-v72 { gap: 7px !important; }
.request-item .item-primary-row {
  grid-template-columns: minmax(220px, 4fr) minmax(170px, 2.4fr) minmax(170px, 2.4fr) !important;
  gap: 7px !important;
}
.request-item .item-number-row {
  grid-template-columns: minmax(110px, .8fr) minmax(105px, .7fr) minmax(135px, 1fr) minmax(145px, 1.05fr) !important;
  gap: 7px !important;
}
.request-item .item-tax-row {
  grid-template-columns: minmax(135px, .55fr) minmax(0, 2.6fr) !important;
  gap: 7px !important; padding-top: 0 !important;
}
.request-item label { gap: 3px !important; font-size: .78rem !important; margin-top: 0 !important; color: #475467; }
.request-item input, .request-item select, .request-item textarea, .request-item .v7-search-input {
  min-height: 34px; padding: 7px 9px; border-radius: 8px; font-size: .87rem;
}
.request-item .auto-calc-note { display: none !important; }
.request-item .invoice-options { display: grid; grid-template-columns: 1.4fr .7fr .8fr; gap: 7px; align-items: end; }
.request-item .mini-kpi { min-height: 34px; padding: 6px 9px; }
.request-item .line-total {
  margin-top: 7px !important; padding: 7px 10px !important; min-height: auto !important;
  display: flex !important; justify-content: flex-end; gap: 18px; font-size: .82rem;
  background: #f8fafc; border-radius: 8px;
}
.request-item .remove-item { padding: 4px 8px !important; font-size: .75rem; }

.debt-filter-layout {
  display: grid; grid-template-columns: repeat(3, minmax(190px, 1fr)) minmax(160px, .7fr);
  gap: 12px; align-items: end; padding: 15px 17px;
}
.debt-filter-layout.advance-filter { grid-template-columns: minmax(250px, 420px) minmax(220px, 1fr); }
.filter-check { min-height: 40px; margin: 0; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; background: #f8fafc; }
.advance-ledger-panel { margin-top: 0; }
.compact-btn { padding: 7px 10px; font-size: .82rem; white-space: nowrap; }
.compact-table table { min-width: 700px; }
.compact-table th, .compact-table td { padding: 9px 10px; }
.compact-empty { padding: 20px; }

.settlement-expense-list { display: grid; gap: 8px; margin-top: 10px; }
.settlement-expense-row {
  display: grid; grid-template-columns: minmax(220px, 2.2fr) minmax(130px, .9fr) minmax(145px, .9fr) minmax(170px, 1.1fr) 36px;
  gap: 8px; align-items: end; padding: 9px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc;
}
.settlement-expense-row label { margin: 0 !important; gap: 3px !important; font-size: .78rem; }
.settlement-expense-row input { min-height: 35px; padding: 7px 9px; }
.settlement-vat-check { min-height: 35px; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.remove-settlement-item { height: 35px; border: 0; border-radius: 8px; background: #fee4e2; color: #b42318; font-weight: 900; }
.settlement-preview-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px 14px; }
.settlement-preview-grid span { display: flex; justify-content: space-between; gap: 8px; }
.notice.error { background: #fef3f2; border-color: #fecdca; color: #b42318; }
.notice.warning { background: #fffaeb; border-color: #fedf89; color: #b54708; }
.v73-request-tools { margin-left: auto; }

@media (max-width: 980px) {
  .debt-filter-layout, .debt-filter-layout.advance-filter { grid-template-columns: repeat(2, 1fr); }
  .settlement-expense-row { grid-template-columns: 1fr 1fr; }
  .settlement-expense-row .remove-settlement-item { grid-column: 1 / -1; width: 100%; }
}
@media (max-width: 760px) {
  .request-item .item-primary-row, .request-item .item-number-row, .request-item .item-tax-row,
  .request-item .invoice-options, .debt-filter-layout, .debt-filter-layout.advance-filter,
  .settlement-expense-row, .settlement-preview-grid { grid-template-columns: 1fr !important; }
  .request-item .line-total { align-items: flex-start; flex-direction: column; gap: 4px; }
  .v73-request-tools { margin-left: 0; width: 100%; }
}


/* ===== Legacy stylesheet boundary: v7_4.css ===== */
/* QSCM V7.4 - persistence feedback, compact imports and repaired dropdowns */
.sidebar-bottom .btn,
.sidebar-bottom .file-label {
  min-height: 40px;
  color: #f8fafc !important;
  border-color: rgba(255,255,255,.28) !important;
  background: rgba(255,255,255,.07) !important;
  opacity: 1 !important;
}
.sidebar-bottom .btn:hover,
.sidebar-bottom .file-label:hover {
  color: #fff !important;
  background: rgba(255,255,255,.15) !important;
  border-color: rgba(255,255,255,.48) !important;
}
.sidebar-bottom .btn.accent {
  background: linear-gradient(135deg,#175cd3,#155eef) !important;
  border-color: #53b1fd !important;
  color: #fff !important;
}
.sidebar-bottom .danger-outline {
  color: #ffd5d2 !important;
  border-color: rgba(254,205,202,.42) !important;
}

/* Dropdown trong panel bộ lọc không bị cắt mất danh sách */
#debtsView .v74-filter-panel,
#debtsView .v74-filter-panel .panel-header,
#debtsView .debt-filter-layout {
  overflow: visible !important;
}
#debtsView .v74-filter-panel { position: relative; z-index: 30; }
#debtsView .v7-search-select.open { z-index: 5000; }
#debtsView .v7-search-menu { z-index: 6000; min-width: 100%; }

.request-detail-import-tools {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
}
.request-detail-import-tools .btn { padding: 8px 10px; font-size: .82rem; }
.request-detail-import-note {
  margin-top: 8px; padding: 9px 11px; border: 1px dashed #b2ddff;
  border-radius: 9px; background: #f5faff; color: #475467; font-size: .82rem;
}

/* Nhãn nhân viên trong danh mục nhà cung cấp */
.employee-supplier-code { color: #175cd3; font-weight: 800; }

@media (max-width: 760px) {
  .request-detail-import-tools { width: 100%; }
  .request-detail-import-tools .btn { flex: 1 1 150px; }
}


/* ===== Legacy stylesheet boundary: v7_5.css ===== */
/* QSCM V7.5 */
.v75-module-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 12px}.v75-module-tab{position:relative;border:1px solid var(--line);background:#fff;color:#475467;border-radius:11px;padding:10px 14px;font-weight:800;display:inline-flex;align-items:center;gap:8px}.v75-module-tab:hover{border-color:#84adff;background:#f5f8ff}.v75-module-tab.active{background:#eff4ff;border-color:#84adff;color:#1849a9}.v75-module-tab span{display:inline-flex;min-width:24px;height:22px;align-items:center;justify-content:center;border-radius:999px;background:#e4e7ec;color:#344054;font-size:.76rem}.returned-badge,.nav-returned-badge-v75{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#d92d20;color:#fff;font-size:.72rem;font-weight:900}.nav-returned-badge-v75{margin-left:auto}.nav-returned-badge-v75.hidden{display:none!important}
.request-filter-panel-v75,.v75-filter-panel{overflow:visible!important;position:relative;z-index:25}.request-filter-grid-v75{display:grid;grid-template-columns:minmax(155px,.9fr) minmax(165px,1fr) minmax(180px,1fr) minmax(175px,.9fr) minmax(210px,1.15fr) auto;gap:10px;align-items:end;padding:14px}.request-filter-grid-v75 label{margin:0}.request-filter-actions{align-self:end}.request-filter-panel-v75 .v7-search-select.open,.v75-filter-panel .v7-search-select.open{z-index:5000}
.category-toolbar-v75{justify-content:space-between;align-items:end;margin-bottom:14px}.category-project-filter{min-width:min(440px,100%);margin:0}.category-chain-list{display:grid;gap:8px;margin-top:14px}.category-chain-row{display:grid;grid-template-columns:90px minmax(160px,.8fr) minmax(260px,1.5fr) minmax(180px,.8fr);gap:9px;align-items:end;padding:10px;border:1px solid var(--line);border-radius:11px;background:#f8fafc}.category-chain-row.hidden{display:none!important}.category-chain-row label{margin:0!important;gap:3px!important;font-size:.8rem}.category-level-chip{height:38px;display:flex;align-items:center;justify-content:center;border-radius:9px;background:#eff4ff;color:#1849a9;font-weight:900}.category-parent-preview{min-height:38px;padding:5px 9px;border:1px dashed #b2ddff;border-radius:9px;background:#fff}.category-parent-preview small,.category-parent-preview strong{display:block}.category-parent-preview small{font-size:.7rem;color:#667085}.category-parent-preview strong{font-size:.82rem;margin-top:2px}.category-level-pill{display:inline-flex;padding:5px 9px;border-radius:999px;background:#f4ebff;color:#6941c6;font-weight:800;font-size:.76rem}
/* Một dòng chi tiết theo chiều ngang trên máy tính */
#requestDialog{width:min(1480px,97vw)!important;max-width:97vw!important}#requestDialog .dialog-form.wide{width:100%!important;max-width:none!important}.request-item{padding:7px 9px!important;margin-top:6px!important}.request-item-head{min-height:22px!important;margin-bottom:5px!important}.request-item .item-grid-v72{display:grid!important;grid-template-columns:minmax(210px,2.2fr) minmax(175px,1.6fr) minmax(165px,1.5fr) minmax(92px,.7fr) minmax(84px,.65fr) minmax(115px,.85fr) minmax(128px,.95fr) minmax(105px,.75fr) minmax(165px,1.2fr) minmax(95px,.68fr) minmax(105px,.75fr)!important;gap:6px!important;align-items:end;min-width:1250px}.request-item .item-primary-row,.request-item .item-number-row,.request-item .item-tax-row,.request-item .invoice-options{display:contents!important}.request-item .invoice-options.hidden{display:none!important}.request-item label{font-size:.72rem!important;gap:2px!important}.request-item input,.request-item select,.request-item .v7-search-input{min-height:31px!important;height:31px!important;padding:5px 7px!important;font-size:.82rem!important}.request-item .check-row{min-height:31px!important;padding:5px 7px;border:1px solid var(--line);border-radius:7px;background:#fff}.request-item .mini-kpi{min-height:31px!important;padding:4px 7px!important}.request-item .line-total{padding:5px 8px!important;margin-top:5px!important;font-size:.77rem!important}.request-item .v73-select-toggle{height:27px!important;min-height:27px!important}.request-item .item-grid-v72{overflow:visible}.request-item{overflow-x:auto}.request-item::-webkit-scrollbar{height:7px}.request-item::-webkit-scrollbar-thumb{background:#d0d5dd;border-radius:99px}
.project-overview-table-v75{min-width:1320px}.project-overview-table-v75 th,.project-overview-table-v75 td{padding:10px 11px}.risk-rating-v75{display:inline-flex;align-items:center;padding:6px 9px;border-radius:999px;font-size:.76rem;font-weight:900;white-space:nowrap}.risk-rating-v75.risk-good{background:#ecfdf3;color:#067647}.risk-rating-v75.risk-watch{background:#fffaeb;color:#b54708}.risk-rating-v75.risk-risk{background:#fef3f2;color:#b42318}.v75-summary-strip{display:grid;grid-template-columns:repeat(6,minmax(150px,1fr));gap:9px}.v75-summary-strip>div{padding:13px;border:1px solid var(--line);border-radius:12px;background:#fff}.v75-summary-strip small,.v75-summary-strip strong{display:block}.v75-summary-strip small{color:#667085;font-size:.76rem}.v75-summary-strip strong{font-size:1.03rem;margin-top:5px}.analysis-grid-v75{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:12px}.analysis-kpi-list-v75{padding:12px 16px;display:grid;gap:0}.analysis-kpi-list-v75>div{display:flex;justify-content:space-between;gap:14px;padding:10px 0;border-bottom:1px solid #eaecf0}.analysis-kpi-list-v75>div:last-child{border-bottom:0}.risk-list-v75,.risk-analysis-detail-v75{display:grid;gap:8px;padding:14px}.risk-item-v75{display:flex;gap:10px;align-items:flex-start;padding:10px 12px;border-radius:10px;border:1px solid}.risk-item-v75 b{width:22px;height:22px;display:flex;align-items:center;justify-content:center;border-radius:99px}.risk-item-v75.risk-good{background:#ecfdf3;border-color:#abefc6;color:#067647}.risk-item-v75.risk-watch{background:#fffaeb;border-color:#fedf89;color:#b54708}.risk-item-v75.risk-risk{background:#fef3f2;border-color:#fecdca;color:#b42318}.output-project-picker-v75{margin-top:12px;overflow:visible!important}.output-project-picker-v75 .v7-project-picker{padding:14px 16px}.output-project-picker-v75 .v7-project-picker label{margin:0}.output-project-picker-v75 .v7-project-picker>div strong{display:block;margin-top:5px}
@media(max-width:1180px){.request-filter-grid-v75{grid-template-columns:repeat(2,1fr)}.request-filter-actions{grid-column:1/-1}.v75-summary-strip{grid-template-columns:repeat(3,1fr)}.analysis-grid-v75{grid-template-columns:1fr}}
@media(max-width:760px){.v75-module-tabs{display:grid;grid-template-columns:1fr}.v75-module-tab{justify-content:flex-start}.request-filter-grid-v75{grid-template-columns:1fr}.category-chain-row{grid-template-columns:1fr}.category-level-chip{justify-content:flex-start;padding:0 10px}.request-item{overflow:visible}.request-item .item-grid-v72{display:grid!important;grid-template-columns:1fr!important;min-width:0!important}.request-item .item-primary-row,.request-item .item-number-row,.request-item .item-tax-row{display:contents!important}.request-item .invoice-options{display:grid!important;grid-template-columns:1fr!important}.request-item .invoice-options.hidden{display:none!important}.v75-summary-strip{grid-template-columns:1fr 1fr}.category-toolbar-v75{align-items:stretch}.category-toolbar-v75>.toolbar{width:100%}.category-toolbar-v75 .btn{flex:1 1 160px}}
@media(max-width:480px){.v75-summary-strip{grid-template-columns:1fr}}


/* ===== Legacy stylesheet boundary: v7_6.css ===== */
/* QSCM V7.6 */
.v76-notification-panel{border:1px solid #bfd7ff;background:#f7fbff;margin:0 0 12px;padding:12px 14px;border-radius:14px}
.v76-notification-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.v76-notification-list{display:grid;gap:7px}
.v76-notification{display:grid;grid-template-columns:10px 1fr auto;align-items:center;gap:9px;padding:8px 10px;border-radius:10px;background:#fff;border:1px solid #e2e8f0}
.v76-notification.unread{border-color:#84adff;background:#eff6ff}
.v76-notification-dot{width:8px;height:8px;border-radius:50%;background:#155eef}
.v76-notification:not(.unread) .v76-notification-dot{background:#cbd5e1}
.v76-notification time{font-size:.75rem;color:#64748b;white-space:nowrap}
.return-review-wrap-v76{display:grid;gap:8px;border:1px dashed #9bb7de;background:#f8fbff;padding:12px;border-radius:12px}
#skipTechnicalWrapV76{padding:10px 12px;border:1px solid #f3c86b;background:#fff9e8;border-radius:10px}
.v76-payment-select-all{display:inline-flex;align-items:center;gap:7px;font-weight:700;white-space:nowrap}
.v7-search-menu.v76-positioned-menu{position:fixed!important;z-index:2147483000!important;right:auto!important;bottom:auto;max-height:min(330px,calc(100vh - 24px));overflow:auto;box-shadow:0 18px 45px rgba(15,23,42,.28);border:1px solid #94a3b8}
dialog .v7-search-menu.v76-positioned-menu{z-index:2147483000!important}
.v76-workflow-path{display:flex;flex-wrap:wrap;gap:5px;margin-top:8px}
.v76-workflow-step{padding:4px 8px;border-radius:999px;background:#eef2f6;font-size:.76rem;color:#475467}
.v76-workflow-step.current{background:#dbeafe;color:#1849a9;font-weight:700}
.v76-contract-days{font-weight:700;color:#344054}
@media (max-width:760px){
  .v76-notification{grid-template-columns:10px 1fr}.v76-notification time{grid-column:2}
  .v7-search-menu.v76-positioned-menu{max-height:45vh}
}


/* ===== Legacy stylesheet boundary: v7_7.css ===== */
/* QSCM V7.7 */
.project-dialog-v77 { width:min(840px, calc(100vw - 24px)); }
.project-dialog-v77 .dialog-form { max-width:none; }
.project-active-v77 { align-self:end; min-height:44px; }
.v77-project-schedule-meta.good { color:#067647; }
.v77-project-schedule-meta.watch { color:#b54708; }
.v77-project-schedule-meta.risk { color:#b42318; font-weight:700; }
.v77-project-detail-tools { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 18px; margin-bottom:16px; background:#f8fafc; border:1px solid #d0d5dd; border-radius:14px; }
.v77-project-detail-tools > div { flex:1; }
.v77-schedule-compact { display:grid; gap:5px; min-width:240px; }
.v77-schedule-compact > div { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.v77-schedule-compact small { color:#667085; line-height:1.35; }
.v77-schedule-badge { display:inline-flex; align-items:center; width:max-content; border-radius:999px; padding:3px 8px; font-size:.72rem; font-weight:800; white-space:nowrap; }
.v77-schedule-badge.v77-good { background:#dcfae6; color:#067647; }
.v77-schedule-badge.v77-watch { background:#fef0c7; color:#b54708; }
.v77-schedule-badge.v77-risk { background:#fee4e2; color:#b42318; }
.v77-schedule-analysis { margin:16px 0; overflow:hidden; }
.v77-schedule-grid { display:grid; grid-template-columns:repeat(6,minmax(130px,1fr)); gap:0; border-top:1px solid #eaecf0; border-bottom:1px solid #eaecf0; }
.v77-schedule-grid > div { display:grid; gap:5px; padding:14px 16px; border-right:1px solid #eaecf0; }
.v77-schedule-grid > div:last-child { border-right:0; }
.v77-schedule-grid small { color:#667085; }
.v77-schedule-grid strong { font-size:.96rem; }
.v77-progress-track { height:10px; margin:16px 18px 6px; background:#eaecf0; border-radius:999px; overflow:hidden; }
.v77-progress-track span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#12b76a,#2e90fa); }
.v77-progress-caption { display:flex; justify-content:space-between; gap:12px; padding:0 18px 12px; color:#475467; font-size:.82rem; }
.v77-analysis-notes { display:grid; gap:8px; padding:0 18px 18px; }
.v77-analysis-note { display:flex; gap:9px; align-items:flex-start; border-radius:10px; padding:10px 12px; font-size:.88rem; }
.v77-analysis-note b { display:grid; place-items:center; flex:0 0 22px; height:22px; border-radius:50%; }
.v77-analysis-note.v77-good { background:#ecfdf3; color:#067647; }
.v77-analysis-note.v77-good b { background:#abefc6; }
.v77-analysis-note.v77-watch { background:#fffaeb; color:#b54708; }
.v77-analysis-note.v77-watch b { background:#fedf89; }
.v77-analysis-note.v77-risk { background:#fef3f2; color:#b42318; }
.v77-analysis-note.v77-risk b { background:#fecdca; }
.project-overview-table-v75 .v77-schedule-compact { min-width:260px; }

/* Category branch builder */
.v77-category-branch-list { display:grid; gap:10px; }
.v77-category-level-row { display:grid; grid-template-columns:74px minmax(210px,1.35fr) minmax(130px,.75fr) minmax(190px,1fr) minmax(150px,.8fr); gap:10px; align-items:end; padding:12px; border:1px solid #d0d5dd; border-radius:12px; background:#f9fafb; }
.v77-category-level-row.hidden { display:none; }
.v77-category-level-row label { margin:0; }
.v77-category-parent { display:grid; gap:5px; padding:0 4px 7px; min-width:0; }
.v77-category-parent small { color:#667085; }
.v77-category-parent strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }

/* Tree picker in request detail */
.v77-hidden-category-select { display:none !important; }
.v77-category-picker-button { width:100%; min-height:40px; display:flex; align-items:center; justify-content:space-between; gap:10px; border:1px solid #d0d5dd; border-radius:8px; background:#fff; color:#101828; padding:7px 10px; text-align:left; cursor:pointer; }
.v77-category-picker-button:hover { border-color:#2e90fa; box-shadow:0 0 0 3px rgba(46,144,250,.1); }
.v77-category-picker-button span { display:grid; gap:2px; min-width:0; }
.v77-category-picker-button strong,.v77-category-picker-button small { overflow:hidden; white-space:nowrap; text-overflow:ellipsis; }
.v77-category-picker-button small { color:#667085; font-size:.72rem; }
.v77-category-picker-button b { color:#175cd3; font-size:.78rem; white-space:nowrap; }
.v77-category-picker-dialog { width:min(900px,calc(100vw - 24px)); }
.v77-category-picker-tools { display:grid; grid-template-columns:1fr auto; gap:12px; align-items:end; }
.v77-category-picker-tools label { margin:0; }
.v77-category-breadcrumb { display:flex; gap:8px; align-items:center; min-height:38px; padding:8px 12px; background:#eff8ff; border:1px solid #b2ddff; border-radius:10px; color:#175cd3; }
.v77-category-tree { min-height:260px; max-height:55vh; overflow:auto; border:1px solid #d0d5dd; border-radius:12px; background:#fff; padding:8px; }
.v77-tree-row { display:flex; align-items:center; gap:4px; padding-left:calc((var(--tree-level) - 1) * 18px); border-radius:8px; }
.v77-tree-row:hover,.v77-tree-row.selected { background:#eff8ff; }
.v77-tree-expand { width:30px; height:32px; border:0; border-radius:7px; background:#f2f4f7; color:#344054; font-weight:900; cursor:pointer; }
.v77-tree-expand.invisible { visibility:hidden; }
.v77-tree-select,.v77-tree-search-result { flex:1; display:flex; align-items:center; gap:10px; border:0; background:transparent; padding:7px 8px; text-align:left; color:#101828; cursor:pointer; }
.v77-tree-select > span:last-child,.v77-tree-search-result > span:last-child { display:grid; gap:2px; min-width:0; }
.v77-tree-select small,.v77-tree-search-result small { color:#667085; }
.v77-tree-code { display:inline-flex; justify-content:center; min-width:66px; padding:3px 7px; border-radius:999px; background:#f2f4f7; color:#344054; font-size:.76rem; font-weight:800; }
.v77-tree-children.hidden { display:none; }
.v77-tree-search-results { display:grid; gap:4px; }
.v77-tree-search-result { width:100%; border-radius:8px; }
.v77-tree-search-result:hover,.v77-tree-search-result.selected { background:#eff8ff; }

/* Bell and activity center */
.v77-bell-button { position:relative; width:42px; height:42px; display:grid; place-items:center; border:1px solid #d0d5dd; border-radius:12px; background:#fff; color:#344054; cursor:pointer; margin-left:auto; }
.v77-bell-button:hover { background:#f9fafb; border-color:#98a2b3; }
.v77-bell-symbol { font-size:1.45rem; transform:rotate(45deg); line-height:1; }
.v77-bell-ringer { position:absolute; bottom:8px; font-size:.35rem; color:#344054; }
.v77-bell-badge { position:absolute; top:-6px; right:-6px; display:grid; place-items:center; min-width:20px; height:20px; padding:0 5px; border:2px solid #fff; border-radius:999px; background:#d92d20; color:#fff; font-size:.68rem; font-weight:900; }
.v77-bell-badge.hidden { display:none; }
.v77-activity-dialog { width:min(900px,calc(100vw - 24px)); }
.v77-activity-tabs { display:flex; gap:8px; border-bottom:1px solid #eaecf0; }
.v77-activity-tabs button { border:0; border-bottom:3px solid transparent; background:transparent; color:#667085; padding:10px 14px; font-weight:800; cursor:pointer; }
.v77-activity-tabs button.active { color:#175cd3; border-bottom-color:#2e90fa; }
.v77-activity-toolbar { display:flex; justify-content:space-between; align-items:center; gap:12px; min-height:46px; }
.v77-bell-list,.v77-history-list { display:grid; max-height:58vh; overflow:auto; border:1px solid #eaecf0; border-radius:12px; }
.v77-bell-item { display:grid; grid-template-columns:10px 1fr; gap:10px; align-items:start; border:0; border-bottom:1px solid #eaecf0; background:#fff; padding:12px 14px; text-align:left; cursor:pointer; }
.v77-bell-item:last-child { border-bottom:0; }
.v77-bell-item:hover { background:#f9fafb; }
.v77-bell-item.unread { background:#eff8ff; }
.v77-bell-item > span:last-child { display:grid; gap:4px; }
.v77-bell-item small { color:#667085; }
.v77-bell-dot { width:8px; height:8px; margin-top:6px; border-radius:50%; background:#d0d5dd; }
.v77-bell-item.unread .v77-bell-dot { background:#2e90fa; box-shadow:0 0 0 4px #d1e9ff; }
.v77-history-item { display:grid; grid-template-columns:34px 1fr auto; gap:11px; align-items:center; padding:11px 13px; border-bottom:1px solid #eaecf0; }
.v77-history-item:last-child { border-bottom:0; }
.v77-history-item > div:nth-child(2) { line-height:1.4; }
.v77-history-item small { display:block; color:#667085; margin-top:3px; }
.v77-history-icon { display:grid; place-items:center; width:34px; height:34px; border-radius:50%; background:#e0f2fe; color:#026aa2; font-weight:900; }

@media (max-width:1100px) {
  .v77-schedule-grid { grid-template-columns:repeat(3,minmax(140px,1fr)); }
  .v77-category-level-row { grid-template-columns:64px 1fr 1fr; }
  .v77-category-level-row > label:nth-of-type(3),.v77-category-parent { grid-column:span 1; }
}
@media (max-width:720px) {
  .v77-project-detail-tools { align-items:stretch; flex-direction:column; }
  .v77-schedule-grid { grid-template-columns:repeat(2,minmax(120px,1fr)); }
  .v77-schedule-grid > div { padding:11px 12px; }
  .v77-category-level-row { grid-template-columns:1fr; align-items:stretch; }
  .v77-category-level-row .category-level-chip { width:max-content; }
  .v77-category-parent { padding:0; }
  .v77-category-picker-tools { grid-template-columns:1fr; }
  .v77-category-tree { max-height:58vh; }
  .v77-tree-row { padding-left:calc((var(--tree-level) - 1) * 10px); }
  .v77-tree-code { min-width:54px; }
  .v77-history-item { grid-template-columns:34px 1fr; }
  .v77-history-item > button { grid-column:2; width:max-content; }
  .v77-activity-toolbar { align-items:flex-start; flex-direction:column; }
  .topbar { gap:8px; }
  .v77-bell-button { margin-left:0; flex:0 0 42px; }
}


/* ===== Legacy stylesheet boundary: v7_8.css ===== */
/* QSCM V7.8 - tìm kiếm công trình và bảng tổng quan quản trị */
.v78-project-toolbar {
  justify-content:space-between!important;
  align-items:center;
  padding:12px 14px;
  border:1px solid var(--line);
  background:#fff;
  border-radius:14px;
  box-shadow:0 4px 16px rgba(21,32,40,.04);
}
.v78-search-box {
  width:min(500px,100%);
  min-width:260px;
  display:flex;
  align-items:center;
  gap:7px;
  border:1px solid #d0d5dd;
  border-radius:10px;
  padding:0 8px 0 11px;
  background:#fff;
}
.v78-search-box>span { color:#667085; font-size:1.05rem; }
.v78-search-box input {
  border:0!important;
  outline:0!important;
  box-shadow:none!important;
  padding:9px 2px;
  min-width:0;
}
.v78-search-box .icon-btn { padding:5px 7px; color:#667085; }
.v78-result-count { color:#475467; font-size:.82rem; font-weight:800; white-space:nowrap; margin-right:auto; }
.v78-overview-header { align-items:center; }
.v78-overview-actions { display:flex; align-items:center; justify-content:flex-end; gap:10px; min-width:min(560px,52%); }
.v78-overview-actions .v78-search-box { width:min(420px,100%); }
.project-overview-table-v78 {
  min-width:1810px;
  table-layout:fixed;
  font-size:.79rem;
}
.project-overview-table-v78 th {
  padding:8px 8px;
  font-size:.66rem;
  line-height:1.25;
  letter-spacing:.025em;
  white-space:normal;
  vertical-align:middle;
}
.project-overview-table-v78 td {
  padding:8px 8px;
  vertical-align:middle;
  line-height:1.28;
}
.project-overview-table-v78 th:nth-child(1),
.project-overview-table-v78 td:nth-child(1) { width:240px; }
.project-overview-table-v78 th:nth-child(2),
.project-overview-table-v78 td:nth-child(2) { width:135px; }
.project-overview-table-v78 th:nth-child(3),
.project-overview-table-v78 td:nth-child(3) { width:140px; }
.project-overview-table-v78 th:nth-child(4),
.project-overview-table-v78 td:nth-child(4) { width:135px; }
.project-overview-table-v78 th:nth-child(5),
.project-overview-table-v78 td:nth-child(5) { width:135px; }
.project-overview-table-v78 th:nth-child(6),
.project-overview-table-v78 td:nth-child(6) { width:140px; }
.project-overview-table-v78 th:nth-child(7),
.project-overview-table-v78 td:nth-child(7) { width:150px; }
.project-overview-table-v78 th:nth-child(8),
.project-overview-table-v78 td:nth-child(8) { width:140px; }
.project-overview-table-v78 th:nth-child(9),
.project-overview-table-v78 td:nth-child(9) { width:105px; text-align:center; }
.project-overview-table-v78 th:nth-child(10),
.project-overview-table-v78 td:nth-child(10) { width:145px; }
.project-overview-table-v78 th:nth-child(11),
.project-overview-table-v78 td:nth-child(11) { width:190px; }
.v78-project-cell .link-btn { display:block; line-height:1.35; }
.v78-project-cell small,
.v78-money small,
.v78-schedule-cell small,
.v78-assessment-cell small { display:block; margin-top:3px; color:#667085; font-size:.68rem; line-height:1.3; }
.v78-money { white-space:nowrap; font-size:.76rem; font-variant-numeric:tabular-nums; }
.v78-money strong { font-size:.79rem; }
.v78-schedule-cell strong { display:block; white-space:nowrap; font-size:.78rem; }
.v78-assessment-cell .risk-rating-v75 { padding:4px 7px; font-size:.68rem; }
.v78-assessment-cell small { max-width:180px; }
.v78-output-overview .table-wrap { max-height:calc(100vh - 250px); }
.v78-output-overview thead th { position:sticky; top:0; z-index:2; }

@media (max-width:900px) {
  .v78-project-toolbar,
  .v78-overview-header,
  .v78-overview-actions { align-items:stretch; flex-direction:column; }
  .v78-project-toolbar .v78-search-box,
  .v78-overview-actions,
  .v78-overview-actions .v78-search-box { width:100%; min-width:0; max-width:none; }
  .v78-result-count { margin-right:0; }
  .project-overview-table-v78 { font-size:.76rem; }
}


/* ===== Legacy stylesheet boundary: v7_9.css ===== */
/* QSCM V7.9 — thông tin doanh nghiệp và trạng thái lưu hóa đơn */
.sidebar-brand > div:last-child { min-width: 0; }
.sidebar-brand small {
  display: block;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.active-company-badge-v79 {
  margin-left: auto;
  margin-right: 12px;
  max-width: min(330px, 34vw);
  padding: 7px 12px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #fff;
  line-height: 1.15;
}
.active-company-badge-v79 small {
  display: block;
  color: #667085;
  font-size: 0.7rem;
  margin-bottom: 3px;
}
.active-company-badge-v79 strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  color: #101828;
}
.company-settings-panel-v79 { overflow: visible; }
.company-form-v79 { max-width: 1050px; }
.company-form-section-v79 {
  padding: 16px;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  background: #fcfcfd;
  margin-bottom: 14px;
}
.company-form-section-v79 h4 {
  margin: 0 0 12px;
  color: #344054;
}
.company-signature-grid-v79 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.company-future-note-v79 code {
  padding: 2px 5px;
  border-radius: 5px;
  background: #eef4ff;
  color: #3538cd;
}
#saveOutputInvoiceBtn:disabled { opacity: .7; cursor: wait; }
@media (max-width: 980px) {
  .company-signature-grid-v79 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .active-company-badge-v79 { display: none; }
}
@media (max-width: 640px) {
  .company-signature-grid-v79 { grid-template-columns: 1fr; }
  .company-form-section-v79 { padding: 12px; }
}


/* ===== Legacy stylesheet boundary: v7_9_1.css ===== */
/* QSCM V7.9.1 - cố định khung nhìn trên điện thoại */
html {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
}
#appView,
.app,
.main,
.view,
#requestDetailView,
#requestsView,
#outputsView,
#projectsView,
#debtsView,
#paymentsView {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
img, svg, canvas, video { max-width: 100%; height: auto; }
.panel,
.panel-header,
.toolbar,
.detail-grid,
.detail-grid > *,
.detail-list,
.action-stack,
.timeline,
.request-item,
.request-item > *,
.form-grid,
.form-grid > *,
.v76-workflow-path,
.v7-search-select {
  min-width: 0;
  max-width: 100%;
}
.panel-header > *,
.dialog-header > *,
.toolbar > * { min-width: 0; }
.panel-header h3,
.dialog-header h3,
.detail-list dd,
.timeline li,
.v76-notification span,
.v77-history-item,
.v77-bell-item {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Hộp thoại luôn nằm trọn trong màn hình, không làm rộng toàn trang. */
dialog,
dialog.large-dialog,
#requestDialog,
.project-dialog-v77,
.v77-category-picker-dialog,
.v77-activity-dialog {
  width: min(1240px, calc(100vw - 16px)) !important;
  max-width: calc(100vw - 16px) !important;
  max-height: calc(100dvh - 16px) !important;
  margin: auto !important;
  overflow: hidden !important;
  overscroll-behavior: contain;
}
dialog:not([open]) { display: none; }
dialog .dialog-form,
dialog .dialog-form.wide {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  max-height: calc(100dvh - 16px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scroll-padding-bottom: 24px;
}

/* Bảng dài chỉ được cuộn trong khung bảng, không kéo cả trang sang ngang. */
.table-wrap,
.compact-table,
.v78-overview-table-wrap {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}
.table-wrap table,
.compact-table table,
.v78-overview-table-wrap table {
  max-width: none;
}

@media (max-width: 760px) {
  html, body { min-height: 100%; }
  body { position: relative; }
  .app, .main, .view { overflow-x: hidden !important; }
  .view { padding-left: 12px !important; padding-right: 12px !important; }

  /* Ngăn trình duyệt tự phóng to khi nhập liệu. */
  input,
  select,
  textarea,
  .v7-search-input,
  .request-item input,
  .request-item select,
  .request-item textarea,
  .request-item .v7-search-input {
    font-size: 16px !important;
  }

  dialog,
  dialog.large-dialog,
  #requestDialog,
  .project-dialog-v77,
  .v77-category-picker-dialog,
  .v77-activity-dialog {
    width: calc(100vw - 10px) !important;
    max-width: calc(100vw - 10px) !important;
    max-height: calc(100dvh - 10px) !important;
    border-radius: 16px !important;
  }
  dialog .dialog-form,
  dialog .dialog-form.wide {
    max-height: calc(100dvh - 10px) !important;
    padding: 16px 14px calc(18px + env(safe-area-inset-bottom)) !important;
  }

  /* Trên mobile không để thanh nút đè lên nội dung đang đọc. */
  .sticky-actions {
    position: static !important;
    bottom: auto !important;
    margin-top: 20px !important;
    padding: 14px 0 0 !important;
  }
  #requestDialog .dialog-actions {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 10px !important;
  }
  #requestDialog .dialog-actions .btn {
    width: 100%;
    min-width: 0;
    white-space: normal;
  }
  #requestDialog .dialog-actions .btn:last-child {
    grid-column: 1 / -1;
  }

  /* Chi tiết đề nghị luôn là một cột, không còn một khối rộng nằm ngoài màn hình. */
  #requestDetailView .detail-grid {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100% !important;
    min-width: 0 !important;
    gap: 14px !important;
  }
  #requestDetailView .detail-grid > div,
  #requestDetailView .detail-grid > aside {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
  #requestDetailView .panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }
  #requestDetailView .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }
  #requestDetailView .detail-list {
    grid-template-columns: minmax(0, 1fr) !important;
    padding: 14px !important;
  }
  #requestDetailView .action-stack {
    width: 100%;
    padding: 12px !important;
  }
  #requestDetailView .action-stack .btn {
    display: block;
    width: 100%;
    min-width: 0;
    white-space: normal;
  }
  #requestDetailView .v76-workflow-path {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    overflow: visible;
  }
  #requestDetailView .v76-workflow-path > span:not(.v76-workflow-step) {
    display: none;
  }
  #requestDetailView .v76-workflow-step {
    display: block;
    width: 100%;
    text-align: center;
    white-space: normal;
  }
  #requestDetailView .timeline {
    padding-left: 18px !important;
    padding-right: 12px !important;
  }

  /* Dòng chi tiết đề nghị và các nút chọn không được tạo chiều rộng vượt màn hình. */
  .request-item,
  .request-item .item-grid-v72 {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    overflow: visible !important;
  }
  .request-item .item-grid-v72 {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .request-item .invoice-options {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  .inline-control,
  .request-item .inline-control {
    grid-template-columns: minmax(0, 1fr) auto !important;
    min-width: 0;
  }

  /* Các thanh công cụ tự xuống dòng, không làm trang rộng hơn màn hình. */
  .toolbar,
  .panel-header,
  .section-heading,
  .v77-project-detail-tools,
  .v78-overview-actions {
    width: 100%;
    max-width: 100%;
    flex-wrap: wrap;
  }
  .v78-overview-actions { min-width: 0 !important; }
}


/* ===== Legacy stylesheet boundary: v7_10.css ===== */
/* QSCM V7.10 */

/* Chỉ chuông mới được hiển thị số thông báo */
.v76-notification-panel,
.nav-returned-badge-v75,
.returned-badge { display: none !important; }

/* Tên doanh nghiệp nổi bật hơn */
#loginView .login-card > small {
  display: block;
  margin: 9px 0 4px;
  color: #c62828 !important;
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.35;
}
.sidebar-brand small {
  color: #b42318;
  font-weight: 700;
  font-size: .8rem;
}
.active-company-badge-v79 strong { color: #b42318; font-weight: 800; }

/* Cài đặt công ty */
.v710-company-panel { overflow: visible; }
.v710-company-form { max-width: 1100px; }
.v710-company-preview {
  display: grid;
  gap: 3px;
  padding: 14px 16px;
  margin-bottom: 14px;
  border-radius: 14px;
  border: 1px solid #fecaca;
  background: #fff7f7;
}
.v710-company-preview small { color: #667085; }
.v710-company-preview strong { color: #b42318; font-size: 1.12rem; }
.v710-company-preview span { color: #475467; font-size: .85rem; }

/* Cây hạng mục */
.v710-category-toolbar { align-items: end; gap: 12px; flex-wrap: wrap; }
.v710-category-search { min-width: min(340px, 100%); flex: 1 1 280px; }
.v710-category-table-wrap { max-height: 68vh; }
.v710-category-table thead th { position: sticky; top: 0; z-index: 2; background: #f8fafc; }
.v710-category-name {
  --indent: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 260px;
  padding-left: calc(var(--indent) * 18px);
}
.v710-tree-mark { width: 14px; flex: 0 0 14px; color: #98a2b3; text-align: center; }
.v710-category-level-1 .v710-category-name strong { color: #101828; font-size: .96rem; }
.v710-category-level-2 .v710-category-name strong { color: #344054; }
.v710-category-level-3 .v710-category-name strong,
.v710-category-level-4 .v710-category-name strong,
.v710-category-level-5 .v710-category-name strong { color: #475467; font-weight: 650; }
.v710-standard-tag {
  margin-left: 4px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #027a48;
  font-size: .66rem;
  font-weight: 700;
}

/* Điều khiển mobile */
.v710-mobile-tools { gap: 4px; align-items: center; margin-left: auto; margin-right: 4px; }
.v710-mobile-tools button {
  width: 34px;
  height: 34px;
  border: 1px solid #d0d5dd;
  background: #fff;
  border-radius: 10px;
  color: #344054;
  font-size: 16px;
  display: inline-grid;
  place-items: center;
}
.v710-mobile-tools button.active { background: #eff8ff; border-color: #84caff; color: #175cd3; }

@media (max-width: 780px) {
  html { font-size: 14px; }
  body { font-size: 13px; }
  .main { min-width: 0; }
  .topbar { padding: 8px 10px; gap: 7px; }
  .topbar h2 { font-size: 1rem; }
  .topbar #pageSubtitle { font-size: .72rem; }
  .user-box { gap: 4px; }
  .user-box > div { display: none; }
  .user-box .btn { padding: 7px 8px; font-size: .72rem; }
  .v710-mobile-tools { display: flex !important; }
  .dialog-form, .dialog-form.wide { font-size: .83rem; }
  input, select, textarea, button { font-size: 13px; }
  .btn { padding: 8px 10px; }
  .panel-header h3 { font-size: .94rem; }
  .v710-category-table { min-width: 900px; }
  .v710-category-name { min-width: 230px; }
  .v710-company-preview strong { font-size: 1rem; }
}

@media (max-width: 430px) {
  html { font-size: 13.5px; }
  body { font-size: 12.5px; }
  .v710-mobile-tools button { width: 31px; height: 31px; font-size: 14px; border-radius: 9px; }
  .topbar { min-height: 52px; }
  #loginView .login-card > small { font-size: 1rem; }
}

/* Bố cục tối ưu theo chiều thực tế */
@media (orientation: landscape) and (max-height: 600px) {
  body { font-size: 12px; }
  .topbar { min-height: 46px; padding-top: 5px; padding-bottom: 5px; }
  dialog .dialog-form { max-height: 92vh; }
  .sidebar { overflow-y: auto; }
  .v710-mobile-tools button { width: 29px; height: 29px; }
}

/* Giữ bộ điều khiển mobile khi xoay ngang: chiều rộng CSS có thể lớn hơn 780px. */
@media (hover: none) and (pointer: coarse) {
  .v710-mobile-tools { display: flex !important; }
}


/* ===== Legacy stylesheet boundary: v7_10_1.css ===== */
/* QSCM V7.10.1 - Settings + cây hạng mục thu gọn */
.v7101-settings-shell{max-width:1180px;margin:0 auto;padding-bottom:28px}
.v7101-company-panel{margin-top:0!important;overflow:visible}
.v7101-company-header{align-items:flex-start;gap:16px}
.v7101-company-form{max-width:none!important;padding-top:8px}
.v7101-company-preview{display:grid;gap:4px;padding:16px 18px;margin-bottom:18px;border:1px solid #fecaca;background:#fff7f7;border-radius:14px}
.v7101-company-preview small{color:#64748b;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.v7101-company-preview strong{font-size:20px;color:#dc2626;line-height:1.25}
.v7101-company-preview span{color:#475569}
.v7101-settings-section{padding:18px;border:1px solid #dbe4ef;border-radius:14px;background:#fff;margin-bottom:14px}
.v7101-settings-section-title{display:flex;align-items:baseline;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.v7101-settings-section-title strong{font-size:16px;color:#0f172a}
.v7101-settings-section-title span{font-size:12px;color:#64748b}
.v7101-settings-note{margin-top:4px}
.v7101-settings-actions{padding-top:10px;border-top:1px solid #e2e8f0}

.v7101-category-toolbar{display:grid!important;grid-template-columns:minmax(180px,240px) minmax(260px,1fr) auto;gap:10px;align-items:end}
.v7101-category-search{min-width:0}
.v7101-category-actions{justify-content:flex-end;gap:8px;flex-wrap:wrap}
.v7101-category-panel{overflow:hidden}
.v7101-category-panel-header{gap:16px}
.v7101-category-summary{display:flex;flex-direction:column;align-items:flex-end;gap:3px;white-space:nowrap}
.v7101-category-summary small{font-size:11px;color:#64748b}
.v7101-category-scroll{height:min(620px,calc(100vh - 320px));min-height:320px;overflow-y:scroll;overflow-x:auto;scrollbar-gutter:stable;border-top:1px solid #e2e8f0;background:#fff}
.v7101-category-scroll::-webkit-scrollbar{width:11px;height:11px}
.v7101-category-scroll::-webkit-scrollbar-thumb{background:#aebdce;border:3px solid #fff;border-radius:10px}
.v7101-category-scroll::-webkit-scrollbar-track{background:#f3f6fa}
.v7101-category-table{width:100%;border-collapse:separate;border-spacing:0;min-width:840px}
.v7101-category-table thead th{position:sticky;top:0;z-index:3;background:#f8fafc;border-bottom:1px solid #dbe4ef;padding:10px 12px;text-align:left;font-size:11px;letter-spacing:.03em;text-transform:uppercase;color:#64748b}
.v7101-category-table thead th:last-child{text-align:right}
.v7101-category-table td{padding:10px 12px;border-bottom:1px solid #edf2f7;vertical-align:middle;font-size:13px}
.v7101-category-row:hover td{background:#f8fbff}
.v7101-root-row td{background:#f7faff;font-weight:600}
.v7101-root-row:hover td{background:#eef5ff}
.v7101-category-main{min-width:420px}
.v7101-tree-line{display:flex;align-items:center;gap:8px;padding-left:calc(var(--tree-level) * 22px);min-height:30px}
.v7101-tree-toggle{width:26px;height:26px;min-width:26px;border:1px solid #b9c9da;border-radius:7px;background:#fff;color:#155eef;font-size:18px;line-height:20px;font-weight:800;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
.v7101-tree-toggle:hover{background:#eaf2ff;border-color:#7aa7ff}
.v7101-tree-leaf{width:26px;min-width:26px;text-align:center;color:#94a3b8;font-size:18px}
.v7101-category-code-name{display:flex;align-items:center;gap:9px;min-width:0;flex-wrap:wrap}
.v7101-category-code{display:inline-block;min-width:88px;color:#0f172a}
.v7101-category-title{color:#1e293b;font-weight:650}
.v7101-standard-tag{padding:2px 6px;border-radius:999px;background:#e7f8ee;color:#15803d;font-size:10px;font-weight:700}
.v7101-category-path{display:block;margin-left:calc(34px + (var(--tree-level,0) * 22px));padding-left:0;color:#94a3b8;font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:620px}
.v7101-parent-cell{color:#475569;max-width:280px}
.v7101-money-cell{text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}

@media (max-width:1100px){
  .v7101-category-toolbar{grid-template-columns:1fr 1fr}.v7101-category-actions{grid-column:1/-1;justify-content:flex-start}
}
@media (max-width:720px){
  .v7101-settings-shell{padding:0 2px 18px}.v7101-settings-section{padding:12px}.v7101-company-preview strong{font-size:17px}
  .v7101-category-toolbar{grid-template-columns:1fr}.v7101-category-actions{grid-column:auto;display:grid;grid-template-columns:1fr 1fr;width:100%}.v7101-category-actions .btn{min-width:0;padding-left:8px;padding-right:8px}
  .v7101-category-scroll{height:calc(100dvh - 310px);min-height:300px}
  .v7101-category-table{min-width:680px}.v7101-category-table td{padding:8px;font-size:12px}.v7101-category-table thead th{padding:8px;font-size:10px}.v7101-tree-line{padding-left:calc(var(--tree-level) * 16px)}
}


/* ===== Legacy stylesheet boundary: v7_10_3.css ===== */
/* QSCM V7.10.3 - Settings visibility & request status cleanup */
.settings-nav.v7103-settings-active {
  background: linear-gradient(135deg,#155eef,#004eeb) !important;
  color:#fff !important;
  box-shadow:0 0 0 2px rgba(21,94,239,.16),0 8px 18px rgba(21,94,239,.22);
}
.v7103-settings-entry {
  display:flex; align-items:center; justify-content:space-between; gap:18px;
  margin-bottom:16px; padding:18px 20px; border:1px solid #fecaca;
  border-left:5px solid #dc2626; border-radius:14px; background:#fff;
  box-shadow:0 8px 24px rgba(15,23,42,.06);
}
.v7103-settings-entry h3 {margin:0 0 5px;font-size:1.05rem;color:#101828}
.v7103-settings-entry p {margin:0;color:#667085;font-size:.9rem}
.v7103-company-jump {
  border:0; border-radius:10px; padding:11px 16px; font-weight:800; white-space:nowrap;
  color:#fff; background:#dc2626; cursor:pointer;
}
.v7103-company-jump:hover {background:#b91c1c}
#settingsView:not(.hidden){display:block !important;padding:18px 24px 32px !important;overflow:auto !important;}
#settingsView .v7101-settings-shell{display:block !important;visibility:visible !important;opacity:1 !important;}
#settingsView .v7101-company-panel{border:1px solid #d0d5dd;background:#fff;}
.v7103-filter-note {display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px;font-size:.82rem;color:#667085}
.v7103-clear-filter {border:1px solid #b2ccff;background:#eff4ff;color:#1849a9;border-radius:8px;padding:6px 10px;font-weight:700;cursor:pointer}
@media(max-width:720px){
  #settingsView:not(.hidden){padding:12px !important}
  .v7103-settings-entry{align-items:stretch;flex-direction:column;padding:14px}
  .v7103-company-jump{width:100%}
}


/* ===== Legacy stylesheet boundary: v7_11.css ===== */
/* QSCM V7.11 - Supplier returns/refunds and client cash tracking */
.v711-dialog .dialog-form{max-width:1040px}
.v711-kpis,.v711-client-kpis{display:grid;grid-template-columns:repeat(5,minmax(140px,1fr));gap:10px;padding:14px 16px}
.v711-kpis>div,.v711-client-kpis>div{border:1px solid #dce6f0;background:#f8fbff;border-radius:12px;padding:12px;min-width:0}
.v711-kpis small,.v711-client-kpis small{display:block;color:#667085;font-size:.78rem;margin-bottom:6px}
.v711-kpis strong,.v711-client-kpis strong{display:block;font-size:.96rem;white-space:nowrap}
.v711-two-cols{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:0 16px 16px}
.v711-two-cols>div{min-width:0}.v711-two-cols h4{margin:8px 0 10px}
.v711-supplier-adjust-panel{margin-top:16px}.v711-client-summary{margin-top:16px}
.v711-tax-check{align-self:end;min-height:44px;padding:10px 12px;border:1px solid #dfe7ef;border-radius:10px;background:#f8fafc}
.project-overview-table-v78 td small{display:block;margin-top:3px;color:#667085;font-size:.68rem;line-height:1.25}
@media(max-width:900px){
  .v711-kpis,.v711-client-kpis{grid-template-columns:repeat(2,minmax(0,1fr));padding:10px}
  .v711-two-cols{grid-template-columns:1fr;padding:0 10px 10px}
  .v711-dialog .form-grid{grid-template-columns:1fr}
  .v711-dialog .span-2{grid-column:auto}
  .v711-kpis strong,.v711-client-kpis strong{font-size:.86rem}
}


/* ===== Legacy stylesheet boundary: v7_12.css ===== */
/* QSCM V7.12 */
.v712-dialog .dialog-form{max-width:1120px}.v712-return-head{grid-template-columns:1.4fr 1fr 1fr 1.2fr}.v712-return-item{display:grid;grid-template-columns:80px minmax(260px,1.5fr) minmax(130px,.6fr) minmax(145px,.65fr) minmax(155px,.7fr);gap:10px;align-items:end;padding:10px 12px;border:1px solid #e1e8f0;border-radius:10px;background:#fff;margin-bottom:8px}.v712-return-desc{display:flex;flex-direction:column;gap:2px;min-width:0}.v712-return-desc strong{font-size:.88rem}.v712-return-desc small,.v712-return-desc span{font-size:.72rem;color:#667085}.v712-return-check{align-self:center}.v712-return-table th,.v712-return-table td{font-size:.76rem}.v712-actions-cell{min-width:170px}.v712-actions-cell .mini-btn{margin:2px}.v712-filter-panel .panel-header{padding-bottom:8px}.v712-return-filter-grid{grid-template-columns:1fr 1.15fr 1.2fr 1fr 1.4fr auto}.v712-picker-tools{display:flex;gap:10px;padding:0 0 12px}.v712-picker-tools input{flex:1}.v712-category-tree{max-height:min(65vh,620px);overflow:auto;border:1px solid #dfe7ef;border-radius:12px;background:#fff}.v712-tree-row{display:flex;align-items:stretch;padding-left:calc(var(--level)*22px);border-bottom:1px solid #eef2f6}.v712-tree-row.selected{background:#eff6ff}.v712-tree-toggle{width:38px;border:0;background:transparent;font-weight:800;cursor:pointer}.v712-tree-toggle:disabled{cursor:default}.v712-tree-select{flex:1;border:0;background:transparent;text-align:left;padding:9px 8px;display:grid;grid-template-columns:110px 1fr;gap:4px 10px;cursor:pointer}.v712-tree-select strong{color:#0f4fa8}.v712-tree-select small{grid-column:1/-1;color:#667085;font-size:.68rem}.v712-hidden-category-select{display:none!important}.v7-search-select.v712-hidden-category-select{display:none!important}.v712-debt-category-button{width:100%;min-height:42px;border:1px solid #d7e0ea;background:#fff;border-radius:10px;padding:7px 10px;display:flex;align-items:center;justify-content:space-between;gap:10px;text-align:left;cursor:pointer}.v712-debt-category-button span{display:flex;flex-direction:column;min-width:0}.v712-debt-category-button strong{font-size:.8rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v712-debt-category-button small{font-size:.66rem;color:#667085;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.v712-debt-category-button b{color:#175cd3;font-size:.72rem}.v712-employee-check{background:#f8fafc;border:1px dashed #cbd5e1;border-radius:10px;padding:10px}.v712-company-panel{max-width:1180px}.v712-company-form{padding:0}.v712-company-header{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 16px;border-bottom:1px solid #e4eaf1;background:#fbfdff;position:sticky;top:0;z-index:3}.v712-company-header h3{margin:0 0 2px}.v712-company-header small{color:#667085}.v712-company-save{display:flex;align-items:center;gap:8px;flex-shrink:0}.v712-company-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;padding:14px 16px}.v712-company-grid label{font-size:.78rem}.v712-company-grid input,.v712-company-grid select{min-height:38px;font-size:.8rem}.v712-company-grid .v712-wide{grid-column:span 2}.v712-company-grid .v712-span-2{grid-column:span 2}.v7101-category-row{cursor:default}.v7101-category-row:hover{background:#f8fbff}.v7101-category-row[title]{cursor:pointer}.v7101-category-row[title]:hover .v7101-category-title{text-decoration:underline;text-decoration-style:dotted}.v712-delete-project{margin-left:4px}
@media(max-width:1050px){.v712-return-head{grid-template-columns:1fr 1fr}.v712-return-item{grid-template-columns:64px 1.3fr 1fr 1fr}.v712-return-item label:last-child{grid-column:3/5}.v712-return-filter-grid{grid-template-columns:repeat(3,1fr)}.v712-company-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:700px){.v712-return-head,.v712-return-filter-grid,.v712-company-grid{grid-template-columns:1fr}.v712-return-item{grid-template-columns:54px 1fr}.v712-return-item label{grid-column:1/-1}.v712-return-item .v712-return-check{grid-column:1}.v712-return-item .v712-return-desc{grid-column:2}.v712-company-grid .v712-wide,.v712-company-grid .v712-span-2{grid-column:auto}.v712-company-header{align-items:flex-start}.v712-company-save{flex-direction:column;align-items:stretch}.v712-picker-tools{flex-direction:column}.v712-tree-select{grid-template-columns:90px 1fr}.v712-return-table{min-width:1100px}}

.v712-return-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-bottom:6px}
.v712-return-summary-grid span{background:#fff;border:1px solid #d8e2ec;border-radius:10px;padding:8px 10px;display:flex;flex-direction:column;gap:3px}
.v712-return-summary-grid strong{font-size:14px}
@media(max-width:800px){.v712-return-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* ===== Legacy stylesheet boundary: v7_13.css ===== */
/* QSCM V7.13 */
.v713-alert-stack{position:fixed;top:18px;left:50%;transform:translateX(-50%);z-index:2147483647;width:min(560px,calc(100vw - 24px));display:grid;gap:8px;pointer-events:none}
.v713-alert-card{pointer-events:auto;background:#fff;border:1px solid #d0d5dd;border-left:5px solid #b54708;border-radius:12px;box-shadow:0 20px 60px rgba(16,24,40,.28);padding:12px 14px;color:#101828}
.v713-alert-card.error{border-left-color:#d92d20}.v713-alert-card.success{border-left-color:#079455}.v713-alert-card.warning{border-left-color:#f79009}
.v713-alert-card strong{display:block;font-size:.9rem}.v713-alert-card small{display:block;color:#475467;margin-top:3px;line-height:1.45}.v713-alert-card button{float:right;border:0;background:transparent;font-size:20px;padding:0 2px}
.v713-return-evidence,.v713-refund-box{margin-top:12px;border:1px solid #dfe7ef;border-radius:12px;padding:10px 12px;background:#fbfdff}.v713-refund-box{background:#fffaf0;border-color:#f3d39b}
.v713-compact-heading{margin-top:0!important;padding-top:0!important;border-top:0!important}.v713-compact-heading h4{font-size:.9rem}.v713-refund-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:8px 10px}.v713-refund-grid label{margin-top:8px;font-size:.76rem}.v713-refund-eligibility{margin-top:8px;padding:9px 11px;font-size:.77rem}
.v713-request-return-list{padding:12px;display:grid;gap:10px}.v713-request-return-card{border:1px solid #e1e8f0;border-radius:12px;background:#fbfdff;padding:12px}.v713-request-return-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.v713-request-return-head small{display:block;color:#667085;margin-top:2px}.v713-request-return-line{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px dashed #e4e7ec;font-size:.8rem}.v713-request-return-line small{color:#667085}.v713-request-return-totals{display:flex;gap:18px;flex-wrap:wrap;padding-top:8px;font-size:.78rem}.v713-return-doc-files{display:grid;gap:5px;margin-top:8px}
.v713-bulk-actions,.v713-master-toolbar{gap:8px}.v713-check-head,.v713-check-cell{width:44px;text-align:center}.v713-check-head input,.v713-check-cell input,.v713-customer-check,.v713-bank-check{width:18px;height:18px}
.v713-project-check{display:flex;align-items:center;gap:6px;margin:-4px 0 8px;color:#475467;font-size:.76rem;font-weight:700}.v713-project-check input{width:17px;height:17px}
#approvedReturnMetaDialogV713{width:min(820px,calc(100vw - 24px))}
@media(max-width:900px){.v713-refund-grid{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.v713-alert-stack{top:10px}.v713-refund-grid{grid-template-columns:1fr}.v713-request-return-head{flex-direction:column}.v713-request-return-line{flex-direction:column;gap:2px}.v713-bulk-actions{width:100%;overflow-x:auto;flex-wrap:nowrap}.v713-bulk-actions .btn{white-space:nowrap}}


/* ===== Legacy stylesheet boundary: qscm-layout.css ===== */
/* CMD application shell and responsive foundation (Build 04–06A). */
:root {
  --qscm-sidebar-width: clamp(252px, 18vw, 286px);
  --qscm-content-gutter: clamp(18px, 2.2vw, 34px);
  --qscm-touch-target: 44px;
  --qscm-topbar-height: 72px;
  --qscm-radius-panel: 14px;
  font-size: 16px;
}

html {
  color-scheme: light;
  background: #f4f6fa;
}

body {
  min-width: 320px;
  font-size: 15px;
  line-height: 1.45;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

.login-shell {
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(760px, 100%);
}

.login-product-tagline {
  margin: 0;
  padding: 0 12px;
  color: #344054;
  font-size: clamp(.92rem, 1.4vw, 1.02rem);
  font-weight: 750;
  letter-spacing: .01em;
  text-align: center;
}

.brand-mark {
  font-size: .92rem;
  letter-spacing: .02em;
}

.brand-mark.small {
  font-size: .72rem;
}

.qscm-request-date-mobile,
.qscm-debt-date-mobile {
  display: none;
}

.qscm-payment-filter-grid {
  grid-template-columns: repeat(4, minmax(170px, 1fr));
}

.qscm-payment-filter-grid .qscm-filter-group-label {
  align-self: end;
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  background: #f2f4f7;
  color: #344054;
  font-weight: 800;
}

.table-pager[aria-label] small {
  color: var(--muted);
}

.qscm-page-number[aria-current="page"] {
  pointer-events: none;
}

button,
input,
select,
textarea {
  line-height: 1.35;
}

button,
.btn,
.mini-btn,
.icon-btn,
.nav-btn,
.file-label {
  min-height: 40px;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(21, 112, 239, .22);
  outline-offset: 2px;
}

.app {
  grid-template-columns: var(--qscm-sidebar-width) minmax(0, 1fr);
  width: 100%;
  min-width: 0;
}

.sidebar {
  width: var(--qscm-sidebar-width);
  max-width: 100vw;
  padding: 18px 14px max(18px, env(safe-area-inset-bottom));
  scrollbar-width: thin;
  scrollbar-gutter: stable;
  overscroll-behavior: contain;
  contain: layout paint;
  isolation: isolate;
}

.sidebar-brand {
  min-height: 58px;
}

.sidebar-brand > div:nth-child(2) {
  min-width: 0;
}

.sidebar-brand strong,
.sidebar-brand small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-close,
.sidebar-backdrop,
.mobile-account-button,
.mobile-account-dialog {
  display: none;
}

.sidebar-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

.sidebar-session-tools {
  display: none;
}

.main {
  width: 100%;
  min-width: 0;
}

.topbar {
  min-height: var(--qscm-topbar-height);
  padding: 12px var(--qscm-content-gutter);
  gap: 12px;
  z-index: 40;
}

.topbar-heading {
  min-width: 0;
  flex: 1 1 auto;
}

.topbar-heading h2,
.topbar-heading p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar h2 {
  font-size: clamp(1.15rem, 1.4vw, 1.38rem);
  line-height: 1.25;
}

.topbar p {
  font-size: .86rem;
}

.user-box {
  min-width: 0;
  flex: 0 1 auto;
}

.user-box > div {
  min-width: 0;
  max-width: 240px;
}

.user-box strong,
.user-box small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-box .btn {
  white-space: nowrap;
}

.view {
  width: 100%;
  max-width: 1920px;
  min-width: 0;
  margin-inline: auto;
  padding: 24px var(--qscm-content-gutter) 48px;
}

.panel,
.stat-card,
.project-card {
  border-radius: var(--qscm-radius-panel);
}

.panel-header {
  min-width: 0;
}

.panel-header h3,
.dialog-header h3 {
  line-height: 1.35;
}

.table-wrap {
  position: relative;
  scrollbar-gutter: stable;
}

th,
td {
  line-height: 1.4;
}

dialog,
dialog.large-dialog,
#requestDialog {
  max-height: calc(100dvh - 24px) !important;
  border: 1px solid rgba(208, 213, 221, .9);
}

dialog .dialog-form,
dialog .dialog-form.wide {
  max-height: calc(100dvh - 24px) !important;
  scrollbar-gutter: stable;
  scroll-padding-bottom: 88px;
}

.dialog-header {
  min-height: 44px;
}

.dialog-header .icon-btn {
  flex: 0 0 var(--qscm-touch-target);
  width: var(--qscm-touch-target);
  min-height: var(--qscm-touch-target);
  display: grid;
  place-items: center;
}

.dialog-actions .btn {
  min-height: var(--qscm-touch-target);
}

/* Build 05: shared filters, project assignments, attachment sources and category tools. */
.qscm-filter-panel [hidden] {
  display: none !important;
}

.qscm-filter-controlbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #e4e7ec;
  background: #fbfcfe;
}

.qscm-filter-primary-actions,
.qscm-filter-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.qscm-filter-primary-actions:empty {
  display: none;
}

.qscm-filter-buttons {
  margin-left: auto;
}

.qscm-filter-buttons .btn {
  min-height: 40px;
  white-space: nowrap;
}

.qscm-legacy-filter-clear,
#requestFilterHintV7103 {
  display: none !important;
}

.qscm-project-assignment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.qscm-assignment-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dbe4ef;
  border-radius: 13px;
  background: #f8fafc;
}

.qscm-assignment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.qscm-assignment-head strong,
.qscm-assignment-head small {
  display: block;
}

.qscm-assignment-head small {
  margin-top: 3px;
  color: #667085;
  font-weight: 450;
}

.qscm-assignment-head .check-row {
  flex: 0 0 auto;
  margin: 0 !important;
  white-space: nowrap;
}

.qscm-assignment-card > input[type="search"] {
  margin-top: 12px;
}

.qscm-assignee-list {
  display: grid;
  gap: 7px;
  max-height: 220px;
  margin-top: 10px;
  padding-right: 3px;
  overflow-y: auto;
  scrollbar-gutter: stable;
}

.qscm-assignee-option {
  display: grid !important;
  grid-template-columns: 20px minmax(0, 1fr) !important;
  align-items: center;
  gap: 9px !important;
  min-height: 46px;
  margin: 0 !important;
  padding: 8px 10px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
}

.qscm-assignee-option:has(input:checked) {
  border-color: #84adff;
  background: #eff4ff;
}

.qscm-assignee-option input {
  width: 17px;
  height: 17px;
  min-height: 0 !important;
  margin: 0;
}

.qscm-assignee-option strong,
.qscm-assignee-option small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qscm-assignee-option small {
  margin-top: 2px;
  color: #667085;
  font-weight: 450;
}

.qscm-assignment-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
}

.compact-empty {
  padding: 18px 10px;
}

.qscm-file-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none;
}

.qscm-file-source-picker {
  display: grid;
  gap: 7px;
  margin-top: 7px;
}

.qscm-file-source-actions,
.qscm-source-dialog-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.qscm-file-source-actions .btn,
.qscm-source-dialog-actions .btn {
  min-width: 0;
  min-height: 44px;
  padding-inline: 9px;
  white-space: normal;
}

.qscm-file-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qscm-pending-files {
  display: grid;
  gap: 7px;
}

.qscm-pending-files:empty {
  display: none;
}

.qscm-pending-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #f8fafc;
}

.qscm-pending-file > span {
  min-width: 0;
}

.qscm-pending-file strong,
.qscm-pending-file small {
  display: block;
}

.qscm-pending-file strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qscm-pending-file small {
  margin-top: 2px;
  color: #667085;
  font-weight: 450;
}

.qscm-source-dialog-actions {
  margin-top: 18px;
}

.qscm-category-selectionbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid #e4e7ec;
  background: #fbfcfe;
}

.qscm-selection-label {
  color: #667085;
  font-size: .8rem;
  font-weight: 700;
}

.qscm-category-tree-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.qscm-category-tree-actions .btn {
  min-width: 112px;
}

@media (max-width: 1180px) {
  :root {
    --qscm-sidebar-width: 250px;
    --qscm-content-gutter: 20px;
  }

  .topbar .user-box > div {
    display: none;
  }
}

/* Tablets and phones use the full viewport; navigation becomes a drawer. */
@media (max-width: 1024px) {
  :root {
    --qscm-content-gutter: clamp(12px, 2.4vw, 20px);
    --qscm-topbar-height: 64px;
  }

  .mobile-only {
    display: inline-flex !important;
  }

  .qscm-payment-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app {
    display: block;
  }

  .main {
    padding-top: var(--qscm-topbar-height);
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 220;
    width: min(326px, 88vw);
    height: 100dvh;
    transform: translateX(-105%);
    transition: transform .22s ease;
    will-change: transform;
  }

  .sidebar.open {
    left: 0;
    transform: translateX(0);
    box-shadow: 24px 0 70px rgba(16, 24, 40, .34);
  }

  .sidebar-brand {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 44px;
    gap: 11px;
    padding-inline: 6px;
  }

  .sidebar-close {
    display: grid;
    place-items: center;
    width: 44px;
    min-height: 44px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 11px;
    background: rgba(255, 255, 255, .06);
    color: #fff;
    font-size: 1.1rem;
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 0;
    border: 0;
    background: rgba(15, 23, 42, .48);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
  }

  .sidebar.open ~ .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  body.qscm-drawer-open {
    overflow: hidden;
    touch-action: none;
  }

  .sidebar-session-tools {
    display: block;
    padding: 8px 0 10px;
    border-top: 1px solid rgba(255, 255, 255, .1);
    border-bottom: 1px solid rgba(255, 255, 255, .1);
  }

  .sidebar-session-tools::before {
    content: "Hiển thị trên điện thoại";
    display: block;
    margin-bottom: 8px;
    color: #98a2b3;
    font-size: .75rem;
    font-weight: 750;
  }

  .sidebar-session-tools .v710-mobile-tools {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    margin: 0;
    gap: 7px;
  }

  .sidebar-session-tools .v710-mobile-tools button {
    width: 100%;
    height: 44px;
    min-height: 44px;
    border-color: rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .07);
    color: #e4e7ec;
  }

  .sidebar-session-tools .v710-mobile-tools button.active {
    border-color: #84caff;
    background: rgba(46, 144, 250, .24);
    color: #fff;
  }

  .sidebar-bottom .btn,
  .sidebar-bottom .file-label {
    min-height: 44px !important;
    padding-block: 10px !important;
  }

  .topbar {
    position: fixed !important;
    inset: 0 0 auto 0;
    width: 100%;
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
    align-items: center;
    min-height: var(--qscm-topbar-height);
    padding: 8px var(--qscm-content-gutter);
    gap: 8px;
    box-shadow: 0 1px 0 rgba(16, 24, 40, .08);
  }

  .qscm-project-assignment-grid {
    grid-template-columns: 1fr;
  }

  .v78-output-overview .table-wrap {
    max-height: none !important;
    overflow-y: visible !important;
  }

  .qscm-filter-controlbar {
    position: relative;
    z-index: 3;
  }

  #menuBtn,
  .mobile-account-button {
    width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid #d0d5dd;
    border-radius: 11px;
    background: #fff;
    color: #344054;
  }

  #menuBtn {
    grid-column: 1;
    grid-row: 1;
  }

  .topbar-heading {
    grid-column: 2;
    grid-row: 1;
  }

  .topbar > .v77-bell-button {
    grid-column: 3;
    grid-row: 1;
    width: 44px;
    height: 44px;
    min-height: 44px;
    margin: 0;
  }

  .mobile-account-button {
    grid-column: 4;
    grid-row: 1;
    display: inline-grid !important;
    place-items: center;
    padding: 0;
    font-size: .76rem;
    font-weight: 850;
    color: #175cd3;
    background: #eff4ff;
    border-color: #b2ccff;
  }

  .topbar > .v710-mobile-tools,
  .topbar > .active-company-badge-v79,
  .topbar > .user-box {
    display: none !important;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  .v7-search-input {
    padding-right: 52px !important;
  }

  .v73-select-toggle {
    top: 0;
    right: 0;
    width: 44px !important;
    min-width: 44px;
    min-height: 44px !important;
    height: 100% !important;
  }

  .sticky-actions {
    position: static !important;
    bottom: auto !important;
    margin-top: 20px !important;
    padding: 14px 0 0 !important;
  }

  .topbar h2 {
    font-size: 1.08rem;
  }

  .topbar p {
    font-size: .78rem;
  }

  .view {
    padding-top: 18px;
    padding-bottom: 38px;
  }

  .mobile-account-dialog[open] {
    display: block;
    width: min(420px, calc(100vw - 20px)) !important;
  }

  .mobile-account-card {
    display: grid;
    gap: 14px;
  }

  .mobile-account-identity {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 13px;
    border: 1px solid #dbe4ef;
    border-radius: 13px;
    background: #f8fafc;
  }

  .mobile-account-avatar {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #eaf2ff;
    color: #175cd3;
    font-weight: 850;
  }

  .mobile-account-identity strong,
  .mobile-account-identity small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-account-identity small {
    margin-top: 3px;
    color: #667085;
  }

  .mobile-account-actions {
    display: grid;
    gap: 9px;
  }

  .mobile-account-actions .btn {
    width: 100%;
    min-height: 46px;
  }
}

@media (max-width: 760px) {
  body {
    font-size: 14px !important;
    line-height: 1.45;
  }

  input,
  select,
  textarea,
  button,
  .btn,
  .mini-btn {
    font-size: 16px !important;
  }

  .btn,
  .mini-btn,
  .icon-btn,
  .nav-btn,
  .file-label {
    min-height: var(--qscm-touch-target);
  }

  .nav-btn,
  .panel,
  table,
  .status,
  .notice,
  .warning,
  .success-box {
    font-size: 14px !important;
  }

  small,
  .muted,
  th {
    font-size: 12.5px;
  }

  .qscm-payment-filter-grid {
    grid-template-columns: 1fr;
  }

  .qscm-request-date-column,
  .qscm-debt-date-column {
    display: none;
  }

  .qscm-request-date-mobile,
  .qscm-debt-date-mobile {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-weight: 650;
    white-space: nowrap;
  }

  .login-shell {
    gap: 12px;
  }

  .login-product-tagline {
    max-width: 360px;
    font-size: .92rem;
  }

  .view {
    padding: 14px 12px calc(34px + env(safe-area-inset-bottom)) !important;
  }

  .qscm-filter-controlbar {
    align-items: stretch;
    flex-direction: column;
    padding: 10px 12px;
  }

  .qscm-filter-primary-actions,
  .qscm-filter-buttons {
    width: 100%;
  }

  .qscm-filter-primary-actions .btn {
    width: 100%;
  }

  .qscm-filter-buttons {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qscm-filter-buttons .btn,
  .qscm-file-source-actions .btn,
  .qscm-source-dialog-actions .btn {
    font-size: 14px !important;
  }

  .qscm-category-selectionbar {
    align-items: stretch;
    flex-direction: column;
    gap: 7px;
    padding: 9px 12px;
  }

  .qscm-selection-label {
    display: none;
  }

  .qscm-category-selectionbar .v713-category-bulk {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    width: 100%;
    overflow: visible;
  }

  .qscm-category-selectionbar .v713-category-bulk .btn {
    min-width: 0;
    padding-inline: 7px;
    font-size: 14px !important;
    white-space: normal;
  }

  .qscm-category-tree-actions {
    grid-column: 1 / -1;
    width: 100%;
  }

  .qscm-category-tree-actions .btn {
    min-width: 0;
  }

  .qscm-pending-file {
    align-items: flex-start;
  }

  .v713-check-head input,
  .v713-check-cell input {
    width: 16px !important;
    height: 16px !important;
    min-height: 0 !important;
  }

  .panel,
  .stat-card,
  .project-card {
    border-radius: 12px;
  }

  .panel-header {
    padding: 14px;
  }

  .panel-header h3,
  .dialog-header h3 {
    font-size: 1rem;
  }

  .table-wrap th,
  .table-wrap td,
  .compact-table th,
  .compact-table td {
    font-size: 13px !important;
    padding: 10px 11px;
  }

  dialog,
  dialog.large-dialog,
  #requestDialog,
  .project-dialog-v77,
  .v77-category-picker-dialog,
  .v77-activity-dialog {
    width: calc(100vw - 8px) !important;
    max-width: calc(100vw - 8px) !important;
    max-height: calc(100dvh - 8px) !important;
    border-radius: 14px !important;
  }

  dialog .dialog-form,
  dialog .dialog-form.wide {
    max-height: calc(100dvh - 8px) !important;
    padding: 14px 13px calc(16px + env(safe-area-inset-bottom)) !important;
  }

  .dialog-actions {
    gap: 9px;
  }

  .dialog-actions .btn {
    min-width: 0;
    white-space: normal;
  }

  .toast {
    inset: auto 10px calc(10px + env(safe-area-inset-bottom));
    width: auto;
    max-width: none;
    font-size: 14px;
  }
}

@media (max-width: 430px) {
  :root {
    --qscm-topbar-height: 60px;
  }

  .topbar {
    grid-template-columns: 44px minmax(0, 1fr) 44px 44px;
    gap: 6px;
    padding-inline: 8px;
  }

  #menuBtn,
  .mobile-account-button,
  .topbar > .v77-bell-button {
    width: 44px;
    height: 44px;
    min-height: 44px;
  }

  .topbar h2 {
    font-size: 1rem;
  }

  .topbar p {
    display: none;
  }

  .login-view {
    align-items: center;
    padding: 14px;
  }

  .login-card {
    padding: 22px 18px;
    border-radius: 18px;
  }

  .login-card h1 {
    font-size: 1.45rem;
  }
}

/* Phone landscape keeps readable type and uses the full width instead of shrinking. */
@media (orientation: landscape) and (max-height: 600px) {
  body {
    font-size: 14px !important;
  }

  input,
  select,
  textarea {
    font-size: 16px !important;
  }

  :root {
    --qscm-topbar-height: 54px;
  }

  .topbar {
    min-height: 54px;
    padding-block: 5px;
  }

  .topbar p {
    display: none;
  }

  .view {
    padding-top: 10px !important;
    padding-inline: 12px !important;
  }

  .login-view {
    align-items: start;
    padding-block: 10px;
    overflow-y: auto;
  }

  .login-card {
    width: min(680px, 100%);
    padding: 18px 22px;
  }

  @media (min-width: 600px) {
    .login-card {
      display: grid;
      grid-template-columns: minmax(230px, .85fr) minmax(330px, 1.15fr);
      gap: 10px 24px;
      width: min(760px, 100%);
      padding: 18px 22px;
      align-items: start;
    }

    .login-card > .brand-mark { grid-column: 1; grid-row: 1; }
    .login-card > h1 { grid-column: 1; grid-row: 2; margin: 2px 0 0; }
    #loginView .login-card > small { grid-column: 1; grid-row: 3; margin: 0; }
    .login-card > p { grid-column: 1; grid-row: 4; margin: 0; }
    .login-card > label:nth-of-type(1) { grid-column: 2; grid-row: 1; }
    .login-card > label:nth-of-type(2) { grid-column: 2; grid-row: 2; }
    .login-card > label { margin-top: 0; }
    .login-card > #loginBtn { grid-column: 2; grid-row: 3; align-self: end; }
    .login-card > .demo-note { grid-column: 2; grid-row: 4; margin-top: 0; }
  }

  dialog .dialog-form,
  dialog .dialog-form.wide {
    max-height: calc(100dvh - 8px) !important;
  }

  dialog,
  dialog.large-dialog,
  #requestDialog,
  .project-dialog-v77,
  .v77-category-picker-dialog,
  .v77-activity-dialog {
    max-height: calc(100dvh - 8px) !important;
  }
}

@media (hover: none) and (pointer: coarse) {
  button,
  .btn,
  .mini-btn,
  .icon-btn,
  .nav-btn,
  .file-label,
  input:not([type="checkbox"]):not([type="radio"]),
  select {
    min-height: var(--qscm-touch-target);
  }

  input[type="checkbox"],
  input[type="radio"] {
    min-height: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
/* CMD V8.0 Alpha Build 06B — permission-core status */
.permission-core-status-v8{margin:0 0 16px;border-color:#99d5ca;background:linear-gradient(135deg,#f1fbf8,#fff)}
.qscm-permission-core-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;padding:0 16px 16px}
.qscm-permission-core-metrics>span{display:flex;min-height:74px;flex-direction:column;justify-content:center;gap:4px;padding:12px 14px;border:1px solid #d9ece8;border-radius:14px;background:#fff}
.qscm-permission-core-metrics strong{font-size:1.2rem;color:#0f766e}
.qscm-permission-core-metrics small{color:#5f6f6d;line-height:1.35}
@media(max-width:640px){.qscm-permission-core-metrics{grid-template-columns:1fr}.qscm-permission-core-metrics>span{min-height:60px}}

/* CMD V8.0 Alpha Build 06C — account lifecycle and scoped permissions */
.login-remember-row{margin-top:4px;font-size:.9rem}.permission-scope-grid{display:grid;gap:10px;margin-top:12px}.permission-scope-group{border:1px solid var(--line);border-radius:14px;overflow:hidden;background:#fff}.permission-scope-group h5{margin:0;padding:11px 13px;background:#f7fbfa;color:var(--primary-dark);font-size:.87rem}.permission-scope-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(180px,.56fr);gap:12px;align-items:center;padding:11px 13px;border-top:1px solid var(--line)}.permission-scope-row strong,.permission-scope-row small{display:block}.permission-scope-row small{margin-top:3px;color:var(--muted);line-height:1.35}.permission-scope-row select{margin:0}.account-lifecycle-note{margin:0 0 14px}.account-action-row{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}.account-state{display:grid;gap:3px}.account-state small{color:var(--muted)}.danger-text{color:var(--danger)!important}.user-permission-summary{max-width:420px;color:var(--muted);font-size:.86rem;line-height:1.4}.account-identity-hint{padding:12px 14px;margin-top:14px;border:1px solid #d6e9e5;border-radius:12px;background:#f3fbf9;color:#245f58}.account-identity-hint strong{display:block;margin-bottom:3px}@media(max-width:760px){.permission-scope-row{grid-template-columns:1fr}.permission-scope-row select{width:100%}.account-action-row{justify-content:flex-start}.account-action-row .btn{flex:1 1 145px}}
.workflow-task-panel-06e1{margin:0 0 18px}.workflow-task-panel-06e1 td:first-child strong,.workflow-task-panel-06e1 td:first-child small{display:block}.workflow-task-panel-06e1 td:last-child{text-align:right;white-space:nowrap}.workflow-unassigned-06e1{margin:0;border-left:4px solid #d97706;border-radius:0}
body.cmd-online-transaction-08c #dashboardView .workflow-task-panel-06e1{display:none!important}

/* CMD Build 06F — Trung tâm cảnh báo quản trị */
.alert-center-head{display:flex;gap:16px;align-items:flex-start;justify-content:space-between;margin-bottom:16px}.alert-center-head h3{margin:0 0 6px}.alert-center-head p{margin:0;max-width:760px}.alert-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.alert-kpi{appearance:none;border:1px solid var(--line,#d8e2e5);background:#fff;border-radius:12px;padding:14px;text-align:left;cursor:pointer;display:grid;gap:4px;color:inherit}.alert-kpi strong{font-size:1.5rem}.alert-kpi span{font-size:.85rem;color:var(--muted,#64748b)}.alert-kpi.active{outline:2px solid #0f766e;outline-offset:1px}.alert-kpi.critical{border-color:#fecaca}.alert-kpi.high{border-color:#fed7aa}.alert-filter-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 16px}.alert-filter-tabs button{border:1px solid var(--line,#d8e2e5);background:#fff;border-radius:999px;padding:8px 12px;cursor:pointer}.alert-filter-tabs button.active{background:#0f766e;border-color:#0f766e;color:#fff}.alert-list{display:grid;gap:12px}.alert-card{background:#fff;border:1px solid var(--line,#d8e2e5);border-left:5px solid #94a3b8;border-radius:12px;padding:16px;display:grid;gap:8px}.alert-card.severity-critical{border-left-color:#dc2626}.alert-card.severity-high{border-left-color:#ea580c}.alert-card.severity-medium{border-left-color:#ca8a04}.alert-card.severity-info{border-left-color:#0284c7}.alert-card.state-resolved,.alert-card.state-dismissed{opacity:.72}.alert-card-top{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}.alert-card-top>div{display:flex;gap:6px;flex-wrap:wrap}.alert-rule,.alert-severity,.alert-kind,.alert-state{display:inline-flex;border-radius:999px;padding:3px 8px;font-size:.76rem;font-weight:700}.alert-rule{background:#e2e8f0;color:#334155}.alert-severity{background:#fee2e2;color:#991b1b}.alert-kind{background:#e0f2fe;color:#075985}.alert-state{background:#f1f5f9;color:#334155}.alert-card h4,.alert-card p{margin:0}.alert-card p{line-height:1.5}.alert-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:4px}
@media (max-width:720px){.alert-center-head{flex-direction:column}.alert-center-head .btn{width:100%}.alert-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.alert-kpi{padding:12px}.alert-filter-tabs{gap:6px}.alert-filter-tabs button{padding:8px 10px}.alert-card{padding:13px}.alert-actions .btn{flex:1 1 calc(50% - 8px);min-height:40px}}

/* ===== Build 07B.2: hoàn ứng tự phân bổ, tách chứng từ chi phí và bill nộp lại ===== */
#settlementDialog.large-dialog{width:min(1180px,calc(100% - 24px))}
#settlementDialog .dialog-form{padding:16px 18px}
#settlementDialog .dialog-header{position:sticky;top:-16px;z-index:8;margin:-16px -18px 8px;padding:14px 18px 12px;border-bottom:1px solid var(--line);background:#fff}
#settlementDialog .hu-form-grid{gap:0 10px}
#settlementDialog .hu-form-grid label{margin-top:9px}
#settlementDialog .hu-form-grid input,#settlementDialog .hu-form-grid select,#settlementDialog .hu-form-grid textarea{min-height:38px;padding:8px 10px}
#settlementDialog .hu-source-panel{margin-top:12px;border-radius:12px}
#settlementDialog .hu-source-panel .panel-header{padding:11px 13px}
#settlementDialog .hu-source-panel h4{margin:0 0 3px}
#settlementDialog .hu-source-panel table{min-width:820px}
#settlementDialog .hu-source-panel th,#settlementDialog .hu-source-panel td{padding:9px 10px;vertical-align:middle}
#settlementDialog .hu-source-auto-value{display:block;white-space:nowrap;color:var(--primary-dark)}
#settlementDialog .hu-source-auto-value+small{display:block;margin-top:2px}
#settlementDialog .hu-section-heading{margin-top:14px;padding-top:13px}
#settlementDialog .hu-section-heading .toolbar{gap:7px}
#settlementDialog .hu-section-heading .btn{min-height:38px;padding:8px 10px;font-size:.82rem;text-decoration:none}
#settlementDialog .settlement-expense-list{gap:9px;margin-top:9px}
#settlementDialog .settlement-expense-row-07b{display:block;padding:10px 11px;border-radius:11px;background:#f8fafc}
#settlementDialog .hu-line-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
#settlementDialog .hu-line-head .hu-remove-line{color:var(--danger);border-color:#fecdca;background:#fff}
#settlementDialog .hu-core-grid{display:grid;grid-template-columns:minmax(230px,2fr) minmax(165px,1.15fr) minmax(130px,.85fr) minmax(105px,.7fr) minmax(145px,.9fr) minmax(155px,1fr);gap:8px;align-items:end}
#settlementDialog .settlement-expense-row-07b label{min-width:0;margin:0!important;gap:4px!important;font-size:.76rem}
#settlementDialog .settlement-expense-row-07b input,#settlementDialog .settlement-expense-row-07b select{min-width:0;min-height:36px;padding:7px 9px}
#settlementDialog .settlement-expense-row-07b .v7-search-input{padding-right:34px}
#settlementDialog .settlement-expense-row-07b .v73-select-toggle{min-width:34px;width:34px}
#settlementDialog .hu-invoice-toggle{display:inline-flex!important;margin-top:9px!important;padding:7px 10px;border:1px dashed #aacbc7;border-radius:9px;background:#fff}
#settlementDialog .hu-invoice-fields{display:grid;grid-template-columns:minmax(220px,1.2fr) minmax(150px,.7fr) minmax(280px,1.6fr);gap:8px;align-items:end;margin-top:8px;padding:9px;border:1px dashed #aacbc7;border-radius:10px;background:#f4fbfa}
#settlementDialog .hu-vat-note{display:flex;align-items:center;min-height:36px;padding:7px 10px;border-radius:8px;background:#fff;color:var(--muted)}
#settlementDialog .hu-line-total{display:flex;justify-content:flex-end;gap:22px;flex-wrap:wrap;margin-top:8px;padding-top:7px;border-top:1px solid #e2e8f0;color:var(--primary-dark);font-size:.84rem}
#settlementDialog .hu-import-preview{margin-top:10px}
#settlementDialog .hu-import-preview .panel-header{padding:10px 12px}
#settlementDialog .hu-expense-proof-field,#settlementReceiptDialog07B .hu-return-proof-field{padding:10px 12px;border:1px solid #cfe6e1;border-radius:10px;background:#f6fbfa}
#settlementDialog .hu-expense-proof-field strong,#settlementReceiptDialog07B .hu-return-proof-field strong{display:block;color:var(--primary-dark)}
#settlementDialog .hu-proof-summary{display:grid;gap:6px;margin-top:4px}
.hu-proof-list{min-width:220px;max-width:420px}
.hu-proof-list .attachment-row{padding:6px 8px}

/* Build 07C.2D: one ZIP action for every rendered attachment group. */
.qscm-attachment-bulk-07c2d{display:flex;justify-content:flex-end;align-items:center;gap:8px;padding:0 0 2px}
.qscm-download-all-attachments-07c2d{border-color:#8bcfc7;background:#edf9f7;color:var(--primary-dark);white-space:nowrap}
.qscm-download-all-attachments-07c2d:hover{background:#dff4f0}
.qscm-download-all-attachments-07c2d:disabled{cursor:wait;opacity:.65}
@media(max-width:760px){.qscm-attachment-bulk-07c2d{justify-content:stretch}.qscm-download-all-attachments-07c2d{width:100%}}

/* Build 08A/08B: Supabase staging session and hybrid Local/Online boundary. */
.cmd-online-login-status-08a{margin-top:12px;padding:10px 12px;border:1px solid #cbd5e1;border-radius:10px;background:#f8fafc;color:#475569;font-size:.86rem;line-height:1.4}
.cmd-online-login-status-08a[data-tone="working"]{border-color:#93c5fd;background:#eff6ff;color:#1d4ed8}
.cmd-online-login-status-08a[data-tone="success"]{border-color:#86efac;background:#f0fdf4;color:#166534}
.cmd-online-login-status-08a[data-tone="error"]{border-color:#fca5a5;background:#fef2f2;color:#b91c1c}
.cmd-online-workspace-control-08a{display:flex;flex-direction:column;gap:3px;min-width:210px;color:#64748b;font-size:.72rem;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.cmd-online-workspace-control-08a select{height:38px;max-width:280px;padding:0 34px 0 10px;border:1px solid #cbd5e1;border-radius:10px;background:#fff;color:#0f172a;font-size:.86rem;font-weight:650;text-transform:none;letter-spacing:normal}
.cmd-hybrid-banner-08a{display:flex;align-items:center;gap:12px;margin:14px 20px 0;padding:11px 14px;border:1px solid #f6c453;border-radius:12px;background:#fff9e8;color:#784a05}
.cmd-hybrid-banner-08a strong{white-space:nowrap;font-size:.9rem}
.cmd-hybrid-banner-08a span{font-size:.84rem;line-height:1.45}
.cmd-online-session-card-08a{display:flex;align-items:center;gap:9px;padding:10px;border:1px solid rgba(255,255,255,.14);border-radius:10px;background:rgba(255,255,255,.07)}
.cmd-online-session-card-08a>div{display:flex;min-width:0;flex-direction:column;gap:2px}
.cmd-online-session-card-08a strong{font-size:.82rem;color:#ecfeff}
.cmd-online-session-card-08a small{overflow:hidden;color:#b8d9d7;font-size:.7rem;text-overflow:ellipsis;white-space:nowrap}
.cmd-online-dot-08a{width:9px;height:9px;flex:0 0 auto;border-radius:50%;background:#4ade80;box-shadow:0 0 0 3px rgba(74,222,128,.18)}
.cmd-online-lock-local-users-08a .users-nav{display:none!important}
.cmd-online-password-dialog-08a{width:min(480px,calc(100vw - 24px))}
.danger-note{border-color:#fecaca!important;background:#fef2f2!important;color:#b91c1c!important}
@media(max-width:900px){.cmd-online-workspace-control-08a{display:none}.cmd-hybrid-banner-08a{align-items:flex-start;flex-direction:column;margin:10px 12px 0;gap:4px}.cmd-hybrid-banner-08a strong{white-space:normal}}

/* Build 08B: guarded Local -> Online foundation migration rehearsal. */
.cmd-foundation-open-08b{margin-left:auto;flex:0 0 auto;border-color:#d69e2e;background:#fff;color:#784a05;white-space:nowrap}
.cmd-foundation-dialog-08b{width:min(880px,calc(100vw - 24px));max-height:min(880px,calc(100vh - 24px))}
.cmd-foundation-boundary-08b{display:flex;gap:10px;padding:12px 14px;border:1px solid #f6c453;border-radius:12px;background:#fff9e8;color:#784a05;line-height:1.45}
.cmd-foundation-boundary-08b strong{flex:0 0 auto}.cmd-foundation-boundary-08b span{font-size:.86rem}
.cmd-foundation-grid-08b{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cmd-foundation-card-08b{display:flex;min-width:0;flex-direction:column;gap:5px;padding:13px;border:1px solid #dbe4ea;border-radius:12px;background:#f8fafc}
.cmd-foundation-card-08b small{color:#64748b;font-size:.72rem;font-weight:750;letter-spacing:.04em;text-transform:uppercase}
.cmd-foundation-card-08b strong{overflow:hidden;color:#0f172a;text-overflow:ellipsis;white-space:nowrap}
.cmd-foundation-card-08b span{color:#64748b;font-size:.78rem;line-height:1.4}
.cmd-foundation-card-08b select{margin:0;background:#fff}
.cmd-foundation-counts-08b{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.cmd-foundation-counts-08b>div{display:flex;align-items:baseline;gap:8px;padding:12px 14px;border:1px solid #dbe4ea;border-radius:11px;background:#fff}
.cmd-foundation-counts-08b strong{color:#0f766e;font-size:1.15rem}.cmd-foundation-counts-08b span{color:#64748b;font-size:.8rem}
.cmd-foundation-actions-08b{display:grid;grid-template-columns:auto auto minmax(220px,1fr) auto;align-items:center;gap:10px;padding:12px;border:1px solid #dbe4ea;border-radius:12px;background:#f8fafc}
.cmd-foundation-confirm-08b{display:flex;align-items:center;gap:8px;color:#334155;font-size:.82rem;font-weight:650}
.cmd-foundation-confirm-08b input{width:18px;height:18px;flex:0 0 auto}
.cmd-foundation-success-08b{border-color:#86efac!important;background:#f0fdf4!important;color:#166534!important}
@media(max-width:900px){.cmd-foundation-open-08b{width:100%;margin:6px 0 0}.cmd-foundation-actions-08b{grid-template-columns:1fr 1fr}.cmd-foundation-confirm-08b{grid-column:1/-1}.cmd-foundation-actions-08b .btn.primary{grid-column:1/-1}}
@media(max-width:620px){.cmd-foundation-grid-08b,.cmd-foundation-counts-08b{grid-template-columns:1fr}.cmd-foundation-boundary-08b{flex-direction:column}.cmd-foundation-actions-08b{grid-template-columns:1fr}.cmd-foundation-confirm-08b,.cmd-foundation-actions-08b .btn.primary{grid-column:auto}.cmd-foundation-dialog-08b .dialog-actions{align-items:stretch;flex-direction:column}.cmd-foundation-dialog-08b .dialog-actions .btn{width:100%}}
#settlementDialog #settlementBalancePreview,#settlementDialog #settlementReviewHint{margin-top:9px;padding:10px 12px}
#settlementDialog .sticky-actions{bottom:-16px;margin:10px -18px -16px;padding:10px 18px 12px}
@media(max-width:1050px){#settlementDialog .hu-core-grid{grid-template-columns:repeat(3,minmax(0,1fr))}#settlementDialog .hu-description-field{grid-column:span 2}#settlementDialog .hu-invoice-fields{grid-template-columns:repeat(2,minmax(0,1fr))}#settlementDialog .hu-vat-note{grid-column:1/-1}}
@media(max-width:760px){#settlementDialog.large-dialog{width:calc(100% - 10px);max-height:98vh}#settlementDialog .dialog-form{max-height:97vh;padding:12px}#settlementDialog .dialog-header{top:-12px;margin:-12px -12px 6px;padding:12px}#settlementDialog .hu-core-grid,#settlementDialog .hu-invoice-fields{grid-template-columns:1fr}#settlementDialog .hu-description-field{grid-column:auto}#settlementDialog .hu-section-heading .toolbar{width:100%}#settlementDialog .hu-section-heading .btn{flex:1 1 145px;text-align:center}#settlementDialog .hu-line-total{justify-content:space-between;gap:8px}#settlementDialog .sticky-actions{bottom:-12px;margin:10px -12px -12px;padding:9px 12px 11px}}
/* ===== Kiểu hiển thị chi tiết HU tương thích dữ liệu 07B.5 ===== */
.hu-type-badge-07b4{display:inline-flex;align-items:center;padding:4px 9px;border-radius:999px;background:#ede9fe;color:#6d28d9;font-weight:800;font-size:.78rem;white-space:nowrap}
.hu-request-table-07b4 td{vertical-align:top}
.hu-source-link-07b4{display:inline-block;margin:0 6px 4px 0}
.hu-request-filter-07b4 .request-filter-actions{align-self:end;max-width:320px}
.hu-detail-banner-07b4{display:flex;align-items:center;gap:12px;padding:14px 16px;margin-bottom:14px;border:1px solid #ddd6fe;border-radius:14px;background:linear-gradient(135deg,#faf5ff,#f5f3ff)}
.hu-detail-banner-07b4>div{display:flex;flex-direction:column;gap:3px}.hu-detail-banner-07b4 small{color:#64748b}
.hu-workflow-07b4{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:16px}
.hu-workflow-07b4>div{display:flex;align-items:center;gap:10px;padding:12px;border:1px solid var(--border,#dbe3ef);border-radius:12px;background:#fff;color:#64748b}
.hu-workflow-07b4 b{display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#e2e8f0;color:#475569}
.hu-workflow-07b4 span{display:flex;flex-direction:column;font-weight:700}.hu-workflow-07b4 small{font-weight:500}
.hu-workflow-07b4 .done{border-color:#bbf7d0;background:#f0fdf4;color:#166534}.hu-workflow-07b4 .done b{background:#22c55e;color:#fff}
.hu-workflow-07b4 .current{border-color:#fed7aa;background:#fff7ed;color:#9a3412}.hu-workflow-07b4 .current b{background:#f97316;color:#fff}
.hu-receipt-row-07b4{padding:14px 16px;border-top:1px solid var(--border,#e2e8f0)}
.hu-receipt-row-07b4>span{display:block;font-weight:700;margin-bottom:8px}
.hu-source-panel-07b4{border-color:#c4b5fd}
@media(max-width:760px){.hu-workflow-07b4{grid-template-columns:1fr}.hu-detail-banner-07b4{align-items:flex-start}.hu-request-filter-07b4 .request-filter-actions{max-width:none}}
/* ===== Kiểu tương thích 07B.5 ===== */

/* ===== CMD V8.0 Alpha Build 07B.6: vòng tạm ứng/hoàn ứng khép kín ===== */
.supplier-payment-proposals-07b6 {
  grid-column: 1 / -1;
  display: grid;
  gap: 6px;
  min-width: 0;
}
.supplier-proposal-heading-07b6 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.supplier-proposal-heading-07b6 small { color: var(--muted); }
.supplier-proposal-row-07b6 {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 220px);
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface, #fff);
}
.supplier-proposal-row-07b6 span { min-width: 0; }
.supplier-proposal-row-07b6 strong,
.supplier-proposal-row-07b6 small { display: block; }
.supplier-proposal-row-07b6 strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.supplier-proposal-row-07b6 small { margin-top: 1px; color: var(--muted); }
.supplier-proposal-row-07b6 input { margin: 0; }
.unified-advance-ledger-07b6 .panel-header .toolbar { flex-wrap: wrap; justify-content: flex-end; }
.document-kind {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: .76rem;
  font-weight: 700;
  white-space: nowrap;
}
.document-kind.advance { color: #1d4ed8; background: #dbeafe; }
.document-kind.settlement { color: #047857; background: #d1fae5; }
.document-kind.supplier { color: #7c2d12; background: #ffedd5; }
.supplier-payment-choice-07b6 {
  display: grid;
  gap: 7px;
  width: min(100%, 460px);
  margin-top: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
}
.supplier-payment-choice-07b6 > label {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 4px 7px;
  border-radius: 7px;
  background: #fff;
}
.supplier-payment-choice-07b6 > label input { margin: 0; }
.supplier-payment-choice-07b6 > label b { white-space: nowrap; }
.supplier-payment-choice-07b6 .btn { justify-self: start; }
.supplier-payment-choice-head-07b13 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.supplier-payment-choice-head-07b13 > span { display: flex; gap: 6px; flex-wrap: wrap; }
.multi-supplier-payment-rows-07b13 { display: grid; gap: 8px; margin-top: 10px; }
.multi-supplier-payment-row-07b13 {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(150px, 220px);
  align-items: center;
  gap: 12px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface, #fff);
}
.multi-supplier-payment-row-07b13 > span:first-child { min-width: 0; }
.multi-supplier-payment-row-07b13 strong,
.multi-supplier-payment-row-07b13 small { display: block; }
.multi-supplier-payment-row-07b13 > span:first-child strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.multi-supplier-payment-row-07b13 small { color: var(--muted); }
.multi-supplier-payment-amount-07b13 { display: grid; gap: 3px; }
.multi-supplier-payment-amount-07b13 input { margin: 0; }
.commitment-totals-07b14 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.commitment-formula-07b14 { margin: 12px 0; }
.commitment-table-07b14 th,
.commitment-table-07b14 td { vertical-align: top; }
.commitment-table-07b14 td:nth-child(6),
.commitment-table-07b14 td:nth-child(7),
.commitment-table-07b14 td:nth-child(8),
.commitment-table-07b14 td:nth-child(9) { white-space: nowrap; }

@media (max-width: 720px) {
  .supplier-proposal-heading-07b6 { align-items: flex-start; flex-direction: column; gap: 2px; }
  .supplier-proposal-row-07b6 { grid-template-columns: 1fr; }
  .supplier-payment-choice-head-07b13 { align-items: flex-start; flex-direction: column; }
  .multi-supplier-payment-row-07b13 { grid-template-columns: 1fr; }
  .commitment-totals-07b14 { grid-template-columns: 1fr 1fr; }
  .unified-advance-ledger-07b6 .panel-header .toolbar { width: 100%; justify-content: stretch; }
  .unified-advance-ledger-07b6 .panel-header .toolbar .btn { flex: 1 1 190px; }
}
.request-payment-amount-box{display:grid;grid-template-columns:minmax(220px,.8fr) minmax(280px,1.2fr);gap:16px;align-items:end;margin:16px 0;padding:16px;border:1px solid var(--border,#dbe3ef);border-radius:14px;background:#f8fafc}
.request-payment-amount-box>div{display:grid;gap:8px}.request-payment-amount-box>div strong{font-size:1.25rem}
.hu-return-proof-panel-07b5{border-color:#d7b46a}.hu-return-actions-07b5{margin-bottom:14px}.hu-merged-row-07b5 td:first-child{border-left:3px solid #8b5cf6}
@media(max-width:720px){.request-payment-amount-box{grid-template-columns:1fr}}

/* ===== Signed payable ledger — Build 07B.22 ===== */
.qscm-debt-ledger-filter-panel { overflow: visible; }
.qscm-debt-report-tabs { display:flex; gap:8px; padding:14px 18px 0; border-bottom:1px solid var(--line); }
.qscm-debt-report-tab { border:0; border-bottom:3px solid transparent; padding:10px 14px; background:transparent; color:var(--muted); font-weight:800; }
.qscm-debt-report-tab.active { color:var(--primary); border-bottom-color:var(--primary); }
.qscm-debt-ledger-filters { grid-template-columns:repeat(6,minmax(150px,1fr)); padding:16px 18px; }
.qscm-debt-ledger-filters label { display:grid; gap:7px; font-weight:700; }
.qscm-ledger-access-note { margin:0 18px 16px; }
.qscm-signed-debt-totals { grid-template-columns:repeat(5,minmax(0,1fr)); }
.qscm-negative-balance,.qscm-signed-negative { color:#b42318!important; }
.qscm-positive-balance { color:#0f5f5a; }
.qscm-signed-positive { color:inherit; }
.qscm-debt-ledger-wrap { max-width:100%; overflow:auto; }
.qscm-debt-summary-table { min-width:1450px; }
.qscm-debt-detail-table { min-width:2860px; }
.qscm-debt-summary-table td:nth-child(n+5):nth-child(-n+8),
.qscm-debt-detail-table td:nth-child(n+9):nth-child(-n+16) { white-space:nowrap; text-align:right; }
.qscm-debt-summary-table th:nth-child(n+5):nth-child(-n+8),
.qscm-debt-detail-table th:nth-child(n+9):nth-child(-n+16) { text-align:right; }
.qscm-debt-content-cell { min-width:220px; max-width:360px; white-space:normal; line-height:1.4; }
.qscm-party-drilldown { max-width:310px; }
.qscm-ledger-warning { display:inline-flex; margin:2px 3px 2px 0; padding:4px 7px; border-radius:999px; background:#eef2f6; color:#475467; font-size:.72rem; font-weight:750; line-height:1.2; }
.qscm-ledger-warning.danger { color:#b42318; background:#fee4e2; }
.qscm-ledger-warning.neutral { color:#175cd3; background:#eaf2ff; }
.qscm-ledger-pager .mini-btn { min-width:86px; }
.qscm-source-detail { margin-top:16px; }
.qscm-source-detail .panel { margin-top:0; }
.document-kind.warning { color:#93370d; background:#fffaeb; }
.document-kind.approved { color:#067647; background:#e7f6ec; }
.document-kind.draft { color:#475467; background:#eef2f5; }
@media(max-width:1250px){.qscm-debt-ledger-filters{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.qscm-debt-report-tabs{overflow-x:auto}.qscm-debt-report-tab{white-space:nowrap}.qscm-debt-ledger-filters,.qscm-signed-debt-totals{grid-template-columns:1fr}.qscm-debt-ledger-filter-panel>.panel-header{align-items:flex-start;flex-direction:column}.qscm-debt-ledger-filter-panel>.panel-header .toolbar{width:100%}.qscm-debt-ledger-filter-panel>.panel-header .btn{flex:1}.qscm-source-detail{grid-template-columns:1fr}}

/* ===== Mixed supplier advances and readable request rows — Build 07B.23 ===== */
.request-item-head { justify-content:flex-start; flex-wrap:wrap; }
.request-item-head > strong { margin-right:auto; }
.qscm-line-advance-check.hidden { display:none!important; }
.qscm-line-advance-check {
  margin:0!important; padding:6px 10px!important; border:1px solid #f79009!important;
  border-radius:999px!important; background:#fffaeb!important; color:#93370d!important; white-space:nowrap;
}

/* ===== P14.1H4H1-R2 — anti-freeze and approved document samples ===== */
.cmd-document-preview-dialog-p14h4h1{width:min(1120px,calc(100vw - 24px));max-height:94vh}
.cmd-document-preview-shell-p14h4h1{display:grid;gap:14px;padding:20px;max-height:92vh;overflow:auto;background:#f4f6f8}
.cmd-document-preview-shell-p14h4h1>.dialog-header,.cmd-document-preview-shell-p14h4h1>.dialog-actions{position:sticky;z-index:3;background:#f4f6f8}
.cmd-document-preview-shell-p14h4h1>.dialog-header{top:-20px;padding:18px 0 10px}
.cmd-document-preview-shell-p14h4h1>.dialog-actions{bottom:-20px;margin:0;padding:10px 0 18px}
.cmd-document-preview-body-p14h4h1{overflow:auto}
.cmd-document-preview-body-p14h4h1>.cmd-canonical-voucher-canvas-p14h4h1{display:block;width:min(794px,100%);height:auto;margin:auto;background:#fff;border:1px solid #d0d5dd;box-shadow:0 14px 35px rgba(16,24,40,.1)}
.cmd-document-sheet-p14h4h1{width:min(794px,100%);min-height:1123px;margin:auto;padding:48px 48px 64px;background:#fff;border:1px solid #d0d5dd;box-shadow:0 14px 35px rgba(16,24,40,.1);font-family:"Times New Roman",serif;color:#111}
.cmd-request-paper-head-p14h4h1{display:flex;justify-content:space-between;align-items:flex-start;font-size:1rem}.cmd-request-paper-head-p14h4h1>strong{text-transform:uppercase}.cmd-request-paper-head-p14h4h1>small{font-size:.72rem}
.cmd-request-title-p14h4h1{display:grid;justify-items:center;gap:4px;margin:32px 0 28px;text-align:center}.cmd-request-title-p14h4h1 h1{margin:0 0 4px;font:700 1.65rem/1.2 "Times New Roman",serif}.cmd-request-title-p14h4h1>strong{font-size:.98rem}.cmd-request-title-p14h4h1>small{font-size:.82rem;color:#344054}
.cmd-request-meta-p14h4h1{display:grid;grid-template-columns:112px 1fr;gap:8px 12px;margin:0 0 18px;font-size:.88rem}.cmd-request-meta-p14h4h1 dt{font-weight:700}.cmd-request-meta-p14h4h1 dd{margin:0}
.cmd-request-table-wrap-p14h4h1{overflow:visible}.cmd-document-table-p14h4h1{width:100%;min-width:0;margin:0;table-layout:fixed;border-collapse:collapse}.cmd-document-table-p14h4h1 th,.cmd-document-table-p14h4h1 td{border:1px solid #111;background:#fff;padding:7px 8px;text-transform:none;letter-spacing:0;font-size:.8rem;vertical-align:middle}.cmd-document-table-p14h4h1 th{text-align:center;color:#344054;font-size:.76rem}.cmd-document-table-p14h4h1 .money-cell{text-align:right;white-space:nowrap}.cmd-request-col-index{width:6%}.cmd-request-col-party{width:25%}.cmd-request-col-debt{width:18%}.cmd-request-col-category{width:30%}.cmd-request-col-payment{width:21%}
.cmd-document-total-p14h4h1 td{font-weight:700}.cmd-document-total-p14h4h1 td:first-child{text-align:right}
.cmd-request-words-p14h4h1{margin:16px 0 0;font-size:.86rem}.cmd-request-date-line-p14h4h1{margin:34px 0 0;text-align:right;font-size:.84rem;font-style:italic}
.cmd-document-signatures-p14h4h1{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-top:20px;text-align:center}
.cmd-document-signatures-p14h4h1 div{display:grid;grid-template-rows:auto auto 1fr;align-content:start;min-height:132px}.cmd-document-signatures-p14h4h1 strong{font-size:.78rem}.cmd-document-signatures-p14h4h1 small{margin-top:5px;font-size:.75rem;font-style:italic}.cmd-document-signatures-p14h4h1 span{align-self:end;font-size:.82rem}
@media(max-width:760px){.cmd-document-preview-shell-p14h4h1{padding:12px}.cmd-document-sheet-p14h4h1{min-width:720px;min-height:1018px;padding:38px 40px}.cmd-document-preview-body-p14h4h1>.cmd-canonical-voucher-canvas-p14h4h1{min-width:720px}.cmd-document-preview-body-p14h4h1{overscroll-behavior:contain}}
.qscm-line-advance-check input { min-height:auto!important; height:auto!important; }
.qscm-advance-locked { opacity:.58; cursor:not-allowed; }
.qscm-line-advance { border-color:#f79009!important; box-shadow:inset 4px 0 0 #f79009; background:#fffdf7!important; }
#requestForm.qscm-multi-supplier-mode .request-item { overflow:visible!important; min-width:0!important; }
#requestForm.qscm-multi-supplier-mode .request-item .item-grid-v72 {
  display:grid!important; grid-template-columns:minmax(0,1fr)!important; gap:10px!important; min-width:0!important;
}
#requestForm.qscm-multi-supplier-mode .request-item .item-primary-row {
  display:grid!important; grid-template-columns:minmax(240px,1.5fr) minmax(200px,1fr) minmax(220px,1.15fr)!important;
  gap:10px!important; min-width:0!important;
}
#requestForm.qscm-multi-supplier-mode .request-item .item-number-row {
  display:grid!important; grid-template-columns:minmax(130px,.75fr) minmax(100px,.55fr) minmax(145px,.8fr) minmax(155px,.9fr) minmax(245px,1.25fr)!important;
  gap:10px!important; min-width:0!important; align-items:end;
}
#requestForm.qscm-multi-supplier-mode .request-item .item-tax-row {
  display:grid!important; grid-template-columns:minmax(150px,.45fr) minmax(520px,2fr)!important;
  gap:10px!important; min-width:0!important; align-items:end;
}
#requestForm.qscm-multi-supplier-mode .request-item .invoice-options {
  display:grid!important; grid-template-columns:minmax(230px,1.4fr) minmax(150px,.7fr) minmax(150px,.8fr)!important;
  gap:8px!important; min-width:0!important;
}
#requestForm.qscm-multi-supplier-mode .request-item .invoice-options.hidden { display:none!important; }
#requestForm.qscm-multi-supplier-mode .qscm-multi-requested-field { min-width:0; }
#requestForm.qscm-multi-supplier-mode .qscm-multi-requested-field small { min-height:2.2em; line-height:1.25; }

@media(max-width:1080px){
  #requestForm.qscm-multi-supplier-mode .request-item .item-primary-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important; }
  #requestForm.qscm-multi-supplier-mode .request-item .item-primary-row>label:last-child { grid-column:1/-1; }
  #requestForm.qscm-multi-supplier-mode .request-item .item-number-row { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  #requestForm.qscm-multi-supplier-mode .qscm-multi-requested-field { grid-column:1/-1; }
  #requestForm.qscm-multi-supplier-mode .request-item .item-tax-row { grid-template-columns:minmax(0,1fr)!important; }
}
@media(max-width:760px){
  .request-item-head>strong { flex:1 1 100%; }
  .qscm-line-advance-check,.request-item .remove-item { flex:1 1 auto; justify-content:center; }
  #requestForm.qscm-multi-supplier-mode .request-item .item-primary-row,
  #requestForm.qscm-multi-supplier-mode .request-item .item-number-row,
  #requestForm.qscm-multi-supplier-mode .request-item .item-tax-row,
  #requestForm.qscm-multi-supplier-mode .request-item .invoice-options { grid-template-columns:minmax(0,1fr)!important; }
  #requestForm.qscm-multi-supplier-mode .request-item .item-primary-row>label:last-child,
  #requestForm.qscm-multi-supplier-mode .qscm-multi-requested-field { grid-column:auto; }
}

/* ===== Reimbursement approval parity — Build 07B.23 ===== */
#settlementSkipTechnicalWrap07B {
  margin-top:14px; padding:12px 14px; border:1px solid #f3c86b; border-radius:10px; background:#fff9e8;
}
.action-stack .btn { width:100%; text-align:center; }
.action-stack .btn.danger { border-color:#fda29b; }
.hu-expense-detail-panel-07b23 { overflow:hidden; }
.hu-expense-detail-table-07b23 { min-width:1280px; }
.hu-expense-detail-table-07b23 th:nth-child(n+5),
.hu-expense-detail-table-07b23 td:nth-child(n+5) { text-align:right; white-space:nowrap; }
.hu-expense-detail-table-07b23 th:nth-child(8),
.hu-expense-detail-table-07b23 td:nth-child(8) { text-align:center; }
.hu-expense-total-row-07b23 th { font-weight:850; background:#f3f7f8; border-top:2px solid var(--line); }
.qscm-readonly-settlement-note { display:grid; gap:5px; margin-bottom:2px; }
.qscm-readonly-settlement-note small { line-height:1.4; }
.qscm-debt-total-row th {
  font-weight:850!important; background:#eef6f5!important; border-top:2px solid #9bcac5; color:var(--text);
}
.qscm-debt-total-row .money-cell { text-align:right!important; white-space:nowrap; }
.qscm-debt-detail-total-row th:first-child { text-align:left; }
.qscm-payment-document-mode-07b26 #paymentForm input:disabled,
.qscm-payment-document-mode-07b26 #paymentForm select:disabled,
.qscm-payment-document-mode-07b26 #paymentForm textarea:disabled { opacity:1; color:var(--text); background:#f5f7f8; cursor:default; }
.qscm-payment-document-allocations { min-width:820px; }
.qscm-payment-document-allocations th:last-child,
.qscm-payment-document-allocations td:last-child { text-align:right; white-space:nowrap; }
.qscm-payment-allocation-link { display:inline; }
.qscm-detail-advance-line td { background:#fffaf0; }
.qscm-detail-advance-line td:first-child { border-left:4px solid #f79009; }
.qscm-detail-advance-badge { margin-top:5px; }

/* ===== Supplier returns, receivables and settlement treasury queue — Build 07B.24 ===== */
.b24-payment-tabs { display:grid; gap:14px; }
.b24-tab-buttons {
  display:flex; gap:6px; width:fit-content; padding:6px; border:1px solid var(--line);
  border-radius:12px; background:#eef3f5; position:sticky; top:0; z-index:6;
}
.b24-module-tab { border:0; border-radius:8px; background:transparent; color:var(--muted); padding:9px 18px; font-weight:800; cursor:pointer; }
.b24-module-tab.active { background:#fff; color:var(--primary); box-shadow:0 2px 8px rgba(16,24,40,.1); }
.b24-return-dialog { width:min(1500px,97vw); }
.b24-return-head { grid-template-columns:repeat(2,minmax(0,1fr)); }
.b24-return-line-heading { align-items:flex-end; gap:12px; }
.b24-return-line-heading .toolbar { justify-content:flex-end; }
.b24-return-lines-wrap { border:1px solid var(--line); border-radius:12px; }
.b24-return-lines { min-width:1420px; }
.b24-return-lines th { white-space:nowrap; }
.b24-return-lines td { vertical-align:middle; min-width:105px; }
.b24-return-lines td:first-child { min-width:220px; }
.b24-return-lines td:nth-child(2) { min-width:220px; }
.b24-return-lines input,.b24-return-lines select { min-width:90px; }
.b24-return-lines .money-cell { text-align:right; white-space:nowrap; font-variant-numeric:tabular-nums; }
.b24-return-lines .center { text-align:center; }
.b24-return-totals { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:10px; margin-top:10px; }
.b24-return-totals span { min-width:190px; padding:11px 13px; border:1px solid var(--line); border-radius:10px; background:#f8fafb; color:var(--muted); }
.b24-return-totals strong { display:block; margin-top:3px; color:var(--text); font-size:1rem; }
.b24-return-evidence { padding:14px; }
.b24-return-evidence .panel-header { padding:0 0 10px; }
.required-mark { color:#d92d20; }
.negative { color:#b42318; }
.b24-settlement-payable { border-color:#f3c86b; background:#fffdf7; }
.b24-settlement-payable .panel-header { background:#fff9e8; }
.b24-receivable-dialog { width:min(920px,96vw); }
@media(max-width:760px){
  .b24-tab-buttons { width:100%; position:static; }
  .b24-module-tab { flex:1; }
  .b24-return-head { grid-template-columns:1fr; }
  .b24-return-line-heading { align-items:flex-start; }
  .b24-return-line-heading,.b24-return-line-heading .toolbar { flex-direction:column; width:100%; }
  .b24-return-line-heading .btn { width:100%; }
  .b24-return-totals { display:grid; grid-template-columns:1fr; }
}

/* ===== Detail parity, Vietnamese dates and treasury installments — Build 07B.25 ===== */
.cmd-date-display { font-variant-numeric:tabular-nums; letter-spacing:.01em; }
.qscm-option-locked { opacity:.58; cursor:not-allowed; }
.qscm-option-locked input { cursor:not-allowed; }
.b25-return-unit { display:grid; gap:5px; min-width:120px; }
.b25-return-unit .v73-search-shell { min-width:120px; }
.b25-amount-mode { display:block; margin-top:4px; color:var(--muted); font-size:.7rem; line-height:1.25; }

.b25-request-lines-wrap { margin-top:10px; border:1px solid var(--line); border-radius:12px; background:#fff; }
.b25-request-lines-table { min-width:1540px; }
.b25-request-detail-head,
#requestForm .request-item .item-grid-v72 {
  display:grid!important;
  grid-template-columns:minmax(230px,1.55fr) minmax(190px,1.25fr) minmax(190px,1.25fr) minmax(105px,.7fr) minmax(105px,.7fr) minmax(130px,.85fr) minmax(145px,.95fr) minmax(90px,.58fr) minmax(175px,1.12fr) minmax(110px,.72fr) minmax(120px,.78fr) minmax(125px,.8fr)!important;
  gap:0!important;
  align-items:stretch!important;
  min-width:1540px!important;
}
.b25-request-detail-head { position:sticky; top:0; z-index:3; color:#344054; background:#f6f8fa; border-bottom:1px solid var(--line); }
.b25-request-detail-head > span { display:flex; align-items:center; min-height:38px; padding:8px 10px; border-right:1px solid #e7edf0; font-size:.7rem; font-weight:850; text-transform:uppercase; letter-spacing:.035em; white-space:nowrap; }
#requestForm .request-item { margin:0!important; padding:0!important; overflow:visible!important; border:0!important; border-radius:0!important; border-bottom:1px solid var(--line)!important; background:#fff!important; box-shadow:none!important; }
#requestForm .request-item:last-child { border-bottom:0!important; }
#requestForm .request-item-head { min-height:28px!important; margin:0!important; padding:3px 8px; background:#fbfcfd; border-bottom:1px dashed #e5eaed; }
#requestForm .request-item-head strong { color:var(--muted); font-size:.72rem; }
#requestForm .request-item-head .remove-item { padding:4px 8px; font-size:.72rem; }
#requestForm .request-item .item-primary-row,
#requestForm .request-item .item-number-row,
#requestForm .request-item .item-tax-row,
#requestForm .request-item .invoice-options { display:contents!important; }
#requestForm .request-item .invoice-options.hidden { display:none!important; }
#requestForm .request-item label,
#requestForm .request-item .mini-kpi { min-width:0; margin:0!important; padding:8px 7px; border-right:1px solid #edf0f2; background:#fff; }
#requestForm .request-item label { align-content:center; font-size:.72rem!important; gap:4px!important; }
#requestForm .request-item .b25-field-caption { display:none; }
#requestForm .request-item input,
#requestForm .request-item select,
#requestForm .request-item .v7-search-input { min-width:0!important; min-height:36px!important; height:36px!important; padding:7px 8px!important; font-size:.8rem!important; }
#requestForm .request-item .check-row { display:flex!important; justify-content:center; align-self:stretch; min-height:52px!important; padding:8px!important; border:0; border-right:1px solid #edf0f2; border-radius:0; background:#fff; }
#requestForm .request-item .check-row input { width:auto!important; min-height:auto!important; height:auto!important; }
#requestForm .request-item .mini-kpi { display:grid; align-content:center; min-height:52px!important; border:0; border-right:1px solid #edf0f2; border-radius:0; }
#requestForm .request-item .mini-kpi small { color:var(--muted); font-size:.68rem; }
#requestForm .request-item .mini-kpi strong { font-size:.8rem; white-space:nowrap; }
#requestForm .request-item .b25-grand-total-cell { grid-column:12; background:#f3f8f7; }
#requestForm .request-item .auto-calc-note { display:none; }
#requestForm .b25-request-line-calculation { display:none; }
#requestForm:not(.qscm-multi-supplier-mode) .b25-supplier-column { display:none; }
#requestForm:not(.qscm-multi-supplier-mode) .b25-request-lines-table { min-width:1350px; }
#requestForm:not(.qscm-multi-supplier-mode) .b25-request-detail-head,
#requestForm:not(.qscm-multi-supplier-mode) .request-item .item-grid-v72 {
  grid-template-columns:minmax(250px,1.7fr) minmax(200px,1.3fr) minmax(105px,.7fr) minmax(105px,.7fr) minmax(130px,.85fr) minmax(145px,.95fr) minmax(90px,.58fr) minmax(175px,1.12fr) minmax(110px,.72fr) minmax(120px,.78fr) minmax(125px,.8fr)!important;
  min-width:1350px!important;
}
#requestForm:not(.qscm-multi-supplier-mode) .request-item .b25-grand-total-cell { grid-column:11; }

.b25-treasury-dialog { width:min(1080px,96vw)!important; }
.b25-treasury-shell { padding:16px 18px; }
.b25-treasury-header { padding-bottom:12px; border-bottom:1px solid var(--line); }
.b25-treasury-cards { display:grid; gap:14px; margin-top:14px; }
.b25-treasury-card { padding:14px; border:1px solid #cfdcdf; border-radius:14px; background:#fff; box-shadow:0 4px 16px rgba(21,32,40,.05); }
.b25-treasury-card-head { display:grid; grid-template-columns:minmax(260px,1fr) minmax(220px,.55fr); gap:12px; align-items:end; }
.b25-treasury-card label { margin:0!important; gap:5px!important; font-size:.78rem; }
.b25-treasury-card input,
.b25-treasury-card select { min-height:36px; padding:7px 9px; border-radius:8px; font-size:.84rem; }
.b25-payment-due { display:grid; gap:2px; min-height:58px; padding:8px 12px; border:1px solid #9bcac5; border-radius:10px; background:#f0faf8; }
.b25-payment-due span { color:var(--muted); font-size:.75rem; font-weight:700; }
.b25-payment-due strong { color:var(--primary-dark); font-size:1.12rem; }
.b25-payment-info-table { margin-top:10px; border:1px solid var(--line); border-radius:9px; }
.b25-payment-info-table table { min-width:690px; }
.b25-payment-info-table th,
.b25-payment-info-table td { padding:8px 10px; font-size:.78rem; }
.b25-payment-info-table td:nth-child(1) { width:120px; white-space:nowrap; }
.b25-payment-info-table td:nth-child(2) { min-width:260px; }
.b25-payment-info-table td small { display:block; max-width:420px; margin-top:2px; color:var(--muted); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.b25-payment-meta { display:grid; grid-template-columns:minmax(170px,.7fr) minmax(210px,.9fr) minmax(260px,1.25fr); gap:10px; margin-top:10px; }
.b25-bill-picker { display:grid; grid-template-columns:auto auto minmax(220px,1fr); gap:10px 12px; align-items:center; margin-top:10px; padding:9px 10px; border:1px dashed #9bcac5; border-radius:10px; background:#f8fcfb; }
.b25-bill-label { font-size:.8rem; font-weight:800; white-space:nowrap; }
.b25-bill-actions { display:flex; gap:6px; flex-wrap:wrap; }
.b25-bill-summary { display:flex; justify-content:flex-end; align-items:center; gap:7px; flex-wrap:wrap; min-width:0; color:var(--muted); font-size:.72rem; }
.b25-bill-summary > span { max-width:360px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.b25-payment-section-head { margin-top:12px; padding-top:12px; }
.b25-payment-section-head small { color:var(--muted); font-size:.72rem; }
.b25-installment-table { margin-top:8px; border:1px solid var(--line); border-radius:9px; }
.b25-installment-table table { min-width:780px; }
.b25-installment-table th,
.b25-installment-table td { padding:8px 9px; vertical-align:middle; font-size:.78rem; }
.b25-installment-table th:nth-child(1) { width:155px; }
.b25-installment-table th:nth-child(2) { width:180px; }
.b25-installment-table th:nth-child(3) { width:190px; }
.b25-installment-table th:nth-child(4) { width:130px; }
.b25-installment-table th:nth-child(5) { width:140px; }
.b25-installment-table .money-input { text-align:right; font-weight:800; }
.b25-installment-table .money-cell { text-align:right; white-space:nowrap; }
.b25-auto-voucher { color:var(--muted); font-size:.72rem; font-weight:700; }
.b25-payment-complete { background:#f6faf8; }
.b25-payment-complete .btn:disabled { opacity:.42; cursor:not-allowed; filter:saturate(.35); }
.b25-payment-complete td:first-child small { display:block; margin-top:2px; color:var(--muted); }
.b25-payment-voucher-link { padding:0; font:inherit; text-align:left; }
.b25-payment-voucher-link:hover strong,
.b25-payment-voucher-link:focus-visible strong { text-decoration:underline; }
.b25-treasury-card button:disabled { cursor:not-allowed; }

@media(max-width:760px){
  .b25-request-detail-head { display:none!important; }
  .b25-request-lines-wrap { overflow:visible; border:0; background:transparent; }
  .b25-request-lines-table,
  #requestForm:not(.qscm-multi-supplier-mode) .b25-request-lines-table { min-width:0; }
  #requestForm .request-item { margin-top:10px!important; padding:10px!important; border:1px solid var(--line)!important; border-radius:12px!important; }
  #requestForm .request-item .item-grid-v72,
  #requestForm:not(.qscm-multi-supplier-mode) .request-item .item-grid-v72 { grid-template-columns:1fr!important; min-width:0!important; gap:8px!important; }
  #requestForm .request-item .item-primary-row,
  #requestForm .request-item .item-number-row,
  #requestForm .request-item .item-tax-row { display:contents!important; }
  #requestForm .request-item .invoice-options { display:grid!important; grid-template-columns:1fr!important; gap:8px!important; }
  #requestForm .request-item .invoice-options.hidden { display:none!important; }
  #requestForm .request-item label,
  #requestForm .request-item .mini-kpi,
  #requestForm .request-item .check-row { padding:0; border:0; min-height:auto!important; }
  #requestForm .request-item .b25-field-caption { display:inline; }
  #requestForm .request-item .b25-grand-total-cell,
  #requestForm:not(.qscm-multi-supplier-mode) .request-item .b25-grand-total-cell { grid-column:auto; }
  .b25-treasury-shell { padding:14px; }
  .b25-treasury-card { padding:11px; }
  .b25-treasury-card-head,
  .b25-payment-meta { grid-template-columns:1fr; }
  .b25-bill-picker { grid-template-columns:1fr; align-items:start; }
  .b25-bill-summary { justify-content:flex-start; }
  .b25-payment-section-head { align-items:stretch; }
  .b25-payment-section-head .btn { width:100%; }
}

/* ===== CMD V8.0 Alpha Build 07B.27: form detail alignment and batch row actions ===== */
#requestDialog { width:min(1180px,96vw)!important; max-width:96vw!important; }
#requestForm .qscm-request-detail-section { align-items:flex-start; }
#requestForm .request-detail-import-tools { justify-content:flex-end; flex-wrap:wrap; }
#requestForm .b25-request-detail-head { display:none!important; }
#requestForm .b25-request-lines-wrap {
  overflow:visible!important;
  margin-top:12px;
  border:0;
  border-radius:0;
  background:transparent;
}
#requestForm .b25-request-lines-table,
#requestForm:not(.qscm-multi-supplier-mode) .b25-request-lines-table {
  display:block;
  min-width:0!important;
}
#requestForm #itemsContainer { display:grid; gap:14px; min-width:0; }
#requestForm .request-item,
#requestForm .request-item:last-child {
  min-width:0!important;
  margin:0!important;
  padding:0 16px 16px!important;
  overflow:visible!important;
  border:1px solid #d8e1e8!important;
  border-radius:14px!important;
  background:#fff!important;
  box-shadow:0 2px 8px rgba(16,24,40,.045)!important;
}
#requestForm .request-item-head {
  display:flex;
  min-height:46px!important;
  margin:0 -16px 14px!important;
  padding:8px 14px!important;
  align-items:center;
  gap:10px;
  border:0!important;
  border-bottom:1px solid #e3e9ee!important;
  border-radius:13px 13px 0 0;
  background:#f7f9fb!important;
}
#requestForm .request-item-head > strong {
  flex:1 1 240px;
  margin:0!important;
  color:#26384a!important;
  font-size:.88rem!important;
  line-height:1.35;
}
#requestForm .request-item-head .qscm-detail-line-select {
  display:inline-flex!important;
  flex:0 0 auto;
  min-height:30px!important;
  margin:0!important;
  padding:4px 8px!important;
  gap:6px!important;
  border:1px solid #cfd9e2!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#344054!important;
  font-size:.76rem!important;
  cursor:pointer;
}
#requestForm .request-item-head .qscm-detail-line-select input {
  width:15px!important;
  height:15px!important;
  min-height:0!important;
  margin:0!important;
}
#requestForm .request-item-head .qscm-line-advance-check {
  flex:0 0 auto;
  min-height:30px!important;
  margin:0!important;
  padding:4px 9px!important;
  border:1px solid #f3b14b!important;
  border-radius:999px!important;
  background:#fff8e8!important;
  color:#8a4b08!important;
  font-size:.75rem!important;
}
#requestForm .request-item .remove-item { display:none!important; }
#requestForm .request-item .item-grid-v72,
#requestForm:not(.qscm-multi-supplier-mode) .request-item .item-grid-v72 {
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:12px!important;
  min-width:0!important;
  align-items:stretch!important;
}
#requestForm .request-item .item-primary-row,
#requestForm .request-item .item-number-row,
#requestForm .request-item .item-tax-row {
  display:grid!important;
  min-width:0;
  gap:12px!important;
  align-items:end;
}
#requestForm:not(.qscm-multi-supplier-mode) .request-item .item-primary-row {
  grid-template-columns:minmax(0,1.45fr) minmax(0,1fr)!important;
}
#requestForm:not(.qscm-multi-supplier-mode) .request-item .supplier-field { display:none!important; }
#requestForm.qscm-multi-supplier-mode .request-item .item-primary-row {
  grid-template-columns:minmax(0,1.25fr) minmax(0,1fr) minmax(0,1fr)!important;
}
#requestForm .request-item .item-number-row {
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
}
#requestForm.qscm-multi-supplier-mode .request-item .item-number-row {
  grid-template-columns:repeat(5,minmax(0,1fr))!important;
}
#requestForm .request-item .item-tax-row {
  grid-template-columns:minmax(110px,.42fr) minmax(0,2fr) minmax(145px,.55fr)!important;
  align-items:stretch;
}
#requestForm .request-item .invoice-options {
  display:grid!important;
  grid-template-columns:minmax(0,1.35fr) minmax(0,.75fr) minmax(120px,.65fr)!important;
  grid-column:auto!important;
  gap:10px!important;
  min-width:0;
  padding:10px!important;
  align-items:end;
  border:1px dashed #aacbc7!important;
  border-radius:11px!important;
  background:#f6fbfa!important;
}
#requestForm .request-item .invoice-options.hidden { display:none!important; }
#requestForm .request-item .b25-grand-total-cell,
#requestForm:not(.qscm-multi-supplier-mode) .request-item .b25-grand-total-cell {
  grid-column:3!important;
  align-self:stretch;
}
#requestForm .request-item label,
#requestForm .request-item .mini-kpi {
  min-width:0;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  color:#344054!important;
  font-size:.79rem!important;
}
#requestForm .request-item label { display:grid; align-content:end; gap:5px!important; font-weight:700; }
#requestForm .request-item .b25-field-caption,
#requestForm .request-item .qscm-multi-requested-field > span {
  display:block!important;
  min-height:1.15em;
  color:#344054;
  font-size:.78rem;
  line-height:1.15;
}
#requestForm .request-item input,
#requestForm .request-item select,
#requestForm .request-item textarea,
#requestForm .request-item .v7-search-input {
  width:100%;
  min-width:0!important;
  min-height:38px!important;
  height:38px!important;
  padding:7px 9px!important;
  border-radius:8px!important;
  font-size:.83rem!important;
}
#requestForm .request-item .item-tax-row > .check-row {
  display:flex!important;
  min-height:58px!important;
  padding:10px!important;
  justify-content:center;
  align-items:center;
  gap:7px!important;
  border:1px solid #d8e1e8!important;
  border-radius:10px!important;
  background:#fff!important;
}
#requestForm .request-item .item-tax-row > .check-row input {
  width:15px!important;
  height:15px!important;
  min-height:0!important;
  padding:0!important;
}
#requestForm .request-item .mini-kpi {
  display:grid;
  min-height:58px!important;
  padding:9px 10px!important;
  align-content:center;
  border:1px solid #dbe5e2!important;
  border-radius:10px!important;
  background:#fff!important;
}
#requestForm .request-item .mini-kpi small { color:#667085; font-size:.72rem; }
#requestForm .request-item .mini-kpi strong { margin-top:3px; font-size:.88rem; white-space:nowrap; }
#requestForm .request-item .auto-calc-note { display:block!important; min-height:1.1em; margin-top:0; color:#667085; font-size:.68rem; line-height:1.1; }
#requestForm .request-item .qscm-multi-requested-field small { min-height:2.15em; line-height:1.2; }
#requestForm .b25-request-line-calculation { display:none!important; }
#requestForm.qscm-multi-supplier-mode .request-item:nth-child(odd) {
  border-color:#a9c8ee!important;
  background:#f8fbff!important;
}
#requestForm.qscm-multi-supplier-mode .request-item:nth-child(even) {
  border-color:#abd7c8!important;
  background:#f8fcfa!important;
}
#requestForm.qscm-multi-supplier-mode .request-item:nth-child(odd) .request-item-head { background:#eaf3ff!important; border-bottom-color:#c8dcf5!important; }
#requestForm.qscm-multi-supplier-mode .request-item:nth-child(even) .request-item-head { background:#eaf8f2!important; border-bottom-color:#c8e6da!important; }
#requestForm.qscm-multi-supplier-mode .request-item-head > strong { color:#174f82!important; }

.qscm-detail-line-select { user-select:none; }
.qscm-detail-line-select input { accent-color:var(--primary); }
#settlementDialog .hu-line-head { display:flex; align-items:center; gap:10px; }
#settlementDialog .hu-line-head .qscm-detail-line-select {
  display:inline-flex!important;
  min-height:30px;
  margin:0;
  padding:4px 8px;
  border:1px solid var(--line);
  border-radius:8px;
  background:#fff;
  font-size:.76rem;
}
#settlementDialog .hu-line-head .qscm-detail-line-select input { width:15px; height:15px; margin:0; }
.b24-return-lines { min-width:1480px; }
.b24-return-lines th:first-child,
.b24-return-lines td:first-child { width:64px; min-width:64px; }
.b24-return-lines th:nth-child(2),
.b24-return-lines td:nth-child(2) { min-width:230px; }
.b24-return-lines th:nth-child(3),
.b24-return-lines td:nth-child(3) { min-width:220px; }
.b24-return-lines td:first-child input { width:16px; height:16px; accent-color:var(--primary); }

.qscm-approval-shortcut-hint {
  flex:1 1 100%;
  margin-right:auto;
  color:#667085;
  font-size:.72rem;
  text-align:left;
}

@media(max-width:1050px) {
  #requestDialog { width:98vw!important; max-width:98vw!important; }
  #requestForm.qscm-multi-supplier-mode .request-item .item-primary-row { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  #requestForm.qscm-multi-supplier-mode .request-item .item-primary-row > label:last-child { grid-column:1/-1; }
  #requestForm .request-item .item-number-row,
  #requestForm.qscm-multi-supplier-mode .request-item .item-number-row { grid-template-columns:repeat(2,minmax(0,1fr))!important; }
  #requestForm.qscm-multi-supplier-mode .qscm-multi-requested-field { grid-column:1/-1; }
  #requestForm .request-item .item-tax-row { grid-template-columns:minmax(105px,.4fr) minmax(0,1.6fr)!important; }
  #requestForm .request-item .b25-grand-total-cell,
  #requestForm:not(.qscm-multi-supplier-mode) .request-item .b25-grand-total-cell { grid-column:1/-1!important; }
}

@media(max-width:720px) {
  #requestForm .qscm-request-detail-section .request-detail-import-tools { width:100%; justify-content:stretch; }
  #requestForm .qscm-request-detail-section .request-detail-import-tools .btn { flex:1 1 145px; }
  #requestForm .request-item { padding:0 12px 12px!important; }
  #requestForm .request-item-head { margin:0 -12px 12px!important; padding:8px 10px!important; align-items:flex-start; }
  #requestForm .request-item-head > strong { flex:1 1 100%; order:-1; }
  #requestForm:not(.qscm-multi-supplier-mode) .request-item .item-primary-row,
  #requestForm.qscm-multi-supplier-mode .request-item .item-primary-row,
  #requestForm .request-item .item-number-row,
  #requestForm.qscm-multi-supplier-mode .request-item .item-number-row,
  #requestForm .request-item .item-tax-row,
  #requestForm .request-item .invoice-options { grid-template-columns:minmax(0,1fr)!important; }
  #requestForm.qscm-multi-supplier-mode .request-item .item-primary-row > label:last-child,
  #requestForm.qscm-multi-supplier-mode .qscm-multi-requested-field,
  #requestForm .request-item .b25-grand-total-cell,
  #requestForm:not(.qscm-multi-supplier-mode) .request-item .b25-grand-total-cell { grid-column:auto!important; }
  #requestForm .request-item .item-tax-row > .check-row { justify-content:flex-start; min-height:42px!important; }
  .qscm-approval-shortcut-hint { display:none; }
}

/* ===== CMD V8.0 Alpha Build 07B.28: one filter toolbar on every filter panel ===== */
.qscm-filter-controlbar { display:none!important; }
.request-filter-grid-v75[hidden],
.debt-filter-layout[hidden],
.qscm-payment-filter-grid[hidden],
.filters[hidden] { display:none!important; }

.qscm-filter-header-b28,
.panel[data-qscm-filter-b28="1"] > .panel-header {
  gap:12px;
}

.qscm-filter-toolbar-b28 {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
  margin-left:auto;
}

.qscm-filter-toolbar-b28 .btn {
  min-height:40px;
  white-space:nowrap;
}

.qscm-filter-toggle-b28,
.qscm-filter-clear-b28 {
  background:#fff;
}

#requestForm .item-tax-row > .check-row span { white-space:nowrap; }

@media(max-width:1024px) {
  .panel[data-qscm-filter-b28="1"] > .panel-header {
    align-items:flex-start;
    flex-wrap:wrap;
  }
  .qscm-filter-toolbar-b28 {
    width:100%;
    margin-left:0;
    justify-content:flex-start;
  }
}

@media(max-width:720px) {
  .qscm-filter-toolbar-b28 {
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  .qscm-filter-toolbar-b28 .btn {
    width:100%;
    min-width:0;
    padding-left:9px!important;
    padding-right:9px!important;
    white-space:normal;
  }
}

/* ===== CMD V8.0 Alpha Build 07B.29: request form field rhythm only ===== */
#requestForm .request-item .supplier-field {
  grid-template-columns:minmax(0,1fr) auto;
  column-gap:8px!important;
  align-items:end;
}

#requestForm .request-item .supplier-field > .b25-field-caption {
  grid-column:1/-1;
}

#requestForm .request-item .supplier-field > .v7-search-select,
#requestForm .request-item .supplier-field > .item-customer {
  grid-column:1;
  min-width:0;
}

#requestForm .request-item .supplier-field > .quick-customer-btn {
  grid-column:2;
  grid-row:2;
  min-height:38px;
  height:38px;
  margin:0;
  padding:7px 10px;
  white-space:nowrap;
}

@media(min-width:721px) {
  #requestForm .request-item .item-number-row > label {
    grid-template-rows:minmax(1.15em,auto) 38px minmax(2.15em,auto);
    align-content:start;
  }

  #requestForm .request-item .item-number-row > label > .b25-field-caption,
  #requestForm .request-item .item-number-row > .qscm-multi-requested-field > span {
    grid-row:1;
    align-self:end;
  }

  #requestForm .request-item .item-number-row > label > input,
  #requestForm .request-item .item-number-row > label > .unit-wrap {
    grid-row:2;
  }

  #requestForm .request-item .item-number-row > label > small {
    grid-row:3;
    align-self:start;
  }
}

@media(max-width:720px) {
  #requestForm .request-item .supplier-field > .quick-customer-btn {
    min-width:68px;
  }
}

/* ===== CMD V8.0 Alpha Build 08B.2: business owner migration by collection ===== */
.cmd-business-open-08b2{flex:0 0 auto;border-color:#0f766e;background:#fff;color:#0f766e;white-space:nowrap}
.cmd-business-dialog-08b2{width:min(1040px,calc(100vw - 24px));max-height:min(920px,calc(100vh - 24px))}
.cmd-business-dialog-08b2 .dialog-form{overflow:auto}
.cmd-business-boundary-08b2{display:flex;gap:10px;padding:12px 14px;border:1px solid #5eead4;border-radius:12px;background:#f0fdfa;color:#115e59;line-height:1.45}
.cmd-business-boundary-08b2 strong{flex:0 0 auto}.cmd-business-boundary-08b2 span{font-size:.86rem}
.cmd-business-grid-08b2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cmd-business-card-08b2{display:flex;min-width:0;flex-direction:column;gap:5px;padding:13px;border:1px solid #dbe4ea;border-radius:12px;background:#f8fafc}
.cmd-business-card-08b2 small{color:#64748b;font-size:.72rem;font-weight:750;letter-spacing:.04em;text-transform:uppercase}
.cmd-business-card-08b2 strong{overflow:hidden;color:#0f172a;text-overflow:ellipsis;white-space:nowrap}
.cmd-business-card-08b2 span{color:#64748b;font-size:.78rem;line-height:1.4}
.cmd-business-card-08b2 select{margin:0;background:#fff}
.cmd-business-summary-08b2{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.cmd-business-summary-08b2>div{display:flex;min-width:0;flex-direction:column;gap:4px;padding:12px 14px;border:1px solid #dbe4ea;border-radius:11px;background:#fff}
.cmd-business-summary-08b2 strong{overflow:hidden;color:#0f766e;font-size:1rem;text-overflow:ellipsis;white-space:nowrap}.cmd-business-summary-08b2 span{color:#64748b;font-size:.75rem}
.cmd-business-table-wrap-08b2{max-height:330px;overflow:auto;border:1px solid #dbe4ea;border-radius:12px;background:#fff}
.cmd-business-table-wrap-08b2 table{width:100%;margin:0;border-collapse:collapse;font-size:.8rem}
.cmd-business-table-wrap-08b2 thead{position:sticky;top:0;z-index:1;background:#f1f5f9}
.cmd-business-table-wrap-08b2 th,.cmd-business-table-wrap-08b2 td{padding:9px 10px;border-bottom:1px solid #e2e8f0;text-align:left;white-space:nowrap}
.cmd-business-table-wrap-08b2 tbody th{color:#334155;font-weight:700}.cmd-business-table-wrap-08b2 tbody tr:last-child>*{border-bottom:0}
.cmd-business-actions-08b2{display:grid;grid-template-columns:auto auto minmax(240px,1fr) auto;align-items:center;gap:10px;padding:12px;border:1px solid #dbe4ea;border-radius:12px;background:#f8fafc}
.cmd-business-confirm-08b2{display:flex;align-items:center;gap:8px;color:#334155;font-size:.82rem;font-weight:650}
.cmd-business-confirm-08b2 input{width:18px;height:18px;flex:0 0 auto}
.cmd-business-success-08b2{border-color:#86efac!important;background:#f0fdf4!important;color:#166534!important}
@media(max-width:1100px){#cmdHybridBanner08A{flex-wrap:wrap}.cmd-foundation-open-08b,.cmd-business-open-08b2{margin-left:0}.cmd-business-actions-08b2{grid-template-columns:1fr 1fr}.cmd-business-confirm-08b2{grid-column:1/-1}.cmd-business-actions-08b2 .btn.primary{grid-column:1/-1}}
@media(max-width:760px){.cmd-business-grid-08b2{grid-template-columns:1fr}.cmd-business-summary-08b2{grid-template-columns:repeat(2,minmax(0,1fr))}.cmd-business-boundary-08b2{flex-direction:column}.cmd-business-actions-08b2{grid-template-columns:1fr}.cmd-business-confirm-08b2,.cmd-business-actions-08b2 .btn.primary{grid-column:auto}.cmd-business-dialog-08b2 .dialog-actions{align-items:stretch;flex-direction:column}.cmd-business-dialog-08b2 .dialog-actions .btn{width:100%}}
@media(max-width:460px){.cmd-business-summary-08b2{grid-template-columns:1fr}.cmd-business-table-wrap-08b2{max-height:280px}}

/* ===== CMD V8.0 Alpha Build 08B.3: private attachment storage ===== */
.cmd-attachment-open-08b3{flex:0 0 auto;border-color:#b45309;background:#fff;color:#92400e;white-space:nowrap}
.cmd-attachment-dialog-08b3{width:min(1120px,calc(100vw - 24px));max-height:min(940px,calc(100vh - 24px))}
.cmd-attachment-dialog-08b3 .dialog-form{overflow:auto}
.cmd-attachment-boundary-08b3{display:flex;gap:10px;padding:12px 14px;border:1px solid #fbbf24;border-radius:12px;background:#fffbeb;color:#78350f;line-height:1.45}
.cmd-attachment-boundary-08b3 strong{flex:0 0 auto}.cmd-attachment-boundary-08b3 span{font-size:.86rem}
.cmd-attachment-grid-08b3{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.cmd-attachment-card-08b3{display:flex;min-width:0;flex-direction:column;gap:5px;padding:13px;border:1px solid #dbe4ea;border-radius:12px;background:#f8fafc}
.cmd-attachment-card-08b3 small{color:#64748b;font-size:.72rem;font-weight:750;letter-spacing:.04em;text-transform:uppercase}
.cmd-attachment-card-08b3 strong{overflow:hidden;color:#0f172a;text-overflow:ellipsis;white-space:nowrap}
.cmd-attachment-card-08b3 span{color:#64748b;font-size:.78rem;line-height:1.4}.cmd-attachment-card-08b3 select{margin:0;background:#fff}
.cmd-attachment-summary-08b3{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.cmd-attachment-summary-08b3>div{display:flex;min-width:0;flex-direction:column;gap:4px;padding:12px 14px;border:1px solid #dbe4ea;border-radius:11px;background:#fff}
.cmd-attachment-summary-08b3 strong{overflow:hidden;color:#b45309;font-size:1rem;text-overflow:ellipsis;white-space:nowrap}.cmd-attachment-summary-08b3 span{color:#64748b;font-size:.75rem}
.cmd-attachment-table-wrap-08b3{max-height:330px;overflow:auto;border:1px solid #dbe4ea;border-radius:12px;background:#fff}
.cmd-attachment-table-wrap-08b3 table{width:100%;margin:0;border-collapse:collapse;font-size:.8rem}.cmd-attachment-table-wrap-08b3 thead{position:sticky;top:0;z-index:1;background:#f1f5f9}
.cmd-attachment-table-wrap-08b3 th,.cmd-attachment-table-wrap-08b3 td{max-width:300px;padding:9px 10px;border-bottom:1px solid #e2e8f0;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cmd-attachment-table-wrap-08b3 tbody th{color:#334155;font-weight:700}.cmd-attachment-table-wrap-08b3 tbody tr:last-child>*{border-bottom:0}
.cmd-attachment-actions-08b3{display:grid;grid-template-columns:auto auto minmax(260px,1fr) auto;align-items:center;gap:10px;padding:12px;border:1px solid #dbe4ea;border-radius:12px;background:#f8fafc}
.cmd-attachment-confirm-08b3{display:flex;align-items:center;gap:8px;color:#334155;font-size:.82rem;font-weight:650}.cmd-attachment-confirm-08b3 input{width:18px;height:18px;flex:0 0 auto}
.cmd-attachment-online-actions-08b3{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:10px}
.cmd-attachment-restore-08b3{display:flex;align-items:center;justify-content:flex-end;gap:12px;padding:11px 12px;border:1px dashed #fca5a5;border-radius:12px;background:#fff7f7;color:#7f1d1d;font-size:.82rem;font-weight:650}
.cmd-attachment-restore-08b3 label{display:flex;align-items:center;gap:8px}.cmd-attachment-restore-08b3 input{width:18px;height:18px;flex:0 0 auto}
.cmd-attachment-success-08b3{border-color:#86efac!important;background:#f0fdf4!important;color:#166534!important}
@media(max-width:1180px){.cmd-attachment-actions-08b3{grid-template-columns:1fr 1fr}.cmd-attachment-confirm-08b3{grid-column:1/-1}.cmd-attachment-actions-08b3 .btn.primary{grid-column:1/-1}.cmd-attachment-restore-08b3{align-items:stretch;flex-direction:column}}
@media(max-width:760px){.cmd-attachment-grid-08b3{grid-template-columns:1fr}.cmd-attachment-summary-08b3{grid-template-columns:repeat(2,minmax(0,1fr))}.cmd-attachment-boundary-08b3{flex-direction:column}.cmd-attachment-actions-08b3{grid-template-columns:1fr}.cmd-attachment-confirm-08b3,.cmd-attachment-actions-08b3 .btn.primary{grid-column:auto}.cmd-attachment-online-actions-08b3{align-items:stretch;flex-direction:column}.cmd-attachment-online-actions-08b3 .btn{width:100%}}
@media(max-width:460px){.cmd-attachment-summary-08b3{grid-template-columns:1fr}.cmd-attachment-table-wrap-08b3{max-height:280px}}

/* ===== CMD V8.0 Alpha Build 08C: server transactions + explicit cutover ===== */
.cmd-online-08c-controls{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-left:auto}
.cmd-online-08c-badge{display:inline-flex;align-items:center;min-height:30px;padding:5px 10px;border:1px solid #cbd5e1;border-radius:999px;background:#f8fafc;color:#475569;font-size:.72rem;font-weight:800;white-space:nowrap}
.cmd-online-08c-badge.online{border-color:#5eead4;background:#f0fdfa;color:#0f766e}
.cmd-online-08c-badge.prepared{border-color:#fbbf24;background:#fffbeb;color:#92400e}
.cmd-online-08c-badge.checking{border-color:#93c5fd;background:#eff6ff;color:#1d4ed8}
.cmd-online-08c-badge.unavailable{border-color:#fca5a5;background:#fff1f2;color:#b91c1c}
.cmd-online-console-08c{width:min(980px,calc(100vw - 24px));max-height:min(900px,calc(100vh - 24px))}
.cmd-online-console-08c .dialog-form{overflow:auto}
.cmd-online-08c-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.cmd-online-08c-metrics .mini-kpi{display:flex;min-width:0;min-height:82px;flex-direction:column;justify-content:center;gap:5px;padding:12px 14px;border:1px solid #dbe4ea;border-radius:12px;background:#fff}
.cmd-online-08c-metrics .mini-kpi small{color:#64748b;font-size:.72rem;font-weight:750;letter-spacing:.03em;text-transform:uppercase}
.cmd-online-08c-metrics .mini-kpi strong{overflow:hidden;color:#0f766e;text-overflow:ellipsis;white-space:nowrap}
.cmd-online-08c-metrics .mini-kpi.danger{border-color:#fecaca;background:#fff7f7}.cmd-online-08c-metrics .mini-kpi.danger strong{color:#b91c1c}
.cmd-online-08c-metrics .mini-kpi.success{border-color:#86efac;background:#f0fdf4}.cmd-online-08c-metrics .mini-kpi.success strong{color:#166534}
.cmd-online-08c-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.cmd-online-08c-actions .btn{width:100%;min-width:0}
.cmd-online-08c-mappings{padding:12px;border:1px solid #dbe4ea;border-radius:12px;background:#f8fafc}
.cmd-online-08c-mappings.hidden{display:none}
.cmd-online-08c-mappings .section-heading{margin:0 0 10px;padding:0;border:0}
.cmd-online-08c-mapping-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.cmd-online-08c-mapping-list>label{display:grid;grid-template-columns:minmax(150px,.85fr) minmax(180px,1.15fr);align-items:center;gap:10px;padding:10px;border:1px solid #e2e8f0;border-radius:10px;background:#fff}
.cmd-online-08c-mapping-list>label>span{display:flex;min-width:0;flex-direction:column;gap:2px}.cmd-online-08c-mapping-list strong,.cmd-online-08c-mapping-list small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cmd-online-08c-mapping-list small{color:#64748b}
.cmd-online-08c-mapping-list select{min-width:0;margin:0}
.cmd-online-pin-dialog-08c{width:min(480px,calc(100vw - 24px))}
body.cmd-online-transaction-08c #cmdHybridBanner08A{border-color:#5eead4;background:#f0fdfa}
body.cmd-online-prepared-08c #cmdHybridBanner08A{border-color:#fbbf24;background:#fffbeb}
body.cmd-online-checking-08c #cmdHybridBanner08A{border-color:#93c5fd;background:#eff6ff}
body.cmd-online-transaction-08c #usersView button[onclick*="openUserDialog"],
body.cmd-online-transaction-08c button[onclick*="openOutputInvoiceDialog"],
body.cmd-online-transaction-08c button[onclick*="openReceiptDialog"],
body.cmd-online-transaction-08c button[onclick*="openReturnDocument"],
body.cmd-online-transaction-08c button[onclick*="openReturnRefund"],
body.cmd-online-transaction-08c button[onclick*="openAdvanceDialog"],
body.cmd-online-transaction-08c button[onclick*="openSettlementDialog"]{display:none!important}
body.cmd-online-transaction-08c #settingsView [data-settings-renderer="h6h1"] form button[type="submit"]{display:inline-flex!important}
body.cmd-online-transaction-08c #attachmentInput:disabled,
body.cmd-online-transaction-08c #paymentBillInput:disabled{cursor:not-allowed;opacity:.58}
.cmd-online-file-picker-locked .qscm-file-source-actions,
.cmd-online-files-locked .b25-bill-actions{opacity:.55}
.cmd-online-file-picker-locked [data-source]:disabled,
.cmd-online-files-locked [data-b25-pick]:disabled{cursor:not-allowed;transform:none}
.cmd-online-file-lock-note{display:block;width:100%;margin-top:8px;padding:8px 10px;border:1px solid #fedf89;border-radius:9px;background:#fffaeb;color:#7a2e0e;font-weight:650;line-height:1.4}
@media(max-width:900px){.cmd-online-08c-controls{width:100%;margin-left:0}.cmd-online-08c-metrics,.cmd-online-08c-mapping-list{grid-template-columns:repeat(2,minmax(0,1fr))}.cmd-online-08c-mapping-list>label{grid-template-columns:1fr}.cmd-online-08c-actions{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.cmd-online-08c-metrics,.cmd-online-08c-actions,.cmd-online-08c-mapping-list{grid-template-columns:1fr}.cmd-online-08c-controls .btn{flex:1 1 150px}}
#requestForm.qscm-project-settlement-mode .qscm-settlement-supplier-control,
#requestForm.qscm-project-settlement-mode #commonCustomerWrap,
#requestForm.qscm-project-settlement-mode #multiSupplierQuickCreate,
#requestForm.qscm-project-settlement-mode .supplier-field,
#requestForm.qscm-project-settlement-mode .b25-supplier-column,
#requestForm.qscm-project-settlement-mode .debt-preview-box,
#requestForm.qscm-project-settlement-mode #requestSinglePaymentAmount07B6,
#requestForm.qscm-project-settlement-mode #requestSupplierPaymentAmounts07B6,
#requestForm.qscm-project-settlement-mode .qscm-counterparty-advance-check,
#requestForm.qscm-project-settlement-mode #requestCounterpartyAdvanceNotice {
  display:none!important;
}
#requestForm.qscm-project-settlement-mode .request-payment-amount-box {
  grid-template-columns:minmax(0,1fr)!important;
}

/* Build 08C.1-P14.1H3 — khóa họ hồ sơ trước khi dialog được vẽ.
   Tạm ứng nhân viên không phải phiếu nhiều NCC; mã đối tượng nhân viên vẫn
   được gắn ngầm vào payload để sổ tiền và phiếu chi tiếp tục đối chiếu đúng. */
#requestDialog[open] .dialog-form {
  overflow-anchor:none;
  scrollbar-gutter:stable;
}
#requestForm.qscm-employee-advance-mode > label.check-row:has(#multiSupplierToggle),
#requestForm.qscm-employee-advance-mode #commonCustomerWrap,
#requestForm.qscm-employee-advance-mode #requestSettlementBox07B12,
#requestForm.qscm-employee-advance-mode #multiSupplierQuickCreate,
#requestForm.qscm-employee-advance-mode .supplier-field,
#requestForm.qscm-employee-advance-mode .b25-supplier-column,
#requestForm.qscm-employee-advance-mode .debt-preview-box,
#requestForm.qscm-employee-advance-mode #requestSupplierPaymentAmounts07B6,
#requestForm.qscm-employee-advance-mode .qscm-counterparty-advance-check,
#requestForm.qscm-employee-advance-mode #requestCounterpartyAdvanceNotice,
#requestForm.qscm-employee-advance-mode .request-advance-box:has(#requestAdvanceToggle) > label.check-row {
  display:none!important;
}
#requestForm.qscm-employee-advance-mode #requestAdvanceFields {
  display:grid!important;
}
#requestForm.qscm-employee-advance-mode .request-payment-amount-box {
  grid-template-columns:minmax(0,.7fr) minmax(260px,1.3fr)!important;
}
#requestForm.qscm-ordinary-request-mode > .request-advance-box:has(#requestAdvanceToggle),
#requestForm.qscm-ordinary-request-mode > #requestSettlementBox07B12 {
  display:none!important;
}
#requestForm[data-cmd-record-family-p14h3="employee_advance"] .supplier-field,
#requestForm[data-cmd-record-family-p14h3="employee_advance"] .b25-supplier-column {
  display:none!important;
}
@media(max-width:720px) {
  #requestForm.qscm-employee-advance-mode .request-payment-amount-box {
    grid-template-columns:minmax(0,1fr)!important;
  }
}

/* Build 08C.1-P10 — server-authoritative Online user administration. */
body.cmd-online-user-admin-p10 .users-nav{display:flex!important}
.cmd-online-user-summary-p10{margin-bottom:14px}
.cmd-user-view-message-p10,.cmd-user-form-status-p10{border:1px solid #cbd5e1;border-radius:10px;padding:11px 13px;margin:0 0 12px;background:#f8fafc;color:#334155}
.cmd-user-view-message-p10[data-tone="working"],.cmd-user-form-status-p10[data-tone="working"]{border-color:#93c5fd;background:#eff6ff;color:#1d4ed8}
.cmd-user-view-message-p10[data-tone="success"],.cmd-user-form-status-p10[data-tone="success"]{border-color:#86efac;background:#f0fdf4;color:#166534}
.cmd-user-view-message-p10[data-tone="error"],.cmd-user-form-status-p10[data-tone="error"]{border-color:#fca5a5;background:#fef2f2;color:#b91c1c}
.cmd-user-gap-p10{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:14px}
.cmd-user-gap-p10 strong{margin-right:4px}
.cmd-user-gap-invalid-p10{display:inline-flex;align-items:center;border:1px solid #fca5a5;border-radius:9px;background:#fef2f2;color:#b91c1c;padding:8px 10px;font-weight:650}
.cmd-online-user-table-p10 td{vertical-align:top}
.cmd-online-user-table-p10 td>small,.cmd-online-user-table-p10 td>strong+small{display:block;margin-top:4px}
.cmd-user-dialog-p10{width:min(1080px,calc(100vw - 24px));max-height:calc(100vh - 24px)}
.cmd-user-dialog-p10 .dialog-form{max-height:calc(100vh - 40px);overflow:auto}
.cmd-user-password-tools-p10{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:-2px 0 14px}
.cmd-online-permission-grid-p10{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.cmd-online-permission-row-p10{display:grid;grid-template-columns:minmax(0,1fr) minmax(140px,190px);gap:10px;align-items:center;border:1px solid #e2e8f0;border-radius:10px;padding:9px 10px;background:#fff}
.cmd-online-permission-row-p10 span,.cmd-online-permission-row-p10 small{display:block}
.cmd-online-permission-row-p10 small{color:#64748b;margin-top:2px;font-size:11px;overflow-wrap:anywhere}
.cmd-user-created-p10{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;border:1px solid #86efac;border-radius:12px;background:#f0fdf4;padding:14px;margin-top:14px}
.cmd-user-created-p10>strong,.cmd-user-created-p10>div{grid-column:1/-1}
.cmd-user-created-p10 label{margin:0}
.cmd-user-password-dialog-p10{width:min(560px,calc(100vw - 24px))}
.cmd-user-password-dialog-p10 .dialog-form{min-width:0}
@media (max-width:780px){
  .cmd-online-permission-grid-p10,.cmd-user-created-p10{grid-template-columns:1fr}
  .cmd-online-permission-row-p10{grid-template-columns:1fr}
  .cmd-online-user-table-p10 .account-action-row{min-width:180px}
}

/* Build 08C.1-P11H6 — workflow task and treasury Online hotfix. */
.cmd-online-permission-grid-p10{align-items:start}
.cmd-online-permission-group-p11{border:1px solid #dbe4ee;border-radius:12px;background:#f8fafc;overflow:hidden}
.cmd-online-permission-group-p11.has-granted{border-color:#b7d9ca;background:#f8fcfa}
.cmd-online-permission-group-head-p11{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;border-bottom:1px solid #e2e8f0;background:#f1f5f9}
.cmd-online-permission-group-p11.has-granted .cmd-online-permission-group-head-p11{background:#ecf8f3}
.cmd-online-permission-group-head-p11 h5{margin:0;font-size:14px;color:#0f2f25}
.cmd-online-permission-group-head-p11 small{color:#64748b;white-space:nowrap}
.cmd-online-permission-group-body-p11{display:grid;gap:7px;padding:9px}
.cmd-online-permission-group-body-p11 .cmd-online-permission-row-p10{margin:0;background:#fff}
.cmd-online-global-profile-p13{display:grid;gap:4px;margin-bottom:12px}
.cmd-online-project-assignment-p13{margin:18px 0;border-top:1px solid #dbe4ee;padding-top:16px}
.cmd-online-project-assignment-grid-p13{display:grid;gap:9px;margin-top:10px}
.cmd-online-project-row-p13{display:grid;grid-template-columns:minmax(180px,.7fr) minmax(0,1.3fr);gap:12px;align-items:center;border:1px solid #dbe4ee;border-radius:11px;padding:10px 12px;background:#f8fafc}
.cmd-online-project-row-p13 legend{display:contents}
.cmd-online-project-row-p13 legend strong,.cmd-online-project-row-p13 legend span{display:block}
.cmd-online-project-row-p13 legend span{color:#64748b;font-size:12px;margin-top:2px}
.cmd-online-project-row-p13>div{display:flex;gap:8px 14px;align-items:center;flex-wrap:wrap}
.cmd-online-project-row-p13>div label{display:flex;align-items:center;gap:6px;margin:0;font-size:13px;font-weight:650}
.cmd-online-project-row-p13 input[type="checkbox"]{width:auto;margin:0}
@media(max-width:760px){.cmd-online-project-row-p13{grid-template-columns:1fr}.cmd-online-project-row-p13 legend{display:block}.cmd-online-project-row-p13>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}}
.cmd-online-approval-pin-guide-p11{display:grid;gap:4px;margin-top:12px;border-color:#93c5fd;background:#eff6ff;color:#1e3a8a}
.cmd-online-approval-pin-guide-p11 small{display:block;line-height:1.5}
.cmd-approval-pin-button-p11{white-space:nowrap}

.cmd-online-work-center-p11{margin-top:16px;border-color:#bfded1}
.cmd-work-center-head-p11{align-items:flex-start}
.cmd-work-center-actions-p11{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.cmd-work-summary-p11{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:14px 16px;border-bottom:1px solid #e2e8f0;background:#f8fcfa}
.cmd-work-total-p11,.cmd-work-department-p11,.cmd-work-entity-p11{display:inline-flex;align-items:center;gap:7px;border:1px solid #cbd5e1;border-radius:999px;background:#fff;padding:7px 10px;color:#334155;font-size:13px}
.cmd-work-total-p11{border-color:#7dd3b0;background:#ecfdf5;color:#065f46}
.cmd-work-entity-p11{border-color:#bfdbfe;background:#eff6ff;color:#1e40af}
.cmd-work-total-p11 strong,.cmd-work-department-p11 strong,.cmd-work-entity-p11 strong{font-size:15px;color:inherit}
.cmd-work-empty-summary-p11{color:#64748b;font-size:13px}
.cmd-work-unresolved-p11{display:grid;gap:3px;margin:12px 16px 0;border-color:#fdba74;background:#fff7ed;color:#9a3412}
.cmd-work-unresolved-p11 small{line-height:1.45}
.cmd-pin-self-service-p11{display:flex;align-items:center;justify-content:space-between;gap:14px;margin:12px 16px 0;padding:12px 14px;border:1px solid #93c5fd;border-radius:12px;background:#eff6ff;color:#1e3a8a}
.cmd-pin-self-service-p11>div{display:grid;gap:3px}.cmd-pin-self-service-p11 small{line-height:1.45}
.cmd-work-list-p11{display:grid}
.cmd-work-item-p11{display:grid;grid-template-columns:minmax(170px,.8fr) minmax(190px,1fr) minmax(260px,1.5fr) auto;gap:14px;align-items:center;padding:13px 16px;border-bottom:1px solid #e2e8f0}
.cmd-work-item-p11:last-child{border-bottom:0}
.cmd-work-item-p11:hover{background:#f8fafc}
.cmd-work-stage-p11,.cmd-work-record-p11,.cmd-work-message-p11{display:grid;gap:4px;min-width:0}
.cmd-work-stage-p11 span{width:max-content;max-width:100%;border-radius:999px;background:#e8f5ef;color:#087052;padding:4px 8px;font-size:11px;font-weight:700}
.cmd-work-stage-p11 strong,.cmd-work-record-p11 strong{overflow-wrap:anywhere}
.cmd-work-record-p11 small,.cmd-work-message-p11 small{color:#64748b}
.cmd-work-message-p11 span{overflow-wrap:anywhere}

@media (max-width:980px){
  .cmd-work-item-p11{grid-template-columns:minmax(150px,.8fr) minmax(180px,1fr) minmax(220px,1.4fr)}
  .cmd-work-item-p11>button{grid-column:1/-1;justify-self:end}
}
@media (max-width:780px){
  .cmd-work-center-head-p11{display:grid;gap:12px}
  .cmd-work-center-actions-p11{justify-content:flex-start}
  .cmd-work-item-p11{grid-template-columns:1fr;gap:9px}
  .cmd-work-item-p11>button{grid-column:auto;width:100%;justify-self:stretch}
  .cmd-online-work-center-p11{margin-top:12px}
  .cmd-pin-self-service-p11{align-items:stretch;flex-direction:column}
}

/* Never expose a stale Local list while the authenticated Online bootstrap is
   still deciding which server records the user may see. */
body.cmd-online-checking-08c #appView .main>.view{opacity:0;visibility:hidden;pointer-events:none;user-select:none}
body.cmd-online-checking-08c #appView::after{content:"Đang tải nguồn dữ liệu Online…";position:fixed;z-index:90;left:calc(50% + 138px);top:50%;transform:translate(-50%,-50%);padding:14px 18px;border:1px solid #93c5fd;border-radius:12px;background:#eff6ff;color:#1e3a8a;font-weight:750;box-shadow:0 12px 34px rgba(15,23,42,.14);pointer-events:none}
body.cmd-online-unavailable-08c #appView .main>.view{opacity:.24;pointer-events:none;user-select:none}
body.cmd-online-unavailable-08c #cmdHybridBanner08A{border-color:#fca5a5;background:#fff7f7}
body.cmd-online-unavailable-08c #appView::after{content:"Không tải được nguồn Online. Bấm ‘Tải lại Online’ trên thanh trạng thái; dữ liệu Local đang được khóa an toàn.";position:fixed;z-index:90;left:calc(50% + 138px);top:50%;width:min(520px,calc(100vw - 40px));transform:translate(-50%,-50%);padding:14px 18px;border:1px solid #fca5a5;border-radius:12px;background:#fff7f7;color:#991b1b;font-weight:750;line-height:1.5;text-align:center;box-shadow:0 12px 34px rgba(15,23,42,.14);pointer-events:none}
@media(max-width:760px){body.cmd-online-checking-08c #appView::after,body.cmd-online-unavailable-08c #appView::after{left:50%}}
