html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 100px;
}


.footer {
    position: fixed;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px;
    z-index: 0;
}

@media (max-width: 992px) {
    .footer {
        position: relative;
    }
}

hr {
    margin: 1rem 0 !important;
    color: inherit;
    background-color: currentColor;
    border: 0;
    opacity: .25;
}

:root {
    /*darker*/
    --primary-darker: #1b9ad4;
    --secondary-darker: #61c6d8;
    --tertiary-darker: #54ccb4;
    --quaternary-darker: #4c7dd6;
    --success-darker: #198754;
    --danger-darker: #ff4859;
    --warning-darker: #ffd454;
    --info-darker: #0ca4cc;
    --light-darker: #d3d3d3;
    --dark-darker: #212529;
    --white-darker: #bfbfbf;
    --alternate-darker: #666666;
    --muted-darker: #8f8f8f;
    --primary-goal: #6ba7c3; /*#4bb8eb;*/ /* più chiaro di #1b9ad4 */
    --secondary-goal: #8ee1f1; /* più chiaro di #61c6d8 */
    --tertiary-goal: #78e7d1; /* più chiaro di #54ccb4 */
    --quaternary-goal: #7ca3f5; /* più chiaro di #4c7dd6 */

    --success-goal: #28a96b; /* più chiaro e acceso di #198754 */
    --danger-goal: #ff6b7b; /* più chiaro e acceso di #dc3545 */
    --warning-goal: #ffe178; /* più leggibile rispetto a #d6c13e */
    --info-goal: #32c6e6; /* più chiaro di #0ca4cc */

    --light-goal: #f0f0f0; /* più chiaro di #d3d3d3 */
    --dark-goal: #3a3f44; /* più leggibile rispetto a #212529 */
    --white-goal: #e0e0e0; /* più chiaro rispetto al grigio #bfbfbf */
    --alternate-goal: #8a8a8a; /* più chiaro di #666666 */
    --muted-goal: #bfbfbf; /* più chiaro di #8f8f8f */
}


.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.btn-square {
    width: 100px;
    height: 100px;
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

    .btn-square .bi {
        font-size: 2rem;
        margin-bottom: 0.25rem;
    }

    .btn-square span {
        font-size: 0.9rem;
        display: block;
    }

.cursor-pointer {
    cursor: pointer;
}

.cursor-notallowed {
    cursor: not-allowed;
}

.toast.show {
    opacity: 1 !important;
}

.no-spinner::-webkit-inner-spin-button,
.no-spinner::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.no-spinner[type="number"] {
    -moz-appearance: textfield;
}



/* Base font-size map */
:root {
    --bs-font-size-1: 2.5rem;
    --bs-font-size-2: 2rem;
    --bs-font-size-3: 1.75rem;
    --bs-font-size-4: 1.5rem;
    --bs-font-size-5: 1.25rem;
    --bs-font-size-6: 1rem;
}
/* =============================================================
   WCAG 2.1 AA Accessibility overrides
   Requisiti: WCAG 1.4.1 (Level A), 1.4.3 (Level AA), 1.4.4 (Level AA)
   ============================================================= */

/* Fix WCAG 1.4.3 � Contrasto testo/sfondo
   Il colore primario teal (#0ec4cb) ha contrasto 2.07:1 su bianco.
   Usiamo un teal scuro (#007a7f) che arriva a 5.09:1 su bianco.
   Interviene SOLO su link inline, non sui pulsanti (che hanno sfondo proprio). */
a:not(.btn):not([class*="nav"]):not([class*="menu"]):not([class*="tag"]),
a:not(.btn):not([class*="nav"]):not([class*="menu"]):not([class*="tag"]):visited {
    color: #007a7f;
}

    a:not(.btn):not([class*="nav"]):not([class*="menu"]):not([class*="tag"]):hover {
        color: #005c60;
    }

/* Fix WCAG 1.4.3 � Testo dei pulsanti primari su sfondo teal
   Teal chiaro (#0ec4cb) su bianco = 2.07:1. Bianco su teal = 2.07:1.
   Soluzione: testo scuro (#212529) su sfondo teal, che vale 7.8:1. */
.btn-primary,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    color: #212529 !important;
}

/* Fix WCAG 1.4.3 � Testo muted/placeholder
   --muted: #afafaf su bianco = 2.07:1 (insufficiente per testo normale).
   Darkenato a #767676 = 4.48:1 (appena sopra la soglia AA).
   Nota: i placeholder sono tecnicamente "inactive UI component" (esenzione WCAG),
   ma MAUVE li valuta ugualmente; questa override risolve il false-positive. */
html[data-color=light-teal] {
    --muted: #767676;
}

.text-muted {
    color: #767676 !important;
}

/* Fix WCAG 1.4.3 � Header/titoli sezione con alternate color
   --alternate: #7c7c7c su bianco = 3.78:1 (sotto 4.5:1 per testo normale).
   Override a #595959 = 7.0:1 su bianco. */
html[data-color=light-teal] {
    --alternate: #595959;
}

/* Fix WCAG 1.4.4 � Testo griglia ManageUsers (DataTable)
   Il testo nella griglia usa dimensioni ridotte; garantiamo un minimo di 13px. */
table.dataTable td,
table.dataTable th,
.dataTables_wrapper td,
.dataTables_wrapper th {
    font-size: max(13px, 0.8125rem) !important;
}

/* Generate responsive font-size classes */
@media (min-width: 576px) {
    .fs-sm-1 {
        font-size: var(--bs-font-size-1) !important;
    }

    .fs-sm-2 {
        font-size: var(--bs-font-size-2) !important;
    }

    .fs-sm-3 {
        font-size: var(--bs-font-size-3) !important;
    }

    .fs-sm-4 {
        font-size: var(--bs-font-size-4) !important;
    }

    .fs-sm-5 {
        font-size: var(--bs-font-size-5) !important;
    }

    .fs-sm-6 {
        font-size: var(--bs-font-size-6) !important;
    }

    .footer {
        line-height: 35px !important;
    }
}

@media (min-width: 768px) {
    .fs-md-1 {
        font-size: var(--bs-font-size-1) !important;
    }

    .fs-md-2 {
        font-size: var(--bs-font-size-2) !important;
    }

    .fs-md-3 {
        font-size: var(--bs-font-size-3) !important;
    }

    .fs-md-4 {
        font-size: var(--bs-font-size-4) !important;
    }

    .fs-md-5 {
        font-size: var(--bs-font-size-5) !important;
    }

    .fs-md-6 {
        font-size: var(--bs-font-size-6) !important;
    }

    .footer {
        line-height: 45px !important;
    }
}

@media (min-width: 992px) {
    .fs-lg-1 {
        font-size: var(--bs-font-size-1) !important;
    }

    .fs-lg-2 {
        font-size: var(--bs-font-size-2) !important;
    }

    .fs-lg-3 {
        font-size: var(--bs-font-size-3) !important;
    }

    .fs-lg-4 {
        font-size: var(--bs-font-size-4) !important;
    }

    .fs-lg-5 {
        font-size: var(--bs-font-size-5) !important;
    }

    .fs-lg-6 {
        font-size: var(--bs-font-size-6) !important;
    }
}

@media (min-width: 1200px) {
    .fs-xl-1 {
        font-size: var(--bs-font-size-1) !important;
    }

    .fs-xl-2 {
        font-size: var(--bs-font-size-2) !important;
    }

    .fs-xl-3 {
        font-size: var(--bs-font-size-3) !important;
    }

    .fs-xl-4 {
        font-size: var(--bs-font-size-4) !important;
    }

    .fs-xl-5 {
        font-size: var(--bs-font-size-5) !important;
    }

    .fs-xl-6 {
        font-size: var(--bs-font-size-6) !important;
    }
}

@media (min-width: 1400px) {
    .fs-xxl-1 {
        font-size: var(--bs-font-size-1) !important;
    }

    .fs-xxl-2 {
        font-size: var(--bs-font-size-2) !important;
    }

    .fs-xxl-3 {
        font-size: var(--bs-font-size-3) !important;
    }

    .fs-xxl-4 {
        font-size: var(--bs-font-size-4) !important;
    }

    .fs-xxl-5 {
        font-size: var(--bs-font-size-5) !important;
    }

    .fs-xxl-6 {
        font-size: var(--bs-font-size-6) !important;
    }
}


.card-container {
    position: relative;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 2rem;
}

.card-floating-title {
    position: absolute;
    top: -0.75rem;
    left: 1rem;
    background: white;
    padding: 0 0.5rem;
    font-weight: bold;
    font-size: 0.9rem;
    color: #333;
}



footer img {
    margin: 0 10px;
    max-height: 50px;
    vertical-align: middle;
}

.form-control:read-only {
    background-color: #f6f6f6;
}


.pagination {
    margin-top: 1rem;
}

    .pagination .page-item .page-link {
        border-radius: 8px;
        margin: 0 2px;
        color: #333;
    }

    .pagination .page-item.active .page-link {
        background-color: #0d6efd;
        color: #fff;
    }

    .pagination .page-item.disabled .page-link {
        opacity: 0.5;
        pointer-events: none;
    }

.fixed-background {
    background: url('../images/bg-login-web.webp') no-repeat center center fixed;
    background-size: cover;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    opacity: 0.85
}

/* --- Immagine per schermi piccoli (mobile) --- */
@media (max-width: 768px) {
    .fixed-background {
        background: url('../images/bg-login-mobile.webp') no-repeat center center fixed !important;
        background-size: cover;
    }
}


.border-radius-lg {
    border-radius: var(--border-radius-lg) !important;
}

.filled > i {
    position: absolute;
    top: 12px;
    left: 16px;
    color: rgba(var(--alternate-rgb), 0.5);
    z-index: 1;
}

.form-control:disabled,
.form-control[readonly] {
    background: rgba(var(--separator-rgb), 0.5) !important;
    border-color: rgba(var(--separator-rgb), 0.5) !important;
    color: var(--body);
    -webkit-text-fill-color: var(--body) !important;
}

