@import url("https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;600;700;800&display=swap");
@import url("https://unpkg.com/reset-css@5.0.2/reset.css");
body {
  font-family: "JetBrains Mono", monospace;
  background-color: hsl(0, 0%, 97%);
}

.container, .main, .header {
  max-width: 400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.header {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 500;
}
.header__nav {
  margin: 3.5rem 0;
}
.header__title {
  margin-bottom: 3rem;
}

.main {
  background-color: white;
  border-radius: 2rem 5rem;
  padding: 2rem;
  margin-bottom: 3rem;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
}

.section {
  margin-top: 3rem;
}
.section__heading {
  font-size: 1.4rem;
  font-weight: 500;
  padding-bottom: 1rem;
  border-bottom: 1px solid hsl(0, 0%, 80%);
}
.section__content {
  margin: 1.5rem 0;
}

.balance {
  margin-bottom: 1rem;
}
.balance__label {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.balance__amount {
  font-size: 2.2rem;
  font-weight: 600;
}

.cashflow {
  display: flex;
  justify-content: center;
  margin: 4.5rem 0;
}
.cashflow__column {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.cashflow__divider {
  border-style: inset;
  border-width: 1px;
  border-color: black;
  margin-right: 1rem;
  margin-left: 1rem;
}
.cashflow__label {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.cashflow__amount {
  font-size: 1.6rem;
  font-weight: 600;
}
.cashflow__amount--income {
  color: hsl(163, 72%, 41%);
}
.cashflow__amount--expense {
  color: hsl(356, 69%, 56%);
}

.history {
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 1.2rem;
  color: hsl(228, 12%, 44%);
}
.history__item {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border-right-width: 8px;
  border-right-style: solid;
}
.history__item span:first-child {
  width: 50%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history__item--income {
  border-color: hsl(163, 72%, 41%);
}
.history__item--expense {
  border-color: hsl(356, 69%, 56%);
}

.transaction-form__control {
  display: flex;
  flex-direction: column;
  margin-bottom: 1rem;
}
.transaction-form__label {
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.transaction-form__input {
  padding: 0.7rem;
  border: 1px solid hsl(0, 0%, 80%);
  font-size: 0.8rem;
}
.transaction-form__submit-btn {
  width: 100%;
  padding: 0.8rem 0;
  border-radius: 0.5rem;
  border: none;
  background-color: hsl(230, 22%, 23%);
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}
