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

body {
  background-color: #f4f6f8;
  color: #333;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.header {
  text-align: center;
  margin-bottom: 30px;
}

.header h1 {
  font-size: 2.2rem;
  margin-bottom: 10px;
  color: #1f2937;
}

.header p {
  color: #6b7280;
  font-size: 1rem;
}

.summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-bottom: 30px;
}

.card {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.card h2 {
  font-size: 1rem;
  margin-bottom: 10px;
  color: #374151;
}

.card p {
  font-size: 1.8rem;
  font-weight: bold;
}

.income p {
  color: #16a34a;
}

.expense p {
  color: #dc2626;
}

.balance p {
  color: #2563eb;
}

.form-section,
.filter-section,
.transactions-section {
  background-color: #ffffff;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.form-section h2,
.filter-section h2,
.transactions-section h2 {
  margin-bottom: 20px;
  color: #1f2937;
}

#transactionForm {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: bold;
  color: #374151;
}

.form-group input,
.form-group select {
  padding: 12px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: #2563eb;
}

.btn-submit {
  grid-column: span 2;
  padding: 14px;
  background-color: #2563eb;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.btn-submit:hover {
  background-color: #1d4ed8;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 10px 16px;
  border: 1px solid #d1d5db;
  background-color: #f9fafb;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  transition: 0.3s;
}

.filter-btn:hover {
  background-color: #e5e7eb;
}

.filter-btn.active {
  background-color: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
}

.transaction-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.transaction-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background-color: #f9fafb;
}

.transaction-info {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.transaction-info h3 {
  font-size: 1rem;
  color: #111827;
}

.transaction-info p {
  font-size: 0.95rem;
  color: #6b7280;
}

.transaction-amount {
  font-size: 1.1rem;
  font-weight: bold;
}

.transaction-amount.entrada {
  color: #16a34a;
}

.transaction-amount.saida {
  color: #dc2626;
}

.transaction-actions {
  display: flex;
  gap: 10px;
}

.btn-edit,
.btn-delete {
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

.btn-edit {
  background-color: #f59e0b;
  color: white;
}

.btn-delete {
  background-color: #dc2626;
  color: white;
}

.btn-edit:hover {
  background-color: #d97706;
}

.btn-delete:hover {
  background-color: #b91c1c;
}

@media (max-width: 768px) {
  .summary {
    grid-template-columns: 1fr;
  }

  #transactionForm {
    grid-template-columns: 1fr;
  }

  .btn-submit {
    grid-column: span 1;
  }

  .transaction-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
  }

  .transaction-actions {
    width: 100%;
    justify-content: flex-end;
  }
}