I think that 40 ppm is a little low for TA. I am always cautious about going too high on the calcium. 2,000 ppm is kind of an upper maximum manageable level, but it best to try to stay well away from that whenever possible.
I think that you could raise it a bit with no problem. I would leave the pH at 7.8, raise the TA to 60 ppm and raise the calcium to 500 ppm. I would do the calcium first, and do the TA the next day.
My personal preference is to not be too concerned about the pH, even if it gets to 8.0, but that is not something I would recommend because it can end up causing problems if you're not careful. I think that the pH is OK as long as it's definitely not over 7.9.
Also, a higher pH can lead to metal staining if you have metals, so you have to take that into consideration. If you have copper or iron in the water, then keeping the pH higher can be a problem.
When balancing for CSI, you have to calculate what the CSI will be at the maximum and minimum water temperature and make sure that none of the parameters are too far off at those temperatures. The problem with calcium is that it is not easy to lower if necessary. If you don't have problems with calcium buildup, then raising the calcium somewhat should not be a problem. You could go to 600 ppm on the calcium if you want, but CSI is still going to be a bit low.
You're kind of at a point where it is somewhat of a personal choice exactly where to keep the CSI and the individual levels.
Also, note that the borates and cyanuric acid make up part of your TA. Therefore, your carbonate alkalinity is lower than 40 ppm for purposes of determining CSI and pH rise.
At a pH of 7.8, the 50 ppm of borates will account for 10.11 ppm of the TA and 35 ppm of cyanuric acid will account for 12.11 ppm of the TA.
Therefore, the Carbonate Alkalinity is only 17.78 ppm. That does not give you enough margin for error, and is why your CSI is so low.
Your carbon dioxide level is about 0.550 ppm, which is very close to the equilibrium point with the ambient air.