.progress-circle {
    --percentage: 56; /* valore di default */
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: conic-gradient( #0d6efd calc(var(--percentage) * 1%), #e9ecef 0 );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    /* cerchio interno per creare effetto anello */
    .progress-circle::before {
        content: "";
        position: absolute;
        width: 90px; /* più piccolo = bordo più spesso */
        height: 90px;
        border-radius: 50%;
        background: white; /* colore di sfondo centrale */
    }

    .progress-circle .percentage {
        position: absolute;
        font-weight: bold;
        font-size: 1.2rem;
        color: #0d6efd;
    }

.fitbit-progress-circle {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .fitbit-progress-circle.circle-primary {
        background: conic-gradient(var(--primary-darker) calc(var(--percentage) * 1%), #e9ecef 0);
    }

    .fitbit-progress-circle.circle-secondary {
        background: conic-gradient(var(--secondary-darker) calc(var(--percentage) * 1%), #e9ecef 0);
    }

    .fitbit-progress-circle.circle-tertiary {
        background: conic-gradient(var(--tertiary-darker) calc(var(--percentage) * 1%), #e9ecef 0);
    }

    .fitbit-progress-circle.circle-quaternary {
        background: conic-gradient(var(--quaternary-darker) calc(var(--percentage) * 1%), #e9ecef 0);
    }

    .fitbit-progress-circle.circle-success {
        background: conic-gradient(var(--success-darker) calc(var(--percentage) * 1%), #e9ecef 0);
    }

    .fitbit-progress-circle.circle-danger {
        background: conic-gradient(var(--danger-darker) calc(var(--percentage) * 1%), #e9ecef 0);
    }

    .fitbit-progress-circle.circle-warning {
        background: conic-gradient(var(--warning-darker) calc(var(--percentage) * 1%), #e9ecef 0);
    }

    .fitbit-progress-circle.circle-info {
        background: conic-gradient(var(--info-darker) calc(var(--percentage) * 1%), #e9ecef 0);
    }

    .fitbit-progress-circle.circle-light {
        background: conic-gradient(var(--light-darker) calc(var(--percentage) * 1%), #e9ecef 0);
    }

    .fitbit-progress-circle.circle-dark {
        background: conic-gradient(var(--dark-darker) calc(var(--percentage) * 1%), #e9ecef 0);
    }

    .fitbit-progress-circle.circle-white {
        background: conic-gradient(var(--white-darker) calc(var(--percentage) * 1%), #e9ecef 0);
    }

    .fitbit-progress-circle.circle-alternate {
        background: conic-gradient(var(--alternate-darker) calc(var(--percentage) * 1%), #e9ecef 0);
    }

    .fitbit-progress-circle.circle-muted {
        background: conic-gradient(var(--muted-darker) calc(var(--percentage) * 1%), #e9ecef 0);
    }

.fitbit-progress-circle-goal {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

    .fitbit-progress-circle-goal.circle-goal-primary {
        background: conic-gradient(var(--primary-goal) calc(var(--percentage) * 1%), var(--primary-darker) 0);
    }

    .fitbit-progress-circle-goal.circle-goal-secondary {
        background: conic-gradient(var(--secondary-goal) calc(var(--percentage) * 1%), var(--secondary-darker) 0);
    }

    .fitbit-progress-circle-goal.circle-goal-tertiary {
        background: conic-gradient(var(--tertiary-goal) calc(var(--percentage) * 1%), var(--tertiary-darker) 0);
    }

    .fitbit-progress-circle-goal.circle-goal-quaternary {
        background: conic-gradient(var(--quaternary-goal) calc(var(--percentage) * 1%), var(--quaternary-darker) 0);
    }

    .fitbit-progress-circle-goal.circle-goal-success {
        background: conic-gradient(var(--success-goal) calc(var(--percentage) * 1%), var(--success-darker) 0);
    }

    .fitbit-progress-circle-goal.circle-goal-danger {
        background: conic-gradient(var(--danger-goal) calc(var(--percentage) * 1%), var(--danger-darker) 0);
    }

    .fitbit-progress-circle-goal.circle-goal-warning {
        background: conic-gradient(var(--warning-goal) calc(var(--percentage) * 1%), var(--warning-darker) 0);
    }

    .fitbit-progress-circle-goal.circle-goal-info {
        background: conic-gradient(var(--info-goal) calc(var(--percentage) * 1%), var(--info-darker) 0);
    }

    .fitbit-progress-circle-goal.circle-goal-light {
        background: conic-gradient(var(--light-goal) calc(var(--percentage) * 1%), var(--light-darker) 0);
    }

    .fitbit-progress-circle-goal.circle-goal-dark {
        background: conic-gradient(var(--dark-goal) calc(var(--percentage) * 1%), var(--dark-darker) 0);
    }

    .fitbit-progress-circle-goal.circle-goal-white {
        background: conic-gradient(var(--white-goal) calc(var(--percentage) * 1%), var(--white-darker) 0);
    }

    .fitbit-progress-circle-goal.circle-goal-alternate {
        background: conic-gradient(var(--alternate-goal) calc(var(--percentage) * 1%), var(--alternate-darker) 0);
    }

    .fitbit-progress-circle-goal.circle-goal-muted {
        background: conic-gradient(var(--muted-goal) calc(var(--percentage) * 1%), var(--muted-darker) 0);
    }




.btn-background.hover-outline.active {
    color: var(--primary) !important;
    background-color: var(--foreground);
    box-shadow: inset 0 0 0 1px var(--primary) !important;
}


/* Colore placeholder come text-muted */
.form-control::placeholder {
    /*color: #6c757d;*/ /* Bootstrap text-muted */
    color: #adb5bd; /* grigio più chiaro */
    opacity: 1; /* serve per alcuni browser (Firefox) */
}

#root {
    padding-top: 20px;
}

@media (max-width: 992px) {
    #root {
        padding-top: 60px !important;
        padding-bottom: 60px;
    }

        #root.no-navbar {
            padding-top: 20px !important;
        }
}

html[data-placement=horizontal][data-behaviour=unpinned]:not([data-mobile=true]) #root.no-navbar {
    padding-top: 20px !important;
}

.input-group .btn {
    z-index: 0;
}

html[data-placement=vertical][data-behaviour=unpinned]:not([data-menu-animate=show]) #moduleDropdownWrapper {
    display: none !important;
}

html[data-placement=horizontal][data-behaviour=unpinned]:not([data-mobile=true]) #root {
    padding-top: 80px !important;
}

html[data-behaviour=unpinned][data-menu-animate=show] .label.br {
    white-space: normal !important;
    overflow-wrap: break-word !important;
}

.logo-uni {
    background-image: url('../images/logo-unipa-verticale - circolo semiologico siciliano.jpg');
    width: 100px;
    min-height: 35px;
    object-position: left;
    object-fit: cover;
    background-repeat: no-repeat;
}

.logo-dare {
    background-image: url('../images/progetto - fondazione dare - fondazione dare.png');
    width: 100px;
    min-height: 35px;
    object-position: left;
    object-fit: cover;
    background-repeat: no-repeat;
}

.selectedModuleBtn:hover {
    border-radius: var(--border-radius-lg);
    background: rgba(var(--light-text-rgb), 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03) !important;
}

.menu li {
    transition: opacity 0.3s ease, max-height 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

    .menu li.hidden {
        opacity: 0;
        max-height: 0;
        padding: 0;
        pointer-events: none;
    }

    .menu li.visible {
        opacity: 1;
        max-height: 100px; /* o un valore adatto al tuo layout */
        padding: 0.5rem 1rem; /* stesso padding originale */
        pointer-events: auto;
    }

/* Ombre leggere */
.text-shadow-sm {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.25);
}

/* Ombra media */
.text-shadow {
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.35);
}

/* Ombra marcata */
.text-shadow-md {
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.45);
}

/* Ombra intensa */
.text-shadow-lg {
    text-shadow: 4px 4px 8px rgba(0, 0, 0, 0.55);
}

/* Ombra molto profonda */
.text-shadow-xl {
    text-shadow: 5px 5px 10px rgba(0, 0, 0, 0.65);
}

/* Effetto glow chiaro (per testi su sfondi scuri) */
.text-glow-light {
    text-shadow: 0 0 6px rgba(255, 255, 255, 0.6), 0 0 12px rgba(255, 255, 255, 0.4);
}

/* Effetto glow colorato */
.text-glow-blue {
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.7), 0 0 16px rgba(59, 130, 246, 0.5);
}

.text-glow-red {
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.7), 0 0 16px rgba(239, 68, 68, 0.5);
}

.text-glow-green {
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.7), 0 0 16px rgba(34, 197, 94, 0.5);
}

/* Ombra in rilievo (effetto emboss) */
.text-emboss {
    text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.4), -1px -1px 0 rgba(0, 0, 0, 0.4);
}


/* Sfondo gradiente semi-trasparente con effetto vetro */
.bg-overlay-gradient {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.1) 100%);
    transition: all 0.3s ease-in-out;
}
/*.bg-overlay-gradient:hover {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.75) 0%, rgba(0, 0, 0, 0.4) 100%);
}*/

/* Stato giallo per gli switch indeterminate */
.form-check-input.indeterminate-state {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25) !important;
}


@media (max-width: 768px) {

    html[data-placement=vertical] .nav-container,
    html[data-placement=horizontal] .nav-container.mobile-side-ready,
    html[data-placement=vertical] .nav-container.mobile-side-ready {
        top: 0;
        width: 80% !important;
        height: 100%;
        padding-left: initial;
        padding-right: initial;
        border-top-left-radius: 0;
        border-top-right-radius: var(--border-radius-lg);
        border-bottom-right-radius: var(--border-radius-lg);
        border-bottom-left-radius: 0;
        flex-direction: column;
        justify-content: initial;
    }

        html[data-placement=vertical] .nav-container .nav-content .menu-container,
        html[data-placement=horizontal] .nav-container.mobile-side-ready .nav-content .menu-container,
        html[data-placement=vertical] .nav-container.mobile-side-ready .nav-content .menu-container {
            display: flex !important;
            align-self: flex-start;
            order: 3;
            margin-top: 2rem;
            margin-bottom: 1rem;
            width: 100% !important;
            margin-left: 1rem;
            margin-right: 1rem;
        }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==== CARD BASE ==== */
.hover-card {
    transition: all 0.3s ease-in-out;
    border-radius: 1rem;
    min-height: 200px;
    color: #fff !important;
}

    .hover-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    }

/* ==== COLORI PER MACROCATEGORIA ==== */

/* Istruzione / Famiglia / Lavoro / Reddito */
.category-socioeconomic {
    background: linear-gradient(135deg, #6ac4b3, #4eb29e);
}

/* Sanitarie */
.category-health {
    background: linear-gradient(135deg, #6bcf3c, #54b72e);
}

/* Nutrizione */
.category-nutrition {
    background: linear-gradient(135deg, #f0b400, #d49400);
    color: #fff !important;
}

/* Stili di vita */
.category-lifestyle {
    background: linear-gradient(135deg, #ffa94d, #ff861d);
}

/* Default fallback */
.category-default {
    background: linear-gradient(135deg, #6c757d, #495057);
}

/* ==== CONTENUTO CARD ==== */
.hover-card i {
    transition: transform 0.3s ease;
    color: #fff !important;
}

.hover-card:hover i {
    transform: scale(1.15);
}

.hover-card h3,
.hover-card h5,
.hover-card p {
    color: #fff !important;
}

/* === COLORI PER MACROCATEGORIA === */
/*.category-socioeconomic {
    --cat-start: #6ac4b3;
    --cat-end: #4eb29e;
}

.category-health {
    --cat-start: #6bcf3c;
    --cat-end: #54b72e;
}

.category-nutrition {
    --cat-start: #f0b400;
    --cat-end: #d49400;
}

.category-lifestyle {
    --cat-start: #ffa94d;
    --cat-end: #ff861d;
}

.category-default {
    --cat-start: #6c757d;
    --cat-end: #495057;
}*/

/* === Header card === */
/*.category-header {
    background: linear-gradient(135deg, var(--cat-start), var(--cat-end)) !important;
    color: #fff !important;
    border: none !important;
}*/

/* === COLORI PER MACROCATEGORIA === */
.category-socioeconomic {
    --cat-start: #6ac4b3;
    --cat-end: #4eb29e;
}

.category-health {
    --cat-start: #6bcf3c;
    --cat-end: #54b72e;
}

.category-nutrition {
    --cat-start: #f0b400;
    --cat-end: #d49400;
}

.category-lifestyle {
    --cat-start: #ffa94d;
    --cat-end: #ff861d;
}

.category-default {
    --cat-start: #6c757d;
    --cat-end: #495057;
}

/* === Header card === */
.category-header {
    background: linear-gradient(135deg, var(--cat-start), var(--cat-end)) !important;
    color: #fff !important;
    border: none !important;
}

/* === Question card === */
.question-toggle {
    cursor: pointer;
    transition: color 0.2s ease;
}

    .question-toggle:hover {
        color: var(--bs-primary);
    }

.toggle-icon {
    transition: transform 0.25s ease;
}

.question-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(90deg);
}

/* === Pills === */
.option-pill {
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    border: none;
    transition: all 0.2s ease;
    cursor: default;
    padding: 0.5rem 0.9rem;
}

    .option-pill:hover {
        transform: translateY(-2px);
        filter: brightness(1.15);
    }

/* Gradient per le pillole */
.category-socioeconomic.option-pill {
    background: linear-gradient(135deg, #6ac4b3, #4eb29e);
}

.category-health.option-pill {
    background: linear-gradient(135deg, #6bcf3c, #54b72e);
}

.category-nutrition.option-pill {
    background: linear-gradient(135deg, #f0b400, #d49400);
}

.category-lifestyle.option-pill {
    background: linear-gradient(135deg, #ffa94d, #ff861d);
}

.category-default.option-pill {
    background: linear-gradient(135deg, #6c757d, #495057);
}

/* === Domande cliccabili === */
.question-toggle {
    cursor: pointer;
    transition: color 0.2s ease;
}

    .question-toggle:hover {
        color: var(--cat-end);
    }

/* Icona animata */
.toggle-icon {
    transition: transform 0.25s ease;
}

/* Quando la domanda  espansa, ruota l'icona */
.question-toggle[aria-expanded="true"] .toggle-icon {
    transform: rotate(90deg);
}

/* === Icona gradientata === */
.text-gradient {
    background: linear-gradient(135deg, var(--cat-start), var(--cat-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}


.fixed-centered {
    position: fixed;
    top: 50%;
    left: 25%;
    transform: translate(-50%, -50%);
    z-index: 10; /* opzionale, per stare sopra lo sfondo */
    width: 100%; /* mantiene la larghezza */
    max-width: 600px; /* opzionale, limita la dimensione */
}

:root {
    --control-bg: #ffffff;
    --control-bd: #d6dee9;
}

.page-title {
    font-weight: 700;
    letter-spacing: .2px;
}

.subtitle {
    color: var(--text-muted);
}

.card-kpi .kpi-value {
    font-size: 1.8rem;
    font-weight: 700;
}

.kpi-trend.up {
    color: var(--success);
}

.kpi-trend.down {
    color: var(--danger);
}

.kpi-trend.warn {
    color: var(--warning);
}

.filter-pill .form-select, .filter-pill .form-control {
    background: var(--control-bg);
    border-color: var(--control-bd);
    color: var(--text);
    border-radius: 10px;
}


.status-dot {
    font-size: 1rem;
}

.btn-muted {
    background: #ffffff;
    border: 1px dashed var(--control-bd);
    color: #7b8ba5;
    border-radius: 10px;
}

    .btn-muted:disabled {
        opacity: .9;
    }

.chart-card {
    min-height: 360px;
}

.section-title {
    font-size: 1.05rem;
    font-weight: 600;
}


/* Assicura che tutte le card abbiano altezza uguale e layout verticale coerente */
.card-min-height {
    min-height: 180px; /* puoi regolarlo */
}

/* Rende il testo di Project a capo senza rompere il layout */
.project-title {
    line-height: 1.3;
    max-height: 2.6em; /* 2 righe */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* max 2 righe */
    -webkit-box-orient: vertical;
    white-space: normal;
}

    /* Imposta spaziatura costante fra Project e la sezione sotto */
    .project-title + div,
    .text-alternate.mb-2 {
        margin-bottom: 0.75rem !important;
    }

.card {
    border-radius: 1rem;
}

input[type="file"] {
    cursor: pointer;
}

.module-switch.border-bottom.py-2:last-child {
    border-bottom: none !important;
}

.user-row {
    font-size: 0.875rem;
}

    .user-row .col-lg-1,
    .user-row .col-lg-2,
    .user-row .col-lg-3 {
        padding: 0 0.25rem;
    }

    .user-row i {
        vertical-align: middle;
    }

.text-truncate {
    /*max-width: 160px;*/
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .user-row {
        border: 1px solid #eee;
        border-radius: .5rem;
        margin-bottom: .75rem;
        padding: .5rem .75rem;
    }
}

/* === SOLO per le icone dei RUOLI === */
.user-role-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem; /* dimensione uniforme */
    width: 2.5rem;
    height: 2.5rem;
    transition: all 0.2s ease-in-out;
}

    /* Colori coerenti con Bootstrap */
    .user-role-icon.text-primary {
        color: var(--bs-primary) !important;
        fill: var(--bs-primary) !important;
    }

    .user-role-icon.text-success {
        color: var(--bs-success) !important;
        fill: var(--bs-success) !important;
    }

    .user-role-icon.text-danger {
        color: var(--bs-danger) !important;
        fill: var(--bs-danger) !important;
    }

    .user-role-icon.text-warning {
        color: var(--bs-warning) !important;
        fill: var(--bs-warning) !important;
    }

    .user-role-icon.text-info {
        color: var(--bs-info) !important;
        fill: var(--bs-info) !important;
    }

    .user-role-icon.text-secondary {
        color: var(--bs-secondary) !important;
        fill: var(--bs-secondary) !important;
    }

    /* Effetto hover solo per queste icone */
    .user-role-icon:hover {
        transform: scale(1.1);
        filter: brightness(1.15);
    }

    /* Uniforma il peso visivo tra icone custom e Bootstrap */
    .user-role-icon.icon-role {
        filter: brightness(0.9) contrast(0.9);
        transform: scale(0.95);
    }

        .user-role-icon.icon-role svg {
            stroke-width: 1.2px;
            stroke: currentColor;
            fill: none;
        }

    .user-role-icon.bi {
        transform: scale(1.05);
    }

/*.user-header [data-sort] {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}*/

.project-configuration label:not(.stepper-horizontal label),
.project-configuration .top-label > span,
.project-configuration .small-title,
.followup-page :is(label, .form-label, legend, h1, h2, h3, thead th, dt) {
    color: #000;
    font-weight: 700;
}

.stepper-horizontal {
    --step-marker-size: 3.5rem;
    display: flex;
    align-items: flex-start;
    isolation: isolate;
}

    .stepper-horizontal .step {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        flex: 1 1 0;
        min-inline-size: 5.5rem;
        padding-inline: 0.25rem;
        overflow-wrap: anywhere;
    }

        .stepper-horizontal .step:not(:last-child)::after {
            content: "";
            position: absolute;
            inset-block-start: calc(var(--step-marker-size) / 2);
            inset-inline-start: 50%;
            inline-size: 100%;
            height: 2px;
            background-color: var(--bs-secondary);
            transform: translateY(-50%);
            pointer-events: none;
        }

        .stepper-horizontal .step > a {
            position: relative;
            z-index: 1;
            inline-size: var(--step-marker-size);
            block-size: var(--step-marker-size);
        }


/* Solo per un po di chiarezza visiva */
select:disabled {
    background-color: #f5f5f5;
    cursor: not-allowed;
}

/*.d-none {
    display: none !important;
}*/

.z-index-10000 {
    z-index: 10000;
}

td i[title] {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

    td i[title]:hover {
        transform: scale(1.2);
        opacity: 0.8;
    }


/*Nuovo stile responsive login*/
/* --- LOGIN PAGE ONLY --- */

.login-page .bg-overlay-gradient {
    background: rgba(0, 0, 0, 0.45);
    border-radius: 1rem;
    padding: 2rem;
}

.login-page .text-shadow-lg {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.login-page .container-fluid > .row {
    min-height: 100vh;
}

/* --- Responsive: tablet / medium screens --- */
@media (max-width: 1200px) and (min-width: 768px) {
    .login-page .bg-overlay-gradient {
        padding: 1.5rem;
        text-align: center;
    }

        .login-page .bg-overlay-gradient h1 {
            font-size: 2rem;
            line-height: 1.2;
        }

        .login-page .bg-overlay-gradient p {
            font-size: 1.1rem;
        }

    .login-page .sw-lg-70 {
        width: 80% !important;
    }

    .login-page .sw-lg-50 {
        width: 100% !important;
    }

    .login-page .shadow-deep {
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1) !important;
    }

    .login-page .d-lg-flex {
        display: flex !important;
        justify-content: center;
        align-items: center;
    }

    .login-page .col-lg-auto {
        margin-top: 2rem !important;
        margin-bottom: 2rem !important;
    }
}

/* --- Mobile: sotto i 768px --- */
@media (max-width: 767.98px) {
    .login-page .bg-overlay-gradient {
        display: none !important;
    }

    .login-page .sw-lg-70,
    .login-page .sw-lg-50 {
        width: 100% !important;
    }

    .login-page .shadow-deep {
        box-shadow: none !important;
    }

    .login-page .col-lg-auto {
        margin: 0 !important;
        padding: 1rem !important;
    }
}

.login-page .login-header {
    width: 100%;
}

    .login-page .login-header h2 {
        font-size: 1.8rem;
        flex-grow: 1;
    }

/* Contenitore loghi */
.login-page .logos-wrap {
    gap: 0.5rem;
}

.login-page .login-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

/* --- Tablet / Smartphone --- */
@media (max-width: 767.98px) {
    .login-page .login-header {
        flex-wrap: nowrap;
        justify-content: space-between;
        align-items: center;
    }

        .login-page .login-header h2 {
            font-size: 1.4rem;
            margin-bottom: 0;
        }

    .login-page .login-logo {
        height: 32px;
        max-width: 70px;
    }
}

/* --- Riduzione extra per schermi molto stretti (iPhone SE, ecc.) --- */
@media (max-width: 380px) {
    .login-page .login-logo {
        height: 28px;
        max-width: 60px;
    }

    .login-page .login-header h2 {
        font-size: 1.2rem;
    }
}

/* --- Layout specifico HealthVariables - Variabili di salute --- */
.health-variables .health-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 2rem;
    justify-content: center;
    max-width: 950px;
    margin: 0 auto;
}

/* Card style refinements */
.health-variables .card {
    border-radius: 1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .health-variables .card:hover {
        transform: translateY(-4px);
        box-shadow: 0 0.75rem 1.25rem rgba(0, 0, 0, 0.15);
    }

.health-variables .card-body {
    min-height: 250px;
}

/* --- Responsive behaviour --- */
@media (max-width: 767.98px) {
    .health-variables .health-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
    }

    .health-variables .card-body {
        padding: 2rem;
        min-height: auto;
    }
}


/*#researcherRolesSection .form-check {
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    transition: background-color 0.2s ease;
}

    #researcherRolesSection .form-check:hover {
        background-color: #eef2f7;
    }
*/
/*#researcherRolesSection .form-check-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}*/


/*AgreeInformations*/
/* Contenitore testo */
.consent-text {
    height: 480px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    background-color: #fdfdfd;
    padding: 1.25rem;
    position: relative;
    transition: all 0.3s ease-in-out;
}

.consent-text-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
}

/* Effetto sfumatura in basso */
/* The fade lives outside the scrolling box: inside it, it would scroll away with the text */
.consent-text-frame {
    position: relative;
}

.scroll-fade {
    position: absolute;
    bottom: 1px;
    left: 1px;
    right: 8px;
    height: 24px;
    border-radius: 0 0 var(--bs-border-radius-lg) var(--bs-border-radius-lg);
    background: linear-gradient(to bottom, transparent, #fdfdfd 90%);
    pointer-events: none;
}

/* Progresso di lettura dell'informativa */
.consent-reading-progress {
    height: 4px;
}

.consent-scroll-down-anchor {
    position: sticky;
    bottom: 0.5rem;
    height: 0;
    z-index: 2;
}

.consent-scroll-down-button {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
}

/* Rimozione scrollbar brutta */
.consent-text::-webkit-scrollbar {
    width: 6px;
}

.consent-text::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}




/* BREADCRUMB */
/*nav[aria-label="breadcrumb"] {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 0.5rem;
}*/

/* Elimina il pipe di Bootstrap */
.breadcrumb-item + .breadcrumb-item::before {
    content: none !important;
    display: none !important;
}

/* Struttura breadcrumb */
.breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.93rem;
    color: #555;
}

/* Testo */
.breadcrumb-item {
    color: #555;
    font-weight: 500;
}

    .breadcrumb-item a {
        color: inherit;
        text-decoration: none;
    }

        .breadcrumb-item a:hover {
            color: var(--bs-primary);
        }

/* Freccina separatrice */
.breadcrumb-sep {
    font-size: 0.55rem; /* più piccola */
    color: #999;
    margin: 0 2px 0 4px; /* meno spazio prima/dopo */
    vertical-align: middle;
    opacity: 0.75;
    position: relative;
    top: -1px; /* leggero riallineamento */
}




/* MODAL - fixed position */
/* CENTRATURA UNIVERSALE */
.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.ctp-modal-centered.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* MODAL WIDE */
.ctp-modal-wide {
    max-width: min(1200px, calc(100vw - 2rem));
}

/* CTP MODAL: height-safe + sticky header */
/* Modale: top con offset massimo, contenuto libero, scroll sull'overlay (.modal) */
.ctp-modal-topcap.modal {
    overflow-y: auto; /* scrolla l'overlay se la modale  alta */
    align-items: flex-start; /* evita centratura verticale */
}

.ctp-modal-topcap .modal-dialog {
    margin-top: clamp(12px, 3vh, 56px); /* MIN 12px, ideale 6vh, MAX 56px */
    margin-bottom: 24px;
}

.ctp-modal-topcap .modal-content {
    max-height: none; /* niente limite: pu crescere */
}

.ctp-modal-topcap .modal-body {
    overflow: visible; /* niente scrollbar interna */
}

/* DIALOG  centrata e limitata */
/*.modal-dialog {
    margin: 0 !important;
    position: relative;
    top: auto;
    left: auto;
    transform: none !important;
    max-height: 90vh;
    max-width: 90vw; 
    border-radius: 0.75rem;
    overflow: hidden;
    border: none;
}*/

/* CONTENUTO  con dimensioni minime e responsive */
/*.modal-content {
    max-height: 90vh;
    overflow-y: auto;
    min-width: 480px;
    width: auto;
    flex-shrink: 0;
    border-radius: 0.75rem;
}*/
/* Rimuove l'arrotondamento interno dell'header */
/*.modal-header {
    border-top-left-radius: 0;
    border-top-right-radius: 0;
}*/

/* (opzionale) Rende più morbidi gli angoli inferiori se vuoi coerenza */
/*.modal-footer {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}*/

/* ANIMAZIONE FADE  disattiva traslazioni verticali */
/*.modal.fade .modal-dialog {
    transition: transform .7s ease-out;
    transform: none !important;
}*/
/*.modal.fade .modal-dialog {
    transform: translateX(100px);
    transition: transform 0.8s ease, opacity 0.4s ease;
    opacity: 0;
}*/

.modal.fade.show .modal-dialog {
    transform: translateX(0);
    opacity: 1;
}

/* RESPONSIVE DESIGN */
/*@media (max-width: 768px) {
    .modal-content {
        min-width: 90vw;*/ /*su mobile usa quasi tutta la larghezza */
/*border-radius: 0.5rem;
    }
}*/


/* DOT STATUS */
.status-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Colori coerenti per ciascuno stato */
.status-bozza {
    background-color: #6c757d; /* grigio */
}

.status-attesa {
    background-color: #ffc107; /* giallo */
}

.status-revisione {
    background-color: #0dcaf0; /* azzurro */
}

.status-approvato {
    background-color: #198754; /* verde */
}

.status-annullato {
    background-color: #dc3545; /* rosso */
}

/* (facoltativo) allinea meglio col testo */
.d-flex.align-items-center .status-dot {
    margin-top: 1px;
}


/* Colori temporali */
.status-active {
    background-color: #28a745; /* verde */
}

.status-inactive {
    background-color: #ffc107; /* giallo */
}


/* TOOLTIP */
.tooltip {
    transition: none !important;
    pointer-events: none;
}

.modal-body-scrollable {
    max-height: 70vh; /* Altezza fissa in base allo schermo */
    overflow-y: auto; /* Attiva lo scroll verticale */
    overflow-x: hidden; /* Evita scrollbar orizzontale */
    padding-right: 1rem; /* Un po' di spazio per lo scroll */
    scrollbar-gutter: stable; /* Evita saltellamento del layout quando appare lo scroll */
}


#confirmDeleteModal.modal.show {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

#confirmDeleteModal .modal-dialog {
    width: 90vw !important; /* prende viewport */
    max-width: 500px !important; /* limite massimo */
    margin: 0 !important; /* elimina margini Bootstrap */
}


.qm-pill {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .25rem .6rem;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.1);
    background: #f8f9fa;
    margin-right: .4rem;
    margin-bottom: .4rem;
    font-size: .875rem;
}

    .qm-pill button {
        border: 0;
        background: transparent;
        line-height: 1;
        font-size: 1rem;
        padding: 0;
        cursor: pointer;
    }


/* Fix: btn-outline-* con bg-white deve comportarsi normalmente in hover */
.btn-outline-primary.bg-white:hover,
.btn-outline-primary.bg-white:focus {
    background-color: #0ec4cb !important;
    color: #fff !important;
}

#questionEditModal #qmOptionsPills,
#createHvModal #chvOptionsPills,
#editHvModal #ehvOptionsPills {
    max-height: 15vh;
    overflow-y: auto;
    padding-right: .25rem;
}


.badge-dot {
    width: 26px;
    height: 26px;
    border-radius: 999px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    line-height: 1;
}



/* TOOLBAR GRID (3 colonne) */
.ctp-toolbar-grid {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Centro veramente centrato */
.ctp-toolbar-center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    min-width: 0;
    text-align: center;
}

/* Bottoni destra */
.ctp-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

/* Evita che il badge si allarghi troppo */
.ctp-toolbar-center .badge {
    max-width: 520px;
    white-space: normal;
}


/* MOBILE */
@media (max-width: 768px) {
    .ctp-toolbar-grid {
        flex-direction: column;
        gap: 10px;
    }

    .ctp-toolbar-center {
        position: static;
        transform: none;
    }
}



/* PILLOLE STATUS */
/* pillola base */
/*.ctp-tab {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: 8px 18px;
    font-size: .85rem;
    line-height: 1.1;
    background: #ffffff;
    color: #0d6efd;*/ /* allinea al primary */
/*border: 1px solid #dee2e6;*/ /* bordo visibile */
/*border-radius: 999px;
    cursor: pointer;
    user-select: none;
    transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .15s ease;
}*/

/* hover = hover-outline */
/*.ctp-tab:hover {
        background: #f8f9fa;
        border-color: #0d6efd;
        color: #0d6efd;
    }*/


/* focus accessibile */
/*.ctp-tab:focus-visible {
        outline: none;
        box-shadow: 0 0 0 .2rem rgba(13,110,253,.25);
    }*/

/* READONLY OPTION PILL (CTP standard) */
.ctp-readonly-option-pill {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 500;
    background-color: rgba(13, 110, 253, 0.12);
    color: #0d6efd;
    border: 1px solid rgba(13, 110, 253, 0.35);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
    white-space: nowrap;
}

/* Evidenza della card selezionata */
input[type="radio"][name="selectedResearcher"]:checked + label.researcher-card {
    background-color: #d9f7f8 !important; /* versione più chiara del tema */
    border: 1px solid #0ec4cb;
    border-left: 4px solid #0ec4cb !important; /* colore principale */
    box-shadow: 0 0 0 0.2rem rgba(14,196,203,0.25); /* shadow tono coerente */
    font-weight: 600; /* leggero aumento del peso font */
}

/* Transizioni gradevoli */
.researcher-card {
    transition: background-color .15s ease-in-out, box-shadow .15s ease-in-out, border-color .15s ease-in-out;
    cursor: pointer;
}

    .researcher-card:hover {
        background-color: #eafcfd; /* hover leggermente più scuro */
    }

/* Applica il bordo sinistro da 768px in su */
@media (min-width: 768px) {
    .border-md-start {
        border-left: 1px solid #dee2e6; /* colore standard Bootstrap */
    }
}

/* Applica il bordo destro da 768px in su */
@media (min-width: 768px) {
    .border-md-end {
        border-right: 1px solid #dee2e6;
    }
}


/* =========================
   TOOLBAR RESPONSIVE
   ========================= */

/* Mobile first */
@media (max-width: 767.98px) {

    /* toolbar principale */
    #surveyListApp .card-body > .d-flex {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem;
    }

    /* validit */
    #surveyListApp .alert {
        width: 100%;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: .25rem;
    }

    /* STATUS TABS */
    .ctp-status-tabs {
        flex-wrap: wrap;
        justify-content: flex-start;
        gap: .5rem;
    }

        .ctp-status-tabs .btn {
            flex: 1 1 calc(50% - .5rem);
            white-space: nowrap;
            text-align: center;
        }

    /* SEARCH */
    #surveyListApp .flex-shrink-0 {
        padding-left: 0 !important;
        width: 100%;
    }

    #surveyListApp .input-group {
        width: 100%;
    }

    /* card footer CTA */
    .survey-card .card-footer {
        text-align: right;
    }
}

/* =========================
   TABLET (md)
   ========================= */
@media (min-width: 768px) and (max-width: 991.98px) {

    .ctp-status-tabs {
        flex-wrap: wrap;
    }

        .ctp-status-tabs .btn {
            flex: 0 0 auto;
        }

    #surveyListApp .flex-shrink-0 {
        padding-left: 1rem !important;
    }
}

/* =========================
   CARD GRID MICRO FIX
   ========================= */

/* evita overflow testo */
.survey-card {
    min-width: 0;
}

.survey-desc {
    overflow-wrap: break-word;
}

/* icone sempre allineate */
.icon-wrap {
    flex-shrink: 0;
}



/* fix problema div toast quando non  visibile (non permette il click dei bottoni) */
/* Il contenitore fixed non deve intercettare click */
.toast-container {
    pointer-events: none;
}

    /* I toast invece devono restare cliccabili (close, hover, ecc.) */
    .toast-container .toast {
        pointer-events: auto;
    }

/* di default il toast client-side non deve impattare layout/interazioni */
#alertClientSideToast:not(.show) {
    display: none;
}

/* quando viene mostrato (Bootstrap aggiunge .show), torna normale */
#alertClientSideToast.show {
    display: block;
}


