* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", sans-serif;
}

body {
  background: #0f172a;
  color: #fff;
  display: flex;
  justify-content: center;
  padding: 20px;
}

.container {
  width: 100%;
  max-width: 900px;
}

h1 {
  text-align: center;
  margin-bottom: 20px;
}

/* Inputs */
input, select {
  padding: 10px;
  border-radius: 8px;
  border: none;
  margin: 5px;
  outline: none;
}

/* Buttons */
button {
  padding: 10px 15px;
  border: none;
  border-radius: 8px;
  background: #3b82f6;
  color: white;
  cursor: pointer;
  transition: 0.3s;
}

button:hover {
  background: #2563eb;
}

/* Top Controls */
.top-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin-bottom: 20px;
}

/* Expense Form */
.expense-form {
  text-align: center;
  margin-bottom: 20px;
}

/* Cards */
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin: 20px 0;
}

.card {
  background: #1e293b;
  padding: 20px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.card h4 {
  margin-bottom: 10px;
  color: #94a3b8;
}

.card p {
  font-size: 22px;
  font-weight: bold;
}

/* Download Button */
.download-btn {
  display: block;
  margin: 10px auto;
  background: #10b981;
}

.download-btn:hover {
  background: #059669;
}

/* Expense List */
ul {
  list-style: none;
  margin-top: 20px;
}

li {
  background: #1e293b;
  margin: 8px 0;
  padding: 12px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

li button {
  background: #ef4444;
}

li button:hover {
  background: #dc2626;
}

/* Chart */
canvas {
  margin-top: 20px;
  background: white;
  border-radius: 10px;
  padding: 10px;
}

/* 📱 Responsive */
@media (max-width: 768px) {
  .cards {
    grid-template-columns: 1fr;
  }

  .top-controls {
    flex-direction: column;
    align-items: center;
  }

  input, select, button {
    width: 90%;
  }
}

#toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #1e293b;
  color: #fff;
  padding: 12px 18px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(-20px);
  transition: 0.3s;
  z-index: 1000;
}

#toast.show {
  opacity: 1;
  transform: translateY(0);
}

#toast.success {
  background: #10b981;
}

#toast.error {
  background: #ef4444;
}

#toast.warning {
  background: #f59e0b;
}