.groups-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
      gap: 1.25rem;
      margin-top: 1.75rem;
    }
    .group-card {
      background: var(--bg-surface);
      border: 1px solid var(--border-color);
      border-radius: var(--radius-lg);
      padding: 1.25rem;
      box-shadow: var(--shadow-sm);
      display: flex;
      flex-direction: column;
      gap: 0.75rem;
      transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    .group-card:hover {
      box-shadow: var(--shadow-md);
    }
    .group-card-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      border-bottom: 1px solid var(--border-color);
      padding-bottom: 0.6rem;
    }
    .group-title {
      font-weight: 800;
      font-size: 1.1rem;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      gap: 0.5rem;
    }
    .student-pill {
      background: var(--bg-surface-subtle);
      border: 1px solid var(--border-color);
      padding: 0.5rem 0.85rem;
      border-radius: var(--radius-md);
      font-size: 0.95rem;
      font-weight: 600;
      color: var(--text-primary);
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      transition: all 0.15s ease;
      user-select: none;
      position: relative;
    }
    .student-pill:hover {
      border-color: var(--primary);
      background: var(--bg-surface);
      box-shadow: var(--shadow-sm);
    }
    .student-pill.is-editing {
      padding: 0.2rem;
      background: var(--bg-surface);
      border-color: var(--primary);
      box-shadow: var(--shadow-md);
    }
    .student-name-text {
      flex: 1;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      margin-right: 0.5rem;
    }
    .student-pill-actions {
      display: flex;
      align-items: center;
      gap: 0.35rem;
      opacity: 0.4;
      transition: opacity 0.15s;
    }
    .student-pill:hover .student-pill-actions {
      opacity: 1;
    }
    .student-btn-action {
      background: transparent;
      border: none;
      cursor: pointer;
      color: var(--text-muted);
      padding: 0.2rem;
      border-radius: var(--radius-sm);
      display: flex;
      align-items: center;
      justify-content: center;
      transition: color 0.15s, background 0.15s;
    }
    .student-btn-action:hover {
      color: var(--text-primary);
    }
    .student-btn-remove:hover {
      color: var(--accent-rose);
      background: rgba(239, 68, 68, 0.12);
    }
    .student-inline-input {
      width: 100%;
      border: none;
      outline: none;
      font-size: 0.95rem;
      font-weight: 700;
      background: transparent;
      color: var(--text-primary);
      padding: 0.35rem 0.65rem;
      border-radius: var(--radius-sm);
    }
    @media (max-width: 560px) {
      .groups-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
      }
      .group-card {
        padding: 1rem;
      }
    }