/* HTNS Members and Role Libraries · v152 */
#view-profile .member-manager-v152 .roster-help{margin:0 0 7px!important;color:#61768A;font-size:9px!important;line-height:1.3!important;}
#view-profile .member-manager-v152 .roster-toggle-icon svg,#view-profile .role-library-v152 .role-manager-icon svg{width:21px;height:21px;}
#view-profile .member-team-filters-v152{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:0 0 9px;padding:4px;border:1px solid #DCE5ED;border-radius:12px;background:#F4F7FA;}
#view-profile .member-team-filters-v152 button{min-width:0;height:34px;border:0;border-radius:9px;background:transparent;color:#647A8F;font-size:10px;font-weight:900;cursor:pointer;touch-action:manipulation;}
#view-profile .member-team-filters-v152 button.active{background:#123B68;color:#FFF;box-shadow:0 3px 8px rgba(18,59,104,.18);}
#view-profile .member-role-focus-v152{margin:0 0 9px;padding:9px 10px;display:flex;align-items:center;justify-content:space-between;gap:8px;border:1px solid #E5C04C;border-radius:11px;background:#FFF7D8;color:#614900;font-size:10px;}
#view-profile .member-role-focus-v152 button{border:1px solid #DAB13C;border-radius:8px;padding:5px 9px;background:#FFF;color:#6A4D00;font-size:9px;font-weight:900;cursor:pointer;}
#view-profile .member-manager-v152 #rosterPersonList{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-items:start!important;gap:5px!important;max-height:390px!important;padding:0 2px 0 0!important;}
#view-profile .member-role-card-v152{min-width:0!important;margin:0!important;overflow:hidden;border:1px solid #DCE5ED!important;border-radius:9px!important;background:#FFF;box-shadow:none!important;}
#view-profile .member-role-card-v152.open{grid-column:1/-1!important;}
#view-profile .member-role-card-v152[hidden]{display:none!important;}
#view-profile .member-role-card-v152+.member-role-card-v152{margin-top:0!important;}
#view-profile .member-role-head-v152{width:100%;min-height:38px!important;padding:5px 7px!important;display:grid;grid-template-columns:minmax(0,1fr) 20px 17px!important;align-items:center;gap:4px!important;border:0;background:#FFF;text-align:left;cursor:pointer;}
#view-profile .member-role-person-v152{min-width:0;display:block;}
#view-profile .member-role-card-v152 .roster-person-name-line{min-width:0!important;margin:0!important;display:flex!important;align-items:center!important;gap:4px!important;}
#view-profile .member-role-card-v152 .roster-person-name{min-width:0!important;display:block!important;overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important;font-size:10px!important;line-height:1.1!important;}
#view-profile .member-role-card-v152 .roster-access-badge{flex:0 0 auto!important;min-height:14px!important;padding:0 3px!important;font-size:5.8px!important;}
#view-profile .member-role-count-chip-v155{width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:#EEF3F7;color:#48657E;font-size:8px;font-weight:900;}
#view-profile .member-team-pills-v152{display:flex;flex-wrap:wrap;gap:4px;}
#view-profile .member-team-pill-v152{padding:3px 6px;border-radius:999px;background:#EDF4FA;color:#315B80;font-size:7.5px;font-weight:900;letter-spacing:.02em;}
#view-profile .member-team-pill-v152.worship{background:#FFF4CE;color:#765800;}
#view-profile .member-team-pill-v152.none{background:#F1F3F5;color:#718397;}
#view-profile .member-role-card-v152 .roster-person-chevron{width:17px!important;height:17px!important;display:flex;align-items:center;justify-content:center;background:transparent!important;color:#315B80;font-size:13px;transition:transform .16s ease;}
#view-profile .member-role-card-v152.open .roster-person-chevron{transform:rotate(180deg);}
#view-profile .member-role-card-v152 .member-role-body-v152{display:none;padding:8px!important;border-top:1px solid #E2E8EE;background:#FAFCFD;}
#view-profile .member-role-card-v152.open .member-role-body-v152{display:block;}
#view-profile .member-role-limit-v152{margin-bottom:9px;display:flex;align-items:center;justify-content:space-between;color:#667B90;font-size:9px;}
#view-profile .member-role-limit-v152 b{color:#153A60;font-size:10px;}
#view-profile .member-role-limit-v152 span{padding:3px 7px;border-radius:999px;background:#EAF1F7;color:#153A60;font-weight:900;}
#view-profile .member-team-group-v152{padding:7px!important;border:1px solid #D9E4EC;border-radius:9px!important;background:#FFF;}
#view-profile .member-team-group-v152+.member-team-group-v152{margin-top:6px!important;}
#view-profile .member-team-group-v152 h4{margin:0 0 6px;display:flex;align-items:center;gap:5px;color:#0C315C;font-size:8.5px;font-weight:950;letter-spacing:.025em;}
#view-profile .member-team-group-v152 h4 span{width:7px;height:7px;border-radius:50%;background:#6B92B8;}
#view-profile .member-team-group-v152.worship h4 span{background:#E0B43A;}
#view-profile .member-role-options-v152{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:4px!important;}
#view-profile .member-role-choice-v152{min-width:0;min-height:30px!important;padding:4px 6px!important;display:flex;align-items:center;gap:5px!important;border:1px solid #DCE5ED;border-radius:7px!important;background:#FFF;color:#173B60;cursor:pointer;}
#view-profile .member-role-choice-v152 input{width:14px!important;height:14px!important;flex:0 0 auto;margin:0;accent-color:#123B68;}
#view-profile .member-role-choice-v152 span{min-width:0;font-size:8.5px!important;font-weight:800;overflow-wrap:anywhere;}
#view-profile .member-role-choice-v152.selected{border-color:#7FA0BF;background:#EEF5FB;box-shadow:inset 3px 0 0 #315E88;}
#view-profile .member-team-group-v152.worship .member-role-choice-v152.selected{border-color:#E1BF55;background:#FFF8D9;box-shadow:inset 3px 0 0 #D8AA25;}
#view-profile .member-role-choice-v152.focused{outline:2px solid #E5B52B;outline-offset:1px;}
#view-profile .member-role-choice-v152.disabled{opacity:.5;cursor:not-allowed;}
#view-profile .member-person-actions-v152{margin-top:10px;padding-top:9px;border-top:1px solid #E0E7ED;display:flex;flex-wrap:wrap;gap:6px;}

