/* Scoped to the proforma workspace. Existing invoice and movement forms keep their styles. */
.proformaUi{--pi-ink:#1a243a;--pi-green:#1b3165;--pi-gold:#a88648;--pi-line:#e1e4ea;color:var(--pi-ink);text-align:start}
.proformaUi [hidden]{display:none!important}
.proformaUi .piModalHead{align-items:flex-start;margin-bottom:22px;padding-bottom:20px;border-bottom:1px solid var(--pi-line)}
.proformaUi .piModalHead h2{font-size:25px;letter-spacing:-.5px;margin-top:6px;overflow-wrap:anywhere}
.proformaUi .piEyebrow{display:block;color:var(--pi-gold);font-size:10px;font-weight:700;letter-spacing:1.7px;line-height:1.7}
.proformaUi .piModalHead>.quiet{font-size:19px;line-height:1;margin-inline-start:12px}
.proformaUi h3{font-size:17px;line-height:1.5;margin:0 0 16px}
.proformaUi p{line-height:1.8}
.proformaUi .piCard{background:#fff;border:1px solid var(--pi-line);border-radius:16px;padding:22px;margin:0 0 18px;box-shadow:0 4px 14px #1b243a10}
.proformaUi .piCard>.help:last-child,.proformaUi .piCard>p:last-child{margin-bottom:0}
.proformaUi .piDetailTop{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:16px;margin:0 0 18px}
.proformaUi .piStatusLine{display:flex;align-items:center;flex-wrap:wrap;gap:12px;color:#627091;font-size:12px}
.proformaUi .piStatus{display:inline-flex;align-items:center;max-width:100%;border:1px solid #e6dbc2;border-radius:30px;background:#faf6eb;color:#8a682e;padding:6px 11px;font-size:11px;font-weight:650;line-height:1.5;overflow-wrap:anywhere}
.proformaUi .piStatusPosted{color:var(--pi-green);border-color:#d3d9e7;background:#edf0f7}
.proformaUi .piHeaderActions,.proformaUi [data-pi-print-links],.proformaUi .piPaymentActions{display:flex;align-items:center;flex-wrap:wrap;gap:9px}
.proformaUi .piHeaderActions .download{display:inline-flex;align-items:center;justify-content:center;padding:10px 16px;text-decoration:none;border:1px solid var(--pi-line);border-radius:10px;background:#fff;color:var(--pi-ink);font-weight:600;line-height:1.4}
.proformaUi .piHeaderActions button{background:var(--pi-green);color:#fff;border-color:var(--pi-green)}
.proformaUi button{border-radius:10px}
.proformaUi button:focus-visible,.proformaUi a:focus-visible,.proformaUi input:focus-visible,.proformaUi select:focus-visible{outline:3px solid #b8c1d6;outline-offset:3px}
.proformaUi .piFacts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 24px;margin:0}
.proformaUi .piFacts>div{min-width:0}
.proformaUi .piFacts dt{color:#6a7899;font-size:11px;margin-bottom:6px}
.proformaUi .piFacts dd{margin:0;font-size:14px;line-height:1.6;font-weight:650;overflow-wrap:anywhere}
.proformaUi .piOrderDescription{margin:22px 0;padding:14px 17px;border-inline-start:3px solid #c5ac75;background:#faf9f4;color:#485269;border-radius:7px;white-space:pre-wrap}
.proformaUi .piMetrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:20px}
.proformaUi .piMetric{min-width:0;padding:17px 18px;border:1px solid #e4e6ec;border-radius:12px;background:#f8f9fa}
.proformaUi .piMetric>span{display:block;color:#627091;font-size:11px;line-height:1.6;margin-bottom:12px}
.proformaUi .piMetric>strong{display:block;direction:ltr;unicode-bidi:isolate;text-align:start;color:var(--pi-ink);font-size:23px;font-weight:700;letter-spacing:-.5px;overflow-wrap:anywhere}
.proformaUi .piMetric strong small,.proformaUi .piInvoiceCard strong small{font-size:10px;font-weight:500;letter-spacing:.4px;opacity:.7}
.proformaUi .piMetric p{font-size:10px;color:#6a7899;margin:9px 0 0}
.proformaUi .piMetricFeatured{background:linear-gradient(120deg,#213564,#162444);border-color:#213564}
.proformaUi .piMetricFeatured>span,.proformaUi .piMetricFeatured>strong,.proformaUi .piMetricFeatured p{color:#fff}
.proformaUi .piSectionHead{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:18px}
.proformaUi .piSectionHead h3{margin:3px 0 0}
.proformaUi .piSectionHead .piStatus{margin-top:3px}
.proformaUi .piCount{font-size:11px;white-space:nowrap;color:#657394;background:#f1f2f5;border-radius:20px;padding:6px 10px}
.proformaUi .tableWrap{max-height:540px;border:1px solid #e6e8ee;border-radius:11px;box-shadow:none}
.proformaUi th{background:#f5f6f8;color:#5e6c8b;font-size:10px;font-weight:650;letter-spacing:.2px;padding:14px 12px}
.proformaUi td{padding:14px 12px;font-size:12px;vertical-align:middle;border-color:#eaecf0}
.proformaUi tbody tr:last-child td{border-bottom:0}
.proformaUi .productPhoto{width:70px;height:70px;border-radius:9px;background:#f4f5f7;object-fit:contain}
.proformaUi .piNoPhoto{display:inline-flex;align-items:center;justify-content:center;width:70px;height:70px;border:1px dashed #dadee6;border-radius:9px;color:#7c89a6;font-size:10px}
.proformaUi td.description{max-width:430px;min-width:180px;white-space:normal;line-height:1.7}
.proformaUi .number{font-variant-numeric:tabular-nums;unicode-bidi:isolate}
.proformaUi .piSecondaryLine{display:block;color:#7885a3;font-size:10px;margin-top:5px}
.proformaUi .piPaymentActions{margin:18px 0 14px}
.proformaUi .piDeposit{border-top:3px solid #bd9d60}
.proformaUi .piSupplier{background:#fafbfc}
.proformaUi .piSupplier>.help{font-size:11px;margin:18px 0}
.proformaUi .piIssuance{background:linear-gradient(115deg,#f5f7fa,#fffdf6);border-color:#ccd1dd;padding:25px}
.proformaUi .piIssuance>p{max-width:850px;color:#55617c;font-size:12px;margin:0}
.proformaUi .piPairMark{display:grid;place-items:center;background:#e8eaf1;border-radius:12px;width:42px;height:42px;flex:none;font-size:24px;color:#394768}
.proformaUi .piIssuanceAction{margin-top:20px;display:flex;justify-content:flex-end}
.proformaUi .piIssuanceAction>button{padding:13px 22px;background:#1d315f;box-shadow:0 5px 12px #21335e24}
.proformaUi .piIssuedGrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.proformaUi .piInvoiceCard{display:flex;flex-direction:column;align-items:flex-start;gap:12px;background:white;border:1px solid #dce0e8;border-radius:13px;padding:21px;min-width:0}
.proformaUi .piInvoiceCard h4{font-size:16px;line-height:1.6;margin:0;overflow-wrap:anywhere}
.proformaUi .piInvoiceCard>strong{font-size:24px;direction:ltr;unicode-bidi:isolate;margin-bottom:4px}
.proformaUi .piInvoiceCard>[data-pi-document]{margin-top:auto}
.proformaUi .piFootnote{font-size:11px!important;color:#6c7a9b!important;line-height:1.8;margin:17px 0 0!important}
.proformaUi .piInternal{border-bottom:1px solid var(--pi-line);padding:12px 0 20px;margin:2px 0 8px;color:#647293;font-size:12px}
.proformaUi .piInternal summary{cursor:pointer;font-weight:600}
.proformaUi .piBottomActions{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:10px;margin-top:18px}
.proformaUi .piBottomActions>div{display:flex;gap:6px;flex-wrap:wrap}
.proformaUi .piDangerQuiet{background:transparent;color:#9c5148;border:1px solid #eadbd6;font-size:11px;padding:9px 13px}
.proformaUi .piDanger{background:#a0443b;color:white}
.proformaUi .piWarning{padding:20px;border:1px solid #ead7ce;border-radius:12px;background:#fcf6f0;color:#814e3f;margin-bottom:20px}
.proformaUi .piWarning p{margin:0;font-size:12px}
.proformaUi .piPrintSetting{font-size:11px;color:#6b799a;padding:14px 0 0;line-height:1.7;align-items:flex-start}
.proformaUi .piPrintSetting input{margin-top:3px;flex:none}
.proformaUi .piListHead{display:flex;align-items:center;justify-content:space-between;gap:24px;margin-bottom:24px}
.proformaUi .piListHead h3{font-size:22px;margin:0 0 6px}
.proformaUi .piListHead p{font-size:12px;color:#6a789a;max-width:680px;margin:0}
.proformaUi .piListHead button{flex:none}
.proformaUi .piFilters{margin-bottom:18px}
.proformaUi .piFilters .field:first-child{flex:2;min-width:230px}
.proformaUi .piEdit>.notice{font-size:11px;background:#f1f3f8;border-color:#d8dce7;color:#55617d}
.proformaUi .piEdit>.formActions{position:sticky;bottom:-25px;background:#fff;padding:17px 0;margin-top:10px;border-top:1px solid var(--pi-line);z-index:4}
.proformaUi .packingDraftRow{background:#fbfcfd;border-color:#e1e4ea;margin-top:16px}
.proformaUi .packingDraftRowHead{padding-bottom:10px;border-bottom:1px solid #e5e7ed}
.proformaUi .packingDraftRowHead strong{font-size:12px}
.proformaUi .packingDraftRowHead .quiet{font-size:11px;color:#9b6e60}
.proformaUi .packingDraftPhoto{justify-self:start}
.proformaUi .packingDraftPhoto .productPhoto{width:100px;height:100px}
.proformaUi [data-pi-line-total]{display:block;padding:12px;border-radius:9px;background:#eaedf3;font-size:19px;font-weight:700;direction:ltr;unicode-bidi:isolate}
.proformaUi .field input,.proformaUi .field select{background:#fff;border-radius:9px;border-color:#dee1e8}
.proformaUi .piCard .help{font-size:11px;line-height:1.8;color:#6a789a}
.proformaUi .piLoading{display:flex;align-items:center;justify-content:center;gap:12px;min-height:190px;color:#717f9f;font-size:13px}
.proformaUi .piLoading>span{width:18px;height:18px;border:2px solid #dadde5;border-top-color:#344775;border-radius:50%;animation:piLoading .7s linear infinite}
@keyframes piLoading{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.proformaUi .piLoading>span{animation:none;border-color:#344775}}
@media(max-width:760px){
 .proformaUi .piModalHead h2{font-size:22px}.proformaUi .piCard{padding:17px;border-radius:13px}
 .proformaUi .piFacts{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.proformaUi .piMetrics{grid-template-columns:1fr 1fr}
 .proformaUi .piMetricFeatured:last-child{grid-column:1/-1}.proformaUi .piMetric>strong{font-size:21px}
 .proformaUi .piIssuedGrid{grid-template-columns:1fr}.proformaUi .piListHead{align-items:flex-start;flex-direction:column;gap:14px}
 .proformaUi .piHeaderActions{width:100%}.proformaUi .piHeaderActions>button{flex:1}.proformaUi .piHeaderActions>[data-pi-print-links]{flex:2}
 .proformaUi .piHeaderActions .download{flex:1;padding:10px 12px}.proformaUi .piIssuanceAction>button{width:100%}
 .proformaUi .piFilters{gap:10px}.proformaUi .piEdit>.formActions{bottom:-20px;flex-wrap:wrap}
}
@media(max-width:460px){
 .proformaUi .piFacts{grid-template-columns:1fr 1fr;gap:15px 10px}.proformaUi .piFacts dd{font-size:12px}.proformaUi .piFacts dt{font-size:10px}
 .proformaUi .piMetrics{grid-template-columns:1fr;gap:9px}.proformaUi .piMetric{padding:15px}.proformaUi .piMetric>span{margin-bottom:6px}
 .proformaUi .piMetricFeatured:last-child{grid-column:auto}.proformaUi .piCard{padding:14px}.proformaUi .piSectionHead{gap:9px}
 .proformaUi .piSectionHead h3{font-size:16px}.proformaUi .piPaymentActions button{width:100%}.proformaUi .piHeaderActions>[data-pi-print-links]{flex-basis:100%}
 .proformaUi .piBottomActions{align-items:stretch;flex-direction:column}.proformaUi .piBottomActions>.piDangerQuiet{align-self:flex-start}
}

.proformaUi .piSupplierDeposit{padding:16px;border:1px solid #e6dfcd;border-radius:12px;background:#fcfaf2;margin-bottom:20px}
.proformaUi .piSupplierDeposit>.piMetric{max-width:420px;background:white}
.proformaUi .piSupplierDeposit>.piPaymentActions{margin-bottom:0}
.proformaUi .piPaymentFields{margin-top:22px}
.proformaUi .piPaymentReview{margin-top:22px;background:#f3f5fa;border-color:#c8cedc}
.proformaUi .piPaymentReview>.help{margin:18px 0 10px}
