:root{
    --dark-blue: #363f5f;
    --greem-1: #49aa26;
    --greem-2: #3dd705;
    --red: #e92929;
}

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

html{
    font-size: 93.75%;
}

body{
    height: 100%;
    background: #f0f2f5;
}

.sr-only{
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin:  -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.container{
    width: min(90vw, 800px);
    margin: auto;
}

/* titles ================================= */

h2{
    margin-top: 3.2rem;
    margin-bottom: 0.8rem;
    color: var(--dark-blue);
    font-weight: 400;
}

/* Links & Buttons ================================= */
a{
    color: var(--greem-1);
    text-decoration: none;
}

a:hover{
    color: var(--greem-2);
}

.button.new{
    display: inline-block;
    margin-bottom: .8rem;
}

button{
    width: 100%;
    height: 50px;
    border: none;
    color: white;
    background-color: var(--greem-1);
    border-radius: 0.25rem;
    cursor: pointer;
}

button:hover{
    background-color: var(--greem-2);
}

.button.cancel{
    width: 100%;
    height: 50px;
    border: 2px solid var(--red);
    color: var(--red);
    border-radius: 0.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.6;
}

.button.cancel:hover{
    opacity: 1;
}


/* Header ================================= */

header{
    background: #472562;
    padding: 2rem 0 10rem;
    text-align: center;
}

header h1{
    color: #fff;
    font-weight: 100;
}

header h1 span{
    color: var(--greem-1);
    font-weight: 400;
    /* font-size: 1.2em; */
}

header p{
    color: var(--greem-2);
    font-size: .88rem;
    /* font-weight: lighter; */
    letter-spacing: .2rem;
}

/* Balance ================================= */

#balance{
    margin-top: -8rem;
}

#balance h2{
    color: #fff;
    margin-top: 0;
}

/* Cards ================================= */

.card{
    background-color: #fff;
    padding: 1.5rem 2rem;
    border-radius: 0.25rem;
    margin-bottom: 2rem;
    color: var(--dark-blue);
}

.card h3{
    font-weight: 400;
    font-size: 1rem;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card p{
    font-size: 2rem;
    line-height: 3rem;
    margin-top: 1rem;
}

.card.total{
    background-color: #8043b3;
    color: #fff;
}

/* Table ================================= */
#transaction{
    display: block;
    width: 100%;
    overflow-x: auto;
}

#data-table{
    width: 100%;
    border-spacing: 0 0.5rem;
    color: #969cb3;
}

table thead tr th:first-child,
table tbody tr td:first-child{
    border-radius: 0.25rem 0 0 0.25rem;
}

table thead tr th:last-child,
table tbody tr td:last-child{
    border-radius: 0 0.25rem 0.25rem 0;
}

table th{
    background-color: #fff;
    font-weight: 400;
    padding: 1rem 2rem;
    text-align: left;
}

table td{
    background-color: #fff;
    padding: 1rem 2rem;
    text-align: left;
}

table tbody tr{
    opacity: 0.7;
}

table tbody tr:hover{
    opacity: 1;
}

td.description{
    color: var(--dark-blue);
}

td.expense{
    color: #e92929;
}

td.income{
    color: #12a454;
}

/* Footer ================================= */

.modal-overlay{
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    position: fixed;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    z-index: 999;
}

.modal-overlay.active{
    opacity: 1;
    visibility: visible;
}

.modal{
    background-color: #f0f2f5;
    padding: 2.4rem;
    position: relative;
    z-index: 1;
}

/* Form ================================= */
#form{
    max-width: 500px;
}

#form h2{
    margin-top: 0;
}

input{
    border: none;
    border-radius: 0.2rem;
    padding: 0.8rem;
    width: 100%;
}

.input-grup{
    margin-top: 0.8rem;
}

.input-grup small{
    opacity: 0.6;
}

.input-grup.actions{
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.input-grup.actions .button,
.input-grup.actions button{
    width: 48%;
}

/* Footer ================================= */

footer{
    text-align: center;
    padding: 4rem 0 0 2rem;
    color: var(--dark-blue);
    opacity: 0.6;
}

p{
    font-size: 0.8rem;
}

footer a{
    text-decoration: none;
    color: var(--dark-blue);
}

/* Responsive ================================= */

@media (min-width: 800px){
    html{
        font-size: 87.5%;
    }

    #balance{
        display: grid;
        grid-template-columns: 1fr 1fr 1fr;
        gap: 2rem;
        padding-top: 15px;
    }

}