/* GLOBAL RESET */

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

/* GENERAL STYLES */

body {
  font-family: "Poppins", sans-serif;
  color: #444;
  background-color: #f3f3f3;
  padding: 20px;
  height: 100vh;
}

/* NAVIGATION */

nav {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.login {
  display: flex;
  align-items: center;
  gap: 30px;
}

.primary-heading {
  display: flex;
  align-items: center;
  gap: 20px;
}

.flex-row {
  display: flex;
  gap: 20px;
}

ion-icon {
  color: #39b385;
  font-size: 40px;
}

.login-icon {
  height: 50px;
}

.input-login {
  border: none;
  width: 120px;
  padding: 5px 20px;
  font-family: inherit;
  border-radius: 100px;
  color: inherit;
  border: 1px solid #fff;
  transition: all 0.3s;
}

.input-login--incorrect {
  box-shadow: 0 0 3px #e52a5a;
}

.input-login:focus {
  outline: none;
  border: 1px solid #ccc;
}

.input-login::placeholder {
  opacity: 0.4;
}

.login--btn {
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  transition: all 0.3s;
}

.login--btn:hover,
.login--btn:focus,
.btn-sort:hover,
.btn-sort:focus {
  outline: none;
  color: #777;
  transform: scale(1.3);
}

/* MAIN */

.app {
  max-width: 1000px;
  margin: 40px auto;
  display: grid;
  grid-template-columns: 3fr 4fr;
  grid-template-rows: auto repeat(3, 150px) auto;
  gap: 20px;
  opacity: 0;
  transform: scale(0);
  transition: all 0.5s ease-out;
}

.app--open {
  opacity: 1;
  transform: scale(1);
}

/* BALANCE */

.balance {
  grid-column: 1 / span 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.balance-label {
  font-size: 22px;
  font-weight: 500;
  margin-bottom: -2px;
  text-align: right;
}

.balance-date {
  font-size: 14px;
  color: #888;
  text-align: right;
}

.balance-value {
  font-size: 45px;
  font-weight: 400;
}

/* OPERATIONS */

.operation {
  border-radius: 10px;
  padding: 10px 20px;
  color: #333;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  box-shadow: 0 0 10px #ccc;
}

h2 {
  margin-bottom: 15px;
  font-size: 20px;
  font-weight: 600;
  color: #333;
}

.operation--income {
  background-image: linear-gradient(to top left, #39b385, #9be15d);
}

.operation--outcome {
  background-image: linear-gradient(to top left, #ffb003, #ffcb03);
}

.operation--close {
  margin-top: 40px;
  background-image: linear-gradient(to top left, #e52a5a, #ff585f);
}

.operation--close h2 {
  font-size: 17px;
  margin-bottom: 10px;
}

.form {
  display: grid;
  grid-template-columns: 2.5fr 2.5fr 1fr;
  grid-template-rows: auto auto;
  gap: 4px 10px;
}

.form--input {
  width: 100%;
  border: none;
  background-color: rgba(255, 255, 255, 0.4);
  font-family: inherit;
  font-size: 12px;
  color: #333;
  padding: 3px 10px;
  border-radius: 7px;
  transition: all 0.3s;
}

.form--input:focus {
  outline: none;
  background-color: rgba(255, 255, 255, 0.6);
}

.form--label {
  font-size: 13px;
  text-align: center;
}

.form--btn {
  border: none;
  background: none;
  cursor: pointer;
  transition: transform 0.5s;
  margin-left: auto;
}

.form--btn:focus,
.form--btn:hover {
  color: white;
  transform: scale(1.5);
}

.input-icon {
  height: 30px;
}

/* HISTORY */

.history {
  grid-row: 2 / span 3;
  grid-column: 2 / 3;
  background-color: #fff;
  border-radius: 10px;
  overflow: scroll;
  box-shadow: 0 0 20px rgba(204, 204, 204, 0.5);
}

.transaction-row {
  position: relative;
  padding: 20px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
  transition: all 1s;
  border-radius: 10px;
}

.transaction-row--new {
  box-shadow: 0 0 15px #999;
}

.transaction-type {
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 500;
  color: #fff;
  padding: 1px 10px;
  border-radius: 100px;
}

.transaction-date {
  position: absolute;
  left: 150px;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 500;
  color: #666;
}

.transaction-type--income {
  background-image: linear-gradient(to top left, #39b385, #9be15d);
}

.transaction-type--outcome {
  background-image: linear-gradient(to top left, #ffb003, #ffcb03);
}

.transaction-category {
  position: absolute;
  right: 150px;
  font-size: 12px;
  color: #888;
  opacity: 0.8;
}

.transaction-value {
  font-size: 17px;
}

/* SUMMARY */

.summary {
  grid-row: 5 / 6;
  grid-column: 2 / 3;
  display: flex;
  align-items: center;
  padding: 0 3px;
  margin-bottom: 20px;
}

.summary--label {
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  margin-right: 8px;
  margin-left: 25px;
}

.summary--value {
  font-size: 22px;
}

.summary--value--in {
  color: #66c873;
}

.summary--value--out {
  color: #f5465d;
}

.btn--sort {
  margin-right: auto;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: all 0.5s;
}

.btn--sort:focus,
.btn--sort:hover {
  transform: scale(1.3);
}

/* LOGOUT TIMER */

.logout-timer {
  padding: 0 3px;
  text-align: left;
  font-size: 12px;
}

.timer {
  font-weight: 600;
}
