:root {
  --red: rgb(202, 5, 5);
  --green: rgb(14, 172, 0);
  --violet: rgb(136, 66, 163);
  --box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Franklin Gothic Medium', 'Arial Narrow', Arial, sans-serif;
  background-color: rgb(241, 241, 241);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: rgb(58, 58, 58);
  padding: 20px 10vh;
}
button:focus,
input:focus {
  outline: 0;
}

/*-----------------------------------*/
.container {
  margin: auto;
  width: 300px;
  padding: 18px;
  border: solid 1px rgb(177, 176, 176);
}

.container h4 {
  margin-bottom: 5px;
}

.container h5 {
  border-bottom: solid 1px;
  padding-bottom: 5px;
  margin: 0 auto;
  color: var(--violet);
}

.container .section {
  margin-bottom: 10px;
  background-color: rgba(202, 169, 202, 0.151);
  padding: 10px;
}

/*section 1-------------------------------*/
.inc-exp-container {
  text-align: center;
  background-color: white;
  box-shadow: var(--box-shadow);
  display: flex;
  justify-content: space-between;
}

.inc-exp-container > div {
  flex: 1;
  margin: 10px;
}

.money.expense {
  color: var(--red);
}
.money.income {
  color: var(--green);
}

.inc-exp-container > div:first-of-type {
  border-right: solid 1px rgb(206, 206, 206);
}

.inc-exp-container h5 {
  margin-bottom: 0;
}

.inc-exp-container p {
  margin-top: 10px;
}

/*section 2-------------------------------*/
.history-container ul {
  list-style: none;
  padding-left: 0;
}

.history-container ul li {
  display: flex;
  justify-content: space-between;
  border: solid 1px var(--violet);
  height: 30px;
  line-height: 30px;
  padding: 0 10px;
  font-size: 13px;
  margin-top: 10px;
  position: relative;
}

.history-container ul li:hover #del-btn {
  opacity: 1;
  transition: opacity 0.3s ease-in;
}

.history-container ul li.expense {
  border-right: solid 4px var(--red);
}
.history-container ul li.income {
  border-right: solid 4px var(--green);
}

#del-btn {
  opacity: 0;
  position: absolute;
  border: 0;
  background-color: var(--red);
  color: white;
  width: 30px;
  height: 30px;
  cursor: pointer;
  left: -30px;
  top: -1px;
}

/*section 3-------------------------------*/
form .form-control {
  margin: 15px 0;
}

form label {
  display: block;
  margin-bottom: 5px;
}
form label span {
  font-size: 13px;
}

form input {
  width: 100%;
  padding: 9px;
  border: 0;
  border: solid 1px rgb(211, 210, 210);
  box-shadow: none;
  transition: 0.3s;
}
form input:hover,
form input:focus {
  box-shadow: var(--box-shadow);
  border: solid 1px white;
  transition: 0.5s;
}

form button {
  background-color: var(--violet);
  border: 0;
  color: white;
  padding: 9px;
  cursor: pointer;
  font-size: 12px;
  width: 100%;
  transition: 0.5s;
}

form button:hover {
  border-radius: 7px;
  transition: 0.5s;
}
