.client-finance{border:1px solid #dbe3dc;border-radius:7px;background:#fff;margin:0 0 24px;overflow:hidden}
.finance-band{background:#ff9900;color:#000;padding:11px 14px;display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
.finance-band h2{font-size:16px;margin:0}.finance-band span{font-size:12px}
.finance-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));padding:20px 16px;gap:16px}
.finance-stats>div+div{border-left:1px solid #dbe3dc;padding-left:16px}
.finance-stats p{font-size:13px;margin:0}.finance-stats strong{display:block;font-size:clamp(20px,2.7vw,30px);font-weight:650;font-variant-numeric:tabular-nums;overflow-wrap:anywhere;margin:3px 0}
.finance-stats small{display:block;font-size:12px;color:#52665f}.finance-notes{padding:0 16px 14px}.finance-notes p{font-size:12px;margin:4px 0}
.finance-detail{border-top:1px solid #dbe3dc}.finance-detail>h3{padding:12px 14px;font-size:15px;margin:0}
.finance-scroll{max-width:100%;overflow-x:auto}.finance-detail table{border-collapse:collapse;width:100%;font-size:13px}.finance-detail th,.finance-detail td{padding:10px 14px;border-top:1px solid #dbe3dc;text-align:left}.finance-detail td:not(:first-child),.finance-detail th:not(:first-child){text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}.finance-detail td:first-child{overflow-wrap:anywhere}.finance-detail small{display:block;color:#52665f;font-size:12px}.finance-detail tfoot{font-weight:700;background:#f0f4f0}.finance-empty{padding:0 14px 14px}
@media screen{[data-theme="dark"] .client-finance{background:#242424;border-color:#484848}[data-theme="dark"] .finance-stats>div+div,[data-theme="dark"] .finance-detail,[data-theme="dark"] .finance-detail th,[data-theme="dark"] .finance-detail td{border-color:#484848}[data-theme="dark"] .finance-stats small,[data-theme="dark"] .finance-detail small{color:#c6c6c6}[data-theme="dark"] .finance-detail tfoot{background:#2c2c2c}}
@media(max-width:560px){.finance-stats{grid-template-columns:1fr;padding:12px 14px;gap:10px}.finance-stats>div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px}.finance-stats>div+div{border-left:0;border-top:1px solid #dbe3dc;padding:10px 0 0}.finance-stats small{grid-column:1/-1}.finance-stats strong{font-size:23px}.finance-detail td,.finance-detail th{padding:9px 7px;font-size:12px}}
@media print{.finance-band{background:#fff;color:#000;border-bottom:1px solid #aaa}.client-finance{break-inside:avoid}}

/* Dettaglio sempre visibile, intestazioni e totali ben distinti. */
.finance-detail thead{background:#eaf0eb}
.finance-detail th{font-weight:650}
.finance-detail tbody tr:nth-child(even){background:#f7f9f7}
.finance-detail th+th,.finance-detail td+td{border-left:1px solid #dbe3dc}
.finance-detail tfoot th,.finance-detail tfoot td{padding-top:14px;padding-bottom:14px;border-top:2px solid #ff9900;font-weight:700}
@media screen{
[data-theme="dark"] .finance-detail thead{background:#333}
[data-theme="dark"] .finance-detail tbody tr:nth-child(even){background:#292929}
[data-theme="dark"] .finance-detail th+th,[data-theme="dark"] .finance-detail td+td{border-left-color:#484848}
[data-theme="dark"] .finance-detail tfoot th,[data-theme="dark"] .finance-detail tfoot td{border-top-color:#ff9900}
}