.billing-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}
.billing-toolbar select,
.billing-toolbar button {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1b2936;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
.billing-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.billing-summary .sum-141 span { color: #7eb6ff; }
.billing-summary .sum-src span { color: #ffc27a; }
.billing-table-wrap {
  margin-top: 8px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
}
.billing-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
  font-size: .82rem;
}
.billing-table th,
.billing-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,.06);
  white-space: nowrap;
}
.billing-table th {
  color: var(--muted);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  background: rgba(0,0,0,.18);
  position: sticky;
  top: 0;
}
.billing-table th.col-141,
.billing-table td.col-141 {
  color: #9ec5ff;
  background: rgba(80,140,255,.06);
}
.billing-table th.col-src,
.billing-table td.col-src {
  color: #ffd19a;
  background: rgba(255,170,70,.07);
}
.billing-table td.num {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.billing-table tr.loss td {
  background: rgba(255,118,118,.06);
}
.billing-table .tag {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 800;
}
.billing-table .tag.ok {
  color: var(--ok);
  background: rgba(103,231,173,.1);
}
.billing-table .tag.loss {
  color: var(--error);
  background: rgba(255,118,118,.1);
}
.billing-table .group-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.billing-table .source-cell {
  max-width: 220px;
  white-space: normal;
  line-height: 1.25;
}
.billing-table .source-name {
  color: #ffd19a;
  font-weight: 700;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.billing-table .source-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: .7rem;
}
.billing-table .model-cell {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.empty-row {
  color: var(--muted);
  text-align: center !important;
  padding: 28px 14px !important;
}
.profit-pos { color: var(--ok); }
.profit-neg { color: var(--error); }
@media (max-width: 900px) {
  .billing-summary { grid-template-columns: 1fr 1fr; }
}
