* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 62.5%;
}

body {
  font-family: "Open Sans", sans-serif;
  font-weight: 400;
  line-height: 1;
  background-color: #333;
  color: #eeeeee;
}

.container {
  max-width: 140rem;
  padding: 4.8rem 2.4rem;
  margin: 0 auto;
}

h1 {
  font-size: 6rem;
  text-align: center;
  margin-bottom: 2.4rem;
  font-weight: 800;
  color: #cacaca;
}

.fa-solid.fa-chart-pie {
  color: #eeeeee;
  background-color: #099268;
  font-size: 8rem;
  border-radius: 25%;
}
.fa-solid.fa-chart-pie:hover {
  background-color: #099268;
}

h2 {
  font-size: 3.2rem;
  font-weight: 600;
  text-align: center;
  margin-bottom: 1.8rem;
  color: #10db9e;
}

.new-item-section {
  margin-bottom: 2.4rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 2rem;
  flex-wrap: wrap;
}

.form {
  display: grid;
  justify-items: end;
  grid-template-columns: 1fr 1fr;
  padding: 1.2rem;
  gap: 2rem;
}

.form label,
.form input,
.form select,
.form option,
.form option {
  height: 40px;
  width: 250px;
  font-size: 2rem;
  padding-right: 1rem;
  border-radius: 8px;
  border: none;
  font-family: inherit;
  color: inherit;
}

#date,
#name,
#categories,
#amount {
  font-size: 1.6rem;
  color: #cfcfcf;
  background-color: #505050;
}

*::placeholder {
  font-family: inherit;
  color: #cfcfcf;
}

.form input {
  padding: 1rem;
}

.button {
  display: flex;
  align-items: center;
  justify-content: center;
}

#button {
  font-size: 2rem;
  padding: 1rem 2rem;
  background-color: #099268;
  border: none;
  border-radius: 8px;
  color: #fff;
  transition: all 0.3s;
  cursor: pointer;
}

#button:hover {
  background-color: #087c59;
}

.grid-container {
  margin: 0 auto;
  background-color: #2f2f2f;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 2rem;
  gap: 2rem;
  border-radius: 8px;
  box-shadow: 0 0.4rem 1rem 0.2rem #414141ce;
}

.table-container {
  padding: 1.4rem;
  border-radius: 8px;
  background-color: #363636;
}

.table {
  text-align: left;
  font-size: 1.8rem;
  width: 100%;
  /* border: #696969 3px solid; */
  border-radius: 8px;
  border-spacing: 0;
}

.table-row th {
  text-align: center;
  padding: 1rem;
  border-bottom: #888888 1px solid;
  padding-bottom: 1.6rem;
}

tbody {
  border-collapse: collapse;
  padding-left: 1rem;
}

.input-table-row td {
  padding: 1.5rem 0.5rem;
}

.input-table-row td:first-child {
  padding-left: 1rem;
}

table tr:nth-child(even) {
  background-color: #505050;
}

tbody td:last-child {
  background-color: #363636;
  padding: 0 0 0 1rem;
}

.fa-solid {
  padding: 0.2rem;
  font-size: 1.6rem;
  color: rgb(241, 25, 25);
  transition: all 0.3s;
}

.fa-solid:hover {
  background-color: rgb(189, 3, 3);
}

.chart-container {
  justify-self: center;
  align-self: center;
  height: 400px;
  width: 400px;
}

/* MEDIA QUERIES */

/* 1005px */
@media (max-width: 64em) {
  .table {
    font-size: 1.6rem;
  }
  .input-table-row td {
    padding: 0.5rem;
  }
}

/* 864px */
@media (max-width: 54em) {
  .grid-container {
    grid-template-columns: 1fr;
  }
}

/* 768px */
@media (max-width: 48em) {
  .form {
    grid-template-columns: 1fr;
  }

  .chart-container {
    justify-self: center;
    height: 300px;
    max-width: 300px;
  }

  h2 {
    font-size: 2.4rem;
  }

  .form label,
  .form input,
  .form select,
  .form option,
  .form option {
    height: 40px;
    width: 200px;
    font-size: 1.6rem;
  }

  #date,
  #name,
  #categories,
  #amount {
    font-size: 1.4rem;
  }

  #button {
    font-size: 1.6rem;
  }
}

/* 510px */
@media (max-width: 31.8em) {
  .container {
    padding: 2.4rem 1rem;
  }

  h1 {
    font-size: 4.8rem;
  }

  .fa-solid.fa-chart-pie {
    font-size: 6.4rem;
  }

  h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }

  .new-item-section {
    gap: 1rem;
  }

  .form {
    gap: 1rem;
  }

  .form label,
  .form input,
  .form select,
  .form option,
  .form option {
    height: 30px;
    width: 150px;
    font-size: 1.4rem;
  }

  #date,
  #name,
  #categories,
  #amount {
    font-size: 1.2rem;
  }

  .button {
    align-self: flex-end;
  }

  .grid-container {
    padding: 1rem;
  }

  .table-container {
    padding: 0.6rem;
  }

  .table-row {
    font-size: 1.4rem;
  }

  .input-table-row {
    font-size: 1.2rem;
  }
}
