/* #96 IPD bill / Itemized charges */
.bill{ background:var(--ax-background-default); border:1px solid var(--ax-border-default); border-radius:var(--ax-radius-lg); overflow:hidden;}
.bill__head{ display:flex; justify-content:space-between; align-items:flex-start; padding:12px 16px; gap:12px; flex-wrap:wrap; border-bottom:1px solid var(--ax-border-default);}
.bill__brand{ display:flex; gap:10px; align-items:center;}
.bill__logo{ width:36px; height:36px; border-radius:7px; background:var(--ax-text-heading); color:var(--ax-background-default); display:grid; place-items:center; font-family:var(--ax-font-mono); font-size:11px; font-weight:700;}
.bill__title{ font-size:13px; font-weight:600; color:var(--ax-text-heading);}
.bill__sub{ font-size:11px; color:var(--ax-text-subtle); font-family:var(--ax-font-mono); margin-top:2px;}
.bill__meta{ font-family:var(--ax-font-mono); font-size:10px; color:var(--ax-text-subtle); text-align:right; line-height:1.55;}
.bill__meta strong{ color:var(--ax-text-heading);}

/* Total panel + payor split */
.bill__hero{ display:grid; grid-template-columns: 280px 1fr; border-bottom:1px solid var(--ax-border-default);}
.bill__total{ padding:16px; background:var(--ax-text-heading); color:var(--ax-background-default); display:flex; flex-direction:column; gap:5px; align-items:flex-start; justify-content:center; border-right:1px solid var(--ax-border-default);}
.bill__total-cap{ font-family:var(--ax-font-mono); font-size:9px; text-transform:uppercase; letter-spacing:0.06em; opacity:0.7; font-weight:700;}
.bill__total-val{ font-family:var(--ax-font-mono); font-size:30px; font-weight:700; line-height:1;}
.bill__total-val small{ font-size:13px; opacity:0.7; font-weight:600; margin-left:4px;}
.bill__total-meta{ font-family:var(--ax-font-mono); font-size:10px; opacity:0.8;}