/* ====== breadcrumb "clean bar" ====== */
.ctp-breadcrumb-wrap {
    display: inline-flex;
    max-width: 100%;
}

.ctp-breadcrumb {
    list-style: none;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .8rem;
    border-radius: 12px;
    background: #f6f7f9;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 10px 20px rgba(0,0,0,.05);
    overflow: hidden;
    max-width: 100%;
}

.ctp-bc-item {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    min-width: 0; /* important per ellipsis */
}

.ctp-bc-link {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    color: #0b4d6d; /* tono petrolio/brand */
    text-decoration: none;
    font-weight: 600;
    padding: .15rem .35rem;
    border-radius: 10px;
    transition: background .15s ease, color .15s ease;
    min-width: 0;
}

    .ctp-bc-link:hover {
        background: rgba(11,77,109,.08);
        color: #06364d;
        text-decoration: none;
    }

.ctp-bc-home {
    font-size: 1.05rem;
    line-height: 1;
    position: relative;
    top: 1px;
    opacity: .95;
    flex: 0 0 auto;
}

.ctp-bc-sep {
    font-size: .9rem;
    opacity: .55;
    position: relative;
    top: 1px;
    flex: 0 0 auto;
}

.ctp-bc-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 28ch; /* regola qui quanto vuoi troncare */
}

