.operational-page{--accent:#6083b7;--tint:#edf2fa;--selected:#dce8f5}.operational-page.dark-mode{--accent:#a5c4ed;--tint:#293c54;--selected:#344f6e}.operational-page.returns{--accent:#a27497;--tint:#f6edf3;--selected:#edd9e7}.operational-page.returns.dark-mode{--accent:#d6acce;--tint:#432f43;--selected:#5c3e58}.op-metrics{grid-template-columns:repeat(var(--metric-count),minmax(0,1fr))!important;gap:9px}.operational-page .metric{padding:11px 13px}.operational-page .metric strong{font-size:21px}.operational-page [hidden]{display:none!important}.operational-page #opTable{table-layout:fixed}.operational-page td{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.operational-page th{height:49px}.operational-page .qty{text-align:center!important;font-variant-numeric:tabular-nums}.operational-page .money{text-align:right!important;font-variant-numeric:tabular-nums}.operational-page tbody tr{cursor:pointer}.operational-page tbody tr.selected td{box-shadow:inset 0 1px var(--accent),inset 0 -1px var(--accent);background:var(--selected)!important}.operational-page tbody tr:hover td{filter:brightness(.98)}.operational-page tbody tr:focus-visible{outline:2px solid var(--accent);outline-offset:-2px}.operational-page .tint-blue{background:#e8f0fc;color:#37618e}.operational-page .tint-orange{background:#fcf0e5;color:#965d2c}.operational-page .tint-teal{background:#e1f2ee;color:#316f60}.operational-page .tint-green{background:#edf2df;color:#667c38}.operational-page .tint-purple{background:#f0eaf7;color:#7e5da0}.operational-page.dark-mode .tint-blue{background:#293f59;color:#acd0f5}.operational-page.dark-mode .tint-orange{background:#4c3a2b;color:#ebc39f}.operational-page.dark-mode .tint-teal{background:#29483f;color:#ace0cb}.operational-page.dark-mode .tint-green{background:#3c472e;color:#d3e1a8}.operational-page.dark-mode .tint-purple{background:#40334f;color:#d2b7eb}.op-pill{display:inline-block;padding:3px 8px;border-radius:6px;font-size:12px;white-space:nowrap;border:1px solid #dbe4ec;background:var(--soft)}.op-pill.partial{background:#fff2d5;color:#91631f;border-color:#eed39a}.op-pill.issued{background:#e0f2e7;color:#317352;border-color:#abd5bb}.dark-mode .op-pill.partial{background:#4b402a;color:#efd49b;border-color:#6a5939}.dark-mode .op-pill.issued{background:#29493c;color:#b9dfca;border-color:#426753}.operational-page .op-details{flex-basis:21vh;max-height:235px}.operational-page #opDetailTable{min-width:1450px;font-size:13px}.operational-page #opDetailTable td{padding:8px 10px}.operational-page dialog{width:min(1450px,96vw)}.operational-page .op-loading{opacity:.65;pointer-events:none}@media(max-width:1250px){.op-metrics{grid-template-columns:repeat(4,minmax(0,1fr))!important}}@media(max-width:700px){.op-metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}.operational-page .op-details{height:35vh;max-height:none}.operational-page .metric strong{font-size:18px}}

.form-title-row{display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 16px;min-width:0}
.form-title-error{color:var(--form-title-error-color,#b42336);font-size:13px;font-weight:600;overflow-wrap:anywhere}
.dark-mode{--form-title-error-color:#ff8994}

.customer-tabs{display:flex;gap:4px;overflow-x:auto;padding:8px 16px 0;background:var(--soft);box-shadow:inset 0 -1px var(--line)}
.customer-tabs [role="tab"]{flex:none;padding:8px 12px;border:1px solid var(--line);border-radius:8px 8px 0 0;background:var(--soft);color:var(--muted)}
.customer-tabs [role="tab"]:hover{background:var(--tint);color:var(--text)}
.customer-tabs [role="tab"][aria-selected="true"]{background:var(--card);border-bottom-color:var(--card);color:var(--text);font-weight:650}
.customer-tabs [role="tab"]:focus-visible{outline-offset:-3px}

.operational-page .op-date-link{border:0;background:transparent;color:var(--accent);font:inherit;padding:3px 0;text-decoration:underline;text-decoration-color:transparent;text-underline-offset:3px;cursor:pointer}.operational-page .op-date-link:hover{text-decoration-color:currentColor}.operational-page .op-date-link:focus-visible{outline:2px solid var(--accent);outline-offset:3px;border-radius:3px}

.operational-page .actions .op-action-link.primary{background:var(--accent);border-color:var(--accent);color:var(--card);font-weight:650}
.operational-page.purchasing:not(.dark-mode) .actions .op-action-link.primary{background:var(--grn-action,#276a66);border-color:var(--grn-action,#276a66);color:#fff}
.operational-page .actions .op-action-link.primary:hover{filter:brightness(.94)}
dialog.grn-entry-popup{width:min(1760px,98vw);height:94dvh;max-width:98vw;max-height:94dvh;overflow:hidden}
.grn-entry-popup iframe{display:block;width:100%;height:100%;border:0}
.min-report td[data-field="GINNumber"]:has(.op-date-link), .mi-entry-popup{user-select:none}
@media(min-width:701px){.operational-page dialog.grn-entry-popup.mi-entry-popup{width:min(1320px,73.5vw);height:84.6dvh}}
@media(min-width:701px){.operational-page dialog.grn-entry-popup.cp-request-popup{height:97dvh;max-height:97dvh}}
.operational-page dialog.grn-entry-popup.cp-return-popup{
    width:min(780px,96vw);height:min(var(--cp-return-height,440px),90dvh);max-height:90dvh;border-radius:15px;
}
@media(min-width:701px){.operational-page dialog.grn-entry-popup.mi-jc-popup{width:min(1440px,96vw);height:97dvh;max-height:97dvh}}
@media(max-width:700px){dialog.grn-entry-popup{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0}}

/* Compact desktop layout for the pending-return register. */
.operational-page.pending-returns #opTable{width:100%}.operational-page.pending-returns #opTable :is(th,td){padding:9px 6px}.operational-page.pending-returns #opTable td{font-size:13px}.operational-page.pending-returns #opTable th{height:56px}.operational-page.pending-returns #opNote{max-width:50%;text-align:right}

/* Dense register layout; full text remains available in cell tooltips. */
.operational-page.compact-returns #opTable :is(th,td){padding:8px 5px}.operational-page.compact-returns #opTable td{font-size:13px}.operational-page.compact-returns #opTable th{height:60px;font-size:12px}.operational-page.compact-returns #opTable th button{overflow-wrap:normal}

/* Document numbers align as references; IDs retain their ungrouped text. */
.operational-page.returns #opTable :is(th,td):nth-child(1){text-align:center;font-variant-numeric:tabular-nums}.operational-page.returns #opTable :is(th,td):nth-child(2),.operational-page.returns #opTable :is(th,td):nth-child(5){text-align:right;font-variant-numeric:tabular-nums}

/* Keep identifying columns in view while the remaining return columns scroll. */
.operational-page #opTable .op-frozen{position:sticky;z-index:3}.operational-page #opTable thead .op-frozen{top:0;z-index:5}.operational-page #opTable tbody .op-frozen{background:var(--card)}.operational-page #opTable tbody tr:nth-child(even) .op-frozen{background:var(--soft)}.operational-page #opTable .op-frozen.tint-blue{background:#e8f0fc;color:#37618e}.operational-page.dark-mode #opTable .op-frozen.tint-blue{background:#293f59;color:#acd0f5}.operational-page #opTable .op-frozen-end{border-right:2px solid var(--accent)}

.operational-page .qty .op-date-link{color:inherit}
.purchasing .po-action-dialog:is(.dc-approval-dialog,.po-approval-dialog){width:min(500px,calc(100% - 24px))}
:is(.dc-approval-dialog,.po-approval-dialog) .dialog-header h2{overflow-wrap:anywhere}

/* Material BOM columns use their configured proportions, without the generic first-column minimum. */
.operational-page #opDialog.op-compact-dialog .dialog-body table{table-layout:fixed}.operational-page #opDialog.op-compact-dialog .dialog-body th:first-child{min-width:0}.operational-page #opDialog.op-compact-dialog .dialog-body :is(th,td){padding:8px 7px}.operational-page #opDialog.op-compact-dialog .dialog-body th{white-space:normal}.operational-page #opDialog.op-compact-dialog .dialog-body td{font-size:13px}
.production-tracker .tint-rose{background:#f9e8e9;color:#843d46}
.production-tracker .tint-amber{background:#f6efda;color:#74571f}
.production-tracker.dark-mode .tint-rose{background:#4e303b;color:#f0bfc5}
.production-tracker.dark-mode .tint-amber{background:#493c25;color:#f0d8a1}
.production-tracker #opTable td[data-field=PartDescription]{white-space:normal;overflow-wrap:anywhere}
.production-tracker #opDialog{width:min(950px,96vw)}
#opDialogMeta{margin:4px 0 0}
.production-tracker #opDialogTotals :is(td,th){position:sticky;bottom:0;top:auto;z-index:1;font-weight:700;box-shadow:inset 0 1px var(--line)}
.production-tracker #opDialogTotals th{background:var(--soft)}
/* Purchasing reports use compact columns and a larger primary register. */
.operational-page.purchasing{--accent:#3f8a86;--tint:#edf6f5;--selected:#d9eeec}.operational-page.purchasing.dark-mode{--accent:#9cd7ce;--tint:#29443f;--selected:#36584f}.purchasing #opTable :is(th,td){padding:8px 7px}.purchasing #opTable th{white-space:normal}.purchasing #opTable td{font-size:13px}.purchasing #opTable th:first-child{min-width:0}.purchasing #opDetailTable{table-layout:fixed;width:100%}.purchasing #opDetailTable th:first-child{min-width:0}.purchasing.po-status #opDetailTable{min-width:600px}.purchasing .op-details{flex-basis:23vh;max-height:240px}.purchasing td[title="Approved"] .op-pill{background:#e0f2e7;color:#317352}.purchasing td[title="Rejected"] .op-pill{background:#fbe7e7;color:#a04747}.purchasing td[title="Pending"] .op-pill{background:#fff2d5;color:#91631f}.purchasing .po-action-dialog{width:min(1050px,94vw)}.po-action-body{padding:20px;overflow:auto;max-height:72vh}.po-action-body p{margin:0 0 14px}.po-action-body>button{margin:5px 10px 0 0}.po-preview-scroll{max-height:42vh;overflow:auto;margin-bottom:14px}.po-preview-scroll table{min-width:850px!important;table-layout:auto!important}.po-preview-scroll th:first-child{min-width:120px!important}.purchasing .po-action-body .primary{background:var(--accent);color:var(--card);border-color:var(--accent)}
.purchasing select[data-filter="SupplierCode"]{width:280px;max-width:40vw}.purchasing #opNote{max-width:55%;text-align:right}.purchasing.dark-mode td[title="Approved"] .op-pill{background:#29493c;color:#b9dfca}.purchasing.dark-mode td[title="Rejected"] .op-pill{background:#4e3037;color:#edb9be}.purchasing.dark-mode td[title="Pending"] .op-pill{background:#4b402a;color:#efd49b}
.dc-followup #opFilters label:has(input[type="date"]),.dc-followup #opFilters .month-actions{display:none}.purchasing.dc-details .po-action-body table{table-layout:fixed}.purchasing.dc-details .po-action-body td:last-child{text-align:center;font-variant-numeric:tabular-nums}
.purchasing.po-details #opTable :is(th,td):nth-child(2),.purchasing.po-status #opTable :is(th,td):nth-child(2){text-align:right;font-variant-numeric:tabular-nums}.operational-page :is(#opTable,#opDetailTable) th[aria-sort="ascending"] button::after,.operational-page :is(#opTable,#opDetailTable) th[aria-sort="descending"] button::after{content:"";display:inline-block;margin-left:6px;vertical-align:middle;border-left:3px solid transparent;border-right:3px solid transparent}.operational-page :is(#opTable,#opDetailTable) th[aria-sort="ascending"] button::after{border-bottom:5px solid currentColor}.operational-page :is(#opTable,#opDetailTable) th[aria-sort="descending"] button::after{border-top:5px solid currentColor}

.operational-page.dc-details #opTable :is(th,td):nth-child(1){text-align:center;font-variant-numeric:tabular-nums}.operational-page.dc-details #opTable :is(th,td):nth-child(2){text-align:right;font-variant-numeric:tabular-nums}.purchasing select[data-filter="SupplierName"]{width:280px;max-width:40vw}
/* PO headers and item fields requested as centered, including sortable headings. */
.operational-page.po-details #opTable :is(th,td):is(:nth-child(1),:nth-child(3),:nth-child(7),:nth-child(8),:nth-child(10),:nth-child(12)){text-align:center!important;font-variant-numeric:tabular-nums}
.operational-page.po-details #opDetailTable :is(th,td):is(:nth-child(7),:nth-child(16)){text-align:center!important;font-variant-numeric:tabular-nums}

/* Distinguish the originating PO unit without changing document numbers or selection styling. */
.op-unit-legend{display:inline-flex;align-items:center;gap:6px;margin-left:14px;vertical-align:middle}.op-unit-legend small{font-size:11px;color:var(--muted);font-weight:400}.op-unit-badge{display:inline-flex;align-items:center;justify-content:center;min-width:54px;padding:3px 7px;border:1px solid var(--line);border-radius:6px;font-size:12px;font-weight:600;line-height:1.4;white-space:nowrap;background:var(--soft);color:var(--muted)}.op-unit-badge[data-unit="Unit-1"]{background:#e7f0fd;border-color:#c1d6f3;color:#285a93}.op-unit-badge[data-unit="Unit-2"]{background:#efe7fa;border-color:#d6c3ee;color:#70439e}
:is(.po-details,.po-status) #opRows tr[data-unit="Unit-1"]{--po-unit-marker:#5186cd;--po-unit-wash:#f5f9ff}:is(.po-details,.po-status) #opRows tr[data-unit="Unit-2"]{--po-unit-marker:#9868c5;--po-unit-wash:#faf6ff}:is(.po-details,.po-status) #opRows tr[data-unit="Unit-1"]>td,:is(.po-details,.po-status) #opRows tr[data-unit="Unit-2"]>td{background:var(--po-unit-wash)}:is(.po-details,.po-status) #opRows tr[data-unit]>td:first-child{border-left:3px solid var(--po-unit-marker,var(--line))}
.dark-mode .op-unit-badge[data-unit="Unit-1"]{background:#293f5b;border-color:#476994;color:#bad8ff}.dark-mode .op-unit-badge[data-unit="Unit-2"]{background:#443252;border-color:#77558f;color:#e3c8ff}:is(.po-details,.po-status).dark-mode #opRows tr[data-unit="Unit-1"]{--po-unit-marker:#80abe9;--po-unit-wash:#223247}:is(.po-details,.po-status).dark-mode #opRows tr[data-unit="Unit-2"]{--po-unit-marker:#be96e3;--po-unit-wash:#30283e}
@media(max-width:900px){.op-unit-legend{margin-left:8px}.op-unit-legend small{display:none}}

.operational-page.po-status #opTable :is(th,td):is([data-field="POID"],[data-field="SupplierCode"],[data-field="StatusName"],[data-field="OriginLocation"],[data-field="DeliveryLocation"]){text-align:center!important}.po-preview-scroll :is(th,td):nth-last-child(-n+3){text-align:center!important;font-variant-numeric:tabular-nums}.po-preview-scroll th:first-child{min-width:38px!important;width:38px}.po-preview-scroll td:first-child{text-align:center}.po-preview-scroll input[type="checkbox"]{width:16px;height:16px;accent-color:var(--accent);vertical-align:middle}.po-preview-selection{font-weight:600;color:var(--accent)}

/* Keep the PO number shaded across every unit, hover and selected row. */
.operational-page:is(.po-details,.po-status) #opTable :is(th,td)[data-field="PONumber"]{background:#d4e2f5!important;color:#254c7b}
.operational-page:is(.po-details,.po-status).dark-mode #opTable :is(th,td)[data-field="PONumber"]{background:#344f70!important;color:#d5e7ff}

/* Linked receipts occupy only their required width at the left of the register. */
.operational-page.po-status .op-details{width:600px;max-width:100%;align-self:flex-start}
.operational-page.po-status #opDetailTable{width:100%;min-width:580px}
.operational-page.po-status #opSplitter{width:600px;max-width:100%;align-self:flex-start}
.operational-page.po-status #opDetailTable :is(th,td){text-align:right!important}
.operational-page.po-status .op-details .list-heading{flex-wrap:wrap;gap:5px}
.operational-page.po-count #opTable :is(th,td)[data-field="SupplierCode"]{text-align:center!important}
.operational-page.po-status #opTable :is(th,td):is([data-field="Quantity"],[data-field="GRNQty"],[data-field="BalQty"]){text-align:center!important}

/* The three GRN Details pages share the same layout with a color per receipt type. */
.operational-page.grn-details {
    --grn-action: #276a66;
    --grn-action-text: #fff;
    --report-identifier-ink: var(--grn-action);
}
.operational-page.grn-details.grn-rm {
    --accent: #496fa2;
    --tint: #eaf1fa;
    --selected: #d6e5f7;
    --grn-action: #315985;
}
.operational-page.grn-details.grn-general {
    --accent: #795996;
    --tint: #f2edf7;
    --selected: #e7d9f2;
    --grn-action: #654680;
}
.operational-page.grn-details.grn-rm.dark-mode {
    --accent: #a8c7ef;
    --tint: #293e58;
    --selected: #354f70;
}
.operational-page.grn-details.grn-general.dark-mode {
    --accent: #d2b6ed;
    --tint: #40334f;
    --selected: #534168;
}
.operational-page.grn-details.dark-mode {
    --grn-action: var(--accent);
    --grn-action-text: var(--card);
}
.operational-page.grn-details .actions .op-action-link.primary,
.operational-page.grn-details .filters button.primary {
    background: var(--grn-action);
    border-color: var(--grn-action);
    color: var(--grn-action-text);
}
.grn-details .metric::before { background: var(--accent); }
.grn-details .metric:last-child strong { color: var(--grn-action); }
.operational-page.grn-details #opDetailTable { min-width: 1650px; }
.operational-page.grn-details :is(#opTable,#opDetailTable) :is(th,td) { padding: 8px 9px; }
.operational-page.grn-details :is(#opTable,#opDetailTable) th {
    font-size: 13px;
    line-height: 1.3;
    white-space: normal;
}
.operational-page.grn-details :is(#opTable,#opDetailTable) td { font-size: 14px; }
.grn-details #opTable [data-field="AccountsVerifiedStatus"] .op-date-link { text-decoration-color: currentColor; }
.grn-details #opTable [data-field="AccountsVerifiedStatus"] .op-date-link[aria-disabled="true"] { opacity: .65; cursor: wait; }
.grn-report :is(th,td):is([data-field="CGSTPercentName"],[data-field="SGSTPercentName"],[data-field="IGSTPercentName"]),
.grn-general:not(.grn-details) :is(th,td):is([data-field="CGSTValue"],[data-field="SGSTValue"]){text-align:center!important;font-variant-numeric:tabular-nums}
.rms-report td[title="Open"] .op-pill{background:#d8f5df;color:#17672e;border-color:#91cea2}
.rms-report td[title="Closed"] .op-pill{background:#e8ecf2;color:#536173;border-color:#c3ccd7}
.rms-report.dark-mode td[title="Open"] .op-pill{background:#254a32;color:#bcebc7;border-color:#4a8059}
.rms-report.dark-mode td[title="Closed"] .op-pill{background:#35404f;color:#c9d3df;border-color:#637186}
.grn-rm td[data-field="QCApprovalStatus"][title="Approved"] .op-pill{background:#e0f2e7;color:#24623f;border-color:#abd5bb}
.grn-rm td[data-field="QCApprovalStatus"][title="Rejected"] .op-pill{background:#fbe7e7;color:#963b3b;border-color:#e3b5b5}
.grn-rm td[data-field="QCApprovalStatus"][title="Pending"] .op-pill{background:#fff2d5;color:#805514;border-color:#eed39a}
.grn-rm.dark-mode td[data-field="QCApprovalStatus"][title="Approved"] .op-pill{background:#29493c;color:#b9dfca;border-color:#426753}
.grn-rm.dark-mode td[data-field="QCApprovalStatus"][title="Rejected"] .op-pill{background:#4e3037;color:#edb9be;border-color:#80525b}
.grn-rm.dark-mode td[data-field="QCApprovalStatus"][title="Pending"] .op-pill{background:#4b402a;color:#efd49b;border-color:#6a5939}
.operational-page .grn-email-dialog{width:min(680px,94vw)}.grn-email-body{padding:20px}.grn-email-body label{display:flex;flex-direction:column;gap:5px;margin-bottom:12px}.grn-email-body :is(input,select,textarea){width:100%;box-sizing:border-box;padding:9px;border:1px solid var(--border,#cbd5e1);border-radius:6px;background:var(--card,#fff);color:inherit}.grn-email-body p{font-size:13px;line-height:1.5}
.operational-page .grn-accounts-verify-dialog { width: min(380px, calc(100% - 24px)); }
.grn-accounts-verify-dialog .dialog-body { padding-block: 0 18px; }
.grn-accounts-verify-dialog p { margin: 0 0 12px; overflow-wrap: anywhere; }
.grn-accounts-verify-dialog .grn-accounts-countdown { font-variant-numeric: tabular-nums; }
.grn-accounts-verify-dialog .actions { justify-content: flex-end; }
/* Distinct heading actions in the raw-material itemwise summary. */
:is(.grn-rm,.grn-jw).grn-summary .page-heading .actions :is(a,button){background:var(--grn-action-bg);color:var(--grn-action-text);border-color:var(--grn-action-border);transition:filter .15s}
:is(.grn-rm,.grn-jw).grn-summary .page-heading .actions :is(a,button):hover{filter:brightness(.94)}
:is(.grn-rm,.grn-jw).grn-summary .page-heading .actions :is(a,button):focus-visible{outline:2px solid currentColor;outline-offset:3px}
:is(.grn-rm,.grn-jw).grn-summary .page-heading .actions{--grn-action-bg:#e8f0fc;--grn-action-text:#28558a;--grn-action-border:#b5cceb}
:is(.grn-rm,.grn-jw).grn-summary .page-heading [href^="rm_mismatch.php"]{--grn-action-bg:#fff1da;--grn-action-text:#815013;--grn-action-border:#e5c48d}
:is(.grn-rm,.grn-jw).grn-summary .page-heading [href^="rm_monthly.php"]{--grn-action-bg:#e0f3f4;--grn-action-text:#21636b;--grn-action-border:#9ccdd1}
:is(.grn-rm,.grn-jw).grn-summary .page-heading [data-grn-action="grn-print-invoice"]{--grn-action-bg:#eee7fa;--grn-action-text:#63418c;--grn-action-border:#c9b5e6}
:is(.grn-rm,.grn-jw).grn-summary .page-heading [data-grn-action="grn-print-item"]{--grn-action-bg:#f9e7f0;--grn-action-text:#8b3d68;--grn-action-border:#e2b4ce}
:is(.grn-rm,.grn-jw).grn-summary .page-heading [data-grn-action="grn-email"]{--grn-action-bg:#1e7185;--grn-action-text:#fff;--grn-action-border:#1e7185}
:is(.grn-rm,.grn-jw).grn-summary .page-heading #opExport{--grn-action-bg:#287447;--grn-action-text:#fff;--grn-action-border:#287447}
:is(.grn-rm,.grn-jw).grn-summary.dark-mode .page-heading .actions{--grn-action-bg:#293f59;--grn-action-text:#c3dcff;--grn-action-border:#4e6c93}
:is(.grn-rm,.grn-jw).grn-summary.dark-mode .page-heading [href^="rm_mismatch.php"]{--grn-action-bg:#4c3b25;--grn-action-text:#f4d29a;--grn-action-border:#88683c}
:is(.grn-rm,.grn-jw).grn-summary.dark-mode .page-heading [href^="rm_monthly.php"]{--grn-action-bg:#25464b;--grn-action-text:#b3e6e9;--grn-action-border:#4b7e84}
:is(.grn-rm,.grn-jw).grn-summary.dark-mode .page-heading [data-grn-action="grn-print-invoice"]{--grn-action-bg:#403250;--grn-action-text:#dec6fa;--grn-action-border:#79608f}
:is(.grn-rm,.grn-jw).grn-summary.dark-mode .page-heading [data-grn-action="grn-print-item"]{--grn-action-bg:#4f3042;--grn-action-text:#f3c3df;--grn-action-border:#94617f}
.grn-qc #opTable [data-field="GRNNumber"] .op-date-link{color:inherit;font-weight:600}
.grn-qc-status-filters{display:flex;gap:20px;flex-wrap:wrap;margin:0;padding:10px 16px;border:1px solid var(--line);border-radius:10px;background:var(--card)}
.grn-qc-status-filters legend{font-size:12px;color:var(--muted);padding:0 6px}.grn-qc-status-filters label{display:flex;align-items:center;gap:7px;font-size:13px}.grn-qc-status-filters input{width:16px;height:16px;accent-color:var(--accent)}
.operational-page .grn-qc-dialog{width:min(900px,94vw)}.grn-qc-body{padding:20px;max-height:75vh;overflow:auto;display:grid;grid-template-columns:1.6fr 1fr;gap:20px}.grn-qc-facts{display:grid;grid-template-columns:1fr 1fr;gap:12px}.grn-qc-body label{display:flex;flex-direction:column;gap:5px;font-size:12px;color:var(--muted)}.grn-qc-body :is(input,select,textarea){width:100%;box-sizing:border-box;padding:9px;border:1px solid var(--line);border-radius:6px;background:var(--card);color:var(--text);font:inherit;font-size:14px}.grn-qc-body :is(input,textarea)[readonly]{background:var(--soft)}.grn-qc-facts .wide{grid-column:1/-1}.grn-qc-entry{display:flex;flex-direction:column;gap:12px;border:1px solid var(--line);border-radius:8px;padding:14px;background:var(--tint)}.grn-qc-entry legend{font-weight:600;padding:0 6px}.grn-qc-body [data-feedback]{grid-column:1/-1;margin:0;font-size:13px}.grn-qc #opTable :is(td,th):is([data-field="QCApprovedQty"],[data-field="QCApprovedinSheets"],[data-field="QCApprovedOn"],[data-field="QCApprovedByName"]){background:var(--tint)}
@media(max-width:650px){.grn-qc-body{grid-template-columns:1fr}.grn-qc-dialog .dialog-header{flex-wrap:wrap;gap:10px}}
.filters .op-checkboxes{margin:0;padding:0;border:0;min-height:37px;align-items:center}
.filters .op-checkboxes input{height:auto;width:16px}
.operational-page.dc-register #opDetailTable{min-width:1280px}
.operational-page:is(.dc-register,.dc-summary) #opTable [data-field="DCNumber"]{text-align:right;font-variant-numeric:tabular-nums}
.operational-page:is(.dc-register,.dc-summary) #opTable :is([data-field="DCID"],[data-field="VendorCode"]){text-align:center}
:is(.dc-register,.dc-summary) #opFilters select[data-filter="VendorName"]{width:230px;max-width:100%}
:is(.dc-register,.dc-summary) #opFilters select:is([data-filter="DCType"],[data-filter="Purpose"]){max-width:170px}
.dc-summary .op-metrics{width:min(100%, 420px);grid-template-columns:repeat(2,minmax(0,1fr))!important}
.dc-register .op-metrics{width:min(100%, 630px);grid-template-columns:repeat(3,minmax(0,1fr))!important}
.dc-summary .op-metrics .metric::before{background:var(--accent)}
.operational-page.dark-mode:is(.dc-register,.dc-summary,.debit-note-report) #opRefresh{color:var(--bg)}
.debit-note-report #opTable [data-field="GRTNumber"]{text-align:right;font-variant-numeric:tabular-nums}
.debit-note-report #opTable :is([data-field="GRTID"],[data-field="GRTItemID"],[data-field="SupplierCode"]){text-align:center}
.debit-note-report #opDetailTable{min-width:1340px}
.operational-page.debit-note-report #opDetailTable :is(th,td){padding:7px 6px;font-size:12px}

.op-detail-tables{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);gap:10px;flex:1;min-height:0}
.operational-page .op-detail-tables #opDetailTable{min-width:510px}
.op-related-table{min-width:300px}
.op-related-table caption{text-align:left;padding:8px 10px;color:var(--muted);font-weight:600}
.min-report #opDetailRows tr[aria-selected]:is(:hover,:focus-visible) td{background:var(--tint)}
.operational-page.min-report .op-detail-tables th{height:36px}
@media(min-width:701px){.operational-page.min-report .op-details{flex-basis:clamp(190px,26vh,245px);max-height:245px}}
@media(max-width:700px){.op-detail-tables{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(100px,1fr) minmax(100px,1fr)}}
.wo-register .heading-title{flex-shrink:0}
.wo-register .page-heading{flex-wrap:wrap;padding-block:12px;gap:10px}
.wo-register .page-heading > .actions{display:grid;justify-items:end;gap:6px;max-width:100%;margin-inline-start:auto}
.wo-register .op-action-row{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:6px}
.wo-register .wo-entry-popup{width:min(900px,calc(100% - 24px));max-width:none;height:min(var(--wo-entry-height,565px),calc(100dvh - 24px));max-height:none;overflow:hidden}
.wo-register .wo-entry-popup iframe{display:block;width:100%;height:100%;border:0}
.job-cards-register #opTable [data-field="JCDate"]{text-align:center}
.job-cards-register .jc-entry-popup{width:min(1264px,calc(100% - 24px));max-width:none;height:min(677px,calc(100dvh - 24px));max-height:none;overflow:hidden}
.job-cards-register .jc-entry-popup iframe{display:block;width:100%;height:100%;border:0}
@media(max-width:675px){.job-cards-register .jc-entry-popup{width:100%;height:100dvh;border:0;border-radius:0}}
@media(max-width:600px){.wo-register .wo-entry-popup{width:100%;height:100dvh;border:0;border-radius:0}}
.wo-register .actions :is(button,.op-action-link){
    padding:6px 9px;font-size:12px;
    background:var(--wo-action-bg,var(--soft));
    color:var(--wo-action-text,var(--text));
    border-color:var(--wo-action-border,var(--line));
}
.wo-register .actions :is(button,.op-action-link):hover{border-color:currentColor}
.wo-register{
    --wo-report-bg:#e3f3ef;--wo-report-text:#235e54;--wo-report-border:#acd4c9;
    --wo-cp-bg:#e8f0fb;--wo-cp-text:#2d5182;--wo-cp-border:#b7cbea;
    --wo-rm-bg:#fff1da;--wo-rm-text:#75511b;--wo-rm-border:#e9cd9c;
    --wo-production-bg:#f1e9f9;--wo-production-text:#60417d;--wo-production-border:#d9c5ec;
}
.wo-register.dark-mode{
    --wo-report-bg:#244840;--wo-report-text:#bbebe0;--wo-report-border:#487166;
    --wo-cp-bg:#2a415e;--wo-cp-text:#c2dafb;--wo-cp-border:#4f6c93;
    --wo-rm-bg:#4b3a24;--wo-rm-text:#f5d49f;--wo-rm-border:#77613e;
    --wo-production-bg:#433455;--wo-production-text:#e5cef8;--wo-production-border:#6b5583;
}
.wo-register .actions [href*="work_order_report.php"]{
    --wo-action-bg:var(--wo-report-bg);--wo-action-text:var(--wo-report-text);--wo-action-border:var(--wo-report-border)
}
.wo-register .actions [href*="work_order_requirements.php"]:is([href*="?report=wo-cp"],[href*="?report=skh-cp"],[href*="?report=cp"]){
    --wo-action-bg:var(--wo-cp-bg);--wo-action-text:var(--wo-cp-text);--wo-action-border:var(--wo-cp-border)
}
.wo-register .actions [href*="work_order_requirements.php"]:is([href*="?report=wo-rm"],[href*="?report=skh-rm"],[href*="?report=rm"]){
    --wo-action-bg:var(--wo-rm-bg);--wo-action-text:var(--wo-rm-text);--wo-action-border:var(--wo-rm-border)
}
.wo-register .actions [href*="work_order_production.php"]{
    --wo-action-bg:var(--wo-production-bg);--wo-action-text:var(--wo-production-text);--wo-action-border:var(--wo-production-border)
}
.wo-register .actions button[data-report-action]{
    --wo-action-bg:var(--wo-closed-bg);--wo-action-text:var(--wo-closed-text);--wo-action-border:var(--wo-closed-border)
}
.wo-register #opExport{
    --wo-action-bg:var(--wo-open-bg);--wo-action-text:var(--wo-open-text);--wo-action-border:var(--wo-open-border)
}
.wo-register #opFilters select[data-filter="DespatchLocationName"]{width:180px}
.wo-register #opFilters .search-filter{min-width:180px}
:is(.wo-register, .wo-cp-requirements) .op-metrics .metric strong{color:var(--text);font-size:clamp(14px,1.3vw,20px);white-space:normal;overflow-wrap:anywhere}
:is(.wo-register, .wo-cp-requirements) .op-metrics .metric::before{background:var(--accent)}
.wo-cp-total .op-metrics{width:min(100%, 420px);grid-template-columns:repeat(2,minmax(0,1fr))!important}
.op-preferences{flex:none;padding:10px 14px}
.op-preferences summary{width:fit-content;cursor:pointer;color:var(--accent);font-weight:650}
.op-preferences[open] .actions{margin-top:9px}
.operational-page.wo-register #opTable :is(th,td){padding:6px 5px}
.wo-register #opTable th{height:40px}
.wo-register #opTable td{font-size:12px}
.wo-register #opTable [data-field="WONumber"]{text-align:right;font-variant-numeric:tabular-nums}
.wo-register #opTable :is([data-field="WOID"],[data-field="WODate"],[data-field="SchNo"],[data-field="WOState"]){text-align:center}
.wo-register #opTable .op-pill{padding:2px 5px;font-size:11px;font-weight:650}
.operational-page td[title="Open"] .op-pill{background:#e3f3e8;color:#246343;border-color:#b4d8c0}
.operational-page td[title="Closed"] .op-pill{background:#fbe8eb;color:#873a49;border-color:#eabdc6}
.operational-page.dark-mode td[title="Open"] .op-pill{background:#254737;color:#bce7ca;border-color:#4a725a}
.operational-page.dark-mode td[title="Closed"] .op-pill{background:#502f3a;color:#f4bdc8;border-color:#82515e}
.wo-register.dark-mode #opRefresh{color:var(--bg)}
.inhouse-cp-request #opDetailTable{min-width:1220px;width:100%;table-layout:fixed}
.inhouse-cp-request #opDetailTable [data-field="BalQty"][title="0"]{color:#246343;font-weight:700}
.inhouse-cp-request.dark-mode #opDetailTable [data-field="BalQty"][title="0"]{color:#bce7ca}
.inhouse-cp-request #opDetailTable [data-field="Active"]{text-align:center}
.operational-page .report-icon-action { display: inline-grid; place-items: center; width: 37px; height: 37px; padding: 0; }
.operational-page .report-icon-action svg { width: 19px; height: 19px; }

.operational-page .invoice-list > .list-heading:has(.op-pagination) {
    flex-wrap: wrap;
    gap: 6px 12px;
}
.operational-page .op-pagination {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-inline-start: auto;
    font-size: 12px;
}
.operational-page .op-pagination button {
    min-height: 30px;
    padding: 4px 9px;
}
.operational-page .op-pagination button:disabled {
    opacity: .5;
    cursor: default;
}
