.bill-preview{position:fixed;inset:0;z-index:40;display:none}
.bill-preview.open{display:block}
.bill-preview-shade{position:absolute;inset:0;background:rgba(10,31,27,.55)}
.bill-preview-dialog{position:absolute;inset:4vh 3vw;display:flex;flex-direction:column;min-width:0;border-radius:14px;background:#eef2f0;box-shadow:0 22px 70px rgba(4,25,20,.3);overflow:hidden}
.bill-preview-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px;background:#fff;border-bottom:1px solid #dce5e3}
.bill-preview-head h2{margin:0;font-size:16px}
.bill-preview-actions{display:flex;align-items:center;gap:8px}
.bill-preview-viewport{flex:1;overflow:auto;padding:20px}
.bill-preview-viewport .bill-document{margin:0 auto;box-shadow:0 8px 32px rgba(18,42,36,.14)}
#billPdfStage{position:fixed;left:-12000px;top:0;z-index:-1;width:max-content;pointer-events:none}
.bill-document{box-sizing:border-box;background:#fff;color:#17242b;font-family:"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;font-size:12px;line-height:1.45}
.bill-document *{box-sizing:border-box}
.bill-document h1,.bill-document h2,.bill-document h3,.bill-document p{margin:0}
.bill-document table{width:100%;min-width:0;border-collapse:collapse;font-size:11px}
.bill-document th,.bill-document td{padding:7px 8px;border:1px solid #9caeaa;background:#fff;color:#17242b;text-align:center;white-space:normal}
.bill-document tbody tr{cursor:default}
.bill-document tbody tr:hover{background:transparent}
.bill-document .bill-muted{color:#6f7e83}
.bill-document .bill-strong{font-weight:700}
.bill-document .bill-money{font-variant-numeric:tabular-nums;font-weight:700}
.bill-document .bill-dash{color:#8b9895}
.bill-document .bill-header{display:grid;grid-template-columns:150px minmax(0,1fr) 150px;align-items:center;gap:18px;padding-bottom:14px;border-bottom:1px solid #bcc9c6}
.bill-document .bill-logo{display:block;width:150px;height:48px;object-fit:contain;object-position:left center}
.bill-document .bill-logo-spacer{display:block;width:150px;height:1px}
.bill-document .bill-title{flex:1;text-align:center}
.bill-document .bill-title h1{font-family:Georgia,"Songti SC",serif;font-size:25px;letter-spacing:.18em}
.bill-document .bill-title p{margin-top:4px;font-size:14px;letter-spacing:.08em}
.bill-document .bill-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px 22px;margin:17px 0}
.bill-document .bill-meta div{display:flex;gap:7px;min-width:0}
.bill-document .bill-meta span{color:#6f7e83;white-space:nowrap}
.bill-document .bill-summary-strip{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));margin:16px 0;background:#f1f4f3}
.bill-document .bill-summary-strip>div{padding:13px 15px;text-align:center}
.bill-document .bill-summary-strip>div+div{border-left:1px solid #d7dfdd}
.bill-document .bill-summary-strip small{display:block;color:#6f7e83}
.bill-document .bill-summary-strip strong{display:block;margin-top:4px;font-size:18px;font-variant-numeric:tabular-nums}
.bill-document .bill-summary-note{color:#6f7e83;font-size:10px;font-weight:400}
.bill-document .bill-section{margin-top:18px}
.bill-document .bill-section-title{display:flex;justify-content:space-between;align-items:flex-end;padding-bottom:6px;border-bottom:2px solid #79908a}
.bill-document .bill-section-title h2{font-size:16px}
.bill-document .period-table{margin-top:8px}
.bill-document .period-table tfoot th{background:#eef3f1;font-weight:700}
.bill-document .storage-detail-table th,.bill-document .storage-detail-table td{padding-left:5px;padding-right:5px}
.bill-document .bill-notes{margin-top:18px;padding:12px 14px;background:#f7f9f8;color:#4d5f5a;font-size:11px}
.bill-document .bill-notes p+p{margin-top:5px}
.user-bill{width:794px;min-height:1123px;padding:34px 38px}
.user-bill .bill-title h1{letter-spacing:0}
.user-bill .bill-title p{font-size:14px;font-weight:600;letter-spacing:.08em}
.user-bill .user-project-title{display:block;font-size:16px;line-height:1.35;letter-spacing:.06em}
.user-bill .user-document-title{display:block;margin-top:2px;font-size:23px;line-height:1.35;letter-spacing:.12em;white-space:nowrap}
.user-bill .user-bill-meta{grid-template-columns:repeat(3,minmax(0,1fr))}
.user-bill .bill-scale-lines{display:grid;gap:2px}
.user-bill .bill-scale-lines span{display:block}
.user-bill .period-table th{background:#e4efe9;font-weight:700}
.user-bill .period-table td{background:#fff}
.user-bill .bill-energy-section{margin-top:14px;break-inside:avoid;page-break-inside:avoid}
.user-bill .storage-detail-table{font-size:9px}
.user-bill .photovoltaic-detail-table{font-size:10px}
.user-bill .user-summary{grid-template-columns:repeat(4,minmax(0,1fr));margin-top:16px;break-inside:avoid;page-break-inside:avoid}
.user-bill .user-overview-section{margin-top:14px;break-inside:avoid;page-break-inside:avoid}
.user-bill .user-overview-table{margin-top:8px;table-layout:fixed}
.user-bill .user-overview-table th{background:#e4efe9;font-weight:700}
.user-bill .user-overview-table td{background:#fff}
.user-bill .user-overview-table th:first-child,.user-bill .user-overview-table td:first-child{width:34%;text-align:left}
.user-bill .user-overview-table th:not(:first-child),.user-bill .user-overview-table td:not(:first-child){width:22%;font-variant-numeric:tabular-nums}
.user-bill .user-overview-table .user-overview-section-row th{padding:6px 8px;background:#e4efe9;font-size:12px;text-align:left}
.user-bill .user-overview-table .user-overview-total td{background:#edf4f0;font-weight:700}
.user-bill .user-overview-table .user-overview-group td{background:#f6f8f7;font-weight:600}
.user-bill .user-overview-table .user-overview-detail td:first-child{padding-left:24px;color:#43534f}
.user-bill .bill-notes{break-inside:avoid;page-break-inside:avoid}
.asset-bill{width:794px;min-height:1123px;padding:34px 38px}
.asset-bill .bill-energy-section{margin-top:14px;break-inside:avoid;page-break-inside:avoid}
.asset-bill .storage-detail-table{font-size:9px}
.asset-bill .photovoltaic-detail-table{font-size:10px}
.asset-bill .asset-overview-section{margin-top:14px;break-inside:avoid;page-break-inside:avoid}
.asset-bill .asset-overview-table{margin-top:8px;table-layout:fixed}
.asset-bill .asset-overview-table th{background:#e4efe9;font-weight:700}
.asset-bill .asset-overview-table th:first-child,.asset-bill .asset-overview-table td:first-child{width:38%;text-align:left}
.asset-bill .asset-overview-table th:not(:first-child),.asset-bill .asset-overview-table td:not(:first-child){width:20.666%;font-variant-numeric:tabular-nums}
.asset-bill .asset-overview-table .asset-overview-total td{background:#edf4f0;font-weight:700}
.asset-bill .asset-overview-table .asset-overview-group td{background:#f6f8f7;font-weight:600}
.asset-bill .asset-overview-table .asset-overview-detail td:first-child{padding-left:24px;color:#43534f}
@media(max-width:700px){.bill-preview-dialog{inset:0;border-radius:0}.bill-preview-viewport{padding:10px}.billing-detail-actions{justify-content:flex-start}.bill-preview-head{padding:10px 12px}}
