/* ==========================================================================
   Area riservata — dashboard membri
   ========================================================================== */

.pm-member-area .member-dashboard{
  padding: 40px 0 72px;
  background: #eef3f7;
}

.member-dashboard__container{
  max-width: 1140px;
}

.member-dashboard__header{
  margin-bottom: 36px;
  max-width: 42rem;
}

.member-dashboard__eyebrow{
  margin: 0 0 12px;
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(15, 39, 66, .55);
}

.member-dashboard__title{
  margin: 0 0 12px;
  font-family: var(--font-heading, "Cormorant Garamond", Georgia, serif);
  font-size: clamp(32px, 3vw, 42px);
  font-weight: 500;
  line-height: 1.12;
  color: #0f2742;
}

.member-dashboard__lead{
  margin: 0;
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 15px;
  line-height: 1.55;
  color: rgba(15, 39, 66, .68);
}

.member-dashboard__grid{
  margin-bottom: 0;
}

.member-dashboard-card{
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  padding: 28px 26px 24px;
  background: #fff;
  border: 1px solid rgba(15, 39, 66, .08);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(15, 39, 66, .05);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.member-dashboard-card:hover{
  transform: translateY(-2px);
  border-color: rgba(67, 176, 215, .28);
  box-shadow: 0 16px 36px rgba(15, 39, 66, .08);
}

.member-dashboard-card__top{
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.member-dashboard-card__icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: #eef4f8;
  color: var(--bs-primary, #353868);
  font-size: 22px;
  flex-shrink: 0;
}

.member-dashboard-card__badge{
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(67, 176, 215, .12);
  color: #1f6f8b;
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.member-dashboard-card__title{
  margin: 0 0 10px;
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.3;
  color: #0f2742;
}

.member-dashboard-card__text{
  margin: 0;
  flex: 1 1 auto;
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 14px;
  line-height: 1.55;
  color: rgba(15, 39, 66, .68);
}

.member-dashboard-card__note{
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 39, 66, .08);
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 13px;
  line-height: 1.45;
  color: rgba(15, 39, 66, .58);
}

.member-dashboard-card__note .bi{
  margin-top: 1px;
  color: var(--color-secondary, #43b0d7);
  flex-shrink: 0;
}

@media (max-width: 575.98px){
  .member-dashboard-card{
    padding: 22px 20px 20px;
  }
}

/* ==========================================================================
   Area riservata — profilo membro (consultazione)
   ========================================================================== */

a.member-dashboard-card--link{
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.member-dashboard-card--link:focus-visible{
  outline: 2px solid var(--bs-primary, #353868);
  outline-offset: 3px;
}

.member-profile .registration-wizard__card{
  position: relative;
}

.member-profile__back{
  margin: 0 0 20px;
}

.member-profile__back a{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: rgba(15, 39, 66, .72);
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.member-profile__back a:hover,
.member-profile__back a:focus-visible{
  color: var(--bs-primary, #353868);
  text-decoration: underline;
}

.member-profile__empty{
  margin-top: 12px;
  padding: 36px 28px;
  text-align: center;
  background: #f7fafc;
  border: 1px solid rgba(15, 39, 66, .08);
  border-radius: 16px;
}

.member-profile__empty-icon{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: #eef4f8;
  color: var(--bs-primary, #353868);
  font-size: 26px;
}

.member-profile__empty-title{
  margin: 0 0 10px;
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f2742;
}

.member-profile__empty-text{
  margin: 0;
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 15px;
  line-height: 1.55;
  color: rgba(15, 39, 66, .68);
}

.member-profile__subsection-title{
  margin: 8px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(15, 39, 66, .08);
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: #0f2742;
}

.member-profile__badge-list{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.member-profile__badge{
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef4f8;
  color: #0f2742;
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.member-profile-avatar{
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: fit-content;
  max-width: 100%;
}

.member-profile-avatar__wrap{
  position: relative;
  display: inline-block;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: #eef4f8;
  box-shadow: 0 2px 10px rgba(15, 39, 66, .12);
}

.member-profile-avatar__img,
.member-profile-avatar .member-profile__photo img,
.member-profile__photo img{
  display: block;
  width: 128px;
  height: 128px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid #fff;
  background: #eef4f8;
  aspect-ratio: 1 / 1;
  box-sizing: border-box;
}

.member-profile-avatar__actions{
  position: absolute;
  inset: 0;
  margin: 0;
  pointer-events: none;
}

.member-profile-avatar__actions .visually-hidden{
  pointer-events: none;
}

.member-profile-avatar__action{
  position: absolute;
  bottom: 0;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  margin: 0;
  border-radius: 50%;
  border: 1px solid rgba(15, 39, 66, .14);
  background: #fff;
  color: #0f2742;
  box-shadow: 0 2px 8px rgba(15, 39, 66, .14);
  cursor: pointer;
  pointer-events: auto;
  line-height: 1;
  transition: background-color .15s ease, box-shadow .15s ease, border-color .15s ease, color .15s ease;
}

.member-profile-avatar__action i{
  font-size: 16px;
  line-height: 1;
}

.member-profile-avatar__action--upload{
  right: 0;
}

.member-profile-avatar__action--delete{
  left: 0;
  color: #b02a37;
}

.member-profile-avatar__action--upload:hover{
  background: #f3f7fb;
  border-color: rgba(15, 39, 66, .22);
  box-shadow: 0 3px 12px rgba(15, 39, 66, .18);
  color: #0f2742;
}

.member-profile-avatar__action--delete:hover{
  background: #fdebec;
  border-color: rgba(176, 42, 55, .28);
  box-shadow: 0 3px 12px rgba(176, 42, 55, .16);
  color: #8a1f2a;
}

.member-profile-avatar__action:focus,
.member-profile-avatar__action:focus-visible{
  outline: none;
  box-shadow: 0 2px 8px rgba(15, 39, 66, .14), 0 0 0 2px rgba(13, 110, 253, .25);
}

.member-profile-avatar__action[hidden]{
  display: none !important;
}

.member-profile-avatar__action[disabled]{
  pointer-events: none;
  opacity: .65;
}

/* Compatibilità selettori legacy (error/busy) */
.member-profile__photo-group .visually-hidden{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.member-profile__photo-status[hidden],
.member-profile__photo-error[hidden]{
  display: none !important;
}

.member-profile__photo-error{
  margin-top: 8px;
}

.member-profile__photo-group.pm-form-group--error .member-profile-avatar__img,
.member-profile__photo-group.pm-form-group--error .member-profile__photo img{
  border-color: #dc3545;
}

.member-profile__photo-group.is-busy .member-profile-avatar__wrap,
.member-profile__photo-group.is-busy .member-profile__photo-wrap{
  opacity: .7;
}

.member-profile__workplace{
  padding: 18px 18px 8px;
  border: 1px solid rgba(15, 39, 66, .08);
  border-radius: 14px;
  background: #f7fafc;
  margin-bottom: 14px;
}

.member-profile__workplace.workplace-card--unsaved{
  border-color: #dc3545;
}

.member-profile__workplace-title{
  margin: 0 0 14px;
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 14px;
  font-weight: 700;
  color: #0f2742;
}

.member-profile__workplace-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.member-profile__workplace-head .member-profile__workplace-title{
  margin-bottom: 0;
}

.member-profile__workplace-head .member-relation-item__remove{
  margin-top: 0;
  flex-shrink: 0;
}

.member-profile__workplace-actions{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid rgba(15, 39, 66, .08);
}

.member-profile__workplace-actions .member-profile__feedback{
  flex: 1 1 auto;
  min-width: 0;
}

.member-profile__btn-save-workplace{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  font-weight: 600;
  min-width: 120px;
}

.member-profile__btn-add-workplace{
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-weight: 600;
}

.member-profile__empty-inline{
  margin: 0;
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 14px;
  color: rgba(15, 39, 66, .58);
}

.member-profile-form input[readonly],
.member-profile-form textarea[readonly],
.member-profile-form select:disabled,
.member-profile-form input:disabled{
  background-color: #f7fafc;
  cursor: default;
  opacity: 1;
}

/* Campi OMCT sola lettura (member): leggibili, non grigiati, non editabili */
.member-profile-form input.member-profile-readonly[readonly],
.registration-wizard .member-profile-form .pm-form-group input.member-profile-readonly[readonly]{
  background-color: #fff;
  background-image: none;
  border-color: var(--bs-border-color, #dee2e6);
  color: var(--bs-body-color, #212529);
  cursor: default;
  opacity: 1;
  box-shadow: none;
  -webkit-text-fill-color: var(--bs-body-color, #212529);
}
.member-profile-form input.member-profile-readonly[readonly]:focus,
.member-profile-form input.member-profile-readonly[readonly]:focus-visible,
.registration-wizard .member-profile-form .pm-form-group input.member-profile-readonly[readonly]:focus,
.registration-wizard .member-profile-form .pm-form-group input.member-profile-readonly[readonly]:focus-visible{
  background-color: #fff;
  border-color: var(--bs-border-color, #dee2e6);
  color: var(--bs-body-color, #212529);
  box-shadow: none;
  outline: none;
}

.member-profile-form.is-saving{
  opacity: .7;
  pointer-events: none;
}

.member-profile-summary__row{
  display: grid;
  grid-template-columns: minmax(120px, 38%) 1fr;
  gap: 8px 16px;
  padding: 8px 0;
  border-bottom: 1px solid rgba(15, 39, 66, .06);
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 14px;
  line-height: 1.45;
}

.member-profile-summary__row:last-child{
  border-bottom: 0;
}

.member-profile-summary__label{
  color: rgba(15, 39, 66, .55);
  font-weight: 600;
}

.member-profile-summary__value{
  color: #0f2742;
  word-break: break-word;
}

@media (max-width: 575.98px){
  .member-profile-summary__row{
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* Save row per tab */
.member-profile__save-row{
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 16px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(15, 39, 66, .08);
}

.member-profile__btn-save{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  min-width: 170px;
  justify-content: center;
}

.member-profile__btn-save .spinner-border{
  width: 1em;
  height: 1em;
  border-width: 2px;
}

/* Feedback messages */
.member-profile__feedback{
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 14px;
  line-height: 1.45;
}

.member-profile__feedback:empty{
  display: none;
}

.member-profile__feedback--success{
  color: #198754;
}

.member-profile__feedback--success .bi{
  margin-right: 4px;
}

.member-profile__feedback--error{
  color: #dc3545;
}

.member-profile__feedback--error .bi{
  margin-right: 4px;
}

/* Field-level errors */
.pm-form-group--error input,
.pm-form-group--error select,
.pm-form-group--error textarea{
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, .15);
}

.pm-form-group__error{
  margin-top: 4px;
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 12px;
  color: #dc3545;
  line-height: 1.4;
}

/* ==========================================================================
   Member multi-select (enhancement generico su <select multiple>)
   ========================================================================== */

.member-multiselect.is-enhanced{
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.member-multiselect-wrap{
  position: relative;
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

.member-multiselect__control{
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid rgba(15, 39, 66, .16);
  border-radius: 10px;
  background: #fff;
  cursor: text;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.member-multiselect-wrap.is-open .member-multiselect__control,
.member-multiselect__control:focus-within{
  border-color: rgba(53, 56, 104, .45);
  box-shadow: 0 0 0 3px rgba(53, 56, 104, .12);
}

.member-multiselect__search{
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 14px;
  line-height: 1.4;
  color: #0f2742;
}

.member-multiselect__search::placeholder{
  color: rgba(15, 39, 66, .45);
}

.member-multiselect__caret{
  flex: 0 0 auto;
  color: rgba(15, 39, 66, .45);
  font-size: 14px;
  line-height: 1;
  pointer-events: none;
}

.member-multiselect__dropdown{
  display: none;
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-x: hidden;
  overflow-y: auto;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid rgba(15, 39, 66, .12);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 39, 66, .12);
}

.member-multiselect-wrap.is-open .member-multiselect__dropdown{
  display: block;
}

.member-multiselect__option{
  display: block;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  text-align: left;
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 14px;
  line-height: 1.4;
  color: #0f2742;
  cursor: pointer;
}

.member-multiselect__option:hover,
.member-multiselect__option.is-active{
  background: #eef4f8;
}

.member-multiselect__empty{
  padding: 12px;
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 13px;
  line-height: 1.45;
  color: rgba(15, 39, 66, .55);
}

.member-multiselect__chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.member-multiselect__chips:empty{
  display: none;
}

.member-multiselect__chip{
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  background: #eef4f8;
  color: #0f2742;
  font-family: var(--font-body, "Roboto", Arial, sans-serif);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
}

.member-multiselect__chip-label{
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.member-multiselect__remove{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(15, 39, 66, .55);
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}

.member-multiselect__remove:hover,
.member-multiselect__remove:focus-visible{
  background: rgba(15, 39, 66, .1);
  color: #0f2742;
  outline: 0;
}

.member-multiselect__remove .bi{
  font-size: 12px;
  line-height: 1;
}

.member-relation-details,
.member-training-details{
  display: flex;
  flex-direction: column;
  gap: .65rem;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  margin-top: .65rem;
}

.member-relation-details--rows{
  gap: .55rem;
  margin-top: .5rem;
}

.member-relation-details[hidden],
.member-training-details[hidden]{
  display: none !important;
}

.member-relation-item,
.member-training-item{
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid rgba(15, 39, 66, .12);
  border-radius: 10px;
  background: rgba(15, 39, 66, .025);
  overflow: hidden;
}

.member-relation-item.is-new,
.member-training-item.is-new{
  background: #fff;
  border-color: rgba(53, 56, 104, .22);
  box-shadow: 0 1px 0 rgba(15, 39, 66, .04);
}

/* Righe piatte specialty / training */
.member-relation-card{
  background: #fff;
  border: 1px solid #dfe5ef;
  border-radius: 14px;
  padding: 1.25rem 1.35rem 1.35rem;
  box-shadow: 0 1px 2px rgba(15, 39, 66, .04);
}

.member-relation-card__header{
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  margin-bottom: 1rem;
}

.member-relation-card__icon{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 10px;
  background: #e8f4fb;
  color: #1a7aab;
  font-size: 1.15rem;
}

.member-relation-card__title{
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f2742;
  line-height: 1.25;
}

.member-relation-card__subtitle{
  margin-top: .2rem;
  font-size: .875rem;
  color: rgba(15, 39, 66, .62);
  line-height: 1.35;
}

.member-relation-card__search{
  max-width: 100%;
}

.member-relation-item--row.relation-row-item,
.relation-row-item.member-relation-item--row{
  border: 1px solid #e6ebf2;
  border-radius: 12px;
  background: #fbfcfe;
  box-shadow: none;
  overflow: visible;
  padding: 1rem 1.05rem;
  margin-bottom: .65rem;
}

.member-relation-item--row.relation-row-item.is-new{
  background: #fff;
  border-color: #d7e3ef;
}

.member-relation-details--rows > .member-relation-item--row:last-child{
  margin-bottom: 0;
}

.member-relation-item__row{
  margin: 0;
}

.member-relation-item--row .member-relation-item__col{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
}

.member-relation-item--row .member-relation-item__col > .pm-form-group,
.member-relation-item--row .relation-row-attachment{
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  margin-top: 0;
  margin-bottom: 0;
}

.member-relation-item--row .member-relation-item__col--attach{
  flex: 1 1 auto;
  min-width: 0;
}

.member-relation-item--row .member-relation-item__col--actions{
  flex: 0 0 auto;
}

.relation-row-actions{
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-height: 38px;
}

.relation-row-actions__sep{
  display: inline-block;
  width: 1px;
  height: 1.35rem;
  background: #d5dde8;
}

.relation-row-actions .js-relation-save{
  white-space: nowrap;
  min-height: 38px;
}

.relation-row-actions .relation-row-remove,
.relation-row-actions .js-item-delete{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border-radius: 8px;
}

.member-relation-item [data-relation-row-feedback]{
  font-size: .8rem;
  margin-top: .15rem;
}
.member-relation-item [data-relation-row-feedback].is-error{ color: #b42318; }
.member-relation-item [data-relation-row-feedback].is-success{ color: #027a48; }

.member-relation-item.is-row-saving{
  opacity: .85;
}

.member-relation-item--row .member-relation-item__col .pm-form-group label.relation-row-fieldlabel,
.member-relation-item--row .relation-row-fieldlabel{
  display: block;
  font-size: .75rem;
  font-weight: 500;
  line-height: 1.2;
  margin: 0 0 .35rem;
  min-height: 1.05rem;
  color: rgba(15, 39, 66, .65);
}

.member-relation-item--row .relation-row-fieldlabel--spacer{
  visibility: hidden;
  user-select: none;
}

.relation-row-labelbox{
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(15, 39, 66, .14);
  border-radius: 10px;
  background: #f8fbfd;
  box-sizing: border-box;
}

.relation-row-labelbox .member-relation-item__title{
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: #0f2742;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.member-relation-item--row .relation-row-attachment .member-relation-item__attach{
  margin: 0;
}

.member-relation-item--row .relation-row-attachment .member-relation-item__attach-hint{
  margin: .35rem 0 0;
}

/* Nella colonna Allegato (col-lg-3) stack verticale più stabile */
.member-relation-item--row .relation-row-attachment .member-profile-attach__upload{
  flex-direction: column !important;
  align-items: stretch !important;
}

.relation-row-remove-wrap{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

/* Stile legacy solo se il cestino NON è nella colonna Azioni (btn BS) */
.member-relation-item--row .relation-row-remove:not(.btn),
.member-relation-item--row .member-relation-item__remove.relation-row-remove:not(.btn){
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #c0392b;
  font-size: 1.1rem;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.member-relation-item--row .relation-row-remove:not(.btn):hover,
.member-relation-item--row .relation-row-remove:not(.btn):focus-visible,
.member-relation-item--row .member-relation-item__remove.relation-row-remove:not(.btn):hover,
.member-relation-item--row .member-relation-item__remove.relation-row-remove:not(.btn):focus-visible{
  color: #a93226;
  background: rgba(192, 57, 43, .08);
  text-decoration: none;
  outline: 0;
}

@media (max-width: 991.98px){
  .member-relation-item--row.relation-row-item{
    padding: .75rem .85rem;
  }

  .relation-row-labelbox{
    height: auto;
    min-height: 46px;
    padding-top: .55rem;
    padding-bottom: .55rem;
  }

  .relation-row-labelbox .member-relation-item__title{
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }

  .relation-row-remove-wrap{
    align-items: flex-start;
  }

  .member-relation-item--row .member-relation-item__col--remove{
    margin-top: .15rem;
  }
}

.member-relation-item__head,
.member-relation-item__toggle,
.member-training-item__head,
.member-training-item__toggle{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  width: 100%;
  margin: 0;
  padding: .7rem .85rem;
  border: 0;
  background: transparent;
  text-align: left;
  color: #0f2742;
  font: inherit;
}

.member-relation-item__toggle,
.member-training-item__toggle{
  cursor: pointer;
}

.member-relation-item__toggle:hover,
.member-relation-item__toggle:focus-visible,
.member-training-item__toggle:hover,
.member-training-item__toggle:focus-visible{
  background: rgba(15, 39, 66, .04);
  outline: 0;
}

.member-relation-item__title,
.member-training-item__title{
  flex: 1 1 auto;
  min-width: 0;
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}

.member-relation-item__chevron,
.member-training-item__chevron{
  flex: 0 0 auto;
  font-size: .85rem;
  opacity: .7;
  transition: transform .15s ease;
}

.member-relation-item__toggle[aria-expanded="true"] .member-relation-item__chevron,
.member-training-item__toggle[aria-expanded="true"] .member-training-item__chevron{
  transform: rotate(180deg);
}

.member-relation-item__body,
.member-training-item__body{
  padding: 0 .85rem .85rem;
}

.member-relation-item__fields .pm-form-group,
.member-training-item__fields .pm-form-group{
  margin-bottom: .65rem;
}

.member-relation-item__fields .pm-form-group:last-child,
.member-training-item__fields .pm-form-group:last-child{
  margin-bottom: 0;
}

.member-relation-item__attach,
.member-training-item__attach{
  display: block;
  width: 100%;
  max-width: 100%;
  font-size: .85rem;
}

.member-relation-item__attach-hint,
.member-training-item__attach-hint{
  margin: .3rem 0 0;
  font-size: .75rem;
  line-height: 1.35;
  color: rgba(15, 39, 66, .55);
}

.member-relation-item__remove,
.member-training-item__remove{
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-top: .55rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(140, 40, 40, .9);
  font-size: .8125rem;
  font-weight: 500;
  line-height: 1.3;
  cursor: pointer;
}

.member-relation-item__remove:hover,
.member-relation-item__remove:focus-visible,
.member-training-item__remove:hover,
.member-training-item__remove:focus-visible{
  color: #8c2828;
  text-decoration: underline;
  outline: 0;
}

.member-multiselect-wrap--details .member-multiselect__chips{
  display: none !important;
}

@media (max-width: 575.98px){
  .member-multiselect__control{
    min-height: 48px;
  }

  .member-multiselect__option{
    padding: 12px;
  }

  .member-multiselect__dropdown{
    max-height: min(260px, 50vh);
  }
}

/* Legacy native multi-select (campi non ancora enhancati) */
.member-profile__multi-select{
  min-height: 120px;
}

@media (max-width: 575.98px){
  .member-profile__save-row{
    flex-direction: column;
    align-items: stretch;
  }
  .member-profile__feedback{
    text-align: center;
  }
  .member-profile__workplace-actions{
    flex-direction: column;
    align-items: stretch;
  }
  .member-profile__workplace-actions .member-profile__feedback{
    text-align: center;
  }
  .member-profile__btn-save-workplace{
    width: 100%;
    min-width: 0;
  }
}

/* Allegati profilo — due stati: form upload / chip compatto */
.member-profile-attach{
  display: flex;
  flex-direction: column;
  gap: .4rem;
  width: 100%;
  min-width: 0;
}
.member-profile-attach__upload{
  width: 100%;
  min-width: 0;
}
.member-profile-attach__input.form-control,
.registration-wizard .pm-form-group .member-profile-attach__input.form-control{
  display: block;
  width: 100%;
  min-width: 0;
  height: auto;
  min-height: 38px;
  padding: .375rem .75rem;
  font-size: .875rem;
  line-height: 1.4;
  opacity: 1;
  position: static;
  clip: auto;
}
.member-profile-attach__hint{
  margin-top: .25rem;
  font-size: .75rem;
  font-style: italic;
  color: rgba(15, 39, 66, .55);
  line-height: 1.3;
}
.member-profile-attach__cancel-link{
  font-size: .8rem;
}
.member-profile-attach__chip{
  width: 100%;
  min-width: 0;
  max-width: 100%;
  flex-wrap: nowrap;
  padding: .35rem .55rem;
  border: 1px solid #d7e8f4;
  border-radius: 10px;
  background: #eef7fc;
}
.member-profile-attach__chip-icon{
  flex: 0 0 auto;
  color: #1a7aab;
  font-size: 1rem;
}
.member-profile-attach__filename{
  display: block;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .82rem;
  font-weight: 600;
  line-height: 1.35;
  color: #0f2742;
  text-decoration: none;
}
.member-profile-attach__filename:hover,
.member-profile-attach__filename:focus{
  color: #2281a6;
  text-decoration: underline;
}
.member-profile-attach__icon-btn{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  line-height: 1;
  border-radius: 7px;
}
.member-profile-attach__feedback{
  margin: 0;
  font-size: .8rem;
}
.member-profile-attach__feedback.is-error{ color: #b42318; }
.member-profile-attach__feedback.is-success{ color: #027a48; }
.member-profile-attach.is-busy{ opacity: .72; pointer-events: none; }

/* MEBEKO specialità private — riga desktop
   Nota: .registration-wizard .pm-form-group input (main.css) applica
   width:100% + height:46px a TUTTI gli input. Il checkbox MEBEKO non
   deve stare in .pm-form-group; override sotto batte comunque quella regola. */
.mebeko-specialty-card{
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(15, 39, 66, .12);
  border-radius: 10px;
  background: rgba(15, 39, 66, .025);
}
.mebeko-specialty-row{
  --bs-gutter-x: .85rem;
  --bs-gutter-y: .55rem;
  display: flex;
  align-items: center;
}
.mebeko-specialty-row > [class*="col-"]{
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.mebeko-specialty-title{
  display: block;
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.3;
  color: #0f2742;
  word-break: break-word;
}
.mebeko-specialty-label{
  display: block;
  margin: 0 0 .25rem;
  font-size: .78rem;
  font-weight: 600;
  line-height: 1.2;
  color: rgba(15, 39, 66, .78);
}
.mebeko-specialty-check-wrap{
  width: 100%;
  min-height: 0;
  margin: 0;
  padding: 0;
  gap: 0;
}
/* Specificità >= .registration-wizard .pm-form-group input (0,2,1) */
.registration-wizard .mebeko-specialty-row input.mebeko-specialty-checkbox,
.mebeko-specialty-row .mebeko-specialty-checkbox{
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  max-width: 20px !important;
  max-height: 20px !important;
  margin: 0 !important;
  padding: 0 !important;
  flex: 0 0 20px !important;
  border: 1px solid rgba(15, 39, 66, .35) !important;
  border-radius: .25rem !important;
  background: #fff !important;
  background-image: none !important;
  box-shadow: none !important;
  font-size: 16px !important;
  line-height: 1 !important;
  accent-color: var(--bs-primary, #0d6efd);
  cursor: pointer;
  vertical-align: middle;
  transform: none !important;
  appearance: auto !important;
  -webkit-appearance: checkbox !important;
}
.registration-wizard .mebeko-specialty-row input.mebeko-specialty-checkbox:focus,
.registration-wizard .mebeko-specialty-row input.mebeko-specialty-checkbox:focus-visible,
.mebeko-specialty-row .mebeko-specialty-checkbox:focus,
.mebeko-specialty-row .mebeko-specialty-checkbox:focus-visible{
  outline: 2px solid rgba(13, 110, 253, .45);
  outline-offset: 2px;
  box-shadow: none !important;
  border-color: var(--bs-primary, #0d6efd) !important;
  background: #fff !important;
}
.mebeko-specialty-col--date .pm-form-group,
.mebeko-specialty-col--attach .pm-form-group{
  margin-bottom: 0;
  width: 100%;
}
.mebeko-specialty-col--date input[type="date"]{
  width: 100%;
}
.mebeko-specialty-col--attach .member-profile-attach{
  gap: .3rem;
}
.mebeko-specialty-col--attach .member-profile-attach__filename{
  font-size: .82rem;
}
.mebeko-specialty-col--attach .member-profile-attach__upload .btn{
  padding: .25rem .55rem;
  font-size: .78rem;
}

/* MEBEKO diploma (sottosezione in Diploma di medico) */
.mebeko-degree-card{
  margin-top: .15rem;
}
