* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    background-color: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h1, h2, h3 {
    color: #2c3e50;
    margin-bottom: 15px;
}

.summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.summary div {
    text-align: center;
    flex: 1;
}

.summary p {
    font-size: 24px;
    font-weight: bold;
}

#balance {
    color: #2ecc71;
}

#income {
    color: #3498db;
}

#expense {
    color: #e74c3c;
}

.budget-section, .transaction-form, .transactions {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.budget-inputs {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.budget-inputs div {
    display: flex;
    flex-direction: column;
}

.budget-inputs label {
    margin-bottom: 5px;
    font-weight: bold;
}

.budget-inputs input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#save-budgets {
    padding: 10px 15px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    align-self: end;
}

#save-budgets:hover {
    background: #2980b9;
}

.transaction-form form {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.transaction-form div {
    display: flex;
    flex-direction: column;
}

.transaction-form label {
    margin-bottom: 5px;
    font-weight: bold;
}

.transaction-form input, 
.transaction-form select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.transaction-form button {
    padding: 10px 15px;
    background: #2ecc71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    align-self: end;
}

.transaction-form button:hover {
    background: #27ae60;
}

.charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.filters {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.filters select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    flex: 1;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: bold;
}

tr:hover {
    background-color: #f5f5f5;
}

.delete-btn {
    padding: 5px 10px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.delete-btn:hover {
    background: #c0392b;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.4);
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 8px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

@media (max-width: 768px) {
    .summary {
        flex-direction: column;
        gap: 15px;
    }
    
    .charts {
        grid-template-columns: 1fr;
    }
    
    .transaction-form form {
        grid-template-columns: 1fr;
    }
}