/* Billing panel (billing.js). Uses the host page's colour tokens. */
.bill-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
@media (max-width: 760px) { .bill-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bill-tile { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface); min-width: 0; }
.bill-tile-label { font-size: 12.5px; color: var(--muted); }
.bill-tile-value { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bill-tile-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

.bill-budget { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin-bottom: 14px; background: var(--surface); }
.bill-budget-head, .bill-budget-foot { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); }
.bill-budget-foot { margin-top: 6px; font-size: 12.5px; }
.bill-meter { height: 8px; border-radius: 999px; background: var(--surface-2); margin-top: 8px; overflow: hidden; }
.bill-meter > span { display: block; height: 100%; border-radius: 999px; }
.bill-meter > .lvl-good { background: var(--good); }
.bill-meter > .lvl-warning { background: var(--warn); }
.bill-meter > .lvl-critical { background: var(--bad); }
.bill-status { display: inline-flex; align-items: center; gap: 6px; }
.bill-status .bill-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.bill-status.lvl-good { color: var(--good); }
.bill-status.lvl-warning { color: var(--warn); }
.bill-status.lvl-critical { color: var(--bad); }

.bill-chart { margin: 0 0 16px; border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px 6px; background: var(--surface); }
.bill-chart figcaption { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.bill-plot { position: relative; }
.bill-plot svg { width: 100%; height: auto; display: block; }
.bill-grid { stroke: var(--border); stroke-width: 1; }
.bill-base { stroke: var(--border-strong); stroke-width: 1; }
.bill-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.bill-bar { fill: var(--accent); }
.bill-hit { fill: transparent; cursor: default; }
.bill-hit.on { fill: var(--accent-soft); opacity: .55; }
.bill-tip { position: absolute; pointer-events: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; padding: 6px 9px; font-size: 12.5px; box-shadow: 0 6px 18px rgba(0,0,0,.16); display: flex; flex-direction: column; gap: 1px; white-space: nowrap; z-index: 2; }
.bill-tip b { font-weight: 600; }
.bill-tip span { color: var(--text-2); font-variant-numeric: tabular-nums; }

.bill-tablewrap { overflow-x: auto; margin-bottom: 16px; }
.bill-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.bill-table caption { text-align: left; font-weight: 600; font-size: 13px; padding: 0 0 6px; }
.bill-table th, .bill-table td { padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.bill-table th { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.bill-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.bill-table .bill-q { display: inline-block; max-width: 340px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.bill-flag { margin-left: 6px; font-size: 11px; padding: 0 6px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); }
.bill-share { display: inline-block; width: 80px; height: 6px; border-radius: 999px; background: var(--surface-2); vertical-align: middle; overflow: hidden; }
.bill-share > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; }
.bill-empty { color: var(--muted); font-size: 13px; text-align: center; padding: 10px; }
.bill-note { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
