@import url(https://fonts.googleapis.com/css?family=Poppins:100,100italic,200,200italic,300,300italic,regular,italic,500,500italic,600,600italic,700,700italic,800,800italic,900,900italic);


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins';
}

body {
    /* background-color: #05ee56; */
    background: linear-gradient(135deg, #2e8b57, #a8d5ba);
    color: #2d3436;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;

}

.container {
    background-color: #fff;
    width: 80vw;
    /* height: 80vh; */
    padding: 0.8rem;
    border-radius: 24px;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
    text-align: center;

}

.container h1 {
    color: #1a202c;
    margin-bottom: 35px;
    font-size: 2.2rem;
    font-weight: 600;
    letter-spacing: -0.5px;
    /* text-align: center; */
}

.container h2 {
    color: #2d3748;
    margin-bottom: 1rem;
    font-size: 1.25rem;
    font-weight: 600;
}


.dashboard {
    background: linear-gradient(135deg, #a8d5ba, #6b8e23);
    width: 80%;
    height: 60%;
    border-radius: 1rem;
    margin: 35px auto;
    padding: 24px;

    box-shadow: 0 4px 12px 2px rgba(0, 0, 0, 0.167);
}

.dashboard h1 {
    font-size: 1.5rem;
    margin: 15px;
}

.dashboard h2 {
    margin-top: 8px;
}


.slabs {
    /* display: flex;
    justify-content: space-around;
    margin-top: 1rem; */
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-top: 1.8rem;

}

/* .slab { */
/* width: 40%;
    height: 20%; */
/* } */

.slab {
    background-color: #fff;
    padding: 24px;
    border-radius: 1rem;
    box-shadow: 0 4px 12px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s ease;
    font-size: 1.1rem;
    font-weight: 500;
}


.slab:hover {
    transform: scale(1.03);
    /* transform: translateY(-2px); */
    /* scale: 2; */
}

.income {
    color: #059669;

}

.expense {
    color: #dc2626;
}

.transactions {
    gap: 5%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    /* display: flex; */
    /* justify-content: space-around; */
}

.transactions>* {
    /* width: 50%; */
    border-radius: 1rem;
    padding: 9px;

}


.transaction_history {
    /* background-color: #a44343; */
    background: linear-gradient(145deg, #f6f8fb, #f1f4f8);
    text-align: left;
    height: 100%;
    display: flex;
    flex-direction: column;
}


#transaction_list {
    list-style: none;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 8px;
    flex-grow: 1;
}

.transaction_item {
    /* width: 100%;
    background-color: #fff;
    color: black; */


    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.2rem;
    margin-bottom: 12px;
    border-radius: 12px;
    background-color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.4s ease;
    border-right: 5px solid;
    animation: slideIn 0.6s ease;
}


@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

.transaction_item:hover {
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}



.delete_btn {
    background: #ff000067;
    border: none;
    color: #dc2626;
    cursor: pointer;
    font-size: 0.9rem;
    opacity: 0;
    transition: all 0.2s ease;
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: 12px;
}

.transaction_item:hover .delete_btn {
    opacity: 1;
}

.transaction_item .delete_btn:hover {
    transform: scale(1.1);
}

.transaction_item.income {
    border-right-color: #059669;
}

.transaction_item.expense {
    border-right-color: #dc2626;
}


.add_transactions {
    /* background-color: gray; */
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #f6f8fb, #f1f4f8);
    padding: 24px;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    height: 100%;
}

#transaction_form {
    /* background-color: aqua; */
    height: 100%;
    display: flex;
    flex-direction: column;
}

.div {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    color: #4a5568;
    font-weight: 500;
}

input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    background-color: white;
}

input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

input:hover {
    border-color: #cbd5e0;
}



button {
    width: 100%;
    padding: 14px;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
    margin-top: auto;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.3);
}

button:active {
    transform: translateY(0);
}

button#Reset {
    background: linear-gradient(135deg, #8b2e2e 0%, #b33c3c 100%);
}

button[type="submit"] {
    background: linear-gradient(135deg, #2e8b57 0%, #3cb371 100%);
}

small {
    color: #718096;
    font-size: 0.875rem;
    margin-top: 4px;
    display: block;
}

@media (max-width:965px) {
    .container {
        overflow-wrap: break-word;
        height: 80%;
    }

    .dashboard {
        padding: 2rem;
    }
}




@media (max-width: 500px) {
  .container {
    padding: 24px;
  }

  .slabs {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .dashboard h1 {
    font-size: 2.5rem;
  }

  
  .slabs p {
    font-size: 1.5rem;
  }

  .transaction_item {
    padding: 14px 16px;
  }

  h1 {
    font-size: 1.8rem;
  }
}