/* Reset básico para tirar margens e padronizar */
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: Arial, Helvetica, sans-serif;
}

/* Fundo da página */
body{
    background-color: #f4f4f4;
    color: #333;
    padding: 20px;
}

/* Cabeçalho */
header{
    text-align: center;
    margin-bottom: 30px;
}

header h1{
    font-size: 2rem;
    color: #0b5f9a;
}

/* Seções principais */
main{
    max-width: 800px;
    margin: 0 auto;
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Títulos das seções */
section h2{
    margin-bottom: 15px;
    font-size: 1.4rem;
    color: #0077cc;
}


/* Grupo do formulário */
.form-group{
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
}

.form-group label{
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input{
    padding: 8px;
    border: 1px solid #ccc;
}

/* Botão de adicionar */
button[type="submit"]{
    padding: 10px 15px;
    background-color: #0077cc;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button[type="submit"]:hover{
    background-color: #005fa3;
}

/* Lista de transações */
#transaction-list{
    list-style: none;
    margin-top: 10px;
}

.transaction {
  display: flex;
  justify-content: space-between;
  background-color: #f9f9f9;
  padding: 10px;
  margin-bottom: 8px;
  border-left: 5px solid #0077cc;
  border-radius: 4px;
}

.transaction span {
  flex: 1;
  text-align: center;
}

/* Botão de remover */
.delete-btn {
  background-color: #e74c3c; /* vermelho */
  color: white;
  border: none;
  padding: 5px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

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

/* Saldo total */
#balance-section {
  margin-top: 30px;
  text-align: center;
}

#balance {
  font-size: 1.5rem;
  font-weight: bold;
  margin-top: 10px;
  color: #2ecc71; /* verde para saldo positivo */
}

/* Rodapé */
footer {
  text-align: center;
  margin-top: 40px;
  color: #aaa;
  font-size: 0.9rem;
}

/* Responsividade */
@media (max-width: 600px) {
  .transaction span {
    font-size: 0.9rem;
  }

  button[type="submit"], .delete-btn {
    width: 100%;
    margin-top: 10px;
  }
}