@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,400;0,500;0,600;0,700;0,800;0,900;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

/* Reset */

* {
  margin: 0;
  padding: 0;
}

:root {
  --font: "Poppins", sans-serif;
  --font-color: #444;
}

body {
  font-family: var(--font);
  background-color: #f3f3f3;
  color: var(--font-color);
}

header {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 500;
}

header input {
  width: 15rem;
  height: 3rem;
  border: 1px solid #f3f3f3;
  border-radius: 2rem;
  text-align: center;
  color: var(--font-color);
  outline: none;
}

header input::placeholder {
  color: #bbb;
}

header input:focus {
  border: 1px solid #ccc;
  transition: 0.5s all ease;
}

header button {
  font-size: 1.4rem;
  border: none;
  outline: none;
  background-color: transparent;
  cursor: pointer;
}

#login {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.logout-btn {
  display: none;
  color: #e52a5a;
  cursor: pointer;
}

main {
  max-width: 1000px;
  margin: auto;
  padding: 1rem;
  opacity: 0;
  display: none;
}

.appear {
  opacity: 1;
  transition: all 1s ease;
}

.hide {
  opacity: 0;
}

main .hello {
  margin-bottom: 1rem;
  font-size: 2rem;
  font-weight: 500;
}

main .movement-operations {
  width: 100%;
  display: grid;
  grid-template-areas: "movement operation";
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
}

