/*****************************Global attributes*********************/
* {
    box-sizing: border-box;
    margin: 0%;
    padding: 0%;
}
body {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f0f2f5;
    font-family: 'Poppings', sans-serif;
    font-size: 1rem;
    transition: background-color ease 0.9s;
}
main, footer {
    width: 90vw;
}
h3{
    margin-bottom: 1rem;
    font-size: 1rem;
    font-weight: normal;
}
.sr-only{
    position: absolute;
    width: 1px;
    height: 1px;
    left: -10vw;
    overflow: hidden;
}
a{
    text-decoration: none;
    color: #49AA26;
}
a:hover{
    color: #3dd705;
}
.button.new{
    display: inline-block;
    margin-bottom: 0.8rem;
}
.button{
    cursor: pointer;
}
.options-container{
    display: flex;
    justify-content: space-between;
}
.order{
    width: 40%;
    border-radius: 8px;
    border: none;
    outline: none;
    color: #363f5f;
    font-weight: bold;
}
option{
    font-size: 'Poppings', sans-serif;
    color: #363f5f;
    font-weight: bold
}
/********************header***********************/
header{
    background: #2d4a22; 
    width: 100%;
    padding: 2rem 0px 6rem;
    text-align: center;
    transition: background-color 0.9s ease;
}
/****************main**********************/
/**************cards*******************/
#balance{
    margin-top: -5rem;
}
h2 {
    font-weight: normal;
    color: #363f5f;
    margin-bottom: 1rem;
}
h3{
    display: flex;
    justify-content: space-between;
}
.card{
    background-color: #fff;
    margin-bottom: 1rem;
    padding: 1rem 1rem 2rem;
    border-radius: 5px;
    color: #363f5f;
    transition: background-color ease 1s;
    transition: color ease 1s;
}
#total{
    background-color: #49AA26;
    color: #fff;
}
#total.negative-value{
    background-color: #e92929;
}
.card p{
    font-size: 2rem;
}
/********************table*********************/
#table-container{
    overflow-x: auto;
}
table{
    width: 100%;
    border-spacing: 0 1rem;
    color: #969cb3;
    white-space: nowrap;
}
thead{
    text-align: left;
}
tr th:first-child, tr td:first-child{
    border-radius: 10px 0 0 10px;
}
tr th:last-child, tr td:last-child{
    border-radius: 0 10px 10px 0;
    padding-right: 1rem;
}
tbody tr{
    opacity: 0.8;
}
tbody tr:hover{
    opacity: 1;
}
th{
    background-color: #fff;
    padding: 1rem 1rem;
    transition: background-color ease 0.9s;
    transition: color ease 1s;
}
td{
    background-color: #fff;
    padding: 1rem 1rem;
    transition: background-color ease 1s;
    transition: color ease 1.2s;
}
.expense{
    color: #e92929 !important;
}
.income{
    color: #12a454 !important;
}
.description{
    color: #363f5f;
}
/*****************modals********************/
.modal-overlay{
    position: fixed;
    top: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
}
.modal-overlay.active{
    opacity: 1;
    visibility: visible;
}
.modal{
    position: relative;
    background-color: #F0F2f5;
    padding: 2rem 2rem 0.5rem 2rem;
    border-radius: 5px;
}
input{
    display: block;
    margin: 0.5rem 0;
    padding: 0.5rem;
    border-radius: 5px;
    width: 100%;
    border: none;
}
small{
    opacity: 0.4;
    font-size: 70%;
    margin: 0 0.5rem;
}
.input-group.actions{
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 1rem;
}
.button.submit{
    display: inline-block;
    width: 40%;
    height: 50px;
    color: #fff;
    background-color: #49AA26;
    font-size: 1rem;
}
.button.submit:hover{
    background-color: #3bd403;
}
.button.cancel{
    color: #e92929;
    border: solid 2.5px #e92929;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    opacity: 0.7;
}
.button.cancel:hover{
    opacity: 1;
}
/**************dark mode**************/
#dark-mode-button{
    height: 3rem;
    width: 3rem;
    position: fixed;
    right: 5vw;
    bottom: 5vh;
    background-color: #0a2842e8;
    border-radius: 50%;
    padding: 10px;
    cursor: pointer;
}
#dark-mode-button img{
    width: 100%;
    height: 100%;
}
.background-dark-mode{
    background-color: #121212;
    transition: background-color ease 1s;
}
.header-dark-mode{
    background-color: #1e2b19;
    transition: background-color ease 1s;
}
.dark-mode{
    background-color: #171616;
    color: #a2a2a2;
    transition: background-color ease 1s;
    transition: color ease 1s;
}
.gray-dark-mode{
    background-color: #1f1f1f;
    color: #ffffffb8;
    transition: background-color ease 1s;
    transition: color ease 1s;
}
.color-dark-mode{
    color: #ffffffb8;
    transition: color ease 1s;
}
/**************footer******************/
footer{
    text-align: center;
    padding: 4rem 0 2rem;
    color: #363f5f;
    font-size: smaller;
    opacity: 0.6;
}
/************queries*******************/
@media screen and (min-width: 800px){
    main, footer {
        width: 80vw;
    }
    #balance{
        display: grid;
        grid-template-columns: repeat(3,1fr);
        gap: 1.5rem;
    }
    .order{
        width: auto;
    }
}