﻿.modal-dialog {
    max-width: 800px;
}

.form-group {
    margin-bottom: 1rem;
}

.subtitle {
    font-size: 12px;
}

.btn.btn-primary.button-add-totable {
    float: right;
}

.button-add-toselect {
    padding: 5px !important;
    margin-top: 7px;
}

    .button-add-toselect > i {
        padding: 0px !important;
    }


/* Elementi di stile per il toggle ternario
*/
.multiple-toggle-3 > div {
    color: white;
    padding-top: 24px;
    display: block;
    position: absolute;
    top: -2px;
    left: 0px;
    bottom: 0px;
    width: calc(33.33% + 2px);
    background-color: #0095e8;
    box-shadow: 0px 1px 2px 1px rgba(0, 0, 0, 0.4);
    z-index: 1;
    pointer-events: none;
    transition: transform 0.3s;
}

.multiple-toggle-4 > div {
    color: white;
    padding-top: 24px;
    display: block;
    position: absolute;
    top: -2px;
    left: 0px;
    bottom: 0px;
    width: calc(25% + 2px);
    background-color: #0095e8;
    border-radius: .475rem;
    box-shadow: 0px 1px 2px 1px rgba(0, 0, 0, 0.4);
    z-index: 1;
    pointer-events: none;
    transition: transform 0.3s;
}

.multiple-toggle::after {
    content: "";
    display: block;
    clear: both;
}

.multiple-toggle-3 label {
    float: left;
    width: calc(33.333% - 1px);
    position: relative;
    text-align: center;
    padding: 12px 0px 28px;
    overflow: hidden;
    border: solid 1px rgba(0,0,0,0.2);
    border-radius: .475rem;
    transition: color 0.3s;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
}

.multiple-toggle-4 label {
    float: left;
    width: calc(25% - 1px);
    position: relative;
    text-align: center;
    padding: 12px 0px 28px;
    overflow: hidden;
    border: solid 1px rgba(0,0,0,0.2);
    border-radius: .475rem;
    transition: color 0.3s;
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(255, 255, 255, 0);
}

.multiple-toggle label:first-child {
    border-left: none;
}

.multiple-toggle label input {
    position: absolute;
    top: -200%;
}

.multiple-toggle label div {
    z-index: 5;
    position: absolute;
    width: 100%;
}

.multiple-toggle label.selected {
    color: white;
}

/*    fine stile per il toggle ternario*/

/*INIZIO CARICAMENTO ALLEGATI CON BLUEIMP FILEUPLOAD*/
.files .fade:not(.show) {
    opacity: 1;
}
/*FINE CARICAMENTO ALLEGATI CON BLUEIMP FILEUPLOAD*/

.dataTables_wrapper {
    padding: 0;
}

.grid-link {
    font-size: 14px !important;
    padding: 0px !important;
    text-decoration: underline;
}

.grid-Registered {
    background: white;
    color: #575962;
}

    .grid-Registered > td > a {
        font-weight: bolder;
        color: #575962;
    }


.grid-OnBoard {
    background: #FDE790;
    color: black;
}

    .grid-OnBoard > td > a {
        color: black;
        font-weight: bolder;
    }



.grid-Sent {
    background: #A9CCDD;
    color: black;
}

    .grid-Sent > td > a {
        color: black;
        font-weight: bolder;
    }



.grid-Completed {
    background: #71D89D;
    color: white;
}

    .grid-Completed > td > a {
        color: white;
        font-weight: bolder;
    }


.grid-Canceled {
    background: #D9D9D9;
    color: black;
}

    .grid-Canceled > td > a {
        color: black;
        font-weight: bolder;
    }

/*-----------------------------------------------------------------------*/

/*.login-page input {
    margin: auto;
    max-width: 30%;
}

.backend-header-right-button {
    display: inline;
}

.register-page img {
    width: 260px;
    margin-top: 10px;
}

*/

/*VALIDAZIONE*/
div.has-error,
textarea.has-error,
input.has-error,
select.has-error {
    border: 2px solid red !important;
    border-radius: 6px;
    background-image: var(--bs-gradient) !important;
}
/*END VALIDAZIONE*/

/*DATATABLE*/
table {
    cursor: pointer;
    background-color: #eeeeee;
    border-radius: 8px;
}

    table.dataTable thead {
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
        box-shadow: inset 0px 0px 100px 10px rgb(0 0 0 / 10%);
    }

