/* Tablero de equipos · Herramientas de aula */
.cl-team-panel {--team-board-color:#235cbe}
.cl-team-panelhead {
  align-items:center;
  padding:10px 12px;
  border:1px solid var(--class-line);
  border-radius:13px;
  background:linear-gradient(115deg,#fff,color-mix(in srgb,var(--team-board-color) 11%,white));
}
.cl-team-panelhead [data-team-class] {margin:4px 0 0 43px}
.cl-team-status:not(:empty) {
  margin:0 0 10px;
  padding:7px 10px;
  border:1px solid #cbdedb;
  border-radius:9px;
  background:#eef9f6;
  color:#1f6154;
}
.cl-team-panel-footer {margin-top:12px}
.cl-team-panel-footer .btn:disabled {display:none}
.cl-team-tray {
  min-width:0;
  padding:10px;
  border:1px solid #c9dcf5;
  border-radius:13px;
  background:linear-gradient(145deg,#f9fbff,#edf5ff);
}
.cl-team-tray header {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:5px;margin-bottom:8px}
.cl-team-tray h4 {display:flex;align-items:center;gap:7px;margin:0;color:#183e77;font-size:14px}
.cl-team-count-badge,.cl-team-tray h4 span {
  padding:3px 7px;
  border-radius:999px;
  background:#deebff;
  color:#1b55a7;
  font-size:11px;
}
.cl-team-tray header p {margin:0;color:var(--class-muted);font-size:11px}
.cl-team-student-grid {
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(min(100%,211px),1fr));
  gap:7px;
  max-height:158px;
  overflow:auto;
  padding:2px;
}
.cl-team-student {
  display:grid;
  grid-template-columns:auto auto minmax(0,1fr) auto;
  align-items:center;
  gap:5px;
  min-width:0;
  min-height:45px;
  padding:4px 5px;
  border:1px solid #d2dff3;
  border-radius:9px;
  background:#fff;
  color:#173457;
  font-size:11px;
  font-weight:750;
  box-shadow:0 1px 4px #19478915;
  -webkit-user-select:none;
  user-select:none;
}
.cl-team-panel:has(.cl-team-dragging) {
  -webkit-user-select:none;
  user-select:none;
}
.cl-team-student:has(select:not(:disabled)) {cursor:grab}
.cl-team-student-name {overflow-wrap:anywhere;line-height:1.15}
.cl-team-student img {
  width:30px;
  height:30px;
  border:1px solid #deebfc;
  border-radius:50%;
  object-fit:cover;
}
.cl-team-grip {touch-action:none;color:#526d95;font-size:19px;line-height:1}
.cl-team-panel .cl-team-student select {
  width:66px;
  min-height:28px;
  padding:3px 0 3px 3px;
  border-radius:6px;
  font-size:10px;
  font-weight:700;
}
.cl-team-student select:disabled {display:none}
.cl-team-dragging {opacity:.45}
.cl-team-ghost {
  position:fixed;
  z-index:100;
  grid-template-columns:auto auto minmax(0,1fr);
  width:min(200px,calc(100vw - 12px));
  pointer-events:none;
  box-shadow:0 8px 22px #174d846a;
}
.cl-team-boxes {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,219px),1fr));
  gap:10px;
}
.cl-team-boxes:not(:empty) {margin-top:11px}
.cl-team-box {
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:154px;
  border:1px solid color-mix(in srgb,var(--team-color) 31%,white);
  border-radius:13px;
  background:color-mix(in srgb,var(--team-color) 6%,white);
  box-shadow:0 2px 7px #19478914;
}
.cl-team-over {outline:2px dashed #237eea;outline-offset:-2px;background:#eaf4ff}
.cl-team-boxhead {
  display:grid;
  grid-template-columns:minmax(0,1fr) auto auto;
  align-items:center;
  gap:6px;
  min-height:52px;
  padding:7px 8px;
  border-radius:12px 12px 0 0;
  background:linear-gradient(123deg,var(--team-color),color-mix(in srgb,var(--team-color) 78%,#172a5a));
  color:#fff;
}
.cl-team-boxhead h4 {margin:0 0 2px;font-size:14px;overflow-wrap:anywhere;color:inherit}
.cl-team-boxhead small {font-size:10px}
.cl-team-score {padding:4px 6px;border:1px solid #ffffff60;border-radius:7px;background:#ffffff24;font-size:12px;font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.cl-team-box .cl-team-more {min-width:26px;min-height:27px;padding:3px;background:#ffffff24;color:#fff;font-size:17px}
.cl-team-boxbody {display:grid;align-content:start;flex:1;gap:5px;padding:7px}
.cl-team-box footer {display:flex;align-items:center;justify-content:flex-end;gap:4px;padding:0 7px 7px}
.cl-team-box footer .btn {min-height:25px;padding:4px 6px;font-size:10px}
.cl-team-empty,.cl-team-board-empty {
  margin:0;
  padding:8px 6px;
  color:var(--class-muted);
  text-align:center;
  font-size:12px;
}
.cl-team-board-empty {margin-top:9px;padding:16px;border:1px dashed #c4d7f2;border-radius:11px;background:#f8fbff}
.gb-window.cl-team-dialog input[type="radio"] {flex:none;width:14px;min-height:0;margin:2px 0 0;padding:0;accent-color:#1556d8}
.cl-team-mode-picker {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:9px 10px}
.cl-team-mode-picker label {
  display:flex;
  align-items:flex-start;
  gap:6px;
  padding:8px;
  border:1px solid var(--gb-dialog-line);
  border-radius:9px;
  cursor:pointer;
}
.cl-team-mode-picker label:has(input:checked) {border-color:#82acec;background:#edf5ff}
.cl-team-mode-picker small {display:block;margin-top:4px;color:var(--gb-dialog-muted);font-size:11px;font-weight:500;line-height:1.3}
.cl-team-quantity {display:grid;justify-items:center;gap:6px;padding:7px 10px 12px}
.cl-team-quantity > div {display:flex;gap:4px;align-items:center}
.cl-team-quantity input {max-width:70px;text-align:center}
.cl-team-quantity p,.cl-team-help {margin:0;color:var(--gb-dialog-muted);font-size:11px}
.cl-team-help {padding:0 10px 9px}
.cl-team-help:empty {display:none}
.cl-team-rule-fields,.cl-team-pair-fields,.cl-team-edit-fields {grid-template-columns:repeat(auto-fit,minmax(min(100%,130px),1fr));align-items:end}
.cl-team-dialog input[type="color"] {width:45px;height:32px;border:1px solid var(--gb-dialog-line);border-radius:7px;background:#fff}
.cl-team-form-section > .cl-team-help:first-of-type {padding-top:6px}
.cl-team-student-settings {max-height:250px;overflow:auto;padding:0 10px 8px}
.cl-team-student-settings > div {display:grid;grid-template-columns:minmax(0,1fr) repeat(2,minmax(95px,126px));align-items:center;gap:8px;padding:6px 0;border-top:1px solid #e4edfa;font-size:12px}
.cl-team-pairs > div {display:flex;justify-content:space-between;gap:7px;padding:6px 10px;border-top:1px solid #e4edfa;font-size:12px}
.cl-team-pairs small {display:block;color:var(--gb-dialog-muted)}
@media(max-width:560px){
 .cl-team-panelhead [data-team-class] {margin-left:0}
 .cl-team-mode-picker {grid-template-columns:1fr}
 .cl-team-student-settings > div {grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
 .cl-team-student-settings b {grid-column:1/-1}
}
