.e-grid .e-toolbar {
    position: relative !important;
    z-index: 2 !important;
    height: auto !important;
    min-height: 56px !important;
    padding-block: 6px;
    box-sizing: border-box;
    overflow: visible !important;
}

.e-grid .e-toolbar .e-hscroll,
.e-grid .e-toolbar .e-hscroll-bar,
.e-grid .e-toolbar .e-hscroll-content {
    height: auto !important;
    min-height: 56px !important;
    overflow: visible !important;
}

.e-grid .e-toolbar .e-toolbar-items {
    display: flex !important;
    width: 100% !important;
    min-height: 44px;
    align-items: center !important;
    gap: 8px;
}

.e-grid .e-toolbar .e-toolbar-left {
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    align-items: center !important;
}

.e-grid .e-toolbar .e-toolbar-right {
    display: flex !important;
    flex: 0 0 320px !important;
    width: 320px !important;
    max-width: 320px !important;
    min-width: 240px !important;
    align-items: center !important;
    justify-content: flex-end !important;
    margin-left: auto !important;
    position: static !important;
    overflow: visible !important;
}

.e-grid .e-toolbar .e-toolbar-right .e-toolbar-item {
    width: 100% !important;
    max-width: 100% !important;
    display: flex !important;
    align-items: center !important;
}

