/* ========================================================================= */
/* CRM: EVIDENZIAZIONE CAMPI IN MODALITA MODIFICA INLINE                     */
/* ========================================================================= */

.crm-inline-editing .form-control,
.crm-inline-editing .custom-select,
.crm-inline-editing .select2-container--default .select2-selection--single,
.crm-inline-editing .select2-container--bootstrap4 .select2-selection--single {
    background-color: #fff8e6 !important;
    border-color: #f0ad4e !important;
    box-shadow: 0 0 0 0.1rem rgba(240, 173, 78, 0.22);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.crm-inline-editing .form-control:focus,
.crm-inline-editing .custom-select:focus {
    background-color: #ffffff !important;
    border-color: #e0962c !important;
    box-shadow: 0 0 0 0.18rem rgba(240, 173, 78, 0.35);
}

/* ========================================================================= */
/* CRM CONTATTI: VISTA ALBERO (AZIENDA / LEAD -> REFERENTI)                  */
/* ========================================================================= */

.rb-tree-group {
    background: #ffffff;
    border: 1px solid #e5e9f0;
    border-left: 4px solid #6c757d;
    border-radius: 6px;
    margin-bottom: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.15s ease;
}

.rb-tree-group:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.rb-tree-group.is-lead {
    border-left-color: #f0ad4e;
}

.rb-tree-group.is-cliente {
    border-left-color: #28a745;
}

.rb-tree-parent {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 14px;
    cursor: pointer;
    user-select: none;
}

.rb-tree-parent:hover {
    background: #f8f9fb;
    border-radius: 6px;
}

.rb-tree-chevron {
    width: 18px;
    text-align: center;
    color: #6c757d;
    transition: transform 0.18s ease;
    flex-shrink: 0;
}

.rb-tree-group.is-open > .rb-tree-parent .rb-tree-chevron {
    transform: rotate(90deg);
    color: #f58220;
}

.rb-tree-children {
    display: none;
    padding: 4px 14px 10px 30px;
    border-top: 1px dashed #edf0f4;
    background: #fcfcfd;
    border-radius: 0 0 6px 6px;
}

.rb-tree-group.is-open > .rb-tree-children {
    display: block;
}

.rb-tree-child-list {
    border-left: 2px solid #dfe5ec;
    padding-left: 14px;
    margin-top: 4px;
}

.rb-tree-child {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    padding: 7px 10px;
    margin-bottom: 4px;
    background: #ffffff;
    border: 1px solid #eef1f5;
    border-radius: 5px;
}

.rb-tree-child:last-child {
    margin-bottom: 0;
}

.rb-tree-child:hover {
    border-color: #d5dde6;
    background: #f9fbfd;
}