#view-profile .role-library-v152 .role-manager-sub{white-space:normal;}
#view-profile .role-library-list-v152{display:grid;gap:7px;}
#view-profile .role-library-line-v152{padding:10px;border:1px solid #DCE5ED;border-radius:12px;background:#FFF;}
#view-profile .role-library-head-v152{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:7px;}
#view-profile .role-library-head-v152>b{min-width:0;color:#0C315C;font-size:11px;overflow-wrap:anywhere;}
#view-profile .role-library-count-v152{min-width:23px;height:23px;padding:0 6px;display:inline-flex;align-items:center;justify-content:center;border:1px solid #E5BE46;border-radius:8px;background:#FFF6CF;color:#735500;font-size:9px;font-weight:950;}
#view-profile .role-library-actions-v152{display:flex;gap:5px;}
#view-profile .role-library-actions-v152 button{width:28px;height:28px;border:1px solid #D7E2EB;border-radius:8px;background:#F8FBFD;color:#315E83;font-size:12px;font-weight:900;cursor:pointer;}
#view-profile .role-library-actions-v152 button.delete{border-color:#F0D2D7;background:#FFF8F9;color:#CC5365;}
#view-profile .role-library-names-v152{margin:8px 0;display:flex;flex-wrap:wrap;gap:5px;}
#view-profile .role-library-names-v152>span{padding:4px 7px;border:1px solid #DCE5ED;border-radius:999px;background:#F5F8FA;color:#46627A;font-size:8.5px;font-weight:800;}
#view-profile .role-library-names-v152>.role-library-empty-v152{border:0;background:transparent;color:#8293A2;font-style:italic;font-weight:650;}
#view-profile .role-library-manage-v152{width:100%;min-height:31px;border:1px solid #CADAE7;border-radius:9px;background:#F4F8FB;color:#17446E;font-size:8.5px;font-weight:900;cursor:pointer;touch-action:manipulation;}