.ctp-bc-current {
    color: #2b2f36;
    font-weight: 700;
}

/* Responsive: stringi un po il testo */
@media (max-width: 576px) {
    .ctp-bc-text {
        max-width: 16ch;
    }

    .ctp-breadcrumb {
        padding: .5rem .65rem;
    }
}


/* HEADER responsive */
.ctp-card-header {
    padding: 18px 22px !important;
    gap: .75rem;
    flex-wrap: wrap; /* fondamentale: evita overflow */
}

    .ctp-card-header > div:first-child {
        min-width: 0; /* permette al testo di andare a capo */
    }

/* pulsante Torna al monitoraggio su mobile va sotto */
@media (max-width: 576px) {
    .ctp-card-header {
        padding: 12px 14px !important;
        align-items: flex-start !important;
    }

        .ctp-card-header .ms-auto {
            width: 100%;
            justify-content: flex-start;
        }

        .ctp-card-header .btn {
            width: 100%;
        }
}


/* PILL VALIDIT / KPI (no overflow su mobile) */
.ctp-validity-row {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap; /* fondamentale */
    align-items: stretch;
}

/* ogni pillola pu restringersi senza spingere fuori */
.ctp-validity-pill {
    flex: 1 1 340px; /* su schermi piccoli andr a capo */
    min-width: 0;
    margin-bottom: 0;
}

/* dentro le pillole: wrappa sempre */
.ctp-validity-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .35rem .5rem;
    min-width: 0;
}

    /* badge: niente pillole infinite */
    .ctp-validity-content .badge {
        white-space: normal !important;
        max-width: 100%;
    }

/* KPI: i badge restano leggibili e vanno a capo */
.ctp-pill-kpi .badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

/* su xs impila le pillole e riduci padding */
@media (max-width: 576px) {
    .ctp-validity-row {
        flex-direction: column;
    }

    .ctp-validity-pill {
        flex: 1 1 auto;
        width: 100%;
        padding-left: .75rem;
        padding-right: .75rem;
    }
}


/* TOOLBAR (tabs + search) responsive */
@media (max-width: 768px) {
    .ctp-toolbar-row {
        flex-direction: column;
        align-items: stretch !important;
        gap: .75rem !important;
    }

        .ctp-toolbar-row .flex-shrink-0 {
            width: 100%;
        }

        .ctp-toolbar-row .flex-grow-1 {
            width: 100%;
        }
}

/* tabs: su xs più touch-friendly */
@media (max-width: 576px) {
    .ctp-tab {
        padding: 10px 12px;
        font-size: .85rem;
    }
}


/* CARD BODY padding (mobile) */
@media (max-width: 576px) {
    .card-body.pt-3.px-3.pb-3 {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}

/* Tonalita Sottotitolo */
.text-white-70 {
    --bs-text-opacity: 1;
    color: rgba(255, 255, 255, 0.7) !important;
}

.text-white-80 {
    --bs-text-opacity: 1;
    color: rgba(255, 255, 255, 0.8) !important;
}


/*score questionari*/
.results-container {
    max-width: 500px;
    margin: auto;
    padding: 20px 15px 40px 15px;
}

/* Icona sopra titolo */
.results-top-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: #e9f2ff;
    color: #0d6efd;
    border-radius: 10px;
    font-size: 20px;
}

/* Sottotitolo */
.results-subtitle {
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 0;
    line-height: 1.4;
}

/* Box descrizione sezione */
.results-section-description {
    background-color: #f4f6f9;
    padding: 12px 15px;
    border-radius: 10px;
    text-align: center;
    font-size: 13px;
    color: #6c757d;
}

/* Card */
.results-card {
    border: 1px solid #0d6efd;
    border-left: 5px solid #0d6efd;
    border-radius: 12px;
}

/* Icona titolo card */
.results-icon {
    color: #0d6efd;
    font-size: 13px;
}

/* Alert risultato */
.results-alert {
    background-color: #e9f2ff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
}

/* Valore risultato */
.results-value {
    color: #0d6efd;
    font-weight: 700;
}


/* banner validita */
.ctp-validity-pill-compact {
    /*display: inline-flex;*/
    align-items: center;
    justify-content: center;
    padding: .42rem .9rem;
    border-radius: 10px;
    width: inherit;
    max-width: 100%;
    margin: 0 auto;
    border: 1px solid rgba(0,0,0,.06);
    box-shadow: 0 2px 8px rgba(0,0,0,.05);
}

.ctp-validity-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .55rem;
    flex-wrap: wrap;
    line-height: 1;
}

.badge-sm {
    font-size: .65rem;
    padding: .22em .5em;
    border-radius: 999px;
}

/* banner kpi */
.ctp-kpi-pill-compact {
    padding: .4rem .75rem;
    border-radius: 10px;
    background: rgba(0,0,0,.04);
    border: 1px solid rgba(0,0,0,.08);
}

.ctp-kpi-inline {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: .6rem;
}

.ctp-kpi-compact-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .5rem .75rem;
    border-radius: 12px;
    background: #f5f7f9;
    border: 1px solid #e3e7ea;
}

.ctp-kpi-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: .5rem;
    color: #6c757d;
    min-width: 60px;
}

    .ctp-kpi-item i {
        font-size: .75rem;
        margin-bottom: 2px;
    }

.ctp-kpi-value {
    font-weight: 600;
    font-size: .75rem;
    color: #212529;
}

