 .sm-modal .modal-content{
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.18);
  }
  .sm-modal .modal-header{
    background: linear-gradient(135deg, rgba(13,110,253,.12), rgba(13,110,253,0));
    border-bottom: 1px solid rgba(0,0,0,.06);
    padding: 18px 22px;
  }
  .sm-modal .modal-title{
    font-weight: 700;
    letter-spacing: .2px;
  }
  .sm-modal .modal-body{
    padding: 18px 22px 6px;
  }
  .sm-modal .section-title{
    font-size: .9rem;
    font-weight: 700;
    color: rgba(0,0,0,.68);
    margin: 10px 0 12px;
    display:flex;
    align-items:center;
    gap:.5rem;
  }
  .sm-modal .section-title::after{
    content:"";
    height:1px;
    background: rgba(0,0,0,.08);
    flex:1;
  }
  .sm-modal .form-control,
  .sm-modal .form-select{
    border-radius: 12px;
  }
  .sm-modal .form-control:focus,
  .sm-modal .form-select:focus{
    box-shadow: 0 0 0 .25rem rgba(13,110,253,.12);
  }
  
  .sm-modal .input-group-text{
    border-radius: 12px 0 0 12px;
  }
  .sm-modal .modal-footer{
    border-top: 1px solid rgba(0,0,0,.06);
    padding: 14px 22px;
    gap: 2px;
  }
  .sm-modal .btn{
    border-radius: 12px;
    padding: 10px 16px;
    font-weight: 600;
  }
  .sm-modal .hint{
    font-size: .82rem;
    color: rgba(0,0,0,.55);
    margin-top: 6px;
  }
  .sm-modal .badge-soft{
    background: rgba(13,110,253,.12);
    color: #0d6efd;
    font-weight: 600;
    border-radius: 999px;
    padding: 6px 10px;
  }
  .readonly-group .form-control {
  background-color: #f1f3f5;
  border-style: dashed;
  pointer-events: none;
}

.readonly-group .input-group-text {
  background-color: #f1f3f5;
}

/* =========================
   AVATAR SCROLL ORIZZONTALE
   ========================= */
/* Layout: colonna su mobile, riga su desktop */
.sm-avatar-layout{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 992px){
  .sm-avatar-layout{
    flex-direction: row;
    align-items: flex-start;
    gap: 24px;
  }
}

/* Preview */
.sm-avatar-preview{
  display: flex;
  flex-direction: column;
  align-items: center;
}
@media (min-width: 992px){
  .sm-avatar-preview{
    align-items: flex-start;
  }
}

/* Divisore: verticale su desktop, orizzontale su mobile */
.sm-avatar-divider{
  width: 100%;
  height: 1px;
  border-top: 1px dashed rgba(0,0,0,.25);
}

@media (min-width: 992px){
  .sm-avatar-divider{
    width: 1px;
    height: auto;
    align-self: stretch;
    border-top: 0;
    border-left: 1px dashed rgba(0,0,0,.25);
  }
}

/* Colonna picker */
.sm-avatar-picker{
  flex: 1 1 auto;
  min-width: 0; /* IMPORTANTISSIMO: permette lo scroll senza overflow strani */
}

/* Scroll avatar */
.sm-avatar-scroll{
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;

  padding-bottom: 6px;
  padding-right: 16px; /* fix ultimo avatar "tagliato" */
  -webkit-overflow-scrolling: touch;

  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,.25) transparent;
}
.sm-avatar-scroll::-webkit-scrollbar{ height: 6px; }
.sm-avatar-scroll::-webkit-scrollbar-track{ background: transparent; }
.sm-avatar-scroll::-webkit-scrollbar-thumb{
  background-color: rgba(0,0,0,.25);
  border-radius: 6px;
}

/* Avatar */
.avatar-option{ flex: 0 0 auto; }
.avatar-option img{
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid rgba(0,0,0,.12);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.avatar-option.selected img{
  border-color: rgba(59,130,246,.95);
  box-shadow: 0 0 0 4px rgba(59,130,246,.18);
  transform: translateY(-1px);
}
/* =========================
   TAB NAV (MODAL)
   ========================= */

.sm-modal .nav-tabs{
  border-bottom: 0;
  gap: 4px;
  margin-bottom: 12px;
}

/* Singolo tab */
.sm-modal .nav-tabs .nav-link{
  border: 0;
  border-radius: 12px;
  padding: 10px 16px;
  font-weight: 600;
  color: rgba(0,0,0,.55);
  background: transparent;
  transition: 
    background-color .15s ease,
    color .15s ease,
    box-shadow .15s ease;
}

/* Hover */
.sm-modal .nav-tabs .nav-link:hover{
  background: rgba(13,110,253,.08);
  color: #0d6efd;
}

/* Tab attivo */
.sm-modal .nav-tabs .nav-link.active{
  background: rgba(13,110,253,.12);
  color: #0d6efd;
  box-shadow: inset 0 -2px 0 rgba(13,110,253,.6);
}

/* Focus (accessibilità) */
.sm-modal .nav-tabs .nav-link:focus{
  outline: none;
  box-shadow: 0 0 0 .2rem rgba(13,110,253,.15);
}

/* =========================
   CONTENUTO TAB
   ========================= */

.sm-modal .tab-content{
  margin-top: 6px;
}

.sm-modal .tab-pane{
  animation: sm-tab-fade .18s ease;
}

@keyframes sm-tab-fade{
  from{
    opacity: 0;
    transform: translateY(2px);
  }
  to{
    opacity: 1;
    transform: none;
  }
}
/* =========================
   CONTENITORE TAB (CARD)
   ========================= */

.sm-modal .tab-content{
  background: #fff;
  border-radius: 14px;
  padding: 18px 20px 20px;
  box-shadow:
    0 1px 2px rgba(0,0,0,.04),
    0 8px 24px rgba(0,0,0,.06);
  margin-top: 0px;
}
.select2-container--open { 
  z-index: 20000; 
}