.border-green-custom {
    border-left-color: #3fa18b !important; 
}

.aside {
  display: flex;
  flex-direction: column;
  box-shadow: var(--bs-aside-box-shadow);
  padding: 0;
  background-color: #e5eaec;
}

.aside .aside-logo {
  background-color: #3fa18b;
}

.aside .aside-toggle i,
.aside .aside-toggle .svg-icon {
  color: #ffffff;
}

.aside-menu .menu-item .menu-link.active {
  transition: color 0.2s ease;
  background-color: #64c796;
  color: #ffffff;
}

.aside-menu .menu-item.hover:not(.here) > .menu-link:not(.disabled):not(.active):not(.here), .aside-menu .menu-item:not(.here) .menu-link:hover:not(.disabled):not(.active):not(.here) {
  transition: color 0.2s ease;
  background-color: #3fa18b;
  color: #ffffff;
}

.aside-menu .menu-item.here > .menu-link {
  transition: color 0.2s ease;
  background-color: #3fa18b;
  color: #ffffff;
}

.aside-menu .menu-item.show > .menu-link {
  transition: color 0.2s ease;
  background-color: #3fa18b;
  color: #ffffff;
}

.aside .btn-custom {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
  color: #ffffff;
  background-color: rgba(63, 66, 84, 0.35);
}



.btn-check:checked + .aside .btn-custom, .btn-check:active + .aside .btn-custom, .aside .btn-custom:focus:not(.btn-active), .aside .btn-custom:hover:not(.btn-active), .aside .btn-custom:active:not(.btn-active), .aside .btn-custom.active, .aside .btn-custom.show, .show > .aside .btn-custom {
  color: #333;
  background-color: rgba(63, 66, 84, 0.35) !important;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 65px;
    transition: left 0.3s ease;
    background-color: #3fa18b;
  }
  
  .header-fixed .header {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 100;
    background-color: #3fa18b;
    box-shadow: var(--bs-header-fixed-box-shadow);
    height: 65px;
    padding: 0;
  }
  
.header .header-menu .menu > .menu-item.here > .menu-link {
    transition: color 0.2s ease;
    background-color: #3fa18b;
    color: #ffffff;
  }
  
  .header .header-menu .menu > .menu-item > .menu-link .menu-title {
    color: #ffffff;
  }
  
  .header .header-menu .menu > .menu-item.hover:not(.here) > .menu-link:not(.disabled):not(.active):not(.here), .header .header-menu .menu > .menu-item:not(.here) > .menu-link:hover:not(.disabled):not(.active):not(.here) {
    transition: color 0.2s ease;
    background-color: #207565;
    color: #ffffff;
  }
  
  
  
.topbar .topbar-item i,
.topbar .topbar-item .svg-icon {
  color: #ffffff;
}
.topbar .show > .topbar-item i,
.topbar .show > .topbar-item .svg-icon,
.topbar .topbar-item:hover i,
.topbar .topbar-item:hover .svg-icon,
.topbar .topbar-item.show i,
.topbar .topbar-item.show .svg-icon {
  /*color: #73e3ab;*/
  color: gold;
}  
  

/* --- Fix per Content Security Policy: Colori Icone Menu --- */

/* Colore icone sezione GENERALE (Azzurro) */
.icon-generale { 
    color: #0CBCE0 !important; 
}

/* Colore icone sezione CONTABILITÀ (Viola) */
.icon-contabilita { 
    color: #A77EE5 !important; 
}

/* Colore icone sezione ATTIVITÀ (Rosa) */
.icon-attivita { 
    color: #E06DD1 !important; 
}

/* --- Gestione Icona Attiva (Bianca) --- */
/* Quando la voce di menu è attiva, l'icona deve diventare bianca 
   sovrascrivendo i colori delle classi sopra */
.aside-menu .menu-item .menu-link.active .menu-icon i {
    color: #ffffff !important;
}

/* --- Colori Titoli di Sezione (Opzionale, per coerenza) --- */
.text-section-generale { color: #0CBCE0 !important; }
.text-section-contabilita { color: #A77EE5 !important; }
.text-section-attivita { color: #E06DD1 !important; }


/* --- FIX LAYOUT RESPONSIVE --- */
@media (min-width: 992px) {
    #kt_header,
    .header {
        left: 0 !important;
        width: 100% !important;
        z-index: 105 !important;
    }

    #kt_toolbar {
        top: 65px !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 104 !important;
        background-color: #ffffff;
        margin: 0 !important;
        border-bottom: 1px solid #eff2f5;
    }

    #kt_aside {
        z-index: 100 !important;
        position: fixed !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
    }

    #kt_wrapper {
        padding-top: 70px !important;
    }
}