.ctp-kpi-label {
    font-size: .5rem;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.ctp-kpi-item.success i {
    color: #28a745;
}

.ctp-kpi-item.warning i {
    color: #f0ad4e;
}

.ctp-kpi-item.danger i {
    color: #dc3545;
}


/* ===== Card head: layout verticale, niente colonne ===== */
.ctp-card-head {
    width: 100%;
    min-width: 0;
}

/* (icon-wrap gi presente nel tuo css) */

/* ===== STATUS BANNER (2 righe: numeri sopra, label sotto) ===== */
.ctp-status-banner {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100%;
    padding: .6rem .5rem;
    border: 1px solid rgba(0,0,0,.06);
    border-radius: 14px;
    background: #fff;
    text-align: center;
}

.sb-col {
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.sb-icon-value {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    font-weight: 800;
    font-size: .98rem;
    line-height: 1;
    white-space: nowrap;
}

    .sb-icon-value i {
        font-size: 1rem;
        position: relative;
        top: -1px;
    }

.sb-label {
    margin-top: .25rem;
    font-size: .62rem;
    letter-spacing: .08em;
    font-weight: 700;
    opacity: .78;
    white-space: nowrap;
}

/* colori */
.sb-assigned .sb-icon-value,
.sb-assigned .sb-icon-value i {
    color: #0d6efd;
}

.sb-progress .sb-icon-value,
.sb-progress .sb-icon-value i {
    color: #f59f00;
}

.sb-complete .sb-icon-value,
.sb-complete .sb-icon-value i {
    color: #20c997;
}

.sb-closed .sb-icon-value,
.sb-closed .sb-icon-value i {
    color: #dc3545;
}

/* mobile: 2 colonne (2 righe) */
@media (max-width: 576px) {
    .ctp-status-banner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: .75rem;
    }
}

/* Icona + titolo sulla stessa riga */
.ctp-title-row {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: .35rem;
    max-width: 100%;
}

.ctp-title {
    font-weight: 500;
    color: #212529;
    line-height: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* icona più compatta per header riga */
.ctp-title-row .icon-wrap {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    flex: 0 0 40px;
}

    .ctp-title-row .icon-wrap i {
        font-size: 1.35rem;
    }

/* mobile */
@media (max-width: 576px) {
    .ctp-title {
        white-space: normal;
        overflow: visible;
        text-overflow: clip;
    }
}

/* wrapper testo a destra dell'icona */
.ctp-title-wrapper {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* riga sotto il titolo */
.ctp-subline {
    font-size: .78rem;
    margin-top: .15rem;
    line-height: 1.2;
}

/* serve per posizionare il badge dentro la card-body */
.survey-card .card-body {
    position: relative;
}

/* pillola stato in alto a destra */
.ctp-status-badge {
    position: absolute;
    top: .75rem;
    right: .75rem;
    z-index: 2;
    border-radius: 999px;
    padding: .35rem .55rem;
    font-size: .72rem;
    line-height: 1;
    box-shadow: 0 .25rem .5rem rgba(0,0,0,.08);
}

/* lascia spazio al badge, cos non si sovrappone al titolo */
.ctp-title-wrapper {
    padding-right: 6.5rem; /* tweak se il badge  più lungo */
}

/* description sotto al titolo */
.ctp-desc {
    margin-top: .25rem;
    font-size: .85rem;
    line-height: 1.25;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* max 2 righe */
    -webkit-box-orient: vertical;
}


/* RESPONSIVE (opzionale ma utile)
           - sotto lg: KPI vanno a capo (2+2) senza rompere la validit */
@media (max-width: 992px) {
    .ctp-toolbar-top {
        grid-template-columns: 1fr; /* validit sopra, kpi sotto */
    }

    .ctp-kpi-pills {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/*Health Detal*/
.card-header.category-default {
    background-color: #6c757d;
}

.card-header.category-nutrition {
    background-color: #d99a00;
}

.card-header.category-health {
    background-color: #55c22f;
}

.card-header.category-lifestyle {
    background-color: #ffa94d;
}

.card-header.category-socioeconomic {
    background-color: #4fb6a6;
}

.ctp-qcard {
    border-radius: 16px;
    border-color: rgba(0, 0, 0, .10);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .03);
}

    .ctp-qcard[data-answered="1"] {
        border-color: rgba(25, 135, 84, .35) !important;
        box-shadow: 0 8px 22px rgba(25, 135, 84, .08);
    }

.ctp-kpi-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, .08);
    box-shadow: 0 8px 22px rgba(0, 0, 0, .04);
}

.ctp-kpi-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.ctp-kpi-text {
    line-height: 1.2;
}

.ctp-kpi-label {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #9aa3ad;
}

.ctp-kpi-value {
    font-size: 1rem;
    font-weight: 600;
    color: #2b2f36;
}

.ctp-kpi-desc {
    margin-top: 4px;
    font-size: .92rem;
}

.ctp-kpi-sep {
    margin: 0 8px;
    color: #9aa3ad;
    font-weight: 400;
}

.ctp-kpi-badge {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 600;
    background: #f8f9fa;
    color: #2b2f36;
    border: 1px solid rgba(0, 0, 0, .12);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.ctp-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ctp-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ctp-bar-label {
    width: 140px;
    flex: 0 0 140px;
    /*font-weight: 600;*/
    color: #2b2f36;
}

.ctp-bar {
    flex: 1;
    height: 14px;
    background: #e9ecef;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.ctp-bar-fill {
    height: 100%;
    background: var(--macro-color);
    border-radius: 999px;
    transition: width .25s ease;
}

    .ctp-bar-fill.muted {
        background: rgba(0, 0, 0, .18);
    }

.ctp-bar-pct {
    width: 64px;
    flex: 0 0 64px;
    text-align: right;
    font-weight: 800;
    color: #111827;
}

.ctp-bar-base {
    padding-left: 152px;
    font-size: .85rem;
    color: #6b7280;
}

    .ctp-bar-base strong {
        color: #111827;
    }

.ctp-option-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ctp-option-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

    .ctp-option-row + .ctp-option-row {
        padding-top: 2px;
    }

.ctp-option-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ctp-option-title {
    min-width: 0;
    font-weight: 600;
    color: #2b2f36;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ctp-option-values {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
    white-space: nowrap;
}

.ctp-option-bar {
    width: 100%;
    height: 10px;
    background: #e9ecef;
    border-radius: 999px;
    overflow: hidden;
}

.ctp-option-bar-fill {
    height: 100%;
    background: var(--macro-color);
    border-radius: 999px;
    transition: width .25s ease;
}

@media (max-width: 768px) {
    .ctp-kpi-box {
        flex-direction: column;
        align-items: stretch;
    }

    .ctp-kpi-left {
        width: 100%;
    }

    .ctp-kpi-value {
        line-height: 1.5;
    }

    .ctp-bar-row {
        flex-wrap: wrap;
        gap: 8px;
    }

    .ctp-bar-label {
        width: 100%;
        flex: 0 0 100%;
    }

    .ctp-bar {
        width: 100%;
        flex: 1 1 100%;
    }

    .ctp-bar-pct {
        width: auto;
        flex: 0 0 auto;
        margin-left: auto;
    }

    .ctp-bar-base {
        padding-left: 0;
    }

    .ctp-option-top {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .ctp-option-values {
        white-space: normal;
    }
}

/* pillole type-of-answer nelle card surveydetail e health detail */
.ctp-answer-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,.08);
    font-size: .85rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,.03);
}

    .ctp-answer-type-badge.type-open {
        background: #eef8ff;
        color: #0b6aa2;
    }

    .ctp-answer-type-badge.type-single {
        background: #eefaf3;
        color: #1f7a45;
    }

    .ctp-answer-type-badge.type-multiple {
        background: #fff8e8;
        color: #9a6700;
    }

    .ctp-answer-type-badge.type-default {
        background: #f3f6f9;
        color: #2b2f36;
    }

.ctp-user-filter-pill {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 42px;
    max-width: 100%;
    padding: 8px 10px 8px 14px;
    border-radius: 999px;
    background: #eaf1f3;
    color: #1f7f8c;
    box-shadow: inset 0 0 0 1px rgba(31, 127, 140, 0.06);
}

.ctp-user-filter-pill-left {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    color: inherit;
}

    .ctp-user-filter-pill-left:hover {
        color: white !important;
    }

    .ctp-user-filter-pill-left i {
        flex: 0 0 auto;
        font-size: .95rem;
        color: #1f7f8c;
        position: relative;
        top: -1px;
    }

.ctp-user-filter-pill-text {
    min-width: 0;
    font-size: .95rem;
    line-height: 1.2;
    color: #1f7f8c;
    white-space: nowrap;
}

    .ctp-user-filter-pill-text strong {
        color: #1f7f8c;
        font-weight: 700;
    }

.ctp-user-filter-pill-reset {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-decoration: none;
    color: #1f7f8c;
    transition: background-color .15s ease, transform .15s ease;
}

    .ctp-user-filter-pill-reset:hover {
        background: rgba(31, 127, 140, 0.5);
        color: white;
    }

    .ctp-user-filter-pill-reset:active {
        transform: scale(.96);
    }

    .ctp-user-filter-pill-reset i {
        font-size: .95rem;
        line-height: 1;
    }

@media (max-width: 767.98px) {
    .ctp-user-filter-pill {
        width: 100%;
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 10px 10px 10px 12px;
        border-radius: 12px;
    }

    .ctp-user-filter-pill-left {
        flex: 1 1 auto;
        align-items: flex-start;
    }

        .ctp-user-filter-pill-left i {
            margin-top: 2px;
        }

    .ctp-user-filter-pill-text {
        white-space: normal;
        overflow-wrap: anywhere;
        word-break: break-word;
        line-height: 1.25;
        font-size: .92rem;
    }

    .ctp-user-filter-pill-reset {
        width: 34px;
        height: 34px;
        min-width: 34px;
        border-radius: 10px;
    }

        .ctp-user-filter-pill-reset:hover {
            color: white !important;
        }
}

@media (max-width: 575.98px) {
    .ctp-user-filter-pill {
        min-height: 0;
        padding: 10px 10px 10px 12px;
    }

    .ctp-user-filter-pill-text {
        font-size: .88rem;
    }

    .ctp-user-filter-pill-reset {
        width: 36px;
        height: 36px;
        min-width: 36px;
    }
}

.external-login-btn {
    min-height: 52px;
    font-weight: 600;
    border-radius: .75rem;
}

.spid-btn:hover,
.spid-btn:focus {
    background-color: #0d6efd;
    color: #fff;
}

.unipa-btn:hover,
.unipa-btn:focus {
    background-color: #6c757d;
    color: #fff;
}


/* pagina signDocument */
.sign-document-wrapper {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding-left: 24px;
    padding-right: 24px;
}

.sign-document-card {
    border-radius: 18px;
}

@media (max-width: 768px) {
    .sign-document-wrapper {
        padding-left: 16px;
        padding-right: 16px;
    }
}


/* ACCESIBILITA */
.accessible-field {
    margin-bottom: 1.25rem;
}

.field-label {
    display: inline-block;
    margin-bottom: 0.45rem;
    font-size: 0.95rem;
    font-weight: 300;
    color: #1f2937;
    line-height: 1.2;
}

.input-icon-wrapper {
    position: relative;
}

.field-icon {
    position: absolute;
    top: 50%;
    left: 0.95rem;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #6b7280;
    pointer-events: none;
}

.field-input {
    min-height: 3rem;
    padding-left: 2.75rem;
    border-radius: 0.75rem;
    border: 1px solid #ced4da;
    background-color: #fff;
}

    .field-input:focus {
        border-color: #0d6efd;
        box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.2);
    }

.field-error {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.875rem;
}


/* Accessibilita login */
/* ===== LOGIN ACCESSIBILITY / REFLOW ===== */

.login-page,
.login-page * {
    box-sizing: border-box;
}

.login-panel,
.login-panel-inner,
.login-panel-col,
.login-hero,
.login-hero-content,
.auth-form,
.auth-field,
.auth-input-wrap,
.logos-wrap {
    max-width: 100%;
    min-width: 0;
}

.login-header {
    gap: 1rem;
}

    .login-header > * {
        min-width: 0;
    }

.login-hero-title,
.login-hero-text,
#login-title,
.login-intro p,
.auth-label,
.auth-error,
.validation-summary-errors {
    overflow-wrap: anywhere;
    word-break: normal;
}

.logos-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.login-logo {
    max-width: 100%;
    height: auto;
}

/* ===== FORM ===== */

.auth-form {
    width: 100%;
}

.auth-field {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 1rem;
}

.auth-label {
    display: block;
    width: 100%;
    margin-bottom: 0.45rem;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.25;
    color: #212529;
}

.auth-input-wrap {
    position: relative;
    width: 100%;
}

.auth-input-icon {
    position: absolute;
    top: 50%;
    left: 0.875rem;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6c757d;
    font-size: 1rem;
}

.auth-input {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 3rem;
    padding-left: 2.5rem;
    padding-right: 0.875rem;
}

.auth-error {
    display: block;
    width: 100%;
    margin-top: 0.35rem;
    font-size: 0.875rem;
}

.validation-summary-errors {
    width: 100%;
}

