.report-sum-selected {
  position: relative;
  color: #0b3b75 !important;
  background: #dcecff !important;
  box-shadow: inset 0 0 0 2px #2878d0 !important;
  cursor: cell !important;
  user-select: none;
}

.report-sum-selected::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, .72);
  content: "";
  pointer-events: none;
}

.ledger-table tbody td:nth-child(n+6),
#tb-table tbody td:nth-child(n+3),
#tb-table tfoot td:nth-child(n+3),
.financial-table td:last-child,
.income-table td:not(:first-child),
.monthly-table td:not(:first-child),
.tree-node .amount {
  cursor: cell;
}

.report-cell-sum-bar {
  position: fixed;
  z-index: 1090;
  right: 50%;
  bottom: 22px;
  display: grid;
  grid-template-columns: auto auto minmax(180px, 1fr) auto;
  align-items: center;
  gap: 14px;
  width: min(92vw, 620px);
  padding: 11px 14px;
  border: 1px solid rgba(145, 167, 195, .45);
  border-radius: 20px;
  color: #eaf2ff;
  background: linear-gradient(135deg, #0e233d, #153c69);
  box-shadow: 0 18px 50px rgba(4, 18, 38, .32);
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, 28px);
  transition: opacity .2s ease, transform .2s ease;
}

.report-cell-sum-bar.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(50%, 0);
}

.report-cell-sum-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 13px;
  color: #173a63;
  background: #f2bd61;
  font-size: 19px;
}

.report-cell-sum-stat span,
.report-cell-sum-total span {
  display: block;
  margin-bottom: 2px;
  color: #aebed3;
  font-size: 11px;
  font-weight: 750;
}

.report-cell-sum-stat strong {
  display: block;
  font-size: 17px;
  font-weight: 950;
}

.report-cell-sum-total input {
  width: 100%;
  border: 0;
  outline: 0;
  padding: 0;
  color: #fff;
  background: transparent;
  direction: ltr;
  font-size: 21px;
  font-weight: 950;
  text-align: right;
  cursor: copy;
}

.report-cell-sum-bar button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 10px;
  color: #dce7f5;
  background: rgba(255, 255, 255, .1);
}

.report-cell-sum-bar small {
  grid-column: 1 / -1;
  color: #90a5bf;
  font-size: 10px;
  text-align: center;
}

@media (max-width: 620px) {
  .report-cell-sum-bar {
    grid-template-columns: auto auto 1fr auto;
    gap: 9px;
    bottom: 12px;
  }
  .report-cell-sum-icon { display: none; }
}

@media print {
  .report-cell-sum-bar { display: none !important; }
  .report-sum-selected {
    color: inherit !important;
    background: inherit !important;
    box-shadow: none !important;
  }
  .report-sum-selected::after { display: none !important; }
}
