/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
  font-size: 20px;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@font-face {
  font-family: vazir;
  src: url(font/IRANYekanRegular.ttf) format("tff");
}

body {
  font-family: vazir !important;
  background-color: #f1f1f1;
}

/* NAV  */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  padding: 0.8rem;
  padding-inline: 2rem;
}

.logo {
  width: 4.5rem;
}

.login {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.login > input {
  border-radius: 100vmax;
  width: 7rem;
  padding: 0.3rem;
  text-align: center;
  background-color: #fff;
  border: 1px solid #fff;
  transition: border 0.4s;
}

.login > input::placeholder {
  font-size: 0.9rem;
}

.login > input:focus {
  outline: none;
  border-color: #476268;
}

.login > button {
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  font-weight: 900;
}

/* APP */
.app {
  max-width: 80rem;
  margin-inline: auto;
  padding-inline: 10%;
  padding-block: 1.2rem;
  visibility: hidden;
  opacity: 0;
  transition: opacity 2.5s, visibility 2.5s;
}

@media (max-width: 50em) {
  .app {
    padding-inline: 5%;
  }
}

/* BALANCE */
.balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 3rem;
}

.balance-container {
  display: flex;
  flex-direction: column;
}

.balance__label {
  font-size: 1.3rem;
}

.balance__date {
  color: #888;
}

.balance__value {
  font-size: 2rem;
}

@media (max-width: 33rem) {
  .balance__label {
    order: 2;
  }
  .balance__date {
    order: 1;
  }
}

/* APP'S MAIN SECTION */
.main-section-app {
  display: flex;
  gap: 1rem;
}

@media (max-width: 65em) {
  .main-section-app {
    flex-direction: column;
  }
}

/* MOVEMENTS */
.movements {
  width: 50%;
  border-radius: 0.8rem;
  background-color: #fff;
  height: 32rem;
  overflow-y: scroll;
}

@media (max-width: 65em) {
  .movements {
    width: 100%;
  }
}

.movements__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  padding-inline: 2rem;
  border-bottom: 1px solid #d4d4d4;
}

@media (max-width: 30em) {
  .movements__row {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
  }
  .movements__date {
    margin: auto;
  }
}

.movements__row:last-child {
  border-bottom: none;
}

.movements__type {
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  padding-inline: 1.5rem;
  border-radius: 1000vmax;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: 1.5rem;
}

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

.movements__type--withdrawal {
  background-image: linear-gradient(to top left, #e52a5a, #ff585f);
}

.movements__date {
  color: #888;
  font-size: 0.8rem;
  margin-left: auto;
  margin-top: 10px;
}

.movements__value {
  font-size: 1.3rem;
}

/* OPERATIONS */
.operations {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

@media (max-width: 65em) {
  .operations {
    width: 80%;
    margin-inline: auto;
    margin-block: 2rem;
  }
}

.operation {
  border-radius: 0.5rem;
  padding: 2rem;
  padding-top: 1rem;
  width: 100%;
}

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

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

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

.operation h2 {
  font-size: 1.1rem;
  margin-block: 1rem;
}

.form {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.form__input {
  border-radius: 0.5rem;
  border: none;
  width: 7rem;
  background-color: #ffffff7c;
  outline: none;
  text-align: center;
  padding: 0.2rem;
  transition: all 0.3s;
}

.form__input:focus {
  background-color: #ffffffc2;
}

.form__label {
  text-align: center;
  font-size: 0.9rem;
}

.flex-col {
  display: flex;
  flex-direction: column;
}

.form__btn {
  border-radius: 0.5rem;
  border: none;
  align-self: self-start;
  cursor: pointer;
  padding-inline: 1.5rem;
  padding-block: 0.2rem;
  background-color: #fff;
}

/* SUMMARY */
.summary {
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding-top: 2rem;
}

.summary__label {
  font-size: 0.8rem;
  margin-top: 1rem;
}

.summary__value {
  font-size: 1.4rem;
}

.summary__value--interest,
.summary__value--in {
  color: #66c873;
}
.summary__value--out {
  color: #f5465d;
}

@media (max-width: 60em) {
  .summary {
    flex-direction: column;
  }
  .management {
    display: flex;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    font-size: 0.9rem;
  }
}

.btn--sort {
  border: none;
  color: #111;
  cursor: pointer;
  transition: all 0.3s;
}

.btn--sort:hover {
  color: #888;
}

.logout-timer {
  color: #444;
}

.timer {
  display: inline-block;
  width: 2rem;
  color: #111;
  font-weight: 800;
}

/* SCROLL */
::-webkit-scrollbar {
  width: 7px;
}

::-webkit-scrollbar-thumb {
  border-radius: 100vmax;
  background-color: #999;
}

::-webkit-scrollbar-thumb:hover {
  background-color: #777;
}

::-webkit-scrollbar-thumb:active {
  background-color: #555;
}
