/* ---- Mode toggle */
.modeToggle {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.modeBtn {
  flex: 1;
  border-radius: 12px;
  padding: 10px 12px;
}

.cardTitleRow {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

cardTitleRow .modeBtn.active:hover {
  background: linear-gradient(180deg, #f7f9ff 0%, #f3f6ff 45%, #f7f9ff 100%);
}

.smallBtn {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
  font-weight: 600;
  width: auto;
  min-width: 40px;
}

.flowsList {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.flowRow {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}

.flowFields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  align-items: center;
}

@media (max-width: 820px) {
  .flowFields {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .flowFields {
    grid-template-columns: 1fr;
  }
}

/* Removed positive/negative color rules for Deposits/Withdrawals inputs */


.flowRow .flowLabel {
  font-size: 12px;
  opacity: 0.85;
  margin-bottom: 6px;
}

@media (max-width: 520px) {
  .flowRow {
    grid-template-columns: 1fr;
  }

}

/* ---- Chart */
.chartBox {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

#ciChart {
  width: 100%;
}

@media (max-width: 620px) {
  #ciChart {
    height: 260px !important;
  }
}

@media (max-width: 620px) {
  .miniTotals {
    grid-template-columns: 1fr;
  }
}

/* ---- Breakdown table */
.tableWrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-top: 12px;
}

/* Max height + scroll + sticky header (similar to mortgage-payments) */
.ciTableScroll {
  max-height: 450px;
  overflow: auto;
  border-radius: 14px;
}

.ciTableScroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.tableControls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin: 10px 0px;
}

.tableControlLabel {
  font-size: 12px;
  opacity: 0.85;
}

.tableControlSelect {
  border-radius: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: inherit;
}

.modeBtn[aria-pressed="true"],
.modeBtn.active {
  background: rgba(47, 111, 236, .10);
}