* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}



body {

    padding: 2rem;

    font-family: Arial, Helvetica, sans-serif;

    background-color: #f5f5f5;

    color: #222;
}



h1 {

    text-align: center;

    font-size: 40px;

    margin-bottom: 2rem;

    color: #222;

    margin-top: 20px;
}



main {

    max-width: 500px;

    margin: 0 auto;

    margin-top: 10px;

    margin-bottom: 25px;

    background-color: #fff;

    padding: 1.5rem;

    border-radius: 12px;

    border: 1px solid #d3cccc;

    box-shadow:
        20px 30px 20px rgb(149, 141, 141)
}




header {

    padding: 20px;

    background-color: #fafafa;

    border: 1px solid #eeeeee;

    border-radius: 10px;

    text-align: center;

    display: flex;

    flex-wrap: wrap;

    margin-bottom: 25px;
}


.summary-card {

    padding: 10px;
}


header div:first-child {

    flex-basis: 100%;

    border-bottom: 1px solid #e5e5e5;

    padding-bottom: 15px;

    margin-bottom: 10px;
}


header div:nth-child(n+2) {

    flex-basis: 50%;
}


header h5 {

    font-size: 13px;

    font-weight: 600;

    color: #777;

    text-transform: uppercase;

    margin-bottom: 6px;
}


header span {

    display: block;

    font-size: 20px;

    font-weight: 600;

    color: #222;
}


#balance {

    font-size: 28px;
}



section {

    padding: 5px;
}


section h3 {

    font-size: 20px;

    margin-bottom: 18px;

    color: #222;
}



form {

    display: flex;

    flex-wrap: wrap;

    gap: 15px;
}


.form-group {

    display: flex;

    flex-direction: column;

    gap: 6px;
}


/* Name */

form div:first-child {

    flex-basis: 100%;
}


/* Amount, Date, Type */

form div:nth-child(n+2) {

    flex-basis: calc(50% - 7.5px);
}



form label {

    font-size: 12px;

    font-weight: 600;

    color: #555;
}



form input,
form select {

    width: 100%;

    height: 42px;

    padding: 10px;

    border: 1px solid #d8d8d8;

    border-radius: 6px;

    background-color: #fff;

    color: #222;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 14px;

    outline: none;

    transition: border-color 0.2s ease;
}


form input:focus,
form select:focus {

    border-color: #555;
}


form input::placeholder {

    color: #999;
}


form button {

    width: 100%;

    height: 42px;

    margin-top: 5px;

    border: none;

    border-radius: 6px;

    background-color: #333;

    color: #fff;

    font-size: 13px;

    font-weight: 600;

    cursor: pointer;

    transition: background-color 0.2s ease;
}


form button:hover {

    background-color: #111;
}


.transactions-section {

    margin-top: 30px;

    padding-top: 20px;

    border-top: 1px solid #eee;
}


.transaction {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 10px;

    padding: 12px;

    margin-bottom: 10px;

    border: 1px solid #e5e5e5;

    border-radius: 7px;

    background-color: #fff;
}


.transaction-info {

    flex: 1;
}


.transaction-name {

    font-size: 14px;

    font-weight: 600;

    color: #222;

    margin-bottom: 4px;
}


.transaction-date {

    font-size: 11px;

    color: #888;
}


.transaction-amount {

    font-size: 14px;

    font-weight: 600;
}


.transaction-amount.income {

    color: #16845c;
}


.transaction-amount.expense {

    color: #d64545;
}



.delete-btn {

    border: none;

    background: transparent;

    color: #999;

    font-size: 16px;

    cursor: pointer;

    padding: 5px;
}


.delete-btn:hover {

    color: #d64545;
}



.empty-message {

    text-align: center;

    color: #999;

    font-size: 13px;

    padding: 20px 0;
}


@media (max-width: 500px) {

    body {

        padding: 1rem;
    }


    h1 {

        font-size: 35px;

        margin-bottom: 30px;

        margin-top: 40px;
    }


    main {

        width: 100%;

        padding: 1rem;

        margin-bottom: 40px;
    }


    header {

        padding: 15px;
    }


    header span {

        font-size: 18px;
    }


    #balance {

        font-size: 24px;
    }


    form div:nth-child(n+2) {

        flex-basis: 100%;
    }


    .transaction {

        padding: 10px;
    }


    .transaction-name {

        font-size: 13px;
    }


    .transaction-amount {

        font-size: 12px;
    }

}