/* Shrink, flatten, and tighten tabs to match Aggregate page style */
.agg-tabs .nav-tabs {
  border-bottom: 0;
  gap: 8px;                 /* space between tabs */
  margin-bottom: 10px;      /* small gap below tabs */
}

/* Base tab look */
.agg-tabs .nav-link {
  padding: .35rem .75rem;   /* compact height */
  font-size: .875rem;
  line-height: 1.1;
  background: #f8fafc;      /* subtle gray */
  color: #334155;           /* slate-700 */
  border: 1px solid #e5e7eb;
  border-bottom: 2px solid transparent;
  border-radius: 8px 8px 0 0;
  box-shadow: none;
}

/* Active tab pops and merges with card */
.agg-tabs .nav-link.active {
  background: #ffffff;
  color: #111827;
  border-color: #cbd5e1 #cbd5e1 #ffffff; /* hide bottom seam */
}

/* Even slimmer variant (like your Aggregate left card) */
.tabs-slim .nav-link {
  padding: .25rem .6rem;
  font-size: .82rem;
}

/* Optional: slightly tighten card body around tabs */
.subcard .card-body {
  padding-top: 16px;
}

/* Slim tabs like Aggregate */
.agg-tabs.tabs-slim .nav-link {
  padding: .45rem .9rem;
  font-weight: 500;
}

/* Profit pill + bar */
.profit-pill {
  min-width: 84px;
  display: inline-block;
  padding: .35rem .6rem;
  border-radius: 9999px;
  background: #0d6efd1a; /* light primary */
  font-weight: 700;
}
.profit-bar {
  width: 220px;
  height: 8px;
  border-radius: 9999px;
  background: #e9ecef;
  overflow: hidden;
}
.profit-fill {
  height: 100%;
  width: 0%;
  border-radius: 9999px;
  background: #0d6efd;
  transition: width .25s ease;
}