.cash-flow-panel {
  margin-bottom: 18px;
  padding: 0;
  overflow: visible;
}

.cash-flow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.cash-flow-head h2 {
  margin: 4px 0 5px;
  font-size: 22px;
}

.cash-flow-head p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
}

.cash-period-label {
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 10px;
  background: #eef8f2;
  color: #087a46;
  font-size: 13px;
  font-weight: 850;
}

.cash-flow-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfb;
}

.cash-filter-month,
.cash-filter-range {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cash-flow-filter input {
  width: auto;
  min-height: 42px;
  padding: 8px 11px;
  font-size: 14px;
}

.cash-filter-range > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.cash-flow-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 22px 22px;
}

.cash-flow-metrics article {
  min-width: 0;
  display: grid;
  gap: 6px;
  padding: 15px;
  border: 1px solid #e0e6e2;
  border-radius: 13px;
  background: #fff;
}

.cash-flow-metrics span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.cash-flow-metrics strong {
  overflow: hidden;
  font-size: 19px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cash-flow-metrics small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.cash-flow-in strong,
.cash-flow-net-positive strong {
  color: #07804a;
}

.cash-flow-out strong,
.cash-flow-net-negative strong {
  color: #cf3f42;
}

@media (max-width: 1180px) {
  .cash-flow-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .cash-flow-head {
    flex-direction: column;
  }

  .cash-flow-filter,
  .cash-filter-month,
  .cash-filter-range {
    width: 100%;
  }

  .cash-filter-month,
  .cash-filter-range {
    flex-wrap: wrap;
  }

  .cash-flow-filter input {
    flex: 1 1 150px;
    width: 100%;
  }

  .cash-flow-filter .button {
    flex: 1 1 auto;
  }
}

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

  .cash-flow-head,
  .cash-flow-filter,
  .cash-flow-metrics {
    padding-left: 16px;
    padding-right: 16px;
  }
}
