body {
    margin: 0;
    padding: 0;
    scroll-behavior: smooth;
    box-sizing: border-box;
    overflow-x: hidden;
    font-family: 'Carlito', sans-serif;
}

/* Titolazione pagina */

/* Immagine logo Webinteam */

/* Titolo */
h1 {
    flex: 1;
    margin: 0;
    text-align: center;
    font-size: 1.8em;
    font-family: "Nunito", sans-serif;
}

/* Controllo pagina */
section {
    display: flex;
    justify-content: stretch;
    min-height: 100vh;
}

/* Container generico esterno per tutte le sezioni data entry */
.containerSI {
    display: flex;
    flex-direction: row-reverse;
    flex-wrap: wrap;
    min-width: 150%;
    justify-content: left;
}

.nome-input{
    width: 100%;
    border: 1px solid gray;
}

/* Contenitore generico interno per tutte le sezione di data entry */
.containerInput {
    display: flex;
    flex-direction: column;
    width: 35vw;
    height: 100vh;
    align-content: flex-end
}

/* Titolo sezioni di data entry */
h3 {
    margin: 0;
    margin-bottom: 1%;
    font-family: 'Poppins';
    color: white;
    font-weight: 600;
}

/* Contenitore per sezione di data entry*/
.container {
    background-color: rgb(33, 53, 85, 0.7);
    display: grid;
    font-size: 0.9em;
    vertical-align: top;
    width: 30%;
    padding-top: 4%;
    padding-bottom: 2%;
    touch-action: manipulation;
    justify-content: stretch;
    margin-bottom: 3%;
    max-height: 100%;
    font-family: poppins;
    font-weight: 400;
    color: white;
    justify-content: center;
}
.container:nth-child(2){
    margin-left: 5%;
    padding-left: 2%;
    align-content: space-around;
    border-top-left-radius: 10px;
    border-bottom-left-radius: 10px;
    border-top-right-radius: 0px;
    border-bottom-right-radius: 0px;
}
.container:nth-child(1){
    border-top-right-radius: 10px;
    border-bottom-right-radius: 10px;
    align-content: baseline;
}

/* Contenitore grafico */
.containerChart {
    align-items: center;
    display: flex;
    flex-direction: column;
    width: 95vw;
    height: 100vh;
    margin-right: 0%;
    margin-top: 5%;
}

/* Contenitore dei bottoni di save e reset */
.containerButtons {
    display: flex;
    justify-content: center;
    margin-top: 2%;
}

/* Bottone reset */
.btn-reset {
    background-color: #f30101;
    border-radius: 10px;
    border: none;
    color: white;
    margin-left: 3%;
    transition: background-color 0.3s ease;
    font-family: quicksand;
    font-weight: 700;
    font-size: 1.5em;
    align-items: center;
    justify-content: center;
}

.btn-reset:hover {
    background-color: #a70000;
}

/* Botton salvataggio */
.btn-save {
    background-color: #25c374;
    border: none;
    margin-bottom: 10px;
    align-items: center;
    font-family: quicksand;
    font-weight: 700;
    border-radius: 10px;
    color: white;
    margin-left: 2%;
    margin-right: 3%;
    transition: background-color 0.3s ease;
    font-size: 1.5em;
    justify-content: center;
}

.btn-save:hover {
    background-color: #05914b;
}

/* Area grafico - necessario alla libreria c3js */
#chart {
    touch-action: manipulation;
    background-color: rgba(212, 210, 205, 0.403);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    border-radius: 5vh;
    height: 60vh;
    width: 80%;
}

/* Definizione spessore linee del grafico */
#chart .c3-line-ricavi,
#chart .c3-line-spese,
#chart .c3-line-guadagni {
    stroke-width: 0.3vh;
}

/* Container sezione configurazione */
.container-config {
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
    margin-top: 2%;
    margin-left: 5%;
    height: 5vh;
    margin-bottom: 4%;
    width: 150%;
    flex-wrap: nowrap;
    margin-left: 5%;
}

/* Bottone rimuovi */
.btn-delete {
    background-color: #f30101;
    border-radius: 10px;
    color: white;
    width: 25%;
    border: none;
    border-radius: 10px;
    font-family: 'quicksand';
    font-weight: 700;
    padding: 6px 10px;
    margin-left: 10%;
    font-size: 0.9em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-delete:hover {
    background-color: #a70000;
}

.btn-delete:active {
    background-color: #FF0000;
    transform: scale(0.95);
}

/* Input nome configurazione */
.nome-input {
    margin-left: 1%;
    margin-right: 5%;
    width: 10%;
}

/* Selezione configurazione dal database */
.config-input {
    margin-left: 1%;
    width: 20%;
    margin-right: 0%;
}

/* Contenitore di gestione personalizzata mensile */
.button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 5px;
}


/* Sezione numero di gestione personalizzata mensile */
.small {
    width: 20px;
    height: 20px;
    padding: 2px;
    margin: 2px;
    border: 0px;
}

/* Gestione grafica link al download */
a {
    text-decoration: none;
    color: #1a54dc;
}

