.invoice-list-tools.invoice-tools-v413{grid-template-columns:minmax(0,1fr) minmax(180px,230px) minmax(180px,230px)}
.invoice-type-chip{display:inline-flex;align-items:center;border:1px solid #d8def0;border-radius:999px;background:#f5f7ff;color:#3349a8;padding:5px 9px;font-size:.66rem;font-weight:950;text-transform:uppercase;letter-spacing:.06em}
.invoice-field-help{display:block;color:#7a8195;font-size:.67rem;font-weight:600;text-transform:none;letter-spacing:0;line-height:1.45}
.invoice-party-editor{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:14px;align-items:center}.invoice-party-box{display:grid;gap:10px;padding:16px;border:1px solid #dce2ef;border-radius:16px;background:#fbfcff}.invoice-party-box>b{color:#334bb6;font-size:.72rem;letter-spacing:.08em}.invoice-party-box label{display:grid;gap:6px;color:#4e5773;font-size:.68rem;font-weight:950;text-transform:uppercase;letter-spacing:.05em}.invoice-party-box input,.invoice-party-box textarea{width:100%;border:1px solid #dce3ef;border-radius:12px;background:#fff;padding:10px 12px;color:#11164a;font:inherit;text-transform:none;letter-spacing:0}.invoice-party-box textarea{min-height:88px;resize:vertical}.invoice-party-swap{display:grid;gap:8px;min-width:155px}.invoice-party-swap .btn{white-space:nowrap}
.invoice-items-v413{min-width:1220px}.invoice-items-v413 input,.invoice-items-v413 textarea{min-width:78px}.invoice-items-v413 td:nth-child(2) input,.invoice-items-v413 td:nth-child(4) input{display:block;margin:0 0 5px}.invoice-items-v413 td:nth-child(2) input:last-child,.invoice-items-v413 td:nth-child(4) input:last-child{margin-bottom:0}.invoice-items-v413 .invoice-dims{min-width:170px}.invoice-items-v413 .invoice-dims input{width:50px;min-width:50px;display:inline-block;margin-right:3px}
.invoice-adjustments-head,.invoice-adjustment-row{display:grid;grid-template-columns:34px minmax(150px,1fr) 135px minmax(120px,.8fr) minmax(170px,1.25fr) 120px 36px;gap:8px;align-items:center}.invoice-adjustments-head{padding:0 8px 8px;color:#68718d;font-size:.65rem;font-weight:950;text-transform:uppercase;letter-spacing:.05em}.invoice-adjustment-row{padding:9px 8px;border-top:1px solid #e1e6f0}.invoice-adjustment-row:first-child{border-top:1px solid #dfe4ef}.invoice-adjustment-row input,.invoice-adjustment-row select{width:100%;min-height:40px;border:1px solid #dce3ef;border-radius:9px;background:#fff;padding:7px 9px;font:inherit;color:#11164a}.invoice-adjustment-row>span{text-align:center;font-weight:900;color:#6c7590}
.invoice-live-breakdown{margin-top:16px;border:1px solid #dce3ef;border-radius:14px;overflow:hidden}.invoice-live-breakdown>div{display:flex;justify-content:space-between;gap:14px;padding:9px 12px;background:#f9faff;font-size:.78rem}.invoice-live-breakdown>div+div{border-top:1px solid #e0e5ef}.invoice-live-breakdown .grand,.invoice-live-breakdown .balance{background:#11164b;color:#fff;font-weight:950}
.invoice-shipping-facts{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;margin:10px 0;background:#dfe4ef;border:1px solid #dfe4ef;border-radius:9px;overflow:hidden}.invoice-shipping-facts>div{background:#f8faff;padding:8px}.invoice-shipping-facts span,.invoice-shipping-facts strong{display:block}.invoice-shipping-facts span{font-size:.5rem;color:#737b94;text-transform:uppercase;font-weight:950}.invoice-shipping-facts strong{margin-top:4px;font-size:.58rem;color:#11164b}
.invoice-packing-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin-top:12px}.invoice-packing-summary>div{padding:10px;border:1px solid #dae0ed;border-radius:9px;background:#f8faff}.invoice-packing-summary span,.invoice-packing-summary strong{display:block}.invoice-packing-summary span{font-size:.52rem;color:#707991;text-transform:uppercase;font-weight:950}.invoice-packing-summary strong{margin-top:4px;font-size:.68rem;color:#11164a}.invoice-payment-ledger{display:grid;gap:3px;margin-top:10px;padding-top:9px;border-top:1px solid #dfe4ee}.invoice-payment-ledger>b{font-size:.58rem;text-transform:uppercase;color:#4d5db1}.invoice-payment-ledger>span{font-size:.55rem;color:#667088}.invoice-payment-ledger>span strong{display:inline}
@media(max-width:1050px){.invoice-party-editor{grid-template-columns:1fr}.invoice-party-swap{grid-template-columns:1fr 1fr}.invoice-adjustments-head{display:none}.invoice-adjustment-row{grid-template-columns:1fr 1fr}.invoice-adjustment-row>span{display:none}.invoice-adjustment-row .invoice-remove-line{justify-self:end}.invoice-list-tools.invoice-tools-v413{grid-template-columns:1fr}.invoice-shipping-facts{grid-template-columns:repeat(2,1fr)}}
@media(max-width:600px){.invoice-party-swap{grid-template-columns:1fr}.invoice-packing-summary,.invoice-shipping-facts{grid-template-columns:1fr}.invoice-adjustment-row{grid-template-columns:1fr}}

/* v415 — invoice workspace overflow hardening.
   Keep wide line-item tables scrollable inside their own cards, but never let
   the editor or live document preview widen the secure workspace itself. */
body[data-portal-page="admin-invoices"] .invoice-admin-content,
body[data-portal-page="admin-invoices"] .invoice-builder-shell,
body[data-portal-page="admin-invoices"] .invoice-builder-grid,
body[data-portal-page="admin-invoices"] .invoice-editor-card,
body[data-portal-page="admin-invoices"] .invoice-preview-panel,
body[data-portal-page="admin-invoices"] [data-invoice-preview],
body[data-portal-page="admin-invoices"] .invoice-document {
  min-width:0;
  max-width:100%;
}
body[data-portal-page="admin-invoices"] .invoice-builder-shell {
  width:100%;
  container-type:inline-size;
  container-name:invoice-workspace;
}
body[data-portal-page="admin-invoices"] .invoice-builder-grid {
  width:100%;
  grid-template-columns:minmax(0,1.24fr) minmax(0,.76fr);
  gap:18px;
}
body[data-portal-page="admin-invoices"] .invoice-preview-panel {
  width:100%;
  overflow:hidden;
}
body[data-portal-page="admin-invoices"] [data-invoice-preview] {
  width:100%;
  overflow:hidden;
}
body[data-portal-page="admin-invoices"] .invoice-document {
  width:100%;
  margin-inline:0;
}
body[data-portal-page="admin-invoices"] .invoice-doc-header {
  grid-template-columns:minmax(0,1.45fr) minmax(0,.55fr);
}
body[data-portal-page="admin-invoices"] .invoice-doc-header > *,
body[data-portal-page="admin-invoices"] .invoice-doc-brand,
body[data-portal-page="admin-invoices"] .invoice-doc-brand > *,
body[data-portal-page="admin-invoices"] .invoice-parties > *,
body[data-portal-page="admin-invoices"] .invoice-doc-facts > *,
body[data-portal-page="admin-invoices"] .invoice-doc-bottom > * {
  min-width:0;
}
body[data-portal-page="admin-invoices"] .invoice-doc-brand strong,
body[data-portal-page="admin-invoices"] .invoice-doc-contact,
body[data-portal-page="admin-invoices"] .invoice-parties strong,
body[data-portal-page="admin-invoices"] .invoice-parties p,
body[data-portal-page="admin-invoices"] .invoice-doc-facts strong,
body[data-portal-page="admin-invoices"] .invoice-shipping-facts strong {
  overflow-wrap:anywhere;
  word-break:normal;
}
body[data-portal-page="admin-invoices"] .invoice-doc-table-wrap,
body[data-portal-page="admin-invoices"] .invoice-items-scroll {
  width:100%;
  max-width:100%;
  min-width:0;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
}
body[data-portal-page="admin-invoices"] .invoice-document .v101-table-tools {
  min-width:0;
  max-width:100%;
  flex-wrap:wrap;
  justify-content:flex-start;
}
body[data-portal-page="admin-invoices"] .invoice-document .v101-table-tools > div:first-child {
  min-width:0;
  max-width:100%;
}

/* The left workspace rail reduces the usable width even on a 1366–1600px
   monitor. Switch to a full-width editor + full-width preview based on the
   actual invoice workspace width rather than the browser viewport. */
@container invoice-workspace (max-width:1320px) {
  body[data-portal-page="admin-invoices"] .invoice-builder-grid {
    grid-template-columns:minmax(0,1fr);
  }
  body[data-portal-page="admin-invoices"] .invoice-preview-panel {
    position:relative;
    top:auto;
  }
  body[data-portal-page="admin-invoices"] .invoice-document {
    width:min(100%,980px);
    margin-inline:auto;
  }
}

@media(max-width:850px){
  body[data-portal-page="admin-invoices"] .invoice-doc-header {
    grid-template-columns:1fr;
  }
}

/* v420 — Proforma Invoice exact FOB / fixed deduction format with Product Description. */
.invoice-metrics{grid-template-columns:repeat(5,minmax(0,1fr))}
.proforma-items-table{min-width:1320px}
.proforma-items-table th{white-space:normal;line-height:1.25;min-width:110px}
.proforma-items-table th:nth-child(7){min-width:300px}
.proforma-item-row td{vertical-align:middle}
.proforma-money-cell,.proforma-net-cell{font-weight:900;white-space:nowrap;vertical-align:middle!important}
.proforma-net-cell{background:#e9f9e2!important;color:#102c18}
.proforma-deduction-cell{min-width:300px;vertical-align:top!important}
.proforma-fixed-deductions{display:grid;gap:7px}
.proforma-fixed-deductions label{display:grid;grid-template-columns:minmax(120px,1fr) 120px;gap:10px;align-items:center;margin:0}
.proforma-fixed-deductions label span{font-size:.68rem;font-weight:850;color:#4c5570}
.proforma-fixed-deductions input{min-width:0!important;margin:0!important}
.proforma-deduction-total{display:flex;justify-content:space-between;gap:14px;margin-top:9px;padding-top:9px;border-top:1px solid #d7deeb;font-size:.72rem}
.proforma-deduction-total span{font-weight:900;color:#4c5570}
.proforma-deduction-total strong{color:#11164b;white-space:nowrap}
.proforma-document{max-width:none!important}
.proforma-doc-heading{text-align:center;padding:17px 0 15px}
.proforma-doc-heading h2{margin:0;color:#103d65;font-size:1.12rem;line-height:1.2;letter-spacing:.02em}
.proforma-doc-heading p{margin:7px 0 0;color:#17295a;font-size:.78rem}
.proforma-doc-heading small{display:block;margin-top:5px;color:#727c91;font-size:.6rem;font-weight:800;letter-spacing:.05em}
.proforma-doc-table-wrap{margin-top:14px;overflow-x:auto;overscroll-behavior-inline:contain}
.proforma-doc-table{min-width:1120px}
.proforma-doc-table th{background:#103d65;padding:10px 7px;font-size:.55rem;line-height:1.35}
.proforma-doc-table td{padding:10px 8px;vertical-align:middle;font-size:.6rem}
.proforma-doc-table td:nth-child(1),.proforma-doc-table td:nth-child(3),.proforma-doc-table td:nth-child(4),.proforma-doc-table td:nth-child(5),.proforma-doc-table td:nth-child(7),.proforma-doc-table td:nth-child(8){text-align:center}
.proforma-description-preview{text-align:left!important;min-width:180px;line-height:1.45}
.proforma-description-preview strong{font-weight:750}
.proforma-preview-deductions{display:grid;gap:5px;text-align:left}
.proforma-preview-deductions>span{display:flex;justify-content:space-between;gap:12px;padding-bottom:4px;border-bottom:1px solid #d7deea}
.proforma-preview-deductions>span:last-child{border-bottom:0;padding-bottom:0}
.proforma-preview-deductions b{font-weight:650}
.proforma-preview-deductions em{font-style:normal;white-space:nowrap}
.proforma-preview-deductions .total{font-weight:950;padding-top:3px}
.proforma-net-preview{background:#e6f8dc!important;font-size:.67rem!important;vertical-align:middle!important}
.proforma-summary-band{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));margin-top:12px;border:1px solid #d4dce8;border-radius:9px;overflow:hidden}
.proforma-summary-band>div{display:grid;gap:4px;padding:11px 12px;background:#f8faff}
.proforma-summary-band>div+div{border-left:1px solid #d4dce8}
.proforma-summary-band span{font-size:.53rem;text-transform:uppercase;color:#68728a;font-weight:950;letter-spacing:.05em}
.proforma-summary-band strong{font-size:.74rem;color:#11164b}
.proforma-summary-band .net{background:#e6f8dc}
.proforma-notes{margin-top:10px;padding:10px 12px;border:1px solid #d7deea;border-radius:9px;background:#fbfcff}
.proforma-notes span{font-size:.53rem;text-transform:uppercase;color:#68728a;font-weight:950}
.proforma-notes p{margin:5px 0 0;color:#555f76;font-size:.6rem;line-height:1.5}
@media(max-width:1200px){.invoice-metrics{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.invoice-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.proforma-summary-band{grid-template-columns:1fr}.proforma-summary-band>div+div{border-left:0;border-top:1px solid #d4dce8}.proforma-doc-heading h2{font-size:.92rem}.proforma-fixed-deductions label{grid-template-columns:1fr}.proforma-fixed-deductions label span{font-size:.62rem}}


/* v421 — Proforma follows the supplied Excel layout and includes calculation validation. */
.proforma-items-table{min-width:1580px}
.proforma-items-table thead th[rowspan="2"]{vertical-align:middle}
.proforma-items-table thead tr+tr th{font-size:.66rem;padding-block:7px;background:#16295e}
.proforma-items-table th:nth-child(3){min-width:230px}
.proforma-items-table th:nth-child(7){min-width:150px}
.proforma-items-table th:nth-child(8){min-width:145px}
.proforma-deduction-description-cell,.proforma-deduction-amount-cell{vertical-align:top!important}
.proforma-deduction-descriptions,.proforma-deduction-amounts{display:grid;grid-template-rows:repeat(4,minmax(38px,auto));align-items:stretch}
.proforma-deduction-descriptions>*{display:flex;align-items:center;padding:8px 9px;border-bottom:1px solid #d7deeb;font-size:.7rem;color:#424c64}
.proforma-deduction-descriptions>*:last-child{border-bottom:0;background:#eef1f6;color:#11164b}
.proforma-deduction-amounts>*{min-width:0!important;margin:0!important;border-radius:0!important;border-width:0 0 1px!important;border-color:#d7deeb!important;display:flex;align-items:center;padding-inline:9px}
.proforma-deduction-amounts input:last-of-type{border-bottom:1px solid #d7deeb!important}
.proforma-deduction-amounts strong{justify-content:flex-end;background:#eef1f6;color:#11164b;font-size:.75rem}
.proforma-calc-check{display:grid;gap:5px;margin:0 0 15px;padding:12px 14px;border:1px solid #d8deeb;border-radius:10px;font-size:.76rem;line-height:1.45}
.proforma-calc-check strong{font-size:.82rem}.proforma-calc-check span{display:block}.proforma-calc-check small{font-size:.68rem}
.proforma-calc-check.ok{background:#effaf0;border-color:#b9dfbd;color:#1d5426}.proforma-calc-check.warning{background:#fff8e8;border-color:#efd690;color:#71510b}.proforma-calc-check.error{background:#fff0f0;border-color:#e8b5b5;color:#7c1d1d}
.proforma-sheet{background:#fff!important}
.proforma-sheet-letterhead{display:grid;grid-template-columns:135px 1fr;border-bottom:5px solid #103d65;min-height:106px}
.proforma-sheet-logo{display:flex;align-items:center;justify-content:center;background:#103d65;padding:18px}
.proforma-sheet-logo img{width:82px;height:auto;max-height:68px;object-fit:contain}
.proforma-sheet-company{display:flex;flex-direction:column;justify-content:center;padding:12px 18px;color:#103d65}
.proforma-sheet-company>strong{font-size:1.2rem;letter-spacing:.01em}.proforma-sheet-company>span{margin-top:6px;color:#667085;font-size:.7rem}.proforma-sheet-company>b{margin-top:8px;font-size:.78rem}
.proforma-sheet .proforma-doc-heading{padding:18px 8px 12px}
.proforma-reference-table{border-collapse:collapse;min-width:1230px}
.proforma-reference-table thead tr:first-child th{vertical-align:middle}
.proforma-reference-table thead tr+tr th{padding:6px 7px;font-size:.5rem;background:#103d65}
.proforma-reference-table td{border-color:#c7d0dd!important}
.proforma-reference-table .proforma-style-start td:not(.proforma-net-preview){background:#f1f4f8}
.proforma-reference-table .proforma-style-start td[rowspan]{border-bottom:1px solid #c7d0dd}
.proforma-reference-table .proforma-number-cell,.proforma-reference-table .proforma-style-cell{text-align:center!important}
.proforma-reference-table .proforma-deduction-amount-preview{text-align:right!important;white-space:nowrap}
.proforma-reference-table .proforma-deduction-total-row td{background:#e7ebf0;font-weight:900}
.proforma-reference-table .proforma-net-preview{background:#dcf5d4!important;text-align:center!important;font-size:.7rem!important}
.proforma-prepared-by{margin-top:18px;color:#747d8c;font-size:.62rem;font-style:italic}
@media(max-width:760px){.proforma-sheet-letterhead{grid-template-columns:92px 1fr;min-height:84px}.proforma-sheet-logo{padding:10px}.proforma-sheet-logo img{width:58px}.proforma-sheet-company{padding:9px 12px}.proforma-sheet-company>strong{font-size:.92rem}}


/* v422 — cents-safe Proforma math + approved total summary. */
.proforma-total-summary{width:min(520px,100%);margin:18px 0 0;border:1px solid #c7d0dd;background:#fff}
.proforma-total-summary-title{padding:10px 12px;background:#103d65;color:#fff;font-size:.67rem;font-weight:950;letter-spacing:.05em}
.proforma-total-summary>div:not(.proforma-total-summary-title){display:grid;grid-template-columns:minmax(210px,1fr) minmax(110px,.42fr);align-items:center;border-top:1px solid #d8dee8}
.proforma-total-summary>div:not(.proforma-total-summary-title)>span,.proforma-total-summary>div:not(.proforma-total-summary-title)>strong{padding:9px 12px;font-size:.64rem}
.proforma-total-summary>div:not(.proforma-total-summary-title)>span{font-weight:850;color:#24314a}
.proforma-total-summary>div:not(.proforma-total-summary-title)>strong{text-align:right;color:#11164b;border-left:1px solid #d8dee8}
.proforma-total-summary .net{background:#dcf5d4}
@media(max-width:760px){.proforma-total-summary{width:100%}.proforma-total-summary>div:not(.proforma-total-summary-title){grid-template-columns:1fr auto}.proforma-total-summary>div:not(.proforma-total-summary-title)>span{min-width:0}}

/* v424 — Reference PDF parity: CNF columns, one-line summary, signature block, repaired invoice logo. */
.proforma-items-table{min-width:1660px}
.proforma-items-table th:nth-child(2){min-width:130px}
.proforma-items-table th:nth-child(3){min-width:240px}
.proforma-items-table th:nth-child(4){min-width:125px}
.proforma-items-table th:nth-child(5){min-width:145px}
.proforma-items-table th:nth-child(6){min-width:150px}
.proforma-items-table th:nth-child(7){min-width:145px}
.proforma-items-table th:nth-child(8),
.proforma-items-table th:nth-child(9),
.proforma-items-table th:nth-child(10),
.proforma-items-table th:nth-child(11){min-width:135px}
.proforma-value-cell{font-weight:800;white-space:nowrap;text-align:center!important;vertical-align:middle!important;background:#fff!important;color:#11164b}
.proforma-airfreight-cell{font-weight:700}
.proforma-cnf-cell,.proforma-total-cnf-cell{font-weight:900}

.proforma-sheet{background:#fff!important;padding:0!important}
.proforma-sheet-letterhead{display:grid;grid-template-columns:132px 1fr;border-bottom:4px solid #103d65;min-height:86px;align-items:stretch}
.proforma-sheet-logo{display:flex;align-items:center;justify-content:center;background:#103d65;padding:8px;overflow:hidden}
.proforma-sheet-logo img{width:104px;height:78px;max-height:none;object-fit:contain;display:block}
.proforma-sheet-company{display:flex;flex-direction:column;justify-content:center;padding:10px 18px;color:#103d65}
.proforma-sheet-company>strong{font-size:1.24rem;letter-spacing:.01em}
.proforma-sheet-company>span{margin-top:9px;color:#667085;font-size:.68rem}
.proforma-sheet .proforma-doc-heading{padding:14px 8px 10px}
.proforma-doc-heading h2{font-size:1.16rem;letter-spacing:0}
.proforma-doc-heading p{margin-top:7px;font-size:.69rem}
.proforma-doc-heading small{margin-top:5px;font-size:.55rem;letter-spacing:.02em}
.proforma-doc-table-wrap{margin-top:6px}
.proforma-reference-table{min-width:1240px}
.proforma-reference-table th{padding:8px 6px;font-size:.51rem;line-height:1.25}
.proforma-reference-table thead tr+tr th{padding:5px 6px;font-size:.48rem}
.proforma-reference-table td{padding:5px 6px;font-size:.56rem;background:#fff!important;border-color:#c7d0dd!important}
.proforma-reference-table .proforma-style-start td{background:#fff!important}
.proforma-reference-table .proforma-deduction-total-row td{background:#eef1f4!important;font-weight:900}
.proforma-reference-table .proforma-style-cell,
.proforma-reference-table .proforma-number-cell,
.proforma-reference-table .proforma-value-preview{text-align:center!important;vertical-align:middle!important}
.proforma-reference-table .proforma-value-preview{font-size:.58rem!important;background:#fff!important;white-space:nowrap}
.proforma-reference-table .proforma-total-cnf-preview{font-weight:900}
.proforma-reference-table .proforma-description-preview{text-align:left!important;min-width:210px}
.proforma-reference-table .proforma-deduction-amount-preview{text-align:right!important;white-space:nowrap}

.proforma-total-summary{width:100%;margin:10px 0 0;border:1px solid #c7d0dd;background:#fff;display:grid;grid-template-columns:repeat(4,minmax(0,1fr))}
.proforma-total-summary-title{grid-column:1/-1;padding:7px 8px;background:#103d65;color:#fff;font-size:.59rem;font-weight:950;letter-spacing:.035em}
.proforma-total-summary>div:not(.proforma-total-summary-title){display:grid;grid-template-columns:minmax(0,1.55fr) minmax(72px,.7fr);align-items:center;border-top:1px solid #d8dee8;background:#fff!important}
.proforma-total-summary>div:not(.proforma-total-summary-title)+div:not(.proforma-total-summary-title){border-left:1px solid #d8dee8}
.proforma-total-summary>div:not(.proforma-total-summary-title)>span,
.proforma-total-summary>div:not(.proforma-total-summary-title)>strong{padding:6px 7px;font-size:.54rem}
.proforma-total-summary>div:not(.proforma-total-summary-title)>span{font-weight:850;color:#24314a}
.proforma-total-summary>div:not(.proforma-total-summary-title)>strong{text-align:right;color:#11164b;border-left:1px solid #d8dee8;white-space:nowrap}

.proforma-footer-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(390px,42%);gap:34px;align-items:start;margin-top:9px;padding-bottom:8px}
.proforma-prepared-by{margin:0;color:#747d8c;font-size:.56rem;font-style:italic;padding-top:4px}
.proforma-signature-block{color:#103d65;font-size:.56rem}
.proforma-signature-block>strong{display:block;font-size:.58rem;letter-spacing:.01em}
.proforma-signature-line{height:22px;border-bottom:1px solid #8d98aa}
.proforma-signature-meta{display:flex;justify-content:space-between;gap:18px;padding-top:6px;color:#747d8c;font-size:.51rem}
.proforma-signature-meta span:last-child{text-align:right}

@media(max-width:760px){
  .proforma-sheet-letterhead{grid-template-columns:90px 1fr;min-height:72px}
  .proforma-sheet-logo{padding:6px}.proforma-sheet-logo img{width:72px;height:58px}
  .proforma-sheet-company{padding:8px 10px}.proforma-sheet-company>strong{font-size:.9rem}.proforma-sheet-company>span{font-size:.56rem}
  .proforma-total-summary{grid-template-columns:1fr}
  .proforma-total-summary-title{grid-column:1}
  .proforma-total-summary>div:not(.proforma-total-summary-title)+div:not(.proforma-total-summary-title){border-left:0}
  .proforma-footer-row{grid-template-columns:1fr;gap:14px}
  .proforma-signature-block{max-width:none}
}


/* v426 — Proforma invoice now includes From/To party blocks and document facts like the other invoice types. */
.proforma-document .invoice-parties{margin:10px 0 10px;border-color:#cfd6e3}
.proforma-document .invoice-parties>div{padding:12px 14px}
.proforma-document .invoice-parties b{display:block;color:#103d65;font-size:.58rem;letter-spacing:.08em;margin-bottom:8px}
.proforma-document .invoice-parties strong{font-size:.78rem}
.proforma-document .invoice-parties p{margin:6px 0 0;color:#5f6980;font-size:.6rem;line-height:1.6}
.proforma-document .invoice-doc-facts{margin:10px 0 8px}
.proforma-document .invoice-doc-facts>div{padding:8px 9px}
.proforma-document .invoice-doc-facts span{font-size:.5rem}
.proforma-document .invoice-doc-facts strong{font-size:.6rem}
@media(max-width:760px){.proforma-document .invoice-doc-facts{grid-template-columns:repeat(2,minmax(0,1fr))}}


/* v427 - party information on every document + small-amount Proforma layout */
.proforma-simple-document .invoice-doc-title{margin-top:14px}
.proforma-simple-document .invoice-doc-table{min-width:620px}
.proforma-simple-document .invoice-doc-table td:nth-child(2),.proforma-simple-document .invoice-doc-table th:nth-child(2){text-align:left}
.proforma-simple-document .invoice-doc-bottom{grid-template-columns:minmax(0,1fr) 220px}
.proforma-simple-document .invoice-parties b{color:#11164b}
@media(max-width:850px){.proforma-simple-document .invoice-doc-bottom{grid-template-columns:1fr}}


/* v428 - approved TR Global Packing List layout */
.packing-list-document{padding:0!important;background:#fff!important;color:#0f164b;overflow:hidden}
.packing-letterhead{display:grid;grid-template-columns:130px 1fr;align-items:center;padding:18px 22px 10px;border-bottom:3px solid #11164b}
.packing-letterhead img{width:105px;height:78px;object-fit:contain}
.packing-letterhead>div{display:flex;flex-direction:column}.packing-letterhead strong{font-size:1.55rem;line-height:1.05;color:#11164b}.packing-letterhead span{margin-top:10px;font-size:.58rem;letter-spacing:.48em;font-weight:800;color:#11164b}
.packing-title{position:relative;text-align:center;padding:8px 0}.packing-title:before,.packing-title:after{content:"";position:absolute;top:50%;height:2px;background:#11164b;width:31%}.packing-title:before{left:2%}.packing-title:after{right:2%}.packing-title h2{display:inline-block;position:relative;z-index:1;margin:0;padding:0 22px;background:#fff;font-size:1.25rem;color:#11164b}
.packing-info-grid{display:grid;grid-template-columns:1.02fr 1fr 1fr;margin:0 8px;border:1px solid #b9bfd9;border-radius:7px;overflow:hidden}.packing-info-grid section{min-height:72px;padding:12px 14px;border-right:1px solid #c9cee1;border-bottom:1px solid #c9cee1;display:flex;flex-direction:column;justify-content:flex-start}.packing-info-grid section:nth-child(3n){border-right:0}.packing-info-grid b{font-size:.55rem;color:#343893;letter-spacing:.02em}.packing-info-grid strong{margin-top:9px;font-size:.72rem;color:#11164b;line-height:1.35}.packing-info-grid p{margin:8px 0 0;color:#434966;font-size:.62rem;line-height:1.55}.packing-info-grid p span{display:inline-block;min-width:54px;font-weight:800;color:#4d5572}.packing-info-grid p strong{margin:0;font-size:.62rem}.packing-info-grid .sub{margin-top:12px}.packing-exporter{grid-row:span 2;min-height:144px!important}.packing-consignee{grid-row:span 2;min-height:144px!important}.packing-notify{min-height:48px!important;border-bottom:0!important}.packing-awb{grid-column:span 2;min-height:48px!important;border-bottom:0!important;border-right:0!important}
.packing-table-wrap{overflow:auto;margin:8px}.packing-table{width:100%;border-collapse:collapse;min-width:920px}.packing-table th{background:#11164b;color:#fff;font-size:.54rem;padding:7px 5px;border:1px solid #fff;text-align:center}.packing-table td{font-size:.58rem;padding:7px 6px;border:1px solid #c6cce0;text-align:center;color:#11164b}.packing-table td:nth-child(3){text-align:left;font-weight:700}.packing-summary{margin:0 8px 8px;width:min(420px,58%);border:1px solid #c6cce0;padding:7px 10px;display:grid;gap:5px}.packing-summary>div{display:grid;grid-template-columns:1fr .72fr;gap:12px;font-size:.6rem}.packing-summary span{font-weight:800}.packing-summary strong{font-weight:900}.packing-signature{display:grid;grid-template-columns:1fr 240px;gap:40px;align-items:end;padding:8px 16px 10px}.packing-signature>div:last-child span{display:block;height:25px;border-bottom:1px solid #4e5675}.packing-signature strong{display:block;text-align:center;margin-top:5px;font-size:.58rem}.packing-footer{border-top:5px solid #11164b;padding:7px 20px;display:flex;justify-content:center;gap:35px;align-items:center;font-size:.55rem}.packing-footer span{letter-spacing:.35em;font-weight:800}
.packing-item-row td{vertical-align:top}.packing-description-editor{min-width:260px}.packing-description-editor input,.packing-description-editor textarea{margin-bottom:5px}.packing-inch-dims{min-width:165px}.packing-inch-dims input{min-width:48px}
.invoice-items-table .packing-item-row input[name="net_weight_kg"],.invoice-items-table .packing-item-row input[name="gross_weight_kg"]{min-width:110px}
@media(max-width:760px){.packing-letterhead{grid-template-columns:82px 1fr;padding:12px}.packing-letterhead img{width:70px;height:54px}.packing-letterhead strong{font-size:1.05rem}.packing-letterhead span{font-size:.46rem;letter-spacing:.25em}.packing-info-grid{grid-template-columns:1fr}.packing-info-grid section,.packing-info-grid section:nth-child(3n){border-right:0}.packing-exporter,.packing-consignee{grid-row:auto;min-height:110px!important}.packing-awb{grid-column:auto}.packing-summary{width:auto}.packing-signature{grid-template-columns:1fr}}


/* v429 invoice sets, style links and filed-document clarity */
.invoice-set-group{border:1px solid rgba(17,19,74,.14);border-radius:18px;background:#fff;overflow:hidden;margin:0 0 18px;box-shadow:0 8px 24px rgba(15,22,75,.05)}
.invoice-set-header{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;background:linear-gradient(135deg,#f4f7fb,#fff);border-bottom:1px solid rgba(17,19,74,.1)}
.invoice-set-header div{display:flex;align-items:baseline;gap:10px}.invoice-set-header span{font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;color:#667085}.invoice-set-header strong{font-size:1.08rem;color:#11134a}.invoice-set-header small{color:#667085}
.invoice-set-documents{display:grid;gap:0}.invoice-set-documents .invoice-list-card{border-radius:0;border-left:0;border-right:0;border-top:0;margin:0}.invoice-set-documents .invoice-list-card:last-child{border-bottom:0}
.invoice-style-chips{display:flex;flex-wrap:wrap;gap:5px;margin-top:7px}.invoice-style-chips a,.invoice-style-chips span{display:inline-flex;align-items:center;padding:3px 7px;border-radius:999px;background:#eef3fb;border:1px solid #d9e2f1;color:#103d65;font-size:.7rem;font-weight:700;text-decoration:none}.invoice-style-chips a:hover{background:#dfe9f7}
.invoice-form-grid select[multiple]{min-height:150px;padding:8px}.invoice-set-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.invoice-set-actions small{color:#667085;max-width:680px}
@media(max-width:720px){.invoice-set-header{align-items:flex-start;flex-direction:column}.invoice-set-actions{align-items:stretch}.invoice-set-actions .btn{width:100%}}