/* --- FIX VARIABILI BODY --- */
#kt_body {
    --kt-toolbar-height: 55px;
    --kt-toolbar-height-tablet-and-mobile: 55px;
}

/* --- FIX COLORI MENU (Per evitare errori CSP sulle icone) --- */
.icon-generale { color: #0CBCE0 !important; }
.icon-contabilita { color: #A77EE5 !important; }
.icon-attivita { color: #E06DD1 !important; }
.text-section-generale { color: #0CBCE0 !important; }
.text-section-contabilita { color: #A77EE5 !important; }
.text-section-attivita { color: #E06DD1 !important; }

/* Icona bianca quando attiva */
.menu-item .menu-link.active .menu-icon i {
    color: #ffffff !important;
}

/* --- TOOLBAR & SLIDER RESPONSIVE --- */

/* Taglia il testo se troppo lungo per non rompere le slide */
.text-truncate {
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Assicura che lo slider occupi lo spazio correttamente */
.tns-outer {
    flex-grow: 1;
    min-width: 0;
}

/* Stile per l'item della slide */
.condominio-item {
    padding: 0 10px;
}

/* Fix per min-width nel PHP */
.toolbar-slider-container {
    min-width: 0;
}

.tns-default-wrapper {
    min-width: 100px;
    overflow: hidden;
}

.search-container-fixed {
    width: 250px;
}

.btn-link-privacy {
    background-color: rgba(197, 198, 199, 0.5) !important;
}

.card-scroll-limited {
    max-height: 250px;
    overflow-y: auto;
}


/* Stili per la pagina Notizie */
.card-news-min-height {
    min-height: 250px;
}

.card-news-scroll {
    max-height: 70vh;
    overflow: auto;
}

.cursor-pointer {
    cursor: pointer !important;
}

/* Stile per indicare che la modale è trascinabile */
#modalNotizia .modal-header {
    cursor: move;
}

/* Classe per gestire lo scroll della card segnalazioni */
.card-segnalazioni-scroll {
    max-height: 200px;
    overflow-y: auto;
}

.card-segnalazioni-scroll {
    max-height: 200px;
    overflow-y: auto;
}

.drag-handle {
    cursor: grab;
}
.h-250px {
    height: 250px !important;
    overflow-y: auto;
}

/* --- DOCUMENTI & JSTREE --- */
#cartelleTree .jstree-icon {
    font-size: 1.6rem !important;
    margin-right: 6px;
    width: 24px !important;
    height: 24px !important;
}

#cartelleTree .jstree-anchor {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#cartelleTree .jstree-ocl {
    width: 18px;
    margin-right: 6px;
}

.tree-container-scroll {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 5px;
}


.log-viewer-area {
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
}

.card-rubrica-min-height {
    min-height: 250px;
}


/* --- CHAT SYSTEM --- */
.chat-container-card {
    max-height: 800px;
    display: flex;
    flex-direction: column;
}

.chat-body-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
}

.chat-left { justify-content: flex-start; }
.chat-right { justify-content: flex-end; }

.bubble {
    padding: 10px;
    max-width: 70%;
    position: relative;
}

.chat-left .bubble {
    background: rgba(240, 237, 215, 0.5);
    color: #000;
    border-radius: 12px 12px 12px 0;
}

.chat-right .bubble {
    background: #d1e7dd;
    color: #0f5132;
    border-radius: 12px 12px 0 12px;
}

.bubble-time {
    font-size: 0.8rem;
    display: block;
    margin-top: 4px;
}


/* Larghezza fissa per il filtro condominio nella card header */
.select-condominio-filtro {
    width: 250px !important;
}

/* Fix per Select2 dentro l'header delle card */
.card-header .select2-container {
    width: 250px !important;
}

.quick-links-header {
    background-image: url('../media/misc/menu-header-bg.jpg');
    background-size: cover;
}

/* Gestione background login */
.bg-login-custom {
    background-image: url('../media/background.jpg');
}

[data-bs-theme="dark"] .bg-login-custom {
    background-image: url('../media/auth/bg4-dark.jpg');
}