/* =========================
   GLOBAL
========================= */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background: linear-gradient(135deg, #f5f7fb, #eef2f7);
  color: #222;
  padding: 20px;
}

.expensesTitle {
  text-align: center;
}

/* =========================
   LAYOUT WRAPPER LOOK
========================= */
h1 {
  text-align: center;
  margin-bottom: 20px;
  font-size: 32px;
}

/* all main blocks */
body > div {
  background: white;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.05);
  transition: 0.2s ease;
}

body > div:hover {
  transform: translateY(-2px);
}

/* =========================
   INPUTS
========================= */
input,
select {
  width: 100%;
  padding: 10px 12px;
  margin: 6px 0;
  border-radius: 10px;
  border: 1px solid #ddd;
  outline: none;
  transition: 0.2s;
  font-size: 14px;
  background: #fff;
}

input:focus,
select:focus {
  border-color: #6c7bff;
  box-shadow: 0 0 0 3px rgba(108, 123, 255, 0.2);
}

/* =========================
   BUTTONS
========================= */
button {
  width: 100%;
  padding: 10px;
  margin-top: 10px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #4f7cff, #6c7bff);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: 0.2s;
}

button:hover {
  transform: scale(1.02);
}

.deleteButton {
  width: auto;
  padding: 6px 10px;
  background: #ff4d4d;
  border-radius: 8px;
}

/* =========================
   LIST
========================= */
ul {
  max-width: 700px;
  margin: 0 auto;
}

li {
  display: flex;
  align-items: center;
  justify-content: space-between;

  background: white;
  padding: 10px 14px;
  margin-bottom: 10px;
  border-radius: 12px;

  box-shadow: 0 6px 15px rgba(0,0,0,0.05);

  width: 100%;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;

  gap: 10px;
}

li:hover {
  transform: translateX(3px);
}

/* =========================
   CATEGORY TAG
========================= */
.categoryTag {
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: white;
  margin-right: 10px;
}

/* =========================
   TOTAL BOX
========================= */
h2 span {
  display: inline-block;
  background: #222;
  color: white;
  padding: 5px 12px;
  border-radius: 10px;
  margin-left: 8px;
}

/* =========================
   ERROR
========================= */
.errorMessage {
  display: none;
}

.displayElement {
  color: #ff4d4d;
  font-weight: 600;
  margin: 10px 0;
}

.errorMessage,
.displayElement {
  text-align: center;
  width: 100%;
}

/* =========================
   INPUT STATES
========================= */
.error {
  border: 2px solid #ff4d4d !important;
}

.success {
  border: 2px solid #2ecc71 !important;
}

/* =========================
   ANIMATION
========================= */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =========================
   RESPONSIVE
========================= */
@media (min-width: 768px) {
  body {
    padding: 40px;
  }

  body > div {
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
  }

  input, select {
    width: auto;
    min-width: 200px;
    margin-right: 8px;
  }

  button {
    width: auto;
    padding: 10px 18px;
  }
}

/* =========================
   FOOTER
========================= */

footer {
  padding-top: 25px;
}

#footerText {
  text-align: center;
  font-size: small;
}