* {
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

:root {
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #333;
}

body.dark {
  --bg: #121212;
  --card: #1e1e1e;
  --text: #f1f1f1;
}

body {
  background: var(--bg);
  color: var(--text);
  display: flex;
  justify-content: center;
  padding: 16px;
  min-height: 100vh;
}

.container {
  background: var(--card);
  width: 100%;
  max-width: 420px;
  padding: 18px;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(0,0,0,.08);
}

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

h1 {
  font-size: 22px;
}

#darkToggle {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.balance {
  text-align: center;
  margin: 18px 0;
}

.balance h3 {
  font-size: 14px;
  color: #777;
}

.balance h2 {
  font-size: 26px;
  color: #2ecc71;
}

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

form input,
form select,
form button {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #ddd;
  font-size: 14px;
}

form button {
  background: #3498db;
  color: white;
  border: none;
  font-weight: bold;
  cursor: pointer;
}

.actions {
  display: flex;
  gap: 10px;
  margin: 16px 0;
}

.actions button {
  flex: 1;
  padding: 10px;
  border-radius: 10px;
  border: none;
  font-size: 13px;
  cursor: pointer;
}

#download {
  background: #2ecc71;
  color: #fff;
}

#clear {
  background: #e74c3c;
  color: #fff;
}

ul {
  list-style: none;
  padding: 0;
}

li {
  background: #f8f9fb;
  padding: 12px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  border-left: 5px solid;
  border-radius: 10px;
  font-size: 14px;
}

li.income {
  border-color: #2ecc71;
}

li.expense {
  border-color: #e74c3c;
}

@media (max-width: 480px) {
  h1 { font-size: 20px; }
  .balance h2 { font-size: 24px; }
}


li {
  align-items: center;
}

li .right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.delete-btn {
  background: transparent;
  border: none;
  font-size: 16px;
  cursor: pointer;
}

.delete-btn:hover {
  transform: scale(1.2);
}

.header-actions {
  display: flex;
  gap: 8px;
}

#infoBtn {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

/* MODAL */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
}

.modal-content {
  background: var(--card);
  color: var(--text);
  max-width: 360px;
  padding: 18px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0,0,0,.3);
  font-size: 14px;
}

.modal-content h3 {
  margin-top: 0;
}

.modal-content p {
  margin: 10px 0;
  line-height: 1.5;
}

#closeInfo {
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  border: none;
  background: #3498db;
  color: #fff;
  font-weight: bold;
  cursor: pointer;
}

#backup {
  background: #9b59b6;
  color: #fff;
}

#importBtn {
  background: #f39c12;
  color: #fff;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.pagination button {
  padding: 6px 10px;
  border-radius: 8px;
  border: none;
  background: #ecf0f1;
  cursor: pointer;
  font-size: 13px;
}

.pagination button.active {
  background: #3498db;
  color: #fff;
  font-weight: bold;
}

.pagination button:disabled {
  opacity: .5;
  cursor: not-allowed;
}



