.payment-history{margin:26px 0 20px;background:var(--card,#fff);border:1px solid #dce4ef;border-radius:24px;overflow:hidden;box-shadow:0 12px 34px #24447606;color:var(--text,#273341)}
.ph-heading{display:flex;align-items:center;justify-content:space-between;padding:22px 26px;gap:16px}.ph-heading h2{display:flex;align-items:center;gap:14px;margin:0;font-size:23px}.ph-history-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:linear-gradient(135deg,#58bd6e,#419c79);color:white;font-size:34px}.payment-history button{cursor:pointer;font:inherit}.ph-heading button,.ph-order{background:none;border:0;color:#3269d8}.ph-heading button{font-weight:650}.ph-table{width:100%;border-collapse:collapse;table-layout:fixed}.ph-table th,.ph-table td{padding:17px 20px;border-top:1px solid #e2e8f1;text-align:left;overflow-wrap:anywhere;vertical-align:middle;font-size:14px}.ph-table th{background:#f6f8fb;color:#687990;font-weight:650}.ph-table th:nth-child(1){width:18%}.ph-table th:nth-child(2){width:24%}.ph-table th:last-child{width:10%}.ph-table td:first-child{font-size:13px;color:#62718a}.ph-order{text-align:left;padding:0;line-height:1.6;font-size:12px!important;overflow-wrap:anywhere}.ph-amount{font-weight:700}.ph-credit{color:#419b76}.ph-status{display:inline-flex;align-items:center;gap:5px;max-width:100%;padding:5px 10px;border-radius:20px;background:#edf1f7;color:#687790;font-size:12px;line-height:1.4}.ph-status:before{content:'◷';flex-shrink:0}.ph-credited{background:#e6f4ed;color:#308b66}.ph-credited:before{content:'✓'}.ph-failed,.ph-rejected{background:#fce9e8;color:#cc4440}.ph-failed:before,.ph-rejected:before{content:'×'}.ph-confirming,.ph-detected{background:#eaf1ff;color:#3269d8}.ph-view,.ph-pagination button{background:transparent;border:1px solid #c6d6f2;border-radius:24px;color:#3269d8;padding:7px 14px;transition:background .15s,transform .15s}.ph-view:hover,.ph-pagination button:hover:enabled{background:#edf3ff;transform:translateY(-1px)}.ph-view:active{transform:scale(.97)}.ph-content>p{padding:12px 26px;color:#71829b}.ph-pagination{display:flex;gap:10px;align-items:center;justify-content:flex-end;padding:16px 24px;border-top:1px solid #e2e8f1;font-size:13px}.ph-pagination span:first-child{margin-right:auto}.ph-pagination button:disabled{opacity:.4;cursor:default}.ph-mobile-label{display:none}
#portalModal .portal-dialog:has(#paymentBillView){width:min(900px,calc(100vw - 32px));max-width:900px;padding:26px;background:#f5f7fa}#paymentBillView{padding-top:4px}.ph-bill-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 40px 22px 0}.ph-bill-toolbar h2{font-size:20px;margin:0}.ph-bill-toolbar button{background:#172033;border:0;border-radius:12px;color:white;padding:12px 18px;cursor:pointer;font:inherit;font-weight:650}.ph-bill{background:var(--card,#fff);border:1px solid #dfe6f0;border-radius:20px;overflow:hidden}.ph-bill-header{display:flex;justify-content:space-between;gap:28px;padding:32px;background:#f8fafc}.ph-bill-header h2{font-size:32px;margin:0 0 14px;color:#1e3152}.ph-bill-header a{color:#3269d8}.ph-bill p{margin:8px 0}.ph-bill-number{max-width:47%;text-align:right;overflow-wrap:anywhere}.ph-bill-number>p,.ph-bill h3{color:#8090a6;font-size:14px;font-weight:600;margin:0 0 12px}.ph-bill-number strong{display:block;font-size:16px;margin-bottom:14px}.ph-bill-part{padding:24px 32px;border-top:1px solid #e7ecf4}.ph-bill-meta{display:grid;grid-template-columns:1fr 1fr;gap:24px}.ph-bill dl{margin:0;min-width:0}.ph-bill dl>div{display:flex;justify-content:space-between;gap:24px;padding:8px 0}.ph-bill dt{color:#7a8ba3;flex-shrink:0;font-size:14px}.ph-bill dd{margin:0;text-align:right;overflow-wrap:anywhere;min-width:0}.ph-bill-values>div:first-child{font-size:22px;font-weight:700;padding-bottom:18px;margin-bottom:8px;border-bottom:1px solid #e5ebf3;color:#3d9674}.ph-bill-reference p,.ph-bill-meta p{overflow-wrap:anywhere}.ph-bill-reference p{font:13px/1.6 ui-monospace,monospace}.ph-bill footer{padding:18px 24px;background:#f8fafc;text-align:center;font-size:12px;color:#8593a8}.ph-unpaid{color:#a97429}.ph-self{display:block;width:100%;padding:12px;background:#ce4745;color:white;border:0;border-radius:10px;margin-top:14px;cursor:pointer;font:inherit}.payment-history button:focus-visible,#paymentBillView button:focus-visible{outline:3px solid #7fafff;outline-offset:3px}
@media(max-width:680px){.ph-heading{padding:18px}.ph-heading h2{font-size:20px;gap:10px}.ph-history-icon{width:38px;height:38px;font-size:27px}.ph-heading button{font-size:13px}.ph-table,.ph-table tbody{display:block}.ph-table thead{display:none}.ph-table tr{display:grid;grid-template-columns:minmax(0,1fr) auto;padding:14px 18px;border-top:1px solid #e2e8f1;gap:9px 12px}.ph-table td{display:block;padding:0;border:0;font-size:13px}.ph-table td:first-child,.ph-table td:nth-child(2){grid-column:1/-1}.ph-table td:nth-child(3){grid-column:1}.ph-table td:nth-child(4){grid-column:2;grid-row:3;text-align:right}.ph-table td:nth-child(5){grid-column:1}.ph-table td:nth-child(6){grid-column:2;text-align:right}.ph-mobile-label{display:inline;color:#8291a5;font-weight:400;margin-right:8px;font-size:12px}.ph-table td:nth-child(4) .ph-mobile-label{display:none}.ph-order{font-size:11px!important}.ph-view{padding:5px 15px}.ph-pagination{flex-wrap:wrap;padding:14px 18px}.ph-pagination>span:first-child{width:100%}#portalModal .portal-dialog:has(#paymentBillView){padding:18px;width:calc(100vw - 20px);border-radius:20px}.ph-bill-toolbar{padding:30px 0 18px;align-items:center}.ph-bill-toolbar h2{font-size:18px}.ph-bill-toolbar button{font-size:12px;padding:10px}.ph-bill-header{padding:22px;gap:18px;flex-direction:column}.ph-bill-header h2{font-size:27px}.ph-bill-number{max-width:100%;text-align:left}.ph-bill-number strong{font-size:13px}.ph-bill-meta{grid-template-columns:minmax(0,1fr)}.ph-bill-part{padding:20px}.ph-bill dl>div{gap:14px}.ph-bill dt{font-size:12px;max-width:45%;flex-shrink:1}.ph-bill dd{font-size:13px}.ph-bill-values>div:first-child dd{font-size:20px}.ph-bill-reference p{font-size:11px}.ph-bill footer{padding:16px;font-size:11px}}
[data-theme="dark"] .payment-history,[data-theme="dark"] .ph-bill{background:#182232;color:#dce5f3;border-color:#354055}[data-theme="dark"] .ph-table th,[data-theme="dark"] .ph-bill-header,[data-theme="dark"] .ph-bill footer{background:#1f2b3d}[data-theme="dark"] .ph-bill-header h2{color:#e1eafe}[data-theme="dark"] .ph-table td,[data-theme="dark"] .ph-table th,[data-theme="dark"] .ph-table tr,[data-theme="dark"] .ph-bill-part,[data-theme="dark"] .ph-pagination{border-color:#354055}[data-theme="dark"] #portalModal .portal-dialog:has(#paymentBillView){background:#111b2c}[data-theme="dark"] .ph-status{background:#29374c;color:#bdcce2}[data-theme="dark"] .ph-credited{background:#203c32;color:#83cfaa}
@media(prefers-reduced-motion:reduce){.ph-view,.ph-pagination button{transition:none!important;transform:none!important}}
@media print{body.ph-printing *{visibility:hidden!important}body.ph-printing #paymentBill,body.ph-printing #paymentBill *{visibility:visible!important;color:#172033!important}body.ph-printing #portalModal{position:absolute!important;inset:0!important;display:block!important;background:white!important;overflow:visible!important}body.ph-printing #portalModal .portal-dialog,body.ph-printing #portalModalBody,body.ph-printing #paymentBillView{overflow:visible!important;max-height:none!important;height:auto!important;width:100%!important;max-width:none!important;margin:0!important;padding:0!important;position:static!important;transform:none!important}body.ph-printing #paymentBill{position:absolute!important;top:0!important;left:0!important;width:100%!important;box-sizing:border-box;print-color-adjust:exact;background:white!important}body.ph-printing .ph-bill-part{break-inside:avoid}body.ph-printing .ph-bill-header,body.ph-printing .ph-bill footer{background:#f7f9fc!important}body.ph-printing .ph-bill-toolbar,body.ph-printing .dialog-x,body.ph-printing .ph-self{display:none!important}}

.commerce-footer.compact-footer{gap:8px;padding:22px 16px 18px;margin-top:28px;line-height:1.55;border-top:1px solid #e1e7ef;font-size:12px!important}
.compact-footer .footer-brand-row,.compact-footer .footer-legal-row{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:5px 18px}
.compact-footer nav{gap:6px 18px}.compact-footer .footer-extra{margin-top:2px;font-size:11px;max-width:100%}.compact-footer .footer-extra summary{cursor:pointer;color:#8797ad}.compact-footer #footerTechnicalInfo{padding:10px 0 0;max-width:850px}.compact-footer .currency-notice{margin:8px 0 0;padding:0;font-size:11px;line-height:1.6}
@media(max-width:560px){.commerce-footer.compact-footer{padding:18px 12px;margin-top:22px;font-size:11px!important;gap:9px}.compact-footer .footer-brand-row{flex-direction:column;gap:3px}.compact-footer nav{gap:7px 13px}.compact-footer .footer-legal-row{gap:4px 14px}}

[data-theme="dark"] .payment-history .ph-view,[data-theme="dark"] .payment-history .ph-heading button,[data-theme="dark"] .payment-history .ph-order,[data-theme="dark"] .payment-history .ph-pagination button{color:#a9c9ff;border-color:#526781}
[data-theme="dark"] .payment-history .ph-table td:first-child,[data-theme="dark"] .payment-history .ph-mobile-label{color:#a3b3cc}

/* Terminal payment states stay red in lists, receipts and both themes. */
.ph-status:is(.ph-failed,.ph-rejected,.ph-cancelled,.ph-expired){background:#fce9eb;color:#c33242;border:1px solid #f2c7ce}
.ph-status:is(.ph-failed,.ph-rejected,.ph-cancelled,.ph-expired)::before{content:'×'}
[data-theme="dark"] .ph-status:is(.ph-failed,.ph-rejected,.ph-cancelled,.ph-expired){background:#492630;color:#ffb5c0;border-color:#844250}
#paymentBillView .ph-bill-actions{position:sticky;top:0;z-index:3;background:#f5f7fa;padding:0 0 15px}
#paymentBillView .ph-self{display:flex;align-items:center;justify-content:center;gap:12px;box-sizing:border-box;min-height:52px;width:100%;margin:0;padding:13px 22px;background:linear-gradient(135deg,#dc4b59,#c52f42);color:#fff;border:1px solid #c52f42;border-radius:12px;font-size:16px;font-weight:750;line-height:1.4;box-shadow:0 5px 14px #c52f4225;transition:background .15s,box-shadow .15s,transform .15s}
#paymentBillView .ph-self:hover{background:linear-gradient(135deg,#cc3d4d,#ad2436);color:#fff;border-color:#ad2436;box-shadow:0 7px 17px #b72b3e32}
#paymentBillView .ph-self:active{transform:scale(.99)}
[data-theme="dark"] #paymentBillView .ph-bill-actions{background:#111b2c}
@media(max-width:680px){#paymentBillView .ph-bill-actions{padding-bottom:13px}#paymentBillView .ph-self{font-size:16px;min-height:52px;padding:13px 16px}}
@media print{body.ph-printing .ph-bill-actions{display:none!important}}
@media(prefers-reduced-motion:reduce){#paymentBillView .ph-self{transition:none;transform:none}}