@media (max-width:430px){
  #view-profile .member-role-head-v152{grid-template-columns:minmax(0,1fr) 20px 17px!important;padding:5px 6px!important;}
  #view-profile .role-library-head-v152{grid-template-columns:minmax(0,1fr) auto;}
  #view-profile .role-library-actions-v152{grid-column:1/-1;justify-content:flex-end;}
}
@media (max-width:360px){
  #view-profile .member-role-options-v152{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
}
[data-theme="dark"] #view-profile .member-team-filters-v152,[data-theme="dark"] #view-profile .member-role-card-v152,[data-theme="dark"] #view-profile .member-role-head-v152,[data-theme="dark"] #view-profile .member-team-group-v152,[data-theme="dark"] #view-profile .member-role-choice-v152,[data-theme="dark"] #view-profile .role-library-line-v152{border-color:#315574;background:#102F50;color:#ECF5FC;}
[data-theme="dark"] #view-profile .member-role-card-v152 .member-role-body-v152{border-color:#315574;background:#0B2947;}
[data-theme="dark"] #view-profile .member-team-group-v152 h4,[data-theme="dark"] #view-profile .member-role-limit-v152 b,[data-theme="dark"] #view-profile .role-library-head-v152>b{color:#F0F7FD;}
[data-theme="dark"] #view-profile .member-role-choice-v152.selected{background:#183E5D;color:#FFF;}
[data-theme="dark"] #view-profile .member-role-focus-v152{border-color:#B99124;background:#453812;color:#FFF1AF;}
[data-theme="dark"] #view-profile .member-role-count-chip-v155{background:#183E5D;color:#DCEAF5;}

/* v160 — one dense, flat Members list across every roster renderer. */
#view-profile .roster-manager .roster-body{
  padding:8px!important;
}
#view-profile .roster-manager .roster-help{
  margin:0 0 5px!important;
  font-size:8px!important;
  line-height:1.2!important;
}
#view-profile .roster-manager .roster-search-wrap{
  margin-bottom:5px!important;
}
#view-profile .roster-manager .roster-search,
#view-profile .roster-manager .roster-add .field,
#view-profile .roster-manager .roster-add-field{
  height:34px!important;
  min-height:34px!important;
  border-radius:9px!important;
  font-size:10px!important;
}
#view-profile .roster-manager .roster-add,
#view-profile .roster-manager .roster-add-row{
  margin-bottom:6px!important;
  gap:5px!important;
  grid-template-columns:minmax(0,1fr) 34px!important;
}
#view-profile .roster-manager .roster-add-btn{
  width:34px!important;
  height:34px!important;
  min-width:34px!important;
  min-height:34px!important;
  border-radius:9px!important;
  font-size:18px!important;
}
#view-profile .member-team-filters-v152{
  gap:3px!important;
  margin-bottom:5px!important;
  padding:3px!important;
  border-radius:9px!important;
}
#view-profile .member-team-filters-v152 button{
  height:28px!important;
  border-radius:7px!important;
  font-size:8.5px!important;
}
#view-profile #rosterPersonList,
#view-profile #memberCompactGrid{
  display:block!important;
  grid-template-columns:none!important;
  gap:0!important;
  max-height:360px!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  padding:0!important;
  border:1px solid #DCE5ED!important;
  border-radius:8px!important;
  background:#FFF!important;
}
#view-profile #rosterPersonList>.roster-person,
#view-profile #memberCompactGrid>.member-compact{
  min-width:0!important;
  margin:0!important;
  border:0!important;
  border-bottom:1px solid #E8EDF1!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
