.expense-container {
  width: 90%;
  max-width: 536px;
  padding: 2rem;
  background-color: rgb(202, 201, 201);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 2px solid black;
  border-radius: 2rem;
  box-shadow: 0 0 5px black;
  box-sizing: border-box;
  margin: 2rem 0;
}

.expense-container:hover {
  transform: scale(0.95);
  transition: all 0.3s ease-in-out;
  box-shadow: 0 0 25px black;
}

.total-expense {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #1f2833;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
  box-sizing: border-box;
}

.total-expense h1,
.total-expense .money {
  font-size: clamp(1rem, 4vw, 1.5rem);
  font-family: "Michroma", sans-serif;
  font-weight: 400;
  color: #fff;
}

.total-expense .money {
  padding: 0.25rem 1rem;
  background-color: rgb(25, 0, 255);
  border-radius: 0.75rem;
}

#expense-form {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  box-sizing: border-box;
}

#expense-form input {
  width: 90%;
  max-width: 400px;
  height: 2.5rem;
  border-radius: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 1rem;
  margin: 0.5rem 0;
  box-sizing: border-box;
}

.expense-add {
  background-color: green;
  color: #fff;
  height: 2.5rem;
  width: 100%;
  max-width: 150px;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-family: "Michroma", sans-serif;
  margin: 0.5rem 0;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
}

.expense-add:hover,
.delete-btn:hover {
  transform: scale(0.9);
  transition: all 0.1s ease-in-out;
}

.expense-items {
  width: 100%;
  max-height: 275px; /* ✅ limit height so it doesn’t expand endlessly */
  overflow-y: auto;   /* ✅ enable vertical scroll */
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1rem;
  padding-right: 0.5rem; /* avoid hiding scrollbar under content */
  box-sizing: border-box;
  
}
.expense-info {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 500px;
  background-color: rgb(162, 161, 161);
  font-family: "Michroma", sans-serif;
  border-radius: 0.5rem;
  padding: 0.75rem;
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
  box-sizing: border-box;
  margin: 0.75rem 0;
}

.expense-info div {
  flex: 1 1 25%;
  margin: 0.25rem;
  text-align: center;
  word-wrap: break-word;
}

.delete-btn {
  background-color: red;
  color: #fff;
  border: none;
  padding: 0.4rem 0.75rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
  font-family: "Michroma", sans-serif;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 5%;
  margin-left: 5%;
}

@media screen and (max-width: 540px){
 .expense-container {
  width: 80%;
  max-width: 292px;
  min-width: 280px;
}

.expense-info {
  width: 100%;
  max-width: 280px;
 
}

}