.dataTables_paginate {
    margin-bottom: 20px !important;
}

.dataTables_length {
    margin-top: 10px !important;
}

.app-header {
    z-index: 999999 !important;
}

.left-sidebar {
    z-index: 9999999 !important;
}

.daterangepicker {
    z-index: 9999999 !important;
}

.modal-dialog {
    margin-top: 150px !important;
}

.paginate_button {
    cursor: pointer;
}

.paginate_button:hover {
    background-color: #B3F1F7;
}

/*1055 modal sopra*/
/*1050 modal sopra*/

.select2-container,
.select2-results {
    z-index: 1049;
}

/* ALLINEO SELECT2 AI CAMPI DEL TEMA, INCLUSE RICERCA, SCELTE MULTIPLE E RISULTATI. */
:is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single,
:is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple {
    color: #5A6A85;
    background-color: transparent;
    border: var(--bs-border-width, 1px) solid #DFE5EF;
    border-radius: 7px;
    box-shadow: unset;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single {
    display: flex;
    align-items: center;
    height: auto;
    min-height: calc(1.5em + 16px + 2px);
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single .select2-selection__rendered {
    flex: 1;
    height: auto;
    min-height: 0;
    padding: 0 38px 0 16px;
    color: #5A6A85;
    font-size: 0.875rem;
    line-height: 1.5;
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single .select2-selection__placeholder {
    color: var(--bs-secondary-color, #6C757D);
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single .select2-selection__arrow {
    top: 50%;
    right: 16px;
    width: 16px;
    height: 16px;
    transform: translateY(-50%);
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single .select2-selection__arrow b {
    border-top-color: #5A6A85;
}

:is(.select2-container--default, .select2-container--bootstrap-5).select2-container--open .select2-selection--single .select2-selection__arrow b {
    border-bottom-color: #5A6A85;
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple {
    display: flex;
    align-items: center;
    min-height: calc(1.5em + 16px + 2px);
    padding: 3px 8px;
}

/* :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple .select2-selection__rendered {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    align-content: center;
    flex: 1;
    min-height: 25px;
    margin: 0;
    padding: 0;
} */

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple .select2-selection__choice {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    max-width: 100%;
    margin: 2px;
    padding: 1px 8px 1px 5px;
    color: #277B82;
    background-color: #E7F7F8;
    border: 1px solid #80E0E4;
    border-radius: 4px;
    font-size: 0.765625rem;
    line-height: 1.5;
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple .select2-selection__choice__remove {
    position: static;
    order: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0 4px 0 0;
    padding: 0;
    color: #277B82;
    background-color: transparent;
    border: 0;
    border-right: 1px solid #80E0E4;
    border-radius: 0;
    font-size: 14px;
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple .select2-selection__choice__display {
    order: 1;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple .select2-selection__choice__remove:hover,
:is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple .select2-selection__choice__remove:focus {
    color: #155B61;
    background-color: #D4F1F3;
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-search--inline .select2-search__field {
    margin: 2px;
    color: #5A6A85;
    font-size: 0.875rem;
    line-height: 1.5;
}

:is(.select2-container--default, .select2-container--bootstrap-5).select2-container--focus .select2-selection--multiple,
:is(.select2-container--default, .select2-container--bootstrap-5).select2-container--open .select2-selection--single,
:is(.select2-container--default, .select2-container--bootstrap-5).select2-container--open .select2-selection--multiple {
    border-color: #80E0E4;
    outline: 0;
}

:is(.select2-container--default, .select2-container--bootstrap-5).select2-container--disabled .select2-selection--single,
:is(.select2-container--default, .select2-container--bootstrap-5).select2-container--disabled .select2-selection--multiple {
    color: #6C757D;
    background-color: var(--bs-form-control-disabled-bg, #E9ECEF);
    cursor: not-allowed;
}

select.is-invalid+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single,
select.is-invalid+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple {
    border-color: var(--bs-form-invalid-border-color, #DC3545);
}

select.is-valid+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single,
select.is-valid+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple {
    border-color: var(--bs-form-valid-border-color, #198754);
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-dropdown {
    overflow: hidden;
    color: #5A6A85;
    background-color: var(--bs-body-bg, #FFFFFF);
    border: var(--bs-border-width, 1px) solid #DFE5EF;
    border-radius: 7px;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

/* Limito l'altezza dei risultati dei filtri dashboard e abilito lo scorrimento verticale. */
.dashboard-select-filtro .select2-results__options {
    max-height: 260px;
    overflow-x: hidden;
    overflow-y: auto;
}

:is(.select2-container--default, .select2-container--bootstrap-5).select2-container--open .select2-dropdown {
    border-color: #80E0E4;
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-search--dropdown {
    padding: 8px;
    background-color: var(--bs-body-bg, #FFFFFF);
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-search--dropdown .select2-search__field {
    width: 100%;
    padding: 8px 16px;
    color: #5A6A85;
    font-size: 0.875rem;
    line-height: 1.5;
    background-color: transparent;
    border: var(--bs-border-width, 1px) solid #DFE5EF;
    border-radius: 7px;
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-search--dropdown .select2-search__field:focus {
    border-color: #80E0E4;
    outline: 0;
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-results__option {
    padding: 8px 16px;
    color: #5A6A85;
    font-size: 0.875rem;
    line-height: 1.5;
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-results__option--selected {
    color: #277B82;
    background-color: #E7F7F8;
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-results__option--highlighted.select2-results__option--selectable {
    color: #FFFFFF;
    background-color: #001358;
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-results__option--disabled,
:is(.select2-container--default, .select2-container--bootstrap-5) .select2-results__message {
    color: var(--bs-secondary-color, #6C757D);
}

:is(.select2-container--default, .select2-container--bootstrap-5) .select2-results__group {
    padding: 8px 16px;
    color: #277B82;
    background-color: #E7F7F8;
    font-size: 0.765625rem;
    font-weight: 600;
}

/* MANTENGO LE DIMENSIONI RIDOTTE DELLE SELECT CHE USANO FORM-SELECT-SM. */
select:is(.form-select-sm, .form-control-sm)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single {
    height: auto;
    min-height: calc(1.5em + 0.5rem + 2px);
    border-radius: 5px;
}

select:is(.form-select-sm, .form-control-sm)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single .select2-selection__rendered {
    padding-right: 30px;
    padding-left: 8px;
    font-size: 0.765625rem;
}

select:is(.form-select-sm, .form-control-sm)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single .select2-selection__arrow {
    right: 8px;
}

select:is(.form-select-sm, .form-control-sm)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple {
    min-height: calc(1.5em + 0.5rem + 2px);
    padding: 1px 4px;
    border-radius: 5px;
}

select:is(.form-select-sm, .form-control-sm)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple .select2-selection__rendered {
    min-height: 22px;
}

select:is(.form-select-sm, .form-control-sm)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple .select2-selection__choice {
    min-height: 20px;
    margin: 1px;
    padding: 0 6px 0 4px;
    font-size: 0.6875rem;
}

select:is(.form-select-sm, .form-control-sm)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple .select2-selection__choice__remove {
    width: 14px;
    height: 14px;
    min-height: 14px;
    margin: 0 3px 0 0;
    font-size: 12px;
}

/* GESTISCO LE TAGLIE XS E LG CON LE STESSE PROPORZIONI DEI RISPETTIVI INPUT. */
select:is(.form-select-xs, .form-control-xs)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single {
    min-height: 24px;
    border-radius: 4px;
}

select:is(.form-select-xs, .form-control-xs)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single .select2-selection__rendered {
    padding-right: 26px;
    padding-left: 6px;
    font-size: 0.65625rem;
}

select:is(.form-select-xs, .form-control-xs)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single .select2-selection__arrow {
    right: 6px;
    width: 12px;
    height: 12px;
}

select:is(.form-select-xs, .form-control-xs)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple {
    min-height: 24px;
    padding: 0 3px;
    border-radius: 4px;
}

select:is(.form-select-xs, .form-control-xs)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple .select2-selection__rendered {
    min-height: 20px;
}

select:is(.form-select-xs, .form-control-xs)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple .select2-selection__choice {
    min-height: 18px;
    margin: 1px;
    padding: 0 5px 0 3px;
    font-size: 0.625rem;
}

select:is(.form-select-xs, .form-control-xs)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple .select2-selection__choice__remove {
    width: 12px;
    height: 12px;
    min-height: 12px;
    margin: 0 2px 0 0;
    font-size: 11px;
}

select:is(.form-select-lg, .form-control-lg)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single {
    min-height: calc(1.5em + 1rem + 2px);
    border-radius: 15px;
}

select:is(.form-select-lg, .form-control-lg)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single .select2-selection__rendered {
    padding-right: 42px;
    padding-left: 16px;
    font-size: 1.09375rem;
}

select:is(.form-select-lg, .form-control-lg)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--single .select2-selection__arrow {
    right: 16px;
}

select:is(.form-select-lg, .form-control-lg)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple {
    min-height: calc(1.5em + 1rem + 2px);
    padding: 4px 8px;
    border-radius: 15px;
}

select:is(.form-select-lg, .form-control-lg)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple .select2-selection__rendered {
    min-height: 32px;
}

select:is(.form-select-lg, .form-control-lg)+ :is(.select2-container--default, .select2-container--bootstrap-5) .select2-selection--multiple .select2-selection__choice {
    min-height: 28px;
    padding-right: 10px;
    padding-left: 6px;
    font-size: 0.875rem;
}

/* ASTERISCO AUTOMATICO SULLE LABEL REQUIRED */
div.required>label:first-of-type:after {
    content: " *";
    color: red;
}

.btn-success {
    --bs-btn-color: #fff;
    --bs-btn-bg: #1d9e0c;
    --bs-btn-border-color: #1d9e0c;
    --bs-btn-hover-color: #fff;
    --bs-btn-hover-bg: #28b915;
    --bs-btn-hover-border-color: #28b915;
    --bs-btn-focus-shadow-rgb: 54, 227, 196;
    --bs-btn-active-color: #fff;
    --bs-btn-active-bg: #1d9e0c;
    --bs-btn-active-border-color: #1d9e0c;
    --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
    --bs-btn-disabled-color: #fff;
    --bs-btn-disabled-bg: #1d9e0c;
    --bs-btn-disabled-border-color: #1d9e0c;
}

/* BORDO ROSSO AUTOMATICO SU INPUT E SELECT REQUIRED 
div.required input {
    border-color: red;
}

div.required select {
    border-color: red;
}

div.required .select2-selection {
    border-color: red;
}
*/

.t-contratto {
    border: 1px solid #001358
}

/* SCHERMATA CARICAMENTO */
.schermata-caricamento {
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999999;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0c0c0c75;
    flex-direction: column;
    opacity: 0;
    color: white;
    font-size: 25px;
}

/* SCHERMATA CARICAMENTO */
.schermata-caricamento-2 {
    display: flex;
    align-items: center;
    justify-content: end;
    z-index: 999999999;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0c0c0c75;
    flex-direction: column;
    opacity: 0;
    color: white;
    font-size: 25px;
}

/* TOAST */
.toast-container {
    width: 100%;
    max-width: 400px;
    position: fixed;
    bottom: 0;
    right: 0;
    z-index: 1055;
    padding: 1rem;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
}

.toast {
    width: 100%;
    max-width: 400px;
    pointer-events: auto
}

.toast[data-type] {
    position: relative;
    border: 0;
    color: #f8f9fa;
    background: linear-gradient(to bottom right, #4A4A4A, #2B2B2B);
    box-shadow: 0 2px 4px rgba(0, 0, 0, .5);
}

.toast[data-type] .toast-content {
    display: flex;
    align-items: center;
    padding-left: 1rem;
}

.toast[data-type] .toast-icon {
    margin-top: 2px;
    margin-bottom: 7px;
}

.toast[data-type] .toast-body {
    width: 100%;
    padding-left: 1rem;
}

.toast[data-type="info"] {
    background: linear-gradient(to bottom right, #1d4d91, #539BFF)
}

.toast[data-type="warning"] {
    background: linear-gradient(to bottom right, #e29208, #e29208)
}

.toast[data-type="danger"] {
    background: linear-gradient(to bottom right, #d11212, #d11212)
}

.toast[data-type="success"] {
    background: linear-gradient(to bottom right, #28a745, #84b42d)
}

.toast[data-type="primary"] {
    background: linear-gradient(to bottom right, #001358, #001358)
}

/* PER COPIA STRINGA IN CLIPBOARD*/
.mouse-follower {
    position: fixed;
    padding: 3px 6px;
    border-radius: 5px;
    background: black;
    color: white;
    pointer-events: none;
    display: none;
    z-index: 99999999;
}

/* CARICAMENTO "PROCESSING" DI DATATABLES */
div.dataTables_processing {
    z-index: 9999;
    background-color: rgb(0, 0, 0);
    border-radius: 10px;
    position: fixed !important;
    color: white;
    padding: 20px;
}

/* SELECT2 LARGE */
.select-lg .select2-selection {
    height: auto !important;
    min-height: 50px !important;
}

.select-lg .select2-selection__rendered {
    height: auto !important;
    min-height: 0;
    line-height: 1.5 !important;
    font-size: 18px !important;
    border-color: #DFE5EF !important;
}


.select-lg .select2-selection__arrow {
    height: 50px !important;
    line-height: 50px !important;
    width: 25px !important;
}

.select-lg .select2-selection__arrow b {
    border-width: 7px 5px 0 5px !important;
}

/* FORM LG CUSTOM*/

.form-control-lg.form-control-lg-andrea {
    border-radius: 3px !important;
}

/* STAMPA SIMULAZIONE */
.bgSimulaIntestazione {
    background: #003366;
}

.bgSimulaDettaglio {
    background: #ebebeb;
}

body {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
}

#elemento-modal .modal-header {
    border-top-right-radius: 10px;
    border-top-left-radius: 10px;
}

.badge-sm {
    padding: 0.4em 0.6em;
    font-size: 11px;
}

.badge-xs {
    padding: 0.4em 0.6em;
    font-size: 10px;
}

/* Badge "Nuovo" */
@keyframes pulse-ring {
    0% {
        transform: scale(1);
        opacity: .7;
    }

    100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

@keyframes pulse-dot {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.08);
    }
}

.badge-nuovo {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #FCEBEB;
    color: #791F1F;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px 3px 8px;
    border-radius: 20px;
    border: 1px solid #F09595;
    animation: pulse-dot 1.8s ease-in-out infinite;
    letter-spacing: .04em;
    text-transform: uppercase;
    vertical-align: middle;
}

.badge-nuovo .dot {
    position: relative;
    width: 7px;
    height: 7px;
    flex-shrink: 0;
}

.badge-nuovo .dot::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #E24B4A;
    animation: pulse-ring 1.4s ease-out infinite;
}

.badge-nuovo .dot::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #E24B4A;
}

/* DASHBOARD MANAGER */
.grafico-produzione-dashboard,
.grafico-torta-dashboard {
    cursor: crosshair;
}

.grafico-torta-dashboard {
    width: 100%;
    max-width: 260px;
}

.dashboard-tooltip-grafico {
    position: absolute;
    z-index: 2;
    max-width: 200px;
    padding: 7px 9px;
    border: 1px solid #DFE5EF;
    border-radius: 6px;
    background-color: #ffffff;
    color: #343a40;
    font-size: 12px;
    line-height: 1.45;
    text-align: left;
    white-space: pre-line;
    pointer-events: none;
    opacity: 0;
    transform: translateY(3px);
    transition: opacity .15s ease-in-out, transform .15s ease-in-out;
}

.dashboard-tooltip-grafico.is-visibile {
    opacity: 1;
    transform: translateY(0);
}

.dashboard-elenco-stati {
    max-height: 350px;
    padding-right: 4px;
    overflow-y: auto;
}

.dashboard-scroll-qualita {
    max-height: 420px;
    overflow: auto;
}

.dashboard-scroll-qualita thead th {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: var(--bs-body-bg, #FFFFFF);
    box-shadow: inset 0 -1px 0 #DFE5EF;
}

@media (max-width: 575.98px) {
    .dashboard-tooltip-grafico {
        max-width: 170px;
        font-size: 11px;
    }
}

/* Rendo il riepilogo utente e il relativo menu più leggibili senza modificare gli altri pulsanti dell'header. */
.p-utente {
    margin-left: 4px;
}

.p-utente-trigger {
    --p-utente-colore: #ffffff;
    --p-utente-colore-secondario: rgba(255, 255, 255, .78);
    --p-utente-colore-freccia: rgba(255, 255, 255, .9);
    display: flex;
    align-items: center;
    height: 70px;
    padding: 8px 10px !important;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--p-utente-colore);
    line-height: normal !important;
    cursor: pointer;
    transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}

/* Evito che lo stile generico dei link di navigazione alteri il pulsante quando riceve il focus. */
.p-utente-trigger:focus {
    color: var(--p-utente-colore);
    outline: 0;
}

.p-utente-trigger:hover,
.p-utente-trigger:active,
.p-utente.show .p-utente-trigger,
.p-utente-trigger[aria-expanded="true"],
.p-utente-trigger:focus-visible {
    background: rgba(255, 255, 255, .14);
    color: var(--p-utente-colore);
    --p-utente-colore: #ffffff;
    --p-utente-colore-secondario: #ffffff;
    --p-utente-colore-freccia: #ffffff;
}

.p-utente-trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .36);
}

.p-utente-trigger:disabled {
    opacity: .55;
    cursor: not-allowed;
    pointer-events: none;
}

/* Escludo il profilo utente dall'effetto hover generico dei quick-links dell'header. */
.app-header .navbar .navbar-nav.quick-links .nav-item.p-utente .p-utente-trigger::before {
    content: none;
    display: none;
}

.app-header .navbar .navbar-nav.quick-links .nav-item.p-utente:hover .p-utente-trigger {
    color: var(--p-utente-colore) !important;
}

.p-utente-riepilogo {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
}

.p-utente-avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    border: 0;
    border-radius: 50%;
    object-fit: cover;
}

.p-utente-riepilogo-testo,
.p-utente-identita,
.p-utente-dettaglio>div {
    display: flex;
    min-width: 0;
    flex-direction: column;
}

.p-utente-riepilogo-testo {
    align-items: flex-end;
    text-align: right;
}

.p-utente-nome {
    overflow: hidden;
    max-width: 150px;
    color: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.p-utente-ruolo {
    overflow: hidden;
    max-width: 150px;
    color: var(--p-utente-colore-secondario);
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.p-utente-freccia {
    color: var(--p-utente-colore-freccia);
    font-size: 16px;
    transition: transform .18s ease;
}

.p-utente.show .p-utente-freccia {
    transform: rotate(180deg);
}

/* Adeguo il contrasto del trigger al fondo bianco applicato dal tema dopo lo scroll. */
.app-header.fixed-header .p-utente-trigger {
    --p-utente-colore: #253247;
    --p-utente-colore-secondario: #66758a;
    --p-utente-colore-freccia: #7a8798;
}

.app-header.fixed-header .p-utente-trigger:hover,
.app-header.fixed-header .p-utente-trigger:active,
.app-header.fixed-header .p-utente.show .p-utente-trigger,
.app-header.fixed-header .p-utente-trigger[aria-expanded="true"],
.app-header.fixed-header .p-utente-trigger:focus-visible {
    background: #eefafb;
    --p-utente-colore: #001358;
    --p-utente-colore-secondario: #001358;
    --p-utente-colore-freccia: #001358;
}

.app-header.fixed-header .p-utente-trigger:focus-visible {
    box-shadow: 0 0 0 3px rgba(0, 19, 88, .24);
}

/* Organizzo il dropdown in intestazione, dettagli e azione finale per evitare testi sfasati. */
.dropdown-utente {
    width: min(360px, calc(100vw - 24px));
    max-width: calc(100vw - 24px);
    padding: 0;
    overflow: hidden;
    border: 1px solid #d9e7eb;
    border-radius: 14px;
    box-shadow: 0 16px 36px rgba(29, 61, 77, .16);
}

.dropdown-utente .profile-dropdown {
    max-height: min(520px, calc(100vh - 100px));
}

.p-utente-intestazione {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
    border-bottom: 1px solid #d9e7eb;
    background: linear-gradient(135deg, #effcfd 0%, #ffffff 72%);
}

.p-utente-avatar-grande {
    width: 64px;
    height: 64px;
}

.p-utente-etichetta {
    color: #718096;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .045em;
    line-height: 1.25;
    text-transform: uppercase;
}

.p-utente-titolo {
    overflow: hidden;
    margin: 3px 0;
    color: #253247;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.p-utente-gruppo {
    color: #001358;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.p-utente-dettagli {
    display: grid;
    gap: 14px;
    padding: 18px 22px;
}

.p-utente-dettaglio {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 10px;
    align-items: start;
}

.p-utente-dettaglio>i {
    display: flex;
    width: 30px;
    height: 30px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eefafb;
    color: #001358;
    font-size: 16px;
}

.p-utente-valore {
    margin-top: 2px;
    color: #344054;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.4;
}

.p-utente-email {
    overflow-wrap: anywhere;
}

.p-utente-azioni {
    padding: 14px 22px 20px;
    border-top: 1px solid #edf1f4;
}

.p-utente-esci {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 40px;
    border: 1px solid #a9dfe3;
    border-radius: 8px;
    background: #ffffff;
    color: #001358;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease;
}

.p-utente-esci:hover,
.p-utente-esci:focus-visible {
    border-color: #001358;
    background: #001358;
    color: #ffffff;
    outline: 0;
}

/* Mantengo il dropdown fruibile sui display mobili senza farlo uscire dalla viewport. */
@media (max-width: 575.98px) {
    .p-utente {
        margin-left: 0;
    }

    .p-utente-trigger {
        padding-right: 4px !important;
        padding-left: 4px !important;
    }

    .p-utente-riepilogo-testo,
    .p-utente-freccia {
        display: none;
    }

    .p-utente-intestazione,
    .p-utente-dettagli,
    .p-utente-azioni {
        padding-right: 18px;
        padding-left: 18px;
    }
}