.bill__pay{ padding:14px 16px; display:flex; flex-direction:column; gap:8px;}
.bill__pay-h{ font-size:11px; font-weight:700; color:var(--ax-text-heading); text-transform:uppercase; letter-spacing:0.04em; display:flex; justify-content:space-between;}
.bill__pay-row{ display:grid; grid-template-columns: 100px 1fr 110px; gap:10px; align-items:center;}
.bill__pay-l{ font-family:var(--ax-font-mono); font-size:10.5px; color:var(--ax-text-subtle); font-weight:600;}
.bill__pay-bar{ height:14px; background:var(--ax-background-subtle); border-radius:3px; overflow:hidden; display:flex;}
.bill__pay-seg{ height:100%; display:grid; place-items:center; font-family:var(--ax-font-mono); font-size:9px; color:#fff; font-weight:700;}
.bill__pay-seg--ins{ background:var(--ax-success-emphasis);}
.bill__pay-seg--copay{ background:var(--ax-warning-emphasis);}
.bill__pay-seg--self{ background:var(--ax-text-heading);}
.bill__pay-amt{ font-family:var(--ax-font-mono); font-size:11px; font-weight:700; color:var(--ax-text-heading); text-align:right;}

/* Coverage strip */
.bill__cov{ display:grid; grid-template-columns: repeat(4,1fr); border-bottom:1px solid var(--ax-border-default);}
.bill__cov-cell{ padding:10px 14px; border-right:1px solid var(--ax-border-default); display:flex; flex-direction:column; gap:2px;}
.bill__cov-cell:last-child{ border-right:none;}
.bill__cov-cap{ font-family:var(--ax-font-mono); font-size:9px; color:var(--ax-text-subtle); text-transform:uppercase; letter-spacing:0.04em; font-weight:700;}
.bill__cov-val{ font-family:var(--ax-font-mono); font-size:12px; font-weight:700; color:var(--ax-text-heading);}
.bill__cov-meta{ font-family:var(--ax-font-mono); font-size:10px; color:var(--ax-text-subtle);}

/* Itemized table */
.bill__body{ padding:14px 16px; display:flex; flex-direction:column; gap:14px;}
.bill__sec-h{ font-size:11px; font-weight:700; color:var(--ax-text-heading); text-transform:uppercase; letter-spacing:0.04em; margin-bottom:6px; display:flex; justify-content:space-between; align-items:center;}
.bill__sec-cap{ font-family:var(--ax-font-mono); font-size:10px; color:var(--ax-text-subtle); padding:1px 6px; background:var(--ax-background-subtle); border-radius:3px; font-weight:600;}

.bill__cat{ border:1px solid var(--ax-border-subtle); border-radius:6px; overflow:hidden;}
.bill__cat-h{ display:grid; grid-template-columns: 32px 1fr auto; gap:10px; align-items:center; padding:8px 12px; background:var(--ax-background-subtle); border-bottom:1px solid var(--ax-border-subtle);}
.bill__cat-icon{ width:24px; height:24px; border-radius:5px; background:var(--ax-text-heading); color:var(--ax-background-default); display:grid; place-items:center; font-family:var(--ax-font-mono); font-size:10px; font-weight:700;}
.bill__cat-t{ font-size:11px; font-weight:700; color:var(--ax-text-heading); text-transform:uppercase; letter-spacing:0.04em;}
.bill__cat-t small{ display:block; font-family:var(--ax-font-mono); font-size:9px; color:var(--ax-text-subtle); font-weight:600; text-transform:none; letter-spacing:0; margin-top:1px;}
.bill__cat-tot{ font-family:var(--ax-font-mono); font-size:13px; font-weight:700; color:var(--ax-text-heading);}

.bill__rows{ display:grid; grid-template-columns: 80px 1fr 50px 90px 90px;}
.bill__rh{ background:var(--ax-background-default); padding:5px 10px; font-family:var(--ax-font-mono); font-size:9px; color:var(--ax-text-subtle); font-weight:700; text-transform:uppercase; letter-spacing:0.04em; border-bottom:1px solid var(--ax-border-subtle);}
.bill__rc{ padding:6px 10px; font-size:11px; color:var(--ax-text-default); border-bottom:1px solid var(--ax-border-subtle); display:flex; align-items:center;}
.bill__rc--mono{ font-family:var(--ax-font-mono); font-size:10px; color:var(--ax-text-heading);}
.bill__rc--right{ justify-content:flex-end; font-family:var(--ax-font-mono); font-size:11px; font-weight:600; color:var(--ax-text-heading);}
.bill__rc--bg{ background:var(--ax-background-subtle);}
.bill__rc:last-child, .bill__rc:nth-last-child(-n+5){ border-bottom:none;}
.bill__rc-cov{ font-family:var(--ax-font-mono); font-size:9px; padding:1px 5px; background:var(--ax-success-emphasis); color:#fff; border-radius:3px; font-weight:700;}
.bill__rc-cov--partial{ background:var(--ax-warning-emphasis);}
.bill__rc-cov--no{ background:var(--ax-error-emphasis);}

/* Foot */
.bill__sum{ display:grid; grid-template-columns: repeat(4,1fr); border-top:1px solid var(--ax-border-default); background:var(--ax-background-subtle);}
.bill__sum-c{ padding:10px 14px; border-right:1px solid var(--ax-border-default); display:flex; flex-direction:column; gap:2px;}
.bill__sum-c:last-child{ border-right:none;}
.bill__sum-c--em{ background:var(--ax-text-heading); color:var(--ax-background-default);}
.bill__sum-c--em .bill__sum-cap{ opacity:0.7; color:var(--ax-background-default);}
.bill__sum-c--em .bill__sum-val{ color:var(--ax-background-default);}
.bill__sum-cap{ font-family:var(--ax-font-mono); font-size:9px; color:var(--ax-text-subtle); text-transform:uppercase; letter-spacing:0.04em; font-weight:700;}
.bill__sum-val{ font-family:var(--ax-font-mono); font-size:14px; font-weight:700; color:var(--ax-text-heading);}

.bill__foot{ display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; padding:10px 16px; border-top:1px solid var(--ax-border-default);}
.bill__foot-meta{ font-family:var(--ax-font-mono); font-size:10px; color:var(--ax-text-subtle);}
.bill__btn{ padding:5px 10px; font-size:11px; font-family:var(--ax-font-mono); font-weight:600; border-radius:5px; border:1px solid var(--ax-border-default); background:var(--ax-background-default); color:var(--ax-text-default); cursor:default;}
.bill__btn--primary{ background:var(--ax-text-heading); color:var(--ax-background-default); border-color:var(--ax-text-heading);}

@media (max-width:980px){ .bill__hero{ grid-template-columns:1fr;} .bill__total{ border-right:none; border-bottom:1px solid var(--ax-border-default);} .bill__cov,.bill__sum{ grid-template-columns:repeat(2,1fr);} .bill__cov-cell,.bill__sum-c{ border-right:none; border-bottom:1px solid var(--ax-border-default);} .bill__rows{ grid-template-columns: 1fr 80px 80px;} .bill__rh:nth-child(1),.bill__rh:nth-child(3),.bill__rc:nth-child(5n+1),.bill__rc:nth-child(5n+3){ display:none;} }
