/* 计费前端样式：页头余额与充值入口、余额不足提示、充值（套餐卡与微信二维码）、计费记录与购买记录；沿用深色主题与 dialog 基础样式。 */
.billing-balance{padding:7px 12px;background:#252b32;border-radius:30px;color:#9fd8a8;white-space:nowrap;font-weight:600}
.billing-balance:empty,.billing-balance[hidden],#billing-recharge[hidden],.billing-records-actions[hidden]{display:none}
#billing-recharge{padding:7px 14px}

/* 余额不足提示：按钮靠右。 */
dialog.billing-preview{width:min(480px,calc(100vw - 24px))}
.billing-preview .actions{justify-content:flex-end}

/* 充值（照参考项目的充值页）：换算比例与当前积分余额、套餐卡（¥ 金额为主视觉）、到账积分、协议勾选与实付；下单后换成微信扫码区与订单状态。 */
dialog.billing-recharge{width:min(760px,calc(100vw - 24px));max-height:90vh;overflow:auto}
.billing-recharge [hidden]{display:none!important}
.recharge-summary-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.recharge-rate-pill,.recharge-balance-pill{display:inline-flex;align-items:center;gap:6px;padding:7px 14px;background:#252b32;border-radius:30px;color:#c9d3df;white-space:nowrap}
.recharge-rate-icon{color:#e9bc77}
.recharge-balance-pill strong{color:#9fd8a8;font-size:16px}
.recharge-helper-row{display:flex;justify-content:space-between;flex-wrap:wrap;gap:8px;margin:18px 0 10px;color:#aab9cc}
.recharge-points-preview{color:#e9bc77;font-weight:650}
.recharge-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:12px}
.recharge-amount-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:92px;padding:18px 12px;border:1px solid #3a414d;border-radius:12px;background:#11151b;text-align:center}
.recharge-amount-card.is-selected{border-color:#e9bc77;background:#2a2418;box-shadow:0 0 0 1px #e9bc77 inset}
.recharge-card-check{position:absolute;top:6px;right:9px;color:#e9bc77;font-weight:700}
.recharge-package-price{display:flex;align-items:baseline;gap:3px;color:#f3d29b}
.recharge-currency{font-size:16px;font-weight:650}
.recharge-amount-number{font-size:28px;font-weight:750;line-height:1.1;overflow-wrap:anywhere}
.recharge-package-label{font-size:12px;color:#9ba6b6;overflow-wrap:anywhere}
.recharge-discount-badge{position:absolute;top:-1px;left:-1px;padding:1px 9px;border-radius:12px 0 10px 0;background:#d8383d;color:#fff;font-size:12px;font-weight:700;line-height:20px;white-space:nowrap}
.recharge-list-price{font-size:12px;color:#8b95a5;white-space:nowrap}
.recharge-list-price s{text-decoration-thickness:1px}
.recharge-pay-saved{font-size:12px;font-weight:650;color:#ff8f6b;white-space:nowrap}
.recharge-package-empty{display:flex;flex-direction:column;align-items:center;gap:6px;padding:18px;border:1px dashed #3a414d;border-radius:12px;text-align:center}
.recharge-package-empty p{margin:0}
.recharge-note{font-size:13px;line-height:1.7;color:#aab9cc;margin:10px 0 0}
.recharge-note:empty{display:none}
.recharge-note[data-tone="error"],.recharge-payment-message[data-tone="error"],.recharge-payment-status[data-tone="error"]{color:#ff9e9e}
.recharge-note[data-tone="warning"],.recharge-payment-message[data-tone="warning"],.recharge-payment-status[data-tone="warning"]{color:#f2c46d}
.recharge-note[data-tone="success"],.recharge-payment-message[data-tone="success"],.recharge-payment-status[data-tone="success"]{color:#9fd8a8}
.recharge-footer-bar{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;margin-top:16px;padding-top:14px;border-top:1px solid #303743}
.recharge-agreement-checkbox{display:inline-flex;align-items:center;gap:6px;color:#c9d3df;cursor:pointer}
dialog .recharge-agreement-checkbox input{display:inline-block;width:auto;margin:0;padding:0;accent-color:#e9bc77}
.recharge-agreement-link{color:#e9bc77}
.recharge-agreement-open{display:inline;width:auto;margin:0;padding:0;border:0;background:none;color:#e9bc77;font:inherit;text-decoration:underline;cursor:pointer}
.recharge-agreement-version{margin:8px 0 0;font-size:12px;color:#9ba6b6}
.recharge-agreement-dialog{width:min(760px,calc(100vw - 32px));max-height:calc(100vh - 48px)}
.recharge-agreement-dialog .recharge-agreement-draft{margin:8px 0;padding:8px 10px;border:1px solid #8a6a2e;border-radius:6px;background:#2b2416;color:#f2c46d}
.recharge-agreement-body{max-height:min(60vh,560px);overflow:auto;padding:4px 12px 4px 0;line-height:1.7;color:#d5dce6}
.recharge-agreement-body h3{margin:4px 0 8px;font-size:18px}
.recharge-agreement-body h4{margin:14px 0 6px;font-size:15px}
.recharge-agreement-body p{margin:4px 0}
.recharge-agreement-digest{margin:8px 0 0;font-size:12px;color:#7f8a99}
/* 协议公告与已发布的历史版本（billing/agreement.py 的 notice、history）。 */
.recharge-agreement-notice{margin:6px 0;padding:6px 10px;border-left:3px solid #4f8fd8;background:rgba(79,143,216,.08);font-size:13px}
.recharge-agreement-history{margin-top:10px}.recharge-agreement-history ul{margin:4px 0;padding-left:18px}.recharge-agreement-history button{padding:2px 6px;font-size:12px}
.recharge-agreement-error{color:#e06c6c;font-size:12px}
.recharge-pay-action{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-left:auto}
.recharge-pay-label{color:#aab9cc}
.recharge-pay-amount{font-size:20px;font-weight:750;color:#e9bc77;white-space:nowrap}
.recharge-submit-hint{margin:8px 0 0;font-size:12px;color:#9ba6b6;text-align:right}
.recharge-submit-hint:empty{display:none}
.recharge-payment-panel{display:flex;flex-direction:column;align-items:center;gap:10px}
.recharge-payment-title{font-size:18px;font-weight:700;color:#e5e7eb}
.recharge-payment-subtitle{display:flex;flex-wrap:wrap;justify-content:center;gap:6px 16px;color:#aab9cc;font-size:13px;text-align:center}
.recharge-payment-subtitle span{overflow-wrap:anywhere}
.recharge-payment-status{color:#e9bc77}
.recharge-payment-message{margin:0;font-size:13px;text-align:center;overflow-wrap:anywhere}
.recharge-qr{display:flex;justify-content:center;padding:10px;background:#fff;border-radius:10px}
.recharge-qr svg{width:220px;height:220px;max-width:calc(100vw - 100px);display:block}
.recharge-qr-fallback{color:#1b1b1b;margin:0;overflow-wrap:anywhere}
.recharge-qr-fallback code{user-select:all}
.recharge-payment-close-note{font-size:12px;color:#9ba6b6;text-align:center}
.recharge-payment-actions{justify-content:center}

/* 计费记录与购买记录：表格分页，与消费明细同一风格。 */
dialog.billing-records{width:min(1400px,96vw);max-height:88vh;overflow:auto;padding:24px}
.billing-records-note{font-size:13px;color:#aab9cc}
.billing-records-table{overflow:auto;max-height:55vh}
.billing-records-table table{width:100%;border-collapse:collapse;font-size:13px}
.billing-records-table th,.billing-records-table td{padding:10px;text-align:left;border-bottom:1px solid #374151;min-width:80px;vertical-align:top;overflow-wrap:anywhere}
.billing-records-table th{position:sticky;top:0;background:#222832;white-space:nowrap}
.billing-records-paging{display:flex;gap:12px;align-items:center;justify-content:flex-end;margin-top:20px;flex-wrap:wrap}
.billing-records-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.consumption-top{flex-wrap:wrap}
.consumption-top .billing-settings-balance{font-size:15px;font-weight:600;color:#9fd8a8;white-space:nowrap}
@media(max-width:650px){.billing-balance{font-size:12px;white-space:normal}.recharge-card-grid{grid-template-columns:repeat(2,1fr)}.recharge-pay-action{margin-left:0}.recharge-submit-hint{text-align:left}}

/* 计费记录里可点的任务编号（只看这个任务的记录）与“显示全部”。 */
.billing-records button.link{background:none;border:0;padding:0;color:#8ab4f8;cursor:pointer;text-decoration:underline;font:inherit}
.recharge-price-list{margin-left:auto;padding:4px 10px;font-size:12px}
.price-list-dialog{width:min(980px,calc(100vw - 32px));max-height:calc(100vh - 48px)}
.price-list-note{margin:6px 0 8px;color:#9ba6b6;font-size:13px}
.price-list-body{max-height:min(68vh,640px);overflow:auto;padding-right:8px;color:#d5dce6;line-height:1.6}
.price-list-body h3{margin:14px 0 6px;font-size:15px}
.price-list-body ul{margin:4px 0;padding-left:20px}
.price-list-table{overflow-x:auto}
.price-list-table table{width:100%;border-collapse:collapse;font-size:13px}
.price-list-table th,.price-list-table td{padding:4px 8px;border-bottom:1px solid #303743;text-align:left;vertical-align:top}
.price-list-group th{padding-top:10px;color:#e9bc77}
