*{
    margin: 0;
    padding: 0;
    font-family: "Inter", sans-serif; 
}

body{
    background-color: 	#f2f1f1;
}
body.no-scroll{
    overflow: hidden;
}

.content{
    display: flex;
}
.head{
    display: flex;
    align-items: center;
    height: 4.5rem;
    justify-content: space-between;
}

.right-head{
    display: flex;
    gap: 16px;
}

.right-head i{
    font-size: 20px;
    cursor: pointer;
    color: #1f2937;
    opacity: 0.8;
}

.right-head i:hover{
    opacity: 1;
}

.btn_one i{
    color: #1f2937;
    font-size: 30px;
    font-weight: 700;
    line-height: 60px;
    cursor: pointer;
    margin: 0 15px;
    transition: all 0.3s linear;
}

#heading{
    margin-left: 20px;
    font-size: 40px;
    color: #1f2937;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.sidebar_menu{
    position: fixed;
    left: -300px;
    height: 100vh;
    width: 300px;
    background-color: #2e3440;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.4);
    transition: all 0.3s linear;
}

.sidebar_menu .logo{
    position: absolute;
    width: 100%;
    line-height: 60px;
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.5);
    height: 60px;
}

.sidebar_menu .logo a{
    
    margin-left: 77px;
    color: aliceblue;
    text-decoration: none;
    font-size:25px;
    font-weight: 500;

}

.sidebar_menu .dashboard-close {
    color: #e5e7eb;
    font-size: 25px;
    font-weight: 700;
    position: absolute;
    right: 10px;
    cursor: pointer;
    transition: all 0.3s linear;

}


/* part2 */


.sidebar_menu .menu{
    color: aliceblue;
    position: absolute;
    width: 100%;
    top: 80px;
    padding-left: 0;
    margin: 0;
}

.sidebar_menu .menu li{
    margin-top: 6px;
    padding: 14px 20px;
    list-style: none;
}


.sidebar_menu .menu i,
.sidebar_menu .menu a{
    color: aliceblue;
    text-decoration: none;
    font-size: 20px;
}

.sidebar_menu .menu i{
    padding-right: 8px;
}

.sidebar_menu .menu li:hover{
    background-color: rgba(255, 255, 255, 0.1);
}

/* part 3 */

.sidebar_menu.active{
    left: 0;
}

.btn_one.disappear{
    opacity: 0;
    pointer-events: none;
}

.main{
    width: 100%;
    margin: 0 10px;
    transition: margin-left 0.3s linear;
}

.main.active{
    margin-left: 310px;
    width: calc(100% - 300px);
}


/* Part 4 */

.valuesContainer{ 
    display: flex;
    gap: 15px; 
    flex-wrap: wrap;   
    width: 100%;
    
}

.values{
    flex: 1 1 250px;
    padding: 2.25rem 2rem 0 2rem;
    min-height: 140px;
    max-width: 40%;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 4px 4px 5px rgba(119, 118, 118, 0.7);
}

.values h4{
    font-size: 20px;
    color: #083C5D;    
}

.values h2{
    margin-top: 5px;
    font-size: 42px;
}

#income h2{
    color: green;
}

#expenses h2{
    color: red;
}

#balance h2{
    color: blue;
}


/* Part 5 */

.analysis{
    flex: 2;
    background-color: #fff;
    width: 100%;
    min-height: 300px;
    padding: 2rem;
    margin-top: 24px;
    border-radius: 12px;
    box-shadow: 4px 4px 5px rgba(119, 118, 118, 0.7);
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
}

.card-headings{
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
    color: #083C5D;
}

.analysis-chart{
    height: 250px;
    width: 100%;
    padding: 0 10px;
}

.analysis-chart canvas{
    width: 100% !important;
    height: 100% !important;
}

/* Part 6 */

.transactions{
    background-color: #fff;
    width: 100%;
    min-height: 400px;
    margin-top: 24px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 4px 4px 5px rgba(119, 118, 118, 0.7);
    box-sizing: border-box;
}

.transactions-header{
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    color: #083C5D;

}

.transactions-list{
    width: 100%;
}

.transaction-row{
    border-bottom: 1px solid #e5e7eb;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    box-sizing: border-box;
}

.transaction-row.header{
    font-weight: 600;
    background-color: #f9fafb;
}

.transaction-row.odd{
    background-color: #f7f7f7;
}

.tx-desc{
    flex: 1;
}

.tx-category{
    flex: 1;
    text-align: center;
}

.tx-amount{
    flex: 1;
    text-align: right;
}

.tx-amount.expense{
    color: #dc2626;
}

.tx-amount.income{
    color: #16a34a;
}

/* Part 7 */
.analysisAndTransactions{
    display: flex;
    gap: 18px;
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 900px){
    .analysisAndTransactions{
        flex-direction: column;
    }
}

.transaction-form{
    flex: 1;
    background-color: #fff;
    margin-top: 24px;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 4px 4px 5px rgba(119, 118, 118, 0.7);
}

#txForm{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
}

#txForm input,
#txForm select{
    padding: 0.6rem 0.75rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}

#txForm button{
    grid-column: span 1;
    padding: 0.7rem;
    background-color: #083C5D;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

#txForm button:hover{
    opacity: 0.9;
}

/* Part 8 */

.tx-delete{
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    margin-left: 12px;
}

.tx-delete:hover{
    opacity: 0.7;
}

/* Part 9 */


/* =========================
   TABLET & MOBILE (≤1024px)
   Sidebar should OVERLAY
   ========================= */

    @media (max-width: 1024px){

    .content{
        display: block;
    }

    /* RESET DESKTOP SIDEBAR PUSHING */
    .main,
    .main.active{
        margin-left: 0 !important;
        width: 100% !important;
    }

    .sidebar_menu{
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        height: 100vh;
        z-index: 1000;
    }

    .sidebar_menu.active{
        left: 0;
    }
}

/* =========================
   MOBILE (≤600px)
   ========================= */
@media (max-width: 600px){

    /* Slightly smaller sidebar on phones */
    .sidebar_menu{
        width: 260px;
        left: -260px;
    }

    .sidebar_menu.active{
        left: 0;
    }

    /* Header tweaks */
    #heading{
        font-size: 20px;
    }

    .right-head{
        gap: 12px;
    }

    /* Transactions stack vertically */
    .transaction-row{
        flex-direction: column;
        align-items: flex-start;
    }

    .tx-amount{
        align-self: flex-end;
    }

    /* Charts height adjustment */
    .analysis-chart{
        height: 220px;
    }
}
