
/* === PATCH 2026-01-06 — Dipendenti: scroll mobile + layout gestionale === */
#sendLogModal .adminModalShell{
  display:flex !important;
  flex-direction:column !important;
  height:min(90dvh, calc(var(--app-height) - 24px)) !important;
  max-height:min(90dvh, calc(var(--app-height) - 24px)) !important;
}
#sendLogModal .adminModalBody{
  flex:1 1 auto !important;
  min-height:0 !important;
  overflow:hidden !important;
  display:flex !important;
  flex-direction:column !important;
  padding:14px !important;
}

/* Toolbar: pulito, da gestionale */
#sendLogModal .empToolbar{
  display:grid !important;
  grid-template-columns: 1fr 180px auto auto;
  gap:10px;
  align-items:center;
  margin-top:0 !important;
}
#sendLogModal .empToggle{justify-content:flex-start; gap:10px;}

/* Layout: 2 colonne su desktop, stack su mobile */
#sendLogModal .empGrid{
  flex:1 1 auto !important;
  min-height:0 !important;
  height:100% !important;
  overflow:hidden !important;
  display:grid !important;
  grid-template-columns: 340px 1fr;
  gap:12px;
  margin-top:12px !important;
}
#sendLogModal .empCol{min-height:0 !important; overflow:hidden !important;}
#sendLogModal .empListCol{max-width:none !important;}
#sendLogModal .empDetailCol{min-width:0 !important;}

#sendLogModal .empList,
#sendLogModal .empDetail{
  height:100% !important;
  min-height:0 !important;
  overflow:auto !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}
#sendLogModal .empList{padding:10px !important;}
#sendLogModal .empDetail{padding:12px !important;}

/* Riquadri: più schematici */
#sendLogModal .empUserItem{
  width:100%;
  text-align:left;
  border:1px solid rgba(15,23,42,.08);
  background:rgba(0,0,0,.02);
  padding:10px 12px;
  border-radius:14px;
  cursor:pointer;
  display:flex;
  flex-direction:column;
  gap:6px;
  font-weight:850;
}
#sendLogModal .empUserItem.active{background:#fff;box-shadow:var(--shadow-soft)}
#sendLogModal .empUserTop{display:flex;align-items:center;justify-content:space-between;gap:10px;min-width:0}
#sendLogModal .empUserName{font-weight:950;font-size:14px;line-height:1.15;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#sendLogModal .empUserPills{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end;flex:0 0 auto}
#sendLogModal .empUserSub{font-size:12px;color:var(--muted);font-weight:800;word-break:break-word}
#sendLogModal .empUserMeta{font-size:12px;color:var(--muted);font-weight:800;opacity:.9}

/* Log rows: meno testo, più struttura */
#sendLogModal .empLogRow{
  border:1px solid rgba(15,23,42,.08);
  background:rgba(0,0,0,.02);
  border-radius:14px;
  padding:10px 12px;
  display:flex;
  gap:10px;
  align-items:flex-start;
  justify-content:space-between;
}
#sendLogModal .empLogMain{min-width:0;flex:1}
#sendLogModal .empLogTop{display:flex;align-items:center;justify-content:space-between;gap:10px}
#sendLogModal .empLogTitle{font-weight:950}
#sendLogModal .empLogPills{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
#sendLogModal .empLogSub{font-size:12px;color:var(--muted);font-weight:800;word-break:break-word}
#sendLogModal .empLogActions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
#sendLogModal .empMiniBtn{padding:8px 10px;border-radius:12px;border:1px solid var(--stroke);background:#fff;font-weight:900;cursor:pointer}
#sendLogModal .empMiniBtn:active{transform:scale(.98)}

#sendLogModal .empSectionBar{display:flex;align-items:flex-end;justify-content:space-between;gap:10px;margin-top:14px}
#sendLogModal .empSectionTitle{font-weight:950;font-size:14px}
#sendLogModal .empSectionMeta{font-size:12px;color:var(--muted);font-weight:800}

/* Mobile: due pannelli impilati, entrambi scrollabili */
@media (max-width: 900px){
  #sendLogModal .empToolbar{
    grid-template-columns: 1fr 1fr;
  }
  #sendLogModal .empToolbar .empToggle{
    grid-column: 1 / -1;
  }
  #sendLogModal .empGrid{
    grid-template-columns:1fr !important;
    grid-template-rows: 42% 58% !important;
  }
  #sendLogModal .row2{
    grid-template-columns:1fr !important;
  }
  #sendLogModal .empMiniBtn{padding:10px 10px}
}

/* === PATCH 2026-01-06 V2 — Dipendenti: righe perfettamente centrate + colonna unica === */

/* Colonna unica: lista -> dettaglio (usa .empDetailMode impostato da JS) */
#sendLogModal .empGrid{ display:block !important; }
#sendLogModal .empListCol,
#sendLogModal .empDetailCol{
  width:100% !important;
  max-width:none !important;
}
#sendLogModal .empListCol{
  display:flex !important;
  flex-direction:column !important;
  min-height:0 !important;
  height:100% !important;
}
#sendLogModal .empDetailCol{
  display:none !important;
  flex-direction:column !important;
  gap:10px !important;
  min-height:0 !important;
  height:100% !important;
}
#sendLogModal.empDetailMode .empListCol{ display:none !important; }
#sendLogModal.empDetailMode .empDetailCol{ display:flex !important; }

/* Box: riempiono l'altezza e restano scrollabili */
#sendLogModal .empList,
#sendLogModal .empDetail{
  flex:1 1 auto !important;
  height:auto !important;
  min-height:0 !important;
}

/* Lista: righe allineate e centrate */
#sendLogModal .empList{
  display:flex !important;
  flex-direction:column !important;
  gap:10px !important;
  align-items:stretch !important;
  padding:10px !important;
}
#sendLogModal .empUserItem{
  margin:0 !important;
  box-sizing:border-box;
  min-height:66px;
  justify-content:center;
  padding:12px 14px !important;
  border-radius:12px !important;
}
#sendLogModal .empUserTop{
  display:grid !important;
  grid-template-columns: 1fr auto;
  align-items:center;
  gap:12px;
  min-width:0;
}
#sendLogModal .empUserName{
  min-width:0;
  line-height:1.2;
}
#sendLogModal .empUserPills{
  align-items:center;
}
#sendLogModal .empUserSub,
#sendLogModal .empUserMeta{
  line-height:1.25;
}

/* Mobile: tocchi più comodi e niente testo "appiccicato" ai bordi */
  @media (max-width: 520px){
    #sendLogModal .adminModalBody{ padding:12px !important; }
    #sendLogModal .empList{ padding:10px !important; }
    #sendLogModal .empUserItem{ padding:13px 14px !important; }
    #sendLogModal .empUserName{ font-size:15px; }
  }


  