/* Quiet role hierarchy; preserve assignment, editing and drag interactions. */
#studentCadreBoard { gap:20px; }
#studentCadreBoard .student-cadre-group { --role-tint:#527da0; }
#studentCadreBoard .class-cadres { --role-tint:var(--accent); }
#studentCadreBoard .group-leaders { --role-tint:#398678; }
#studentCadreBoard .student-cadre-group > header {
  position:static; width:auto; height:auto; clip:auto; clip-path:none;
  overflow:visible; white-space:normal; margin:0 0 10px; padding:0 0 9px;
  border:0; border-bottom:1px solid var(--line); justify-content:flex-start;
}
#studentCadreBoard .student-cadre-group > header::before {
  content:""; width:5px; height:14px; border-radius:3px;
  background:var(--role-tint); align-self:center;
}
#studentCadreBoard .student-cadre-group > header h4 {
  margin:0; font-size:13px; line-height:20px; color:var(--muted); font-weight:650;
}
#studentCadreBoard .student-cadre-role-grid { gap:8px 12px; }
#studentCadreBoard .student-cadre-role-picker {
  border-radius:10px; padding:6px; gap:6px; grid-auto-rows:auto;
  min-height:52px; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);
  background:var(--surface); box-shadow:none;
}
#studentCadreBoard .student-cadre-role-picker:hover {
  border-color:color-mix(in srgb,var(--role-tint) 40%,var(--line));
  background:var(--surface); box-shadow:0 2px 7px color-mix(in srgb,var(--ink) 4%,transparent);
}
#studentCadreBoard .student-cadre-subject-icon {
  transform:none; color:color-mix(in srgb,var(--role-tint) 75%,var(--ink));
  width:26px; height:26px; border-radius:8px;
  background:color-mix(in srgb,var(--role-tint) 8%,var(--surface));
}
#studentCadreBoard .student-cadre-subject-icon .ui-icon { width:17px; height:17px; }
#studentCadreBoard .student-cadre-role-label.has-subject-icon { grid-template-columns:26px minmax(0,1fr); padding:0; gap:4px; }
#studentCadreBoard:not(.is-edit-mode) .student-cadre-role-name-input { display:none; }
#studentCadreBoard:not(.is-edit-mode) .cadre-role-display {
  display:block; color:var(--ink); font-size:13px; line-height:1.5;
  text-align:center; font-weight:600; overflow-wrap:anywhere;
}
#studentCadreBoard .student-cadre-select {
  height:auto; min-height:36px; padding:6px 4px; border-radius:7px;
  box-shadow:none; background:var(--surface-soft);
}
#studentCadreBoard .student-cadre-select.has-selection {
  border-color:transparent; background:color-mix(in srgb,var(--role-tint) 5%,var(--surface)); color:var(--ink);
}
#studentCadreBoard .student-cadre-select:not(.has-selection)::before { content:"＋"; font-size:18px; line-height:20px; color:var(--muted); }
#studentCadreBoard .student-cadre-select:not(.has-selection) .student-cadre-selection { display:none; }
#studentCadreBoard .student-cadre-selection { width:100%; white-space:normal; overflow:visible; }
#studentCadreBoard .cadre-name-grid { gap:3px 7px; }
#studentCadreBoard .cadre-name-grid > span { font-weight:650; line-height:1.6; }
#studentCadreBoard .student-cadre-select:focus-visible { outline:2px solid var(--role-tint); outline-offset:2px; }
#studentCadreBoard .student-cadre-role-picker.is-drop-target { border-color:var(--blue); background:color-mix(in srgb,var(--blue) 8%,var(--surface)); box-shadow:0 0 0 3px color-mix(in srgb,var(--blue) 12%,transparent); }
#studentCadreBoard.is-edit-mode .student-cadre-role-picker { border-color:color-mix(in srgb,var(--accent) 25%,var(--line)); }
#studentCadreBoard .group-leaders .student-cadre-role-picker { grid-template-columns:130px minmax(0,1fr); }
@media(max-width:1100px) and (min-width:761px) {
  #studentCadreBoard .student-cadre-role-grid { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:760px) {
  #studentCadreBoard { gap:14px; padding:10px 8px 16px; }
  #studentCadreBoard .student-cadre-role-grid { gap:7px; }
  #studentCadreBoard .student-cadre-role-picker,
  #studentCadreBoard .group-leaders .student-cadre-role-picker { grid-template-columns:minmax(0,1fr) minmax(50px,.9fr); min-height:48px; padding:5px; gap:4px; }
  #studentCadreBoard .student-cadre-role-label.has-subject-icon { grid-template-columns:minmax(0,1fr); }
  #studentCadreBoard:not(.is-edit-mode) .cadre-role-display { font-size:12px; }
  #studentCadreBoard .student-cadre-select { min-height:34px; padding:5px 2px; }
  #studentCadreBoard .group-leaders .cadre-name-grid { flex-direction:row; flex-wrap:wrap; }
  #studentCadreBoard .group-leaders .cadre-name-grid > span { width:auto; flex:0 1 auto; }
}
@media(prefers-reduced-motion:reduce) {
  #studentCadreBoard .student-cadre-role-picker { transition:none; }
}
