/* users-v2-mobile.css — Gestione utenti v2, vista mobile (card + overlay) */

.v2m-container { padding: 10px 12px 80px; }

.v2m-header {
  display: flex; align-items: center; justify-content: space-between;
  background: #5b54c7; background-image: linear-gradient(135deg,#667eea 0%,#764ba2 100%);
  color: #fff; padding: 14px 16px; border-radius: 12px; margin-bottom: 12px;
}
.v2m-header h2 { margin: 0; font-size: 19px; display: flex; align-items: center; gap: 10px; }
.v2m-fab {
  width: 46px; height: 46px; border-radius: 50%; border: none; background: #f79800; color: #fff;
  font-size: 18px; box-shadow: 0 2px 8px rgba(0,0,0,.25); cursor: pointer;
}
.v2m-fab:active { transform: scale(.95); }

.v2m-search { position: relative; margin-bottom: 8px; }
.v2m-search input { width: 100%; padding: 11px 38px 11px 14px; border: 1px solid #ddd; border-radius: 10px; font-size: 15px; box-sizing: border-box; }
.v2m-search i { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #aaa; }

.v2m-filters { display: flex; gap: 8px; margin-bottom: 8px; }
.v2m-filters select { flex: 1; padding: 9px 10px; border: 1px solid #ddd; border-radius: 10px; font-size: 14px; background: #fff; }

.v2m-scope { font-size: 12px; color: #8a6d3b; background: #fcf8e3; border-radius: 8px; padding: 6px 10px; margin-bottom: 8px; }
.v2m-count { font-size: 12px; color: #888; margin: 2px 2px 10px; }

/* ---- card ---- */
.v2m-card { background: #fff; border: 1px solid #eee; border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.v2m-card-top { display: flex; align-items: center; gap: 10px; }
.v2m-nutr { font-size: 18px; cursor: pointer; }
.v2m-card-name { font-weight: bold; font-size: 16px; color: #222; }
.v2m-su { background: #5b54c7; color: #fff; font-size: 10px; font-weight: bold; padding: 1px 6px; border-radius: 8px; vertical-align: middle; }
.v2m-card-email { font-size: 13px; color: #777; margin: 4px 0 8px 28px; }
.v2m-card-badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px 28px; }
.v2m-noperms { font-size: 13px; color: #aaa; font-style: italic; }

.v2m-badge { display: inline-block; font-size: 11px; padding: 3px 8px; border-radius: 10px; background: #eef; color: #334; }
.v2m-badge small { opacity: .8; }
.v2m-badge-all { background: #5b54c7; color: #fff; font-weight: bold; }
.v2m-badge-amministratore { background: #fde7e7; color: #c0392b; }
.v2m-badge-operatore { background: #fff3e0; color: #e67e22; }
.v2m-badge-socio { background: #e8f6ef; color: #1e8e5a; }
.v2m-badge-utente { background: #eaf2fd; color: #2b6cb0; }
.v2m-badge-disattivato { background: #eee; color: #888; }
.v2m-badge-off { opacity: .5; text-decoration: line-through; }

.v2m-card-actions { display: flex; gap: 8px; }
.v2m-btn { border: none; border-radius: 8px; padding: 9px 14px; font-size: 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; background: #f0f0f3; color: #333; }
.v2m-btn:active { transform: scale(.97); }
.v2m-btn-edit { flex: 1; background: #5b54c7; color: #fff; justify-content: center; }
.v2m-btn-del { background: #fde7e7; color: #c0392b; }
.v2m-btn-primary { background: #f79800; color: #fff; }

/* ---- overlay ---- */
.v2m-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 9999; align-items: center; justify-content: center; padding: 10px; }
.v2m-dialog { background: #fff; border-radius: 14px; width: 100%; max-width: 520px; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden; }
.v2m-dlg-scroll { padding: 18px 18px 8px; overflow-y: auto; }
.v2m-dialog h3 { margin: 0 0 14px; font-size: 18px; display: flex; align-items: center; gap: 8px; }
.v2m-dlg-subtitle { font-weight: bold; color: #5b54c7; margin: 14px 0 8px; border-top: 1px solid #eee; padding-top: 12px; }

.v2m-anag { display: flex; flex-direction: column; gap: 10px; }
.v2m-anag label { display: flex; flex-direction: column; font-size: 13px; color: #555; gap: 4px; }
.v2m-anag input[type="text"], .v2m-anag input[type="email"], .v2m-anag select { padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; }
.v2m-a-check { flex-direction: row !important; align-items: center; gap: 8px !important; }
.v2m-a-check input { width: 20px; height: 20px; }
.v2m-anag hr { border: none; border-top: 1px solid #eee; margin: 6px 0; }

.v2m-su-notice, .v2m-scope { font-size: 13px; }
.v2m-su-notice { background: #eef; color: #334; border-radius: 8px; padding: 10px 12px; margin-top: 12px; }

/* permessi nel modal */
.v2m-perm-row { border: 1px solid #e6e6ee; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; background: #fafaff; }
.v2m-perm-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.v2m-perm-azname { font-weight: bold; color: #333; }
.v2m-perm-az-sel { flex: 1; padding: 8px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.v2m-perm-rm { border: none; background: #fde7e7; color: #c0392b; width: 32px; height: 32px; border-radius: 8px; cursor: pointer; }
.v2m-perm-body { display: flex; flex-direction: column; gap: 8px; }
.v2m-perm-ruolo-l { display: flex; flex-direction: column; font-size: 12px; color: #666; gap: 4px; }
.v2m-perm-ruolo { padding: 9px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }
.v2m-perm-ab-l { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #333; }
.v2m-perm-ab-l input { width: 20px; height: 20px; }
.v2m-perm-giorni-lbl { font-size: 12px; color: #666; margin-bottom: 4px; }

.v2m-giorni { display: flex; gap: 6px; flex-wrap: wrap; }
.v2m-day { width: 38px; height: 38px; border: 1px solid #ccc; border-radius: 8px; background: #fff; color: #555; font-weight: bold; cursor: pointer; }
.v2m-day.on { background: #5b54c7; border-color: #5b54c7; color: #fff; }

.v2m-add-perm { width: 100%; justify-content: center; border: 1px dashed #5b54c7; background: #fff; color: #5b54c7; }

.v2m-dlg-actions { display: flex; gap: 10px; padding: 12px 18px; border-top: 1px solid #eee; background: #fafafa; }
.v2m-dlg-actions .v2m-btn { flex: 1; justify-content: center; }
.v2m-cancel { background: #eee; color: #555; }
