
body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 0;
}

.container {
    max-width: 800px;
    margin: 50px auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}

h1 {
    text-align: center;
    margin-bottom: 20px;
}


form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

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

form button {
    background-color: #28a745;
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

form button:hover {
    background-color: #218838;
}


.expense-table table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.expense-table th,
.expense-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.expense-table th {
    background-color: #f8f8f8;
}

.expense-table td button {
    margin-right: 5px;
    padding: 5px 10px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
}

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

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

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

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


.total-amount {
    text-align: right;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 20px;
}


.filter {
    margin-bottom: 20px;
    text-align: right;
}

.filter label {
    margin-right: 10px;
}

.filter select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
}


@media (max-width: 768px) {
    .container {
        margin: 20px;
        padding: 15px;
    }

    form {
        flex-direction: column;
    }

    .filter {
        text-align: left;
    }

    .expense-table thead {
        display: none;
    }

    .expense-table table,
    .expense-table tbody,
    .expense-table tr,
    .expense-table td {
        display: block;
        width: 100%;
    }

    .expense-table tr {
        margin-bottom: 15px;
        background-color: #f9f9f9;
        border-radius: 6px;
        padding: 10px;
    }

    .expense-table td {
        position: relative;
        padding-left: 50%;
        text-align: right;
    }

    .expense-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        font-weight: bold;
        text-align: left;
    }

    .total-amount {
        text-align: left;
    }
}
