:root{
    --beige: #F8E9CA;
    --brown: #008463;
    --vert: #4e9202;
    --vert-opacity: rgba(78, 146, 2, 0.2);
    --red: #b22e54;
    --red-opacity: rgba(255, 1, 73, 0.2);
}

*{
    box-sizing: border-box;
}

body{
    background: var(--beige);
    margin: 0;
    padding: 10px;
    font-family: "Open Sans", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.app{
    margin: 20px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card h2{
    margin-top: 0;
}

.logo{
    font-size: 100px;
}

.success{
    border: 1px solid var(--vert);
    background-color: var(--vert-opacity);
    color: var(--vert);
    padding: 10px;
    margin: 20px 10px;
}
.error{
    border: 1px solid var(--red);
    background-color: var(--red-opacity);
    color: var(--red);
    padding: 10px;
    margin: 20px 10px;
}

a{
    color: var(--brown);
    text-decoration: none;
}


.card-group{
    display: flex;
    gap: 20px;
    flex-direction: row;
    justify-content: center;
    align-items: stretch;
}

.card-group.categories{
    overflow: hidden;
    overflow-x: scroll;
    justify-content: left;
    padding-bottom: 20px;
}

.card-group .card{
    flex:1
}

.categories .card{
    min-width: 150px;
    max-width: 150px;
    flex: none;
}

.card{
    background: white;
    /*margin: 5px;*/
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0px 10px 15px -3px rgba(0,0,0,0.2);
}


#add-inputs.hidden{
    display: none;
}

.label-file{
    border: 1px dashed var(--brown);
    border-radius: 10px;
    text-align: center;
}

input[type="file"]{
    padding: 20px 10px;
}

input[type="datetime-local"],
input[type="number"],
input[type="password"],
input[type="text"]{
    border: 1px solid var(--brown);
    border-radius: 10px;
    padding: 10px;
    width: 100%;
    margin-bottom: 10px;
    background: white;
    text-align: center;
}

select{
    border: 1px solid var(--brown);
    border-radius: 10px;
    padding: 10px;
    width: 100%;
    margin-bottom: 10px;
    background: white;
}


button{
    background: var(--brown);
    color: white;
    padding: 10px 20px;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    user-select: none;
}

button.hidden{
    display: none;
}

button.cancel{
    margin-top: 10px;
    background: var(--red);
}

.entries{
    display: flex;
    flex-direction: row;
    align-items: center;
}

.entries.futur{
    opacity: 0.5;
}

.col{
    display: flex;
    flex: 1;
    flex-direction: column;
    text-align: left;
    overflow: hidden;
    gap: 5px;
}



.categories .emoji{
    font-size: 40px;
}

.entries .emoji{
    text-align: right;
}

.amount{
    font-size: 1.5em;
    font-weight: bold;
}

.categories .amount{
    font-size: .8em;
}

.amount_futur{
    font-size: 1em;
}

.categories .amount_futur{
    font-size: .8em;
}

.reason{
    text-wrap: nowrap;
}

.where{
    font-size: .8em;
}

.bank-name{
    margin: 10px;
}

.categories .bank-name{
    font-size: .8em;
}

.period-name{
    font-weight: bold;
    font-size: 2em;
}

.overlay{
    position: fixed;
    top: 0; left: 0;
    bottom: 0; right: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    /*background-color: rgba(0,0,0,0.4);*/
    padding: 20px;
    transition: opacity 0.3s ease;
}

.overlay.hidden{
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transition: all 0.3s ease;
}

.overlay .card{
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1) translateY(0%);
    box-shadow: 0 0 150px 150px #0000004d;
    user-select: none;
}

.overlay.hidden .card{
    transition: all 0.3s ease;
    transform: scale(.1) translateY(-100%);
    opacity: 0
}

.space{
    height: 10em;
}

.set,
.set > div{
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.set div{
    flex: 2;
}
.set div:nth-child(3){
    flex: 1;
    justify-content: center;
}

button.done{
    background: rgba(0,0,0,0);
    border: 0px;
    font-size: 2em;
}

h1{
    display: flex;
    flex-direction: row;
    justify-content: space-around;

}

.calendar{
    font-size: .8em;
}


.calendar a{
    display: block;
}

.calendar>.header{
    display: flex;
    flex-direction: row;
    align-items: center;
}

.calendar>.header>div{
    font-size: .8em;
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 3em;
    line-height: 3em;
    font-weight: bold;
}

.calendar>.week{
    display: flex;
    flex-direction: row;
}

.calendar>.week>.day{
    font-size: 1em;
    display: flex;
    flex-direction: column;
    flex: 1;
    aspect-ratio: 1/1.5;
    border: 1px solid rgba(0,0,0,.3);
    overflow: hidden;
    justify-content: space-between;
}

.calendar>.week>.day.today{
    background: var(--vert-opacity);
}


.calendar .emoji{
    font-size: .5em;
    line-height: .5em;
}

table{
    width: 100%;
    margin-top: 50px;
    border-collapse: collapse;
}

.day .diff{
    font-size: .75em;
}
.day .objectif{
    color: rgba(0,0,0,.8);
    font-size: .75em;
}

.day .avg{
    font-size: .65em;
    color: var(--vert);
}

.composition{
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 300px;
}


.body-comp-wrap{
    position: relative;
    max-height: 300px;
    max-width: 200px;
    aspect-ratio: 2 / 3;
    flex: 1;
}
.body-comp-wrap img{
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0; left: 0;
}

.body-comp{
    display: flex;
    flex-direction: column;
    height: 100%;
    width: 100%;
    background:rgba(0,0,0,.1);
    justify-content: flex-end;
    border: 1px solid black;
    position: absolute;
    top: 0; left: 0;
}

.body-comp>div{
    display: flex;
    align-items: center;
    justify-content: center;
}

.body-comp span{
    font-size: .5em;
    margin: 10px;
}
.body-comp .fat{
    background: #ff8e72;
    align-items: flex-end;
}

.body-comp .muscle{
    background: #27ab9f;
    align-items: flex-start;
}

