* {
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background: #0b0b0b;
    color: #f5f5f5;
    padding: 20px;
}

h1,
h2 {
    text-align: center;
}


.summary {
    display: flex;
    gap: 20px;
    margin: 30px 0;
}

.card {
    flex: 1;
    padding: 20px;
    background: #121212;
    border-radius: 12px;
}

.income {
    border-left: 6px solid #22c55e;
}

.expense {
    border-left: 6px solid #ef4444;
}

.balance {
    border-left: 6px solid #3b82f6;
}


.form,
.filter {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 20px 0;
}

input,
select {
    padding: 10px;
    background: #121212;
    border: 1px solid #2a2a2a;
    color: white;
    border-radius: 8px;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

button {
    background: #3b82f6;
    border: none;
    padding: 10px 16px;
    color: white;
    border-radius: 8px;
    cursor: pointer;
}


.dashboard {
    display: flex;
    gap: 20px;
}


.history,
.chart-box {
    flex: 1;
    background: #121212;
    padding: 20px;
    border-radius: 12px;
}

#transactionList {
    list-style: none;
    padding: 0;
}

#transactionList li {
    background: #0b0b0b;
    padding: 12px;
    margin: 10px 0;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.income-item {
    border-left: 5px solid #22c55e;
}

.expense-item {
    border-left: 5px solid #ef4444;
}

.actions .delete {
    background: #ef4444;
    padding: 6px 12px;
    border-radius: 6px;
    color: white;
}

.empty {
    display: none;
    text-align: center;
    color: #9ca3af;
}


.chart-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.chart-wrapper {
    width: 450px;
    height: 320px;
}

.chart-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
}

.chart-header button {
    background: #374151;
    font-size: 12px;
}


.box {
    position: absolute;
    top: 60px;
    right: 70px;
    width: 70px;
    height: 30px;
    background: red;
    border-radius: 5px;
    text-align: center;
    border: 2px solid white;
    cursor: pointer;
}

/* media queries */

@media (max-width: 1024px) {

    body {
        padding: 15px;
    }

    .summary {
        flex-direction: column;
        gap: 16px;
    }

    .dashboard {
        flex-direction: column;
        gap: 20px;
    }

    .chart-wrapper {
        width: 100%;
        height: 300px;
    }

    .chart-header {
        flex-direction: row;
    }

    .box {
        top: 20px;
        right: 20px;
        width: 65px;
        height: 30px;
        font-size: 14px;
    }
}



@media (max-width: 640px) {

    body {
        padding: 12px;
    }

    h1 {
        font-size: 22px;
    }

    h2 {
        font-size: 18px;
    }

    .summary {
        gap: 12px;
        margin: 20px 0;
    }

    .card {
        padding: 14px;
    }

    .form,
    .filter {
        flex-direction: column;
        gap: 10px;
    }

    input,
    select,
    button {
        width: 100%;
    }

    .dashboard {
        gap: 15px;
    }

    #transactionList li {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .actions {
        width: 100%;
    }

    .actions .delete {
        width: 100%;
        text-align: center;
    }

    .chart-header {
        flex-direction: column;
        gap: 10px;
    }

    .chart-wrapper {
        height: 240px;
    }


    .box {
        position: static;
        width: 100%;
        height: 36px;
        margin-top: 20px;
        font-size: 14px;
    }
}