/* Bottone di caricamento configurazione */
.updw {
    margin-left: 7%;
    border-radius: 20px; 
    padding-bottom: 5px; 
    padding-right: 5px; 
    width: 30%;
    height: 6.5vh;
    background-color: #1a54dc;
    display: flex;
    justify-content: center;
    align-items: center;
    border: none;
    color: #fff;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    font-family: quicksand;
    font-weight: 800;
}
.updw:nth-child(2){
    background-color: #e1e7f3;
}
.updw:hover {
    transform: scale(1.1);
    transition: transform 0.5s;
}
.upl-dwl,
a {
    display: flex;
    min-width: 60%;
}

/* Area download/upload configurazioni */
.selezionatore {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    margin-left: 8%;
    justify-content: center;
    font-family: poppins;
    margin-top: 3%;
    font-weight: 400;
    color: rgb(10, 10, 10);
    margin-bottom: 2%;
    font-size: 0.9em;
}

/* Gestione layout bottoni di upload/download configurazione */
.material-symbols-outlined {
    font-size: 2em;
    padding-left: 5px;
    font-weight: 600;
}

/* Contenitore area costi d'ammortamento */

/* Sezione per la gestione layout per input dei costi d'ammortamento */

/* Input dati per costi d'ammortamento */
#ammortamentoInput {
    display: flex;
    flex-direction: row;
}

#costo_da_ammortizzare,
#inizio_ammortamento,
#fine_ammortamento {
    margin-top: 0.5vh;
    margin-right: 0.5vh;
    height:3vh;
}

/* Gestione grafica switch per attivazione ammortamento */
.toggle-switch {
    display: inline-block;
    width: 4vh;
    height: 4vh;
    background-color: #ffffff;
    border-radius: 3vh;
}
.toggle-switch #ammortamento {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider {
    display: inline-block;
    width: 60%;
    border: none;
    margin-bottom: 4%;
    background-color: rgb(255, 255, 255);
    border-radius: 5px;
    transition: 0.4s;
    position: relative;
    top: 0.5vh;
    left: -0.5vh;
}
#ammortamento:checked+.slider {
    transform: translateX(3.2vh);
}

/* Componenti degli input dati*/
input[type=file]::file-selector-button {
    margin: 10px;
    border: none;
    background: #13a513;
    font-family: quicksand;
    font-weight: 700;
    padding: 10px 20px;
    border-radius: 10px;
    color: #fff;
    cursor: pointer;
    transition: background .2s ease-in-out;
}
input[type=file]::file-selector-button:hover {
    background: #047404;
}
select {
    height: 16px;
    width: 50%;
    border-radius: 0.5vh;
}
output {
    display: inline-block;
    padding: 1% 3%;
    background-color: #084cdf;
    opacity: 80%;
    color: #ffffff;
    border: none;
    text-align: center;
    text-decoration: none;
    font-family: 'Quicksand';
    font-weight: 700;
    font-size: 1.5vh;
    width: 50%;
    border-radius: 4px;
}

/* Errore data entry control */
.error {
    border: 1px solid red !important;
}

.contenitivo {
    display: flex; /* Consente il wrapping degli elementi su più righe */
  }
  
  .first{
    display: flex;
  }
  .second{
    display: flex;
  }

@media only screen and (max-width: 1260px) {
    .contenitivo{
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    .second{
        justify-content: center;
    }
    .selezionatore{
        flex-direction: column;
        justify-content: center;
        align-items: center;
    }
    .container{
        font-size: 0.7em;
    }
    .slider{
        width: 50%;
    }
    .container:nth-child(1){
        padding-left: 15px;
    }
    .container-config{
        flex-direction: column;
        z-index: 0;
        height: 100%;
    }
    .btn-delete{
        width: 80%;
        margin-top: 5%;
        margin-left: 0px;
    }
    .nome-input{
        width: 50%;
    }
    
}

@media only screen and (max-width: 953px) {
    .upl-dwl{
        min-width: 100%;
    }
    section{
        display: flex;
        align-items: center;
        flex-direction: column;
    }
    .container-config{
        display: flex;
        flex-direction: column;
        margin-left: 0%;
        align-items: baseline;
        align-items: center;
    }
    .config-input{
        width: 100%;
    }
    .container{
        width: 50%;
        margin-left: 0px;
        max-height: 100%;
        border-radius: 10px;
    }
    .container:nth-child(2){
        margin-left: 0px;
        border-radius: 10px;
    }
    .containerSI{
        width: 200%;
    }
    .containerInput {
        height: auto;
    }
}

@media only screen and (max-width: 490px) {
    section{
        align-items: flex-start;
        margin-left: 10%;
    }
    .config-input, .nome-input{
        width: 100%;
    }
    .container:nth-child(1), .container:nth-child(2){
        width: 100%;
    }
    .btn-save, .btn-delete {
        width: 100%;
    }
    .containerChart{
        align-items: flex-start;
    }
    .contenitivo{
        flex-direction: row;
    }
    .first{
        flex-direction: column;
    }
    .second{
        flex-direction: column;
    }
    .selezionatore{
        margin-left: 0;
        display: flex;
        align-items: flex-start;
    }
    .updw{
        margin-left: 0px;
        font-size: 0.7em;
    }
    .updw:nth-child(1){
        margin-right: 15px;
    }
}

