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

body {
  font-family: "Segoe UI", Arial, sans-serif;
  background-color: #ffffff;
  color: #2f2f2f;
  padding: 30px 15px;
}

.container {
  max-width: 650px;
  margin: 0 auto;
}

h1 {
  text-align: center;
  margin-bottom: 25px;
  color: #2f2f2f;
}

h2 {
  font-size: 18px;
  color: #2f2f2f;
}

/* ---------- Shared card look ---------- */
.input-section,
.filter-section,
.stats-section,
.list-section {
  background-color: #ffffff;
  border: 1px solid #e3f2e6;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

/* ---------- Inputs & buttons ---------- */
.input-section,
.filter-section {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

input {
  flex: 1;
  min-width: 140px;
  padding: 10px 12px;
  border: 1px solid #cfe8d4;
  border-radius: 10px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease;
}

input:focus {
  border-color: #7cc98a;
}

button {
  padding: 10px 16px;
  border: none;
  border-radius: 10px;
  background-color: #a7e0af;
  color: #1f3d24;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
}

button:hover {
  background-color: #8fd89a;
  transform: translateY(-1px);
}

#clearBtn {
  background-color: #f5d5d5;
  color: #7a2b2b;
}

#clearBtn:hover {
  background-color: #eeb8b8;
}

/* ---------- Stats ---------- */
.stats-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat-card {
  background-color: #f3fbf4;
  border-radius: 10px;
  padding: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.stat-label {
  font-size: 12px;
  color: #5c8a63;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: #2f2f2f;
}

/* ---------- Expense list ---------- */
.list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

#expenseList {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#expenseList li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #f9fdf9;
  border: 1px solid #e3f2e6;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 14px;
  transition: background-color 0.2s ease;
}

#expenseList li:hover {
  background-color: #eef9ef;
}

.empty-message {
  text-align: center;
  color: #999;
  font-size: 14px;
  padding: 10px 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 500px) {
  .stats-section {
    grid-template-columns: repeat(2, 1fr);
  }

  .input-section,
  .filter-section {
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