.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #f5f5f5;
}

.table-striped > tbody > tr:hover {
    background-color: #cdd5ff;
}

.row-selected > td {
    background-color: #36a3f7 !important;
}

.row-selected {
    font-weight: bold;
    color: wheat;
}

/*Rimuove l'arrow dell'ordinamento*/
th.sorting_asc::after, th.sorting_desc::after {
    content: "" !important;
}
/*END DATATABLE*/

.div-highlight {
    background-color: #efefef;
    border: 1px solid #e2e2e2;
    border-radius: 8px;
    margin-left: 10px;
    margin-right: -10px;
    padding-left: 2px;
    padding-right: 2px;
}

/*IL CODICE SEGUENTE SERVE PER MANDARE A CAPO IL TESTO ALL'INTERNO DELLE DATATABLE (NOTE SU SCADENZE)*/
td {
    white-space: pre-wrap; /* rispetta i \n nel testo */
    word-wrap: break-word; /* va a capo anche dentro parole lunghe */
    max-width: 300px; /* opzionale: limita la larghezza */
}

/* SELECT2 */
.select2-results__option {
    color: #575962 !important;
}

.select2-selection__choice {
    color: #575962 !important;
}

.select2-container--bootstrap5 .select2-selection--single .select2-selection__rendered {
    color: #575962 !important;
}

.select2-container--bootstrap5 .select2-selection--single .select2-selection__placeholder {
    color: #575962 !important;
}

select2-selection select2-selection--single form-select obbl select2-selection--clearable {
    border-color: #c5c5c7 !important;
}
/* SELECT2 */

/* CLIENTE -> CONTO ECONOMICO */

/* main card */
.res-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 20px 24px;
    box-shadow: 0 6px 18px rgba(16,24,40,.06);
    margin-bottom: 32px;
    /* centro contenuti ma senza rompere la griglia */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* header (titolo + anno) */
.res-header {
    width: 100%;
    max-width: 1100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.res-title {
    margin: 0;
    font-size: 34px;
    font-weight: 800;
    letter-spacing: .5px;
    color: #101828;
    text-align: left; /* più coerente con UI */
}

.res-year {
    display: flex;
    align-items: center;
    gap: 10px;
}

    .res-year label {
        font-size: 13px;
        color: #6b7280;
        margin: 0;
    }

    .res-year input {
        width: 110px;
        height: 34px;
        border-radius: 8px;
        border: 1px solid #d1d5db;
        padding: 0 10px;
        font-weight: 600;
        background: #fff;
    }

/* GRID (QUI ERA IL PROBLEMA) */
.res-grid {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 140px 160px 160px 160px 160px; /* riga: label + 3 box + pill */
    column-gap: 18px;
    row-gap: 14px;
    align-items: center;
}

/* header row */
.res-h {
}

.res-coltitle {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #101828;
}

/* row titles */
.res-rowtitle {
    font-size: 15px;
    font-weight: 700;
    color: #101828;
}

/* cell wrappers (se li hai nel markup) */
.res-cell {
}

/* value boxes */
.res-box {
    height: 42px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    font-weight: 700;
    color: #111827;
}

/* result boxes animate a bit */
.res-box-result {
    transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

/* pill a destra */
.res-right {
    display: flex;
    justify-content: flex-start;
}

.res-pill {
    height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #d1d5db;
    font-weight: 700;
    background: #f9fafb;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

/* states */
.is-profit {
    border-color: #22c55e !important;
    background: #ecfdf3 !important;
    color: #166534 !important;
}

.is-loss {
    border-color: #ef4444 !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

.pill-profit {
    border-color: #86efac !important;
    background: #ecfdf3 !important;
    color: #166534 !important;
}

.pill-loss {
    border-color: #fecaca !important;
    background: #fef2f2 !important;
    color: #991b1b !important;
}

/* responsive */
@media (max-width: 1200px) {
    .res-grid {
        grid-template-columns: 120px 1fr 1fr; /* label + 2 colonne */
    }

        /* nascondo Costi e Risultato header extra se li hai */
        .res-grid .res-h:nth-child(4),
        .res-grid .res-h:nth-child(5) {
            display: none;
        }
}

@media (max-width: 768px) {
    .res-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .res-year {
        width: 100%;
        justify-content: flex-start;
    }
}

/* CLIENTE -> CONTO ECONOMICO END */

.form-control[readonly] {
    background-color: lightgray;
}