/* MPMS Order of Payment — intentionally follows the MPRM visual system. */
.mpms-body .accounting-badge.ofp_created{background:#e9eefc;color:#3b4fa8}
.mpms-body .accounting-po-card.status-ofp_created{border-left-color:#596ec5}
.mpms-body .accounting-hero-stats{grid-template-columns:repeat(4,minmax(0,1fr))}
.mpms-dashboard-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
.mpms-dashboard-actions .monitoring-empty{min-height:330px;margin:0}
.ofp-approved-heading-actions{display:flex;align-items:center;gap:14px;flex-wrap:wrap}

.ofp-page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:24px;padding:8px 2px 4px}
.ofp-page-head h2{margin:7px 0 6px;color:#142f49;font-size:clamp(26px,2.4vw,34px);letter-spacing:-.025em}
.ofp-page-head p{max-width:720px;margin:0;color:#718397;font-size:13px;line-height:1.65}
.ofp-create-head{align-items:center}
.ofp-number-preview{min-width:200px;padding:15px 18px;border:1px solid #dce5ee;border-radius:14px;background:#fff;text-align:right;box-shadow:0 6px 20px rgba(23,55,80,.05)}
.ofp-number-preview span,.ofp-number-preview small{display:block;color:#7b8ca0;font-size:10px;font-weight:800;letter-spacing:.08em}
.ofp-number-preview strong{display:block;margin:4px 0;color:#153b59;font-size:18px}

.ofp-list-filter{display:grid;grid-template-columns:minmax(260px,1fr) 130px auto auto;gap:10px}
.ofp-register-card{padding:0;overflow:hidden}
.ofp-register-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 20px;border-bottom:1px solid #e6edf3}
.ofp-register-heading h3{margin:0;color:#173750;font-size:18px}.ofp-register-heading p{margin:4px 0 0;color:#8292a4;font-size:11px}
.ofp-register-chip{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:999px;background:#edf7f3;color:#2b7658;font-size:10px;font-weight:800}.ofp-register-chip svg{width:14px}
.ofp-register-wrap{overflow:auto}.ofp-register-table{width:100%;min-width:980px;border-collapse:collapse}
.ofp-register-table th{height:54px;padding:10px 14px;background:linear-gradient(180deg,#f8fbfe 0%,#f1f5fa 100%);color:#536a82;font-size:10px;font-weight:900;letter-spacing:.055em;line-height:1.2;text-align:left;text-transform:uppercase;vertical-align:middle;border-bottom:1px solid #dce6ef}
.ofp-register-table .table-sort-link{display:inline-flex;align-items:center;justify-content:flex-start;gap:6px;min-height:28px;padding:5px 7px;margin:-5px -7px;border-radius:7px;color:inherit;line-height:1;text-decoration:none!important;white-space:nowrap;transition:background-color .15s ease,color .15s ease}
.ofp-register-table .table-sort-link:hover{color:#174f88;background:#e5eef8}
.ofp-register-table .table-sort-link.active{color:#174f88;background:#deebf8}
.ofp-register-table .table-sort-link svg{display:block!important;width:13px!important;min-width:13px!important;max-width:13px!important;height:13px!important;min-height:13px!important;max-height:13px!important;flex:0 0 13px!important;margin:0!important;stroke-width:2.35}
.ofp-register-table .table-sort-link.active svg{color:#1768b2}
.ofp-register-table .table-sort-pair{display:flex;align-items:center;justify-content:flex-start;gap:8px;min-width:0}
.ofp-register-table .table-sort-pair.numeric{justify-content:flex-end}
.ofp-register-table .table-sort-pair .table-sort-link+.table-sort-link{padding-left:8px;margin-left:0;border-left:1px solid #cfdae5;border-radius:0 7px 7px 0}
.ofp-register-table td{padding:14px 16px;color:#314d66;font-size:12px;border-bottom:1px solid #eef2f6;vertical-align:middle}
.ofp-register-table tbody tr:hover{background:#fbfcfe}.ofp-register-table td small{display:block;margin-top:4px;color:#8997a8;font-size:10px}
.ofp-register-table .ofp-number{color:#153e61;font-size:13px}.ofp-row-action{text-align:right}.ofp-row-action .btn{white-space:nowrap}
.ofp-record-badge{display:inline-flex;align-items:center;gap:6px;padding:6px 9px;border-radius:999px;font-size:10px;font-weight:800;white-space:nowrap}.ofp-record-badge svg{width:13px;height:13px}
.ofp-record-badge.synced{background:#e9f8f0;color:#18744a}.ofp-record-badge.pending{background:#fff4da;color:#93620b}
.ofp-empty-row{display:flex;min-height:220px;flex-direction:column;align-items:center;justify-content:center;color:#8292a4;text-align:center}.ofp-empty-row svg{width:34px;height:34px;margin-bottom:10px}.ofp-empty-row strong{color:#294761;font-size:15px}.ofp-empty-row span{margin-top:5px;font-size:11px}

.ofp-picker-search-card,.ofp-header-form-card{padding:20px}.ofp-picker-search-card{display:grid;grid-template-columns:minmax(240px,.8fr) minmax(360px,1.2fr);align-items:center;gap:24px}
.ofp-picker-search-card h3,.ofp-header-form-card h3{margin:5px 0;color:#173750;font-size:18px}.ofp-picker-search-card p{margin:5px 0 0;color:#73859a;font-size:12px;line-height:1.55}
.ofp-picker-search{display:flex;align-items:center;justify-content:flex-end;gap:9px}.ofp-picker-search label{display:flex;min-width:280px;flex:1;align-items:center;gap:9px;padding:0 12px;border:1px solid #cedbe6;border-radius:10px;background:#fff}.ofp-picker-search label:focus-within{border-color:#438cb4;box-shadow:0 0 0 3px rgba(47,126,169,.1)}
.ofp-picker-search svg{width:17px;color:#7a90a4}.ofp-picker-search input{width:100%;padding:11px 0;border:0;outline:0;font:inherit;color:#29465e;background:transparent}
.ofp-card-title{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:18px}.ofp-required-note{color:#8291a3;font-size:10px}
.ofp-form-grid{display:grid;grid-template-columns:minmax(260px,1.5fr) minmax(170px,.75fr) minmax(170px,.75fr);gap:14px}.ofp-form-field span{display:block;margin-bottom:6px;color:#35516a;font-size:11px;font-weight:700}.ofp-form-field :is(input,select){width:100%;padding:11px 12px;border:1px solid #cedbe6;border-radius:10px;background:#fff;color:#203f5a;font:inherit}.ofp-form-field :is(input,select):focus{outline:0;border-color:#438cb4;box-shadow:0 0 0 3px rgba(47,126,169,.1)}

.ofp-picker-list{display:grid;gap:14px}.ofp-po-picker-card{padding:0;overflow:hidden}.ofp-po-picker-card>header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;border-bottom:1px solid #e7edf3;background:#fbfcfd}.ofp-po-picker-card h3{margin:3px 0;color:#153b59;font-size:19px}.ofp-po-picker-card header p{margin:2px 0 0;color:#6f8295;font-size:11px}.ofp-po-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:14px}.ofp-po-summary{text-align:right}.ofp-po-summary span,.ofp-po-summary small{display:block;color:#8291a3;font-size:10px}.ofp-po-summary strong{display:block;margin:3px 0;color:#204e6d;font-size:12px}.ofp-po-select-all{min-width:176px;justify-content:center;border-color:#b8cad7!important;background:#fff!important;color:#24516f!important}.ofp-po-select-all:hover:not(:disabled){border-color:#2f7ea9!important;background:#eef7fc!important;color:#155377!important}.ofp-po-select-all.is-partial{border-color:#8fb9d0!important;background:#f3f9fc!important}.ofp-po-select-all.is-active{border-color:#25759e!important;background:#e8f5fb!important;color:#15597d!important;box-shadow:inset 0 0 0 1px rgba(37,117,158,.08)}.ofp-po-select-all.is-active svg{color:#167248}.ofp-po-select-all:disabled{opacity:.55;cursor:not-allowed}.ofp-po-selection-hint{display:flex;align-items:center;gap:8px;padding:9px 18px;border-bottom:1px solid #eaf0f4;background:#f8fbfd;color:#6d8295;font-size:10px;line-height:1.45}.ofp-po-selection-hint svg{width:14px;height:14px;flex:0 0 auto;color:#438cb4}.ofp-po-selection-hint strong{color:#315e7d}
.ofp-picker-table-wrap{overflow:auto}.ofp-picker-table{width:100%;min-width:1060px;border-collapse:collapse}.ofp-picker-table th{padding:10px 12px;background:#f6f8fb;color:#75869a;font-size:9px;letter-spacing:.06em;text-align:left;text-transform:uppercase;border-bottom:1px solid #e5ecf2}.ofp-picker-table td{padding:11px 12px;color:#36516a;font-size:11px;border-bottom:1px solid #edf1f5;vertical-align:top}.ofp-picker-table td>strong{display:block;color:#213f59}.ofp-picker-table td>span{display:block;margin-top:3px;max-width:260px;color:#657b8e;line-height:1.45}.ofp-picker-table td>small{display:block;margin-top:5px;color:#aa7417}.ofp-picker-table tr.is-selected{background:#f4f9fc}.ofp-picker-table tr.is-fully-allocated{opacity:.55;background:#fafafa}.ofp-check-col{width:56px;text-align:center!important}
.ofp-line-check{display:inline-grid;place-items:center;width:24px;height:24px;cursor:pointer}.ofp-line-check input{position:absolute;opacity:0;pointer-events:none}.ofp-line-check span{display:block;width:18px;height:18px;border:2px solid #adc0cf;border-radius:5px;background:#fff}.ofp-line-check input:checked+span{border-color:#1f6c94;background:#1f6c94;box-shadow:inset 0 0 0 3px #fff}.ofp-line-check input:disabled+span{cursor:not-allowed;background:#eef2f5}
.ofp-line-input{width:100%;min-width:150px;padding:8px 9px;border:1px solid #d6e0e8;border-radius:8px;background:#fff;color:#29465e;font:inherit;font-size:11px;resize:vertical}.ofp-line-input:disabled{background:#f3f5f7;color:#8795a4}.ofp-line-input:focus{outline:0;border-color:#4b91b6;box-shadow:0 0 0 2px rgba(47,126,169,.08)}
.ofp-money-input{display:flex;min-width:125px;align-items:center;border:1px solid #d6e0e8;border-radius:8px;background:#fff;overflow:hidden}.ofp-money-input>span{padding-left:9px;color:#6d8295;font-size:11px}.ofp-money-input input{width:100%;padding:8px 9px 8px 4px;border:0;outline:0;background:transparent;text-align:right;font:inherit;font-weight:700;color:#254e6b}.ofp-money-input:focus-within{border-color:#4b91b6;box-shadow:0 0 0 2px rgba(47,126,169,.08)}
.ofp-no-po{display:flex;min-height:240px;flex-direction:column;align-items:center;justify-content:center;text-align:center}.ofp-no-po svg{width:36px;height:36px;color:#87a0b3}.ofp-no-po h3{margin:12px 0 4px;color:#294760}.ofp-no-po p{max-width:520px;margin:0;color:#8292a4;font-size:12px;line-height:1.6}
.ofp-create-footer{position:sticky;z-index:12;bottom:14px;display:grid;grid-template-columns:minmax(180px,1fr) auto auto;align-items:center;gap:20px;margin-top:18px;padding:14px 16px;border:1px solid #d8e3eb;border-radius:15px;background:rgba(255,255,255,.96);box-shadow:0 12px 34px rgba(18,49,75,.14);backdrop-filter:blur(12px)}.ofp-create-footer>div>span{display:block;color:#2a4b64;font-size:12px}.ofp-create-footer>div>small{display:block;margin-top:3px;color:#8292a4;font-size:10px}.ofp-create-total{text-align:right}.ofp-create-total span{color:#77899c!important;font-size:9px!important;text-transform:uppercase;letter-spacing:.06em}.ofp-create-total strong{display:block;margin-top:2px;color:#153d5c;font-size:19px}


/* Editable OFP document review — inspired by the accounting form, but modernized for MPMS. */
.ofp-draft-stage[hidden],.ofp-create-form [hidden]{display:none!important}
.ofp-draft-toolbar{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:16px;margin:2px 0 14px;padding:12px 14px;border:1px solid #dce5ed;border-radius:14px;background:#fff;box-shadow:0 7px 24px rgba(26,52,76,.05)}
.ofp-draft-toolbar>div{min-width:0}.ofp-draft-toolbar>div>strong{display:block;margin-top:2px;color:#2b465f;font-size:12px}.ofp-unsaved-chip{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid #f0dca7;border-radius:999px;background:#fff9e8;color:#886313;font-size:10px;font-weight:800;white-space:nowrap}.ofp-unsaved-chip svg{width:13px;height:13px}
.ofp-draft-document{padding:0;overflow:hidden;border:1px solid #cfdce6!important;border-radius:18px!important;background:#fff;box-shadow:0 22px 60px rgba(17,46,70,.10)!important}
.ofp-draft-letterhead{display:grid;grid-template-columns:minmax(250px,1fr) minmax(260px,.9fr) minmax(190px,.7fr);align-items:center;gap:22px;padding:24px 26px 20px;border-bottom:1px solid #dfe7ee;background:linear-gradient(180deg,#fff 0%,#fbfcfe 100%)}
.ofp-draft-company{display:flex;align-items:center;gap:12px;min-width:0}.ofp-draft-company img{width:52px;height:52px;flex:0 0 52px;border-radius:13px;box-shadow:0 5px 14px rgba(13,40,68,.16)}.ofp-draft-company div{min-width:0}.ofp-draft-company strong{display:block;color:#173a60;font-family:Georgia,'Times New Roman',serif;font-size:18px;letter-spacing:.035em;white-space:nowrap}.ofp-draft-company span{display:block;margin-top:3px;color:#506b85;font-size:9px;font-weight:800;letter-spacing:.24em;white-space:nowrap}
.ofp-draft-title{display:flex;justify-content:center}.ofp-draft-title span{display:inline-flex;min-width:250px;justify-content:center;padding:12px 25px;border:1px solid #9db5ca;border-radius:999px;background:#fff;color:#172c43;font-family:Georgia,'Times New Roman',serif;font-size:20px;font-weight:800;letter-spacing:.035em;box-shadow:inset 0 0 0 3px #f5f8fb}
.ofp-draft-number{text-align:right}.ofp-draft-number small{display:block;color:#8292a4;font-size:9px;font-weight:800;letter-spacing:.09em}.ofp-draft-number strong{display:block;margin:3px 0;color:#cc2f35;font-size:20px;letter-spacing:.02em}.ofp-draft-number span{display:block;color:#8d9cab;font-size:9px}
.ofp-draft-meta{display:grid;grid-template-columns:minmax(320px,1.7fr) minmax(180px,.65fr) minmax(180px,.65fr);border-bottom:1px solid #dfe7ee}.ofp-draft-meta>label{display:grid;grid-template-columns:110px minmax(0,1fr);align-items:center;gap:12px;min-height:65px;padding:10px 16px;border-right:1px solid #e2e8ee}.ofp-draft-meta>label:last-child{border-right:0}.ofp-draft-meta>label>span{color:#496278;font-size:11px;font-weight:800}.ofp-draft-meta-paid{grid-template-columns:85px minmax(0,1fr)!important}
.ofp-draft-input{width:100%;border:1px solid transparent;border-radius:8px;background:transparent;color:#17334d;font:inherit;transition:border-color .15s ease,background .15s ease,box-shadow .15s ease}.ofp-draft-input:hover{border-color:#d8e2ea;background:#fbfcfd}.ofp-draft-input:focus{outline:0;border-color:#5594b7;background:#fff;box-shadow:0 0 0 3px rgba(56,130,170,.10)}
.ofp-draft-header-input{padding:9px 10px;font-size:13px;font-weight:750}.ofp-draft-meta-paid .ofp-draft-header-input{font-size:14px;font-weight:800;text-transform:uppercase}
.ofp-draft-table-wrap{overflow:auto}.ofp-draft-table{width:100%;min-width:840px;border-collapse:collapse}.ofp-draft-table th{padding:11px 16px;background:#172f47;color:#fff;font-family:Georgia,'Times New Roman',serif;font-size:13px;letter-spacing:.025em;text-align:left}.ofp-draft-table th:first-child{width:25%}.ofp-draft-table th:nth-child(2){width:52%}.ofp-draft-table th:nth-child(3){width:18%;text-align:right}.ofp-draft-table th:last-child{width:5%}.ofp-draft-table td{padding:13px 15px;border-right:1px solid #e5ebf0;border-bottom:1px solid #e7edf2;color:#29465e;vertical-align:top}.ofp-draft-table td:last-child{border-right:0}.ofp-draft-table tbody tr:nth-child(even){background:#fcfdfe}.ofp-draft-table tbody tr:hover{background:#f8fbfd}
.ofp-draft-project-input{min-height:42px;padding:9px 10px;font-size:12px;font-weight:750}.ofp-draft-particulars-cell{min-width:350px}.ofp-draft-po-ref{display:flex;align-items:baseline;gap:8px;margin:0 0 4px;padding:0 9px}.ofp-draft-po-ref strong{color:#163b5a;font-size:11px;white-space:nowrap}.ofp-draft-po-ref span{overflow:hidden;color:#8291a0;font-size:9px;text-overflow:ellipsis;white-space:nowrap}.ofp-draft-particulars-input{min-height:48px;padding:8px 9px;font-size:11px;line-height:1.55;resize:vertical}.ofp-draft-amount-cell{vertical-align:middle!important}.ofp-draft-amount-input{display:flex;align-items:center;justify-content:flex-end;gap:3px}.ofp-draft-amount-input>span{color:#637a8e;font-size:12px;font-weight:700}.ofp-draft-amount-input>div{min-width:0;flex:1}.ofp-draft-amount-editor{padding:9px 8px;text-align:right;font-size:12px;font-weight:850}.ofp-draft-remove-col{width:46px;text-align:center!important;vertical-align:middle!important}.ofp-draft-remove{display:inline-grid;place-items:center;width:30px;height:30px;border:1px solid #e3e8ed;border-radius:9px;background:#fff;color:#8795a2;cursor:pointer}.ofp-draft-remove:hover{border-color:#ecc8cb;background:#fff5f5;color:#b44249}.ofp-draft-remove svg{width:15px;height:15px}
.ofp-draft-footer{display:grid;grid-template-columns:1fr minmax(260px,.36fr);align-items:stretch;border-top:1px solid #dce5ec;background:#fff}.ofp-prepared-by{display:flex;align-items:center;gap:10px;padding:20px 22px}.ofp-prepared-by span{color:#75889b;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.055em}.ofp-prepared-by strong{color:#21415c;font-family:'Segoe Script','Brush Script MT',cursive;font-size:18px;font-style:italic}.ofp-prepared-by small{padding-left:10px;border-left:1px solid #dfe7ed;color:#8a98a6;font-size:9px}.ofp-draft-summary{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:18px 22px;border-left:1px solid #dce5ec;background:#f5f8fb}.ofp-draft-summary span{color:#536b80;font-size:10px;font-weight:850;letter-spacing:.06em;text-transform:uppercase}.ofp-draft-summary strong{color:#132f49;font-size:21px;white-space:nowrap}
.ofp-final-actions{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-top:14px;padding:15px 17px;border:1px solid #d7e2ea;border-radius:14px;background:#fff;box-shadow:0 10px 28px rgba(25,50,73,.06)}.ofp-final-actions>div:first-child strong{display:block;color:#24435d;font-size:12px}.ofp-final-actions>div:first-child span{display:block;margin-top:3px;color:#7e8fa0;font-size:10px}.ofp-final-action-buttons{display:flex;align-items:center;gap:9px}.ofp-saving-dot{display:inline-block;width:9px;height:9px;border:2px solid rgba(255,255,255,.45);border-top-color:#fff;border-radius:50%;animation:ofpSpin .7s linear infinite}@keyframes ofpSpin{to{transform:rotate(360deg)}}

.ofp-document{padding:0;overflow:hidden}.ofp-document-header{display:flex;align-items:center;justify-content:space-between;gap:22px;padding:24px 26px;background:linear-gradient(135deg,#f6f9fc,#eef5f9);border-bottom:1px solid #dfe8ef}.ofp-document-header h2{margin:6px 0 3px;color:#153b59;font-size:29px;letter-spacing:-.025em}.ofp-document-header p{margin:0;color:#7b8d9f;font-size:11px}.ofp-document-total{text-align:right}.ofp-document-total span{display:block;color:#75889a;font-size:9px;font-weight:800;letter-spacing:.06em;text-transform:uppercase}.ofp-document-total strong{display:block;margin-top:5px;color:#163f5f;font-size:25px}
.ofp-header-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;border-bottom:1px solid #e6edf3}.ofp-header-grid>div{padding:15px 18px;border-right:1px solid #e9eef3}.ofp-header-grid>div:last-child{border-right:0}.ofp-header-grid .ofp-field-wide{grid-column:span 2}.ofp-header-grid span{display:block;margin-bottom:5px;color:#8191a2;font-size:9px;font-weight:800;letter-spacing:.055em;text-transform:uppercase}.ofp-header-grid strong{color:#294961;font-size:12px;overflow-wrap:anywhere}
.ofp-detail-table-wrap{overflow:auto}.ofp-detail-table{width:100%;min-width:760px;border-collapse:collapse}.ofp-detail-table th{padding:11px 16px;background:#f7f9fb;color:#718397;font-size:9px;letter-spacing:.06em;text-align:left;text-transform:uppercase;border-bottom:1px solid #e5ecf2}.ofp-detail-table td{padding:14px 16px;color:#345069;font-size:12px;line-height:1.5;border-bottom:1px solid #edf2f5;vertical-align:top}.ofp-detail-table td small{display:block;margin-top:4px;color:#8796a7;font-size:10px}.ofp-detail-table tfoot td{background:#f4f8fb;color:#173f5d;font-size:14px;font-weight:800;border-top:2px solid #dce7ef}.ofp-detail-table tfoot td:first-child{text-align:right;text-transform:uppercase;letter-spacing:.05em;font-size:10px}
.ofp-source-panel{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:15px;padding:18px 20px}.ofp-source-panel h3{margin:4px 0;color:#294860;font-size:15px}.ofp-source-panel p{margin:0;color:#708397;font-size:11px;line-height:1.55}.ofp-source-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:13px}.ofp-source-icon svg{width:22px}.ofp-source-icon.synced{background:#e9f8f0;color:#20754e}.ofp-source-icon.pending{background:#fff4dc;color:#9a6812}.ofp-detail-actions{justify-content:space-between}


@media(max-width:1180px){
  .ofp-draft-letterhead{grid-template-columns:1fr auto}.ofp-draft-title{grid-column:1/-1;grid-row:1;justify-content:center}.ofp-draft-company{grid-column:1;grid-row:2}.ofp-draft-number{grid-column:2;grid-row:2}.ofp-draft-meta{grid-template-columns:1fr 1fr}.ofp-draft-meta-paid{grid-column:1/-1}.ofp-draft-meta>label:nth-child(2){border-top:1px solid #e2e8ee}.ofp-draft-meta>label:nth-child(3){border-top:1px solid #e2e8ee}
}
@media(max-width:1100px){
  .mpms-body .accounting-hero-stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ofp-picker-search-card{grid-template-columns:1fr}.ofp-picker-search{justify-content:flex-start}
  .ofp-form-grid{grid-template-columns:1fr 1fr}.ofp-paid-to{grid-column:1/-1}
  .ofp-header-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.ofp-header-grid .ofp-field-wide{grid-column:span 2}
}
@media(max-width:700px){
  .ofp-draft-toolbar{grid-template-columns:1fr}.ofp-draft-toolbar .btn{width:100%;justify-content:center}.ofp-unsaved-chip{justify-self:start}
  .ofp-draft-document{border-radius:14px!important}.ofp-draft-letterhead{display:flex;align-items:stretch;flex-direction:column;padding:18px}.ofp-draft-title{order:-1}.ofp-draft-title span{min-width:0;width:100%;font-size:17px}.ofp-draft-company strong{font-size:14px}.ofp-draft-company span{font-size:8px}.ofp-draft-company img{width:44px;height:44px;flex-basis:44px}.ofp-draft-number{text-align:left}
  .ofp-draft-meta{display:block}.ofp-draft-meta>label,.ofp-draft-meta-paid{display:grid!important;grid-template-columns:92px minmax(0,1fr)!important;min-height:58px;border-right:0;border-top:1px solid #e6edf2;padding:9px 12px}.ofp-draft-meta>label:first-child{border-top:0}
  .ofp-draft-table-wrap{overflow:visible}.ofp-draft-table{display:block;min-width:0}.ofp-draft-table thead{display:none}.ofp-draft-table tbody{display:grid;gap:10px;padding:10px;background:#f5f8fa}.ofp-draft-table tr{display:grid;gap:9px;padding:12px;border:1px solid #dfe8ef;border-radius:12px;background:#fff}.ofp-draft-table td{display:block;padding:0;border:0!important}.ofp-draft-project-cell::before,.ofp-draft-particulars-cell::before,.ofp-draft-amount-cell::before{display:block;margin:0 0 4px;color:#8292a2;font-size:8px;font-weight:850;letter-spacing:.06em;text-transform:uppercase}.ofp-draft-project-cell::before{content:'Project'}.ofp-draft-particulars-cell::before{content:'Particulars'}.ofp-draft-amount-cell::before{content:'Amount'}.ofp-draft-remove-col{position:absolute;right:20px;margin-top:-2px}.ofp-draft-po-ref{padding:0}.ofp-draft-particulars-cell{min-width:0}.ofp-draft-amount-input{max-width:180px;margin-left:auto}.ofp-draft-footer{grid-template-columns:1fr}.ofp-prepared-by{padding:16px}.ofp-draft-summary{border-top:1px solid #dce5ec;border-left:0;padding:15px 16px}.ofp-final-actions{align-items:stretch;flex-direction:column}.ofp-final-action-buttons{display:grid;grid-template-columns:1fr}.ofp-final-action-buttons .btn{width:100%;justify-content:center}
  .mpms-dashboard-actions{grid-template-columns:1fr}.mpms-dashboard-actions .monitoring-empty{min-height:290px}
  .ofp-page-head{align-items:flex-start;flex-direction:column}.ofp-number-preview{width:100%;text-align:left}
  .ofp-list-filter{grid-template-columns:1fr 1fr}.ofp-list-filter .filter-search{grid-column:1/-1}
  .ofp-register-wrap{overflow:visible}.ofp-register-table{display:block;min-width:0}.ofp-register-table thead{display:none}.ofp-register-table tbody{display:grid;gap:10px;padding:10px;background:#f7f9fb}.ofp-register-table tr{display:grid;padding:14px;border:1px solid #e0e8ef;border-radius:12px;background:#fff;box-shadow:0 4px 15px rgba(20,50,75,.04)}.ofp-register-table td{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:7px 0;border:0;text-align:right!important}.ofp-register-table td::before{content:attr(data-label);color:#8392a2;font-size:9px;font-weight:800;text-transform:uppercase;text-align:left}.ofp-register-table .ofp-row-action{justify-content:flex-end}.ofp-register-table .ofp-row-action::before{content:''}.ofp-register-table .ofp-row-action .btn{width:100%;justify-content:center}
  .ofp-picker-search{align-items:stretch;flex-wrap:wrap}.ofp-picker-search label{min-width:100%;width:100%}.ofp-picker-search .btn{flex:1}
  .ofp-form-grid{grid-template-columns:1fr}.ofp-paid-to{grid-column:auto}
  .ofp-po-picker-card>header{align-items:flex-start;flex-direction:column}.ofp-po-header-actions{width:100%;align-items:stretch;flex-direction:column}.ofp-po-summary{text-align:left}.ofp-po-select-all{width:100%}.ofp-po-selection-hint{align-items:flex-start}
  .ofp-picker-table{display:block;min-width:0}.ofp-picker-table thead{display:none}.ofp-picker-table tbody{display:grid;gap:9px;padding:10px;background:#f7f9fb}.ofp-picker-table tr{display:grid;grid-template-columns:1fr;padding:12px;border:1px solid #e0e8ef;border-radius:11px;background:#fff}.ofp-picker-table td{display:grid;grid-template-columns:88px 1fr;gap:8px;padding:6px 0;border:0;text-align:left!important}.ofp-picker-table td::before{content:attr(data-label);color:#8292a4;font-size:9px;font-weight:800;text-transform:uppercase}.ofp-picker-table .ofp-check-col{width:auto;text-align:left!important}.ofp-line-input,.ofp-money-input{min-width:0}.ofp-picker-table td>span{max-width:none}
  .ofp-create-footer{bottom:74px;grid-template-columns:1fr auto;gap:10px}.ofp-create-footer>div:first-child{grid-column:1/-1}.ofp-create-footer .btn{grid-column:1/-1;width:100%;justify-content:center}.ofp-create-total{text-align:right}
  .ofp-document-header{align-items:flex-start;flex-direction:column}.ofp-document-total{text-align:left}.ofp-header-grid{grid-template-columns:1fr}.ofp-header-grid .ofp-field-wide{grid-column:auto}.ofp-header-grid>div{border-right:0;border-bottom:1px solid #eef2f5}
  .ofp-detail-table-wrap{overflow:visible}.ofp-detail-table{display:block;min-width:0}.ofp-detail-table thead{display:none}.ofp-detail-table tbody{display:grid;gap:10px;padding:10px;background:#f7f9fb}.ofp-detail-table tr{display:grid;padding:12px;border:1px solid #e0e8ef;border-radius:11px;background:#fff}.ofp-detail-table td{display:grid;grid-template-columns:90px 1fr;gap:8px;padding:6px 0;border:0;text-align:left!important}.ofp-detail-table td::before{content:attr(data-label);color:#8292a4;font-size:9px;font-weight:800;text-transform:uppercase}.ofp-detail-table tfoot{display:block}.ofp-detail-table tfoot tr{display:flex;align-items:center;justify-content:space-between;margin:0 10px 10px;background:#f0f6fa}.ofp-detail-table tfoot td{display:block;border:0}.ofp-detail-table tfoot td::before{display:none}.ofp-source-panel{grid-template-columns:auto 1fr}.ofp-source-panel form{grid-column:1/-1}.ofp-source-panel .btn{width:100%;justify-content:center}
}
@page{size:A4 portrait;margin:10mm}
@media print{
  html,body,body.print-view-body{width:auto!important;min-width:0!important;min-height:0!important;margin:0!important;padding:0!important;background:#fff!important;color:#111!important;box-shadow:none!important;-webkit-print-color-adjust:economy!important;print-color-adjust:economy!important}
  body.ofp-detail-page .mpms-skip,body.ofp-detail-page .no-print,body.ofp-detail-page .sidebar,body.ofp-detail-page .page-header,body.ofp-detail-page .mobile-app-nav,body.ofp-detail-page .mobile-sidebar-overlay,body.ofp-detail-page .mobile-sidebar-toggle,body.ofp-detail-page button,body.ofp-detail-page [role="alert"],body.ofp-detail-page .accounting-page-content>:not(#ofpDocument){display:none!important}
  body.ofp-detail-page .app-layout,body.ofp-detail-page .app-main,body.ofp-detail-page .page-content,body.ofp-detail-page .accounting-page-content{display:block!important;position:static!important;width:100%!important;max-width:none!important;min-height:0!important;margin:0!important;padding:0!important;overflow:visible!important;background:#fff!important;box-shadow:none!important}
  body.ofp-detail-page #ofpDocument{display:block!important;position:static!important;transform:none!important;box-sizing:border-box!important;width:100%!important;max-width:190mm!important;margin:0 auto!important;padding:0!important;border:1px solid #c8d1db!important;border-radius:0!important;background:#fff!important;box-shadow:none!important;overflow:visible!important;break-inside:auto!important;page-break-inside:auto!important;color:#20344a!important;font-family:Arial,Helvetica,sans-serif!important;font-size:9pt}
  body.ofp-detail-page #ofpDocument *{background-color:#fff!important;background-image:none!important;color:#111!important;box-shadow:none!important;text-shadow:none!important}
  .ofp-official-letterhead{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;align-items:center!important;gap:5mm!important;min-height:20mm!important;padding:4.5mm 5mm!important;border-bottom:1px solid #cbd5df!important;background:#fff!important;break-after:avoid}
  .ofp-official-brand{display:flex!important;align-items:center!important;gap:3mm!important;min-width:0}.ofp-official-brand img{display:block;width:13mm!important;height:13mm!important;flex:0 0 13mm!important;object-fit:contain}.ofp-official-brand strong{display:block;color:#20344a!important;font-size:13pt!important;line-height:1.1}.ofp-official-brand span{display:block;margin-top:1mm;color:#4d6175!important;font-size:6.5pt!important;font-weight:700!important;letter-spacing:.2em!important}.ofp-official-title span{display:block;min-width:42mm;padding:2.5mm 3.5mm;border:1px solid #b9c8d7!important;border-radius:10mm!important;background:#fff!important;color:#20344a!important;font-size:10.5pt!important;font-weight:800!important;text-align:center}
  .ofp-official-payee-row,.ofp-official-date-row{display:grid!important;grid-template-columns:minmax(0,1fr) 54mm!important;min-height:12mm!important;border-bottom:1px solid #cbd5df!important;background:#fff!important;break-inside:avoid}
  .ofp-official-field{display:grid!important;grid-template-columns:30mm minmax(0,1fr)!important;align-items:stretch!important;min-width:0;border-right:1px solid #cbd5df!important}.ofp-official-field>span,.ofp-official-field>strong{display:flex!important;align-items:center!important;min-width:0;padding:2.4mm 3mm!important;background:#fff!important;color:#20344a!important;font-size:8.5pt!important;overflow-wrap:anywhere}.ofp-official-field>span{font-weight:700!important;color:#4d6175!important}.ofp-official-field>strong{font-weight:700!important}.ofp-official-number{display:flex!important;align-items:center!important;justify-content:center!important;gap:2mm!important;padding:2.4mm 3mm!important}.ofp-official-number span{color:#64788c!important;font-size:8pt!important;font-weight:700!important}body.ofp-detail-page #ofpDocument .ofp-official-number strong{color:#9e2632!important;font-size:11pt!important;font-weight:800!important}.ofp-official-date-placeholder{color:#20344a!important;font-size:8.5pt!important}
  .ofp-official-table-wrap{display:block!important;width:100%!important;overflow:visible!important}.ofp-official-table{display:table!important;width:100%!important;min-width:0!important;table-layout:fixed!important;border-collapse:collapse!important;background:#fff!important}.ofp-official-table thead{display:table-header-group!important}.ofp-official-table tbody,.ofp-official-table tfoot{display:table-row-group!important}.ofp-official-table tr{display:table-row!important;break-inside:avoid;page-break-inside:avoid}.ofp-official-table th,.ofp-official-table td{display:table-cell!important;background:#fff!important;color:#20344a!important;border-right:0!important;border-bottom:1px solid #d1dae4!important;overflow-wrap:anywhere}.ofp-official-table th{padding:3mm 3.5mm!important;font-size:7.5pt!important;font-weight:800!important;letter-spacing:.045em!important;text-align:left!important;text-transform:uppercase!important;border-bottom:1px solid #c4d0dc!important}.ofp-official-project-col{width:27%}.ofp-official-amount-col{width:20%}.ofp-official-table tbody td{padding:4mm 3.5mm!important;font-size:8.5pt!important;line-height:1.45!important;vertical-align:top!important}.ofp-official-project strong{font-family:Arial,Helvetica,sans-serif!important;font-size:8.5pt!important;font-style:normal!important;font-weight:700!important}.ofp-official-po-line{display:grid!important;gap:1mm!important}.ofp-official-po-line>strong{display:block;font-size:8.5pt}.ofp-official-amount,.ofp-official-amount-col{text-align:right!important}.ofp-official-amount strong{white-space:nowrap!important}
  .ofp-official-table tfoot{break-inside:avoid;page-break-inside:avoid}.ofp-official-table tfoot td{padding:2.5mm 3.5mm!important;border-top:0!important;font-size:8.5pt!important}.ofp-official-table tfoot td:first-child{text-align:right!important;font-weight:700!important}.ofp-official-table tfoot td:last-child{text-align:right!important}.ofp-official-grand-total td{border-top:1.5px solid #bcc9d6!important;font-size:9.5pt!important;font-weight:800!important}.ofp-official-ewt td{color:#20344a!important}
  .ofp-official-signoff{display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:5mm!important;min-height:20mm!important;padding:4mm 5mm!important;border-top:1px solid #cbd5df!important;background:#fff!important;break-inside:avoid;page-break-inside:avoid}.ofp-official-signoff>span{color:#4d6175!important;font-size:8pt!important;font-weight:700!important}.ofp-official-signoff strong{display:block;color:#20344a!important;font-size:9pt!important}body.ofp-detail-page #ofpDocument .ofp-official-signoff i{display:block;background:#9cabb9!important}
}

/* Direct OFP + OFP edit */
.direct-ofp-form{overflow:hidden}.direct-ofp-header{display:flex;align-items:center;justify-content:space-between;padding:22px 24px;border-bottom:1px solid #e4ebf1;background:linear-gradient(135deg,#fbfdff,#f4f8fc)}.direct-ofp-header h3{margin:8px 0 4px;color:#173b58;font-size:21px}.direct-ofp-header p{margin:0;color:#77899a;font-size:11px}.direct-badge{display:inline-flex;align-items:center;gap:7px;padding:7px 10px;border-radius:999px;background:#eaf3ff;color:#235d95;font-size:10px;font-weight:850}.direct-badge svg{width:14px;height:14px}.direct-ofp-fields{display:grid;grid-template-columns:2fr 1fr 1fr 1fr;gap:14px;padding:20px 24px;border-bottom:1px solid #e7edf2}.direct-field{display:grid;gap:7px}.direct-field>span{color:#5f7488;font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.055em}.direct-field input,.direct-field select{width:100%;min-height:42px;padding:9px 11px;border:1px solid #d6e0e8;border-radius:10px;background:#fff;color:#203b53;font:inherit}.direct-field-wide{min-width:0}.direct-lines-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 24px 12px}.direct-lines-heading h3{margin:0;color:#1b3e59;font-size:16px}.direct-lines-heading p{margin:4px 0 0;color:#8292a2;font-size:10px}.direct-lines-table-wrap{overflow:auto;padding:0 24px}.direct-lines-table{width:100%;min-width:760px;border-collapse:collapse;border:1px solid #dce5ec;border-radius:12px;overflow:hidden}.direct-lines-table th{padding:10px 12px;background:#18364f;color:#fff;font-size:10px;letter-spacing:.045em;text-align:left;text-transform:uppercase}.direct-lines-table th:nth-child(1){width:25%}.direct-lines-table th:nth-child(2){width:50%}.direct-lines-table th:nth-child(3){width:20%;text-align:right}.direct-lines-table th:nth-child(4){width:5%}.direct-lines-table td{padding:9px 10px;border-right:1px solid #e4eaf0;border-bottom:1px solid #e7edf2;vertical-align:middle}.direct-lines-table td:last-child{border-right:0;text-align:center}.direct-lines-table input,.direct-lines-table textarea{width:100%;padding:9px 10px;border:1px solid #d8e1e8;border-radius:9px;background:#fff;color:#263f55;font:inherit;font-size:11px}.direct-lines-table textarea{resize:vertical;line-height:1.45}.direct-money{display:flex;align-items:center;gap:5px}.direct-money span{color:#62788b;font-weight:800}.direct-money input{text-align:right;font-weight:800}.direct-remove{display:inline-grid;place-items:center;width:32px;height:32px;border:1px solid #e3cfd1;border-radius:9px;background:#fff5f5;color:#b84048;cursor:pointer}.direct-remove:hover{background:#fee8e8}.direct-remove svg{width:15px;height:15px}.edit-po-ref{display:block;margin:0 0 5px;color:#2a587c;font-size:9px;font-weight:850}.edit-linked-icon{width:17px;height:17px;color:#6f8295}.direct-summary{display:flex;justify-content:flex-end;gap:1px;margin:18px 24px 0;border:1px solid #dbe4eb;border-radius:12px;overflow:hidden}.direct-summary>div{min-width:170px;padding:11px 14px;background:#f7f9fb;text-align:right}.direct-summary span{display:block;color:#718397;font-size:9px;font-weight:800;text-transform:uppercase}.direct-summary strong{display:block;margin-top:3px;color:#203d54;font-size:16px}.direct-summary .grand{background:#18364f}.direct-summary .grand span,.direct-summary .grand strong{color:#fff}.direct-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:18px 24px 22px}.ofp-history-card{width:min(100%,1080px);margin:16px auto 0;padding:0;overflow:hidden}.ofp-history-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:18px 20px;border-bottom:1px solid #e5ebf0}.ofp-history-head h3{margin:0;color:#173a56;font-size:17px}.ofp-history-head p{margin:4px 0 0;color:#8493a3;font-size:10px}.ofp-history-count{display:inline-flex;padding:6px 9px;border-radius:999px;background:#eef4f9;color:#4d6b85;font-size:10px;font-weight:800}.ofp-history-list{padding:8px 20px 18px}.ofp-history-item{position:relative;display:grid;grid-template-columns:34px minmax(0,1fr);gap:12px;padding:14px 0}.ofp-history-item:not(:last-child)::after{content:"";position:absolute;left:16px;top:45px;bottom:-4px;width:1px;background:#dce5ec}.ofp-history-icon{z-index:1;display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#eaf3fb;color:#27658f}.ofp-history-icon svg{width:15px;height:15px}.ofp-history-body header{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.ofp-history-body strong{color:#23445d;font-size:12px}.ofp-history-body time{color:#8796a4;font-size:9px;white-space:nowrap}.ofp-history-body p{margin:4px 0 0;color:#65798c;font-size:10px;line-height:1.55}.ofp-history-changes{display:grid;gap:6px;margin-top:8px}.ofp-history-change{display:grid;grid-template-columns:120px 1fr;gap:10px;padding:8px 10px;border-radius:9px;background:#f8fafc;font-size:9.5px}.ofp-history-change b{color:#49657c}.ofp-history-change span{color:#718293;overflow-wrap:anywhere}.sidebar-logout{background:#d43a3f!important;border-color:#d43a3f!important;color:#fff!important}.sidebar-logout:hover{background:#b92d32!important;border-color:#b92d32!important;color:#fff!important}.sidebar-logout .side-icon,.sidebar-logout svg,.sidebar-logout span{color:#fff!important;stroke:#fff!important}
@media(max-width:900px){.direct-ofp-fields{grid-template-columns:1fr 1fr}.direct-field-wide{grid-column:1/-1}.direct-summary{justify-content:stretch}.direct-summary>div{min-width:0;flex:1}}
@media(max-width:600px){.direct-ofp-fields{grid-template-columns:1fr;padding:16px}.direct-field-wide{grid-column:auto}.direct-lines-heading{padding:16px}.direct-lines-table-wrap{padding:0 12px}.direct-summary{margin:14px 12px 0;display:grid}.direct-actions{padding:16px;flex-direction:column-reverse}.direct-actions .btn{width:100%;justify-content:center}.ofp-history-change{grid-template-columns:1fr}.ofp-history-body header{flex-direction:column;gap:3px}}
.ofp-detail-action-group{display:flex;align-items:center;gap:8px}.ofp-official-direct-line{color:#1c2731;white-space:normal}.ofp-record-badge.direct{background:#eaf3ff;color:#265f94}