/* Focus ben visibile */
.auth-input:focus,
.login-links a:focus,
.login-submit-btn:focus {
    outline: 3px solid rgba(13, 110, 253, 0.35);
    outline-offset: 2px;
}

/* Evita overflow da classi custom layout */
.login-page .sw-lg-70,
.login-page .sw-lg-50 {
    max-width: 100%;
    min-width: 0;
}

/* Mobile / small width */
@media (max-width: 575.98px) {
    .login-page .display-3 {
        font-size: 2rem;
    }

    .login-page .display-6 {
        font-size: 1.125rem;
    }

    .login-panel {
        margin-top: 1.5rem !important;
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    .login-logo {
        max-height: 42px;
        width: auto;
    }
}



/* ACCESSIBILITA NAVBAR MENU */

/*.menu-container a,
.menu-container button,
.menu-container .dropdown-item {
    position: relative;
    border-radius: 10px;
    transition: background-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

    .menu-container a:focus,
    .menu-container button:focus,
    .menu-container .dropdown-item:focus {
        outline: none;
    }

.using-keyboard .menu-container a:focus-visible,
.using-keyboard .menu-container button:focus-visible,
.using-keyboard .menu-container .dropdown-item:focus-visible {
    background-color: rgba(10, 157, 163, 0.14);
    box-shadow: 0 0 0 2px #0A9DA3, 0 0 0 5px rgba(10, 157, 163, 0.24);
    text-decoration: none;
    color: inherit;
}

    .using-keyboard .menu-container a:focus-visible .icon,
    .using-keyboard .menu-container a:focus-visible .bi,
    .using-keyboard .menu-container button:focus-visible .icon,
    .using-keyboard .menu-container button:focus-visible .bi {
        transform: scale(1.04);
        transition: transform 0.18s ease;
    }

.menu-container a:hover,
.menu-container button:hover,
.menu-container .dropdown-item:hover {
    background-color: rgba(10, 157, 163, 0.08);
    text-decoration: none;
}

.using-keyboard .menu-container a[href^="#"]:focus-visible {
    box-shadow: 0 0 0 2px #087C81, 0 0 0 5px rgba(8, 124, 129, 0.22);
}

.menu-container li,
.menu-container ul,
.menu-container .dropdown-menu {
    overflow: visible;
}*/


:root {
    /* C.M - 19/06/2026: allineato al primary AAA #065c60 (contorno focus da tastiera). */
    --focus-accent: #065c60;
    --focus-accent-soft: rgba(6, 92, 96, 0.22);
    --focus-white-soft: rgba(255, 255, 255, 0.38);
    --focus-radius: 12px;
    --focus-transition: 0.16s ease;
}

/* Transizione base sugli elementi interattivi */
a,
button,
input,
select,
textarea,
summary,
[role="button"],
[role="link"],
[role="menuitem"],
[role="tab"],
[role="checkbox"],
[role="radio"],
[tabindex]:not([tabindex="-1"]),
.form-check-input,
.form-select,
.form-control,
.dropdown-item,
.page-link,
.breadcrumb a,
.btn,
.nav-link {
    transition: outline-color var(--focus-transition), box-shadow var(--focus-transition), background-color var(--focus-transition), border-color var(--focus-transition), color var(--focus-transition), transform var(--focus-transition);
}

/* Togliamo il focus standard solo quando usiamo quello custom */
.using-keyboard a:focus,
.using-keyboard button:focus,
.using-keyboard input:focus,
.using-keyboard select:focus,
.using-keyboard textarea:focus,
.using-keyboard summary:focus,
.using-keyboard [role="button"]:focus,
.using-keyboard [role="link"]:focus,
.using-keyboard [role="menuitem"]:focus,
.using-keyboard [role="tab"]:focus,
.using-keyboard [role="checkbox"]:focus,
.using-keyboard [role="radio"]:focus,
.using-keyboard [tabindex]:not([tabindex="-1"]):focus,
.using-keyboard .form-check-input:focus,
.using-keyboard .form-select:focus,
.using-keyboard .form-control:focus,
.using-keyboard .dropdown-item:focus,
.using-keyboard .page-link:focus,
.using-keyboard .breadcrumb a:focus,
.using-keyboard .btn:focus,
.using-keyboard .nav-link:focus {
    outline: none !important;
}

/* Classe applicata via JS all'elemento effettivamente focusato */
.using-keyboard .focus-ring-active {
    position: relative;
    z-index: 2;
    border-radius: var(--focus-radius);
    text-decoration: none;
}

    /* Focus per sfondi chiari */
    .using-keyboard .focus-ring-active.focus-on-light {
        outline: 2px solid var(--focus-accent) !important;
        outline-offset: 2px;
        box-shadow: 0 0 0 5px var(--focus-accent-soft) !important;
    }

    /* Focus per sfondi scuri o colorati */
    .using-keyboard .focus-ring-active.focus-on-dark {
        outline: 2px solid #ffffff !important;
        outline-offset: 2px;
        box-shadow: 0 0 0 5px var(--focus-white-soft) !important;
    }

/* Hover leggero, indipendente dal focus */
a:hover,
button:hover,
.btn:hover,
.dropdown-item:hover,
.page-link:hover,
.nav-link:hover,
.breadcrumb a:hover {
    text-decoration: none;
}

/* Icone interne allelemento focusato */
.using-keyboard .focus-ring-active .icon,
.using-keyboard .focus-ring-active .bi,
.using-keyboard .focus-ring-active svg,
.using-keyboard .focus-ring-active i {
    transform: scale(1.04);
}

/* Input, select e textarea */
.using-keyboard input.focus-ring-active,
.using-keyboard select.focus-ring-active,
.using-keyboard textarea.focus-ring-active,
.using-keyboard .form-control.focus-ring-active,
.using-keyboard .form-select.focus-ring-active {
    background-clip: padding-box;
}

/* Checkbox e radio */
.using-keyboard input[type="checkbox"].focus-ring-active,
.using-keyboard input[type="radio"].focus-ring-active,
.using-keyboard .form-check-input.focus-ring-active {
    outline-offset: 3px;
    border-radius: 6px;
}

/* Radio più rotondo */
.using-keyboard input[type="radio"].focus-ring-active {
    border-radius: 50%;
}

/* Breadcrumb */
.using-keyboard .breadcrumb .focus-ring-active {
    border-radius: 8px;
    padding: 2px 4px;
}

/* Dropdown, page link, badge cliccabili, elementi bootstrap */
.using-keyboard .dropdown-item.focus-ring-active,
.using-keyboard .page-link.focus-ring-active,
.using-keyboard .btn.focus-ring-active,
.using-keyboard .nav-link.focus-ring-active {
    border-radius: 10px;
}

/* Se il focus cade su elementi inline puri, rendiamoli meglio evidenziabili */
.using-keyboard a.focus-ring-active,
.using-keyboard .breadcrumb a.focus-ring-active,
.using-keyboard [role="link"].focus-ring-active {
    display: inline-block;
}

/* Mantieni visibile il ring anche se i parent hanno layout stretti */
body,
main,
.menu-container,
.card,
.dropdown-menu,
.table-responsive,
.breadcrumb,
nav,
aside,
section,
div,
ul,
li {
    overflow: visible;
}

/* Fallback puro CSS per browser/zone dove il JS non ha ancora applicato la classe */
.using-keyboard a:focus-visible,
.using-keyboard button:focus-visible,
.using-keyboard input:focus-visible,
.using-keyboard select:focus-visible,
.using-keyboard textarea:focus-visible,
.using-keyboard summary:focus-visible,
.using-keyboard [role="button"]:focus-visible,
.using-keyboard [role="link"]:focus-visible,
.using-keyboard [role="menuitem"]:focus-visible,
.using-keyboard [role="tab"]:focus-visible,
.using-keyboard [role="checkbox"]:focus-visible,
.using-keyboard [role="radio"]:focus-visible,
.using-keyboard [tabindex]:not([tabindex="-1"]):focus-visible {
    outline: 2px solid var(--focus-accent);
    outline-offset: 2px;
}




/* Render Consenso Informato */
/* Modale consenso */
.consent-modal .modal-dialog {
    max-width: 1000px;
}

.consent-modal .modal-content {
    border: 0;
    border-radius: 1rem;
    overflow: hidden;
}

.consent-modal .modal-body {
    padding: 1.25rem;
    background: #fff;
}

.consent-document {
    color: #212529;
    font-size: 1rem;
    line-height: 1.6;
    word-break: break-word;
}

    .consent-document * {
        max-width: 100%;
        box-sizing: border-box;
    }

    .consent-document > :first-child {
        margin-top: 0;
    }

    .consent-document > :last-child {
        margin-bottom: 0;
    }

    .consent-document h1,
    .consent-document h2,
    .consent-document h3,
    .consent-document h4,
    .consent-document h5,
    .consent-document h6 {
        margin-top: 1.25rem;
        margin-bottom: .75rem;
        font-weight: 700;
        line-height: 1.3;
        color: inherit;
    }

    .consent-document h1 {
        font-size: 1.8rem;
    }

    .consent-document h2 {
        font-size: 1.55rem;
    }

    .consent-document h3 {
        font-size: 1.35rem;
    }

    .consent-document h4 {
        font-size: 1.2rem;
    }

    .consent-document h5 {
        font-size: 1.05rem;
    }

    .consent-document h6 {
        font-size: 1rem;
    }

    .consent-document p {
        margin-bottom: 1rem;
    }

    .consent-document ul,
    .consent-document ol {
        margin-bottom: 1rem;
        padding-left: 1.5rem;
    }

    .consent-document li {
        margin-bottom: .35rem;
    }

    .consent-document strong,
    .consent-document b {
        font-weight: 700;
    }

    .consent-document em,
    .consent-document i {
        font-style: italic;
    }

    .consent-document u {
        text-decoration: underline;
    }

    .consent-document a {
        color: var(--bs-primary);
        text-decoration: underline;
    }

    .consent-document blockquote {
        margin: 1rem 0;
        padding: .75rem 1rem;
        border-left: 4px solid #0d6efd;
        background: #f8f9fa;
    }

    .consent-document hr {
        margin: 1.25rem 0;
        opacity: .2;
    }

    .consent-document table {
        width: 100%;
        border-collapse: collapse;
        margin-bottom: 1rem;
        display: block;
        overflow-x: auto;
    }

        .consent-document table th,
        .consent-document table td {
            border: 1px solid #dee2e6;
            padding: .65rem;
            vertical-align: top;
        }

    .consent-document img {
        height: auto;
        border-radius: .5rem;
    }

    .consent-document span[style],
    .consent-document p[style],
    .consent-document div[style] {
        max-width: 100%;
    }

/* Stato consenso */
.consent-status-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .55rem .95rem;
    border-radius: 999px;
    font-size: .85rem;
    font-weight: 700;
    line-height: 1;
    border: 1px solid transparent;
    white-space: nowrap;
}

.consent-status-pill--accepted {
    background-color: #eaf7ef;
    color: #146c43;
    border-color: rgba(20, 108, 67, 0.18);
}

.consent-status-pill--pending {
    background-color: #fff4db;
    color: #8a5a00;
    border-color: rgba(138, 90, 0, 0.18);
}

.consent-modal-warning {
    text-align: left;
}

#btnRevocaConsensoModal {
    font-weight: 600;
}

/* Lista utenti associati */
.associated-users-head,
.associated-users-row {
    font-size: 0.98rem;
}

    .associated-users-row > div {
        padding-right: 0.75rem;
    }

.associated-users-actions .btn {
    white-space: nowrap;
    min-width: 160px;
}

/* Responsive */
@media (max-width: 767.98px) {
    #bottoniConsenso,
    #bottoniConsenso.show-consent-actions {
        width: 100%;
        justify-content: stretch;
        flex-direction: column;
    }

        #bottoniConsenso .btn,
        #btnIndietro,
        #btnRevocaConsensoModal {
            width: 100%;
        }
}

@media (min-width: 992px) {
    .associated-users-actions {
        align-items: center;
    }
}

/* fix grafico della modale del consenso */
#bottoniConsenso {
    display: none;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

    #bottoniConsenso.show-consent-actions {
        display: flex;
    }

@media (max-width: 767.98px) {
    #consensoModal .modal-dialog {
        margin: 0.75rem;
    }

    #consensoModal .modal-content {
        max-height: 92vh;
    }

    #bottoniConsenso,
    #bottoniConsenso.show-consent-actions {
        width: 100%;
        justify-content: stretch;
        flex-direction: column;
    }

        #bottoniConsenso .btn,
        #btnIndietro {
            width: 100%;
        }
}

.consent-scroll-box {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: .75rem;
    padding: 1rem;
    background: #fff;
}


