@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

:root {
  --bg-color: #f9fafc;
  --text-color: #222;
  --main-color: #0198c7ad;
  --success: #28a745;
  --danger: #dc3545;
}

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

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg-color);
  color: var(--text-color);
  padding: 1.5rem;
}

h1 {
  text-align: center;
  margin-bottom: 1rem;
}

main {
  max-width: 800px;
  margin: auto;
  background: #fff;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

header {
  display: flex;
  justify-content: space-around;
  background: var(--main-color);
  color: #fff;
  padding: 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
}

header div {
  text-align: center;
}

.filter-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#filter{
  padding: 8px;
  border-radius: 5px;
  border: 1px solid #ccc; 
  background: #fff;
  cursor: pointer;
  font-size: 16px;
}

.filter-bar option {
  padding: 8px 12px;
  border-radius: 5px;
  border: 1px solid #ccc;
  background: #fff;
  cursor: pointer;
}

ul {
  list-style: none;
  margin: 0.5rem 0;
}

.amount-type{
  display: flex;
  gap: 20px;
  margin: 10px 0;
  justify-content: space-evenly;
  font-size: 16px;
}

.amount-type label {
  width: 100%;
  text-align: center;
  cursor: pointer;
  padding: 8px 12px;
  border: 1px solid #ccc;
  border-radius: 5px;
  user-select: none;
}

.amount-type input{
  display: none;
}

.amount-type label:has(input:checked) {
  background-color: #eeeeee;
  font-weight: bold;
}

.inputs{
  display: flex;
  flex-direction: column;
}

ul li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #cecece;
  margin-bottom: 8px;
  padding: 8px 10px;
  border-radius: 5px;
  position: relative;
}

ul li.income { border-left: 5px solid var(--success); }
ul li.expense { border-left: 5px solid var(--danger); }

.amount { font-weight: 600; }

.action button {
  background: none;
  border: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 1rem;
}

#status { text-align: center; margin-top: 0.5rem; }

form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

form input, form button, form select {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
}

form button {
  background: var(--main-color);
  color: #fff;
  cursor: pointer;
  font-size: 16px;
}

form button:hover {
  background: #017ea1;
}

button.danger {
  background: var(--danger);
  color: #fff;
  padding: 8px 12px;
  margin-top: 8px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

#toast {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--success);
  color: #fff;
  padding: 10px 16px;
  border-radius: 5px;
  display: none;
}
