* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f4f7f6;
    padding-top: 80px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #2b5cb7;
    color: white;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    animation: slideDown 0.6s ease-out forwards;
}

.header h1 {
    font-size: 20px;
    letter-spacing: 1px;
}

/* Form Specific Styles */
.form-container {
    width: 100%;
    animation: slideInLeft 0.6s ease-out forwards;
    opacity: 0;
    animation-delay: 0.4s;
}

.form-header {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #4a4ae1;
    margin-bottom: 20px;
}

.plus-icon {
    background: #4a4ae1;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.input-group {
    margin-bottom: 15px;
}

.input-group label {
    display: block;
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

.input-group input, .input-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    outline: none;
}

/* Toggle Buttons */
.type-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.type-btn {
    flex: 1;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: 0.3s;
    background: #fdfdfd;
}

.type-btn.active {
    border: 2px solid #4a4ae1;
    background: #f0f0ff;
    font-weight: bold;
}

.submit-btn {
    width: 100%;
    background: #4a4ae1;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    font-size: 16px;
    transition: transform 0.2s, background 0.3s;
}

.submit-btn:hover {
    background: #3939c0;
    transform: scale(1.02);
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Main Layout */
.container {
    padding: 2rem;
    max-width: 1200px;
    margin: auto;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.income { border-left: 8px solid #00ff3c; }
.expenses { border-left: 8px solid #ff0015; }
.balance { border-left: 8px solid #3939c0; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes slideInLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.stats-grid .card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.stats-grid .card.income {
    animation-delay: 0.1s;
}

.stats-grid .card.expenses {
    animation-delay: 0.2s;
}

.stats-grid .card.balance {
    animation-delay: 0.3s;
}

/* Table & Chart Section */
.top-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.bottom-grid {
    margin-bottom: 30px;
}

.table-container, .chart-container {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.chart-container {
    animation: slideInRight 0.6s ease-out forwards;
    opacity: 0;
    animation-delay: 0.5s;
}

.table-container {
    animation: slideUp 0.6s ease-out forwards;
    opacity: 0;
    animation-delay: 0.6s;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

th, td {
    text-align: left;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.amt-neg { color: #dc3545; }
.amt-pos { color: #28a745; }

.edit-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
    margin-right: 5px;
    font-weight: bold;
}

.edit-btn:hover {
    background: #0056b3;
}

.delete-btn {
    background: #ff4d4d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: 0.2s;
}

.delete-btn:hover {
    background: #cc0000;
}

/* Responsive Design Media Queries */
/* @media (max-width: 768px) {
    .container {
        padding: 1rem;
    }

    .top-grid {
        grid-template-columns: 1fr; 
    }

    .table-container {
        overflow-x: auto; 
    }
    
    .header h1 {
        font-size: 18px;
    }
} */