/* griglia adesioni caregiver */
.associated-users-actions {
    display: flex;
    gap: .5rem;
    align-items: center;
}

    /* BOTTONI */
    .associated-users-actions .btn {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

/* DESKTOP */
@media (min-width: 992px) {
    .associated-users-actions {
        justify-content: flex-end;
        flex-wrap: nowrap;
    }

        .associated-users-actions .btn {
            flex: 1 1 0;
            max-width: 50%;
        }
}

/* MOBILE */
@media (max-width: 991.98px) {
    .associated-users-actions {
        flex-direction: column;
        align-items: stretch;
    }

        .associated-users-actions .btn {
            width: 100%;
        }
}





.legal-code-input {
    width: 100%;
}

.legal-action-btn {
    width: 100%;
    min-height: 38px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 767.98px) {
    .legal-action-btn {
        white-space: normal;
    }
}

.consent-document > :first-child {
    margin-top: 0;
}

.consent-document > :last-child {
    margin-bottom: 0;
}

.consent-document div[style],
.consent-document p[style],
.consent-document span[style] {
    max-width: 100%;
}

.consent-document br + br {
    display: block;
    content: "";
    margin-top: .35rem;
}


.legal-reference-section {
    position: relative;
}

.legal-ref-card,
.legal-ref-list-card {
    background: #fff;
    border: 1px solid #e7edf3;
    border-radius: 1rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
    height: 100%;
}

.legal-ref-card__body,
.legal-ref-list-card__header {
    padding: 1rem 1rem 0 1rem;
}

.legal-ref-card__head {
    display: flex;
    align-items: flex-start;
    gap: .85rem;
    margin-bottom: 1rem;
}

.legal-ref-card__icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(13,110,253,.08), rgba(13,110,253,.16));
    color: var(--bs-primary);
    font-size: 1.1rem;
    flex-shrink: 0;
}

.legal-ref-card__title {
    font-size: 1rem;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.legal-ref-card__subtitle {
    font-size: .88rem;
    color: #6b7280;
    margin-top: .2rem;
}

.legal-ref-card__content {
    padding: 0 1rem 1rem 1rem;
}

.legal-ref-code {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: .85rem;
    padding: .85rem 1rem;
    margin-bottom: .9rem;
}

.legal-ref-code__label {
    display: block;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: #6b7280;
    margin-bottom: .25rem;
}

.legal-ref-code__value {
    display: block;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1f2937;
    letter-spacing: .02em;
}

.legal-ref-card__actions,
.legal-ref-list__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .6rem;
    align-items: center;
    justify-content: space-between;
}

.legal-ref-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .45rem .75rem;
    border-radius: 999px;
    font-size: .82rem;
    font-weight: 700;
    line-height: 1;
    border: 1px solid transparent;
    white-space: nowrap;
}

.legal-ref-badge--success {
    background: #ebf8ef;
    color: #1d7a46;
    border-color: rgba(29, 122, 70, 0.16);
}

.legal-ref-badge--muted {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #e5e7eb;
}

.legal-ref-badge--danger {
    background: #fdecec;
    color: #b42318;
    border-color: rgba(180, 35, 24, 0.16);
}

.legal-ref-btn {
    min-height: 40px;
    border-radius: .8rem;
    padding: .55rem .95rem;
    white-space: nowrap;
}

.legal-ref-list {
    padding: 0 1rem 1rem 1rem;
}

.legal-ref-list__item--cardlike {
    padding: 1rem 0;
    border-top: 1px solid #eef2f7;
}

    .legal-ref-list__item--cardlike:first-child {
        border-top: 0;
        padding-top: .25rem;
    }

    .legal-ref-list__item--cardlike .legal-ref-code {
        margin-bottom: .9rem;
    }

    .legal-ref-list__item--cardlike .legal-ref-card__actions {
        display: flex;
        flex-wrap: wrap;
        gap: .6rem;
        align-items: center;
        justify-content: space-between;
    }

.legal-ref-card,
.legal-ref-list-card {
    background: #fff;
    border: 1px solid #e7edf3;
    border-radius: 1rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
    height: 100%;
    min-height: 280px;
}




.consent-revoke-btn {
    font-weight: 700;
    border-radius: .85rem;
    padding: .65rem 1.1rem;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.18);
}

    .consent-revoke-btn:hover,
    .consent-revoke-btn:focus {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(220, 53, 69, 0.28);
    }



/*.consent-revoke-warning-text {
    font-size: .9rem;
    font-weight: 600;
    color: #b02a37;
}*/

.consent-revoke-inline {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .75rem;
    flex-wrap: wrap;
}

.consent-revoke-confirm {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.consent-revoke-btn {
    font-weight: 700;
    border-radius: .85rem;
    padding: .65rem 1.1rem;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.18);
}

    .consent-revoke-btn:hover,
    .consent-revoke-btn:focus {
        transform: translateY(-1px);
        box-shadow: 0 8px 18px rgba(220, 53, 69, 0.28);
    }

@media (max-width: 767.98px) {
    .consent-revoke-inline,
    .consent-revoke-confirm {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

        .consent-revoke-inline .btn,
        .consent-revoke-confirm .btn {
            width: 100%;
        }
}


/* =========================
   REGISTER - CONSENSO MODAL FIX
   ========================= */

#consensoModal.register-consent-modal.show {
    display: block !important;
    overflow-y: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#consensoModal.register-consent-modal .modal-dialog {
    margin: 1rem auto;
    max-width: min(1140px, calc(100vw - 2rem));
    transform: none !important;
}

#consensoModal.register-consent-modal .modal-content {
    max-height: calc(100vh - 2rem);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#consensoModal.register-consent-modal .modal-header,
#consensoModal.register-consent-modal .modal-footer {
    flex: 0 0 auto;
}

#consensoModal.register-consent-modal .register-consent-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto !important;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

#consensoModal.register-consent-modal #bottoniConsenso {
    display: none;
    align-items: center;
    justify-content: flex-end;
    gap: .5rem;
}

    #consensoModal.register-consent-modal #bottoniConsenso.show-consent-actions {
        display: flex;
    }

@media (max-width: 767.98px) {
    #consensoModal.register-consent-modal .modal-dialog {
        margin: .75rem;
        max-width: calc(100vw - 1.5rem);
    }

    #consensoModal.register-consent-modal .modal-content {
        max-height: calc(100vh - 1.5rem);
    }

    #consensoModal.register-consent-modal #bottoniConsenso,
    #consensoModal.register-consent-modal #bottoniConsenso.show-consent-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

        #consensoModal.register-consent-modal #bottoniConsenso .btn,
        #consensoModal.register-consent-modal #btnIndietro {
            width: 100%;
        }
}

#consensoModal .modal-body {
    overflow-y: hidden!important;
    min-height: 0;
}



/* =========================================================
   CTP - GLOBAL COLOR OVERRIDES
    FIX CONTRASTO COLORI PRINCIPALI
   Da tenere SEMPRE in fondo al file CSS
   ========================================================= */

:root {
    /* C.M - 19/06/2026: contrasto rinforzato AAA (richiesta cliente - accessibilità).
       --ctp-primary: era #0a9da3 (bianco 3.3:1) -> #065c60 (bianco 7.8:1, AAA).
       --ctp-muted:   era #6f7f89 (su bianco 4.1:1) -> #4a4e52 (su bianco 8.4:1, AAA). */
    --ctp-primary: #065c60;
    --ctp-primary-rgb: 6, 92, 96;
    --ctp-primary-hover: #054b4e;
    --ctp-primary-soft: rgba(6, 92, 96, 0.12);
    --ctp-muted: #4a4e52;
    --ctp-muted-rgb: 74, 78, 82;
    --bs-primary: var(--ctp-primary);
    --bs-primary-rgb: var(--ctp-primary-rgb);
    --primary: var(--ctp-primary);
    --primary-rgb: var(--ctp-primary-rgb);
    --text-muted: var(--ctp-muted);
    --muted: var(--ctp-muted);
    --muted-rgb: var(--ctp-muted-rgb);
}

/* Primary globale */
.text-primary,
.primary,
.text-primary-hover:hover {
    color: var(--ctp-primary) !important;
}

.bg-primary,
.background-primary,
.btn-primary,
.badge.bg-primary {
    background-color: var(--ctp-primary) !important;
    border-color: var(--ctp-primary) !important;
}

.border-primary,
.btn-outline-primary,
.form-check-input:checked {
    border-color: var(--ctp-primary) !important;
}

.btn-primary {
    color: #fff !important;
}

    .btn-primary:hover,
    .btn-primary:focus,
    .btn-primary:active {
        background-color: var(--ctp-primary-hover) !important;
        border-color: var(--ctp-primary-hover) !important;
        color: #fff !important;
    }

.btn-outline-primary {
    color: var(--ctp-primary) !important;
    border-color: var(--ctp-primary) !important;
}

    .btn-outline-primary:hover,
    .btn-outline-primary:focus,
    .btn-outline-primary:active {
        background-color: var(--ctp-primary) !important;
        border-color: var(--ctp-primary) !important;
        color: #fff !important;
    }

a {
    color: var(--ctp-primary);
}

    a:hover {
        color: var(--ctp-primary-hover);
    }

/* Muted globale */
.text-muted,
.text-alternate,
.subtitle,
.results-subtitle,
.ctp-subline {
    color: var(--ctp-muted) !important;
}

.form-control::placeholder,
.form-select::placeholder {
    color: var(--ctp-muted) !important;
    opacity: 0.85;
}

/* Focus globale */
.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.btn:focus,
.page-link:focus {
    border-color: var(--ctp-primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(var(--ctp-primary-rgb), 0.25) !important;
}

/* Componenti custom con primary */
.progress-circle {
    background: conic-gradient( var(--ctp-primary) calc(var(--percentage) * 1%), #e9ecef 0 ) !important;
}

    .progress-circle .percentage {
        color: var(--ctp-primary) !important;
    }

/* Fix colori hardcoded */
.results-top-icon,
.results-icon,
.results-value,
.legal-ref-card__icon {
    color: var(--ctp-primary) !important;
}

.results-card {
    border-color: var(--ctp-primary) !important;
    border-left-color: var(--ctp-primary) !important;
}

.results-alert {
    background-color: var(--ctp-primary-soft) !important;
}

.ctp-readonly-option-pill {
    background-color: var(--ctp-primary-soft) !important;
    color: var(--ctp-primary) !important;
    border-color: rgba(var(--ctp-primary-rgb), 0.35) !important;
}

input[type="radio"][name="selectedResearcher"]:checked + label.researcher-card {
    background-color: var(--ctp-primary-soft) !important;
    border-color: var(--ctp-primary) !important;
    border-left-color: var(--ctp-primary) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--ctp-primary-rgb), 0.25) !important;
}

.researcher-card:hover {
    background-color: rgba(var(--ctp-primary-rgb), 0.08) !important;
}

.btn-outline-primary.bg-white:hover,
.btn-outline-primary.bg-white:focus {
    background-color: var(--ctp-primary) !important;
    border-color: var(--ctp-primary) !important;
    color: #fff !important;
}

.sb-assigned .sb-icon-value,
.sb-assigned .sb-icon-value i {
    color: var(--ctp-primary) !important;
}


/* =========================================================
   CTP - NAVBAR THEME OVERRIDE
   Forza il colore della sidebar del template
   ========================================================= */

:root {
    /* C.M - 19/06/2026: allineato al contrasto rinforzato AAA (vedi blocco sopra).
       Questo blocco colora la sidebar (.nav-container) e vince perché più in basso. */
    --ctp-primary: #065c60;
    --ctp-primary-rgb: 6, 92, 96;
    --ctp-primary-hover: #054b4e;
    --ctp-primary-dark: #04484b;
}

/* Sidebar / navbar laterale */
#nav.nav-container,
.nav-container,
html[data-placement="vertical"] .nav-container,
html[data-placement="horizontal"] .nav-container.mobile-side-ready,
html[data-placement="vertical"] .nav-container.mobile-side-ready {
    background-color: var(--ctp-primary) !important;
}

    /* Contenitore interno navbar */
    #nav .nav-content,
    .nav-container .nav-content {
        background-color: var(--ctp-primary) !important;
    }

    /* Ombra laterale */
    #nav .nav-shadow,
    .nav-container .nav-shadow {
        background: linear-gradient( 90deg, rgba(var(--ctp-primary-rgb), 0.30), rgba(var(--ctp-primary-rgb), 0) ) !important;
    }

/* Link menu - solo testo/colore, senza forzare fill/stroke */
#nav .menu a,
#nav .menu button,
#nav .menu .label,
#nav .menu-icons a,
#nav .pin-button,
#mobileMenuButton,
#scrollSpyButton {
    color: rgba(255, 255, 255, 0.92) !important;
}

    /* Icone menu: mantieni stile lineare/elegante */
    #nav .menu .icon,
    #nav .menu i,
    #nav .menu svg,
    #nav .menu-icons i,
    #nav .pin-button i,
    #mobileMenuButton i,
    #scrollSpyButton i {
        color: rgba(255, 255, 255, 0.88) !important;
    }

        /* SVG Acorn / icone lineari: evita effetto icona piena */
        #nav .menu svg,
        #nav .menu .icon svg,
        #nav .menu-icons svg {
            fill: none !important;
            stroke: currentColor !important;
        }

            /* Se alcuni path interni vengono riempiti dal CSS precedente */
            #nav .menu svg path,
            #nav .menu .icon svg path,
            #nav .menu-icons svg path {
                fill: none !important;
                stroke: currentColor !important;
            }

