

.account-header {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

    .account-header img {
        height: 60px;
    }

    .account-header .logo-text {
        font-size: 30px;
    }

.logo-text {
    color: #4B4B4B !important;
}

    .logo-text span {
        color: #373232 !important;
    }

.badge-tipo-azienda {
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-width: 110px;
}


.width-1px {
    width: 1px;
}

.table-formulario-detail {
}

    .table-formulario-detail th {
        width: 1px;
        white-space: nowrap;
    }


.widget-icon img {
    width: 32px;
    height: 32px;
}

.widget-icon.widget-icon-xl {
    width: 64px;
    height: 64px;
}

    .widget-icon.widget-icon-xl img {
        width: 48px;
        height: 48px;
    }


.tooltip-inner {
    max-width: 400px;
    white-space: normal;
    text-align: left;
}

.bg-hover-secondary {
    position: relative;
    z-index: 0;
}

    .bg-hover-secondary::before {
        content: "";
        position: absolute;
        inset: 0;
        background-color: var(--bs-secondary);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: -1;
    }

    .bg-hover-secondary:hover::before {
        opacity: 0.5;
    }

table tr:has(.fa-triangle-exclamation) {
    background-color: lightyellow !important;
}

.sort-handle {
    cursor: grabbing;
}

/* mentre un elemento è in drag (SortableJS aggiunge .sortable-chosen),
   disabilita la selezione del testo in tutta la lista */
.sortable-list:has(.sortable-chosen),
.sortable-list:has(.sortable-chosen) * {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}


.select2-wrapper {
    width: 100%;
}

.select2-container--default .select2-selection--multiple {
    display: block;
    width: 100%;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: var(--bs-body-color);
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: var(--bs-body-bg);
    background-clip: padding-box;
    border: var(--bs-border-width) solid var(--bs-border-color) !important;
    border-radius: var(--bs-border-radius);
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}


.no-chevron.accordion-button::after {
    content: "";
    display: none;
}

.collapse-toggle {
    cursor: pointer;
}

    .collapse-toggle .chevron {
        transition: transform .2s;
    }

    .collapse-toggle[aria-expanded="true"] .chevron {
        transform: rotate(180deg);
    }

.loading-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.5);
    backdrop-filter: blur(2px);
    z-index: 1100;
}

.form-check-lg {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-left: 0;
}

    .form-check-lg.form-check-reverse {
        flex-direction: row-reverse;
    }

    .form-check-lg .form-check-input {
        width: 1.6rem;
        height: 1.6rem;
        float: none;
        margin: 0;
        border: 1px solid var(--bs-gray-600);
    }

        .form-check-lg .form-check-input:checked {
            background-size: 65% 65%;
        }

/* --- gruppi di sezione ------------------------------------------------- */
.section-group {
    display: flex;
    position: relative;
    margin-block: .5rem;
}

    .section-group > .label {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        text-align: center;
        font-weight: 700;
        letter-spacing: .1em;
        padding: 0.75rem 0.25rem;
        color: #fff;
        user-select: none;
    }

.prima > .label {
    background: #0d6efd;
}

.seconda > .label {
    background: #198754;
}

.terza > .label {
    background: #6f42c1;
}

.quarta > .label {
    background: #d63384;
}

.quinta > .label {
    background: #fd7e14;
}

.section-group > .content {
    flex: 1;
    padding-left: 1rem;
}

#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.25);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: all;
}


.content-verification {
    display: flex;
    gap: 4px;
    font-size: 12px;
    background-color: #F5F5F5;
    padding: 6px 8px;
    border-radius: 5px;
    border: 1px solid #EEE;
}

    .content-verification.valid {
        background-color: rgba(0,200,0,0.05);
        border: 1px solid rgba(0,200,0,0.4);
    }

    .content-verification.tocheck {
        background-color: rgba(200,200,0,0.05);
        border: 1px solid rgba(200,200,0,0.4);
    }

    .content-verification.invalid {
        background-color: rgba(200,0,0,0.05);
        border: 1px solid rgba(200,0,0,0.4);
    }

    .content-verification .note {
        color: #333;
        font-style: italic;
    }

.a4-page {
    width: 210mm;
    padding: 0.5cm;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 0 6px rgba(0,0,0,.06);
    overflow: auto;
}


    .a4-page > iframe {
        width: 100%;
        height: 80vh;
        display: block;
        border: 0;
    }

.tinymce-fill.editor-a4 {
    width: 100%;
    height: 80vh;
}

    /* shell TinyMCE a 100% del wrapper */
    .tinymce-fill.editor-a4 .tox.tox-tinymce {
        width: 100%;
        height: 100%;
        border: none;
        box-shadow: none;
    }

.tinymce-noborder .tox.tox-tinymce {
    border: none;
}

/* contenitore editor (sotto la barra) occupa il resto */
.tinymce-fill.editor-a4 .tox-editor-container {
    /* 48px � un buon default per toolbar+menubar; 
     quando la barra � nascosta diventa 0 grazie alla regola successiva */
    height: calc(100% - 48px);
}

