.brand-logo-nav{max-width: 80% !important;}
.navbar_logo{max-width: 100%; max-height: 100%;}
.dark-overlay{background-color: #0e0e0e15;}
.light-logo{filter: brightness(0) invert(1);}
.topbar .navbar{max-height:70px !important}
.card-div{border-radius:23px !important}
.card{border-radius: 20px !important;}
.primary-color{color: #D90066}
.tx-black{color: #000}
.primary-bg{background-color: #D90066}
.endu-color{color: #45BCD4}
.endu-bg{background-color: #45BCD4}
.btn-evo{background-color:#F6F9FB; color: #555555; border-radius: 100px; font-weight: 300; border: 1px solid #edeff1;}
.btn-evo-darker{background-color:#eaf2f8 !important;}
.btn-evo-success-2{background-color:#3fc860 !important; color: #FFF !important; font-weight: 400;}
.btn-evo-success-2:hover{background-color:#329549 !important; color: #FFF !important; font-weight: 400;}
.btn-evo-danger-2{background-color:#F36058 !important; color: #FFF !important; font-weight: 400;}
.btn-evo-danger-2:hover{background-color:#c34c46 !important; color: #FFF !important; font-weight: 400;}
.btn-evo-success:hover{background-color:#3fc860 !important; color: #FFF !important; font-weight: 400;}
.btn-evo-danger:hover{background-color:#F36058 !important; color: #FFF; font-weight: 400;}
.btn-evo-success-active{background-color:#3fc860 !important; color: #FFF !important; font-weight: 400;}
.btn-evo-blue:hover{background-color:#5d87ff !important; color: #FFF !important; font-weight: 400;}
.btn-evo-blue-active{background-color:#5d87ff !important; color: #FFF !important; font-weight: 400;}
.btn-evo-danger-active{background-color:#F36058 !important; color: #FFF; font-weight: 400;}
.swal2-confirm{border-radius: 100px !important; background-color:#3fc860; color: #FFF !important; font-weight: 400 !important; padding: 8px 27px;}
.swal2-cancel{border-radius: 100px !important; background-color:#F36058; color: #FFF !important; font-weight: 400 !important; padding: 8px 27px;}
.swal2-deny{border-radius: 100px !important; background-color:rgb(93, 135, 255); color: #FFF !important; font-weight: 400 !important; padding: 8px 27px;}
.success-color{color: #3fc860}
.danger-color{color: #F36058}
.ihand{cursor: pointer;}
.gray-color{color:#B1B1B1}
.badge-foglio-presenze-gara{background-color:#FF3393; color: #FF3393; border-radius: 100px;}
.color-foglio-presenze-gara{color: #FF3393;}
.badge-foglio-presenze-festivita{background-color:#FF363A; color: #FF363A; border-radius: 100px;}
.color-foglio-presenze-festivita{color: #FF363A;}
.badge-foglio-presenze-ferie{background-color:#7C70D0; color: #7C70D0; border-radius: 100px;}
.color-foglio-presenze-ferie{color: #7C70D0;}
.badge-foglio-presenze-malattia{background-color:#8FD9BD; color: #8FD9BD; border-radius: 100px;}
.color-foglio-presenze-malattia{color: #8FD9BD;}
.badge-foglio-presenze-104{background-color:#623333; color: #623333; border-radius: 100px;}
.color-foglio-presenze-104{color: #623333;}
.badge-foglio-presenze-recuperogara{background-color:#71B9E1; color: #71B9E1; border-radius: 100px;}
.color-foglio-presenze-recuperogara{color: #71B9E1;}
.badge-foglio-presenze-ripososettimanale{background-color:#ffb662; color: #ffb662; border-radius: 100px;}
.color-foglio-presenze-ripososettimanale{color: #ffb662;}
.bg-gray{background-color:#F6F9FB;}
.bg-white{background-color:#FFF;}
.bg-black{background-color:#000;}
.inner-radius{border-radius:15px !important;}
.bg-inner-card{background-color: var(--bs-inner-card-bg)}
.bg-inner-ul li{background-color: var(--bs-inner-card-bg)}
.circle-step-disabled{background-color: #f7f7f7bf !important; color: #a7a7a7 !important; border: 1px solid #a7a7a76e; transition:.7s}
.circle-step-active{background-color: #f6f9fb !important; color: #2f2f2f !important; border: 1px solid #ffa1cd !important;}
.circle-step-completed{background-color: #eda4c3 !important; color: #FFF !important; border: 1px solid #eda4c3 !important;}
.circle-step-gray{background-color: #eaeff5 !important; border-color: #eaeff5 !important; color: #c0c0c0 !important;}
.swal2-popup{border-radius: 20px !important;}
.btn-evo-tab{background-color: #f6f9fb !important; color: #2f2f2f !important; border: 1px solid #ffa1cd !important; transition:.2s}
.btn-evo-tab-active{background-color: #eda4c3 !important; color: #FFF !important; border: 1px solid #eda4c3 !important;}
.evo-link{color:#5d87ff; cursor: pointer;}
.evo-link:hover{color:#4969c3; border-bottom: 1px solid #4969c3; cursor: pointer;}
.evo-link-black{color:#4e4e4e; cursor: pointer;}
.evo-link-black:hover{color:#5b5b5b; border-bottom: 1px solid #5b5b5b; cursor: pointer;}
.slow-animation-progressbar{animation:10s linear infinite progress-bar-stripes}
.icon-click-table{display: block; width: 33px; height: 33px; text-align: center; line-height: 31px;}
.icon-click-table:hover{background-color: #FFFFFF99; border-radius: 50px;}

.fw-200{font-weight: 200 !important;}
.fw-300{font-weight: 300 !important;}
.fw-400{font-weight: 400 !important;}
.fw-500{font-weight: 500 !important;}
.fw-600{font-weight: 600 !important;}
.fw-700{font-weight: 700 !important;}
.fw-800{font-weight: 800 !important;}
.fw-900{font-weight: 900 !important;}

/* scrollbar */
::-webkit-scrollbar {
    width: 10px !important;
    height: 10px !important;
}
::-webkit-scrollbar-track {
    background: transparent; 
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #6b6b6b; 
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6b6b6bcc; 
}
::-webkit-scrollbar-corner {
    background: transparent;
}
/* Scrollbar orizzontale - border radius angoli superiori */
::-webkit-scrollbar:horizontal {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}
::-webkit-scrollbar-track:horizontal {
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}
::-webkit-scrollbar-thumb:horizontal {
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}
/* scrollbar */

.card-evo-gray{
    background-color: var(--bs-inner-card-bg);
    border: 1px solid var(--bs-inner-card-bg);
    color: var(--bs-heading-color);
}
.btn-evo-gray{
    background-color: var(--bs-inner-card-bg);
    border: 1px solid var(--bs-inner-card-bg);
    color: var(--bs-heading-color);
}
.btn-evo-gray:hover{
    background-color: var(--bs-inner-card-bg) !important; 
    border: 1px solid #5d87ff !important;
    color: var(--bs-heading-color) !important;
}
.btn-evo-gray-active{
    color: #fff !important;
    background-color: #5d87ff !important;
    border: 1px solid #5d87ff !important;
}
.btn-evo-card-gray-active{
    background-color: var(--bs-inner-card-bg) !important; 
    border: 1px solid #5d87ff !important;
    color: var(--bs-heading-color) !important;
}
.btn-evo-card-gray-active-excell{
    background-color: var(--bs-inner-card-bg) !important; 
    border: 1px solid #19c700 !important;
    color: var(--bs-heading-color) !important;
}

.bg-primary{background-color: #D90066 !important}
.radius-rounded{border-radius: 999px !important;}
.radius-credit-card{border-radius: 12px !important}
.card-scrollbar-425{max-height: 425px; overflow-y: auto;}
.card-scrollbar-380{max-height: 380px; overflow-y: auto;}

.card-scrollbar-475{max-height: 475px !important; overflow-y: auto;}
/* Popup alto al massimo mezza pagina: da usare insieme a .modal-dialog-scrollable,
   che rende scorrevole la .modal-body lasciando fissi header e footer. */
.modal-dialog-half-height .modal-content{max-height: 50vh;}
.div-scrollbar-invisible{

    &::-webkit-scrollbar {
        width: 0.5em;
        height: 0.5em;
    }
    &::-webkit-scrollbar-track {
        box-shadow: inset 0 0 0px #FFF !important; 
        border-radius: 10px !important;
    }

}
.col-fit{flex: 0 0 auto;width: auto;}
.font-smaller{font-size: smaller}
.text-gold{color: #FFD700}
.text-silver{color: #C0C0C0}
.text-bronze{color: #CD7F32}
.p-card{padding: 1.5rem !important;}
.div-risposta-disponibilita{text-align: center;}
.chatting-box{height: 85vh;overflow-y: hidden; position:relative}
.evo-content-chat{height:60vh; overflow-y: auto;}
.body-wrapper{padding-top:9rem !important}
/* Wrapper aperto dentro una scheda (openSchedule): il body-wrapper della
   pagina schedule tiene gia' lo spazio della navbar, qui non va ripetuto. */
.body-wrapper.in-schedule{padding-top:0 !important}
.px-shop{
    padding-right: 3rem !important;
    padding-left: 3rem !important;
}
.pt-lg-5{padding-top: 3rem !important;}
.px-lg-4{padding-right: 1.5rem !important; padding-left: 1.5rem !important;}
#nav_user_icon{display: none;}

@media (max-width: 1300px) {
    .body-wrapper{padding-top: 70px !important;}
    #main-wrapper{overflow-x: hidden;}
}
@media (max-width: 1000px) {
    .navbar_logo {
        height: 33px !important;
    }
    .padding-ranking-ag-grid{padding-left: 0 !important; padding-right: 0 !important;}
    .page-wrapper .body-wrapper>.container-fluid{padding: 0px 12px !important;}
    .p-card{padding: 1.5rem 1rem !important;}
}
.only-mobile{display: none !important;}
@media (max-width: 991px) {
    #nav_user_icon{display: block !important;}
    .div-risposta-disponibilita{text-align: start; margin-top:18px}
    .no-mobile-overflow{overflow-y: hidden !important;}
    .mobile-auto-height{height: auto !important;}
    .chatting-box{height: 71vh !important;}
    .evo-content-chat{height:53vh !important;}
    .px-shop{
        padding-right: .5rem !important;
        padding-left: .5rem !important;
    }
    .hide-mobile{display: none !important;}
    .only-mobile{display: block !important;}
    .btn-shop-mobile{width:100% !important;margin-bottom:1rem !important}
    .pt-lg-5{padding-top: 0rem !important;}
    .px-lg-4{padding-right: 0rem !important; padding-left: 0rem !important;}
    .pt-sm-4{padding-top: 1.5rem !important;}
    .px-sm-2{padding-right: 0.5rem !important; padding-left: 0.5rem !important;}
    .card-scrollbar-475{max-height: fit-content !important;}

    .notify_user{
        width: calc(95% - 20px) !important;
    }
    .mnu-card {
        padding: 12px 10px !important;
    }
    .mnu-card i {
        font-size: 22px !important;
        padding-top: 9px !important;
        width: 46px !important;
        height: 46px !important;
        margin: 13px auto 13px auto !important;
    }

    .card-scrollbar-425{
        max-height: fit-content !important;
    }
    .card-scrollbar-380{
        max-height: fit-content !important;
    }
        
}

/* non trovo delle classi bootstrap */
.pl-0{padding-left: 0 !important;}
.pr-0{padding-right: 0 !important;}
.mr-1{margin-right: .25rem !important}
.ml-1{margin-left: .25rem !important}
.pr-1{padding-right: .25rem !important}
.pl-1{padding-left: .25rem !important}
.pl-2{padding-left: .5rem !important;}
.pr-2{padding-right: .5rem !important;}
.ml-2{margin-left: .5rem !important;}
.mr-2{margin-right: .5rem !important;}
.pl-3{padding-left: 1rem !important;}
.pr-3{padding-right: 1rem !important;}
.ml-3{margin-left: 1rem !important;}
.mr-3{margin-right: 1rem !important;}


.f-medium{font-size: medium !important}


/* Rotazione quando il menu è espanso */
.has-arrow[aria-expanded="true"]::after {
    transform: translateY(50%) rotate(225deg) !important;
}

.navbar-icons{padding: 10px 10px 10px 0 !important;}
a:hover .navbar-icons{color: #D90066 !important}
a:hover div span{color: #D90066 !important}

/* Contatore delle email aperte sull'icona busta della navbar
   (templates/navbar.php, #li_email_navbar): pill in alto a destra
   dell'icona, nascosta via JS quando il totale e' zero. */
.ed-navbar-counter{
    position: absolute;
    top: -3px;
    right: 6px;
    min-width: 18px;
    height: 18px;
    line-height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    color: #fff;
    background-color: var(--bs-primary);
}

/* Elenco caselle nel dropdown della busta: scorre dentro la finestra invece
   di allungare il dropdown oltre lo schermo. Lo spazio sottratto e' navbar +
   intestazione del dropdown + pulsante "Apri la posta". overflow esplicito
   perche' il contenuto viene sostituito via .html() a ogni refresh, il che
   smonta l'eventuale wrapper di SimpleBar. */
#email_navbar_mailboxes{
    max-height: calc(100vh - 230px);
    overflow-y: auto;
}

/* css schedule */
.evodata-schedule{
    clear: both;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.evodata-schedule ul li {
    float: left;
    border: 1px solid #f6f9fb;  
    /*margin-right: 6px;  
    border-radius: 12px;*/
    padding-top: 7px;
    padding-bottom: 7px;
    padding-left: 10px;
    padding-right: 10px;
    min-width: 130px;
    transition-duration: 0.3s;
}
.evodata-schedule ul li:hover {
    cursor: pointer;
    background-color: #4f75dd !important;
    border: 1px solid #4f75dd !important;  
    color: #fff !important;
}
.evodata-schedule ul li:hover i{
    color: #fff !important;
}
.li-schedule-active {
    background-color: #5d87ff !important;
    border: 1px solid #5d87ff !important;  
    color: #fff !important;
}
.li-schedule-list {
    background-color: rgb(227, 227, 118);
    color: rgb(0, 0, 0);
}
.li-schedule-default {
    background-color: #f6f9fb;
    border: 1px solid #f6f9fb;  
    color: #2a3547;
}
.close-schedule{border-radius: 100px; padding:1px 2px 2px 2px}
.close-schedule:hover{background-color: #44444477;}

.navbar-submenu-arrow-right{
    position: absolute;
    right: 5px;
}


/* menu */
.dropdown-submenu-wrap {
    position: relative;
}

.dropdown-submenu {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
}

.nested-submenu {
    position: absolute !important;
    left: 100% !important;
    top: 0 !important;
    display: none !important;
    min-width: 250px !important;
    background-color: #fff;
    box-shadow: rgba(145, 158, 171, 0.2) 0px 0px 2px 0px, rgba(145, 158, 171, 0.12) 0px 12px 24px -4px;
    border-radius: 0.25rem;
    z-index: 1000;
}

.dropdown-submenu-wrap:hover > .nested-submenu,
.dropdown-submenu:hover + .nested-submenu,
.nested-submenu:hover {
    display: block !important;
}

.navbar-submenu-arrow-right {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
}
/* fine menu */

.iframe-background {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border: none !important;
    z-index: 1 !important;
    border-radius: 20px !important;
}

.div-main-iframe-background {
    position: relative !important;
    min-height: 500px !important; /* Adjust this value as needed */
    overflow: hidden !important;
}

.card-shop .div-img-shop {
    height: 220px; /* Set fixed height - adjust value as needed */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-shop .card-img-top {
    height: 100%;
    width: auto;
    object-fit: contain;
    max-width: 100%;
}

.shop-active-filter {
    background-color: #f6f9fb;
    color: #d90166 !important;
}
.chat-active-user{
    background-color: #f6f9fb;
}
.chat-active-user div div h6{
    color: #d90166 !important;
}

.text-truncate {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 265px; /* adjust as needed */
}

/* NOTIFICHE */
.notify_user{
    position: fixed;
    width: calc(30% - 20px);
    top: calc(22% - 110px);
    right:calc(-30% - 20px);
    opacity: 0px;
    padding:10px;
    z-index: 999999;
    transition-timing-function: ease-out;

    border-radius: 15px;
    background-color: #e5ecf0;
    border: 1px solid #c6cfe2;
    color:#000;
}
.notify_user:hover{
    border: 1px solid #009efb !important;
}
.notify_user_popup{
    border-radius: 15px;
    background-color: #e5ecf0;
    border: 1px solid #c6cfe2;
    color:#000;
}
.notify_user_popup:hover{
    border: 1px solid #009efb !important;
}

.selectable-evo-table tbody tr:hover td{background-color: #f4f9fd !important; cursor:pointer}
.qty{border: 1px solid #d9dee4 !important;}

.disabled-checkbox-custom{pointer-events: none;}
.disabled-checkbox-custom label{background-color: #eaeff5;}

.selectable-item-order{
    border: 2px dashed #d9dee4;
    padding: 10px;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    white-space: nowrap;
}
.selectable-item-order:hover{
    background-color: #f8f9fa;
}
.danger-badge{
    background-color: #F36058;
    color: white;
    border-radius: 100px;
}
.mnu-card i{
    margin-top:20px;
    margin-bottom:20px;
    display: block;
    margin: 0 auto 20px auto;
    width: 76px;
    height: 76px;
    color:#959BA2;
    border: 1px solid #d2d3d6;
    border-radius: 100%;
    font-size: 30px;
    padding-top: 20px;
}
.mnu-card:hover{
    border: 1px solid #2fc7f7;
}
.mnu_card_selected i{
    color:#0087AF !important;
    border: 1px solid #0087AF !important;
}
.mnu_card_selected{
    background-color: #eaf9fe !important;
    border: 2px solid #2fc7f7 !important;
    color:#fff;
}
.mnu-card-check ii{
    color:#fff;
    font-size: 32px;
    
}
.mnu-card-check{
    border-radius: 100%;
    position: absolute;
    background-color: #2fc7f7;
    right:-24px;
    top:-24px;
    width: 48px;
    padding: 0px;
    height: 48px;
    z-index: 99998;
}
.mnu-card h6{
	
	font-stretch: condensed;
	color:#949494;
}
.mnu-card h3{
	margin-bottom: 10px;
	font-size: 20px !important;
	font-weight: 600;
	font-stretch: condensed;
	color:#959BA2;
}
.mnu-card{
	position: relative;
	padding: 25px;
	background-color: #f6f9fb;
	color:#000;
	border: 1px solid #eeeeee;
	border-radius: 12px;
	-webkit-box-sizing: border-box;
	 box-sizing: border-box;
	-webkit-transition: border .3s;
	transition: border .3s;
	text-align: center;
	cursor: pointer;
	cursor:hand;
}
/* Aggiungi questo CSS nella sezione <style> */
.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px 0px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: #007bff;
    background: #e7f3ff;
}

.upload-area.dragover {
    border-color: #28a745;
    background: #e8f5e8;
    transform: scale(1.02);
}

.file-preview-container {
    max-height: 300px;
    overflow-y: auto;
}

.file-preview-item {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    position: relative;
}

.file-preview-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

.file-preview-item .file-info {
    flex: 1;
    min-width: 0;
}

.file-preview-item .file-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-item .file-size {
    font-size: 0.8rem;
    color: #6c757d;
}

.file-preview-item .btn-remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Aggiungi questo CSS nella sezione <style> */
.custom-select-container {
    position: relative;
    width: 100%;
}

.custom-select-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background-color: #fff;
    font-size: 0.875rem;
}

.custom-select-search:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.custom-select-option {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    font-size: 0.875rem;
}

.custom-select-option:hover,
.custom-select-option.highlighted {
    background-color: #007bff;
    color: white;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-no-results {
    padding: 8px 12px;
    color: #6c757d;
    font-style: italic;
    font-size: 0.875rem;
}

.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: #007bff;
    background: #e7f3ff;
}

.upload-area.dragover {
    border-color: #28a745;
    background: #e8f5e8;
    transform: scale(1.02);
}

.file-preview-container {
    max-height: 300px;
    overflow-y: auto;
}

.file-preview-item {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    position: relative;
}

.file-preview-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
    cursor: pointer;
}

.file-preview-item .file-info {
    flex: 1;
    min-width: 0;
}

.file-preview-item .file-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-item .file-size {
    font-size: 0.8rem;
    color: #6c757d;
}

.file-preview-item .btn-remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}


.mnu-card.selected {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(76,175,80,0.3);
    color: #fff !important;
}

.mnu-card.selected h3 {
    color: #fff !important;
}
.mnu-card.selected h6 {
    color: #fff !important;
}
.mnu-card.selected i {
    color: #fff !important;
}


.spesa-item {
    background: #f6f9fb;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
    padding: 20px;
    margin-bottom: 15px;
    position: relative;
}

.spesa-item.approvata {
    border-left: 5px solid #28a745;
}

.spesa-item.rifiutata {
    border-left: 5px solid #dc3545;
}

.spesa-item.in-attesa {
    border-left: 5px solid #ffc107;
}

.btn-remove-spesa {
    position: absolute;
    top: 10px;
    right: 10px;
}

.custom-select-container {
    position: relative;
    width: 100%;
}

.custom-select-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background-color: #fff;
    font-size: 0.875rem;
}

.custom-select-search:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    outline: none;
}

.custom-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.custom-select-option {
    padding: 8px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f8f9fa;
    font-size: 0.875rem;
}

.custom-select-option:hover,
.custom-select-option.highlighted {
    background-color: #007bff;
    color: white;
}

.custom-select-option:last-child {
    border-bottom: none;
}

.custom-select-no-results {
    padding: 8px 12px;
    color: #6c757d;
    font-style: italic;
    font-size: 0.875rem;
}

.upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #f8f9fa;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: #007bff;
    background: #e7f3ff;
}

.upload-area.dragover {
    border-color: #28a745;
    background: #e8f5e8;
    transform: scale(1.02);
}

.file-preview-container {
    max-height: 300px;
    overflow-y: auto;
}

.file-preview-item {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 8px;
    position: relative;
}

.file-preview-item img {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
    cursor: pointer;
}

.file-preview-item .file-info {
    flex: 1;
    min-width: 0;
}

.file-preview-item .file-name {
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-item .file-size {
    font-size: 0.8rem;
    color: #6c757d;
}

.file-preview-item .btn-remove-file {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
/* Pagina congratulazioni */
#congratulations_page {
    width: 100%;
    margin-top: 105px !important;
}

/* Animazione checkmark */
.success-animation {
    margin: 0 auto;
    width: 100px;
    height: 100px;
}

.checkmark-circle {
    width: 100px;
    height: 100px;
    position: relative;
    display: inline-block;
    vertical-align: top;
}

.checkmark-circle .background {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(45deg, #28a745, #20c997);
    position: absolute;
    animation: scaleIn 0.3s ease-in-out;
}

.checkmark-circle .checkmark {
    border-radius: 50%;
}

.checkmark-circle .checkmark.draw:after {
    animation-duration: 0.8s;
    animation-timing-function: ease;
    animation-name: checkmark;
    transform: scaleX(-1) rotate(135deg);
}

.checkmark-circle .checkmark:after {
    opacity: 1;
    height: 50px;
    width: 25px;
    transform-origin: left top;
    border-right: 4px solid white;
    border-top: 4px solid white;
    content: '';
    left: 25px;
    top: 50px;
    position: absolute;
}

@keyframes scaleIn {
    0% { transform: scale(0); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

@keyframes checkmark {
    0% { height: 0; width: 0; opacity: 1; }
    20% { height: 0; width: 25px; opacity: 1; }
    40% { height: 50px; width: 25px; opacity: 1; }
    100% { height: 50px; width: 25px; opacity: 1; }
}

/* Card styling */
#congratulations_page .card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
}

#congratulations_page .alert {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
}

/* Step cards */
.step-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(45deg, #28a745, #20c997);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    margin: 0 auto 15px;
    font-size: 1.2rem;
}

.step-content h6 {
    color: white;
    margin-bottom: 8px;
}

.step-content small {
    color: rgba(255, 255, 255, 0.8);
}

/* Buttons */
#congratulations_page .btn {
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

#congratulations_page .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 768px) {

    #congratulations_page {
        margin-top: 110px !important;
    }
    
    #congratulations_page .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
    
    .step-card {
        margin-bottom: 15px;
    }
}

/* Aggiungi questo CSS nella sezione <style> */

/* Container per i pulsanti tipologia */
.tipologia-buttons-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

/* Gruppo pulsante */
.tipologia-button-group {
    position: relative;
}

/* Nascondi i radio button originali */
.tipologia-radio {
    display: none;
}

/* Stile del pulsante */
.tipologia-button {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #495057;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.tipologia-button:hover {
    border-color: #5D87FF;
    background: #f8fbff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(93, 135, 255, 0.15);
    color: #495057;
    text-decoration: none;
}

/* Icona */
.tipologia-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    background: #f8f9fa;
    transition: all 0.3s ease;
}

.tipologia-icon i {
    font-size: 20px;
    color: #6c757d;
    transition: all 0.3s ease;
}

/* Testo */
.tipologia-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.tipologia-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 2px;
    color: #495057;
}

.tipologia-subtitle {
    font-size: 0.8rem;
    color: #6c757d;
    line-height: 1.2;
}

/* Stato selezionato */
.tipologia-radio:checked + .tipologia-button {
    border-color: #5D87FF;
    background: linear-gradient(135deg, #5D87FF 0%, #4570EA 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(93, 135, 255, 0.3);
}

.tipologia-radio:checked + .tipologia-button .tipologia-icon {
    background: rgba(255, 255, 255, 0.2);
}

.tipologia-radio:checked + .tipologia-button .tipologia-icon i {
    color: white;
}

.tipologia-radio:checked + .tipologia-button .tipologia-title {
    color: white;
}

.tipologia-radio:checked + .tipologia-button .tipologia-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

/* Effetto di selezione animato */
.tipologia-button::before {
    content: '';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 16px;
    height: 16px;
    border: 1px solid #dee2e6;
    border-radius: 50%;
    background: white;
    transition: all 0.3s ease;
    opacity: 0;
}

.tipologia-radio:checked + .tipologia-button::before {
    opacity: 1;
    border-color: white;
}

.tipologia-radio:checked + .tipologia-button::after {
    content: '✓';
    position: absolute;
    top: 12px;
    right: 12px;
    width: 12px;
    height: 12px;
    color: #5D87FF;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 50%;
}

/* Colori specifici per ogni tipologia */
.tipologia-radio:checked + .tipologia-button[for*="titolo_personale"] {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-color: #28a745;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.tipologia-radio:checked + .tipologia-button[for*="carta_aziendale"] {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border-color: #17a2b8;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.tipologia-radio:checked + .tipologia-button[for*="contante_aziendale"] {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    border-color: #ffc107;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
    color: #212529;
}

.tipologia-radio:checked + .tipologia-button[for*="contante_aziendale"] .tipologia-title,
.tipologia-radio:checked + .tipologia-button[for*="contante_aziendale"] .tipologia-subtitle {
    color: #212529;
}

.tipologia-radio:checked + .tipologia-button[for*="contante_aziendale"] .tipologia-icon i {
    color: #212529;
}

.tipologia-radio:checked + .tipologia-button[for*="carta_carburante"] {
    background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%);
    border-color: #6f42c1;
    box-shadow: 0 4px 15px rgba(111, 66, 193, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
    .tipologia-buttons-container {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .tipologia-button {
        padding: 12px;
    }
    
    .tipologia-icon {
        width: 35px;
        height: 35px;
        margin-right: 10px;
    }
    
    .tipologia-icon i {
        font-size: 18px;
    }
    
    .tipologia-title {
        font-size: 0.9rem;
    }
    
    .tipologia-subtitle {
        font-size: 0.75rem;
    }
}

/* Animazione di caricamento */
@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.5; }
    100% { opacity: 1; }
}

.tipologia-button.loading {
    animation: pulse 1.5s infinite;
    pointer-events: none;
}

/* Focus accessibilità */
.tipologia-radio:focus + .tipologia-button {
    outline: 3px solid rgba(93, 135, 255, 0.3);
    outline-offset: 2px;
}

.tipologia-radio:disabled + .tipologia-button {
    background-color: var(--bs-secondary-bg)!important;
    pointer-events: none;
}
.tipologia-radio:disabled + .tipologia-button .tipologia-icon {
    background-color: #dee8f1;
}

.custom-select-search:disabled {
    background-color: var(--bs-secondary-bg)!important;
}
.card-img-overlay{
    border: 2px solid transparent;
}
.card-img-overlay:hover{
    border: 2px solid #5d87ff !important;
    border-radius: 12px;
}


/* Container preview immagini */
.images-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

/* Singola immagine nel preview */
.image-preview-item {
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
}

.image-preview-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.image-preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.image-preview-info {
    padding: 10px;
    background: white;
}

.image-preview-name {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.image-preview-size {
    font-size: 0.75rem;
    color: #6c757d;
}

/* Pulsanti azione immagine */
.image-preview-actions {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 4px;
}

.image-preview-actions .btn {
    padding: 4px 6px;
    font-size: 0.75rem;
    border-radius: 4px;
    opacity: 0.9;
}

.image-preview-actions .btn:hover {
    opacity: 1;
}

/* Badge per stato conversione */
.conversion-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    font-size: 0.7rem;
    padding: 2px 6px;
}

/* Loading overlay per conversione */
.image-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255,0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.image-loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #5D87FF;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.col-credit-card{
    flex: 0 0 auto;
    width: 405px !important;
}
.col-assigned-events{
    flex: 0 0 auto;
    width: calc(100% - 405px) !important;
}
/* Responsive */
@media (max-width: 768px) {
    .images-preview-container {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }
    
    .image-preview-item img {
        height: 120px;
    }
    
    .col-assigned-events{
        width: 100% !important;
    }
}
@media (max-width: 485px) {
    .col-credit-card{
        width: 100% !important;
    }
}

.container-fluid{
    max-width: 98% !important;
}

@media (min-width: 992px) {
    .filtri-avanzati-container {
        display: block !important;
        background-color: transparent;
        border: none;
        border-radius: 0;
    }
    .px-custom-events-list{
        padding-left: .25rem !important;
        padding-right: .25rem !important;
    }
}

/* ===== EMAIL WEBMAIL STYLES ===== */
.email-nav .email-nav-item {
    border: none;
    border-radius: 8px;
    transition: background-color 0.2s;
}
.email-nav .email-nav-item:hover {
    background-color: #f0f4f8;
}
.email-nav .email-nav-item.active {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 600;
}
.email-table tbody tr {
    transition: background-color 0.15s;
    border-bottom: 1px solid #f0f0f0;
}
.email-table tbody tr:hover {
    background-color: #f5f9ff;
}
.email-row td {
    padding: 12px 8px;
    vertical-align: middle;
}
.email-unread {
    background-color: #eaf3ff !important;
    font-weight: 700;
}
.email-unread:hover {
    background-color: #dcebff !important;
}
/* Il tema ridefinisce .fw-bold a 500 e il font cade su un sans-serif di
   sistema: usiamo pesi espliciti per distinguere letto/non letto. */
.email-unread .email-emph {
    font-weight: 800;
    color: #1b2559;
}
.email-unread .email-preview {
    color: #2a3547 !important;
}
.email-read {
    font-weight: 400;
}
.email-read .email-emph {
    font-weight: 400;
    color: #5a6a85;
}
/* Barra di accento a sinistra: il bordo trasparente sulle righe lette
   mantiene allineate le colonne. */
.email-row > td:first-child {
    border-left: 4px solid transparent;
}
.email-unread > td:first-child {
    border-left-color: #5d87ff;
}
.email-sender {
    width: 200px;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.email-subject {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 500px;
}
.email-preview {
    font-weight: 400 !important;
    font-size: 0.85em;
}
.email-meta {
    width: 150px;
    min-width: 150px;
}
.email-msg-card {
    transition: box-shadow 0.2s;
}
.email-msg-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.email-body-content {
    font-size: 0.95rem;
    line-height: 1.6;
    word-wrap: break-word;
    overflow-wrap: break-word;
}
.email-body-content img {
    max-width: 100%;
    height: auto;
}
.email-editor:focus {
    outline: none;
    border-color: #5d87ff !important;
    box-shadow: 0 0 0 0.2rem rgba(93,135,255,0.15);
}
.email-editor {
    font-size: 0.95rem;
    line-height: 1.6;
    background: #fff;
}
@media (max-width: 768px) {
    .email-sender { width: 120px; max-width: 120px; }
    .email-subject { max-width: 200px; }
    .email-meta { width: 100px; min-width: 100px; }
}
/* ---------------------------------------------------------------------------
   Widget home page (templates/wrappers/widgets/home_widgets.php)
   --------------------------------------------------------------------------- */
.hw-table{font-size: 0.875rem;}
.hw-table th{font-weight: 600; color: var(--bs-secondary-color); white-space: nowrap;}
.hw-table td{vertical-align: middle;}
.hw-dot{display:inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: middle;}
.hw-empty i{font-size: 1.6rem;}
.hw-spin{display:inline-block; animation: hw-rotate 1s linear infinite;}
@keyframes hw-rotate { to { transform: rotate(360deg); } }
/* Sotto i 768px la tabella si impila: una "scheda" per riga, etichetta a sinistra */
@media (max-width: 767.98px) {
    .hw-table thead{display: none;}
    .hw-table, .hw-table tbody, .hw-table tr, .hw-table td{display: block; width: 100%;}
    .hw-table tr{
        background-color: var(--bs-inner-card-bg);
        border-radius: 12px;
        padding: 0.5rem 0.75rem;
        margin-bottom: 0.6rem;
    }
    .hw-table td{
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0.75rem;
        border: 0;
        padding: 0.25rem 0;
        text-align: right !important;
    }
    .hw-table td::before{
        content: attr(data-label);
        font-weight: 600;
        color: var(--bs-secondary-color);
        text-align: left;
        flex: 0 0 38%;
    }
    .hw-table td:empty, .hw-table td[data-label='']::before{display: none;}
    .hw-table td[data-label='']{justify-content: flex-end;}
}
