.ui-autocomplete {
    z-index: 9999 !important;
}
.isDisabled {
    color: currentColor;
    cursor: not-allowed;
    opacity: 0.5;
    text-decoration: none;
}
/* Toggle notifiche: aspetto "link" pulito (no underline) */
.notif-toggle {
    font-size: 8px;
    text-decoration: none !important;
    color: #4e73df;
    opacity: 0.9;
}
.notif-toggle:hover,
.notif-toggle:focus {
    text-decoration: none !important;
    opacity: 1;
}
.notif-toggle i {
    font-size: 8px;
}

/* =====================================================
   MOBILE / TABLET RESPONSIVE OVERRIDES
   ===================================================== */

/* Riduce padding container su schermi piccoli */
@media (max-width: 767.98px) {
    #content-wrapper .container-fluid,
    #content-wrapper > #content > .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }

    /* Topbar più compatta */
    .topbar {
        padding-left: 8px !important;
        padding-right: 8px !important;
    }

    /* H1/H3 intestazioni pagina più piccole */
    .h3, h1.h3 {
        font-size: 1.1rem !important;
    }
    h4 {
        font-size: 1rem !important;
    }

    /* Bottoni touch-friendly (min 44px height) */
    .btn {
        min-height: 38px;
        padding-top: 6px;
        padding-bottom: 6px;
    }
    .btn-sm {
        min-height: 34px;
    }

    /* Form elements più grandi per touch */
    .form-control, select.form-control {
        font-size: 16px !important; /* evita zoom automatico iOS */
        min-height: 42px;
    }
    .form-control-sm {
        min-height: 36px;
        font-size: 14px !important;
    }

    /* Card header padding ridotto */
    .card-header {
        padding: 0.6rem 0.75rem;
    }
    .card-body {
        padding: 0.75rem;
    }

    /* Tabelle: forza scroll orizzontale */
    .table-responsive {
        -webkit-overflow-scrolling: touch;
    }

    /* Paginazione più compatta */
    .pagination {
        flex-wrap: wrap;
    }
    .page-link {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }

    /* Form filtri: stacked su mobile */
    .form-inline {
        flex-direction: column;
        align-items: stretch !important;
    }
    .form-inline .form-control,
    .form-inline select.form-control,
    .form-inline .btn,
    .form-inline .form-check {
        width: 100% !important;
        margin-right: 0 !important;
        margin-bottom: 8px;
    }
    .form-inline label {
        margin-bottom: 2px;
    }

    /* Modal full-width su mobile */
    .modal-dialog {
        margin: 8px;
    }

    /* Sidebar toggler visibile */
    #sidebarToggleTop {
        font-size: 1.2rem;
        padding: 6px 10px;
    }

    /* Statistiche card dashboard: 2 per riga */
    .col-xl-3.col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Badge testo leggibile */
    .badge {
        font-size: 11px;
        padding: 3px 6px;
    }

    /* Progress bar più alta per leggibilità */
    .progress {
        height: 8px !important;
    }

    /* Nasconde colonne secondarie nelle tabelle workboard */
    .col-mobile-hide {
        display: none !important;
    }

    /* Intestazioni pagina: pulsanti sotto su mobile */
    .d-sm-flex.justify-content-between {
        flex-direction: column;
        gap: 8px;
    }
    .d-sm-flex.justify-content-between > div,
    .d-sm-flex.justify-content-between > a {
        width: 100%;
    }
    .d-sm-flex.justify-content-between .btn {
        width: 100%;
        text-align: center;
    }
}

/* Tablet (768px–991px): colonne secondarie solo nascoste nelle tabelle dense */
@media (min-width: 768px) and (max-width: 991.98px) {
    .col-tablet-hide {
        display: none !important;
    }
    .form-inline .form-control,
    .form-inline select.form-control {
        max-width: 160px;
    }
}

/* Sidebar fissa su mobile — non scorre via */
@media (max-width: 767.98px) {
    #accordionSidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100vh !important;
        overflow-y: auto !important;
        z-index: 1040;
        width: 250px !important;
        transform: translateX(-100%);
        transition: transform .22s ease;
    }
    /* Quando aperta: slide in */
    #wrapper.toggled #accordionSidebar {
        transform: translateX(0);
    }
    /* Il content-wrapper non si sposta mai su mobile */
    #content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
    #wrapper.toggled #content-wrapper {
        margin-left: 0 !important;
    }
}

/* Sidebar fissa su mobile */
@media (max-width: 767.98px) {
    #accordionSidebar {
        position: fixed !important;
        top: 0;
        left: 0;
        height: 100vh !important;
        z-index: 1040;
        overflow-y: auto !important;
        transition: width .2s ease;
    }
    #content-wrapper {
        margin-left: 0 !important;
        width: 100% !important;
    }
    #wrapper.toggled #content-wrapper {
        margin-left: 0 !important;
    }
}

/* FullCalendar mobile */
@media (max-width: 767.98px) {
    .fc-toolbar {
        flex-direction: column !important;
        gap: 6px;
    }
    .fc-toolbar .fc-left,
    .fc-toolbar .fc-center,
    .fc-toolbar .fc-right {
        float: none !important;
        text-align: center;
    }
    .fc-toolbar h2 {
        font-size: 1rem !important;
    }
    .fc-button {
        padding: 4px 8px !important;
        font-size: 0.8rem !important;
    }
    .fc-view-container .fc-event {
        font-size: 10px !important;
    }
}