#view-profile #rosterPersonList>.roster-person:last-of-type,
#view-profile #memberCompactGrid>.member-compact:last-of-type{
  border-bottom:0!important;
}
#view-profile #rosterPersonList>.roster-person:not(.member-role-card-v152)>.roster-person-main{
  width:100%!important;
  height:32px!important;
  min-height:32px!important;
  grid-template-columns:minmax(0,1fr) 18px!important;
  gap:4px!important;
  padding:2px 6px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
#view-profile #rosterPersonList .roster-avatar,
#view-profile #rosterPersonList .roster-person-summary,
#view-profile #rosterPersonList .member-team-pills-v152{
  display:none!important;
}
#view-profile #rosterPersonList .roster-person-copy{
  min-width:0!important;
  display:flex!important;
  align-items:center!important;
}
#view-profile #rosterPersonList .roster-person-name-line{
  min-width:0!important;
  margin:0!important;
  gap:4px!important;
}
#view-profile #rosterPersonList .roster-person-name{
  min-width:0!important;
  font-size:10px!important;
  line-height:1!important;
  white-space:nowrap!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
}
#view-profile #rosterPersonList .roster-access-badge{
  min-height:13px!important;
  padding:0 3px!important;
  font-size:5.5px!important;
}
#view-profile #rosterPersonList .roster-person-chevron{
  width:16px!important;
  height:16px!important;
  min-width:16px!important;
  border-radius:5px!important;
  background:transparent!important;
}
#view-profile #rosterPersonList .roster-person-chevron svg{
  width:10px!important;
  height:10px!important;
}
#view-profile #rosterPersonList>.member-role-card-v152>.member-role-head-v152{
  height:32px!important;
  min-height:32px!important;
  grid-template-columns:minmax(0,1fr) 18px 16px!important;
  gap:3px!important;
  padding:2px 6px!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
}
#view-profile #rosterPersonList .member-role-count-chip-v155{
  width:18px!important;
  height:18px!important;
  font-size:7px!important;
}
#view-profile #rosterPersonList>.roster-person.open{
  margin:3px!important;
  border:1px solid #C9D8E4!important;
  border-radius:8px!important;
  background:#FFF!important;
}
#view-profile #rosterPersonList>.roster-person.open>.roster-person-main,
#view-profile #rosterPersonList>.roster-person.open>.member-role-head-v152{
  border-radius:8px 8px 0 0!important;
  background:#F8FAFC!important;
}
#view-profile #rosterPersonList .roster-person-body,
#view-profile #rosterPersonList .member-role-body-v152{
  padding:6px!important;
}
#view-profile #memberCompactGrid>.member-compact>summary{
  height:32px!important;
  min-height:32px!important;
  padding:2px 6px!important;
  gap:4px!important;
}
#view-profile #memberCompactGrid .member-compact-name{
  font-size:10px!important;
}
#view-profile #memberCompactGrid .member-role-trigger{
  width:20px!important;
  min-width:20px!important;
  height:20px!important;
  min-height:20px!important;
  padding:0!important;
  border:0!important;
  border-radius:5px!important;
  background:transparent!important;
}
#view-profile #memberCompactGrid .member-role-trigger>span{
  display:none!important;
}
#view-profile #memberCompactGrid .member-role-trigger svg{
  width:10px!important;
  height:10px!important;
}
#view-profile #memberCompactGrid>.member-compact[open]{
  margin:3px!important;
  border:1px solid #C9D8E4!important;
  border-radius:8px!important;
}
[data-theme="dark"] #view-profile #rosterPersonList,
[data-theme="dark"] #view-profile #memberCompactGrid,
[data-theme="dark"] #view-profile #rosterPersonList>.roster-person.open{
  border-color:#315574!important;
  background:#102F50!important;
}
[data-theme="dark"] #view-profile #rosterPersonList>.roster-person,
[data-theme="dark"] #view-profile #memberCompactGrid>.member-compact{
  border-bottom-color:#274B69!important;
}