/* quando NON c'� toolbar/menubar (solo quickbars), usa il 100% pieno */
.tinymce-fill.editor-a4 .tox.tox-tinymce--toolbar-bottom .tox-editor-container,
.tinymce-fill.editor-a4 .tox.tox-tinymce--toolbar-overlord .tox-editor-container,
.tinymce-fill.editor-a4 .tox.tox-tinymce:not(.tox-tinymce--toolbar) .tox-editor-container {
    height: 100%;
}

/* iframe di editing = 100% dell�area di editing */
.tinymce-fill.editor-a4 .tox .tox-edit-area,
.tinymce-fill.editor-a4 .tox .tox-edit-area__iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/*.modal {
    --bs-modal-zindex: 99999 !important;
}*/

.template-preview {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

.hover-primary-subtle {
    cursor: pointer;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease;
}

    .hover-primary-subtle:hover,
    .hover-primary-subtle:focus-visible {
        background: rgba(var(--primary), 0.1);
        color: inherit;
    }

    .hover-primary-subtle.active {
        background: rgba(var(--primary), 0.1);
    }

/* Righe cliccabili per le tabelle/QuickGrid con navigazione di riga (vedi .js-row-nav in app.js). */
.js-row-nav tbody tr {
    cursor: pointer;
    transition: background-color .18s ease;
}

    .js-row-nav tbody tr:hover {
        background: rgba(var(--primary), 0.1);
    }

.validation-message {
    color: var(--bs-danger);
}


details.summary-row summary {
    list-style: none;
    cursor: pointer;
    padding: .35rem .5rem;
    border-radius: .25rem;
}

    details.summary-row summary::-webkit-details-marker {
        display: none;
    }

    details.summary-row summary:hover {
        background-color: #f8f9fa;
    }

.summary-chevron {
    transition: transform 0.2s ease;
}

details[open] .summary-chevron {
    transform: rotate(90deg);
}

/* Riepilogo impatti CO₂e: griglia condivisa per incolonnare header, voci, subtotali e netto. */
.impatti-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 13rem 5rem 8.5rem;
    align-items: center;
    column-gap: 1rem;
}

.impatti-voce {
    min-width: 0;
}

.impatti-head {
    border-bottom: 1px solid #dee2e6;
}

.impatti-subtotal {
    background-color: #f8f9fa;
}

.impatti-net {
    background-color: #eef1f4;
    border-left: 3px solid var(--bs-primary, #0d6efd);
}

/* Su schermi stretti restano solo Voce e Contributo al totale; le colonne tecniche passano nell'espansione. */
@media (max-width: 575.98px) {
    .impatti-grid {
        grid-template-columns: minmax(0, 1fr) auto;
    }

        .impatti-grid > :nth-child(2),
        .impatti-grid > :nth-child(3) {
            display: none;
        }
}

tr.detail-row td {
    padding-top: .15rem;
    padding-bottom: .15rem;
}

.wizard-top {
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--bs-body-bg);
    padding-bottom: .75rem;
    border-bottom: 1px solid rgba(0,0,0,.075);
}

.wizard-title {
    font-size: .95rem;
}

.wizard-progress {
    min-width: 220px;
    flex: 1;
    max-width: 420px;
}

.wizard-pills .nav-link {
    padding: .35rem .6rem;
    font-size: .85rem;
}

.wizard-section {
    padding-top: .25rem;
}

.wizard-summary {
    position: sticky;
    top: 7.25rem;
}

.wizard-kv {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
    padding: .35rem 0;
    border-bottom: 1px dashed rgba(0,0,0,.08);
}

    .wizard-kv:last-child {
        border-bottom: none;
    }

.wizard-actions {
    position: sticky;
    bottom: 0;
    z-index: 6;
    margin-top: 1.25rem;
    padding-top: .75rem;
    background: var(--bs-body-bg);
    border-top: 1px solid rgba(0,0,0,.075);
}

/* Editor modello checklist (Admin/Checklist/Template/Edit.razor) */
/* Griglia voce: handle | n. | Descrizione | controlli (toggle + azioni + contatore + expand) */
.chk-voce-grid {
    display: grid;
    grid-template-columns: 1.25rem auto minmax(0, 1fr) auto;
    column-gap: .5rem;
    align-items: center;
}

/* Griglia campo, condivisa tra header e righe: handle | Descrizione | Tipo | Valore | Opzioni */
.chk-field-grid {
    display: grid;
    grid-template-columns: 1.25rem minmax(0, 3fr) minmax(0, 2fr) minmax(0, 3fr) 19rem;
    column-gap: .75rem;
    align-items: center;
}

/* Riga di intestazione delle colonne campo */
.chk-field-head {
    text-transform: uppercase;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
}

/* Cella "Opzioni": flag + azioni, allineati a destra */
.chk-field-opts {
    display: flex;
    gap: .25rem;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: nowrap;
}