.e-grid .e-toolbar .e-toolbar-right .e-search-wrapper,
.e-grid .e-toolbar .e-toolbar-right .e-toolbar-item.e-search-wrapper,
.e-grid .e-toolbar .e-toolbar-right .e-toolbar-item .e-search-wrapper,
.e-grid .e-toolbar .e-toolbar-right .e-input-group.e-search-wrapper {
    display: inline-flex !important;
    align-items: center !important;
    width: 100% !important;
    max-width: 320px !important;
    min-width: 240px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.e-grid .e-toolbar .e-toolbar-left .e-toolbar-item,
.e-grid .e-toolbar .e-toolbar-right .e-toolbar-item {
    position: relative !important;
    z-index: 3 !important;
}

.e-grid .e-gridheader {
    position: relative !important;
    z-index: 1 !important;
    clear: both !important;
    margin-top: 0 !important;
}

@media (max-width: 991.98px) {
    .e-grid .e-toolbar .e-toolbar-items {
        flex-wrap: wrap !important;
    }

    .e-grid .e-toolbar .e-toolbar-right {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
    }

    .e-grid .e-toolbar .e-toolbar-right .e-search-wrapper,
    .e-grid .e-toolbar .e-toolbar-right .e-toolbar-item.e-search-wrapper,
    .e-grid .e-toolbar .e-toolbar-right .e-toolbar-item .e-search-wrapper,
    .e-grid .e-toolbar .e-toolbar-right .e-input-group.e-search-wrapper {
        max-width: none !important;
        width: 100% !important;
    }
}

/* Grid toolbar search: uniforma sfondo e rimuove ombre/fasce indesiderate */
.e-grid .e-toolbar .e-toolbar-right .e-search-wrapper,
.e-grid .e-toolbar .e-toolbar-right .e-input-group.e-search-wrapper,
.e-grid .e-toolbar .e-toolbar-right .e-toolbar-item .e-search-wrapper,
.e-grid .e-toolbar .e-toolbar-right .e-search,
.e-grid .e-toolbar .e-search-wrapper,
.e-grid .e-toolbar .e-input-group.e-search-wrapper {
    background: rgba(56, 56, 54, 0.96) !important;
    background-color: rgba(56, 56, 54, 0.96) !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    border-radius: 999px !important;
    box-shadow: none !important;
    outline: none !important;
    overflow: hidden !important;
}

.e-grid .e-toolbar .e-search-wrapper::before,
.e-grid .e-toolbar .e-search-wrapper::after,
.e-grid .e-toolbar .e-input-group.e-search-wrapper::before,
.e-grid .e-toolbar .e-input-group.e-search-wrapper::after,
.e-grid .e-toolbar .e-input-group::before,
.e-grid .e-toolbar .e-input-group::after {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

.e-grid .e-toolbar .e-search-wrapper.e-input-focus,
.e-grid .e-toolbar .e-input-group.e-search-wrapper.e-input-focus,
.e-grid .e-toolbar .e-search-wrapper:focus-within,
.e-grid .e-toolbar .e-input-group.e-search-wrapper:focus-within {
    background: rgba(56, 56, 54, 0.96) !important;
    background-color: rgba(56, 56, 54, 0.96) !important;
    border-color: rgba(236, 0, 140, 0.58) !important;
    box-shadow: none !important;
}

.e-grid .e-toolbar .e-search-wrapper input,
.e-grid .e-toolbar .e-search-wrapper .e-input,
.e-grid .e-toolbar .e-input-group.e-search-wrapper input,
.e-grid .e-toolbar .e-input-group.e-search-wrapper .e-input {
    background: transparent !important;
    background-color: transparent !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ec008c !important;
    box-shadow: none !important;
    outline: none !important;
}

.e-grid .e-toolbar .e-search-wrapper input::placeholder,
.e-grid .e-toolbar .e-input-group.e-search-wrapper input::placeholder {
    color: rgba(255, 255, 255, 0.64) !important;
    opacity: 1 !important;
}

.e-grid .e-toolbar .e-search-wrapper .e-search-icon,
.e-grid .e-toolbar .e-search-wrapper .e-icons,
.e-grid .e-toolbar .e-search-wrapper .e-input-group-icon,
.e-grid .e-toolbar .e-input-group.e-search-wrapper .e-search-icon,
.e-grid .e-toolbar .e-input-group.e-search-wrapper .e-icons,
.e-grid .e-toolbar .e-input-group.e-search-wrapper .e-input-group-icon {
    color: rgba(255, 255, 255, 0.82) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.82) !important;
    background: transparent !important;
    box-shadow: none !important;
}

.e-grid .e-toolbar .e-search-wrapper .e-clear-icon,
.e-grid .e-toolbar .e-input-group.e-search-wrapper .e-clear-icon,
.e-grid .e-toolbar .e-search-wrapper .e-searchclear,
.e-grid .e-toolbar .e-input-group.e-search-wrapper .e-searchclear {
    color: rgba(255, 255, 255, 0.72) !important;
    -webkit-text-fill-color: rgba(255, 255, 255, 0.72) !important;
    background: transparent !important;
    box-shadow: none !important;
}

/* Grid toolbar: rimuove fasce/ombre generate dai wrapper interni Syncfusion */
.e-grid .e-toolbar .e-toolbar-items,
.e-grid .e-toolbar .e-hscroll,
.e-grid .e-toolbar .e-hscroll-bar,
.e-grid .e-toolbar .e-hscroll-content,
.e-grid .e-toolbar .e-toolbar-left,
.e-grid .e-toolbar .e-toolbar-right,
.e-grid .e-toolbar .e-toolbar-item,
.e-grid .e-toolbar .e-template {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

/* Rimuove linee/pseudo-elementi che possono creare fasce */
.e-grid .e-toolbar::before,
.e-grid .e-toolbar::after,
.e-grid .e-toolbar .e-toolbar-items::before,
.e-grid .e-toolbar .e-toolbar-items::after,
.e-grid .e-toolbar .e-hscroll::before,
.e-grid .e-toolbar .e-hscroll::after,
.e-grid .e-toolbar .e-hscroll-bar::before,
.e-grid .e-toolbar .e-hscroll-bar::after,
.e-grid .e-toolbar .e-hscroll-content::before,
.e-grid .e-toolbar .e-hscroll-content::after,
.e-grid .e-toolbar .e-toolbar-left::before,
.e-grid .e-toolbar .e-toolbar-left::after,
.e-grid .e-toolbar .e-toolbar-right::before,
.e-grid .e-toolbar .e-toolbar-right::after,
.e-grid .e-toolbar .e-toolbar-item::before,
.e-grid .e-toolbar .e-toolbar-item::after {
    background: transparent !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Eventuali separatori/scroll toolbar non devono creare blocchi chiari */
.e-grid .e-toolbar .e-hor-nav,
.e-grid .e-toolbar .e-scroll-nav,
.e-grid .e-toolbar .e-nav-active {
    background: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
    border-color: transparent !important;
}

/* Non toccare lo stile dei pulsanti, della searchbar e dell'header */

/* Grid toolbar search: impedisce background chiaro quando il campo e valorizzato/autofillato */
.e-grid .e-toolbar .e-search-wrapper input,
.e-grid .e-toolbar .e-search-wrapper input[type="text"],
.e-grid .e-toolbar .e-search-wrapper input[type="search"],
.e-grid .e-toolbar .e-input-group.e-search-wrapper input,
.e-grid .e-toolbar .e-input-group.e-search-wrapper input[type="text"],
.e-grid .e-toolbar .e-input-group.e-search-wrapper input[type="search"],
.e-grid .e-toolbar .e-search input,
.e-grid .e-toolbar .e-search input[type="text"],
.e-grid .e-toolbar .e-search input[type="search"] {
    background: transparent !important;
    background-color: transparent !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ec008c !important;
    box-shadow: none !important;
    outline: none !important;
}

/* Chrome autofill/autocomplete: elimina il classico sfondo azzurrino */
.e-grid .e-toolbar .e-search-wrapper input:-webkit-autofill,
.e-grid .e-toolbar .e-search-wrapper input:-webkit-autofill:hover,
.e-grid .e-toolbar .e-search-wrapper input:-webkit-autofill:focus,
.e-grid .e-toolbar .e-search-wrapper input:-webkit-autofill:active,
.e-grid .e-toolbar .e-input-group.e-search-wrapper input:-webkit-autofill,
.e-grid .e-toolbar .e-input-group.e-search-wrapper input:-webkit-autofill:hover,
.e-grid .e-toolbar .e-input-group.e-search-wrapper input:-webkit-autofill:focus,
.e-grid .e-toolbar .e-input-group.e-search-wrapper input:-webkit-autofill:active,
.e-grid .e-toolbar .e-search input:-webkit-autofill,
.e-grid .e-toolbar .e-search input:-webkit-autofill:hover,
.e-grid .e-toolbar .e-search input:-webkit-autofill:focus,
.e-grid .e-toolbar .e-search input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ec008c !important;
    box-shadow: 0 0 0 1000px rgba(56, 56, 54, 0.96) inset !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(56, 56, 54, 0.96) inset !important;
    transition: background-color 9999s ease-out 0s !important;
}

/* Stati filled/focus Syncfusion: mantieni wrapper scuro */
.e-grid .e-toolbar .e-search-wrapper.e-input-focus,
.e-grid .e-toolbar .e-search-wrapper.e-valid-input,
.e-grid .e-toolbar .e-search-wrapper.e-filled,
.e-grid .e-toolbar .e-input-group.e-search-wrapper.e-input-focus,
.e-grid .e-toolbar .e-input-group.e-search-wrapper.e-valid-input,
.e-grid .e-toolbar .e-input-group.e-search-wrapper.e-filled,
.e-grid .e-toolbar .e-search.e-input-focus,
.e-grid .e-toolbar .e-search.e-valid-input,
.e-grid .e-toolbar .e-search.e-filled {
    background: rgba(56, 56, 54, 0.96) !important;
    background-color: rgba(56, 56, 54, 0.96) !important;
    border-color: rgba(236, 0, 140, 0.58) !important;
    box-shadow: none !important;
}

/* Evita che wrapper intermedi trasparenti spengano lo sfondo della search */
.e-grid .e-toolbar .e-toolbar-item.e-search-wrapper,
.e-grid .e-toolbar .e-toolbar-item .e-search-wrapper,
.e-grid .e-toolbar .e-toolbar-right .e-toolbar-item.e-search-wrapper,
.e-grid .e-toolbar .e-toolbar-right .e-toolbar-item .e-search-wrapper {
    background: rgba(56, 56, 54, 0.96) !important;
    background-color: rgba(56, 56, 54, 0.96) !important;
    border-radius: 999px !important;
}

/* Opes/Rubrica: evita sovrapposizioni tra pulsanti toolbar e search */
.opes-grid-toolbar .e-grid .e-toolbar,
.opes-grid-toolbar.e-grid .e-toolbar {
    height: auto !important;
    min-height: 56px !important;
    overflow: visible !important;
}

.opes-grid-toolbar .e-grid .e-toolbar .e-toolbar-items,
.opes-grid-toolbar.e-grid .e-toolbar .e-toolbar-items {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
}

.opes-grid-toolbar .e-grid .e-toolbar .e-toolbar-left,
.opes-grid-toolbar.e-grid .e-toolbar .e-toolbar-left {
    display: flex !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
}

.opes-grid-toolbar .e-grid .e-toolbar .e-toolbar-right,
.opes-grid-toolbar.e-grid .e-toolbar .e-toolbar-right {
    display: flex !important;
    flex: 0 1 340px !important;
    width: auto !important;
    max-width: 340px !important;
    min-width: 240px !important;
    margin-left: auto !important;
    align-items: center !important;
    justify-content: flex-end !important;
    position: static !important;
    overflow: visible !important;
}

.opes-grid-toolbar .e-grid .e-toolbar .e-toolbar-right .e-toolbar-item,
.opes-grid-toolbar.e-grid .e-toolbar .e-toolbar-right .e-toolbar-item {
    width: 100% !important;
    max-width: 100% !important;
}

.opes-grid-toolbar .e-grid .e-toolbar .e-toolbar-right .e-search-wrapper,
.opes-grid-toolbar .e-grid .e-toolbar .e-toolbar-right .e-input-group.e-search-wrapper,
.opes-grid-toolbar.e-grid .e-toolbar .e-toolbar-right .e-search-wrapper,
.opes-grid-toolbar.e-grid .e-toolbar .e-toolbar-right .e-input-group.e-search-wrapper {
    width: 100% !important;
    max-width: 340px !important;
    min-width: 240px !important;
}

@media (max-width: 1200px) {
    .opes-grid-toolbar .e-grid .e-toolbar .e-toolbar-right,
    .opes-grid-toolbar.e-grid .e-toolbar .e-toolbar-right {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        justify-content: flex-start !important;
    }

    .opes-grid-toolbar .e-grid .e-toolbar .e-toolbar-right .e-search-wrapper,
    .opes-grid-toolbar .e-grid .e-toolbar .e-toolbar-right .e-input-group.e-search-wrapper,
    .opes-grid-toolbar.e-grid .e-toolbar .e-toolbar-right .e-search-wrapper,
    .opes-grid-toolbar.e-grid .e-toolbar .e-toolbar-right .e-input-group.e-search-wrapper {
        width: 100% !important;
        max-width: 420px !important;
        min-width: 0 !important;
    }
}
