.customer-invoices { margin-top: 28px; padding: 24px; border: 1px solid var(--theme-border); border-radius: 16px; background: var(--theme-bg-panel); color: var(--theme-text-primary); }
.customer-invoices [hidden] { display: none !important; }
.portal-theme .customer-invoices button { padding: 10px 16px; border: 1px solid var(--theme-border); border-radius: 7px; background: var(--theme-control-secondary-bg); color: var(--theme-control-secondary-text); font: inherit; font-weight: 600; cursor: pointer; box-shadow: var(--theme-shadow-sm); }
.portal-theme .customer-invoices button:not(:disabled):hover { border-color: var(--theme-border-strong); background: var(--theme-control-secondary-hover); color: var(--theme-text-primary); }
.portal-theme .customer-invoices button:disabled { border-color: var(--theme-border); background: var(--theme-disabled-bg); color: var(--theme-disabled-text); cursor: not-allowed; opacity: .6; box-shadow: none; }
.customer-invoices-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.customer-invoices-heading h3, .customer-invoices-heading h4 { margin: 0 0 8px; color: var(--theme-text-primary); }
.customer-invoices-filter, .customer-invoices-pager { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin: 16px 0; }
.customer-invoices-filter label { display: grid; gap: 6px; color: var(--theme-text-secondary); }
.customer-invoices-filter select { min-width: 190px; padding: 10px; font: inherit; color: var(--theme-text-primary); border: 1px solid var(--theme-input-border); border-radius: 7px; background: var(--theme-input-bg); }
.customer-invoices-status { color: var(--theme-text-muted); }
.customer-invoices-status.is-error { color: var(--theme-danger); }
.customer-invoices-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(245px, 1fr)); gap: 16px; }
.customer-invoice-card { display: flex; flex-direction: column; align-items: start; gap: 8px; padding: 18px; border: 1px solid var(--theme-border); border-radius: 10px; background: var(--theme-bg-inset); }
.customer-invoice-card p { margin: 0; }
.customer-invoice-card button { margin-top: 8px; }
.customer-invoice-balance { font-weight: 700; font-variant-numeric: tabular-nums; }
.customer-invoice-detail { border-top: 1px solid var(--theme-border-strong); padding-top: 24px; margin-top: 24px; }
.customer-invoice-address { white-space: pre-line; }
.customer-invoice-sender { margin-bottom: 20px; font-size: .9rem; overflow-wrap: anywhere; }
.customer-invoice-sender:empty, .customer-invoice-footer:empty { display: none; }
.customer-invoice-sender strong { font-size: 1.2rem; }
.customer-invoice-logo { display: block; width: auto; height: auto; max-width: min(180px, 100%); max-height: 64px; object-fit: contain; margin-bottom: 10px; }
.customer-invoice-sender p { margin: 3px 0; white-space: pre-line; }
.customer-invoice-footer { margin: 22px 0; padding-top: 16px; border-top: 1px solid var(--theme-divider); color: var(--theme-text-muted); text-align: center; font-size: .85rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.customer-invoices-table { overflow-x: auto; margin-top: 20px; }
.customer-invoices-table table { width: 100%; border-collapse: collapse; text-align: left; background: var(--theme-bg-panel); }
.customer-invoices-table th, .customer-invoices-table td { padding: 12px 10px; border-bottom: 1px solid var(--theme-divider); color: var(--theme-text-primary); }
.customer-invoices-table th { font-size: .8rem; color: var(--theme-text-muted); background: var(--theme-bg-inset); }
.customer-invoices-table td { background: var(--theme-row-bg); }
.customer-invoice-line-note { margin: 5px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .85em; color: var(--theme-text-muted); }
.customer-invoice-totals { display: grid; grid-template-columns: minmax(140px, 1fr) auto; gap: 8px 18px; max-width: 430px; margin: 22px 0 18px auto; }
.customer-invoice-totals dt { color: var(--theme-text-muted); }
.customer-invoice-totals dd { text-align: right; margin: 0; font-variant-numeric: tabular-nums; }
.customer-invoice-totals dt:last-of-type, .customer-invoice-totals dd:last-of-type { border-top: 1px solid var(--theme-border); padding-top: 12px; font-weight: 700; color: var(--theme-text-primary); }
.customer-invoice-notice { padding: 14px; background: var(--theme-info-bg); color: var(--theme-info); border: 1px solid var(--theme-info-border); border-radius: 8px; }
.portal-theme .customer-invoice-pay { display: inline-block; padding: 12px 18px; margin-top: 10px; border: 1px solid var(--theme-border-strong); border-radius: 7px; background: var(--theme-control-secondary-bg); color: var(--theme-control-secondary-text); font-weight: 700; text-decoration: none; box-shadow: var(--theme-shadow-sm); }
.portal-theme .customer-invoice-pay:hover { background: var(--theme-control-secondary-hover); color: var(--theme-text-primary); }
.customer-invoices :focus-visible { outline: 3px solid var(--theme-focus); outline-offset: 3px; }
.customer-invoices-pager { justify-content: space-between; align-items: center; }
@media (max-width: 620px) { .customer-invoices { padding: 16px; } .customer-invoices-heading { flex-direction: column; } .customer-invoices-cards { grid-template-columns: 1fr; } }
