* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.header {
    background: #0f172a;
    color: white;
    padding: 28px;
    text-align: center;
}


.header h1 {
    font-size: 2.3em;
    font-weight: 700;
    margin-bottom: 6px;
}


.summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 30px;
    background: #f8f9fa;
}

.summary-card {
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform 0.3s;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.summary-card h3 {
    color: #666;
    font-size: 0.9em;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.summary-card .amount {
    font-size: 2em;
    font-weight: bold;
    margin-top: 10px;
}

.income {
    color: #10b981;
}

.expense {
    color: #ef4444;
}

.balance {
    color: #667eea;
}

.form-section {
    padding: 30px;
    border-bottom: 2px solid #f0f0f0;
}

.form-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-weight: 500;
}

input,
select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s;
}

input:focus,
select:focus {
    outline: none;
    border-color: #667eea;
}

.form-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 15px;
}

.btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: transform 0.2s;
    margin-top: 10px;
}

.btn:hover {
    transform: scale(1.05);
}

.transactions-section {
    padding: 30px;
}

.transactions-section h2 {
    margin-bottom: 20px;
    color: #333;
}

.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-btn.active {
    background: #667eea;
    color: white;
}

.transaction-list {
    max-height: 400px;
    overflow-y: auto;
}

.transaction-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    margin-bottom: 10px;
    border-radius: 10px;
    border-left: 4px solid #667eea;
    transition: transform 0.2s;
}

.transaction-item:hover {
    transform: translateX(5px);
}

.transaction-item.expense-item {
    border-left-color: #ef4444;
}

.transaction-item.income-item {
    border-left-color: #10b981;
}

.transaction-info {
    flex: 1;
}

.transaction-info .name {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.transaction-info .category {
    font-size: 0.85em;
    color: #666;
}

.transaction-amount {
    font-size: 1.2em;
    font-weight: bold;
    margin-right: 15px;
}

.delete-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.delete-btn:hover {
    background: #dc2626;
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

.empty-state svg {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    opacity: 0.3;
}

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

    .summary {
        grid-template-columns: 1fr;
    }
}