/* Testo leggermente pi� bianco rispetto alle icone */
#nav .menu .label {
    color: rgba(255, 255, 255, 0.96) !important;
}

/* Hover voci menu pi� morbido */
#nav .menu a:hover,
#nav .menu button:hover,
#nav .menu-icons a:hover,
#mobileMenuButton:hover,
#scrollSpyButton:hover {
    background-color: rgba(255, 255, 255, 0.10) !important;
    color: #ffffff !important;
}

    /* Icone in hover */
    #nav .menu a:hover .icon,
    #nav .menu a:hover i,
    #nav .menu button:hover .icon,
    #nav .menu button:hover i {
        color: #ffffff !important;
    }

/* Voce attiva/aperta pi� soft */
#nav .menu li.active > a,
#nav .menu li.open > a,
#nav .menu li.show > a,
#nav .menu a.active,
#nav .menu a[aria-expanded="true"] {
    background-color: rgba(255, 255, 255, 0.14) !important;
    color: #ffffff !important;
}

    /* Hover voci menu */
    #nav .menu a:hover,
    #nav .menu button:hover,
    #nav .menu-icons a:hover,
    #mobileMenuButton:hover,
    #scrollSpyButton:hover {
        background-color: rgba(255, 255, 255, 0.14) !important;
        color: #ffffff !important;
    }

    /* Voce attiva/aperta */
    #nav .menu li.active > a,
    #nav .menu li.open > a,
    #nav .menu li.show > a,
    #nav .menu a.active,
    #nav .menu a[aria-expanded="true"] {
        background-color: rgba(255, 255, 255, 0.20) !important;
        color: #ffffff !important;
    }

/* Sottomenu */
#nav .menu ul {
    background-color: rgba(0, 0, 0, 0.08) !important;
}

/* Bottone modulo selezionato: es. CTP */
#selectedModuleBtn,
#moduleDropdownWrapper .btn {
    background-color: rgba(255, 255, 255, 0.18) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: #ffffff !important;
}

    #selectedModuleBtn:hover,
    #moduleDropdownWrapper .btn:hover {
        background-color: rgba(255, 255, 255, 0.28) !important;
        color: #ffffff !important;
    }

/* Dropdown cambio modulo */
#moduleDropdownWrapper .dropdown-menu {
    background-color: #ffffff !important;
}

#moduleDropdownWrapper .dropdown-item {
    color: #212529 !important;
}

    #moduleDropdownWrapper .dropdown-item:hover {
        background-color: rgba(var(--ctp-primary-rgb), 0.10) !important;
        color: var(--ctp-primary-dark) !important;
    }

/* =========================================================
   CTP - NAVBAR ICONS REFINEMENT
   Mantiene icone eleganti/lineari senza riempimento forzato
   ========================================================= */

#nav .menu a,
#nav .menu button,
#nav .menu .label,
#nav .menu-icons a,
#nav .pin-button,
#mobileMenuButton,
#scrollSpyButton {
    color: rgba(255, 255, 255, 0.94) !important;
}

    #nav .menu .icon,
    #nav .menu i,
    #nav .menu svg,
    #nav .menu-icons i,
    #nav .pin-button i,
    #mobileMenuButton i,
    #scrollSpyButton i {
        color: rgba(255, 255, 255, 0.86) !important;
    }

        /* Acorn icons / SVG custom */
        #nav .menu svg,
        #nav .menu .icon svg,
        #nav .menu-icons svg,
        #nav .user-container svg,
        #nav .ctp-user-avatar svg {
            fill: none !important;
            stroke: currentColor !important;
        }

            /* Path interni SVG */
            #nav .menu svg path,
            #nav .menu .icon svg path,
            #nav .menu-icons svg path,
            #nav .user-container svg path,
            #nav .ctp-user-avatar svg path {
                fill: none !important;
                stroke: currentColor !important;
            }

    /* Bootstrap Icons: niente forzature strane */
    #nav .menu .bi,
    #nav .menu-icons .bi,
    #nav .pin-button .bi,
    #nav .ctp-user-avatar .bi {
        color: rgba(255, 255, 255, 0.88) !important;
    }

    /* Hover pi� raffinato */
    #nav .menu a:hover,
    #nav .menu button:hover,
    #nav .menu-icons a:hover,
    #mobileMenuButton:hover,
    #scrollSpyButton:hover {
        background-color: rgba(255, 255, 255, 0.10) !important;
        color: #ffffff !important;
    }

        #nav .menu a:hover .icon,
        #nav .menu a:hover i,
        #nav .menu a:hover svg,
        #nav .menu button:hover .icon,
        #nav .menu button:hover i,
        #nav .menu button:hover svg {
            color: #ffffff !important;
        }


/* =========================================================
   CTP - USER AVATAR RADIAL GRADIENT
   Ripristina cerchio sfumato utente nella navbar
   ========================================================= */

#nav .ctp-user-avatar {
    background: radial-gradient( circle at 35% 28%, rgba(255, 255, 255, 0.32) 0%, rgba(255, 255, 255, 0.20) 34%, rgba(255, 255, 255, 0.10) 62%, rgba(255, 255, 255, 0.04) 100% ) !important;
    border-radius: 50% !important;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.22), 0 8px 18px rgba(0, 0, 0, 0.08) !important;
}

    #nav .ctp-user-avatar i,
    #nav .ctp-user-avatar svg {
        color: #ffffff !important;
    }

    /* Se � una icona custom SVG/Acorn */
    #nav .ctp-user-avatar .icon,
    #nav .ctp-user-avatar .icon-role {
        color: #ffffff !important;
        filter: none !important;
        opacity: 0.98;
    }

/* =========================================================
   CTP - TOOLTIP THEME OVERRIDE
   Tooltip Bootstrap coerenti con primary CTP
   ========================================================= */

:root {
    --ctp-tooltip-bg: var(--ctp-primary-dark);
    --ctp-tooltip-color: #ffffff;
    --ctp-tooltip-border: rgba(var(--ctp-primary-rgb), 0.35);
    --ctp-tooltip-shadow: 0 8px 20px rgba(var(--ctp-primary-rgb), 0.28);
}

/* Box tooltip */
.tooltip {
    opacity: 1 !important;
    pointer-events: none;
    transition: none !important;
}

    /* Corpo tooltip */
    .tooltip .tooltip-inner {
        background-color: var(--ctp-tooltip-bg) !important;
        color: var(--ctp-tooltip-color) !important;
        border: 1px solid var(--ctp-tooltip-border) !important;
        border-radius: 0.65rem !important;
        padding: 0.45rem 0.75rem !important;
        font-size: 0.82rem !important;
        font-weight: 600 !important;
        line-height: 1.25 !important;
        box-shadow: var(--ctp-tooltip-shadow) !important;
        max-width: 260px;
    }

    /* Freccia tooltip - Bootstrap 5 */
    .tooltip.bs-tooltip-top .tooltip-arrow::before,
    .tooltip.bs-tooltip-auto[data-popper-placement^="top"] .tooltip-arrow::before {
        border-top-color: var(--ctp-tooltip-bg) !important;
    }

    .tooltip.bs-tooltip-end .tooltip-arrow::before,
    .tooltip.bs-tooltip-auto[data-popper-placement^="right"] .tooltip-arrow::before {
        border-right-color: var(--ctp-tooltip-bg) !important;
    }

    .tooltip.bs-tooltip-bottom .tooltip-arrow::before,
    .tooltip.bs-tooltip-auto[data-popper-placement^="bottom"] .tooltip-arrow::before {
        border-bottom-color: var(--ctp-tooltip-bg) !important;
    }

    .tooltip.bs-tooltip-start .tooltip-arrow::before,
    .tooltip.bs-tooltip-auto[data-popper-placement^="left"] .tooltip-arrow::before {
        border-left-color: var(--ctp-tooltip-bg) !important;
    }




/* SCOMMENTARE - RIFACIMENTO LOGIN (scommentare anche la section della pagina Account/Login */

/* =========================================================
   LOGIN - HERO SECTION RESTYLE
   ========================================================= */

/*.login-hero-section {
    position: relative;
    overflow: hidden;
    min-height: 620px;
    padding-left: 3rem;
    padding-right: 3rem;
    background: radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.24) 0%, rgba(255, 255, 255, 0.10) 28%, rgba(255, 255, 255, 0.02) 58%, transparent 100%), linear-gradient(135deg, rgba(4, 86, 92, 0.72) 0%, rgba(var(--ctp-primary-rgb), 0.58) 48%, rgba(6, 107, 112, 0.72) 100%);
}

    .login-hero-section::before {
        content: "";
        position: absolute;
        inset: 0;
        background: linear-gradient(90deg, rgba(0, 0, 0, 0.24), rgba(0, 0, 0, 0.04)), rgba(0, 0, 0, 0.12);
        z-index: 0;
    }

    .login-hero-section::after {
        content: "";
        position: absolute;
        width: 340px;
        height: 340px;
        right: -120px;
        bottom: -120px;
        border-radius: 50%;
        background: radial-gradient( circle, rgba(255, 255, 255, 0.20) 0%, rgba(255, 255, 255, 0.08) 42%, transparent 70% );
        z-index: 0;
    }

.login-hero-glass {
    position: relative;
    z-index: 1;
    width: min(100%, 720px);
    margin: auto;
    padding: 3rem;
    border-radius: 1.5rem;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.login-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.85rem;
    margin-bottom: 1.35rem;
    border-radius: 999px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.24);
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

    .login-hero-kicker i {
        font-size: 1rem;
    }

.login-hero-title {
    margin-bottom: 1rem;
    color: #ffffff;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.045em;
    font-size: clamp(2.6rem, 4vw, 4.4rem);
    text-shadow: 0 6px 22px rgba(0, 0, 0, 0.28);
}

    .login-hero-title span {
        display: block;
        color: rgba(255, 255, 255, 0.88);
    }

.login-hero-text {
    max-width: 640px;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.88);
    font-size: clamp(1.08rem, 1.4vw, 1.35rem);
    line-height: 1.6;
    text-shadow: 0 3px 12px rgba(0, 0, 0, 0.22);
}

    .login-hero-text strong {
        color: #ffffff;
        font-weight: 800;
    }

.login-hero-divider {
    width: 72px;
    height: 4px;
    margin: 1.75rem 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
}

.login-hero-features {
    display: grid;
    gap: 0.85rem;
}

.login-hero-feature {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.16);
    color: #ffffff;
}

    .login-hero-feature i {
        flex: 0 0 auto;
        width: 2.25rem;
        height: 2.25rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 0.8rem;
        background: rgba(255, 255, 255, 0.16);
        color: #ffffff;
        font-size: 1.05rem;
    }

    .login-hero-feature strong {
        display: block;
        margin-bottom: 0.15rem;
        color: #ffffff;
        font-size: 0.98rem;
        font-weight: 800;
    }

    .login-hero-feature span {
        display: block;
        color: rgba(255, 255, 255, 0.78);
        font-size: 0.92rem;
        line-height: 1.35;
    }*/

/* Tablet/desktop intermedi */
/*@media (max-width: 1200px) and (min-width: 992px) {
    .login-hero-section {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .login-hero-glass {
        padding: 2.25rem;
    }

    .login-hero-title {
        font-size: 3rem;
    }
}*/

/* Selettore lingua (RF-01) */
.ctp-lang-floating {
    position: fixed;
    top: .75rem;
    right: .75rem;
    /* Sotto il backdrop dei modal (1050): con un modal aperto il selettore resta oscurato come il resto della pagina. */
    z-index: 1040;
    background: rgba(255, 255, 255, .92);
    border-radius: .5rem;
    padding: .25rem .5rem;
    box-shadow: 0 .125rem .5rem rgba(0, 0, 0, .15);
}

/* Utenti autenticati: il selettore scorre con la pagina (non resta sopra i contenuti) ed e' allineato alla riga del breadcrumb. */
.ctp-lang-floating.ctp-lang-inpage {
    position: absolute;
    top: 2.2rem;
    right: 2rem;
}

.ctp-lang-selector .btn {
    min-width: 4.5rem;
}

/* Contrasto dei messaggi informativi e di avviso nel tema chiaro. */
html[data-color^="light-"] .alert-warning {
    color: #604400;
}

/* Gli avvisi che hanno già un'icona mantengono quella esistente. */
html[data-color^="light-"] .alert.alert-warning:not(:has(.bi))::before {
    content: "\26A0\FE0E";
    margin-inline-end: 0.5rem;
}

html[data-color^="light-"] .alert-info {
    color: #064b55;
}

html[data-color^="light-"] .alert-warning .text-muted,
html[data-color^="light-"] .alert-warning a:not(.btn) {
    color: #604400 !important;
}

html[data-color^="light-"] .alert-info .text-muted,
html[data-color^="light-"] .alert-info a:not(.btn) {
    color: #064b55 !important;
}
