/* billing.css — Billing tab styles (extends .forge-* from anchor.css) */

/* Console positioning — matches .repair-console / .admin-console / .search-console.
 * Without this rule .billing-console renders inline in document flow next to the
 * sidebar instead of taking over the workspace area. */
.billing-console.forge-console {
  position: fixed;
  top: 52px;
  left: var(--sidebar-width, 281px);
  right: 0;
  bottom: 0;
  padding: 24px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--bg);
  z-index: 10;
}

@media (max-width: 768px) {
  .billing-console.forge-console {
    left: 0;
    top: 46px;
  }
}

.billing-stats {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.billing-stat-card {
  flex: 1 1 140px;
  background: var(--bg-card, #1a1a2e);
  border: 1px solid var(--border, #333);
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  min-width: 140px;
}

.billing-stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--accent, #e0d0b0);
  margin-bottom: 4px;
}

.billing-stat-label {
  font-size: 0.8rem;
  color: var(--text-dim, #888);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.billing-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin-bottom: 20px;
}

.billing-table thead th {
  background: var(--bg-card, #1a1a2e);
  color: var(--accent, #e0d0b0);
  padding: 8px 12px;
  text-align: left;
  font-weight: 600;
  border-bottom: 2px solid var(--border, #333);
  white-space: nowrap;
}

.billing-table tbody td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-dim, #222);
  color: var(--text, #ccc);
}

.billing-table tbody tr:hover {
  background: var(--bg-hover, rgba(255,255,255,0.03));
}

.billing-section-title {
  color: var(--accent, #e0d0b0);
  font-size: 1rem;
  margin: 20px 0 8px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border, #333);
}

.billing-detail-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.billing-detail-header h3 {
  flex: 1;
  margin: 0;
  color: var(--text, #ccc);
}

/* Period/site filter selects in forge-header */
#billing-console .forge-actions select {
  background: var(--bg-input, #111);
  color: var(--text, #ccc);
  border: 1px solid var(--border, #333);
  border-radius: 4px;
  padding: 6px 10px;
  font-size: 0.85rem;
}

#billing-console .forge-actions select:focus,
#billing-console .forge-actions select:focus-visible {
  outline: none;
  border-color: #e8632b;
  box-shadow: 0 0 8px rgba(232, 99, 43, 0.3);
}
