
/* Items to Order: show table fields and next actions as readable cards on phones. */
@media(max-width:750px){
 body:has(#portal-nav a.active[href="?page=ordering"]) main .panel.tablewrap{overflow:visible}
 body:has(#portal-nav a.active[href="?page=ordering"]) main .panel.tablewrap table{min-width:0;white-space:normal}
 body:has(#portal-nav a.active[href="?page=ordering"]) main .panel.tablewrap thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
 body:has(#portal-nav a.active[href="?page=ordering"]) main .panel.tablewrap tbody tr{display:block;width:100%;margin:0 0 14px;padding:8px 12px;border:1px solid #e1e8ef;border-radius:10px;background:#fbfdff;white-space:normal}
 body:has(#portal-nav a.active[href="?page=ordering"]) main .panel.tablewrap tbody tr:hover{background:#f8fafc}
 body:has(#portal-nav a.active[href="?page=ordering"]) main .panel.tablewrap td{display:grid;grid-template-columns:minmax(105px,35%) minmax(0,1fr);gap:8px;width:100%;padding:10px 2px;text-align:left;white-space:normal;overflow-wrap:anywhere;border-bottom:1px solid #edf0f3}
 body:has(#portal-nav a.active[href="?page=ordering"]) main .panel.tablewrap td:before{color:#718699;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.35px}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(8)) td:nth-child(1):before{content:"Customer LPO"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(8)) td:nth-child(2):before{content:"Item"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(8)) td:nth-child(3):before{content:"Required"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(8)) td:nth-child(4):before{content:"Ordered"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(8)) td:nth-child(5):before{content:"Remaining"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(8)) td:nth-child(6):before{content:"Supplier"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(8)) td:nth-child(7):before{content:"Expected delivery"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(8)) td:nth-child(8):before{content:"Action"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(7)) td:nth-child(1):before{content:"Supplier PO"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(7)) td:nth-child(2):before{content:"Customer LPO"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(7)) td:nth-child(3):before{content:"Item"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(7)) td:nth-child(4):before{content:"PO quantity"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(7)) td:nth-child(5):before{content:"Allocated to shipment"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(7)) td:nth-child(6):before{content:"Received"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(7)) td:nth-child(7):before{content:"Next step"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(6)) td:nth-child(1):before{content:"Customer LPO"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(6)) td:nth-child(2):before{content:"Item"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(6)) td:nth-child(3):before{content:"Required"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(6)) td:nth-child(4):before{content:"Ordered"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(6)) td:nth-child(5):before{content:"Received"}
 body:has(#portal-nav a.active[href="?page=ordering"]) table:has(th:nth-child(6)) td:nth-child(6):before{content:"Next step"}
 body:has(#portal-nav a.active[href="?page=ordering"]) main .panel.tablewrap td:last-child{display:block;border-bottom:0;padding-top:12px}
 body:has(#portal-nav a.active[href="?page=ordering"]) main .panel.tablewrap td:last-child:before{display:block;margin-bottom:8px}
 body:has(#portal-nav a.active[href="?page=ordering"]) main .panel.tablewrap td:last-child .primary,body:has(#portal-nav a.active[href="?page=ordering"]) main .panel.tablewrap td:last-child .btn{width:100%;justify-content:center}
 body:has(#portal-nav a.active[href="?page=ordering"]) main .panel.tablewrap td.empty{display:block;text-align:center}
 body:has(#portal-nav a.active[href="?page=ordering"]) main .panel.tablewrap td.empty:before{content:none}
}:root{font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:#183047;background:#f4f7fb;font-size:14px}*{box-sizing:border-box}body{margin:0;display:flex;min-height:100vh}aside{background:#10283e;color:#cbd6e1;width:246px;flex-shrink:0;display:flex;flex-direction:column;padding:28px 17px}main{padding:38px 42px;flex:1;min-width:0;max-width:1700px}.brand,.authhead{display:flex;gap:12px;align-items:center;color:white;font-size:16px;font-weight:750;line-height:1.22;padding:0 8px 32px}.brand small,.authhead small{display:block;color:#9aafc0;font-size:11px;font-weight:450;margin-top:7px}.symbol{display:inline-flex;align-items:center;justify-content:center;width:45px;height:45px;border-radius:13px;background:#2d88ae;color:white;font-size:16px;font-weight:800;flex-shrink:0}nav{display:grid;gap:6px}nav a{display:block;text-decoration:none;color:#cbd6e1;padding:13px 14px;border-radius:9px;font-weight:550}nav a:hover,nav a.active{background:#22445d;color:white}.sidebar-foot{margin-top:auto;padding:25px 12px 0;color:#8ea8ba;font-size:12px;line-height:2}button,a.btn{cursor:pointer}button.linkbutton{border:0;padding:0;background:transparent;color:#e4f5ff;font:inherit;text-decoration:underline}header{display:flex;justify-content:space-between;align-items:center;margin-bottom:30px;gap:15px}header small{color:#718699;font-weight:600}h1{font-size:28px;letter-spacing:-.8px;margin:7px 0 0}h2{font-size:17px;margin:0 0 17px}p{line-height:1.6;color:#697e90}.pill{border:1px solid #d8e4ee;color:#54768b;background:#fff;border-radius:50px;padding:10px 14px;font-size:12px}.cards{display:grid;grid-template-columns:repeat(4,minmax(175px,1fr));gap:16px;margin-bottom:35px}.stat,.panel{background:white;border:1px solid #e1e8ef;border-radius:14px;box-shadow:0 4px 18px #12263a08}.stat{padding:23px}.stat span,.stat small{display:block;color:#798b9b;font-size:12px}.stat strong{display:block;margin:18px 0;font-size:23px;color:#193a56;white-space:nowrap}.panel{padding:25px;margin-bottom:20px}.section-title{display:flex;align-items:center;justify-content:space-between;margin:20px 0 12px;gap:12px}.section-title h2{margin:0}.btn,.primary{display:inline-flex;align-items:center;text-decoration:none;background:#126c91;color:white;border:0;border-radius:8px;padding:12px 16px;font-weight:650;font-size:13px}.btn:hover,.primary:hover{background:#0a587b}table{border-collapse:collapse;width:100%;font-size:13px;white-space:nowrap}td,th{padding:15px 13px;text-align:left;border-bottom:1px solid #edf0f3}th{color:#718699;font-size:11px;text-transform:uppercase;letter-spacing:.4px}tbody tr:hover{background:#f8fafc}.tablewrap{overflow:auto}.tag{background:#eaf2f7;border-radius:20px;padding:6px 9px;color:#31617c}.numeric{text-align:right;font-variant-numeric:tabular-nums}.empty{text-align:center;color:#95a4b0;padding:34px}.hint{font-size:12px}.formgrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}label{display:block;color:#506a7d;font-size:12px;font-weight:650}input,select{display:block;width:100%;margin-top:8px;padding:12px 13px;border:1px solid #d5e0e8;border-radius:8px;background:white;color:#213d53;font:inherit;font-weight:450;min-height:43px}input:focus,select:focus{outline:2px solid #87c3da;outline-offset:1px}.wide{grid-column:1/-1}.notice,.error{padding:14px 16px;border-radius:10px;margin:12px 0 22px}.notice{color:#235d4a;background:#e8f5f0}.error{color:#923d3d;background:#feeeee}.downloads{display:flex;gap:12px;flex-wrap:wrap}.auth{margin:auto;max-width:450px;padding:25px}.authhead{color:#173852;padding:0 0 20px}.authpanel{padding:34px}.authpanel form{display:grid;gap:20px;margin-top:26px}.authpanel .primary{justify-content:center}@media(max-width:1120px){.cards{grid-template-columns:repeat(2,1fr)}}@media(max-width:750px){body{display:block}aside{width:100%;padding:15px}.brand{padding:0 4px 12px}.sidebar-foot{display:none}nav{display:flex;overflow:auto;gap:3px}nav a{white-space:nowrap;padding:10px;font-size:12px}main{padding:20px 15px}header{align-items:flex-start}.pill{display:none}.cards{grid-template-columns:1fr 1fr;gap:8px}.stat{padding:16px}.stat strong{font-size:17px}.formgrid{grid-template-columns:1fr}.panel{padding:17px}}@media(max-width:400px){.cards{grid-template-columns:1fr}}
.itemcard{padding:20px;border:1px solid #dce7ed;border-radius:12px;margin:20px 0;background:#fafcfe}.itemcard h3{font-size:14px;color:#193a56}.inlineform{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap}.inlineform select{min-width:175px;margin:0}.inlineform button{white-space:nowrap}a{color:#126c91}

a.stat{display:block;color:inherit;text-decoration:none;transition:border-color .15s,box-shadow .15s}a.stat:hover{border-color:#9cc6d9;box-shadow:0 7px 22px #12263a14}a.stat:focus-visible{outline:3px solid #72b4d0;outline-offset:2px}
.global-search{display:flex;gap:6px;margin:0 0 16px}.global-search input{min-width:0;margin:0;background:#18364e;border-color:#315169;color:white;padding:10px}.global-search input::placeholder{color:#9bb1c1}.global-search button{border:0;border-radius:7px;background:#2d88ae;color:white;padding:0 12px;font-size:20px}.sidebar-foot{overflow-wrap:anywhere}.compact-cards{grid-template-columns:repeat(4,minmax(145px,1fr));margin-bottom:20px}textarea{display:block;width:100%;margin-top:8px;padding:11px 12px;border:1px solid #d5e0e8;border-radius:8px;background:white;color:#213d53;font:inherit;line-height:1.5;resize:vertical}textarea:focus{outline:2px solid #87c3da;outline-offset:1px}input.check{display:inline-block;width:18px;min-height:18px;height:18px;margin:10px 4px;padding:0;accent-color:#126c91}.pipeline{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.pipeline div{border:1px solid #edf0f3;border-radius:10px;padding:16px}.pipeline span,.pipeline strong{display:block}.pipeline span{color:#718699;font-size:12px}.pipeline strong{margin-top:10px;color:#193a56}@media(max-width:750px){.global-search{margin-bottom:10px}nav{padding-bottom:3px}.compact-cards{grid-template-columns:1fr 1fr}.pipeline{grid-template-columns:1fr}}@media(max-width:400px){.compact-cards{grid-template-columns:1fr}.section-title{align-items:flex-start;flex-direction:column}}
.inline-actions{display:flex;gap:8px;flex-wrap:wrap}.inline-actions form{margin:0}details summary{cursor:pointer;color:#126c91;font-weight:650}details[open] summary{margin-bottom:12px}.line-edit{min-width:600px;padding:14px;background:#f7fafc;border:1px solid #e1e8ef;border-radius:10px}.line-edit input,.line-edit select{padding:8px;min-height:36px}@media(max-width:750px){.inline-actions{width:100%}.inline-actions form{flex:1}.inline-actions .btn{width:100%;justify-content:center}}
.chart-legend{display:flex;gap:20px;flex-wrap:wrap;margin:0 0 14px;color:#617789;font-size:12px}.chart-legend span:before{content:"";display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:7px}.legend-sales:before{background:#1685a7}.legend-purchases:before{background:#6f87b7}.legend-expenses:before{background:#d08b4c}.chart-scroll{overflow-x:auto}.chart-scroll svg{display:block;width:100%;min-width:580px;height:auto}
.invoice-edit-line{margin-top:14px;padding:16px;border:1px solid #e1e8ef;border-radius:10px;background:#f8fafb}.invoice-edit-line>strong{display:block;margin-bottom:12px;color:#193a56}.invoice-edit-line form{margin:8px 0}.invoice-edit-line .formgrid{grid-template-columns:repeat(4,minmax(130px,1fr))}@media(max-width:750px){.invoice-edit-line .formgrid{grid-template-columns:1fr 1fr}}@media(max-width:450px){.invoice-edit-line .formgrid{grid-template-columns:1fr}}
.quote-actions{margin:0 0 14px}.quote-paper{background:#fff;border:1px solid #e1e8ef;border-radius:14px;padding:36px;box-shadow:0 4px 18px #12263a08;color:#183047}.quote-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(260px,42%);gap:28px;align-items:center;border-bottom:2px solid #176f9c;padding-bottom:18px}.quote-head h2{font-size:22px;letter-spacing:.2px;margin:0 0 8px;color:#172f45}.quote-head p{margin:0;line-height:1.55;color:#34495b}.quote-logo{text-align:right}.quote-logo img{display:inline-block;max-width:100%;max-height:120px;object-fit:contain}.quote-logo strong{font-size:18px;color:#176f9c}.quote-title{font-size:24px;letter-spacing:1.4px;margin:22px 0 16px;color:#173851}.quote-info{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:0 0 24px}.quote-info section{line-height:1.6;overflow-wrap:anywhere}.quote-info section+section{text-align:right}.quote-table-wrap{width:100%;overflow-x:auto}.quote-table{width:100%;table-layout:fixed;border-collapse:collapse;white-space:normal;font-size:12px}.quote-table th,.quote-table td{border-bottom:1px solid #dce5ec;padding:10px 8px;text-align:left;vertical-align:top;overflow-wrap:anywhere}.quote-table th{color:#526f84;font-size:10px;letter-spacing:.35px}.quote-table th:first-child,.quote-table td:first-child{width:6%;text-align:center}.quote-table th:nth-child(2),.quote-table td:nth-child(2){width:35%}.quote-table th:nth-child(3),.quote-table td:nth-child(3){width:12%}.quote-table th:nth-child(4),.quote-table td:nth-child(4){width:15%;text-align:right}.quote-table th:last-child,.quote-table td:last-child{text-align:right}.quote-summary{display:flex;justify-content:flex-end;margin:18px 0 24px}.quote-total-lines{width:min(100%,390px)}.quote-total-lines>div{display:flex;justify-content:space-between;gap:20px;padding:6px 0;border-bottom:1px solid #edf0f3}.quote-total-lines .quote-grand-total{border-top:2px solid #176f9c;border-bottom:0;margin-top:4px;padding-top:12px;font-size:17px;color:#173851}.quote-terms{margin:24px 0 18px;line-height:1.65;overflow-wrap:anywhere}.quote-terms h2,.quote-bank h3{font-size:15px;margin:0 0 8px;color:#173851}.quote-terms>div{margin:3px 0}.quote-bank{margin:18px 0;padding:12px;border:1px solid #dce5ec;border-radius:6px;overflow-wrap:anywhere}.quote-footer{margin-top:28px;border-top:1px solid #879bab;padding-top:14px;display:flex;justify-content:space-between;align-items:flex-end;gap:20px;flex-wrap:wrap}.quote-signature{min-width:220px;display:grid;gap:4px}.quote-signature img{max-width:160px;max-height:65px;object-fit:contain;object-position:left center;margin:0 0 4px}.quote-signature strong{font-size:14px}.quote-signature span{font-size:12px;color:#60788a}.quote-company-contact{font-size:11px;color:#60788a;text-align:right;overflow-wrap:anywhere}.customer-summary{min-height:1px;color:#526a7d;font-size:12px;line-height:1.5}.customer-summary span{display:block}.import-form{margin-top:18px}.import-form label{min-width:min(100%,320px)}.import-preview{margin-top:20px;padding-top:16px;border-top:1px solid #e5ebf0}.import-preview .inlineform{margin:14px 0}.import-preview table{white-space:normal;min-width:820px}.check-row{display:flex;align-items:center;gap:8px}.check-row input{width:18px;min-height:18px;margin:0}.quote-paper a{color:#176f9c;text-decoration:none}
@media(max-width:750px){.quote-paper{padding:20px 14px}.quote-head{grid-template-columns:1fr;gap:12px}.quote-logo{text-align:left}.quote-logo img{max-height:90px}.quote-info{grid-template-columns:1fr}.quote-info section+section{text-align:left}.quote-summary{justify-content:flex-start}.quote-table{min-width:700px}.quote-company-contact{text-align:left}}


/* Quote columns use a matching colgroup when discount or mixed VAT fields appear. */
.quote-table th:first-child,.quote-table td:first-child,.quote-table th:nth-child(2),.quote-table td:nth-child(2),.quote-table th:nth-child(3),.quote-table td:nth-child(3),.quote-table th:nth-child(4),.quote-table td:nth-child(4){width:auto}.quote-table th:first-child,.quote-table td:first-child{text-align:center}.quote-table th:nth-child(4),.quote-table td:nth-child(4){text-align:right}.quote-table col{width:auto}


.quote-actions{display:flex;align-items:center;gap:12px;flex-wrap:wrap}.quote-actions [data-pdf-status]{color:#526f84;font-size:13px}.quote-title{display:flex;justify-content:space-between;align-items:baseline;gap:16px}.quote-title span{font-size:13px;letter-spacing:0;color:#526f84}.quote-info{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}.quote-info section{padding:12px 14px;border:1px solid #dce5ec;border-radius:9px;background:#f8fbfd;min-width:0}.quote-info section+section{text-align:left}.quote-info section h2{margin:0 0 7px;color:#176f9c;font-size:11px;letter-spacing:.45px;text-transform:uppercase}.quote-item-identity{display:grid;gap:2px;margin-bottom:3px}.quote-part-code{white-space:normal;overflow-wrap:normal;word-break:normal;hyphens:none}.quote-item-description{overflow-wrap:anywhere;word-break:normal}.quote-review-note{margin:0 0 14px;padding:12px 14px;border:1px solid #e6c87d;border-radius:8px;background:#fff9e7;color:#5b4a1d;line-height:1.5}.quote-validity-form [data-valid-until][readonly]{background:#f1f5f7;color:#536b7b}
.quote-table th:not(:nth-child(2)),.quote-table td:not(:nth-child(2)){text-align:right}.quote-table th:first-child,.quote-table td:first-child{text-align:center}


.workflow-tabs{display:flex;gap:8px;overflow-x:auto;margin:0 0 18px;padding:2px 0 8px;scrollbar-width:thin}.workflow-tabs a{flex:0 0 auto;padding:9px 12px;border:1px solid #dbe5ec;border-radius:999px;background:#f8fbfd;color:#365a72;text-decoration:none;font-size:12px;font-weight:650}.workflow-tabs a.active,.workflow-tabs a:hover{background:#126c91;border-color:#126c91;color:#fff}.workflow-tabs span{margin-left:5px;padding:2px 6px;border-radius:999px;background:#ffffff38;font-size:10px}.profile-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.profile-summary .stat strong{white-space:normal}@media(max-width:750px){.profile-summary{grid-template-columns:1fr 1fr}.workflow-tabs{margin-right:-3px}}

.contact-kind-tabs{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}.contact-kind-tabs a{display:inline-block;padding:8px 12px;border:1px solid #dbe5ec;border-radius:999px;background:#f8fbfd;color:#365a72;text-decoration:none;font-size:12px;font-weight:650}.contact-kind-tabs a.active,.contact-kind-tabs a:hover{background:#126c91;border-color:#126c91;color:#fff}.contact-detail-panel .section-title{align-items:flex-start;gap:16px;flex-wrap:wrap}.contact-detail-panel h2{margin:8px 0 0}.contact-detail-actions{display:flex;gap:8px;flex-wrap:wrap}.contact-ledgers>.section-title{margin:24px 0 12px;align-items:center;gap:12px;flex-wrap:wrap}.contact-ledgers>.section-title h2{margin:0}.contact-ledgers .panel h3{margin-top:0}.contact-ledgers .tablewrap{overflow-x:auto}.contact-ledgers table{min-width:620px}.contact-ledgers .ledger-detail{background:#f8fbfd;color:#536e82;font-size:.92em}.contact-detail-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin-top:18px}.contact-detail-item{min-width:0;padding:14px;border:1px solid #e1e8ef;border-radius:10px;background:#f8fbfd}.contact-detail-item>span{display:block;margin-bottom:6px;color:#617789;font-size:12px;font-weight:650}.contact-detail-item strong{display:block;color:#193a56;overflow-wrap:anywhere;white-space:normal}.contact-detail-item em{color:#8595a2;font-weight:400}@media(max-width:850px){.contact-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.contact-detail-panel .section-title{display:flex}}@media(max-width:560px){.contact-detail-grid{grid-template-columns:1fr}.contact-kind-tabs{justify-content:flex-start}.contact-detail-actions .btn{flex:1 1 auto;text-align:center}.contact-ledgers>.section-title .btn{width:100%;text-align:center}}

/* Responsive portal navigation: keep desktop sidebar and use an accessible vertical menu on phones. */
.sidebar-head{display:flex;align-items:center;justify-content:space-between;gap:10px}.sidebar-head .brand{min-width:0}.nav-toggle{display:none}
@media(max-width:750px){
  aside.portal-sidebar{position:relative;z-index:30;width:100%;padding:12px 15px;overflow:visible}
  .sidebar-head .brand{padding:0 4px;line-height:1.15}
  .sidebar-head .brand small{margin-top:4px}
  .nav-toggle{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:42px;padding:8px 12px;border:1px solid #3b6078;border-radius:8px;background:#18364e;color:#fff;font:inherit;font-size:14px;font-weight:650}
  .nav-toggle span:first-child{font-size:20px;line-height:1}
  #portal-nav{display:none;position:static;max-height:min(70vh,560px);overflow-y:auto;overscroll-behavior:contain;margin:8px -15px 0;padding:8px 15px 14px;background:#10283e;border-top:1px solid #315169}
  aside.portal-sidebar.nav-open #portal-nav{display:grid}
  #portal-nav a{white-space:normal;padding:12px 14px;font-size:14px}
  .portal-sidebar .global-search{margin:12px 0 0}
  .portal-sidebar .sidebar-foot{display:none}
  .portal-sidebar.nav-open .sidebar-foot{display:block;position:static;margin:8px 0 0;padding:10px 8px 0;border-top:1px solid #315169;color:#a9bdcc}
}

.btn.danger{background:#a63232}.btn.danger:hover{background:#842727}.contact-delete-form{display:inline-flex;margin:4px 0 4px 8px}

@media(max-width:750px){
  .approval-queue-review .tablewrap{overflow:visible}
  .approval-queue-review .approval-queue-table,.approval-queue-review .approval-queue-table tbody,.approval-queue-review .approval-queue-table tr,.approval-queue-review .approval-queue-table td{display:block;width:100%;white-space:normal}
  .approval-queue-review .approval-queue-table thead{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
  .approval-queue-review .approval-queue-table tbody tr{margin:0 0 14px;padding:8px 12px;border:1px solid #e1e8ef;border-radius:10px;background:#fbfdff}
  .approval-queue-review .approval-queue-table tbody tr:hover{background:#f8fafc}
  .approval-queue-review .approval-queue-table td{display:grid;grid-template-columns:minmax(100px,34%) minmax(0,1fr);gap:8px;padding:10px 2px;text-align:left;border-bottom:1px solid #edf0f3;overflow-wrap:anywhere}
  .approval-queue-review .approval-queue-table td:before{content:attr(data-label);color:#718699;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.35px}
  .approval-queue-review .approval-queue-table td[data-label="Decision"]{display:block;padding-top:12px;border-bottom:0}
  .approval-queue-review .approval-queue-table td[data-label="Decision"]:before{display:block;margin-bottom:8px}
  .approval-queue-review .approval-form label{margin-bottom:8px}
  .approval-queue-review .approval-form .inline-actions{display:grid;grid-template-columns:1fr;gap:8px}
  .approval-queue-review .approval-form .inline-actions button{width:100%;justify-content:center}
}

/* ERP dashboard launchpad */
.erp-launchpad{background:#fff;border:1px solid #dfe7ef;border-radius:18px;padding:28px;margin:0 0 26px;box-shadow:0 6px 24px #10283e0a}.erp-launchpad-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:22px}.erp-launchpad-heading h2{font-size:22px;letter-spacing:-.4px;margin:5px 0 3px;color:#183047}.erp-launchpad-heading p{margin:0;color:#728699;font-size:13px}.erp-eyebrow{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:#2e7896;font-weight:750}.erp-launchpad-badge{white-space:nowrap;border:1px solid #dce8ef;border-radius:24px;padding:10px 14px;color:#4b7085;font-size:12px;font-weight:650;background:#f8fbfd}.erp-module-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.erp-module{min-width:0;min-height:78px;display:flex;align-items:center;gap:14px;padding:15px 17px;border-radius:13px;background:#f3f6f8;border:1px solid transparent;text-decoration:none;color:#183047;transition:background .15s ease,border-color .15s ease,transform .15s ease}.erp-module:hover,.erp-module:focus-visible{background:#eaf3f7;border-color:#c7dce7;transform:translateY(-1px);outline:none}.erp-module-icon{width:42px;height:42px;flex:0 0 42px;display:grid;place-items:center;border-radius:11px;background:#fff;color:#2c7999;border:1px solid #e2ebf0}.erp-module-icon svg{width:23px;height:23px}.erp-module-copy{display:grid;gap:4px;min-width:0}.erp-module-copy strong{font-size:15px;line-height:1.25}.erp-module-copy small{font-size:11px;line-height:1.35;color:#728699}.erp-module-arrow{margin-left:auto;color:#7a91a1;font-size:17px;flex:0 0 auto}.erp-module:focus-visible{outline:3px solid #75b6d0;outline-offset:2px}@media(max-width:750px){.erp-launchpad{padding:20px;margin-bottom:20px}.erp-module-grid{gap:9px}.erp-module{min-height:72px;padding:12px;gap:10px}.erp-module-icon{width:36px;height:36px;flex-basis:36px}.erp-module-icon svg{width:20px;height:20px}.erp-module-copy strong{font-size:13px}.erp-module-copy small{font-size:10px}}@media(max-width:520px){.erp-launchpad-heading{align-items:flex-start}.erp-launchpad-heading h2{font-size:19px}.erp-launchpad-badge{font-size:10px;padding:8px 10px}.erp-module-grid{grid-template-columns:1fr}.erp-module{min-height:68px}.erp-module-copy strong{font-size:14px}.erp-module-copy small{font-size:11px}}

/* Required action alerts */
.header-actions{display:flex;align-items:center;gap:10px}.required-action-alert,.nav-required-actions{display:inline-flex;align-items:center;gap:9px;text-decoration:none;font-weight:700}.required-action-alert{border:1px solid #f0c9c9;background:#fff7f7;border-radius:11px;padding:9px 12px;color:#7b2730;font-size:12px;white-space:nowrap}.required-action-alert:hover,.nav-required-actions:hover{background:#fff0f0}.notification-badge{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#cf3039;color:#fff;font-size:11px;font-weight:800;line-height:1;box-shadow:0 0 0 2px #fff}.notification-clear{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;padding:0 5px;border-radius:999px;background:#e7eef2;color:#547184;font-size:10px;font-weight:750}.nav-required-actions{justify-content:space-between;color:#f3d5d7;background:#432b36;border:1px solid #65404a;border-radius:9px;padding:11px 13px;margin:3px 0 7px;font-size:13px}.nav-required-actions .notification-badge{box-shadow:0 0 0 2px #432b36}.section-badge{margin-left:5px;vertical-align:middle}.required-action-bell svg{width:18px;height:18px;display:block}@media(max-width:750px){header{align-items:flex-start}.header-actions{gap:7px;flex-wrap:wrap;justify-content:flex-end}.required-action-label{display:none}.required-action-alert{padding:8px}.header-actions .pill{font-size:10px;padding:8px 10px}}@media(max-width:430px){.header-actions{max-width:112px}.required-action-alert{gap:5px}.nav-required-actions{min-height:44px}}

.portal-sidebar nav a:not(.nav-required-actions){display:flex;align-items:center;justify-content:space-between;gap:9px}.portal-sidebar nav .nav-count{flex:0 0 auto;min-width:20px;height:20px;padding:0 5px;font-size:10px;box-shadow:0 0 0 2px #10283e}

.workflow-tabs .lpo-submit-count{display:inline-flex;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#cf3039;color:#fff;font-size:11px;font-weight:800;line-height:1;box-shadow:0 0 0 2px #fff}

.page-back{display:inline-flex;align-items:center;gap:6px;margin:-12px 0 15px;padding:8px 12px;border:1px solid #d7e2ea;border-radius:8px;background:#fff;color:#315a72;text-decoration:none;font-size:13px;font-weight:650}.page-back:hover{background:#edf6fa;border-color:#a9cddd}.page-shortcuts{margin:0 0 22px;padding:0 0 8px}.page-shortcuts a{font-size:13px}@media(max-width:750px){.page-back{margin:0 0 12px}.page-shortcuts{margin-bottom:16px}}
body[data-module-mode="create"] main>.panel:not(#create-record),body[data-module-mode="create"] main>details.panel:not(.create-related-panel),body[data-module-mode="view"] main>.panel:not(#record-register),body[data-module-mode="view"] main>details.panel,body[data-module-mode="alter"] main>.panel:not(#record-register),body[data-module-mode="alter"] main>details.panel{display:none!important}.module-mode-hint{margin:-10px 0 18px;padding:10px 13px;border-left:3px solid #2d88ae;background:#eef6fa;color:#49677b;font-size:13px;border-radius:0 8px 8px 0}

/* Goods Receiving: keep receipt quantities visible on narrow screens. */
@media (max-width: 750px) {
  body:has(form.data-receiving-prefill) form.data-receiving-prefill .tablewrap { overflow: visible; }
  body:has(form.data-receiving-prefill) form.data-receiving-prefill table { width: 100%; min-width: 0; white-space: normal; }
  body:has(form.data-receiving-prefill) form.data-receiving-prefill thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
  body:has(form.data-receiving-prefill) form.data-receiving-prefill tbody tr { display: block; width: 100%; margin: 0 0 14px; padding: 8px 12px; border: 1px solid #e1e8ef; border-radius: 10px; background: #fbfdff; white-space: normal; }
  body:has(form.data-receiving-prefill) form.data-receiving-prefill td { display: grid; grid-template-columns: minmax(105px, 35%) minmax(0, 1fr); gap: 8px; width: 100%; padding: 9px 2px; text-align: left; white-space: normal; overflow-wrap: anywhere; border-bottom: 1px solid #edf0f3; }
  body:has(form.data-receiving-prefill) form.data-receiving-prefill td::before { color: #718699; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .35px; }
  body:has(form.data-receiving-prefill) form.data-receiving-prefill td:nth-child(1)::before { content: 'Select line'; }
  body:has(form.data-receiving-prefill) form.data-receiving-prefill td:nth-child(2)::before { content: 'LPO / Part'; }
  body:has(form.data-receiving-prefill) form.data-receiving-prefill td:nth-child(3)::before { content: 'Ordered'; }
  body:has(form.data-receiving-prefill) form.data-receiving-prefill td:nth-child(4)::before { content: 'Accepted to date'; }
  body:has(form.data-receiving-prefill) form.data-receiving-prefill td:nth-child(5)::before { content: 'Rejected to date'; }
  body:has(form.data-receiving-prefill) form.data-receiving-prefill td:nth-child(6)::before { content: 'Received qty'; }
  body:has(form.data-receiving-prefill) form.data-receiving-prefill td:nth-child(7)::before { content: 'Rejected qty'; }
  body:has(form.data-receiving-prefill) form.data-receiving-prefill td:nth-child(8)::before { content: 'Location'; }
  body:has(form.data-receiving-prefill) form.data-receiving-prefill td:nth-child(9)::before { content: 'Remarks'; }
  body:has(form.data-receiving-prefill) form.data-receiving-prefill td input { width: 100%; min-width: 0; }
}

/* Hide Goods Receiving pending badges when there is no work waiting. */
.nav-count.notification-clear,
.section-count[aria-label^="0 pending"] {
      display: none !important;
}

/* Keep the Delivery Notes Create pending count prominent in every tab state. */
.workflow-tabs a .notification-badge[aria-label*="received LPOs ready for delivery-note creation"]{display:inline-flex!important;align-items:center;justify-content:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:#cf3039!important;color:#fff!important;font-size:11px;font-weight:800;line-height:1;box-shadow:0 0 0 2px #fff!important}

/* Delivery Notes Create queue badge */
.workflow-tabs .notification-badge{background:#cf3039!important;color:#fff!important;box-shadow:0 0 0 2px #fff!important}


/* Delivery note and saved-document layout */
#print-document { box-sizing: border-box; max-width: 980px; margin: 24px auto; padding: 34px 38px; background: #fff; color: #172b3d; border: 1px solid #dce4eb; border-radius: 12px; box-shadow: 0 8px 24px rgba(21, 43, 61, .08); font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 1.45; }
#print-document > h2 { margin: 0 0 22px; padding: 0 0 12px; border-bottom: 2px solid #245f91; color: #153f65; font-size: 21px; letter-spacing: .4px; }
#print-document .document-brand-row { display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 24px; min-height: 78px; margin: 0 0 26px; padding: 0 0 18px; border-bottom: 1px solid #dbe3e9; }
#print-document .document-logo { flex: 0 1 290px; width: 290px; max-width: 42%; text-align: right; }
#print-document .document-logo img { display: inline-block; width: auto !important; height: auto !important; max-width: 100% !important; max-height: 74px !important; object-fit: contain; object-position: right center; vertical-align: middle; }
#print-document .document-brand { flex: 1 1 auto; margin: 0; color: #536779; font-size: 11px; line-height: 1.55; text-align: left; }
#print-document .document-brand strong { display: inline-block; margin-bottom: 3px; color: #163f63; font-size: 15px; }
#print-document .delivery-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 34px; margin: 0 0 22px; padding: 16px 18px; border: 1px solid #dce5ec; border-radius: 7px; background: #f7fafc; }
#print-document .delivery-meta > div { min-width: 0; }
#print-document .delivery-meta b { display: block; margin-bottom: 6px; color: #245f91; font-size: 10px; letter-spacing: .8px; text-transform: uppercase; }
#print-document .document-items { width: 100%; margin: 0 0 20px; border-collapse: collapse; font-size: 11px; }
#print-document .document-items th { padding: 10px 8px; background: #174b75; color: #fff; font-size: 9px; letter-spacing: .45px; text-align: left; }
#print-document .document-items td { padding: 10px 8px; border-bottom: 1px solid #dbe3e9; vertical-align: top; }
#print-document .document-items tbody tr:nth-child(even) { background: #f7fafc; }
#print-document .signature-line { height: 36px; margin: 6px 0 5px; border-bottom: 1px solid #738493; }




/* Professional delivery note letterhead, detail block, items table and sign-off. */
#print-document .document-brand-row { align-items: flex-start; flex-direction: row-reverse; gap: 24px; min-height: 86px; margin-bottom: 20px; padding: 0 0 15px; border-bottom: 2px solid #174b75; }
#print-document .document-logo { flex: 0 0 245px; width: 245px; max-width: 43%; padding-top: 3px; }
#print-document .document-logo img { max-width: 245px !important; max-height: 68px !important; }
#print-document .document-brand { color: #33485a; font-size: 10.5px; }
#print-document .document-brand strong { color: #173f62; font-size: 15px; }
#print-document .delivery-parties { grid-template-columns: 1fr 1fr; gap: 26px; margin: 0 0 17px; padding: 0 0 17px; border: 0; border-bottom: 1px solid #bdcbd6; border-radius: 0; background: transparent; }
#print-document .delivery-label { display: block; margin: 0 0 8px; color: #527087; font-size: 9px; font-weight: 700; letter-spacing: 1px; }
#print-document .delivery-customer { display: block; margin-bottom: 5px; color: #172b3d; font-size: 13px; }
#print-document .delivery-recipient-address, #print-document .delivery-recipient-trn, #print-document .delivery-recipient-contact { margin-top: 3px; color: #42586a; font-size: 10px; line-height: 1.45; }
#print-document .delivery-recipient-trn span { color: #62798a; font-weight: 700; }
#print-document .delivery-detail-list { display: grid; grid-template-columns: 1fr; gap: 5px; }
#print-document .delivery-detail-list > div { display: grid; grid-template-columns: 118px minmax(0,1fr); gap: 10px; align-items: start; }
#print-document .delivery-detail-list > div > span { color: #62798a; font-size: 9px; }
#print-document .delivery-detail-list strong { color: #22394b; font-size: 10px; font-weight: 600; overflow-wrap: anywhere; }
#print-document .delivery-document-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 18px; padding: 0 0 13px; border-bottom: 1px solid #d5dfe6; }
#print-document .delivery-document-title h1 { margin: 0; color: #173f62; font-size: 20px; letter-spacing: 1.2px; }
#print-document .delivery-document-title > div { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
#print-document .delivery-document-title > div span { color: #62798a; font-size: 8px; font-weight: 700; letter-spacing: .8px; }
#print-document .delivery-document-title > div strong { color: #173f62; font-size: 12px; }
#print-document .delivery-items-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 7px; }
#print-document .delivery-items-heading strong { color: #253e52; font-size: 10px; letter-spacing: .7px; }
#print-document .delivery-items-heading span { color: #6a7e8d; font-size: 9px; }
#print-document .document-items.delivery-items { margin: 0; table-layout: fixed; font-size: 10px; }
#print-document .document-items.delivery-items th { padding: 9px 8px; background: #174b75; color: #fff; text-align: left; font-size: 8px; letter-spacing: .65px; }
#print-document .document-items.delivery-items th:first-child, #print-document .document-items.delivery-items td:first-child { width: 7%; text-align: center; }
#print-document .document-items.delivery-items th:nth-child(2), #print-document .document-items.delivery-items td:nth-child(2) { width: 19%; }
#print-document .document-items.delivery-items th:nth-child(3), #print-document .document-items.delivery-items td:nth-child(3) { width: 45%; }
#print-document .document-items.delivery-items th:nth-child(4), #print-document .document-items.delivery-items td:nth-child(4) { width: 13%; text-align: right; }
#print-document .document-items.delivery-items th:nth-child(5), #print-document .document-items.delivery-items td:nth-child(5) { width: 16%; }
#print-document .document-items.delivery-items td { padding: 10px 8px; border: 0; border-bottom: 1px solid #d8e0e6; color: #203547; vertical-align: top; overflow-wrap: anywhere; }
#print-document .delivery-acceptance { display: grid; grid-template-columns: .85fr 1.15fr; gap: 30px; margin: 30px 0 0; padding: 17px 0 0; border-top: 1px solid #bdcbd6; }
#print-document .delivery-dispatch > strong { display: block; color: #173f62; font-size: 11px; }
#print-document .delivery-delivered-at, #print-document .delivery-notes { margin: 8px 0 0; color: #53697a; font-size: 9px; line-height: 1.5; }
#print-document .delivery-notes > span { font-weight: 700; }
#print-document .delivery-receiver > strong { display: block; min-height: 15px; color: #263f52; font-size: 10px; }
#print-document .delivery-receiver .signature-line { height: 32px; margin: 10px 0 5px; border-bottom: 1px solid #667b8b; }
#print-document .signature-caption, #print-document .receiver-date { display: block; color: #53697a; font-size: 9px; }
#print-document .receiver-date { margin-top: 12px; }
@media (max-width: 700px) { #print-document .delivery-parties { grid-template-columns: 1fr; gap: 16px; } #print-document .delivery-acceptance { grid-template-columns: 1fr; gap: 18px; } #print-document .delivery-document-title { align-items: flex-start; flex-direction: column; } #print-document .delivery-document-title > div { align-items: flex-start; } }



/* Professional invoice layout: live screen and print */
#invoice-print{box-sizing:border-box!important;width:100%!important;max-width:850px!important;margin:18px auto!important;padding:30px 34px!important;background:#fff!important;color:#1b2937!important;font:12px/1.45 Arial,Helvetica,sans-serif!important;border:1px solid #d8e0e7!important;border-radius:4px!important;box-shadow:0 6px 24px rgba(20,45,65,.08)!important}
#invoice-print .invoice-heading{display:grid!important;grid-template-columns:minmax(0,1fr) 190px!important;align-items:center!important;gap:22px!important;border-bottom:3px solid #173e5b!important;padding:0 0 18px!important;margin:0 0 18px!important}
#invoice-print .invoice-heading .document-brand-row{display:flex!important;flex-direction:row!important;align-items:center!important;justify-content:flex-start!important;gap:14px!important;min-width:0!important;margin:0!important;padding:0!important;border:0!important}
#invoice-print .document-logo{display:flex!important;flex:0 0 150px!important;align-items:center!important;justify-content:flex-start!important;width:150px!important;height:54px!important;max-width:150px!important;overflow:hidden!important;text-align:left!important}
#invoice-print .document-logo img{display:block!important;width:150px!important;height:54px!important;max-width:150px!important;max-height:54px!important;object-fit:contain!important;object-position:left center!important}
#invoice-print .document-brand{display:block!important;flex:1 1 auto!important;min-width:0!important;margin:0!important;color:#435466!important;font-size:10px!important;line-height:1.45!important;text-align:left!important}
#invoice-print .document-brand strong{display:block!important;margin:0 0 4px!important;color:#173e5b!important;font-size:14px!important;line-height:1.25!important}
#invoice-print .invoice-heading-title{display:block!important;width:auto!important;min-width:0!important;text-align:right!important}
#invoice-print .invoice-heading-title h1{margin:0 0 5px!important;color:#173e5b!important;font-size:24px!important;line-height:1.1!important;letter-spacing:.045em!important}
#invoice-print .invoice-heading-title span{color:#607487!important;font-size:9px!important;text-transform:uppercase!important;letter-spacing:.1em!important}
#invoice-print .invoice-summary-table{display:table!important;width:100%!important;table-layout:fixed!important;margin:0 0 18px!important;border-collapse:collapse!important;border:1px solid #d7e1e9!important;background:#f3f7fa!important}
#invoice-print .invoice-summary-table th,#invoice-print .invoice-summary-table td{padding:9px 10px!important;border:1px solid #d7e1e9!important;text-align:left!important;vertical-align:middle!important}
#invoice-print .invoice-summary-table th{width:17%!important;background:#eaf1f6!important;color:#52687a!important;font-size:8px!important;font-weight:700!important;text-transform:uppercase!important;letter-spacing:.06em!important}
#invoice-print .invoice-summary-table td{width:33%!important;color:#1b3043!important;font-size:10px!important;font-weight:700!important;overflow-wrap:anywhere!important}
#invoice-print .invoice-parties{display:grid!important;grid-template-columns:minmax(0,1.35fr) minmax(0,1fr)!important;gap:13px!important;margin:0 0 20px!important}
#invoice-print .invoice-party{box-sizing:border-box!important;min-width:0!important;min-height:98px!important;padding:13px 15px!important;border:1px solid #d7e1e9!important;border-radius:3px!important;background:#fff!important}
#invoice-print .invoice-party h2{margin:0 0 8px!important;color:#63798b!important;font-size:9px!important;text-transform:uppercase!important;letter-spacing:.09em!important}
#invoice-print .invoice-party strong{color:#183d58!important;font-size:12px!important}
#invoice-print .invoice-party p{margin:6px 0 0!important;color:#526273!important;font-size:9px!important;line-height:1.45!important;white-space:normal!important}
#invoice-print .invoice-lines-title{margin:0 0 8px!important;padding:0 0 7px!important;border-bottom:1px solid #d7e1e9!important;color:#173e5b!important;font-size:13px!important}
#invoice-print .invoice-lines-wrap{width:100%!important;overflow-x:auto!important}
#invoice-print .document-items{width:100%!important;margin:0!important;border-collapse:collapse!important;table-layout:fixed!important;font-size:9px!important}
#invoice-print .document-items th{padding:8px 6px!important;background:#174b75!important;color:#fff!important;border:1px solid #174b75!important;font-size:8px!important;font-weight:700!important;letter-spacing:.025em!important;text-align:left!important}
#invoice-print .document-items td{padding:0.3mm 2px!important;border:0!important;;color:#24394b!important;vertical-align:top!important;overflow-wrap:anywhere!important}
#invoice-print .document-items tbody tr:nth-child(even){background:#f7fafc!important}
#invoice-print .document-items th:nth-child(1),#invoice-print .document-items td:nth-child(1){width:18%!important}
#invoice-print .document-items th:nth-child(2),#invoice-print .document-items td:nth-child(2){width:30%!important}
#invoice-print .document-items th:nth-child(3),#invoice-print .document-items td:nth-child(3){width:12%!important}
#invoice-print .document-items th:nth-child(4),#invoice-print .document-items td:nth-child(4){width:16%!important}
#invoice-print .document-items th:nth-child(5),#invoice-print .document-items td:nth-child(5){width:9%!important}
#invoice-print .document-items th:nth-child(6),#invoice-print .document-items td:nth-child(6){width:15%!important}
#invoice-print .document-items .num{text-align:right!important;white-space:nowrap!important}
#invoice-print .document-items .center{text-align:center!important}
#invoice-print .invoice-bottom{display:grid!important;grid-template-columns:minmax(0,1fr) 255px!important;align-items:start!important;gap:22px!important;margin:16px 0 0!important}
#invoice-print .invoice-notes h2{margin:0 0 5px!important;color:#63798b!important;font-size:9px!important;text-transform:uppercase!important;letter-spacing:.08em!important}
#invoice-print .invoice-notes h2:not(:first-child){margin-top:15px!important}
#invoice-print .invoice-notes p{margin:0!important;color:#435466!important;font-size:9px!important;line-height:1.5!important}
#invoice-print .invoice-totals{width:100%!important}
#invoice-print .invoice-totals-table{width:100%!important;border-collapse:collapse!important;font-size:10px!important}
#invoice-print .invoice-totals-table td{padding:8px 9px!important;border-bottom:1px solid #dbe3e9!important;color:#32485a!important}
#invoice-print .invoice-totals-table td:last-child{text-align:right!important;white-space:nowrap!important}
#invoice-print .invoice-totals-table tr:last-child td{padding-top:11px!important;padding-bottom:11px!important;border-top:2px solid #173e5b!important;border-bottom:0!important;background:#edf3f7!important;color:#173e5b!important;font-size:12px!important;font-weight:700!important}
#invoice-print .document-footer{display:grid!important;grid-template-columns:minmax(0,1fr) 230px!important;align-items:flex-end!important;gap:22px!important;margin:24px 0 0!important;padding-top:14px!important;border-top:1px solid #d7e1e9!important;color:#435466!important;font-size:9px!important;line-height:1.5!important}
#invoice-print .document-footer>div:first-child{max-width:none!important}
#invoice-print .document-footer p{margin:12px 0 0!important;color:#183d58!important;font-weight:700!important}
#invoice-print .document-signature{box-sizing:border-box!important;min-width:0!important;min-height:72px!important;padding:38px 8px 8px!important;border:1px solid #d7e1e9!important;text-align:center!important;color:#536779!important;font-size:9px!important}
#invoice-print .invoice-footnote{margin:14px 0 0!important;color:#71808e!important;text-align:center!important;font-size:8px!important}
@media(max-width:750px){#invoice-print{padding:22px 18px!important}#invoice-print .invoice-heading{grid-template-columns:minmax(0,1fr) 155px!important;gap:12px!important}#invoice-print .document-logo{flex-basis:105px!important;width:105px!important;height:42px!important}#invoice-print .document-logo img{width:105px!important;height:42px!important;max-width:105px!important;max-height:42px!important}#invoice-print .invoice-heading-title h1{font-size:20px!important}#invoice-print .invoice-bottom{grid-template-columns:minmax(0,1fr) 220px!important;gap:14px!important}}
@media(max-width:520px){#invoice-print{padding:16px 12px!important}#invoice-print .invoice-heading{grid-template-columns:minmax(0,1fr) 120px!important;gap:8px!important}#invoice-print .document-brand-row{gap:8px!important}#invoice-print .document-logo{flex-basis:70px!important;width:70px!important;height:30px!important}#invoice-print .document-logo img{width:70px!important;height:30px!important;max-width:70px!important;max-height:30px!important}#invoice-print .document-brand{font-size:7px!important}#invoice-print .document-brand strong{font-size:9px!important}#invoice-print .invoice-heading-title h1{font-size:15px!important}#invoice-print .invoice-summary-table th,#invoice-print .invoice-summary-table td{padding:6px 4px!important;font-size:7px!important}#invoice-print .invoice-parties,#invoice-print .invoice-bottom,#invoice-print .document-footer{grid-template-columns:1fr!important}#invoice-print .invoice-party{min-height:0!important;padding:10px!important}#invoice-print .invoice-totals{max-width:300px!important;margin-left:auto!important}#invoice-print .document-signature{max-width:200px!important;margin:4px 0 0 auto!important}}



/* Invoice payment details and warranty notice */
#invoice-print .invoice-bank-details{margin-top:10px!important;padding:10px 11px!important;border:1px solid #d7e1e9!important;border-radius:3px!important;background:#f5f8fb!important}
#invoice-print .invoice-bank-details h3{margin:0 0 6px!important;color:#173e5b!important;font-size:8px!important;text-transform:uppercase!important;letter-spacing:.07em!important}
#invoice-print .invoice-bank-details dl{display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:0!important;margin:0!important}
#invoice-print .invoice-bank-details dl>div{display:grid!important;grid-template-columns:78px minmax(0,1fr)!important;gap:7px!important;padding:4px 0!important;border-top:1px solid #e1e8ee!important}
#invoice-print .invoice-bank-details dt{color:#647789!important;font-size:7.5px!important;font-weight:700!important;text-transform:uppercase!important;letter-spacing:.035em!important}
#invoice-print .invoice-bank-details dd{margin:0!important;color:#253a4d!important;font-size:8.5px!important;font-weight:700!important;overflow-wrap:anywhere!important}
#invoice-print .invoice-terms{margin-top:10px!important;padding:9px 11px!important;border-left:3px solid #b58b43!important;background:#fbf8f1!important}
#invoice-print .invoice-terms h2{margin:0 0 4px!important;color:#725c33!important;font-size:8px!important;text-transform:uppercase!important;letter-spacing:.07em!important}
#invoice-print .invoice-terms p{margin:0!important;color:#564d3e!important;font-size:8px!important;line-height:1.4!important}
#invoice-print .invoice-footnote{padding-top:8px!important;border-top:1px solid #e6ebef!important}
@media(max-width:520px){#invoice-print .invoice-bank-details dl>div{grid-template-columns:66px minmax(0,1fr)!important;gap:5px!important}#invoice-print .invoice-bank-details{padding:8px!important}#invoice-print .invoice-bank-details dd{font-size:7.5px!important}#invoice-print .invoice-terms{padding:8px!important}}


/* Invoice layout based on the approved PDF model */
#invoice-print .invoice-heading{display:block!important;margin:0 0 14px!important;padding:0 0 12px!important;border-bottom:2px solid #1d354a!important}
#invoice-print .invoice-heading-title{display:none!important}
#invoice-print .invoice-title{text-align:center!important;margin:12px 0 13px!important}
#invoice-print .invoice-title h1{font-size:20px!important;margin:0!important;color:#20384c!important}
#invoice-print .invoice-meta-parties{display:grid!important;grid-template-columns:1.55fr .95fr!important;margin:0 0 12px!important;border:1px solid #d9e2e8!important;background:#fafbfc!important}
#invoice-print .invoice-meta-parties>section{padding:10px 12px!important;box-sizing:border-box!important}
#invoice-print .invoice-meta-parties .invoice-party{border:0!important;border-right:1px solid #d9e2e8!important;min-height:0!important}
#invoice-print .invoice-meta-parties h2{font-size:9px!important;text-transform:uppercase!important;color:#657d8d!important;margin:0 0 6px!important}
#invoice-print .invoice-party strong{font-size:11px!important}
#invoice-print .invoice-party p{font-size:9px!important;line-height:1.4!important;margin:4px 0 0!important}
#invoice-print .invoice-meta{display:grid!important;grid-template-columns:auto 1fr!important;align-content:start!important;gap:5px 10px!important;font-size:9px!important;line-height:1.35!important}
#invoice-print .invoice-meta span{color:#657d8d!important}
#invoice-print .invoice-meta strong{font-weight:500!important;overflow-wrap:anywhere!important}
#invoice-print .invoice-lines-title{margin:0 0 6px!important;font-size:12px!important;text-transform:uppercase!important;color:#263b4e!important}
#invoice-print .document-items{table-layout:fixed!important;width:100%!important;border-collapse:collapse!important}
#invoice-print .document-items th,#invoice-print .document-items td{padding:7px 5px!important;font-size:8px!important;vertical-align:middle!important;overflow-wrap:anywhere!important}
#invoice-print .document-items th:nth-child(1),#invoice-print .document-items td:nth-child(1){width:5%!important;text-align:center!important}
#invoice-print .document-items th:nth-child(2),#invoice-print .document-items td:nth-child(2){width:15%!important}
#invoice-print .document-items th:nth-child(3),#invoice-print .document-items td:nth-child(3){width:23%!important}
#invoice-print .document-items th:nth-child(4),#invoice-print .document-items td:nth-child(4){width:10%!important}
#invoice-print .document-items th:nth-child(5),#invoice-print .document-items td:nth-child(5){width:15%!important}
#invoice-print .document-items th:nth-child(6),#invoice-print .document-items td:nth-child(6){width:10%!important}
#invoice-print .document-items th:nth-child(7),#invoice-print .document-items td:nth-child(7){width:22%!important}
#invoice-print .invoice-bottom{display:grid!important;grid-template-columns:minmax(0,1.1fr) minmax(0,.9fr)!important;gap:16px!important;margin-top:10px!important;align-items:start!important}
#invoice-print .invoice-left,#invoice-print .invoice-right{min-width:0!important}
#invoice-print .invoice-amount-words{margin:0 0 7px!important;padding:0!important;background:transparent!important;border:0!important;break-inside:avoid!important}
#invoice-print .invoice-amount-words h2{font-size:8px!important;color:#657d8d!important;margin:0 0 3px!important}
#invoice-print .invoice-amount-words strong{font-size:9px!important;line-height:1.35!important;color:#1d3042!important}
#invoice-print .invoice-payment-info{margin:0 0 7px!important;font-size:9px!important;line-height:1.35!important;color:#657d8d!important}
#invoice-print .invoice-payment-info h3,#invoice-print .invoice-bank-details h3,#invoice-print .invoice-warranty h3{font-size:8px!important;text-transform:uppercase!important;color:#657d8d!important;margin:0 0 5px!important}
#invoice-print .invoice-bank-details,#invoice-print .invoice-warranty{box-sizing:border-box!important;border:1px solid #d9e2e8!important;background:#f3f6f8!important;padding:9px!important;font-size:8px!important;line-height:1.35!important;break-inside:avoid!important}
#invoice-print .invoice-bank-details p,#invoice-print .invoice-warranty p{margin:0 0 5px!important;white-space:normal!important}
#invoice-print .invoice-bank-details dl{margin:0!important}
#invoice-print .invoice-bank-details dl>div{display:flex!important;justify-content:space-between!important;gap:5px!important;padding:3px 0!important;border-bottom:1px solid #d9e2e8!important}
#invoice-print .invoice-bank-details dl>div:last-child{border:0!important}
#invoice-print .invoice-bank-details dt{font-weight:bold!important;color:#657d8d!important}
#invoice-print .invoice-bank-details dd{margin:0!important;text-align:right!important;overflow-wrap:anywhere!important}
#invoice-print .invoice-totals{margin:0 0 8px!important}
#invoice-print .invoice-totals-table{width:100%!important;border-collapse:collapse!important}
#invoice-print .invoice-totals-table td{padding:7px 8px!important;border-bottom:1px solid #d9e2e8!important;font-size:10px!important}
#invoice-print .invoice-totals-table td:last-child{text-align:right!important}
#invoice-print .invoice-totals-table tr:last-child td{background:#20384c!important;color:#fff!important;font-size:12px!important;font-weight:bold!important;border:0!important}
#invoice-print .invoice-warranty{background:#fbfaf6!important;border-color:#e5ddcc!important;border-left:3px solid #bd8b32!important;color:#435466!important}
#invoice-print .invoice-warranty h3{color:#80642f!important}
#invoice-print .invoice-terms-full{box-sizing:border-box!important;width:100%!important;margin-top:10px!important;padding:8px 10px!important;border:1px solid #d9e2e8!important;background:#f8fafb!important;break-inside:avoid!important}
#invoice-print .invoice-terms-full h2{font-size:8px!important;text-transform:uppercase!important;color:#263b4e!important;margin:0 0 5px!important}
#invoice-print .invoice-terms-grid{display:block!important}
#invoice-print .invoice-terms-grid>div{font-size:7px!important;line-height:1.22!important;color:#263b4e!important;margin:0!important}
#invoice-print .document-footer{display:grid!important;grid-template-columns:1.2fr .9fr!important;gap:16px!important;align-items:stretch!important;margin-top:10px!important;padding-top:8px!important;border-top:1px solid #d9e2e8!important}
#invoice-print .document-footer>div:first-child{max-width:none!important;font-size:9px!important;line-height:1.4!important}
#invoice-print .document-footer>div:first-child b{display:inline-block!important;text-transform:uppercase!important;color:#657d8d!important;margin-bottom:5px!important}
#invoice-print .document-footer>div:first-child p{font-weight:bold!important;margin:12px 0 0!important}
#invoice-print .document-signature{box-sizing:border-box!important;width:100%!important;min-width:0!important;min-height:82px!important;margin:0!important;padding:8px!important;border:1px solid #d9e2e8!important;display:flex!important;align-items:flex-end!important;justify-content:center!important;text-align:center!important;font-size:8px!important;color:#657d8d!important}
#invoice-print .invoice-footnote{text-align:center!important;font-size:8px!important;color:#657d8d!important;margin:8px 0 0!important}
@media(max-width:650px){#invoice-print .invoice-meta-parties,#invoice-print .invoice-bottom,#invoice-print .document-footer{grid-template-columns:1fr!important}#invoice-print .invoice-meta-parties .invoice-party{border-right:0!important;border-bottom:1px solid #d9e2e8!important}}


#invoice-print .invoice-heading .document-brand-row{flex-direction:row-reverse!important;justify-content:space-between!important;width:100%!important}
#invoice-print .document-logo{flex-basis:170px!important;width:170px!important;height:54px!important;max-width:170px!important}
#invoice-print .document-logo img{width:150px!important;height:54px!important;max-width:150px!important;max-height:54px!important;object-position:right center!important}
#invoice-print .invoice-title,#invoice-print .invoice-title h1{text-align:center!important;width:100%!important}

/* Keep all seven invoice columns legible with the serial number included */
#invoice-print .document-items{table-layout:fixed!important;width:100%!important}
#invoice-print .document-items th,#invoice-print .document-items td{white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.2!important}
#invoice-print .document-items th:nth-child(1),#invoice-print .document-items td:nth-child(1){width:8%!important;min-width:0!important}
#invoice-print .document-items th:nth-child(2),#invoice-print .document-items td:nth-child(2){width:14%!important;min-width:0!important}
#invoice-print .document-items th:nth-child(3),#invoice-print .document-items td:nth-child(3){width:22%!important;min-width:0!important}
#invoice-print .document-items th:nth-child(4),#invoice-print .document-items td:nth-child(4){width:10%!important;min-width:0!important}
#invoice-print .document-items th:nth-child(5),#invoice-print .document-items td:nth-child(5){width:14%!important;min-width:0!important}
#invoice-print .document-items th:nth-child(6),#invoice-print .document-items td:nth-child(6){width:9%!important;min-width:0!important}
#invoice-print .document-items th:nth-child(7),#invoice-print .document-items td:nth-child(7){width:23%!important;min-width:0!important}


/* Invoice: six-column item table with optional part number inside Description. */
#invoice-print .document-items{table-layout:fixed!important;width:100%!important;min-width:0!important}
#invoice-print .document-items th,#invoice-print .document-items td{white-space:normal!important;overflow-wrap:anywhere!important;line-height:1.2!important}
#invoice-print .document-items th:nth-child(1),#invoice-print .document-items td:nth-child(1){width:7%!important}
#invoice-print .document-items th:nth-child(2),#invoice-print .document-items td:nth-child(2){width:31%!important}
#invoice-print .document-items th:nth-child(3),#invoice-print .document-items td:nth-child(3){width:11%!important}
#invoice-print .document-items th:nth-child(4),#invoice-print .document-items td:nth-child(4){width:16%!important}
#invoice-print .document-items th:nth-child(5),#invoice-print .document-items td:nth-child(5){width:11%!important}
#invoice-print .document-items th:nth-child(6),#invoice-print .document-items td:nth-child(6){width:24%!important}




























































/* Keep print item rows at their content height; do not stretch across the invoice page. */

/* Consistent default A4 printing for portal documents. */
@page { size: A4 portrait; margin: 12mm; }
@media print {
  html, body { display: block !important; width: auto !important; min-width: 0 !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; background: #fff !important; color: #111 !important; }
  body { font: 9pt/1.35 Arial, Helvetica, sans-serif !important; }
  body * { visibility: hidden !important; box-shadow: none !important; }
  aside, nav, header, button, form, .sidebar-foot, .notice, .quote-actions, .print-actions, .no-print { display: none !important; }
  main { display: block !important; position: relative !important; width: auto !important; max-width: none !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important; }

  #print-document, #invoice-print, .quote-paper {
    display: block !important; position: absolute !important; inset: 0 auto auto 0 !important;
    box-sizing: border-box !important; width: 100% !important; min-width: 0 !important; max-width: none !important;
    height: auto !important; min-height: 0 !important; max-height: none !important; margin: 0 !important; padding: 0 !important;
    overflow: visible !important; border: 0 !important; border-radius: 0 !important; background: #fff !important;
    color: #111 !important; font-family: Arial, Helvetica, sans-serif !important; break-inside: auto !important;
  }
  #print-document *, #invoice-print *, .quote-paper * { visibility: visible !important; box-shadow: none !important; }
  #print-document .document-brand-row, #invoice-print .invoice-heading, #print-document .delivery-parties, #invoice-print .invoice-parties { break-inside: avoid !important; page-break-inside: avoid !important; }

  #print-document { font-size: 9pt !important; line-height: 1.35 !important; }
  #print-document .document-brand-row { display: flex !important; align-items: center !important; gap: 10mm !important; margin: 0 0 6mm !important; padding: 0 0 4mm !important; }
  #print-document .document-logo { flex: 0 0 48mm !important; width: 48mm !important; max-width: 48mm !important; }
  #print-document .document-logo img { display: block !important; width: auto !important; height: auto !important; max-width: 48mm !important; max-height: 20mm !important; object-fit: contain !important; }
  #print-document .delivery-meta, #print-document .delivery-parties { display: grid !important; grid-template-columns: minmax(0,1fr) minmax(0,1fr) !important; gap: 5mm !important; margin: 0 0 5mm !important; padding: 0 0 4mm !important; background: #fff !important; }
  #print-document .delivery-detail-list > div { display: grid !important; grid-template-columns: 28mm minmax(0,1fr) !important; gap: 3mm !important; }
  #print-document .document-items { display: table !important; width: 100% !important; min-width: 0 !important; margin: 0 !important; table-layout: fixed !important; border-collapse: collapse !important; font-size: 8pt !important; }
  #print-document .document-items thead { display: table-header-group !important; }
  #print-document .document-items tbody { display: table-row-group !important; }
  #print-document .document-items tr { break-inside: avoid !important; page-break-inside: avoid !important; }
  #print-document .document-items th, #print-document .document-items td { padding: 4pt 3pt !important; border: 0.5pt solid #555 !important; background: #fff !important; color: #111 !important; vertical-align: top !important; white-space: normal !important; overflow-wrap: anywhere !important; }
  #print-document .document-items th { font-weight: 700 !important; text-align: left !important; }
  #print-document table.document-items.delivery-items th:nth-child(1), #print-document table.document-items.delivery-items td:nth-child(1) { width: 8% !important; text-align: center !important; }
  #print-document table.document-items.delivery-items th:nth-child(2), #print-document table.document-items.delivery-items td:nth-child(2) { width: 19% !important; }
  #print-document table.document-items.delivery-items th:nth-child(3), #print-document table.document-items.delivery-items td:nth-child(3) { width: 47% !important; }
  #print-document table.document-items.delivery-items th:nth-child(4), #print-document table.document-items.delivery-items td:nth-child(4) { width: 13% !important; text-align: right !important; }
  #print-document table.document-items.delivery-items th:nth-child(5), #print-document table.document-items.delivery-items td:nth-child(5) { width: 13% !important; }
  #print-document .delivery-acceptance { display: grid !important; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr) !important; gap: 8mm !important; margin-top: 8mm !important; break-inside: avoid !important; page-break-inside: avoid !important; }
  #print-document .signature-line { min-height: 10mm !important; }

  #invoice-print { font-size: 8pt !important; line-height: 1.25 !important; }
  #invoice-print .invoice-heading { display: grid !important; grid-template-columns: minmax(0,1fr) 38mm !important; gap: 5mm !important; margin: 0 0 4mm !important; padding: 0 0 3mm !important; }
  #invoice-print .invoice-heading .document-brand-row { display: flex !important; gap: 3mm !important; }
  #invoice-print .document-logo, #invoice-print .document-logo img { width: 34mm !important; max-width: 34mm !important; height: 14mm !important; max-height: 14mm !important; }
  #invoice-print .invoice-summary-table { width: 100% !important; margin: 0 0 4mm !important; table-layout: fixed !important; border-collapse: collapse !important; }
  #invoice-print .invoice-parties { display: grid !important; grid-template-columns: minmax(0,1.35fr) minmax(0,1fr) !important; gap: 4mm !important; margin: 0 0 4mm !important; }
  #invoice-print .invoice-party { min-width: 0 !important; min-height: 0 !important; padding: 3mm !important; }
  #invoice-print .invoice-lines-title { margin: 0 0 2mm !important; }
  #invoice-print .invoice-lines-wrap { display: block !important; width: 100% !important; height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; }
  #invoice-print .invoice-lines-wrap > table.invoice-lines-spacer { display: none !important; }
  #invoice-print .document-items { display: table !important; width: 100% !important; min-width: 0 !important; height: auto !important; min-height: 0 !important; table-layout: fixed !important; border-collapse: collapse !important; font-size: 7.2pt !important; }
  #invoice-print .document-items thead { display: table-header-group !important; }
  #invoice-print .document-items tbody { display: table-row-group !important; }
  #invoice-print .document-items tr { height: auto !important; min-height: 0 !important; break-inside: avoid !important; page-break-inside: avoid !important; }
  #invoice-print .document-items th, #invoice-print .document-items td { height: auto !important; min-height: 0 !important; padding: 3pt 2pt !important; border: 0.5pt solid #555 !important; background: #fff !important; color: #111 !important; vertical-align: top !important; }
  #invoice-print .document-items th:nth-child(1), #invoice-print .document-items td:nth-child(1) { width: 5% !important; text-align: center !important; }
  #invoice-print .document-items th:nth-child(2), #invoice-print .document-items td:nth-child(2) { width: 34% !important; white-space: normal !important; overflow-wrap: anywhere !important; }
  #invoice-print .document-items th:nth-child(3), #invoice-print .document-items td:nth-child(3) { width: 8% !important; }
  #invoice-print .document-items th:nth-child(4), #invoice-print .document-items td:nth-child(4) { width: 12% !important; }
  #invoice-print .document-items th:nth-child(5), #invoice-print .document-items td:nth-child(5) { width: 10% !important; }
  #invoice-print .document-items th:nth-child(6), #invoice-print .document-items td:nth-child(6) { width: 6% !important; }
  #invoice-print .document-items th:nth-child(7), #invoice-print .document-items td:nth-child(7) { width: 12% !important; }
  #invoice-print .document-items th:nth-child(8), #invoice-print .document-items td:nth-child(8) { width: 13% !important; }
  #invoice-print .document-items td:nth-child(n+3) { white-space: nowrap !important; text-align: right !important; }
  #invoice-print .invoice-bottom { display: grid !important; grid-template-columns: minmax(0,1fr) 43mm !important; align-items: start !important; gap: 5mm !important; margin-top: 4mm !important; }
  #invoice-print .invoice-totals-table { width: 100% !important; table-layout: fixed !important; border-collapse: collapse !important; }
  #invoice-print .invoice-totals-table td { padding: 2mm 2mm !important; border-bottom: 0.5pt solid #777 !important; }
  #invoice-print .invoice-totals-table td:first-child { width: 62% !important; text-align: left !important; }
  #invoice-print .invoice-totals-table td:last-child { width: 38% !important; text-align: right !important; white-space: nowrap !important; }
  #invoice-print .invoice-total-row, #invoice-print .invoice-totals-table tr:last-child { break-inside: avoid !important; page-break-inside: avoid !important; }
  #invoice-print .document-footer { display: grid !important; grid-template-columns: minmax(0,1fr) 42mm !important; gap: 5mm !important; margin-top: 5mm !important; padding-top: 3mm !important; break-inside: avoid !important; page-break-inside: avoid !important; }
  #invoice-print .document-signature { min-width: 0 !important; min-height: 18mm !important; padding-top: 10mm !important; break-inside: avoid !important; page-break-inside: avoid !important; }

  .quote-paper { font-size: 9pt !important; line-height: 1.35 !important; }
  .quote-head, .quote-info, .quote-summary { break-inside: avoid !important; page-break-inside: avoid !important; }
  .quote-table-wrap { overflow: visible !important; }
  .quote-table { display: table !important; width: 100% !important; min-width: 0 !important; table-layout: fixed !important; border-collapse: collapse !important; font-size: 8pt !important; }
  .quote-table thead { display: table-header-group !important; }
  .quote-table tr { break-inside: avoid !important; page-break-inside: avoid !important; }
  .quote-table th, .quote-table td { padding: 4pt 3pt !important; white-space: normal !important; overflow-wrap: anywhere !important; }
  .quote-summary, .quote-terms, .quote-bank, .quote-footer { break-inside: avoid !important; page-break-inside: avoid !important; }

  /* Keep invoice descriptions inside their column and protect every numeric column. */
  #invoice-print table.document-items { width: 100% !important; table-layout: fixed !important; }
  #invoice-print table.document-items th:nth-child(1), #invoice-print table.document-items td:nth-child(1) { width: 5% !important; }
  #invoice-print table.document-items th:nth-child(2), #invoice-print table.document-items td:nth-child(2) { width: 45% !important; }
  #invoice-print table.document-items th:nth-child(3), #invoice-print table.document-items td:nth-child(3) { width: 7% !important; }
  #invoice-print table.document-items th:nth-child(4), #invoice-print table.document-items td:nth-child(4) { width: 10% !important; }
  #invoice-print table.document-items th:nth-child(5), #invoice-print table.document-items td:nth-child(5) { width: 8% !important; }
  #invoice-print table.document-items th:nth-child(6), #invoice-print table.document-items td:nth-child(6) { width: 5% !important; }
  #invoice-print table.document-items th:nth-child(7), #invoice-print table.document-items td:nth-child(7) { width: 10% !important; }
  #invoice-print table.document-items th:nth-child(8), #invoice-print table.document-items td:nth-child(8) { width: 10% !important; }
  #invoice-print table.document-items td:nth-child(2) { white-space: normal !important; overflow-wrap: anywhere !important; word-break: normal !important; text-align: left !important; vertical-align: top !important; }
  #invoice-print table.document-items td:nth-child(2) strong { white-space: normal !important; overflow-wrap: anywhere !important; }
  #invoice-print table.document-items td:nth-child(n+3) { white-space: nowrap !important; text-align: right !important; }
  #invoice-print#invoice-print table.document-items tbody td:nth-child(2) span { display: block !important; white-space: normal !important; overflow-wrap: anywhere !important; word-break: normal !important; }
}




/* Invoice PDF totals: keep the amount fully visible on A4. */
@media print {
  #invoice-print .invoice-bottom { grid-template-columns: minmax(0, 1fr) 70mm !important; gap: 5mm !important; }
  #invoice-print .invoice-left { min-width: 0 !important; }
  #invoice-print .invoice-right { width: 70mm !important; min-width: 70mm !important; max-width: 70mm !important; box-sizing: border-box !important; border-left: 0 !important; }
  #invoice-print .invoice-totals-table { width: 100% !important; max-width: 100% !important; table-layout: fixed !important; border-collapse: collapse !important; }
  #invoice-print .invoice-totals-table td:first-child { width: 55% !important; }
  #invoice-print .invoice-totals-table td:last-child { width: 45% !important; white-space: normal !important; overflow-wrap: anywhere !important; word-break: normal !important; text-align: right !important; box-sizing: border-box !important; }
}



/* Invoice print: black text and rules, with the company logo omitted. */
@media print {
  #invoice-print,
  #invoice-print * {
    color: #000 !important;
    border-color: #000 !important;
    outline-color: #000 !important;
    box-shadow: none !important;
    text-shadow: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  #invoice-print {
    background: #fff !important;
  }
  #invoice-print .document-logo img {
    display: none !important;
  }
  #invoice-print table,
  #invoice-print th,
  #invoice-print td,
  #invoice-print .invoice-meta-parties,
  #invoice-print .invoice-party,
  #invoice-print .invoice-meta,
  #invoice-print .invoice-bottom,
  #invoice-print .invoice-right,
  #invoice-print .invoice-bank-details,
  #invoice-print .invoice-warranty,
  #invoice-print .document-footer,
  #invoice-print .document-signature {
    border-color: #000 !important;
    background-color: #fff !important;
  }
}



/* Invoice print typography and company branding. */
@media print {
  #invoice-print { font-size: 9pt !important; color: #000 !important; }
  #invoice-print .document-brand-row { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 5mm !important; }
  #invoice-print .document-brand { order: 1 !important; flex: 1 1 auto !important; font-size: 9pt !important; color: #000 !important; }
  #invoice-print .document-brand strong { font-size: 16pt !important; font-weight: 700 !important; color: #000 !important; }
  #invoice-print .company-name-accent { color: #1769c2 !important; }
  #invoice-print .document-logo { order: 2 !important; display: flex !important; flex: 0 0 34mm !important; width: 34mm !important; max-width: 34mm !important; height: 14mm !important; max-height: 14mm !important; margin-left: auto !important; align-items: center !important; justify-content: flex-end !important; visibility: visible !important; }
  #invoice-print .document-logo img { display: block !important; width: auto !important; max-width: 34mm !important; height: auto !important; max-height: 14mm !important; object-fit: contain !important; object-position: right center !important; visibility: visible !important; }
  #invoice-print .invoice-title h1 { font-size: 14pt !important; font-weight: 700 !important; color: #000 !important; }
  #invoice-print .invoice-meta-parties,
  #invoice-print .invoice-party,
  #invoice-print .invoice-party strong,
  #invoice-print .invoice-party p,
  #invoice-print .invoice-meta,
  #invoice-print .invoice-meta span,
  #invoice-print .invoice-meta strong { font-size: 9pt !important; color: #000 !important; }
  #invoice-print h2,
  #invoice-print h3,
  #invoice-print .invoice-lines-title { font-size: 9pt !important; font-weight: 700 !important; color: #000 !important; }
  #invoice-print .document-items,
  #invoice-print .document-items th,
  #invoice-print .document-items td { font-size: 9pt !important; color: #000 !important; }
  #invoice-print .invoice-totals-table td { font-size: 9pt !important; color: #000 !important; background: #fff !important; }
  #invoice-print .invoice-totals-table tr:last-child td { font-size: 12pt !important; font-weight: 700 !important; color: #000 !important; background: #fff !important; background-image: none !important; border-color: #000 !important; }
}



/* Slightly larger right-aligned company logo in invoice print. */
@media print {
  #invoice-print .document-logo { flex-basis: 40mm !important; width: 40mm !important; max-width: 40mm !important; height: 17mm !important; max-height: 17mm !important; margin-left: auto !important; justify-content: flex-end !important; }
  #invoice-print .document-logo img { display: block !important; max-width: 40mm !important; max-height: 17mm !important; object-fit: contain !important; object-position: right center !important; visibility: visible !important; }
}



/* Header matched to supplied Electro Pneumatics reference. */
@media print {
  #invoice-print .document-brand { color: #627a8d !important; font-size: 9pt !important; }
  #invoice-print .document-brand strong { color: #173b57 !important; font-size: 16pt !important; font-weight: 700 !important; text-transform: uppercase !important; }
  #invoice-print .company-name-accent { color: #173b57 !important; }
  #invoice-print .document-logo { order: 2 !important; flex: 0 0 56mm !important; width: 56mm !important; max-width: 56mm !important; height: 22mm !important; max-height: 22mm !important; margin-left: auto !important; justify-content: flex-end !important; }
  #invoice-print .document-logo img { display: block !important; width: auto !important; max-width: 56mm !important; height: auto !important; max-height: 22mm !important; object-fit: contain !important; object-position: right center !important; visibility: visible !important; }
}



/* Final invoice typography: black print text with compact 8pt details. */
@media print {
  #invoice-print,
  #invoice-print * { color: #000 !important; }
  #invoice-print .document-brand { color: #000 !important; font-size: 9pt !important; }
  #invoice-print .document-brand strong { color: #000 !important; font-size: 16pt !important; font-weight: 700 !important; text-transform: uppercase !important; }
  #invoice-print .company-name-accent { color: #000 !important; }
  #invoice-print .invoice-title h1 { color: #000 !important; font-size: 14pt !important; font-weight: 700 !important; }
  #invoice-print .invoice-party strong,
  #invoice-print .invoice-meta span,
  #invoice-print .invoice-meta strong { color: #000 !important; font-size: 8pt !important; font-weight: 700 !important; }
  #invoice-print .document-items,
  #invoice-print .document-items th,
  #invoice-print .document-items td { color: #000 !important; font-size: 8pt !important; }
  #invoice-print .document-items th { font-weight: 700 !important; }
  #invoice-print .invoice-totals-table td { color: #000 !important; font-size: 9pt !important; background: #fff !important; }
  #invoice-print .invoice-totals-table tr:last-child td { color: #000 !important; font-size: 12pt !important; font-weight: 700 !important; background: #fff !important; background-image: none !important; }
  #invoice-print .document-logo { order: 2 !important; flex-basis: 56mm !important; width: 56mm !important; max-width: 56mm !important; height: 22mm !important; max-height: 22mm !important; margin-left: auto !important; justify-content: flex-end !important; }
  #invoice-print .document-logo img { display: block !important; max-width: 56mm !important; max-height: 22mm !important; object-fit: contain !important; object-position: right center !important; visibility: visible !important; }
}



/* Invoice view and print: match approved header and keep every text element black. */
#invoice-print,
#invoice-print * { color: #000 !important; }
#invoice-print { font-size: 9pt !important; }
#invoice-print .document-brand-row { display: flex !important; align-items: center !important; justify-content: space-between !important; gap: 5mm !important; }
#invoice-print .document-brand { order: 1 !important; flex: 1 1 auto !important; color: #000 !important; font-size: 9pt !important; }
#invoice-print .document-brand strong { color: #000 !important; font-size: 16pt !important; font-weight: 700 !important; text-transform: uppercase !important; }
#invoice-print .company-name-accent { color: #000 !important; }
#invoice-print .invoice-title h1 { color: #000 !important; font-size: 14pt !important; font-weight: 700 !important; }
#invoice-print .invoice-party strong,
#invoice-print .invoice-meta span,
#invoice-print .invoice-meta strong { color: #000 !important; font-size: 8pt !important; font-weight: 700 !important; }
#invoice-print .document-items,
#invoice-print .document-items th,
#invoice-print .document-items td { color: #000 !important; font-size: 8pt !important; }
#invoice-print .document-items th { font-weight: 700 !important; }
#invoice-print .invoice-totals-table td { color: #000 !important; font-size: 9pt !important; background: #fff !important; background-image: none !important; }
#invoice-print .invoice-totals-table tr:last-child td { color: #000 !important; font-size: 12pt !important; font-weight: 700 !important; background: #fff !important; background-image: none !important; }
#invoice-print .document-logo { order: 2 !important; display: flex !important; flex: 0 0 56mm !important; width: 56mm !important; max-width: 56mm !important; height: 22mm !important; max-height: 22mm !important; margin-left: auto !important; align-items: center !important; justify-content: flex-end !important; visibility: visible !important; }
#invoice-print .document-logo img { display: block !important; width: 56mm !important; max-width: 56mm !important; height: 22mm !important; max-height: 22mm !important; object-fit: contain !important; object-position: right center !important; visibility: visible !important; }
