/* ============ USAGE ANALYTICS ============ */
/* Segmented switch in the filter bar (by organization / by user) */
.usage-seg {
  display: inline-flex; gap: 2px; padding: 2px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 999px;
}
.usage-seg button {
  border: none; background: transparent; color: var(--text-2);
  font-family: var(--font); font-size: 12px; padding: 5px 12px;
  border-radius: 999px; cursor: pointer; transition: background .15s, color .15s;
}
.usage-seg button.active { background: var(--brand); color: #fff; }
.usage-seg button:not(.active):hover { color: var(--text-0); }

/* Chart column is wider than the module-breakdown column */
.usage-split { display: grid; grid-template-columns: 1.45fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .usage-split { grid-template-columns: 1fr; } }

.usage-bar-row { display: grid; grid-template-columns: 1fr 42px 40%; align-items: center; gap: 10px; padding: 5px 0; }
.usage-bar-name { font-size: 12px; color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-bar-val { font-family: var(--mono); font-size: 12px; font-weight: 600; color: var(--text-0); text-align: right; }
.usage-bar-track { height: 8px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.usage-bar-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.usage-bar-fill.alt { background: linear-gradient(90deg, var(--purple), var(--pink)); }
.usage-subhead {
  margin: 16px 0 6px; padding-top: 12px; border-top: 1px solid var(--line);
  font-size: 11px; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--text-2);
}

.usage-cell-runs { display: flex; align-items: center; gap: 10px; min-width: 120px; }
.usage-cell-runs .usage-bar-track { flex: 1; }
.usage-mods { display: flex; flex-wrap: wrap; gap: 4px; max-width: 260px; }
.usage-row { cursor: pointer; }
.usage-note { margin-top: 16px; font-size: 11px; line-height: 1.6; color: var(--text-3); max-width: 900px; }

/* Checkbox toggle */
.switch { position: relative; display: inline-block; width: 36px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; inset: 0; background: var(--bg-3); border-radius: 20px; transition: 0.2s; }
.slider::before { content: ""; position: absolute; height: 14px; width: 14px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: 0.2s; }
.switch input:checked + .slider { background: var(--brand); }
.switch input:checked + .slider::before { transform: translateX(16px); }

/* Progress bars */
.progress { background: var(--bg-3); border-radius: 4px; overflow: hidden; height: 8px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand), var(--purple)); transition: width 0.4s; }

/* Misc */
.text-muted { color: var(--text-2); }
.text-brand { color: var(--brand-2); }
.text-ok { color: var(--ok); }
.text-warn { color: var(--warn); }
.text-danger { color: var(--danger); }
.mono { font-family: var(--mono); }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.fs-11 { font-size: 11px; }
.fs-12 { font-size: 12px; }
.fs-13 { font-size: 13px; }
.fw-600 { font-weight: 600; }
