/* ── Compact tab bar ─────────────────────────────────────────────────────── */
.tab-bar {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
  flex-shrink: 0;
  background: var(--background);
  height: 38px;
}

.tab-bar::-webkit-scrollbar {
  height: 0;
}

.tab-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  position: relative;
}

.tab-item:hover {
  color: var(--text-secondary);
}

.tab-item.active {
  color: var(--text);
  border-bottom-color: var(--purple-strong);
}

.tab-item .tab-close {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  opacity: 0.6;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}

.tab-item:hover .tab-close {
  opacity: 1;
}

.tab-item .tab-close:hover {
  background: rgba(239, 68, 68, 0.12);
  color: var(--negative);
}

.tab-item .tab-close svg {
  width: 8px;
  height: 8px;
}