/* OrderHub SOA Details v7.11.2 — isolated, branded finance view */
.soa-hero{background:linear-gradient(125deg,#141414,#2d2411 72%,#665012);border:1px solid #b59b51;border-radius:16px;color:#fff;display:flex;align-items:center;justify-content:space-between;gap:20px;padding:30px 32px;margin:0 0 18px}
.soa-hero>div>span{color:#fbd452;font-size:10px;letter-spacing:1.7px;font-weight:800}
.soa-hero h2{color:#fff;font-size:34px;font-weight:900;line-height:1.1;margin:12px 0}.soa-hero h2 em{font-style:normal;color:#ffd31b}
.soa-hero p{font-size:12px;line-height:1.65;color:#e3ddce;max-width:680px;margin:0}
.soa-hero-icon{min-width:90px;max-width:90px;height:90px;border-radius:15px;background:#ffd21b19;border:1px solid #a48934;display:grid;place-items:center;color:#ffd21b}.soa-hero-icon svg{width:50px;height:50px}
.soa-panel{padding:18px 20px!important;margin-bottom:15px}.soa-panel-header{display:flex;align-items:baseline;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:18px}
.soa-panel-header h3{margin:0;font-weight:850;font-size:16px}.soa-panel-header small{color:#777;font-size:11px}
.soa-filter-grid{display:grid;grid-template-columns:1fr 1.5fr 1fr 1fr;gap:12px}.soa-filter-grid .form-field{margin:0;min-width:0}.soa-filter-grid select,.soa-filter-grid input{width:100%;min-width:0}
.soa-kpi-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:5px 0 16px}
.soa-kpi{padding:18px!important;display:flex;min-height:138px;flex-direction:column;gap:12px;min-width:0}
.soa-kpi small{font-size:11px;letter-spacing:.2px;font-weight:750;color:#666}.soa-kpi strong{font-size:clamp(18px,1.75vw,25px);line-height:1.2;overflow-wrap:anywhere}.soa-kpi span{color:#847748;font-size:10px;margin-top:auto}
.soa-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.soa-age-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.soa-age-item{border:1px solid #e5e5e5;border-radius:8px;padding:13px;background:#fcfcfc;display:flex;flex-direction:column;gap:8px;min-width:0}
.soa-age-item span{font-size:11px;color:#777}.soa-age-item b{font-size:16px;overflow-wrap:anywhere}
.soa-summary-lines{display:grid;gap:6px}.soa-summary-lines>div{display:flex;align-items:center;justify-content:space-between;gap:15px;border-bottom:1px solid #ededed;padding:9px 0;font-size:12px}.soa-summary-lines span{color:#666}.soa-summary-lines b,.soa-summary-lines strong{white-space:nowrap}.soa-summary-lines .soa-summary-total{background:#fff5c7;padding:12px;border:1px solid #e8ce57;border-radius:8px;font-size:14px}
.soa-caption{font-size:11px;color:#777;line-height:1.6}.soa-reg-controls{display:flex;align-items:end;gap:12px;margin-bottom:15px;flex-wrap:wrap}.soa-reg-controls .form-field{margin:0;min-width:180px}.soa-reg-controls .form-field:first-child{flex:2}.soa-reg-controls .form-field:last-child{flex:1}.soa-reg-controls input,.soa-reg-controls select{width:100%}
.soa-panel .table-wrap{overflow:auto}.soa-panel .data-table td{white-space:nowrap}.soa-no-data{color:#777;text-align:center;padding:25px}
.soa-page{display:flex;justify-content:flex-end;align-items:center;gap:14px;margin:16px 0 0;font-size:12px;color:#777}
.soa-guidance{margin:16px 0;padding:18px!important;background:#fffaf0!important;border:1px solid #efdca8!important}
.soa-guidance h3{display:flex;gap:8px;align-items:center;font-size:13px;margin:0 0 8px}.soa-guidance p{line-height:1.6;font-size:11px;color:#655b4e;margin:0}
#soa-printable{display:none}
@media(max-width:1250px){.soa-filter-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.soa-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:760px){.soa-hero{padding:22px}.soa-hero h2{font-size:27px}.soa-hero-icon{display:none}.soa-filter-grid,.soa-grid{grid-template-columns:1fr}.soa-kpi-grid{gap:8px}.soa-kpi{min-height:126px;padding:12px!important}.soa-kpi strong{font-size:18px}.soa-panel{padding:13px!important}.soa-summary-lines>div{flex-direction:column;align-items:start}}
@media print {
 @page{size:A4;margin:12mm}
 body *{visibility:hidden!important}
 #soa-printable,#soa-printable *{visibility:visible!important}
 #soa-printable{display:block!important;position:absolute;left:0;top:0;width:100%;color:#161616;font-family:Arial,sans-serif;background:white;padding:0;line-height:1.5;font-size:11px}
 #soa-printable .soa-print-heading{display:flex;justify-content:space-between;border-bottom:3px solid #111;padding:0 0 18px;margin-bottom:17px}
 #soa-printable .soa-print-heading strong{font-size:18px}
 #soa-printable .soa-print-heading h1{font-size:22px;margin:0}
 #soa-printable .soa-print-heading small,#soa-printable .soa-print-heading p{font-size:10px}
 #soa-printable .soa-print-details{display:flex;justify-content:space-between;gap:35px;margin-bottom:25px}
 #soa-printable .soa-print-details>div{width:50%}#soa-printable .soa-print-details p{margin:3px 0}
 #soa-printable .table-wrap{overflow:visible}#soa-printable table{width:100%;border-collapse:collapse;font-size:9px}
 #soa-printable th,#soa-printable td{border-bottom:1px solid #d8d8d8;padding:9px 5px;text-align:left}
 #soa-printable th{background:#f4edca!important;color:#111!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
 #soa-printable .soa-print-total{margin:18px 0 30px;display:flex;justify-content:space-between;padding:16px 0;border-top:2px solid #111}
 #soa-printable footer{font-size:9px;color:#555;border-top:1px solid #aaa;padding-top:12px}
 #soa-printable .secondary-line{font-size:9px}
}

/* SOA V7.12 — finance report polish; no changes to other pages */
.soa-hero-flags{display:flex;gap:16px;flex-wrap:wrap;margin-top:18px}
.soa-hero-flags span{display:inline-flex;align-items:center;gap:5px;font-size:10px;color:#f7df9a;font-weight:750}
.soa-hero-flags svg{width:14px;height:14px}
.soa-presets{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:15px;padding-top:12px;border-top:1px solid #ebebeb}
.soa-presets>span{font-size:11px;font-weight:800;color:#696969;margin-right:6px}
.soa-preset-active{border-color:#d3a900!important;background:#fff4b5!important;font-weight:800}
.soa-current-context{display:flex;gap:9px;align-items:start;background:#fff8da;border:1px solid #ebd78e;border-radius:10px;padding:12px 15px;margin:10px 0 16px;font-size:12px;line-height:1.55;color:#514222}
.soa-current-context svg{width:17px;height:17px;flex:none}
.soa-row-actions{display:flex;gap:5px;align-items:center}
.soa-reg-controls .form-field:first-child{flex:2}.soa-reg-controls .form-field:last-child{flex:1}
#soa-printable .soa-print-figures{display:flex;gap:10px;margin:0 0 18px}
#soa-printable .soa-print-figures>div{flex:1;border:1px solid #ccc;padding:10px;display:flex;flex-direction:column;gap:7px;min-width:0}
#soa-printable .soa-print-figures small{font-size:9px}#soa-printable .soa-print-figures b{font-size:12px}
@media(max-width:760px){.soa-hero-flags{gap:9px}.soa-row-actions{flex-wrap:wrap}.soa-presets>span{width:100%}}
@media print {#soa-printable .soa-print-figures{display:flex!important;visibility:visible!important}#soa-printable .soa-print-figures>div{break-inside:avoid}#soa-printable tr{break-inside:avoid}#soa-printable th{font-size:8px}#soa-printable td{font-size:8px}#soa-printable .soa-print-total{break-inside:avoid}}

/* Receipt-based financial reconciliation improvements */
.soa-kpi-grid{grid-template-columns:repeat(5,minmax(0,1fr))}
@media(max-width:1250px){.soa-kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:610px){.soa-kpi-grid{grid-template-columns:1fr 1fr}.soa-kpi strong{font-size:17px}}

@media print{@page{size:A4 landscape;margin:10mm}#soa-printable table{font-size:8px}#soa-printable th,#soa-printable td{padding:7px 4px}}

/* SOA A4 portrait V10 — PDF template-inspired summary and transaction ledger.
   Print and screen scoped only to SOA. */
.soa-statement-preview{border:1px solid #dcc77e!important;background:#fff!important;overflow:hidden}
.soa-preview-header{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:14px;flex-wrap:wrap}
.soa-statement-eyebrow{display:block;color:#93711b;letter-spacing:1.25px;font-size:10px;font-weight:900;margin-bottom:6px}
.soa-preview-header h3{font-size:21px;letter-spacing:-.4px;margin:0 0 5px;overflow-wrap:anywhere}
.soa-preview-header p{color:#666;font-size:11px;margin:0}
.soa-statement-four{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:15px 0}
.soa-statement-four>div{display:flex;flex-direction:column;gap:7px;padding:14px 12px;background:#f8f8f6;border:1px solid #eae8e1;border-radius:10px;min-width:0}
.soa-statement-four small{color:#6d6b63;font-size:10px;font-weight:850}
.soa-statement-four b{font-size:clamp(16px,1.7vw,22px);white-space:nowrap;letter-spacing:-.5px}
.soa-statement-four .soa-statement-due{background:#fff6d8;border-color:#e8ce65}
.soa-ledger-scroll{max-width:100%;overflow-x:auto;overflow-y:auto;max-height:405px;border:1px solid #e5e5e2;border-radius:9px}
.soa-ledger-table{width:100%;border-collapse:collapse;min-width:790px;font-size:11px;background:#fff}
.soa-ledger-table th{position:sticky;top:0;background:#242424;color:white;padding:11px 12px;text-align:left;z-index:1;font-size:9px;letter-spacing:.3px;line-height:1.45}
.soa-ledger-table td{padding:10px 12px;border-bottom:1px solid #ececec;vertical-align:top;white-space:normal}
.soa-ledger-table tbody tr:nth-child(even){background:#f7f7f6}
.soa-ledger-table .soa-ledger-opening{background:#fff3ca!important;font-weight:750}
.soa-ledger-meta{display:block;font-size:9px;color:#777;margin-top:3px;line-height:1.45}
.soa-inline-paid{display:inline-block;margin-left:5px;font-size:8px;color:#147448;font-weight:800}
.soa-money{text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap!important}
.soa-money-total{font-weight:850}
.soa-nowrap{white-space:nowrap!important}
.soa-statement-preview>.soa-caption{margin-bottom:0;margin-top:10px}
@media(max-width:820px){.soa-statement-four{grid-template-columns:repeat(2,minmax(0,1fr))}.soa-statement-four b{font-size:18px}.soa-preview-header>.btn{width:100%;justify-content:center}}

/* A4 portrait: overrides v7.12 landscape declaration; no impact on other printing routes. */
@media print {
 @page {size:A4 portrait;margin:12mm 11mm 13mm 11mm}
 html,body{height:auto!important;min-height:0!important;width:auto!important;background:#fff!important;margin:0!important;padding:0!important;overflow:visible!important}
 body *{visibility:hidden!important}
 #app,#app .main-wrap,#content{height:0!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;overflow:visible!important;transform:none!important}
 #soa-printable,#soa-printable *{visibility:visible!important}
 #soa-printable{display:block!important;position:absolute!important;top:0!important;left:0!important;width:100%!important;max-width:none!important;min-height:0!important;height:auto!important;box-sizing:border-box!important;margin:0!important;padding:0!important;font:8.3pt/1.35 Arial,Helvetica,sans-serif!important;color:#1b1b1b!important;background:#fff!important}
 #soa-printable .soa-a4-header{display:flex;align-items:flex-start;justify-content:space-between;gap:12mm;border-bottom:1.1pt solid #212121;padding:0 0 7mm;margin-bottom:7mm;break-inside:avoid}
 #soa-printable .soa-a4-company{display:flex;align-items:center;gap:10px;max-width:55%}
 #soa-printable .soa-a4-company img{width:38px;height:45px;object-fit:contain}
 #soa-printable .soa-a4-company div{display:flex;flex-direction:column;gap:3px}
 #soa-printable .soa-a4-company b{font-size:10.6pt;line-height:1.15}
 #soa-printable .soa-a4-company small{font-size:7pt;color:#5b5b5b;letter-spacing:.15px}
 #soa-printable .soa-a4-head-right{text-align:right;display:flex;flex-direction:column;gap:4px;max-width:45%}
 #soa-printable .soa-a4-head-right h1{font-size:16pt;line-height:1.1;margin:0!important;letter-spacing:-.5px}
 #soa-printable .soa-a4-head-right small{font-size:7.5pt;color:#555}
 #soa-printable .soa-a4-intro{display:grid;grid-template-columns:1fr minmax(72mm,81mm);gap:8mm;align-items:start;margin-bottom:8mm;break-inside:avoid}
 #soa-printable .soa-a4-recipient{font-size:8pt;line-height:1.45;min-width:0;overflow-wrap:anywhere;display:flex;flex-direction:column;gap:3px}
 #soa-printable .soa-a4-recipient .soa-a4-mini{font-size:7pt;font-weight:700;letter-spacing:.7px;color:#666;margin-bottom:3px}
 #soa-printable .soa-a4-recipient strong{font-size:10pt}
 #soa-printable .soa-a4-recipient small{font-size:7pt;color:#777;margin-top:4px}
 #soa-printable .soa-a4-summary{border:1px solid #d6d6d6}
 #soa-printable .soa-a4-summary h2{font-size:9pt;margin:0;padding:8px 10px;background:#eaeaea!important;color:#171717;font-weight:800}
 #soa-printable .soa-a4-summary dl{margin:0;padding:6px 10px 5px}
 #soa-printable .soa-a4-summary dl>div{display:flex;align-items:baseline;justify-content:space-between;gap:8px;padding:5px 0}
 #soa-printable .soa-a4-summary dt{font-size:7.3pt;color:#444}
 #soa-printable .soa-a4-summary dd{margin:0;font-size:7.8pt;font-weight:700;text-align:right;white-space:nowrap}
 #soa-printable .soa-a4-summary .soa-a4-final{border-top:1px solid #666;padding-top:7px;margin-top:3px}
 #soa-printable .soa-a4-summary .soa-a4-final dt,#soa-printable .soa-a4-summary .soa-a4-final dd{font-weight:900;color:#111}
 #soa-printable .soa-a4-ledger{overflow:visible!important;display:block!important}
 #soa-printable .soa-a4-ledger table{display:table!important;table-layout:fixed!important;width:100%!important;border-collapse:collapse!important;margin:0!important;font-size:7pt!important;line-height:1.3!important}
 #soa-printable .soa-a4-ledger thead{display:table-header-group!important}
 #soa-printable .soa-a4-ledger tbody{display:table-row-group!important}
 #soa-printable .soa-a4-ledger tr{break-inside:avoid!important;page-break-inside:avoid!important}
 #soa-printable .soa-a4-ledger th{background:#353535!important;color:#fff!important;border:0!important;font-size:6.5pt!important;font-weight:700;letter-spacing:.1px;text-align:left!important;padding:7px 5px!important;overflow-wrap:anywhere}
 #soa-printable .soa-a4-ledger th:nth-child(n+4){text-align:right!important}
 #soa-printable .soa-a4-ledger td{font-size:7pt!important;line-height:1.35!important;white-space:normal;border:0!important;border-bottom:1px solid #ddd!important;padding:6px 5px!important;vertical-align:top!important;overflow-wrap:anywhere!important}
 #soa-printable .soa-a4-ledger td:nth-child(n+4){text-align:right!important;white-space:nowrap!important;font-variant-numeric:tabular-nums}
 #soa-printable .soa-a4-ledger tbody tr:nth-child(even){background:#f1f1f1!important}
 #soa-printable .soa-a4-ledger .soa-ledger-opening{background:#e6e6e6!important}
 #soa-printable .soa-inline-paid{color:#333!important;font-size:6.2pt!important}
 #soa-printable .soa-ledger-meta{display:block!important;color:#676767!important;font-size:6.1pt!important;line-height:1.3!important;margin-top:1px}
 #soa-printable .soa-a4-balance{display:flex;justify-content:flex-end;align-items:baseline;gap:8mm;margin:6mm 0 4mm;padding:3mm 0 0;border-top:1.2pt solid #333;font-size:9pt;break-inside:avoid}
 #soa-printable .soa-a4-balance strong{font-size:10.5pt;white-space:nowrap}
 #soa-printable .soa-a4-footer{font-size:6.6pt!important;line-height:1.35;color:#555!important;border-top:1px solid #aaa;margin-top:7mm!important;padding-top:3mm!important;break-inside:avoid}
 #soa-printable .soa-a4-footer p{font-size:6.6pt!important;margin:3px 0!important;line-height:1.35!important}
 #soa-printable *{-webkit-print-color-adjust:exact!important;print-color-adjust:exact!important;box-shadow:none!important;text-shadow:none!important}
}
@media print {
 /* Remove hidden dashboard panels from print flow to prevent trailing blank pages. */
 #auth-screen,#modal-root,#toast-root,#mobile-dimmer,.sidebar,.topbar,.footer,.fab-scroll,.scroll-controls{display:none!important}
 #app,.main-wrap,#content{display:block!important;position:static!important;float:none!important;width:100%!important;height:auto!important;min-height:0!important;max-height:none!important;margin:0!important;padding:0!important;overflow:visible!important}
 #content > :not(#soa-printable){display:none!important}
 #soa-printable{position:static!important;top:auto!important;left:auto!important}
}
@page {
 size:A4 portrait;
 margin:12mm 11mm 13mm 11mm;
 @bottom-left {content:"OrderHub  /  Statement of Accounts";font:7pt Arial,Helvetica,sans-serif;color:#777}
 @bottom-right {content:"Page " counter(page) " of " counter(pages);font:7pt Arial,Helvetica,sans-serif;color:#777}
}
