.esubmitted-link { border:0; background:transparent; color:#087c98; text-decoration:underline; font-weight:700; white-space:nowrap; cursor:pointer; }
.esubmission-dialog { box-sizing:border-box; width:min(1100px,96vw); height:90dvh; max-width:100%; max-height:96dvh; padding:16px; border:1px solid #c7c4ab; background:#fffdf4; color:#193c23; }
.esubmission-dialog::backdrop { background:#0006; }
.esubmission-dialog[open] { display:flex; flex-direction:column; gap:10px; }
.esubmission-dialog header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.esubmission-dialog p { margin:4px 0; font-size:13px; overflow-wrap:anywhere; }
.esubmission-dialog nav { display:flex; flex-wrap:wrap; gap:6px; max-height:25%; overflow:auto; }
.esubmission-dialog button { min-height:44px; cursor:pointer; }
.esubmission-dialog nav button { text-align:left; overflow-wrap:anywhere; white-space:normal; }
.esubmission-dialog button[aria-pressed="true"] { background:#d6eddb; border:1px solid #42644a; }
.esubmission-dialog iframe { flex:1; min-height:120px; width:100%; border:1px solid #c7c4ab; background:white; }
@media(max-width:600px) { .esubmission-dialog { width:100%; height:96dvh; padding:12px; } .esubmission-dialog nav button { width:100%; } .esubmitted-link { min-height:44px; } }
.esubmission-dropzone { position:relative; margin-left:auto; flex:none; }
.esubmission-dropzone[hidden], .esubmission-dropzone [hidden] { display:none; }
.esubmission-dropzone > button { padding:4px 10px; min-height:28px; font-size:12px; }
.esubmission-dropzone.drag-over > button { outline:2px dashed #087c98; background:#dff2f6; }
.esubmission-dropzone details { position:absolute; right:0; top:100%; z-index:15; width:min(520px,80vw); padding:10px; border:1px solid #a2b9aa; background:#fffdf4; box-shadow:0 3px 12px #0002; }
.esubmission-dropzone summary { cursor:pointer; font-size:12px; }
.esubmission-dropzone ul { padding-left:18px; margin:8px 0 0; max-height:180px; overflow:auto; overflow-wrap:anywhere; font-size:12px; }
@media(max-width:600px) { .esubmission-dropzone > button { min-height:44px; } }
.table-wrap td button.esubmitted-link { display:inline; padding:0; margin:0; min-height:0; height:auto; min-width:0; width:auto; border:0; border-radius:0; box-shadow:none; background:none; font:inherit; line-height:inherit; color:#087c98; text-decoration:underline; white-space:nowrap; vertical-align:baseline; }
.table-wrap td button.esubmitted-link:focus-visible { outline:2px solid #087c98; outline-offset:2px; }
.payment-schedule-review {box-sizing:border-box; width:min(680px,96vw); max-height:90dvh; overflow:auto; background:#fffdf4; color:#193c23; border:1px solid #a2b9aa; padding:20px;}
.payment-schedule-review::backdrop {background:#0006;}
.payment-schedule-review h2 {margin:0 0 12px;}
.payment-schedule-review p,.payment-schedule-review li {overflow-wrap:anywhere; line-height:1.5;}
.payment-schedule-review li {margin-bottom:12px; font-variant-numeric:tabular-nums;}
.payment-schedule-review footer {display:flex; justify-content:flex-end; gap:8px; flex-wrap:wrap;}
.payment-schedule-review button {min-height:44px; white-space:normal;}
@media(max-width:430px) {.payment-schedule-review {padding:12px;} .payment-schedule-review footer button {flex:1;}}

#noteItemDetails[hidden] {display:none;}

#receiptDocumentList {display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;margin:4px 0 0;padding:0 4px;background:transparent;border:0;}
#receiptDocumentList:empty {display:none;}
#receiptDocumentList .receipt-document-link {display:inline-flex;align-items:center;gap:6px;width:auto;max-width:100%;min-width:0;min-height:24px;height:auto;padding:2px 0;border:0;border-radius:0;background:transparent;box-shadow:none;color:#536c61;font-size:12px;font-weight:400;line-height:1.4;text-align:left;white-space:normal;overflow-wrap:anywhere;cursor:pointer;}
#receiptDocumentList .receipt-document-link::before {content:"↗";color:#78897e;flex:none;}
#receiptDocumentList .receipt-document-link:hover {color:#087c98;text-decoration:underline;}
#receiptDocumentList .receipt-document-link:focus-visible {outline:2px solid #087c98;outline-offset:3px;}
@media(max-width:600px) {#receiptDocumentList .receipt-document-link {min-height:44px;}}

#receiptDocumentList .receipt-document-item {display:inline-flex;align-items:center;gap:5px;max-width:100%;}
#receiptDocumentList .receipt-document-remove {flex:none;width:20px;min-width:20px;height:20px;min-height:20px;padding:0;border:0;box-shadow:none;background:transparent;color:#8b8275;font-size:16px;font-weight:400;line-height:20px;cursor:pointer;}
#receiptDocumentList .receipt-document-remove:hover {color:#a3322b;background:#f5e7e3;}
#receiptDocumentList .receipt-document-remove:focus-visible {outline:2px solid #087c98;}
@media(max-width:600px){#receiptDocumentList .receipt-document-remove {width:44px;height:44px;min-height:44px;}}

.multi-customer-receipt-dialog {box-sizing:border-box;width:min(980px,96vw);max-height:92dvh;overflow:auto;padding:18px;background:#fffdf4;border:1px solid #a2b9aa;color:#193c23;}
.multi-customer-receipt-dialog::backdrop {background:#0006;}
.multi-receipt-fields {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:16px;}
.multi-receipt-row {display:grid;grid-template-columns:minmax(0,2fr) minmax(0,2fr) minmax(0,1fr) 44px;gap:8px;align-items:end;padding:10px 0;border-top:1px solid #ddd6c0;}
.multi-customer-receipt-dialog label {display:flex;flex-direction:column;gap:4px;min-width:0;}
.multi-customer-receipt-dialog input,.multi-customer-receipt-dialog select {box-sizing:border-box;width:100%;min-width:0;min-height:40px;}
.multi-customer-receipt-dialog button {min-height:44px;white-space:normal;}
.multi-customer-receipt-dialog footer {display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap;}
.multi-customer-receipt-dialog p {overflow-wrap:anywhere;}
@media(max-width:600px){.multi-receipt-fields,.multi-receipt-row{grid-template-columns:minmax(0,1fr);}.multi-customer-receipt-dialog input,.multi-customer-receipt-dialog select{font-size:16px;}.multi-receipt-row>button{justify-self:end;width:44px;}}

.monthly-po-manager{width:min(1100px,calc(100vw - 40px));max-height:90dvh;overflow:auto;box-sizing:border-box;border:1px solid #b9b29c;border-top:4px solid #25a5bd;border-radius:6px;background:#fffdf4;color:#203f2b;padding:20px;font:14px Arial,sans-serif}
.monthly-po-manager::backdrop{background:rgba(20,35,26,.38)}
.monthly-po-manager header{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.monthly-po-manager h2{margin:0 0 6px;font-size:23px}.monthly-po-manager header p{margin:0 0 18px;color:#626556}.monthly-po-manager [data-dismiss]{min-width:36px;font-size:20px}
.monthly-po-toolbar{display:grid;grid-template-columns:150px minmax(160px,1fr) 160px auto auto;gap:10px;align-items:end}
.monthly-po-manager label{display:grid;gap:5px;font-size:12px;font-weight:600}.monthly-po-manager input,.monthly-po-manager select{box-sizing:border-box;width:100%;min-width:0;padding:8px;border:1px solid #c8c2ad;background:#fffef9;border-radius:3px;color:#26382a;font:14px Arial,sans-serif}
.monthly-po-manager button{padding:8px 12px;border:1px solid #b5ab90;border-radius:3px;background:linear-gradient(#fffef8,#e9e3ce);color:#263d2b;font-weight:600;cursor:pointer}.monthly-po-manager button:disabled{opacity:.5;cursor:default}
.monthly-po-summary{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:16px 0}.monthly-po-summary button{display:flex;align-items:center;gap:10px;text-align:left;background:#f0f5eb;border-color:#d7dfcd}.monthly-po-summary strong{font-size:24px;font-variant-numeric:tabular-nums}.monthly-po-summary span{font-size:12px}
.monthly-po-add{padding:10px 12px;border:1px dashed #c2cbb8;border-radius:4px;background:#f6f8f0}.monthly-po-manager summary{cursor:pointer;font-weight:600;padding:5px 0}.monthly-po-status{color:#5b6155;min-height:18px}.monthly-po-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.monthly-po-card{min-width:0;padding:14px;border:1px solid #d8d5c1;border-radius:5px;background:#fffef9}.monthly-po-card-head{display:flex;align-items:start;justify-content:space-between;gap:8px}.monthly-po-card-head strong{display:block;line-height:1.4}.monthly-po-card small{display:block;color:#757565;font-size:12px;margin-top:4px}.monthly-po-badge{white-space:nowrap;border-radius:12px;font-size:11px;font-weight:bold;padding:4px 8px;background:#eaf0e4}.monthly-po-badge[data-state="Missing"],.monthly-po-badge[data-state="Review"]{background:#fff0cb;color:#73521a}.monthly-po-badge[data-state="Removed"],.monthly-po-badge[data-state="Ended"]{background:#ecebe6;color:#65655d}.monthly-po-badge[data-state="Closed"]{background:#d9ecdc;color:#245b32}.monthly-po-contract{font-size:12px;color:#626b60;line-height:1.5}.monthly-po-reason{font-size:12px;color:#8a5520;background:#fff6df;padding:7px;border-radius:3px}.monthly-po-links{display:flex;gap:6px;flex-wrap:wrap;align-items:center;margin:10px 0}.monthly-po-links button{padding:5px 8px;background:#edf7f6;border-color:#c7e0dd;color:#13768a;font-size:12px}.monthly-po-links span{font-size:12px;color:#777}.monthly-po-card>details{border-top:1px solid #e9e4d5;margin-top:12px;padding-top:5px}.monthly-po-card>details summary{font-size:12px;color:#5b6655}.monthly-po-settings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:10px 0}.monthly-po-notes{grid-column:1/-1}.monthly-po-card p,.monthly-po-manager footer{overflow-wrap:anywhere}.monthly-po-manager footer{margin-top:16px;padding-top:12px;border-top:1px solid #ddd7c5;font-size:12px;color:#6d705f}.monthly-po-empty{padding:25px;color:#66705f}
@media(max-width:700px){.monthly-po-manager{width:calc(100vw - 16px);max-height:94dvh;padding:12px}.monthly-po-toolbar{grid-template-columns:1fr 1fr}.monthly-po-toolbar label:nth-child(2){grid-column:1/-1;grid-row:2}.monthly-po-summary{gap:6px}.monthly-po-summary button{display:grid;gap:3px;padding:8px}.monthly-po-summary strong{font-size:21px}.monthly-po-list{grid-template-columns:1fr}.monthly-po-manager input,.monthly-po-manager select{font-size:16px;min-height:44px}.monthly-po-manager button,.monthly-po-manager summary{min-height:44px;box-sizing:border-box}.monthly-po-manager summary{display:flex;align-items:center}.monthly-po-card-head{flex-wrap:wrap}.monthly-po-settings{grid-template-columns:1fr}.monthly-po-manager h2{font-size:21px}.monthly-po-links button{min-height:44px}.monthly-po-notes{grid-column:auto}}

:is(#paymentScheduleDropzone, #submissionDropzone) summary { position:relative; padding-right:32px; min-height:24px; }
:is(#paymentScheduleDropzone, #submissionDropzone) .payment-result-close { position:absolute; right:0; top:-5px; width:28px; height:28px; min-height:28px; padding:0; border:0; background:transparent; box-shadow:none; font-size:20px; line-height:1; color:#56604f; }
:is(#paymentScheduleDropzone, #submissionDropzone) .payment-result-close:hover { background:#eaf0e4; }
:is(#paymentScheduleDropzone, #submissionDropzone) .payment-result-close:focus-visible { outline:2px solid #25a6c0; outline-offset:1px; }
@media(max-width:700px) { :is(#paymentScheduleDropzone, #submissionDropzone) summary { padding-right:48px; min-height:38px; } :is(#paymentScheduleDropzone, #submissionDropzone) .payment-result-close { width:44px; height:44px; min-height:44px; } }
/* Keep native month controls and status labels inside narrow phone layouts. */
.monthly-po-toolbar > *, .monthly-po-settings > * { min-width:0; }
.monthly-po-summary button { height:auto; white-space:normal; line-height:1.3; }
@media(max-width:700px) {
  .monthly-po-manager .monthly-po-toolbar { grid-template-columns:minmax(0,1fr) minmax(0,1fr); }
  .monthly-po-manager .monthly-po-toolbar label { grid-column:1/-1; grid-row:auto; }
  .monthly-po-manager .monthly-po-toolbar input,
  .monthly-po-manager .monthly-po-toolbar select { max-width:100%; height:44px; min-height:44px; }
  .monthly-po-manager input[type="month"]::-webkit-date-and-time-value { min-width:0; text-align:left; }
  .monthly-po-manager .monthly-po-toolbar > button { height:auto; min-height:44px; white-space:normal; line-height:1.3; }
  .monthly-po-manager .monthly-po-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .monthly-po-manager .monthly-po-summary button { display:flex; align-items:center; min-height:48px; height:auto; gap:10px; padding:10px; }
  .monthly-po-manager .monthly-po-summary span { min-width:0; white-space:normal; line-height:1.3; }
}

.evidence-controls { flex:0 1 auto; overflow:auto; min-height:0; overflow-wrap:anywhere; }
.evidence-controls form { display:grid; gap:8px; }
.evidence-controls label { display:grid; gap:4px; font-size:14px; }
.evidence-controls input { box-sizing:border-box; width:100%; min-width:0; min-height:44px; font-size:16px; }
.evidence-actions { display:flex; flex-wrap:wrap; gap:8px; }
.evidence-actions button { flex:1 1 160px; white-space:normal; }
