*{box-sizing:border-box}body{margin:0;font:16px/1.5 Arial,Helvetica,sans-serif;color:#293139;background:#edf2f5}header{background:#102b3e;color:white;border-bottom:4px solid #00b8e4;padding:18px max(5%,calc((100vw - 980px)/2));display:flex;justify-content:space-between;gap:15px;flex-wrap:wrap}header span{font-size:.9rem;color:#ced8dd}main{max-width:1020px;margin:auto;padding:24px 20px 50px}h1{font-size:1.8rem;line-height:1.2;margin:4px 0 12px}h2{font-size:1.2rem;margin:0 0 10px}h3{font-size:1rem;margin:0 0 6px}p{margin:6px 0 12px}.muted{color:#59666c;font-size:.85rem}.card,#respond{background:white;border:1px solid #dce6ed;border-radius:9px;padding:20px;margin-bottom:16px}.reference{font-size:.85rem;color:#126480;font-weight:bold}.addresses,.fields{display:grid;grid-template-columns:1fr 1fr;gap:24px}.address{white-space:pre-line;overflow-wrap:anywhere}.line{padding:12px 0;border-top:1px solid #d5dfe4;display:flex;justify-content:space-between;gap:20px}.line:first-of-type{border-top:0}.line>div{min-width:0}.line p{margin:4px 0;font-size:.9rem}.amount{white-space:nowrap;text-align:right}.old{display:block;font-size:.8rem;text-decoration:line-through;color:#5e6b71}.sizes span{display:inline-block;margin-right:10px;white-space:nowrap}.note{white-space:pre-wrap;overflow-wrap:anywhere}.artwork{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0}.artwork button{width:160px;border:1px solid #dce6ed;padding:6px;background:white;text-align:left}.artwork img{display:block;width:100%;height:130px;object-fit:contain}.artwork span{display:block;overflow-wrap:anywhere;font-size:.8rem;margin-top:5px}.totals{max-width:430px;margin-left:auto}.totals>div{display:flex;justify-content:space-between;gap:15px;padding:5px 0}.totals .total{border-top:2px solid #00b8e4;margin-top:8px;padding-top:10px;font-size:1.2rem}.terms{margin-top:16px;padding:12px;background:#e7f6fb;border-radius:6px}label{display:block;font-weight:600;font-size:.9rem;margin:14px 0 6px}label span{font-weight:normal}input,textarea{font:inherit;padding:10px;border:1px solid #a8bfce;border-radius:5px;width:100%;margin-top:5px}textarea{resize:vertical}button{font:inherit;font-size:.9rem;cursor:pointer;border:1px solid #85969e;border-radius:6px;padding:10px 14px;background:white;color:#293139}button.primary{background:#00b8e4;border-color:#0096be;color:#102b3e;font-weight:bold}button:disabled{opacity:.55;cursor:wait}.actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}.confirmation{display:flex;align-items:flex-start;gap:10px;font-weight:normal;margin-top:16px}.confirmation input{width:18px;height:18px;flex-shrink:0;margin:3px 0 0}#status{padding:14px 18px;border:1px solid #8facba;background:#dfedf3;border-radius:8px;margin-bottom:18px}#responseError{color:#982d22;white-space:pre-line}[hidden]{display:none!important}dialog{width:min(1000px,94vw);max-height:92vh;border:0;border-radius:8px;padding:14px}dialog::backdrop{background:#171f22cc}#largeArt{display:block;max-width:100%;max-height:74vh;margin:10px auto;object-fit:contain}#artCaption{overflow-wrap:anywhere}:focus-visible{outline:3px solid #246caf;outline-offset:3px}a{color:#246caf}@media(max-width:600px){main{padding:16px 12px}.card,#respond{padding:14px}.fields,.addresses{grid-template-columns:1fr;gap:6px}.line{gap:10px}.artwork button{width:130px}.artwork img{height:110px}}

.document-actions{margin:0 0 16px}.invoice-date{font-size:.85rem;color:#59666c}@media print{@page{margin:12mm}body{background:white;font-size:10pt}header{padding:0 0 10px;background:white;color:#293139;border-bottom:2px solid #00b8e4}header span{color:#293139}main{max-width:none;padding:12px 0}#status,#respond,.document-actions,dialog{display:none!important}.card{border:0;padding:0 0 12px;margin-bottom:12px;border-radius:0}.line,.totals,.terms,.addresses{break-inside:avoid}.artwork button{width:115px;border:0;padding:0;opacity:1}.artwork img{height:90px}.artwork span{font-size:8pt}.amount{white-space:nowrap}a{color:inherit;text-decoration:none}.fields,.addresses{grid-template-columns:1fr 1fr}h1{font-size:18pt}.totals{max-width:350px}}

/* Compact document identity and address block, shared by customer and staff views. */
.document-title-row{display:grid;grid-template-columns:minmax(220px,auto) minmax(0,1fr);align-items:baseline;gap:12px 24px}.document-title-row .reference{font-size:1.45rem;line-height:1.2;color:#293139;margin:0;font-weight:700}.document-title-row h1{font-size:1.35rem;text-align:right;margin:0;overflow-wrap:anywhere}.document-meta{display:flex;flex-wrap:wrap;gap:4px 16px;font-size:.8rem;color:#59666c;margin:8px 0 14px}.document-meta .invoice-date{font-size:inherit;margin:0}.document-summary .addresses{gap:10px 24px}.document-summary h3{font-size:.8rem;color:#59666c;margin-bottom:3px}.document-summary .address{font-size:.9rem;line-height:1.35}.account-reference{font-size:.78rem;color:#59666c;margin:4px 0 0}.document-summary .note{font-size:.85rem;margin:4px 0 0}@media screen and (max-width:600px){.document-title-row{grid-template-columns:1fr;gap:5px}.document-title-row h1{text-align:left}.document-meta{margin:6px 0 12px}}@media print{body>header{display:none!important}main{padding-top:0}.document-summary{padding-bottom:10px;margin-bottom:10px;break-inside:avoid}.document-title-row{grid-template-columns:minmax(180px,auto) minmax(0,1fr);gap:16px}.document-title-row .reference{font-size:18pt}.document-title-row h1{font-size:15pt;text-align:right}.document-meta{font-size:8pt;margin:5px 0 9px}.document-summary .addresses{gap:18px}.document-summary h3{font-size:8pt}.document-summary .address{font-size:9pt;line-height:1.3}.account-reference{font-size:8pt}}

.payment-prices{margin:16px 0}.price-options{display:grid;grid-template-columns:1fr 1fr;gap:10px}.price-options>div{border:1px solid #b4c2c9;border-radius:6px;padding:12px}.price-options strong{display:block;font-size:1.35rem;margin:3px 0}.price-options small,.payment-methods small{display:block;font-size:.78rem;font-weight:normal}.payment-choice{border:1px solid #dce6ed;border-radius:6px;margin:16px 0;padding:12px}.payment-choice legend{font-weight:bold}.payment-methods{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.payment-methods label{display:flex;gap:8px;align-items:flex-start;border:1px solid #dce6ed;border-radius:5px;padding:10px;margin:0}.payment-methods input{width:17px;height:17px;flex-shrink:0;margin:2px 0}.arrangement-summary{margin:14px 0;padding:12px;background:#e7f6fb;border-radius:6px}#paymentError{color:#982d22}summary{cursor:pointer;font-weight:bold}@media(max-width:600px){.price-options,.payment-methods{grid-template-columns:1fr}}@media print{#paymentUpdate{display:none!important}.payment-prices,.arrangement-summary{break-inside:avoid}.price-options{grid-template-columns:1fr 1fr}.price-options>div{padding:7px}.price-options strong{font-size:12pt}.payment-prices{margin:8px 0}.payment-prices .muted{font-size:8pt}}

/* Compact review > payment > confirmation flow; print remains a document. */
@media screen{main{padding-top:16px}.card,#respond{padding:14px 16px;margin-bottom:12px}.line{padding:8px 0}.line p{margin:2px 0}.artwork{margin:8px 0}.terms{margin-top:10px;padding:10px}.payment-prices{margin:12px 0}.price-options>div{padding:9px 12px}.price-options strong{font-size:1.2rem}.payment-prices .muted{margin:7px 0 0}.payment-choice{padding:0;border:0;margin:10px 0}.payment-choice legend{font-size:.9rem;margin-bottom:6px}.payment-methods{grid-template-columns:repeat(5,minmax(0,1fr));gap:6px}.payment-methods label{padding:8px;font-size:.82rem;cursor:pointer}.payment-methods label:has(input:checked){border-color:#246caf;background:#edf5fd;box-shadow:0 0 0 1px #246caf}.payment-methods small{font-size:.72rem}.payment-notice{font-size:.86rem;line-height:1.4;background:#edf5fd;border-left:3px solid #246caf;padding:9px 11px;margin:10px 0}.payment-notice.pending{background:#fff7e6;border-color:#bd830d}.payment-notice .muted{display:block;margin-top:3px}.optional-note{margin:9px 0;font-size:.86rem}.optional-note summary{color:#246caf;font-weight:normal}.fields label{margin:8px 0 4px}input,textarea{padding:8px}.confirmation{margin-top:10px}.actions{margin-top:12px}.arrangement-summary{margin:10px 0;padding:10px}.arrangement-summary p{margin:4px 0}#respond{scroll-margin-top:16px}#respond h2{margin-bottom:6px}.document-actions{margin-bottom:12px}}
@media screen and (max-width:700px){.payment-methods{grid-template-columns:repeat(2,minmax(0,1fr))}.payment-methods label:first-child{grid-column:1/-1}.card,#respond{padding:12px}.fields{gap:4px}}

.received-payments{border-top:1px solid #d7dcdf;padding-top:12px;margin-top:16px}.received-payments .line{gap:16px}

#invoicePaymentDialog{max-width:640px;padding:20px}#invoicePaymentDialog>.actions{justify-content:space-between;align-items:center;margin-top:0}#invoicePaymentDialog select{display:block;width:100%;padding:8px;margin-top:5px;font:inherit;border:1px solid #a8bfce;border-radius:5px}#invoicePaymentError{color:#982d22}#invoicePaymentDialog .confirmation{flex-direction:row}@media print{#invoicePaymentDialog{display:none!important}}

.shipment-notice{background:white;border:1px solid #b4c4cc;border-left:5px solid #246caf;border-radius:8px;padding:14px 18px;margin-bottom:16px}.shipment-notice.shipped{border-left-color:#216483}.shipment-notice>strong{display:block;font-size:1.3rem}.shipment-notice>span{font-size:.85rem}.tracking-package{display:flex;gap:8px 16px;align-items:center;flex-wrap:wrap;margin-top:8px;font-size:.9rem}.tracking-package a{color:#246caf;font-weight:600;overflow-wrap:anywhere}@media print{.shipment-notice{break-inside:avoid}.tracking-package a{color:#293139}}

/* Dense printable document, shared by the real customer link and staff invoice. */
@media print{
 body{font-size:9pt;line-height:1.3}
 .card{padding:0 0 7px;margin-bottom:7px}
 h2{font-size:11pt;margin:0 0 4px;break-after:avoid}
 h3{font-size:9pt;margin:0 0 2px}
 p{margin:3px 0 5px}.muted{font-size:8pt}
 .line{padding:6px 0;gap:12px;align-items:start}
 .line p{font-size:9pt;margin:2px 0}
 .line>div:first-child{flex:1;min-width:0}
 .line .amount{flex:0 0 100px;font-size:9pt}
 .sizes{line-height:1.5}.sizes span{margin-right:6px}
 .artwork{gap:8px;margin:5px 0;break-inside:avoid}
 .artwork button{width:90px}.artwork img{height:65px}.artwork span{font-size:7pt;line-height:1.2}
 .totals{max-width:320px}.totals>div{padding:3px 0}.totals .total{font-size:12pt;margin-top:5px;padding-top:6px}
 .terms{padding:6px 8px;margin-top:7px}.terms p{margin:3px 0}
 .price-options{gap:8px}.price-options>div{padding:6px 8px}.price-options strong{font-size:11pt;margin:2px 0}
 .price-options small{font-size:7.5pt}.payment-prices{margin:7px 0}.payment-prices .muted{margin:4px 0}
 .received-payments{margin-top:8px;padding-top:7px}.arrangement-summary{padding:7px;margin:7px 0}
 .document-summary{padding-bottom:8px;margin-bottom:8px}.document-meta{margin:4px 0 7px}
}

#status.needs-attention{background:#fff0cd;color:#503400;border:2px solid #bd7a00;border-left-width:6px;padding:18px 20px;font-size:1.05rem;font-weight:600;line-height:1.5}

.color-swatch{display:inline-block;width:16px;height:16px;min-width:16px;object-fit:cover;border:1px solid #80909c;border-radius:50%;margin-right:7px;vertical-align:middle}.color-label{display:flex;align-items:center;gap:0}
.manual-payment-success{margin:14px 0;padding:18px;border:2px solid #3a875d;border-left-width:6px;border-radius:9px;background:#eaf7ee;color:#153d27}.manual-payment-success>div>strong{font-size:1.1rem}.manual-payment-success p{margin:9px 0 14px;font-size:1rem}#invoicePaymentDialog [hidden]{display:none!important}

.adjustment-table{width:100%;border-collapse:collapse;margin:12px 0;font-size:.9rem}.adjustment-table th,.adjustment-table td{padding:8px;border-bottom:1px solid #d5dfe4;text-align:right}.adjustment-table th:first-child{text-align:left}.invoice-adjustment details{margin:12px 0}.invoice-adjustment p{white-space:pre-wrap;overflow-wrap:anywhere}@media print{.invoice-adjustment details>*{display:block!important}.invoice-adjustment{break-inside:avoid}#invoiceAdjustmentsLink{display:none}}
#invoicePaymentDialog{width:min(580px,calc(100% - 24px));padding:20px}#invoicePaymentDialog h2{font-size:1.2rem;margin:0}#invoicePaymentDialog .compact-payments label{margin:8px 0;font-size:.85rem}#invoicePaymentDialog .compact-payments input,#invoicePaymentDialog .compact-payments select{padding:8px 10px}#invoicePaymentDialog .compact-payments textarea{min-height:60px}#invoicePaymentDialog details{margin:12px 0;font-size:.85rem}#invoicePaymentDialog summary{cursor:pointer}#invoicePaymentDialog .confirmation{font-size:.85rem}#invoicePaymentDialog [data-card-payment]{padding:8px 0 14px}#invoicePaymentDialog .payment-help{border-top:1px solid #cbd2d5;padding-top:10px}

/* Keep document print access in the upper-right action area. */
.document-actions #printDocument{margin-left:auto;order:10}

/* Customer screen presentation; document print styles remain unchanged. */
@media screen{
body.customer-portal{background:#f2f5f7;color:#263640;font-family:Arial,Helvetica,sans-serif}
.customer-portal header{background:#23343c;border-bottom:3px solid #00b8e4;align-items:center;padding-top:22px;padding-bottom:22px}
.customer-portal header strong{font-size:1.15rem;letter-spacing:.01em}
.customer-portal main{padding-top:26px;max-width:1040px}
.portal-welcome{margin:0 0 20px;color:#52636c;max-width:680px;line-height:1.6}
.portal-welcome strong{display:block;font-size:1.35rem;color:#23343c;margin-bottom:4px}
.customer-portal .card,.customer-portal #respond{border-color:#dce4e7;border-radius:14px;padding:22px;margin-bottom:18px;box-shadow:0 3px 12px #20313c05}
.customer-portal #status{background:#e7f6fb;border-color:#c9dce5;font-size:.92rem}
.customer-portal button,.customer-portal .sandbox-link{border-radius:8px;min-height:44px}
.customer-portal button.primary,.customer-portal .sandbox-link{background:#244c5e;border-color:#244c5e;color:white;font-weight:700}
.customer-portal .sandbox-link{display:inline-flex;align-items:center;justify-content:center;padding:12px 24px;text-decoration:none;margin:10px 0}
.customer-portal #customerLiveCheckout{border-top:4px solid #00b8e4;scroll-margin-top:20px}
.customer-portal #customerLiveCheckout h2{font-size:1.4rem;margin-bottom:6px}
.customer-portal .payment-intro{color:#61717a;margin-bottom:20px}
.customer-portal #customerLiveCheckout .sandbox-totals{gap:12px;margin:18px 0}
.customer-portal #customerLiveCheckout .sandbox-totals>div{border:0;background:#f4f6f7;border-radius:10px;padding:16px}
.customer-portal #customerLiveCheckout .sandbox-totals>div:last-child{background:#e7f1f5;color:#1c3845}
.customer-portal #customerLiveCheckout .sandbox-totals strong{font-size:1.5rem}
.customer-portal #livePaymentForm{max-width:540px}
.customer-portal #livePaymentForm select{width:100%;padding:12px;border:1px solid #bccbd1;border-radius:8px;background:white;font:inherit}
.customer-portal #livePaymentForm .primary{width:100%;padding:14px;margin-top:8px}
.customer-portal #customerLiveCheckout .sandbox-checkout{background:#f6f8f9;border:1px solid #e0e7ea;border-radius:10px;padding:18px;margin-top:16px}
.customer-portal .payment-tools{margin-top:14px;font-size:.86rem;color:#5d6f79}
.customer-portal .payment-tools summary{font-weight:400;text-decoration:underline}
.customer-portal #liveRefresh{border:0;background:transparent;color:#526c7b;padding-left:0;text-decoration:underline;font-size:.85rem}
.customer-portal .portal-help{margin-top:26px;text-align:center;border-top:1px solid #dce4e7;padding-top:20px}
@media(max-width:600px){.customer-portal main{padding:18px 12px}.customer-portal .card,.customer-portal #respond{padding:17px}.customer-portal #customerLiveCheckout .sandbox-totals{grid-template-columns:1fr}.customer-portal .sandbox-link{width:100%}}
}
@media print{.portal-welcome,.portal-help{display:none!important}}

/* Compact customer status and payment summaries. */
@media screen{
.customer-portal .portal-welcome{margin-bottom:12px;font-size:.88rem;line-height:1.35}.customer-portal .portal-welcome strong{display:inline;font-size:1rem;margin-right:5px}
.customer-portal .card,.customer-portal #respond{padding:14px 16px;margin-bottom:12px;border-radius:10px}
.customer-portal .arrangement-summary{background:transparent;border:0;border-left:2px solid #cbd4d8;border-radius:0;padding:4px 10px;margin:8px 0;font-size:.85rem}
.customer-portal .arrangement-summary p{margin:2px 0}.customer-portal .compact-payment-status{margin:8px 0;font-size:.88rem}
.customer-portal #status{padding:8px 12px;margin-bottom:10px;font-size:.86rem}
.customer-portal #customerLiveCheckout .sandbox-totals{display:flex;flex-wrap:wrap;gap:12px 24px;margin:10px 0}
.customer-portal #customerLiveCheckout .sandbox-totals>div,.customer-portal #customerLiveCheckout .sandbox-totals>div:last-child{background:transparent;border:0;padding:0;border-radius:0;min-width:120px}
.customer-portal #customerLiveCheckout .sandbox-totals strong{font-size:1.2rem}.customer-portal #customerLiveCheckout .sandbox-totals>div:last-child strong{font-size:1.4rem}
.customer-portal #customerLiveCheckout .sandbox-checkout{background:transparent;border:0;border-top:1px solid #e0e7ea;border-radius:0;padding:12px 0 0;margin-top:12px}
.customer-portal #customerLiveCheckout .sandbox-checkout h3{font-size:.9rem;font-weight:400}
.customer-portal .sandbox-link{margin:6px 0;padding:10px 20px}.customer-portal .payment-tools{margin-top:6px}.customer-portal #paymentUpdate h2{font-size:1rem;margin-bottom:4px}
.customer-portal #customerLiveCheckout .actions{margin-top:6px}.customer-portal #liveRefresh{min-height:32px;padding-top:4px;padding-bottom:4px}
.customer-portal #customerLiveCheckout h2{font-size:1.15rem}.customer-portal .received-payments{margin-top:10px;padding-top:8px}
}

/* Keep rounded unit-price labels within the price column, including print. */
.line .amount p{white-space:normal;overflow-wrap:normal}
.unit-average{display:inline-block;white-space:nowrap}
.tax-rate-detail{font-size:.85em;color:#59666c}
@media print{.line .amount p{white-space:normal}.unit-average{display:block}.tax-rate-detail{color:inherit}}

/* Customer-visible item instructions: readable on screen and without printed backgrounds. */
.line .item-instructions{margin:8px 0 4px;padding:8px 10px;border:1px solid #92753a;border-left:4px solid #92753a;border-radius:4px;background:#fff4d6;color:#302713;font-weight:700;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere;break-inside:avoid}
@media print{.line .item-instructions{background:#f2f2f2;color:#111;border-color:#555;padding:6px 8px;font-size:10pt;print-color-adjust:exact;-webkit-print-color-adjust:exact}}
