:root{--bp:#0f4c81;--bp2:#1167b1;--bg:#f3f6fa;--txt:#1f2937;--muted:#6b7280;--card:#ffffff;--danger:#dc2626;--ok:#059669;--warn:#d97706}
*{box-sizing:border-box}body{margin:0;font-family:Arial,Helvetica,sans-serif;background:var(--bg);color:var(--txt)}
a{color:var(--bp2)}button{cursor:pointer;border:0;border-radius:10px;padding:10px 14px;background:var(--bp);color:white;font-weight:700}button.secondary{background:#e5e7eb;color:#111827}button.danger{background:var(--danger)}button.small{padding:6px 9px;border-radius:8px;font-size:12px}.hidden{display:none!important}
.login-wrap{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#0f4c81,#19a7ce)}.login-card{width:420px;max-width:92vw;background:#fff;border-radius:24px;padding:32px;box-shadow:0 24px 80px rgba(0,0,0,.22)}.brand{display:flex;gap:12px;align-items:center;margin-bottom:22px}.logo{width:48px;height:48px;border-radius:14px;background:var(--bp);color:white;display:grid;place-items:center;font-weight:900}.brand h1{font-size:22px;margin:0}.brand p{margin:4px 0 0;color:var(--muted);font-size:13px}
input,select,textarea{width:100%;padding:10px 12px;border:1px solid #d1d5db;border-radius:10px;background:white;font-size:14px}textarea{min-height:80px}label{font-size:12px;color:#374151;font-weight:700;margin-bottom:6px;display:block}.field{margin-bottom:12px}.error{background:#fee2e2;color:#991b1b;border:1px solid #fecaca;padding:10px;border-radius:10px;margin:10px 0}.okmsg{background:#dcfce7;color:#166534;border:1px solid #bbf7d0;padding:10px;border-radius:10px;margin:10px 0}
.layout{display:grid;grid-template-columns:260px 1fr;min-height:100vh}.sidebar{background:#0b2640;color:white;padding:22px 16px;position:sticky;top:0;height:100vh}.side-logo{font-size:22px;font-weight:900;margin-bottom:4px;letter-spacing:.4px}.side-sub{font-size:13px;color:#bfd7ee;margin-bottom:0;line-height:1.2}.nav button{display:block;width:100%;text-align:left;background:transparent;border-radius:12px;margin:5px 0;color:#e5f3ff;font-weight:700}.nav button.active,.nav button:hover{background:#153d63}.userbox{position:absolute;bottom:16px;left:16px;right:16px;background:#153d63;border-radius:16px;padding:12px;font-size:12px}.content{padding:26px 32px}.topbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.topbar h2{margin:0;font-size:26px}.topbar p{margin:4px 0 0;color:var(--muted)}
.grid{display:grid;gap:16px}.grid.kpi{grid-template-columns:repeat(4,minmax(0,1fr))}.grid.two{grid-template-columns:1fr 1fr}.card{background:var(--card);border-radius:18px;padding:18px;box-shadow:0 10px 30px rgba(15,76,129,.08);border:1px solid #e5e7eb}.kpi-card b{font-size:28px;color:var(--bp)}.kpi-card span{display:block;color:var(--muted);font-size:13px;margin-top:6px}.section-title{font-size:18px;font-weight:900;margin:0 0 14px}.form-row{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.form-row.two{grid-template-columns:repeat(2,minmax(0,1fr))}.form-row.four{grid-template-columns:repeat(4,minmax(0,1fr))}.form-row.five{grid-template-columns:repeat(5,minmax(0,1fr))}
table{width:100%;border-collapse:collapse;font-size:13px}th,td{padding:10px;border-bottom:1px solid #e5e7eb;text-align:left;vertical-align:top}th{background:#f8fafc;color:#374151;font-size:12px}tr:hover td{background:#fbfdff}.pill{display:inline-block;border-radius:999px;padding:4px 9px;font-size:12px;font-weight:800;background:#e0f2fe;color:#075985}.pill.green{background:#dcfce7;color:#166534}.pill.orange{background:#ffedd5;color:#9a3412}.pill.red{background:#fee2e2;color:#991b1b}.toolbar{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-bottom:12px}.muted{color:var(--muted)}.money{text-align:right;font-weight:800}.scroll{overflow:auto;max-height:520px}.pre{white-space:pre-wrap;background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:12px;max-height:360px;overflow:auto}.toast{position:fixed;right:24px;bottom:24px;background:#111827;color:white;padding:14px 18px;border-radius:14px;box-shadow:0 20px 50px rgba(0,0,0,.25);z-index:50}
@media(max-width:1100px){.layout{grid-template-columns:1fr}.sidebar{height:auto;position:relative}.userbox{position:relative;left:auto;right:auto;bottom:auto;margin-top:20px}.grid.kpi,.grid.two,.form-row,.form-row.two,.form-row.four,.form-row.five{grid-template-columns:1fr}.content{padding:18px}}
.form-row.three{grid-template-columns:repeat(3,minmax(0,1fr))}
/* R0.2 */
.nowrap{white-space:nowrap}.modal-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.55);display:grid;place-items:center;z-index:100;padding:24px}.modal{width:min(1180px,96vw);max-height:92vh;overflow:auto;background:white;border-radius:22px;box-shadow:0 30px 90px rgba(0,0,0,.35);border:1px solid #e5e7eb}.modal-head{position:sticky;top:0;background:white;border-bottom:1px solid #e5e7eb;display:flex;align-items:center;justify-content:space-between;padding:16px 20px;z-index:2}.modal-head h3{margin:0;color:var(--bp)}.modal-body{padding:18px 20px}.meta-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}.meta-grid>div{background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;padding:12px}.modal h4{margin:18px 0 10px;color:#111827}
@media(max-width:900px){.meta-grid{grid-template-columns:1fr}.modal-backdrop{padding:8px}.modal{width:100%;max-height:96vh}}

.loading{min-height:100vh;display:flex;align-items:center;justify-content:center;color:#64748b;font-weight:700;font-size:18px}
.okmsg{background:#ecfdf5;border:1px solid #86efac;color:#166534;padding:10px 12px;border-radius:12px;margin:10px 0}

/* R0.2.7 company branding */
.side-brand{display:flex;align-items:center;gap:12px;margin-bottom:26px;min-height:76px}.side-brand-text{min-width:0}.side-icon-box{width:72px;height:72px;border-radius:16px;background:white;display:flex;align-items:center;justify-content:center;overflow:hidden;flex-shrink:0;box-shadow:0 10px 28px rgba(0,0,0,.16)}.side-icon-img{width:64px;height:64px;object-fit:contain;display:block}.side-logo-img{width:72px;height:72px;object-fit:contain;background:white;border-radius:16px;padding:4px}.login-logo-img{width:96px;max-height:58px;object-fit:contain}.brand{align-items:center}.company-preview-card{border:1px solid #dbeafe;border-radius:18px;padding:18px;background:#fff;max-width:520px}.preview-head{display:flex;gap:14px;align-items:flex-start}.preview-head img{width:86px;max-height:52px;object-fit:contain}.company-preview-card p{margin:8px 0}.company-preview-card hr{border:0;border-top:1px solid #dbeafe;margin:14px 0}.company-logo-box{margin-top:16px;padding:16px;border-radius:18px;background:#f8fafc;border:1px solid #e5e7eb}.company-logo-box h4{margin:0 0 12px}.logo-preview{min-height:92px;border:1px dashed #cbd5e1;border-radius:16px;background:white;display:flex;align-items:center;justify-content:center;margin-bottom:12px;color:#64748b;font-weight:700}.logo-preview img{max-width:100%;max-height:86px;object-fit:contain}button:disabled{opacity:.5;cursor:not-allowed}

/* R0.2.8 - PO templates */
.toolbar.wrap{flex-wrap:wrap;gap:8px}
.receive-input{min-width:90px;max-width:120px;padding:7px 8px;border:1px solid #cfd8e3;border-radius:8px;text-align:right}
.receive-input:disabled{background:#f1f5f9;color:#94a3b8}

/* R0.2.11 - Manual multi-line PO */
.manual-po-card .po-lines-scroll{max-height:360px;border:1px solid #e5e7eb;border-radius:14px;background:#fff}
.po-manual-table th,.po-manual-table td{padding:8px;vertical-align:middle}
.po-manual-table select{min-width:260px}
.po-manual-table input{min-width:100px;padding:8px 9px}
.po-manual-table input[id^="po_m_note_"]{min-width:180px}
.po-total-box{margin:12px 0 14px auto;max-width:430px;background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;padding:12px}
.po-total-box>div{display:flex;justify-content:space-between;gap:16px;padding:5px 0;color:#374151}
.po-total-box .grand{border-top:1px solid #e5e7eb;margin-top:6px;padding-top:10px;color:#0f4c81;font-size:15px}
button.danger.small{background:#fee2e2;color:#991b1b;border:1px solid #fecaca}


/* R0.2.13 - Multi VAT per PO line */
.po-manual-table select[id^="po_m_vat_"], .po-line-vat, #po_apply_all_vat, #po_imp_vat, #po_vat{min-width:92px}
.vat-edit-panel{border:1px solid #dbeafe;background:#f8fbff;border-radius:16px;padding:14px;margin:14px 0}
.vat-edit-panel .po-total-box{margin:10px 0 0 auto}
.po-tax-live{max-width:520px}
#po_detail_lines th,#po_detail_lines td{white-space:nowrap}
#po_detail_lines select{padding:7px 8px;border-radius:8px}


/* R0.2.14 - Compact screen ratio / PO workspace alignment */
body{font-size:13px;line-height:1.35}
.layout{grid-template-columns:252px 1fr}.content{padding:18px 24px}.topbar{margin-bottom:14px}.topbar h2{font-size:24px;line-height:1.15}.topbar p{font-size:14px}.sidebar{padding:20px 16px}.nav button{padding:9px 12px;margin:4px 0;font-size:13px}.side-brand{margin-bottom:22px}.side-logo{font-size:20px}.side-sub{font-size:12px}.userbox{font-size:11px}
.card{border-radius:16px;padding:14px 16px;box-shadow:0 8px 24px rgba(15,76,129,.07)}.section-title{font-size:17px;margin-bottom:10px}.grid{gap:14px}.grid.two{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
button{padding:8px 12px;border-radius:9px;font-size:13px}button.small{padding:5px 8px;font-size:11px}.toolbar{gap:7px;margin-bottom:10px}
input,select,textarea{padding:8px 10px;border-radius:9px;font-size:13px;min-height:36px}textarea{min-height:66px}label{font-size:11px;margin-bottom:4px}.field{margin-bottom:9px}.form-row{gap:9px}.form-row.two{gap:10px}.form-row.four{gap:9px}
table{font-size:12px}th,td{padding:7px 8px}th{font-size:11px}.pill{font-size:11px;padding:3px 8px}.muted{font-size:13px}.scroll{max-height:500px}.money{font-size:12px}
.po-create-layout{grid-template-columns:minmax(310px,0.58fr) minmax(780px,1.42fr);align-items:start}.po-import-card{position:sticky;top:14px}.po-import-card .form-row.two,.po-import-card .form-row.four{grid-template-columns:1fr 1fr}.po-import-card textarea{min-height:78px}.po-import-card .toolbar{margin-top:8px}.po-import-card p.muted{font-size:12px;line-height:1.35}
.manual-po-card .section-title{font-size:18px}.manual-po-card .po-lines-scroll{max-height:330px}.po-manual-table{table-layout:auto}.po-manual-table th,.po-manual-table td{padding:6px 7px}.po-manual-table select{min-width:230px}.po-manual-table input{min-width:84px;padding:7px 8px}.po-manual-table input[id^="po_m_note_"]{min-width:150px}.po-total-box{max-width:380px;padding:10px;margin:10px 0 12px auto}.po-total-box>div{padding:4px 0}.po-total-box .grand{font-size:14px}.po-manual-table select[id^="po_m_vat_"],.po-line-vat,#po_apply_all_vat,#po_imp_vat,#po_vat{min-width:82px}
#po_manual_tbody td:nth-child(1){width:42px;text-align:center;font-weight:700}#po_manual_tbody td:nth-child(3){width:86px}#po_manual_tbody td:nth-child(4){width:110px}#po_manual_tbody td:nth-child(5){width:90px}#po_manual_tbody td:nth-child(7),#po_manual_tbody td:nth-child(8){width:95px;text-align:right;font-weight:800}
@media(max-width:1450px){.po-create-layout{grid-template-columns:1fr}.po-import-card{position:relative;top:auto}.po-import-card .form-row.four{grid-template-columns:repeat(4,minmax(0,1fr))}.manual-po-card .po-lines-scroll{max-height:360px}}
@media(max-width:1100px){.content{padding:14px}.po-import-card .form-row.four{grid-template-columns:1fr 1fr}.po-import-card .form-row.two{grid-template-columns:1fr}.form-row.five{grid-template-columns:1fr 1fr}}

/* R0.2.15 - searchable material input for PO lines */
.item-search-input{
  min-width:260px;
  width:100%;
}
.po-manual-table td:nth-child(2){
  min-width:280px;
}
@media (max-width: 1200px){
  .item-search-input{min-width:220px;}
  .po-manual-table td:nth-child(2){min-width:240px;}
}


/* R0.2.16 - real autocomplete dropdown for PO material search */
.item-search-cell{position:relative;}
.material-suggest-global{
  position:fixed;
  display:none;
  z-index:9999;
  background:#fff;
  border:1px solid #cbd5e1;
  border-radius:12px;
  box-shadow:0 18px 50px rgba(15,23,42,.22);
  max-height:320px;
  overflow:auto;
  padding:6px;
}
.material-suggest-global.open{display:block;}
.material-option{
  padding:9px 10px;
  border-radius:9px;
  cursor:pointer;
  border-bottom:1px solid #f1f5f9;
}
.material-option:last-child{border-bottom:0;}
.material-option:hover,.material-option.active{background:#eff6ff;}
.material-option-main{display:flex;gap:8px;align-items:center;min-width:0;}
.material-option-main b{color:#0f4c81;white-space:nowrap;}
.material-option-main span{font-weight:700;color:#111827;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.material-option-sub{font-size:11px;color:#64748b;margin-top:3px;line-height:1.3;}
.material-option.muted-line{color:#64748b;cursor:default;background:#f8fafc;}
.material-option.muted-line:hover{background:#f8fafc;}

/* R0.2.17 - PO ngày cần hàng dùng chung cấp PO, bỏ cột ngày trên từng dòng */
#po_expected_date{min-width:130px;}
@media(max-width:760px){.form-row.five{grid-template-columns:1fr}}


/* R0.2.21 - PO list advanced filters */
.po-filter-panel{
  display:grid;
  grid-template-columns:minmax(220px,1.5fr) minmax(140px,.75fr) minmax(180px,1fr) minmax(160px,1fr) minmax(130px,.65fr) minmax(130px,.65fr) auto;
  gap:8px;
  align-items:end;
  margin:4px 0 12px;
  padding:10px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#f8fafc;
}
.po-filter-panel label{font-size:10.5px;color:#475569;}
.po-filter-panel input,.po-filter-panel select{min-height:34px;padding:7px 9px;font-size:12px;background:white;}
.po-filter-actions{display:flex;align-items:end;justify-content:flex-end;}
.po-filter-actions button{white-space:nowrap;min-height:34px;}
#po_filter_count{font-weight:800;color:#0f4c81;}
@media(max-width:1300px){.po-filter-panel{grid-template-columns:repeat(3,minmax(0,1fr));}.po-filter-actions{justify-content:flex-start}}
@media(max-width:760px){.po-filter-panel{grid-template-columns:1fr;}}

/* R0.2.24 - Global combo suggestions for free text fields */
.global-combo-suggest-box{
  position:fixed;
  z-index:9999;
  display:none;
  background:#fff;
  border:1px solid #cbd5e1;
  border-radius:12px;
  box-shadow:0 16px 40px rgba(15,23,42,.18);
  overflow:hidden;
  max-height:320px;
  overflow-y:auto;
  font-size:12px;
}
.global-combo-suggest-box.open{display:block;}
.global-combo-option{
  padding:8px 10px;
  cursor:pointer;
  border-bottom:1px solid #eef2f7;
  line-height:1.25;
  color:#0f172a;
}
.global-combo-option:hover,.global-combo-option.active{
  background:#eaf3ff;
  color:#084b86;
}
.global-combo-hint{
  padding:7px 10px;
  font-size:11px;
  color:#64748b;
  background:#f8fafc;
}
input:not([type="number"]):not([type="date"]):not([type="file"]):not([type="password"]):focus,
textarea:focus{
  box-shadow:0 0 0 2px rgba(14,95,170,.10);
}


/* R0.2.27 - Compact PO detail receiving layout */
.po-receive-scroll{
  max-height:420px;
  border:1px solid #e5e7eb;
  border-radius:14px;
  background:#fff;
}
.po-receive-table{
  table-layout:fixed;
  min-width:980px;
}
.po-receive-table th,.po-receive-table td{
  padding:8px 10px;
  vertical-align:middle;
  white-space:normal!important;
}
.po-receive-table th:nth-child(1){width:34%;}
.po-receive-table th:nth-child(2),
.po-receive-table th:nth-child(3){width:8%;}
.po-receive-table th:nth-child(4){width:14%;}
.po-receive-table th:nth-child(5),
.po-receive-table th:nth-child(6),
.po-receive-table th:nth-child(8){width:11%;}
.po-receive-table th:nth-child(7){width:7%;}
.po-item-title{font-weight:800;color:#0f172a;line-height:1.25;}
.po-item-meta{display:flex;gap:8px;flex-wrap:wrap;margin-top:3px;color:#64748b;font-size:11px;line-height:1.25;}
.po-item-meta b{color:#0f4c81;}
.qty-cell b{display:block;color:#111827;}
.qty-cell span,.qty-cell small,.receive-cell small,.mini{display:block;color:#64748b;font-size:11px;line-height:1.2;margin-top:2px;}
.receive-cell .receive-input{width:96px;min-width:90px;max-width:110px;}
#po_detail_lines .po-line-vat{min-width:78px;}
.receipt-history-card{margin-top:14px;border:1px solid #e5e7eb;border-radius:16px;padding:12px 14px;background:#fbfdff;}
.receipt-history-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px;}
.receipt-history-head h4{margin:0;text-transform:uppercase;letter-spacing:.3px;font-size:14px;}
.pill.purple{background:#f3e8ff;color:#7e22ce;}
.receipt-history-scroll{max-height:260px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;}
.receipt-history-table th,.receipt-history-table td{padding:8px 10px;vertical-align:middle;}
.receipt-history-table th:nth-child(3){width:38%;}
@media(max-width:900px){
  .po-receive-table{min-width:900px;}
  .receipt-history-head{align-items:flex-start;flex-direction:column;}
}


/* R0.2.38 - Buttons and text one step bigger */
body{
  font-size:14px;
  line-height:1.4;
}
button{
  padding:10px 15px;
  border-radius:10px;
  font-size:14px;
  min-height:38px;
  line-height:1.2;
}
button.small{
  padding:6px 10px;
  border-radius:9px;
  font-size:12px;
  min-height:30px;
}
.nav button{
  padding:10px 13px;
  font-size:14px;
  min-height:40px;
}
input,select,textarea{
  padding:9px 11px;
  font-size:14px;
  min-height:38px;
}
textarea{min-height:72px;}
label{font-size:12px;}
table{font-size:13px;}
th{font-size:12px;}
th,td{padding:8px 9px;}
.section-title{font-size:18px;}
.topbar h2{font-size:25px;}
.topbar p,.muted{font-size:14px;}
.side-logo{font-size:21px;}
.side-sub{font-size:13px;}
.userbox{font-size:12px;}
.pill{font-size:12px;padding:4px 9px;}
.kpi-card span{font-size:14px;}
.money{font-size:13px;}
.po-manual-table input,
.po-manual-table select,
.po-filter-panel input,
.po-filter-panel select,
#po_detail_lines select{
  font-size:13px;
  min-height:36px;
}
.po-filter-actions button{min-height:38px;}
.global-combo-suggest-box{font-size:13px;}
.global-combo-hint,.material-option-sub,.po-item-meta,.qty-cell span,.qty-cell small,.receive-cell small,.mini{font-size:12px;}


/* R0.2.43 - Bluepower Platform-style role permission matrix */
.permission-legend{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0 12px;color:#475569;font-size:12px}.permission-legend span{background:#f8fafc;border:1px solid #e5e7eb;border-radius:999px;padding:6px 10px}.permission-matrix-scroll{overflow:auto;max-height:560px;border:1px solid #e5e7eb;border-radius:14px;background:#fff}.permission-table{min-width:1480px;font-size:12px}.permission-table th,.permission-table td{padding:8px 9px;vertical-align:middle}.permission-table thead th{position:sticky;top:0;z-index:2;background:#eff6ff;color:#0f172a}.permission-table .role-head{min-width:150px;text-align:center}.permission-table .role-head span{display:block;color:#64748b;font-size:11px;font-weight:600;margin-top:2px}.perm-module b{display:block;color:#0f4c81;font-size:13px}.perm-module span{display:block;color:#64748b;font-size:11px;line-height:1.25;margin-top:2px}.perm-key{color:#64748b;font-size:11px;white-space:nowrap}.perm-select{min-width:145px;min-height:34px;padding:6px 8px;font-size:12px}.perm-group-row td{background:#f1f5f9!important;color:#0f172a;font-weight:900;text-transform:uppercase;letter-spacing:.3px;border-top:1px solid #cbd5e1;border-bottom:1px solid #cbd5e1}.permission-table tr:hover td{background:#fbfdff}


/* R0.2.45 - Customer master data for contracts and payment requests */
.customer-layout{grid-template-columns:minmax(560px,.95fr) minmax(680px,1.05fr);align-items:start;}
.customer-form-card textarea{min-height:58px;}
.form-section-title{font-weight:900;color:#0f4c81;margin:12px 0 8px;padding:7px 10px;background:#eef6ff;border-left:4px solid #0f4c81;border-radius:8px;font-size:13px;}
.customer-table-scroll{max-height:640px;}
.customer-table-scroll table{min-width:980px;}
.customer-table-scroll th,.customer-table-scroll td{font-size:12px;line-height:1.35;}
@media(max-width:1350px){.customer-layout{grid-template-columns:1fr}.customer-table-scroll table{min-width:920px;}}


/* R0.2.48 - Drawing detail print/PDF button */
.modal-head-actions{display:flex;align-items:center;gap:8px;}
@media print{
  body.print-drawing-detail{background:#fff!important;}
  body.print-drawing-detail > *:not(.modal-backdrop){display:none!important;}
  body.print-drawing-detail .modal-backdrop{
    position:static!important;inset:auto!important;display:block!important;background:#fff!important;padding:0!important;z-index:auto!important;
  }
  body.print-drawing-detail .modal{
    width:100%!important;max-height:none!important;overflow:visible!important;border:0!important;border-radius:0!important;box-shadow:none!important;background:#fff!important;
  }
  body.print-drawing-detail .modal-head{
    position:static!important;padding:0 0 10px 0!important;border-bottom:2px solid #0f4c81!important;background:#fff!important;
  }
  body.print-drawing-detail .modal-head h3{font-size:18px!important;color:#0f4c81!important;}
  body.print-drawing-detail .modal-body{padding:12px 0 0 0!important;}
  body.print-drawing-detail .modal-head-actions,
  body.print-drawing-detail button{display:none!important;}
  body.print-drawing-detail .soft-panel,
  body.print-drawing-detail .meta-grid>div{break-inside:avoid;}
  body.print-drawing-detail input,
  body.print-drawing-detail select,
  body.print-drawing-detail textarea{
    border:0!important;background:transparent!important;box-shadow:none!important;padding:0!important;min-height:auto!important;resize:none!important;
  }
  body.print-drawing-detail textarea{height:auto!important;min-height:24px!important;}
  body.print-drawing-detail .scroll{overflow:visible!important;max-height:none!important;}
  body.print-drawing-detail table{width:100%!important;font-size:11px!important;}
  body.print-drawing-detail th,
  body.print-drawing-detail td{padding:6px 7px!important;}
  @page{size:A4 portrait;margin:10mm;}
}


/* R0.2.53 - Project Delivery Workflow */
.project-flow-card{margin-bottom:14px;background:linear-gradient(180deg,#ffffff,#f8fbff)}
.project-flow-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.project-flow-head p{margin:2px 0 0}
.project-flow-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px}
.project-step{position:relative;border:1px solid #dbeafe;border-radius:15px;background:#fff;padding:12px 12px 12px 44px;min-height:104px;box-shadow:0 8px 18px rgba(15,76,129,.05)}
.project-step-no{position:absolute;left:12px;top:12px;width:24px;height:24px;border-radius:999px;background:#0f4c81;color:white;display:grid;place-items:center;font-weight:900;font-size:12px}
.project-step b{display:block;color:#0f2742;font-size:13px;line-height:1.25}.project-step p{margin:5px 0 8px;color:#64748b;font-size:12px;line-height:1.25}.project-step span{display:inline-block;background:#eff6ff;color:#0f4c81;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:800}
.project-layout{grid-template-columns:minmax(520px,1fr) minmax(760px,1fr)}
.mini-heading{margin:12px 0 8px;color:#0f4c81;font-size:14px;font-weight:900;border-top:1px solid #e5e7eb;padding-top:12px}
.project-mini-flow{display:flex;gap:3px;margin-top:7px;min-width:110px}.project-mini-flow span{height:7px;flex:1;border-radius:99px;background:#e5e7eb}.project-mini-flow span.done{background:#0f4c81}
@media(max-width:1450px){.project-flow-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.project-layout{grid-template-columns:1fr}}
@media(max-width:900px){.project-flow-head{display:block}.project-flow-grid{grid-template-columns:1fr}.project-step{min-height:auto}}


/* R0.2.55 - Project child modules in sidebar */
.nav-group{margin:4px 0 6px;}
.nav-parent.parent-active{background:#123b60;}
.nav-parent.label-only{color:#e5f3ff;font-weight:800;padding:9px 12px;}
.nav-children{margin:2px 0 8px 14px;padding-left:12px;border-left:1px solid rgba(191,215,238,.28);}
.nav button.nav-child{font-size:13px;padding:7px 10px;min-height:32px;color:#cfe6fb;margin:3px 0;border-radius:10px;}
.nav button.nav-child.active,.nav button.nav-child:hover{background:#1b4d78;color:white;}
.project-doc-kpis{grid-template-columns:repeat(4,minmax(0,1fr));}
.mini-check{display:inline-block;margin:2px 3px 2px 0;padding:3px 7px;border-radius:999px;font-size:11px;font-weight:800;white-space:nowrap;}
.mini-check.ok{background:#dcfce7;color:#166534;}
.mini-check.wait{background:#f1f5f9;color:#64748b;}
.doc-list{margin:0;padding-left:20px;color:#374151;line-height:1.65;}
@media(max-width:1100px){.project-doc-kpis{grid-template-columns:1fr 1fr}.nav-children{margin-left:8px;}}
@media(max-width:760px){.project-doc-kpis{grid-template-columns:1fr}}

/* R0.2.56 - Quotation status action buttons */
.quote-status-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;min-width:260px}
.quote-status-btn{border:1px solid #d7dee8;background:#eef2f7;color:#263445;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:900;cursor:pointer;white-space:nowrap;line-height:1}
.quote-status-btn:hover{filter:brightness(.97);transform:translateY(-1px)}
.quote-status-btn.won{background:#dcfce7;border-color:#bbf7d0;color:#166534}
.quote-status-btn.waiting{background:#ffedd5;border-color:#fed7aa;color:#9a3412}
.quote-status-btn.lost{background:#fee2e2;border-color:#fecaca;color:#991b1b}
.quote-status-btn.active{box-shadow:0 0 0 2px rgba(15,76,129,.16), inset 0 0 0 1px rgba(15,76,129,.18);outline:2px solid rgba(15,76,129,.22)}


/* R0.2.63 Quotation professional product tabs */
.quote-product-tabs{margin-bottom:12px;gap:8px;align-items:center}
.quote-product-tabs button{font-size:14px;padding:11px 14px}
.quote-guide{margin-top:14px;border-left:4px solid #0b5cab}
.result-box .kv span:last-child{font-weight:800}
.quote-status-actions{display:flex;gap:6px;flex-wrap:wrap}
.quote-status-btn{border:0;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:800;cursor:pointer;background:#e5e7eb;color:#111827}
.quote-status-btn.active{outline:2px solid rgba(11,92,171,.25)}
.quote-status-btn.won{background:#dcfce7;color:#166534}
.quote-status-btn.pending{background:#fef3c7;color:#92400e}
.quote-status-btn.lost{background:#fee2e2;color:#991b1b}


/* R0.2.64 - Quotation status visual panel */
.quote-status-wrap{min-width:210px;display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.quote-status-current{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;padding:8px 14px;font-size:13px;font-weight:900;line-height:1;border:1px solid transparent;box-shadow:0 1px 0 rgba(15,23,42,.04)}
.quote-status-current.won{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.quote-status-current.waiting{background:#e0f2fe;color:#075985;border-color:#bae6fd}
.quote-status-current.lost{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.quote-status-date{font-size:12px;color:#526176;font-weight:600;line-height:1.15}
.quote-status-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;min-width:0}
.quote-status-btn{border:0;border-radius:999px;padding:7px 10px;font-size:12px;font-weight:900;cursor:pointer;white-space:nowrap;line-height:1;background:#e5e7eb;color:#111827}
.quote-status-btn:hover{filter:brightness(.97);transform:translateY(-1px)}
.quote-status-btn.won{background:#16a34a;color:#fff}
.quote-status-btn.waiting{background:#e5e7eb;color:#111827}
.quote-status-btn.lost{background:#dc2626;color:#fff}
.quote-status-btn.active{outline:2px solid rgba(11,92,171,.28);box-shadow:0 0 0 2px rgba(255,255,255,.75)}


/* R0.2.67 - Executive dashboard & quotation workflow */
.exec-hero{display:flex;justify-content:space-between;align-items:center;gap:16px;background:linear-gradient(135deg,#eff6ff,#ffffff)}
.exec-hero h2{margin:0 0 6px;color:#0b4f8f}.exec-hero p{margin:0;color:#64748b}.hero-actions{display:flex;gap:8px;flex-wrap:wrap}.exec-kpi .kpi-card small{display:block;margin-top:6px;color:#64748b;font-size:12px}.dashboard-main-grid table td{vertical-align:top}.flow-strip{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.flow-strip>div{background:#f8fafc;border:1px solid #dbeafe;border-radius:14px;padding:12px}.flow-strip b{display:block;color:#0b4f8f;margin-bottom:5px}.flow-strip span{color:#64748b;font-size:12px}.quotation-command-bar{justify-content:flex-start;margin-bottom:12px}.editable-quote-table{min-width:1180px}.editable-quote-table input,.editable-quote-table textarea{font-size:12px;padding:6px 7px}.editable-quote-table textarea{min-height:46px}.quote-edit-form .toolbar{gap:8px;flex-wrap:wrap}.danger{background:#fee2e2!important;color:#991b1b!important;border:1px solid #fecaca!important}
@media(max-width:1000px){.exec-hero{display:block}.flow-strip{grid-template-columns:1fr}.dashboard-main-grid{grid-template-columns:1fr!important}}

/* R0.2.68 - Project documents & certification workflow */
.doc-workflow{background:linear-gradient(180deg,#ffffff,#f8fbff)}
.doc-flow-strip{grid-template-columns:repeat(4,minmax(0,1fr));}
.doc-action-grid{display:grid;grid-template-columns:1fr;gap:6px;min-width:150px}
.doc-action-grid button{width:100%;text-align:left;justify-content:flex-start}
.doc-action-btn{border:1px solid transparent;font-weight:800;transition:all .18s ease;box-shadow:inset 0 0 0 1px rgba(255,255,255,.12)}
.doc-action-btn:hover{transform:translateY(-1px);filter:brightness(.98)}
.doc-action-btn.doc-action-contract{background:#e0f2fe;color:#075985;border-color:#bae6fd}
.doc-action-btn.doc-action-advance{background:#ffedd5;color:#9a3412;border-color:#fed7aa}
.doc-action-btn.doc-action-payment{background:#ede9fe;color:#5b21b6;border-color:#ddd6fe}
.doc-action-btn.doc-action-acceptance{background:#dcfce7;color:#166534;border-color:#bbf7d0}
.doc-action-btn.doc-action-test{background:#fce7f3;color:#9d174d;border-color:#fbcfe8}
.doc-action-btn.doc-action-work{background:#fef3c7;color:#92400e;border-color:#fde68a}
.doc-action-btn.doc-action-delivery{background:#dbeafe;color:#1d4ed8;border-color:#bfdbfe}
.doc-pill{display:inline-flex;align-items:center;margin:2px 3px 2px 0;padding:4px 8px;border-radius:999px;font-size:11px;font-weight:900;border:1px solid transparent;white-space:nowrap}
.doc-pill.ok{background:#dcfce7;color:#166534;border-color:#bbf7d0}.doc-pill.wait{background:#f1f5f9;color:#64748b;border-color:#e5e7eb}
.mini-check.bad{background:#fee2e2;color:#991b1b}
.project-doc-kpis .kpi-card b{color:#0b4f8f}.project-doc-kpis .kpi-card span{line-height:1.35}
@media(max-width:1000px){.doc-flow-strip{grid-template-columns:1fr}.doc-action-grid{grid-template-columns:1fr 1fr}}
@media(max-width:640px){.doc-action-grid{grid-template-columns:1fr}}


/* R0.2.71 - Multi line quotation builder */
.quote-draft-panel{
  margin-top:14px;
  border:1px solid #dbeafe;
  background:#f8fbff;
  border-radius:16px;
  padding:12px;
}
.quote-draft-table th,.quote-draft-table td{
  font-size:12px;
  vertical-align:top;
}
.quote-draft-summary{
  margin-top:10px;
  padding:10px 12px;
  border-radius:12px;
  background:#ffffff;
  border:1px dashed #bfdbfe;
}
.btn.green,button.green{background:#059669!important;color:white!important;}


/* R0.2.72 - Quotation configuration page aligned with Bluepower Quotation V11.3 */
.quotation-config-layout{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}.quotation-config-card.wide{grid-column:1/-1}.quotation-config-note{margin-bottom:14px}.quotation-config-card .form-row.five{grid-template-columns:repeat(5,minmax(0,1fr));}.quotation-config-card textarea{min-height:68px}.quotation-intro-textarea{min-height:115px!important;font-family:Consolas,Arial,sans-serif;line-height:1.45}.quotation-terms-textarea{min-height:300px!important;font-family:Consolas,Arial,sans-serif;line-height:1.45}.quotation-config-actions{position:sticky;bottom:0;background:#fff;border-top:1px solid #e5e7eb;padding:12px 0 0;margin-top:12px}.quotation-cert-preview{min-height:96px;border:1px dashed #bfdbfe;border-radius:14px;background:#f8fafc;display:flex;align-items:center;justify-content:center;margin-bottom:12px}.quotation-cert-preview img{max-width:360px;max-height:76px;object-fit:contain}.quotation-advanced-terms{margin-top:10px;border:1px solid #e5e7eb;border-radius:14px;padding:10px 12px;background:#f8fafc}.quotation-advanced-terms summary{font-weight:800;color:#0f4c81;cursor:pointer}
@media(max-width:1300px){.quotation-config-card .form-row.five{grid-template-columns:repeat(3,minmax(0,1fr));}}
@media(max-width:900px){.quotation-config-layout,.quotation-config-card .form-row.five{grid-template-columns:1fr}.quotation-config-card.wide{grid-column:auto}.quotation-config-actions{position:static}}


/* R0.2.74 - default quotation costing parameters updated */

/* R0.2.78 - customer code autofill note in quotation forms */
.quotation-customer-autofill-note{
  margin:8px 0 10px;
  padding:9px 12px;
  font-size:12px;
}

/* R0.2.85 - Quotation revision/version control */
.quote-latest-badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-top:4px;
  padding:3px 8px;
  border-radius:999px;
  background:#dcfce7;
  color:#166534;
  border:1px solid #bbf7d0;
  font-size:11px;
  font-weight:900;
}
/* R0.2.88 - dashboard quotation period statistics */
.subsection-title{font-size:14px;font-weight:900;color:#0b4f8f;margin:0 0 10px}


/* R0.2.96 - quotation form button spacing */
.btns{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:20px;margin-bottom:12px;padding-top:4px;}
.card .form-row + .btns,.card .field + .btns{margin-top:22px;}
#trayq_result,#ladq_result,#cabq_result{margin-top:14px!important;}
@media(max-width:900px){.btns{margin-top:16px;gap:8px;}.btns button{width:auto;}}

/* R0.2.97 - cable tray / ladder default cover and galvanized steel label */

/* R0.2.103 - Cable tray / ladder accessory pricing */
.quote-accessory-section{margin-top:22px;border-top:1px solid #e5e7eb;padding-top:16px;}
.accessory-box{border:1px dashed #9cc8e5;background:#f8fcff;border-radius:16px;padding:14px;margin-top:10px;margin-bottom:12px;}
.accessory-type-combo{display:grid;grid-template-columns:1fr;gap:6px;}
.accessory-btns{margin-top:14px;}

/* R0.2.109 - Quotation signature & stamp library */
.signature-library-card .mini-note{margin-bottom:12px}.signature-upload-row{align-items:end}.signature-library-table{margin-top:10px}.signature-asset-thumb{max-width:92px;max-height:58px;object-fit:contain;background:#fff;border:1px solid #dbe7f5;border-radius:10px;padding:4px}.signature-summary-item{display:inline-flex;align-items:center;gap:6px;margin:4px 10px 4px 0}.signature-summary-img{max-width:72px;max-height:42px;object-fit:contain;background:#fff;border:1px solid #dbe7f5;border-radius:8px;padding:3px}.quotation-signature-summary{margin-top:10px}.quote-signature-modal .checkline{display:flex;align-items:center;gap:8px;margin:12px 0;font-weight:800}.signature-pick-preview{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:10px;margin:12px 0}.signature-pick-card{border:1px solid #e5e7eb;border-radius:14px;background:#f8fafc;padding:10px;display:flex;flex-direction:column;gap:6px;align-items:center;text-align:center}.signature-pick-card b{font-size:12px}.signature-pick-card span{font-size:11px;color:#667085}

/* R0.2.110 - Signature quick upload, validation and live preview */
.quick-signature-upload{margin-top:12px;padding:12px;border:1px solid #dbe7f5;border-radius:16px;background:#f8fbff}.quick-signature-upload h4{margin:0 0 8px 0}.quote-signature-preview-box{margin:12px 0;padding:14px;border:1px dashed #9bb7d8;border-radius:16px;background:#fff;max-width:520px;text-align:center}.quote-signature-preview-box .preview-title{font-weight:900;color:#0b4b83}.quote-signature-preview-box .preview-subtitle{font-style:italic;color:#667085;font-size:12px;margin-top:2px}.preview-image-row{display:flex;justify-content:center;gap:18px;align-items:center;min-height:88px;margin:8px 0}.signature-preview-signature{max-width:190px;max-height:82px;object-fit:contain;background:#fff}.signature-preview-stamp{max-width:110px;max-height:88px;object-fit:contain;background:#fff}.signature-empty-slot{display:inline-flex;align-items:center;justify-content:center;width:130px;height:56px;border:1px dashed #cbd5e1;border-radius:12px;color:#94a3b8;font-size:12px;background:#f8fafc}.preview-role{min-height:18px;font-size:12px;color:#475467}.preview-name{font-weight:900;color:#111827}.preview-note{margin-top:8px;color:#b45309;font-size:12px;font-weight:700}.quote-signature-modal .error{background:#fff1f2;border:1px solid #fecdd3;color:#be123c;border-radius:12px;padding:8px}.quotation-signature-summary + .quote-signature-preview-box{margin-top:8px}
/* R0.2.143 - Customer tax lookup */
.badge{display:inline-block;border-radius:999px;padding:3px 8px;font-size:11px;font-weight:800;background:#e0f2fe;color:#075985;}
.badge.ok{background:#dcfce7;color:#166534;}.badge.danger{background:#fee2e2;color:#991b1b;}.badge.warn{background:#ffedd5;color:#9a3412;}
.alert{border-radius:12px;padding:10px 12px;margin:8px 0;border:1px solid #e5e7eb;background:#f8fafc;}.alert.warn{background:#fff7ed;border-color:#fed7aa;color:#9a3412;}.alert.danger{background:#fef2f2;border-color:#fecaca;color:#991b1b;}
.kv-table td{border-bottom:1px solid #e5e7eb;padding:8px 10px;}.mini-note{font-size:12px;color:#64748b;margin-top:5px;}

/* R0.2.147 - Customer Form Optimization */
.customer-layout{grid-template-columns:minmax(560px,.9fr) minmax(640px,1.1fr);align-items:start;}
.customer-form-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:10px;}
.customer-tabbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:6px;}
.customer-tab-panel{border:1px solid #e5e7eb;border-radius:16px;padding:12px 14px;background:#fff;margin:10px 0 12px;}
.customer-tab-panel .form-section-title{margin-top:0;}
.customer-savebar{position:sticky;bottom:0;background:linear-gradient(180deg,rgba(255,255,255,.85),#fff);padding-top:10px;border-top:1px solid #eef2f7;z-index:3;}
.customer-list-card .customer-table-compact{overflow:auto;max-height:640px;}
.customer-table-compact table{table-layout:fixed;min-width:0;}
.customer-table-compact th:nth-child(1){width:120px;}
.customer-table-compact th:nth-child(2){width:25%;}
.customer-table-compact th:nth-child(3){width:19%;}
.customer-table-compact th:nth-child(4){width:18%;}
.customer-table-compact th:nth-child(5){width:28%;}
.customer-table-compact th:nth-child(6){width:74px;}
.customer-table-compact td{white-space:normal;word-break:break-word;}
#customer_required_warn .okmsg,#customer_required_warn .alert{margin:8px 0 10px;}
@media(max-width:1350px){.customer-layout{grid-template-columns:1fr}.customer-table-compact table{min-width:760px;}}


/* R0.2.148 - Project Center Optimization */
.project-center-kpi{grid-template-columns:repeat(6,minmax(0,1fr));margin-bottom:14px}
.project-center-kpi .kpi-card{min-height:96px}
.project-center-kpi .danger-kpi b{color:#b91c1c}
.project-warning-card{margin-bottom:14px;background:linear-gradient(180deg,#fff,#f8fafc)}
.project-warning-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.project-warning-item{border:1px solid #fed7aa;background:#fff7ed;border-radius:14px;padding:10px 12px}
.project-warning-item b{display:block;color:#7c2d12}.project-warning-item span{font-size:12px;color:#64748b}.project-warning-item p{font-size:12px;color:#9a3412;margin:6px 0 8px;line-height:1.35}
.project-checklist{display:flex;flex-wrap:wrap;gap:5px;max-width:320px}
.project-checklist span{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:3px 7px;font-size:11px;font-weight:900;border:1px solid #e5e7eb;background:#f8fafc;color:#64748b;white-space:nowrap}
.project-checklist span.ok{background:#dcfce7;border-color:#bbf7d0;color:#166534}
.project-checklist span.miss{background:#f1f5f9;border-color:#e2e8f0;color:#64748b}
.badge.ok{background:#dcfce7;color:#166534;border-color:#bbf7d0}.badge.warn{background:#fff7ed;color:#9a3412;border-color:#fed7aa}.badge.danger{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.project-alert-list{display:flex;flex-direction:column;gap:4px}
.project-alert-list span{display:inline-block;border-radius:9px;background:#fee2e2;color:#991b1b;border:1px solid #fecaca;padding:3px 7px;font-size:11px;font-weight:900;line-height:1.25}
.project-center-table{max-height:680px}
.project-center-table table{min-width:1180px}
.project-center-table th,.project-center-table td{font-size:12px;line-height:1.35;vertical-align:top}
.project-row-overdue{background:#fff7f7}
.project-row-completed{background:#ecfdf5!important;color:#065f46}
.project-op-status{display:block;margin-top:4px;color:#0f4c81}
.project-detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media(max-width:1450px){.project-center-kpi{grid-template-columns:repeat(3,minmax(0,1fr))}.project-warning-grid{grid-template-columns:1fr 1fr}.project-detail-grid{grid-template-columns:1fr}}
@media(max-width:900px){.project-center-kpi,.project-warning-grid{grid-template-columns:1fr}.project-center-table table{min-width:980px}}
/* R0.2.150 - Quotation Optimization */
.quote-mode-panel{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-bottom:12px;border-left:4px solid #0b5cab;background:#f8fbff}
.quote-mode-panel .section-title{margin:0 0 4px}.quote-mode-panel p{margin:0}.quote-mode-actions{display:flex;gap:8px;flex-wrap:wrap;white-space:nowrap}.quote-mode-actions button{font-weight:900}
.quote-ops-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:12px 0}.quote-ops-card{padding:14px}.quote-ops-card b{display:block;font-size:22px;color:#0b4f8f}.quote-ops-card span{display:block;color:#475467;font-weight:800;margin-top:3px}.quote-ops-card small{display:block;margin-top:4px;color:#64748b}.quote-ops-card.waiting b{color:#b45309}.quote-ops-card.won b{color:#166534}.quote-ops-card.lost b{color:#991b1b}
.quote-filter-bar{display:grid;grid-template-columns:2fr 1fr 1.2fr auto;gap:8px;margin:10px 0 12px;align-items:center}.quote-filter-bar input,.quote-filter-bar select{margin:0}
.quote-sales-section{border:1px solid #dbeafe;background:#f8fbff;border-radius:16px;padding:14px;margin-bottom:12px}.quotation-form-warning-slot{margin-top:10px}.alert.ok{background:#ecfdf3;border:1px solid #bbf7d0;color:#166534;border-radius:12px;padding:9px 10px}.alert.warn{background:#fffbeb;border:1px solid #fde68a;color:#92400e;border-radius:12px;padding:9px 10px}
.quote-costing-details{border:1px solid #e5e7eb;border-radius:16px;background:#fff;margin:12px 0;padding:0;overflow:hidden}.quote-costing-details summary{cursor:pointer;display:flex;justify-content:space-between;gap:10px;align-items:center;padding:12px 14px;background:#f8fafc;color:#0f172a}.quote-costing-details summary b{color:#0b4f8f}.quote-costing-details summary span{color:#64748b;font-size:12px;text-align:right}.quote-costing-details[open]{box-shadow:0 8px 20px rgba(15,23,42,.06)}.quote-costing-details[open] summary{border-bottom:1px solid #e5e7eb}.quote-costing-details>div{padding:14px}
@media(max-width:1100px){.quote-ops-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.quote-filter-bar{grid-template-columns:1fr}.quote-mode-panel{align-items:flex-start;flex-direction:column}}


/* R0.2.153 - Executive Dashboard */
.executive-dashboard .exec-hero{display:flex;justify-content:space-between;gap:18px;align-items:center;background:linear-gradient(135deg,#0f4c81,#1167b1);color:white;border:0;}
.executive-dashboard .exec-hero h2{margin:0 0 6px;font-size:26px;color:white}.executive-dashboard .exec-hero p{margin:0;color:#dbeafe}.executive-dashboard .hero-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.executive-dashboard .exec-hero button.secondary{background:rgba(255,255,255,.18);color:white;border:1px solid rgba(255,255,255,.25)}
.exec-health{display:grid;grid-template-columns:110px 1fr auto;gap:16px;align-items:center;margin-top:16px;border-left:8px solid #059669}.exec-health.warn{border-left-color:#d97706}.exec-health.danger{border-left-color:#dc2626}.exec-score{width:92px;height:92px;border-radius:50%;display:grid;place-items:center;background:#ecfdf5;border:8px solid #bbf7d0;color:#065f46}.exec-health.warn .exec-score{background:#fff7ed;border-color:#fed7aa;color:#9a3412}.exec-health.danger .exec-score{background:#fef2f2;border-color:#fecaca;color:#991b1b}.exec-score b{font-size:30px;line-height:1}.exec-score span{font-size:12px;margin-top:-18px}.exec-health h3{margin:0 0 6px}.exec-health p{margin:0;color:#64748b}.exec-health-actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.executive-kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:16px}.danger-kpi b{color:#dc2626!important}.warn-kpi b{color:#d97706!important}.executive-main-grid{align-items:start}.exec-action-list{display:grid;gap:8px}.exec-action{border:1px solid #e5e7eb;border-left:5px solid #94a3b8;border-radius:12px;padding:10px;background:#fff;display:grid;grid-template-columns:90px 1fr auto;gap:8px;align-items:center}.exec-action.danger{border-left-color:#dc2626;background:#fff7f7}.exec-action.warn{border-left-color:#d97706;background:#fffaf0}.exec-action.wait{border-left-color:#0ea5e9;background:#f0f9ff}.exec-action span{font-size:11px;font-weight:800;color:#64748b;text-transform:uppercase}.exec-action b{font-size:13px}.exec-action p{grid-column:2/3;margin:0;color:#64748b;font-size:12px}.exec-mini-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:12px}.exec-mini-kpis>div{background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:10px}.exec-mini-kpis b{display:block;color:#0f4c81;font-size:18px}.exec-mini-kpis span{color:#64748b;font-size:11px;font-weight:700}.mini-scroll{max-height:260px}.exec-doc-bars{display:grid;gap:10px;margin-bottom:14px}.exec-doc-bars>div{position:relative;background:#f1f5f9;border-radius:999px;overflow:hidden;min-height:30px;padding:7px 48px 7px 12px}.exec-doc-bars span{position:relative;z-index:1;font-weight:700;font-size:12px}.exec-doc-bars b{position:absolute;right:12px;top:7px;z-index:1;color:#0f4c81}.exec-doc-bars em{position:absolute;left:0;top:0;bottom:0;background:#dbeafe;display:block;min-width:4px}.exec-action-card .badge{margin-left:auto}
@media(max-width:1200px){.executive-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.exec-health{grid-template-columns:1fr}.exec-health-actions{justify-content:flex-start}.exec-action{grid-template-columns:1fr}.exec-action p{grid-column:auto}.executive-dashboard .exec-hero{display:block}.executive-dashboard .hero-actions{justify-content:flex-start;margin-top:12px}}
@media(max-width:760px){.executive-kpi-grid,.exec-mini-kpis{grid-template-columns:1fr}.exec-score{width:78px;height:78px}}


/* R0.2.163 - Default YES for Test Report checklists */
.project-doc-test-layout-card{background:linear-gradient(180deg,#ffffff,#f8fbff)!important;padding:14px!important;}
.tr-form-head{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;border-bottom:1px solid #dbeafe;padding-bottom:10px;margin-bottom:12px;}
.tr-form-head p{margin:4px 0 0;color:#64748b;font-size:12px;line-height:1.45;max-width:860px;}
.tr-form-badge{white-space:nowrap;background:#e0f2fe;color:#075985;border:1px solid #bae6fd;border-radius:999px;padding:6px 10px;font-size:11px;font-weight:900;}
.tr-form-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(360px,.95fr);gap:12px;align-items:start;}
.tr-panel{background:#fff;border:1px solid #dbeafe;border-radius:14px;padding:12px;box-shadow:0 6px 16px rgba(15,76,129,.05);}
.tr-panel h5,.tr-fat-block h5{margin:0 0 9px;color:#0b4f8f;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.02em;}
.tr-tight-row{gap:8px!important;margin-bottom:8px;}
.tr-tight-row label,.tr-cert-grid label,.tr-fat-textarea-grid label{font-size:10.5px;color:#334155;font-weight:850;}
.tr-tight-row input,.tr-cert-grid input,.tr-fat-textarea-grid textarea{min-height:33px;padding:7px 9px;font-size:12px;border-color:#cbd5e1;background:#fff;}
.tr-cert-grid{display:grid;grid-template-columns:1fr;gap:8px;}
.tr-helper-line{margin-top:4px;background:#eff6ff;border:1px dashed #bfdbfe;color:#475569;border-radius:10px;padding:7px 9px;font-size:11.5px;}
.tr-fat-details{margin-top:12px!important;background:#fff!important;}
.tr-fat-content{padding:12px!important;display:grid;gap:12px;}
.tr-fat-block{border:1px solid #e5e7eb;border-radius:13px;padding:11px;background:#fff;}
.tr-fat-textarea-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;}
.tr-fat-textarea-grid textarea{min-height:126px!important;font-family:Consolas,Arial,sans-serif;line-height:1.38;resize:vertical;}
@media(max-width:1280px){.tr-form-layout{grid-template-columns:1fr}.tr-form-badge{white-space:normal;text-align:right}.tr-fat-textarea-grid{grid-template-columns:1fr}}
@media(max-width:760px){.tr-form-head{display:block}.tr-form-badge{display:inline-block;margin-top:8px}.tr-fat-content{padding:10px!important}}


.tr-fat-checklist-wrap{display:grid;grid-template-columns:1fr;gap:10px;}
.tr-fat-check-section{border:1px solid #dbeafe;border-radius:12px;overflow:hidden;background:#fff;}
.tr-fat-check-title{padding:8px 10px;background:#0ea5c6;color:#fff;font-size:11.5px;font-weight:900;letter-spacing:.02em;}
.tr-fat-check-table{width:100%;table-layout:fixed;}
.tr-fat-check-table thead th{background:#ecfeff;font-size:11px;font-weight:900;text-align:center;vertical-align:middle;}
.tr-fat-check-table th:first-child,.tr-fat-check-table td:first-child{width:auto;}
.tr-fat-check-table th:nth-child(2),.tr-fat-check-table th:nth-child(3),.tr-fat-check-table th:nth-child(4),
.tr-fat-check-table td:nth-child(2),.tr-fat-check-table td:nth-child(3),.tr-fat-check-table td:nth-child(4){width:108px;min-width:108px;max-width:108px;}
.tr-fat-check-table td:first-child{font-size:12px;}
.tr-fat-check-table td,.tr-fat-check-table th{padding:6px 8px;border-color:#bae6fd!important;}
.tr-fat-check-table .fat-check-cell{text-align:center;vertical-align:middle;padding-left:0!important;padding-right:0!important;}
.tr-fat-check-table .fat-check-cell input{display:block;width:15px;height:15px;cursor:pointer;accent-color:#0284c7;margin:0 auto;}

/* R0.2.164 - Master checkbox for Test Report checklists */
.tr-fat-check-table thead .master-check{display:block;width:16px;height:16px;margin:4px auto 0;cursor:pointer;accent-color:#0284c7;}

/* R0.2.169 - Trunking test report auto specs & layout cleanup */
/* R0.2.168 - BOM / Inventory horizontal dashboard layout */
.bom-command-panel{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  background:linear-gradient(135deg,#0b4f8f,#0ea5c6);
  color:#fff;
  border-radius:18px;
  padding:14px 16px;
  margin-bottom:14px;
  box-shadow:0 12px 28px rgba(14,78,140,.16);
}
.bom-command-title{font-size:18px;font-weight:900;letter-spacing:.01em;margin-bottom:2px}
.bom-command-sub{font-size:12px;color:#dff6ff;line-height:1.35}
.bom-command-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}
.bom-command-actions button{box-shadow:0 5px 16px rgba(0,0,0,.10)}
.bom-command-actions button.secondary{background:rgba(255,255,255,.92);color:#0b4f8f}
.bom-kpi-row{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:12px;
  align-items:stretch;
}
.bom-kpi-card{
  min-height:112px;
  padding:14px 14px 12px;
  border-radius:18px;
  position:relative;
  overflow:hidden;
  border:1px solid #dbeafe;
  box-shadow:0 8px 22px rgba(15,76,129,.07);
}
.bom-kpi-card:before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:5px;
  background:#0b4f8f;
}
.bom-kpi-card.ok:before{background:#059669}
.bom-kpi-card.warn:before{background:#d97706}
.bom-kpi-card.danger:before{background:#dc2626}
.bom-kpi-card b{font-size:25px;line-height:1;color:#0b4f8f;display:block;margin-bottom:8px}
.bom-kpi-card.ok b{color:#059669}.bom-kpi-card.warn b{color:#d97706}.bom-kpi-card.danger b{color:#dc2626}
.bom-kpi-card span{font-size:12.5px;font-weight:900;color:#0f172a;margin:0;line-height:1.25}
.bom-kpi-card small{display:block;margin-top:5px;font-size:11px;color:#64748b;line-height:1.3}
.bom-workspace-card{padding:16px 16px 14px}
.bom-filter-bar{
  display:grid;
  grid-template-columns:minmax(250px,1fr) minmax(240px,1.05fr) minmax(170px,.75fr) minmax(240px,1.1fr);
  gap:10px;
  align-items:center;
}
.bom-filter-bar .section-title{margin:0;color:#0b4f8f;white-space:nowrap}
.bom-filter-bar select,.bom-filter-bar input{min-height:38px;background:#fff}
@media(max-width:1500px){.bom-kpi-row{grid-template-columns:repeat(3,minmax(0,1fr))}.bom-filter-bar{grid-template-columns:1fr 1fr}.bom-filter-bar .section-title{grid-column:1/-1}}
@media(max-width:900px){.bom-command-panel{align-items:flex-start;flex-direction:column}.bom-command-actions{justify-content:flex-start}.bom-kpi-row{grid-template-columns:1fr}.bom-filter-bar{grid-template-columns:1fr}}


/* R0.2.175 - Merge Project into Quotation Workflow */

.quote-project-merge-card{border:1px solid #cfe8ff;background:linear-gradient(180deg,#ffffff,#f8fbff);box-shadow:0 10px 28px rgba(15,76,129,.08);}
.quote-project-merge-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px;}
.quote-project-merge-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;}
.quote-project-merge-grid>div{background:#eef7ff;border:1px solid #d7ebff;border-radius:14px;padding:12px 14px;min-height:78px;}
.quote-project-merge-grid>div.warn{background:#fff7ed;border-color:#fed7aa;}
.quote-project-merge-grid b{display:block;font-size:24px;color:#0b4f8f;line-height:1;margin-bottom:7px;}
.quote-project-merge-grid .warn b{color:#d97706;}
.quote-project-merge-grid span{font-size:12px;font-weight:900;color:#334155;}
.quote-project-alert{margin-top:10px;background:#fff7ed;border:1px solid #fed7aa;border-radius:12px;padding:9px 10px;color:#9a3412;}
.quote-project-ok{margin-top:10px;background:#ecfdf5;border:1px solid #bbf7d0;border-radius:12px;padding:9px 10px;color:#065f46;}
.quote-project-inline-row input,.quote-project-inline-row select{min-height:38px;}
@media(max-width:1100px){.quote-project-merge-grid{grid-template-columns:repeat(2,minmax(0,1fr));}.quote-project-merge-head{flex-direction:column}.quote-project-inline-row{grid-template-columns:1fr!important}}


/* R0.2.176 - UI Simplification & Caption Cleanup */
.layout.ui-clean .topbar{align-items:center;margin-bottom:12px}
.topbar-title-row{display:flex;align-items:center;gap:8px;min-width:0}
.topbar-title-row h2{margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar-right{display:flex;align-items:center;gap:10px;white-space:nowrap}
.ui-info-dot{display:inline-grid;place-items:center;width:18px;height:18px;border-radius:999px;background:#e0f2fe;color:#075985;font-size:11px;font-weight:900;cursor:help;flex:0 0 auto}
.ui-mode-btn{min-height:28px;padding:4px 8px;font-size:11px;border-radius:8px}
.layout.ui-clean .topbar p{display:none!important}
.layout.ui-clean .quote-guide,
.layout.ui-clean .doc-workflow,
.layout.ui-clean .mixed-quote-note,
.layout.ui-clean .bom-command-sub,
.layout.ui-clean .company-logo-box p.muted,
.layout.ui-clean .permission-matrix-caption,
.layout.ui-clean .ui-helper-note,
.layout.ui-clean .ui-detail-only{display:none!important}
.layout.ui-clean .quote-mode-panel{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px}
.layout.ui-clean .quote-mode-panel .section-title{margin:0;font-size:14px}
.layout.ui-clean .quote-mode-actions{display:flex;gap:6px;flex-wrap:wrap}
.layout.ui-clean .quote-ops-grid{margin-bottom:10px}
.layout.ui-clean .quote-project-merge-card{padding:12px 14px}
.layout.ui-clean .quote-project-merge-head{margin-bottom:8px}
.layout.ui-clean .quote-project-merge-head p{display:none!important}
.layout.ui-clean .quote-project-merge-grid{gap:8px}
.layout.ui-clean .bom-command-panel{padding:12px 14px;align-items:center}
.layout.ui-clean .bom-command-title{font-size:15px;margin:0}
.layout.ui-clean .bom-kpi-card{padding:10px 12px;min-height:auto}
.layout.ui-clean .bom-kpi-card span{margin-top:2px}
.layout.ui-clean .project-flow-head p,
.layout.ui-clean .card .toolbar p.muted{display:none!important}
.layout.ui-clean .section-title{letter-spacing:.1px}
.layout.ui-clean .mini-note{font-size:12px;line-height:1.35}
.layout.ui-clean .nav-children .nav-child{padding-left:22px}
.layout.ui-clean .ui-demo-note{display:none}
.layout.ui-clean .project-doc-kpis{grid-template-columns:repeat(5,minmax(0,1fr))}
.layout.ui-clean .doc-action-grid button{font-size:11px;padding:5px 7px;min-height:28px}
.layout.ui-clean .customer-table-compact th,
.layout.ui-clean .customer-table-compact td{padding:6px 8px}
@media(max-width:1300px){.layout.ui-clean .project-doc-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* R0.2.179 - PDF Template System Cleanup: PDF style is standardized in backend template helpers. */


/* R0.2.182 - Production Ready UI */
/* R0.2.181 - Advanced list filters */
.list-filter-panel{display:grid;grid-template-columns:1.5fr 1fr 1fr 1fr auto;gap:8px;align-items:center;margin:10px 0 12px;padding:10px;background:#f8fbff;border:1px solid #dbeafe;border-radius:14px;}
.list-filter-panel .filter-head{display:flex;align-items:center;gap:8px;color:#0b4f8f;white-space:nowrap;}
.list-filter-panel input,.list-filter-panel select{min-height:36px;margin:0;background:#fff;font-size:12.5px;}
.quote-list-filter{grid-template-columns:auto minmax(260px,1.7fr) minmax(180px,1.05fr) minmax(200px,1.2fr) minmax(150px,1fr) minmax(160px,.9fr) auto;gap:10px;align-items:center;}
.quote-list-filter .filter-head{min-width:140px;margin-right:4px;}
.quote-list-filter #quote_filter_q{width:100%;}
.quote-list-filter #quote_filter_latest{min-width:160px;}
.quote-list-filter button{min-width:110px;white-space:nowrap;}
.project-doc-filter{grid-template-columns:auto minmax(280px,1.5fr) minmax(170px,1fr) minmax(170px,.95fr) minmax(130px,.8fr) auto;gap:10px;align-items:center;}
.project-doc-filter .filter-head{min-width:150px;margin-right:4px;}
.project-doc-filter #project_doc_filter_q{width:100%;}
.project-doc-filter button{min-width:88px;min-height:34px;padding:7px 12px;white-space:nowrap;justify-self:start;}
.drawing-list-filter{grid-template-columns:auto minmax(290px,1.55fr) minmax(170px,1fr) minmax(170px,.95fr) minmax(130px,.8fr) auto;gap:10px;align-items:center;}
.drawing-list-filter .filter-head{min-width:150px;margin-right:4px;}
.drawing-list-filter #drawing_filter_q{width:100%;}
.drawing-list-filter button{min-width:88px;min-height:34px;padding:7px 12px;white-space:nowrap;justify-self:start;}
.project-doc-created-filter{grid-template-columns:auto minmax(240px,1.45fr) minmax(160px,.95fr) minmax(160px,.9fr) minmax(120px,.75fr) auto;gap:10px;align-items:center;}
.project-doc-created-filter .filter-head{min-width:150px;margin-right:4px;}
.project-doc-created-filter #project_doc_created_filter_q{width:100%;}
.project-doc-created-filter button{min-width:88px;min-height:34px;padding:7px 12px;white-space:nowrap;justify-self:start;}
@media(max-width:1320px){.project-doc-created-filter{grid-template-columns:1fr 1fr 1fr;}.project-doc-created-filter .filter-head{grid-column:1/-1}.project-doc-created-filter button{width:100%;}}
@media(max-width:980px){.project-doc-created-filter{grid-template-columns:1fr 1fr;}}
@media(max-width:700px){.project-doc-created-filter{grid-template-columns:1fr;}}
@media(max-width:1500px){.drawing-list-filter{grid-template-columns:1fr 1fr 1fr;}.drawing-list-filter .filter-head{grid-column:1/-1}.drawing-list-filter button{width:100%;}}
@media(max-width:980px){.drawing-list-filter{grid-template-columns:1fr 1fr;}}
@media(max-width:700px){.drawing-list-filter{grid-template-columns:1fr;}}
@media(max-width:1500px){.project-doc-filter{grid-template-columns:1fr 1fr 1fr;}.project-doc-filter .filter-head{grid-column:1/-1}.project-doc-filter button{width:100%;}}
@media(max-width:980px){.project-doc-filter{grid-template-columns:1fr 1fr;}}
@media(max-width:700px){.project-doc-filter{grid-template-columns:1fr;}}
@media(max-width:1500px){.quote-list-filter{grid-template-columns:1fr 1fr 1fr;}.quote-list-filter .filter-head{grid-column:1/-1}.quote-list-filter button{width:100%;}}
@media(max-width:980px){.quote-list-filter{grid-template-columns:1fr 1fr;}}
@media(max-width:700px){.quote-list-filter{grid-template-columns:1fr;}}
.filter-count-pill{display:inline-flex;align-items:center;border-radius:999px;background:#e0f2fe;color:#075985;font-size:11px;font-weight:900;padding:4px 8px;white-space:nowrap;}
.bom-filter-bar-advanced{grid-template-columns:auto minmax(220px,1fr) minmax(160px,.8fr) minmax(160px,.8fr) minmax(260px,1.4fr) auto!important;}
.bom-filter-bar .filter-actions{display:flex;align-items:center;gap:8px;justify-content:flex-end;white-space:nowrap;}
@media(max-width:1350px){.list-filter-panel{grid-template-columns:1fr 1fr}.list-filter-panel .filter-head{grid-column:1/-1}.bom-filter-bar-advanced{grid-template-columns:1fr 1fr!important}.bom-filter-bar .section-title{grid-column:1/-1}.bom-filter-bar .filter-actions{justify-content:flex-start}}
@media(max-width:800px){.list-filter-panel,.bom-filter-bar-advanced{grid-template-columns:1fr!important}.bom-filter-bar .filter-actions{flex-direction:column;align-items:flex-start}}

/* R0.2.182 - Production Ready UI overrides */
body{background:#f5f7fb;color:#172033;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;}
.layout{grid-template-columns:232px minmax(0,1fr);}
.sidebar{padding:18px 14px;background:linear-gradient(180deg,#08253f 0%,#0b2f50 100%);box-shadow:inset -1px 0 0 rgba(255,255,255,.06)}
.content{padding:18px 26px 24px;max-width:1920px;width:100%;}
.side-brand{min-height:66px;margin-bottom:18px;gap:10px}.side-icon-box{width:58px;height:58px;border-radius:16px}.side-icon-img{width:52px;height:52px}.side-logo{font-size:18px;line-height:1.05}.side-sub{font-size:11px;color:#9fc6e8}
.nav button{font-size:12.5px;padding:8px 10px;border-radius:10px}.nav-children .nav-child{font-size:12px;padding-top:7px;padding-bottom:7px}.userbox{border-radius:14px;padding:10px;background:rgba(21,61,99,.9)}
.topbar{min-height:38px;padding:0;margin-bottom:12px}.topbar h2{font-size:22px}.topbar-right .muted{font-size:12px}.ui-mode-btn{background:#e8eef6!important;color:#0b365f!important;border:1px solid #d7e2ee!important}
.card{border-radius:14px;padding:13px 15px;box-shadow:0 6px 18px rgba(15,76,129,.055);border-color:#e3e8f0}.section-title{font-size:16px}.subsection-title{font-size:14px;margin:10px 0 8px}
input,select,textarea{border-radius:8px;min-height:34px;padding:7px 9px;font-size:12.5px}label{font-size:10.5px;color:#334155;letter-spacing:.01em}button{border-radius:8px;padding:7px 11px;font-size:12.5px}button.small{font-size:11px;padding:5px 8px}.toolbar{gap:6px}
table{font-size:12px}th,td{padding:6px 8px}th{font-size:10.5px;text-transform:none}.pill,.badge{font-size:10.5px}.mini-note{font-size:11.5px;color:#64748b}.muted{font-size:12px}.grid{gap:12px}.form-row{gap:8px}.scroll{max-height:calc(100vh - 300px)}
.layout.ui-clean .mini-note:not(.always-show):not(.alert):not(.error):not(.okmsg),
.layout.ui-clean p.muted:not(.always-show),
.layout.ui-clean small.muted:not(.always-show){display:none!important}
.layout.ui-clean .card>p.muted:first-of-type{display:none!important}
.layout.ui-clean .project-step p,.layout.ui-clean .quote-mode-panel p,.layout.ui-clean .tr-helper-line{display:none!important}
.layout.ui-clean .tr-form-head{margin-bottom:6px}.layout.ui-clean .tr-fat-block{padding:9px}.layout.ui-clean .tr-fat-check-title{padding:6px 9px}.layout.ui-clean .tr-fat-check-table td,.layout.ui-clean .tr-fat-check-table th{padding:5px 7px}
@media(max-width:1280px){.layout{grid-template-columns:210px minmax(0,1fr)}.content{padding:16px 18px}.side-brand{gap:8px}.side-icon-box{width:52px;height:52px}.side-icon-img{width:46px;height:46px}.side-logo{font-size:16px}.nav button{font-size:12px;padding:7px 9px}.grid.kpi,.quote-ops-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:920px){.layout{display:block}.sidebar{position:relative;height:auto;display:flex;align-items:flex-start;gap:12px;overflow:auto;padding:10px 12px}.side-brand{min-width:170px;margin:0}.nav{display:flex;gap:6px;overflow:auto;padding-bottom:4px}.nav button{white-space:nowrap;margin:0}.nav-group{display:flex}.nav-children{display:flex!important;gap:5px}.userbox{position:relative;left:auto;right:auto;bottom:auto;margin-left:auto;min-width:120px}.content{padding:14px}.topbar{align-items:flex-start;gap:8px}.topbar h2{font-size:20px}.topbar-right{gap:6px}.form-row,.form-row.two,.form-row.three,.form-row.four,.form-row.five,.grid.two{grid-template-columns:1fr!important}.list-filter-panel{grid-template-columns:1fr!important}.modal{width:100%;border-radius:16px}.scroll{max-height:70vh}}
@media(max-width:620px){.sidebar{display:block}.side-brand{margin-bottom:8px}.nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));overflow:visible}.nav-group{display:block}.nav-children{display:block!important}.userbox{margin-top:8px}.topbar{display:block}.topbar-title-row{margin-bottom:8px}.topbar-right{justify-content:space-between}.card{padding:11px}.quote-project-merge-grid,.bom-kpi-row,.project-doc-kpis{grid-template-columns:1fr!important}}

/* R0.2.206 - Quick PO issue qty adjustment */
.danger-text{display:block;color:#b91c1c;font-size:11px;font-weight:700;margin-top:2px}.issue-po-qty{max-width:110px;text-align:right}.compact-table .money{text-align:right;white-space:nowrap}


/* R0.2.211 - Purchasing Workflow horizontal KPI layout */
.purchase-workflow-card .kpi-grid.six{
  display:grid;
  grid-template-columns:repeat(6,minmax(0,1fr));
  gap:10px;
  margin:12px 0 14px;
  align-items:stretch;
}
.purchase-workflow-card .kpi{
  min-height:68px;
  border:1px solid #e2e8f0;
  border-radius:14px;
  background:#f8fafc;
  padding:10px 12px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  line-height:1.2;
}
.purchase-workflow-card .kpi span{
  display:block;
  color:#475569;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}
.purchase-workflow-card .kpi b{
  color:#0b4f8f;
  font-size:20px;
  line-height:1.15;
  font-weight:900;
}
.purchase-workflow-card .kpi.danger{
  background:#fff1f2;
  border-color:#fecdd3;
}
.purchase-workflow-card .kpi.danger b{color:#dc2626;}
.purchase-workflow-card .kpi.warn{
  background:#fffbeb;
  border-color:#fde68a;
}
.purchase-workflow-card .kpi.warn b{color:#d97706;}
@media(max-width:1500px){
  .purchase-workflow-card .kpi-grid.six{grid-template-columns:repeat(3,minmax(0,1fr));}
}
@media(max-width:760px){
  .purchase-workflow-card .kpi-grid.six{grid-template-columns:1fr 1fr;}
}
@media(max-width:520px){
  .purchase-workflow-card .kpi-grid.six{grid-template-columns:1fr;}
}


/* R0.2.215 - Attendance & Payroll module */
.payroll-kpis{grid-template-columns:repeat(4,minmax(0,1fr));}
.wh-tabs input[type="month"]{min-height:34px;}
@media(max-width:1100px){.payroll-kpis{grid-template-columns:1fr 1fr}.form-row.five{grid-template-columns:1fr 1fr}}
@media(max-width:760px){.payroll-kpis{grid-template-columns:1fr}.form-row.five{grid-template-columns:1fr}}


/* R0.2.216 - Attendance monthly hour summary after import */
.payroll-att-summary-card{padding-top:14px;}
.payroll-att-titlebar{justify-content:flex-start;gap:10px;margin-bottom:8px;}
.payroll-att-titlebar .section-title{margin:0;}
.payroll-att-scroll{max-height:520px;margin-top:8px;}
.payroll-att-summary{table-layout:fixed;min-width:1280px;width:100%;}
.payroll-att-summary th,.payroll-att-summary td{white-space:nowrap;vertical-align:middle;}
.payroll-att-summary th{text-align:left;}
.payroll-att-summary th:nth-child(n+4),.payroll-att-summary td:nth-child(n+4){text-align:right;}
.payroll-att-summary .payroll-col-code{width:72px;}
.payroll-att-summary .payroll-col-name{width:190px;}
.payroll-att-summary .payroll-col-dept{width:82px;}
.payroll-att-summary .payroll-col-day{width:84px;}
.payroll-att-summary .payroll-col-num{width:96px;}
.payroll-att-summary td:nth-child(2){font-weight:700;}
.payroll-att-summary .payroll-dept-cell{max-width:82px;overflow:hidden;text-overflow:ellipsis;color:#334155;}
.payroll-rule-note{background:#f8fbff;border-color:#bfdbfe;margin-bottom:10px;}

/* R0.2.222 - Editable payroll work days */
.payroll-work-days-input,.payroll-att-work-days-input,.payroll-att-nkl-input,.payroll-att-leave-input,.payroll-att-paid-holiday-input,.payroll-att-paid-hours-input{width:76px!important;min-width:76px;text-align:right;font-weight:800;padding:5px 7px!important;min-height:30px!important;border-color:#93c5fd;background:#eff6ff;}
.payroll-att-nkl-input{border-color:#fecaca;background:#fff1f2;}
.payroll-att-leave-input{border-color:#bbf7d0;background:#f0fdf4;}
.payroll-att-paid-holiday-input{border-color:#c7d2fe;background:#eef2ff;}
.payroll-att-paid-hours-input{width:92px!important;min-width:92px;border-color:#c4b5fd;background:#f5f3ff;}
.payroll-work-days-input:focus,.payroll-att-work-days-input:focus,.payroll-att-nkl-input:focus,.payroll-att-leave-input:focus,.payroll-att-paid-holiday-input:focus,.payroll-att-paid-hours-input:focus{outline:2px solid #bfdbfe;border-color:#2563eb;background:#fff;}


/* R0.2.228 - Payroll import calculation examples */
.payroll-time-example-card{margin-top:16px;background:linear-gradient(180deg,#ffffff,#f8fbff);border-color:#bfdbfe;}
.payroll-example-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;margin-bottom:8px;}
.payroll-example-head .section-title{margin-bottom:4px;}
.payroll-time-example-table{min-width:760px;}
.payroll-time-example-table th:nth-child(1){width:170px;}
.payroll-time-example-table th:nth-child(2){width:310px;}
.payroll-time-example-table td:nth-child(2){font-weight:800;color:#0f4c81;}
@media(max-width:760px){.payroll-example-head{display:block}.payroll-example-head .pill{margin-top:8px}}

/* R0.2.233 - Payroll salary formula notes */
.payroll-formula-card{margin-top:14px;border:1px solid #bfdbfe;background:linear-gradient(180deg,#ffffff,#f8fbff);border-radius:14px;padding:14px;box-shadow:0 8px 22px rgba(15,76,129,.04);}
.payroll-formula-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:10px;}
.payroll-formula-box{border:1px solid #e2e8f0;background:#fff;border-radius:12px;padding:10px;display:grid;gap:6px;min-height:112px;}
.payroll-formula-box b{color:#0f4c81;font-size:12px;}
.payroll-formula-box code{display:block;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:8px;padding:7px 8px;white-space:normal;font-family:Consolas,monospace;font-size:11px;line-height:1.35;color:#111827;}
.payroll-formula-box span{font-size:11.5px;color:#64748b;line-height:1.35;}
@media(max-width:1280px){.payroll-formula-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:760px){.payroll-formula-grid{grid-template-columns:1fr;}}


/* R0.2.242 - Payroll advance tables compact alignment */
.payroll-advance-card .section-title{margin-left:0;margin-bottom:8px;}
.payroll-advance-scroll{max-height:360px;border-top:1px solid #e5e7eb;}
.payroll-advance-scroll table{width:auto;table-layout:fixed;margin-left:0;}
.payroll-advance-scroll th,.payroll-advance-scroll td{padding:6px 8px;vertical-align:middle;}
.payroll-advance-scroll th:first-child,.payroll-advance-scroll td:first-child{padding-left:0;}
.payroll-advance-plan-table{min-width:1160px;}
.payroll-advance-plan-table .c-emp{width:150px;}
.payroll-advance-plan-table .c-date{width:104px;}
.payroll-advance-plan-table .c-period{width:104px;}
.payroll-advance-plan-table .c-money{width:118px;}
.payroll-advance-plan-table .c-status{width:96px;}
.payroll-advance-plan-table .c-action{width:136px;}
.payroll-repayment-table{min-width:850px;}
.payroll-repayment-table .c-date{width:110px;}
.payroll-repayment-table .c-emp{width:180px;}
.payroll-repayment-table .c-type{width:130px;}
.payroll-repayment-table .c-money{width:140px;}
.payroll-repayment-table .c-note{width:250px;}
.payroll-repayment-table .c-action{width:140px;}
.payroll-advance-scroll .money{text-align:right;white-space:nowrap;}
.payroll-advance-scroll .nowrap{white-space:nowrap;}
@media(max-width:1280px){.payroll-advance-plan-table{min-width:1080px}.payroll-advance-plan-table .c-money{width:108px}}

/* R0.2.246 - align payroll advance table content with section title */
.payroll-advance-card .section-title{margin-left:0;margin-bottom:8px;}
.payroll-advance-scroll{max-height:360px;border-top:1px solid #e5e7eb;margin-left:0;padding-left:0;}
.payroll-advance-scroll table{width:auto;table-layout:fixed;margin:0!important;}
.payroll-advance-scroll th,.payroll-advance-scroll td{padding:6px 8px;vertical-align:middle;text-align:left;}
.payroll-advance-scroll th:first-child,.payroll-advance-scroll td:first-child{padding-left:0;}
.payroll-advance-plan-table{min-width:1040px;}
.payroll-advance-plan-table .c-emp{width:120px;}
.payroll-advance-plan-table .c-date{width:92px;}
.payroll-advance-plan-table .c-period{width:92px;}
.payroll-advance-plan-table .c-money{width:112px;}
.payroll-advance-plan-table .c-status{width:88px;}
.payroll-advance-plan-table .c-action{width:128px;}
.payroll-repayment-table{min-width:760px;}
.payroll-repayment-table .c-date{width:94px;}
.payroll-repayment-table .c-emp{width:130px;}
.payroll-repayment-table .c-type{width:126px;}
.payroll-repayment-table .c-money{width:130px;}
.payroll-repayment-table .c-note{width:170px;}
.payroll-repayment-table .c-action{width:110px;}
.payroll-advance-scroll .money{text-align:left!important;white-space:nowrap;}
.payroll-advance-scroll .nowrap{white-space:nowrap;}
@media(max-width:1280px){.payroll-advance-plan-table{min-width:1000px}.payroll-advance-plan-table .c-money{width:108px}}


/* R0.2.282 - Sidebar software version and copyright footer */
.userbox-user{margin-bottom:8px}
.app-meta{margin:9px 0 12px;padding-top:9px;border-top:1px solid rgba(255,255,255,.14);font-size:10.5px;line-height:1.55;color:rgba(235,246,255,.78)}
.app-meta b{color:rgba(255,255,255,.88);font-weight:800}
.userbox .logout-btn,.userbox button{max-width:100%}
@media(max-width:920px){.app-meta{display:none}}


/* R0.2.307 - Executive Dashboard UX layout optimization */
.executive-dashboard-v307 .exec-hero,
.executive-dashboard .exec-hero{
  padding:14px 18px;
  min-height:auto;
}
.executive-dashboard-v307 .exec-hero h2,
.executive-dashboard .exec-hero h2{
  font-size:22px;
  line-height:1.15;
  margin-bottom:4px;
}
.executive-dashboard-v307 .exec-hero p,
.executive-dashboard .exec-hero p{
  font-size:13px;
  line-height:1.35;
}
.executive-dashboard-v307 .hero-actions,
.executive-dashboard .hero-actions{
  align-items:center;
}
.executive-dashboard-v307 .executive-kpi-grid,
.executive-dashboard .executive-kpi-grid{
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.executive-dashboard-v307 .kpi-card,
.executive-dashboard .executive-kpi-grid .kpi-card{
  padding:12px 14px;
  min-height:84px;
  border-radius:14px;
}
.executive-dashboard-v307 .kpi-card b,
.executive-dashboard .executive-kpi-grid .kpi-card b{
  font-size:24px;
  line-height:1.15;
}
.executive-dashboard-v307 .kpi-card span,
.executive-dashboard .executive-kpi-grid .kpi-card span{
  margin-top:4px;
  font-size:12.5px;
  font-weight:800;
  color:#475569;
}
.executive-dashboard-v307 .kpi-card small,
.executive-dashboard .executive-kpi-grid .kpi-card small{
  margin-top:4px;
  font-size:11px;
}
.dashboard-ops-grid{
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:14px;
  margin-top:14px;
  align-items:start;
}
.dashboard-ops-grid .dash-quotes{
  grid-column:1 / -1;
  order:1;
}
.dashboard-ops-grid .dash-projects{
  grid-column:1 / -1;
  order:2;
}
.dashboard-ops-grid .dash-materials{order:3;}
.dashboard-ops-grid .dash-cash{order:4;}
.dashboard-ops-grid .dash-docs{order:5;}
.dashboard-ops-grid .dash-logs{order:6;}
.dashboard-ops-grid .dash-quotes .dashboard-table-scroll,
.dashboard-ops-grid .dash-projects .dashboard-table-scroll{
  max-height:360px;
}
.dashboard-ops-grid .dash-quotes table,
.dashboard-ops-grid .dash-projects table{
  min-width:980px;
}
.dashboard-ops-grid .card{
  min-width:0;
  overflow:hidden;
}
.dashboard-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.dashboard-card-head .section-title{
  margin:0;
}
.dashboard-card-head button{
  flex:0 0 auto;
}
.dashboard-ops-grid .section-title{
  font-size:16px;
  margin-bottom:8px;
}
.dashboard-ops-grid table{
  font-size:11.5px;
}
.dashboard-ops-grid th,
.dashboard-ops-grid td{
  padding:6px 7px;
  vertical-align:top;
}
.dashboard-table-scroll,
.dashboard-ops-grid .scroll{
  max-height:275px;
  overflow:auto;
  border-radius:12px;
}
.hot-quote-scroll{max-height:318px;}
.project-priority-scroll{max-height:318px;}
.dash-materials .mini-scroll{max-height:175px;}
.dash-cash .mini-scroll{max-height:200px;}
.dash-docs .exec-doc-bars{
  grid-template-columns:1fr;
  gap:7px;
  margin-bottom:10px;
}
.dash-docs .exec-doc-bars>div{
  min-height:26px;
  padding:5px 44px 5px 10px;
}
.dash-docs .exec-doc-bars b{
  top:5px;
}
.dash-docs .exec-mini-kpis,
.dash-cash .exec-mini-kpis,
.dash-materials .exec-mini-kpis{
  gap:7px;
  margin-bottom:10px;
}
.dash-docs .exec-mini-kpis>div,
.dash-cash .exec-mini-kpis>div,
.dash-materials .exec-mini-kpis>div{
  padding:8px 9px;
  border-radius:10px;
}
.dash-docs .exec-mini-kpis b,
.dash-cash .exec-mini-kpis b,
.dash-materials .exec-mini-kpis b{
  font-size:16px;
}
.dash-materials .subsection-title{
  margin:8px 0 6px;
  font-size:12.5px;
  color:#0f4c81;
}
.dash-logs .scroll{max-height:220px;}
@media(max-width:1280px){
  .dashboard-ops-grid{grid-template-columns:1fr;}
  .executive-dashboard-v307 .executive-kpi-grid,
  .executive-dashboard .executive-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media(max-width:760px){
  .executive-dashboard-v307 .executive-kpi-grid,
  .executive-dashboard .executive-kpi-grid{grid-template-columns:1fr;}
  .dashboard-card-head{align-items:flex-start;flex-direction:column;}
}


/* R0.2.308 - Project Center horizontal summary cards */
.project-center-summary-row{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin-top:12px;
  align-items:stretch;
}
.project-center-summary-card{
  padding:14px 16px;
  min-height:118px;
  display:flex;
  flex-direction:column;
  gap:6px;
}
.summary-card-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  color:#0f4c81;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.2px;
  font-size:12px;
}
.summary-card-head b{
  min-width:32px;
  height:32px;
  border-radius:999px;
  display:inline-grid;
  place-items:center;
  background:#eaf3ff;
  color:#0f4c81;
  font-size:17px;
}
.summary-card-value{
  margin:0;
  font-weight:900;
  color:#111827;
}
.summary-card-desc{
  margin:0;
  line-height:1.35;
}
.project-center-action-row{
  margin-top:12px;
  justify-content:flex-start;
}
@media(max-width:900px){
  .project-center-summary-row{grid-template-columns:1fr;}
}

/* R0.2.315 - Quotation note/group heading rows */
.quote-note-line td,.quote-note-edit-row td{background:#fff7ed!important;color:#d00000!important;font-weight:700!important}.quote-note-input{font-weight:700!important;color:#d00000!important;background:#fffaf0!important}.editable-quote-table tr.quote-note-edit-row input{border-color:#fdba74!important}.quote-draft-table tr.quote-note-line td{border-top:1px solid #fed7aa;border-bottom:1px solid #fed7aa}


/* R0.2.334 - PO brand column and width tuning */
.po-manual-table .po-code-cell{min-width:130px;width:140px;}
.po-manual-table .po-code-cell input,.po-manual-table .po-code-input{min-width:110px;width:130px;}
.po-manual-table .po-item-cell{min-width:300px;width:420px;}
.po-manual-table .po-item-cell .item-search-input,.po-manual-table .po-item-cell select{min-width:300px;width:100%;}
.po-manual-table .po-brand-cell{min-width:150px;width:170px;}
.po-manual-table .po-brand-cell input{min-width:130px;width:150px;}
@media (max-width: 1200px){
  .po-manual-table .po-code-cell{min-width:110px;width:120px;}
  .po-manual-table .po-code-cell input,.po-manual-table .po-code-input{min-width:95px;width:110px;}
  .po-manual-table .po-item-cell{min-width:260px;width:340px;}
  .po-manual-table .po-item-cell .item-search-input,.po-manual-table .po-item-cell select{min-width:250px;}
  .po-manual-table .po-brand-cell{min-width:130px;width:145px;}
}

/* R0.2.344 - Searchable editable filter inputs */
.editable-filter-input{
  width:100%;
  min-width:0;
  border:1px solid #cbd5e1;
  border-radius:10px;
  background:#fff;
}
.editable-filter-input:focus{
  outline:2px solid rgba(14,165,233,.18);
  border-color:#38bdf8;
  box-shadow:0 0 0 3px rgba(14,165,233,.12);
}
.list-filter-panel .editable-filter-input,
.bom-filter-bar .editable-filter-input,
.po-filter-panel .editable-filter-input{
  min-height:36px;
  padding:8px 10px;
  font-size:12.5px;
}
.editable-filter-input::-webkit-calendar-picker-indicator{
  opacity:.75;
  cursor:pointer;
}

/* R0.2.345 - Customer module stacked layout */
.customer-layout.customer-layout-stacked{
  display:grid;
  grid-template-columns:1fr!important;
  gap:16px;
  align-items:start;
}
.customer-layout-stacked .customer-form-card,
.customer-layout-stacked .customer-list-card{
  width:100%;
  max-width:none;
}
.customer-layout-stacked .customer-list-below{
  margin-top:0;
}
.customer-layout-stacked .customer-list-card .customer-table-compact{
  overflow:auto;
  max-height:none;
}
.customer-layout-stacked .customer-table-compact table{
  min-width:980px;
  table-layout:auto;
}
@media(max-width:1000px){
  .customer-layout-stacked .customer-table-compact table{min-width:820px;}
}

/* R0.3.1 - editable material description in PO edit */
.po-manual-table .po-item-cell .po-edit-item-name{margin-top:6px;min-width:300px;width:100%;font-size:12px;line-height:1.3;}
.po-manual-table .po-item-cell .muted.mini{white-space:normal;}

/* R0.3.22 - quotation VAT apply all button */
.inline-input-action{
  display:flex;
  gap:6px;
  align-items:center;
}
.inline-input-action input{
  flex:1 1 auto;
  min-width:0;
}
.inline-input-action button{
  flex:0 0 auto;
  white-space:nowrap;
}

/* R0.3.24 - System Health visual cleanup */
.system-health-card{overflow:hidden;}
.sys-health-header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:14px;}
.sys-health-actions{margin-bottom:0;justify-content:flex-end;}
.sys-health-metrics{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:12px 0 16px;}
.sys-health-metric{display:grid;grid-template-columns:38px minmax(0,1fr);gap:10px;align-items:center;background:#f8fafc;border:1px solid #e5e7eb;border-radius:14px;padding:12px;min-height:78px;}
.sys-health-metric .sys-health-icon{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:#e0f2fe;font-size:18px;}
.sys-health-metric.green .sys-health-icon{background:#dcfce7;}
.sys-health-metric.orange .sys-health-icon{background:#ffedd5;}
.sys-health-metric span{display:block;color:#64748b;font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.03em;margin-bottom:4px;}
.sys-health-metric b{display:block;color:#0b4f8f;font-size:15px;line-height:1.25;word-break:break-word;}
.sys-health-metric.green b{color:#166534;}
.sys-health-metric.orange b{color:#9a3412;}
.sys-health-body{display:grid;grid-template-columns:1.15fr .85fr;gap:14px;align-items:start;}
.sys-health-panel{background:#ffffff;border:1px solid #e5e7eb;border-radius:14px;padding:14px;}
.sys-panel-title{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:10px;}
.sys-panel-title h4{margin:0;color:#0b4f8f;font-size:14px;font-weight:900;}
.sys-panel-title span{color:#64748b;font-size:12px;}
.sys-path-list{display:grid;gap:9px;}
.sys-path-card{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px;align-items:center;background:#f8fafc;border:1px solid #e5e7eb;border-radius:12px;padding:10px 12px;}
.sys-path-card b{display:block;color:#0f172a;margin-bottom:3px;}
.sys-path-card span{display:block;color:#64748b;font-size:12px;word-break:break-word;}
.sys-path-status{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;}
.sys-table-scroll{max-height:310px;border:1px solid #eef2f7;border-radius:12px;}
.sys-table-scroll table th{position:sticky;top:0;z-index:1;}
@media(max-width:1500px){.sys-health-metrics{grid-template-columns:repeat(3,minmax(0,1fr));}.sys-health-body{grid-template-columns:1fr;}}
@media(max-width:900px){.sys-health-header{display:block}.sys-health-actions{justify-content:flex-start;margin-top:10px}.sys-health-metrics{grid-template-columns:1fr 1fr}.sys-path-card{grid-template-columns:1fr}.sys-path-status{justify-content:flex-start}}
@media(max-width:560px){.sys-health-metrics{grid-template-columns:1fr}}

/* R0.3.25 - Cable tray/ladder powder coating price by kg */

/* R0.3.37 - Delivery Receiver Field Restore */
.toolbar.no-margin{margin-bottom:0}
button.green{background:#16a34a!important;color:#fff!important;border:1px solid #15803d!important}
.factory-board-open{overflow:hidden!important}
.factory-board-overlay{position:fixed;inset:0;z-index:9999;background:linear-gradient(135deg,#022c22 0%,#064e3b 42%,#052e16 100%);color:#ecfdf5;padding:22px;box-sizing:border-box;overflow:auto;font-family:Arial,Helvetica,sans-serif}
.factory-board-shell{min-height:100%;display:flex;flex-direction:column;gap:18px}
.factory-board-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;border:1px solid rgba(187,247,208,.24);background:rgba(6,78,59,.72);border-radius:22px;padding:18px 22px;box-shadow:0 24px 80px rgba(0,0,0,.28)}
.factory-board-head h1{margin:0 0 6px;font-size:30px;letter-spacing:.02em;color:#f0fdf4}
.factory-board-head p{margin:0;color:#bbf7d0;font-size:15px;font-weight:700}
.factory-board-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.factory-board-actions button{background:#dcfce7;color:#064e3b;border:0;border-radius:12px;padding:10px 14px;font-weight:900;cursor:pointer}
.factory-board-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:16px}
.factory-board-kpis>div{background:rgba(240,253,244,.95);color:#064e3b;border-radius:22px;padding:18px 20px;box-shadow:0 18px 55px rgba(0,0,0,.20);border:1px solid rgba(187,247,208,.75)}
.factory-board-kpis>div.danger{background:#fee2e2;color:#991b1b;border-color:#fecaca}
.factory-board-kpis>div.completed{background:#dcfce7;color:#166534;border-color:#86efac}
.factory-board-kpis b{display:block;font-size:42px;line-height:1;font-weight:1000;margin-bottom:8px}
.factory-board-kpis span{font-size:16px;font-weight:900;text-transform:uppercase;letter-spacing:.04em}
.factory-board-table-wrap{flex:1;background:rgba(255,255,255,.96);border-radius:24px;padding:14px;box-shadow:0 24px 90px rgba(0,0,0,.28);overflow:auto}
.factory-board-table{width:100%;border-collapse:separate;border-spacing:0;color:#052e16;font-size:18px;min-width:1280px}
.factory-board-table th{position:sticky;top:0;z-index:2;background:#14532d!important;color:#f0fdf4!important;font-size:15px;text-transform:uppercase;letter-spacing:.05em;padding:14px 12px;border-bottom:2px solid #86efac;text-align:left}
.factory-board-table td{padding:15px 12px;border-bottom:1px solid #bbf7d0;vertical-align:middle;background:#ffffff}
.factory-board-table tr:nth-child(even) td{background:#f0fdf4}
.factory-board-table tr.late td{background:#fff1f2!important;color:#7f1d1d}
.factory-board-table tr.completed td{background:#ecfdf5!important;color:#065f46}
.factory-board-table td b{font-size:20px;color:#064e3b}.factory-board-table tr.late td b{color:#991b1b}.factory-board-table tr.completed td b{color:#166534}
.factory-board-table td span{color:#475569;font-size:14px}.factory-board-table td em{font-style:normal;font-weight:1000;color:#14532d}
.factory-board-table .project-checklist{max-width:420px;gap:7px}.factory-board-table .project-checklist span{font-size:13px;padding:5px 9px;border-radius:999px}
.factory-progress{height:13px;border-radius:999px;background:#dcfce7;overflow:hidden;min-width:150px;border:1px solid #bbf7d0;margin-bottom:5px}.factory-progress i{display:block;height:100%;background:linear-gradient(90deg,#22c55e,#15803d);border-radius:999px}
.factory-warn{display:inline-block;background:#ffedd5;color:#9a3412;border:1px solid #fed7aa;border-radius:999px;padding:5px 9px;font-weight:900}
@media(max-width:980px){.factory-board-head{flex-direction:column}.factory-board-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.factory-board-head h1{font-size:22px}.factory-board-table{font-size:14px;min-width:980px}}

/* R0.3.45 - Internal Notification Center */
.notify-wrap{position:relative;display:inline-flex;align-items:center}
.notify-btn{position:relative;border:1px solid #d7e5f4;background:#fff;color:#0b4f8a;border-radius:999px;min-width:36px;height:34px;padding:0 10px;font-weight:800;box-shadow:0 3px 10px rgba(11,79,138,.08);cursor:pointer}
.notify-btn.has-unread{background:#fff7e6;border-color:#ffd28a;color:#b45309}
.notify-badge{position:absolute;top:-7px;right:-7px;background:#ef4444;color:#fff;font-size:11px;line-height:18px;min-width:18px;height:18px;border-radius:999px;padding:0 5px;border:2px solid #fff}
.notify-panel{position:absolute;right:0;top:42px;width:420px;max-width:calc(100vw - 24px);background:#fff;border:1px solid #d7e5f4;border-radius:14px;box-shadow:0 18px 45px rgba(15,23,42,.18);z-index:1000;overflow:hidden}
.notify-panel.hidden{display:none}
.notify-head{display:flex;justify-content:space-between;align-items:center;padding:12px 14px;background:#f0f7ff;border-bottom:1px solid #d7e5f4;color:#073b66}
.notify-list{max-height:520px;overflow:auto;padding:10px;background:#f8fbff}
.notify-item{border:1px solid #dbe7f3;background:#fff;border-radius:12px;padding:10px 12px;margin-bottom:10px}
.notify-item.unread{border-left:5px solid #0b5c9b;background:#f7fbff}
.notify-item.high{border-left-color:#16a34a}
.notify-item.warn{border-left-color:#f59e0b}
.notify-item.danger{border-left-color:#ef4444}
.notify-title{font-weight:900;color:#082f49;margin-bottom:6px}
.notify-message{font-size:13px;color:#334155;line-height:1.35;white-space:normal}
.notify-meta{font-size:12px;color:#64748b;margin-top:8px}
.notify-actions{display:flex;gap:8px;margin-top:10px;flex-wrap:wrap}
.notify-empty{padding:16px;text-align:center}
@media (max-width: 720px){.notify-panel{right:-70px;width:360px}}

/* R0.3.47 - Quotation delivery completion badges */
.quote-delivery-completion-badge{display:inline-flex;align-items:center;justify-content:center;margin-top:5px;padding:4px 9px;border-radius:999px;font-size:12px;font-weight:800;line-height:1;border:1px solid #bfdbfe;background:#eff6ff;color:#1d4ed8;white-space:nowrap}
.quote-delivery-completion-badge.completed{background:#dcfce7;border-color:#86efac;color:#047857}
.quote-delivery-completion-badge.partial{background:#fef3c7;border-color:#fde68a;color:#b45309}
.quote-delivery-completion-badge.pending{background:#f1f5f9;border-color:#cbd5e1;color:#475569}
.quote-ops-card.completed b{color:#047857}

.quote-status-btn.completed{background:#047857;color:#fff}
.quote-status-current.completed{background:#dcfce7;color:#047857;border-color:#86efac}

/* R0.3.52 - show project name clearly in Executive Dashboard */
.project-identity-cell b{display:block;color:#082f49;font-weight:1000;margin-bottom:3px}
.project-name-strong{display:block;margin:2px 0 3px;color:#0f172a;font-size:14px;font-weight:1000;line-height:1.35;text-transform:none}
.project-customer-muted{display:block;color:#475569;font-size:12px;line-height:1.3;margin-bottom:4px}
.factory-project-name{display:block;margin-top:4px;color:#064e3b!important;font-size:22px!important;font-weight:1000!important;line-height:1.18}
.factory-project-customer{display:block;color:#475569!important;font-size:14px!important;margin-top:3px}