.balance {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.balance .balance_label p:last-child {
  color: #8a8a8a;
  font-size: 0.9rem;
}

.balance .balance_label p:first-child {
  font-size: 1.4rem;
  font-weight: 500;
}

.balance .balance_value {
  font-size: 2.8rem;
  font-weight: 400;
}

.operation {
  grid-area: operation;
}

.operation-card .inputs {
  display: flex;
  gap: 1rem;
}

.operation-card {
  background-image: linear-gradient(to top left, #ffb003, #ffcb03);
  width: 380px;
  padding: 1.8rem;
  border-radius: 1rem;
  margin-bottom: 1rem;
}

.operation-card input {
  width: 150px;
  height: 2rem;
  background-color: rgba(255, 255, 255, 0.4);
  border: 2px solid transparent;
  border-radius: 0.5rem;
  font-size: 1rem;
  text-align: center;
  outline: none;
  color: var(--font-color);
}

.operation-card input:focus {
  background-color: rgba(255, 255, 255, 0.6);
}

.operation-card h2 {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  font-weight: 600;
}

.operation-card button {
  cursor: pointer;
  width: 3rem;
  padding: 0 0.8rem;
  background-color: #fff;
  border: none;
  border-radius: 0.5rem;
  font-size: 1.5rem;
  color: var(--font-color);
  text-align: center;
  outline: none;
}

.operation-card button:hover {
  background-color: #f3f3f3;
}

.operation-card button:active {
  background-color: #ddd;
}

.operation-card label {
  margin-left: 0.3rem;
  font-size: 0.9rem;
}

.request {
  background-image: linear-gradient(to top left, #39b385, #9be15d);
}

.close {
  background-image: linear-gradient(to top left, #e52a5a, #ff585f);
  margin-bottom: 0;
}

.movement {
  grid-area: movement;
  background-color: #fff;
  border-radius: 0.5rem;
  max-height: 490.4px; /* Adjust this value to your desired max height */
  height: auto; /* The height will adjust automatically based on content */
  height: fit-content;
  overflow-y: auto; /* Add vertical scrolling when content exceeds max-height */
  overflow-x: hidden; /* Prevent horizontal scrolling */
}

.movement .cell {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem;
  height: 28.8px;
  padding: 1rem;
  border-bottom: 2px solid #f3f3f3;
  overflow-x: scroll;
  overflow-y: hidden; /* Prevent vertical scrolling */
}

.cell .type {
  font-size: 0.9rem;
  font-weight: 500;
  color: #fff;
  padding: 0.2rem 0.7rem;
  border-radius: 1rem;
}

.cell .deposit {
  background-image: linear-gradient(to top left, #39b385, #9be15d);
}

.cell .withdrawal {
  background-image: linear-gradient(to top left, #e52a5a, #ff585f);
}

.cell .date {
  font-size: 0.8rem;
}

.cell .amount {
  font-size: 1.2rem;
  font-weight: 500;
}

.summary {
  display: flex;
  justify-content: space-between;
  padding: 2rem 0.5rem;
}

.summary .in-out,
.summary .interest-sort {
  display: flex;
  justify-content: space-between;
  column-gap: 1rem;
}

.summary .in,
.summary .out,
.summary .interest {
  font-size: 0.8rem;
  font-weight: 500;
}

.summary .in span,
.summary .out span {
  font-size: 1.2rem;
  font-weight: 500;
}

.summary .in span,
.summary .interest span {
  color: #39b385;
  font-size: 1.2rem;
  font-weight: 500;
}

.summary .out span {
  color: #e52a5a;
}

.summary .sort button {
  height: 2rem;
  border: none;
  outline: none;
  color: var(--font-color);
  font-size: 1rem;
  font-weight: 500;
  background-color: transparent;
  cursor: pointer;
}

.summary .sort button:hover {
  color: #444444bb;
}

.summary .sort button:active {
  color: var(--font-color);
}

.summary .timer {
  font-size: 0.8rem;
  font-weight: 500;
}

.movement .no-data {
  display: flex;
  justify-content: center;
  align-items: center;
  color: #8a8a8ae0;
  font-size: 1.3rem;
  font-weight: 500;
  gap: 0.6rem;
  padding: 1rem;
  border-bottom: 2px solid #f3f3f3;
  overflow: hidden;
}

.movement .clock {
  background-color: #dfdfdf;
  width: 2.2rem;
  height: 2.2rem;
  border: none;
  border-radius: 100%;
  position: relative;
}

.movement .hand1 {
  background-color: #fff;
  width: 0.2rem;
  height: 0.8rem;
  border: none;
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translate(-50%, -50%);
  border-radius: 1rem;
}

.movement .hand2 {
  background-color: #fff;
  width: 0.9rem;
  height: 0.2rem;
  border: none;
  position: absolute;
  top: 57.2%;
  left: 67%;
  transform: translate(-50%, -50%) rotate(22deg);
  border-radius: 1rem;
}

@media screen and (max-width: 850px) {
  .operation-card {
    width: 240px;
  }

  .operation-card input {
    width: 80px;
  }

  main .movement {
    max-height: 538.4px;
  }
}

@media screen and (max-width: 615px) {
  main .movement-operations {
    width: 100%;
    display: grid;
    grid-template-areas:
      "operation"
      "movement";
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  main .operation {
    margin: auto;
  }
  main .summary {
    align-items: center;
    gap: 1rem;
    flex-direction: column;
  }
}

@media screen and (max-width: 490px) {
  .balance {
    flex-direction: column;
  }
}

.hidden {
  display: none;
}

.modal h1 {
  font-size: 2.5rem;
  color: #e52a5a;
  text-align: center;
}

.modal .error-message {
  font-size: 1.5rem;
  color: #e52a5a;
  text-align: center;
}

.close-modal {
  position: absolute;
  top: 0;
  right: 1rem;
  font-size: 3rem;
  color: var(--font-color);
  cursor: pointer;
  border: none;
  background: none;
  z-index: 5;
  box-sizing: border-box;
}

.modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 1000px;
  height: fit-content;
  background-color: #fff;
  font-size: 1.2rem;
  padding: 2rem;
  border-radius: 5px;
  box-shadow: 0 3rem 5rem rgba(0, 0, 0, 0.3);
  z-index: 4;
  overflow-y: auto;
  box-sizing: border-box;
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  z-index: 3;
  box-sizing: border-box;
}

.icon {
  border: solid 0.6rem;
  border-radius: 50%;
  height: 100px;
  width: 100px;
  margin: 1rem auto;
  position: relative;
  color: #e52a5a;
}

.error {
  display: none;
  color: #e52a5a;
}

.error .icon {
  border-color: #e52a5a;
}

.cross-icon::before,
.cross-icon::after {
  content: "";
  position: absolute;
  top: 1.1rem;
  left: 2.8rem;
  border-radius: 0.5rem;
  width: 0.6rem;
  height: 4rem;
  background-color: #e52a5a;
}

.cross-icon::before {
  transform: rotate(45deg);
}

.cross-icon::after {
  transform: rotate(-45deg);
}
